From 8119fd2ad1e2d009991f9a12969ccd55054163c4 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 18 Feb 2021 18:11:10 +0800 Subject: [PATCH 0001/1662] *)add JsonHijacking ql query --- .../Security/CWE/CWE-352/JsonHijacking.java | 119 ++++++++++++++++++ .../Security/CWE/CWE-352/JsonHijacking.qhelp | 35 ++++++ .../src/Security/CWE/CWE-352/JsonHijacking.ql | 32 +++++ .../Security/CWE/CWE-352/JsonHijackingLib.qll | 92 ++++++++++++++ .../Security/CWE/CWE-352/JsonStringLib.qll | 42 +++++++ .../security/CWE-352/JsonHijacking.expected | 48 +++++++ .../security/CWE-352/JsonHijacking.java | 119 ++++++++++++++++++ .../security/CWE-352/JsonHijacking.qlref | 1 + .../query-tests/security/CWE-352/options | 1 + .../com/alibaba/fastjson/JSON.java | 4 + .../stereotype/Controller.java | 14 +++ .../core/annotation/AliasFor.class | Bin 0 -> 385 bytes .../core/annotation/AliasFor.java | 10 ++ .../web/bind/annotation/GetMapping.class | Bin 0 -> 504 bytes .../web/bind/annotation/GetMapping.java | 19 +++ .../web/bind/annotation/RequestMapping.java | 13 ++ .../web/bind/annotation/ResponseBody.class | Bin 0 -> 184 bytes .../web/bind/annotation/ResponseBody.java | 4 + 18 files changed, 553 insertions(+) create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.java create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/options create mode 100644 java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.class create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java new file mode 100644 index 000000000000..d08d436fa07b --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java @@ -0,0 +1,119 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Random; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class JsonHijacking { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + + @GetMapping(value = "jsonp1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp7") + @ResponseBody + public String good(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String val = ""; + Random random = new Random(); + for (int i = 0; i < 10; i++) { + val += String.valueOf(random.nextInt(10)); + } + // good + jsonpCallback = jsonpCallback + "_" + val; + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } +} \ No newline at end of file diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp new file mode 100644 index 000000000000..38e1845f9929 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp @@ -0,0 +1,35 @@ + + + +

The software uses external input as the function name to wrap JSON data and return it to the client as a request response. When there is a cross-domain problem, +there is a problem of sensitive information leakage.

+ +
+ + +

The function name verification processing for external input can effectively prevent the leakage of sensitive information.

+ +
+ + +

The following example shows the case of no verification processing and verification processing for the external input function name.

+ + + +
+ + +
  • +OWASPLondon20161124_JSON_Hijacking_Gareth_Heyes: +JSON hijacking. +
  • +
  • +Practical JSONP Injection: + + Completely controllable from the URL (GET variable) +. +
  • +
    +
    diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql new file mode 100644 index 000000000000..a6a6d2475f09 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql @@ -0,0 +1,32 @@ +/** + * @name JSON Hijacking + * @description User-controlled callback function names that are not verified are vulnerable + * to json hijacking attacks. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/Json-hijacking + * @tags security + * external/cwe/cwe-352 + */ + +import java +import JsonHijackingLib +import semmle.code.java.dataflow.FlowSources +import DataFlow::PathGraph + +/** Taint-tracking configuration tracing flow from remote sources to output jsonp data. */ +class JsonHijackingConfig extends TaintTracking::Configuration { + JsonHijackingConfig() { this = "JsonHijackingConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof JsonHijackingSink } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, JsonHijackingConfig conf +where + conf.hasFlowPath(source, sink) and + exists(JsonHijackingFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) +select sink.getNode(), source, sink, "Json Hijacking query might include code from $@.", + source.getNode(), "this user input" diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll new file mode 100644 index 000000000000..ba91a6670bfd --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll @@ -0,0 +1,92 @@ +import java +import DataFlow +import JsonStringLib +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.frameworks.spring.SpringController + +/** A data flow sink for unvalidated user input that is used to jsonp. */ +abstract class JsonHijackingSink extends DataFlow::Node { } + +/** Use ```print```, ```println```, ```write``` to output result. */ +private class WriterPrintln extends JsonHijackingSink { + WriterPrintln() { + exists(MethodAccess ma | + ma.getMethod().getName().regexpMatch("print|println|write") and + ma.getMethod() + .getDeclaringType() + .getASourceSupertype*() + .hasQualifiedName("java.io", "PrintWriter") and + ma.getArgument(0) = this.asExpr() + ) + } +} + +/** Spring Request Method return result. */ +private class SpringReturn extends JsonHijackingSink { + SpringReturn() { + exists(ReturnStmt rs, Method m | m = rs.getEnclosingCallable() | + m instanceof SpringRequestMappingMethod and + rs.getResult() = this.asExpr() + ) + } +} + +/** A concatenate expression using `(` and `)` or `);`. */ +class JsonHijackingExpr extends AddExpr { + JsonHijackingExpr() { + getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and + getLeftOperand() + .(AddExpr) + .getLeftOperand() + .(AddExpr) + .getRightOperand() + .toString() + .regexpMatch("\"\\(\"") + } + + /** Get the jsonp function name of this expression */ + Expr getFunctionName() { + result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() + } + + /** Get the json data of this expression */ + Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } +} + +/** A data flow configuration tracing flow from remote sources to jsonp function name. */ +class RemoteFlowConfig extends DataFlow2::Configuration { + RemoteFlowConfig() { this = "RemoteFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonHijackingExpr jhe | jhe.getFunctionName() = sink.asExpr()) + } +} + +/** A data flow configuration tracing flow from json data to splicing jsonp data. */ +class JsonDataFlowConfig extends DataFlow2::Configuration { + JsonDataFlowConfig() { this = "JsonDataFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonHijackingExpr jhe | jhe.getJsonExpr() = sink.asExpr()) + } +} + +/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +class JsonHijackingFlowConfig extends TaintTracking::Configuration { + JsonHijackingFlowConfig() { this = "JsonHijackingFlowConfig" } + + override predicate isSource(DataFlow::Node src) { + exists(JsonHijackingExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | + jhe = src.asExpr() and + jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and + rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) + ) + } + + override predicate isSink(DataFlow::Node sink) { sink instanceof JsonHijackingSink } +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll new file mode 100644 index 000000000000..0da8bc860d11 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll @@ -0,0 +1,42 @@ +import java +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources +import DataFlow::PathGraph + +/** Json string type data */ +abstract class JsonpStringSource extends DataFlow::Node { } + +/** Convert to String using Gson library. */ +private class GsonString extends JsonpStringSource { + GsonString() { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + m.hasName("toJson") and + m.getDeclaringType().getASupertype*().hasQualifiedName("com.google.gson", "Gson") and + this.asExpr() = ma + ) + } +} + +/** Convert to String using Fastjson library. */ +private class FastjsonString extends JsonpStringSource { + FastjsonString() { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + m.hasName("toJSONString") and + m.getDeclaringType().getASupertype*().hasQualifiedName("com.alibaba.fastjson", "JSON") and + this.asExpr() = ma + ) + } +} + +/** Convert to String using Jackson library. */ +private class JacksonString extends JsonpStringSource { + JacksonString() { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + m.hasName("writeValueAsString") and + m.getDeclaringType() + .getASupertype*() + .hasQualifiedName("com.fasterxml.jackson.databind", "ObjectMapper") and + this.asExpr() = ma + ) + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected new file mode 100644 index 000000000000..8efc3be1673b --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected @@ -0,0 +1,48 @@ +edges +| JsonHijacking.java:28:32:28:68 | getParameter(...) : String | JsonHijacking.java:33:16:33:24 | resultStr | +| JsonHijacking.java:32:21:32:54 | ... + ... : String | JsonHijacking.java:33:16:33:24 | resultStr | +| JsonHijacking.java:40:32:40:68 | getParameter(...) : String | JsonHijacking.java:44:16:44:24 | resultStr | +| JsonHijacking.java:42:21:42:80 | ... + ... : String | JsonHijacking.java:44:16:44:24 | resultStr | +| JsonHijacking.java:51:32:51:68 | getParameter(...) : String | JsonHijacking.java:54:16:54:24 | resultStr | +| JsonHijacking.java:53:21:53:55 | ... + ... : String | JsonHijacking.java:54:16:54:24 | resultStr | +| JsonHijacking.java:61:32:61:68 | getParameter(...) : String | JsonHijacking.java:64:16:64:24 | resultStr | +| JsonHijacking.java:63:21:63:54 | ... + ... : String | JsonHijacking.java:64:16:64:24 | resultStr | +| JsonHijacking.java:72:32:72:68 | getParameter(...) : String | JsonHijacking.java:80:20:80:28 | resultStr | +| JsonHijacking.java:79:21:79:54 | ... + ... : String | JsonHijacking.java:80:20:80:28 | resultStr | +| JsonHijacking.java:88:32:88:68 | getParameter(...) : String | JsonHijacking.java:95:20:95:28 | resultStr | +| JsonHijacking.java:94:21:94:54 | ... + ... : String | JsonHijacking.java:95:20:95:28 | resultStr | +| JsonHijacking.java:102:32:102:68 | getParameter(...) : String | JsonHijacking.java:113:16:113:24 | resultStr | +nodes +| JsonHijacking.java:28:32:28:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:32:21:32:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:33:16:33:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:33:16:33:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:40:32:40:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:42:21:42:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:44:16:44:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:44:16:44:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:51:32:51:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:53:21:53:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:54:16:54:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:54:16:54:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:61:32:61:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:63:21:63:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:64:16:64:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:64:16:64:24 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:72:32:72:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:88:32:88:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:94:21:94:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonHijacking.java:95:20:95:28 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:95:20:95:28 | resultStr | semmle.label | resultStr | +| JsonHijacking.java:102:32:102:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonHijacking.java:113:16:113:24 | resultStr | semmle.label | resultStr | +#select +| JsonHijacking.java:33:16:33:24 | resultStr | JsonHijacking.java:28:32:28:68 | getParameter(...) : String | JsonHijacking.java:33:16:33:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:28:32:28:68 | getParameter(...) | this user input | +| JsonHijacking.java:44:16:44:24 | resultStr | JsonHijacking.java:40:32:40:68 | getParameter(...) : String | JsonHijacking.java:44:16:44:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:40:32:40:68 | getParameter(...) | this user input | +| JsonHijacking.java:54:16:54:24 | resultStr | JsonHijacking.java:51:32:51:68 | getParameter(...) : String | JsonHijacking.java:54:16:54:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:51:32:51:68 | getParameter(...) | this user input | +| JsonHijacking.java:64:16:64:24 | resultStr | JsonHijacking.java:61:32:61:68 | getParameter(...) : String | JsonHijacking.java:64:16:64:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:61:32:61:68 | getParameter(...) | this user input | +| JsonHijacking.java:80:20:80:28 | resultStr | JsonHijacking.java:72:32:72:68 | getParameter(...) : String | JsonHijacking.java:80:20:80:28 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:72:32:72:68 | getParameter(...) | this user input | +| JsonHijacking.java:95:20:95:28 | resultStr | JsonHijacking.java:88:32:88:68 | getParameter(...) : String | JsonHijacking.java:95:20:95:28 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:88:32:88:68 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java new file mode 100644 index 000000000000..9b473e0610ca --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java @@ -0,0 +1,119 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Random; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class JsonHijacking { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + + @GetMapping(value = "jsonp1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp7") + @ResponseBody + public String good(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String val = ""; + Random random = new Random(); + for (int i = 0; i < 10; i++) { + val += String.valueOf(random.nextInt(10)); + } + // good + jsonpCallback = jsonpCallback + "_" + val; + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref new file mode 100644 index 000000000000..e79471b3c1ed --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-352/JsonHijacking.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/options b/java/ql/test/experimental/query-tests/security/CWE-352/options new file mode 100644 index 000000000000..3676b8e38b69 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../stubs/gson-2.8.6/:${testdir}/../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../stubs/springframework-5.2.3/:${testdir}/../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../stubs/spring-core-5.3.2/ diff --git a/java/ql/test/stubs/fastjson-1.2.74/com/alibaba/fastjson/JSON.java b/java/ql/test/stubs/fastjson-1.2.74/com/alibaba/fastjson/JSON.java index b71e890e9b79..99e2873d3750 100644 --- a/java/ql/test/stubs/fastjson-1.2.74/com/alibaba/fastjson/JSON.java +++ b/java/ql/test/stubs/fastjson-1.2.74/com/alibaba/fastjson/JSON.java @@ -26,6 +26,10 @@ import com.alibaba.fastjson.parser.deserializer.ParseProcess; public abstract class JSON { + public static String toJSONString(Object object) { + return null; + } + public static Object parse(String text) { return null; } diff --git a/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java b/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java new file mode 100644 index 000000000000..9b1751fa2ae3 --- /dev/null +++ b/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java @@ -0,0 +1,14 @@ +package org.springframework.stereotype; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Controller { + String value() default ""; +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class new file mode 100644 index 0000000000000000000000000000000000000000..438065489278b92503abc2ad8d75716c5e56ac08 GIT binary patch literal 385 zcmb7=!Ab)$5QhJ0x31kDdrH&Kx0=)qG#3PM4!PcXZrOKO@(l3m};gAd?CiL-}x zJqaEL=Fj~6^G&|KKRyB6W0qr@<21(^Vbrp1G~wdrcD3b}m1S3}bqdDS4}|lDb3So0 z-aYCKH#QMKxO{0`GCTd`S`$rab#IG=`O1e{#kVeF6L_cJeRx%s4_fgdPA#nAxb#7` zj5*1|vPl9`tbG$Iy);(DbZ?q>Y=pc21QTZcMbG6{R|0?4KmBGoU|o}(H;@|2R}C^k ghLPwaQNxHF$I?t>JeJBL3UL&FIx;a%x-6Xh0OC_*bpQYW literal 0 HcmV?d00001 diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java new file mode 100644 index 000000000000..3a823fade5b0 --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java @@ -0,0 +1,10 @@ +package org.springframework.core.annotation; + +public @interface AliasFor { + @AliasFor("attribute") + String value() default ""; + + @AliasFor("value") + String attribute() default ""; + +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class new file mode 100644 index 0000000000000000000000000000000000000000..5392ca0ebc1593d6bfa2f7d765ee4ca169fb260f GIT binary patch literal 504 zcma)&y-ve06orr5G%4k$Ewlp@8)_FUu~3N#3Bgi?)JiO!oYW02i5(KVeK!UkfQLfd z3?&dTFj%_xlg>TI=i~G39l#Za0geNl1Q;-QTBMR;Fd9$SVk3AWbj;^AS316C=-+5< ztgy=HTe%W0u?%2nZA9WoH5`o>f62T|*k=Ym6S+tWhIV9h;Zj+SS#FjtD#y;;xIB_~ zDxp)|dubm;mXYs88HC|<=CoC*d{Tu96Imr8>11m1m={?Yb44Ckk!ycGS!yuAF9#FEVXJbh%nj0^%G u-TFC+dFlH8Nm;4MC5#O62q7eGj&Kvy7#SEDn1GlW=t>44%>pEu7+3+XjWw+R literal 0 HcmV?d00001 diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java new file mode 100644 index 000000000000..b2134009968b --- /dev/null +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java @@ -0,0 +1,4 @@ +package org.springframework.web.bind.annotation; + +public @interface ResponseBody { +} From 872a000a33e1b0d6fb2efeb926c7ed9e18725bd5 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 24 Feb 2021 20:36:12 +0800 Subject: [PATCH 0002/1662] *)update to JSONP injection --- .../Security/CWE/CWE-352/JsonpInjection.java | 170 +++++++++++++++++ .../Security/CWE/CWE-352/JsonpInjection.qhelp | 35 ++++ .../Security/CWE/CWE-352/JsonpInjection.ql | 55 ++++++ .../CWE/CWE-352/JsonpInjectionLib.qll | 92 ++++++++++ .../security/CWE-352/JsonpInjection.expected | 60 ++++++ .../security/CWE-352/JsonpInjection.java | 171 ++++++++++++++++++ .../security/CWE-352/JsonpInjection.qlref | 1 + 7 files changed, 584 insertions(+) create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjection.java create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.java b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.java new file mode 100644 index 000000000000..8b4e7cc005ef --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.java @@ -0,0 +1,170 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Random; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class JsonpInjection { +private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + + @GetMapping(value = "jsonp1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp7") + @ResponseBody + public String good(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String val = ""; + Random random = new Random(); + for (int i = 0; i < 10; i++) { + val += String.valueOf(random.nextInt(10)); + } + // good + jsonpCallback = jsonpCallback + "_" + val; + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp8") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String token = request.getParameter("token"); + + // good + if (verifToken(token)){ + System.out.println(token); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + return "error"; + } + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String referer = request.getHeader("Referer"); + + boolean result = verifReferer(referer); + // good + if (result){ + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + return "error"; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } + + public static boolean verifToken(String token){ + if (token != "xxxx"){ + return false; + } + return true; + } + + public static boolean verifReferer(String referer){ + if (!referer.startsWith("http://test.com/")){ + return false; + } + return true; + } +} \ No newline at end of file diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp new file mode 100644 index 000000000000..b063b409d3a5 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -0,0 +1,35 @@ + + + +

    The software uses external input as the function name to wrap JSON data and return it to the client as a request response. When there is a cross-domain problem, +there is a problem of sensitive information leakage.

    + +
    + + +

    Adding `Referer` or random `token` verification processing can effectively prevent the leakage of sensitive information.

    + +
    + + +

    The following example shows the case of no verification processing and verification processing for the external input function name.

    + + + +
    + + +
  • +OWASPLondon20161124_JSON_Hijacking_Gareth_Heyes: +JSON hijacking. +
  • +
  • +Practical JSONP Injection: + + Completely controllable from the URL (GET variable) +. +
  • +
    +
    diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql new file mode 100644 index 000000000000..e7ca2d41e343 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql @@ -0,0 +1,55 @@ +/** + * @name JSON Hijacking + * @description User-controlled callback function names that are not verified are vulnerable + * to json hijacking attacks. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/Json-hijacking + * @tags security + * external/cwe/cwe-352 + */ + +import java +import JsonpInjectionLib +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.deadcode.WebEntryPoints +import DataFlow::PathGraph + +class VerifAuth extends DataFlow::BarrierGuard { + VerifAuth() { + exists(MethodAccess ma, Node prod, Node succ | + this = ma and + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer).*") and + prod instanceof RemoteFlowSource and + succ.asExpr() = ma.getAnArgument() and + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer).*") and + localFlowStep*(prod, succ) + ) + } + + override predicate checks(Expr e, boolean branch) { + exists(ReturnStmt rs | + e = rs.getResult() and + branch = true + ) + } +} + +/** Taint-tracking configuration tracing flow from remote sources to output jsonp data. */ +class JsonpInjectionConfig extends TaintTracking::Configuration { + JsonpInjectionConfig() { this = "JsonpInjectionConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof JsonpInjectionSink } + + override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { guard instanceof VerifAuth } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, JsonpInjectionConfig conf +where + conf.hasFlowPath(source, sink) and + exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) +select sink.getNode(), source, sink, "Json Hijacking query might include code from $@.", + source.getNode(), "this user input" \ No newline at end of file diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll new file mode 100644 index 000000000000..4294a5e8c8f2 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -0,0 +1,92 @@ +import java +import DataFlow +import JsonStringLib +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.frameworks.spring.SpringController + +/** A data flow sink for unvalidated user input that is used to jsonp. */ +abstract class JsonpInjectionSink extends DataFlow::Node { } + +/** Use ```print```, ```println```, ```write``` to output result. */ +private class WriterPrintln extends JsonpInjectionSink { + WriterPrintln() { + exists(MethodAccess ma | + ma.getMethod().getName().regexpMatch("print|println|write") and + ma.getMethod() + .getDeclaringType() + .getASourceSupertype*() + .hasQualifiedName("java.io", "PrintWriter") and + ma.getArgument(0) = this.asExpr() + ) + } +} + +/** Spring Request Method return result. */ +private class SpringReturn extends JsonpInjectionSink { + SpringReturn() { + exists(ReturnStmt rs, Method m | m = rs.getEnclosingCallable() | + m instanceof SpringRequestMappingMethod and + rs.getResult() = this.asExpr() + ) + } +} + +/** A concatenate expression using `(` and `)` or `);`. */ +class JsonpInjectionExpr extends AddExpr { + JsonpInjectionExpr() { + getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and + getLeftOperand() + .(AddExpr) + .getLeftOperand() + .(AddExpr) + .getRightOperand() + .toString() + .regexpMatch("\"\\(\"") + } + + /** Get the jsonp function name of this expression */ + Expr getFunctionName() { + result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() + } + + /** Get the json data of this expression */ + Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } +} + +/** A data flow configuration tracing flow from remote sources to jsonp function name. */ +class RemoteFlowConfig extends DataFlow2::Configuration { + RemoteFlowConfig() { this = "RemoteFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonpInjectionExpr jhe | jhe.getFunctionName() = sink.asExpr()) + } +} + +/** A data flow configuration tracing flow from json data to splicing jsonp data. */ +class JsonDataFlowConfig extends DataFlow2::Configuration { + JsonDataFlowConfig() { this = "JsonDataFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonpInjectionExpr jhe | jhe.getJsonExpr() = sink.asExpr()) + } +} + +/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +class JsonpInjectionFlowConfig extends DataFlow::Configuration { + JsonpInjectionFlowConfig() { this = "JsonpInjectionFlowConfig" } + + override predicate isSource(DataFlow::Node src) { + exists(JsonpInjectionExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | + jhe = src.asExpr() and + jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and + rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) + ) + } + + override predicate isSink(DataFlow::Node sink) { sink instanceof JsonpInjectionSink } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected new file mode 100644 index 000000000000..019af8f5c055 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected @@ -0,0 +1,60 @@ +edges +| JsonpInjection.java:28:32:28:68 | getParameter(...) : String | JsonpInjection.java:33:16:33:24 | resultStr | +| JsonpInjection.java:32:21:32:54 | ... + ... : String | JsonpInjection.java:33:16:33:24 | resultStr | +| JsonpInjection.java:40:32:40:68 | getParameter(...) : String | JsonpInjection.java:44:16:44:24 | resultStr | +| JsonpInjection.java:42:21:42:80 | ... + ... : String | JsonpInjection.java:44:16:44:24 | resultStr | +| JsonpInjection.java:51:32:51:68 | getParameter(...) : String | JsonpInjection.java:54:16:54:24 | resultStr | +| JsonpInjection.java:53:21:53:55 | ... + ... : String | JsonpInjection.java:54:16:54:24 | resultStr | +| JsonpInjection.java:61:32:61:68 | getParameter(...) : String | JsonpInjection.java:64:16:64:24 | resultStr | +| JsonpInjection.java:63:21:63:54 | ... + ... : String | JsonpInjection.java:64:16:64:24 | resultStr | +| JsonpInjection.java:72:32:72:68 | getParameter(...) : String | JsonpInjection.java:80:20:80:28 | resultStr | +| JsonpInjection.java:79:21:79:54 | ... + ... : String | JsonpInjection.java:80:20:80:28 | resultStr | +| JsonpInjection.java:88:32:88:68 | getParameter(...) : String | JsonpInjection.java:95:20:95:28 | resultStr | +| JsonpInjection.java:94:21:94:54 | ... + ... : String | JsonpInjection.java:95:20:95:28 | resultStr | +| JsonpInjection.java:102:32:102:68 | getParameter(...) : String | JsonpInjection.java:113:16:113:24 | resultStr | +| JsonpInjection.java:128:25:128:59 | ... + ... : String | JsonpInjection.java:129:20:129:28 | resultStr | +| JsonpInjection.java:147:25:147:59 | ... + ... : String | JsonpInjection.java:148:20:148:28 | resultStr | +nodes +| JsonpInjection.java:28:32:28:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:32:21:32:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:33:16:33:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:33:16:33:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:40:32:40:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:42:21:42:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:44:16:44:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:44:16:44:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:51:32:51:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:53:21:53:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:54:16:54:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:54:16:54:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:61:32:61:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:63:21:63:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:64:16:64:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:64:16:64:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:72:32:72:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:88:32:88:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:94:21:94:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:95:20:95:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:95:20:95:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:102:32:102:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:113:16:113:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:128:25:128:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:129:20:129:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:147:25:147:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:148:20:148:28 | resultStr | semmle.label | resultStr | +#select +| JsonpInjection.java:33:16:33:24 | resultStr | JsonpInjection.java:28:32:28:68 | getParameter(...) : String | JsonpInjection.java:33:16:33:24 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:28:32:28:68 | getParameter(...) | this user input | +| JsonpInjection.java:44:16:44:24 | resultStr | JsonpInjection.java:40:32:40:68 | getParameter(...) : String | JsonpInjection.java:44:16:44:24 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:40:32:40:68 | getParameter(...) | this user input | +| JsonpInjection.java:54:16:54:24 | resultStr | JsonpInjection.java:51:32:51:68 | getParameter(...) : String | JsonpInjection.java:54:16:54:24 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:51:32:51:68 | getParameter(...) | this user input | +| JsonpInjection.java:64:16:64:24 | resultStr | JsonpInjection.java:61:32:61:68 | getParameter(...) : String | JsonpInjection.java:64:16:64:24 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:61:32:61:68 | getParameter(...) | this user input | +| JsonpInjection.java:80:20:80:28 | resultStr | JsonpInjection.java:72:32:72:68 | getParameter(...) : String | JsonpInjection.java:80:20:80:28 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:72:32:72:68 | getParameter(...) | this user input | +| JsonpInjection.java:95:20:95:28 | resultStr | JsonpInjection.java:88:32:88:68 | getParameter(...) : String | JsonpInjection.java:95:20:95:28 | resultStr | Json Hijacking query +might include code from $@. | JsonpInjection.java:88:32:88:68 | getParameter(...) | this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java new file mode 100644 index 000000000000..df3aa2c02fe9 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java @@ -0,0 +1,171 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Random; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class JsonpInjection { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + + @GetMapping(value = "jsonp1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + response.setContentType("application/json"); + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp7") + @ResponseBody + public String good(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String val = ""; + Random random = new Random(); + for (int i = 0; i < 10; i++) { + val += String.valueOf(random.nextInt(10)); + } + // good + jsonpCallback = jsonpCallback + "_" + val; + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp8") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String token = request.getParameter("token"); + + // good + if (verifToken(token)){ + System.out.println(token); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + return "error"; + } + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + String referer = request.getHeader("Referer"); + + boolean result = verifReferer(referer); + // good + if (result){ + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + return "error"; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } + + public static boolean verifToken(String token){ + if (token != "xxxx"){ + return false; + } + return true; + } + + public static boolean verifReferer(String referer){ + if (!referer.startsWith("http://test.com/")){ + return false; + } + return true; + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref new file mode 100644 index 000000000000..6ad4b8acda76 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-352/JsonpInjection.ql From 6fe8bafc7d35f77d5db38d0802b192b6abb45dd1 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 24 Feb 2021 20:59:51 +0800 Subject: [PATCH 0003/1662] *)update --- .../Security/CWE/CWE-352/JsonHijacking.java | 119 ------------------ .../Security/CWE/CWE-352/JsonHijacking.qhelp | 35 ------ .../src/Security/CWE/CWE-352/JsonHijacking.ql | 32 ----- .../Security/CWE/CWE-352/JsonHijackingLib.qll | 92 -------------- .../security/CWE-352/JsonHijacking.expected | 48 ------- .../security/CWE-352/JsonHijacking.java | 119 ------------------ .../security/CWE-352/JsonHijacking.qlref | 1 - 7 files changed, 446 deletions(-) delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.java delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java deleted file mode 100644 index d08d436fa07b..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.java +++ /dev/null @@ -1,119 +0,0 @@ -import com.alibaba.fastjson.JSONObject; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.Gson; -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Random; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class JsonHijacking { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - - @GetMapping(value = "jsonp1") - @ResponseBody - public String bad1(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp2") - @ResponseBody - public String bad2(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - - return resultStr; - } - - @GetMapping(value = "jsonp3") - @ResponseBody - public String bad3(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp4") - @ResponseBody - public String bad4(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @GetMapping(value = "jsonp5") - @ResponseBody - public void bad5(HttpServletRequest request, - HttpServletResponse response) throws Exception { - response.setContentType("application/json"); - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp6") - @ResponseBody - public void bad6(HttpServletRequest request, - HttpServletResponse response) throws Exception { - response.setContentType("application/json"); - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp7") - @ResponseBody - public String good(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - String val = ""; - Random random = new Random(); - for (int i = 0; i < 10; i++) { - val += String.valueOf(random.nextInt(10)); - } - // good - jsonpCallback = jsonpCallback + "_" + val; - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - public static String getJsonStr(Object result) { - return JSONObject.toJSONString(result); - } -} \ No newline at end of file diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp deleted file mode 100644 index 38e1845f9929..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.qhelp +++ /dev/null @@ -1,35 +0,0 @@ - - - -

    The software uses external input as the function name to wrap JSON data and return it to the client as a request response. When there is a cross-domain problem, -there is a problem of sensitive information leakage.

    - -
    - - -

    The function name verification processing for external input can effectively prevent the leakage of sensitive information.

    - -
    - - -

    The following example shows the case of no verification processing and verification processing for the external input function name.

    - - - -
    - - -
  • -OWASPLondon20161124_JSON_Hijacking_Gareth_Heyes: -JSON hijacking. -
  • -
  • -Practical JSONP Injection: - - Completely controllable from the URL (GET variable) -. -
  • -
    -
    diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql b/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql deleted file mode 100644 index a6a6d2475f09..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonHijacking.ql +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @name JSON Hijacking - * @description User-controlled callback function names that are not verified are vulnerable - * to json hijacking attacks. - * @kind path-problem - * @problem.severity error - * @precision high - * @id java/Json-hijacking - * @tags security - * external/cwe/cwe-352 - */ - -import java -import JsonHijackingLib -import semmle.code.java.dataflow.FlowSources -import DataFlow::PathGraph - -/** Taint-tracking configuration tracing flow from remote sources to output jsonp data. */ -class JsonHijackingConfig extends TaintTracking::Configuration { - JsonHijackingConfig() { this = "JsonHijackingConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JsonHijackingSink } -} - -from DataFlow::PathNode source, DataFlow::PathNode sink, JsonHijackingConfig conf -where - conf.hasFlowPath(source, sink) and - exists(JsonHijackingFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) -select sink.getNode(), source, sink, "Json Hijacking query might include code from $@.", - source.getNode(), "this user input" diff --git a/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll deleted file mode 100644 index ba91a6670bfd..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonHijackingLib.qll +++ /dev/null @@ -1,92 +0,0 @@ -import java -import DataFlow -import JsonStringLib -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.frameworks.spring.SpringController - -/** A data flow sink for unvalidated user input that is used to jsonp. */ -abstract class JsonHijackingSink extends DataFlow::Node { } - -/** Use ```print```, ```println```, ```write``` to output result. */ -private class WriterPrintln extends JsonHijackingSink { - WriterPrintln() { - exists(MethodAccess ma | - ma.getMethod().getName().regexpMatch("print|println|write") and - ma.getMethod() - .getDeclaringType() - .getASourceSupertype*() - .hasQualifiedName("java.io", "PrintWriter") and - ma.getArgument(0) = this.asExpr() - ) - } -} - -/** Spring Request Method return result. */ -private class SpringReturn extends JsonHijackingSink { - SpringReturn() { - exists(ReturnStmt rs, Method m | m = rs.getEnclosingCallable() | - m instanceof SpringRequestMappingMethod and - rs.getResult() = this.asExpr() - ) - } -} - -/** A concatenate expression using `(` and `)` or `);`. */ -class JsonHijackingExpr extends AddExpr { - JsonHijackingExpr() { - getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and - getLeftOperand() - .(AddExpr) - .getLeftOperand() - .(AddExpr) - .getRightOperand() - .toString() - .regexpMatch("\"\\(\"") - } - - /** Get the jsonp function name of this expression */ - Expr getFunctionName() { - result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() - } - - /** Get the json data of this expression */ - Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } -} - -/** A data flow configuration tracing flow from remote sources to jsonp function name. */ -class RemoteFlowConfig extends DataFlow2::Configuration { - RemoteFlowConfig() { this = "RemoteFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { - exists(JsonHijackingExpr jhe | jhe.getFunctionName() = sink.asExpr()) - } -} - -/** A data flow configuration tracing flow from json data to splicing jsonp data. */ -class JsonDataFlowConfig extends DataFlow2::Configuration { - JsonDataFlowConfig() { this = "JsonDataFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } - - override predicate isSink(DataFlow::Node sink) { - exists(JsonHijackingExpr jhe | jhe.getJsonExpr() = sink.asExpr()) - } -} - -/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ -class JsonHijackingFlowConfig extends TaintTracking::Configuration { - JsonHijackingFlowConfig() { this = "JsonHijackingFlowConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(JsonHijackingExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | - jhe = src.asExpr() and - jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and - rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) - ) - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JsonHijackingSink } -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected deleted file mode 100644 index 8efc3be1673b..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.expected +++ /dev/null @@ -1,48 +0,0 @@ -edges -| JsonHijacking.java:28:32:28:68 | getParameter(...) : String | JsonHijacking.java:33:16:33:24 | resultStr | -| JsonHijacking.java:32:21:32:54 | ... + ... : String | JsonHijacking.java:33:16:33:24 | resultStr | -| JsonHijacking.java:40:32:40:68 | getParameter(...) : String | JsonHijacking.java:44:16:44:24 | resultStr | -| JsonHijacking.java:42:21:42:80 | ... + ... : String | JsonHijacking.java:44:16:44:24 | resultStr | -| JsonHijacking.java:51:32:51:68 | getParameter(...) : String | JsonHijacking.java:54:16:54:24 | resultStr | -| JsonHijacking.java:53:21:53:55 | ... + ... : String | JsonHijacking.java:54:16:54:24 | resultStr | -| JsonHijacking.java:61:32:61:68 | getParameter(...) : String | JsonHijacking.java:64:16:64:24 | resultStr | -| JsonHijacking.java:63:21:63:54 | ... + ... : String | JsonHijacking.java:64:16:64:24 | resultStr | -| JsonHijacking.java:72:32:72:68 | getParameter(...) : String | JsonHijacking.java:80:20:80:28 | resultStr | -| JsonHijacking.java:79:21:79:54 | ... + ... : String | JsonHijacking.java:80:20:80:28 | resultStr | -| JsonHijacking.java:88:32:88:68 | getParameter(...) : String | JsonHijacking.java:95:20:95:28 | resultStr | -| JsonHijacking.java:94:21:94:54 | ... + ... : String | JsonHijacking.java:95:20:95:28 | resultStr | -| JsonHijacking.java:102:32:102:68 | getParameter(...) : String | JsonHijacking.java:113:16:113:24 | resultStr | -nodes -| JsonHijacking.java:28:32:28:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:32:21:32:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:33:16:33:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:33:16:33:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:40:32:40:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:42:21:42:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:44:16:44:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:44:16:44:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:51:32:51:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:53:21:53:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:54:16:54:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:54:16:54:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:61:32:61:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:63:21:63:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:64:16:64:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:64:16:64:24 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:72:32:72:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:88:32:88:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:94:21:94:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonHijacking.java:95:20:95:28 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:95:20:95:28 | resultStr | semmle.label | resultStr | -| JsonHijacking.java:102:32:102:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonHijacking.java:113:16:113:24 | resultStr | semmle.label | resultStr | -#select -| JsonHijacking.java:33:16:33:24 | resultStr | JsonHijacking.java:28:32:28:68 | getParameter(...) : String | JsonHijacking.java:33:16:33:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:28:32:28:68 | getParameter(...) | this user input | -| JsonHijacking.java:44:16:44:24 | resultStr | JsonHijacking.java:40:32:40:68 | getParameter(...) : String | JsonHijacking.java:44:16:44:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:40:32:40:68 | getParameter(...) | this user input | -| JsonHijacking.java:54:16:54:24 | resultStr | JsonHijacking.java:51:32:51:68 | getParameter(...) : String | JsonHijacking.java:54:16:54:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:51:32:51:68 | getParameter(...) | this user input | -| JsonHijacking.java:64:16:64:24 | resultStr | JsonHijacking.java:61:32:61:68 | getParameter(...) : String | JsonHijacking.java:64:16:64:24 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:61:32:61:68 | getParameter(...) | this user input | -| JsonHijacking.java:80:20:80:28 | resultStr | JsonHijacking.java:72:32:72:68 | getParameter(...) : String | JsonHijacking.java:80:20:80:28 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:72:32:72:68 | getParameter(...) | this user input | -| JsonHijacking.java:95:20:95:28 | resultStr | JsonHijacking.java:88:32:88:68 | getParameter(...) : String | JsonHijacking.java:95:20:95:28 | resultStr | Json Hijacking query might include code from $@. | JsonHijacking.java:88:32:88:68 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java deleted file mode 100644 index 9b473e0610ca..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.java +++ /dev/null @@ -1,119 +0,0 @@ -import com.alibaba.fastjson.JSONObject; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.Gson; -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Random; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class JsonHijacking { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - - @GetMapping(value = "jsonp1") - @ResponseBody - public String bad1(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp2") - @ResponseBody - public String bad2(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - - return resultStr; - } - - @GetMapping(value = "jsonp3") - @ResponseBody - public String bad3(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp4") - @ResponseBody - public String bad4(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @GetMapping(value = "jsonp5") - @ResponseBody - public void bad5(HttpServletRequest request, - HttpServletResponse response) throws Exception { - response.setContentType("application/json"); - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp6") - @ResponseBody - public void bad6(HttpServletRequest request, - HttpServletResponse response) throws Exception { - response.setContentType("application/json"); - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp7") - @ResponseBody - public String good(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - String val = ""; - Random random = new Random(); - for (int i = 0; i < 10; i++) { - val += String.valueOf(random.nextInt(10)); - } - // good - jsonpCallback = jsonpCallback + "_" + val; - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - public static String getJsonStr(Object result) { - return JSONObject.toJSONString(result); - } -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref deleted file mode 100644 index e79471b3c1ed..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonHijacking.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-352/JsonHijacking.ql From f795d5e0d3b4f1a7fc5446755020786c3faecae1 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 27 Feb 2021 16:25:17 +0800 Subject: [PATCH 0004/1662] update JSONP Injection ql --- .../Security/CWE/CWE-352/JsonpInjection.ql | 45 +++++--- .../CWE/CWE-352/JsonpInjectionFilterLib.qll | 77 +++++++++++++ .../CWE/CWE-352/JsonpInjectionLib.qll | 65 ++++++++++- .../CWE/CWE-352/JsonpInjectionServlet.java | 60 ++++++++++ .../CWE/CWE-352/JsonpInjectionServlet1.java | 64 +++++++++++ .../CWE/CWE-352/JsonpInjectionServlet2.java | 50 +++++++++ .../semmle/code/java/frameworks/Servlets.qll | 27 +++++ .../security/CWE-352/JsonpInjection.expected | 106 +++++++++--------- .../security/CWE-352/JsonpInjection.java | 13 ++- .../core/annotation/AliasFor.class | Bin 385 -> 0 bytes .../web/bind/annotation/GetMapping.class | Bin 504 -> 0 bytes .../web/bind/annotation/RequestMapping.java | 2 + .../web/bind/annotation/RequestMethod.java | 15 +++ .../web/bind/annotation/ResponseBody.class | Bin 184 -> 0 bytes 14 files changed, 448 insertions(+), 76 deletions(-) create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java create mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMethod.java delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.class diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql index e7ca2d41e343..53ee6182511b 100644 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql @@ -1,55 +1,68 @@ /** - * @name JSON Hijacking + * @name JSONP Injection * @description User-controlled callback function names that are not verified are vulnerable - * to json hijacking attacks. + * to jsonp injection attacks. * @kind path-problem * @problem.severity error * @precision high - * @id java/Json-hijacking + * @id java/JSONP-Injection * @tags security * external/cwe/cwe-352 */ import java import JsonpInjectionLib +import JsonpInjectionFilterLib import semmle.code.java.dataflow.FlowSources import semmle.code.java.deadcode.WebEntryPoints import DataFlow::PathGraph -class VerifAuth extends DataFlow::BarrierGuard { - VerifAuth() { + +/** If there is a method to verify `token`, `auth`, `referer`, and `origin`, it will not pass. */ +class ServletVerifAuth extends DataFlow::BarrierGuard { + ServletVerifAuth() { exists(MethodAccess ma, Node prod, Node succ | - this = ma and - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer).*") and + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and prod instanceof RemoteFlowSource and succ.asExpr() = ma.getAnArgument() and - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer).*") and - localFlowStep*(prod, succ) + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and + localFlowStep*(prod, succ) and + this = ma ) } override predicate checks(Expr e, boolean branch) { - exists(ReturnStmt rs | - e = rs.getResult() and + exists(Node node | + node instanceof JsonpInjectionSink and + e = node.asExpr() and branch = true ) } } -/** Taint-tracking configuration tracing flow from remote sources to output jsonp data. */ +/** Taint-tracking configuration tracing flow from get method request sources to output jsonp data. */ class JsonpInjectionConfig extends TaintTracking::Configuration { JsonpInjectionConfig() { this = "JsonpInjectionConfig" } - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + override predicate isSource(DataFlow::Node source) { source instanceof GetHttpRequestSource } override predicate isSink(DataFlow::Node sink) { sink instanceof JsonpInjectionSink } - override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { guard instanceof VerifAuth } + override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { + guard instanceof ServletVerifAuth + } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(MethodAccess ma | + isRequestGetParamMethod(ma) and pred.asExpr() = ma.getQualifier() and succ.asExpr() = ma + ) + } } from DataFlow::PathNode source, DataFlow::PathNode sink, JsonpInjectionConfig conf where + not checks() = false and conf.hasFlowPath(source, sink) and exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) -select sink.getNode(), source, sink, "Json Hijacking query might include code from $@.", - source.getNode(), "this user input" \ No newline at end of file +select sink.getNode(), source, sink, "Jsonp Injection query might include code from $@.", + source.getNode(), "this user input" diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll new file mode 100644 index 000000000000..b349bed26414 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll @@ -0,0 +1,77 @@ +/** + * @name JSONP Injection + * @description User-controlled callback function names that are not verified are vulnerable + * to json hijacking attacks. + * @kind path-problem + */ + +import java +import DataFlow +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.dataflow.TaintTracking2 +import DataFlow::PathGraph + +class FilterVerifAuth extends DataFlow::BarrierGuard { + FilterVerifAuth() { + exists(MethodAccess ma, Node prod, Node succ | + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and + prod instanceof RemoteFlowSource and + succ.asExpr() = ma.getAnArgument() and + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and + localFlowStep*(prod, succ) and + this = ma + ) + } + + override predicate checks(Expr e, boolean branch) { + exists(Node node | + node instanceof DoFilterMethodSink and + e = node.asExpr() and + branch = true + ) + } +} + +/** A data flow source for `Filter.doFilter` method paramters. */ +private class DoFilterMethodSource extends DataFlow::Node { + DoFilterMethodSource() { + exists(Method m | + isDoFilterMethod(m) and + m.getAParameter().getAnAccess() = this.asExpr() + ) + } +} + +/** A data flow sink for `FilterChain.doFilter` method qualifying expression. */ +private class DoFilterMethodSink extends DataFlow::Node { + DoFilterMethodSink() { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + m.hasName("doFilter") and + m.getDeclaringType*().hasQualifiedName("javax.servlet", "FilterChain") and + ma.getQualifier() = this.asExpr() + ) + } +} + +/** Taint-tracking configuration tracing flow from `doFilter` method paramter source to output + * `FilterChain.doFilter` method qualifying expression. + * */ +class DoFilterMethodConfig extends TaintTracking::Configuration { + DoFilterMethodConfig() { this = "DoFilterMethodConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof DoFilterMethodSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof DoFilterMethodSink } + + override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { + guard instanceof FilterVerifAuth + } +} + +/** Implement class modeling verification for `Filter.doFilter`, return false if it fails. */ +boolean checks() { + exists(DataFlow::PathNode source, DataFlow::PathNode sink, DoFilterMethodConfig conf | + conf.hasFlowPath(source, sink) and + result = false + ) +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll index 4294a5e8c8f2..3f7304258232 100644 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -5,6 +5,69 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +private predicate isGetServletMethod(Method m) { + isServletRequestMethod(m) and m.getName() = "doGet" +} + +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +private predicate isGetSpringControllerMethod(Method m) { + exists(Annotation a | + a = m.getAnAnnotation() and + a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "GetMapping") + ) + or + exists(Annotation a | + a = m.getAnAnnotation() and + a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and + a.getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") + ) +} + +/** Method parameters use the annotation `@RequestParam` or the parameter type is `ServletRequest`, `String`, `Object` */ +predicate checkSpringMethodParameterType(Method m, int i) { + m.getParameter(i).getType() instanceof ServletRequest + or + exists(Parameter p | + p = m.getParameter(i) and + p.hasAnnotation() and + p.getAnAnnotation() + .getType() + .hasQualifiedName("org.springframework.web.bind.annotation", "RequestParam") and + p.getType().getName().regexpMatch("String|Object") + ) + or + exists(Parameter p | + p = m.getParameter(i) and + not p.hasAnnotation() and + p.getType().getName().regexpMatch("String|Object") + ) +} + +/** A data flow source for get method request parameters. */ +abstract class GetHttpRequestSource extends DataFlow::Node { } + +/** A data flow source for servlet get method request parameters. */ +private class ServletGetHttpRequestSource extends GetHttpRequestSource { + ServletGetHttpRequestSource() { + exists(Method m | + isGetServletMethod(m) and + m.getParameter(0).getAnAccess() = this.asExpr() + ) + } +} + +/** A data flow source for spring controller get method request parameters. */ +private class SpringGetHttpRequestSource extends GetHttpRequestSource { + SpringGetHttpRequestSource() { + exists(SpringControllerMethod scm, int i | + isGetSpringControllerMethod(scm) and + checkSpringMethodParameterType(scm, i) and + scm.getParameter(i).getAnAccess() = this.asExpr() + ) + } +} + /** A data flow sink for unvalidated user input that is used to jsonp. */ abstract class JsonpInjectionSink extends DataFlow::Node { } @@ -26,7 +89,7 @@ private class WriterPrintln extends JsonpInjectionSink { private class SpringReturn extends JsonpInjectionSink { SpringReturn() { exists(ReturnStmt rs, Method m | m = rs.getEnclosingCallable() | - m instanceof SpringRequestMappingMethod and + isGetSpringControllerMethod(m) and rs.getResult() = this.asExpr() ) } diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java new file mode 100644 index 000000000000..916cd9bf676e --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java @@ -0,0 +1,60 @@ +import com.google.gson.Gson; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JsonpInjectionServlet extends HttpServlet { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + private static final long serialVersionUID = 1L; + + private String key = "test"; + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String jsonpCallback = req.getParameter("jsonpCallback"); + + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = resp.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + pw.flush(); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String jsonpCallback = req.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = resp.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + pw.flush(); + } + + @Override + public void init(ServletConfig config) throws ServletException { + this.key = config.getInitParameter("key"); + System.out.println("åˆå§‹åŒ–" + this.key); + super.init(config); + } + +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java new file mode 100644 index 000000000000..14ef76275b1d --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java @@ -0,0 +1,64 @@ +import com.google.gson.Gson; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JsonpInjectionServlet1 extends HttpServlet { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + private static final long serialVersionUID = 1L; + + private String key = "test"; + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.setContentType("application/json"); + String jsonpCallback = req.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String jsonResult = gson.toJson(hashMap); + + String referer = req.getHeader("Referer"); + + boolean result = verifReferer(referer); + + // good + if (result){ + String resultStr = null; + pw = resp.getWriter(); + resultStr = jsonpCallback + "(" + jsonResult + ")"; + pw.println(resultStr); + pw.flush(); + } + } + + public static boolean verifReferer(String referer){ + if (!referer.startsWith("http://test.com/")){ + return false; + } + return true; + } + + @Override + public void init(ServletConfig config) throws ServletException { + this.key = config.getInitParameter("key"); + System.out.println("åˆå§‹åŒ–" + this.key); + super.init(config); + } + +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java new file mode 100644 index 000000000000..bbfbc2dc4360 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java @@ -0,0 +1,50 @@ +import com.google.gson.Gson; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JsonpInjectionServlet2 extends HttpServlet { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + private static final long serialVersionUID = 1L; + + private String key = "test"; + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.setContentType("application/json"); + String jsonpCallback = req.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = resp.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + pw.flush(); + } + + @Override + public void init(ServletConfig config) throws ServletException { + this.key = config.getInitParameter("key"); + System.out.println("åˆå§‹åŒ–" + this.key); + super.init(config); + } + +} diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index 3fad8c4e18b3..b2054dc30cb7 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -337,3 +337,30 @@ predicate isRequestGetParamMethod(MethodAccess ma) { ma.getMethod() instanceof ServletRequestGetParameterMapMethod or ma.getMethod() instanceof HttpServletRequestGetQueryStringMethod } + + +/** + * A class that has `javax.servlet.Filter` as an ancestor. + */ +class FilterClass extends Class { + FilterClass() { getAnAncestor().hasQualifiedName("javax.servlet", "Filter") } +} + + +/** + * The interface `javax.servlet.FilterChain` + */ +class FilterChain extends RefType { + FilterChain() { + hasQualifiedName("javax.servlet", "FilterChain") + } +} + +/** Holds if `m` is a request handler method (for example `doGet` or `doPost`). */ +predicate isDoFilterMethod(Method m) { + m.getDeclaringType() instanceof FilterClass and + m.getNumberOfParameters() = 3 and + m.getParameter(0).getType() instanceof ServletRequest and + m.getParameter(1).getType() instanceof ServletResponse and + m.getParameter(2).getType() instanceof FilterChain +} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected index 019af8f5c055..7e3069cf1d93 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected @@ -1,60 +1,60 @@ edges -| JsonpInjection.java:28:32:28:68 | getParameter(...) : String | JsonpInjection.java:33:16:33:24 | resultStr | -| JsonpInjection.java:32:21:32:54 | ... + ... : String | JsonpInjection.java:33:16:33:24 | resultStr | -| JsonpInjection.java:40:32:40:68 | getParameter(...) : String | JsonpInjection.java:44:16:44:24 | resultStr | -| JsonpInjection.java:42:21:42:80 | ... + ... : String | JsonpInjection.java:44:16:44:24 | resultStr | -| JsonpInjection.java:51:32:51:68 | getParameter(...) : String | JsonpInjection.java:54:16:54:24 | resultStr | -| JsonpInjection.java:53:21:53:55 | ... + ... : String | JsonpInjection.java:54:16:54:24 | resultStr | -| JsonpInjection.java:61:32:61:68 | getParameter(...) : String | JsonpInjection.java:64:16:64:24 | resultStr | -| JsonpInjection.java:63:21:63:54 | ... + ... : String | JsonpInjection.java:64:16:64:24 | resultStr | -| JsonpInjection.java:72:32:72:68 | getParameter(...) : String | JsonpInjection.java:80:20:80:28 | resultStr | +| JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | JsonpInjection.java:34:16:34:24 | resultStr | +| JsonpInjection.java:33:21:33:54 | ... + ... : String | JsonpInjection.java:34:16:34:24 | resultStr | +| JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | JsonpInjection.java:45:16:45:24 | resultStr | +| JsonpInjection.java:43:21:43:80 | ... + ... : String | JsonpInjection.java:45:16:45:24 | resultStr | +| JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | JsonpInjection.java:55:16:55:24 | resultStr | +| JsonpInjection.java:54:21:54:55 | ... + ... : String | JsonpInjection.java:55:16:55:24 | resultStr | +| JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | JsonpInjection.java:65:16:65:24 | resultStr | +| JsonpInjection.java:64:21:64:54 | ... + ... : String | JsonpInjection.java:65:16:65:24 | resultStr | +| JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | JsonpInjection.java:80:20:80:28 | resultStr | | JsonpInjection.java:79:21:79:54 | ... + ... : String | JsonpInjection.java:80:20:80:28 | resultStr | -| JsonpInjection.java:88:32:88:68 | getParameter(...) : String | JsonpInjection.java:95:20:95:28 | resultStr | -| JsonpInjection.java:94:21:94:54 | ... + ... : String | JsonpInjection.java:95:20:95:28 | resultStr | -| JsonpInjection.java:102:32:102:68 | getParameter(...) : String | JsonpInjection.java:113:16:113:24 | resultStr | -| JsonpInjection.java:128:25:128:59 | ... + ... : String | JsonpInjection.java:129:20:129:28 | resultStr | -| JsonpInjection.java:147:25:147:59 | ... + ... : String | JsonpInjection.java:148:20:148:28 | resultStr | +| JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | JsonpInjection.java:94:20:94:28 | resultStr | +| JsonpInjection.java:93:21:93:54 | ... + ... : String | JsonpInjection.java:94:20:94:28 | resultStr | +| JsonpInjection.java:101:32:101:38 | request : HttpServletRequest | JsonpInjection.java:112:16:112:24 | resultStr | +| JsonpInjection.java:127:25:127:59 | ... + ... : String | JsonpInjection.java:128:20:128:28 | resultStr | +| JsonpInjection.java:148:25:148:59 | ... + ... : String | JsonpInjection.java:149:20:149:28 | resultStr | nodes -| JsonpInjection.java:28:32:28:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:32:21:32:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:33:16:33:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:33:16:33:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:40:32:40:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:42:21:42:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:44:16:44:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:44:16:44:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:51:32:51:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:53:21:53:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:54:16:54:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:54:16:54:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:61:32:61:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:63:21:63:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:64:16:64:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:64:16:64:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:72:32:72:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:33:21:33:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:34:16:34:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:34:16:34:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:43:21:43:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:45:16:45:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:45:16:45:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:54:21:54:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:55:16:55:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:55:16:55:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:64:21:64:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:65:16:65:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:65:16:65:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | | JsonpInjection.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | | JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:88:32:88:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:94:21:94:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:95:20:95:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:95:20:95:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:102:32:102:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjection.java:113:16:113:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:128:25:128:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:129:20:129:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:147:25:147:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:148:20:148:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:101:32:101:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | +| JsonpInjection.java:112:16:112:24 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:127:25:127:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:128:20:128:28 | resultStr | semmle.label | resultStr | +| JsonpInjection.java:148:25:148:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjection.java:149:20:149:28 | resultStr | semmle.label | resultStr | #select -| JsonpInjection.java:33:16:33:24 | resultStr | JsonpInjection.java:28:32:28:68 | getParameter(...) : String | JsonpInjection.java:33:16:33:24 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:28:32:28:68 | getParameter(...) | this user input | -| JsonpInjection.java:44:16:44:24 | resultStr | JsonpInjection.java:40:32:40:68 | getParameter(...) : String | JsonpInjection.java:44:16:44:24 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:40:32:40:68 | getParameter(...) | this user input | -| JsonpInjection.java:54:16:54:24 | resultStr | JsonpInjection.java:51:32:51:68 | getParameter(...) : String | JsonpInjection.java:54:16:54:24 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:51:32:51:68 | getParameter(...) | this user input | -| JsonpInjection.java:64:16:64:24 | resultStr | JsonpInjection.java:61:32:61:68 | getParameter(...) : String | JsonpInjection.java:64:16:64:24 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:61:32:61:68 | getParameter(...) | this user input | -| JsonpInjection.java:80:20:80:28 | resultStr | JsonpInjection.java:72:32:72:68 | getParameter(...) : String | JsonpInjection.java:80:20:80:28 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:72:32:72:68 | getParameter(...) | this user input | -| JsonpInjection.java:95:20:95:28 | resultStr | JsonpInjection.java:88:32:88:68 | getParameter(...) : String | JsonpInjection.java:95:20:95:28 | resultStr | Json Hijacking query -might include code from $@. | JsonpInjection.java:88:32:88:68 | getParameter(...) | this user input | \ No newline at end of file +| JsonpInjection.java:34:16:34:24 | resultStr | JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | JsonpInjection.java:34:16:34:24 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:29:32:29:38 | request | this user input | +| JsonpInjection.java:45:16:45:24 | resultStr | JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | JsonpInjection.java:45:16:45:24 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:41:32:41:38 | request | this user input | +| JsonpInjection.java:55:16:55:24 | resultStr | JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | JsonpInjection.java:55:16:55:24 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:52:32:52:38 | request | this user input | +| JsonpInjection.java:65:16:65:24 | resultStr | JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | JsonpInjection.java:65:16:65:24 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:62:32:62:38 | request | this user input | +| JsonpInjection.java:80:20:80:28 | resultStr | JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | JsonpInjection.java:80:20:80:28 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:72:32:72:38 | request | this user input | +| JsonpInjection.java:94:20:94:28 | resultStr | JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | JsonpInjection.java:94:20:94:28 | +resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:87:32:87:38 | request | this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java index df3aa2c02fe9..9f079513a8b9 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java @@ -8,11 +8,12 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class JsonpInjection { - private static HashMap hashMap = new HashMap(); static { @@ -21,7 +22,7 @@ public class JsonpInjection { } - @GetMapping(value = "jsonp1") + @GetMapping(value = "jsonp1", produces="text/javascript") @ResponseBody public String bad1(HttpServletRequest request) { String resultStr = null; @@ -68,7 +69,6 @@ public String bad4(HttpServletRequest request) { @ResponseBody public void bad5(HttpServletRequest request, HttpServletResponse response) throws Exception { - response.setContentType("application/json"); String jsonpCallback = request.getParameter("jsonpCallback"); PrintWriter pw = null; Gson gson = new Gson(); @@ -84,7 +84,6 @@ public void bad5(HttpServletRequest request, @ResponseBody public void bad6(HttpServletRequest request, HttpServletResponse response) throws Exception { - response.setContentType("application/json"); String jsonpCallback = request.getParameter("jsonpCallback"); PrintWriter pw = null; ObjectMapper mapper = new ObjectMapper(); @@ -141,8 +140,10 @@ public String good2(HttpServletRequest request) { String referer = request.getHeader("Referer"); boolean result = verifReferer(referer); + + boolean test = result; // good - if (result){ + if (test){ String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; return resultStr; @@ -168,4 +169,4 @@ public static boolean verifReferer(String referer){ } return true; } -} +} \ No newline at end of file diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.class deleted file mode 100644 index 438065489278b92503abc2ad8d75716c5e56ac08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 385 zcmb7=!Ab)$5QhJ0x31kDdrH&Kx0=)qG#3PM4!PcXZrOKO@(l3m};gAd?CiL-}x zJqaEL=Fj~6^G&|KKRyB6W0qr@<21(^Vbrp1G~wdrcD3b}m1S3}bqdDS4}|lDb3So0 z-aYCKH#QMKxO{0`GCTd`S`$rab#IG=`O1e{#kVeF6L_cJeRx%s4_fgdPA#nAxb#7` zj5*1|vPl9`tbG$Iy);(DbZ?q>Y=pc21QTZcMbG6{R|0?4KmBGoU|o}(H;@|2R}C^k ghLPwaQNxHF$I?t>JeJBL3UL&FIx;a%x-6Xh0OC_*bpQYW diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.class deleted file mode 100644 index 5392ca0ebc1593d6bfa2f7d765ee4ca169fb260f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 504 zcma)&y-ve06orr5G%4k$Ewlp@8)_FUu~3N#3Bgi?)JiO!oYW02i5(KVeK!UkfQLfd z3?&dTFj%_xlg>TI=i~G39l#Za0geNl1Q;-QTBMR;Fd9$SVk3AWbj;^AS316C=-+5< ztgy=HTe%W0u?%2nZA9WoH5`o>f62T|*k=Ym6S+tWhIV9h;Zj+SS#FjtD#y;;xIB_~ zDxp)|dubm;mXYs88HC|<=CoC*d{Tu96Imr8>11m1m={?Yb44Ckk!ycGS!yuAF9#FEVXJbh%nj0^%G u-TFC+dFlH8Nm;4MC5#O62q7eGj&Kvy7#SEDn1GlW=t>44%>pEu7+3+XjWw+R From 86dde6eab16f9f28cc6bb68c8b2ed7fa8c40e3bd Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 17 Feb 2021 11:34:05 +0100 Subject: [PATCH 0005/1662] Python: start of port --- .../src/Security/CWE-327/InsecureProtocol.ql | 299 +++++++++++++++++- .../examples/secure_default_protocol.py | 13 + .../CWE-327/examples/secure_protocol.py | 11 + 3 files changed, 307 insertions(+), 16 deletions(-) create mode 100644 python/ql/src/Security/CWE-327/examples/secure_default_protocol.py create mode 100644 python/ql/src/Security/CWE-327/examples/secure_protocol.py diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index d1ae714b6be6..6f2feedce22f 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -10,7 +10,270 @@ */ import python +import semmle.python.ApiGraphs +// The idea is to track flow from the creation of an insecure context to a use +// such as `wrap_socket`. There should be a data-flow path for each insecure version +// and each path should have a version specific sanitizer. This will allow fluent api +// style code to block the paths one by one. +// +// class InsecureContextCreation extends DataFlow::CfgNode { +// override CallNode node; +// InsecureContextCreation() { +// this = API::moduleImport("ssl").getMember("SSLContext").getACall() and +// insecure_version().asCfgNode() in [node.getArg(0), node.getArgByName("protocol")] +// } +// } +// class InsecureSSLContextCreation extends DataFlow::CfgNode { +// override CallNode node; +// InsecureSSLContextCreation() { +// this = API::moduleImport("ssl").getMember("create_default_context").getACall() +// or +// this = API::moduleImport("ssl").getMember("SSLContext").getACall() and +// API::moduleImport("ssl").getMember("PROTOCOL_TLS").getAUse().asCfgNode() in [ +// node.getArg(0), node.getArgByName("protocol") +// ] +// } +// } +abstract class ContextCreation extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getProtocol(); +} + +class SSLContextCreation extends ContextCreation { + override CallNode node; + + SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } + + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("protocol")] + } +} + +class PyOpenSSLContextCreation extends ContextCreation { + override CallNode node; + + PyOpenSSLContextCreation() { + this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Context").getACall() + } + + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("method")] + } +} + +abstract class ConnectionCreation extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getContext(); +} + +class WrapSocketCall extends ConnectionCreation { + override CallNode node; + + WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } + + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } +} + +class ConnectionCall extends ConnectionCreation { + override CallNode node; + + ConnectionCall() { + this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Connection").getACall() + } + + override DataFlow::CfgNode getContext() { + result.getNode() in [node.getArg(0), node.getArgByName("context")] + } +} + +abstract class TlsLibrary extends string { + TlsLibrary() { this in ["ssl"] } + + abstract string specific_insecure_version_name(); + + abstract string unspecific_version_name(); + + abstract API::Node version_constants(); + + DataFlow::Node insecure_version() { + result = version_constants().getMember(specific_insecure_version_name()).getAUse() + } + + DataFlow::Node unspecific_version() { + result = version_constants().getMember(unspecific_version_name()).getAUse() + } + + abstract DataFlow::CfgNode default_context_creation(); + + abstract ContextCreation specific_context_creation(); + + ContextCreation insecure_context_creation() { + result = specific_context_creation() and + result.getProtocol() = insecure_version() + } + + DataFlow::CfgNode unspecific_context_creation() { + result = default_context_creation() + or + result = specific_context_creation() and + result.(ContextCreation).getProtocol() = unspecific_version() + } + + abstract ConnectionCreation connection_creation(); +} + +class Ssl extends TlsLibrary { + Ssl() { this = "ssl" } + + override string specific_insecure_version_name() { + result in [ + "PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_SSLv23", "PROTOCOL_TLSv1", "PROTOCOL_TLSv1_1" + ] + } + + override string unspecific_version_name() { result = "PROTOCOL_TLS" } + + override API::Node version_constants() { result = API::moduleImport("ssl") } + + override DataFlow::CfgNode default_context_creation() { + result = API::moduleImport("ssl").getMember("create_default_context").getACall() + } + + override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } + + override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } +} + +class PyOpenSSL extends TlsLibrary { + PyOpenSSL() { this = "pyOpenSSL" } + + override string specific_insecure_version_name() { + result in ["SSLv2_METHOD", "SSLv23_METHOD", "SSLv3_METHOD", "TLSv1_METHOD", "TLSv1_1_METHOD"] + } + + override string unspecific_version_name() { result = "TLS_METHOD" } + + override API::Node version_constants() { + result = API::moduleImport("pyOpenSSL").getMember("SSL") + } + + override DataFlow::CfgNode default_context_creation() { none() } + + override ContextCreation specific_context_creation() { + result instanceof PyOpenSSLContextCreation + } + + override ConnectionCreation connection_creation() { result instanceof ConnectionCall } +} + +module ssl { + string insecure_version_name() { + result = "PROTOCOL_SSLv2" or + result = "PROTOCOL_SSLv3" or + result = "PROTOCOL_SSLv23" or + result = "PROTOCOL_TLSv1" or + result = "PROTOCOL_TLSv1_1" + } + + DataFlow::Node insecure_version() { + result = API::moduleImport("ssl").getMember(insecure_version_name()).getAUse() + } +} + +module pyOpenSSL { + string insecure_version_name() { + result = "SSLv2_METHOD" or + result = "SSLv23_METHOD" or + result = "SSLv3_METHOD" or + result = "TLSv1_METHOD" or + result = "TLSv1_1_METHOD" + } + + DataFlow::Node insecure_version() { + result = + API::moduleImport("pyOpenSSL").getMember("SSL").getMember(insecure_version_name()).getAUse() + } +} + +class InsecureContextConfiguration extends DataFlow::Configuration { + TlsLibrary library; + + InsecureContextConfiguration() { this = library + ["AllowsTLSv1", "AllowsTLSv1_1"] } + + override predicate isSource(DataFlow::Node source) { + source = library.unspecific_context_creation() + } + + override predicate isSink(DataFlow::Node sink) { + sink = library.connection_creation().getContext() + } + + abstract string flag(); + + override predicate isBarrierOut(DataFlow::Node node) { + exists(AugAssign aa, AttrNode attr | + aa.getOperation().getOp() instanceof BitOr and + aa.getTarget() = attr.getNode() and + attr.getName() = "options" and + attr.getObject() = node.asCfgNode() and + aa.getValue() = API::moduleImport("ssl").getMember(flag()).getAUse().asExpr() + ) + } +} + +class AllowsTLSv1 extends InsecureContextConfiguration { + AllowsTLSv1() { this = library + "AllowsTLSv1" } + + override string flag() { result = "OP_NO_TLSv1" } +} + +class AllowsTLSv1_1 extends InsecureContextConfiguration { + AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } + + override string flag() { result = "OP_NO_TLSv1_2" } +} + +predicate unsafe_connection_creation(DataFlow::Node node) { + exists(AllowsTLSv1 c | c.hasFlowTo(node)) or + exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) //or + // node = API::moduleImport("ssl").getMember("wrap_socket").getACall() +} + +predicate unsafe_context_creation(DataFlow::Node node) { + exists(TlsLibrary l | l.insecure_context_creation() = node) +} + +// class InsecureTLSContextConfiguration extends DataFlow::Configuration { +// InsecureTLSContextConfiguration() { this in ["AllowsTLSv1", "AllowsTLSv1_1"] } +// override predicate isSource(DataFlow::Node source) { +// source instanceof InsecureSSLContextCreation +// } +// override predicate isSink(DataFlow::Node sink) { sink = any(WrapSocketCall c).getContext() } +// abstract string flag(); +// override predicate isBarrierOut(DataFlow::Node node) { +// exists(AugAssign aa, AttrNode attr | +// aa.getOperation().getOp() instanceof BitOr and +// aa.getTarget() = attr.getNode() and +// attr.getName() = "options" and +// attr.getObject() = node.asCfgNode() and +// aa.getValue() = API::moduleImport("ssl").getMember(flag()).getAUse().asExpr() +// ) +// } +// } +// class AllowsTLSv1 extends InsecureTLSContextConfiguration { +// AllowsTLSv1() { this = "AllowsTLSv1" } +// override string flag() { result = "OP_NO_TLSv1" } +// } +// class AllowsTLSv1_1 extends InsecureTLSContextConfiguration { +// AllowsTLSv1_1() { this = "AllowsTLSv1_1" } +// override string flag() { result = "OP_NO_TLSv1_1" } +// } +// predicate unsafe_wrap_socket_call(DataFlow::Node node) { +// exists(AllowsTLSv1 c | c.hasFlowTo(node)) or +// exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) or +// node = API::moduleImport("ssl").getMember("wrap_socket").getACall() +// } private ModuleValue the_ssl_module() { result = Module::named("ssl") } FunctionValue ssl_wrap_socket() { result = the_ssl_module().attr("wrap_socket") } @@ -21,20 +284,24 @@ private ModuleValue the_pyOpenSSL_module() { result = Value::named("pyOpenSSL.SS ClassValue the_pyOpenSSL_Context_class() { result = Value::named("pyOpenSSL.SSL.Context") } -string insecure_version_name() { - // For `pyOpenSSL.SSL` - result = "SSLv2_METHOD" or - result = "SSLv23_METHOD" or - result = "SSLv3_METHOD" or - result = "TLSv1_METHOD" or - // For the `ssl` module - result = "PROTOCOL_SSLv2" or - result = "PROTOCOL_SSLv3" or - result = "PROTOCOL_SSLv23" or - result = "PROTOCOL_TLS" or - result = "PROTOCOL_TLSv1" -} - +// Since version 3.6, it is fine to call `ssl.SSLContext(protocol=PROTOCOL_TLS)` +// if one also specifies either OP_NO_TLSv1 (introduced in 3.2) +// or SSLContext.minimum_version other than TLSVersion.TLSv1 (introduced in 3.7) +// See https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl.SSLContext +// and https://docs.python.org/3/library/ssl.html?highlight=ssl#protocol-versions +// FP reported here: https://github.com/github/codeql/issues/2554 +// string insecure_version_name() { +// // For `pyOpenSSL.SSL` +// result = "SSLv2_METHOD" or +// result = "SSLv23_METHOD" or +// result = "SSLv3_METHOD" or +// result = "TLSv1_METHOD" or +// // For the `ssl` module +// result = "PROTOCOL_SSLv2" or +// result = "PROTOCOL_SSLv3" or +// result = "PROTOCOL_SSLv23" or +// result = "PROTOCOL_TLSv1" +// } /* * A syntactic check for cases where points-to analysis cannot infer the presence of * a protocol constant, e.g. if it has been removed in later versions of the `ssl` @@ -71,7 +338,7 @@ predicate unsafe_ssl_wrap_socket_call( named_argument = "protocol" and method_name = "ssl.SSLContext" ) and - insecure_version = insecure_version_name() and + insecure_version = ssl::insecure_version_name() and ( call.getArgByName(named_argument).pointsTo(the_ssl_module().attr(insecure_version)) or @@ -81,7 +348,7 @@ predicate unsafe_ssl_wrap_socket_call( predicate unsafe_pyOpenSSL_Context_call(CallNode call, string insecure_version) { call = the_pyOpenSSL_Context_class().getACall() and - insecure_version = insecure_version_name() and + insecure_version = pyOpenSSL::insecure_version_name() and call.getArg(0).pointsTo(the_pyOpenSSL_module().attr(insecure_version)) } diff --git a/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py b/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py new file mode 100644 index 000000000000..83c6dbbba0e0 --- /dev/null +++ b/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py @@ -0,0 +1,13 @@ +# taken from https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl.SSLContext + +import socket +import ssl + +hostname = 'www.python.org' +context = ssl.create_default_context() +context.options |= ssl.OP_NO_TLSv1 # This added by me +context.options |= ssl.OP_NO_TLSv1_1 # This added by me + +with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) diff --git a/python/ql/src/Security/CWE-327/examples/secure_protocol.py b/python/ql/src/Security/CWE-327/examples/secure_protocol.py new file mode 100644 index 000000000000..94b3557d0172 --- /dev/null +++ b/python/ql/src/Security/CWE-327/examples/secure_protocol.py @@ -0,0 +1,11 @@ +import socket +import ssl + +hostname = 'www.python.org' +context = ssl.SSLContext(ssl.PROTOCOL_TLS) +context.options |= ssl.OP_NO_TLSv1 +context.options |= ssl.OP_NO_TLSv1_1 # This added by me + +with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) From 72b37a5b1bb344dcdd9b4e2d1172c540df678408 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 17 Feb 2021 13:21:33 +0100 Subject: [PATCH 0006/1662] Python: factor out barrier --- .../src/Security/CWE-327/InsecureProtocol.ql | 58 ++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 6f2feedce22f..6b5b2e75d22a 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -87,6 +87,46 @@ class ConnectionCall extends ConnectionCreation { } } +class ProtocolRestriction extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getContext(); + + abstract string getRestriction(); +} + +class OptionsAugOr extends ProtocolRestriction { + string restriction; + + OptionsAugOr() { + exists(AugAssign aa, AttrNode attr | + aa.getOperation().getOp() instanceof BitOr and + aa.getTarget() = attr.getNode() and + attr.getName() = "options" and + attr.getObject() = node and + aa.getValue() = API::moduleImport("ssl").getMember(restriction).getAUse().asExpr() + ) + } + + override DataFlow::CfgNode getContext() { result = this } + + override string getRestriction() { result = restriction } +} + +class SetOptionsCall extends ProtocolRestriction { + override CallNode node; + + SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } + + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } + + override string getRestriction() { + API::moduleImport("PyOpenSSL").getMember("SSL").getMember(result).getAUse().asCfgNode() in [ + node.getArg(0), node.getArgByName("options") + ] + } +} + abstract class TlsLibrary extends string { TlsLibrary() { this in ["ssl"] } @@ -121,6 +161,8 @@ abstract class TlsLibrary extends string { } abstract ConnectionCreation connection_creation(); + + abstract ProtocolRestriction protocol_restriction(); } class Ssl extends TlsLibrary { @@ -143,6 +185,8 @@ class Ssl extends TlsLibrary { override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } + + override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } } class PyOpenSSL extends TlsLibrary { @@ -165,6 +209,8 @@ class PyOpenSSL extends TlsLibrary { } override ConnectionCreation connection_creation() { result instanceof ConnectionCall } + + override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } } module ssl { @@ -212,12 +258,10 @@ class InsecureContextConfiguration extends DataFlow::Configuration { abstract string flag(); override predicate isBarrierOut(DataFlow::Node node) { - exists(AugAssign aa, AttrNode attr | - aa.getOperation().getOp() instanceof BitOr and - aa.getTarget() = attr.getNode() and - attr.getName() = "options" and - attr.getObject() = node.asCfgNode() and - aa.getValue() = API::moduleImport("ssl").getMember(flag()).getAUse().asExpr() + exists(ProtocolRestriction r | + r = library.protocol_restriction() and + node = r.getContext() and + r.getRestriction() = flag() ) } } @@ -231,7 +275,7 @@ class AllowsTLSv1 extends InsecureContextConfiguration { class AllowsTLSv1_1 extends InsecureContextConfiguration { AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } - override string flag() { result = "OP_NO_TLSv1_2" } + override string flag() { result = "OP_NO_TLSv1_1" } } predicate unsafe_connection_creation(DataFlow::Node node) { From 7ed018aff6c9f79a3ea60ef8ae4d2f2067b81442 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 17 Feb 2021 14:30:28 +0100 Subject: [PATCH 0007/1662] Python: refactor into modules and turn on the pyOpenSSL module --- .../src/Security/CWE-327/InsecureProtocol.ql | 385 +++++++----------- 1 file changed, 138 insertions(+), 247 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 6b5b2e75d22a..81b3558907e3 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -39,96 +39,18 @@ abstract class ContextCreation extends DataFlow::CfgNode { abstract DataFlow::CfgNode getProtocol(); } -class SSLContextCreation extends ContextCreation { - override CallNode node; - - SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } - - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("protocol")] - } -} - -class PyOpenSSLContextCreation extends ContextCreation { - override CallNode node; - - PyOpenSSLContextCreation() { - this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Context").getACall() - } - - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("method")] - } -} - abstract class ConnectionCreation extends DataFlow::CfgNode { abstract DataFlow::CfgNode getContext(); } -class WrapSocketCall extends ConnectionCreation { - override CallNode node; - - WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } - - override DataFlow::CfgNode getContext() { - result.getNode() = node.getFunction().(AttrNode).getObject() - } -} - -class ConnectionCall extends ConnectionCreation { - override CallNode node; - - ConnectionCall() { - this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Connection").getACall() - } - - override DataFlow::CfgNode getContext() { - result.getNode() in [node.getArg(0), node.getArgByName("context")] - } -} - class ProtocolRestriction extends DataFlow::CfgNode { abstract DataFlow::CfgNode getContext(); abstract string getRestriction(); } -class OptionsAugOr extends ProtocolRestriction { - string restriction; - - OptionsAugOr() { - exists(AugAssign aa, AttrNode attr | - aa.getOperation().getOp() instanceof BitOr and - aa.getTarget() = attr.getNode() and - attr.getName() = "options" and - attr.getObject() = node and - aa.getValue() = API::moduleImport("ssl").getMember(restriction).getAUse().asExpr() - ) - } - - override DataFlow::CfgNode getContext() { result = this } - - override string getRestriction() { result = restriction } -} - -class SetOptionsCall extends ProtocolRestriction { - override CallNode node; - - SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } - - override DataFlow::CfgNode getContext() { - result.getNode() = node.getFunction().(AttrNode).getObject() - } - - override string getRestriction() { - API::moduleImport("PyOpenSSL").getMember("SSL").getMember(result).getAUse().asCfgNode() in [ - node.getArg(0), node.getArgByName("options") - ] - } -} - abstract class TlsLibrary extends string { - TlsLibrary() { this in ["ssl"] } + TlsLibrary() { this in ["ssl", "pyOpenSSL"] } abstract string specific_insecure_version_name(); @@ -160,85 +82,149 @@ abstract class TlsLibrary extends string { result.(ContextCreation).getProtocol() = unspecific_version() } + /** A connection is created in an outright insecure manner. */ + abstract DataFlow::CfgNode insecure_connection_creation(); + + /** A connection is created from a context. */ abstract ConnectionCreation connection_creation(); abstract ProtocolRestriction protocol_restriction(); } -class Ssl extends TlsLibrary { - Ssl() { this = "ssl" } +module ssl { + class SSLContextCreation extends ContextCreation { + override CallNode node; + + SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } - override string specific_insecure_version_name() { - result in [ - "PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_SSLv23", "PROTOCOL_TLSv1", "PROTOCOL_TLSv1_1" - ] + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("protocol")] + } } - override string unspecific_version_name() { result = "PROTOCOL_TLS" } + class WrapSocketCall extends ConnectionCreation { + override CallNode node; - override API::Node version_constants() { result = API::moduleImport("ssl") } + WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } - override DataFlow::CfgNode default_context_creation() { - result = API::moduleImport("ssl").getMember("create_default_context").getACall() + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } } - override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } + class OptionsAugOr extends ProtocolRestriction { + string restriction; - override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } + OptionsAugOr() { + exists(AugAssign aa, AttrNode attr | + aa.getOperation().getOp() instanceof BitOr and + aa.getTarget() = attr.getNode() and + attr.getName() = "options" and + attr.getObject() = node and + aa.getValue() = API::moduleImport("ssl").getMember(restriction).getAUse().asExpr() + ) + } - override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } -} + override DataFlow::CfgNode getContext() { result = this } -class PyOpenSSL extends TlsLibrary { - PyOpenSSL() { this = "pyOpenSSL" } - - override string specific_insecure_version_name() { - result in ["SSLv2_METHOD", "SSLv23_METHOD", "SSLv3_METHOD", "TLSv1_METHOD", "TLSv1_1_METHOD"] + override string getRestriction() { result = restriction } } - override string unspecific_version_name() { result = "TLS_METHOD" } + class Ssl extends TlsLibrary { + Ssl() { this = "ssl" } - override API::Node version_constants() { - result = API::moduleImport("pyOpenSSL").getMember("SSL") - } + override string specific_insecure_version_name() { + result in [ + "PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_SSLv23", "PROTOCOL_TLSv1", + "PROTOCOL_TLSv1_1" + ] + } - override DataFlow::CfgNode default_context_creation() { none() } + override string unspecific_version_name() { result = "PROTOCOL_TLS" } - override ContextCreation specific_context_creation() { - result instanceof PyOpenSSLContextCreation - } + override API::Node version_constants() { result = API::moduleImport("ssl") } - override ConnectionCreation connection_creation() { result instanceof ConnectionCall } + override DataFlow::CfgNode default_context_creation() { + result = API::moduleImport("ssl").getMember("create_default_context").getACall() + } - override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } -} + override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } -module ssl { - string insecure_version_name() { - result = "PROTOCOL_SSLv2" or - result = "PROTOCOL_SSLv3" or - result = "PROTOCOL_SSLv23" or - result = "PROTOCOL_TLSv1" or - result = "PROTOCOL_TLSv1_1" - } + override DataFlow::CfgNode insecure_connection_creation() { + result = API::moduleImport("ssl").getMember("wrap_socket").getACall() + } - DataFlow::Node insecure_version() { - result = API::moduleImport("ssl").getMember(insecure_version_name()).getAUse() + override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } + + override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } } } module pyOpenSSL { - string insecure_version_name() { - result = "SSLv2_METHOD" or - result = "SSLv23_METHOD" or - result = "SSLv3_METHOD" or - result = "TLSv1_METHOD" or - result = "TLSv1_1_METHOD" + class PyOpenSSLContextCreation extends ContextCreation { + override CallNode node; + + PyOpenSSLContextCreation() { + this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Context").getACall() + } + + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("method")] + } } - DataFlow::Node insecure_version() { - result = - API::moduleImport("pyOpenSSL").getMember("SSL").getMember(insecure_version_name()).getAUse() + class ConnectionCall extends ConnectionCreation { + override CallNode node; + + ConnectionCall() { + this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Connection").getACall() + } + + override DataFlow::CfgNode getContext() { + result.getNode() in [node.getArg(0), node.getArgByName("context")] + } + } + + class SetOptionsCall extends ProtocolRestriction { + override CallNode node; + + SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } + + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } + + override string getRestriction() { + API::moduleImport("PyOpenSSL").getMember("SSL").getMember(result).getAUse().asCfgNode() in [ + node.getArg(0), node.getArgByName("options") + ] + } + } + + class PyOpenSSL extends TlsLibrary { + PyOpenSSL() { this = "pyOpenSSL" } + + override string specific_insecure_version_name() { + result in ["SSLv2_METHOD", "SSLv23_METHOD", "SSLv3_METHOD", "TLSv1_METHOD", "TLSv1_1_METHOD"] + } + + override string unspecific_version_name() { result = "TLS_METHOD" } + + override API::Node version_constants() { + result = API::moduleImport("pyOpenSSL").getMember("SSL") + } + + override DataFlow::CfgNode default_context_creation() { none() } + + override ContextCreation specific_context_creation() { + result instanceof PyOpenSSLContextCreation + } + + override DataFlow::CfgNode insecure_connection_creation() { none() } + + override ConnectionCreation connection_creation() { result instanceof ConnectionCall } + + override ProtocolRestriction protocol_restriction() { result instanceof SetOptionsCall } } } @@ -278,129 +264,34 @@ class AllowsTLSv1_1 extends InsecureContextConfiguration { override string flag() { result = "OP_NO_TLSv1_1" } } -predicate unsafe_connection_creation(DataFlow::Node node) { - exists(AllowsTLSv1 c | c.hasFlowTo(node)) or - exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) //or - // node = API::moduleImport("ssl").getMember("wrap_socket").getACall() -} - -predicate unsafe_context_creation(DataFlow::Node node) { - exists(TlsLibrary l | l.insecure_context_creation() = node) -} - -// class InsecureTLSContextConfiguration extends DataFlow::Configuration { -// InsecureTLSContextConfiguration() { this in ["AllowsTLSv1", "AllowsTLSv1_1"] } -// override predicate isSource(DataFlow::Node source) { -// source instanceof InsecureSSLContextCreation -// } -// override predicate isSink(DataFlow::Node sink) { sink = any(WrapSocketCall c).getContext() } -// abstract string flag(); -// override predicate isBarrierOut(DataFlow::Node node) { -// exists(AugAssign aa, AttrNode attr | -// aa.getOperation().getOp() instanceof BitOr and -// aa.getTarget() = attr.getNode() and -// attr.getName() = "options" and -// attr.getObject() = node.asCfgNode() and -// aa.getValue() = API::moduleImport("ssl").getMember(flag()).getAUse().asExpr() -// ) -// } -// } -// class AllowsTLSv1 extends InsecureTLSContextConfiguration { -// AllowsTLSv1() { this = "AllowsTLSv1" } -// override string flag() { result = "OP_NO_TLSv1" } -// } -// class AllowsTLSv1_1 extends InsecureTLSContextConfiguration { -// AllowsTLSv1_1() { this = "AllowsTLSv1_1" } -// override string flag() { result = "OP_NO_TLSv1_1" } -// } -// predicate unsafe_wrap_socket_call(DataFlow::Node node) { -// exists(AllowsTLSv1 c | c.hasFlowTo(node)) or -// exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) or -// node = API::moduleImport("ssl").getMember("wrap_socket").getACall() -// } -private ModuleValue the_ssl_module() { result = Module::named("ssl") } - -FunctionValue ssl_wrap_socket() { result = the_ssl_module().attr("wrap_socket") } - -ClassValue ssl_Context_class() { result = the_ssl_module().attr("SSLContext") } - -private ModuleValue the_pyOpenSSL_module() { result = Value::named("pyOpenSSL.SSL") } - -ClassValue the_pyOpenSSL_Context_class() { result = Value::named("pyOpenSSL.SSL.Context") } - -// Since version 3.6, it is fine to call `ssl.SSLContext(protocol=PROTOCOL_TLS)` -// if one also specifies either OP_NO_TLSv1 (introduced in 3.2) -// or SSLContext.minimum_version other than TLSVersion.TLSv1 (introduced in 3.7) -// See https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl.SSLContext -// and https://docs.python.org/3/library/ssl.html?highlight=ssl#protocol-versions -// FP reported here: https://github.com/github/codeql/issues/2554 -// string insecure_version_name() { -// // For `pyOpenSSL.SSL` -// result = "SSLv2_METHOD" or -// result = "SSLv23_METHOD" or -// result = "SSLv3_METHOD" or -// result = "TLSv1_METHOD" or -// // For the `ssl` module -// result = "PROTOCOL_SSLv2" or -// result = "PROTOCOL_SSLv3" or -// result = "PROTOCOL_SSLv23" or -// result = "PROTOCOL_TLSv1" -// } -/* - * A syntactic check for cases where points-to analysis cannot infer the presence of - * a protocol constant, e.g. if it has been removed in later versions of the `ssl` - * library. - */ - -bindingset[named_argument] -predicate probable_insecure_ssl_constant( - CallNode call, string insecure_version, string named_argument -) { - exists(ControlFlowNode arg | - arg = call.getArgByName(named_argument) or - arg = call.getArg(0) - | - arg.(AttrNode).getObject(insecure_version).pointsTo(the_ssl_module()) - or - arg.(NameNode).getId() = insecure_version and - exists(Import imp | - imp.getAnImportedModuleName() = "ssl" and - imp.getAName().getAsname().(Name).getId() = insecure_version - ) - ) +predicate unsafe_connection_creation(DataFlow::Node node, string insecure_version) { + exists(AllowsTLSv1 c | c.hasFlowTo(node)) and + insecure_version = "TLSv1" + or + exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) and + insecure_version = "TLSv1" + or + exists(TlsLibrary l | l.insecure_connection_creation() = node) and + insecure_version = "[multiple]" } -predicate unsafe_ssl_wrap_socket_call( - CallNode call, string method_name, string insecure_version, string named_argument -) { - ( - call = ssl_wrap_socket().getACall() and - method_name = "deprecated method ssl.wrap_socket" and - named_argument = "ssl_version" - or - call = ssl_Context_class().getACall() and - named_argument = "protocol" and - method_name = "ssl.SSLContext" - ) and - insecure_version = ssl::insecure_version_name() and - ( - call.getArgByName(named_argument).pointsTo(the_ssl_module().attr(insecure_version)) - or - probable_insecure_ssl_constant(call, insecure_version, named_argument) +predicate unsafe_context_creation(DataFlow::Node node, string insecure_version) { + exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation() | + cc = node and insecure_version = cc.getProtocol().toString() ) } -predicate unsafe_pyOpenSSL_Context_call(CallNode call, string insecure_version) { - call = the_pyOpenSSL_Context_class().getACall() and - insecure_version = pyOpenSSL::insecure_version_name() and - call.getArg(0).pointsTo(the_pyOpenSSL_module().attr(insecure_version)) -} - -from CallNode call, string method_name, string insecure_version +from DataFlow::Node node, string insecure_version where - unsafe_ssl_wrap_socket_call(call, method_name, insecure_version, _) + unsafe_connection_creation(node, insecure_version) or - unsafe_pyOpenSSL_Context_call(call, insecure_version) and method_name = "pyOpenSSL.SSL.Context" -select call, - "Insecure SSL/TLS protocol version " + insecure_version + " specified in call to " + method_name + - "." + unsafe_context_creation(node, insecure_version) +select node, "Insecure SSL/TLS protocol version " + insecure_version //+ " specified in call to " + method_name + "." +// from CallNode call, string method_name, string insecure_version +// where +// unsafe_ssl_wrap_socket_call(call, method_name, insecure_version, _) +// or +// unsafe_pyOpenSSL_Context_call(call, insecure_version) and method_name = "pyOpenSSL.SSL.Context" +// select call, +// "Insecure SSL/TLS protocol version " + insecure_version + " specified in call to " + method_name + +// "." From 186db7f43ec254792ca3b0ded440fd0a06080711 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sun, 21 Feb 2021 12:07:48 +0100 Subject: [PATCH 0008/1662] Python: factor into modules and files --- .../src/Security/CWE-327/FluentApiModel.qll | 54 ++++ .../src/Security/CWE-327/InsecureProtocol.ql | 268 +----------------- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 73 +++++ python/ql/src/Security/CWE-327/Ssl.qll | 106 +++++++ .../src/Security/CWE-327/TlsLibraryModel.qll | 80 ++++++ 5 files changed, 315 insertions(+), 266 deletions(-) create mode 100644 python/ql/src/Security/CWE-327/FluentApiModel.qll create mode 100644 python/ql/src/Security/CWE-327/PyOpenSSL.qll create mode 100644 python/ql/src/Security/CWE-327/Ssl.qll create mode 100644 python/ql/src/Security/CWE-327/TlsLibraryModel.qll diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll new file mode 100644 index 000000000000..4c2278b86942 --- /dev/null +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -0,0 +1,54 @@ +import python +import TlsLibraryModel + +class InsecureContextConfiguration extends DataFlow::Configuration { + TlsLibrary library; + + InsecureContextConfiguration() { this = library + ["AllowsTLSv1", "AllowsTLSv1_1"] } + + override predicate isSource(DataFlow::Node source) { + source = library.unspecific_context_creation() + } + + override predicate isSink(DataFlow::Node sink) { + sink = library.connection_creation().getContext() + } + + abstract string flag(); + + override predicate isBarrierOut(DataFlow::Node node) { + exists(ProtocolRestriction r | + r = library.protocol_restriction() and + node = r.getContext() and + r.getRestriction() = flag() + ) + } +} + +class AllowsTLSv1 extends InsecureContextConfiguration { + AllowsTLSv1() { this = library + "AllowsTLSv1" } + + override string flag() { result = "TLSv1" } +} + +class AllowsTLSv1_1 extends InsecureContextConfiguration { + AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } + + override string flag() { result = "TLSv1_1" } +} + +predicate unsafe_connection_creation(DataFlow::Node node, ProtocolVersion insecure_version) { + exists(AllowsTLSv1 c | c.hasFlowTo(node)) and + insecure_version = "TLSv1" + or + exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) and + insecure_version = "TLSv1_1" + or + exists(TlsLibrary l | l.insecure_connection_creation(insecure_version) = node) +} + +predicate unsafe_context_creation(DataFlow::Node node, string insecure_version) { + exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | + cc = node + ) +} diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 81b3558907e3..b873e5f3ce8f 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -10,277 +10,13 @@ */ import python -import semmle.python.ApiGraphs +import FluentApiModel +// string foo(ProtocolRestriction r) { result = r.getRestriction() } // The idea is to track flow from the creation of an insecure context to a use // such as `wrap_socket`. There should be a data-flow path for each insecure version // and each path should have a version specific sanitizer. This will allow fluent api // style code to block the paths one by one. -// -// class InsecureContextCreation extends DataFlow::CfgNode { -// override CallNode node; -// InsecureContextCreation() { -// this = API::moduleImport("ssl").getMember("SSLContext").getACall() and -// insecure_version().asCfgNode() in [node.getArg(0), node.getArgByName("protocol")] -// } -// } -// class InsecureSSLContextCreation extends DataFlow::CfgNode { -// override CallNode node; -// InsecureSSLContextCreation() { -// this = API::moduleImport("ssl").getMember("create_default_context").getACall() -// or -// this = API::moduleImport("ssl").getMember("SSLContext").getACall() and -// API::moduleImport("ssl").getMember("PROTOCOL_TLS").getAUse().asCfgNode() in [ -// node.getArg(0), node.getArgByName("protocol") -// ] -// } -// } -abstract class ContextCreation extends DataFlow::CfgNode { - abstract DataFlow::CfgNode getProtocol(); -} - -abstract class ConnectionCreation extends DataFlow::CfgNode { - abstract DataFlow::CfgNode getContext(); -} - -class ProtocolRestriction extends DataFlow::CfgNode { - abstract DataFlow::CfgNode getContext(); - - abstract string getRestriction(); -} - -abstract class TlsLibrary extends string { - TlsLibrary() { this in ["ssl", "pyOpenSSL"] } - - abstract string specific_insecure_version_name(); - - abstract string unspecific_version_name(); - - abstract API::Node version_constants(); - - DataFlow::Node insecure_version() { - result = version_constants().getMember(specific_insecure_version_name()).getAUse() - } - - DataFlow::Node unspecific_version() { - result = version_constants().getMember(unspecific_version_name()).getAUse() - } - - abstract DataFlow::CfgNode default_context_creation(); - - abstract ContextCreation specific_context_creation(); - - ContextCreation insecure_context_creation() { - result = specific_context_creation() and - result.getProtocol() = insecure_version() - } - - DataFlow::CfgNode unspecific_context_creation() { - result = default_context_creation() - or - result = specific_context_creation() and - result.(ContextCreation).getProtocol() = unspecific_version() - } - - /** A connection is created in an outright insecure manner. */ - abstract DataFlow::CfgNode insecure_connection_creation(); - - /** A connection is created from a context. */ - abstract ConnectionCreation connection_creation(); - - abstract ProtocolRestriction protocol_restriction(); -} - -module ssl { - class SSLContextCreation extends ContextCreation { - override CallNode node; - - SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } - - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("protocol")] - } - } - - class WrapSocketCall extends ConnectionCreation { - override CallNode node; - - WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } - - override DataFlow::CfgNode getContext() { - result.getNode() = node.getFunction().(AttrNode).getObject() - } - } - - class OptionsAugOr extends ProtocolRestriction { - string restriction; - - OptionsAugOr() { - exists(AugAssign aa, AttrNode attr | - aa.getOperation().getOp() instanceof BitOr and - aa.getTarget() = attr.getNode() and - attr.getName() = "options" and - attr.getObject() = node and - aa.getValue() = API::moduleImport("ssl").getMember(restriction).getAUse().asExpr() - ) - } - - override DataFlow::CfgNode getContext() { result = this } - - override string getRestriction() { result = restriction } - } - - class Ssl extends TlsLibrary { - Ssl() { this = "ssl" } - - override string specific_insecure_version_name() { - result in [ - "PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_SSLv23", "PROTOCOL_TLSv1", - "PROTOCOL_TLSv1_1" - ] - } - - override string unspecific_version_name() { result = "PROTOCOL_TLS" } - - override API::Node version_constants() { result = API::moduleImport("ssl") } - - override DataFlow::CfgNode default_context_creation() { - result = API::moduleImport("ssl").getMember("create_default_context").getACall() - } - - override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } - - override DataFlow::CfgNode insecure_connection_creation() { - result = API::moduleImport("ssl").getMember("wrap_socket").getACall() - } - - override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } - - override ProtocolRestriction protocol_restriction() { result instanceof OptionsAugOr } - } -} - -module pyOpenSSL { - class PyOpenSSLContextCreation extends ContextCreation { - override CallNode node; - - PyOpenSSLContextCreation() { - this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Context").getACall() - } - - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("method")] - } - } - - class ConnectionCall extends ConnectionCreation { - override CallNode node; - - ConnectionCall() { - this = API::moduleImport("pyOpenSSL").getMember("SSL").getMember("Connection").getACall() - } - - override DataFlow::CfgNode getContext() { - result.getNode() in [node.getArg(0), node.getArgByName("context")] - } - } - - class SetOptionsCall extends ProtocolRestriction { - override CallNode node; - - SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } - - override DataFlow::CfgNode getContext() { - result.getNode() = node.getFunction().(AttrNode).getObject() - } - - override string getRestriction() { - API::moduleImport("PyOpenSSL").getMember("SSL").getMember(result).getAUse().asCfgNode() in [ - node.getArg(0), node.getArgByName("options") - ] - } - } - - class PyOpenSSL extends TlsLibrary { - PyOpenSSL() { this = "pyOpenSSL" } - - override string specific_insecure_version_name() { - result in ["SSLv2_METHOD", "SSLv23_METHOD", "SSLv3_METHOD", "TLSv1_METHOD", "TLSv1_1_METHOD"] - } - - override string unspecific_version_name() { result = "TLS_METHOD" } - - override API::Node version_constants() { - result = API::moduleImport("pyOpenSSL").getMember("SSL") - } - - override DataFlow::CfgNode default_context_creation() { none() } - - override ContextCreation specific_context_creation() { - result instanceof PyOpenSSLContextCreation - } - - override DataFlow::CfgNode insecure_connection_creation() { none() } - - override ConnectionCreation connection_creation() { result instanceof ConnectionCall } - - override ProtocolRestriction protocol_restriction() { result instanceof SetOptionsCall } - } -} - -class InsecureContextConfiguration extends DataFlow::Configuration { - TlsLibrary library; - - InsecureContextConfiguration() { this = library + ["AllowsTLSv1", "AllowsTLSv1_1"] } - - override predicate isSource(DataFlow::Node source) { - source = library.unspecific_context_creation() - } - - override predicate isSink(DataFlow::Node sink) { - sink = library.connection_creation().getContext() - } - - abstract string flag(); - - override predicate isBarrierOut(DataFlow::Node node) { - exists(ProtocolRestriction r | - r = library.protocol_restriction() and - node = r.getContext() and - r.getRestriction() = flag() - ) - } -} - -class AllowsTLSv1 extends InsecureContextConfiguration { - AllowsTLSv1() { this = library + "AllowsTLSv1" } - - override string flag() { result = "OP_NO_TLSv1" } -} - -class AllowsTLSv1_1 extends InsecureContextConfiguration { - AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } - - override string flag() { result = "OP_NO_TLSv1_1" } -} - -predicate unsafe_connection_creation(DataFlow::Node node, string insecure_version) { - exists(AllowsTLSv1 c | c.hasFlowTo(node)) and - insecure_version = "TLSv1" - or - exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) and - insecure_version = "TLSv1" - or - exists(TlsLibrary l | l.insecure_connection_creation() = node) and - insecure_version = "[multiple]" -} - -predicate unsafe_context_creation(DataFlow::Node node, string insecure_version) { - exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation() | - cc = node and insecure_version = cc.getProtocol().toString() - ) -} - from DataFlow::Node node, string insecure_version where unsafe_connection_creation(node, insecure_version) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll new file mode 100644 index 000000000000..b9a68648f935 --- /dev/null +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -0,0 +1,73 @@ +import python +import semmle.python.ApiGraphs +import TlsLibraryModel + +class PyOpenSSLContextCreation extends ContextCreation { + override CallNode node; + + PyOpenSSLContextCreation() { + this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Context").getACall() + } + + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("method")] + } +} + +class ConnectionCall extends ConnectionCreation { + override CallNode node; + + ConnectionCall() { + this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Connection").getACall() + } + + override DataFlow::CfgNode getContext() { + result.getNode() in [node.getArg(0), node.getArgByName("context")] + } +} + +class SetOptionsCall extends ProtocolRestriction { + override CallNode node; + + SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } + + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } + + override ProtocolVersion getRestriction() { + API::moduleImport("OpenSSL").getMember("SSL").getMember("OP_NO_" + result).getAUse().asCfgNode() in [ + node.getArg(0), node.getArgByName("options") + ] + } +} + +class PyOpenSSL extends TlsLibrary { + PyOpenSSL() { this = "pyOpenSSL" } + + override string specific_insecure_version_name(ProtocolVersion version) { + version in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] and + result = version + "_METHOD" + } + + override string unspecific_version_name() { + result in [ + "TLS_METHOD", // This is not actually available in pyOpenSSL yet + "SSLv23_METHOD" // This is what can negotiate TLS 1.3 (indeed, I know, I did test that..) + ] + } + + override API::Node version_constants() { result = API::moduleImport("OpenSSL").getMember("SSL") } + + override DataFlow::CfgNode default_context_creation() { none() } + + override ContextCreation specific_context_creation() { + result instanceof PyOpenSSLContextCreation + } + + override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { none() } + + override ConnectionCreation connection_creation() { result instanceof ConnectionCall } + + override ProtocolRestriction protocol_restriction() { result instanceof SetOptionsCall } +} diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll new file mode 100644 index 000000000000..369149fd6384 --- /dev/null +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -0,0 +1,106 @@ +import python +import semmle.python.ApiGraphs +import semmle.python.dataflow.new.internal.Attributes as Attributes +import TlsLibraryModel + +class SSLContextCreation extends ContextCreation { + override CallNode node; + + SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } + + override DataFlow::CfgNode getProtocol() { + result.getNode() in [node.getArg(0), node.getArgByName("protocol")] + } +} + +class WrapSocketCall extends ConnectionCreation { + override CallNode node; + + WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } + + override DataFlow::CfgNode getContext() { + result.getNode() = node.getFunction().(AttrNode).getObject() + } +} + +class OptionsAugOr extends ProtocolRestriction { + ProtocolVersion restriction; + + OptionsAugOr() { + exists(AugAssign aa, AttrNode attr | + aa.getOperation().getOp() instanceof BitOr and + aa.getTarget() = attr.getNode() and + attr.getName() = "options" and + attr.getObject() = node and + API::moduleImport("ssl").getMember("OP_NO_" + restriction).getAUse().asExpr() in [ + aa.getValue(), aa.getValue().getAChildNode() + ] + ) + } + + override DataFlow::CfgNode getContext() { result = this } + + override ProtocolVersion getRestriction() { result = restriction } +} + +class ContextSetVersion extends ProtocolRestriction { + string restriction; + + ContextSetVersion() { + exists(Attributes::AttrWrite aw | + aw.getObject().asCfgNode() = node and + aw.getAttributeName() = "minimum_version" and + aw.getValue() = + API::moduleImport("ssl").getMember("TLSVersion").getMember(restriction).getAUse() + ) + } + + override DataFlow::CfgNode getContext() { result = this } + + override ProtocolVersion getRestriction() { result.lessThan(restriction) } +} + +class Ssl extends TlsLibrary { + Ssl() { this = "ssl" } + + override string specific_insecure_version_name(ProtocolVersion version) { + version in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] and + result = "PROTOCOL_" + version + // result in ["PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_TLSv1", "PROTOCOL_TLSv1_1"] + } + + override string unspecific_version_name() { + result = + "PROTOCOL_" + + [ + "TLS", + // This can negotiate a TLS 1.3 connection (!) + // see https://docs.python.org/3/library/ssl.html#ssl-contexts + "SSLv23" + ] + } + + override API::Node version_constants() { result = API::moduleImport("ssl") } + + override DataFlow::CfgNode default_context_creation() { + result = API::moduleImport("ssl").getMember("create_default_context").getACall() //and + // see https://docs.python.org/3/library/ssl.html#context-creation + // version in ["TLSv1", "TLSv1_1"] + } + + override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } + + override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { + result = API::moduleImport("ssl").getMember("wrap_socket").getACall() and + insecure_version(version).asCfgNode() = + result.asCfgNode().(CallNode).getArgByName("ssl_version") + } + + override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } + + override ProtocolRestriction protocol_restriction() { + result instanceof OptionsAugOr + or + result instanceof ContextSetVersion + } +} diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll new file mode 100644 index 000000000000..41db81ad1c80 --- /dev/null +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -0,0 +1,80 @@ +import python +import semmle.python.ApiGraphs +import Ssl +import PyOpenSSL + +/** + * A specific protocol version. + * We use this to identify a protocol. + */ +class ProtocolVersion extends string { + ProtocolVersion() { this in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } + + predicate lessThan(ProtocolVersion version) { + this = "SSLv2" and version = "SSLv3" + or + this = "TLSv1" and version = ["TLSv1_1", "TLSv1_2", "TLSv1_3"] + or + this = ["TLSv1", "TLSv1_1"] and version = ["TLSv1_2", "TLSv1_3"] + or + this = ["TLSv1", "TLSv1_1", "TLSv1_2"] and version = "TLSv1_3" + } +} + +abstract class ContextCreation extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getProtocol(); +} + +abstract class ConnectionCreation extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getContext(); +} + +abstract class ProtocolRestriction extends DataFlow::CfgNode { + abstract DataFlow::CfgNode getContext(); + + abstract ProtocolVersion getRestriction(); +} + +abstract class TlsLibrary extends string { + TlsLibrary() { this in ["ssl", "pyOpenSSL"] } + + /** The name of a specific protocol version, known to be insecure. */ + abstract string specific_insecure_version_name(ProtocolVersion version); + + /** The name of an unspecific protocol version, say TLS, known to have insecure insatnces. */ + abstract string unspecific_version_name(); + + abstract API::Node version_constants(); + + DataFlow::Node insecure_version(ProtocolVersion version) { + result = version_constants().getMember(specific_insecure_version_name(version)).getAUse() + } + + DataFlow::Node unspecific_version() { + result = version_constants().getMember(unspecific_version_name()).getAUse() + } + + abstract DataFlow::CfgNode default_context_creation(); + + abstract ContextCreation specific_context_creation(); + + ContextCreation insecure_context_creation(ProtocolVersion version) { + result = specific_context_creation() and + result.getProtocol() = insecure_version(version) + } + + DataFlow::CfgNode unspecific_context_creation() { + result = default_context_creation() + or + result = specific_context_creation() and + result.(ContextCreation).getProtocol() = unspecific_version() + } + + /** A connection is created in an outright insecure manner. */ + abstract DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version); + + /** A connection is created from a context. */ + abstract ConnectionCreation connection_creation(); + + abstract ProtocolRestriction protocol_restriction(); +} From 87e1a062ea750a3b2acc95d75583099c055defe9 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sun, 21 Feb 2021 12:08:11 +0100 Subject: [PATCH 0009/1662] Python: fluent api tests --- .../Security/CWE-327/pyOpenSSL_fluent.py | 31 +++++++ .../Security/CWE-327/ssl_fluent.py | 87 +++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py create mode 100644 python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py diff --git a/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py new file mode 100644 index 000000000000..028c318be668 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py @@ -0,0 +1,31 @@ +import socket +from OpenSSL import SSL + +def test_fluent(): + hostname = 'www.python.org' + context = SSL.Context(SSL.SSLv23_METHOD) + + conn = SSL.Connection(context, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + r = conn.connect((hostname, 443)) + print(conn.get_protocol_version_name()) + + +def test_fluent_no_TLSv1(): + hostname = 'www.python.org' + context = SSL.Context(SSL.SSLv23_METHOD) + context.set_options(SSL.OP_NO_TLSv1) + + conn = SSL.Connection(context, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + r = conn.connect((hostname, 443)) + print(conn.get_protocol_version_name()) + + +def test_fluent_safe(): + hostname = 'www.python.org' + context = SSL.Context(SSL.SSLv23_METHOD) + context.set_options(SSL.OP_NO_TLSv1) + context.set_options(SSL.OP_NO_TLSv1_1) + + conn = SSL.Connection(context, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + r = conn.connect((hostname, 443)) + print(r, conn.get_protocol_version_name()) diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py new file mode 100644 index 000000000000..9f9e01294cb5 --- /dev/null +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -0,0 +1,87 @@ +import socket +import ssl + +def test_fluent_tls(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS) + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + + +def test_fluent_tls_no_TLSv1(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context.options |= ssl.OP_NO_TLSv1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_tls_safe(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context.options |= ssl.OP_NO_TLSv1 + context.options |= ssl.OP_NO_TLSv1_1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_ssl(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + + +def test_fluent_ssl_no_TLSv1(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_ssl_safe(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 + context.options |= ssl.OP_NO_TLSv1_1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_ssl_safe_combined(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +# From Python 3.7 +# see https://docs.python.org/3/library/ssl.html#ssl.SSLContext.minimum_version +def test_fluent_ssl_unsafe_version(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context.minimum_version = ssl.TLSVersion.TLSv1_1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_ssl_safe_version(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context.minimum_version = ssl.TLSVersion.TLSv1_3 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) From ea8c6f04e2ba137b6501152f22b93f642e17b372 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sun, 21 Feb 2021 12:09:56 +0100 Subject: [PATCH 0010/1662] Python: Update old test and qlhelp --- .../Security/CWE-327/InsecureProtocol.qhelp | 6 ++--- python/ql/src/Security/CWE-327/ReadMe.md | 24 +++++++++++++++++++ .../Security/CWE-327/InsecureProtocol.py | 8 +++---- 3 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 python/ql/src/Security/CWE-327/ReadMe.md diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp index 63545129cc79..4a7364ca14e2 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp @@ -13,8 +13,8 @@

    Ensure that a modern, strong protocol is used. All versions of SSL, - and TLS 1.0 are known to be vulnerable to attacks. Using TLS 1.1 or - above is strongly recommended. + and TLS versions 1.0 and 1.1 are known to be vulnerable to attacks. + Using TLS 1.2 or above is strongly recommended.

    @@ -30,7 +30,7 @@

    All cases should be updated to use a secure protocol, such as - PROTOCOL_TLSv1_1. + PROTOCOL_TLSv1_2.

    Note that ssl.wrap_socket has been deprecated in diff --git a/python/ql/src/Security/CWE-327/ReadMe.md b/python/ql/src/Security/CWE-327/ReadMe.md new file mode 100644 index 000000000000..c5330a78fda9 --- /dev/null +++ b/python/ql/src/Security/CWE-327/ReadMe.md @@ -0,0 +1,24 @@ +# Current status (Feb 2021) + +This should be kept up to date; the world is moving fast and protocols are being broken. + +## Protocols + +- All versions of SSL are insecure +- TLS 1.0 and TLS 1.1 are insecure +- TLS 1.2 have some issues. but TLS 1.3 is not widely supported + +## Conection methods + +- `ssl.wrap_socket` is creating insecure connections, use `SSLContext.wrap_socket` instead. [link](https://docs.python.org/3/library/ssl.html#ssl.wrap_socket) + > Deprecated since version 3.7: Since Python 3.2 and 2.7.9, it is recommended to use the `SSLContext.wrap_socket()` instead of `wrap_socket()`. The top-level function is limited and creates an insecure client socket without server name indication or hostname matching. +- Default consteructors are fine, a sluent api is used to constrain possible protocols later. + +## Current recomendation + +TLS 1.2 or TLS 1.3 + +## Queries + +- `InsecureProtocol` detects uses of insecure protocols. +- `InsecureDefaultProtocol` detect default constructions, this is no longer unsafe. diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py index 5a6d044aa6de..cb21a6623c9e 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py @@ -1,5 +1,5 @@ import ssl -from pyOpenSSL import SSL +from OpenSSL import SSL from ssl import SSLContext # true positives @@ -33,9 +33,9 @@ # secure versions -ssl.wrap_socket(ssl_version=ssl.PROTOCOL_TLSv1_1) -SSLContext(protocol=ssl.PROTOCOL_TLSv1_1) -SSL.Context(SSL.TLSv1_1_METHOD) +ssl.wrap_socket(ssl_version=ssl.PROTOCOL_TLSv1_2) +SSLContext(protocol=ssl.PROTOCOL_TLSv1_2) +SSL.Context(SSL.TLSv1_2_METHOD) # possibly insecure default ssl.wrap_socket() From 3b856010f28ade83481b3e9fe553c4bb56f0f432 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 23 Feb 2021 19:29:30 +0100 Subject: [PATCH 0011/1662] Python: add TODO comment --- python/ql/src/Security/CWE-327/Ssl.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 369149fd6384..e3247d5143c3 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -32,6 +32,7 @@ class OptionsAugOr extends ProtocolRestriction { aa.getTarget() = attr.getNode() and attr.getName() = "options" and attr.getObject() = node and + // TODO: Use something like BoolExpr::impliesValue here API::moduleImport("ssl").getMember("OP_NO_" + restriction).getAUse().asExpr() in [ aa.getValue(), aa.getValue().getAChildNode() ] From d5171fc043cd4a66372780bcbe5c758cd7c594e2 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Feb 2021 21:12:34 +0100 Subject: [PATCH 0012/1662] Python: Comment everything --- .../src/Security/CWE-327/FluentApiModel.qll | 15 +++++++++++++ .../src/Security/CWE-327/InsecureProtocol.ql | 13 ------------ python/ql/src/Security/CWE-327/PyOpenSSL.qll | 2 +- python/ql/src/Security/CWE-327/Ssl.qll | 17 ++++++++++----- .../src/Security/CWE-327/TlsLibraryModel.qll | 21 ++++++++++++++++--- 5 files changed, 46 insertions(+), 22 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 4c2278b86942..3dc12e2f434b 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -1,6 +1,11 @@ import python import TlsLibraryModel +/** + * Configuration to track flow from the creation of a context to + * that context being used to create a connection. + * Flow is broken if the insecure protocol of interest is being restricted. + */ class InsecureContextConfiguration extends DataFlow::Configuration { TlsLibrary library; @@ -25,28 +30,38 @@ class InsecureContextConfiguration extends DataFlow::Configuration { } } +/** Configuration to specifically track the insecure protocol TLS 1.0 */ class AllowsTLSv1 extends InsecureContextConfiguration { AllowsTLSv1() { this = library + "AllowsTLSv1" } override string flag() { result = "TLSv1" } } +/** Configuration to specifically track the insecure protocol TLS 1.1 */ class AllowsTLSv1_1 extends InsecureContextConfiguration { AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } override string flag() { result = "TLSv1_1" } } +/** + * A connection is created from a context allowing an insecure protocol, + * and that protocol has not been restricted appropriately. + */ predicate unsafe_connection_creation(DataFlow::Node node, ProtocolVersion insecure_version) { + // Connection created from a context allowing TLS 1.0. exists(AllowsTLSv1 c | c.hasFlowTo(node)) and insecure_version = "TLSv1" or + // Connection created from a context allowing TLS 1.1. exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) and insecure_version = "TLSv1_1" or + // Connection created from a context for an insecure protocol. exists(TlsLibrary l | l.insecure_connection_creation(insecure_version) = node) } +/** A connection is created insecurely without reference to a context. */ predicate unsafe_context_creation(DataFlow::Node node, string insecure_version) { exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | cc = node diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index b873e5f3ce8f..c902d9a284d4 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -12,22 +12,9 @@ import python import FluentApiModel -// string foo(ProtocolRestriction r) { result = r.getRestriction() } -// The idea is to track flow from the creation of an insecure context to a use -// such as `wrap_socket`. There should be a data-flow path for each insecure version -// and each path should have a version specific sanitizer. This will allow fluent api -// style code to block the paths one by one. from DataFlow::Node node, string insecure_version where unsafe_connection_creation(node, insecure_version) or unsafe_context_creation(node, insecure_version) select node, "Insecure SSL/TLS protocol version " + insecure_version //+ " specified in call to " + method_name + "." -// from CallNode call, string method_name, string insecure_version -// where -// unsafe_ssl_wrap_socket_call(call, method_name, insecure_version, _) -// or -// unsafe_pyOpenSSL_Context_call(call, insecure_version) and method_name = "pyOpenSSL.SSL.Context" -// select call, -// "Insecure SSL/TLS protocol version " + insecure_version + " specified in call to " + method_name + -// "." diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index b9a68648f935..a89c7ff08867 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -59,7 +59,7 @@ class PyOpenSSL extends TlsLibrary { override API::Node version_constants() { result = API::moduleImport("OpenSSL").getMember("SSL") } - override DataFlow::CfgNode default_context_creation() { none() } + override ContextCreation default_context_creation() { none() } override ContextCreation specific_context_creation() { result instanceof PyOpenSSLContextCreation diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index e3247d5143c3..ba91b39bdeb4 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -13,6 +13,16 @@ class SSLContextCreation extends ContextCreation { } } +class SSLDefaultContextCreation extends ContextCreation { + SSLDefaultContextCreation() { + this = API::moduleImport("ssl").getMember("create_default_context").getACall() + } + + // Allowed insecure versions are "TLSv1" and "TLSv1_1" + // see https://docs.python.org/3/library/ssl.html#context-creation + override DataFlow::CfgNode getProtocol() { none() } +} + class WrapSocketCall extends ConnectionCreation { override CallNode node; @@ -67,7 +77,6 @@ class Ssl extends TlsLibrary { override string specific_insecure_version_name(ProtocolVersion version) { version in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] and result = "PROTOCOL_" + version - // result in ["PROTOCOL_SSLv2", "PROTOCOL_SSLv3", "PROTOCOL_TLSv1", "PROTOCOL_TLSv1_1"] } override string unspecific_version_name() { @@ -83,10 +92,8 @@ class Ssl extends TlsLibrary { override API::Node version_constants() { result = API::moduleImport("ssl") } - override DataFlow::CfgNode default_context_creation() { - result = API::moduleImport("ssl").getMember("create_default_context").getACall() //and - // see https://docs.python.org/3/library/ssl.html#context-creation - // version in ["TLSv1", "TLSv1_1"] + override ContextCreation default_context_creation() { + result instanceof SSLDefaultContextCreation } override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 41db81ad1c80..36e58acd9266 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -21,17 +21,24 @@ class ProtocolVersion extends string { } } +/** The creation of a context. */ abstract class ContextCreation extends DataFlow::CfgNode { + /** Gets the requested protocol if any. */ abstract DataFlow::CfgNode getProtocol(); } +/** The creation of a connection from a context. */ abstract class ConnectionCreation extends DataFlow::CfgNode { + /** Gets the context used to create the connection. */ abstract DataFlow::CfgNode getContext(); } +/** A context is being restricted on which protocols it can accepts. */ abstract class ProtocolRestriction extends DataFlow::CfgNode { + /** Gets the context being restricted. */ abstract DataFlow::CfgNode getContext(); + /** Gets the protocol version being disallowed. */ abstract ProtocolVersion getRestriction(); } @@ -41,28 +48,35 @@ abstract class TlsLibrary extends string { /** The name of a specific protocol version, known to be insecure. */ abstract string specific_insecure_version_name(ProtocolVersion version); - /** The name of an unspecific protocol version, say TLS, known to have insecure insatnces. */ + /** The name of an unspecific protocol version, say TLS, known to have insecure instances. */ abstract string unspecific_version_name(); + /** The module or class holding the version constants. */ abstract API::Node version_constants(); + /** A dataflow node representing a specific protocol version, known to be insecure. */ DataFlow::Node insecure_version(ProtocolVersion version) { result = version_constants().getMember(specific_insecure_version_name(version)).getAUse() } + /** A dataflow node representing an unspecific protocol version, say TLS, known to have insecure instances. */ DataFlow::Node unspecific_version() { result = version_constants().getMember(unspecific_version_name()).getAUse() } - abstract DataFlow::CfgNode default_context_creation(); + /** The creation of a context with a deafult protocol. */ + abstract ContextCreation default_context_creation(); + /** The creation of a context with a specific protocol. */ abstract ContextCreation specific_context_creation(); + /** The creation of a context with a specific protocol version, known to be insecure. */ ContextCreation insecure_context_creation(ProtocolVersion version) { result = specific_context_creation() and result.getProtocol() = insecure_version(version) } + /** The creation of a context with an unspecific protocol version, say TLS, known to have insecure instances. */ DataFlow::CfgNode unspecific_context_creation() { result = default_context_creation() or @@ -70,11 +84,12 @@ abstract class TlsLibrary extends string { result.(ContextCreation).getProtocol() = unspecific_version() } - /** A connection is created in an outright insecure manner. */ + /** A connection is created in an insecure manner, not from a context. */ abstract DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version); /** A connection is created from a context. */ abstract ConnectionCreation connection_creation(); + /** A context is being restricted on which protocols it can accepts. */ abstract ProtocolRestriction protocol_restriction(); } From 9e696ff0fbaac008a12bfa1a7241a0f0140bbc9d Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Feb 2021 21:58:00 +0100 Subject: [PATCH 0013/1662] Python: Add false negative to test --- .../ql/test/query-tests/Security/CWE-327/ssl_fluent.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index 9f9e01294cb5..252ab0a9e49a 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -85,3 +85,13 @@ def test_fluent_ssl_safe_version(): with socket.create_connection((hostname, 443)) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) + +# Taken from https://docs.python.org/3/library/ssl.html#context-creation +def test_fluent_explicitly_unsafe(): + hostname = 'www.python.org' + context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) + context.options &= ~ssl.OP_NO_SSLv3 # This not recognized + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: # SSLv3 not flagged here + print(ssock.version()) From 60525ec3018924898d47d72d133cb0b1431a2bea Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Feb 2021 21:58:30 +0100 Subject: [PATCH 0014/1662] Python: Also track offending call update test expectations at this point --- .../src/Security/CWE-327/FluentApiModel.qll | 20 +++++++--- .../src/Security/CWE-327/InsecureProtocol.ql | 16 ++++++-- .../CWE-327/InsecureProtocol.expected | 38 ++++++++++++------- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 3dc12e2f434b..23922a905950 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -48,22 +48,30 @@ class AllowsTLSv1_1 extends InsecureContextConfiguration { * A connection is created from a context allowing an insecure protocol, * and that protocol has not been restricted appropriately. */ -predicate unsafe_connection_creation(DataFlow::Node node, ProtocolVersion insecure_version) { +predicate unsafe_connection_creation( + DataFlow::Node node, ProtocolVersion insecure_version, CallNode call +) { // Connection created from a context allowing TLS 1.0. - exists(AllowsTLSv1 c | c.hasFlowTo(node)) and + exists(AllowsTLSv1 c, ContextCreation cc | c.hasFlow(cc, node) | cc.getNode() = call) and insecure_version = "TLSv1" or // Connection created from a context allowing TLS 1.1. - exists(AllowsTLSv1_1 c | c.hasFlowTo(node)) and + exists(AllowsTLSv1_1 c, ContextCreation cc | c.hasFlow(cc, node) | cc.getNode() = call) and insecure_version = "TLSv1_1" or // Connection created from a context for an insecure protocol. - exists(TlsLibrary l | l.insecure_connection_creation(insecure_version) = node) + exists(TlsLibrary l, DataFlow::CfgNode cc | + cc = l.insecure_connection_creation(insecure_version) + | + cc = node and + cc.getNode() = call + ) } /** A connection is created insecurely without reference to a context. */ -predicate unsafe_context_creation(DataFlow::Node node, string insecure_version) { +predicate unsafe_context_creation(DataFlow::Node node, string insecure_version, CallNode call) { exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | - cc = node + cc = node and + cc.getNode() = call ) } diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index c902d9a284d4..51247dbd75aa 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -12,9 +12,17 @@ import python import FluentApiModel -from DataFlow::Node node, string insecure_version +string callName(AstNode call) { + result = call.(Name).getId() + or + exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) +} + +from DataFlow::Node node, string insecure_version, CallNode call where - unsafe_connection_creation(node, insecure_version) + unsafe_connection_creation(node, insecure_version, call) or - unsafe_context_creation(node, insecure_version) -select node, "Insecure SSL/TLS protocol version " + insecure_version //+ " specified in call to " + method_name + "." + unsafe_context_creation(node, insecure_version, call) +select node, "Insecure SSL/TLS protocol version " + insecure_version + " specified in $@ ", call, + "call to " + callName(call.getFunction().getNode()) +//+ " specified in call to " + method_name + "." diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index 33542e4a048e..7b646f9fd3e8 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -1,14 +1,24 @@ -| InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version PROTOCOL_SSLv2 specified in call to deprecated method ssl.wrap_socket. | -| InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version PROTOCOL_SSLv3 specified in call to deprecated method ssl.wrap_socket. | -| InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version PROTOCOL_TLSv1 specified in call to deprecated method ssl.wrap_socket. | -| InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version PROTOCOL_SSLv2 specified in call to ssl.SSLContext. | -| InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version PROTOCOL_SSLv3 specified in call to ssl.SSLContext. | -| InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version PROTOCOL_TLSv1 specified in call to ssl.SSLContext. | -| InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2_METHOD specified in call to pyOpenSSL.SSL.Context. | -| InsecureProtocol.py:15:1:15:30 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv23_METHOD specified in call to pyOpenSSL.SSL.Context. | -| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3_METHOD specified in call to pyOpenSSL.SSL.Context. | -| InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1_METHOD specified in call to pyOpenSSL.SSL.Context. | -| InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2_METHOD specified in call to pyOpenSSL.SSL.Context. | -| InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version PROTOCOL_SSLv2 specified in call to deprecated method ssl.wrap_socket. | -| InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version PROTOCOL_SSLv2 specified in call to ssl.SSLContext. | -| InsecureProtocol.py:52:1:52:33 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv23_METHOD specified in call to ssl.SSLContext. | +| InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | call to SSLContext | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:47:14:47:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:43:15:43:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:77:14:77:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:73:15:73:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:96:14:96:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:92:15:92:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:96:14:96:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:92:15:92:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | From 7a1d953fcac8d159440345dd26dd13b4136f1481 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 2 Mar 2021 22:46:01 +0100 Subject: [PATCH 0015/1662] Python: More tests --- .../CWE-327/InsecureProtocol.expected | 14 ++- .../Security/CWE-327/ssl_fluent.py | 96 +++++++++++++++++++ 2 files changed, 107 insertions(+), 3 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index 7b646f9fd3e8..e116662ce659 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -19,6 +19,14 @@ | ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:47:14:47:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:43:15:43:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:77:14:77:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:73:15:73:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:96:14:96:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:92:15:92:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | -| ssl_fluent.py:96:14:96:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:92:15:92:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:173:14:173:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:169:15:169:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index 252ab0a9e49a..eceacaebe215 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -66,6 +66,102 @@ def test_fluent_ssl_safe_combined(): with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) +def test_fluent_ssl_unsafe_combined_wrongly(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 & ssl.OP_NO_TLSv1_1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_ssl_safe_combined_multiple(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + + +def create_relaxed_context(): + return ssl.SSLContext(ssl.PROTOCOL_SSLv23) + +def create_secure_context(): + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + return context + +def create_connection(context): + with socket.create_connection(('www.python.org', 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_delegated_context_unsafe(): + context = create_relaxed_context() + with socket.create_connection(('www.python.org', 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_delegated_context_safe(): + context = create_secure_context() + with socket.create_connection(('www.python.org', 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_delegated_context_made_safe(): + context = create_relaxed_context() + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + with socket.create_connection(('www.python.org', 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_delegated_context_made_unsafe(): + context = create_secure_context() + context.options &= ~ssl.OP_NO_TLSv1_1 + with socket.create_connection(('www.python.org', 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_delegated_connection_unsafe(): + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + create_connection(context) + +def test_delegated_connection_safe(): + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + create_connection(context) + +def test_delegated_connection_made_safe(): + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + create_connection(context) + +def test_delegated_connection_made_unsafe(): + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + context.options &= ~ssl.OP_NO_TLSv1_1 + create_connection(context) + +def test_delegated_unsafe(): + context = create_relaxed_context() + create_connection(context) + +def test_delegated_safe(): + context = create_secure_context() + create_connection(context) + +def test_delegated_made_safe(): + context = create_relaxed_context() + context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + create_connection(context) + +def test_delegated_made_unsafe(): + context = create_secure_context() + context.options &= ~ssl.OP_NO_TLSv1_1 + create_connection(context) + # From Python 3.7 # see https://docs.python.org/3/library/ssl.html#ssl.SSLContext.minimum_version def test_fluent_ssl_unsafe_version(): From 97d26687fed6b102c0c2be075ec6a0350a9ef246 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 1 Mar 2021 15:04:48 +0100 Subject: [PATCH 0016/1662] Python: Improve logic of bit fields --- python/ql/src/Security/CWE-327/Ssl.qll | 31 +++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index ba91b39bdeb4..4caa0ae7302e 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -37,15 +37,17 @@ class OptionsAugOr extends ProtocolRestriction { ProtocolVersion restriction; OptionsAugOr() { - exists(AugAssign aa, AttrNode attr | + exists(AugAssign aa, AttrNode attr, Expr flag | aa.getOperation().getOp() instanceof BitOr and aa.getTarget() = attr.getNode() and attr.getName() = "options" and attr.getObject() = node and - // TODO: Use something like BoolExpr::impliesValue here - API::moduleImport("ssl").getMember("OP_NO_" + restriction).getAUse().asExpr() in [ - aa.getValue(), aa.getValue().getAChildNode() - ] + flag = API::moduleImport("ssl").getMember("OP_NO_" + restriction).getAUse().asExpr() and + ( + aa.getValue() = flag + or + impliesValue(aa.getValue(), flag, false, false) + ) ) } @@ -54,6 +56,25 @@ class OptionsAugOr extends ProtocolRestriction { override ProtocolVersion getRestriction() { result = restriction } } +/** Whether `part` evaluates to `partIsTrue` if `whole` evaluates to `wholeIsTrue`. */ +predicate impliesValue(BinaryExpr whole, Expr part, boolean partIsTrue, boolean wholeIsTrue) { + whole.getOp() instanceof BitAnd and + ( + wholeIsTrue = true and partIsTrue = true and part in [whole.getLeft(), whole.getRight()] + or + wholeIsTrue = true and + impliesValue([whole.getLeft(), whole.getRight()], part, partIsTrue, wholeIsTrue) + ) + or + whole.getOp() instanceof BitOr and + ( + wholeIsTrue = false and partIsTrue = false and part in [whole.getLeft(), whole.getRight()] + or + wholeIsTrue = false and + impliesValue([whole.getLeft(), whole.getRight()], part, partIsTrue, wholeIsTrue) + ) +} + class ContextSetVersion extends ProtocolRestriction { string restriction; From cbbc7b2bcd160bdfc268252644f35daf4c1bcfd9 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 3 Mar 2021 23:42:48 +0100 Subject: [PATCH 0017/1662] Python: support unrestrictions Also pyOpenSSL allows SSL 2 and SSL 3 on `SSLv23` --- .../src/Security/CWE-327/FluentApiModel.qll | 62 ++++++++-------- .../src/Security/CWE-327/InsecureProtocol.ql | 26 +++++-- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 18 +++-- python/ql/src/Security/CWE-327/Ssl.qll | 63 ++++++++++++---- .../src/Security/CWE-327/TlsLibraryModel.qll | 48 +++++++++++-- .../CWE-327/InsecureProtocol.expected | 72 ++++++++++--------- 6 files changed, 200 insertions(+), 89 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 23922a905950..d222af704997 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -8,40 +8,44 @@ import TlsLibraryModel */ class InsecureContextConfiguration extends DataFlow::Configuration { TlsLibrary library; + ProtocolVersion tracked_version; - InsecureContextConfiguration() { this = library + ["AllowsTLSv1", "AllowsTLSv1_1"] } + InsecureContextConfiguration() { + this = library + "Allows" + tracked_version and + tracked_version.isInsecure() + } + + ProtocolVersion getTrackedVersion() { result = tracked_version } override predicate isSource(DataFlow::Node source) { - source = library.unspecific_context_creation() + // source = library.unspecific_context_creation() + exists(ProtocolUnrestriction pu | + pu = library.protocol_unrestriction() and + pu.getUnrestriction() = tracked_version + | + source = pu.getContext() + ) } override predicate isSink(DataFlow::Node sink) { sink = library.connection_creation().getContext() } - abstract string flag(); - override predicate isBarrierOut(DataFlow::Node node) { exists(ProtocolRestriction r | r = library.protocol_restriction() and node = r.getContext() and - r.getRestriction() = flag() + r.getRestriction() = tracked_version ) } -} - -/** Configuration to specifically track the insecure protocol TLS 1.0 */ -class AllowsTLSv1 extends InsecureContextConfiguration { - AllowsTLSv1() { this = library + "AllowsTLSv1" } - - override string flag() { result = "TLSv1" } -} -/** Configuration to specifically track the insecure protocol TLS 1.1 */ -class AllowsTLSv1_1 extends InsecureContextConfiguration { - AllowsTLSv1_1() { this = library + "AllowsTLSv1_1" } - - override string flag() { result = "TLSv1_1" } + override predicate isBarrierIn(DataFlow::Node node) { + exists(ProtocolUnrestriction r | + r = library.protocol_unrestriction() and + node = r.getContext() and + r.getUnrestriction() = tracked_version + ) + } } /** @@ -49,22 +53,22 @@ class AllowsTLSv1_1 extends InsecureContextConfiguration { * and that protocol has not been restricted appropriately. */ predicate unsafe_connection_creation( - DataFlow::Node node, ProtocolVersion insecure_version, CallNode call + DataFlow::Node creation, ProtocolVersion insecure_version, DataFlow::Node source, boolean specific ) { - // Connection created from a context allowing TLS 1.0. - exists(AllowsTLSv1 c, ContextCreation cc | c.hasFlow(cc, node) | cc.getNode() = call) and - insecure_version = "TLSv1" - or - // Connection created from a context allowing TLS 1.1. - exists(AllowsTLSv1_1 c, ContextCreation cc | c.hasFlow(cc, node) | cc.getNode() = call) and - insecure_version = "TLSv1_1" + // Connection created from a context allowing `insecure_version`. + exists(InsecureContextConfiguration c, ProtocolUnrestriction cc | c.hasFlow(cc, creation) | + insecure_version = c.getTrackedVersion() and + source = cc and + specific = false + ) or - // Connection created from a context for an insecure protocol. + // Connection created from a context specifying `insecure_version`. exists(TlsLibrary l, DataFlow::CfgNode cc | cc = l.insecure_connection_creation(insecure_version) | - cc = node and - cc.getNode() = call + creation = cc and + source = cc and + specific = true ) } diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 51247dbd75aa..194cc1f5ec1d 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -18,11 +18,25 @@ string callName(AstNode call) { exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) } -from DataFlow::Node node, string insecure_version, CallNode call +string sourceName(DataFlow::Node source) { + result = "call to " + callName(source.asCfgNode().(CallNode).getFunction().getNode()) + or + not source.asCfgNode() instanceof CallNode and + not source instanceof ContextCreation and + result = "context modification" +} + +string verb(boolean specific) { + specific = true and result = "specified" + or + specific = false and result = "allowed" +} + +from DataFlow::Node creation, string insecure_version, DataFlow::Node source, boolean specific where - unsafe_connection_creation(node, insecure_version, call) + unsafe_connection_creation(creation, insecure_version, source, specific) or - unsafe_context_creation(node, insecure_version, call) -select node, "Insecure SSL/TLS protocol version " + insecure_version + " specified in $@ ", call, - "call to " + callName(call.getFunction().getNode()) -//+ " specified in call to " + method_name + "." + unsafe_context_creation(creation, insecure_version, source.asCfgNode()) and specific = true +select creation, + "Insecure SSL/TLS protocol version " + insecure_version + " " + verb(specific) + " by $@ ", + source, sourceName(source) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index a89c7ff08867..3c36c568ef5b 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -26,6 +26,8 @@ class ConnectionCall extends ConnectionCreation { } } +// This cannot be used to unrestrict, +// see https://www.pyopenssl.org/en/stable/api/ssl.html#OpenSSL.SSL.Context.set_options class SetOptionsCall extends ProtocolRestriction { override CallNode node; @@ -42,6 +44,10 @@ class SetOptionsCall extends ProtocolRestriction { } } +class UnspecificPyOpenSSLContextCreation extends PyOpenSSLContextCreation, UnspecificContextCreation { + UnspecificPyOpenSSLContextCreation() { library = "pyOpenSSL" } +} + class PyOpenSSL extends TlsLibrary { PyOpenSSL() { this = "pyOpenSSL" } @@ -50,11 +56,9 @@ class PyOpenSSL extends TlsLibrary { result = version + "_METHOD" } - override string unspecific_version_name() { - result in [ - "TLS_METHOD", // This is not actually available in pyOpenSSL yet - "SSLv23_METHOD" // This is what can negotiate TLS 1.3 (indeed, I know, I did test that..) - ] + override string unspecific_version_name(ProtocolFamily family) { + // `"TLS_METHOD"` is not actually available in pyOpenSSL yet, but should be coming soon.. + result = family + "_METHOD" } override API::Node version_constants() { result = API::moduleImport("OpenSSL").getMember("SSL") } @@ -70,4 +74,8 @@ class PyOpenSSL extends TlsLibrary { override ConnectionCreation connection_creation() { result instanceof ConnectionCall } override ProtocolRestriction protocol_restriction() { result instanceof SetOptionsCall } + + override ProtocolUnrestriction protocol_unrestriction() { + result instanceof UnspecificPyOpenSSLContextCreation + } } diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 4caa0ae7302e..e749bb9bc3c9 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -56,6 +56,31 @@ class OptionsAugOr extends ProtocolRestriction { override ProtocolVersion getRestriction() { result = restriction } } +class OptionsAugAndNot extends ProtocolUnrestriction { + ProtocolVersion restriction; + + OptionsAugAndNot() { + exists(AugAssign aa, AttrNode attr, Expr flag, UnaryExpr notFlag | + aa.getOperation().getOp() instanceof BitAnd and + aa.getTarget() = attr.getNode() and + attr.getName() = "options" and + attr.getObject() = node and + notFlag.getOp() instanceof Invert and + notFlag.getOperand() = flag and + flag = API::moduleImport("ssl").getMember("OP_NO_" + restriction).getAUse().asExpr() and + ( + aa.getValue() = notFlag + or + impliesValue(aa.getValue(), notFlag, true, true) + ) + ) + } + + override DataFlow::CfgNode getContext() { result = this } + + override ProtocolVersion getUnrestriction() { result = restriction } +} + /** Whether `part` evaluates to `partIsTrue` if `whole` evaluates to `wholeIsTrue`. */ predicate impliesValue(BinaryExpr whole, Expr part, boolean partIsTrue, boolean wholeIsTrue) { whole.getOp() instanceof BitAnd and @@ -75,8 +100,8 @@ predicate impliesValue(BinaryExpr whole, Expr part, boolean partIsTrue, boolean ) } -class ContextSetVersion extends ProtocolRestriction { - string restriction; +class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction { + ProtocolVersion restriction; ContextSetVersion() { exists(Attributes::AttrWrite aw | @@ -90,6 +115,21 @@ class ContextSetVersion extends ProtocolRestriction { override DataFlow::CfgNode getContext() { result = this } override ProtocolVersion getRestriction() { result.lessThan(restriction) } + + override ProtocolVersion getUnrestriction() { + restriction = result or restriction.lessThan(result) + } +} + +class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContextCreation { + UnspecificSSLContextCreation() { library = "ssl" } + + override ProtocolVersion getUnrestriction() { + result = UnspecificContextCreation.super.getUnrestriction() and + // These are turned off by default + // see https://docs.python.org/3/library/ssl.html#ssl-contexts + not result in ["SSLv2", "SSLv3"] + } } class Ssl extends TlsLibrary { @@ -100,16 +140,7 @@ class Ssl extends TlsLibrary { result = "PROTOCOL_" + version } - override string unspecific_version_name() { - result = - "PROTOCOL_" + - [ - "TLS", - // This can negotiate a TLS 1.3 connection (!) - // see https://docs.python.org/3/library/ssl.html#ssl-contexts - "SSLv23" - ] - } + override string unspecific_version_name(ProtocolFamily family) { result = "PROTOCOL_" + family } override API::Node version_constants() { result = API::moduleImport("ssl") } @@ -132,4 +163,12 @@ class Ssl extends TlsLibrary { or result instanceof ContextSetVersion } + + override ProtocolUnrestriction protocol_unrestriction() { + result instanceof OptionsAugAndNot + or + result instanceof ContextSetVersion + or + result instanceof UnspecificSSLContextCreation + } } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 36e58acd9266..97ceec006887 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -19,6 +19,13 @@ class ProtocolVersion extends string { or this = ["TLSv1", "TLSv1_1", "TLSv1_2"] and version = "TLSv1_3" } + + predicate isInsecure() { this in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] } +} + +/** An unspecific protocol version */ +class ProtocolFamily extends string { + ProtocolFamily() { this in ["SSLv23", "TLS"] } } /** The creation of a context. */ @@ -42,6 +49,34 @@ abstract class ProtocolRestriction extends DataFlow::CfgNode { abstract ProtocolVersion getRestriction(); } +/** A context is being relaxed on which protocols it can accepts. */ +abstract class ProtocolUnrestriction extends DataFlow::CfgNode { + /** Gets the context being relaxed. */ + abstract DataFlow::CfgNode getContext(); + + /** Gets the protocol version being allowed. */ + abstract ProtocolVersion getUnrestriction(); +} + +abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrestriction { + TlsLibrary library; + ProtocolFamily family; + + UnspecificContextCreation() { this.getProtocol() = library.unspecific_version(family) } + + override DataFlow::CfgNode getContext() { result = this } + + override ProtocolVersion getUnrestriction() { + family = "TLS" and + result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] + or + // This can negotiate a TLS 1.3 connection (!) + // see https://docs.python.org/3/library/ssl.html#ssl-contexts + family = "SSLv23" and + result in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] + } +} + abstract class TlsLibrary extends string { TlsLibrary() { this in ["ssl", "pyOpenSSL"] } @@ -49,7 +84,7 @@ abstract class TlsLibrary extends string { abstract string specific_insecure_version_name(ProtocolVersion version); /** The name of an unspecific protocol version, say TLS, known to have insecure instances. */ - abstract string unspecific_version_name(); + abstract string unspecific_version_name(ProtocolFamily family); /** The module or class holding the version constants. */ abstract API::Node version_constants(); @@ -60,8 +95,8 @@ abstract class TlsLibrary extends string { } /** A dataflow node representing an unspecific protocol version, say TLS, known to have insecure instances. */ - DataFlow::Node unspecific_version() { - result = version_constants().getMember(unspecific_version_name()).getAUse() + DataFlow::Node unspecific_version(ProtocolFamily family) { + result = version_constants().getMember(unspecific_version_name(family)).getAUse() } /** The creation of a context with a deafult protocol. */ @@ -77,11 +112,11 @@ abstract class TlsLibrary extends string { } /** The creation of a context with an unspecific protocol version, say TLS, known to have insecure instances. */ - DataFlow::CfgNode unspecific_context_creation() { + DataFlow::CfgNode unspecific_context_creation(ProtocolFamily family) { result = default_context_creation() or result = specific_context_creation() and - result.(ContextCreation).getProtocol() = unspecific_version() + result.(ContextCreation).getProtocol() = unspecific_version(family) } /** A connection is created in an insecure manner, not from a context. */ @@ -92,4 +127,7 @@ abstract class TlsLibrary extends string { /** A context is being restricted on which protocols it can accepts. */ abstract ProtocolRestriction protocol_restriction(); + + /** A context is being relaxed on which protocols it can accepts. */ + abstract ProtocolUnrestriction protocol_unrestriction(); } diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index e116662ce659..afd9cc15d9f4 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -1,32 +1,40 @@ -| InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | -| InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | -| InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | -| InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | call to SSLContext | -| InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | call to SSLContext | -| InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | call to SSLContext | -| InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified in $@ | InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified in $@ | InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | -| InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified in $@ | InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | call to SSLContext | -| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | -| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | -| pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | -| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:47:14:47:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:43:15:43:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:173:14:173:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:169:15:169:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 specified in $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | -| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 specified in $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:6:1:6:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:7:1:7:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:8:1:8:47 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:10:1:10:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | call to SSLContext | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:29:27:29:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:25:15:25:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| pyOpenSSL_fluent.py:29:27:29:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:25:15:25:44 | ControlFlowNode for Attribute() | call to SSL.Context | +| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:47:14:47:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:43:15:43:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:144:5:144:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:162:5:162:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:124:14:124:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:122:5:122:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:173:14:173:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:170:5:170:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:189:5:189:11 | ControlFlowNode for context | context modification | From ee038373571b4d3fe2490c2fd19eaeb9afbbfa49 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 3 Mar 2021 23:46:18 +0100 Subject: [PATCH 0018/1662] Python: small refactor --- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 5 +---- python/ql/src/Security/CWE-327/Ssl.qll | 5 +---- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 7 ++++--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index 3c36c568ef5b..d2cfb74b3ab9 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -51,10 +51,7 @@ class UnspecificPyOpenSSLContextCreation extends PyOpenSSLContextCreation, Unspe class PyOpenSSL extends TlsLibrary { PyOpenSSL() { this = "pyOpenSSL" } - override string specific_insecure_version_name(ProtocolVersion version) { - version in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] and - result = version + "_METHOD" - } + override string specific_version_name(ProtocolVersion version) { result = version + "_METHOD" } override string unspecific_version_name(ProtocolFamily family) { // `"TLS_METHOD"` is not actually available in pyOpenSSL yet, but should be coming soon.. diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index e749bb9bc3c9..66a821e83ac8 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -135,10 +135,7 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext class Ssl extends TlsLibrary { Ssl() { this = "ssl" } - override string specific_insecure_version_name(ProtocolVersion version) { - version in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] and - result = "PROTOCOL_" + version - } + override string specific_version_name(ProtocolVersion version) { result = "PROTOCOL_" + version } override string unspecific_version_name(ProtocolFamily family) { result = "PROTOCOL_" + family } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 97ceec006887..3ab880e8bd9e 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -80,8 +80,8 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest abstract class TlsLibrary extends string { TlsLibrary() { this in ["ssl", "pyOpenSSL"] } - /** The name of a specific protocol version, known to be insecure. */ - abstract string specific_insecure_version_name(ProtocolVersion version); + /** The name of a specific protocol version. */ + abstract string specific_version_name(ProtocolVersion version); /** The name of an unspecific protocol version, say TLS, known to have insecure instances. */ abstract string unspecific_version_name(ProtocolFamily family); @@ -91,7 +91,8 @@ abstract class TlsLibrary extends string { /** A dataflow node representing a specific protocol version, known to be insecure. */ DataFlow::Node insecure_version(ProtocolVersion version) { - result = version_constants().getMember(specific_insecure_version_name(version)).getAUse() + version.isInsecure() and + result = version_constants().getMember(specific_version_name(version)).getAUse() } /** A dataflow node representing an unspecific protocol version, say TLS, known to have insecure instances. */ From de9469bbfc1769e6e705165b6e53efa12a0c97eb Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 4 Mar 2021 00:01:44 +0100 Subject: [PATCH 0019/1662] Python: complete `ssl.create_default_context` --- python/ql/src/Security/CWE-327/Ssl.qll | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 66a821e83ac8..d4886219d084 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -132,6 +132,15 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext } } +class UnspecificSSLDefaultContextCreation extends SSLDefaultContextCreation, ProtocolUnrestriction { + override DataFlow::CfgNode getContext() { result = this } + + // see https://docs.python.org/3/library/ssl.html#ssl.create_default_context + override ProtocolVersion getUnrestriction() { + result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] + } +} + class Ssl extends TlsLibrary { Ssl() { this = "ssl" } @@ -167,5 +176,7 @@ class Ssl extends TlsLibrary { result instanceof ContextSetVersion or result instanceof UnspecificSSLContextCreation + or + result instanceof UnspecificSSLDefaultContextCreation } } From d02c5298725695e1fe3dc663922619a7f0a8b35d Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 4 Mar 2021 00:06:36 +0100 Subject: [PATCH 0020/1662] Python: Update annotation --- python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index eceacaebe215..ab65e3bd2068 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -186,7 +186,7 @@ def test_fluent_ssl_safe_version(): def test_fluent_explicitly_unsafe(): hostname = 'www.python.org' context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) - context.options &= ~ssl.OP_NO_SSLv3 # This not recognized + context.options &= ~ssl.OP_NO_SSLv3 with socket.create_connection((hostname, 443)) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: # SSLv3 not flagged here From c5577cb09a073c2fb4f6feeca887c437d5fbe2fb Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 4 Mar 2021 19:54:49 +0800 Subject: [PATCH 0021/1662] Fix the problem --- .../Security/CWE/CWE-352/JsonpInjection.ql | 68 -------- .../CWE/CWE-352/JsonpInjectionFilterLib.qll | 77 --------- .../CWE/CWE-352/JsonpInjectionLib.qll | 155 ------------------ .../Security/CWE/CWE-352/JsonStringLib.qll | 0 .../CWE/CWE-352/JsonpController.java} | 48 +----- .../Security/CWE/CWE-352/JsonpInjection.java | 0 .../Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- .../Security/CWE/CWE-352/JsonpInjection.ql | 64 ++++++++ .../CWE/CWE-352/JsonpInjectionLib.qll | 130 +++++++++++++++ .../CWE/CWE-352/JsonpInjectionServlet1.java | 0 .../CWE/CWE-352/JsonpInjectionServlet2.java | 0 .../Security/CWE/CWE-352/RefererFilter.java | 43 +++++ .../semmle/code/java/frameworks/Servlets.qll | 12 +- .../security/CWE-352/JsonpController.java | 128 +++++++++++++++ .../security/CWE-352/JsonpInjection.expected | 60 ------- .../CWE-352/JsonpInjectionServlet1.java | 64 ++++++++ .../CWE-352/JsonpInjectionServlet2.java} | 16 +- .../CWE-352/JsonpInjection_1.expected | 60 +++++++ .../CWE-352/JsonpInjection_2.expected | 78 +++++++++ .../CWE-352/JsonpInjection_3.expected | 66 ++++++++ .../query-tests/security/CWE-352/Readme | 3 + .../security/CWE-352/RefererFilter.java | 43 +++++ .../gson-2.8.6/com/google/gson/Gson.java | 7 + .../org/springframework/util/StringUtils.java | 8 + .../javax/servlet/Filter.java | 13 ++ .../javax/servlet/FilterChain.java | 8 + .../javax/servlet/FilterConfig.java | 3 + .../javax/servlet/ServletException.java | 8 + .../javax/servlet/ServletRequest.java | 87 ++++++++++ .../javax/servlet/ServletResponse.java | 39 +++++ .../servlet/http/HttpServletRequest.java | 116 +++++++++++++ .../servlet/http/HttpServletResponse.java | 106 ++++++++++++ 32 files changed, 1084 insertions(+), 428 deletions(-) delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll delete mode 100644 java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll rename java/ql/src/{ => experimental}/Security/CWE/CWE-352/JsonStringLib.qll (100%) rename java/ql/{test/experimental/query-tests/security/CWE-352/JsonpInjection.java => src/experimental/Security/CWE/CWE-352/JsonpController.java} (72%) rename java/ql/src/{ => experimental}/Security/CWE/CWE-352/JsonpInjection.java (100%) rename java/ql/src/{ => experimental}/Security/CWE/CWE-352/JsonpInjection.qhelp (96%) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql create mode 100644 java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll rename java/ql/src/{ => experimental}/Security/CWE/CWE-352/JsonpInjectionServlet1.java (100%) rename java/ql/src/{ => experimental}/Security/CWE/CWE-352/JsonpInjectionServlet2.java (100%) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java rename java/ql/{src/Security/CWE/CWE-352/JsonpInjectionServlet.java => test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java} (75%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/Readme create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java create mode 100644 java/ql/test/stubs/gson-2.8.6/com/google/gson/Gson.java create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql deleted file mode 100644 index 53ee6182511b..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.ql +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @name JSONP Injection - * @description User-controlled callback function names that are not verified are vulnerable - * to jsonp injection attacks. - * @kind path-problem - * @problem.severity error - * @precision high - * @id java/JSONP-Injection - * @tags security - * external/cwe/cwe-352 - */ - -import java -import JsonpInjectionLib -import JsonpInjectionFilterLib -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.deadcode.WebEntryPoints -import DataFlow::PathGraph - - -/** If there is a method to verify `token`, `auth`, `referer`, and `origin`, it will not pass. */ -class ServletVerifAuth extends DataFlow::BarrierGuard { - ServletVerifAuth() { - exists(MethodAccess ma, Node prod, Node succ | - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - prod instanceof RemoteFlowSource and - succ.asExpr() = ma.getAnArgument() and - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - localFlowStep*(prod, succ) and - this = ma - ) - } - - override predicate checks(Expr e, boolean branch) { - exists(Node node | - node instanceof JsonpInjectionSink and - e = node.asExpr() and - branch = true - ) - } -} - -/** Taint-tracking configuration tracing flow from get method request sources to output jsonp data. */ -class JsonpInjectionConfig extends TaintTracking::Configuration { - JsonpInjectionConfig() { this = "JsonpInjectionConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof GetHttpRequestSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JsonpInjectionSink } - - override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { - guard instanceof ServletVerifAuth - } - - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(MethodAccess ma | - isRequestGetParamMethod(ma) and pred.asExpr() = ma.getQualifier() and succ.asExpr() = ma - ) - } -} - -from DataFlow::PathNode source, DataFlow::PathNode sink, JsonpInjectionConfig conf -where - not checks() = false and - conf.hasFlowPath(source, sink) and - exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) -select sink.getNode(), source, sink, "Jsonp Injection query might include code from $@.", - source.getNode(), "this user input" diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll deleted file mode 100644 index b349bed26414..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionFilterLib.qll +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @name JSONP Injection - * @description User-controlled callback function names that are not verified are vulnerable - * to json hijacking attacks. - * @kind path-problem - */ - -import java -import DataFlow -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.dataflow.TaintTracking2 -import DataFlow::PathGraph - -class FilterVerifAuth extends DataFlow::BarrierGuard { - FilterVerifAuth() { - exists(MethodAccess ma, Node prod, Node succ | - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - prod instanceof RemoteFlowSource and - succ.asExpr() = ma.getAnArgument() and - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - localFlowStep*(prod, succ) and - this = ma - ) - } - - override predicate checks(Expr e, boolean branch) { - exists(Node node | - node instanceof DoFilterMethodSink and - e = node.asExpr() and - branch = true - ) - } -} - -/** A data flow source for `Filter.doFilter` method paramters. */ -private class DoFilterMethodSource extends DataFlow::Node { - DoFilterMethodSource() { - exists(Method m | - isDoFilterMethod(m) and - m.getAParameter().getAnAccess() = this.asExpr() - ) - } -} - -/** A data flow sink for `FilterChain.doFilter` method qualifying expression. */ -private class DoFilterMethodSink extends DataFlow::Node { - DoFilterMethodSink() { - exists(MethodAccess ma, Method m | ma.getMethod() = m | - m.hasName("doFilter") and - m.getDeclaringType*().hasQualifiedName("javax.servlet", "FilterChain") and - ma.getQualifier() = this.asExpr() - ) - } -} - -/** Taint-tracking configuration tracing flow from `doFilter` method paramter source to output - * `FilterChain.doFilter` method qualifying expression. - * */ -class DoFilterMethodConfig extends TaintTracking::Configuration { - DoFilterMethodConfig() { this = "DoFilterMethodConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof DoFilterMethodSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof DoFilterMethodSink } - - override predicate isSanitizerGuard(DataFlow::BarrierGuard guard) { - guard instanceof FilterVerifAuth - } -} - -/** Implement class modeling verification for `Filter.doFilter`, return false if it fails. */ -boolean checks() { - exists(DataFlow::PathNode source, DataFlow::PathNode sink, DoFilterMethodConfig conf | - conf.hasFlowPath(source, sink) and - result = false - ) -} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll deleted file mode 100644 index 3f7304258232..000000000000 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ /dev/null @@ -1,155 +0,0 @@ -import java -import DataFlow -import JsonStringLib -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.frameworks.spring.SpringController - -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ -private predicate isGetServletMethod(Method m) { - isServletRequestMethod(m) and m.getName() = "doGet" -} - -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ -private predicate isGetSpringControllerMethod(Method m) { - exists(Annotation a | - a = m.getAnAnnotation() and - a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "GetMapping") - ) - or - exists(Annotation a | - a = m.getAnAnnotation() and - a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and - a.getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") - ) -} - -/** Method parameters use the annotation `@RequestParam` or the parameter type is `ServletRequest`, `String`, `Object` */ -predicate checkSpringMethodParameterType(Method m, int i) { - m.getParameter(i).getType() instanceof ServletRequest - or - exists(Parameter p | - p = m.getParameter(i) and - p.hasAnnotation() and - p.getAnAnnotation() - .getType() - .hasQualifiedName("org.springframework.web.bind.annotation", "RequestParam") and - p.getType().getName().regexpMatch("String|Object") - ) - or - exists(Parameter p | - p = m.getParameter(i) and - not p.hasAnnotation() and - p.getType().getName().regexpMatch("String|Object") - ) -} - -/** A data flow source for get method request parameters. */ -abstract class GetHttpRequestSource extends DataFlow::Node { } - -/** A data flow source for servlet get method request parameters. */ -private class ServletGetHttpRequestSource extends GetHttpRequestSource { - ServletGetHttpRequestSource() { - exists(Method m | - isGetServletMethod(m) and - m.getParameter(0).getAnAccess() = this.asExpr() - ) - } -} - -/** A data flow source for spring controller get method request parameters. */ -private class SpringGetHttpRequestSource extends GetHttpRequestSource { - SpringGetHttpRequestSource() { - exists(SpringControllerMethod scm, int i | - isGetSpringControllerMethod(scm) and - checkSpringMethodParameterType(scm, i) and - scm.getParameter(i).getAnAccess() = this.asExpr() - ) - } -} - -/** A data flow sink for unvalidated user input that is used to jsonp. */ -abstract class JsonpInjectionSink extends DataFlow::Node { } - -/** Use ```print```, ```println```, ```write``` to output result. */ -private class WriterPrintln extends JsonpInjectionSink { - WriterPrintln() { - exists(MethodAccess ma | - ma.getMethod().getName().regexpMatch("print|println|write") and - ma.getMethod() - .getDeclaringType() - .getASourceSupertype*() - .hasQualifiedName("java.io", "PrintWriter") and - ma.getArgument(0) = this.asExpr() - ) - } -} - -/** Spring Request Method return result. */ -private class SpringReturn extends JsonpInjectionSink { - SpringReturn() { - exists(ReturnStmt rs, Method m | m = rs.getEnclosingCallable() | - isGetSpringControllerMethod(m) and - rs.getResult() = this.asExpr() - ) - } -} - -/** A concatenate expression using `(` and `)` or `);`. */ -class JsonpInjectionExpr extends AddExpr { - JsonpInjectionExpr() { - getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and - getLeftOperand() - .(AddExpr) - .getLeftOperand() - .(AddExpr) - .getRightOperand() - .toString() - .regexpMatch("\"\\(\"") - } - - /** Get the jsonp function name of this expression */ - Expr getFunctionName() { - result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() - } - - /** Get the json data of this expression */ - Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } -} - -/** A data flow configuration tracing flow from remote sources to jsonp function name. */ -class RemoteFlowConfig extends DataFlow2::Configuration { - RemoteFlowConfig() { this = "RemoteFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { - exists(JsonpInjectionExpr jhe | jhe.getFunctionName() = sink.asExpr()) - } -} - -/** A data flow configuration tracing flow from json data to splicing jsonp data. */ -class JsonDataFlowConfig extends DataFlow2::Configuration { - JsonDataFlowConfig() { this = "JsonDataFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } - - override predicate isSink(DataFlow::Node sink) { - exists(JsonpInjectionExpr jhe | jhe.getJsonExpr() = sink.asExpr()) - } -} - -/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ -class JsonpInjectionFlowConfig extends DataFlow::Configuration { - JsonpInjectionFlowConfig() { this = "JsonpInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(JsonpInjectionExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | - jhe = src.asExpr() and - jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and - rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) - ) - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof JsonpInjectionSink } -} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll similarity index 100% rename from java/ql/src/Security/CWE/CWE-352/JsonStringLib.qll rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java similarity index 72% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java index 9f079513a8b9..84a172a7aebd 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.java +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java @@ -3,17 +3,14 @@ import com.google.gson.Gson; import java.io.PrintWriter; import java.util.HashMap; -import java.util.Random; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @Controller -public class JsonpInjection { +public class JsonpController { private static HashMap hashMap = new HashMap(); static { @@ -96,54 +93,13 @@ public void bad6(HttpServletRequest request, @GetMapping(value = "jsonp7") @ResponseBody - public String good(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - String val = ""; - Random random = new Random(); - for (int i = 0; i < 10; i++) { - val += String.valueOf(random.nextInt(10)); - } - // good - jsonpCallback = jsonpCallback + "_" + val; - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp8") - @ResponseBody public String good1(HttpServletRequest request) { String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); String token = request.getParameter("token"); - // good if (verifToken(token)){ - System.out.println(token); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - return "error"; - } - - @GetMapping(value = "jsonp9") - @ResponseBody - public String good2(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - - String referer = request.getHeader("Referer"); - - boolean result = verifReferer(referer); - - boolean test = result; - // good - if (test){ + String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; return resultStr; diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java similarity index 100% rename from java/ql/src/Security/CWE/CWE-352/JsonpInjection.java rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp similarity index 96% rename from java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index b063b409d3a5..bb5d628ac0b7 100644 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -16,7 +16,7 @@ there is a problem of sensitive information leakage.

    The following example shows the case of no verification processing and verification processing for the external input function name.

    - + diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql new file mode 100644 index 000000000000..f3ae25daa034 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -0,0 +1,64 @@ +/** + * @name JSONP Injection + * @description User-controlled callback function names that are not verified are vulnerable + * to jsonp injection attacks. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/JSONP-Injection + * @tags security + * external/cwe/cwe-352 + */ + +import java +import JsonpInjectionLib +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.deadcode.WebEntryPoints +import semmle.code.java.security.XSS +import DataFlow::PathGraph + +/** Determine whether there is a verification method for the remote streaming source data flow path method. */ +predicate existsFilterVerificationMethod() { + exists(MethodAccess ma,Node existsNode, Method m| + ma.getMethod() instanceof VerificationMethodClass and + existsNode.asExpr() = ma and + m = getAnMethod(existsNode.getEnclosingCallable()) and + isDoFilterMethod(m) + ) +} + +/** Determine whether there is a verification method for the remote streaming source data flow path method. */ +predicate existsServletVerificationMethod(Node checkNode) { + exists(MethodAccess ma,Node existsNode| + ma.getMethod() instanceof VerificationMethodClass and + existsNode.asExpr() = ma and + getAnMethod(existsNode.getEnclosingCallable()) = getAnMethod(checkNode.getEnclosingCallable()) + ) +} + +/** Taint-tracking configuration tracing flow from get method request sources to output jsonp data. */ +class RequestResponseFlowConfig extends TaintTracking::Configuration { + RequestResponseFlowConfig() { this = "RequestResponseFlowConfig" } + + override predicate isSource(DataFlow::Node source) { + source instanceof RemoteFlowSource and + getAnMethod(source.getEnclosingCallable()) instanceof RequestGetMethod + } + + override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(MethodAccess ma | + isRequestGetParamMethod(ma) and pred.asExpr() = ma.getQualifier() and succ.asExpr() = ma + ) + } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, RequestResponseFlowConfig conf +where + not existsServletVerificationMethod(source.getNode()) and + not existsFilterVerificationMethod() and + conf.hasFlowPath(source, sink) and + exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) +select sink.getNode(), source, sink, "Jsonp Injection query might include code from $@.", + source.getNode(), "this user input" \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll new file mode 100644 index 000000000000..b8964524a9f8 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -0,0 +1,130 @@ +import java +import DataFlow +import JsonStringLib +import semmle.code.java.security.XSS +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.frameworks.spring.SpringController + +/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +class VerificationMethodFlowConfig extends TaintTracking::Configuration { + VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma, BarrierGuard bg | + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and + bg = ma and + sink.asExpr() = ma.getAnArgument() + ) + } +} + +/** The parameter name of the method is `token`, `auth`, `referer`, `origin`. */ +class VerificationMethodClass extends Method { + VerificationMethodClass() { + exists(MethodAccess ma, BarrierGuard bg, VerificationMethodFlowConfig vmfc, Node node | + this = ma.getMethod() and + this.getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and + bg = ma and + node.asExpr() = ma.getAnArgument() and + vmfc.hasFlowTo(node) + ) + } +} + +/** Get Callable by recursive method. */ +Callable getAnMethod(Callable call) { + result = call + or + result = getAnMethod(call.getAReference().getEnclosingCallable()) +} + +abstract class RequestGetMethod extends Method { } + +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +private class ServletGetMethod extends RequestGetMethod { + ServletGetMethod() { + exists(Method m | + m = this and + isServletRequestMethod(m) and + m.getName() = "doGet" + ) + } +} + +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +private class SpringControllerGetMethod extends RequestGetMethod { + SpringControllerGetMethod() { + exists(Annotation a | + a = this.getAnAnnotation() and + a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "GetMapping") + ) + or + exists(Annotation a | + a = this.getAnAnnotation() and + a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and + a.getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") + ) + } +} + +/** A concatenate expression using `(` and `)` or `);`. */ +class JsonpInjectionExpr extends AddExpr { + JsonpInjectionExpr() { + getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and + getLeftOperand() + .(AddExpr) + .getLeftOperand() + .(AddExpr) + .getRightOperand() + .toString() + .regexpMatch("\"\\(\"") + } + + /** Get the jsonp function name of this expression */ + Expr getFunctionName() { + result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() + } + + /** Get the json data of this expression */ + Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } +} + +/** A data flow configuration tracing flow from remote sources to jsonp function name. */ +class RemoteFlowConfig extends DataFlow2::Configuration { + RemoteFlowConfig() { this = "RemoteFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonpInjectionExpr jhe | jhe.getFunctionName() = sink.asExpr()) + } +} + +/** A data flow configuration tracing flow from json data to splicing jsonp data. */ +class JsonDataFlowConfig extends DataFlow2::Configuration { + JsonDataFlowConfig() { this = "JsonDataFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } + + override predicate isSink(DataFlow::Node sink) { + exists(JsonpInjectionExpr jhe | jhe.getJsonExpr() = sink.asExpr()) + } +} + +/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +class JsonpInjectionFlowConfig extends TaintTracking::Configuration { + JsonpInjectionFlowConfig() { this = "JsonpInjectionFlowConfig" } + + override predicate isSource(DataFlow::Node src) { + exists(JsonpInjectionExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | + jhe = src.asExpr() and + jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and + rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) + ) + } + + override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet1.java similarity index 100% rename from java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet1.java rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet1.java diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet2.java similarity index 100% rename from java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet2.java rename to java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet2.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java b/java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java new file mode 100644 index 000000000000..97444932ae17 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java @@ -0,0 +1,43 @@ +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.util.StringUtils; + +public class RefererFilter implements Filter { + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + HttpServletRequest request = (HttpServletRequest) servletRequest; + HttpServletResponse response = (HttpServletResponse) servletResponse; + String refefer = request.getHeader("Referer"); + boolean result = verifReferer(refefer); + if (result){ + filterChain.doFilter(servletRequest, servletResponse); + } + response.sendError(444, "Referer xxx."); + } + + @Override + public void destroy() { + } + + public static boolean verifReferer(String referer){ + if (StringUtils.isEmpty(referer)){ + return false; + } + if (referer.startsWith("http://www.baidu.com/")){ + return true; + } + return false; + } +} diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index b2054dc30cb7..5cccf62122ff 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -338,7 +338,6 @@ predicate isRequestGetParamMethod(MethodAccess ma) { ma.getMethod() instanceof HttpServletRequestGetQueryStringMethod } - /** * A class that has `javax.servlet.Filter` as an ancestor. */ @@ -346,21 +345,18 @@ class FilterClass extends Class { FilterClass() { getAnAncestor().hasQualifiedName("javax.servlet", "Filter") } } - /** * The interface `javax.servlet.FilterChain` */ -class FilterChain extends RefType { - FilterChain() { - hasQualifiedName("javax.servlet", "FilterChain") - } +class FilterChain extends Interface { + FilterChain() { hasQualifiedName("javax.servlet", "FilterChain") } } -/** Holds if `m` is a request handler method (for example `doGet` or `doPost`). */ +/** Holds if `m` is a filter handler method (for example `doFilter`). */ predicate isDoFilterMethod(Method m) { m.getDeclaringType() instanceof FilterClass and m.getNumberOfParameters() = 3 and m.getParameter(0).getType() instanceof ServletRequest and m.getParameter(1).getType() instanceof ServletResponse and m.getParameter(2).getType() instanceof FilterChain -} \ No newline at end of file +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java new file mode 100644 index 000000000000..cf860c756409 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java @@ -0,0 +1,128 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class JsonpController { + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + + @GetMapping(value = "jsonp1", produces="text/javascript") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp7") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + + String token = request.getParameter("token"); + + if (verifToken(token)){ + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + return "error"; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } + + public static boolean verifToken(String token){ + if (token != "xxxx"){ + return false; + } + return true; + } + + public static boolean verifReferer(String referer){ + if (!referer.startsWith("http://test.com/")){ + return false; + } + return true; + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected deleted file mode 100644 index 7e3069cf1d93..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected +++ /dev/null @@ -1,60 +0,0 @@ -edges -| JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | JsonpInjection.java:34:16:34:24 | resultStr | -| JsonpInjection.java:33:21:33:54 | ... + ... : String | JsonpInjection.java:34:16:34:24 | resultStr | -| JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | JsonpInjection.java:45:16:45:24 | resultStr | -| JsonpInjection.java:43:21:43:80 | ... + ... : String | JsonpInjection.java:45:16:45:24 | resultStr | -| JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | JsonpInjection.java:55:16:55:24 | resultStr | -| JsonpInjection.java:54:21:54:55 | ... + ... : String | JsonpInjection.java:55:16:55:24 | resultStr | -| JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | JsonpInjection.java:65:16:65:24 | resultStr | -| JsonpInjection.java:64:21:64:54 | ... + ... : String | JsonpInjection.java:65:16:65:24 | resultStr | -| JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | JsonpInjection.java:80:20:80:28 | resultStr | -| JsonpInjection.java:79:21:79:54 | ... + ... : String | JsonpInjection.java:80:20:80:28 | resultStr | -| JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | JsonpInjection.java:94:20:94:28 | resultStr | -| JsonpInjection.java:93:21:93:54 | ... + ... : String | JsonpInjection.java:94:20:94:28 | resultStr | -| JsonpInjection.java:101:32:101:38 | request : HttpServletRequest | JsonpInjection.java:112:16:112:24 | resultStr | -| JsonpInjection.java:127:25:127:59 | ... + ... : String | JsonpInjection.java:128:20:128:28 | resultStr | -| JsonpInjection.java:148:25:148:59 | ... + ... : String | JsonpInjection.java:149:20:149:28 | resultStr | -nodes -| JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:33:21:33:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:34:16:34:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:34:16:34:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:43:21:43:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:45:16:45:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:45:16:45:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:54:21:54:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:55:16:55:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:55:16:55:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:64:21:64:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:65:16:65:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:65:16:65:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:101:32:101:38 | request : HttpServletRequest | semmle.label | request : HttpServletRequest | -| JsonpInjection.java:112:16:112:24 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:127:25:127:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:128:20:128:28 | resultStr | semmle.label | resultStr | -| JsonpInjection.java:148:25:148:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjection.java:149:20:149:28 | resultStr | semmle.label | resultStr | -#select -| JsonpInjection.java:34:16:34:24 | resultStr | JsonpInjection.java:29:32:29:38 | request : HttpServletRequest | JsonpInjection.java:34:16:34:24 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:29:32:29:38 | request | this user input | -| JsonpInjection.java:45:16:45:24 | resultStr | JsonpInjection.java:41:32:41:38 | request : HttpServletRequest | JsonpInjection.java:45:16:45:24 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:41:32:41:38 | request | this user input | -| JsonpInjection.java:55:16:55:24 | resultStr | JsonpInjection.java:52:32:52:38 | request : HttpServletRequest | JsonpInjection.java:55:16:55:24 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:52:32:52:38 | request | this user input | -| JsonpInjection.java:65:16:65:24 | resultStr | JsonpInjection.java:62:32:62:38 | request : HttpServletRequest | JsonpInjection.java:65:16:65:24 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:62:32:62:38 | request | this user input | -| JsonpInjection.java:80:20:80:28 | resultStr | JsonpInjection.java:72:32:72:38 | request : HttpServletRequest | JsonpInjection.java:80:20:80:28 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:72:32:72:38 | request | this user input | -| JsonpInjection.java:94:20:94:28 | resultStr | JsonpInjection.java:87:32:87:38 | request : HttpServletRequest | JsonpInjection.java:94:20:94:28 | -resultStr | Jsonp Injection query might include code from $@. | JsonpInjection.java:87:32:87:38 | request | this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java new file mode 100644 index 000000000000..14ef76275b1d --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java @@ -0,0 +1,64 @@ +import com.google.gson.Gson; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JsonpInjectionServlet1 extends HttpServlet { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + private static final long serialVersionUID = 1L; + + private String key = "test"; + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.setContentType("application/json"); + String jsonpCallback = req.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String jsonResult = gson.toJson(hashMap); + + String referer = req.getHeader("Referer"); + + boolean result = verifReferer(referer); + + // good + if (result){ + String resultStr = null; + pw = resp.getWriter(); + resultStr = jsonpCallback + "(" + jsonResult + ")"; + pw.println(resultStr); + pw.flush(); + } + } + + public static boolean verifReferer(String referer){ + if (!referer.startsWith("http://test.com/")){ + return false; + } + return true; + } + + @Override + public void init(ServletConfig config) throws ServletException { + this.key = config.getInitParameter("key"); + System.out.println("åˆå§‹åŒ–" + this.key); + super.init(config); + } + +} diff --git a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java similarity index 75% rename from java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java index 916cd9bf676e..bbfbc2dc4360 100644 --- a/java/ql/src/Security/CWE/CWE-352/JsonpInjectionServlet.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java @@ -4,12 +4,11 @@ import java.util.HashMap; import javax.servlet.ServletConfig; import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -public class JsonpInjectionServlet extends HttpServlet { +public class JsonpInjectionServlet2 extends HttpServlet { private static HashMap hashMap = new HashMap(); @@ -23,21 +22,12 @@ public class JsonpInjectionServlet extends HttpServlet { private String key = "test"; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - String jsonpCallback = req.getParameter("jsonpCallback"); - - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - - String resultStr = null; - pw = resp.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - pw.flush(); + doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.setContentType("application/json"); String jsonpCallback = req.getParameter("jsonpCallback"); PrintWriter pw = null; Gson gson = new Gson(); diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected new file mode 100644 index 000000000000..a89d03b67a7b --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected @@ -0,0 +1,60 @@ +edges +| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | +| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | +nodes +| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:101:24:101:28 | token | semmle.label | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +#select +| JsonpController.java:31:16:31:24 | resultStr | JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:26:32:26:68 | getParameter(...) | this user input | +| JsonpController.java:42:16:42:24 | resultStr | JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:38:32:38:68 | getParameter(...) | this user input | +| JsonpController.java:52:16:52:24 | resultStr | JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:49:32:49:68 | getParameter(...) | this user input | +| JsonpController.java:62:16:62:24 | resultStr | JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:59:32:59:68 | getParameter(...) | this user input | +| JsonpController.java:77:20:77:28 | resultStr | JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:69:32:69:68 | getParameter(...) | this user input | +| JsonpController.java:91:20:91:28 | resultStr | JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:84:32:84:68 | getParameter(...) | this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected new file mode 100644 index 000000000000..4b12308a212d --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected @@ -0,0 +1,78 @@ +edges +| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | +| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +nodes +| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:101:24:101:28 | token | semmle.label | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +#select +| JsonpController.java:31:16:31:24 | resultStr | JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:26:32:26:68 | getParameter(...) | this user input | +| JsonpController.java:42:16:42:24 | resultStr | JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:38:32:38:68 | getParameter(...) | this user input | +| JsonpController.java:52:16:52:24 | resultStr | JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:49:32:49:68 | getParameter(...) | this user input | +| JsonpController.java:62:16:62:24 | resultStr | JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:59:32:59:68 | getParameter(...) | this user input | +| JsonpController.java:77:20:77:28 | resultStr | JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:69:32:69:68 | getParameter(...) | this user input | +| JsonpController.java:91:20:91:28 | resultStr | JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | + resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:84:32:84:68 | getParameter(...) | this user input | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServle +t2.java:39:20:39:28 | resultStr | Jsonp Injection query might include code from $@. | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) | + this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected new file mode 100644 index 000000000000..8e33ca6984c6 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected @@ -0,0 +1,66 @@ +edges +| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | +| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| RefererFilter.java:22:26:22:53 | getHeader(...) : String | RefererFilter.java:23:39:23:45 | refefer | +nodes +| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:101:24:101:28 | token | semmle.label | token | +| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| RefererFilter.java:22:26:22:53 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| RefererFilter.java:23:39:23:45 | refefer | semmle.label | refefer | +#select \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/Readme b/java/ql/test/experimental/query-tests/security/CWE-352/Readme new file mode 100644 index 000000000000..15715d6187c9 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/Readme @@ -0,0 +1,3 @@ +1. The JsonpInjection_1.expected result is obtained through the test of `JsonpController.java`. +2. The JsonpInjection_2.expected result is obtained through the test of `JsonpController.java`, `JsonpInjectionServlet1.java`, `JsonpInjectionServlet2.java`. +3. The JsonpInjection_3.expected result is obtained through the test of `JsonpController.java`, `JsonpInjectionServlet1.java`, `JsonpInjectionServlet2.java`, `RefererFilter.java`. \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java b/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java new file mode 100644 index 000000000000..97444932ae17 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java @@ -0,0 +1,43 @@ +import java.io.IOException; +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.util.StringUtils; + +public class RefererFilter implements Filter { + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + HttpServletRequest request = (HttpServletRequest) servletRequest; + HttpServletResponse response = (HttpServletResponse) servletResponse; + String refefer = request.getHeader("Referer"); + boolean result = verifReferer(refefer); + if (result){ + filterChain.doFilter(servletRequest, servletResponse); + } + response.sendError(444, "Referer xxx."); + } + + @Override + public void destroy() { + } + + public static boolean verifReferer(String referer){ + if (StringUtils.isEmpty(referer)){ + return false; + } + if (referer.startsWith("http://www.baidu.com/")){ + return true; + } + return false; + } +} diff --git a/java/ql/test/stubs/gson-2.8.6/com/google/gson/Gson.java b/java/ql/test/stubs/gson-2.8.6/com/google/gson/Gson.java new file mode 100644 index 000000000000..bbe53dc2a5f6 --- /dev/null +++ b/java/ql/test/stubs/gson-2.8.6/com/google/gson/Gson.java @@ -0,0 +1,7 @@ +package com.google.gson; + +public final class Gson { + public String toJson(Object src) { + return null; + } +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java new file mode 100644 index 000000000000..6ee07f84593f --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java @@ -0,0 +1,8 @@ +package org.springframework.util; + +public abstract class StringUtils { + + public static boolean isEmpty(Object str) { + return str == null || "".equals(str); + } +} \ No newline at end of file diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java new file mode 100644 index 000000000000..5833e3c909da --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java @@ -0,0 +1,13 @@ +package javax.servlet; + +import java.io.IOException; + +public interface Filter { + default void init(FilterConfig filterConfig) throws ServletException { + } + + void doFilter(ServletRequest var1, ServletResponse var2, FilterChain var3) throws IOException, ServletException; + + default void destroy() { + } +} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java new file mode 100644 index 000000000000..6a1dfc588b6a --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java @@ -0,0 +1,8 @@ +package javax.servlet; + +import java.io.IOException; + +public interface FilterChain { + void doFilter(ServletRequest var1, ServletResponse var2) throws IOException, ServletException; +} + diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java new file mode 100644 index 000000000000..66c13eb54f0b --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java @@ -0,0 +1,3 @@ +package javax.servlet; + +public interface FilterConfig {} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java new file mode 100644 index 000000000000..ce5f7c4465ae --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java @@ -0,0 +1,8 @@ +package javax.servlet; + +public class ServletException extends Exception { + private static final long serialVersionUID = 1L; + + public ServletException() { + } +} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java new file mode 100644 index 000000000000..4ee0026d0668 --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java @@ -0,0 +1,87 @@ +package javax.servlet; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.Enumeration; +import java.util.Locale; +import java.util.Map; + +public interface ServletRequest { + Object getAttribute(String var1); + + Enumeration getAttributeNames(); + + String getCharacterEncoding(); + + void setCharacterEncoding(String var1) throws UnsupportedEncodingException; + + int getContentLength(); + + long getContentLengthLong(); + + String getContentType(); + + ServletInputStream getInputStream() throws IOException; + + String getParameter(String var1); + + Enumeration getParameterNames(); + + String[] getParameterValues(String var1); + + Map getParameterMap(); + + String getProtocol(); + + String getScheme(); + + String getServerName(); + + int getServerPort(); + + BufferedReader getReader() throws IOException; + + String getRemoteAddr(); + + String getRemoteHost(); + + void setAttribute(String var1, Object var2); + + void removeAttribute(String var1); + + Locale getLocale(); + + Enumeration getLocales(); + + boolean isSecure(); + + RequestDispatcher getRequestDispatcher(String var1); + + /** @deprecated */ + @Deprecated + String getRealPath(String var1); + + int getRemotePort(); + + String getLocalName(); + + String getLocalAddr(); + + int getLocalPort(); + + ServletContext getServletContext(); + + AsyncContext startAsync() throws IllegalStateException; + + AsyncContext startAsync(ServletRequest var1, ServletResponse var2) throws IllegalStateException; + + boolean isAsyncStarted(); + + boolean isAsyncSupported(); + + AsyncContext getAsyncContext(); + + DispatcherType getDispatcherType(); +} + diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java new file mode 100644 index 000000000000..0aa6121e686d --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java @@ -0,0 +1,39 @@ +package javax.servlet; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Locale; + +public interface ServletResponse { + String getCharacterEncoding(); + + String getContentType(); + + ServletOutputStream getOutputStream() throws IOException; + + PrintWriter getWriter() throws IOException; + + void setCharacterEncoding(String var1); + + void setContentLength(int var1); + + void setContentLengthLong(long var1); + + void setContentType(String var1); + + void setBufferSize(int var1); + + int getBufferSize(); + + void flushBuffer() throws IOException; + + void resetBuffer(); + + boolean isCommitted(); + + void reset(); + + void setLocale(Locale var1); + + Locale getLocale(); +} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java new file mode 100644 index 000000000000..02d53a96a333 --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java @@ -0,0 +1,116 @@ +package javax.servlet.http; + +import java.io.IOException; +import java.security.Principal; +import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.Map; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; + +public interface HttpServletRequest extends ServletRequest { + String BASIC_AUTH = "BASIC"; + String FORM_AUTH = "FORM"; + String CLIENT_CERT_AUTH = "CLIENT_CERT"; + String DIGEST_AUTH = "DIGEST"; + + String getAuthType(); + + Cookie[] getCookies(); + + long getDateHeader(String var1); + + String getHeader(String var1); + + Enumeration getHeaders(String var1); + + Enumeration getHeaderNames(); + + int getIntHeader(String var1); + + default HttpServletMapping getHttpServletMapping() { + return new HttpServletMapping() { + public String getMatchValue() { + return ""; + } + + public String getPattern() { + return ""; + } + + public String getServletName() { + return ""; + } + + public MappingMatch getMappingMatch() { + return null; + } + }; + } + + String getMethod(); + + String getPathInfo(); + + String getPathTranslated(); + + default PushBuilder newPushBuilder() { + return null; + } + + String getContextPath(); + + String getQueryString(); + + String getRemoteUser(); + + boolean isUserInRole(String var1); + + Principal getUserPrincipal(); + + String getRequestedSessionId(); + + String getRequestURI(); + + StringBuffer getRequestURL(); + + String getServletPath(); + + HttpSession getSession(boolean var1); + + HttpSession getSession(); + + String changeSessionId(); + + boolean isRequestedSessionIdValid(); + + boolean isRequestedSessionIdFromCookie(); + + boolean isRequestedSessionIdFromURL(); + + /** @deprecated */ + @Deprecated + boolean isRequestedSessionIdFromUrl(); + + boolean authenticate(HttpServletResponse var1) throws IOException, ServletException; + + void login(String var1, String var2) throws ServletException; + + void logout() throws ServletException; + + Collection getParts() throws IOException, ServletException; + + Part getPart(String var1) throws IOException, ServletException; + + T upgrade(Class var1) throws IOException, ServletException; + + default Map getTrailerFields() { + return Collections.emptyMap(); + } + + default boolean isTrailerFieldsReady() { + return false; + } +} + diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java new file mode 100644 index 000000000000..0a2c6af0913c --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java @@ -0,0 +1,106 @@ +package javax.servlet.http; + +import java.io.IOException; +import java.util.Collection; +import java.util.Map; +import java.util.function.Supplier; +import javax.servlet.ServletResponse; + +public interface HttpServletResponse extends ServletResponse { + int SC_CONTINUE = 100; + int SC_SWITCHING_PROTOCOLS = 101; + int SC_OK = 200; + int SC_CREATED = 201; + int SC_ACCEPTED = 202; + int SC_NON_AUTHORITATIVE_INFORMATION = 203; + int SC_NO_CONTENT = 204; + int SC_RESET_CONTENT = 205; + int SC_PARTIAL_CONTENT = 206; + int SC_MULTIPLE_CHOICES = 300; + int SC_MOVED_PERMANENTLY = 301; + int SC_MOVED_TEMPORARILY = 302; + int SC_FOUND = 302; + int SC_SEE_OTHER = 303; + int SC_NOT_MODIFIED = 304; + int SC_USE_PROXY = 305; + int SC_TEMPORARY_REDIRECT = 307; + int SC_BAD_REQUEST = 400; + int SC_UNAUTHORIZED = 401; + int SC_PAYMENT_REQUIRED = 402; + int SC_FORBIDDEN = 403; + int SC_NOT_FOUND = 404; + int SC_METHOD_NOT_ALLOWED = 405; + int SC_NOT_ACCEPTABLE = 406; + int SC_PROXY_AUTHENTICATION_REQUIRED = 407; + int SC_REQUEST_TIMEOUT = 408; + int SC_CONFLICT = 409; + int SC_GONE = 410; + int SC_LENGTH_REQUIRED = 411; + int SC_PRECONDITION_FAILED = 412; + int SC_REQUEST_ENTITY_TOO_LARGE = 413; + int SC_REQUEST_URI_TOO_LONG = 414; + int SC_UNSUPPORTED_MEDIA_TYPE = 415; + int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; + int SC_EXPECTATION_FAILED = 417; + int SC_INTERNAL_SERVER_ERROR = 500; + int SC_NOT_IMPLEMENTED = 501; + int SC_BAD_GATEWAY = 502; + int SC_SERVICE_UNAVAILABLE = 503; + int SC_GATEWAY_TIMEOUT = 504; + int SC_HTTP_VERSION_NOT_SUPPORTED = 505; + + void addCookie(Cookie var1); + + boolean containsHeader(String var1); + + String encodeURL(String var1); + + String encodeRedirectURL(String var1); + + /** @deprecated */ + @Deprecated + String encodeUrl(String var1); + + /** @deprecated */ + @Deprecated + String encodeRedirectUrl(String var1); + + void sendError(int var1, String var2) throws IOException; + + void sendError(int var1) throws IOException; + + void sendRedirect(String var1) throws IOException; + + void setDateHeader(String var1, long var2); + + void addDateHeader(String var1, long var2); + + void setHeader(String var1, String var2); + + void addHeader(String var1, String var2); + + void setIntHeader(String var1, int var2); + + void addIntHeader(String var1, int var2); + + void setStatus(int var1); + + /** @deprecated */ + @Deprecated + void setStatus(int var1, String var2); + + int getStatus(); + + String getHeader(String var1); + + Collection getHeaders(String var1); + + Collection getHeaderNames(); + + default void setTrailerFields(Supplier> supplier) { + } + + default Supplier> getTrailerFields() { + return null; + } +} From 7d556b354de8cec425caab93fcdd9db0a1ac5ffc Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 5 Mar 2021 09:16:35 +0100 Subject: [PATCH 0022/1662] Python: Update test annotation and expectation --- .../test/query-tests/Security/CWE-327/InsecureProtocol.expected | 2 ++ python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index afd9cc15d9f4..f4202a4634d5 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -38,3 +38,5 @@ | ssl_fluent.py:124:14:124:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:122:5:122:11 | ControlFlowNode for context | context modification | | ssl_fluent.py:173:14:173:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:170:5:170:11 | ControlFlowNode for context | context modification | | ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:189:5:189:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index ab65e3bd2068..577f342765ee 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -189,5 +189,5 @@ def test_fluent_explicitly_unsafe(): context.options &= ~ssl.OP_NO_SSLv3 with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: # SSLv3 not flagged here + with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) From 9b8056371fe5c17fdcf70c43a815ee6941cb4fa9 Mon Sep 17 00:00:00 2001 From: Taus Brock-Nannestad Date: Fri, 12 Mar 2021 13:51:24 +0100 Subject: [PATCH 0023/1662] Python: Make the type tracking implementation shareable --- .../experimental/typetracking/TypeTracker.qll | 393 ++++++++++++++++++ .../typetracking/TypeTrackerPrivate.qll | 95 +++++ 2 files changed, 488 insertions(+) create mode 100644 python/ql/src/experimental/typetracking/TypeTracker.qll create mode 100644 python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll diff --git a/python/ql/src/experimental/typetracking/TypeTracker.qll b/python/ql/src/experimental/typetracking/TypeTracker.qll new file mode 100644 index 000000000000..9ef29f46205c --- /dev/null +++ b/python/ql/src/experimental/typetracking/TypeTracker.qll @@ -0,0 +1,393 @@ +/** Step Summaries and Type Tracking */ + +private import TypeTrackerPrivate + +/** Any string that may appear as the name of a piece of content. */ +class ContentName extends string { + ContentName() { this = getPossibleContentName() } +} + +/** Either a content name, or the empty string (representing no content). */ +class OptionalContentName extends string { + OptionalContentName() { this instanceof ContentName or this = "" } +} + +/** + * A description of a step on an inter-procedural data flow path. + */ +private newtype TStepSummary = + LevelStep() or + CallStep() or + ReturnStep() or + StoreStep(ContentName content) or + LoadStep(ContentName content) + +/** + * INTERNAL: Use `TypeTracker` or `TypeBackTracker` instead. + * + * A description of a step on an inter-procedural data flow path. + */ +class StepSummary extends TStepSummary { + /** Gets a textual representation of this step summary. */ + string toString() { + this instanceof LevelStep and result = "level" + or + this instanceof CallStep and result = "call" + or + this instanceof ReturnStep and result = "return" + or + exists(string content | this = StoreStep(content) | result = "store " + content) + or + exists(string content | this = LoadStep(content) | result = "load " + content) + } +} + +/** Provides predicates for updating step summaries (`StepSummary`s). */ +module StepSummary { + /** + * Gets the summary that corresponds to having taken a forwards + * heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. + */ + cached + predicate step(LocalSourceNode nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { + exists(Node mid | nodeFrom.flowsTo(mid) and smallstep(mid, nodeTo, summary)) + } + + /** + * Gets the summary that corresponds to having taken a forwards + * local, heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. + * + * Unlike `StepSummary::step`, this predicate does not compress + * type-preserving steps. + */ + predicate smallstep(Node nodeFrom, Node nodeTo, StepSummary summary) { + typePreservingStep(nodeFrom, nodeTo) and + summary = LevelStep() + or + callStep(nodeFrom, nodeTo) and summary = CallStep() + or + returnStep(nodeFrom, nodeTo) and + summary = ReturnStep() + or + exists(string content | + basicStoreStep(nodeFrom, nodeTo, content) and + summary = StoreStep(content) + or + basicLoadStep(nodeFrom, nodeTo, content) and summary = LoadStep(content) + ) + } +} + +/** Holds if it's reasonable to expect the data flow step from `nodeFrom` to `nodeTo` to preserve types. */ +private predicate typePreservingStep(Node nodeFrom, Node nodeTo) { + simpleLocalFlowStep(nodeFrom, nodeTo) or + jumpStep(nodeFrom, nodeTo) +} + +/** + * A utility class that is equivalent to `boolean` but does not require type joining. + */ +private class Boolean extends boolean { + Boolean() { this = true or this = false } +} + +private newtype TTypeTracker = MkTypeTracker(Boolean hasCall, OptionalContentName content) + +/** + * Summary of the steps needed to track a value to a given dataflow node. + * + * This can be used to track objects that implement a certain API in order to + * recognize calls to that API. Note that type-tracking does not by itself provide a + * source/sink relation, that is, it may determine that a node has a given type, + * but it won't determine where that type came from. + * + * It is recommended that all uses of this type are written in the following form, + * for tracking some type `myType`: + * ``` + * DataFlow::LocalSourceNode myType(DataFlow::TypeTracker t) { + * t.start() and + * result = < source of myType > + * or + * exists (DataFlow::TypeTracker t2 | + * result = myType(t2).track(t2, t) + * ) + * } + * + * DataFlow::Node myType() { myType(DataFlow::TypeTracker::end()).flowsTo(result) } + * ``` + * + * Instead of `result = myType(t2).track(t2, t)`, you can also use the equivalent + * `t = t2.step(myType(t2), result)`. If you additionally want to track individual + * intra-procedural steps, use `t = t2.smallstep(myCallback(t2), result)`. + */ +class TypeTracker extends TTypeTracker { + Boolean hasCall; + OptionalContentName content; + + TypeTracker() { this = MkTypeTracker(hasCall, content) } + + /** Gets the summary resulting from appending `step` to this type-tracking summary. */ + cached + TypeTracker append(StepSummary step) { + step = LevelStep() and result = this + or + step = CallStep() and result = MkTypeTracker(true, content) + or + step = ReturnStep() and hasCall = false and result = this + or + step = LoadStep(content) and result = MkTypeTracker(hasCall, "") + or + exists(string p | step = StoreStep(p) and content = "" and result = MkTypeTracker(hasCall, p)) + } + + /** Gets a textual representation of this summary. */ + string toString() { + exists(string withCall, string withContent | + (if hasCall = true then withCall = "with" else withCall = "without") and + (if content != "" then withContent = " with content " + content else withContent = "") and + result = "type tracker " + withCall + " call steps" + withContent + ) + } + + /** + * Holds if this is the starting point of type tracking. + */ + predicate start() { hasCall = false and content = "" } + + /** + * Holds if this is the starting point of type tracking, and the value starts in the content named `contentName`. + * The type tracking only ends after the content has been loaded. + */ + predicate startInContent(ContentName contentName) { hasCall = false and content = contentName } + + /** + * Holds if this is the starting point of type tracking + * when tracking a parameter into a call, but not out of it. + */ + predicate call() { hasCall = true and content = "" } + + /** + * Holds if this is the end point of type tracking. + */ + predicate end() { content = "" } + + /** + * INTERNAL. DO NOT USE. + * + * Holds if this type has been tracked into a call. + */ + boolean hasCall() { result = hasCall } + + /** + * INTERNAL. DO NOT USE. + * + * Gets the content associated with this type tracker. + */ + string getContent() { result = content } + + /** + * Gets a type tracker that starts where this one has left off to allow continued + * tracking. + * + * This predicate is only defined if the type is not associated to a piece of content. + */ + TypeTracker continue() { content = "" and result = this } + + /** + * Gets the summary that corresponds to having taken a forwards + * heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. + */ + pragma[inline] + TypeTracker step(LocalSourceNode nodeFrom, Node nodeTo) { + exists(StepSummary summary | + StepSummary::step(nodeFrom, nodeTo, summary) and + result = this.append(summary) + ) + } + + /** + * Gets the summary that corresponds to having taken a forwards + * local, heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. + * + * Unlike `TypeTracker::step`, this predicate exposes all edges + * in the flow graph, and not just the edges between `Node`s. + * It may therefore be less performant. + * + * Type tracking predicates using small steps typically take the following form: + * ```ql + * DataFlow::Node myType(DataFlow::TypeTracker t) { + * t.start() and + * result = < source of myType > + * or + * exists (DataFlow::TypeTracker t2 | + * t = t2.smallstep(myType(t2), result) + * ) + * } + * + * DataFlow::Node myType() { + * result = myType(DataFlow::TypeTracker::end()) + * } + * ``` + */ + pragma[inline] + TypeTracker smallstep(Node nodeFrom, Node nodeTo) { + exists(StepSummary summary | + StepSummary::smallstep(nodeFrom, nodeTo, summary) and + result = this.append(summary) + ) + or + typePreservingStep(nodeFrom, nodeTo) and + result = this + } +} + +/** Provides predicates for implementing custom `TypeTracker`s. */ +module TypeTracker { + /** + * Gets a valid end point of type tracking. + */ + TypeTracker end() { result.end() } +} + +private newtype TTypeBackTracker = MkTypeBackTracker(Boolean hasReturn, OptionalContentName content) + +/** + * Summary of the steps needed to back-track a use of a value to a given dataflow node. + * + * This can for example be used to track callbacks that are passed to a certain API, + * so we can model specific parameters of that callback as having a certain type. + * + * Note that type back-tracking does not provide a source/sink relation, that is, + * it may determine that a node will be used in an API call somewhere, but it won't + * determine exactly where that use was, or the path that led to the use. + * + * It is recommended that all uses of this type are written in the following form, + * for back-tracking some callback type `myCallback`: + * + * ``` + * DataFlow::LocalSourceNode myCallback(DataFlow::TypeBackTracker t) { + * t.start() and + * result = (< some API call >).getArgument(< n >).getALocalSource() + * or + * exists (DataFlow::TypeBackTracker t2 | + * result = myCallback(t2).backtrack(t2, t) + * ) + * } + * + * DataFlow::LocalSourceNode myCallback() { result = myCallback(DataFlow::TypeBackTracker::end()) } + * ``` + * + * Instead of `result = myCallback(t2).backtrack(t2, t)`, you can also use the equivalent + * `t2 = t.step(result, myCallback(t2))`. If you additionally want to track individual + * intra-procedural steps, use `t2 = t.smallstep(result, myCallback(t2))`. + */ +class TypeBackTracker extends TTypeBackTracker { + Boolean hasReturn; + string content; + + TypeBackTracker() { this = MkTypeBackTracker(hasReturn, content) } + + /** Gets the summary resulting from prepending `step` to this type-tracking summary. */ + TypeBackTracker prepend(StepSummary step) { + step = LevelStep() and result = this + or + step = CallStep() and hasReturn = false and result = this + or + step = ReturnStep() and result = MkTypeBackTracker(true, content) + or + exists(string p | + step = LoadStep(p) and content = "" and result = MkTypeBackTracker(hasReturn, p) + ) + or + step = StoreStep(content) and result = MkTypeBackTracker(hasReturn, "") + } + + /** Gets a textual representation of this summary. */ + string toString() { + exists(string withReturn, string withContent | + (if hasReturn = true then withReturn = "with" else withReturn = "without") and + (if content != "" then withContent = " with content " + content else withContent = "") and + result = "type back-tracker " + withReturn + " return steps" + withContent + ) + } + + /** + * Holds if this is the starting point of type tracking. + */ + predicate start() { hasReturn = false and content = "" } + + /** + * Holds if this is the end point of type tracking. + */ + predicate end() { content = "" } + + /** + * INTERNAL. DO NOT USE. + * + * Holds if this type has been back-tracked into a call through return edge. + */ + boolean hasReturn() { result = hasReturn } + + /** + * Gets a type tracker that starts where this one has left off to allow continued + * tracking. + * + * This predicate is only defined if the type has not been tracked into a piece of content. + */ + TypeBackTracker continue() { content = "" and result = this } + + /** + * Gets the summary that corresponds to having taken a backwards + * heap and/or inter-procedural step from `nodeTo` to `nodeFrom`. + */ + pragma[inline] + TypeBackTracker step(LocalSourceNode nodeFrom, LocalSourceNode nodeTo) { + exists(StepSummary summary | + StepSummary::step(nodeFrom, nodeTo, summary) and + this = result.prepend(summary) + ) + } + + /** + * Gets the summary that corresponds to having taken a backwards + * local, heap and/or inter-procedural step from `nodeTo` to `nodeFrom`. + * + * Unlike `TypeBackTracker::step`, this predicate exposes all edges + * in the flowgraph, and not just the edges between + * `LocalSourceNode`s. It may therefore be less performant. + * + * Type tracking predicates using small steps typically take the following form: + * ```ql + * DataFlow::Node myType(DataFlow::TypeBackTracker t) { + * t.start() and + * result = < some API call >.getArgument(< n >) + * or + * exists (DataFlow::TypeBackTracker t2 | + * t = t2.smallstep(result, myType(t2)) + * ) + * } + * + * DataFlow::Node myType() { + * result = myType(DataFlow::TypeBackTracker::end()) + * } + * ``` + */ + pragma[inline] + TypeBackTracker smallstep(Node nodeFrom, Node nodeTo) { + exists(StepSummary summary | + StepSummary::smallstep(nodeFrom, nodeTo, summary) and + this = result.prepend(summary) + ) + or + typePreservingStep(nodeFrom, nodeTo) and + this = result + } +} + +/** Provides predicates for implementing custom `TypeBackTracker`s. */ +module TypeBackTracker { + /** + * Gets a valid end point of type back-tracking. + */ + TypeBackTracker end() { result.end() } +} diff --git a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll new file mode 100644 index 000000000000..f8f915f175d2 --- /dev/null +++ b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll @@ -0,0 +1,95 @@ +private import python +private import semmle.python.dataflow.new.internal.DataFlowPublic as DataFlowPublic +private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate + +class Node = DataFlowPublic::Node; + +class LocalSourceNode = DataFlowPublic::LocalSourceNode; + +predicate jumpStep = DataFlowPrivate::jumpStep/2; + +predicate simpleLocalFlowStep = DataFlowPrivate::simpleLocalFlowStep/2; + +/** + * Gets the name of a possible piece of content. This will usually include things like + * + * - Attribute names (in Python) + * - Property names (in JavaScript) + */ +string getPossibleContentName() { result = any(DataFlowPublic::AttrRef a).getAttributeName() } + +/** + * Gets a callable for the call where `nodeFrom` is used as the `i`'th argument. + * + * Helper predicate to avoid bad join order experienced in `callStep`. + * This happened when `isParameterOf` was joined _before_ `getCallable`. + */ +pragma[nomagic] +private DataFlowPrivate::DataFlowCallable getCallableForArgument( + DataFlowPublic::ArgumentNode nodeFrom, int i +) { + exists(DataFlowPrivate::DataFlowCall call | + nodeFrom.argumentOf(call, i) and + result = call.getCallable() + ) +} + +/** Holds if `nodeFrom` steps to `nodeTo` by being passed as a parameter in a call. */ +predicate callStep(DataFlowPublic::ArgumentNode nodeFrom, DataFlowPublic::ParameterNode nodeTo) { + // TODO: Support special methods? + exists(DataFlowPrivate::DataFlowCallable callable, int i | + callable = getCallableForArgument(nodeFrom, i) and + nodeTo.isParameterOf(callable, i) + ) +} + +/** Holds if `nodeFrom` steps to `nodeTo` by being returned from a call. */ +predicate returnStep(DataFlowPrivate::ReturnNode nodeFrom, Node nodeTo) { + exists(DataFlowPrivate::DataFlowCall call | + nodeFrom.getEnclosingCallable() = call.getCallable() and nodeTo.asCfgNode() = call.getNode() + ) +} + +/** + * Holds if `nodeFrom` is being written to the `content` content of the object in `nodeTo`. + * + * Note that the choice of `nodeTo` does not have to make sense "chronologically". + * All we care about is whether the `content` content of `nodeTo` can have a specific type, + * and the assumption is that if a specific type appears here, then any access of that + * particular content can yield something of that particular type. + * + * Thus, in an example such as + * + * ```python + * def foo(y): + * x = Foo() + * bar(x) + * x.content = y + * baz(x) + * + * def bar(x): + * z = x.content + * ``` + * for the content write `x.content = y`, we will have `content` being the literal string `"content"`, + * `nodeFrom` will be `y`, and `nodeTo` will be the object `Foo()` created on the first line of the + * function. This means we will track the fact that `x.content` can have the type of `y` into the + * assignment to `z` inside `bar`, even though this content write happens _after_ `bar` is called. + */ +predicate basicStoreStep(Node nodeFrom, LocalSourceNode nodeTo, string content) { + exists(DataFlowPublic::AttrWrite a | + a.mayHaveAttributeName(content) and + nodeFrom = a.getValue() and + nodeTo.flowsTo(a.getObject()) + ) +} + +/** + * Holds if `nodeTo` is the result of accessing the `content` content of `nodeFrom`. + */ +predicate basicLoadStep(Node nodeFrom, Node nodeTo, string content) { + exists(DataFlowPublic::AttrRead a | + a.mayHaveAttributeName(content) and + nodeFrom = a.getObject() and + nodeTo = a + ) +} From f05313435d68b06b96e3172d823024f9beb1df49 Mon Sep 17 00:00:00 2001 From: Taus Brock-Nannestad Date: Fri, 12 Mar 2021 14:06:39 +0100 Subject: [PATCH 0024/1662] Python: Move `typePreservingStep` into `Private` --- python/ql/src/experimental/typetracking/TypeTracker.qll | 6 ------ .../src/experimental/typetracking/TypeTrackerPrivate.qll | 8 +++++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/python/ql/src/experimental/typetracking/TypeTracker.qll b/python/ql/src/experimental/typetracking/TypeTracker.qll index 9ef29f46205c..f21d3a2a91b6 100644 --- a/python/ql/src/experimental/typetracking/TypeTracker.qll +++ b/python/ql/src/experimental/typetracking/TypeTracker.qll @@ -78,12 +78,6 @@ module StepSummary { } } -/** Holds if it's reasonable to expect the data flow step from `nodeFrom` to `nodeTo` to preserve types. */ -private predicate typePreservingStep(Node nodeFrom, Node nodeTo) { - simpleLocalFlowStep(nodeFrom, nodeTo) or - jumpStep(nodeFrom, nodeTo) -} - /** * A utility class that is equivalent to `boolean` but does not require type joining. */ diff --git a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll index f8f915f175d2..d26a76b3355c 100644 --- a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll +++ b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll @@ -6,9 +6,11 @@ class Node = DataFlowPublic::Node; class LocalSourceNode = DataFlowPublic::LocalSourceNode; -predicate jumpStep = DataFlowPrivate::jumpStep/2; - -predicate simpleLocalFlowStep = DataFlowPrivate::simpleLocalFlowStep/2; +/** Holds if it's reasonable to expect the data flow step from `nodeFrom` to `nodeTo` to preserve types. */ +predicate typePreservingStep(Node nodeFrom, Node nodeTo) { + DataFlowPrivate::simpleLocalFlowStep(nodeFrom, nodeTo) or + DataFlowPrivate::jumpStep(nodeFrom, nodeTo) +} /** * Gets the name of a possible piece of content. This will usually include things like From 41c9394b4bd12063e133222310a9facac689b330 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sun, 14 Mar 2021 09:22:47 +0100 Subject: [PATCH 0025/1662] Python: update qhelp and example --- .../Security/CWE-327/InsecureProtocol.qhelp | 21 +++++++++++++++++++ .../examples/secure_default_protocol.py | 16 ++++++-------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp index 4a7364ca14e2..cfcebd0930d3 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp @@ -38,12 +38,33 @@ ssl.SSLContext, which is supported in Python 2.7.9 and 3.2 and later versions.

    +

    + Note that ssl.wrap_socket has been deprecated in + Python 3.7. The recommended alternatives are: +

    +
      +
    • ssl.SSLContext - supported in Python 2.7.9, + 3.2, and later versions
    • +
    • ssl.create_default_context - a convenience function, + supported in Python 3.4 and later versions.
    • +
    +

    + Even when you use these alternatives, you should + ensure that a safe protocol is used. The following code illustrates + how to use flags (available since Python 3.2) or the `minimum_version` + field (favored since Python 3.7) to restrict the protocols accepted when + creating a connection. +

    + +
  • Wikipedia: Transport Layer Security.
  • Python 3 documentation: class ssl.SSLContext.
  • Python 3 documentation: ssl.wrap_socket.
  • +
  • Python 3 documentation: notes on context creation.
  • +
  • Python 3 documentation: notes on security considerations.
  • pyOpenSSL documentation: An interface to the SSL-specific parts of OpenSSL.
  • diff --git a/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py b/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py index 83c6dbbba0e0..535a97f0b934 100644 --- a/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py +++ b/python/ql/src/Security/CWE-327/examples/secure_default_protocol.py @@ -1,13 +1,9 @@ -# taken from https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl.SSLContext - -import socket import ssl -hostname = 'www.python.org' -context = ssl.create_default_context() -context.options |= ssl.OP_NO_TLSv1 # This added by me -context.options |= ssl.OP_NO_TLSv1_1 # This added by me +# Using flags to restrict the protocol +context = ssl.SSLContext() +context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 -with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) +# Declaring a minimum version to restrict the protocol +context = ssl.create_default_context() +context.minimum_version = ssl.TLSVersion.TLSv1_2 From 4094b184074ca1c4b20e4ad599bef6d536f518c3 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 15 Mar 2021 16:28:08 +0100 Subject: [PATCH 0026/1662] Python: Clean up tests --- .../CWE-327/InsecureProtocol.expected | 10 ++--- .../Security/CWE-327/InsecureProtocol.py | 39 ++++++------------- 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index f4202a4634d5..db30e41b4809 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -5,11 +5,11 @@ | InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:11:1:11:39 | ControlFlowNode for SSLContext() | call to SSLContext | | InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:12:1:12:39 | ControlFlowNode for SSLContext() | call to SSLContext | | InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:14:1:14:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:17:1:17:29 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:32:1:32:19 | ControlFlowNode for Attribute() | call to SSL.Context | -| InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:48:1:48:43 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | -| InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:49:1:49:35 | ControlFlowNode for SSLContext() | call to SSLContext | +| InsecureProtocol.py:15:1:15:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv3 specified by $@ | InsecureProtocol.py:15:1:15:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version TLSv1 specified by $@ | InsecureProtocol.py:16:1:16:29 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:19:1:19:19 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:19:1:19:19 | ControlFlowNode for Attribute() | call to SSL.Context | +| InsecureProtocol.py:23:1:23:43 | ControlFlowNode for Attribute() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:23:1:23:43 | ControlFlowNode for Attribute() | call to ssl.wrap_socket | +| InsecureProtocol.py:24:1:24:35 | ControlFlowNode for SSLContext() | Insecure SSL/TLS protocol version SSLv2 specified by $@ | InsecureProtocol.py:24:1:24:35 | ControlFlowNode for SSLContext() | call to SSLContext | | pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | | pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | | pyOpenSSL_fluent.py:8:27:8:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | pyOpenSSL_fluent.py:6:15:6:44 | ControlFlowNode for Attribute() | call to SSL.Context | diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py index cb21a6623c9e..3ff1207b527f 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py @@ -2,7 +2,7 @@ from OpenSSL import SSL from ssl import SSLContext -# true positives +# insecure versions specified ssl.wrap_socket(ssl_version=ssl.PROTOCOL_SSLv2) ssl.wrap_socket(ssl_version=ssl.PROTOCOL_SSLv3) ssl.wrap_socket(ssl_version=ssl.PROTOCOL_TLSv1) @@ -12,41 +12,26 @@ SSLContext(protocol=ssl.PROTOCOL_TLSv1) SSL.Context(SSL.SSLv2_METHOD) -SSL.Context(SSL.SSLv23_METHOD) SSL.Context(SSL.SSLv3_METHOD) SSL.Context(SSL.TLSv1_METHOD) -# not relevant -wrap_socket(ssl_version=ssl.PROTOCOL_SSLv3) -wrap_socket(ssl_version=ssl.PROTOCOL_TLSv1) -wrap_socket(ssl_version=ssl.PROTOCOL_SSLv2) - -Context(SSL.SSLv3_METHOD) -Context(SSL.TLSv1_METHOD) -Context(SSL.SSLv2_METHOD) -Context(SSL.SSLv23_METHOD) - -# true positive using flow - METHOD = SSL.SSLv2_METHOD SSL.Context(METHOD) -# secure versions +# importing the protocol constant directly +from ssl import PROTOCOL_SSLv2 +ssl.wrap_socket(ssl_version=PROTOCOL_SSLv2) +SSLContext(protocol=PROTOCOL_SSLv2) +# secure versions specified ssl.wrap_socket(ssl_version=ssl.PROTOCOL_TLSv1_2) SSLContext(protocol=ssl.PROTOCOL_TLSv1_2) SSL.Context(SSL.TLSv1_2_METHOD) -# possibly insecure default -ssl.wrap_socket() -context = SSLContext() +# possibly secure versions specified +SSLContext(protocol=ssl.PROTOCOL_SSLv23) +SSLContext(protocol=ssl.PROTOCOL_TLS) +SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT) +SSLContext(protocol=ssl.PROTOCOL_TLS_SERVER) -# importing the protocol constant directly - -from ssl import PROTOCOL_SSLv2 - -ssl.wrap_socket(ssl_version=PROTOCOL_SSLv2) -SSLContext(protocol=PROTOCOL_SSLv2) - -# FP for insecure default -ssl.SSLContext(ssl.SSLv23_METHOD) +SSL.Context(SSL.SSLv23_METHOD) From 731f4559b415dce07d8118707a42081bcba42c08 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 15 Mar 2021 17:23:58 +0100 Subject: [PATCH 0027/1662] Python: update test expectations --- .../Security/CWE-327/InsecureDefaultProtocol.expected | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureDefaultProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureDefaultProtocol.expected index 1e389aefdc1e..e69de29bb2d1 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureDefaultProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureDefaultProtocol.expected @@ -1,2 +0,0 @@ -| InsecureProtocol.py:41:1:41:17 | ControlFlowNode for Attribute() | Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used. | -| InsecureProtocol.py:42:11:42:22 | ControlFlowNode for SSLContext() | Call to ssl.SSLContext does not specify a protocol, which may result in an insecure default being used. | From 87f3ba26843b8f861df47b9ca03226926aa58b5b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 15 Mar 2021 17:24:39 +0100 Subject: [PATCH 0028/1662] Python: add tests for `ssl.PROTOCOL_TLS_SERVER` and `ssl.PROTOCOL_TLS_CLIENT` --- .../CWE-327/InsecureProtocol.expected | 36 +++++++++---------- .../Security/CWE-327/ssl_fluent.py | 18 ++++++++++ 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index db30e41b4809..3f383ea52978 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -22,21 +22,21 @@ | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:34:15:34:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:47:14:47:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:43:15:43:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:71:15:71:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:128:15:128:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:144:5:144:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:98:14:98:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:162:5:162:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:104:14:104:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:12:89:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:124:14:124:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:122:5:122:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:173:14:173:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:170:5:170:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:189:5:189:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | -| ssl_fluent.py:192:14:192:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:188:15:188:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:65:14:65:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:61:15:61:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:93:14:93:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:15:89:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:93:14:93:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:15:89:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:146:15:146:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:146:15:146:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:162:5:162:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:180:5:180:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:122:14:122:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:122:14:122:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:142:14:142:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:140:5:140:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:191:14:191:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:188:5:188:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:207:5:207:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:206:15:206:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:206:15:206:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index 577f342765ee..ceddaa32f091 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -19,6 +19,24 @@ def test_fluent_tls_no_TLSv1(): with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) +def test_fluent_tls_client_no_TLSv1(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + context.options |= ssl.OP_NO_TLSv1 + + with socket.create_connection((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + +def test_fluent_tls_server_no_TLSv1(): + hostname = 'www.python.org' + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + context.options |= ssl.OP_NO_TLSv1 + + with socket.create_server((hostname, 443)) as sock: + with context.wrap_socket(sock, server_hostname=hostname) as ssock: + print(ssock.version()) + def test_fluent_tls_safe(): hostname = 'www.python.org' context = ssl.SSLContext(ssl.PROTOCOL_TLS) From 514a69c47ad79318883483f159662503bc7358b0 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 15 Mar 2021 17:30:01 +0100 Subject: [PATCH 0029/1662] Python: Support `ssl.PROTOCOL_TLS_SERVER` and `ssl.PROTOCOL_TLS_CLIENT` --- python/ql/src/Security/CWE-327/Ssl.qll | 6 +++++- .../query-tests/Security/CWE-327/InsecureProtocol.expected | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index d4886219d084..be16138b9612 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -146,7 +146,11 @@ class Ssl extends TlsLibrary { override string specific_version_name(ProtocolVersion version) { result = "PROTOCOL_" + version } - override string unspecific_version_name(ProtocolFamily family) { result = "PROTOCOL_" + family } + override string unspecific_version_name(ProtocolFamily family) { + family = "SSLv23" and result = "PROTOCOL_" + family + or + family = "TLS" and result = "PROTOCOL_" + family + ["", "_CLIENT", "_SERVER"] + } override API::Node version_constants() { result = API::moduleImport("ssl") } diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index 3f383ea52978..e578a335d846 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -22,6 +22,8 @@ | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:28:14:28:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:24:15:24:53 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:33:15:33:53 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:65:14:65:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:61:15:61:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | From 9a962305236c194d18d80d6321bf11ddc6eabe8b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 15 Mar 2021 17:35:30 +0100 Subject: [PATCH 0030/1662] Python: Add changenote --- python/change-notes/2021-03-15-port-insecure-protocol.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 python/change-notes/2021-03-15-port-insecure-protocol.md diff --git a/python/change-notes/2021-03-15-port-insecure-protocol.md b/python/change-notes/2021-03-15-port-insecure-protocol.md new file mode 100644 index 000000000000..c92f387b29a0 --- /dev/null +++ b/python/change-notes/2021-03-15-port-insecure-protocol.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Ported use of insecure SSL/TLS version (`py/insecure-protocol`) query to use new data-flow library. This might result in different results, but overall a more robust and accurate analysis. From 98204a15a6ad8c8dd5dfb42269bfdd153cfc1827 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 17 Mar 2021 15:28:04 +0800 Subject: [PATCH 0031/1662] Fix the problem --- .../Security/CWE/CWE-352/JsonStringLib.qll | 2 +- .../Security/CWE/CWE-352/JsonpInjection.java | 113 ++++++---- .../Security/CWE/CWE-352/JsonpInjection.qhelp | 11 +- .../Security/CWE/CWE-352/JsonpInjection.ql | 24 ++- .../CWE/CWE-352/JsonpInjectionLib.qll | 66 +++--- .../Security/CWE/CWE-598/SensitiveGetQuery.ql | 10 - .../semmle/code/java/frameworks/Servlets.qll | 11 + .../security/CWE-352/JsonpInjection.qlref | 1 - .../JsonpController.java | 105 +++++++-- .../JsonpInjection.expected | 87 ++++++++ .../JsonpInjection.qlref | 1 + .../JsonpInjectionServlet1.java | 0 .../JsonpInjectionServlet2.java | 0 .../RefererFilter.java | 0 .../CWE-352/JsonpInjectionWithFilter/options | 1 + .../JsonpController.java | 107 +++++++-- .../JsonpInjection.expected | 76 +++++++ .../JsonpInjection.qlref | 1 + .../options | 1 + .../JsonpController.java | 203 ++++++++++++++++++ .../JsonpInjection.expected | 92 ++++++++ .../JsonpInjection.qlref | 1 + .../JsonpInjectionServlet1.java | 0 .../JsonpInjectionServlet2.java | 0 .../options | 1 + .../CWE-352/JsonpInjection_1.expected | 60 ------ .../CWE-352/JsonpInjection_2.expected | 78 ------- .../CWE-352/JsonpInjection_3.expected | 66 ------ .../query-tests/security/CWE-352/Readme | 3 - .../security/CWE-352/RefererFilter.java | 43 ---- .../query-tests/security/CWE-352/options | 1 - .../core/annotation/AliasFor.java | 13 +- .../core/io/InputStreamSource.java | 8 + .../org/springframework/core/io/Resource.java | 46 ++++ .../org/springframework/lang/Nullable.java | 13 ++ .../springframework/util/FileCopyUtils.java | 53 +++++ .../org/springframework/util/StringUtils.java | 2 +- .../web/bind/annotation/GetMapping.java | 36 +++- .../web/bind/annotation/Mapping.java | 4 + .../web/bind/annotation/RequestMapping.java | 19 +- .../web/bind/annotation/RequestParam.java | 23 ++ .../web/bind/annotation/ResponseBody.java | 9 + .../web/multipart/MultipartFile.java | 38 ++++ .../javax/servlet/annotation/WebServlet.java | 30 +++ 44 files changed, 1073 insertions(+), 386 deletions(-) delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref rename java/ql/test/experimental/query-tests/security/CWE-352/{ => JsonpInjectionWithFilter}/JsonpController.java (54%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref rename java/ql/{src/experimental/Security/CWE/CWE-352 => test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter}/JsonpInjectionServlet1.java (100%) rename java/ql/{src/experimental/Security/CWE/CWE-352 => test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter}/JsonpInjectionServlet2.java (100%) rename java/ql/{src/experimental/Security/CWE/CWE-352 => test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter}/RefererFilter.java (100%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options rename java/ql/{src/experimental/Security/CWE/CWE-352 => test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController}/JsonpController.java (54%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref rename java/ql/test/experimental/query-tests/security/CWE-352/{ => JsonpInjectionWithSpringControllerAndServlet}/JsonpInjectionServlet1.java (100%) rename java/ql/test/experimental/query-tests/security/CWE-352/{ => JsonpInjectionWithSpringControllerAndServlet}/JsonpInjectionServlet2.java (100%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/Readme delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/options create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java create mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java create mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java create mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll index 0da8bc860d11..5cc52e97e338 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll @@ -3,7 +3,7 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import DataFlow::PathGraph -/** Json string type data */ +/** Json string type data. */ abstract class JsonpStringSource extends DataFlow::Node { } /** Convert to String using Gson library. */ diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java index 8b4e7cc005ef..7f479a8c0230 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java @@ -1,31 +1,39 @@ import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashMap; -import java.util.Random; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; @Controller public class JsonpInjection { -private static HashMap hashMap = new HashMap(); + + private static HashMap hashMap = new HashMap(); static { hashMap.put("username","admin"); hashMap.put("password","123456"); } + private String name = null; + @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); String result = gson.toJson(hashMap); resultStr = jsonpCallback + "(" + result + ")"; @@ -37,9 +45,7 @@ public String bad1(HttpServletRequest request) { public String bad2(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - return resultStr; } @@ -67,7 +73,6 @@ public String bad4(HttpServletRequest request) { @ResponseBody public void bad5(HttpServletRequest request, HttpServletResponse response) throws Exception { - response.setContentType("application/json"); String jsonpCallback = request.getParameter("jsonpCallback"); PrintWriter pw = null; Gson gson = new Gson(); @@ -83,7 +88,6 @@ public void bad5(HttpServletRequest request, @ResponseBody public void bad6(HttpServletRequest request, HttpServletResponse response) throws Exception { - response.setContentType("application/json"); String jsonpCallback = request.getParameter("jsonpCallback"); PrintWriter pw = null; ObjectMapper mapper = new ObjectMapper(); @@ -94,60 +98,96 @@ public void bad6(HttpServletRequest request, pw.println(resultStr); } - @GetMapping(value = "jsonp7") + @RequestMapping(value = "jsonp7", method = RequestMethod.GET) @ResponseBody - public String good(HttpServletRequest request) { + public String bad7(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - - String val = ""; - Random random = new Random(); - for (int i = 0; i < 10; i++) { - val += String.valueOf(random.nextInt(10)); - } - // good - jsonpCallback = jsonpCallback + "_" + val; - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; return resultStr; } + @GetMapping(value = "jsonp8") @ResponseBody public String good1(HttpServletRequest request) { String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String token = request.getParameter("token"); - - // good if (verifToken(token)){ - System.out.println(token); + String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; return resultStr; } - return "error"; } + @GetMapping(value = "jsonp9") @ResponseBody public String good2(HttpServletRequest request) { String resultStr = null; + String token = request.getParameter("token"); + boolean result = verifToken(token); + if (result){ + return ""; + } String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } - String referer = request.getHeader("Referer"); + @RequestMapping(value = "jsonp10") + @ResponseBody + public String good3(HttpServletRequest request) { + JSONObject parameterObj = readToJSONObect(request); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } - boolean result = verifReferer(referer); - // good - if (result){ - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; + @RequestMapping(value = "jsonp11") + @ResponseBody + public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + if(null == file){ + return "upload file error"; } + String fileName = file.getOriginalFilename(); + System.out.println("file operations"); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } - return "error"; + public static JSONObject readToJSONObect(HttpServletRequest request){ + String jsonText = readPostContent(request); + JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); + return jsonObj; + } + + public static String readPostContent(HttpServletRequest request){ + BufferedReader in= null; + String content = null; + String line = null; + try { + in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); + StringBuilder buf = new StringBuilder(); + while ((line = in.readLine()) != null) { + buf.append(line); + } + content = buf.toString(); + } catch (IOException e) { + e.printStackTrace(); + } + String uri = request.getRequestURI(); + return content; } public static String getJsonStr(Object result) { @@ -160,11 +200,4 @@ public static boolean verifToken(String token){ } return true; } - - public static boolean verifReferer(String referer){ - if (!referer.startsWith("http://test.com/")){ - return false; - } - return true; - } } \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index bb5d628ac0b7..93c167d6c2ca 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -3,18 +3,21 @@ "qhelp.dtd"> -

    The software uses external input as the function name to wrap JSON data and return it to the client as a request response. When there is a cross-domain problem, -there is a problem of sensitive information leakage.

    +

    The software uses external input as the function name to wrap JSON data and returns it to the client as a request response. +When there is a cross-domain problem, the problem of sensitive information leakage may occur.

    -

    Adding `Referer` or random `token` verification processing can effectively prevent the leakage of sensitive information.

    +

    Adding Referer/Origin or random token verification processing can effectively prevent the leakage of sensitive information.

    -

    The following example shows the case of no verification processing and verification processing for the external input function name.

    +

    The following examples show the bad case and the good case respectively. Bad case, such as bad1 to bad7, +will cause information leakage problems when there are cross-domain problems. In a good case, for example, in the good1 +method and the good2 method, use the verifToken method to do the random token Verification can +solve the problem of information leakage caused by cross-domain.

    diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index f3ae25daa034..068469328eae 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -14,25 +14,25 @@ import java import JsonpInjectionLib import semmle.code.java.dataflow.FlowSources import semmle.code.java.deadcode.WebEntryPoints -import semmle.code.java.security.XSS import DataFlow::PathGraph /** Determine whether there is a verification method for the remote streaming source data flow path method. */ predicate existsFilterVerificationMethod() { - exists(MethodAccess ma,Node existsNode, Method m| + exists(MethodAccess ma, Node existsNode, Method m | ma.getMethod() instanceof VerificationMethodClass and existsNode.asExpr() = ma and - m = getAnMethod(existsNode.getEnclosingCallable()) and + m = getACallingCallableOrSelf(existsNode.getEnclosingCallable()) and isDoFilterMethod(m) ) } /** Determine whether there is a verification method for the remote streaming source data flow path method. */ predicate existsServletVerificationMethod(Node checkNode) { - exists(MethodAccess ma,Node existsNode| + exists(MethodAccess ma, Node existsNode | ma.getMethod() instanceof VerificationMethodClass and existsNode.asExpr() = ma and - getAnMethod(existsNode.getEnclosingCallable()) = getAnMethod(checkNode.getEnclosingCallable()) + getACallingCallableOrSelf(existsNode.getEnclosingCallable()) = + getACallingCallableOrSelf(checkNode.getEnclosingCallable()) ) } @@ -40,13 +40,15 @@ predicate existsServletVerificationMethod(Node checkNode) { class RequestResponseFlowConfig extends TaintTracking::Configuration { RequestResponseFlowConfig() { this = "RequestResponseFlowConfig" } - override predicate isSource(DataFlow::Node source) { - source instanceof RemoteFlowSource and - getAnMethod(source.getEnclosingCallable()) instanceof RequestGetMethod - } + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } + /** Eliminate the method of calling the node is not the get method. */ + override predicate isSanitizer(DataFlow::Node node) { + not getACallingCallableOrSelf(node.getEnclosingCallable()) instanceof RequestGetMethod + } + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { exists(MethodAccess ma | isRequestGetParamMethod(ma) and pred.asExpr() = ma.getQualifier() and succ.asExpr() = ma @@ -60,5 +62,5 @@ where not existsFilterVerificationMethod() and conf.hasFlowPath(source, sink) and exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) -select sink.getNode(), source, sink, "Jsonp Injection query might include code from $@.", - source.getNode(), "this user input" \ No newline at end of file +select sink.getNode(), source, sink, "Jsonp response might include code from $@.", source.getNode(), + "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index b8964524a9f8..d0e00bcb634f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -6,28 +6,25 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController -/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +/** Taint-tracking configuration tracing flow from untrusted inputs to verification of remote user input. */ class VerificationMethodFlowConfig extends TaintTracking::Configuration { VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma, BarrierGuard bg | + exists(MethodAccess ma | ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - bg = ma and - sink.asExpr() = ma.getAnArgument() + ma.getAnArgument() = sink.asExpr() ) } } -/** The parameter name of the method is `token`, `auth`, `referer`, `origin`. */ +/** The parameter names of this method are token/auth/referer/origin. */ class VerificationMethodClass extends Method { VerificationMethodClass() { - exists(MethodAccess ma, BarrierGuard bg, VerificationMethodFlowConfig vmfc, Node node | + exists(MethodAccess ma, VerificationMethodFlowConfig vmfc, Node node | this = ma.getMethod() and - this.getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - bg = ma and node.asExpr() = ma.getAnArgument() and vmfc.hasFlowTo(node) ) @@ -35,38 +32,43 @@ class VerificationMethodClass extends Method { } /** Get Callable by recursive method. */ -Callable getAnMethod(Callable call) { +Callable getACallingCallableOrSelf(Callable call) { result = call or - result = getAnMethod(call.getAReference().getEnclosingCallable()) + result = getACallingCallableOrSelf(call.getAReference().getEnclosingCallable()) } abstract class RequestGetMethod extends Method { } -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +/** Override method of `doGet` of `Servlet` subclass. */ private class ServletGetMethod extends RequestGetMethod { - ServletGetMethod() { - exists(Method m | - m = this and - isServletRequestMethod(m) and - m.getName() = "doGet" - ) + ServletGetMethod() { this instanceof DoGetServletMethod } +} + +/** The method of SpringController class processing `get` request. */ +abstract class SpringControllerGetMethod extends RequestGetMethod { } + +/** Method using `GetMapping` annotation in SpringController class. */ +class SpringControllerGetMappingGetMethod extends SpringControllerGetMethod { + SpringControllerGetMappingGetMethod() { + this.getAnAnnotation() + .getType() + .hasQualifiedName("org.springframework.web.bind.annotation", "GetMapping") } } -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ -private class SpringControllerGetMethod extends RequestGetMethod { - SpringControllerGetMethod() { - exists(Annotation a | - a = this.getAnAnnotation() and - a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "GetMapping") - ) - or - exists(Annotation a | - a = this.getAnAnnotation() and - a.getType().hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and - a.getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") - ) +/** The method that uses the `RequestMapping` annotation in the SpringController class and only handles the get request. */ +class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod { + SpringControllerRequestMappingGetMethod() { + this.getAnAnnotation() + .getType() + .hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and + this.getAnAnnotation().getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") and + not exists(MethodAccess ma | + ma.getMethod() instanceof ServletRequestGetBodyMethod and + this = getACallingCallableOrSelf(ma.getEnclosingCallable()) + ) and + not this.getAParamType().getName() = "MultipartFile" } } @@ -83,12 +85,12 @@ class JsonpInjectionExpr extends AddExpr { .regexpMatch("\"\\(\"") } - /** Get the jsonp function name of this expression */ + /** Get the jsonp function name of this expression. */ Expr getFunctionName() { result = getLeftOperand().(AddExpr).getLeftOperand().(AddExpr).getLeftOperand() } - /** Get the json data of this expression */ + /** Get the json data of this expression. */ Expr getJsonExpr() { result = getLeftOperand().(AddExpr).getRightOperand() } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql index bc9850cfddb9..c381595af14b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql @@ -23,16 +23,6 @@ class SensitiveInfoExpr extends Expr { } } -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ -private predicate isGetServletMethod(Method m) { - isServletRequestMethod(m) and m.getName() = "doGet" -} - -/** The `doGet` method of `HttpServlet`. */ -class DoGetServletMethod extends Method { - DoGetServletMethod() { isGetServletMethod(this) } -} - /** Holds if `ma` is (perhaps indirectly) called from the `doGet` method of `HttpServlet`. */ predicate isReachableFromServletDoGet(MethodAccess ma) { ma.getEnclosingCallable() instanceof DoGetServletMethod diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index 5cccf62122ff..7ac452affa99 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -354,9 +354,20 @@ class FilterChain extends Interface { /** Holds if `m` is a filter handler method (for example `doFilter`). */ predicate isDoFilterMethod(Method m) { + m.getName().matches("doFilter") and m.getDeclaringType() instanceof FilterClass and m.getNumberOfParameters() = 3 and m.getParameter(0).getType() instanceof ServletRequest and m.getParameter(1).getType() instanceof ServletResponse and m.getParameter(2).getType() instanceof FilterChain } + +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +predicate isGetServletMethod(Method m) { + isServletRequestMethod(m) and m.getName() = "doGet" +} + +/** The `doGet` method of `HttpServlet`. */ +class DoGetServletMethod extends Method { + DoGetServletMethod() { isGetServletMethod(this) } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref deleted file mode 100644 index 6ad4b8acda76..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java similarity index 54% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java index cf860c756409..e5b5e70a38d7 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java @@ -1,16 +1,24 @@ import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; @Controller public class JsonpController { + private static HashMap hashMap = new HashMap(); static { @@ -18,13 +26,14 @@ public class JsonpController { hashMap.put("password","123456"); } + private String name = null; + - @GetMapping(value = "jsonp1", produces="text/javascript") + @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); String result = gson.toJson(hashMap); resultStr = jsonpCallback + "(" + result + ")"; @@ -36,9 +45,7 @@ public String bad1(HttpServletRequest request) { public String bad2(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - return resultStr; } @@ -91,23 +98,98 @@ public void bad6(HttpServletRequest request, pw.println(resultStr); } - @GetMapping(value = "jsonp7") + @RequestMapping(value = "jsonp7", method = RequestMethod.GET) @ResponseBody - public String good1(HttpServletRequest request) { + public String bad7(HttpServletRequest request) { String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } - String token = request.getParameter("token"); + @GetMapping(value = "jsonp8") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); if (verifToken(token)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; return resultStr; } - return "error"; } + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good2(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); + boolean result = verifToken(token); + if (result){ + return ""; + } + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @RequestMapping(value = "jsonp10") + @ResponseBody + public String good3(HttpServletRequest request) { + JSONObject parameterObj = readToJSONObect(request); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @RequestMapping(value = "jsonp11") + @ResponseBody + public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + if(null == file){ + return "upload file error"; + } + String fileName = file.getOriginalFilename(); + System.out.println("file operations"); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + public static JSONObject readToJSONObect(HttpServletRequest request){ + String jsonText = readPostContent(request); + JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); + return jsonObj; + } + + public static String readPostContent(HttpServletRequest request){ + BufferedReader in= null; + String content = null; + String line = null; + try { + in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); + StringBuilder buf = new StringBuilder(); + while ((line = in.readLine()) != null) { + buf.append(line); + } + content = buf.toString(); + } catch (IOException e) { + e.printStackTrace(); + } + String uri = request.getRequestURI(); + return content; + } + public static String getJsonStr(Object result) { return JSONObject.toJSONString(result); } @@ -118,11 +200,4 @@ public static boolean verifToken(String token){ } return true; } - - public static boolean verifReferer(String referer){ - if (!referer.startsWith("http://test.com/")){ - return false; - } - return true; - } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected new file mode 100644 index 000000000000..501565f2b4ec --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected @@ -0,0 +1,87 @@ +edges +| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| RefererFilter.java:22:26:22:53 | getHeader(...) : String | RefererFilter.java:23:39:23:45 | refefer | +nodes +| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:118:24:118:28 | token | semmle.label | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:133:37:133:41 | token | semmle.label | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| RefererFilter.java:22:26:22:53 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| RefererFilter.java:23:39:23:45 | refefer | semmle.label | refefer | +#select diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref new file mode 100644 index 000000000000..3f5fc4506696 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet1.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet1.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet2.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionServlet2.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-352/RefererFilter.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options new file mode 100644 index 000000000000..c53e31e467fa --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java similarity index 54% rename from java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java index 84a172a7aebd..e5b5e70a38d7 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java @@ -1,16 +1,24 @@ import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; @Controller public class JsonpController { + private static HashMap hashMap = new HashMap(); static { @@ -18,13 +26,14 @@ public class JsonpController { hashMap.put("password","123456"); } + private String name = null; + - @GetMapping(value = "jsonp1", produces="text/javascript") + @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); String result = gson.toJson(hashMap); resultStr = jsonpCallback + "(" + result + ")"; @@ -36,9 +45,7 @@ public String bad1(HttpServletRequest request) { public String bad2(HttpServletRequest request) { String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - return resultStr; } @@ -91,23 +98,98 @@ public void bad6(HttpServletRequest request, pw.println(resultStr); } - @GetMapping(value = "jsonp7") + @RequestMapping(value = "jsonp7", method = RequestMethod.GET) @ResponseBody - public String good1(HttpServletRequest request) { + public String bad7(HttpServletRequest request) { String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } - String token = request.getParameter("token"); + @GetMapping(value = "jsonp8") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); if (verifToken(token)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; return resultStr; } - return "error"; } + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good2(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); + boolean result = verifToken(token); + if (result){ + return ""; + } + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @RequestMapping(value = "jsonp10") + @ResponseBody + public String good3(HttpServletRequest request) { + JSONObject parameterObj = readToJSONObect(request); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @RequestMapping(value = "jsonp11") + @ResponseBody + public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + if(null == file){ + return "upload file error"; + } + String fileName = file.getOriginalFilename(); + System.out.println("file operations"); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + public static JSONObject readToJSONObect(HttpServletRequest request){ + String jsonText = readPostContent(request); + JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); + return jsonObj; + } + + public static String readPostContent(HttpServletRequest request){ + BufferedReader in= null; + String content = null; + String line = null; + try { + in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); + StringBuilder buf = new StringBuilder(); + while ((line = in.readLine()) != null) { + buf.append(line); + } + content = buf.toString(); + } catch (IOException e) { + e.printStackTrace(); + } + String uri = request.getRequestURI(); + return content; + } + public static String getJsonStr(Object result) { return JSONObject.toJSONString(result); } @@ -118,11 +200,4 @@ public static boolean verifToken(String token){ } return true; } - - public static boolean verifReferer(String referer){ - if (!referer.startsWith("http://test.com/")){ - return false; - } - return true; - } -} \ No newline at end of file +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected new file mode 100644 index 000000000000..91d23cebbdac --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected @@ -0,0 +1,76 @@ +edges +| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +nodes +| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:118:24:118:28 | token | semmle.label | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:133:37:133:41 | token | semmle.label | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +#select +| JsonpController.java:40:16:40:24 | resultStr | JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:36:32:36:68 | getParameter(...) | this user input | +| JsonpController.java:49:16:49:24 | resultStr | JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:47:32:47:68 | getParameter(...) | this user input | +| JsonpController.java:59:16:59:24 | resultStr | JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:56:32:56:68 | getParameter(...) | this user input | +| JsonpController.java:69:16:69:24 | resultStr | JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:66:32:66:68 | getParameter(...) | this user input | +| JsonpController.java:84:20:84:28 | resultStr | JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:76:32:76:68 | getParameter(...) | this user input | +| JsonpController.java:98:20:98:28 | resultStr | JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:91:32:91:68 | getParameter(...) | this user input | +| JsonpController.java:109:16:109:24 | resultStr | JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:105:32:105:68 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref new file mode 100644 index 000000000000..3f5fc4506696 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options new file mode 100644 index 000000000000..c53e31e467fa --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java new file mode 100644 index 000000000000..e5b5e70a38d7 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java @@ -0,0 +1,203 @@ +import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.util.HashMap; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +@Controller +public class JsonpController { + + private static HashMap hashMap = new HashMap(); + + static { + hashMap.put("username","admin"); + hashMap.put("password","123456"); + } + + private String name = null; + + + @GetMapping(value = "jsonp1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp2") + @ResponseBody + public String bad2(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp3") + @ResponseBody + public String bad3(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @GetMapping(value = "jsonp4") + @ResponseBody + public String bad4(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @GetMapping(value = "jsonp5") + @ResponseBody + public void bad5(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @GetMapping(value = "jsonp6") + @ResponseBody + public void bad6(HttpServletRequest request, + HttpServletResponse response) throws Exception { + String jsonpCallback = request.getParameter("jsonpCallback"); + PrintWriter pw = null; + ObjectMapper mapper = new ObjectMapper(); + String result = mapper.writeValueAsString(hashMap); + String resultStr = null; + pw = response.getWriter(); + resultStr = jsonpCallback + "(" + result + ")"; + pw.println(resultStr); + } + + @RequestMapping(value = "jsonp7", method = RequestMethod.GET) + @ResponseBody + public String bad7(HttpServletRequest request) { + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + Gson gson = new Gson(); + String result = gson.toJson(hashMap); + resultStr = jsonpCallback + "(" + result + ")"; + return resultStr; + } + + + @GetMapping(value = "jsonp8") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); + if (verifToken(token)){ + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + return "error"; + } + + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good2(HttpServletRequest request) { + String resultStr = null; + String token = request.getParameter("token"); + boolean result = verifToken(token); + if (result){ + return ""; + } + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + @RequestMapping(value = "jsonp10") + @ResponseBody + public String good3(HttpServletRequest request) { + JSONObject parameterObj = readToJSONObect(request); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + @RequestMapping(value = "jsonp11") + @ResponseBody + public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + if(null == file){ + return "upload file error"; + } + String fileName = file.getOriginalFilename(); + System.out.println("file operations"); + String resultStr = null; + String jsonpCallback = request.getParameter("jsonpCallback"); + String restr = JSONObject.toJSONString(hashMap); + resultStr = jsonpCallback + "(" + restr + ");"; + return resultStr; + } + + public static JSONObject readToJSONObect(HttpServletRequest request){ + String jsonText = readPostContent(request); + JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); + return jsonObj; + } + + public static String readPostContent(HttpServletRequest request){ + BufferedReader in= null; + String content = null; + String line = null; + try { + in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); + StringBuilder buf = new StringBuilder(); + while ((line = in.readLine()) != null) { + buf.append(line); + } + content = buf.toString(); + } catch (IOException e) { + e.printStackTrace(); + } + String uri = request.getRequestURI(); + return content; + } + + public static String getJsonStr(Object result) { + return JSONObject.toJSONString(result); + } + + public static boolean verifToken(String token){ + if (token != "xxxx"){ + return false; + } + return true; + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected new file mode 100644 index 000000000000..c2bcab77d4d4 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected @@ -0,0 +1,92 @@ +edges +| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | +nodes +| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:118:24:118:28 | token | semmle.label | token | +| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:133:37:133:41 | token | semmle.label | token | +| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | +| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | +#select +| JsonpController.java:40:16:40:24 | resultStr | JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:36:32:36:68 | getParameter(...) | this user input | +| JsonpController.java:49:16:49:24 | resultStr | JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:47:32:47:68 | getParameter(...) | this user input | +| JsonpController.java:59:16:59:24 | resultStr | JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:56:32:56:68 | getParameter(...) | this user input | +| JsonpController.java:69:16:69:24 | resultStr | JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:66:32:66:68 | getParameter(...) | this user input | +| JsonpController.java:84:20:84:28 | resultStr | JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:76:32:76:68 | getParameter(...) | this user input | +| JsonpController.java:98:20:98:28 | resultStr | JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:91:32:91:68 | getParameter(...) | this user input | +| JsonpController.java:109:16:109:24 | resultStr | JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:105:32:105:68 | getParameter(...) | this user input | +| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | Jsonp response might include code from $@. | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref new file mode 100644 index 000000000000..3f5fc4506696 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet1.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionServlet2.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options new file mode 100644 index 000000000000..c53e31e467fa --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected deleted file mode 100644 index a89d03b67a7b..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_1.expected +++ /dev/null @@ -1,60 +0,0 @@ -edges -| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | -| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | -nodes -| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:101:24:101:28 | token | semmle.label | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -#select -| JsonpController.java:31:16:31:24 | resultStr | JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:26:32:26:68 | getParameter(...) | this user input | -| JsonpController.java:42:16:42:24 | resultStr | JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:38:32:38:68 | getParameter(...) | this user input | -| JsonpController.java:52:16:52:24 | resultStr | JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:49:32:49:68 | getParameter(...) | this user input | -| JsonpController.java:62:16:62:24 | resultStr | JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:59:32:59:68 | getParameter(...) | this user input | -| JsonpController.java:77:20:77:28 | resultStr | JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:69:32:69:68 | getParameter(...) | this user input | -| JsonpController.java:91:20:91:28 | resultStr | JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:84:32:84:68 | getParameter(...) | this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected deleted file mode 100644 index 4b12308a212d..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_2.expected +++ /dev/null @@ -1,78 +0,0 @@ -edges -| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | -| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -nodes -| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:101:24:101:28 | token | semmle.label | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -#select -| JsonpController.java:31:16:31:24 | resultStr | JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:26:32:26:68 | getParameter(...) | this user input | -| JsonpController.java:42:16:42:24 | resultStr | JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:38:32:38:68 | getParameter(...) | this user input | -| JsonpController.java:52:16:52:24 | resultStr | JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:49:32:49:68 | getParameter(...) | this user input | -| JsonpController.java:62:16:62:24 | resultStr | JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:59:32:59:68 | getParameter(...) | this user input | -| JsonpController.java:77:20:77:28 | resultStr | JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:69:32:69:68 | getParameter(...) | this user input | -| JsonpController.java:91:20:91:28 | resultStr | JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | - resultStr | Jsonp Injection query might include code from $@. | JsonpController.java:84:32:84:68 | getParameter(...) | this user input | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServle -t2.java:39:20:39:28 | resultStr | Jsonp Injection query might include code from $@. | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) | - this user input | \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected deleted file mode 100644 index 8e33ca6984c6..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection_3.expected +++ /dev/null @@ -1,66 +0,0 @@ -edges -| JsonpController.java:26:32:26:68 | getParameter(...) : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:30:21:30:54 | ... + ... : String | JsonpController.java:31:16:31:24 | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:40:21:40:80 | ... + ... : String | JsonpController.java:42:16:42:24 | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:51:21:51:55 | ... + ... : String | JsonpController.java:52:16:52:24 | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:61:21:61:54 | ... + ... : String | JsonpController.java:62:16:62:24 | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:76:21:76:54 | ... + ... : String | JsonpController.java:77:20:77:28 | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:90:21:90:54 | ... + ... : String | JsonpController.java:91:20:91:28 | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | JsonpController.java:101:24:101:28 | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | JsonpController.java:105:20:105:28 | resultStr | -| JsonpController.java:104:25:104:59 | ... + ... : String | JsonpController.java:105:20:105:28 | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| RefererFilter.java:22:26:22:53 | getHeader(...) : String | RefererFilter.java:23:39:23:45 | refefer | -nodes -| JsonpController.java:26:32:26:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:30:21:30:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:31:16:31:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:38:32:38:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:40:21:40:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:42:16:42:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:32:49:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:51:21:51:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:52:16:52:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:32:59:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:61:21:61:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:62:16:62:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:32:69:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:76:21:76:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:77:20:77:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:32:84:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:90:21:90:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:20:91:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:99:24:99:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:101:24:101:28 | token | semmle.label | token | -| JsonpController.java:102:36:102:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:104:25:104:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:20:105:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| RefererFilter.java:22:26:22:53 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| RefererFilter.java:23:39:23:45 | refefer | semmle.label | refefer | -#select \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/Readme b/java/ql/test/experimental/query-tests/security/CWE-352/Readme deleted file mode 100644 index 15715d6187c9..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/Readme +++ /dev/null @@ -1,3 +0,0 @@ -1. The JsonpInjection_1.expected result is obtained through the test of `JsonpController.java`. -2. The JsonpInjection_2.expected result is obtained through the test of `JsonpController.java`, `JsonpInjectionServlet1.java`, `JsonpInjectionServlet2.java`. -3. The JsonpInjection_3.expected result is obtained through the test of `JsonpController.java`, `JsonpInjectionServlet1.java`, `JsonpInjectionServlet2.java`, `RefererFilter.java`. \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java b/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java deleted file mode 100644 index 97444932ae17..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/RefererFilter.java +++ /dev/null @@ -1,43 +0,0 @@ -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.util.StringUtils; - -public class RefererFilter implements Filter { - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - HttpServletRequest request = (HttpServletRequest) servletRequest; - HttpServletResponse response = (HttpServletResponse) servletResponse; - String refefer = request.getHeader("Referer"); - boolean result = verifReferer(refefer); - if (result){ - filterChain.doFilter(servletRequest, servletResponse); - } - response.sendError(444, "Referer xxx."); - } - - @Override - public void destroy() { - } - - public static boolean verifReferer(String referer){ - if (StringUtils.isEmpty(referer)){ - return false; - } - if (referer.startsWith("http://www.baidu.com/")){ - return true; - } - return false; - } -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/options b/java/ql/test/experimental/query-tests/security/CWE-352/options deleted file mode 100644 index 3676b8e38b69..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../stubs/gson-2.8.6/:${testdir}/../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../stubs/springframework-5.2.3/:${testdir}/../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../stubs/spring-core-5.3.2/ diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java index 3a823fade5b0..edfe917400b7 100644 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java @@ -1,10 +1,21 @@ package org.springframework.core.annotation; +import java.lang.annotation.Annotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +@Documented public @interface AliasFor { @AliasFor("attribute") String value() default ""; @AliasFor("value") String attribute() default ""; - + + Class annotation() default Annotation.class; } diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java new file mode 100644 index 000000000000..372d06cc7383 --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java @@ -0,0 +1,8 @@ +package org.springframework.core.io; + +import java.io.IOException; +import java.io.InputStream; + +public interface InputStreamSource { + InputStream getInputStream() throws IOException; +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java new file mode 100644 index 000000000000..6bd357f2228e --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java @@ -0,0 +1,46 @@ +package org.springframework.core.io; + +import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import org.springframework.lang.Nullable; + +public interface Resource extends InputStreamSource { + boolean exists(); + + default boolean isReadable() { + return this.exists(); + } + + default boolean isOpen() { + return false; + } + + default boolean isFile() { + return false; + } + + URL getURL() throws IOException; + + URI getURI() throws IOException; + + File getFile() throws IOException; + + default ReadableByteChannel readableChannel() throws IOException { + return null; + } + + long contentLength() throws IOException; + + long lastModified() throws IOException; + + Resource createRelative(String var1) throws IOException; + + @Nullable + String getFilename(); + + String getDescription(); +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java new file mode 100644 index 000000000000..44bdae10fda5 --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java @@ -0,0 +1,13 @@ +package org.springframework.lang; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Nullable { +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java new file mode 100644 index 000000000000..78d384d72660 --- /dev/null +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java @@ -0,0 +1,53 @@ +package org.springframework.util; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.Closeable; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.StringWriter; +import java.io.Writer; +import java.nio.file.Files; +import org.springframework.lang.Nullable; + +public abstract class FileCopyUtils { + public static final int BUFFER_SIZE = 4096; + + public FileCopyUtils() { + } + + public static int copy(File in, File out) throws IOException { + return 1; + } + + public static void copy(byte[] in, File out) throws IOException {} + + public static byte[] copyToByteArray(File in) throws IOException { + return null; + } + + public static int copy(InputStream in, OutputStream out) throws IOException { + return 1; + } + + public static void copy(byte[] in, OutputStream out) throws IOException {} + + public static byte[] copyToByteArray(@Nullable InputStream in) throws IOException { + return null; + } + + public static int copy(Reader in, Writer out) throws IOException { + return 1; + } + + public static void copy(String in, Writer out) throws IOException {} + + public static String copyToString(@Nullable Reader in) throws IOException { + return null; + } + + private static void close(Closeable closeable) {} +} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java index 6ee07f84593f..6ea27bbffa2f 100644 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java +++ b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java @@ -5,4 +5,4 @@ public abstract class StringUtils { public static boolean isEmpty(Object str) { return str == null || "".equals(str); } -} \ No newline at end of file +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java index 1190be7b879b..541c7cd4e217 100644 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java @@ -1,19 +1,51 @@ package org.springframework.web.bind.annotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import org.springframework.core.annotation.AliasFor; -@RequestMapping +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping( + method = {RequestMethod.GET} +) public @interface GetMapping { - + @AliasFor( + annotation = RequestMapping.class + ) String name() default ""; + @AliasFor( + annotation = RequestMapping.class + ) String[] value() default {}; + @AliasFor( + annotation = RequestMapping.class + ) String[] path() default {}; + @AliasFor( + annotation = RequestMapping.class + ) String[] params() default {}; + @AliasFor( + annotation = RequestMapping.class + ) + String[] headers() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) String[] consumes() default {}; + @AliasFor( + annotation = RequestMapping.class + ) String[] produces() default {}; } diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java new file mode 100644 index 000000000000..5f269bbcbb87 --- /dev/null +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java @@ -0,0 +1,4 @@ +package org.springframework.web.bind.annotation; + +public @interface Mapping { +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java index ddb36bce4c00..ed692a03063c 100644 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java @@ -1,15 +1,32 @@ package org.springframework.web.bind.annotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import org.springframework.core.annotation.AliasFor; +@Target({ElementType.TYPE, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Mapping public @interface RequestMapping { String name() default ""; @AliasFor("path") String[] value() default {}; - + @AliasFor("value") String[] path() default {}; RequestMethod[] method() default {}; + + String[] params() default {}; + + String[] headers() default {}; + + String[] consumes() default {}; + + String[] produces() default {}; } diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java new file mode 100644 index 000000000000..56094811c376 --- /dev/null +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java @@ -0,0 +1,23 @@ +package org.springframework.web.bind.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; + +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface RequestParam { + @AliasFor("name") + String value() default ""; + + @AliasFor("value") + String name() default ""; + + boolean required() default true; + + String defaultValue() default "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"; +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java index b2134009968b..4f21b6daaaf0 100644 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java @@ -1,4 +1,13 @@ package org.springframework.web.bind.annotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented public @interface ResponseBody { } diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java new file mode 100644 index 000000000000..93ea3439fede --- /dev/null +++ b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java @@ -0,0 +1,38 @@ +package org.springframework.web.multipart; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import org.springframework.core.io.InputStreamSource; +import org.springframework.core.io.Resource; +import org.springframework.lang.Nullable; +import org.springframework.util.FileCopyUtils; + +public interface MultipartFile extends InputStreamSource { + String getName(); + + @Nullable + String getOriginalFilename(); + + @Nullable + String getContentType(); + + boolean isEmpty(); + + long getSize(); + + byte[] getBytes() throws IOException; + + InputStream getInputStream() throws IOException; + + default Resource getResource() { + return null; + } + + void transferTo(File var1) throws IOException, IllegalStateException; + + default void transferTo(Path dest) throws IOException, IllegalStateException { + } +} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java new file mode 100644 index 000000000000..cc255efc00ff --- /dev/null +++ b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java @@ -0,0 +1,30 @@ +package javax.servlet.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface WebServlet { + String name() default ""; + + String[] value() default {}; + + String[] urlPatterns() default {}; + + int loadOnStartup() default -1; + + boolean asyncSupported() default false; + + String smallIcon() default ""; + + String largeIcon() default ""; + + String description() default ""; + + String displayName() default ""; +} From 15206fd2ce3d53168caa2d0250c2b9036dccfca9 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 17 Mar 2021 15:52:05 +0800 Subject: [PATCH 0032/1662] JsonpInjection.ql autoformatted --- java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index 068469328eae..eb4fe4e5b66a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -46,7 +46,7 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration { /** Eliminate the method of calling the node is not the get method. */ override predicate isSanitizer(DataFlow::Node node) { - not getACallingCallableOrSelf(node.getEnclosingCallable()) instanceof RequestGetMethod + not getACallingCallableOrSelf(node.getEnclosingCallable()) instanceof RequestGetMethod } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { From 164b383fda25be40906e216a53581c5fec4da4df Mon Sep 17 00:00:00 2001 From: yoff Date: Fri, 19 Mar 2021 19:12:13 +0100 Subject: [PATCH 0033/1662] Update python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py Co-authored-by: Rasmus Wriedt Larsen --- .../test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py index 028c318be668..e4205c498244 100644 --- a/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py @@ -29,3 +29,11 @@ def test_fluent_safe(): conn = SSL.Connection(context, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) r = conn.connect((hostname, 443)) print(r, conn.get_protocol_version_name()) + +def test_safe_by_construction(): + hostname = 'www.python.org' + context = SSL.Context(SSL.TLSv1_2_METHOD) + + conn = SSL.Connection(context, socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + r = conn.connect((hostname, 443)) + print(conn.get_protocol_version_name()) From 0200aedc2efc939b96170951d848d440fcbb8e4a Mon Sep 17 00:00:00 2001 From: yo-h <55373593+yo-h@users.noreply.github.com> Date: Sun, 21 Mar 2021 12:55:25 -0400 Subject: [PATCH 0034/1662] Java 16: adjust test `options` --- java/ql/test/library-tests/dataflow/records/options | 2 +- java/ql/test/library-tests/dataflow/taint-format/options | 1 - java/ql/test/library-tests/printAst/options | 2 +- java/ql/test/library-tests/ssa/options | 2 +- java/ql/test/query-tests/StringFormat/options | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 java/ql/test/library-tests/dataflow/taint-format/options delete mode 100644 java/ql/test/query-tests/StringFormat/options diff --git a/java/ql/test/library-tests/dataflow/records/options b/java/ql/test/library-tests/dataflow/records/options index 81817b377852..fc57fe025b9a 100644 --- a/java/ql/test/library-tests/dataflow/records/options +++ b/java/ql/test/library-tests/dataflow/records/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args --enable-preview -source 15 -target 15 +//semmle-extractor-options: --javac-args -source 16 -target 16 diff --git a/java/ql/test/library-tests/dataflow/taint-format/options b/java/ql/test/library-tests/dataflow/taint-format/options deleted file mode 100644 index 81817b377852..000000000000 --- a/java/ql/test/library-tests/dataflow/taint-format/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args --enable-preview -source 15 -target 15 diff --git a/java/ql/test/library-tests/printAst/options b/java/ql/test/library-tests/printAst/options index 81817b377852..e41003a6e3cf 100644 --- a/java/ql/test/library-tests/printAst/options +++ b/java/ql/test/library-tests/printAst/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args --enable-preview -source 15 -target 15 +//semmle-extractor-options: --javac-args --enable-preview -source 16 -target 16 diff --git a/java/ql/test/library-tests/ssa/options b/java/ql/test/library-tests/ssa/options index 81817b377852..e41003a6e3cf 100644 --- a/java/ql/test/library-tests/ssa/options +++ b/java/ql/test/library-tests/ssa/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args --enable-preview -source 15 -target 15 +//semmle-extractor-options: --javac-args --enable-preview -source 16 -target 16 diff --git a/java/ql/test/query-tests/StringFormat/options b/java/ql/test/query-tests/StringFormat/options deleted file mode 100644 index 81817b377852..000000000000 --- a/java/ql/test/query-tests/StringFormat/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args --enable-preview -source 15 -target 15 From 73e940de74bb326664db451b97fa58e67e683400 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Tue, 2 Feb 2021 17:37:14 +0100 Subject: [PATCH 0035/1662] Added query for Jakarta EL injections - Added JakartaExpressionInjection.ql - Added a qhelp file with examples --- .../Security/CWE/CWE-094/InjectionLib.qll | 14 +++ .../CWE-094/JakartaExpressionInjection.qhelp | 65 ++++++++++++ .../CWE/CWE-094/JakartaExpressionInjection.ql | 20 ++++ .../CWE-094/JakartaExpressionInjectionLib.qll | 98 +++++++++++++++++++ .../Security/CWE/CWE-094/JexlInjectionLib.qll | 13 +-- .../SaferExpressionEvaluationWithJuel.java | 10 ++ .../UnsafeExpressionEvaluationWithJuel.java | 5 + 7 files changed, 213 insertions(+), 12 deletions(-) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/UnsafeExpressionEvaluationWithJuel.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll new file mode 100644 index 000000000000..adab79d6f5c3 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll @@ -0,0 +1,14 @@ +import java +import semmle.code.java.dataflow.FlowSources + +/** + * Holds if `fromNode` to `toNode` is a dataflow step that returns data from + * a bean by calling one of its getters. + */ +predicate returnsDataFromBean(DataFlow::Node fromNode, DataFlow::Node toNode) { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + m instanceof GetterMethod and + ma.getQualifier() = fromNode.asExpr() and + ma = toNode.asExpr() + ) +} diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp new file mode 100644 index 000000000000..6e6b5f633947 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp @@ -0,0 +1,65 @@ + + + + +

    +Jakarta Expression Language (EL) is an expression language for Java applications. +There are a single language specification and multiple implementations +such as Glassfish, Juel, Apache Commons EL, etc. +The language allows invocation of methods available in the JVM. +If an expression is built using attacker-controlled data, +and then evaluated, then it may allow the attacker to run arbitrary code. +

    +
    + + +

    +It is generally recommended to avoid using untrusted data in an EL expression. +Before using untrusted data to build an EL expressoin, the data should be validated +to ensure it is not evaluated as expression language. If the EL implementaion offers +configuring a sandbox for EL expression, they should be run in a restircitive sandbox +that allows accessing only explicitly allowed classes. If the EL implementation +does not allow sandboxing, consider using other expressiong language implementations +with sandboxing capabilities such as Apache Commons JEXL or the Spring Expression Language. +

    +
    + + +

    +The following example shows how untrusted data is used to build and run an expression +using the JUEL interpreter: +

    + + +

    +JUEL does not allow to run expression in a sandbox. To prevent running arbitrary code, +incoming data has to be checked before including to an expression. The next example +uses a Regex pattern to check whether a user tries to run an allowed exression or not: +

    + + +
    + + +
  • + Eclipse Foundation: + Jakarta Expression Language. +
  • +
  • + Jakarta EE documentation: + Jakarta Expression Language API +
  • +
  • + OWASP: + Expression Language Injection. +
  • +
  • + JUEL: + Home page +
  • +
  • + Apache Foundation: + Apache Commons EL +
  • +
    +
    diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql new file mode 100644 index 000000000000..b94c98201dea --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql @@ -0,0 +1,20 @@ +/** + * @name Java EE Expression Language injection + * @description Evaluation of a user-controlled Jave EE expression + * may lead to arbitrary code execution. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/javaee-expression-injection + * @tags security + * external/cwe/cwe-094 + */ + +import java +import JavaEEExpressionInjectionLib +import DataFlow::PathGraph + +from DataFlow::PathNode source, DataFlow::PathNode sink, JavaEEExpressionInjectionConfig conf +where conf.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "Java EE Expression Language injection from $@.", + source.getNode(), "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll new file mode 100644 index 000000000000..d43b31c98881 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -0,0 +1,98 @@ +import java +import InjectionLib +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.dataflow.TaintTracking + +/** + * A taint-tracking configuration for unsafe user input + * that is used to construct and evaluate a Java EE expression. + */ +class JavaEEExpressionInjectionConfig extends TaintTracking::Configuration { + JavaEEExpressionInjectionConfig() { this = "JavaEEExpressionInjectionConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof ExpressionEvaluationSink } + + override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { + any(TaintPropagatingCall c).taintFlow(fromNode, toNode) or + returnsDataFromBean(fromNode, toNode) + } +} + +/** + * A sink for Expresssion Language injection vulnerabilities, + * i.e. method calls that run evaluation of a Java EE expression. + */ +private class ExpressionEvaluationSink extends DataFlow::ExprNode { + ExpressionEvaluationSink() { + exists(MethodAccess ma, Method m, Expr taintFrom | + ma.getMethod() = m and taintFrom = this.asExpr() + | + m.getDeclaringType() instanceof ValueExpression and + m.hasName(["getValue", "setValue"]) and + ma.getQualifier() = taintFrom + or + m.getDeclaringType() instanceof MethodExpression and + m.hasName("invoke") and + ma.getQualifier() = taintFrom + or + m.getDeclaringType() instanceof LambdaExpression and + m.hasName("invoke") and + ma.getQualifier() = taintFrom + or + m.getDeclaringType() instanceof ELProcessor and + m.hasName(["eval", "getValue", "setValue"]) and + ma.getArgument(0) = taintFrom + ) + } +} + +/** + * Defines method calls that propagate tainted expressions. + */ +private class TaintPropagatingCall extends Call { + Expr taintFromExpr; + + TaintPropagatingCall() { + taintFromExpr = this.getArgument(1) and + exists(Method m | this.(MethodAccess).getMethod() = m | + m.getDeclaringType() instanceof ExpressionFactory and + m.hasName(["createValueExpression", "createMethodExpression"]) and + taintFromExpr.getType() instanceof TypeString + ) + or + exists(Constructor c | this.(ConstructorCall).getConstructor() = c | + c.getDeclaringType() instanceof LambdaExpression and + taintFromExpr.getType() instanceof ValueExpression + ) + } + + /** + * Holds if `fromNode` to `toNode` is a dataflow step that propagates + * tainted data. + */ + predicate taintFlow(DataFlow::Node fromNode, DataFlow::Node toNode) { + fromNode.asExpr() = taintFromExpr and toNode.asExpr() = this + } +} + +private class ELProcessor extends RefType { + ELProcessor() { hasQualifiedName("javax.el", "ELProcessor") } +} + +private class ExpressionFactory extends RefType { + ExpressionFactory() { hasQualifiedName("javax.el", "ExpressionFactory") } +} + +private class ValueExpression extends RefType { + ValueExpression() { hasQualifiedName("javax.el", "ValueExpression") } +} + +private class MethodExpression extends RefType { + MethodExpression() { hasQualifiedName("javax.el", "MethodExpression") } +} + +private class LambdaExpression extends RefType { + LambdaExpression() { hasQualifiedName("javax.el", "LambdaExpression") } +} diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll index 561d7e46ae90..51084a9862ce 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll @@ -1,4 +1,5 @@ import java +import InjectionLib import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking @@ -152,18 +153,6 @@ private predicate createsJexlEngine(DataFlow::Node fromNode, DataFlow::Node toNo ) } -/** - * Holds if `fromNode` to `toNode` is a dataflow step that returns data from - * a bean by calling one of its getters. - */ -private predicate returnsDataFromBean(DataFlow::Node fromNode, DataFlow::Node toNode) { - exists(MethodAccess ma, Method m | ma.getMethod() = m | - m instanceof GetterMethod and - ma.getQualifier() = fromNode.asExpr() and - ma = toNode.asExpr() - ) -} - /** * A methods in the `JexlEngine` class that gets or sets a property with a JEXL expression. */ diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java b/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java new file mode 100644 index 000000000000..54fb9a0ed36c --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java @@ -0,0 +1,10 @@ +String input = getRemoteUserInput(); +String pattern = "(inside|outside)\\.(temperature|humidity)"; +if (!input.matches(pattern)) { + throw new IllegalArgumentException("Unexpected exression"); +} +String expression = "${" + input + "}"; +ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); +ValueExpression e = factory.createValueExpression(context, expression, Object.class); +SimpleContext context = getContext(); +Object result = e.getValue(context); \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/UnsafeExpressionEvaluationWithJuel.java b/java/ql/src/experimental/Security/CWE/CWE-094/UnsafeExpressionEvaluationWithJuel.java new file mode 100644 index 000000000000..27afa0fcb497 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/UnsafeExpressionEvaluationWithJuel.java @@ -0,0 +1,5 @@ +String expression = "${" + getRemoteUserInput() + "}"; +ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); +ValueExpression e = factory.createValueExpression(context, expression, Object.class); +SimpleContext context = getContext(); +Object result = e.getValue(context); \ No newline at end of file From adb1ed380ac4736860eac8ea6cfadb8f38497db5 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Sun, 21 Mar 2021 20:36:47 +0300 Subject: [PATCH 0036/1662] Added tests for Jakarta expression injection --- .../CWE/CWE-094/JakartaExpressionInjection.ql | 10 +-- .../CWE-094/JakartaExpressionInjectionLib.qll | 8 +- .../JakartaExpressionInjection.expected | 59 +++++++++++++ .../CWE-094/JakartaExpressionInjection.java | 87 +++++++++++++++++++ .../CWE-094/JakartaExpressionInjection.qlref | 1 + .../query-tests/security/CWE-094/options | 3 +- .../stubs/java-ee-el/javax/el/ELContext.java | 3 + .../stubs/java-ee-el/javax/el/ELManager.java | 5 ++ .../java-ee-el/javax/el/ELProcessor.java | 7 ++ .../javax/el/ExpressionFactory.java | 17 ++++ .../java-ee-el/javax/el/LambdaExpression.java | 8 ++ .../java-ee-el/javax/el/MethodExpression.java | 5 ++ .../javax/el/StandardELContext.java | 5 ++ .../java-ee-el/javax/el/ValueExpression.java | 6 ++ .../de/odysseus/el/ExpressionFactoryImpl.java | 5 ++ .../de/odysseus/el/util/SimpleContext.java | 5 ++ 16 files changed, 223 insertions(+), 11 deletions(-) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/ELContext.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/ELManager.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/ExpressionFactory.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/LambdaExpression.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/MethodExpression.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/StandardELContext.java create mode 100644 java/ql/test/stubs/java-ee-el/javax/el/ValueExpression.java create mode 100644 java/ql/test/stubs/juel-2.2/de/odysseus/el/ExpressionFactoryImpl.java create mode 100644 java/ql/test/stubs/juel-2.2/de/odysseus/el/util/SimpleContext.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql index b94c98201dea..8190ec3d61f1 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql @@ -1,6 +1,6 @@ /** - * @name Java EE Expression Language injection - * @description Evaluation of a user-controlled Jave EE expression + * @name Jakarta Expression Language injection + * @description Evaluation of a user-controlled expression * may lead to arbitrary code execution. * @kind path-problem * @problem.severity error @@ -11,10 +11,10 @@ */ import java -import JavaEEExpressionInjectionLib +import JakartaExpressionInjectionLib import DataFlow::PathGraph -from DataFlow::PathNode source, DataFlow::PathNode sink, JavaEEExpressionInjectionConfig conf +from DataFlow::PathNode source, DataFlow::PathNode sink, JakartaExpressionInjectionConfig conf where conf.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "Java EE Expression Language injection from $@.", +select sink.getNode(), source, sink, "Jakarta Expression Language injection from $@.", source.getNode(), "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index d43b31c98881..bc22f7c32572 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -5,10 +5,10 @@ import semmle.code.java.dataflow.TaintTracking /** * A taint-tracking configuration for unsafe user input - * that is used to construct and evaluate a Java EE expression. + * that is used to construct and evaluate an expression. */ -class JavaEEExpressionInjectionConfig extends TaintTracking::Configuration { - JavaEEExpressionInjectionConfig() { this = "JavaEEExpressionInjectionConfig" } +class JakartaExpressionInjectionConfig extends TaintTracking::Configuration { + JakartaExpressionInjectionConfig() { this = "JakartaExpressionInjectionConfig" } override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } @@ -22,7 +22,7 @@ class JavaEEExpressionInjectionConfig extends TaintTracking::Configuration { /** * A sink for Expresssion Language injection vulnerabilities, - * i.e. method calls that run evaluation of a Java EE expression. + * i.e. method calls that run evaluation of an expression. */ private class ExpressionEvaluationSink extends DataFlow::ExprNode { ExpressionEvaluationSink() { diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected new file mode 100644 index 000000000000..111cc81541c2 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected @@ -0,0 +1,59 @@ +edges +| JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:24:31:24:40 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:30:24:30:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:37:24:37:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:44:24:44:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:54:24:54:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:61:24:61:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:70:24:70:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:79:24:79:33 | expression : String | +| JakartaExpressionInjection.java:30:24:30:33 | expression : String | JakartaExpressionInjection.java:32:28:32:37 | expression | +| JakartaExpressionInjection.java:37:24:37:33 | expression : String | JakartaExpressionInjection.java:39:32:39:41 | expression | +| JakartaExpressionInjection.java:44:24:44:33 | expression : String | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | +| JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | +| JakartaExpressionInjection.java:54:24:54:33 | expression : String | JakartaExpressionInjection.java:56:32:56:41 | expression | +| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | +| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:65:13:65:13 | e | +| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | +| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | +| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:65:13:65:13 | e | +| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | +| JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | +| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | +| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:74:13:74:13 | e | +| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | +| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | +| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:74:13:74:13 | e | +| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | +| JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | +| JakartaExpressionInjection.java:79:24:79:33 | expression : String | JakartaExpressionInjection.java:83:13:83:13 | e | +nodes +| JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:30:24:30:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:32:28:32:37 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:37:24:37:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:39:32:39:41 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:44:24:44:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | semmle.label | new LambdaExpression(...) : LambdaExpression | +| JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | semmle.label | lambdaExpression | +| JakartaExpressionInjection.java:54:24:54:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:56:32:56:41 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:61:24:61:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | semmle.label | createValueExpression(...) : ValueExpression | +| JakartaExpressionInjection.java:65:13:65:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | semmle.label | e : ValueExpression | +| JakartaExpressionInjection.java:70:24:70:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | semmle.label | createValueExpression(...) : ValueExpression | +| JakartaExpressionInjection.java:74:13:74:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | semmle.label | e : ValueExpression | +| JakartaExpressionInjection.java:79:24:79:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:83:13:83:13 | e | semmle.label | e | +#select +| JakartaExpressionInjection.java:32:28:32:37 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:32:28:32:37 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:39:32:39:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:39:32:39:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:56:32:56:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:56:32:56:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:65:13:65:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:65:13:65:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:74:13:74:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:74:13:74:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:83:13:83:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:83:13:83:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java new file mode 100644 index 000000000000..a9fb2d45d6f4 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java @@ -0,0 +1,87 @@ +import java.io.IOException; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.ArrayList; +import java.util.function.Consumer; + +import javax.el.ELContext; +import javax.el.ELManager; +import javax.el.ELProcessor; +import javax.el.ExpressionFactory; +import javax.el.LambdaExpression; +import javax.el.MethodExpression; +import javax.el.StandardELContext; +import javax.el.ValueExpression; + +public class JakartaExpressionInjection { + + private static void testWithSocket(Consumer action) throws IOException { + try (ServerSocket serverSocket = new ServerSocket(0)) { + try (Socket socket = serverSocket.accept()) { + byte[] bytes = new byte[1024]; + int n = socket.getInputStream().read(bytes); + String expression = new String(bytes, 0, n); + action.accept(expression); + } + } + } + + private static void testWithELProcessorEval() throws IOException { + testWithSocket(expression -> { + ELProcessor processor = new ELProcessor(); + processor.eval(expression); + }); + } + + private static void testWithELProcessorGetValue() throws IOException { + testWithSocket(expression -> { + ELProcessor processor = new ELProcessor(); + processor.getValue(expression, Object.class); + }); + } + + private static void testWithLambdaExpressionInvoke() throws IOException { + testWithSocket(expression -> { + ExpressionFactory factory = ELManager.getExpressionFactory(); + StandardELContext context = new StandardELContext(factory); + ValueExpression valueExpression = factory.createValueExpression(context, expression, Object.class); + LambdaExpression lambdaExpression = new LambdaExpression(new ArrayList<>(), valueExpression); + lambdaExpression.invoke(context, new Object[0]); + }); + } + + private static void testWithELProcessorSetValue() throws IOException { + testWithSocket(expression -> { + ELProcessor processor = new ELProcessor(); + processor.setValue(expression, new Object()); + }); + } + + private static void testWithJuelValueExpressionGetValue() throws IOException { + testWithSocket(expression -> { + ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); + ELContext context = new de.odysseus.el.util.SimpleContext(); + ValueExpression e = factory.createValueExpression(context, expression, Object.class); + e.getValue(context); + }); + } + + private static void testWithJuelValueExpressionSetValue() throws IOException { + testWithSocket(expression -> { + ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); + ELContext context = new de.odysseus.el.util.SimpleContext(); + ValueExpression e = factory.createValueExpression(context, expression, Object.class); + e.setValue(context, new Object()); + }); + } + + private static void testWithJuelMethodExpressionInvoke() throws IOException { + testWithSocket(expression -> { + ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); + ELContext context = new de.odysseus.el.util.SimpleContext(); + MethodExpression e = factory.createMethodExpression(context, expression, Object.class, new Class[0]); + e.invoke(context, new Object[0]); + }); + } + +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref new file mode 100644 index 000000000000..3154ee5ccad4 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-094/JakartaExpressionInjection.ql \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/options b/java/ql/test/experimental/query-tests/security/CWE-094/options index a8e30ce30b40..ec3354ea41ce 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/options +++ b/java/ql/test/experimental/query-tests/security/CWE-094/options @@ -1,2 +1 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/scriptengine - +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2 \ No newline at end of file diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ELContext.java b/java/ql/test/stubs/java-ee-el/javax/el/ELContext.java new file mode 100644 index 000000000000..ce3840c69c8d --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/ELContext.java @@ -0,0 +1,3 @@ +package javax.el; + +public class ELContext {} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ELManager.java b/java/ql/test/stubs/java-ee-el/javax/el/ELManager.java new file mode 100644 index 000000000000..7d24f739a3f8 --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/ELManager.java @@ -0,0 +1,5 @@ +package javax.el; + +public class ELManager { + public static ExpressionFactory getExpressionFactory() { return null; } +} \ No newline at end of file diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java b/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java new file mode 100644 index 000000000000..3c523e685c5e --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java @@ -0,0 +1,7 @@ +package javax.el; + +public class ELProcessor { + public Object eval(String expression) { return null; } + public Object getValue(String expression, Class expectedType) { return null; } + public void setValue(String expression, Object value) {} +} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ExpressionFactory.java b/java/ql/test/stubs/java-ee-el/javax/el/ExpressionFactory.java new file mode 100644 index 000000000000..31ff79169acb --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/ExpressionFactory.java @@ -0,0 +1,17 @@ +package javax.el; + +public class ExpressionFactory { + public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, + Class[] expectedParamTypes) { + + return null; + } + + public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType) { + return null; + } + + public ValueExpression createValueExpression(Object instance, Class expectedType) { + return null; + } +} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/LambdaExpression.java b/java/ql/test/stubs/java-ee-el/javax/el/LambdaExpression.java new file mode 100644 index 000000000000..4be01e9d2e4b --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/LambdaExpression.java @@ -0,0 +1,8 @@ +package javax.el; + +import java.util.List; + +public class LambdaExpression { + public LambdaExpression(List formalParameters, ValueExpression expression) {} + public Object invoke(Object... args) { return null; } +} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/MethodExpression.java b/java/ql/test/stubs/java-ee-el/javax/el/MethodExpression.java new file mode 100644 index 000000000000..ac50ece80e36 --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/MethodExpression.java @@ -0,0 +1,5 @@ +package javax.el; + +public class MethodExpression { + public Object invoke(ELContext context, Object[] params) { return null; } +} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/StandardELContext.java b/java/ql/test/stubs/java-ee-el/javax/el/StandardELContext.java new file mode 100644 index 000000000000..22e3f2a9fc13 --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/StandardELContext.java @@ -0,0 +1,5 @@ +package javax.el; + +public class StandardELContext extends ELContext { + public StandardELContext(ExpressionFactory factory) {} +} diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ValueExpression.java b/java/ql/test/stubs/java-ee-el/javax/el/ValueExpression.java new file mode 100644 index 000000000000..9a231215640a --- /dev/null +++ b/java/ql/test/stubs/java-ee-el/javax/el/ValueExpression.java @@ -0,0 +1,6 @@ +package javax.el; + +public class ValueExpression { + public Object getValue(ELContext context) { return null; } + public void setValue(ELContext context, Object value) {} +} diff --git a/java/ql/test/stubs/juel-2.2/de/odysseus/el/ExpressionFactoryImpl.java b/java/ql/test/stubs/juel-2.2/de/odysseus/el/ExpressionFactoryImpl.java new file mode 100644 index 000000000000..a555cf88dee0 --- /dev/null +++ b/java/ql/test/stubs/juel-2.2/de/odysseus/el/ExpressionFactoryImpl.java @@ -0,0 +1,5 @@ +package de.odysseus.el; + +import javax.el.ExpressionFactory; + +public class ExpressionFactoryImpl extends ExpressionFactory {} diff --git a/java/ql/test/stubs/juel-2.2/de/odysseus/el/util/SimpleContext.java b/java/ql/test/stubs/juel-2.2/de/odysseus/el/util/SimpleContext.java new file mode 100644 index 000000000000..aa4f449e5fa5 --- /dev/null +++ b/java/ql/test/stubs/juel-2.2/de/odysseus/el/util/SimpleContext.java @@ -0,0 +1,5 @@ +package de.odysseus.el.util; + +import javax.el.ELContext; + +public class SimpleContext extends ELContext {} From 6c246994035a35925d870f97abc58c04162d53f9 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Sun, 21 Mar 2021 21:16:00 +0300 Subject: [PATCH 0037/1662] Cover both javax.el and jakarta.el packages --- .../CWE-094/JakartaExpressionInjectionLib.qll | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index bc22f7c32572..22f421b8bf8c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -77,22 +77,26 @@ private class TaintPropagatingCall extends Call { } } -private class ELProcessor extends RefType { - ELProcessor() { hasQualifiedName("javax.el", "ELProcessor") } +private class JakartaType extends RefType { + JakartaType() { getPackage().hasName(["javax.el", "jakarta.el"]) } } -private class ExpressionFactory extends RefType { - ExpressionFactory() { hasQualifiedName("javax.el", "ExpressionFactory") } +private class ELProcessor extends JakartaType { + ELProcessor() { hasName("ELProcessor") } } -private class ValueExpression extends RefType { - ValueExpression() { hasQualifiedName("javax.el", "ValueExpression") } +private class ExpressionFactory extends JakartaType { + ExpressionFactory() { hasName("ExpressionFactory") } } -private class MethodExpression extends RefType { - MethodExpression() { hasQualifiedName("javax.el", "MethodExpression") } +private class ValueExpression extends JakartaType { + ValueExpression() { hasName("ValueExpression") } +} + +private class MethodExpression extends JakartaType { + MethodExpression() { hasName("MethodExpression") } } private class LambdaExpression extends RefType { - LambdaExpression() { hasQualifiedName("javax.el", "LambdaExpression") } + LambdaExpression() { hasName("LambdaExpression") } } From 0e81fd26248875838c751ce44345aee1b8e6c36d Mon Sep 17 00:00:00 2001 From: Taus Brock-Nannestad Date: Mon, 22 Mar 2021 18:41:22 +0100 Subject: [PATCH 0038/1662] Python: Move `Boolean` into `TypeTrackerPrivate` In general, this may be defined already for other languages, so moving it in here will avoid potential clashes. --- python/ql/src/experimental/typetracking/TypeTracker.qll | 5 ----- .../src/experimental/typetracking/TypeTrackerPrivate.qll | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/python/ql/src/experimental/typetracking/TypeTracker.qll b/python/ql/src/experimental/typetracking/TypeTracker.qll index f21d3a2a91b6..056e7ba5cf03 100644 --- a/python/ql/src/experimental/typetracking/TypeTracker.qll +++ b/python/ql/src/experimental/typetracking/TypeTracker.qll @@ -78,11 +78,6 @@ module StepSummary { } } -/** - * A utility class that is equivalent to `boolean` but does not require type joining. - */ -private class Boolean extends boolean { - Boolean() { this = true or this = false } } private newtype TTypeTracker = MkTypeTracker(Boolean hasCall, OptionalContentName content) diff --git a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll index d26a76b3355c..ab39e8be5be5 100644 --- a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll +++ b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll @@ -95,3 +95,10 @@ predicate basicLoadStep(Node nodeFrom, Node nodeTo, string content) { nodeTo = a ) } + +/** + * A utility class that is equivalent to `boolean` but does not require type joining. + */ +class Boolean extends boolean { + Boolean() { this = true or this = false } +} From 7cdf439b83b3d166ac0b9083968178b7a1e380ca Mon Sep 17 00:00:00 2001 From: Taus Brock-Nannestad Date: Mon, 22 Mar 2021 18:42:24 +0100 Subject: [PATCH 0039/1662] Python: Clean up `basicStoreStep` Moves the `flowsTo` logic into the shared implementation, so that `TypeTrackingPrivate` only has to define the shape of immediate store steps. Also cleans up the documentation to talk a bit more about what `content` can represent, and what caveats there are. --- .../experimental/typetracking/TypeTracker.qll | 48 +++++++++++++++++-- .../typetracking/TypeTrackerPrivate.qll | 32 ++----------- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/python/ql/src/experimental/typetracking/TypeTracker.qll b/python/ql/src/experimental/typetracking/TypeTracker.qll index 056e7ba5cf03..46461d3e22e3 100644 --- a/python/ql/src/experimental/typetracking/TypeTracker.qll +++ b/python/ql/src/experimental/typetracking/TypeTracker.qll @@ -2,7 +2,18 @@ private import TypeTrackerPrivate -/** Any string that may appear as the name of a piece of content. */ +/** + * Any string that may appear as the name of a piece of content. This will usually include things like: + * - Attribute names (in Python) + * - Property names (in JavaScript) + * + * In general, this can also be used to model things like stores to specific list indices. To ensure + * correctness, it is important that + * + * - different types of content do not have overlapping names, and + * - the empty string `""` is not a valid piece of content, as it is used to indicate the absence of + * content instead. + */ class ContentName extends string { ContentName() { this = getPossibleContentName() } } @@ -70,14 +81,41 @@ module StepSummary { summary = ReturnStep() or exists(string content | - basicStoreStep(nodeFrom, nodeTo, content) and + localSourceStoreStep(nodeFrom, nodeTo, content) and summary = StoreStep(content) or basicLoadStep(nodeFrom, nodeTo, content) and summary = LoadStep(content) ) } -} + /** + * Holds if `nodeFrom` is being written to the `content` content of the object in `nodeTo`. + * + * Note that `nodeTo` will always be a local source node that flows to the place where the content + * is written in `basicStoreStep`. This may lead to the flow of information going "back in time" + * from the point of view of the execution of the program. + * + * For instance, if we interpret attribute writes in Python as writing to content with the same + * name as the attribute and consider the following snippet + * + * ```python + * def foo(y): + * x = Foo() + * bar(x) + * x.attr = y + * baz(x) + * + * def bar(x): + * z = x.attr + * ``` + * for the attribute write `x.attr = y`, we will have `content` being the literal string `"attr"`, + * `nodeFrom` will be `y`, and `nodeTo` will be the object `Foo()` created on the first line of the + * function. This means we will track the fact that `x.attr` can have the type of `y` into the + * assignment to `z` inside `bar`, even though this attribute write happens _after_ `bar` is called. + */ + predicate localSourceStoreStep(Node nodeFrom, LocalSourceNode nodeTo, string content) { + exists(Node obj | nodeTo.flowsTo(obj) and basicStoreStep(nodeFrom, obj, content)) + } } private newtype TTypeTracker = MkTypeTracker(Boolean hasCall, OptionalContentName content) @@ -92,7 +130,7 @@ private newtype TTypeTracker = MkTypeTracker(Boolean hasCall, OptionalContentNam * * It is recommended that all uses of this type are written in the following form, * for tracking some type `myType`: - * ``` + * ```ql * DataFlow::LocalSourceNode myType(DataFlow::TypeTracker t) { * t.start() and * result = < source of myType > @@ -253,7 +291,7 @@ private newtype TTypeBackTracker = MkTypeBackTracker(Boolean hasReturn, Optional * It is recommended that all uses of this type are written in the following form, * for back-tracking some callback type `myCallback`: * - * ``` + * ```ql * DataFlow::LocalSourceNode myCallback(DataFlow::TypeBackTracker t) { * t.start() and * result = (< some API call >).getArgument(< n >).getALocalSource() diff --git a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll index ab39e8be5be5..6469eb93d98e 100644 --- a/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll +++ b/python/ql/src/experimental/typetracking/TypeTrackerPrivate.qll @@ -13,10 +13,8 @@ predicate typePreservingStep(Node nodeFrom, Node nodeTo) { } /** - * Gets the name of a possible piece of content. This will usually include things like - * - * - Attribute names (in Python) - * - Property names (in JavaScript) + * Gets the name of a possible piece of content. For Python, this is currently only attribute names, + * using the name of the attribute for the corresponding content. */ string getPossibleContentName() { result = any(DataFlowPublic::AttrRef a).getAttributeName() } @@ -54,34 +52,12 @@ predicate returnStep(DataFlowPrivate::ReturnNode nodeFrom, Node nodeTo) { /** * Holds if `nodeFrom` is being written to the `content` content of the object in `nodeTo`. - * - * Note that the choice of `nodeTo` does not have to make sense "chronologically". - * All we care about is whether the `content` content of `nodeTo` can have a specific type, - * and the assumption is that if a specific type appears here, then any access of that - * particular content can yield something of that particular type. - * - * Thus, in an example such as - * - * ```python - * def foo(y): - * x = Foo() - * bar(x) - * x.content = y - * baz(x) - * - * def bar(x): - * z = x.content - * ``` - * for the content write `x.content = y`, we will have `content` being the literal string `"content"`, - * `nodeFrom` will be `y`, and `nodeTo` will be the object `Foo()` created on the first line of the - * function. This means we will track the fact that `x.content` can have the type of `y` into the - * assignment to `z` inside `bar`, even though this content write happens _after_ `bar` is called. */ -predicate basicStoreStep(Node nodeFrom, LocalSourceNode nodeTo, string content) { +predicate basicStoreStep(Node nodeFrom, Node nodeTo, string content) { exists(DataFlowPublic::AttrWrite a | a.mayHaveAttributeName(content) and nodeFrom = a.getValue() and - nodeTo.flowsTo(a.getObject()) + nodeTo = a.getObject() ) } From 2576c86ebf2e8a87a8cbe5165ae2ab95a7bec155 Mon Sep 17 00:00:00 2001 From: alexet Date: Thu, 25 Mar 2021 16:16:16 +0000 Subject: [PATCH 0040/1662] Docs: Update the language specification for changes to super. --- .../ql-language-reference/ql-language-specification.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index 0fe542105046..ad88b791019e 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -1116,8 +1116,6 @@ A super expression may only occur in a QL program as the receiver expression for If a super expression includes a ``type``, then that type must be a class that the enclosing class inherits from. -If the super expression does not include a type, then the enclosing class must have a single declared base type, and that base type must be a class. - The value of a super expression is the same as the value of ``this`` in the named tuple. Casts @@ -1169,7 +1167,12 @@ A valid call with results *resolves* to a set of predicates. The ways a call can - If the call has no receiver and the predicate name is a selection identifier, then the qualifier is resolved as a module (see "`Module resolution <#module-resolution>`__"). The identifier is then resolved in the exported predicate environment of the qualifier module. -- If the call has a super expression as the receiver, then it resolves to a member predicate in a class the enclosing class inherits from. If the super expression is unqualified, then the super-class is the single class that the current class inherits from. If there is not exactly one such class, then the program is invalid. Otherwise the super-class is the class named by the qualifier of the super expression. The predicate is resolved by looking up its name and arity in the exported predicate environment of the super-class. +- If the call has a super expression as the receiver, then it resolves to a member predicate in a class that the enclosing class inherits from: + - If the super expression is unqualified and there is a single class that the current class inherits from then the super-class is that class. + - If the super expression is unqualified and there is are multiple classes that the current class inherits from then the super-class is the domain type. + - Otherwise the super-class is the class named by the qualifier of the super expression. + + The predicate is resolved by looking up its name and arity in the exported predicate environment of the super-class. - If the type of the receiver is the same as the enclosing class, the predicate is resolved by looking up its name and arity in the visible predicate environment of the class. From 62a0775cf69c8bda45aeb9b0cdf60f28dafd9c72 Mon Sep 17 00:00:00 2001 From: yoff Date: Thu, 25 Mar 2021 23:09:11 +0100 Subject: [PATCH 0041/1662] Update python/ql/src/Security/CWE-327/examples/secure_protocol.py Co-authored-by: Rasmus Wriedt Larsen --- python/ql/src/Security/CWE-327/examples/secure_protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/Security/CWE-327/examples/secure_protocol.py b/python/ql/src/Security/CWE-327/examples/secure_protocol.py index 94b3557d0172..e349bdae832d 100644 --- a/python/ql/src/Security/CWE-327/examples/secure_protocol.py +++ b/python/ql/src/Security/CWE-327/examples/secure_protocol.py @@ -4,7 +4,7 @@ hostname = 'www.python.org' context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_TLSv1 -context.options |= ssl.OP_NO_TLSv1_1 # This added by me +context.options |= ssl.OP_NO_TLSv1_1 with socket.create_connection((hostname, 443)) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: From 2b257318f1c9e1d4a27f9022d94a08fc3e4cc3da Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 25 Mar 2021 23:22:24 +0100 Subject: [PATCH 0042/1662] Python: more precise comment --- python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py index 3ff1207b527f..ab80ed47dacd 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.py @@ -28,7 +28,7 @@ SSLContext(protocol=ssl.PROTOCOL_TLSv1_2) SSL.Context(SSL.TLSv1_2_METHOD) -# possibly secure versions specified +# insecure versions allowed by specified range SSLContext(protocol=ssl.PROTOCOL_SSLv23) SSLContext(protocol=ssl.PROTOCOL_TLS) SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT) From 54dad57cf4a22a9d01a434d0633606fa8adf7c8f Mon Sep 17 00:00:00 2001 From: yoff Date: Fri, 26 Mar 2021 00:25:40 +0100 Subject: [PATCH 0043/1662] Update python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py Co-authored-by: Rasmus Wriedt Larsen --- python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py index e4205c498244..fa7714118828 100644 --- a/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/pyOpenSSL_fluent.py @@ -23,6 +23,8 @@ def test_fluent_no_TLSv1(): def test_fluent_safe(): hostname = 'www.python.org' context = SSL.Context(SSL.SSLv23_METHOD) + context.set_options(SSL.OP_NO_SSLv2) + context.set_options(SSL.OP_NO_SSLv3) context.set_options(SSL.OP_NO_TLSv1) context.set_options(SSL.OP_NO_TLSv1_1) From 554404575d243ffdff19559e8cbbf4c300019d32 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 00:29:40 +0100 Subject: [PATCH 0044/1662] Python: fix typo and name. --- python/ql/src/Security/CWE-327/ReadMe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/Security/CWE-327/ReadMe.md b/python/ql/src/Security/CWE-327/ReadMe.md index c5330a78fda9..680ae56f4934 100644 --- a/python/ql/src/Security/CWE-327/ReadMe.md +++ b/python/ql/src/Security/CWE-327/ReadMe.md @@ -12,7 +12,7 @@ This should be kept up to date; the world is moving fast and protocols are being - `ssl.wrap_socket` is creating insecure connections, use `SSLContext.wrap_socket` instead. [link](https://docs.python.org/3/library/ssl.html#ssl.wrap_socket) > Deprecated since version 3.7: Since Python 3.2 and 2.7.9, it is recommended to use the `SSLContext.wrap_socket()` instead of `wrap_socket()`. The top-level function is limited and creates an insecure client socket without server name indication or hostname matching. -- Default consteructors are fine, a sluent api is used to constrain possible protocols later. +- Default consteructors are fine, a fluent api is used to constrain possible protocols later. ## Current recomendation From 9488b8bb18fa89614480024700f51c3500f96725 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 00:31:56 +0100 Subject: [PATCH 0045/1662] Python: actually rename --- python/ql/src/Security/CWE-327/{ReadMe.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename python/ql/src/Security/CWE-327/{ReadMe.md => README.md} (100%) diff --git a/python/ql/src/Security/CWE-327/ReadMe.md b/python/ql/src/Security/CWE-327/README.md similarity index 100% rename from python/ql/src/Security/CWE-327/ReadMe.md rename to python/ql/src/Security/CWE-327/README.md From 936757b4bf385addba174a37c24f029781110553 Mon Sep 17 00:00:00 2001 From: yoff Date: Fri, 26 Mar 2021 08:05:51 +0100 Subject: [PATCH 0046/1662] Update python/ql/src/Security/CWE-327/FluentApiModel.qll Co-authored-by: Rasmus Wriedt Larsen --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index d222af704997..4d63a14bdbc9 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -39,13 +39,7 @@ class InsecureContextConfiguration extends DataFlow::Configuration { ) } - override predicate isBarrierIn(DataFlow::Node node) { - exists(ProtocolUnrestriction r | - r = library.protocol_unrestriction() and - node = r.getContext() and - r.getUnrestriction() = tracked_version - ) - } + override predicate isBarrierIn(DataFlow::Node node) { this.isSource(node) } } /** From f1619f1ee8f6c5df2aa4d4b862deb46626bed2db Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 08:18:11 +0100 Subject: [PATCH 0047/1662] Python: "source" -> "contextOrigin" --- .../ql/src/Security/CWE-327/InsecureProtocol.ql | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 194cc1f5ec1d..b945f2e609b7 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -18,11 +18,11 @@ string callName(AstNode call) { exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) } -string sourceName(DataFlow::Node source) { - result = "call to " + callName(source.asCfgNode().(CallNode).getFunction().getNode()) +string originName(DataFlow::Node contextOrigin) { + result = "call to " + callName(contextOrigin.asCfgNode().(CallNode).getFunction().getNode()) or - not source.asCfgNode() instanceof CallNode and - not source instanceof ContextCreation and + not contextOrigin.asCfgNode() instanceof CallNode and + not contextOrigin instanceof ContextCreation and result = "context modification" } @@ -32,11 +32,12 @@ string verb(boolean specific) { specific = false and result = "allowed" } -from DataFlow::Node creation, string insecure_version, DataFlow::Node source, boolean specific +from + DataFlow::Node creation, string insecure_version, DataFlow::Node contextOrigin, boolean specific where - unsafe_connection_creation(creation, insecure_version, source, specific) + unsafe_connection_creation(creation, insecure_version, contextOrigin, specific) or - unsafe_context_creation(creation, insecure_version, source.asCfgNode()) and specific = true + unsafe_context_creation(creation, insecure_version, contextOrigin.asCfgNode()) and specific = true select creation, "Insecure SSL/TLS protocol version " + insecure_version + " " + verb(specific) + " by $@ ", - source, sourceName(source) + contextOrigin, originName(contextOrigin) From e936540863385a7ff8437f890bc7bba24b00c547 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 08:22:09 +0100 Subject: [PATCH 0048/1662] Python: remove internal import --- python/ql/src/Security/CWE-327/Ssl.qll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index be16138b9612..88aaebf67baf 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -1,6 +1,5 @@ import python import semmle.python.ApiGraphs -import semmle.python.dataflow.new.internal.Attributes as Attributes import TlsLibraryModel class SSLContextCreation extends ContextCreation { @@ -104,7 +103,7 @@ class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction { ProtocolVersion restriction; ContextSetVersion() { - exists(Attributes::AttrWrite aw | + exists(DataFlow::AttrWrite aw | aw.getObject().asCfgNode() = node and aw.getAttributeName() = "minimum_version" and aw.getValue() = From b21672c81cbc9a82f56e54093652b6a741dbe3e6 Mon Sep 17 00:00:00 2001 From: Alexander Eyers-Taylor Date: Fri, 26 Mar 2021 11:14:09 +0000 Subject: [PATCH 0049/1662] Apply suggestions from code review Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> Co-authored-by: Marcono1234 --- .../ql-language-reference/ql-language-specification.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index ad88b791019e..fb89100b4018 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -1168,9 +1168,9 @@ A valid call with results *resolves* to a set of predicates. The ways a call can - If the call has no receiver and the predicate name is a selection identifier, then the qualifier is resolved as a module (see "`Module resolution <#module-resolution>`__"). The identifier is then resolved in the exported predicate environment of the qualifier module. - If the call has a super expression as the receiver, then it resolves to a member predicate in a class that the enclosing class inherits from: - - If the super expression is unqualified and there is a single class that the current class inherits from then the super-class is that class. - - If the super expression is unqualified and there is are multiple classes that the current class inherits from then the super-class is the domain type. - - Otherwise the super-class is the class named by the qualifier of the super expression. + - If the super expression is unqualified and there is a single class that the current class inherits from, then the super-class is that class. + - If the super expression is unqualified and there are multiple classes that the current class inherits from, then the super-class is the domain type. + - Otherwise, the super-class is the class named by the qualifier of the super expression. The predicate is resolved by looking up its name and arity in the exported predicate environment of the super-class. From 1be2be843dd4a0afca316598e227d4a89aea5433 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 13:08:23 +0100 Subject: [PATCH 0050/1662] Python: update test expectations --- .../test/query-tests/Security/CWE-327/InsecureProtocol.expected | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index e578a335d846..f4cd96eb82e2 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -17,8 +17,6 @@ | pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | | pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | | pyOpenSSL_fluent.py:18:27:18:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | pyOpenSSL_fluent.py:15:15:15:44 | ControlFlowNode for Attribute() | call to SSL.Context | -| pyOpenSSL_fluent.py:29:27:29:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv2 allowed by $@ | pyOpenSSL_fluent.py:25:15:25:44 | ControlFlowNode for Attribute() | call to SSL.Context | -| pyOpenSSL_fluent.py:29:27:29:33 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | pyOpenSSL_fluent.py:25:15:25:44 | ControlFlowNode for Attribute() | call to SSL.Context | | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:9:14:9:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:6:15:6:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | From 2e948da3b4a5de3e0bc56d4ad0d19f4f787d5473 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 13:08:45 +0100 Subject: [PATCH 0051/1662] Python: suggested refactor --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 5 ++--- python/ql/src/Security/CWE-327/InsecureProtocol.ql | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 4d63a14bdbc9..543c32799bc9 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -67,9 +67,8 @@ predicate unsafe_connection_creation( } /** A connection is created insecurely without reference to a context. */ -predicate unsafe_context_creation(DataFlow::Node node, string insecure_version, CallNode call) { +predicate unsafe_context_creation(DataFlow::CallCfgNode call, string insecure_version) { exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | - cc = node and - cc.getNode() = call + cc = call ) } diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index b945f2e609b7..a716b8948807 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -37,7 +37,9 @@ from where unsafe_connection_creation(creation, insecure_version, contextOrigin, specific) or - unsafe_context_creation(creation, insecure_version, contextOrigin.asCfgNode()) and specific = true + unsafe_context_creation(creation, insecure_version) and + contextOrigin = creation and + specific = true select creation, "Insecure SSL/TLS protocol version " + insecure_version + " " + verb(specific) + " by $@ ", contextOrigin, originName(contextOrigin) From 7d7cbc49db35d0b05f12594984ac36ef529699a1 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 14:20:38 +0100 Subject: [PATCH 0052/1662] Fix comments. This induced fixing the code, since things were wired up wrongly. Currently the only implementation of `insecure_connection_creation` is `ssl.wrap_socket`, which is also the sole target of py/insecure-default-protocol`, so perhaps this part should be turned off? --- .../src/Security/CWE-327/FluentApiModel.qll | 39 +++++++++++++------ .../src/Security/CWE-327/InsecureProtocol.ql | 18 ++++++--- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 543c32799bc9..169996081dce 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -43,16 +43,21 @@ class InsecureContextConfiguration extends DataFlow::Configuration { } /** - * A connection is created from a context allowing an insecure protocol, - * and that protocol has not been restricted appropriately. + * Holds if `conectionCreation` marks the creation of a connetion based on the contex + * found at `contextOrigin` and allowing `insecure_version`. + * `specific` is true iff the context if configured for a specific protocol version rather + * than for a family of protocols. */ -predicate unsafe_connection_creation( - DataFlow::Node creation, ProtocolVersion insecure_version, DataFlow::Node source, boolean specific +predicate unsafe_connection_creation_with_context( + DataFlow::Node connectionCreation, ProtocolVersion insecure_version, DataFlow::Node contextOrigin, + boolean specific ) { // Connection created from a context allowing `insecure_version`. - exists(InsecureContextConfiguration c, ProtocolUnrestriction cc | c.hasFlow(cc, creation) | + exists(InsecureContextConfiguration c, ProtocolUnrestriction co | + c.hasFlow(co, connectionCreation) + | insecure_version = c.getTrackedVersion() and - source = cc and + contextOrigin = co and specific = false ) or @@ -60,15 +65,27 @@ predicate unsafe_connection_creation( exists(TlsLibrary l, DataFlow::CfgNode cc | cc = l.insecure_connection_creation(insecure_version) | - creation = cc and - source = cc and + connectionCreation = cc and + contextOrigin = cc and specific = true ) } -/** A connection is created insecurely without reference to a context. */ -predicate unsafe_context_creation(DataFlow::CallCfgNode call, string insecure_version) { +/** + * Holds if `conectionCreation` marks the creation of a connetion witout reference to a context + * and allowing `insecure_version`. + * `specific` is true iff the context if configured for a specific protocol version rather + * than for a family of protocols. + */ +predicate unsafe_connection_creation_without_context( + DataFlow::CallCfgNode connectionCreation, string insecure_version +) { + exists(TlsLibrary l | connectionCreation = l.insecure_connection_creation(insecure_version)) +} + +/** Holds if `contextCreation` is creating a context ties to a specific insecure version. */ +predicate unsafe_context_creation(DataFlow::CallCfgNode contextCreation, string insecure_version) { exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | - cc = call + contextCreation = cc ) } diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index a716b8948807..974c36ddb0cb 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -33,13 +33,19 @@ string verb(boolean specific) { } from - DataFlow::Node creation, string insecure_version, DataFlow::Node contextOrigin, boolean specific + DataFlow::Node connectionCreation, string insecure_version, DataFlow::Node protocolConfiguration, + boolean specific where - unsafe_connection_creation(creation, insecure_version, contextOrigin, specific) + unsafe_connection_creation_with_context(connectionCreation, insecure_version, + protocolConfiguration, specific) or - unsafe_context_creation(creation, insecure_version) and - contextOrigin = creation and + unsafe_connection_creation_without_context(connectionCreation, insecure_version) and + protocolConfiguration = connectionCreation and specific = true -select creation, + or + unsafe_context_creation(protocolConfiguration, insecure_version) and + connectionCreation = protocolConfiguration and + specific = true +select connectionCreation, "Insecure SSL/TLS protocol version " + insecure_version + " " + verb(specific) + " by $@ ", - contextOrigin, originName(contextOrigin) + protocolConfiguration, originName(protocolConfiguration) From 851317e34ffbf27c939d4575fa399c7227c85e6e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 11 Mar 2021 11:42:32 +0000 Subject: [PATCH 0053/1662] Add models for StrBuilder's fluent methods --- .../semmle/code/java/frameworks/apache/Lang.qll | 9 +++++++++ .../apache-commons-lang3/StrBuilderTest.java | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index deab8f4a6929..1ddf8876c3da 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -427,6 +427,15 @@ private class ApacheStrBuilderModel extends SummaryModelCsv { } } +/** + * An Apache Commons-Lang StrBuilder method that returns `this`. + */ +private class ApacheStrBuilderFluentMethod extends FluentMethod { + ApacheStrBuilderFluentMethod() { + this.getReturnType().(RefType).hasQualifiedName("org.apache.commons.lang3.text", "StrBuilder") + } +} + /** * Taint-propagating models for `WordUtils`. */ diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java index bc8887d1150e..d460184e1762 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java @@ -128,6 +128,20 @@ void test() throws Exception { StrBuilder sb72 = new StrBuilder(); sb72.append(taint()); sink(sb72.toCharArray(0, 0)); // $hasTaintFlow StrBuilder sb73 = new StrBuilder(); sb73.append(taint()); sink(sb73.toStringBuffer()); // $hasTaintFlow StrBuilder sb74 = new StrBuilder(); sb74.append(taint()); sink(sb74.toStringBuilder()); // $hasTaintFlow + + // Tests for fluent methods (those returning `this`): + + StrBuilder fluentTest = new StrBuilder(); + sink(fluentTest.append("Harmless").append(taint()).append("Also harmless").toString()); // $hasTaintFlow + + StrBuilder fluentBackflowTest = new StrBuilder(); + fluentBackflowTest.append("Harmless").append(taint()).append("Also harmless"); + sink(fluentBackflowTest.toString()); // $hasTaintFlow + + // Test the case where the fluent method contributing taint is at the end of a statement: + StrBuilder fluentBackflowTest2 = new StrBuilder(); + fluentBackflowTest2.append("Harmless").append(taint()); + sink(fluentBackflowTest2.toString()); // $hasTaintFlow } } \ No newline at end of file From 3a274424abc0bdc7b6d84678aa3a9697c9f2ace0 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 11 Mar 2021 13:45:55 +0000 Subject: [PATCH 0054/1662] Convert fluent method models to csv and generalise to the three different variants of StrBuilder. --- .../code/java/frameworks/apache/Lang.qll | 86 +++++++++++++++++++ .../apache-commons-lang3/StrBuilderTest.java | 62 +++++++++++++ .../StrBuilderTextTest.java | 76 ++++++++++++++++ .../TextStringBuilderTest.java | 76 ++++++++++++++++ 4 files changed, 300 insertions(+) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index 1ddf8876c3da..2422efc83d9d 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -427,6 +427,92 @@ private class ApacheStrBuilderModel extends SummaryModelCsv { } } +private class ApacheStrBuilderFluentMethodsModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.lang3.text;StrBuilder;false;append;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendFixedWidthPadLeft;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendFixedWidthPadRight;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendln;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendNewLine;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendNull;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendPadding;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendSeparator;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;appendWithSeparators;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;delete;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;deleteAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;deleteCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;deleteFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;ensureCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;insert;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;minimizeCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;replace;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;replaceAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;replaceFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;reverse;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;setCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;setLength;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;setNewLineText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;setNullText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.text;StrBuilder;false;trim;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;append;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendFixedWidthPadLeft;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendFixedWidthPadRight;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendln;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendNewLine;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendNull;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendPadding;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendSeparator;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;appendWithSeparators;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;delete;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;deleteAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;deleteCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;deleteFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;ensureCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;insert;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;minimizeCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;replace;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;replaceAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;replaceFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;reverse;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;setCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;setLength;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;setNewLineText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;setNullText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;StrBuilder;false;trim;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;append;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendFixedWidthPadLeft;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendFixedWidthPadRight;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendln;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendNewLine;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendNull;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendPadding;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendSeparator;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;appendWithSeparators;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;delete;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;deleteAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;deleteCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;deleteFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;ensureCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;insert;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;minimizeCapacity;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;replace;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;replaceAll;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;replaceFirst;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;reverse;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;setCharAt;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;setLength;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;setNewLineText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;setNullText;;;Argument[-1];ReturnValue;value", + "org.apache.commons.text;TextStringBuilder;false;trim;;;Argument[-1];ReturnValue;value" + ] + } +} + /** * An Apache Commons-Lang StrBuilder method that returns `this`. */ diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java index d460184e1762..0c0e386e9c27 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTest.java @@ -142,6 +142,68 @@ void test() throws Exception { StrBuilder fluentBackflowTest2 = new StrBuilder(); fluentBackflowTest2.append("Harmless").append(taint()); sink(fluentBackflowTest2.toString()); // $hasTaintFlow + + // Test all fluent methods are passing taint through to their result: + StrBuilder fluentAllMethodsTest = new StrBuilder(taint()); + sink(fluentAllMethodsTest // $hasTaintFlow + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim()); + + // Test all fluent methods are passing taint back to their qualifier: + StrBuilder fluentAllMethodsTest2 = new StrBuilder(); + fluentAllMethodsTest2 + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim() + .append(taint()); + sink(fluentAllMethodsTest2); // $hasTaintFlow } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTextTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTextTest.java index 796900e8a3ba..74f0f1d17c98 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTextTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/StrBuilderTextTest.java @@ -128,6 +128,82 @@ void test() throws Exception { StrBuilder sb72 = new StrBuilder(); sb72.append(taint()); sink(sb72.toCharArray(0, 0)); // $hasTaintFlow StrBuilder sb73 = new StrBuilder(); sb73.append(taint()); sink(sb73.toStringBuffer()); // $hasTaintFlow StrBuilder sb74 = new StrBuilder(); sb74.append(taint()); sink(sb74.toStringBuilder()); // $hasTaintFlow + + // Tests for fluent methods (those returning `this`): + + StrBuilder fluentTest = new StrBuilder(); + sink(fluentTest.append("Harmless").append(taint()).append("Also harmless").toString()); // $hasTaintFlow + + StrBuilder fluentBackflowTest = new StrBuilder(); + fluentBackflowTest.append("Harmless").append(taint()).append("Also harmless"); + sink(fluentBackflowTest.toString()); // $hasTaintFlow + + // Test the case where the fluent method contributing taint is at the end of a statement: + StrBuilder fluentBackflowTest2 = new StrBuilder(); + fluentBackflowTest2.append("Harmless").append(taint()); + sink(fluentBackflowTest2.toString()); // $hasTaintFlow + + // Test all fluent methods are passing taint through to their result: + StrBuilder fluentAllMethodsTest = new StrBuilder(taint()); + sink(fluentAllMethodsTest // $hasTaintFlow + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim()); + + // Test all fluent methods are passing taint back to their qualifier: + StrBuilder fluentAllMethodsTest2 = new StrBuilder(); + fluentAllMethodsTest2 + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim() + .append(taint()); + sink(fluentAllMethodsTest2); // $hasTaintFlow } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TextStringBuilderTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TextStringBuilderTest.java index 69db28cb3e90..e490c11c7cb3 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TextStringBuilderTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TextStringBuilderTest.java @@ -129,6 +129,82 @@ void test() throws Exception { TextStringBuilder sb72 = new TextStringBuilder(); sb72.append(taint()); sink(sb72.toCharArray(0, 0)); // $hasTaintFlow TextStringBuilder sb73 = new TextStringBuilder(); sb73.append(taint()); sink(sb73.toStringBuffer()); // $hasTaintFlow TextStringBuilder sb74 = new TextStringBuilder(); sb74.append(taint()); sink(sb74.toStringBuilder()); // $hasTaintFlow + + // Tests for fluent methods (those returning `this`): + + TextStringBuilder fluentTest = new TextStringBuilder(); + sink(fluentTest.append("Harmless").append(taint()).append("Also harmless").toString()); // $hasTaintFlow + + TextStringBuilder fluentBackflowTest = new TextStringBuilder(); + fluentBackflowTest.append("Harmless").append(taint()).append("Also harmless"); + sink(fluentBackflowTest.toString()); // $hasTaintFlow + + // Test the case where the fluent method contributing taint is at the end of a statement: + TextStringBuilder fluentBackflowTest2 = new TextStringBuilder(); + fluentBackflowTest2.append("Harmless").append(taint()); + sink(fluentBackflowTest2.toString()); // $hasTaintFlow + + // Test all fluent methods are passing taint through to their result: + TextStringBuilder fluentAllMethodsTest = new TextStringBuilder(taint()); + sink(fluentAllMethodsTest // $hasTaintFlow + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim()); + + // Test all fluent methods are passing taint back to their qualifier: + TextStringBuilder fluentAllMethodsTest2 = new TextStringBuilder(); + fluentAllMethodsTest2 + .append("text") + .appendAll("text") + .appendFixedWidthPadLeft("text", 4, ' ') + .appendFixedWidthPadRight("text", 4, ' ') + .appendln("text") + .appendNewLine() + .appendNull() + .appendPadding(0, ' ') + .appendSeparator(',') + .appendWithSeparators(new String[] { }, ",") + .delete(0, 0) + .deleteAll(' ') + .deleteCharAt(0) + .deleteFirst("delme") + .ensureCapacity(100) + .insert(1, "insertme") + .minimizeCapacity() + .replace(0, 0, "replacement") + .replaceAll("find", "replace") + .replaceFirst("find", "replace") + .reverse() + .setCharAt(0, 'a') + .setLength(500) + .setNewLineText("newline") + .setNullText("NULL") + .trim() + .append(taint()); + sink(fluentAllMethodsTest2); // $hasTaintFlow } } \ No newline at end of file From 42b63a61ae82b19a7e61c86bebfe27365d35bf79 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 11 Mar 2021 18:34:11 +0000 Subject: [PATCH 0055/1662] Add change note --- java/change-notes/2021-03-11-commons-strbuilder.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-03-11-commons-strbuilder.md diff --git a/java/change-notes/2021-03-11-commons-strbuilder.md b/java/change-notes/2021-03-11-commons-strbuilder.md new file mode 100644 index 000000000000..ce8f647ab0fb --- /dev/null +++ b/java/change-notes/2021-03-11-commons-strbuilder.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Added support for the Apache Commons Lang and Commons Text StrBuilder class, and its successor TextStringBuilder. From 8155334fa7b4b72015e1b75bf2563b0b96c699bb Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 15:57:07 +0100 Subject: [PATCH 0056/1662] Python: More elaborate qldoc also refactor code to match --- .../src/Security/CWE-327/FluentApiModel.qll | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 169996081dce..d4eb13a133d3 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -2,9 +2,21 @@ import python import TlsLibraryModel /** - * Configuration to track flow from the creation of a context to - * that context being used to create a connection. - * Flow is broken if the insecure protocol of interest is being restricted. + * Configuration to determine the state of a context being used to create + * a conection. + * + * The state is in terms of whether a specific protocol is allowed. This is + * either true or false when the context is created and can then be modified + * later by either restricting or unrestricting the protocol (see the predicates + * `isRestriction` and `isUnrestriction`). + * + * Since we are interested in the final state, we want the flow to start from + * the last unrestriction, so we disallow flow into unrestrictions. We also + * model the creation as an unrestriction of everything it allows, to account + * for the common case where the creation plays the role of "last unrestriction". + * + * Since we really want "the last unrestriction, not nullified by a restriction", + * we also disallow flow into restrictions. */ class InsecureContextConfiguration extends DataFlow::Configuration { TlsLibrary library; @@ -17,29 +29,35 @@ class InsecureContextConfiguration extends DataFlow::Configuration { ProtocolVersion getTrackedVersion() { result = tracked_version } - override predicate isSource(DataFlow::Node source) { - // source = library.unspecific_context_creation() - exists(ProtocolUnrestriction pu | - pu = library.protocol_unrestriction() and - pu.getUnrestriction() = tracked_version - | - source = pu.getContext() - ) - } + override predicate isSource(DataFlow::Node source) { this.isUnrestriction(source) } override predicate isSink(DataFlow::Node sink) { sink = library.connection_creation().getContext() } - override predicate isBarrierOut(DataFlow::Node node) { + override predicate isBarrierIn(DataFlow::Node node) { + this.isRestriction(node) + or + this.isUnrestriction(node) + } + + private predicate isRestriction(DataFlow::Node node) { exists(ProtocolRestriction r | r = library.protocol_restriction() and - node = r.getContext() and r.getRestriction() = tracked_version + | + node = r.getContext() ) } - override predicate isBarrierIn(DataFlow::Node node) { this.isSource(node) } + private predicate isUnrestriction(DataFlow::Node node) { + exists(ProtocolUnrestriction pu | + pu = library.protocol_unrestriction() and + pu.getUnrestriction() = tracked_version + | + node = pu.getContext() + ) + } } /** From 98dfe1a00a14e6dfc8c27d84cfeb2ee363515f56 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 17:27:43 +0100 Subject: [PATCH 0057/1662] Python: Elaborate qldoc and renames to match --- python/ql/src/Security/CWE-327/Ssl.qll | 34 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 88aaebf67baf..110b4bf185a1 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -45,7 +45,7 @@ class OptionsAugOr extends ProtocolRestriction { ( aa.getValue() = flag or - impliesValue(aa.getValue(), flag, false, false) + impliesBitSet(aa.getValue(), flag, false, false) ) ) } @@ -70,7 +70,7 @@ class OptionsAugAndNot extends ProtocolUnrestriction { ( aa.getValue() = notFlag or - impliesValue(aa.getValue(), notFlag, true, true) + impliesBitSet(aa.getValue(), notFlag, true, true) ) ) } @@ -80,22 +80,36 @@ class OptionsAugAndNot extends ProtocolUnrestriction { override ProtocolVersion getUnrestriction() { result = restriction } } -/** Whether `part` evaluates to `partIsTrue` if `whole` evaluates to `wholeIsTrue`. */ -predicate impliesValue(BinaryExpr whole, Expr part, boolean partIsTrue, boolean wholeIsTrue) { +/** + * Holds if + * for every bit, _b_: + * `wholeHasBitSet` represents that _b_ is set in `whole` + * implies + * `partHasBitSet` represents that _b_ is set in `part` + * + * As an example take `whole` = `part1 & part2`. Then + * `impliesBitSet(whole, part1, true, true)` holds + * because for any bit in `whole`, if that bit is set it must also be set in `part1`. + * + * Similarly for `whole` = `part1 | part2`. Here + * `impliesBitSet(whole, part1, false, false)` holds + * because for any bit in `whole`, if that bit is not set, it cannot be set in `part1`. + */ +predicate impliesBitSet(BinaryExpr whole, Expr part, boolean partHasBitSet, boolean wholeHasBitSet) { whole.getOp() instanceof BitAnd and ( - wholeIsTrue = true and partIsTrue = true and part in [whole.getLeft(), whole.getRight()] + wholeHasBitSet = true and partHasBitSet = true and part in [whole.getLeft(), whole.getRight()] or - wholeIsTrue = true and - impliesValue([whole.getLeft(), whole.getRight()], part, partIsTrue, wholeIsTrue) + wholeHasBitSet = true and + impliesBitSet([whole.getLeft(), whole.getRight()], part, partHasBitSet, wholeHasBitSet) ) or whole.getOp() instanceof BitOr and ( - wholeIsTrue = false and partIsTrue = false and part in [whole.getLeft(), whole.getRight()] + wholeHasBitSet = false and partHasBitSet = false and part in [whole.getLeft(), whole.getRight()] or - wholeIsTrue = false and - impliesValue([whole.getLeft(), whole.getRight()], part, partIsTrue, wholeIsTrue) + wholeHasBitSet = false and + impliesBitSet([whole.getLeft(), whole.getRight()], part, partHasBitSet, wholeHasBitSet) ) } From 470b4d86582595101439a043ab4cd4db935b11a2 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 17:35:36 +0100 Subject: [PATCH 0058/1662] Python: Add missing qldoc --- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 3ab880e8bd9e..f66d663a7e2a 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -58,6 +58,10 @@ abstract class ProtocolUnrestriction extends DataFlow::CfgNode { abstract ProtocolVersion getUnrestriction(); } +/** + * A context is being created with a range of allowed protocols. + * This also serves as unrestricting these protocols. + */ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrestriction { TlsLibrary library; ProtocolFamily family; @@ -77,6 +81,7 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest } } +/** A model of a TLS library. */ abstract class TlsLibrary extends string { TlsLibrary() { this in ["ssl", "pyOpenSSL"] } From 44d62df3f72719d8ba57a2519877db2a179f4ec4 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 17:51:18 +0100 Subject: [PATCH 0059/1662] Python: Fix model of `TLS` and add reference --- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index f66d663a7e2a..245a60b02955 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -71,11 +71,14 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest override DataFlow::CfgNode getContext() { result = this } override ProtocolVersion getUnrestriction() { + // see https://www.openssl.org/docs/man1.1.0/man3/TLS_method.html family = "TLS" and - result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] + result in ["SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] or // This can negotiate a TLS 1.3 connection (!) - // see https://docs.python.org/3/library/ssl.html#ssl-contexts + // see + // - https://docs.python.org/3/library/ssl.html#ssl-contexts + // - https://www.openssl.org/docs/man1.0.2/man3/TLSv1_method.html family = "SSLv23" and result in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } From e0352fe7638223a1d998bdd26752e358d2ec8e92 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 23:26:24 +0100 Subject: [PATCH 0060/1662] Python: remove deprecated section of qhelp file --- python/ql/src/Security/CWE-327/InsecureProtocol.qhelp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp index cfcebd0930d3..9ecc7da0d60b 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.qhelp @@ -32,12 +32,6 @@ All cases should be updated to use a secure protocol, such as PROTOCOL_TLSv1_2.

    -

    - Note that ssl.wrap_socket has been deprecated in - Python 3.7. A preferred alternative is to use - ssl.SSLContext, which is supported in Python 2.7.9 and - 3.2 and later versions. -

    Note that ssl.wrap_socket has been deprecated in Python 3.7. The recommended alternatives are: From bf81122fc6b26584e85d4f0b7b4f854a2296471b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Fri, 26 Mar 2021 23:37:19 +0100 Subject: [PATCH 0061/1662] Python: fix typo and add linebreaks --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index d4eb13a133d3..803b7adab40e 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -63,7 +63,8 @@ class InsecureContextConfiguration extends DataFlow::Configuration { /** * Holds if `conectionCreation` marks the creation of a connetion based on the contex * found at `contextOrigin` and allowing `insecure_version`. - * `specific` is true iff the context if configured for a specific protocol version rather + * + * `specific` is true iff the context is configured for a specific protocol version rather * than for a family of protocols. */ predicate unsafe_connection_creation_with_context( @@ -92,7 +93,8 @@ predicate unsafe_connection_creation_with_context( /** * Holds if `conectionCreation` marks the creation of a connetion witout reference to a context * and allowing `insecure_version`. - * `specific` is true iff the context if configured for a specific protocol version rather + * + * `specific` is true iff the context is configured for a specific protocol version rather * than for a family of protocols. */ predicate unsafe_connection_creation_without_context( From bd863884479d4373e17717208441bbe6423d831b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sat, 27 Mar 2021 01:07:15 +0100 Subject: [PATCH 0062/1662] Python: Add typetracker to constrain attribute. --- python/ql/src/Security/CWE-327/Ssl.qll | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 110b4bf185a1..7f1415233903 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -22,10 +22,28 @@ class SSLDefaultContextCreation extends ContextCreation { override DataFlow::CfgNode getProtocol() { none() } } +/** Gets a reference to an `ssl.Context` instance. */ +private DataFlow::LocalSourceNode sslContextInstance(DataFlow::TypeTracker t) { + t.start() and + result = API::moduleImport("ssl").getMember(["SSLContext", "create_default_context"]).getACall() + or + exists(DataFlow::TypeTracker t2 | result = sslContextInstance(t2).track(t2, t)) +} + +/** Gets a reference to an `ssl.Context` instance. */ +DataFlow::Node sslContextInstance() { + sslContextInstance(DataFlow::TypeTracker::end()).flowsTo(result) +} + class WrapSocketCall extends ConnectionCreation { override CallNode node; - WrapSocketCall() { node.getFunction().(AttrNode).getName() = "wrap_socket" } + WrapSocketCall() { + exists(DataFlow::AttrRead call | node.getFunction() = call.asCfgNode() | + call.getAttributeName() = "wrap_socket" and + call.getObject() = sslContextInstance() + ) + } override DataFlow::CfgNode getContext() { result.getNode() = node.getFunction().(AttrNode).getObject() From 7a511c5682ca1aec9368a8e1f0c2106fd0912408 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sat, 27 Mar 2021 02:20:59 +0100 Subject: [PATCH 0063/1662] Python: update naming --- python/ql/src/Security/CWE-327/InsecureProtocol.ql | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 974c36ddb0cb..37aab84795e8 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -18,11 +18,12 @@ string callName(AstNode call) { exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) } -string originName(DataFlow::Node contextOrigin) { - result = "call to " + callName(contextOrigin.asCfgNode().(CallNode).getFunction().getNode()) +string configName(DataFlow::Node protocolConfiguration) { + result = + "call to " + callName(protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode()) or - not contextOrigin.asCfgNode() instanceof CallNode and - not contextOrigin instanceof ContextCreation and + not protocolConfiguration.asCfgNode() instanceof CallNode and + not protocolConfiguration instanceof ContextCreation and result = "context modification" } @@ -48,4 +49,4 @@ where specific = true select connectionCreation, "Insecure SSL/TLS protocol version " + insecure_version + " " + verb(specific) + " by $@ ", - protocolConfiguration, originName(protocolConfiguration) + protocolConfiguration, configName(protocolConfiguration) From 16902c2f56993f4ca29f3f05ca1ce1ac35b656be Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sat, 27 Mar 2021 02:40:13 +0100 Subject: [PATCH 0064/1662] Python: handle default argument --- python/ql/src/Security/CWE-327/Ssl.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 7f1415233903..928a5f74e2d3 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -160,6 +160,10 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext // These are turned off by default // see https://docs.python.org/3/library/ssl.html#ssl-contexts not result in ["SSLv2", "SSLv3"] + or + // The default argument is TLS and the SSL versions are turned off by default. + not exists(this.getProtocol()) and + result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } } From 6d72b4fd39b51315cf0720c35455bb3b66447cae Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Sat, 27 Mar 2021 03:10:43 +0100 Subject: [PATCH 0065/1662] Python: Limit pretty printing to relevant nodes --- .../src/Security/CWE-327/InsecureProtocol.ql | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 37aab84795e8..19f6acf5512c 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -12,13 +12,46 @@ import python import FluentApiModel -string callName(AstNode call) { +// Helper for pretty printer `configName`. +// This is a consequence of missing pretty priting. +// We do not want to evaluate our bespoke pretty printer +// for all `DataFlow::Node`s so we define a sub class of interesting ones. +class ProtocolConfiguration extends DataFlow::Node { + ProtocolConfiguration() { + unsafe_connection_creation_with_context(_, _, this, _) + or + unsafe_connection_creation_without_context(this, _) + or + unsafe_context_creation(this, _) + } +} + +// Helper for pretty printer `callName`. +// This is a consequence of missing pretty priting. +// We do not want to evaluate our bespoke pretty printer +// for all `AstNode`s so we define a sub class of interesting ones. +// +// Note that AstNode is abstract and AstNode_ is a library class, so +// we have to extend @py_ast_node. +class Namable extends @py_ast_node { + Namable() { + exists(ProtocolConfiguration protocolConfiguration | + this = protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode() + ) + or + exists(Namable attr | this = attr.(Attribute).getObject()) + } + + string toString() { result = "AstNode" } +} + +string callName(Namable call) { result = call.(Name).getId() or exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) } -string configName(DataFlow::Node protocolConfiguration) { +string configName(ProtocolConfiguration protocolConfiguration) { result = "call to " + callName(protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode()) or From 799d509f26d0954025fea5302945387194fdef46 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 18 Mar 2021 17:31:41 +0100 Subject: [PATCH 0066/1662] Upload LDAP Injection query, qhelp and tests --- .../src/Security/CWE-090/LDAPInjection.qhelp | 32 +++++++ .../ql/src/Security/CWE-090/LDAPInjection.ql | 86 +++++++++++++++++++ .../Security/CWE-090/tests/ldap3_sanitized.py | 58 +++++++++++++ .../CWE-090/tests/ldap3_sanitized_asObj.py | 57 ++++++++++++ .../CWE-090/tests/ldap3_unsanitized.py | 56 ++++++++++++ .../CWE-090/tests/ldap3_unsanitized_asObj.py | 55 ++++++++++++ .../Security/CWE-090/tests/ldap_sanitized.py | 56 ++++++++++++ .../CWE-090/tests/ldap_sanitized_asObj.py | 57 ++++++++++++ .../CWE-090/tests/ldap_unsanitized.py | 52 +++++++++++ .../CWE-090/tests/ldap_unsanitized_asObj.py | 52 +++++++++++ 10 files changed, 561 insertions(+) create mode 100644 python/ql/src/Security/CWE-090/LDAPInjection.qhelp create mode 100644 python/ql/src/Security/CWE-090/LDAPInjection.ql create mode 100644 python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap_sanitized.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py create mode 100644 python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py diff --git a/python/ql/src/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/Security/CWE-090/LDAPInjection.qhelp new file mode 100644 index 000000000000..e077ccc3afe4 --- /dev/null +++ b/python/ql/src/Security/CWE-090/LDAPInjection.qhelp @@ -0,0 +1,32 @@ + + + + +

    If an LDAP query is built by a not sanitized user-provided value, a user is likely to be able to run malicious LDAP queries.

    + + + +

    In case user input must compose an LDAP query, it should be escaped in order to avoid a malicious user supplying special characters that change the actual purpose of the query. To do so, functions that ldap frameworks provide such as escape_filter_chars should be applied to that user input. + + + + +

  • + OWASP + LDAP Injection +
  • +
  • + SonarSource + RSPEC-2078 +
  • +
  • + Python + LDAP Documentation +
  • +
  • + CWE- + 090 +
  • +
    + + \ No newline at end of file diff --git a/python/ql/src/Security/CWE-090/LDAPInjection.ql b/python/ql/src/Security/CWE-090/LDAPInjection.ql new file mode 100644 index 000000000000..d6ff1ad56074 --- /dev/null +++ b/python/ql/src/Security/CWE-090/LDAPInjection.ql @@ -0,0 +1,86 @@ +/** + * @name Python LDAP Injection + * @description Python LDAP Injection through search filter + * @kind path-problem + * @problem.severity error + * @id python/ldap-injection + * @tags experimental + * security + * external/cwe/cwe-090 + */ + +import python +import semmle.python.dataflow.new.RemoteFlowSources +import semmle.python.dataflow.new.DataFlow +import semmle.python.dataflow.new.TaintTracking +import semmle.python.dataflow.new.internal.TaintTrackingPublic +import DataFlow::PathGraph + +class InitializeSink extends DataFlow::Node { + InitializeSink() { + exists(SsaVariable initVar, CallNode searchCall | + // get variable whose value equals a call to ldap.initialize + initVar.getDefinition().getImmediateDominator() = Value::named("ldap.initialize").getACall() and + // get the Call in which the previous variable is used + initVar.getAUse().getNode() = searchCall.getNode().getFunc().(Attribute).getObject() and + // restrict that call's attribute (something.this) to match %search% + searchCall.getNode().getFunc().(Attribute).getName().matches("%search%") and + // set the third argument (search_filter) as sink + this.asExpr() = searchCall.getArg(2).getNode() + // set the first argument (DN) as sink + // or this.asExpr() = searchCall.getArg(0) // Should this be set? + ) + } +} + +class ConnectionSink extends DataFlow::Node { + ConnectionSink() { + exists(SsaVariable connVar, CallNode searchCall | + // get variable whose value equals a call to ldap.initialize + connVar.getDefinition().getImmediateDominator() = Value::named("ldap3.Connection").getACall() and + // get the Call in which the previous variable is used + connVar.getAUse().getNode() = searchCall.getNode().getFunc().(Attribute).getObject() and + // restrict that call's attribute (something.this) to match %search% + searchCall.getNode().getFunc().(Attribute).getName().matches("%search%") and + // set the second argument (search_filter) as sink + this.asExpr() = searchCall.getArg(1).getNode() + // set the first argument (DN) as sink + // or this.asExpr() = searchCall.getArg(0) // Should this be set? + ) + } +} + +class EscapeSanitizer extends DataFlow::Node { + EscapeSanitizer() { + exists(Call c | + ( + // avoid flow through any %escape% function + c.getFunc().(Attribute).getName().matches("%escape%") or // something.%escape%() + c.getFunc().(Name).getId().matches("%escape%") // %escape%() + ) and + this.asExpr() = c + ) + } +} + +class LDAPInjectionSink extends DataFlow::Node { + LDAPInjectionSink() { + this instanceof InitializeSink or + this instanceof ConnectionSink + } +} + +class LDAPInjectionFlowConfig extends TaintTracking::Configuration { + LDAPInjectionFlowConfig() { this = "LDAPInjectionFlowConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof LDAPInjectionSink } + + override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof EscapeSanitizer } +} + +from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink +where config.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "$@ LDAP query executes $@.", sink.getNode(), "This", + source.getNode(), "a user-provided value" diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py b/python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py new file mode 100644 index 000000000000..05bc1e24f716 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py @@ -0,0 +1,58 @@ +import ldap3 +from ldap3.utils.conv import escape_filter_chars +from flask import request, Flask + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + sanitized_dn = "dc=%s" % request.args['dc'] + sanitized_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars( + request.args['username']) + + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user=sanitized_dn, auto_bind=True) + conn.search(sanitized_dn, sanitized_filter) + return conn.response + + +@app.route("/var_tainted") +def var_tainted(): + sanitized_dn = request.args['dc'] + sanitized_filter = request.args['username'] + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars(sanitized_filter) + + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user=dn, auto_bind=True) + conn.search(dn, search_filter) + return conn.response + + +@app.route("/direct") +def direct(): + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user="dc=%s" % + request.args['dc'], auto_bind=True) + conn.search("dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % + escape_filter_chars(request.args['username'])) + return conn.response + + +@ app.route("/with_") +def with_(): + sanitized_dn = request.args['dc'] + sanitized_filter = escape_filter_chars(request.args['username']) + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + srv = ldap3.Server('localhost', port=1337) + with ldap3.Connection(server, auto_bind=True) as conn: + conn.search(dn, search_filter) + return conn.response + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py b/python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py new file mode 100644 index 000000000000..c7dbb3450588 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py @@ -0,0 +1,57 @@ +from ldap3 import Server, Connection +from ldap3.utils.conv import escape_filter_chars +from flask import request, Flask + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + sanitized_dn = "dc=%s" % request.args['dc'] + sanitized_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars( + request.args['username']) + + srv = Server('localhost', port=1337) + conn = Connection(srv, user=sanitized_dn, auto_bind=True) + conn.search(sanitized_dn, sanitized_filter) + return conn.response + + +@app.route("/var_tainted") +def var_tainted(): + sanitized_dn = request.args['dc'] + sanitized_filter = request.args['username'] + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars(sanitized_filter) + + srv = Server('localhost', port=1337) + conn = Connection(srv, user=dn, auto_bind=True) + conn.search(dn, search_filter) + return conn.response + + +@app.route("/direct") +def direct(): + srv = Server('localhost', port=1337) + conn = Connection(srv, user="dc=%s" % request.args['dc'], auto_bind=True) + conn.search("dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % + escape_filter_chars(request.args['username'])) + return conn.response + + +@app.route("/with_2") +def with_2(): + sanitized_dn = request.args['dc'] + sanitized_filter = escape_filter_chars(request.args['username']) + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + srv = Server('localhost', port=1337) + with Connection(server, auto_bind=True) as conn: + conn.search(dn, search_filter) + return conn.response + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py b/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py new file mode 100644 index 000000000000..fcd00c0269ca --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py @@ -0,0 +1,56 @@ +import ldap3 +from flask import request, Flask + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + unsanitized_dn = "dc=%s" % request.args['dc'] + unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] + + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user=unsanitized_dn, auto_bind=True) + conn.search(unsanitized_dn, unsanitized_filter) + return conn.response + + +@app.route("/var_tainted") +def var_tainted(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user=dn, auto_bind=True) + conn.search(dn, search_filter) + return conn.response + + +@app.route("/direct") +def direct(): + srv = ldap3.Server('localhost', port=1337) + conn = ldap3.Connection(srv, user="dc=%s" % + request.args['dc'], auto_bind=True) + conn.search("dc=%s" % unsanitized_dn, + "(&(objectClass=*)(uid=%s))" % request.args['username']) + return conn.response + + +@app.route("/with_") +def with_(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + srv = ldap3.Server('localhost', port=1337) + with ldap3.Connection(server, auto_bind=True) as conn: + conn.search(dn, search_filter) + return conn.response + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py b/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py new file mode 100644 index 000000000000..634ee992f3e5 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py @@ -0,0 +1,55 @@ +from ldap3 import Server, Connection +from flask import request, Flask + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + unsanitized_dn = "dc=%s" % request.args['dc'] + unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] + + srv = Server('localhost', port=1337) + conn = Connection(srv, user=unsanitized_dn, auto_bind=True) + conn.search(unsanitized_dn, unsanitized_filter) + return conn.response + + +@app.route("/var_tainted") +def var_tainted(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + srv = Server('localhost', port=1337) + conn = Connection(srv, user=dn, auto_bind=True) + conn.search(dn, search_filter) + return conn.response + + +@app.route("/direct") +def direct(): + srv = Server('localhost', port=1337) + conn = Connection(srv, user="dc=%s" % request.args['dc'], auto_bind=True) + conn.search( + "dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % request.args['username']) + return conn.response + + +@app.route("/with_2") +def with_2(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + srv = Server('localhost', port=1337) + with Connection(server, auto_bind=True) as conn: + conn.search(dn, search_filter) + return conn.response + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap_sanitized.py b/python/ql/src/Security/CWE-090/tests/ldap_sanitized.py new file mode 100644 index 000000000000..83bafa791956 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap_sanitized.py @@ -0,0 +1,56 @@ +from flask import request, Flask +import ldap +import ldap.filter +import ldap.dn + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + sanitized_dn = "dc=%s" % ldap.dn.escape_dn_chars(request.args['dc']) + sanitized_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars( + request.args['username']) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + sanitized_dn, ldap.SCOPE_SUBTREE, sanitized_filter) + return user[0] + + +@app.route("/var_tainted") +def var_tainted(): + sanitized_dn = request.args['dc'] + sanitized_filter = request.args['username'] + + dn = "dc=%s" % ldap.dn.escape_dn_chars(sanitized_dn) + search_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(sanitized_filter) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + + +@app.route("/direct") +def direct(): + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s("dc=%s" % ldap.dn.escape_dn_chars( + request.args['dc']), ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(request.args['username'])) + return user[0] + + +@app.route("/with_") +def with_(): + sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) + sanitized_filter = ldap.filter.escape_filter_chars( + request.args['username']) + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + with ldap.initialize("ldap://127.0.0.1:1337") as ldap_connection: + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py b/python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py new file mode 100644 index 000000000000..1c9662a4bcf8 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py @@ -0,0 +1,57 @@ +from flask import request, Flask +from ldap import initialize +import ldap.filter +import ldap.dn + +app = Flask(__name__) + + +@app.route("/tainted_var_2") +def tainted_var_2(): + sanitized_dn = "dc=%s" % ldap.dn.escape_dn_chars(request.args['dc']) + sanitized_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars( + request.args['username']) + + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + sanitized_dn, ldap.SCOPE_SUBTREE, sanitized_filter) + return user[0] + + +@app.route("/var_tainted_2") +def var_tainted_2(): + sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) + sanitized_filter = ldap.filter.escape_filter_chars( + request.args['username']) + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + + +@app.route("/direct_2") +def direct_2(): + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s("dc=%s" % ldap.dn.escape_dn_chars( + request.args['dc']), ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(request.args['username'])) + return user[0] + + +@app.route("/with_2") +def with_2(): + sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) + sanitized_filter = ldap.filter.escape_filter_chars( + request.args['username']) + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + with initialize("ldap://127.0.0.1:1337") as ldap_connection: + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py b/python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py new file mode 100644 index 000000000000..8b22596b578d --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py @@ -0,0 +1,52 @@ +from flask import request, Flask +import ldap + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + unsanitized_dn = "dc=%s" % request.args['dc'] + unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsanitized_dn, ldap.SCOPE_SUBTREE, unsanitized_filter) + return user[0] + + +@app.route("/var_tainted") +def var_tainted(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + + +@app.route("/direct") +def direct(): + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + "dc=%s" % request.args['dc'], ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % request.args['username']) + return user[0] + + +@app.route("/with_") +def with_(): + sanitized_dn = request.args['dc'] + sanitized_filter = request.args['username'] + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + with ldap.initialize("ldap://127.0.0.1:1337") as ldap_connection: + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py b/python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py new file mode 100644 index 000000000000..49774dda2ec9 --- /dev/null +++ b/python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py @@ -0,0 +1,52 @@ +from flask import request, Flask +from ldap import initialize + +app = Flask(__name__) + + +@app.route("/tainted_var") +def tainted_var(): + unsanitized_dn = "dc=%s" % request.args['dc'] + unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] + + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsanitized_dn, ldap.SCOPE_SUBTREE, unsanitized_filter) + return user[0] + + +@app.route("/var_tainted") +def var_tainted(): + unsanitized_dn = request.args['dc'] + unsanitized_filter = request.args['username'] + + dn = "dc=%s" % unsanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter + + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + + +@app.route("/direct") +def direct(): + ldap_connection = initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + "dc=%s" % request.args['dc'], ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % request.args['username']) + return user[0] + + +@app.route("/with_2") +def with_2(): + sanitized_dn = request.args['dc'] + sanitized_filter = request.args['username'] + + dn = "dc=%s" % sanitized_dn + search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter + + with initialize("ldap://127.0.0.1:1337") as ldap_connection: + user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) + return user[0] + +# if __name__ == "__main__": +# app.run(debug=True) From 719b48cbaf8193f57560bd499e890f679c8d7931 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 18 Mar 2021 20:21:47 +0100 Subject: [PATCH 0067/1662] Move to experimental folder --- .../src/{ => experimental}/Security/CWE-090/LDAPInjection.qhelp | 0 .../ql/src/{ => experimental}/Security/CWE-090/LDAPInjection.ql | 0 .../{ => experimental}/Security/CWE-090/tests/ldap3_sanitized.py | 0 .../Security/CWE-090/tests/ldap3_sanitized_asObj.py | 0 .../Security/CWE-090/tests/ldap3_unsanitized.py | 0 .../Security/CWE-090/tests/ldap3_unsanitized_asObj.py | 0 .../{ => experimental}/Security/CWE-090/tests/ldap_sanitized.py | 0 .../Security/CWE-090/tests/ldap_sanitized_asObj.py | 0 .../{ => experimental}/Security/CWE-090/tests/ldap_unsanitized.py | 0 .../Security/CWE-090/tests/ldap_unsanitized_asObj.py | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename python/ql/src/{ => experimental}/Security/CWE-090/LDAPInjection.qhelp (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/LDAPInjection.ql (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap3_sanitized.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap3_sanitized_asObj.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap3_unsanitized.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap3_unsanitized_asObj.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap_sanitized.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap_sanitized_asObj.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap_unsanitized.py (100%) rename python/ql/src/{ => experimental}/Security/CWE-090/tests/ldap_unsanitized_asObj.py (100%) diff --git a/python/ql/src/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp similarity index 100% rename from python/ql/src/Security/CWE-090/LDAPInjection.qhelp rename to python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp diff --git a/python/ql/src/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql similarity index 100% rename from python/ql/src/Security/CWE-090/LDAPInjection.ql rename to python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap3_sanitized.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap3_sanitized_asObj.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap3_unsanitized.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap3_unsanitized_asObj.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap_sanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap_sanitized.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap_sanitized_asObj.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap_unsanitized.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py diff --git a/python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py similarity index 100% rename from python/ql/src/Security/CWE-090/tests/ldap_unsanitized_asObj.py rename to python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py From 95a1dae3154367e47fcaaa97cc35dfdb9b1c1fcb Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 18 Mar 2021 20:36:38 +0100 Subject: [PATCH 0068/1662] Precision warn and Remove CWE reference --- .../ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp | 4 ---- python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp index e077ccc3afe4..a570549abfc4 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp @@ -23,10 +23,6 @@ Python LDAP Documentation -
  • - CWE- - 090 -
  • \ No newline at end of file diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index d6ff1ad56074..55e477be50ae 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -9,6 +9,7 @@ * external/cwe/cwe-090 */ +// Determine precision above import python import semmle.python.dataflow.new.RemoteFlowSources import semmle.python.dataflow.new.DataFlow From 85ec82a389a76ef721d879e7c294550bb56fe8ac Mon Sep 17 00:00:00 2001 From: jorgectf Date: Sun, 28 Mar 2021 21:07:08 +0200 Subject: [PATCH 0069/1662] Refactor in progress --- .../Security/CWE-090/LDAPInjection.ql | 82 +++---------------- .../ldap3_unsanitized.py => ldap3_bad.py} | 0 .../ldap3_sanitized.py => ldap3_good.py} | 0 .../CWE-090/tests/ldap3_sanitized_asObj.py | 57 ------------- .../CWE-090/tests/ldap3_unsanitized_asObj.py | 55 ------------- .../Security/CWE-090/tests/ldap_sanitized.py | 56 ------------- .../CWE-090/tests/ldap_sanitized_asObj.py | 57 ------------- .../CWE-090/tests/ldap_unsanitized.py | 52 ------------ .../CWE-090/tests/ldap_unsanitized_asObj.py | 52 ------------ .../Security/CWE-090/unit_tests/ldap_bad.py | 46 +++++++++++ .../Security/CWE-090/unit_tests/ldap_good.py | 60 ++++++++++++++ .../experimental/semmle/python/Concepts.qll | 43 ++++++++++ .../semmle/python/frameworks/Stdlib.qll | 56 +++++++++++++ .../security/injection/LDAPInjection.qll | 21 +++++ 14 files changed, 236 insertions(+), 401 deletions(-) rename python/ql/src/experimental/Security/CWE-090/{tests/ldap3_unsanitized.py => ldap3_bad.py} (100%) rename python/ql/src/experimental/Security/CWE-090/{tests/ldap3_sanitized.py => ldap3_good.py} (100%) delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py create mode 100644 python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py create mode 100644 python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py create mode 100644 python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 55e477be50ae..778b771f8839 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -11,77 +11,15 @@ // Determine precision above import python -import semmle.python.dataflow.new.RemoteFlowSources -import semmle.python.dataflow.new.DataFlow -import semmle.python.dataflow.new.TaintTracking -import semmle.python.dataflow.new.internal.TaintTrackingPublic +import experimental.semmle.python.security.injection.LDAPInjection import DataFlow::PathGraph -class InitializeSink extends DataFlow::Node { - InitializeSink() { - exists(SsaVariable initVar, CallNode searchCall | - // get variable whose value equals a call to ldap.initialize - initVar.getDefinition().getImmediateDominator() = Value::named("ldap.initialize").getACall() and - // get the Call in which the previous variable is used - initVar.getAUse().getNode() = searchCall.getNode().getFunc().(Attribute).getObject() and - // restrict that call's attribute (something.this) to match %search% - searchCall.getNode().getFunc().(Attribute).getName().matches("%search%") and - // set the third argument (search_filter) as sink - this.asExpr() = searchCall.getArg(2).getNode() - // set the first argument (DN) as sink - // or this.asExpr() = searchCall.getArg(0) // Should this be set? - ) - } -} - -class ConnectionSink extends DataFlow::Node { - ConnectionSink() { - exists(SsaVariable connVar, CallNode searchCall | - // get variable whose value equals a call to ldap.initialize - connVar.getDefinition().getImmediateDominator() = Value::named("ldap3.Connection").getACall() and - // get the Call in which the previous variable is used - connVar.getAUse().getNode() = searchCall.getNode().getFunc().(Attribute).getObject() and - // restrict that call's attribute (something.this) to match %search% - searchCall.getNode().getFunc().(Attribute).getName().matches("%search%") and - // set the second argument (search_filter) as sink - this.asExpr() = searchCall.getArg(1).getNode() - // set the first argument (DN) as sink - // or this.asExpr() = searchCall.getArg(0) // Should this be set? - ) - } -} - -class EscapeSanitizer extends DataFlow::Node { - EscapeSanitizer() { - exists(Call c | - ( - // avoid flow through any %escape% function - c.getFunc().(Attribute).getName().matches("%escape%") or // something.%escape%() - c.getFunc().(Name).getId().matches("%escape%") // %escape%() - ) and - this.asExpr() = c - ) - } -} - -class LDAPInjectionSink extends DataFlow::Node { - LDAPInjectionSink() { - this instanceof InitializeSink or - this instanceof ConnectionSink - } -} - -class LDAPInjectionFlowConfig extends TaintTracking::Configuration { - LDAPInjectionFlowConfig() { this = "LDAPInjectionFlowConfig" } - - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof LDAPInjectionSink } - - override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof EscapeSanitizer } -} - -from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink -where config.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "$@ LDAP query executes $@.", sink.getNode(), "This", - source.getNode(), "a user-provided value" +from + LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink, + LDAPQuery castedSink +where + config.hasFlowPath(source, sink) and + castedSink = sink.getNode() +select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@ probably leaking $@.", + sink.getNode(), "This", source.getNode(), "a user-provided value", castedSink.getLDAPNode(), + castedSink.getLDAPPart(), castedSink.getAttrList(), "this attribute(s)" diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized.py b/python/ql/src/experimental/Security/CWE-090/ldap3_bad.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized.py rename to python/ql/src/experimental/Security/CWE-090/ldap3_bad.py diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized.py b/python/ql/src/experimental/Security/CWE-090/ldap3_good.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized.py rename to python/ql/src/experimental/Security/CWE-090/ldap3_good.py diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py deleted file mode 100644 index c7dbb3450588..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_sanitized_asObj.py +++ /dev/null @@ -1,57 +0,0 @@ -from ldap3 import Server, Connection -from ldap3.utils.conv import escape_filter_chars -from flask import request, Flask - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - sanitized_dn = "dc=%s" % request.args['dc'] - sanitized_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars( - request.args['username']) - - srv = Server('localhost', port=1337) - conn = Connection(srv, user=sanitized_dn, auto_bind=True) - conn.search(sanitized_dn, sanitized_filter) - return conn.response - - -@app.route("/var_tainted") -def var_tainted(): - sanitized_dn = request.args['dc'] - sanitized_filter = request.args['username'] - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars(sanitized_filter) - - srv = Server('localhost', port=1337) - conn = Connection(srv, user=dn, auto_bind=True) - conn.search(dn, search_filter) - return conn.response - - -@app.route("/direct") -def direct(): - srv = Server('localhost', port=1337) - conn = Connection(srv, user="dc=%s" % request.args['dc'], auto_bind=True) - conn.search("dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % - escape_filter_chars(request.args['username'])) - return conn.response - - -@app.route("/with_2") -def with_2(): - sanitized_dn = request.args['dc'] - sanitized_filter = escape_filter_chars(request.args['username']) - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - srv = Server('localhost', port=1337) - with Connection(server, auto_bind=True) as conn: - conn.search(dn, search_filter) - return conn.response - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py deleted file mode 100644 index 634ee992f3e5..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap3_unsanitized_asObj.py +++ /dev/null @@ -1,55 +0,0 @@ -from ldap3 import Server, Connection -from flask import request, Flask - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - unsanitized_dn = "dc=%s" % request.args['dc'] - unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] - - srv = Server('localhost', port=1337) - conn = Connection(srv, user=unsanitized_dn, auto_bind=True) - conn.search(unsanitized_dn, unsanitized_filter) - return conn.response - - -@app.route("/var_tainted") -def var_tainted(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - srv = Server('localhost', port=1337) - conn = Connection(srv, user=dn, auto_bind=True) - conn.search(dn, search_filter) - return conn.response - - -@app.route("/direct") -def direct(): - srv = Server('localhost', port=1337) - conn = Connection(srv, user="dc=%s" % request.args['dc'], auto_bind=True) - conn.search( - "dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % request.args['username']) - return conn.response - - -@app.route("/with_2") -def with_2(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - srv = Server('localhost', port=1337) - with Connection(server, auto_bind=True) as conn: - conn.search(dn, search_filter) - return conn.response - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py deleted file mode 100644 index 83bafa791956..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized.py +++ /dev/null @@ -1,56 +0,0 @@ -from flask import request, Flask -import ldap -import ldap.filter -import ldap.dn - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - sanitized_dn = "dc=%s" % ldap.dn.escape_dn_chars(request.args['dc']) - sanitized_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars( - request.args['username']) - - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - sanitized_dn, ldap.SCOPE_SUBTREE, sanitized_filter) - return user[0] - - -@app.route("/var_tainted") -def var_tainted(): - sanitized_dn = request.args['dc'] - sanitized_filter = request.args['username'] - - dn = "dc=%s" % ldap.dn.escape_dn_chars(sanitized_dn) - search_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(sanitized_filter) - - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - - -@app.route("/direct") -def direct(): - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s("dc=%s" % ldap.dn.escape_dn_chars( - request.args['dc']), ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(request.args['username'])) - return user[0] - - -@app.route("/with_") -def with_(): - sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) - sanitized_filter = ldap.filter.escape_filter_chars( - request.args['username']) - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - with ldap.initialize("ldap://127.0.0.1:1337") as ldap_connection: - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py deleted file mode 100644 index 1c9662a4bcf8..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap_sanitized_asObj.py +++ /dev/null @@ -1,57 +0,0 @@ -from flask import request, Flask -from ldap import initialize -import ldap.filter -import ldap.dn - -app = Flask(__name__) - - -@app.route("/tainted_var_2") -def tainted_var_2(): - sanitized_dn = "dc=%s" % ldap.dn.escape_dn_chars(request.args['dc']) - sanitized_filter = "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars( - request.args['username']) - - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - sanitized_dn, ldap.SCOPE_SUBTREE, sanitized_filter) - return user[0] - - -@app.route("/var_tainted_2") -def var_tainted_2(): - sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) - sanitized_filter = ldap.filter.escape_filter_chars( - request.args['username']) - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - - -@app.route("/direct_2") -def direct_2(): - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s("dc=%s" % ldap.dn.escape_dn_chars( - request.args['dc']), ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % ldap.filter.escape_filter_chars(request.args['username'])) - return user[0] - - -@app.route("/with_2") -def with_2(): - sanitized_dn = ldap.dn.escape_dn_chars(request.args['dc']) - sanitized_filter = ldap.filter.escape_filter_chars( - request.args['username']) - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - with initialize("ldap://127.0.0.1:1337") as ldap_connection: - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py deleted file mode 100644 index 8b22596b578d..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized.py +++ /dev/null @@ -1,52 +0,0 @@ -from flask import request, Flask -import ldap - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - unsanitized_dn = "dc=%s" % request.args['dc'] - unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] - - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - unsanitized_dn, ldap.SCOPE_SUBTREE, unsanitized_filter) - return user[0] - - -@app.route("/var_tainted") -def var_tainted(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - - -@app.route("/direct") -def direct(): - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - "dc=%s" % request.args['dc'], ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % request.args['username']) - return user[0] - - -@app.route("/with_") -def with_(): - sanitized_dn = request.args['dc'] - sanitized_filter = request.args['username'] - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - with ldap.initialize("ldap://127.0.0.1:1337") as ldap_connection: - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py b/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py deleted file mode 100644 index 49774dda2ec9..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/tests/ldap_unsanitized_asObj.py +++ /dev/null @@ -1,52 +0,0 @@ -from flask import request, Flask -from ldap import initialize - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - unsanitized_dn = "dc=%s" % request.args['dc'] - unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] - - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - unsanitized_dn, ldap.SCOPE_SUBTREE, unsanitized_filter) - return user[0] - - -@app.route("/var_tainted") -def var_tainted(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - - -@app.route("/direct") -def direct(): - ldap_connection = initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - "dc=%s" % request.args['dc'], ldap.SCOPE_SUBTREE, "(&(objectClass=*)(uid=%s))" % request.args['username']) - return user[0] - - -@app.route("/with_2") -def with_2(): - sanitized_dn = request.args['dc'] - sanitized_filter = request.args['username'] - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - with initialize("ldap://127.0.0.1:1337") as ldap_connection: - user = ldap_connection.search_s(dn, ldap.SCOPE_SUBTREE, search_filter) - return user[0] - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py new file mode 100644 index 000000000000..a409a38e019f --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py @@ -0,0 +1,46 @@ +from flask import request, Flask +import ldap + +app = Flask(__name__) + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter, ["testAttr1", "testAttr2"]) + + +@app.route("/direct") +def direct(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + user = ldap.initialize("ldap://127.0.0.1:1337").search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter, ["testAttr1", "testAttr2"]) + + +@app.route("/normal_argbyname") +def normal_argbyname(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=unsafe_filter) + + +@app.route("/direct_argbyname") +def direct_argbyname(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + user = ldap.initialize("ldap://127.0.0.1:1337").search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=unsafe_filter) + + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py new file mode 100644 index 000000000000..1d04505fa286 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py @@ -0,0 +1,60 @@ +from flask import request, Flask +import ldap +import ldap.filter +import ldap.dn + +app = Flask(__name__) + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + safe_dn, ldap.SCOPE_SUBTREE, safe_filter, ["testAttr1", "testAttr2"]) + + +@app.route("/direct") +def direct(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + user = ldap.initialize("ldap://127.0.0.1:1337").search_s( + safe_dn, ldap.SCOPE_SUBTREE, safe_filter, ["testAttr1", "testAttr2"]) + + +@app.route("/normal_argbyname") +def normal_argbyname(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + safe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=safe_filter) + + +@app.route("/direct_argbyname") +def direct_argbyname(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + user = ldap.initialize("ldap://127.0.0.1:1337").search_s( + safe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=safe_filter) + + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index 904b7967ee87..e2b278e40da4 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -13,3 +13,46 @@ private import semmle.python.dataflow.new.DataFlow private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.TaintTracking private import experimental.semmle.python.Frameworks +private import semmle.python.ApiGraphs + +/** + * To-Do + * + * LDAPQuery -> collect functions executing a search filter/DN + * LDAPEscape -> collect functions escaping a search filter/DN + */ +module LDAPQuery { + abstract class Range extends DataFlow::Node { + abstract DataFlow::Node getLDAPNode(); + + abstract string getLDAPPart(); + + abstract DataFlow::Node getAttrs(); + } +} + +class LDAPQuery extends DataFlow::Node { + LDAPQuery::Range range; + + LDAPQuery() { this = range } + + DataFlow::Node getLDAPNode() { result = range.getLDAPNode() } + + string getLDAPPart() { result = range.getLDAPPart() } + + DataFlow::Node getAttrs() { result = range.getAttrs() } +} + +module LDAPEscape { + abstract class Range extends DataFlow::Node { + abstract DataFlow::Node getEscapeNode(); + } +} + +class LDAPEscape extends DataFlow::Node { + LDAPEscape::Range range; + + LDAPEscape() { this = range } + + DataFlow::Node getEscapeNode() { result = range.getEscapeNode() } +} diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 420caf0d73bb..1ef42edbdbb2 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -9,3 +9,59 @@ private import semmle.python.dataflow.new.TaintTracking private import semmle.python.dataflow.new.RemoteFlowSources private import experimental.semmle.python.Concepts private import semmle.python.ApiGraphs + +private module LDAP { + private module LDAP2 { + private class LDAP2QueryMethods extends string { + LDAP2QueryMethods() { + this in ["search", "search_s", "search_st", "search_ext", "search_ext_s"] + } + } + + private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { + DataFlow::Node ldapNode; + string ldapPart; + DataFlow::Node attrs; + + LDAP2Query() { + exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode initCall | + this.getFunction() = searchMethod and + initCall = API::moduleImport("ldap").getMember("initialize").getACall() and + initCall = searchMethod.getObject().getALocalSource() and + searchMethod.getAttributeName() instanceof LDAP2QueryMethods and + ( + ( + ldapNode = this.getArg(2) or + ldapNode = this.getArgByName("filterstr") + ) and + ldapPart = "search_filter" + or + ldapNode = this.getArg(0) and + ldapPart = "DN" + ) and + ( // what if they're not set? + attrs = this.getArg(3) or + attrs = this.getArgByName("attrlist") + ) + ) + } + + override DataFlow::Node getLDAPNode() { result = ldapNode } + + override string getLDAPPart() { result = ldapPart } + + override DataFlow::Node getAttrs() { result = attrs } + } + + private class LDAP2EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { + DataFlow::Node escapeNode; + + LDAP2EscapeDN() { + this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() and + escapeNode = this.getArg(0) + } + + override DataFlow::Node getEscapeNode() { result = escapeNode } + } + } +} diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll new file mode 100644 index 000000000000..f5fa2306f310 --- /dev/null +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll @@ -0,0 +1,21 @@ +/** + * Provides a taint-tracking configuration for detecting LDAP injection vulnerabilities + */ + +import python +import experimental.semmle.python.Concepts +import semmle.python.dataflow.new.DataFlow +import semmle.python.dataflow.new.TaintTracking +import semmle.python.dataflow.new.RemoteFlowSources + +/** + * A taint-tracking configuration for detecting regular expression injections. + */ +class LDAPInjectionFlowConfig extends TaintTracking::Configuration { + LDAPInjectionFlowConfig() { this = "LDAPInjectionFlowConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink = any(LDAPQuery lQ).getLDAPNode() } + // override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof RemoteFlowSource } // any(LDAPEscape ldapEsc).getEscapeNode() } +} From 0775d35591511db2003b3b7453c6bfc2284ba250 Mon Sep 17 00:00:00 2001 From: haby0 Date: Mon, 29 Mar 2021 12:02:37 +0800 Subject: [PATCH 0070/1662] update VerificationMethodFlowConfig, add if test --- .../Security/CWE/CWE-352/JsonpInjection.java | 35 ++-- .../Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- .../Security/CWE/CWE-352/JsonpInjection.ql | 27 ++-- .../CWE/CWE-352/JsonpInjectionLib.qll | 47 ++++-- .../JsonpController.java | 35 ++-- .../JsonpInjection.expected | 138 ++++++++-------- .../JsonpController.java | 37 +++-- .../JsonpInjection.expected | 147 ++++++++--------- .../JsonpController.java | 37 +++-- .../JsonpInjection.expected | 150 +++++++++--------- 10 files changed, 362 insertions(+), 293 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java index 7f479a8c0230..8e2a0c9005ff 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java @@ -26,9 +26,6 @@ public class JsonpInjection { hashMap.put("password","123456"); } - private String name = null; - - @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { @@ -77,7 +74,6 @@ public void bad5(HttpServletRequest request, PrintWriter pw = null; Gson gson = new Gson(); String result = gson.toJson(hashMap); - String resultStr = null; pw = response.getWriter(); resultStr = jsonpCallback + "(" + result + ")"; @@ -109,13 +105,25 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") @ResponseBody - public String good1(HttpServletRequest request) { + public String bad8(HttpServletRequest request) { String resultStr = null; String token = request.getParameter("token"); - if (verifToken(token)){ + boolean result = verifToken(token); //Just check. + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String referer = request.getParameter("referer"); + if (verifReferer(referer)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; @@ -125,7 +133,7 @@ public String good1(HttpServletRequest request) { } - @GetMapping(value = "jsonp9") + @GetMapping(value = "jsonp10") @ResponseBody public String good2(HttpServletRequest request) { String resultStr = null; @@ -140,7 +148,7 @@ public String good2(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp10") + @RequestMapping(value = "jsonp11") @ResponseBody public String good3(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); @@ -151,7 +159,7 @@ public String good3(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp11") + @RequestMapping(value = "jsonp12") @ResponseBody public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ @@ -200,4 +208,11 @@ public static boolean verifToken(String token){ } return true; } + + public static boolean verifReferer(String str){ + if (str != "xxxx"){ + return false; + } + return true; + } } \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index 93c167d6c2ca..2712f30a3f2b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -14,7 +14,7 @@ When there is a cross-domain problem, the problem of sensitive information leaka -

    The following examples show the bad case and the good case respectively. Bad case, such as bad1 to bad7, +

    The following examples show the bad case and the good case respectively. Bad case, such as bad1 to bad8, will cause information leakage problems when there are cross-domain problems. In a good case, for example, in the good1 method and the good2 method, use the verifToken method to do the random token Verification can solve the problem of information leakage caused by cross-domain.

    diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index eb4fe4e5b66a..6e333d839930 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -18,20 +18,18 @@ import DataFlow::PathGraph /** Determine whether there is a verification method for the remote streaming source data flow path method. */ predicate existsFilterVerificationMethod() { - exists(MethodAccess ma, Node existsNode, Method m | - ma.getMethod() instanceof VerificationMethodClass and - existsNode.asExpr() = ma and - m = getACallingCallableOrSelf(existsNode.getEnclosingCallable()) and + exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc, Method m | + vmfc.hasFlow(source, sink) and + m = getACallingCallableOrSelf(source.getEnclosingCallable()) and isDoFilterMethod(m) ) } /** Determine whether there is a verification method for the remote streaming source data flow path method. */ predicate existsServletVerificationMethod(Node checkNode) { - exists(MethodAccess ma, Node existsNode | - ma.getMethod() instanceof VerificationMethodClass and - existsNode.asExpr() = ma and - getACallingCallableOrSelf(existsNode.getEnclosingCallable()) = + exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc | + vmfc.hasFlow(source, sink) and + getACallingCallableOrSelf(source.getEnclosingCallable()) = getACallingCallableOrSelf(checkNode.getEnclosingCallable()) ) } @@ -40,13 +38,14 @@ predicate existsServletVerificationMethod(Node checkNode) { class RequestResponseFlowConfig extends TaintTracking::Configuration { RequestResponseFlowConfig() { this = "RequestResponseFlowConfig" } - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink } + override predicate isSource(DataFlow::Node source) { + source instanceof RemoteFlowSource and + getACallingCallableOrSelf(source.getEnclosingCallable()) instanceof RequestGetMethod + } - /** Eliminate the method of calling the node is not the get method. */ - override predicate isSanitizer(DataFlow::Node node) { - not getACallingCallableOrSelf(node.getEnclosingCallable()) instanceof RequestGetMethod + override predicate isSink(DataFlow::Node sink) { + sink instanceof XssSink and + getACallingCallableOrSelf(sink.getEnclosingCallable()) instanceof RequestGetMethod } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index d0e00bcb634f..bf90926f72f0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -3,30 +3,47 @@ import DataFlow import JsonStringLib import semmle.code.java.security.XSS import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.DataFlow3 import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController -/** Taint-tracking configuration tracing flow from untrusted inputs to verification of remote user input. */ -class VerificationMethodFlowConfig extends TaintTracking::Configuration { - VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } +/** A data flow configuration is tracing flow from the access to the authentication method of token/auth/referer/origin to if condition. */ +class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { + VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + override predicate isSource(DataFlow::Node src) { + exists(MethodAccess ma, BarrierGuard bg | ma = bg | + ( + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + or + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + ) and + ma = src.asExpr() + ) + } override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") and - ma.getAnArgument() = sink.asExpr() - ) + exists(IfStmt is | is.getCondition() = sink.asExpr()) } } -/** The parameter names of this method are token/auth/referer/origin. */ -class VerificationMethodClass extends Method { - VerificationMethodClass() { - exists(MethodAccess ma, VerificationMethodFlowConfig vmfc, Node node | - this = ma.getMethod() and - node.asExpr() = ma.getAnArgument() and - vmfc.hasFlowTo(node) +/** Taint-tracking configuration tracing flow from untrusted inputs to verification of remote user input. */ +class VerificationMethodFlowConfig extends TaintTracking2::Configuration { + VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } + + override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma, BarrierGuard bg, int i, VerificationMethodToIfFlowConfig vmtifc | + ma = bg + | + ( + ma.getMethod().getParameter(i).getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + or + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + ) and + ma.getArgument(i) = sink.asExpr() and + vmtifc.hasFlow(exprNode(ma), _) ) } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java index e5b5e70a38d7..e875da2f6995 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java @@ -26,9 +26,6 @@ public class JsonpController { hashMap.put("password","123456"); } - private String name = null; - - @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { @@ -77,7 +74,6 @@ public void bad5(HttpServletRequest request, PrintWriter pw = null; Gson gson = new Gson(); String result = gson.toJson(hashMap); - String resultStr = null; pw = response.getWriter(); resultStr = jsonpCallback + "(" + result + ")"; @@ -109,13 +105,25 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") @ResponseBody - public String good1(HttpServletRequest request) { + public String bad8(HttpServletRequest request) { String resultStr = null; String token = request.getParameter("token"); - if (verifToken(token)){ + boolean result = verifToken(token); //Just check. + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String referer = request.getParameter("referer"); + if (verifReferer(referer)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; @@ -125,7 +133,7 @@ public String good1(HttpServletRequest request) { } - @GetMapping(value = "jsonp9") + @GetMapping(value = "jsonp10") @ResponseBody public String good2(HttpServletRequest request) { String resultStr = null; @@ -140,7 +148,7 @@ public String good2(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp10") + @RequestMapping(value = "jsonp11") @ResponseBody public String good3(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); @@ -151,7 +159,7 @@ public String good3(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp11") + @RequestMapping(value = "jsonp12") @ResponseBody public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ @@ -200,4 +208,11 @@ public static boolean verifToken(String token){ } return true; } + + public static boolean verifReferer(String str){ + if (str != "xxxx"){ + return false; + } + return true; + } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected index 501565f2b4ec..3da805c6a698 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected @@ -1,80 +1,76 @@ edges -| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:36:21:36:54 | ... + ... : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:45:21:45:80 | ... + ... : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:55:21:55:55 | ... + ... : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:65:21:65:54 | ... + ... : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:79:21:79:54 | ... + ... : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | | JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | | JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| RefererFilter.java:22:26:22:53 | getHeader(...) : String | RefererFilter.java:23:39:23:45 | refefer | nodes -| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:118:24:118:28 | token | semmle.label | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:133:37:133:41 | token | semmle.label | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:45:21:45:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:55:21:55:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:65:21:65:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | @@ -82,6 +78,4 @@ nodes | JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| RefererFilter.java:22:26:22:53 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| RefererFilter.java:23:39:23:45 | refefer | semmle.label | refefer | #select diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java index e5b5e70a38d7..4c60b356cfb4 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java @@ -26,9 +26,6 @@ public class JsonpController { hashMap.put("password","123456"); } - private String name = null; - - @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { @@ -77,7 +74,6 @@ public void bad5(HttpServletRequest request, PrintWriter pw = null; Gson gson = new Gson(); String result = gson.toJson(hashMap); - String resultStr = null; pw = response.getWriter(); resultStr = jsonpCallback + "(" + result + ")"; @@ -109,13 +105,25 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") @ResponseBody - public String good1(HttpServletRequest request) { + public String bad8(HttpServletRequest request) { String resultStr = null; String token = request.getParameter("token"); - if (verifToken(token)){ + boolean result = verifToken(token); //Just check. + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String referer = request.getParameter("referer"); + if (verifReferer(referer)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; @@ -125,7 +133,7 @@ public String good1(HttpServletRequest request) { } - @GetMapping(value = "jsonp9") + @GetMapping(value = "jsonp10") @ResponseBody public String good2(HttpServletRequest request) { String resultStr = null; @@ -140,7 +148,7 @@ public String good2(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp10") + @RequestMapping(value = "jsonp11") @ResponseBody public String good3(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); @@ -151,7 +159,7 @@ public String good3(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp11") + @RequestMapping(value = "jsonp12") @ResponseBody public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ @@ -200,4 +208,11 @@ public static boolean verifToken(String token){ } return true; } -} + + public static boolean verifReferer(String str){ + if (str != "xxxx"){ + return false; + } + return true; + } +} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected index 91d23cebbdac..2e4bc97ff973 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected @@ -1,76 +1,77 @@ edges -| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:36:21:36:54 | ... + ... : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:45:21:45:80 | ... + ... : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:55:21:55:55 | ... + ... : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:65:21:65:54 | ... + ... : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:79:21:79:54 | ... + ... : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | nodes -| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:118:24:118:28 | token | semmle.label | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:133:37:133:41 | token | semmle.label | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:45:21:45:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:55:21:55:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:65:21:65:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | #select -| JsonpController.java:40:16:40:24 | resultStr | JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:36:32:36:68 | getParameter(...) | this user input | -| JsonpController.java:49:16:49:24 | resultStr | JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:47:32:47:68 | getParameter(...) | this user input | -| JsonpController.java:59:16:59:24 | resultStr | JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:56:32:56:68 | getParameter(...) | this user input | -| JsonpController.java:69:16:69:24 | resultStr | JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:66:32:66:68 | getParameter(...) | this user input | -| JsonpController.java:84:20:84:28 | resultStr | JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:76:32:76:68 | getParameter(...) | this user input | -| JsonpController.java:98:20:98:28 | resultStr | JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:91:32:91:68 | getParameter(...) | this user input | -| JsonpController.java:109:16:109:24 | resultStr | JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:105:32:105:68 | getParameter(...) | this user input | +| JsonpController.java:37:16:37:24 | resultStr | JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:33:32:33:68 | getParameter(...) | this user input | +| JsonpController.java:46:16:46:24 | resultStr | JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:44:32:44:68 | getParameter(...) | this user input | +| JsonpController.java:56:16:56:24 | resultStr | JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:53:32:53:68 | getParameter(...) | this user input | +| JsonpController.java:66:16:66:24 | resultStr | JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:63:32:63:68 | getParameter(...) | this user input | +| JsonpController.java:80:20:80:28 | resultStr | JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:73:32:73:68 | getParameter(...) | this user input | +| JsonpController.java:94:20:94:28 | resultStr | JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:87:32:87:68 | getParameter(...) | this user input | +| JsonpController.java:105:16:105:24 | resultStr | JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:101:32:101:68 | getParameter(...) | this user input | +| JsonpController.java:117:16:117:24 | resultStr | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:114:32:114:68 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java index e5b5e70a38d7..4c60b356cfb4 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java @@ -26,9 +26,6 @@ public class JsonpController { hashMap.put("password","123456"); } - private String name = null; - - @GetMapping(value = "jsonp1") @ResponseBody public String bad1(HttpServletRequest request) { @@ -77,7 +74,6 @@ public void bad5(HttpServletRequest request, PrintWriter pw = null; Gson gson = new Gson(); String result = gson.toJson(hashMap); - String resultStr = null; pw = response.getWriter(); resultStr = jsonpCallback + "(" + result + ")"; @@ -109,13 +105,25 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") @ResponseBody - public String good1(HttpServletRequest request) { + public String bad8(HttpServletRequest request) { String resultStr = null; String token = request.getParameter("token"); - if (verifToken(token)){ + boolean result = verifToken(token); //Just check. + String jsonpCallback = request.getParameter("jsonpCallback"); + String jsonStr = getJsonStr(hashMap); + resultStr = jsonpCallback + "(" + jsonStr + ")"; + return resultStr; + } + + + @GetMapping(value = "jsonp9") + @ResponseBody + public String good1(HttpServletRequest request) { + String resultStr = null; + String referer = request.getParameter("referer"); + if (verifReferer(referer)){ String jsonpCallback = request.getParameter("jsonpCallback"); String jsonStr = getJsonStr(hashMap); resultStr = jsonpCallback + "(" + jsonStr + ")"; @@ -125,7 +133,7 @@ public String good1(HttpServletRequest request) { } - @GetMapping(value = "jsonp9") + @GetMapping(value = "jsonp10") @ResponseBody public String good2(HttpServletRequest request) { String resultStr = null; @@ -140,7 +148,7 @@ public String good2(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp10") + @RequestMapping(value = "jsonp11") @ResponseBody public String good3(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); @@ -151,7 +159,7 @@ public String good3(HttpServletRequest request) { return resultStr; } - @RequestMapping(value = "jsonp11") + @RequestMapping(value = "jsonp12") @ResponseBody public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ @@ -200,4 +208,11 @@ public static boolean verifToken(String token){ } return true; } -} + + public static boolean verifReferer(String str){ + if (str != "xxxx"){ + return false; + } + return true; + } +} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected index c2bcab77d4d4..d90d51ab5524 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected @@ -1,79 +1,76 @@ edges -| JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:39:21:39:54 | ... + ... : String | JsonpController.java:40:16:40:24 | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:48:21:48:80 | ... + ... : String | JsonpController.java:49:16:49:24 | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:58:21:58:55 | ... + ... : String | JsonpController.java:59:16:59:24 | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:68:21:68:54 | ... + ... : String | JsonpController.java:69:16:69:24 | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:83:21:83:54 | ... + ... : String | JsonpController.java:84:20:84:28 | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:97:21:97:54 | ... + ... : String | JsonpController.java:98:20:98:28 | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:108:21:108:54 | ... + ... : String | JsonpController.java:109:16:109:24 | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | JsonpController.java:118:24:118:28 | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:121:25:121:59 | ... + ... : String | JsonpController.java:122:20:122:28 | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | JsonpController.java:133:37:133:41 | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:139:21:139:55 | ... + ... : String | JsonpController.java:140:16:140:24 | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | JsonpController.java:151:16:151:24 | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | JsonpController.java:166:16:166:24 | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:36:21:36:54 | ... + ... : String | JsonpController.java:37:16:37:24 | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:45:21:45:80 | ... + ... : String | JsonpController.java:46:16:46:24 | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:55:21:55:55 | ... + ... : String | JsonpController.java:56:16:56:24 | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:65:21:65:54 | ... + ... : String | JsonpController.java:66:16:66:24 | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:79:21:79:54 | ... + ... : String | JsonpController.java:80:20:80:28 | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | | JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | JsonpInjectionServlet1.java:38:39:38:45 | referer | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | | JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | nodes -| JsonpController.java:36:32:36:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:39:21:39:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:40:16:40:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:47:32:47:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:48:21:48:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:49:16:49:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:56:32:56:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:58:21:58:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:59:16:59:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:66:32:66:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:68:21:68:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:69:16:69:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:76:32:76:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:83:21:83:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:84:20:84:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:91:32:91:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:97:21:97:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:98:20:98:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:32:105:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:108:21:108:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:109:16:109:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:24:117:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:118:24:118:28 | token | semmle.label | token | -| JsonpController.java:119:36:119:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:121:25:121:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:122:20:122:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:132:24:132:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:133:37:133:41 | token | semmle.label | token | -| JsonpController.java:137:32:137:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:139:21:139:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:140:16:140:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:150:21:150:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:151:16:151:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:165:21:165:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:166:16:166:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:44:32:44:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:45:21:45:80 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:53:32:53:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:55:21:55:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:63:32:63:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:65:21:65:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:73:32:73:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:87:32:87:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:101:32:101:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | +| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet1.java:36:26:36:49 | getHeader(...) : String | semmle.label | getHeader(...) : String | -| JsonpInjectionServlet1.java:38:39:38:45 | referer | semmle.label | referer | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | @@ -82,11 +79,12 @@ nodes | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | #select -| JsonpController.java:40:16:40:24 | resultStr | JsonpController.java:36:32:36:68 | getParameter(...) : String | JsonpController.java:40:16:40:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:36:32:36:68 | getParameter(...) | this user input | -| JsonpController.java:49:16:49:24 | resultStr | JsonpController.java:47:32:47:68 | getParameter(...) : String | JsonpController.java:49:16:49:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:47:32:47:68 | getParameter(...) | this user input | -| JsonpController.java:59:16:59:24 | resultStr | JsonpController.java:56:32:56:68 | getParameter(...) : String | JsonpController.java:59:16:59:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:56:32:56:68 | getParameter(...) | this user input | -| JsonpController.java:69:16:69:24 | resultStr | JsonpController.java:66:32:66:68 | getParameter(...) : String | JsonpController.java:69:16:69:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:66:32:66:68 | getParameter(...) | this user input | -| JsonpController.java:84:20:84:28 | resultStr | JsonpController.java:76:32:76:68 | getParameter(...) : String | JsonpController.java:84:20:84:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:76:32:76:68 | getParameter(...) | this user input | -| JsonpController.java:98:20:98:28 | resultStr | JsonpController.java:91:32:91:68 | getParameter(...) : String | JsonpController.java:98:20:98:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:91:32:91:68 | getParameter(...) | this user input | -| JsonpController.java:109:16:109:24 | resultStr | JsonpController.java:105:32:105:68 | getParameter(...) : String | JsonpController.java:109:16:109:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:105:32:105:68 | getParameter(...) | this user input | +| JsonpController.java:37:16:37:24 | resultStr | JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:33:32:33:68 | getParameter(...) | this user input | +| JsonpController.java:46:16:46:24 | resultStr | JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:44:32:44:68 | getParameter(...) | this user input | +| JsonpController.java:56:16:56:24 | resultStr | JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:53:32:53:68 | getParameter(...) | this user input | +| JsonpController.java:66:16:66:24 | resultStr | JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:63:32:63:68 | getParameter(...) | this user input | +| JsonpController.java:80:20:80:28 | resultStr | JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:73:32:73:68 | getParameter(...) | this user input | +| JsonpController.java:94:20:94:28 | resultStr | JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:87:32:87:68 | getParameter(...) | this user input | +| JsonpController.java:105:16:105:24 | resultStr | JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:101:32:101:68 | getParameter(...) | this user input | +| JsonpController.java:117:16:117:24 | resultStr | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:114:32:114:68 | getParameter(...) | this user input | | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | Jsonp response might include code from $@. | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) | this user input | From ad36bea9d4ce61f804cdbfedddc5d3bebecdf1f6 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Mon, 29 Mar 2021 09:14:35 +0200 Subject: [PATCH 0071/1662] Refactor LDAP3 stuff (untested) --- .../Security/CWE-090/LDAPInjection.ql | 5 +- .../experimental/semmle/python/Concepts.qll | 6 -- .../semmle/python/frameworks/Stdlib.qll | 95 +++++++++++++++++-- .../security/injection/LDAPInjection.qll | 5 +- 4 files changed, 94 insertions(+), 17 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 778b771f8839..7ce3a118918c 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -19,7 +19,8 @@ from LDAPQuery castedSink where config.hasFlowPath(source, sink) and - castedSink = sink.getNode() + castedSink = sink.getNode() //and +// if exists(castedSink.getAttrs()) then select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@ probably leaking $@.", sink.getNode(), "This", source.getNode(), "a user-provided value", castedSink.getLDAPNode(), - castedSink.getLDAPPart(), castedSink.getAttrList(), "this attribute(s)" + castedSink.getLDAPPart(), castedSink.getAttrs(), "this attribute(s)" diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index e2b278e40da4..e0f5c1bdec34 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -15,12 +15,6 @@ private import semmle.python.dataflow.new.TaintTracking private import experimental.semmle.python.Frameworks private import semmle.python.ApiGraphs -/** - * To-Do - * - * LDAPQuery -> collect functions executing a search filter/DN - * LDAPEscape -> collect functions escaping a search filter/DN - */ module LDAPQuery { abstract class Range extends DataFlow::Node { abstract DataFlow::Node getLDAPNode(); diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 1ef42edbdbb2..aa9013a76c06 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -30,18 +30,14 @@ private module LDAP { initCall = searchMethod.getObject().getALocalSource() and searchMethod.getAttributeName() instanceof LDAP2QueryMethods and ( + ldapNode = this.getArg(0) and + ldapPart = "DN" + or ( ldapNode = this.getArg(2) or ldapNode = this.getArgByName("filterstr") ) and ldapPart = "search_filter" - or - ldapNode = this.getArg(0) and - ldapPart = "DN" - ) and - ( // what if they're not set? - attrs = this.getArg(3) or - attrs = this.getArgByName("attrlist") ) ) } @@ -50,7 +46,9 @@ private module LDAP { override string getLDAPPart() { result = ldapPart } - override DataFlow::Node getAttrs() { result = attrs } + override DataFlow::Node getAttrs() { + result = this.getArg(3) or result = this.getArgByName("attrlist") + } } private class LDAP2EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { @@ -63,5 +61,86 @@ private module LDAP { override DataFlow::Node getEscapeNode() { result = escapeNode } } + + private class LDAP2EscapeFilter extends DataFlow::CallCfgNode, LDAPEscape::Range { + DataFlow::Node escapeNode; + + LDAP2EscapeFilter() { + this = + API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall() and + escapeNode = this.getArg(0) + } + + override DataFlow::Node getEscapeNode() { result = escapeNode } + } + } + + private module LDAP3 { + private class LDAP3QueryMethods extends string { + // pending to dig into this although https://github.com/cannatag/ldap3/blob/21001d9087c0d24c399eec433a261c455b7bc97f/ldap3/core/connection.py#L760 + LDAP3QueryMethods() { this in ["search"] } + } + + private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { + DataFlow::Node ldapNode; + string ldapPart; + DataFlow::Node attrs; + + LDAP3Query() { + exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode connCall | + this.getFunction() = searchMethod and + connCall = API::moduleImport("ldap3").getMember("Connection").getACall() and + connCall = searchMethod.getObject().getALocalSource() and + searchMethod.getAttributeName() instanceof LDAP3QueryMethods and + ( + ldapNode = this.getArg(0) and + ldapPart = "DN" + or + ldapNode = this.getArg(1) and + ldapPart = "search_filter" + ) + ) + } + + override DataFlow::Node getLDAPNode() { result = ldapNode } + + override string getLDAPPart() { result = ldapPart } + + override DataFlow::Node getAttrs() { + result = this.getArg(3) or result = this.getArgByName("attributes") + } + } + + private class LDAP3EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { + DataFlow::Node escapeNode; + + LDAP3EscapeDN() { + this = + API::moduleImport("ldap3") + .getMember("utils") + .getMember("dn") + .getMember("escape_rdn") + .getACall() and + escapeNode = this.getArg(0) + } + + override DataFlow::Node getEscapeNode() { result = escapeNode } + } + + private class LDAP3EscapeFilter extends DataFlow::CallCfgNode, LDAPEscape::Range { + DataFlow::Node escapeNode; + + LDAP3EscapeFilter() { + this = + API::moduleImport("ldap3") + .getMember("utils") + .getMember("conv") + .getMember("escape_filter_chars") + .getACall() and + escapeNode = this.getArg(0) + } + + override DataFlow::Node getEscapeNode() { result = escapeNode } + } } } diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll index f5fa2306f310..db8bdda7db61 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll @@ -17,5 +17,8 @@ class LDAPInjectionFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { sink = any(LDAPQuery lQ).getLDAPNode() } - // override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer instanceof RemoteFlowSource } // any(LDAPEscape ldapEsc).getEscapeNode() } + + override predicate isSanitizer(DataFlow::Node sanitizer) { + sanitizer = any(LDAPEscape lE).getEscapeNode() + } } From 8223539f0c0988e4d1ef79710c80c82533b12901 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Mon, 29 Mar 2021 23:28:28 +0200 Subject: [PATCH 0072/1662] Add a test without attributes --- .../Security/CWE-090/unit_tests/ldap_bad.py | 10 ++++++++++ .../Security/CWE-090/unit_tests/ldap_good.py | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py index a409a38e019f..011f3b828654 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py @@ -14,6 +14,16 @@ def normal(): unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter, ["testAttr1", "testAttr2"]) +@app.route("/normal_noAttrs") +def normal_noAttrs(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter) + + @app.route("/direct") def direct(): unsafe_dn = "dc=%s" % request.args['dc'] diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py index 1d04505fa286..eda3883da6dc 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py @@ -19,6 +19,19 @@ def normal(): safe_dn, ldap.SCOPE_SUBTREE, safe_filter, ["testAttr1", "testAttr2"]) +@app.route("/normal_noAttrs") +def normal_noAttrs(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + safe_dn, ldap.SCOPE_SUBTREE, safe_filter) + + @app.route("/direct") def direct(): unsafe_dn = "dc=%s" % request.args['dc'] From 3cda2e52073b72dfc126f7863041a85005d818ae Mon Sep 17 00:00:00 2001 From: jorgectf Date: Mon, 29 Mar 2021 23:39:49 +0200 Subject: [PATCH 0073/1662] Polish up ldap3 tests --- .../Security/CWE-090/ldap3_bad.py | 56 ------------------ .../Security/CWE-090/ldap3_good.py | 58 ------------------- .../Security/CWE-090/unit_tests/ldap3_bad.py | 38 ++++++++++++ .../Security/CWE-090/unit_tests/ldap3_good.py | 49 ++++++++++++++++ 4 files changed, 87 insertions(+), 114 deletions(-) delete mode 100644 python/ql/src/experimental/Security/CWE-090/ldap3_bad.py delete mode 100644 python/ql/src/experimental/Security/CWE-090/ldap3_good.py create mode 100644 python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py create mode 100644 python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py diff --git a/python/ql/src/experimental/Security/CWE-090/ldap3_bad.py b/python/ql/src/experimental/Security/CWE-090/ldap3_bad.py deleted file mode 100644 index fcd00c0269ca..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/ldap3_bad.py +++ /dev/null @@ -1,56 +0,0 @@ -import ldap3 -from flask import request, Flask - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - unsanitized_dn = "dc=%s" % request.args['dc'] - unsanitized_filter = "(&(objectClass=*)(uid=%s))" % request.args['username'] - - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user=unsanitized_dn, auto_bind=True) - conn.search(unsanitized_dn, unsanitized_filter) - return conn.response - - -@app.route("/var_tainted") -def var_tainted(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user=dn, auto_bind=True) - conn.search(dn, search_filter) - return conn.response - - -@app.route("/direct") -def direct(): - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user="dc=%s" % - request.args['dc'], auto_bind=True) - conn.search("dc=%s" % unsanitized_dn, - "(&(objectClass=*)(uid=%s))" % request.args['username']) - return conn.response - - -@app.route("/with_") -def with_(): - unsanitized_dn = request.args['dc'] - unsanitized_filter = request.args['username'] - - dn = "dc=%s" % unsanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % unsanitized_filter - - srv = ldap3.Server('localhost', port=1337) - with ldap3.Connection(server, auto_bind=True) as conn: - conn.search(dn, search_filter) - return conn.response - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/ldap3_good.py b/python/ql/src/experimental/Security/CWE-090/ldap3_good.py deleted file mode 100644 index 05bc1e24f716..000000000000 --- a/python/ql/src/experimental/Security/CWE-090/ldap3_good.py +++ /dev/null @@ -1,58 +0,0 @@ -import ldap3 -from ldap3.utils.conv import escape_filter_chars -from flask import request, Flask - -app = Flask(__name__) - - -@app.route("/tainted_var") -def tainted_var(): - sanitized_dn = "dc=%s" % request.args['dc'] - sanitized_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars( - request.args['username']) - - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user=sanitized_dn, auto_bind=True) - conn.search(sanitized_dn, sanitized_filter) - return conn.response - - -@app.route("/var_tainted") -def var_tainted(): - sanitized_dn = request.args['dc'] - sanitized_filter = request.args['username'] - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % escape_filter_chars(sanitized_filter) - - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user=dn, auto_bind=True) - conn.search(dn, search_filter) - return conn.response - - -@app.route("/direct") -def direct(): - srv = ldap3.Server('localhost', port=1337) - conn = ldap3.Connection(srv, user="dc=%s" % - request.args['dc'], auto_bind=True) - conn.search("dc=%s" % request.args['dc'], "(&(objectClass=*)(uid=%s))" % - escape_filter_chars(request.args['username'])) - return conn.response - - -@ app.route("/with_") -def with_(): - sanitized_dn = request.args['dc'] - sanitized_filter = escape_filter_chars(request.args['username']) - - dn = "dc=%s" % sanitized_dn - search_filter = "(&(objectClass=*)(uid=%s))" % sanitized_filter - - srv = ldap3.Server('localhost', port=1337) - with ldap3.Connection(server, auto_bind=True) as conn: - conn.search(dn, search_filter) - return conn.response - -# if __name__ == "__main__": -# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py new file mode 100644 index 000000000000..76b7f309bd17 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py @@ -0,0 +1,38 @@ +from flask import request, Flask +import ldap3 + +app = Flask(__name__) + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn.search(unsafe_dn, unsafe_filter, attributes=[ + "testAttr1", "testAttr2"]) + + +@app.route("/normal_noAttrs") +def normal_noAttrs(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn.search(unsafe_dn, unsafe_filter) + + +@app.route("/direct") +def direct(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True).search(unsafe_dn, unsafe_filter, attributes=[ + "testAttr1", "testAttr2"]) + +# if __name__ == "__main__": +# app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py new file mode 100644 index 000000000000..c3cc1272ea77 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py @@ -0,0 +1,49 @@ +from flask import request, Flask +import ldap3 +from ldap3.utils.dn import escape_rdn +from ldap3.utils.conv import escape_filter_chars + +app = Flask(__name__) + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = escape_rdn(unsafe_dn) + safe_filter = escape_filter_chars(unsafe_filter) + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn.search(safe_dn, safe_filter, attributes=[ + "testAttr1", "testAttr2"]) + + +@app.route("/normal_noAttrs") +def normal_noAttrs(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = escape_rdn(unsafe_dn) + safe_filter = escape_filter_chars(unsafe_filter) + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn.search(safe_dn, safe_filter) + + +@app.route("/direct") +def direct(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = escape_rdn(unsafe_dn) + safe_filter = escape_filter_chars(unsafe_filter) + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True).search(safe_dn, safe_filter, attributes=[ + "testAttr1", "testAttr2"]) + +# if __name__ == "__main__": +# app.run(debug=True) From 8faafb6961d21e652ff3c7223dab498cec9f8332 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Tue, 30 Mar 2021 16:58:02 +0200 Subject: [PATCH 0074/1662] Update Sink --- .../Security/CWE-090/LDAPInjection.ql | 9 +++---- .../semmle/python/frameworks/Stdlib.qll | 6 ++--- .../security/injection/LDAPInjection.qll | 26 +++++++++++++++++-- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 7ce3a118918c..a803b39260ea 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -16,11 +16,10 @@ import DataFlow::PathGraph from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink, - LDAPQuery castedSink + LDAPInjectionSink castedSink where config.hasFlowPath(source, sink) and - castedSink = sink.getNode() //and + castedSink.getLDAPNode() = sink.getNode() //and // if exists(castedSink.getAttrs()) then -select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@ probably leaking $@.", - sink.getNode(), "This", source.getNode(), "a user-provided value", castedSink.getLDAPNode(), - castedSink.getLDAPPart(), castedSink.getAttrs(), "this attribute(s)" +select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@.", castedSink, "This", + source.getNode(), "a user-provided value", castedSink.getLDAPNode(), castedSink.getLDAPPart() //, castedSink.getAttrs(), "probably leaking this attribute(s)" diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index aa9013a76c06..348367d03707 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -95,10 +95,10 @@ private module LDAP { ( ldapNode = this.getArg(0) and ldapPart = "DN" - or - ldapNode = this.getArg(1) and - ldapPart = "search_filter" ) + or + ldapNode = this.getArg(1) and + ldapPart = "search_filter" ) } diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll index db8bdda7db61..4814097ff8e5 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll @@ -8,6 +8,26 @@ import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources +class LDAPInjectionSink extends DataFlow::Node { + // DataFlow::Node attrs; + DataFlow::Node ldapNode; + string ldapPart; + + LDAPInjectionSink() { + exists(LDAPQuery ldapQuery | + this = ldapQuery and + ldapNode = ldapQuery.getLDAPNode() and + ldapPart = ldapQuery.getLDAPPart() // and + // if exists(ldapQuery.getAttrs()) then attrs = ldapQuery.getAttrs() + ) + } + + DataFlow::Node getLDAPNode() { result = ldapNode } + + string getLDAPPart() { result = ldapPart } + // DataFlow::Node getAttrs() { result = attrs } +} + /** * A taint-tracking configuration for detecting regular expression injections. */ @@ -16,9 +36,11 @@ class LDAPInjectionFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { sink = any(LDAPQuery lQ).getLDAPNode() } + override predicate isSink(DataFlow::Node sink) { + sink = any(LDAPInjectionSink ldapInjSink).getLDAPNode() + } override predicate isSanitizer(DataFlow::Node sanitizer) { - sanitizer = any(LDAPEscape lE).getEscapeNode() + sanitizer = any(LDAPEscape ldapEsc).getEscapeNode() } } From 4328ff398121d12f800a67a3edc0cd72ea2bf77e Mon Sep 17 00:00:00 2001 From: jorgectf Date: Wed, 31 Mar 2021 22:26:08 +0200 Subject: [PATCH 0075/1662] Remove attrs feature --- .../experimental/Security/CWE-090/LDAPInjection.ql | 5 ++--- python/ql/src/experimental/semmle/python/Concepts.qll | 4 ---- .../experimental/semmle/python/frameworks/Stdlib.qll | 11 ----------- .../python/security/injection/LDAPInjection.qll | 5 +---- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index a803b39260ea..8d01fc173d4a 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -19,7 +19,6 @@ from LDAPInjectionSink castedSink where config.hasFlowPath(source, sink) and - castedSink.getLDAPNode() = sink.getNode() //and -// if exists(castedSink.getAttrs()) then + castedSink.getLDAPNode() = sink.getNode() select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@.", castedSink, "This", - source.getNode(), "a user-provided value", castedSink.getLDAPNode(), castedSink.getLDAPPart() //, castedSink.getAttrs(), "probably leaking this attribute(s)" + source.getNode(), "a user-provided value", castedSink.getLDAPNode(), castedSink.getLDAPPart() diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index e0f5c1bdec34..e62d9680665b 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -20,8 +20,6 @@ module LDAPQuery { abstract DataFlow::Node getLDAPNode(); abstract string getLDAPPart(); - - abstract DataFlow::Node getAttrs(); } } @@ -33,8 +31,6 @@ class LDAPQuery extends DataFlow::Node { DataFlow::Node getLDAPNode() { result = range.getLDAPNode() } string getLDAPPart() { result = range.getLDAPPart() } - - DataFlow::Node getAttrs() { result = range.getAttrs() } } module LDAPEscape { diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 348367d03707..f56a6603ec76 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -21,7 +21,6 @@ private module LDAP { private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; string ldapPart; - DataFlow::Node attrs; LDAP2Query() { exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode initCall | @@ -45,10 +44,6 @@ private module LDAP { override DataFlow::Node getLDAPNode() { result = ldapNode } override string getLDAPPart() { result = ldapPart } - - override DataFlow::Node getAttrs() { - result = this.getArg(3) or result = this.getArgByName("attrlist") - } } private class LDAP2EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { @@ -77,14 +72,12 @@ private module LDAP { private module LDAP3 { private class LDAP3QueryMethods extends string { - // pending to dig into this although https://github.com/cannatag/ldap3/blob/21001d9087c0d24c399eec433a261c455b7bc97f/ldap3/core/connection.py#L760 LDAP3QueryMethods() { this in ["search"] } } private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; string ldapPart; - DataFlow::Node attrs; LDAP3Query() { exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode connCall | @@ -105,10 +98,6 @@ private module LDAP { override DataFlow::Node getLDAPNode() { result = ldapNode } override string getLDAPPart() { result = ldapPart } - - override DataFlow::Node getAttrs() { - result = this.getArg(3) or result = this.getArgByName("attributes") - } } private class LDAP3EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll index 4814097ff8e5..da71f38457af 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll @@ -9,7 +9,6 @@ import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources class LDAPInjectionSink extends DataFlow::Node { - // DataFlow::Node attrs; DataFlow::Node ldapNode; string ldapPart; @@ -17,15 +16,13 @@ class LDAPInjectionSink extends DataFlow::Node { exists(LDAPQuery ldapQuery | this = ldapQuery and ldapNode = ldapQuery.getLDAPNode() and - ldapPart = ldapQuery.getLDAPPart() // and - // if exists(ldapQuery.getAttrs()) then attrs = ldapQuery.getAttrs() + ldapPart = ldapQuery.getLDAPPart() ) } DataFlow::Node getLDAPNode() { result = ldapNode } string getLDAPPart() { result = ldapPart } - // DataFlow::Node getAttrs() { result = attrs } } /** From 9b430310b4ecd9535191262249d889d0b9306025 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Wed, 31 Mar 2021 23:19:56 +0200 Subject: [PATCH 0076/1662] Improve Sanitizer calls --- .../semmle/python/frameworks/Stdlib.qll | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index f56a6603ec76..cfd02b8b5a55 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -46,27 +46,21 @@ private module LDAP { override string getLDAPPart() { result = ldapPart } } - private class LDAP2EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { - DataFlow::Node escapeNode; - - LDAP2EscapeDN() { - this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() and - escapeNode = this.getArg(0) + private class LDAP2EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { + LDAP2EscapeDNCall() { + this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() } - override DataFlow::Node getEscapeNode() { result = escapeNode } + override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } - private class LDAP2EscapeFilter extends DataFlow::CallCfgNode, LDAPEscape::Range { - DataFlow::Node escapeNode; - - LDAP2EscapeFilter() { + private class LDAP2EscapeFilterCall extends DataFlow::CallCfgNode, LDAPEscape::Range { + LDAP2EscapeFilterCall() { this = - API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall() and - escapeNode = this.getArg(0) + API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall() } - override DataFlow::Node getEscapeNode() { result = escapeNode } + override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } } @@ -100,36 +94,30 @@ private module LDAP { override string getLDAPPart() { result = ldapPart } } - private class LDAP3EscapeDN extends DataFlow::CallCfgNode, LDAPEscape::Range { - DataFlow::Node escapeNode; - - LDAP3EscapeDN() { + private class LDAP3EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { + LDAP3EscapeDNCall() { this = API::moduleImport("ldap3") .getMember("utils") .getMember("dn") .getMember("escape_rdn") - .getACall() and - escapeNode = this.getArg(0) + .getACall() } - override DataFlow::Node getEscapeNode() { result = escapeNode } + override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } - private class LDAP3EscapeFilter extends DataFlow::CallCfgNode, LDAPEscape::Range { - DataFlow::Node escapeNode; - - LDAP3EscapeFilter() { + private class LDAP3EscapeFilterCall extends DataFlow::CallCfgNode, LDAPEscape::Range { + LDAP3EscapeFilterCall() { this = API::moduleImport("ldap3") .getMember("utils") .getMember("conv") .getMember("escape_filter_chars") - .getACall() and - escapeNode = this.getArg(0) + .getACall() } - override DataFlow::Node getEscapeNode() { result = escapeNode } + override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } } } From d1462eda1ca9e9badbdd84b98dfd0028319a1eca Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 6 Apr 2021 00:59:31 +0200 Subject: [PATCH 0077/1662] [Java] Add "missing jwt signature check" query. --- .../CWE/CWE-347/MissingJWTSignatureCheck.ql | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql diff --git a/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql new file mode 100644 index 000000000000..cd8f079f7fe5 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql @@ -0,0 +1,177 @@ +/** + * @name Missing JWT signature check + * @description Not checking the JWT signature allows an attacker to forge their own tokens. + * @kind problem + * @problem.severity error + * @precision high + * @id java/missing-jwt-signature-check + * @tags security + * external/cwe/cwe-347 + */ + +import java +import semmle.code.java.dataflow.DataFlow + +/** The interface `io.jsonwebtoken.JwtParser`. */ +class TypeJwtParser extends Interface { + TypeJwtParser() { hasQualifiedName("io.jsonwebtoken", "JwtParser") } +} + +/** The interface `io.jsonwebtoken.JwtParserBuilder`. */ +class TypeJwtParserBuilder extends Interface { + TypeJwtParserBuilder() { hasQualifiedName("io.jsonwebtoken", "JwtParserBuilder") } +} + +/** The interface `io.jsonwebtoken.JwtHandler`. */ +class TypeJwtHandler extends Interface { + TypeJwtHandler() { hasQualifiedName("io.jsonwebtoken", "JwtHandler") } +} + +/** The class `io.jsonwebtoken.JwtHandlerAdapter`. */ +class TypeJwtHandlerAdapter extends Class { + TypeJwtHandlerAdapter() { hasQualifiedName("io.jsonwebtoken", "JwtHandlerAdapter") } +} + +/** The `parse(token, handler)` method defined in `TypeJwtParser`. */ +private class JwtParserParseHandlerMethod extends Method { + JwtParserParseHandlerMethod() { + hasName("parse") and + getDeclaringType() instanceof TypeJwtParser and + getNumberOfParameters() = 2 + } +} + +/** The `parse(token)`, `parseClaimsJwt(token)` and `parsePlaintextJwt(token)` methods defined in `TypeJwtParser`. */ +private class JwtParserInsecureParseMethods extends Method { + JwtParserInsecureParseMethods() { + hasName(["parse", "parseClaimsJwt", "parsePlaintextJwt"]) and + getNumberOfParameters() = 1 and + getDeclaringType() instanceof TypeJwtParser + } +} + +/** The `onClaimsJwt(jwt)` and `onPlaintextJwt(jwt)` methods defined in `TypeJwtHandler`. */ +private class JwtHandlerOnJwtMethods extends Method { + JwtHandlerOnJwtMethods() { + hasName(["onClaimsJwt", "onPlaintextJwt"]) and + getNumberOfParameters() = 1 and + getDeclaringType() instanceof TypeJwtHandler + } +} + +/** The `onClaimsJwt(jwt)` and `onPlaintextJwt(jwt)` methods defined in `TypeJwtHandlerAdapter`. */ +private class JwtHandlerAdapterOnJwtMethods extends Method { + JwtHandlerAdapterOnJwtMethods() { + hasName(["onClaimsJwt", "onPlaintextJwt"]) and + getNumberOfParameters() = 1 and + getDeclaringType() instanceof TypeJwtHandlerAdapter + } +} + +/** + * Holds if `parseHandlerExpr` is an insecure `JwtHandler`. + * That is, it overrides a method from `JwtHandlerOnJwtMethods` and the overriden method is not a method from `JwtHandlerAdapterOnJwtMethods`. + * A overriden method which is a method from `JwtHandlerAdapterOnJwtMethods` is safe, because these always throw an exception. + */ +private predicate isInsecureParseHandler(Expr parseHandlerExpr) { + exists(RefType t | + parseHandlerExpr.getType() = t and + t.getASourceSupertype*() instanceof TypeJwtHandler and + exists(Method m | + m = t.getAMethod() and + m.getASourceOverriddenMethod+() instanceof JwtHandlerOnJwtMethods and + not m.getSourceDeclaration() instanceof JwtHandlerAdapterOnJwtMethods + ) + ) +} + +/** + * An access to an insecure parsing method. + * That is, either a call to a `parse(token)`, `parseClaimsJwt(token)` or `parsePlaintextJwt(token)` method or + * a call to a `parse(token, handler)` method where the `handler` is considered insecure. + */ +private class JwtParserInsecureParseMethodAccess extends MethodAccess { + JwtParserInsecureParseMethodAccess() { + getMethod().getASourceOverriddenMethod*() instanceof JwtParserInsecureParseMethods + or + getMethod().getASourceOverriddenMethod*() instanceof JwtParserParseHandlerMethod and + isInsecureParseHandler(this.getArgument(1)) + } +} + +/** + * Holds if `signingMa` directly or indirectly sets a signing key for `expr`, which is a `TypeJwtParser`. + * The `setSigningKey` and `setSigningKeyResolver` methods set a signing key for a `TypeJwtParser`. + * Directly means code like this: + * ```java + * Jwts.parser().setSigningKey(key).parse(token); + * ``` + * Here the signing key is set directly on a `TypeJwtParser`. + * Indirectly means code like this: + * ```java + * Jwts.parserBuilder().setSigningKey(key).build().parse(token); + * ``` + * In this case, the signing key is set on a `TypeJwtParserBuilder` indirectly setting the key of `TypeJwtParser` that is created by the call to `build`. + */ +private predicate isSigningKeySet(Expr expr, MethodAccess signingMa) { + any(SigningToExprDataFlow s).hasFlow(DataFlow::exprNode(signingMa), DataFlow::exprNode(expr)) +} + +/** An expr that is a `TypeJwtParser` for which a signing key has been set. */ +private class JwtParserWithSigningKeyExpr extends Expr { + MethodAccess signingMa; + + JwtParserWithSigningKeyExpr() { + this.getType().(RefType).getASourceSupertype*() instanceof TypeJwtParser and + isSigningKeySet(this, signingMa) + } + + /** Gets the method access that sets the signing key for this parser. */ + MethodAccess getSigningMethodAccess() { result = signingMa } +} + +/** + * Models flow from `SigningKeyMethodAccess`es to expressions that are a (sub-type of) `TypeJwtParser`. + * This is used to determine whether a `TypeJwtParser` has a signing key set. + */ +private class SigningToExprDataFlow extends DataFlow::Configuration { + SigningToExprDataFlow() { this = "SigningToExprDataFlow" } + + override predicate isSource(DataFlow::Node source) { + source.asExpr() instanceof SigningKeyMethodAccess + } + + override predicate isSink(DataFlow::Node sink) { + sink.asExpr().getType().(RefType).getASourceSupertype*() instanceof TypeJwtParser + } + + /** Models the builder style of `TypeJwtParser` and `TypeJwtParserBuilder`. */ + override predicate isAdditionalFlowStep(DataFlow::Node pred, DataFlow::Node succ) { + ( + pred.asExpr().getType().(RefType).getASourceSupertype*() instanceof TypeJwtParser or + pred.asExpr().getType().(RefType).getASourceSupertype*() instanceof TypeJwtParserBuilder + ) and + succ.asExpr().(MethodAccess).getQualifier() = pred.asExpr() + } +} + +/** An access to the `setSigningKey` or `setSigningKeyResolver` method (or an overriden method) defined in `TypeJwtParser` and `TypeJwtParserBuilder`. */ +private class SigningKeyMethodAccess extends MethodAccess { + SigningKeyMethodAccess() { + exists(Method m | + m.hasName(["setSigningKey", "setSigningKeyResolver"]) and + m.getNumberOfParameters() = 1 and + ( + m.getDeclaringType() instanceof TypeJwtParser or + m.getDeclaringType() instanceof TypeJwtParserBuilder + ) + | + m = this.getMethod().getASourceOverriddenMethod*() + ) + } +} + +from JwtParserInsecureParseMethodAccess ma, JwtParserWithSigningKeyExpr parserExpr +where ma.getQualifier() = parserExpr +select ma, "A signing key is set $@, but the signature is not verified.", + parserExpr.getSigningMethodAccess(), "here" From b7e49c78feca414a83b718bd5a6a72396525bc79 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 6 Apr 2021 01:00:24 +0200 Subject: [PATCH 0078/1662] [Java] Add stubs for jwtk-jjwt-0.11.2 --- .../stubs/jwtk-jjwt-0.11.2/LICENSE | 201 +++ .../io/jsonwebtoken/ClaimJwtException.java | 51 + .../io/jsonwebtoken/Claims.java | 191 +++ .../io/jsonwebtoken/ClaimsMutator.java | 102 ++ .../io/jsonwebtoken/Clock.java | 33 + .../io/jsonwebtoken/CompressionCodec.java | 55 + .../CompressionCodecResolver.java | 46 + .../io/jsonwebtoken/CompressionCodecs.java | 49 + .../io/jsonwebtoken/CompressionException.java | 33 + .../io/jsonwebtoken/ExpiredJwtException.java | 39 + .../io/jsonwebtoken/Header.java | 132 ++ .../jsonwebtoken/IncorrectClaimException.java | 33 + .../jsonwebtoken/InvalidClaimException.java | 55 + .../jwtk-jjwt-0.11.2/io/jsonwebtoken/Jws.java | 28 + .../io/jsonwebtoken/JwsHeader.java | 107 ++ .../jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwt.java | 40 + .../io/jsonwebtoken/JwtBuilder.java | 530 ++++++++ .../io/jsonwebtoken/JwtException.java | 32 + .../io/jsonwebtoken/JwtHandler.java | 68 + .../io/jsonwebtoken/JwtHandlerAdapter.java | 52 + .../io/jsonwebtoken/JwtParser.java | 596 +++++++++ .../io/jsonwebtoken/JwtParserBuilder.java | 307 +++++ .../io/jsonwebtoken/Jwts.java | 143 ++ .../jsonwebtoken/MalformedJwtException.java | 32 + .../jsonwebtoken/MissingClaimException.java | 32 + .../jsonwebtoken/PrematureJwtException.java | 39 + .../jsonwebtoken/RequiredTypeException.java | 32 + .../io/jsonwebtoken/SignatureAlgorithm.java | 655 ++++++++++ .../io/jsonwebtoken/SignatureException.java | 36 + .../io/jsonwebtoken/SigningKeyResolver.java | 73 ++ .../SigningKeyResolverAdapter.java | 99 ++ .../jsonwebtoken/UnsupportedJwtException.java | 36 + .../jsonwebtoken/impl/DefaultJwtParser.java | 211 +++ .../impl/crypto/JwtSignatureValidator.java | 21 + .../io/jsonwebtoken/io/Base64.java | 680 ++++++++++ .../io/jsonwebtoken/io/Base64Decoder.java | 38 + .../io/jsonwebtoken/io/Base64Encoder.java | 38 + .../io/jsonwebtoken/io/Base64Support.java | 31 + .../io/jsonwebtoken/io/Base64UrlDecoder.java | 26 + .../io/jsonwebtoken/io/Base64UrlEncoder.java | 26 + .../io/jsonwebtoken/io/CodecException.java | 30 + .../io/jsonwebtoken/io/Decoder.java | 24 + .../io/jsonwebtoken/io/Decoders.java | 28 + .../io/jsonwebtoken/io/DecodingException.java | 30 + .../io/DeserializationException.java | 30 + .../io/jsonwebtoken/io/Deserializer.java | 24 + .../io/jsonwebtoken/io/Encoder.java | 24 + .../io/jsonwebtoken/io/Encoders.java | 28 + .../io/jsonwebtoken/io/EncodingException.java | 26 + .../io/ExceptionPropagatingDecoder.java | 44 + .../io/ExceptionPropagatingEncoder.java | 44 + .../io/jsonwebtoken/io/IOException.java | 32 + .../io/jsonwebtoken/io/SerialException.java | 30 + .../io/SerializationException.java | 30 + .../io/jsonwebtoken/io/Serializer.java | 25 + .../io/jsonwebtoken/lang/Arrays.java | 32 + .../io/jsonwebtoken/lang/Assert.java | 377 ++++++ .../io/jsonwebtoken/lang/Classes.java | 254 ++++ .../io/jsonwebtoken/lang/Collections.java | 365 ++++++ .../io/jsonwebtoken/lang/DateFormats.java | 70 + .../lang/InstantiationException.java | 26 + .../io/jsonwebtoken/lang/Maps.java | 87 ++ .../io/jsonwebtoken/lang/Objects.java | 927 +++++++++++++ .../jsonwebtoken/lang/RuntimeEnvironment.java | 65 + .../io/jsonwebtoken/lang/Strings.java | 1147 +++++++++++++++++ .../lang/UnknownClassException.java | 64 + .../security/InvalidKeyException.java | 26 + .../jsonwebtoken/security/KeyException.java | 26 + .../io/jsonwebtoken/security/Keys.java | 231 ++++ .../security/SecurityException.java | 32 + .../security/SignatureException.java | 30 + .../security/WeakKeyException.java | 26 + 72 files changed, 9262 insertions(+) create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/LICENSE create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimJwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Claims.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimsMutator.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Clock.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodec.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecResolver.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecs.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ExpiredJwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Header.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/IncorrectClaimException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/InvalidClaimException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jws.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwsHeader.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwt.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtBuilder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandler.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandlerAdapter.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParser.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParserBuilder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwts.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MalformedJwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MissingClaimException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/PrematureJwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/RequiredTypeException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureAlgorithm.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolver.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolverAdapter.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/UnsupportedJwtException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/DefaultJwtParser.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/crypto/JwtSignatureValidator.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Decoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Encoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Support.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlDecoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlEncoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/CodecException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoders.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DecodingException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DeserializationException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Deserializer.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoders.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/EncodingException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingDecoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingEncoder.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/IOException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerialException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerializationException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Serializer.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Arrays.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Assert.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Classes.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Collections.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/DateFormats.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/InstantiationException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Maps.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Objects.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/RuntimeEnvironment.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Strings.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/UnknownClassException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/InvalidKeyException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/KeyException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/Keys.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SecurityException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SignatureException.java create mode 100644 java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/WeakKeyException.java diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/LICENSE b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/LICENSE new file mode 100644 index 000000000000..5c304d1a4a7b --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimJwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimJwtException.java new file mode 100644 index 000000000000..bb7c81fd5502 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimJwtException.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * ClaimJwtException is a subclass of the {@link JwtException} that is thrown after a validation of an JTW claim failed. + * + * @since 0.5 + */ +public abstract class ClaimJwtException extends JwtException { + + public static final String INCORRECT_EXPECTED_CLAIM_MESSAGE_TEMPLATE = "Expected %s claim to be: %s, but was: %s."; + public static final String MISSING_EXPECTED_CLAIM_MESSAGE_TEMPLATE = "Expected %s claim to be: %s, but was not present in the JWT claims."; + + private final Header header; + + private final Claims claims; + + protected ClaimJwtException(Header header, Claims claims, String message) { + super(message); + this.header = header; + this.claims = claims; + } + + protected ClaimJwtException(Header header, Claims claims, String message, Throwable cause) { + super(message, cause); + this.header = header; + this.claims = claims; + } + + public Claims getClaims() { + return claims; + } + + public Header getHeader() { + return header; + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Claims.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Claims.java new file mode 100644 index 000000000000..b5a404fb9884 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Claims.java @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import java.util.Date; +import java.util.Map; + +/** + * A JWT Claims set. + * + *

    This is ultimately a JSON map and any values can be added to it, but JWT standard names are provided as + * type-safe getters and setters for convenience.

    + * + *

    Because this interface extends {@code Map<String, Object>}, if you would like to add your own properties, + * you simply use map methods, for example:

    + * + *
    + * claims.{@link Map#put(Object, Object) put}("someKey", "someValue");
    + * 
    + * + *

    Creation

    + * + *

    It is easiest to create a {@code Claims} instance by calling one of the + * {@link Jwts#claims() JWTs.claims()} factory methods.

    + * + * @since 0.1 + */ +public interface Claims extends Map, ClaimsMutator { + + /** JWT {@code Issuer} claims parameter name: "iss" */ + public static final String ISSUER = "iss"; + + /** JWT {@code Subject} claims parameter name: "sub" */ + public static final String SUBJECT = "sub"; + + /** JWT {@code Audience} claims parameter name: "aud" */ + public static final String AUDIENCE = "aud"; + + /** JWT {@code Expiration} claims parameter name: "exp" */ + public static final String EXPIRATION = "exp"; + + /** JWT {@code Not Before} claims parameter name: "nbf" */ + public static final String NOT_BEFORE = "nbf"; + + /** JWT {@code Issued At} claims parameter name: "iat" */ + public static final String ISSUED_AT = "iat"; + + /** JWT {@code JWT ID} claims parameter name: "jti" */ + public static final String ID = "jti"; + + /** + * Returns the JWT + * iss (issuer) value or {@code null} if not present. + * + * @return the JWT {@code iss} value or {@code null} if not present. + */ + String getIssuer(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setIssuer(String iss); + + /** + * Returns the JWT + * sub (subject) value or {@code null} if not present. + * + * @return the JWT {@code sub} value or {@code null} if not present. + */ + String getSubject(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setSubject(String sub); + + /** + * Returns the JWT + * aud (audience) value or {@code null} if not present. + * + * @return the JWT {@code aud} value or {@code null} if not present. + */ + String getAudience(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setAudience(String aud); + + /** + * Returns the JWT + * exp (expiration) timestamp or {@code null} if not present. + * + *

    A JWT obtained after this timestamp should not be used.

    + * + * @return the JWT {@code exp} value or {@code null} if not present. + */ + Date getExpiration(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setExpiration(Date exp); + + /** + * Returns the JWT + * nbf (not before) timestamp or {@code null} if not present. + * + *

    A JWT obtained before this timestamp should not be used.

    + * + * @return the JWT {@code nbf} value or {@code null} if not present. + */ + Date getNotBefore(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setNotBefore(Date nbf); + + /** + * Returns the JWT + * iat (issued at) timestamp or {@code null} if not present. + * + *

    If present, this value is the timestamp when the JWT was created.

    + * + * @return the JWT {@code iat} value or {@code null} if not present. + */ + Date getIssuedAt(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setIssuedAt(Date iat); + + /** + * Returns the JWTs + * jti (JWT ID) value or {@code null} if not present. + * + *

    This value is a CaSe-SenSiTiVe unique identifier for the JWT. If available, this value is expected to be + * assigned in a manner that ensures that there is a negligible probability that the same value will be + * accidentally + * assigned to a different data object. The ID can be used to prevent the JWT from being replayed.

    + * + * @return the JWT {@code jti} value or {@code null} if not present. + */ + String getId(); + + /** + * {@inheritDoc} + */ + @Override //only for better/targeted JavaDoc + Claims setId(String jti); + + /** + * Returns the JWTs claim ({@code claimName}) value as a type {@code requiredType}, or {@code null} if not present. + * + *

    JJWT only converts simple String, Date, Long, Integer, Short and Byte types automatically. Anything more + * complex is expected to be already converted to your desired type by the JSON + * {@link io.jsonwebtoken.io.Deserializer Deserializer} implementation. You may specify a custom Deserializer for a + * JwtParser with the desired conversion configuration via the {@link JwtParserBuilder#deserializeJsonWith} method. + * See custom JSON processor for more + * information. If using Jackson, you can specify custom claim POJO types as described in + * custom claim types. + * + * @param claimName name of claim + * @param requiredType the type of the value expected to be returned + * @param the type of the value expected to be returned + * @return the JWT {@code claimName} value or {@code null} if not present. + * @throws RequiredTypeException throw if the claim value is not null and not of type {@code requiredType} + */ + T get(String claimName, Class requiredType); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimsMutator.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimsMutator.java new file mode 100644 index 000000000000..66528d8ffab2 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ClaimsMutator.java @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import java.util.Date; + +/** + * Mutation (modifications) to a {@link io.jsonwebtoken.Claims Claims} instance. + * + * @param the type of mutator + * @see io.jsonwebtoken.JwtBuilder + * @see io.jsonwebtoken.Claims + * @since 0.2 + */ +public interface ClaimsMutator { + + /** + * Sets the JWT + * iss (issuer) value. A {@code null} value will remove the property from the JSON map. + * + * @param iss the JWT {@code iss} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setIssuer(String iss); + + /** + * Sets the JWT + * sub (subject) value. A {@code null} value will remove the property from the JSON map. + * + * @param sub the JWT {@code sub} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setSubject(String sub); + + /** + * Sets the JWT + * aud (audience) value. A {@code null} value will remove the property from the JSON map. + * + * @param aud the JWT {@code aud} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setAudience(String aud); + + /** + * Sets the JWT + * exp (expiration) timestamp. A {@code null} value will remove the property from the JSON map. + * + *

    A JWT obtained after this timestamp should not be used.

    + * + * @param exp the JWT {@code exp} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setExpiration(Date exp); + + /** + * Sets the JWT + * nbf (not before) timestamp. A {@code null} value will remove the property from the JSON map. + * + *

    A JWT obtained before this timestamp should not be used.

    + * + * @param nbf the JWT {@code nbf} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setNotBefore(Date nbf); + + /** + * Sets the JWT + * iat (issued at) timestamp. A {@code null} value will remove the property from the JSON map. + * + *

    The value is the timestamp when the JWT was created.

    + * + * @param iat the JWT {@code iat} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setIssuedAt(Date iat); + + /** + * Sets the JWT + * jti (JWT ID) value. A {@code null} value will remove the property from the JSON map. + * + *

    This value is a CaSe-SenSiTiVe unique identifier for the JWT. If specified, this value MUST be assigned in a + * manner that ensures that there is a negligible probability that the same value will be accidentally + * assigned to a different data object. The ID can be used to prevent the JWT from being replayed.

    + * + * @param jti the JWT {@code jti} value or {@code null} to remove the property from the JSON map. + * @return the {@code Claims} instance for method chaining. + */ + T setId(String jti); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Clock.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Clock.java new file mode 100644 index 000000000000..584dd605f0bf --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Clock.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import java.util.Date; + +/** + * A clock represents a time source that can be used when creating and verifying JWTs. + * + * @since 0.7.0 + */ +public interface Clock { + + /** + * Returns the clock's current timestamp at the instant the method is invoked. + * + * @return the clock's current timestamp at the instant the method is invoked. + */ + Date now(); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodec.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodec.java new file mode 100644 index 000000000000..47e54761e190 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodec.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Compresses and decompresses byte arrays according to a compression algorithm. + * + * @see CompressionCodecs#DEFLATE + * @see CompressionCodecs#GZIP + * @since 0.6.0 + */ +public interface CompressionCodec { + + /** + * The compression algorithm name to use as the JWT's {@code zip} header value. + * + * @return the compression algorithm name to use as the JWT's {@code zip} header value. + */ + String getAlgorithmName(); + + /** + * Compresses the specified byte array according to the compression {@link #getAlgorithmName() algorithm}. + * + * @param payload bytes to compress + * @return compressed bytes + * @throws CompressionException if the specified byte array cannot be compressed according to the compression + * {@link #getAlgorithmName() algorithm}. + */ + byte[] compress(byte[] payload) throws CompressionException; + + /** + * Decompresses the specified compressed byte array according to the compression + * {@link #getAlgorithmName() algorithm}. The specified byte array must already be in compressed form + * according to the {@link #getAlgorithmName() algorithm}. + * + * @param compressed compressed bytes + * @return decompressed bytes + * @throws CompressionException if the specified byte array cannot be decompressed according to the compression + * {@link #getAlgorithmName() algorithm}. + */ + byte[] decompress(byte[] compressed) throws CompressionException; +} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecResolver.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecResolver.java new file mode 100644 index 000000000000..50ebe08fc62e --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecResolver.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Looks for a JWT {@code zip} header, and if found, returns the corresponding {@link CompressionCodec} the parser + * can use to decompress the JWT body. + * + *

    JJWT's default {@link JwtParser} implementation supports both the + * {@link CompressionCodecs#DEFLATE DEFLATE} + * and {@link CompressionCodecs#GZIP GZIP} algorithms by default - you do not need to + * specify a {@code CompressionCodecResolver} in these cases.

    + * + *

    However, if you want to use a compression algorithm other than {@code DEF} or {@code GZIP}, you must implement + * your own {@link CompressionCodecResolver} and specify that when + * {@link io.jsonwebtoken.JwtBuilder#compressWith(CompressionCodec) building} and + * {@link io.jsonwebtoken.JwtParser#setCompressionCodecResolver(CompressionCodecResolver) parsing} JWTs.

    + * + * @since 0.6.0 + */ +public interface CompressionCodecResolver { + + /** + * Looks for a JWT {@code zip} header, and if found, returns the corresponding {@link CompressionCodec} the parser + * can use to decompress the JWT body. + * + * @param header of the JWT + * @return CompressionCodec matching the {@code zip} header, or null if there is no {@code zip} header. + * @throws CompressionException if a {@code zip} header value is found and not supported. + */ + CompressionCodec resolveCompressionCodec(Header header) throws CompressionException; + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecs.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecs.java new file mode 100644 index 000000000000..71c2e8bb55e1 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionCodecs.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.lang.Classes; + +/** + * Provides default implementations of the {@link CompressionCodec} interface. + * + * @see #DEFLATE + * @see #GZIP + * @since 0.7.0 + */ +public final class CompressionCodecs { + + private CompressionCodecs() { + } //prevent external instantiation + + /** + * Codec implementing the JWA standard + * deflate compression algorithm + */ + public static final CompressionCodec DEFLATE = + Classes.newInstance("io.jsonwebtoken.impl.compression.DeflateCompressionCodec"); + + /** + * Codec implementing the gzip compression algorithm. + *

    Compatibility Warning

    + *

    This is not a standard JWA compression algorithm. Be sure to use this only when you are confident + * that all parties accessing the token support the gzip algorithm.

    + *

    If you're concerned about compatibility, the {@link #DEFLATE DEFLATE} code is JWA standards-compliant.

    + */ + public static final CompressionCodec GZIP = + Classes.newInstance("io.jsonwebtoken.impl.compression.GzipCompressionCodec"); + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionException.java new file mode 100644 index 000000000000..287ccfb01ae5 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/CompressionException.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception indicating that either compressing or decompressing an JWT body failed. + * + * @since 0.6.0 + */ +public class CompressionException extends JwtException { + + public CompressionException(String message) { + super(message); + } + + public CompressionException(String message, Throwable cause) { + super(message, cause); + } + +} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ExpiredJwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ExpiredJwtException.java new file mode 100644 index 000000000000..0748ca367c60 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/ExpiredJwtException.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception indicating that a JWT was accepted after it expired and must be rejected. + * + * @since 0.3 + */ +public class ExpiredJwtException extends ClaimJwtException { + + public ExpiredJwtException(Header header, Claims claims, String message) { + super(header, claims, message); + } + + /** + * @param header jwt header + * @param claims jwt claims (body) + * @param message exception message + * @param cause cause + * @since 0.5 + */ + public ExpiredJwtException(Header header, Claims claims, String message, Throwable cause) { + super(header, claims, message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Header.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Header.java new file mode 100644 index 000000000000..589af0d55d88 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Header.java @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import java.util.Map; + +/** + * A JWT JOSE header. + * + *

    This is ultimately a JSON map and any values can be added to it, but JWT JOSE standard names are provided as + * type-safe getters and setters for convenience.

    + * + *

    Because this interface extends {@code Map<String, Object>}, if you would like to add your own properties, + * you simply use map methods, for example:

    + * + *
    + * header.{@link Map#put(Object, Object) put}("headerParamName", "headerParamValue");
    + * 
    + * + *

    Creation

    + * + *

    It is easiest to create a {@code Header} instance by calling one of the + * {@link Jwts#header() JWTs.header()} factory methods.

    + * + * @since 0.1 + */ +public interface Header> extends Map { + + /** JWT {@code Type} (typ) value: "JWT" */ + public static final String JWT_TYPE = "JWT"; + + /** JWT {@code Type} header parameter name: "typ" */ + public static final String TYPE = "typ"; + + /** JWT {@code Content Type} header parameter name: "cty" */ + public static final String CONTENT_TYPE = "cty"; + + /** JWT {@code Compression Algorithm} header parameter name: "zip" */ + public static final String COMPRESSION_ALGORITHM = "zip"; + + /** JJWT legacy/deprecated compression algorithm header parameter name: "calg" + * @deprecated use {@link #COMPRESSION_ALGORITHM} instead. */ + @Deprecated + public static final String DEPRECATED_COMPRESSION_ALGORITHM = "calg"; + + /** + * Returns the + * typ (type) header value or {@code null} if not present. + * + * @return the {@code typ} header value or {@code null} if not present. + */ + String getType(); + + /** + * Sets the JWT + * typ (Type) header value. A {@code null} value will remove the property from the JSON map. + * + * @param typ the JWT JOSE {@code typ} header value or {@code null} to remove the property from the JSON map. + * @return the {@code Header} instance for method chaining. + */ + T setType(String typ); + + /** + * Returns the + * cty (Content Type) header value or {@code null} if not present. + * + *

    In the normal case where nested signing or encryption operations are not employed (i.e. a compact + * serialization JWT), the use of this header parameter is NOT RECOMMENDED. In the case that nested + * signing or encryption is employed, this Header Parameter MUST be present; in this case, the value MUST be + * {@code JWT}, to indicate that a Nested JWT is carried in this JWT. While media type names are not + * case-sensitive, it is RECOMMENDED that {@code JWT} always be spelled using uppercase characters for + * compatibility with legacy implementations. See + * JWT Appendix A.2 for + * an example of a Nested JWT.

    + * + * @return the {@code typ} header parameter value or {@code null} if not present. + */ + String getContentType(); + + /** + * Sets the JWT + * cty (Content Type) header parameter value. A {@code null} value will remove the property from + * the JSON map. + * + *

    In the normal case where nested signing or encryption operations are not employed (i.e. a compact + * serialization JWT), the use of this header parameter is NOT RECOMMENDED. In the case that nested + * signing or encryption is employed, this Header Parameter MUST be present; in this case, the value MUST be + * {@code JWT}, to indicate that a Nested JWT is carried in this JWT. While media type names are not + * case-sensitive, it is RECOMMENDED that {@code JWT} always be spelled using uppercase characters for + * compatibility with legacy implementations. See + * JWT Appendix A.2 for + * an example of a Nested JWT.

    + * + * @param cty the JWT JOSE {@code cty} header value or {@code null} to remove the property from the JSON map. + */ + T setContentType(String cty); + + /** + * Returns the JWT zip (Compression Algorithm) header value or {@code null} if not present. + * + * @return the {@code zip} header parameter value or {@code null} if not present. + * @since 0.6.0 + */ + String getCompressionAlgorithm(); + + /** + * Sets the JWT zip (Compression Algorithm) header parameter value. A {@code null} value will remove + * the property from the JSON map. + *

    + *

    The compression algorithm is NOT part of the JWT specification + * and must be used carefully since, is not expected that other libraries (including previous versions of this one) + * be able to deserialize a compressed JTW body correctly.

    + * + * @param zip the JWT compression algorithm {@code zip} value or {@code null} to remove the property from the JSON map. + * @since 0.6.0 + */ + T setCompressionAlgorithm(String zip); + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/IncorrectClaimException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/IncorrectClaimException.java new file mode 100644 index 000000000000..df68fe1e697a --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/IncorrectClaimException.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception thrown when discovering that a required claim does not equal the required value, indicating the JWT is + * invalid and may not be used. + * + * @since 0.6 + */ +public class IncorrectClaimException extends InvalidClaimException { + + public IncorrectClaimException(Header header, Claims claims, String message) { + super(header, claims, message); + } + + public IncorrectClaimException(Header header, Claims claims, String message, Throwable cause) { + super(header, claims, message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/InvalidClaimException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/InvalidClaimException.java new file mode 100644 index 000000000000..fbca6cabeebd --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/InvalidClaimException.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception indicating a parsed claim is invalid in some way. Subclasses reflect the specific + * reason the claim is invalid. + * + * @see IncorrectClaimException + * @see MissingClaimException + * + * @since 0.6 + */ +public class InvalidClaimException extends ClaimJwtException { + + private String claimName; + private Object claimValue; + + protected InvalidClaimException(Header header, Claims claims, String message) { + super(header, claims, message); + } + + protected InvalidClaimException(Header header, Claims claims, String message, Throwable cause) { + super(header, claims, message, cause); + } + + public String getClaimName() { + return claimName; + } + + public void setClaimName(String claimName) { + this.claimName = claimName; + } + + public Object getClaimValue() { + return claimValue; + } + + public void setClaimValue(Object claimValue) { + this.claimValue = claimValue; + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jws.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jws.java new file mode 100644 index 000000000000..1be5fb390188 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jws.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * An expanded (not compact/serialized) Signed JSON Web Token. + * + * @param the type of the JWS body contents, either a String or a {@link Claims} instance. + * + * @since 0.1 + */ +public interface Jws extends Jwt { + + String getSignature(); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwsHeader.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwsHeader.java new file mode 100644 index 000000000000..aaf08d86b933 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwsHeader.java @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * A JWS header. + * + * @param header type + * @since 0.1 + */ +public interface JwsHeader> extends Header { + + /** JWS {@code Algorithm} header parameter name: "alg" */ + public static final String ALGORITHM = "alg"; + + /** JWS {@code JWT Set URL} header parameter name: "jku" */ + public static final String JWK_SET_URL = "jku"; + + /** JWS {@code JSON Web Key} header parameter name: "jwk" */ + public static final String JSON_WEB_KEY = "jwk"; + + /** JWS {@code Key ID} header parameter name: "kid" */ + public static final String KEY_ID = "kid"; + + /** JWS {@code X.509 URL} header parameter name: "x5u" */ + public static final String X509_URL = "x5u"; + + /** JWS {@code X.509 Certificate Chain} header parameter name: "x5c" */ + public static final String X509_CERT_CHAIN = "x5c"; + + /** JWS {@code X.509 Certificate SHA-1 Thumbprint} header parameter name: "x5t" */ + public static final String X509_CERT_SHA1_THUMBPRINT = "x5t"; + + /** JWS {@code X.509 Certificate SHA-256 Thumbprint} header parameter name: "x5t#S256" */ + public static final String X509_CERT_SHA256_THUMBPRINT = "x5t#S256"; + + /** JWS {@code Critical} header parameter name: "crit" */ + public static final String CRITICAL = "crit"; + + /** + * Returns the JWS + * alg (algorithm) header value or {@code null} if not present. + * + *

    The algorithm header parameter identifies the cryptographic algorithm used to secure the JWS. Consider + * using {@link io.jsonwebtoken.SignatureAlgorithm#forName(String) SignatureAlgorithm.forName} to convert this + * string value to a type-safe enum instance.

    + * + * @return the JWS {@code alg} header value or {@code null} if not present. This will always be + * {@code non-null} on validly constructed JWS instances, but could be {@code null} during construction. + */ + String getAlgorithm(); + + /** + * Sets the JWT + * alg (Algorithm) header value. A {@code null} value will remove the property from the JSON map. + * + *

    The algorithm header parameter identifies the cryptographic algorithm used to secure the JWS. Consider + * using a type-safe {@link io.jsonwebtoken.SignatureAlgorithm SignatureAlgorithm} instance and using its + * {@link io.jsonwebtoken.SignatureAlgorithm#getValue() value} as the argument to this method.

    + * + * @param alg the JWS {@code alg} header value or {@code null} to remove the property from the JSON map. + * @return the {@code Header} instance for method chaining. + */ + T setAlgorithm(String alg); + + /** + * Returns the JWS + * kid (Key ID) header value or {@code null} if not present. + * + *

    The keyId header parameter is a hint indicating which key was used to secure the JWS. This parameter allows + * originators to explicitly signal a change of key to recipients. The structure of the keyId value is + * unspecified.

    + * + *

    When used with a JWK, the keyId value is used to match a JWK {@code keyId} parameter value.

    + * + * @return the JWS {@code kid} header value or {@code null} if not present. + */ + String getKeyId(); + + /** + * Sets the JWT + * kid (Key ID) header value. A {@code null} value will remove the property from the JSON map. + * + *

    The keyId header parameter is a hint indicating which key was used to secure the JWS. This parameter allows + * originators to explicitly signal a change of key to recipients. The structure of the keyId value is + * unspecified.

    + * + *

    When used with a JWK, the keyId value is used to match a JWK {@code keyId} parameter value.

    + * + * @param kid the JWS {@code kid} header value or {@code null} to remove the property from the JSON map. + * @return the {@code Header} instance for method chaining. + */ + T setKeyId(String kid); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwt.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwt.java new file mode 100644 index 000000000000..1de5c6e31411 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwt.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * An expanded (not compact/serialized) JSON Web Token. + * + * @param the type of the JWT body contents, either a String or a {@link Claims} instance. + * + * @since 0.1 + */ +public interface Jwt { + + /** + * Returns the JWT {@link Header} or {@code null} if not present. + * + * @return the JWT {@link Header} or {@code null} if not present. + */ + H getHeader(); + + /** + * Returns the JWT body, either a {@code String} or a {@code Claims} instance. + * + * @return the JWT body, either a {@code String} or a {@code Claims} instance. + */ + B getBody(); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtBuilder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtBuilder.java new file mode 100644 index 000000000000..02da2be2fa50 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtBuilder.java @@ -0,0 +1,530 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.io.Decoder; +import io.jsonwebtoken.io.Decoders; +import io.jsonwebtoken.io.Encoder; +import io.jsonwebtoken.io.Serializer; +import io.jsonwebtoken.security.InvalidKeyException; +import io.jsonwebtoken.security.Keys; +import java.security.Key; +import java.util.Date; +import java.util.Map; + +/** + * A builder for constructing JWTs. + * + * @since 0.1 + */ +public interface JwtBuilder extends ClaimsMutator { + + //replaces any existing header with the specified header. + + /** + * Sets (and replaces) any existing header with the specified header. If you do not want to replace the existing + * header and only want to append to it, use the {@link #setHeaderParams(java.util.Map)} method instead. + * + * @param header the header to set (and potentially replace any existing header). + * @return the builder for method chaining. + */ + JwtBuilder setHeader(Header header); + + /** + * Sets (and replaces) any existing header with the specified header. If you do not want to replace the existing + * header and only want to append to it, use the {@link #setHeaderParams(java.util.Map)} method instead. + * + * @param header the header to set (and potentially replace any existing header). + * @return the builder for method chaining. + */ + JwtBuilder setHeader(Map header); + + /** + * Applies the specified name/value pairs to the header. If a header does not yet exist at the time this method + * is called, one will be created automatically before applying the name/value pairs. + * + * @param params the header name/value pairs to append to the header. + * @return the builder for method chaining. + */ + JwtBuilder setHeaderParams(Map params); + + //sets the specified header parameter, overwriting any previous value under the same name. + + /** + * Applies the specified name/value pair to the header. If a header does not yet exist at the time this method + * is called, one will be created automatically before applying the name/value pair. + * + * @param name the header parameter name + * @param value the header parameter value + * @return the builder for method chaining. + */ + JwtBuilder setHeaderParam(String name, Object value); + + /** + * Sets the JWT's payload to be a plaintext (non-JSON) string. If you want the JWT body to be JSON, use the + * {@link #setClaims(Claims)} or {@link #setClaims(java.util.Map)} methods instead. + * + *

    The payload and claims properties are mutually exclusive - only one of the two may be used.

    + * + * @param payload the plaintext (non-JSON) string that will be the body of the JWT. + * @return the builder for method chaining. + */ + JwtBuilder setPayload(String payload); + + /** + * Sets the JWT payload to be a JSON Claims instance. If you do not want the JWT body to be JSON and instead want + * it to be a plaintext string, use the {@link #setPayload(String)} method instead. + * + *

    The payload and claims properties are mutually exclusive - only one of the two may be used.

    + * + * @param claims the JWT claims to be set as the JWT body. + * @return the builder for method chaining. + */ + JwtBuilder setClaims(Claims claims); + + /** + * Sets the JWT payload to be a JSON Claims instance populated by the specified name/value pairs. If you do not + * want the JWT body to be JSON and instead want it to be a plaintext string, use the {@link #setPayload(String)} + * method instead. + * + *

    The payload* and claims* properties are mutually exclusive - only one of the two may be used.

    + * + * @param claims the JWT claims to be set as the JWT body. + * @return the builder for method chaining. + */ + JwtBuilder setClaims(Map claims); + + /** + * Adds all given name/value pairs to the JSON Claims in the payload. If a Claims instance does not yet exist at the + * time this method is called, one will be created automatically before applying the name/value pairs. + * + *

    The payload and claims properties are mutually exclusive - only one of the two may be used.

    + * + * @param claims the JWT claims to be added to the JWT body. + * @return the builder for method chaining. + * @since 0.8 + */ + JwtBuilder addClaims(Map claims); + + /** + * Sets the JWT Claims + * iss (issuer) value. A {@code null} value will remove the property from the Claims. + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setIssuer(String) issuer} field with the specified value. This allows you to write + * code like this:

    + * + *
    +     * String jwt = Jwts.builder().setIssuer("Joe").compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setIssuer("Joe");
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param iss the JWT {@code iss} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setIssuer(String iss); + + /** + * Sets the JWT Claims + * sub (subject) value. A {@code null} value will remove the property from the Claims. + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setSubject(String) subject} field with the specified value. This allows you to write + * code like this:

    + * + *
    +     * String jwt = Jwts.builder().setSubject("Me").compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setSubject("Me");
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param sub the JWT {@code sub} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setSubject(String sub); + + /** + * Sets the JWT Claims + * aud (audience) value. A {@code null} value will remove the property from the Claims. + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setAudience(String) audience} field with the specified value. This allows you to write + * code like this:

    + * + *
    +     * String jwt = Jwts.builder().setAudience("You").compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setAudience("You");
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param aud the JWT {@code aud} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setAudience(String aud); + + /** + * Sets the JWT Claims + * exp (expiration) value. A {@code null} value will remove the property from the Claims. + * + *

    A JWT obtained after this timestamp should not be used.

    + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setExpiration(java.util.Date) expiration} field with the specified value. This allows + * you to write code like this:

    + * + *
    +     * String jwt = Jwts.builder().setExpiration(new Date(System.currentTimeMillis() + 3600000)).compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setExpiration(new Date(System.currentTimeMillis() + 3600000));
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param exp the JWT {@code exp} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setExpiration(Date exp); + + /** + * Sets the JWT Claims + * nbf (not before) value. A {@code null} value will remove the property from the Claims. + * + *

    A JWT obtained before this timestamp should not be used.

    + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setNotBefore(java.util.Date) notBefore} field with the specified value. This allows + * you to write code like this:

    + * + *
    +     * String jwt = Jwts.builder().setNotBefore(new Date()).compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setNotBefore(new Date());
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param nbf the JWT {@code nbf} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setNotBefore(Date nbf); + + /** + * Sets the JWT Claims + * iat (issued at) value. A {@code null} value will remove the property from the Claims. + * + *

    The value is the timestamp when the JWT was created.

    + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setIssuedAt(java.util.Date) issuedAt} field with the specified value. This allows + * you to write code like this:

    + * + *
    +     * String jwt = Jwts.builder().setIssuedAt(new Date()).compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setIssuedAt(new Date());
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param iat the JWT {@code iat} value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setIssuedAt(Date iat); + + /** + * Sets the JWT Claims + * jti (JWT ID) value. A {@code null} value will remove the property from the Claims. + * + *

    The value is a CaSe-SenSiTiVe unique identifier for the JWT. If specified, this value MUST be assigned in a + * manner that ensures that there is a negligible probability that the same value will be accidentally + * assigned to a different data object. The ID can be used to prevent the JWT from being replayed.

    + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set + * the Claims {@link Claims#setId(String) id} field with the specified value. This allows + * you to write code like this:

    + * + *
    +     * String jwt = Jwts.builder().setId(UUID.randomUUID().toString()).compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().setId(UUID.randomUUID().toString());
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param jti the JWT {@code jti} (id) value or {@code null} to remove the property from the Claims map. + * @return the builder instance for method chaining. + * @since 0.2 + */ + @Override + //only for better/targeted JavaDoc + JwtBuilder setId(String jti); + + /** + * Sets a custom JWT Claims parameter value. A {@code null} value will remove the property from the Claims. + * + *

    This is a convenience method. It will first ensure a Claims instance exists as the JWT body and then set the + * named property on the Claims instance using the Claims {@link Claims#put(Object, Object) put} method. This allows + * you to write code like this:

    + * + *
    +     * String jwt = Jwts.builder().claim("aName", "aValue").compact();
    +     * 
    + * + *

    instead of this:

    + *
    +     * Claims claims = Jwts.claims().put("aName", "aValue");
    +     * String jwt = Jwts.builder().setClaims(claims).compact();
    +     * 
    + *

    if desired.

    + * + * @param name the JWT Claims property name + * @param value the value to set for the specified Claims property name + * @return the builder instance for method chaining. + * @since 0.2 + */ + JwtBuilder claim(String name, Object value); + + /** + * Signs the constructed JWT with the specified key using the key's + * {@link SignatureAlgorithm#forSigningKey(Key) recommended signature algorithm}, producing a JWS. If the + * recommended signature algorithm isn't sufficient for your needs, consider using + * {@link #signWith(Key, SignatureAlgorithm)} instead. + * + *

    If you are looking to invoke this method with a byte array that you are confident may be used for HMAC-SHA + * algorithms, consider using {@link Keys Keys}.{@link Keys#hmacShaKeyFor(byte[]) hmacShaKeyFor(bytes)} to + * convert the byte array into a valid {@code Key}.

    + * + * @param key the key to use for signing + * @return the builder instance for method chaining. + * @throws InvalidKeyException if the Key is insufficient or explicitly disallowed by the JWT specification as + * described by {@link SignatureAlgorithm#forSigningKey(Key)}. + * @see #signWith(Key, SignatureAlgorithm) + * @since 0.10.0 + */ + JwtBuilder signWith(Key key) throws InvalidKeyException; + + /** + * Signs the constructed JWT using the specified algorithm with the specified key, producing a JWS. + * + *

    Deprecation Notice: Deprecated as of 0.10.0

    + * + *

    Use {@link Keys Keys}.{@link Keys#hmacShaKeyFor(byte[]) hmacShaKeyFor(bytes)} to + * obtain the {@code Key} and then invoke {@link #signWith(Key)} or {@link #signWith(Key, SignatureAlgorithm)}.

    + * + *

    This method will be removed in the 1.0 release.

    + * + * @param alg the JWS algorithm to use to digitally sign the JWT, thereby producing a JWS. + * @param secretKey the algorithm-specific signing key to use to digitally sign the JWT. + * @return the builder for method chaining. + * @throws InvalidKeyException if the Key is insufficient or explicitly disallowed by the JWT specification as + * described by {@link SignatureAlgorithm#forSigningKey(Key)}. + * @deprecated as of 0.10.0: use {@link Keys Keys}.{@link Keys#hmacShaKeyFor(byte[]) hmacShaKeyFor(bytes)} to + * obtain the {@code Key} and then invoke {@link #signWith(Key)} or {@link #signWith(Key, SignatureAlgorithm)}. + * This method will be removed in the 1.0 release. + */ + @Deprecated + JwtBuilder signWith(SignatureAlgorithm alg, byte[] secretKey) throws InvalidKeyException; + + /** + * Signs the constructed JWT using the specified algorithm with the specified key, producing a JWS. + * + *

    This is a convenience method: the string argument is first BASE64-decoded to a byte array and this resulting + * byte array is used to invoke {@link #signWith(SignatureAlgorithm, byte[])}.

    + * + *

    Deprecation Notice: Deprecated as of 0.10.0, will be removed in the 1.0 release.

    + * + *

    This method has been deprecated because the {@code key} argument for this method can be confusing: keys for + * cryptographic operations are always binary (byte arrays), and many people were confused as to how bytes were + * obtained from the String argument.

    + * + *

    This method always expected a String argument that was effectively the same as the result of the following + * (pseudocode):

    + * + *

    {@code String base64EncodedSecretKey = base64Encode(secretKeyBytes);}

    + * + *

    However, a non-trivial number of JJWT users were confused by the method signature and attempted to + * use raw password strings as the key argument - for example {@code signWith(HS256, myPassword)} - which is + * almost always incorrect for cryptographic hashes and can produce erroneous or insecure results.

    + * + *

    See this + * + * StackOverflow answer explaining why raw (non-base64-encoded) strings are almost always incorrect for + * signature operations.

    + * + *

    To perform the correct logic with base64EncodedSecretKey strings with JJWT >= 0.10.0, you may do this: + *

    
    +     * byte[] keyBytes = {@link Decoders Decoders}.{@link Decoders#BASE64 BASE64}.{@link Decoder#decode(Object) decode(base64EncodedSecretKey)};
    +     * Key key = {@link Keys Keys}.{@link Keys#hmacShaKeyFor(byte[]) hmacShaKeyFor(keyBytes)};
    +     * jwtBuilder.signWith(key); //or {@link #signWith(Key, SignatureAlgorithm)}
    +     * 
    + *

    + * + *

    This method will be removed in the 1.0 release.

    + * + * @param alg the JWS algorithm to use to digitally sign the JWT, thereby producing a JWS. + * @param base64EncodedSecretKey the BASE64-encoded algorithm-specific signing key to use to digitally sign the + * JWT. + * @return the builder for method chaining. + * @throws InvalidKeyException if the Key is insufficient or explicitly disallowed by the JWT specification as + * described by {@link SignatureAlgorithm#forSigningKey(Key)}. + * @deprecated as of 0.10.0: use {@link #signWith(Key)} or {@link #signWith(Key, SignatureAlgorithm)} instead. This + * method will be removed in the 1.0 release. + */ + @Deprecated + JwtBuilder signWith(SignatureAlgorithm alg, String base64EncodedSecretKey) throws InvalidKeyException; + + /** + * Signs the constructed JWT using the specified algorithm with the specified key, producing a JWS. + * + *

    It is typically recommended to call the {@link #signWith(Key)} instead for simplicity. + * However, this method can be useful if the recommended algorithm heuristics do not meet your needs or if + * you want explicit control over the signature algorithm used with the specified key.

    + * + * @param alg the JWS algorithm to use to digitally sign the JWT, thereby producing a JWS. + * @param key the algorithm-specific signing key to use to digitally sign the JWT. + * @return the builder for method chaining. + * @throws InvalidKeyException if the Key is insufficient or explicitly disallowed by the JWT specification for + * the specified algorithm. + * @see #signWith(Key) + * @deprecated since 0.10.0: use {@link #signWith(Key, SignatureAlgorithm)} instead. This method will be removed + * in the 1.0 release. + */ + @Deprecated + JwtBuilder signWith(SignatureAlgorithm alg, Key key) throws InvalidKeyException; + + /** + * Signs the constructed JWT with the specified key using the specified algorithm, producing a JWS. + * + *

    It is typically recommended to call the {@link #signWith(Key)} instead for simplicity. + * However, this method can be useful if the recommended algorithm heuristics do not meet your needs or if + * you want explicit control over the signature algorithm used with the specified key.

    + * + * @param key the signing key to use to digitally sign the JWT. + * @param alg the JWS algorithm to use with the key to digitally sign the JWT, thereby producing a JWS. + * @return the builder for method chaining. + * @throws InvalidKeyException if the Key is insufficient or explicitly disallowed by the JWT specification for + * the specified algorithm. + * @see #signWith(Key) + * @since 0.10.0 + */ + JwtBuilder signWith(Key key, SignatureAlgorithm alg) throws InvalidKeyException; + + /** + * Compresses the JWT body using the specified {@link CompressionCodec}. + * + *

    If your compact JWTs are large, and you want to reduce their total size during network transmission, this + * can be useful. For example, when embedding JWTs in URLs, some browsers may not support URLs longer than a + * certain length. Using compression can help ensure the compact JWT fits within that length. However, NOTE:

    + * + *

    Compatibility Warning

    + * + *

    The JWT family of specifications defines compression only for JWE (Json Web Encryption) + * tokens. Even so, JJWT will also support compression for JWS tokens as well if you choose to use it. + * However, be aware that if you use compression when creating a JWS token, other libraries may not be able to + * parse that JWS token. When using compression for JWS tokens, be sure that that all parties accessing the + * JWS token support compression for JWS.

    + * + *

    Compression when creating JWE tokens however should be universally accepted for any + * library that supports JWE.

    + * + * @param codec implementation of the {@link CompressionCodec} to be used. + * @return the builder for method chaining. + * @see io.jsonwebtoken.CompressionCodecs + * @since 0.6.0 + */ + JwtBuilder compressWith(CompressionCodec codec); + + /** + * Perform Base64Url encoding with the specified Encoder. + * + *

    JJWT uses a spec-compliant encoder that works on all supported JDK versions, but you may call this method + * to specify a different encoder if you desire.

    + * + * @param base64UrlEncoder the encoder to use when Base64Url-encoding + * @return the builder for method chaining. + * @since 0.10.0 + */ + JwtBuilder base64UrlEncodeWith(Encoder base64UrlEncoder); + + /** + * Performs object-to-JSON serialization with the specified Serializer. This is used by the builder to convert + * JWT/JWS/JWT headers and claims Maps to JSON strings as required by the JWT specification. + * + *

    If this method is not called, JJWT will use whatever serializer it can find at runtime, checking for the + * presence of well-known implementations such Jackson, Gson, and org.json. If one of these is not found + * in the runtime classpath, an exception will be thrown when the {@link #compact()} method is invoked.

    + * + * @param serializer the serializer to use when converting Map objects to JSON strings. + * @return the builder for method chaining. + * @since 0.10.0 + */ + JwtBuilder serializeToJsonWith(Serializer> serializer); + + /** + * Actually builds the JWT and serializes it to a compact, URL-safe string according to the + * JWT Compact Serialization + * rules. + * + * @return A compact URL-safe JWT string. + */ + String compact(); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtException.java new file mode 100644 index 000000000000..c25aa22392cf --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Base class for JWT-related runtime exceptions. + * + * @since 0.1 + */ +public class JwtException extends RuntimeException { + + public JwtException(String message) { + super(message); + } + + public JwtException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandler.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandler.java new file mode 100644 index 000000000000..0e23f8339862 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandler.java @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * A JwtHandler is invoked by a {@link io.jsonwebtoken.JwtParser JwtParser} after parsing a JWT to indicate the exact + * type of JWT or JWS parsed. + * + * @param the type of object to return to the parser caller after handling the parsed JWT. + * @since 0.2 + */ +public interface JwtHandler { + + /** + * This method is invoked when a {@link io.jsonwebtoken.JwtParser JwtParser} determines that the parsed JWT is + * a plaintext JWT. A plaintext JWT has a String (non-JSON) body payload and it is not cryptographically signed. + * + * @param jwt the parsed plaintext JWT + * @return any object to be used after inspecting the JWT, or {@code null} if no return value is necessary. + */ + T onPlaintextJwt(Jwt jwt); + + /** + * This method is invoked when a {@link io.jsonwebtoken.JwtParser JwtParser} determines that the parsed JWT is + * a Claims JWT. A Claims JWT has a {@link Claims} body and it is not cryptographically signed. + * + * @param jwt the parsed claims JWT + * @return any object to be used after inspecting the JWT, or {@code null} if no return value is necessary. + */ + T onClaimsJwt(Jwt jwt); + + /** + * This method is invoked when a {@link io.jsonwebtoken.JwtParser JwtParser} determines that the parsed JWT is + * a plaintext JWS. A plaintext JWS is a JWT with a String (non-JSON) body (payload) that has been + * cryptographically signed. + * + *

    This method will only be invoked if the cryptographic signature can be successfully verified.

    + * + * @param jws the parsed plaintext JWS + * @return any object to be used after inspecting the JWS, or {@code null} if no return value is necessary. + */ + T onPlaintextJws(Jws jws); + + /** + * This method is invoked when a {@link io.jsonwebtoken.JwtParser JwtParser} determines that the parsed JWT is + * a valid Claims JWS. A Claims JWS is a JWT with a {@link Claims} body that has been cryptographically signed. + * + *

    This method will only be invoked if the cryptographic signature can be successfully verified.

    + * + * @param jws the parsed claims JWS + * @return any object to be used after inspecting the JWS, or {@code null} if no return value is necessary. + */ + T onClaimsJws(Jws jws); + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandlerAdapter.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandlerAdapter.java new file mode 100644 index 000000000000..749488372e7e --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtHandlerAdapter.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * An Adapter implementation of the + * {@link JwtHandler} interface that allows for anonymous subclasses to process only the JWT results that are + * known/expected for a particular use case. + * + *

    All of the methods in this implementation throw exceptions: overridden methods represent + * scenarios expected by calling code in known situations. It would be unexpected to receive a JWS or JWT that did + * not match parsing expectations, so all non-overridden methods throw exceptions to indicate that the JWT + * input was unexpected.

    + * + * @param the type of object to return to the parser caller after handling the parsed JWT. + * @since 0.2 + */ +public class JwtHandlerAdapter implements JwtHandler { + + @Override + public T onPlaintextJwt(Jwt jwt) { + throw new UnsupportedJwtException("Unsigned plaintext JWTs are not supported."); + } + + @Override + public T onClaimsJwt(Jwt jwt) { + throw new UnsupportedJwtException("Unsigned Claims JWTs are not supported."); + } + + @Override + public T onPlaintextJws(Jws jws) { + throw new UnsupportedJwtException("Signed plaintext JWSs are not supported."); + } + + @Override + public T onClaimsJws(Jws jws) { + throw new UnsupportedJwtException("Signed Claims JWSs are not supported."); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParser.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParser.java new file mode 100644 index 000000000000..7e86b91136c8 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParser.java @@ -0,0 +1,596 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.io.Decoder; +import io.jsonwebtoken.io.Deserializer; +import io.jsonwebtoken.security.SignatureException; + +import java.security.Key; +import java.util.Date; +import java.util.Map; + +/** + * A parser for reading JWT strings, used to convert them into a {@link Jwt} object representing the expanded JWT. + * + * @since 0.1 + */ +public interface JwtParser { + + public static final char SEPARATOR_CHAR = '.'; + + /** + * Ensures that the specified {@code jti} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param id + * @return the parser method for chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireId(String)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireId(String id); + + /** + * Ensures that the specified {@code sub} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param subject + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireSubject(String)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireSubject(String subject); + + /** + * Ensures that the specified {@code aud} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param audience + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireAudience(String)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireAudience(String audience); + + /** + * Ensures that the specified {@code iss} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param issuer + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireIssuer(String)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireIssuer(String issuer); + + /** + * Ensures that the specified {@code iat} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param issuedAt + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireIssuedAt(Date)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireIssuedAt(Date issuedAt); + + /** + * Ensures that the specified {@code exp} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param expiration + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireExpiration(Date)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireExpiration(Date expiration); + + /** + * Ensures that the specified {@code nbf} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param notBefore + * @return the parser for method chaining + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#requireNotBefore(Date)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser requireNotBefore(Date notBefore); + + /** + * Ensures that the specified {@code claimName} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param claimName + * @param value + * @return the parser for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + * @deprecated see {@link JwtParserBuilder#require(String, Object)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser require(String claimName, Object value); + + /** + * Sets the {@link Clock} that determines the timestamp to use when validating the parsed JWT. + * The parser uses a default Clock implementation that simply returns {@code new Date()} when called. + * + * @param clock a {@code Clock} object to return the timestamp to use when validating the parsed JWT. + * @return the parser for method chaining. + * @since 0.7.0 + * @deprecated see {@link JwtParserBuilder#setClock(Clock)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setClock(Clock clock); + + /** + * Sets the amount of clock skew in seconds to tolerate when verifying the local time against the {@code exp} + * and {@code nbf} claims. + * + * @param seconds the number of seconds to tolerate for clock skew when verifying {@code exp} or {@code nbf} claims. + * @return the parser for method chaining. + * @since 0.7.0 + * @throws IllegalArgumentException if {@code seconds} is a value greater than {@code Long.MAX_VALUE / 1000} as + * any such value would cause numeric overflow when multiplying by 1000 to obtain a millisecond value. + * @deprecated see {@link JwtParserBuilder#setAllowedClockSkewSeconds(long)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setAllowedClockSkewSeconds(long seconds) throws IllegalArgumentException; + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + *

    + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + *

    + *

    This method overwrites any previously set key.

    + * + * @param key the algorithm-specific signature verification key used to validate any discovered JWS digital + * signature. + * @return the parser for method chaining. + * @deprecated see {@link JwtParserBuilder#setSigningKey(byte[])}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setSigningKey(byte[] key); + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + * + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + * + *

    This method overwrites any previously set key.

    + * + *

    This is a convenience method: the string argument is first BASE64-decoded to a byte array and this resulting + * byte array is used to invoke {@link #setSigningKey(byte[])}.

    + * + *

    Deprecation Notice: Deprecated as of 0.10.0, will be removed in 1.0.0

    + * + *

    This method has been deprecated because the {@code key} argument for this method can be confusing: keys for + * cryptographic operations are always binary (byte arrays), and many people were confused as to how bytes were + * obtained from the String argument.

    + * + *

    This method always expected a String argument that was effectively the same as the result of the following + * (pseudocode):

    + * + *

    {@code String base64EncodedSecretKey = base64Encode(secretKeyBytes);}

    + * + *

    However, a non-trivial number of JJWT users were confused by the method signature and attempted to + * use raw password strings as the key argument - for example {@code setSigningKey(myPassword)} - which is + * almost always incorrect for cryptographic hashes and can produce erroneous or insecure results.

    + * + *

    See this + * + * StackOverflow answer explaining why raw (non-base64-encoded) strings are almost always incorrect for + * signature operations.

    + * + *

    Finally, please use the {@link #setSigningKey(Key) setSigningKey(Key)} instead, as this method and the + * {@code byte[]} variant will be removed before the 1.0.0 release.

    + * + * @param base64EncodedSecretKey the BASE64-encoded algorithm-specific signature verification key to use to validate + * any discovered JWS digital signature. + * @return the parser for method chaining. + * @deprecated see {@link JwtParserBuilder#setSigningKey(String)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setSigningKey(String base64EncodedSecretKey); + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + *

    + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + *

    + *

    This method overwrites any previously set key.

    + * + * @param key the algorithm-specific signature verification key to use to validate any discovered JWS digital + * signature. + * @return the parser for method chaining. + * @deprecated see {@link JwtParserBuilder#setSigningKey(Key)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setSigningKey(Key key); + + /** + * Sets the {@link SigningKeyResolver} used to acquire the signing key that should be used to verify + * a JWS's signature. If the parsed String is not a JWS (no signature), this resolver is not used. + *

    + *

    Specifying a {@code SigningKeyResolver} is necessary when the signing key is not already known before parsing + * the JWT and the JWT header or payload (plaintext body or Claims) must be inspected first to determine how to + * look up the signing key. Once returned by the resolver, the JwtParser will then verify the JWS signature with the + * returned key. For example:

    + *

    + *

    +     * Jws<Claims> jws = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter() {
    +     *         @Override
    +     *         public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {
    +     *             //inspect the header or claims, lookup and return the signing key
    +     *             return getSigningKey(header, claims); //implement me
    +     *         }})
    +     *     .parseClaimsJws(compact);
    +     * 
    + *

    + *

    A {@code SigningKeyResolver} is invoked once during parsing before the signature is verified.

    + *

    + *

    This method should only be used if a signing key is not provided by the other {@code setSigningKey*} builder + * methods.

    + * + * @param signingKeyResolver the signing key resolver used to retrieve the signing key. + * @return the parser for method chaining. + * @since 0.4 + * @deprecated see {@link JwtParserBuilder#setSigningKeyResolver(SigningKeyResolver)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setSigningKeyResolver(SigningKeyResolver signingKeyResolver); + + /** + * Sets the {@link CompressionCodecResolver} used to acquire the {@link CompressionCodec} that should be used to + * decompress the JWT body. If the parsed JWT is not compressed, this resolver is not used. + *

    NOTE: Compression is not defined by the JWT Specification, and it is not expected that other libraries + * (including JJWT versions < 0.6.0) are able to consume a compressed JWT body correctly. This method is only + * useful if the compact JWT was compressed with JJWT >= 0.6.0 or another library that you know implements + * the same behavior.

    + *

    Default Support

    + *

    JJWT's default {@link JwtParser} implementation supports both the + * {@link CompressionCodecs#DEFLATE DEFLATE} + * and {@link CompressionCodecs#GZIP GZIP} algorithms by default - you do not need to + * specify a {@code CompressionCodecResolver} in these cases.

    + *

    However, if you want to use a compression algorithm other than {@code DEF} or {@code GZIP}, you must implement + * your own {@link CompressionCodecResolver} and specify that via this method and also when + * {@link io.jsonwebtoken.JwtBuilder#compressWith(CompressionCodec) building} JWTs.

    + * + * @param compressionCodecResolver the compression codec resolver used to decompress the JWT body. + * @return the parser for method chaining. + * @since 0.6.0 + * @deprecated see {@link JwtParserBuilder#setCompressionCodecResolver(CompressionCodecResolver)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser setCompressionCodecResolver(CompressionCodecResolver compressionCodecResolver); + + /** + * Perform Base64Url decoding with the specified Decoder + * + *

    JJWT uses a spec-compliant decoder that works on all supported JDK versions, but you may call this method + * to specify a different decoder if you desire.

    + * + * @param base64UrlDecoder the decoder to use when Base64Url-decoding + * @return the parser for method chaining. + * @since 0.10.0 + * @deprecated see {@link JwtParserBuilder#base64UrlDecodeWith(Decoder)}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser base64UrlDecodeWith(Decoder base64UrlDecoder); + + /** + * Uses the specified deserializer to convert JSON Strings (UTF-8 byte arrays) into Java Map objects. This is + * used by the parser after Base64Url-decoding to convert JWT/JWS/JWT JSON headers and claims into Java Map + * objects. + * + *

    If this method is not called, JJWT will use whatever deserializer it can find at runtime, checking for the + * presence of well-known implementations such Jackson, Gson, and org.json. If one of these is not found + * in the runtime classpath, an exception will be thrown when one of the various {@code parse}* methods is + * invoked.

    + * + * @param deserializer the deserializer to use when converting JSON Strings (UTF-8 byte arrays) into Map objects. + * @return the parser for method chaining. + * @since 0.10.0 + * @deprecated see {@link JwtParserBuilder#deserializeJsonWith(Deserializer)} )}. + * To construct a JwtParser use the corresponding builder via {@link Jwts#parserBuilder()}. This will construct an + * immutable JwtParser. + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + JwtParser deserializeJsonWith(Deserializer> deserializer); + + /** + * Returns {@code true} if the specified JWT compact string represents a signed JWT (aka a 'JWS'), {@code false} + * otherwise. + *

    + *

    Note that if you are reasonably sure that the token is signed, it is more efficient to attempt to + * parse the token (and catching exceptions if necessary) instead of calling this method first before parsing.

    + * + * @param jwt the compact serialized JWT to check + * @return {@code true} if the specified JWT compact string represents a signed JWT (aka a 'JWS'), {@code false} + * otherwise. + */ + boolean isSigned(String jwt); + + /** + * Parses the specified compact serialized JWT string based on the builder's current configuration state and + * returns the resulting JWT or JWS instance. + *

    + *

    This method returns a JWT or JWS based on the parsed string. Because it may be cumbersome to determine if it + * is a JWT or JWS, or if the body/payload is a Claims or String with {@code instanceof} checks, the + * {@link #parse(String, JwtHandler) parse(String,JwtHandler)} method allows for a type-safe callback approach that + * may help reduce code or instanceof checks.

    + * + * @param jwt the compact serialized JWT to parse + * @return the specified compact serialized JWT string based on the builder's current configuration state. + * @throws MalformedJwtException if the specified JWT was incorrectly constructed (and therefore invalid). + * Invalid + * JWTs should not be trusted and should be discarded. + * @throws SignatureException if a JWS signature was discovered, but could not be verified. JWTs that fail + * signature validation should not be trusted and should be discarded. + * @throws ExpiredJwtException if the specified JWT is a Claims JWT and the Claims has an expiration time + * before the time this method is invoked. + * @throws IllegalArgumentException if the specified string is {@code null} or empty or only whitespace. + * @see #parse(String, JwtHandler) + * @see #parsePlaintextJwt(String) + * @see #parseClaimsJwt(String) + * @see #parsePlaintextJws(String) + * @see #parseClaimsJws(String) + */ + Jwt parse(String jwt) throws ExpiredJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; + + /** + * Parses the specified compact serialized JWT string based on the builder's current configuration state and + * invokes the specified {@code handler} with the resulting JWT or JWS instance. + *

    + *

    If you are confident of the format of the JWT before parsing, you can create an anonymous subclass using the + * {@link io.jsonwebtoken.JwtHandlerAdapter JwtHandlerAdapter} and override only the methods you know are relevant + * for your use case(s), for example:

    + *

    + *

    +     * String compactJwt = request.getParameter("jwt"); //we are confident this is a signed JWS
    +     *
    +     * String subject = Jwts.parser().setSigningKey(key).parse(compactJwt, new JwtHandlerAdapter<String>() {
    +     *     @Override
    +     *     public String onClaimsJws(Jws<Claims> jws) {
    +     *         return jws.getBody().getSubject();
    +     *     }
    +     * });
    +     * 
    + *

    + *

    If you know the JWT string can be only one type of JWT, then it is even easier to invoke one of the + * following convenience methods instead of this one:

    + *

    + *

      + *
    • {@link #parsePlaintextJwt(String)}
    • + *
    • {@link #parseClaimsJwt(String)}
    • + *
    • {@link #parsePlaintextJws(String)}
    • + *
    • {@link #parseClaimsJws(String)}
    • + *
    + * + * @param jwt the compact serialized JWT to parse + * @return the result returned by the {@code JwtHandler} + * @throws MalformedJwtException if the specified JWT was incorrectly constructed (and therefore invalid). + * Invalid JWTs should not be trusted and should be discarded. + * @throws SignatureException if a JWS signature was discovered, but could not be verified. JWTs that fail + * signature validation should not be trusted and should be discarded. + * @throws ExpiredJwtException if the specified JWT is a Claims JWT and the Claims has an expiration time + * before the time this method is invoked. + * @throws IllegalArgumentException if the specified string is {@code null} or empty or only whitespace, or if the + * {@code handler} is {@code null}. + * @see #parsePlaintextJwt(String) + * @see #parseClaimsJwt(String) + * @see #parsePlaintextJws(String) + * @see #parseClaimsJws(String) + * @see #parse(String) + * @since 0.2 + */ + T parse(String jwt, JwtHandler handler) + throws ExpiredJwtException, UnsupportedJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; + + /** + * Parses the specified compact serialized JWT string based on the builder's current configuration state and + * returns + * the resulting unsigned plaintext JWT instance. + *

    + *

    This is a convenience method that is usable if you are confident that the compact string argument reflects an + * unsigned plaintext JWT. An unsigned plaintext JWT has a String (non-JSON) body payload and it is not + * cryptographically signed.

    + *

    + *

    If the compact string presented does not reflect an unsigned plaintext JWT with non-JSON string body, + * an {@link UnsupportedJwtException} will be thrown.

    + * + * @param plaintextJwt a compact serialized unsigned plaintext JWT string. + * @return the {@link Jwt Jwt} instance that reflects the specified compact JWT string. + * @throws UnsupportedJwtException if the {@code plaintextJwt} argument does not represent an unsigned plaintext + * JWT + * @throws MalformedJwtException if the {@code plaintextJwt} string is not a valid JWT + * @throws SignatureException if the {@code plaintextJwt} string is actually a JWS and signature validation + * fails + * @throws IllegalArgumentException if the {@code plaintextJwt} string is {@code null} or empty or only whitespace + * @see #parseClaimsJwt(String) + * @see #parsePlaintextJws(String) + * @see #parseClaimsJws(String) + * @see #parse(String, JwtHandler) + * @see #parse(String) + * @since 0.2 + */ + Jwt parsePlaintextJwt(String plaintextJwt) + throws UnsupportedJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; + + /** + * Parses the specified compact serialized JWT string based on the builder's current configuration state and + * returns + * the resulting unsigned plaintext JWT instance. + *

    + *

    This is a convenience method that is usable if you are confident that the compact string argument reflects an + * unsigned Claims JWT. An unsigned Claims JWT has a {@link Claims} body and it is not cryptographically + * signed.

    + *

    + *

    If the compact string presented does not reflect an unsigned Claims JWT, an + * {@link UnsupportedJwtException} will be thrown.

    + * + * @param claimsJwt a compact serialized unsigned Claims JWT string. + * @return the {@link Jwt Jwt} instance that reflects the specified compact JWT string. + * @throws UnsupportedJwtException if the {@code claimsJwt} argument does not represent an unsigned Claims JWT + * @throws MalformedJwtException if the {@code claimsJwt} string is not a valid JWT + * @throws SignatureException if the {@code claimsJwt} string is actually a JWS and signature validation + * fails + * @throws ExpiredJwtException if the specified JWT is a Claims JWT and the Claims has an expiration time + * before the time this method is invoked. + * @throws IllegalArgumentException if the {@code claimsJwt} string is {@code null} or empty or only whitespace + * @see #parsePlaintextJwt(String) + * @see #parsePlaintextJws(String) + * @see #parseClaimsJws(String) + * @see #parse(String, JwtHandler) + * @see #parse(String) + * @since 0.2 + */ + Jwt parseClaimsJwt(String claimsJwt) + throws ExpiredJwtException, UnsupportedJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; + + /** + * Parses the specified compact serialized JWS string based on the builder's current configuration state and + * returns + * the resulting plaintext JWS instance. + *

    + *

    This is a convenience method that is usable if you are confident that the compact string argument reflects a + * plaintext JWS. A plaintext JWS is a JWT with a String (non-JSON) body (payload) that has been + * cryptographically signed.

    + *

    + *

    If the compact string presented does not reflect a plaintext JWS, an {@link UnsupportedJwtException} + * will be thrown.

    + * + * @param plaintextJws a compact serialized JWS string. + * @return the {@link Jws Jws} instance that reflects the specified compact JWS string. + * @throws UnsupportedJwtException if the {@code plaintextJws} argument does not represent an plaintext JWS + * @throws MalformedJwtException if the {@code plaintextJws} string is not a valid JWS + * @throws SignatureException if the {@code plaintextJws} JWS signature validation fails + * @throws IllegalArgumentException if the {@code plaintextJws} string is {@code null} or empty or only whitespace + * @see #parsePlaintextJwt(String) + * @see #parseClaimsJwt(String) + * @see #parseClaimsJws(String) + * @see #parse(String, JwtHandler) + * @see #parse(String) + * @since 0.2 + */ + Jws parsePlaintextJws(String plaintextJws) + throws UnsupportedJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; + + /** + * Parses the specified compact serialized JWS string based on the builder's current configuration state and + * returns + * the resulting Claims JWS instance. + *

    + *

    This is a convenience method that is usable if you are confident that the compact string argument reflects a + * Claims JWS. A Claims JWS is a JWT with a {@link Claims} body that has been cryptographically signed.

    + *

    + *

    If the compact string presented does not reflect a Claims JWS, an {@link UnsupportedJwtException} will be + * thrown.

    + * + * @param claimsJws a compact serialized Claims JWS string. + * @return the {@link Jws Jws} instance that reflects the specified compact Claims JWS string. + * @throws UnsupportedJwtException if the {@code claimsJws} argument does not represent an Claims JWS + * @throws MalformedJwtException if the {@code claimsJws} string is not a valid JWS + * @throws SignatureException if the {@code claimsJws} JWS signature validation fails + * @throws ExpiredJwtException if the specified JWT is a Claims JWT and the Claims has an expiration time + * before the time this method is invoked. + * @throws IllegalArgumentException if the {@code claimsJws} string is {@code null} or empty or only whitespace + * @see #parsePlaintextJwt(String) + * @see #parseClaimsJwt(String) + * @see #parsePlaintextJws(String) + * @see #parse(String, JwtHandler) + * @see #parse(String) + * @since 0.2 + */ + Jws parseClaimsJws(String claimsJws) + throws ExpiredJwtException, UnsupportedJwtException, MalformedJwtException, SignatureException, IllegalArgumentException; +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParserBuilder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParserBuilder.java new file mode 100644 index 000000000000..2e8dd8794516 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/JwtParserBuilder.java @@ -0,0 +1,307 @@ +/* + * Copyright (C) 2019 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.io.Decoder; +import io.jsonwebtoken.io.Deserializer; + +import java.security.Key; +import java.util.Date; +import java.util.Map; + +/** + * A builder to construct a {@link JwtParser}. Example usage: + *
    {@code
    + *     Jwts.parserBuilder()
    + *         .setSigningKey(...)
    + *         .requireIssuer("https://issuer.example.com")
    + *         .build()
    + *         .parse(jwtString)
    + * }
    + * @since 0.11.0 + */ +public interface JwtParserBuilder { + + /** + * Ensures that the specified {@code jti} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param id + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireId(String id); + + /** + * Ensures that the specified {@code sub} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param subject + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireSubject(String subject); + + /** + * Ensures that the specified {@code aud} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param audience + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireAudience(String audience); + + /** + * Ensures that the specified {@code iss} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param issuer + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireIssuer(String issuer); + + /** + * Ensures that the specified {@code iat} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param issuedAt + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireIssuedAt(Date issuedAt); + + /** + * Ensures that the specified {@code exp} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param expiration + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireExpiration(Date expiration); + + /** + * Ensures that the specified {@code nbf} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param notBefore + * @return the parser builder for method chaining + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder requireNotBefore(Date notBefore); + + /** + * Ensures that the specified {@code claimName} exists in the parsed JWT. If missing or if the parsed + * value does not equal the specified value, an exception will be thrown indicating that the + * JWT is invalid and may not be used. + * + * @param claimName + * @param value + * @return the parser builder for method chaining. + * @see MissingClaimException + * @see IncorrectClaimException + */ + JwtParserBuilder require(String claimName, Object value); + + /** + * Sets the {@link Clock} that determines the timestamp to use when validating the parsed JWT. + * The parser uses a default Clock implementation that simply returns {@code new Date()} when called. + * + * @param clock a {@code Clock} object to return the timestamp to use when validating the parsed JWT. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setClock(Clock clock); + + /** + * Sets the amount of clock skew in seconds to tolerate when verifying the local time against the {@code exp} + * and {@code nbf} claims. + * + * @param seconds the number of seconds to tolerate for clock skew when verifying {@code exp} or {@code nbf} claims. + * @return the parser builder for method chaining. + * @throws IllegalArgumentException if {@code seconds} is a value greater than {@code Long.MAX_VALUE / 1000} as + * any such value would cause numeric overflow when multiplying by 1000 to obtain a millisecond value. + */ + JwtParserBuilder setAllowedClockSkewSeconds(long seconds) throws IllegalArgumentException; + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + *

    + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + *

    + *

    This method overwrites any previously set key.

    + * + * @param key the algorithm-specific signature verification key used to validate any discovered JWS digital + * signature. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setSigningKey(byte[] key); + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + * + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + * + *

    This method overwrites any previously set key.

    + * + *

    This is a convenience method: the string argument is first BASE64-decoded to a byte array and this resulting + * byte array is used to invoke {@link #setSigningKey(byte[])}.

    + * + *

    Deprecation Notice: Deprecated as of 0.10.0, will be removed in 1.0.0

    + * + *

    This method has been deprecated because the {@code key} argument for this method can be confusing: keys for + * cryptographic operations are always binary (byte arrays), and many people were confused as to how bytes were + * obtained from the String argument.

    + * + *

    This method always expected a String argument that was effectively the same as the result of the following + * (pseudocode):

    + * + *

    {@code String base64EncodedSecretKey = base64Encode(secretKeyBytes);}

    + * + *

    However, a non-trivial number of JJWT users were confused by the method signature and attempted to + * use raw password strings as the key argument - for example {@code setSigningKey(myPassword)} - which is + * almost always incorrect for cryptographic hashes and can produce erroneous or insecure results.

    + * + *

    See this + * + * StackOverflow answer explaining why raw (non-base64-encoded) strings are almost always incorrect for + * signature operations.

    + * + *

    Finally, please use the {@link #setSigningKey(Key) setSigningKey(Key)} instead, as this method and the + * {@code byte[]} variant will be removed before the 1.0.0 release.

    + * + * @param base64EncodedSecretKey the BASE64-encoded algorithm-specific signature verification key to use to validate + * any discovered JWS digital signature. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setSigningKey(String base64EncodedSecretKey); + + /** + * Sets the signing key used to verify any discovered JWS digital signature. If the specified JWT string is not + * a JWS (no signature), this key is not used. + *

    + *

    Note that this key MUST be a valid key for the signature algorithm found in the JWT header + * (as the {@code alg} header parameter).

    + *

    + *

    This method overwrites any previously set key.

    + * + * @param key the algorithm-specific signature verification key to use to validate any discovered JWS digital + * signature. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setSigningKey(Key key); + + /** + * Sets the {@link SigningKeyResolver} used to acquire the signing key that should be used to verify + * a JWS's signature. If the parsed String is not a JWS (no signature), this resolver is not used. + *

    + *

    Specifying a {@code SigningKeyResolver} is necessary when the signing key is not already known before parsing + * the JWT and the JWT header or payload (plaintext body or Claims) must be inspected first to determine how to + * look up the signing key. Once returned by the resolver, the JwtParser will then verify the JWS signature with the + * returned key. For example:

    + *

    + *

    +     * Jws<Claims> jws = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter() {
    +     *         @Override
    +     *         public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {
    +     *             //inspect the header or claims, lookup and return the signing key
    +     *             return getSigningKey(header, claims); //implement me
    +     *         }})
    +     *     .parseClaimsJws(compact);
    +     * 
    + *

    + *

    A {@code SigningKeyResolver} is invoked once during parsing before the signature is verified.

    + *

    + *

    This method should only be used if a signing key is not provided by the other {@code setSigningKey*} builder + * methods.

    + * + * @param signingKeyResolver the signing key resolver used to retrieve the signing key. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setSigningKeyResolver(SigningKeyResolver signingKeyResolver); + + /** + * Sets the {@link CompressionCodecResolver} used to acquire the {@link CompressionCodec} that should be used to + * decompress the JWT body. If the parsed JWT is not compressed, this resolver is not used. + *

    NOTE: Compression is not defined by the JWT Specification, and it is not expected that other libraries + * (including JJWT versions < 0.6.0) are able to consume a compressed JWT body correctly. This method is only + * useful if the compact JWT was compressed with JJWT >= 0.6.0 or another library that you know implements + * the same behavior.

    + *

    Default Support

    + *

    JJWT's default {@link JwtParser} implementation supports both the + * {@link CompressionCodecs#DEFLATE DEFLATE} + * and {@link CompressionCodecs#GZIP GZIP} algorithms by default - you do not need to + * specify a {@code CompressionCodecResolver} in these cases.

    + *

    However, if you want to use a compression algorithm other than {@code DEF} or {@code GZIP}, you must implement + * your own {@link CompressionCodecResolver} and specify that via this method and also when + * {@link io.jsonwebtoken.JwtBuilder#compressWith(CompressionCodec) building} JWTs.

    + * + * @param compressionCodecResolver the compression codec resolver used to decompress the JWT body. + * @return the parser builder for method chaining. + */ + JwtParserBuilder setCompressionCodecResolver(CompressionCodecResolver compressionCodecResolver); + + /** + * Perform Base64Url decoding with the specified Decoder + * + *

    JJWT uses a spec-compliant decoder that works on all supported JDK versions, but you may call this method + * to specify a different decoder if you desire.

    + * + * @param base64UrlDecoder the decoder to use when Base64Url-decoding + * @return the parser builder for method chaining. + */ + JwtParserBuilder base64UrlDecodeWith(Decoder base64UrlDecoder); + + /** + * Uses the specified deserializer to convert JSON Strings (UTF-8 byte arrays) into Java Map objects. This is + * used by the parser after Base64Url-decoding to convert JWT/JWS/JWT JSON headers and claims into Java Map + * objects. + * + *

    If this method is not called, JJWT will use whatever deserializer it can find at runtime, checking for the + * presence of well-known implementations such Jackson, Gson, and org.json. If one of these is not found + * in the runtime classpath, an exception will be thrown when one of the various {@code parse}* methods is + * invoked.

    + * + * @param deserializer the deserializer to use when converting JSON Strings (UTF-8 byte arrays) into Map objects. + * @return the builder for method chaining. + */ + JwtParserBuilder deserializeJsonWith(Deserializer> deserializer); + + /** + * Returns an immutable/thread-safe {@link JwtParser} created from the configuration from this JwtParserBuilder. + * @return an immutable/thread-safe JwtParser created from the configuration from this JwtParserBuilder. + */ + JwtParser build(); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwts.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwts.java new file mode 100644 index 000000000000..80de65a44f14 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/Jwts.java @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.lang.Classes; + +import java.util.Map; + +/** + * Factory class useful for creating instances of JWT interfaces. Using this factory class can be a good + * alternative to tightly coupling your code to implementation classes. + * + * @since 0.1 + */ +public final class Jwts { + + private static final Class[] MAP_ARG = new Class[]{Map.class}; + + private Jwts() { + } + + /** + * Creates a new {@link Header} instance suitable for plaintext (not digitally signed) JWTs. As this + * is a less common use of JWTs, consider using the {@link #jwsHeader()} factory method instead if you will later + * digitally sign the JWT. + * + * @return a new {@link Header} instance suitable for plaintext (not digitally signed) JWTs. + */ + public static Header header() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultHeader"); + } + + /** + * Creates a new {@link Header} instance suitable for plaintext (not digitally signed) JWTs, populated + * with the specified name/value pairs. As this is a less common use of JWTs, consider using the + * {@link #jwsHeader(java.util.Map)} factory method instead if you will later digitally sign the JWT. + * + * @return a new {@link Header} instance suitable for plaintext (not digitally signed) JWTs. + */ + public static Header header(Map header) { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultHeader", MAP_ARG, header); + } + + /** + * Returns a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's). + * + * @return a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's). + * @see JwtBuilder#setHeader(Header) + */ + public static JwsHeader jwsHeader() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwsHeader"); + } + + /** + * Returns a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with the + * specified name/value pairs. + * + * @return a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with the + * specified name/value pairs. + * @see JwtBuilder#setHeader(Header) + */ + public static JwsHeader jwsHeader(Map header) { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwsHeader", MAP_ARG, header); + } + + /** + * Returns a new {@link Claims} instance to be used as a JWT body. + * + * @return a new {@link Claims} instance to be used as a JWT body. + */ + public static Claims claims() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultClaims"); + } + + /** + * Returns a new {@link Claims} instance populated with the specified name/value pairs. + * + * @param claims the name/value pairs to populate the new Claims instance. + * @return a new {@link Claims} instance populated with the specified name/value pairs. + */ + public static Claims claims(Map claims) { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultClaims", MAP_ARG, claims); + } + + /** + * Returns a new {@link JwtParser} instance that can be configured and then used to parse JWT strings. + * + * @return a new {@link JwtParser} instance that can be configured and then used to parse JWT strings. + * @deprecated use {@link Jwts#parserBuilder()} instead. See {@link JwtParserBuilder} for usage details. + *

    Migration to new method structure is minimal, for example: + *

    Old code: + *

    {@code
    +     *     Jwts.parser()
    +     *         .requireAudience("string")
    +     *         .parse(jwtString)
    +     * }
    + *

    New code: + *

    {@code
    +     *     Jwts.parserBuilder()
    +     *         .requireAudience("string")
    +     *         .build()
    +     *         .parse(jwtString)
    +     * }
    + *

    NOTE: this method will be removed before version 1.0 + */ + @Deprecated + public static JwtParser parser() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwtParser"); + } + + /** + * Returns a new {@link JwtParserBuilder} instance that can be configured to create an immutable/thread-safe {@link JwtParser). + * + * @return a new {@link JwtParser} instance that can be configured create an immutable/thread-safe {@link JwtParser). + */ + public static JwtParserBuilder parserBuilder() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwtParserBuilder"); + } + + /** + * Returns a new {@link JwtBuilder} instance that can be configured and then used to create JWT compact serialized + * strings. + * + * @return a new {@link JwtBuilder} instance that can be configured and then used to create JWT compact serialized + * strings. + */ + public static JwtBuilder builder() { + return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwtBuilder"); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MalformedJwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MalformedJwtException.java new file mode 100644 index 000000000000..6490550aaf7e --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MalformedJwtException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception indicating that a JWT was not correctly constructed and should be rejected. + * + * @since 0.2 + */ +public class MalformedJwtException extends JwtException { + + public MalformedJwtException(String message) { + super(message); + } + + public MalformedJwtException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MissingClaimException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MissingClaimException.java new file mode 100644 index 000000000000..030fe98d06b7 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/MissingClaimException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2015 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception thrown when discovering that a required claim is not present, indicating the JWT is + * invalid and may not be used. + * + * @since 0.6 + */ +public class MissingClaimException extends InvalidClaimException { + public MissingClaimException(Header header, Claims claims, String message) { + super(header, claims, message); + } + + public MissingClaimException(Header header, Claims claims, String message, Throwable cause) { + super(header, claims, message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/PrematureJwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/PrematureJwtException.java new file mode 100644 index 000000000000..8853832e80ae --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/PrematureJwtException.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception indicating that a JWT was accepted before it is allowed to be accessed and must be rejected. + * + * @since 0.3 + */ +public class PrematureJwtException extends ClaimJwtException { + + public PrematureJwtException(Header header, Claims claims, String message) { + super(header, claims, message); + } + + /** + * @param header jwt header + * @param claims jwt claims (body) + * @param message exception message + * @param cause cause + * @since 0.5 + */ + public PrematureJwtException(Header header, Claims claims, String message, Throwable cause) { + super(header, claims, message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/RequiredTypeException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/RequiredTypeException.java new file mode 100644 index 000000000000..eeb60d3084d1 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/RequiredTypeException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception thrown when {@link Claims#get(String, Class)} is called and the value does not match the type of the + * {@code Class} argument. + * + * @since 0.6 + */ +public class RequiredTypeException extends JwtException { + public RequiredTypeException(String message) { + super(message); + } + + public RequiredTypeException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureAlgorithm.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureAlgorithm.java new file mode 100644 index 000000000000..9f646502dfa1 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureAlgorithm.java @@ -0,0 +1,655 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.security.InvalidKeyException; +import io.jsonwebtoken.security.Keys; +import io.jsonwebtoken.security.SignatureException; +import io.jsonwebtoken.security.WeakKeyException; + +import javax.crypto.SecretKey; +import java.security.Key; +import java.security.PrivateKey; +import java.security.interfaces.ECKey; +import java.security.interfaces.RSAKey; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * Type-safe representation of standard JWT signature algorithm names as defined in the + * JSON Web Algorithms specification. + * + * @since 0.1 + */ +public enum SignatureAlgorithm { + + /** + * JWA name for {@code No digital signature or MAC performed} + */ + NONE("none", "No digital signature or MAC performed", "None", null, false, 0, 0), + + /** + * JWA algorithm name for {@code HMAC using SHA-256} + */ + HS256("HS256", "HMAC using SHA-256", "HMAC", "HmacSHA256", true, 256, 256, "1.2.840.113549.2.9"), + + /** + * JWA algorithm name for {@code HMAC using SHA-384} + */ + HS384("HS384", "HMAC using SHA-384", "HMAC", "HmacSHA384", true, 384, 384, "1.2.840.113549.2.10"), + + /** + * JWA algorithm name for {@code HMAC using SHA-512} + */ + HS512("HS512", "HMAC using SHA-512", "HMAC", "HmacSHA512", true, 512, 512, "1.2.840.113549.2.11"), + + /** + * JWA algorithm name for {@code RSASSA-PKCS-v1_5 using SHA-256} + */ + RS256("RS256", "RSASSA-PKCS-v1_5 using SHA-256", "RSA", "SHA256withRSA", true, 256, 2048), + + /** + * JWA algorithm name for {@code RSASSA-PKCS-v1_5 using SHA-384} + */ + RS384("RS384", "RSASSA-PKCS-v1_5 using SHA-384", "RSA", "SHA384withRSA", true, 384, 2048), + + /** + * JWA algorithm name for {@code RSASSA-PKCS-v1_5 using SHA-512} + */ + RS512("RS512", "RSASSA-PKCS-v1_5 using SHA-512", "RSA", "SHA512withRSA", true, 512, 2048), + + /** + * JWA algorithm name for {@code ECDSA using P-256 and SHA-256} + */ + ES256("ES256", "ECDSA using P-256 and SHA-256", "ECDSA", "SHA256withECDSA", true, 256, 256), + + /** + * JWA algorithm name for {@code ECDSA using P-384 and SHA-384} + */ + ES384("ES384", "ECDSA using P-384 and SHA-384", "ECDSA", "SHA384withECDSA", true, 384, 384), + + /** + * JWA algorithm name for {@code ECDSA using P-521 and SHA-512} + */ + ES512("ES512", "ECDSA using P-521 and SHA-512", "ECDSA", "SHA512withECDSA", true, 512, 521), + + /** + * JWA algorithm name for {@code RSASSA-PSS using SHA-256 and MGF1 with SHA-256}. This algorithm requires + * Java 11 or later or a JCA provider like BouncyCastle to be in the runtime classpath. If on Java 10 or + * earlier, BouncyCastle will be used automatically if found in the runtime classpath. + */ + PS256("PS256", "RSASSA-PSS using SHA-256 and MGF1 with SHA-256", "RSA", "RSASSA-PSS", false, 256, 2048), + + /** + * JWA algorithm name for {@code RSASSA-PSS using SHA-384 and MGF1 with SHA-384}. This algorithm requires + * Java 11 or later or a JCA provider like BouncyCastle to be in the runtime classpath. If on Java 10 or + * earlier, BouncyCastle will be used automatically if found in the runtime classpath. + */ + PS384("PS384", "RSASSA-PSS using SHA-384 and MGF1 with SHA-384", "RSA", "RSASSA-PSS", false, 384, 2048), + + /** + * JWA algorithm name for {@code RSASSA-PSS using SHA-512 and MGF1 with SHA-512}. This algorithm requires + * Java 11 or later or a JCA provider like BouncyCastle to be in the runtime classpath. If on Java 10 or + * earlier, BouncyCastle will be used automatically if found in the runtime classpath. + */ + PS512("PS512", "RSASSA-PSS using SHA-512 and MGF1 with SHA-512", "RSA", "RSASSA-PSS", false, 512, 2048); + + //purposefully ordered higher to lower: + private static final List PREFERRED_HMAC_ALGS = Collections.unmodifiableList(Arrays.asList( + SignatureAlgorithm.HS512, SignatureAlgorithm.HS384, SignatureAlgorithm.HS256)); + //purposefully ordered higher to lower: + private static final List PREFERRED_EC_ALGS = Collections.unmodifiableList(Arrays.asList( + SignatureAlgorithm.ES512, SignatureAlgorithm.ES384, SignatureAlgorithm.ES256)); + + private final String value; + private final String description; + private final String familyName; + private final String jcaName; + private final boolean jdkStandard; + private final int digestLength; + private final int minKeyLength; + /** + * Algorithm name as given by {@link Key#getAlgorithm()} if the key was loaded from a pkcs12 Keystore. + * + * @deprecated This is just a workaround for https://bugs.openjdk.java.net/browse/JDK-8243551 + */ + @Deprecated + private final String pkcs12Name; + + SignatureAlgorithm(String value, String description, String familyName, String jcaName, boolean jdkStandard, + int digestLength, int minKeyLength) { + this(value, description,familyName, jcaName, jdkStandard, digestLength, minKeyLength, jcaName); + } + + SignatureAlgorithm(String value, String description, String familyName, String jcaName, boolean jdkStandard, + int digestLength, int minKeyLength, String pkcs12Name) { + this.value = value; + this.description = description; + this.familyName = familyName; + this.jcaName = jcaName; + this.jdkStandard = jdkStandard; + this.digestLength = digestLength; + this.minKeyLength = minKeyLength; + this.pkcs12Name = pkcs12Name; + } + + /** + * Returns the JWA algorithm name constant. + * + * @return the JWA algorithm name constant. + */ + public String getValue() { + return value; + } + + /** + * Returns the JWA algorithm description. + * + * @return the JWA algorithm description. + */ + public String getDescription() { + return description; + } + + + /** + * Returns the cryptographic family name of the signature algorithm. The value returned is according to the + * following table: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Crypto Family
    SignatureAlgorithmFamily Name
    HS256HMAC
    HS384HMAC
    HS512HMAC
    RS256RSA
    RS384RSA
    RS512RSA
    PS256RSA
    PS384RSA
    PS512RSA
    ES256ECDSA
    ES384ECDSA
    ES512ECDSA
    + * + * @return Returns the cryptographic family name of the signature algorithm. + * @since 0.5 + */ + public String getFamilyName() { + return familyName; + } + + /** + * Returns the name of the JCA algorithm used to compute the signature. + * + * @return the name of the JCA algorithm used to compute the signature. + */ + public String getJcaName() { + return jcaName; + } + + /** + * Returns {@code true} if the algorithm is supported by standard JDK distributions or {@code false} if the + * algorithm implementation is not in the JDK and must be provided by a separate runtime JCA Provider (like + * BouncyCastle for example). + * + * @return {@code true} if the algorithm is supported by standard JDK distributions or {@code false} if the + * algorithm implementation is not in the JDK and must be provided by a separate runtime JCA Provider (like + * BouncyCastle for example). + */ + public boolean isJdkStandard() { + return jdkStandard; + } + + /** + * Returns {@code true} if the enum instance represents an HMAC signature algorithm, {@code false} otherwise. + * + * @return {@code true} if the enum instance represents an HMAC signature algorithm, {@code false} otherwise. + */ + public boolean isHmac() { + return familyName.equals("HMAC"); + } + + /** + * Returns {@code true} if the enum instance represents an RSA public/private key pair signature algorithm, + * {@code false} otherwise. + * + * @return {@code true} if the enum instance represents an RSA public/private key pair signature algorithm, + * {@code false} otherwise. + */ + public boolean isRsa() { + return familyName.equals("RSA"); + } + + /** + * Returns {@code true} if the enum instance represents an Elliptic Curve ECDSA signature algorithm, {@code false} + * otherwise. + * + * @return {@code true} if the enum instance represents an Elliptic Curve ECDSA signature algorithm, {@code false} + * otherwise. + */ + public boolean isEllipticCurve() { + return familyName.equals("ECDSA"); + } + + /** + * Returns the minimum key length in bits (not bytes) that may be used with this algorithm according to the + * JWT JWA Specification (RFC 7518). + * + * @return the minimum key length in bits (not bytes) that may be used with this algorithm according to the + * JWT JWA Specification (RFC 7518). + * @since 0.10.0 + */ + public int getMinKeyLength() { + return this.minKeyLength; + } + + /** + * Returns quietly if the specified key is allowed to create signatures using this algorithm + * according to the JWT JWA Specification (RFC 7518) or throws an + * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. + * + * @param key the key to check for validity. + * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. + * @since 0.10.0 + */ + public void assertValidSigningKey(Key key) throws InvalidKeyException { + assertValid(key, true); + } + + /** + * Returns quietly if the specified key is allowed to verify signatures using this algorithm + * according to the JWT JWA Specification (RFC 7518) or throws an + * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. + * + * @param key the key to check for validity. + * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. + * @since 0.10.0 + */ + public void assertValidVerificationKey(Key key) throws InvalidKeyException { + assertValid(key, false); + } + + /** + * @since 0.10.0 to support assertValid(Key, boolean) + */ + private static String keyType(boolean signing) { + return signing ? "signing" : "verification"; + } + + /** + * @since 0.10.0 + */ + private void assertValid(Key key, boolean signing) throws InvalidKeyException { + + if (this == NONE) { + + String msg = "The 'NONE' signature algorithm does not support cryptographic keys."; + throw new InvalidKeyException(msg); + + } else if (isHmac()) { + + if (!(key instanceof SecretKey)) { + String msg = this.familyName + " " + keyType(signing) + " keys must be SecretKey instances."; + throw new InvalidKeyException(msg); + } + SecretKey secretKey = (SecretKey) key; + + byte[] encoded = secretKey.getEncoded(); + if (encoded == null) { + throw new InvalidKeyException("The " + keyType(signing) + " key's encoded bytes cannot be null."); + } + + String alg = secretKey.getAlgorithm(); + if (alg == null) { + throw new InvalidKeyException("The " + keyType(signing) + " key's algorithm cannot be null."); + } + + // These next checks use equalsIgnoreCase per https://github.com/jwtk/jjwt/issues/381#issuecomment-412912272 + if (!HS256.jcaName.equalsIgnoreCase(alg) && + !HS384.jcaName.equalsIgnoreCase(alg) && + !HS512.jcaName.equalsIgnoreCase(alg) && + !HS256.pkcs12Name.equals(alg) && + !HS384.pkcs12Name.equals(alg) && + !HS512.pkcs12Name.equals(alg)) { + throw new InvalidKeyException("The " + keyType(signing) + " key's algorithm '" + alg + + "' does not equal a valid HmacSHA* algorithm name and cannot be used with " + name() + "."); + } + + int size = encoded.length * 8; //size in bits + if (size < this.minKeyLength) { + String msg = "The " + keyType(signing) + " key's size is " + size + " bits which " + + "is not secure enough for the " + name() + " algorithm. The JWT " + + "JWA Specification (RFC 7518, Section 3.2) states that keys used with " + name() + " MUST have a " + + "size >= " + minKeyLength + " bits (the key size must be greater than or equal to the hash " + + "output size). Consider using the " + Keys.class.getName() + " class's " + + "'secretKeyFor(SignatureAlgorithm." + name() + ")' method to create a key guaranteed to be " + + "secure enough for " + name() + ". See " + + "https://tools.ietf.org/html/rfc7518#section-3.2 for more information."; + throw new WeakKeyException(msg); + } + + } else { //EC or RSA + + if (signing) { + if (!(key instanceof PrivateKey)) { + String msg = familyName + " signing keys must be PrivateKey instances."; + throw new InvalidKeyException(msg); + } + } + + if (isEllipticCurve()) { + + if (!(key instanceof ECKey)) { + String msg = familyName + " " + keyType(signing) + " keys must be ECKey instances."; + throw new InvalidKeyException(msg); + } + + ECKey ecKey = (ECKey) key; + int size = ecKey.getParams().getOrder().bitLength(); + if (size < this.minKeyLength) { + String msg = "The " + keyType(signing) + " key's size (ECParameterSpec order) is " + size + + " bits which is not secure enough for the " + name() + " algorithm. The JWT " + + "JWA Specification (RFC 7518, Section 3.4) states that keys used with " + + name() + " MUST have a size >= " + this.minKeyLength + + " bits. Consider using the " + Keys.class.getName() + " class's " + + "'keyPairFor(SignatureAlgorithm." + name() + ")' method to create a key pair guaranteed " + + "to be secure enough for " + name() + ". See " + + "https://tools.ietf.org/html/rfc7518#section-3.4 for more information."; + throw new WeakKeyException(msg); + } + + } else { //RSA + + if (!(key instanceof RSAKey)) { + String msg = familyName + " " + keyType(signing) + " keys must be RSAKey instances."; + throw new InvalidKeyException(msg); + } + + RSAKey rsaKey = (RSAKey) key; + int size = rsaKey.getModulus().bitLength(); + if (size < this.minKeyLength) { + + String section = name().startsWith("P") ? "3.5" : "3.3"; + + String msg = "The " + keyType(signing) + " key's size is " + size + " bits which is not secure " + + "enough for the " + name() + " algorithm. The JWT JWA Specification (RFC 7518, Section " + + section + ") states that keys used with " + name() + " MUST have a size >= " + + this.minKeyLength + " bits. Consider using the " + Keys.class.getName() + " class's " + + "'keyPairFor(SignatureAlgorithm." + name() + ")' method to create a key pair guaranteed " + + "to be secure enough for " + name() + ". See " + + "https://tools.ietf.org/html/rfc7518#section-" + section + " for more information."; + throw new WeakKeyException(msg); + } + } + } + } + + /** + * Returns the recommended signature algorithm to be used with the specified key according to the following + * heuristics: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Key Signature Algorithm
    If the Key is a:And:With a key size of:The returned SignatureAlgorithm will be:
    {@link SecretKey}{@link Key#getAlgorithm() getAlgorithm()}.equals("HmacSHA256")1256 <= size <= 383 2{@link SignatureAlgorithm#HS256 HS256}
    {@link SecretKey}{@link Key#getAlgorithm() getAlgorithm()}.equals("HmacSHA384")1384 <= size <= 511{@link SignatureAlgorithm#HS384 HS384}
    {@link SecretKey}{@link Key#getAlgorithm() getAlgorithm()}.equals("HmacSHA512")1512 <= size{@link SignatureAlgorithm#HS512 HS512}
    {@link ECKey}instanceof {@link PrivateKey}256 <= size <= 383 3{@link SignatureAlgorithm#ES256 ES256}
    {@link ECKey}instanceof {@link PrivateKey}384 <= size <= 511{@link SignatureAlgorithm#ES384 ES384}
    {@link ECKey}instanceof {@link PrivateKey}4096 <= size{@link SignatureAlgorithm#ES512 ES512}
    {@link RSAKey}instanceof {@link PrivateKey}2048 <= size <= 3071 4,5{@link SignatureAlgorithm#RS256 RS256}
    {@link RSAKey}instanceof {@link PrivateKey}3072 <= size <= 4095 5{@link SignatureAlgorithm#RS384 RS384}
    {@link RSAKey}instanceof {@link PrivateKey}4096 <= size 5{@link SignatureAlgorithm#RS512 RS512}
    + *

    Notes:

    + *
      + *
    1. {@code SecretKey} instances must have an {@link Key#getAlgorithm() algorithm} name equal + * to {@code HmacSHA256}, {@code HmacSHA384} or {@code HmacSHA512}. If not, the key bytes might not be + * suitable for HMAC signatures will be rejected with a {@link InvalidKeyException}.
    2. + *
    3. The JWT JWA Specification (RFC 7518, + * Section 3.2) mandates that HMAC-SHA-* signing keys MUST be 256 bits or greater. + * {@code SecretKey}s with key lengths less than 256 bits will be rejected with an + * {@link WeakKeyException}.
    4. + *
    5. The JWT JWA Specification (RFC 7518, + * Section 3.4) mandates that ECDSA signing key lengths MUST be 256 bits or greater. + * {@code ECKey}s with key lengths less than 256 bits will be rejected with a + * {@link WeakKeyException}.
    6. + *
    7. The JWT JWA Specification (RFC 7518, + * Section 3.3) mandates that RSA signing key lengths MUST be 2048 bits or greater. + * {@code RSAKey}s with key lengths less than 2048 bits will be rejected with a + * {@link WeakKeyException}.
    8. + *
    9. Technically any RSA key of length >= 2048 bits may be used with the {@link #RS256}, {@link #RS384}, and + * {@link #RS512} algorithms, so we assume an RSA signature algorithm based on the key length to + * parallel similar decisions in the JWT specification for HMAC and ECDSA signature algorithms. + * This is not required - just a convenience.
    10. + *
    + *

    This implementation does not return the {@link #PS256}, {@link #PS256}, {@link #PS256} RSA variant for any + * specified {@link RSAKey} because: + *

      + *
    • The JWT JWA Specification (RFC 7518, + * Section 3.1) indicates that {@link #RS256}, {@link #RS384}, and {@link #RS512} are + * recommended algorithms while the {@code PS}* variants are simply marked as optional.
    • + *
    • The {@link #RS256}, {@link #RS384}, and {@link #RS512} algorithms are available in the JDK by default + * while the {@code PS}* variants require an additional JCA Provider (like BouncyCastle).
    • + *
    + *

    + * + *

    Finally, this method will throw an {@link InvalidKeyException} for any key that does not match the + * heuristics and requirements documented above, since that inevitably means the Key is either insufficient or + * explicitly disallowed by the JWT specification.

    + * + * @param key the key to inspect + * @return the recommended signature algorithm to be used with the specified key + * @throws InvalidKeyException for any key that does not match the heuristics and requirements documented above, + * since that inevitably means the Key is either insufficient or explicitly disallowed by the JWT specification. + * @since 0.10.0 + */ + public static SignatureAlgorithm forSigningKey(Key key) throws InvalidKeyException { + + if (key == null) { + throw new InvalidKeyException("Key argument cannot be null."); + } + + if (!(key instanceof SecretKey || + (key instanceof PrivateKey && (key instanceof ECKey || key instanceof RSAKey)))) { + String msg = "JWT standard signing algorithms require either 1) a SecretKey for HMAC-SHA algorithms or " + + "2) a private RSAKey for RSA algorithms or 3) a private ECKey for Elliptic Curve algorithms. " + + "The specified key is of type " + key.getClass().getName(); + throw new InvalidKeyException(msg); + } + + if (key instanceof SecretKey) { + + SecretKey secretKey = (SecretKey)key; + int bitLength = io.jsonwebtoken.lang.Arrays.length(secretKey.getEncoded()) * Byte.SIZE; + + for(SignatureAlgorithm alg : PREFERRED_HMAC_ALGS) { + // ensure compatibility check is based on key length. See https://github.com/jwtk/jjwt/issues/381 + if (bitLength >= alg.minKeyLength) { + return alg; + } + } + + String msg = "The specified SecretKey is not strong enough to be used with JWT HMAC signature " + + "algorithms. The JWT specification requires HMAC keys to be >= 256 bits long. The specified " + + "key is " + bitLength + " bits. See https://tools.ietf.org/html/rfc7518#section-3.2 for more " + + "information."; + throw new WeakKeyException(msg); + } + + if (key instanceof RSAKey) { + + RSAKey rsaKey = (RSAKey) key; + int bitLength = rsaKey.getModulus().bitLength(); + + if (bitLength >= 4096) { + RS512.assertValidSigningKey(key); + return RS512; + } else if (bitLength >= 3072) { + RS384.assertValidSigningKey(key); + return RS384; + } else if (bitLength >= RS256.minKeyLength) { + RS256.assertValidSigningKey(key); + return RS256; + } + + String msg = "The specified RSA signing key is not strong enough to be used with JWT RSA signature " + + "algorithms. The JWT specification requires RSA keys to be >= 2048 bits long. The specified RSA " + + "key is " + bitLength + " bits. See https://tools.ietf.org/html/rfc7518#section-3.3 for more " + + "information."; + throw new WeakKeyException(msg); + } + + // if we've made it this far in the method, the key is an ECKey due to the instanceof assertions at the + // top of the method + + ECKey ecKey = (ECKey) key; + int bitLength = ecKey.getParams().getOrder().bitLength(); + + for (SignatureAlgorithm alg : PREFERRED_EC_ALGS) { + if (bitLength >= alg.minKeyLength) { + alg.assertValidSigningKey(key); + return alg; + } + } + + String msg = "The specified Elliptic Curve signing key is not strong enough to be used with JWT ECDSA " + + "signature algorithms. The JWT specification requires ECDSA keys to be >= 256 bits long. " + + "The specified ECDSA key is " + bitLength + " bits. See " + + "https://tools.ietf.org/html/rfc7518#section-3.4 for more information."; + throw new WeakKeyException(msg); + } + + /** + * Looks up and returns the corresponding {@code SignatureAlgorithm} enum instance based on a + * case-insensitive name comparison. + * + * @param value The case-insensitive name of the {@code SignatureAlgorithm} instance to return + * @return the corresponding {@code SignatureAlgorithm} enum instance based on a + * case-insensitive name comparison. + * @throws SignatureException if the specified value does not match any {@code SignatureAlgorithm} + * name. + */ + public static SignatureAlgorithm forName(String value) throws SignatureException { + for (SignatureAlgorithm alg : values()) { + if (alg.getValue().equalsIgnoreCase(value)) { + return alg; + } + } + + throw new SignatureException("Unsupported signature algorithm '" + value + "'"); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureException.java new file mode 100644 index 000000000000..e98b4c72298a --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SignatureException.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.security.SecurityException; + +/** + * Exception indicating that either calculating a signature or verifying an existing signature of a JWT failed. + * + * @since 0.1 + * @deprecated in favor of {@link io.jsonwebtoken.security.SecurityException}; this class will be removed before 1.0 + */ +@Deprecated +public class SignatureException extends SecurityException { + + public SignatureException(String message) { + super(message); + } + + public SignatureException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolver.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolver.java new file mode 100644 index 000000000000..fbd9887f983f --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolver.java @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import java.security.Key; + +/** + * A {@code SigningKeyResolver} can be used by a {@link io.jsonwebtoken.JwtParser JwtParser} to find a signing key that + * should be used to verify a JWS signature. + * + *

    A {@code SigningKeyResolver} is necessary when the signing key is not already known before parsing the JWT and the + * JWT header or payload (plaintext body or Claims) must be inspected first to determine how to look up the signing key. + * Once returned by the resolver, the JwtParser will then verify the JWS signature with the returned key. For + * example:

    + * + *
    + * Jws<Claims> jws = Jwts.parser().setSigningKeyResolver(new SigningKeyResolverAdapter() {
    + *         @Override
    + *         public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) {
    + *             //inspect the header or claims, lookup and return the signing key
    + *             return getSigningKeyBytes(header, claims); //implement me
    + *         }})
    + *     .parseClaimsJws(compact);
    + * 
    + * + *

    A {@code SigningKeyResolver} is invoked once during parsing before the signature is verified.

    + * + *

    SigningKeyResolverAdapter

    + * + *

    If you only need to resolve a signing key for a particular JWS (either a plaintext or Claims JWS), consider using + * the {@link io.jsonwebtoken.SigningKeyResolverAdapter} and overriding only the method you need to support instead of + * implementing this interface directly.

    + * + * @see io.jsonwebtoken.SigningKeyResolverAdapter + * @since 0.4 + */ +public interface SigningKeyResolver { + + /** + * Returns the signing key that should be used to validate a digital signature for the Claims JWS with the specified + * header and claims. + * + * @param header the header of the JWS to validate + * @param claims the claims (body) of the JWS to validate + * @return the signing key that should be used to validate a digital signature for the Claims JWS with the specified + * header and claims. + */ + Key resolveSigningKey(JwsHeader header, Claims claims); + + /** + * Returns the signing key that should be used to validate a digital signature for the Plaintext JWS with the + * specified header and plaintext payload. + * + * @param header the header of the JWS to validate + * @param plaintext the plaintext body of the JWS to validate + * @return the signing key that should be used to validate a digital signature for the Plaintext JWS with the + * specified header and plaintext payload. + */ + Key resolveSigningKey(JwsHeader header, String plaintext); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolverAdapter.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolverAdapter.java new file mode 100644 index 000000000000..1be7ec55654b --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/SigningKeyResolverAdapter.java @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +import io.jsonwebtoken.lang.Assert; + +import javax.crypto.spec.SecretKeySpec; +import java.security.Key; + +/** + * An Adapter implementation of the + * {@link SigningKeyResolver} interface that allows subclasses to process only the type of JWS body that + * is known/expected for a particular case. + * + *

    The {@link #resolveSigningKey(JwsHeader, Claims)} and {@link #resolveSigningKey(JwsHeader, String)} method + * implementations delegate to the + * {@link #resolveSigningKeyBytes(JwsHeader, Claims)} and {@link #resolveSigningKeyBytes(JwsHeader, String)} methods + * respectively. The latter two methods simply throw exceptions: they represent scenarios expected by + * calling code in known situations, and it is expected that you override the implementation in those known situations; + * non-overridden *KeyBytes methods indicates that the JWS input was unexpected.

    + * + *

    If either {@link #resolveSigningKey(JwsHeader, String)} or {@link #resolveSigningKey(JwsHeader, Claims)} + * are not overridden, one (or both) of the *KeyBytes variants must be overridden depending on your expected + * use case. You do not have to override any method that does not represent an expected condition.

    + * + * @since 0.4 + */ +public class SigningKeyResolverAdapter implements SigningKeyResolver { + + @Override + public Key resolveSigningKey(JwsHeader header, Claims claims) { + SignatureAlgorithm alg = SignatureAlgorithm.forName(header.getAlgorithm()); + Assert.isTrue(alg.isHmac(), "The default resolveSigningKey(JwsHeader, Claims) implementation cannot be " + + "used for asymmetric key algorithms (RSA, Elliptic Curve). " + + "Override the resolveSigningKey(JwsHeader, Claims) method instead and return a " + + "Key instance appropriate for the " + alg.name() + " algorithm."); + byte[] keyBytes = resolveSigningKeyBytes(header, claims); + return new SecretKeySpec(keyBytes, alg.getJcaName()); + } + + @Override + public Key resolveSigningKey(JwsHeader header, String plaintext) { + SignatureAlgorithm alg = SignatureAlgorithm.forName(header.getAlgorithm()); + Assert.isTrue(alg.isHmac(), "The default resolveSigningKey(JwsHeader, String) implementation cannot be " + + "used for asymmetric key algorithms (RSA, Elliptic Curve). " + + "Override the resolveSigningKey(JwsHeader, String) method instead and return a " + + "Key instance appropriate for the " + alg.name() + " algorithm."); + byte[] keyBytes = resolveSigningKeyBytes(header, plaintext); + return new SecretKeySpec(keyBytes, alg.getJcaName()); + } + + /** + * Convenience method invoked by {@link #resolveSigningKey(JwsHeader, Claims)} that obtains the necessary signing + * key bytes. This implementation simply throws an exception: if the JWS parsed is a Claims JWS, you must + * override this method or the {@link #resolveSigningKey(JwsHeader, Claims)} method instead. + * + *

    NOTE: You cannot override this method when validating RSA signatures. If you expect RSA signatures, + * you must override the {@link #resolveSigningKey(JwsHeader, Claims)} method instead.

    + * + * @param header the parsed {@link JwsHeader} + * @param claims the parsed {@link Claims} + * @return the signing key bytes to use to verify the JWS signature. + */ + public byte[] resolveSigningKeyBytes(JwsHeader header, Claims claims) { + throw new UnsupportedJwtException("The specified SigningKeyResolver implementation does not support " + + "Claims JWS signing key resolution. Consider overriding either the " + + "resolveSigningKey(JwsHeader, Claims) method or, for HMAC algorithms, the " + + "resolveSigningKeyBytes(JwsHeader, Claims) method."); + } + + /** + * Convenience method invoked by {@link #resolveSigningKey(JwsHeader, String)} that obtains the necessary signing + * key bytes. This implementation simply throws an exception: if the JWS parsed is a plaintext JWS, you must + * override this method or the {@link #resolveSigningKey(JwsHeader, String)} method instead. + * + * @param header the parsed {@link JwsHeader} + * @param payload the parsed String plaintext payload + * @return the signing key bytes to use to verify the JWS signature. + */ + public byte[] resolveSigningKeyBytes(JwsHeader header, String payload) { + throw new UnsupportedJwtException("The specified SigningKeyResolver implementation does not support " + + "plaintext JWS signing key resolution. Consider overriding either the " + + "resolveSigningKey(JwsHeader, String) method or, for HMAC algorithms, the " + + "resolveSigningKeyBytes(JwsHeader, String) method."); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/UnsupportedJwtException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/UnsupportedJwtException.java new file mode 100644 index 000000000000..3735f7d4257d --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/UnsupportedJwtException.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken; + +/** + * Exception thrown when receiving a JWT in a particular format/configuration that does not match the format expected + * by the application. + * + *

    For example, this exception would be thrown if parsing an unsigned plaintext JWT when the application + * requires a cryptographically signed Claims JWS instead.

    + * + * @since 0.2 + */ +public class UnsupportedJwtException extends JwtException { + + public UnsupportedJwtException(String message) { + super(message); + } + + public UnsupportedJwtException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/DefaultJwtParser.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/DefaultJwtParser.java new file mode 100644 index 000000000000..4eef6741d477 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/DefaultJwtParser.java @@ -0,0 +1,211 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.impl; + +import io.jsonwebtoken.ClaimJwtException; +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Clock; +import io.jsonwebtoken.CompressionCodec; +import io.jsonwebtoken.CompressionCodecResolver; +import io.jsonwebtoken.ExpiredJwtException; +import io.jsonwebtoken.Header; +import io.jsonwebtoken.IncorrectClaimException; +import io.jsonwebtoken.InvalidClaimException; +import io.jsonwebtoken.Jws; +import io.jsonwebtoken.JwsHeader; +import io.jsonwebtoken.Jwt; +import io.jsonwebtoken.JwtHandler; +import io.jsonwebtoken.JwtHandlerAdapter; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.MalformedJwtException; +import io.jsonwebtoken.MissingClaimException; +import io.jsonwebtoken.PrematureJwtException; +import io.jsonwebtoken.SignatureAlgorithm; +import io.jsonwebtoken.SigningKeyResolver; +import io.jsonwebtoken.impl.crypto.JwtSignatureValidator; +import io.jsonwebtoken.UnsupportedJwtException; +import io.jsonwebtoken.io.Decoder; +import io.jsonwebtoken.io.Decoders; +import io.jsonwebtoken.io.DeserializationException; +import io.jsonwebtoken.io.Deserializer; +import io.jsonwebtoken.lang.Assert; +import io.jsonwebtoken.lang.DateFormats; +import io.jsonwebtoken.lang.Objects; +import io.jsonwebtoken.lang.Strings; +import io.jsonwebtoken.security.InvalidKeyException; +import io.jsonwebtoken.security.SignatureException; +import io.jsonwebtoken.security.WeakKeyException; + +import javax.crypto.spec.SecretKeySpec; +import java.security.Key; +import java.util.Date; +import java.util.Map; + +@SuppressWarnings("unchecked") +public class DefaultJwtParser implements JwtParser { + @Deprecated + public DefaultJwtParser() { + } + + DefaultJwtParser(SigningKeyResolver signingKeyResolver, Key key, byte[] keyBytes, Clock clock, + long allowedClockSkewMillis, Claims expectedClaims, Decoder base64UrlDecoder, + Deserializer> deserializer, CompressionCodecResolver compressionCodecResolver) { + } + + @Override + public JwtParser deserializeJsonWith(Deserializer> deserializer) { + return null; + } + + @Override + public JwtParser base64UrlDecodeWith(Decoder base64UrlDecoder) { + return null; + } + + @Override + public JwtParser requireIssuedAt(Date issuedAt) { + return null; + } + + @Override + public JwtParser requireIssuer(String issuer) { + return null; + } + + @Override + public JwtParser requireAudience(String audience) { + return null; + } + + @Override + public JwtParser requireSubject(String subject) { + return null; + } + + @Override + public JwtParser requireId(String id) { + return null; + } + + @Override + public JwtParser requireExpiration(Date expiration) { + return null; + } + + @Override + public JwtParser requireNotBefore(Date notBefore) { + return null; + } + + @Override + public JwtParser require(String claimName, Object value) { + return null; + } + + @Override + public JwtParser setClock(Clock clock) { + return null; + } + + @Override + public JwtParser setAllowedClockSkewSeconds(long seconds) throws IllegalArgumentException { + return null; + } + + @Override + public JwtParser setSigningKey(byte[] key) { + return null; + } + + @Override + public JwtParser setSigningKey(String base64EncodedSecretKey) { + return null; + } + + @Override + public JwtParser setSigningKey(Key key) { + return null; + } + + @Override + public JwtParser setSigningKeyResolver(SigningKeyResolver signingKeyResolver) { + return null; + } + + @Override + public JwtParser setCompressionCodecResolver(CompressionCodecResolver compressionCodecResolver) { + return null; + } + + @Override + public boolean isSigned(String jwt) { + return false; + } + + @Override + public Jwt parse(String jwt) throws ExpiredJwtException, MalformedJwtException, SignatureException { + return null; + } + + /** + * @since 0.10.0 + */ + private static Object normalize(Object o) { + return null; + } + + private void validateExpectedClaims(Header header, Claims claims) { + return; + } + + /* + * @since 0.5 mostly to allow testing overrides + */ + protected JwtSignatureValidator createSignatureValidator(SignatureAlgorithm alg, Key key) { + return null; + } + + @Override + public T parse(String compact, JwtHandler handler) + throws ExpiredJwtException, MalformedJwtException, SignatureException { + return null; + } + + @Override + public Jwt parsePlaintextJwt(String plaintextJwt) { + return null; + } + + @Override + public Jwt parseClaimsJwt(String claimsJwt) { + return null; + } + + @Override + public Jws parsePlaintextJws(String plaintextJws) { + return null; + } + + @Override + public Jws parseClaimsJws(String claimsJws) { + return null; + } + + @SuppressWarnings("unchecked") + protected Map readValue(String val) { + return null; + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/crypto/JwtSignatureValidator.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/crypto/JwtSignatureValidator.java new file mode 100644 index 000000000000..a7175070bfef --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/impl/crypto/JwtSignatureValidator.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.impl.crypto; + +public interface JwtSignatureValidator { + + boolean isValid(String jwtWithoutSignature, String base64UrlEncodedSignature); +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64.java new file mode 100644 index 000000000000..201e3c543e25 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64.java @@ -0,0 +1,680 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import java.util.Arrays; + +/** + * A very fast and memory efficient class to encode and decode to and from BASE64 or BASE64URL in full accordance + * with RFC 4648. + * + *

    Based initially on MigBase64 with continued modifications for Base64 URL support and JDK-standard code formatting.

    + * + *

    This encode/decode algorithm doesn't create any temporary arrays as many other codecs do, it only + * allocates the resulting array. This produces less garbage and it is possible to handle arrays twice + * as large as algorithms that create a temporary array.

    + * + *

    There is also a "fast" version of all decode methods that works the same way as the normal ones, but + * has a few demands on the decoded input. Normally though, these fast versions should be used if the source if + * the input is known and it hasn't bee tampered with.

    + * + * @author Mikael Grev + * @author Les Hazlewood + * @since 0.10.0 + */ +@SuppressWarnings("Duplicates") +final class Base64 { //final and package-protected on purpose + + private static final char[] BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray(); + private static final char[] BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".toCharArray(); + private static final int[] BASE64_IALPHABET = new int[256]; + private static final int[] BASE64URL_IALPHABET = new int[256]; + private static final int IALPHABET_MAX_INDEX = BASE64_IALPHABET.length - 1; + + static { + Arrays.fill(BASE64_IALPHABET, -1); + System.arraycopy(BASE64_IALPHABET, 0, BASE64URL_IALPHABET, 0, BASE64_IALPHABET.length); + for (int i = 0, iS = BASE64_ALPHABET.length; i < iS; i++) { + BASE64_IALPHABET[BASE64_ALPHABET[i]] = i; + BASE64URL_IALPHABET[BASE64URL_ALPHABET[i]] = i; + } + BASE64_IALPHABET['='] = 0; + BASE64URL_IALPHABET['='] = 0; + } + + static final Base64 DEFAULT = new Base64(false); + static final Base64 URL_SAFE = new Base64(true); + + private final boolean urlsafe; + private final char[] ALPHABET; + private final int[] IALPHABET; + + private Base64(boolean urlsafe) { + this.urlsafe = urlsafe; + this.ALPHABET = urlsafe ? BASE64URL_ALPHABET : BASE64_ALPHABET; + this.IALPHABET = urlsafe ? BASE64URL_IALPHABET : BASE64_IALPHABET; + } + + // **************************************************************************************** + // * char[] version + // **************************************************************************************** + + private String getName() { + return urlsafe ? "base64url" : "base64"; // RFC 4648 codec names are all lowercase + } + + /** + * Encodes a raw byte array into a BASE64 char[] representation in accordance with RFC 2045. + * + * @param sArr The bytes to convert. If null or length 0 an empty array will be returned. + * @param lineSep Optional "\r\n" after 76 characters, unless end of file.
    + * No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a + * little faster. + * @return A BASE64 encoded array. Never null. + */ + private char[] encodeToChar(byte[] sArr, boolean lineSep) { + + // Check special case + int sLen = sArr != null ? sArr.length : 0; + if (sLen == 0) { + return new char[0]; + } + + int eLen = (sLen / 3) * 3; // # of bytes that can encode evenly into 24-bit chunks + int left = sLen - eLen; // # of bytes that remain after 24-bit chunking. Always 0, 1 or 2 + + int cCnt = (((sLen - 1) / 3 + 1) << 2); // # of base64-encoded characters including padding + int dLen = cCnt + (lineSep ? (cCnt - 1) / 76 << 1 : 0); // Length of returned char array with padding and any line separators + + int padCount = 0; + if (left == 2) { + padCount = 1; + } else if (left == 1) { + padCount = 2; + } + + char[] dArr = new char[urlsafe ? (dLen - padCount) : dLen]; + + // Encode even 24-bits + for (int s = 0, d = 0, cc = 0; s < eLen; ) { + + // Copy next three bytes into lower 24 bits of int, paying attension to sign. + int i = (sArr[s++] & 0xff) << 16 | (sArr[s++] & 0xff) << 8 | (sArr[s++] & 0xff); + + // Encode the int into four chars + dArr[d++] = ALPHABET[(i >>> 18) & 0x3f]; + dArr[d++] = ALPHABET[(i >>> 12) & 0x3f]; + dArr[d++] = ALPHABET[(i >>> 6) & 0x3f]; + dArr[d++] = ALPHABET[i & 0x3f]; + + // Add optional line separator + if (lineSep && ++cc == 19 && d < dLen - 2) { + dArr[d++] = '\r'; + dArr[d++] = '\n'; + cc = 0; + } + } + + // Pad and encode last bits if source isn't even 24 bits. + if (left > 0) { + // Prepare the int + int i = ((sArr[eLen] & 0xff) << 10) | (left == 2 ? ((sArr[sLen - 1] & 0xff) << 2) : 0); + + // Set last four chars + dArr[dLen - 4] = ALPHABET[i >> 12]; + dArr[dLen - 3] = ALPHABET[(i >>> 6) & 0x3f]; + //dArr[dLen - 2] = left == 2 ? ALPHABET[i & 0x3f] : '='; + //dArr[dLen - 1] = '='; + if (left == 2) { + dArr[dLen - 2] = ALPHABET[i & 0x3f]; + } else if (!urlsafe) { // if not urlsafe, we need to include the padding characters + dArr[dLen - 2] = '='; + } + if (!urlsafe) { // include padding + dArr[dLen - 1] = '='; + } + } + return dArr; + } + + /* + * Decodes a BASE64 encoded char array. All illegal characters will be ignored and can handle both arrays with + * and without line separators. + * + * @param sArr The source array. null or length 0 will return an empty array. + * @return The decoded array of bytes. May be of length 0. Will be null if the legal characters + * (including '=') isn't divideable by 4. (I.e. definitely corrupted). + * + public final byte[] decode(char[] sArr) { + // Check special case + int sLen = sArr != null ? sArr.length : 0; + if (sLen == 0) { + return new byte[0]; + } + + // Count illegal characters (including '\r', '\n') to know what size the returned array will be, + // so we don't have to reallocate & copy it later. + int sepCnt = 0; // Number of separator characters. (Actually illegal characters, but that's a bonus...) + for (int i = 0; i < sLen; i++) { // If input is "pure" (I.e. no line separators or illegal chars) base64 this loop can be commented out. + if (IALPHABET[sArr[i]] < 0) { + sepCnt++; + } + } + + // Check so that legal chars (including '=') are evenly divideable by 4 as specified in RFC 2045. + if ((sLen - sepCnt) % 4 != 0) { + return null; + } + + int pad = 0; + for (int i = sLen; i > 1 && IALPHABET[sArr[--i]] <= 0; ) { + if (sArr[i] == '=') { + pad++; + } + } + + int len = ((sLen - sepCnt) * 6 >> 3) - pad; + + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + for (int s = 0, d = 0; d < len; ) { + // Assemble three bytes into an int from four "valid" characters. + int i = 0; + for (int j = 0; j < 4; j++) { // j only increased if a valid char was found. + int c = IALPHABET[sArr[s++]]; + if (c >= 0) { + i |= c << (18 - j * 6); + } else { + j--; + } + } + // Add the bytes + dArr[d++] = (byte) (i >> 16); + if (d < len) { + dArr[d++] = (byte) (i >> 8); + if (d < len) { + dArr[d++] = (byte) i; + } + } + } + return dArr; + } + */ + + private int ctoi(char c) { + int i = c > IALPHABET_MAX_INDEX ? -1 : IALPHABET[c]; + if (i < 0) { + String msg = "Illegal " + getName() + " character: '" + c + "'"; + throw new DecodingException(msg); + } + return i; + } + + /** + * Decodes a BASE64 encoded char array that is known to be reasonably well formatted. The preconditions are:
    + * + The array must have a line length of 76 chars OR no line separators at all (one line).
    + * + Line separator must be "\r\n", as specified in RFC 2045 + * + The array must not contain illegal characters within the encoded string
    + * + The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
    + * + * @param sArr The source array. Length 0 will return an empty array. null will throw an exception. + * @return The decoded array of bytes. May be of length 0. + * @throws DecodingException on illegal input + */ + final byte[] decodeFast(char[] sArr) throws DecodingException { + + // Check special case + int sLen = sArr != null ? sArr.length : 0; + if (sLen == 0) { + return new byte[0]; + } + + int sIx = 0, eIx = sLen - 1; // Start and end index after trimming. + + // Trim illegal chars from start + while (sIx < eIx && IALPHABET[sArr[sIx]] < 0) { + sIx++; + } + + // Trim illegal chars from end + while (eIx > 0 && IALPHABET[sArr[eIx]] < 0) { + eIx--; + } + + // get the padding count (=) (0, 1 or 2) + int pad = sArr[eIx] == '=' ? (sArr[eIx - 1] == '=' ? 2 : 1) : 0; // Count '=' at end. + int cCnt = eIx - sIx + 1; // Content count including possible separators + int sepCnt = sLen > 76 ? (sArr[76] == '\r' ? cCnt / 78 : 0) << 1 : 0; + + int len = ((cCnt - sepCnt) * 6 >> 3) - pad; // The number of decoded bytes + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + // Decode all but the last 0 - 2 bytes. + int d = 0; + for (int cc = 0, eLen = (len / 3) * 3; d < eLen; ) { + + // Assemble three bytes into an int from four "valid" characters. + int i = ctoi(sArr[sIx++]) << 18 | ctoi(sArr[sIx++]) << 12 | ctoi(sArr[sIx++]) << 6 | ctoi(sArr[sIx++]); + + // Add the bytes + dArr[d++] = (byte) (i >> 16); + dArr[d++] = (byte) (i >> 8); + dArr[d++] = (byte) i; + + // If line separator, jump over it. + if (sepCnt > 0 && ++cc == 19) { + sIx += 2; + cc = 0; + } + } + + if (d < len) { + // Decode last 1-3 bytes (incl '=') into 1-3 bytes + int i = 0; + for (int j = 0; sIx <= eIx - pad; j++) { + i |= ctoi(sArr[sIx++]) << (18 - j * 6); + } + + for (int r = 16; d < len; r -= 8) { + dArr[d++] = (byte) (i >> r); + } + } + + return dArr; + } + + // **************************************************************************************** + // * byte[] version + // **************************************************************************************** + + /* + * Encodes a raw byte array into a BASE64 byte[] representation i accordance with RFC 2045. + * + * @param sArr The bytes to convert. If null or length 0 an empty array will be returned. + * @param lineSep Optional "\r\n" after 76 characters, unless end of file.
    + * No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a + * little faster. + * @return A BASE64 encoded array. Never null. + * + public final byte[] encodeToByte(byte[] sArr, boolean lineSep) { + return encodeToByte(sArr, 0, sArr != null ? sArr.length : 0, lineSep); + } + + /** + * Encodes a raw byte array into a BASE64 byte[] representation i accordance with RFC 2045. + * + * @param sArr The bytes to convert. If null an empty array will be returned. + * @param sOff The starting position in the bytes to convert. + * @param sLen The number of bytes to convert. If 0 an empty array will be returned. + * @param lineSep Optional "\r\n" after 76 characters, unless end of file.
    + * No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a + * little faster. + * @return A BASE64 encoded array. Never null. + * + public final byte[] encodeToByte(byte[] sArr, int sOff, int sLen, boolean lineSep) { + + // Check special case + if (sArr == null || sLen == 0) { + return new byte[0]; + } + + int eLen = (sLen / 3) * 3; // Length of even 24-bits. + int cCnt = ((sLen - 1) / 3 + 1) << 2; // Returned character count + int dLen = cCnt + (lineSep ? (cCnt - 1) / 76 << 1 : 0); // Length of returned array + byte[] dArr = new byte[dLen]; + + // Encode even 24-bits + for (int s = sOff, d = 0, cc = 0; s < sOff + eLen; ) { + + // Copy next three bytes into lower 24 bits of int, paying attension to sign. + int i = (sArr[s++] & 0xff) << 16 | (sArr[s++] & 0xff) << 8 | (sArr[s++] & 0xff); + + // Encode the int into four chars + dArr[d++] = (byte) ALPHABET[(i >>> 18) & 0x3f]; + dArr[d++] = (byte) ALPHABET[(i >>> 12) & 0x3f]; + dArr[d++] = (byte) ALPHABET[(i >>> 6) & 0x3f]; + dArr[d++] = (byte) ALPHABET[i & 0x3f]; + + // Add optional line separator + if (lineSep && ++cc == 19 && d < dLen - 2) { + dArr[d++] = '\r'; + dArr[d++] = '\n'; + cc = 0; + } + } + + // Pad and encode last bits if source isn't an even 24 bits. + int left = sLen - eLen; // 0 - 2. + if (left > 0) { + // Prepare the int + int i = ((sArr[sOff + eLen] & 0xff) << 10) | (left == 2 ? ((sArr[sOff + sLen - 1] & 0xff) << 2) : 0); + + // Set last four chars + dArr[dLen - 4] = (byte) ALPHABET[i >> 12]; + dArr[dLen - 3] = (byte) ALPHABET[(i >>> 6) & 0x3f]; + dArr[dLen - 2] = left == 2 ? (byte) ALPHABET[i & 0x3f] : (byte) '='; + dArr[dLen - 1] = '='; + } + return dArr; + } + + /** + * Decodes a BASE64 encoded byte array. All illegal characters will be ignored and can handle both arrays with + * and without line separators. + * + * @param sArr The source array. Length 0 will return an empty array. null will throw an exception. + * @return The decoded array of bytes. May be of length 0. Will be null if the legal characters + * (including '=') isn't divideable by 4. (I.e. definitely corrupted). + * + public final byte[] decode(byte[] sArr) { + return decode(sArr, 0, sArr.length); + } + + /** + * Decodes a BASE64 encoded byte array. All illegal characters will be ignored and can handle both arrays with + * and without line separators. + * + * @param sArr The source array. null will throw an exception. + * @param sOff The starting position in the source array. + * @param sLen The number of bytes to decode from the source array. Length 0 will return an empty array. + * @return The decoded array of bytes. May be of length 0. Will be null if the legal characters + * (including '=') isn't divideable by 4. (I.e. definitely corrupted). + * + public final byte[] decode(byte[] sArr, int sOff, int sLen) { + + // Count illegal characters (including '\r', '\n') to know what size the returned array will be, + // so we don't have to reallocate & copy it later. + int sepCnt = 0; // Number of separator characters. (Actually illegal characters, but that's a bonus...) + for (int i = 0; i < sLen; i++) { // If input is "pure" (I.e. no line separators or illegal chars) base64 this loop can be commented out. + if (IALPHABET[sArr[sOff + i] & 0xff] < 0) { + sepCnt++; + } + } + + // Check so that legal chars (including '=') are evenly divideable by 4 as specified in RFC 2045. + if ((sLen - sepCnt) % 4 != 0) { + return null; + } + + int pad = 0; + for (int i = sLen; i > 1 && IALPHABET[sArr[sOff + --i] & 0xff] <= 0; ) { + if (sArr[sOff + i] == '=') { + pad++; + } + } + + int len = ((sLen - sepCnt) * 6 >> 3) - pad; + + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + for (int s = 0, d = 0; d < len; ) { + // Assemble three bytes into an int from four "valid" characters. + int i = 0; + for (int j = 0; j < 4; j++) { // j only increased if a valid char was found. + int c = IALPHABET[sArr[sOff + s++] & 0xff]; + if (c >= 0) { + i |= c << (18 - j * 6); + } else { + j--; + } + } + + // Add the bytes + dArr[d++] = (byte) (i >> 16); + if (d < len) { + dArr[d++] = (byte) (i >> 8); + if (d < len) { + dArr[d++] = (byte) i; + } + } + } + + return dArr; + } + + + /* + * Decodes a BASE64 encoded byte array that is known to be resonably well formatted. The method is about twice as + * fast as {@link #decode(byte[])}. The preconditions are:
    + * + The array must have a line length of 76 chars OR no line separators at all (one line).
    + * + Line separator must be "\r\n", as specified in RFC 2045 + * + The array must not contain illegal characters within the encoded string
    + * + The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
    + * + * @param sArr The source array. Length 0 will return an empty array. null will throw an exception. + * @return The decoded array of bytes. May be of length 0. + * + public final byte[] decodeFast(byte[] sArr) { + + // Check special case + int sLen = sArr.length; + if (sLen == 0) { + return new byte[0]; + } + + int sIx = 0, eIx = sLen - 1; // Start and end index after trimming. + + // Trim illegal chars from start + while (sIx < eIx && IALPHABET[sArr[sIx] & 0xff] < 0) { + sIx++; + } + + // Trim illegal chars from end + while (eIx > 0 && IALPHABET[sArr[eIx] & 0xff] < 0) { + eIx--; + } + + // get the padding count (=) (0, 1 or 2) + int pad = sArr[eIx] == '=' ? (sArr[eIx - 1] == '=' ? 2 : 1) : 0; // Count '=' at end. + int cCnt = eIx - sIx + 1; // Content count including possible separators + int sepCnt = sLen > 76 ? (sArr[76] == '\r' ? cCnt / 78 : 0) << 1 : 0; + + int len = ((cCnt - sepCnt) * 6 >> 3) - pad; // The number of decoded bytes + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + // Decode all but the last 0 - 2 bytes. + int d = 0; + for (int cc = 0, eLen = (len / 3) * 3; d < eLen; ) { + + // Assemble three bytes into an int from four "valid" characters. + int i = IALPHABET[sArr[sIx++]] << 18 | IALPHABET[sArr[sIx++]] << 12 | IALPHABET[sArr[sIx++]] << 6 | IALPHABET[sArr[sIx++]]; + + // Add the bytes + dArr[d++] = (byte) (i >> 16); + dArr[d++] = (byte) (i >> 8); + dArr[d++] = (byte) i; + + // If line separator, jump over it. + if (sepCnt > 0 && ++cc == 19) { + sIx += 2; + cc = 0; + } + } + + if (d < len) { + // Decode last 1-3 bytes (incl '=') into 1-3 bytes + int i = 0; + for (int j = 0; sIx <= eIx - pad; j++) { + i |= IALPHABET[sArr[sIx++]] << (18 - j * 6); + } + + for (int r = 16; d < len; r -= 8) { + dArr[d++] = (byte) (i >> r); + } + } + + return dArr; + } + */ + + // **************************************************************************************** + // * String version + // **************************************************************************************** + + /** + * Encodes a raw byte array into a BASE64 String representation i accordance with RFC 2045. + * + * @param sArr The bytes to convert. If null or length 0 an empty array will be returned. + * @param lineSep Optional "\r\n" after 76 characters, unless end of file.
    + * No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a + * little faster. + * @return A BASE64 encoded array. Never null. + */ + final String encodeToString(byte[] sArr, boolean lineSep) { + // Reuse char[] since we can't create a String incrementally anyway and StringBuffer/Builder would be slower. + return new String(encodeToChar(sArr, lineSep)); + } + + /* + * Decodes a BASE64 encoded String. All illegal characters will be ignored and can handle both strings with + * and without line separators.
    + * Note! It can be up to about 2x the speed to call decode(str.toCharArray()) instead. That + * will create a temporary array though. This version will use str.charAt(i) to iterate the string. + * + * @param str The source string. null or length 0 will return an empty array. + * @return The decoded array of bytes. May be of length 0. Will be null if the legal characters + * (including '=') isn't divideable by 4. (I.e. definitely corrupted). + * + public final byte[] decode(String str) { + + // Check special case + int sLen = str != null ? str.length() : 0; + if (sLen == 0) { + return new byte[0]; + } + + // Count illegal characters (including '\r', '\n') to know what size the returned array will be, + // so we don't have to reallocate & copy it later. + int sepCnt = 0; // Number of separator characters. (Actually illegal characters, but that's a bonus...) + for (int i = 0; i < sLen; i++) { // If input is "pure" (I.e. no line separators or illegal chars) base64 this loop can be commented out. + if (IALPHABET[str.charAt(i)] < 0) { + sepCnt++; + } + } + + // Check so that legal chars (including '=') are evenly divideable by 4 as specified in RFC 2045. + if ((sLen - sepCnt) % 4 != 0) { + return null; + } + + // Count '=' at end + int pad = 0; + for (int i = sLen; i > 1 && IALPHABET[str.charAt(--i)] <= 0; ) { + if (str.charAt(i) == '=') { + pad++; + } + } + + int len = ((sLen - sepCnt) * 6 >> 3) - pad; + + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + for (int s = 0, d = 0; d < len; ) { + // Assemble three bytes into an int from four "valid" characters. + int i = 0; + for (int j = 0; j < 4; j++) { // j only increased if a valid char was found. + int c = IALPHABET[str.charAt(s++)]; + if (c >= 0) { + i |= c << (18 - j * 6); + } else { + j--; + } + } + // Add the bytes + dArr[d++] = (byte) (i >> 16); + if (d < len) { + dArr[d++] = (byte) (i >> 8); + if (d < len) { + dArr[d++] = (byte) i; + } + } + } + return dArr; + } + + /** + * Decodes a BASE64 encoded string that is known to be resonably well formatted. The method is about twice as + * fast as {@link #decode(String)}. The preconditions are:
    + * + The array must have a line length of 76 chars OR no line separators at all (one line).
    + * + Line separator must be "\r\n", as specified in RFC 2045 + * + The array must not contain illegal characters within the encoded string
    + * + The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
    + * + * @param s The source string. Length 0 will return an empty array. null will throw an exception. + * @return The decoded array of bytes. May be of length 0. + * + public final byte[] decodeFast(String s) { + + // Check special case + int sLen = s.length(); + if (sLen == 0) { + return new byte[0]; + } + + int sIx = 0, eIx = sLen - 1; // Start and end index after trimming. + + // Trim illegal chars from start + while (sIx < eIx && IALPHABET[s.charAt(sIx) & 0xff] < 0) { + sIx++; + } + + // Trim illegal chars from end + while (eIx > 0 && IALPHABET[s.charAt(eIx) & 0xff] < 0) { + eIx--; + } + + // get the padding count (=) (0, 1 or 2) + int pad = s.charAt(eIx) == '=' ? (s.charAt(eIx - 1) == '=' ? 2 : 1) : 0; // Count '=' at end. + int cCnt = eIx - sIx + 1; // Content count including possible separators + int sepCnt = sLen > 76 ? (s.charAt(76) == '\r' ? cCnt / 78 : 0) << 1 : 0; + + int len = ((cCnt - sepCnt) * 6 >> 3) - pad; // The number of decoded bytes + byte[] dArr = new byte[len]; // Preallocate byte[] of exact length + + // Decode all but the last 0 - 2 bytes. + int d = 0; + for (int cc = 0, eLen = (len / 3) * 3; d < eLen; ) { + // Assemble three bytes into an int from four "valid" characters. + int i = IALPHABET[s.charAt(sIx++)] << 18 | IALPHABET[s.charAt(sIx++)] << 12 | IALPHABET[s.charAt(sIx++)] << 6 | IALPHABET[s.charAt(sIx++)]; + + // Add the bytes + dArr[d++] = (byte) (i >> 16); + dArr[d++] = (byte) (i >> 8); + dArr[d++] = (byte) i; + + // If line separator, jump over it. + if (sepCnt > 0 && ++cc == 19) { + sIx += 2; + cc = 0; + } + } + + if (d < len) { + // Decode last 1-3 bytes (incl '=') into 1-3 bytes + int i = 0; + for (int j = 0; sIx <= eIx - pad; j++) { + i |= IALPHABET[s.charAt(sIx++)] << (18 - j * 6); + } + + for (int r = 16; d < len; r -= 8) { + dArr[d++] = (byte) (i >> r); + } + } + + return dArr; + } + */ +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Decoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Decoder.java new file mode 100644 index 000000000000..3c8bc817daaf --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Decoder.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.lang.Assert; + +/** + * @since 0.10.0 + */ +class Base64Decoder extends Base64Support implements Decoder { + + Base64Decoder() { + super(Base64.DEFAULT); + } + + Base64Decoder(Base64 base64) { + super(base64); + } + + @Override + public byte[] decode(String s) throws DecodingException { + Assert.notNull(s, "String argument cannot be null"); + return this.base64.decodeFast(s.toCharArray()); + } +} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Encoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Encoder.java new file mode 100644 index 000000000000..963d8810c7bc --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Encoder.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.lang.Assert; + +/** + * @since 0.10.0 + */ +class Base64Encoder extends Base64Support implements Encoder { + + Base64Encoder() { + super(Base64.DEFAULT); + } + + Base64Encoder(Base64 base64) { + super(base64); + } + + @Override + public String encode(byte[] bytes) throws EncodingException { + Assert.notNull(bytes, "byte array argument cannot be null"); + return this.base64.encodeToString(bytes, false); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Support.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Support.java new file mode 100644 index 000000000000..eed404d5834f --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64Support.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.lang.Assert; + +/** + * @since 0.10.0 + */ +class Base64Support { + + protected final Base64 base64; + + Base64Support(Base64 base64) { + Assert.notNull(base64, "Base64 argument cannot be null"); + this.base64 = base64; + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlDecoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlDecoder.java new file mode 100644 index 000000000000..0d26d948fad9 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlDecoder.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +class Base64UrlDecoder extends Base64Decoder { + + Base64UrlDecoder() { + super(Base64.URL_SAFE); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlEncoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlEncoder.java new file mode 100644 index 000000000000..86781922259f --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Base64UrlEncoder.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +class Base64UrlEncoder extends Base64Encoder { + + Base64UrlEncoder() { + super(Base64.URL_SAFE); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/CodecException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/CodecException.java new file mode 100644 index 000000000000..5b449bd97e01 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/CodecException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class CodecException extends IOException { + + public CodecException(String message) { + super(message); + } + + public CodecException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoder.java new file mode 100644 index 000000000000..f9f2c1890732 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoder.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public interface Decoder { + + R decode(T t) throws DecodingException; +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoders.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoders.java new file mode 100644 index 000000000000..3e95c28d754d --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Decoders.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public final class Decoders { + + public static final Decoder BASE64 = new ExceptionPropagatingDecoder<>(new Base64Decoder()); + public static final Decoder BASE64URL = new ExceptionPropagatingDecoder<>(new Base64UrlDecoder()); + + private Decoders() { //prevent instantiation + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DecodingException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DecodingException.java new file mode 100644 index 000000000000..0bbe62a160e6 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DecodingException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class DecodingException extends CodecException { + + public DecodingException(String message) { + super(message); + } + + public DecodingException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DeserializationException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DeserializationException.java new file mode 100644 index 000000000000..59559666a47d --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/DeserializationException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class DeserializationException extends SerialException { + + public DeserializationException(String msg) { + super(msg); + } + + public DeserializationException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Deserializer.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Deserializer.java new file mode 100644 index 000000000000..f66a73edb917 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Deserializer.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public interface Deserializer { + + T deserialize(byte[] bytes) throws DeserializationException; +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoder.java new file mode 100644 index 000000000000..6b28f31ec824 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoder.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public interface Encoder { + + R encode(T t) throws EncodingException; +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoders.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoders.java new file mode 100644 index 000000000000..3b7c060f617a --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Encoders.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public final class Encoders { + + public static final Encoder BASE64 = new ExceptionPropagatingEncoder<>(new Base64Encoder()); + public static final Encoder BASE64URL = new ExceptionPropagatingEncoder<>(new Base64UrlEncoder()); + + private Encoders() { //prevent instantiation + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/EncodingException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/EncodingException.java new file mode 100644 index 000000000000..5b65389a1ffa --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/EncodingException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class EncodingException extends CodecException { + + public EncodingException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingDecoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingDecoder.java new file mode 100644 index 000000000000..a0d98134cecc --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingDecoder.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.lang.Assert; + +/** + * @since 0.10.0 + */ +class ExceptionPropagatingDecoder implements Decoder { + + private final Decoder decoder; + + ExceptionPropagatingDecoder(Decoder decoder) { + Assert.notNull(decoder, "Decoder cannot be null."); + this.decoder = decoder; + } + + @Override + public R decode(T t) throws DecodingException { + Assert.notNull(t, "Decode argument cannot be null."); + try { + return decoder.decode(t); + } catch (DecodingException e) { + throw e; //propagate + } catch (Exception e) { + String msg = "Unable to decode input: " + e.getMessage(); + throw new DecodingException(msg, e); + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingEncoder.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingEncoder.java new file mode 100644 index 000000000000..c483c8cdd5de --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/ExceptionPropagatingEncoder.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.lang.Assert; + +/** + * @since 0.10.0 + */ +class ExceptionPropagatingEncoder implements Encoder { + + private final Encoder encoder; + + ExceptionPropagatingEncoder(Encoder encoder) { + Assert.notNull(encoder, "Encoder cannot be null."); + this.encoder = encoder; + } + + @Override + public R encode(T t) throws EncodingException { + Assert.notNull(t, "Encode argument cannot be null."); + try { + return this.encoder.encode(t); + } catch (EncodingException e) { + throw e; //propagate + } catch (Exception e) { + String msg = "Unable to encode input: " + e.getMessage(); + throw new EncodingException(msg, e); + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/IOException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/IOException.java new file mode 100644 index 000000000000..9ed1e03149c2 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/IOException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +import io.jsonwebtoken.JwtException; + +/** + * @since 0.10.0 + */ +public class IOException extends JwtException { + + public IOException(String msg) { + super(msg); + } + + public IOException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerialException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerialException.java new file mode 100644 index 000000000000..86f70920c8c1 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerialException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class SerialException extends IOException { + + public SerialException(String msg) { + super(msg); + } + + public SerialException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerializationException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerializationException.java new file mode 100644 index 000000000000..514830deffb4 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/SerializationException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public class SerializationException extends SerialException { + + public SerializationException(String msg) { + super(msg); + } + + public SerializationException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Serializer.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Serializer.java new file mode 100644 index 000000000000..5d6cd794ab81 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/io/Serializer.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.io; + +/** + * @since 0.10.0 + */ +public interface Serializer { + + byte[] serialize(T t) throws SerializationException; + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Arrays.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Arrays.java new file mode 100644 index 000000000000..6b58a376e88b --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Arrays.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +/** + * @since 0.6 + */ +public final class Arrays { + + private Arrays(){} //prevent instantiation + + public static int length(byte[] bytes) { + return bytes != null ? bytes.length : 0; + } + + public static byte[] clean(byte[] bytes) { + return length(bytes) > 0 ? bytes : null; + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Assert.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Assert.java new file mode 100644 index 000000000000..7c9e7c367668 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Assert.java @@ -0,0 +1,377 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.util.Collection; +import java.util.Map; + +public final class Assert { + + private Assert(){} //prevent instantiation + + /** + * Assert a boolean expression, throwing IllegalArgumentException + * if the test result is false. + *
    Assert.isTrue(i > 0, "The value must be greater than zero");
    + * @param expression a boolean expression + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if expression is false + */ + public static void isTrue(boolean expression, String message) { + if (!expression) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert a boolean expression, throwing IllegalArgumentException + * if the test result is false. + *
    Assert.isTrue(i > 0);
    + * @param expression a boolean expression + * @throws IllegalArgumentException if expression is false + */ + public static void isTrue(boolean expression) { + isTrue(expression, "[Assertion failed] - this expression must be true"); + } + + /** + * Assert that an object is null . + *
    Assert.isNull(value, "The value must be null");
    + * @param object the object to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the object is not null + */ + public static void isNull(Object object, String message) { + if (object != null) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that an object is null . + *
    Assert.isNull(value);
    + * @param object the object to check + * @throws IllegalArgumentException if the object is not null + */ + public static void isNull(Object object) { + isNull(object, "[Assertion failed] - the object argument must be null"); + } + + /** + * Assert that an object is not null . + *
    Assert.notNull(clazz, "The class must not be null");
    + * @param object the object to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the object is null + */ + public static void notNull(Object object, String message) { + if (object == null) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that an object is not null . + *
    Assert.notNull(clazz);
    + * @param object the object to check + * @throws IllegalArgumentException if the object is null + */ + public static void notNull(Object object) { + notNull(object, "[Assertion failed] - this argument is required; it must not be null"); + } + + /** + * Assert that the given String is not empty; that is, + * it must not be null and not the empty String. + *
    Assert.hasLength(name, "Name must not be empty");
    + * @param text the String to check + * @param message the exception message to use if the assertion fails + * @see Strings#hasLength + */ + public static void hasLength(String text, String message) { + if (!Strings.hasLength(text)) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that the given String is not empty; that is, + * it must not be null and not the empty String. + *
    Assert.hasLength(name);
    + * @param text the String to check + * @see Strings#hasLength + */ + public static void hasLength(String text) { + hasLength(text, + "[Assertion failed] - this String argument must have length; it must not be null or empty"); + } + + /** + * Assert that the given String has valid text content; that is, it must not + * be null and must contain at least one non-whitespace character. + *
    Assert.hasText(name, "'name' must not be empty");
    + * @param text the String to check + * @param message the exception message to use if the assertion fails + * @see Strings#hasText + */ + public static void hasText(String text, String message) { + if (!Strings.hasText(text)) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that the given String has valid text content; that is, it must not + * be null and must contain at least one non-whitespace character. + *
    Assert.hasText(name, "'name' must not be empty");
    + * @param text the String to check + * @see Strings#hasText + */ + public static void hasText(String text) { + hasText(text, + "[Assertion failed] - this String argument must have text; it must not be null, empty, or blank"); + } + + /** + * Assert that the given text does not contain the given substring. + *
    Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");
    + * @param textToSearch the text to search + * @param substring the substring to find within the text + * @param message the exception message to use if the assertion fails + */ + public static void doesNotContain(String textToSearch, String substring, String message) { + if (Strings.hasLength(textToSearch) && Strings.hasLength(substring) && + textToSearch.indexOf(substring) != -1) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that the given text does not contain the given substring. + *
    Assert.doesNotContain(name, "rod");
    + * @param textToSearch the text to search + * @param substring the substring to find within the text + */ + public static void doesNotContain(String textToSearch, String substring) { + doesNotContain(textToSearch, substring, + "[Assertion failed] - this String argument must not contain the substring [" + substring + "]"); + } + + + /** + * Assert that an array has elements; that is, it must not be + * null and must have at least one element. + *
    Assert.notEmpty(array, "The array must have elements");
    + * @param array the array to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the object array is null or has no elements + */ + public static void notEmpty(Object[] array, String message) { + if (Objects.isEmpty(array)) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that an array has elements; that is, it must not be + * null and must have at least one element. + *
    Assert.notEmpty(array);
    + * @param array the array to check + * @throws IllegalArgumentException if the object array is null or has no elements + */ + public static void notEmpty(Object[] array) { + notEmpty(array, "[Assertion failed] - this array must not be empty: it must contain at least 1 element"); + } + + public static void notEmpty(byte[] array, String msg) { + if (Objects.isEmpty(array)) { + throw new IllegalArgumentException(msg); + } + } + + /** + * Assert that an array has no null elements. + * Note: Does not complain if the array is empty! + *
    Assert.noNullElements(array, "The array must have non-null elements");
    + * @param array the array to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the object array contains a null element + */ + public static void noNullElements(Object[] array, String message) { + if (array != null) { + for (int i = 0; i < array.length; i++) { + if (array[i] == null) { + throw new IllegalArgumentException(message); + } + } + } + } + + /** + * Assert that an array has no null elements. + * Note: Does not complain if the array is empty! + *
    Assert.noNullElements(array);
    + * @param array the array to check + * @throws IllegalArgumentException if the object array contains a null element + */ + public static void noNullElements(Object[] array) { + noNullElements(array, "[Assertion failed] - this array must not contain any null elements"); + } + + /** + * Assert that a collection has elements; that is, it must not be + * null and must have at least one element. + *
    Assert.notEmpty(collection, "Collection must have elements");
    + * @param collection the collection to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the collection is null or has no elements + */ + public static void notEmpty(Collection collection, String message) { + if (Collections.isEmpty(collection)) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that a collection has elements; that is, it must not be + * null and must have at least one element. + *
    Assert.notEmpty(collection, "Collection must have elements");
    + * @param collection the collection to check + * @throws IllegalArgumentException if the collection is null or has no elements + */ + public static void notEmpty(Collection collection) { + notEmpty(collection, + "[Assertion failed] - this collection must not be empty: it must contain at least 1 element"); + } + + /** + * Assert that a Map has entries; that is, it must not be null + * and must have at least one entry. + *
    Assert.notEmpty(map, "Map must have entries");
    + * @param map the map to check + * @param message the exception message to use if the assertion fails + * @throws IllegalArgumentException if the map is null or has no entries + */ + public static void notEmpty(Map map, String message) { + if (Collections.isEmpty(map)) { + throw new IllegalArgumentException(message); + } + } + + /** + * Assert that a Map has entries; that is, it must not be null + * and must have at least one entry. + *
    Assert.notEmpty(map);
    + * @param map the map to check + * @throws IllegalArgumentException if the map is null or has no entries + */ + public static void notEmpty(Map map) { + notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry"); + } + + + /** + * Assert that the provided object is an instance of the provided class. + *
    Assert.instanceOf(Foo.class, foo);
    + * @param clazz the required class + * @param obj the object to check + * @throws IllegalArgumentException if the object is not an instance of clazz + * @see Class#isInstance + */ + public static void isInstanceOf(Class clazz, Object obj) { + isInstanceOf(clazz, obj, ""); + } + + /** + * Assert that the provided object is an instance of the provided class. + *
    Assert.instanceOf(Foo.class, foo);
    + * @param type the type to check against + * @param obj the object to check + * @param message a message which will be prepended to the message produced by + * the function itself, and which may be used to provide context. It should + * normally end in a ": " or ". " so that the function generate message looks + * ok when prepended to it. + * @throws IllegalArgumentException if the object is not an instance of clazz + * @see Class#isInstance + */ + public static void isInstanceOf(Class type, Object obj, String message) { + notNull(type, "Type to check against must not be null"); + if (!type.isInstance(obj)) { + throw new IllegalArgumentException(message + + "Object of class [" + (obj != null ? obj.getClass().getName() : "null") + + "] must be an instance of " + type); + } + } + + /** + * Assert that superType.isAssignableFrom(subType) is true. + *
    Assert.isAssignable(Number.class, myClass);
    + * @param superType the super type to check + * @param subType the sub type to check + * @throws IllegalArgumentException if the classes are not assignable + */ + public static void isAssignable(Class superType, Class subType) { + isAssignable(superType, subType, ""); + } + + /** + * Assert that superType.isAssignableFrom(subType) is true. + *
    Assert.isAssignable(Number.class, myClass);
    + * @param superType the super type to check against + * @param subType the sub type to check + * @param message a message which will be prepended to the message produced by + * the function itself, and which may be used to provide context. It should + * normally end in a ": " or ". " so that the function generate message looks + * ok when prepended to it. + * @throws IllegalArgumentException if the classes are not assignable + */ + public static void isAssignable(Class superType, Class subType, String message) { + notNull(superType, "Type to check against must not be null"); + if (subType == null || !superType.isAssignableFrom(subType)) { + throw new IllegalArgumentException(message + subType + " is not assignable to " + superType); + } + } + + + /** + * Assert a boolean expression, throwing IllegalStateException + * if the test result is false. Call isTrue if you wish to + * throw IllegalArgumentException on an assertion failure. + *
    Assert.state(id == null, "The id property must not already be initialized");
    + * @param expression a boolean expression + * @param message the exception message to use if the assertion fails + * @throws IllegalStateException if expression is false + */ + public static void state(boolean expression, String message) { + if (!expression) { + throw new IllegalStateException(message); + } + } + + /** + * Assert a boolean expression, throwing {@link IllegalStateException} + * if the test result is false. + *

    Call {@link #isTrue(boolean)} if you wish to + * throw {@link IllegalArgumentException} on an assertion failure. + *

    Assert.state(id == null);
    + * @param expression a boolean expression + * @throws IllegalStateException if the supplied expression is false + */ + public static void state(boolean expression) { + state(expression, "[Assertion failed] - this state invariant must be true"); + } + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Classes.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Classes.java new file mode 100644 index 000000000000..27d4d18c2fe8 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Classes.java @@ -0,0 +1,254 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.io.InputStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + +/** + * @since 0.1 + */ +public final class Classes { + + private Classes() {} //prevent instantiation + + /** + * @since 0.1 + */ + private static final ClassLoaderAccessor THREAD_CL_ACCESSOR = new ExceptionIgnoringAccessor() { + @Override + protected ClassLoader doGetClassLoader() throws Throwable { + return Thread.currentThread().getContextClassLoader(); + } + }; + + /** + * @since 0.1 + */ + private static final ClassLoaderAccessor CLASS_CL_ACCESSOR = new ExceptionIgnoringAccessor() { + @Override + protected ClassLoader doGetClassLoader() throws Throwable { + return Classes.class.getClassLoader(); + } + }; + + /** + * @since 0.1 + */ + private static final ClassLoaderAccessor SYSTEM_CL_ACCESSOR = new ExceptionIgnoringAccessor() { + @Override + protected ClassLoader doGetClassLoader() throws Throwable { + return ClassLoader.getSystemClassLoader(); + } + }; + + /** + * Attempts to load the specified class name from the current thread's + * {@link Thread#getContextClassLoader() context class loader}, then the + * current ClassLoader (Classes.class.getClassLoader()), then the system/application + * ClassLoader (ClassLoader.getSystemClassLoader(), in that order. If any of them cannot locate + * the specified class, an UnknownClassException is thrown (our RuntimeException equivalent of + * the JRE's ClassNotFoundException. + * + * @param fqcn the fully qualified class name to load + * @return the located class + * @throws UnknownClassException if the class cannot be found. + */ + @SuppressWarnings("unchecked") + public static Class forName(String fqcn) throws UnknownClassException { + + Class clazz = THREAD_CL_ACCESSOR.loadClass(fqcn); + + if (clazz == null) { + clazz = CLASS_CL_ACCESSOR.loadClass(fqcn); + } + + if (clazz == null) { + clazz = SYSTEM_CL_ACCESSOR.loadClass(fqcn); + } + + if (clazz == null) { + String msg = "Unable to load class named [" + fqcn + "] from the thread context, current, or " + + "system/application ClassLoaders. All heuristics have been exhausted. Class could not be found."; + + if (fqcn != null && fqcn.startsWith("io.jsonwebtoken.impl")) { + msg += " Have you remembered to include the jjwt-impl.jar in your runtime classpath?"; + } + + throw new UnknownClassException(msg); + } + + return clazz; + } + + /** + * Returns the specified resource by checking the current thread's + * {@link Thread#getContextClassLoader() context class loader}, then the + * current ClassLoader (Classes.class.getClassLoader()), then the system/application + * ClassLoader (ClassLoader.getSystemClassLoader(), in that order, using + * {@link ClassLoader#getResourceAsStream(String) getResourceAsStream(name)}. + * + * @param name the name of the resource to acquire from the classloader(s). + * @return the InputStream of the resource found, or null if the resource cannot be found from any + * of the three mentioned ClassLoaders. + * @since 0.8 + */ + public static InputStream getResourceAsStream(String name) { + + InputStream is = THREAD_CL_ACCESSOR.getResourceStream(name); + + if (is == null) { + is = CLASS_CL_ACCESSOR.getResourceStream(name); + } + + if (is == null) { + is = SYSTEM_CL_ACCESSOR.getResourceStream(name); + } + + return is; + } + + public static boolean isAvailable(String fullyQualifiedClassName) { + try { + forName(fullyQualifiedClassName); + return true; + } catch (UnknownClassException e) { + return false; + } + } + + @SuppressWarnings("unchecked") + public static T newInstance(String fqcn) { + return (T)newInstance(forName(fqcn)); + } + + public static T newInstance(String fqcn, Class[] ctorArgTypes, Object... args) { + Class clazz = forName(fqcn); + Constructor ctor = getConstructor(clazz, ctorArgTypes); + return instantiate(ctor, args); + } + + @SuppressWarnings("unchecked") + public static T newInstance(String fqcn, Object... args) { + return (T)newInstance(forName(fqcn), args); + } + + public static T newInstance(Class clazz) { + if (clazz == null) { + String msg = "Class method parameter cannot be null."; + throw new IllegalArgumentException(msg); + } + try { + return clazz.newInstance(); + } catch (Exception e) { + throw new InstantiationException("Unable to instantiate class [" + clazz.getName() + "]", e); + } + } + + public static T newInstance(Class clazz, Object... args) { + Class[] argTypes = new Class[args.length]; + for (int i = 0; i < args.length; i++) { + argTypes[i] = args[i].getClass(); + } + Constructor ctor = getConstructor(clazz, argTypes); + return instantiate(ctor, args); + } + + public static Constructor getConstructor(Class clazz, Class... argTypes) { + try { + return clazz.getConstructor(argTypes); + } catch (NoSuchMethodException e) { + throw new IllegalStateException(e); + } + + } + + public static T instantiate(Constructor ctor, Object... args) { + try { + return ctor.newInstance(args); + } catch (Exception e) { + String msg = "Unable to instantiate instance with constructor [" + ctor + "]"; + throw new InstantiationException(msg, e); + } + } + + /** + * @since 0.10.0 + */ + @SuppressWarnings("unchecked") + public static T invokeStatic(String fqcn, String methodName, Class[] argTypes, Object... args) { + try { + Class clazz = Classes.forName(fqcn); + Method method = clazz.getDeclaredMethod(methodName, argTypes); + method.setAccessible(true); + return(T)method.invoke(null, args); + } catch (Exception e) { + String msg = "Unable to invoke class method " + fqcn + "#" + methodName + ". Ensure the necessary " + + "implementation is in the runtime classpath."; + throw new IllegalStateException(msg, e); + } + } + + /** + * @since 1.0 + */ + private static interface ClassLoaderAccessor { + Class loadClass(String fqcn); + + InputStream getResourceStream(String name); + } + + /** + * @since 1.0 + */ + private static abstract class ExceptionIgnoringAccessor implements ClassLoaderAccessor { + + public Class loadClass(String fqcn) { + Class clazz = null; + ClassLoader cl = getClassLoader(); + if (cl != null) { + try { + clazz = cl.loadClass(fqcn); + } catch (ClassNotFoundException e) { + //Class couldn't be found by loader + } + } + return clazz; + } + + public InputStream getResourceStream(String name) { + InputStream is = null; + ClassLoader cl = getClassLoader(); + if (cl != null) { + is = cl.getResourceAsStream(name); + } + return is; + } + + protected final ClassLoader getClassLoader() { + try { + return doGetClassLoader(); + } catch (Throwable t) { + //Unable to get ClassLoader + } + return null; + } + + protected abstract ClassLoader doGetClassLoader() throws Throwable; + } +} + diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Collections.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Collections.java new file mode 100644 index 000000000000..d775a002adfe --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Collections.java @@ -0,0 +1,365 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +public final class Collections { + + private Collections(){} //prevent instantiation + + /** + * Return true if the supplied Collection is null + * or empty. Otherwise, return false. + * @param collection the Collection to check + * @return whether the given Collection is empty + */ + public static boolean isEmpty(Collection collection) { + return (collection == null || collection.isEmpty()); + } + + /** + * Returns the collection's size or {@code 0} if the collection is {@code null}. + * + * @param collection the collection to check. + * @return the collection's size or {@code 0} if the collection is {@code null}. + * @since 0.9.2 + */ + public static int size(Collection collection) { + return collection == null ? 0 : collection.size(); + } + + /** + * Returns the map's size or {@code 0} if the map is {@code null}. + * + * @param map the map to check + * @return the map's size or {@code 0} if the map is {@code null}. + * @since 0.9.2 + */ + public static int size(Map map) { + return map == null ? 0 : map.size(); + } + + /** + * Return true if the supplied Map is null + * or empty. Otherwise, return false. + * @param map the Map to check + * @return whether the given Map is empty + */ + public static boolean isEmpty(Map map) { + return (map == null || map.isEmpty()); + } + + /** + * Convert the supplied array into a List. A primitive array gets + * converted into a List of the appropriate wrapper type. + *

    A null source value will be converted to an + * empty List. + * @param source the (potentially primitive) array + * @return the converted List result + * @see Objects#toObjectArray(Object) + */ + public static List arrayToList(Object source) { + return Arrays.asList(Objects.toObjectArray(source)); + } + + /** + * Merge the given array into the given Collection. + * @param array the array to merge (may be null) + * @param collection the target Collection to merge the array into + */ + @SuppressWarnings("unchecked") + public static void mergeArrayIntoCollection(Object array, Collection collection) { + if (collection == null) { + throw new IllegalArgumentException("Collection must not be null"); + } + Object[] arr = Objects.toObjectArray(array); + for (Object elem : arr) { + collection.add(elem); + } + } + + /** + * Merge the given Properties instance into the given Map, + * copying all properties (key-value pairs) over. + *

    Uses Properties.propertyNames() to even catch + * default properties linked into the original Properties instance. + * @param props the Properties instance to merge (may be null) + * @param map the target Map to merge the properties into + */ + @SuppressWarnings("unchecked") + public static void mergePropertiesIntoMap(Properties props, Map map) { + if (map == null) { + throw new IllegalArgumentException("Map must not be null"); + } + if (props != null) { + for (Enumeration en = props.propertyNames(); en.hasMoreElements();) { + String key = (String) en.nextElement(); + Object value = props.getProperty(key); + if (value == null) { + // Potentially a non-String value... + value = props.get(key); + } + map.put(key, value); + } + } + } + + + /** + * Check whether the given Iterator contains the given element. + * @param iterator the Iterator to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean contains(Iterator iterator, Object element) { + if (iterator != null) { + while (iterator.hasNext()) { + Object candidate = iterator.next(); + if (Objects.nullSafeEquals(candidate, element)) { + return true; + } + } + } + return false; + } + + /** + * Check whether the given Enumeration contains the given element. + * @param enumeration the Enumeration to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean contains(Enumeration enumeration, Object element) { + if (enumeration != null) { + while (enumeration.hasMoreElements()) { + Object candidate = enumeration.nextElement(); + if (Objects.nullSafeEquals(candidate, element)) { + return true; + } + } + } + return false; + } + + /** + * Check whether the given Collection contains the given element instance. + *

    Enforces the given instance to be present, rather than returning + * true for an equal element as well. + * @param collection the Collection to check + * @param element the element to look for + * @return true if found, false else + */ + public static boolean containsInstance(Collection collection, Object element) { + if (collection != null) { + for (Object candidate : collection) { + if (candidate == element) { + return true; + } + } + } + return false; + } + + /** + * Return true if any element in 'candidates' is + * contained in 'source'; otherwise returns false. + * @param source the source Collection + * @param candidates the candidates to search for + * @return whether any of the candidates has been found + */ + public static boolean containsAny(Collection source, Collection candidates) { + if (isEmpty(source) || isEmpty(candidates)) { + return false; + } + for (Object candidate : candidates) { + if (source.contains(candidate)) { + return true; + } + } + return false; + } + + /** + * Return the first element in 'candidates' that is contained in + * 'source'. If no element in 'candidates' is present in + * 'source' returns null. Iteration order is + * {@link Collection} implementation specific. + * @param source the source Collection + * @param candidates the candidates to search for + * @return the first present object, or null if not found + */ + public static Object findFirstMatch(Collection source, Collection candidates) { + if (isEmpty(source) || isEmpty(candidates)) { + return null; + } + for (Object candidate : candidates) { + if (source.contains(candidate)) { + return candidate; + } + } + return null; + } + + /** + * Find a single value of the given type in the given Collection. + * @param collection the Collection to search + * @param type the type to look for + * @return a value of the given type found if there is a clear match, + * or null if none or more than one such value found + */ + @SuppressWarnings("unchecked") + public static T findValueOfType(Collection collection, Class type) { + if (isEmpty(collection)) { + return null; + } + T value = null; + for (Object element : collection) { + if (type == null || type.isInstance(element)) { + if (value != null) { + // More than one value found... no clear single value. + return null; + } + value = (T) element; + } + } + return value; + } + + /** + * Find a single value of one of the given types in the given Collection: + * searching the Collection for a value of the first type, then + * searching for a value of the second type, etc. + * @param collection the collection to search + * @param types the types to look for, in prioritized order + * @return a value of one of the given types found if there is a clear match, + * or null if none or more than one such value found + */ + public static Object findValueOfType(Collection collection, Class[] types) { + if (isEmpty(collection) || Objects.isEmpty(types)) { + return null; + } + for (Class type : types) { + Object value = findValueOfType(collection, type); + if (value != null) { + return value; + } + } + return null; + } + + /** + * Determine whether the given Collection only contains a single unique object. + * @param collection the Collection to check + * @return true if the collection contains a single reference or + * multiple references to the same instance, false else + */ + public static boolean hasUniqueObject(Collection collection) { + if (isEmpty(collection)) { + return false; + } + boolean hasCandidate = false; + Object candidate = null; + for (Object elem : collection) { + if (!hasCandidate) { + hasCandidate = true; + candidate = elem; + } + else if (candidate != elem) { + return false; + } + } + return true; + } + + /** + * Find the common element type of the given Collection, if any. + * @param collection the Collection to check + * @return the common element type, or null if no clear + * common type has been found (or the collection was empty) + */ + public static Class findCommonElementType(Collection collection) { + if (isEmpty(collection)) { + return null; + } + Class candidate = null; + for (Object val : collection) { + if (val != null) { + if (candidate == null) { + candidate = val.getClass(); + } + else if (candidate != val.getClass()) { + return null; + } + } + } + return candidate; + } + + /** + * Marshal the elements from the given enumeration into an array of the given type. + * Enumeration elements must be assignable to the type of the given array. The array + * returned will be a different instance than the array given. + */ + public static A[] toArray(Enumeration enumeration, A[] array) { + ArrayList elements = new ArrayList(); + while (enumeration.hasMoreElements()) { + elements.add(enumeration.nextElement()); + } + return elements.toArray(array); + } + + /** + * Adapt an enumeration to an iterator. + * @param enumeration the enumeration + * @return the iterator + */ + public static Iterator toIterator(Enumeration enumeration) { + return new EnumerationIterator(enumeration); + } + + /** + * Iterator wrapping an Enumeration. + */ + private static class EnumerationIterator implements Iterator { + + private Enumeration enumeration; + + public EnumerationIterator(Enumeration enumeration) { + this.enumeration = enumeration; + } + + public boolean hasNext() { + return this.enumeration.hasMoreElements(); + } + + public E next() { + return this.enumeration.nextElement(); + } + + public void remove() throws UnsupportedOperationException { + throw new UnsupportedOperationException("Not supported"); + } + } +} + diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/DateFormats.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/DateFormats.java new file mode 100644 index 000000000000..250d9892d934 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/DateFormats.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.TimeZone; + +/** + * @since 0.10.0 + */ +public class DateFormats { + + private static final String ISO_8601_PATTERN = "yyyy-MM-dd'T'HH:mm:ss'Z'"; + + private static final String ISO_8601_MILLIS_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; + + private static final ThreadLocal ISO_8601 = new ThreadLocal() { + @Override + protected DateFormat initialValue() { + SimpleDateFormat format = new SimpleDateFormat(ISO_8601_PATTERN); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + return format; + } + }; + + private static final ThreadLocal ISO_8601_MILLIS = new ThreadLocal() { + @Override + protected DateFormat initialValue() { + SimpleDateFormat format = new SimpleDateFormat(ISO_8601_MILLIS_PATTERN); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + return format; + } + }; + + public static String formatIso8601(Date date) { + return formatIso8601(date, true); + } + + public static String formatIso8601(Date date, boolean includeMillis) { + if (includeMillis) { + return ISO_8601_MILLIS.get().format(date); + } + return ISO_8601.get().format(date); + } + + public static Date parseIso8601Date(String s) throws ParseException { + Assert.notNull(s, "String argument cannot be null."); + if (s.lastIndexOf('.') > -1) { //assume ISO-8601 with milliseconds + return ISO_8601_MILLIS.get().parse(s); + } else { //assume ISO-8601 without millis: + return ISO_8601.get().parse(s); + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/InstantiationException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/InstantiationException.java new file mode 100644 index 000000000000..0ee8418f5ea5 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/InstantiationException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +/** + * @since 0.1 + */ +public class InstantiationException extends RuntimeException { + + public InstantiationException(String s, Throwable t) { + super(s, t); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Maps.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Maps.java new file mode 100644 index 000000000000..f96e4cb302c0 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Maps.java @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2019 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Utility class to help with the manipulation of working with Maps. + * @since 0.11.0 + */ +public final class Maps { + + private Maps() {} //prevent instantiation + + /** + * Creates a new map builder with a single entry. + *

    Typical usage:

    {@code
    +     * Map result = Maps.of("key1", value1)
    +     *     .and("key2", value2)
    +     *     // ...
    +     *     .build();
    +     * }
    + * @param key the key of an map entry to be added + * @param value the value of map entry to be added + * @param the maps key type + * @param the maps value type + * Creates a new map builder with a single entry. + */ + public static MapBuilder of(K key, V value) { + return new HashMapBuilder().and(key, value); + } + + /** + * Utility Builder class for fluently building maps: + *

    Typical usage:

    {@code
    +     * Map result = Maps.of("key1", value1)
    +     *     .and("key2", value2)
    +     *     // ...
    +     *     .build();
    +     * }
    + * @param the maps key type + * @param the maps value type + */ + public interface MapBuilder { + /** + * Add a new entry to this map builder + * @param key the key of an map entry to be added + * @param value the value of map entry to be added + * @return the current MapBuilder to allow for method chaining. + */ + MapBuilder and(K key, V value); + + /** + * Returns a the resulting Map object from this MapBuilder. + * @return Returns a the resulting Map object from this MapBuilder. + */ + Map build(); + } + + private static class HashMapBuilder implements MapBuilder { + + private final Map data = new HashMap<>(); + + public MapBuilder and(K key, V value) { + data.put(key, value); + return this; + } + public Map build() { + return Collections.unmodifiableMap(data); + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Objects.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Objects.java new file mode 100644 index 000000000000..4960b73553bf --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Objects.java @@ -0,0 +1,927 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.io.Closeable; +import java.io.IOException; +import java.lang.reflect.Array; +import java.util.Arrays; + +public final class Objects { + + private Objects(){} //prevent instantiation + + private static final int INITIAL_HASH = 7; + private static final int MULTIPLIER = 31; + + private static final String EMPTY_STRING = ""; + private static final String NULL_STRING = "null"; + private static final String ARRAY_START = "{"; + private static final String ARRAY_END = "}"; + private static final String EMPTY_ARRAY = ARRAY_START + ARRAY_END; + private static final String ARRAY_ELEMENT_SEPARATOR = ", "; + + /** + * Return whether the given throwable is a checked exception: + * that is, neither a RuntimeException nor an Error. + * + * @param ex the throwable to check + * @return whether the throwable is a checked exception + * @see java.lang.Exception + * @see java.lang.RuntimeException + * @see java.lang.Error + */ + public static boolean isCheckedException(Throwable ex) { + return !(ex instanceof RuntimeException || ex instanceof Error); + } + + /** + * Check whether the given exception is compatible with the exceptions + * declared in a throws clause. + * + * @param ex the exception to checked + * @param declaredExceptions the exceptions declared in the throws clause + * @return whether the given exception is compatible + */ + public static boolean isCompatibleWithThrowsClause(Throwable ex, Class[] declaredExceptions) { + if (!isCheckedException(ex)) { + return true; + } + if (declaredExceptions != null) { + int i = 0; + while (i < declaredExceptions.length) { + if (declaredExceptions[i].isAssignableFrom(ex.getClass())) { + return true; + } + i++; + } + } + return false; + } + + /** + * Determine whether the given object is an array: + * either an Object array or a primitive array. + * + * @param obj the object to check + */ + public static boolean isArray(Object obj) { + return (obj != null && obj.getClass().isArray()); + } + + /** + * Determine whether the given array is empty: + * i.e. null or of zero length. + * + * @param array the array to check + */ + public static boolean isEmpty(Object[] array) { + return (array == null || array.length == 0); + } + + /** + * Returns {@code true} if the specified byte array is null or of zero length, {@code false} otherwise. + * + * @param array the byte array to check + * @return {@code true} if the specified byte array is null or of zero length, {@code false} otherwise. + */ + public static boolean isEmpty(byte[] array) { + return array == null || array.length == 0; + } + + /** + * Check whether the given array contains the given element. + * + * @param array the array to check (may be null, + * in which case the return value will always be false) + * @param element the element to check for + * @return whether the element has been found in the given array + */ + public static boolean containsElement(Object[] array, Object element) { + if (array == null) { + return false; + } + for (Object arrayEle : array) { + if (nullSafeEquals(arrayEle, element)) { + return true; + } + } + return false; + } + + /** + * Check whether the given array of enum constants contains a constant with the given name, + * ignoring case when determining a match. + * + * @param enumValues the enum values to check, typically the product of a call to MyEnum.values() + * @param constant the constant name to find (must not be null or empty string) + * @return whether the constant has been found in the given array + */ + public static boolean containsConstant(Enum[] enumValues, String constant) { + return containsConstant(enumValues, constant, false); + } + + /** + * Check whether the given array of enum constants contains a constant with the given name. + * + * @param enumValues the enum values to check, typically the product of a call to MyEnum.values() + * @param constant the constant name to find (must not be null or empty string) + * @param caseSensitive whether case is significant in determining a match + * @return whether the constant has been found in the given array + */ + public static boolean containsConstant(Enum[] enumValues, String constant, boolean caseSensitive) { + for (Enum candidate : enumValues) { + if (caseSensitive ? + candidate.toString().equals(constant) : + candidate.toString().equalsIgnoreCase(constant)) { + return true; + } + } + return false; + } + + /** + * Case insensitive alternative to {@link Enum#valueOf(Class, String)}. + * + * @param the concrete Enum type + * @param enumValues the array of all Enum constants in question, usually per Enum.values() + * @param constant the constant to get the enum value of + * @throws IllegalArgumentException if the given constant is not found in the given array + * of enum values. Use {@link #containsConstant(Enum[], String)} as a guard to + * avoid this exception. + */ + public static > E caseInsensitiveValueOf(E[] enumValues, String constant) { + for (E candidate : enumValues) { + if (candidate.toString().equalsIgnoreCase(constant)) { + return candidate; + } + } + throw new IllegalArgumentException( + String.format("constant [%s] does not exist in enum type %s", + constant, enumValues.getClass().getComponentType().getName())); + } + + /** + * Append the given object to the given array, returning a new array + * consisting of the input array contents plus the given object. + * + * @param array the array to append to (can be null) + * @param obj the object to append + * @return the new array (of the same component type; never null) + */ + public static A[] addObjectToArray(A[] array, O obj) { + Class compType = Object.class; + if (array != null) { + compType = array.getClass().getComponentType(); + } else if (obj != null) { + compType = obj.getClass(); + } + int newArrLength = (array != null ? array.length + 1 : 1); + @SuppressWarnings("unchecked") + A[] newArr = (A[]) Array.newInstance(compType, newArrLength); + if (array != null) { + System.arraycopy(array, 0, newArr, 0, array.length); + } + newArr[newArr.length - 1] = obj; + return newArr; + } + + /** + * Convert the given array (which may be a primitive array) to an + * object array (if necessary of primitive wrapper objects). + *

    A null source value will be converted to an + * empty Object array. + * + * @param source the (potentially primitive) array + * @return the corresponding object array (never null) + * @throws IllegalArgumentException if the parameter is not an array + */ + public static Object[] toObjectArray(Object source) { + if (source instanceof Object[]) { + return (Object[]) source; + } + if (source == null) { + return new Object[0]; + } + if (!source.getClass().isArray()) { + throw new IllegalArgumentException("Source is not an array: " + source); + } + int length = Array.getLength(source); + if (length == 0) { + return new Object[0]; + } + Class wrapperType = Array.get(source, 0).getClass(); + Object[] newArray = (Object[]) Array.newInstance(wrapperType, length); + for (int i = 0; i < length; i++) { + newArray[i] = Array.get(source, i); + } + return newArray; + } + + + //--------------------------------------------------------------------- + // Convenience methods for content-based equality/hash-code handling + //--------------------------------------------------------------------- + + /** + * Determine if the given objects are equal, returning true + * if both are null or false if only one is + * null. + *

    Compares arrays with Arrays.equals, performing an equality + * check based on the array elements rather than the array reference. + * + * @param o1 first Object to compare + * @param o2 second Object to compare + * @return whether the given objects are equal + * @see java.util.Arrays#equals + */ + public static boolean nullSafeEquals(Object o1, Object o2) { + if (o1 == o2) { + return true; + } + if (o1 == null || o2 == null) { + return false; + } + if (o1.equals(o2)) { + return true; + } + if (o1.getClass().isArray() && o2.getClass().isArray()) { + if (o1 instanceof Object[] && o2 instanceof Object[]) { + return Arrays.equals((Object[]) o1, (Object[]) o2); + } + if (o1 instanceof boolean[] && o2 instanceof boolean[]) { + return Arrays.equals((boolean[]) o1, (boolean[]) o2); + } + if (o1 instanceof byte[] && o2 instanceof byte[]) { + return Arrays.equals((byte[]) o1, (byte[]) o2); + } + if (o1 instanceof char[] && o2 instanceof char[]) { + return Arrays.equals((char[]) o1, (char[]) o2); + } + if (o1 instanceof double[] && o2 instanceof double[]) { + return Arrays.equals((double[]) o1, (double[]) o2); + } + if (o1 instanceof float[] && o2 instanceof float[]) { + return Arrays.equals((float[]) o1, (float[]) o2); + } + if (o1 instanceof int[] && o2 instanceof int[]) { + return Arrays.equals((int[]) o1, (int[]) o2); + } + if (o1 instanceof long[] && o2 instanceof long[]) { + return Arrays.equals((long[]) o1, (long[]) o2); + } + if (o1 instanceof short[] && o2 instanceof short[]) { + return Arrays.equals((short[]) o1, (short[]) o2); + } + } + return false; + } + + /** + * Return as hash code for the given object; typically the value of + * {@link Object#hashCode()}. If the object is an array, + * this method will delegate to any of the nullSafeHashCode + * methods for arrays in this class. If the object is null, + * this method returns 0. + * + * @see #nullSafeHashCode(Object[]) + * @see #nullSafeHashCode(boolean[]) + * @see #nullSafeHashCode(byte[]) + * @see #nullSafeHashCode(char[]) + * @see #nullSafeHashCode(double[]) + * @see #nullSafeHashCode(float[]) + * @see #nullSafeHashCode(int[]) + * @see #nullSafeHashCode(long[]) + * @see #nullSafeHashCode(short[]) + */ + public static int nullSafeHashCode(Object obj) { + if (obj == null) { + return 0; + } + if (obj.getClass().isArray()) { + if (obj instanceof Object[]) { + return nullSafeHashCode((Object[]) obj); + } + if (obj instanceof boolean[]) { + return nullSafeHashCode((boolean[]) obj); + } + if (obj instanceof byte[]) { + return nullSafeHashCode((byte[]) obj); + } + if (obj instanceof char[]) { + return nullSafeHashCode((char[]) obj); + } + if (obj instanceof double[]) { + return nullSafeHashCode((double[]) obj); + } + if (obj instanceof float[]) { + return nullSafeHashCode((float[]) obj); + } + if (obj instanceof int[]) { + return nullSafeHashCode((int[]) obj); + } + if (obj instanceof long[]) { + return nullSafeHashCode((long[]) obj); + } + if (obj instanceof short[]) { + return nullSafeHashCode((short[]) obj); + } + } + return obj.hashCode(); + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(Object[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + nullSafeHashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(boolean[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(byte[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(char[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(double[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(float[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(int[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(long[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + hashCode(array[i]); + } + return hash; + } + + /** + * Return a hash code based on the contents of the specified array. + * If array is null, this method returns 0. + */ + public static int nullSafeHashCode(short[] array) { + if (array == null) { + return 0; + } + int hash = INITIAL_HASH; + int arraySize = array.length; + for (int i = 0; i < arraySize; i++) { + hash = MULTIPLIER * hash + array[i]; + } + return hash; + } + + /** + * Return the same value as {@link Boolean#hashCode()}. + * + * @see Boolean#hashCode() + */ + public static int hashCode(boolean bool) { + return bool ? 1231 : 1237; + } + + /** + * Return the same value as {@link Double#hashCode()}. + * + * @see Double#hashCode() + */ + public static int hashCode(double dbl) { + long bits = Double.doubleToLongBits(dbl); + return hashCode(bits); + } + + /** + * Return the same value as {@link Float#hashCode()}. + * + * @see Float#hashCode() + */ + public static int hashCode(float flt) { + return Float.floatToIntBits(flt); + } + + /** + * Return the same value as {@link Long#hashCode()}. + * + * @see Long#hashCode() + */ + public static int hashCode(long lng) { + return (int) (lng ^ (lng >>> 32)); + } + + + //--------------------------------------------------------------------- + // Convenience methods for toString output + //--------------------------------------------------------------------- + + /** + * Return a String representation of an object's overall identity. + * + * @param obj the object (may be null) + * @return the object's identity as String representation, + * or an empty String if the object was null + */ + public static String identityToString(Object obj) { + if (obj == null) { + return EMPTY_STRING; + } + return obj.getClass().getName() + "@" + getIdentityHexString(obj); + } + + /** + * Return a hex String form of an object's identity hash code. + * + * @param obj the object + * @return the object's identity code in hex notation + */ + public static String getIdentityHexString(Object obj) { + return Integer.toHexString(System.identityHashCode(obj)); + } + + /** + * Return a content-based String representation if obj is + * not null; otherwise returns an empty String. + *

    Differs from {@link #nullSafeToString(Object)} in that it returns + * an empty String rather than "null" for a null value. + * + * @param obj the object to build a display String for + * @return a display String representation of obj + * @see #nullSafeToString(Object) + */ + public static String getDisplayString(Object obj) { + if (obj == null) { + return EMPTY_STRING; + } + return nullSafeToString(obj); + } + + /** + * Determine the class name for the given object. + *

    Returns "null" if obj is null. + * + * @param obj the object to introspect (may be null) + * @return the corresponding class name + */ + public static String nullSafeClassName(Object obj) { + return (obj != null ? obj.getClass().getName() : NULL_STRING); + } + + /** + * Return a String representation of the specified Object. + *

    Builds a String representation of the contents in case of an array. + * Returns "null" if obj is null. + * + * @param obj the object to build a String representation for + * @return a String representation of obj + */ + public static String nullSafeToString(Object obj) { + if (obj == null) { + return NULL_STRING; + } + if (obj instanceof String) { + return (String) obj; + } + if (obj instanceof Object[]) { + return nullSafeToString((Object[]) obj); + } + if (obj instanceof boolean[]) { + return nullSafeToString((boolean[]) obj); + } + if (obj instanceof byte[]) { + return nullSafeToString((byte[]) obj); + } + if (obj instanceof char[]) { + return nullSafeToString((char[]) obj); + } + if (obj instanceof double[]) { + return nullSafeToString((double[]) obj); + } + if (obj instanceof float[]) { + return nullSafeToString((float[]) obj); + } + if (obj instanceof int[]) { + return nullSafeToString((int[]) obj); + } + if (obj instanceof long[]) { + return nullSafeToString((long[]) obj); + } + if (obj instanceof short[]) { + return nullSafeToString((short[]) obj); + } + String str = obj.toString(); + return (str != null ? str : EMPTY_STRING); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(Object[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(String.valueOf(array[i])); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(boolean[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(byte[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(char[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append("'").append(array[i]).append("'"); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(double[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(float[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(int[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(long[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + /** + * Return a String representation of the contents of the specified array. + *

    The String representation consists of a list of the array's elements, + * enclosed in curly braces ("{}"). Adjacent elements are separated + * by the characters ", " (a comma followed by a space). Returns + * "null" if array is null. + * + * @param array the array to build a String representation for + * @return a String representation of array + */ + public static String nullSafeToString(short[] array) { + if (array == null) { + return NULL_STRING; + } + int length = array.length; + if (length == 0) { + return EMPTY_ARRAY; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i == 0) { + sb.append(ARRAY_START); + } else { + sb.append(ARRAY_ELEMENT_SEPARATOR); + } + sb.append(array[i]); + } + sb.append(ARRAY_END); + return sb.toString(); + } + + public static void nullSafeClose(Closeable... closeables) { + if (closeables == null) { + return; + } + + for (Closeable closeable : closeables) { + if (closeable != null) { + try { + closeable.close(); + } catch (IOException e) { + //Ignore the exception during close. + } + } + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/RuntimeEnvironment.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/RuntimeEnvironment.java new file mode 100644 index 000000000000..df5b8c7c7ae5 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/RuntimeEnvironment.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.security.Provider; +import java.security.Security; +import java.util.concurrent.atomic.AtomicBoolean; + +public final class RuntimeEnvironment { + + private RuntimeEnvironment(){} //prevent instantiation + + private static final String BC_PROVIDER_CLASS_NAME = "org.bouncycastle.jce.provider.BouncyCastleProvider"; + + private static final AtomicBoolean bcLoaded = new AtomicBoolean(false); + + public static final boolean BOUNCY_CASTLE_AVAILABLE = Classes.isAvailable(BC_PROVIDER_CLASS_NAME); + + public static void enableBouncyCastleIfPossible() { + + if (!BOUNCY_CASTLE_AVAILABLE || bcLoaded.get()) { + return; + } + + try { + Class clazz = Classes.forName(BC_PROVIDER_CLASS_NAME); + + //check to see if the user has already registered the BC provider: + + Provider[] providers = Security.getProviders(); + + for(Provider provider : providers) { + if (clazz.isInstance(provider)) { + bcLoaded.set(true); + return; + } + } + + //bc provider not enabled - add it: + Security.addProvider((Provider)Classes.newInstance(clazz)); + bcLoaded.set(true); + + } catch (UnknownClassException e) { + //not available + } + } + + static { + enableBouncyCastleIfPossible(); + } + +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Strings.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Strings.java new file mode 100644 index 000000000000..065bb2512bc8 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/Strings.java @@ -0,0 +1,1147 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Locale; +import java.util.Properties; +import java.util.Set; +import java.util.StringTokenizer; +import java.util.TreeSet; + +public final class Strings { + + private static final String FOLDER_SEPARATOR = "/"; + + private static final String WINDOWS_FOLDER_SEPARATOR = "\\"; + + private static final String TOP_PATH = ".."; + + private static final String CURRENT_PATH = "."; + + private static final char EXTENSION_SEPARATOR = '.'; + + public static final Charset UTF_8 = Charset.forName("UTF-8"); + + private Strings(){} //prevent instantiation + + //--------------------------------------------------------------------- + // General convenience methods for working with Strings + //--------------------------------------------------------------------- + + /** + * Check that the given CharSequence is neither null nor of length 0. + * Note: Will return true for a CharSequence that purely consists of whitespace. + *

    +     * Strings.hasLength(null) = false
    +     * Strings.hasLength("") = false
    +     * Strings.hasLength(" ") = true
    +     * Strings.hasLength("Hello") = true
    +     * 
    + * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not null and has length + * @see #hasText(String) + */ + public static boolean hasLength(CharSequence str) { + return (str != null && str.length() > 0); + } + + /** + * Check that the given String is neither null nor of length 0. + * Note: Will return true for a String that purely consists of whitespace. + * @param str the String to check (may be null) + * @return true if the String is not null and has length + * @see #hasLength(CharSequence) + */ + public static boolean hasLength(String str) { + return hasLength((CharSequence) str); + } + + /** + * Check whether the given CharSequence has actual text. + * More specifically, returns true if the string not null, + * its length is greater than 0, and it contains at least one non-whitespace character. + *

    +     * Strings.hasText(null) = false
    +     * Strings.hasText("") = false
    +     * Strings.hasText(" ") = false
    +     * Strings.hasText("12345") = true
    +     * Strings.hasText(" 12345 ") = true
    +     * 
    + * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not null, + * its length is greater than 0, and it does not contain whitespace only + * @see java.lang.Character#isWhitespace + */ + public static boolean hasText(CharSequence str) { + if (!hasLength(str)) { + return false; + } + int strLen = str.length(); + for (int i = 0; i < strLen; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + /** + * Check whether the given String has actual text. + * More specifically, returns true if the string not null, + * its length is greater than 0, and it contains at least one non-whitespace character. + * @param str the String to check (may be null) + * @return true if the String is not null, its length is + * greater than 0, and it does not contain whitespace only + * @see #hasText(CharSequence) + */ + public static boolean hasText(String str) { + return hasText((CharSequence) str); + } + + /** + * Check whether the given CharSequence contains any whitespace characters. + * @param str the CharSequence to check (may be null) + * @return true if the CharSequence is not empty and + * contains at least 1 whitespace character + * @see java.lang.Character#isWhitespace + */ + public static boolean containsWhitespace(CharSequence str) { + if (!hasLength(str)) { + return false; + } + int strLen = str.length(); + for (int i = 0; i < strLen; i++) { + if (Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + /** + * Check whether the given String contains any whitespace characters. + * @param str the String to check (may be null) + * @return true if the String is not empty and + * contains at least 1 whitespace character + * @see #containsWhitespace(CharSequence) + */ + public static boolean containsWhitespace(String str) { + return containsWhitespace((CharSequence) str); + } + + /** + * Trim leading and trailing whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see java.lang.Character#isWhitespace + */ + public static String trimWhitespace(String str) { + return (String) trimWhitespace((CharSequence)str); + } + + + private static CharSequence trimWhitespace(CharSequence str) { + if (!hasLength(str)) { + return str; + } + final int length = str.length(); + + int start = 0; + while (start < length && Character.isWhitespace(str.charAt(start))) { + start++; + } + + int end = length; + while (start < length && Character.isWhitespace(str.charAt(end - 1))) { + end--; + } + + return ((start > 0) || (end < length)) ? str.subSequence(start, end) : str; + } + + public static String clean(String str) { + CharSequence result = clean((CharSequence) str); + + return result!=null?result.toString():null; + } + + public static CharSequence clean(CharSequence str) { + str = trimWhitespace(str); + if (!hasLength(str)) { + return null; + } + return str; + } + + /** + * Trim all whitespace from the given String: + * leading, trailing, and inbetween characters. + * @param str the String to check + * @return the trimmed String + * @see java.lang.Character#isWhitespace + */ + public static String trimAllWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + int index = 0; + while (sb.length() > index) { + if (Character.isWhitespace(sb.charAt(index))) { + sb.deleteCharAt(index); + } + else { + index++; + } + } + return sb.toString(); + } + + /** + * Trim leading whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see java.lang.Character#isWhitespace + */ + public static String trimLeadingWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) { + sb.deleteCharAt(0); + } + return sb.toString(); + } + + /** + * Trim trailing whitespace from the given String. + * @param str the String to check + * @return the trimmed String + * @see java.lang.Character#isWhitespace + */ + public static String trimTrailingWhitespace(String str) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + /** + * Trim all occurences of the supplied leading character from the given String. + * @param str the String to check + * @param leadingCharacter the leading character to be trimmed + * @return the trimmed String + */ + public static String trimLeadingCharacter(String str, char leadingCharacter) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && sb.charAt(0) == leadingCharacter) { + sb.deleteCharAt(0); + } + return sb.toString(); + } + + /** + * Trim all occurences of the supplied trailing character from the given String. + * @param str the String to check + * @param trailingCharacter the trailing character to be trimmed + * @return the trimmed String + */ + public static String trimTrailingCharacter(String str, char trailingCharacter) { + if (!hasLength(str)) { + return str; + } + StringBuilder sb = new StringBuilder(str); + while (sb.length() > 0 && sb.charAt(sb.length() - 1) == trailingCharacter) { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + + /** + * Test if the given String starts with the specified prefix, + * ignoring upper/lower case. + * @param str the String to check + * @param prefix the prefix to look for + * @see java.lang.String#startsWith + */ + public static boolean startsWithIgnoreCase(String str, String prefix) { + if (str == null || prefix == null) { + return false; + } + if (str.startsWith(prefix)) { + return true; + } + if (str.length() < prefix.length()) { + return false; + } + String lcStr = str.substring(0, prefix.length()).toLowerCase(); + String lcPrefix = prefix.toLowerCase(); + return lcStr.equals(lcPrefix); + } + + /** + * Test if the given String ends with the specified suffix, + * ignoring upper/lower case. + * @param str the String to check + * @param suffix the suffix to look for + * @see java.lang.String#endsWith + */ + public static boolean endsWithIgnoreCase(String str, String suffix) { + if (str == null || suffix == null) { + return false; + } + if (str.endsWith(suffix)) { + return true; + } + if (str.length() < suffix.length()) { + return false; + } + + String lcStr = str.substring(str.length() - suffix.length()).toLowerCase(); + String lcSuffix = suffix.toLowerCase(); + return lcStr.equals(lcSuffix); + } + + /** + * Test whether the given string matches the given substring + * at the given index. + * @param str the original string (or StringBuilder) + * @param index the index in the original string to start matching against + * @param substring the substring to match at the given index + */ + public static boolean substringMatch(CharSequence str, int index, CharSequence substring) { + for (int j = 0; j < substring.length(); j++) { + int i = index + j; + if (i >= str.length() || str.charAt(i) != substring.charAt(j)) { + return false; + } + } + return true; + } + + /** + * Count the occurrences of the substring in string s. + * @param str string to search in. Return 0 if this is null. + * @param sub string to search for. Return 0 if this is null. + */ + public static int countOccurrencesOf(String str, String sub) { + if (str == null || sub == null || str.length() == 0 || sub.length() == 0) { + return 0; + } + int count = 0; + int pos = 0; + int idx; + while ((idx = str.indexOf(sub, pos)) != -1) { + ++count; + pos = idx + sub.length(); + } + return count; + } + + /** + * Replace all occurences of a substring within a string with + * another string. + * @param inString String to examine + * @param oldPattern String to replace + * @param newPattern String to insert + * @return a String with the replacements + */ + public static String replace(String inString, String oldPattern, String newPattern) { + if (!hasLength(inString) || !hasLength(oldPattern) || newPattern == null) { + return inString; + } + StringBuilder sb = new StringBuilder(); + int pos = 0; // our position in the old string + int index = inString.indexOf(oldPattern); + // the index of an occurrence we've found, or -1 + int patLen = oldPattern.length(); + while (index >= 0) { + sb.append(inString.substring(pos, index)); + sb.append(newPattern); + pos = index + patLen; + index = inString.indexOf(oldPattern, pos); + } + sb.append(inString.substring(pos)); + // remember to append any characters to the right of a match + return sb.toString(); + } + + /** + * Delete all occurrences of the given substring. + * @param inString the original String + * @param pattern the pattern to delete all occurrences of + * @return the resulting String + */ + public static String delete(String inString, String pattern) { + return replace(inString, pattern, ""); + } + + /** + * Delete any character in a given String. + * @param inString the original String + * @param charsToDelete a set of characters to delete. + * E.g. "az\n" will delete 'a's, 'z's and new lines. + * @return the resulting String + */ + public static String deleteAny(String inString, String charsToDelete) { + if (!hasLength(inString) || !hasLength(charsToDelete)) { + return inString; + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < inString.length(); i++) { + char c = inString.charAt(i); + if (charsToDelete.indexOf(c) == -1) { + sb.append(c); + } + } + return sb.toString(); + } + + + //--------------------------------------------------------------------- + // Convenience methods for working with formatted Strings + //--------------------------------------------------------------------- + + /** + * Quote the given String with single quotes. + * @param str the input String (e.g. "myString") + * @return the quoted String (e.g. "'myString'"), + * or null if the input was null + */ + public static String quote(String str) { + return (str != null ? "'" + str + "'" : null); + } + + /** + * Turn the given Object into a String with single quotes + * if it is a String; keeping the Object as-is else. + * @param obj the input Object (e.g. "myString") + * @return the quoted String (e.g. "'myString'"), + * or the input object as-is if not a String + */ + public static Object quoteIfString(Object obj) { + return (obj instanceof String ? quote((String) obj) : obj); + } + + /** + * Unqualify a string qualified by a '.' dot character. For example, + * "this.name.is.qualified", returns "qualified". + * @param qualifiedName the qualified name + */ + public static String unqualify(String qualifiedName) { + return unqualify(qualifiedName, '.'); + } + + /** + * Unqualify a string qualified by a separator character. For example, + * "this:name:is:qualified" returns "qualified" if using a ':' separator. + * @param qualifiedName the qualified name + * @param separator the separator + */ + public static String unqualify(String qualifiedName, char separator) { + return qualifiedName.substring(qualifiedName.lastIndexOf(separator) + 1); + } + + /** + * Capitalize a String, changing the first letter to + * upper case as per {@link Character#toUpperCase(char)}. + * No other letters are changed. + * @param str the String to capitalize, may be null + * @return the capitalized String, null if null + */ + public static String capitalize(String str) { + return changeFirstCharacterCase(str, true); + } + + /** + * Uncapitalize a String, changing the first letter to + * lower case as per {@link Character#toLowerCase(char)}. + * No other letters are changed. + * @param str the String to uncapitalize, may be null + * @return the uncapitalized String, null if null + */ + public static String uncapitalize(String str) { + return changeFirstCharacterCase(str, false); + } + + private static String changeFirstCharacterCase(String str, boolean capitalize) { + if (str == null || str.length() == 0) { + return str; + } + StringBuilder sb = new StringBuilder(str.length()); + if (capitalize) { + sb.append(Character.toUpperCase(str.charAt(0))); + } + else { + sb.append(Character.toLowerCase(str.charAt(0))); + } + sb.append(str.substring(1)); + return sb.toString(); + } + + /** + * Extract the filename from the given path, + * e.g. "mypath/myfile.txt" -> "myfile.txt". + * @param path the file path (may be null) + * @return the extracted filename, or null if none + */ + public static String getFilename(String path) { + if (path == null) { + return null; + } + int separatorIndex = path.lastIndexOf(FOLDER_SEPARATOR); + return (separatorIndex != -1 ? path.substring(separatorIndex + 1) : path); + } + + /** + * Extract the filename extension from the given path, + * e.g. "mypath/myfile.txt" -> "txt". + * @param path the file path (may be null) + * @return the extracted filename extension, or null if none + */ + public static String getFilenameExtension(String path) { + if (path == null) { + return null; + } + int extIndex = path.lastIndexOf(EXTENSION_SEPARATOR); + if (extIndex == -1) { + return null; + } + int folderIndex = path.lastIndexOf(FOLDER_SEPARATOR); + if (folderIndex > extIndex) { + return null; + } + return path.substring(extIndex + 1); + } + + /** + * Strip the filename extension from the given path, + * e.g. "mypath/myfile.txt" -> "mypath/myfile". + * @param path the file path (may be null) + * @return the path with stripped filename extension, + * or null if none + */ + public static String stripFilenameExtension(String path) { + if (path == null) { + return null; + } + int extIndex = path.lastIndexOf(EXTENSION_SEPARATOR); + if (extIndex == -1) { + return path; + } + int folderIndex = path.lastIndexOf(FOLDER_SEPARATOR); + if (folderIndex > extIndex) { + return path; + } + return path.substring(0, extIndex); + } + + /** + * Apply the given relative path to the given path, + * assuming standard Java folder separation (i.e. "/" separators). + * @param path the path to start from (usually a full file path) + * @param relativePath the relative path to apply + * (relative to the full file path above) + * @return the full file path that results from applying the relative path + */ + public static String applyRelativePath(String path, String relativePath) { + int separatorIndex = path.lastIndexOf(FOLDER_SEPARATOR); + if (separatorIndex != -1) { + String newPath = path.substring(0, separatorIndex); + if (!relativePath.startsWith(FOLDER_SEPARATOR)) { + newPath += FOLDER_SEPARATOR; + } + return newPath + relativePath; + } + else { + return relativePath; + } + } + + /** + * Normalize the path by suppressing sequences like "path/.." and + * inner simple dots. + *

    The result is convenient for path comparison. For other uses, + * notice that Windows separators ("\") are replaced by simple slashes. + * @param path the original path + * @return the normalized path + */ + public static String cleanPath(String path) { + if (path == null) { + return null; + } + String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); + + // Strip prefix from path to analyze, to not treat it as part of the + // first path element. This is necessary to correctly parse paths like + // "file:core/../core/io/Resource.class", where the ".." should just + // strip the first "core" directory while keeping the "file:" prefix. + int prefixIndex = pathToUse.indexOf(":"); + String prefix = ""; + if (prefixIndex != -1) { + prefix = pathToUse.substring(0, prefixIndex + 1); + pathToUse = pathToUse.substring(prefixIndex + 1); + } + if (pathToUse.startsWith(FOLDER_SEPARATOR)) { + prefix = prefix + FOLDER_SEPARATOR; + pathToUse = pathToUse.substring(1); + } + + String[] pathArray = delimitedListToStringArray(pathToUse, FOLDER_SEPARATOR); + List pathElements = new LinkedList(); + int tops = 0; + + for (int i = pathArray.length - 1; i >= 0; i--) { + String element = pathArray[i]; + if (CURRENT_PATH.equals(element)) { + // Points to current directory - drop it. + } + else if (TOP_PATH.equals(element)) { + // Registering top path found. + tops++; + } + else { + if (tops > 0) { + // Merging path element with element corresponding to top path. + tops--; + } + else { + // Normal path element found. + pathElements.add(0, element); + } + } + } + + // Remaining top paths need to be retained. + for (int i = 0; i < tops; i++) { + pathElements.add(0, TOP_PATH); + } + + return prefix + collectionToDelimitedString(pathElements, FOLDER_SEPARATOR); + } + + /** + * Compare two paths after normalization of them. + * @param path1 first path for comparison + * @param path2 second path for comparison + * @return whether the two paths are equivalent after normalization + */ + public static boolean pathEquals(String path1, String path2) { + return cleanPath(path1).equals(cleanPath(path2)); + } + + /** + * Parse the given localeString value into a {@link java.util.Locale}. + *

    This is the inverse operation of {@link java.util.Locale#toString Locale's toString}. + * @param localeString the locale string, following Locale's + * toString() format ("en", "en_UK", etc); + * also accepts spaces as separators, as an alternative to underscores + * @return a corresponding Locale instance + */ + public static Locale parseLocaleString(String localeString) { + String[] parts = tokenizeToStringArray(localeString, "_ ", false, false); + String language = (parts.length > 0 ? parts[0] : ""); + String country = (parts.length > 1 ? parts[1] : ""); + validateLocalePart(language); + validateLocalePart(country); + String variant = ""; + if (parts.length >= 2) { + // There is definitely a variant, and it is everything after the country + // code sans the separator between the country code and the variant. + int endIndexOfCountryCode = localeString.indexOf(country) + country.length(); + // Strip off any leading '_' and whitespace, what's left is the variant. + variant = trimLeadingWhitespace(localeString.substring(endIndexOfCountryCode)); + if (variant.startsWith("_")) { + variant = trimLeadingCharacter(variant, '_'); + } + } + return (language.length() > 0 ? new Locale(language, country, variant) : null); + } + + private static void validateLocalePart(String localePart) { + for (int i = 0; i < localePart.length(); i++) { + char ch = localePart.charAt(i); + if (ch != '_' && ch != ' ' && !Character.isLetterOrDigit(ch)) { + throw new IllegalArgumentException( + "Locale part \"" + localePart + "\" contains invalid characters"); + } + } + } + + /** + * Determine the RFC 3066 compliant language tag, + * as used for the HTTP "Accept-Language" header. + * @param locale the Locale to transform to a language tag + * @return the RFC 3066 compliant language tag as String + */ + public static String toLanguageTag(Locale locale) { + return locale.getLanguage() + (hasText(locale.getCountry()) ? "-" + locale.getCountry() : ""); + } + + + //--------------------------------------------------------------------- + // Convenience methods for working with String arrays + //--------------------------------------------------------------------- + + /** + * Append the given String to the given String array, returning a new array + * consisting of the input array contents plus the given String. + * @param array the array to append to (can be null) + * @param str the String to append + * @return the new array (never null) + */ + public static String[] addStringToArray(String[] array, String str) { + if (Objects.isEmpty(array)) { + return new String[] {str}; + } + String[] newArr = new String[array.length + 1]; + System.arraycopy(array, 0, newArr, 0, array.length); + newArr[array.length] = str; + return newArr; + } + + /** + * Concatenate the given String arrays into one, + * with overlapping array elements included twice. + *

    The order of elements in the original arrays is preserved. + * @param array1 the first array (can be null) + * @param array2 the second array (can be null) + * @return the new array (null if both given arrays were null) + */ + public static String[] concatenateStringArrays(String[] array1, String[] array2) { + if (Objects.isEmpty(array1)) { + return array2; + } + if (Objects.isEmpty(array2)) { + return array1; + } + String[] newArr = new String[array1.length + array2.length]; + System.arraycopy(array1, 0, newArr, 0, array1.length); + System.arraycopy(array2, 0, newArr, array1.length, array2.length); + return newArr; + } + + /** + * Merge the given String arrays into one, with overlapping + * array elements only included once. + *

    The order of elements in the original arrays is preserved + * (with the exception of overlapping elements, which are only + * included on their first occurrence). + * @param array1 the first array (can be null) + * @param array2 the second array (can be null) + * @return the new array (null if both given arrays were null) + */ + public static String[] mergeStringArrays(String[] array1, String[] array2) { + if (Objects.isEmpty(array1)) { + return array2; + } + if (Objects.isEmpty(array2)) { + return array1; + } + List result = new ArrayList(); + result.addAll(Arrays.asList(array1)); + for (String str : array2) { + if (!result.contains(str)) { + result.add(str); + } + } + return toStringArray(result); + } + + /** + * Turn given source String array into sorted array. + * @param array the source array + * @return the sorted array (never null) + */ + public static String[] sortStringArray(String[] array) { + if (Objects.isEmpty(array)) { + return new String[0]; + } + Arrays.sort(array); + return array; + } + + /** + * Copy the given Collection into a String array. + * The Collection must contain String elements only. + * @param collection the Collection to copy + * @return the String array (null if the passed-in + * Collection was null) + */ + public static String[] toStringArray(Collection collection) { + if (collection == null) { + return null; + } + return collection.toArray(new String[collection.size()]); + } + + /** + * Copy the given Enumeration into a String array. + * The Enumeration must contain String elements only. + * @param enumeration the Enumeration to copy + * @return the String array (null if the passed-in + * Enumeration was null) + */ + public static String[] toStringArray(Enumeration enumeration) { + if (enumeration == null) { + return null; + } + List list = java.util.Collections.list(enumeration); + return list.toArray(new String[list.size()]); + } + + /** + * Trim the elements of the given String array, + * calling String.trim() on each of them. + * @param array the original String array + * @return the resulting array (of the same size) with trimmed elements + */ + public static String[] trimArrayElements(String[] array) { + if (Objects.isEmpty(array)) { + return new String[0]; + } + String[] result = new String[array.length]; + for (int i = 0; i < array.length; i++) { + String element = array[i]; + result[i] = (element != null ? element.trim() : null); + } + return result; + } + + /** + * Remove duplicate Strings from the given array. + * Also sorts the array, as it uses a TreeSet. + * @param array the String array + * @return an array without duplicates, in natural sort order + */ + public static String[] removeDuplicateStrings(String[] array) { + if (Objects.isEmpty(array)) { + return array; + } + Set set = new TreeSet(); + for (String element : array) { + set.add(element); + } + return toStringArray(set); + } + + /** + * Split a String at the first occurrence of the delimiter. + * Does not include the delimiter in the result. + * @param toSplit the string to split + * @param delimiter to split the string up with + * @return a two element array with index 0 being before the delimiter, and + * index 1 being after the delimiter (neither element includes the delimiter); + * or null if the delimiter wasn't found in the given input String + */ + public static String[] split(String toSplit, String delimiter) { + if (!hasLength(toSplit) || !hasLength(delimiter)) { + return null; + } + int offset = toSplit.indexOf(delimiter); + if (offset < 0) { + return null; + } + String beforeDelimiter = toSplit.substring(0, offset); + String afterDelimiter = toSplit.substring(offset + delimiter.length()); + return new String[] {beforeDelimiter, afterDelimiter}; + } + + /** + * Take an array Strings and split each element based on the given delimiter. + * A Properties instance is then generated, with the left of the + * delimiter providing the key, and the right of the delimiter providing the value. + *

    Will trim both the key and value before adding them to the + * Properties instance. + * @param array the array to process + * @param delimiter to split each element using (typically the equals symbol) + * @return a Properties instance representing the array contents, + * or null if the array to process was null or empty + */ + public static Properties splitArrayElementsIntoProperties(String[] array, String delimiter) { + return splitArrayElementsIntoProperties(array, delimiter, null); + } + + /** + * Take an array Strings and split each element based on the given delimiter. + * A Properties instance is then generated, with the left of the + * delimiter providing the key, and the right of the delimiter providing the value. + *

    Will trim both the key and value before adding them to the + * Properties instance. + * @param array the array to process + * @param delimiter to split each element using (typically the equals symbol) + * @param charsToDelete one or more characters to remove from each element + * prior to attempting the split operation (typically the quotation mark + * symbol), or null if no removal should occur + * @return a Properties instance representing the array contents, + * or null if the array to process was null or empty + */ + public static Properties splitArrayElementsIntoProperties( + String[] array, String delimiter, String charsToDelete) { + + if (Objects.isEmpty(array)) { + return null; + } + Properties result = new Properties(); + for (String element : array) { + if (charsToDelete != null) { + element = deleteAny(element, charsToDelete); + } + String[] splittedElement = split(element, delimiter); + if (splittedElement == null) { + continue; + } + result.setProperty(splittedElement[0].trim(), splittedElement[1].trim()); + } + return result; + } + + /** + * Tokenize the given String into a String array via a StringTokenizer. + * Trims tokens and omits empty tokens. + *

    The given delimiters string is supposed to consist of any number of + * delimiter characters. Each of those characters can be used to separate + * tokens. A delimiter is always a single character; for multi-character + * delimiters, consider using delimitedListToStringArray + * @param str the String to tokenize + * @param delimiters the delimiter characters, assembled as String + * (each of those characters is individually considered as delimiter). + * @return an array of the tokens + * @see java.util.StringTokenizer + * @see java.lang.String#trim() + * @see #delimitedListToStringArray + */ + public static String[] tokenizeToStringArray(String str, String delimiters) { + return tokenizeToStringArray(str, delimiters, true, true); + } + + /** + * Tokenize the given String into a String array via a StringTokenizer. + *

    The given delimiters string is supposed to consist of any number of + * delimiter characters. Each of those characters can be used to separate + * tokens. A delimiter is always a single character; for multi-character + * delimiters, consider using delimitedListToStringArray + * @param str the String to tokenize + * @param delimiters the delimiter characters, assembled as String + * (each of those characters is individually considered as delimiter) + * @param trimTokens trim the tokens via String's trim + * @param ignoreEmptyTokens omit empty tokens from the result array + * (only applies to tokens that are empty after trimming; StringTokenizer + * will not consider subsequent delimiters as token in the first place). + * @return an array of the tokens (null if the input String + * was null) + * @see java.util.StringTokenizer + * @see java.lang.String#trim() + * @see #delimitedListToStringArray + */ + public static String[] tokenizeToStringArray( + String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) { + + if (str == null) { + return null; + } + StringTokenizer st = new StringTokenizer(str, delimiters); + List tokens = new ArrayList(); + while (st.hasMoreTokens()) { + String token = st.nextToken(); + if (trimTokens) { + token = token.trim(); + } + if (!ignoreEmptyTokens || token.length() > 0) { + tokens.add(token); + } + } + return toStringArray(tokens); + } + + /** + * Take a String which is a delimited list and convert it to a String array. + *

    A single delimiter can consists of more than one character: It will still + * be considered as single delimiter string, rather than as bunch of potential + * delimiter characters - in contrast to tokenizeToStringArray. + * @param str the input String + * @param delimiter the delimiter between elements (this is a single delimiter, + * rather than a bunch individual delimiter characters) + * @return an array of the tokens in the list + * @see #tokenizeToStringArray + */ + public static String[] delimitedListToStringArray(String str, String delimiter) { + return delimitedListToStringArray(str, delimiter, null); + } + + /** + * Take a String which is a delimited list and convert it to a String array. + *

    A single delimiter can consists of more than one character: It will still + * be considered as single delimiter string, rather than as bunch of potential + * delimiter characters - in contrast to tokenizeToStringArray. + * @param str the input String + * @param delimiter the delimiter between elements (this is a single delimiter, + * rather than a bunch individual delimiter characters) + * @param charsToDelete a set of characters to delete. Useful for deleting unwanted + * line breaks: e.g. "\r\n\f" will delete all new lines and line feeds in a String. + * @return an array of the tokens in the list + * @see #tokenizeToStringArray + */ + public static String[] delimitedListToStringArray(String str, String delimiter, String charsToDelete) { + if (str == null) { + return new String[0]; + } + if (delimiter == null) { + return new String[] {str}; + } + List result = new ArrayList(); + if ("".equals(delimiter)) { + for (int i = 0; i < str.length(); i++) { + result.add(deleteAny(str.substring(i, i + 1), charsToDelete)); + } + } + else { + int pos = 0; + int delPos; + while ((delPos = str.indexOf(delimiter, pos)) != -1) { + result.add(deleteAny(str.substring(pos, delPos), charsToDelete)); + pos = delPos + delimiter.length(); + } + if (str.length() > 0 && pos <= str.length()) { + // Add rest of String, but not in case of empty input. + result.add(deleteAny(str.substring(pos), charsToDelete)); + } + } + return toStringArray(result); + } + + /** + * Convert a CSV list into an array of Strings. + * @param str the input String + * @return an array of Strings, or the empty array in case of empty input + */ + public static String[] commaDelimitedListToStringArray(String str) { + return delimitedListToStringArray(str, ","); + } + + /** + * Convenience method to convert a CSV string list to a set. + * Note that this will suppress duplicates. + * @param str the input String + * @return a Set of String entries in the list + */ + public static Set commaDelimitedListToSet(String str) { + Set set = new TreeSet(); + String[] tokens = commaDelimitedListToStringArray(str); + for (String token : tokens) { + set.add(token); + } + return set; + } + + /** + * Convenience method to return a Collection as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param coll the Collection to display + * @param delim the delimiter to use (probably a ",") + * @param prefix the String to start each element with + * @param suffix the String to end each element with + * @return the delimited String + */ + public static String collectionToDelimitedString(Collection coll, String delim, String prefix, String suffix) { + if (Collections.isEmpty(coll)) { + return ""; + } + StringBuilder sb = new StringBuilder(); + Iterator it = coll.iterator(); + while (it.hasNext()) { + sb.append(prefix).append(it.next()).append(suffix); + if (it.hasNext()) { + sb.append(delim); + } + } + return sb.toString(); + } + + /** + * Convenience method to return a Collection as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param coll the Collection to display + * @param delim the delimiter to use (probably a ",") + * @return the delimited String + */ + public static String collectionToDelimitedString(Collection coll, String delim) { + return collectionToDelimitedString(coll, delim, "", ""); + } + + /** + * Convenience method to return a Collection as a CSV String. + * E.g. useful for toString() implementations. + * @param coll the Collection to display + * @return the delimited String + */ + public static String collectionToCommaDelimitedString(Collection coll) { + return collectionToDelimitedString(coll, ","); + } + + /** + * Convenience method to return a String array as a delimited (e.g. CSV) + * String. E.g. useful for toString() implementations. + * @param arr the array to display + * @param delim the delimiter to use (probably a ",") + * @return the delimited String + */ + public static String arrayToDelimitedString(Object[] arr, String delim) { + if (Objects.isEmpty(arr)) { + return ""; + } + if (arr.length == 1) { + return Objects.nullSafeToString(arr[0]); + } + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < arr.length; i++) { + if (i > 0) { + sb.append(delim); + } + sb.append(arr[i]); + } + return sb.toString(); + } + + /** + * Convenience method to return a String array as a CSV String. + * E.g. useful for toString() implementations. + * @param arr the array to display + * @return the delimited String + */ + public static String arrayToCommaDelimitedString(Object[] arr) { + return arrayToDelimitedString(arr, ","); + } + +} + diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/UnknownClassException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/UnknownClassException.java new file mode 100644 index 000000000000..07b44d9fcab5 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/lang/UnknownClassException.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.lang; + +/** + * A RuntimeException equivalent of the JDK's + * ClassNotFoundException, to maintain a RuntimeException paradigm. + * + * @since 0.1 + */ +public class UnknownClassException extends RuntimeException { + + /* + /** + * Creates a new UnknownClassException. + * + public UnknownClassException() { + super(); + }*/ + + /** + * Constructs a new UnknownClassException. + * + * @param message the reason for the exception + */ + public UnknownClassException(String message) { + super(message); + } + + /* + * Constructs a new UnknownClassException. + * + * @param cause the underlying Throwable that caused this exception to be thrown. + * + public UnknownClassException(Throwable cause) { + super(cause); + } + */ + + /** + * Constructs a new UnknownClassException. + * + * @param message the reason for the exception + * @param cause the underlying Throwable that caused this exception to be thrown. + */ + public UnknownClassException(String message, Throwable cause) { + // TODO: remove in v1.0, this constructor is only exposed to allow for backward compatible behavior + super(message, cause); + } + +} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/InvalidKeyException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/InvalidKeyException.java new file mode 100644 index 000000000000..2e3b84b8af15 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/InvalidKeyException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +/** + * @since 0.10.0 + */ +public class InvalidKeyException extends KeyException { + + public InvalidKeyException(String message) { + super(message); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/KeyException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/KeyException.java new file mode 100644 index 000000000000..0db219245735 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/KeyException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +/** + * @since 0.10.0 + */ +public class KeyException extends SecurityException { + + public KeyException(String message) { + super(message); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/Keys.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/Keys.java new file mode 100644 index 000000000000..cb4784248932 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/Keys.java @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +import io.jsonwebtoken.SignatureAlgorithm; +import io.jsonwebtoken.lang.Assert; +import io.jsonwebtoken.lang.Classes; + +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.security.KeyPair; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * Utility class for securely generating {@link SecretKey}s and {@link KeyPair}s. + * + * @since 0.10.0 + */ +public final class Keys { + + private static final String MAC = "io.jsonwebtoken.impl.crypto.MacProvider"; + private static final String RSA = "io.jsonwebtoken.impl.crypto.RsaProvider"; + private static final String EC = "io.jsonwebtoken.impl.crypto.EllipticCurveProvider"; + + private static final Class[] SIG_ARG_TYPES = new Class[]{SignatureAlgorithm.class}; + + //purposefully ordered higher to lower: + private static final List PREFERRED_HMAC_ALGS = Collections.unmodifiableList(Arrays.asList( + SignatureAlgorithm.HS512, SignatureAlgorithm.HS384, SignatureAlgorithm.HS256)); + + //prevent instantiation + private Keys() { + } + + /* + public static final int bitLength(Key key) throws IllegalArgumentException { + Assert.notNull(key, "Key cannot be null."); + if (key instanceof SecretKey) { + byte[] encoded = key.getEncoded(); + return Arrays.length(encoded) * 8; + } else if (key instanceof RSAKey) { + return ((RSAKey)key).getModulus().bitLength(); + } else if (key instanceof ECKey) { + return ((ECKey)key).getParams().getOrder().bitLength(); + } + + throw new IllegalArgumentException("Unsupported key type: " + key.getClass().getName()); + } + */ + + /** + * Creates a new SecretKey instance for use with HMAC-SHA algorithms based on the specified key byte array. + * + * @param bytes the key byte array + * @return a new SecretKey instance for use with HMAC-SHA algorithms based on the specified key byte array. + * @throws WeakKeyException if the key byte array length is less than 256 bits (32 bytes) as mandated by the + * JWT JWA Specification + * (RFC 7518, Section 3.2) + */ + public static SecretKey hmacShaKeyFor(byte[] bytes) throws WeakKeyException { + + if (bytes == null) { + throw new InvalidKeyException("SecretKey byte array cannot be null."); + } + + int bitLength = bytes.length * 8; + + for (SignatureAlgorithm alg : PREFERRED_HMAC_ALGS) { + if (bitLength >= alg.getMinKeyLength()) { + return new SecretKeySpec(bytes, alg.getJcaName()); + } + } + + String msg = "The specified key byte array is " + bitLength + " bits which " + + "is not secure enough for any JWT HMAC-SHA algorithm. The JWT " + + "JWA Specification (RFC 7518, Section 3.2) states that keys used with HMAC-SHA algorithms MUST have a " + + "size >= 256 bits (the key size must be greater than or equal to the hash " + + "output size). Consider using the " + Keys.class.getName() + "#secretKeyFor(SignatureAlgorithm) method " + + "to create a key guaranteed to be secure enough for your preferred HMAC-SHA algorithm. See " + + "https://tools.ietf.org/html/rfc7518#section-3.2 for more information."; + throw new WeakKeyException(msg); + } + + /** + * Returns a new {@link SecretKey} with a key length suitable for use with the specified {@link SignatureAlgorithm}. + * + *

    JWA Specification (RFC 7518), Section 3.2 + * requires minimum key lengths to be used for each respective Signature Algorithm. This method returns a + * secure-random generated SecretKey that adheres to the required minimum key length. The lengths are:

    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    AlgorithmKey Length
    HS256256 bits (32 bytes)
    HS384384 bits (48 bytes)
    HS512512 bits (64 bytes)
    + * + * @param alg the {@code SignatureAlgorithm} to inspect to determine which key length to use. + * @return a new {@link SecretKey} instance suitable for use with the specified {@link SignatureAlgorithm}. + * @throws IllegalArgumentException for any input value other than {@link SignatureAlgorithm#HS256}, + * {@link SignatureAlgorithm#HS384}, or {@link SignatureAlgorithm#HS512} + */ + public static SecretKey secretKeyFor(SignatureAlgorithm alg) throws IllegalArgumentException { + Assert.notNull(alg, "SignatureAlgorithm cannot be null."); + switch (alg) { + case HS256: + case HS384: + case HS512: + return Classes.invokeStatic(MAC, "generateKey", SIG_ARG_TYPES, alg); + default: + String msg = "The " + alg.name() + " algorithm does not support shared secret keys."; + throw new IllegalArgumentException(msg); + } + } + + /** + * Returns a new {@link KeyPair} suitable for use with the specified asymmetric algorithm. + * + *

    If the {@code alg} argument is an RSA algorithm, a KeyPair is generated based on the following:

    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    JWA AlgorithmKey Size
    RS2562048 bits
    PS2562048 bits
    RS3843072 bits
    PS3843072 bits
    RS5124096 bits
    PS5124096 bits
    + * + *

    If the {@code alg} argument is an Elliptic Curve algorithm, a KeyPair is generated based on the following:

    + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    JWA AlgorithmKey SizeJWA Curve NameASN1 OID Curve Name
    EC256256 bits{@code P-256}{@code secp256r1}
    EC384384 bits{@code P-384}{@code secp384r1}
    EC512512 bits{@code P-521}{@code secp521r1}
    + * + * @param alg the {@code SignatureAlgorithm} to inspect to determine which asymmetric algorithm to use. + * @return a new {@link KeyPair} suitable for use with the specified asymmetric algorithm. + * @throws IllegalArgumentException if {@code alg} is not an asymmetric algorithm + */ + public static KeyPair keyPairFor(SignatureAlgorithm alg) throws IllegalArgumentException { + Assert.notNull(alg, "SignatureAlgorithm cannot be null."); + switch (alg) { + case RS256: + case PS256: + case RS384: + case PS384: + case RS512: + case PS512: + return Classes.invokeStatic(RSA, "generateKeyPair", SIG_ARG_TYPES, alg); + case ES256: + case ES384: + case ES512: + return Classes.invokeStatic(EC, "generateKeyPair", SIG_ARG_TYPES, alg); + default: + String msg = "The " + alg.name() + " algorithm does not support Key Pairs."; + throw new IllegalArgumentException(msg); + } + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SecurityException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SecurityException.java new file mode 100644 index 000000000000..8b5f8abd87e3 --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SecurityException.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +import io.jsonwebtoken.JwtException; + +/** + * @since 0.10.0 + */ +public class SecurityException extends JwtException { + + public SecurityException(String message) { + super(message); + } + + public SecurityException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SignatureException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SignatureException.java new file mode 100644 index 000000000000..7cddb2cac36b --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/SignatureException.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +/** + * @since 0.10.0 + */ +public class SignatureException extends io.jsonwebtoken.SignatureException { + + public SignatureException(String message) { + super(message); + } + + public SignatureException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/WeakKeyException.java b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/WeakKeyException.java new file mode 100644 index 000000000000..8a7688fed8bf --- /dev/null +++ b/java/ql/test/experimental/stubs/jwtk-jjwt-0.11.2/io/jsonwebtoken/security/WeakKeyException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014 jsonwebtoken.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.jsonwebtoken.security; + +/** + * @since 0.10.0 + */ +public class WeakKeyException extends InvalidKeyException { + + public WeakKeyException(String message) { + super(message); + } +} From 885044e3317d3644ddeab5f5f6c4d9dc920f8c36 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 6 Apr 2021 01:01:57 +0200 Subject: [PATCH 0079/1662] [Java] Add tests for jwt signature check query. --- .../CWE-347/MissingJWTSignatureCheck.expected | 8 + .../CWE-347/MissingJWTSignatureCheck.java | 164 ++++++++++++++++++ .../CWE-347/MissingJWTSignatureCheck.qlref | 1 + 3 files changed, 173 insertions(+) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.qlref diff --git a/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.expected b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.expected new file mode 100644 index 000000000000..e93720fcea83 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.expected @@ -0,0 +1,8 @@ +| MissingJWTSignatureCheck.java:96:9:96:27 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:18:16:18:66 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:96:9:96:27 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:22:16:22:73 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:96:9:96:27 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:26:16:26:75 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:100:9:105:22 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:18:16:18:66 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:100:9:105:22 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:22:16:22:73 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:100:9:105:22 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:26:16:26:75 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:127:9:129:33 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:127:9:128:58 | setSigningKey(...) | here | +| MissingJWTSignatureCheck.java:133:9:140:22 | parse(...) | A signing key is set $@, but the signature is not verified. | MissingJWTSignatureCheck.java:133:9:134:58 | setSigningKey(...) | here | diff --git a/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.java b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.java new file mode 100644 index 000000000000..624dbb1d48da --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.java @@ -0,0 +1,164 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/jwtk-jjwt-0.11.2 + +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.Jwt; +import io.jsonwebtoken.Jws; +import io.jsonwebtoken.Header; +import io.jsonwebtoken.JwtParserBuilder; +import io.jsonwebtoken.JwtHandlerAdapter; +import io.jsonwebtoken.impl.DefaultJwtParser; + +public class MissingJWTSignatureCheck { + + + // SIGNED + + private JwtParser getASignedParser() { + return Jwts.parser().setSigningKey("someBase64EncodedKey"); + } + + private JwtParser getASignedParserFromParserBuilder() { + return Jwts.parserBuilder().setSigningKey("someBase64EncodedKey").build(); + } + + private JwtParser getASignedNewParser() { + return new DefaultJwtParser().setSigningKey("someBase64EncodedKey"); + } + + private void callSignedParsers() { + JwtParser parser1 = getASignedParser(); + badJwtOnParserBuilder(parser1, ""); + badJwtHandlerOnParserBuilder(parser1, ""); + goodJwtOnParserBuilder(parser1, ""); + goodJwtHandler(parser1, ""); + + JwtParser parser2 = getASignedParserFromParserBuilder(); + badJwtOnParserBuilder(parser2, ""); + badJwtHandlerOnParserBuilder(parser2, ""); + goodJwtOnParserBuilder(parser2, ""); + goodJwtHandler(parser2, ""); + + JwtParser parser3 = getASignedNewParser(); + badJwtOnParserBuilder(parser3, ""); + badJwtHandlerOnParserBuilder(parser3, ""); + goodJwtOnParserBuilder(parser3, ""); + goodJwtHandler(parser3, ""); + } + + // SIGNED END + + // UNSIGNED + + private JwtParser getAnUnsignedParser() { + return Jwts.parser(); + } + + private JwtParser getAnUnsignedParserFromParserBuilder() { + return Jwts.parserBuilder().build(); + } + + private JwtParser getAnUnsignedNewParser() { + return new DefaultJwtParser(); + } + + private void callUnsignedParsers() { + JwtParser parser1 = getAnUnsignedParser(); + badJwtOnParserBuilder(parser1, ""); + badJwtHandlerOnParserBuilder(parser1, ""); + goodJwtOnParserBuilder(parser1, ""); + goodJwtHandler(parser1, ""); + + JwtParser parser2 = getAnUnsignedParserFromParserBuilder(); + badJwtOnParserBuilder(parser2, ""); + badJwtHandlerOnParserBuilder(parser2, ""); + goodJwtOnParserBuilder(parser2, ""); + goodJwtHandler(parser2, ""); + + JwtParser parser3 = getAnUnsignedNewParser(); + badJwtOnParserBuilder(parser3, ""); + badJwtHandlerOnParserBuilder(parser3, ""); + goodJwtOnParserBuilder(parser3, ""); + goodJwtHandler(parser3, ""); + } + + private void signParserAfterParseCall() { + JwtParser parser = getAnUnsignedParser(); + parser.parse(""); // Should not be detected + parser.setSigningKey("someBase64EncodedKey"); + } + + // UNSIGNED END + + // INDIRECT + + private void badJwtOnParserBuilder(JwtParser parser, String token) { + parser.parse(token); // BAD: Does not verify the signature + } + + private void badJwtHandlerOnParserBuilder(JwtParser parser, String token) { + parser.parse(token, new JwtHandlerAdapter>() { // BAD: The handler is called on an unverified JWT + @Override + public Jwt onPlaintextJwt(Jwt jwt) { + return jwt; + } + }); + } + + private void goodJwtOnParserBuilder(JwtParser parser, String token) { + parser.parseClaimsJws(token) // GOOD: Verify the signature + .getBody(); + } + + private void goodJwtHandler(JwtParser parser, String token) { + parser.parse(token, new JwtHandlerAdapter>() { // GOOD: The handler is called on a verified JWS + @Override + public Jws onPlaintextJws(Jws jws) { + return jws; + } + }); + } + + // INDIRECT END + + // DIRECT + + private void badJwtOnParserBuilder(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parse(token); // BAD: Does not verify the signature + } + + private void badJwtHandlerOnParser(String token) { + Jwts.parser() + .setSigningKey("someBase64EncodedKey") + .parse(token, new JwtHandlerAdapter>() { // BAD: The handler is called on an unverified JWT + @Override + public Jwt onPlaintextJwt(Jwt jwt) { + return jwt; + } + }); + } + + private void goodJwtOnParser(String token) { + Jwts.parser() + .setSigningKey("someBase64EncodedKey") + .parseClaimsJws(token) // GOOD: Verify the signature + .getBody(); + } + + private void goodJwtHandlerOnParserBuilder(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parse(token, new JwtHandlerAdapter>() { // GOOD: The handler is called on a verified JWS + @Override + public Jws onPlaintextJws(Jws jws) { + return jws; + } + }); + } + + // DIRECT END + + +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.qlref b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.qlref new file mode 100644 index 000000000000..67e7bf3e158c --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-347/MissingJWTSignatureCheck.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.ql \ No newline at end of file From 1bcb9cd7c0f9be99c8c30e7bf4d4fea93722efb7 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Tue, 6 Apr 2021 15:42:56 +0200 Subject: [PATCH 0080/1662] Simplify query --- .../Security/CWE-090/LDAPInjection.ql | 12 ++++------- .../experimental/semmle/python/Concepts.qll | 5 ----- .../semmle/python/frameworks/Stdlib.qll | 19 ++++------------- .../security/injection/LDAPInjection.qll | 21 +------------------ 4 files changed, 9 insertions(+), 48 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 8d01fc173d4a..945a7b94473d 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -14,11 +14,7 @@ import python import experimental.semmle.python.security.injection.LDAPInjection import DataFlow::PathGraph -from - LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink, - LDAPInjectionSink castedSink -where - config.hasFlowPath(source, sink) and - castedSink.getLDAPNode() = sink.getNode() -select sink.getNode(), source, sink, "$@ LDAP query executes $@ as a $@.", castedSink, "This", - source.getNode(), "a user-provided value", castedSink.getLDAPNode(), castedSink.getLDAPPart() +from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink +where config.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "$@ LDAP query parameter comes from $@.", sink.getNode(), + "This", source.getNode(), "a user-provided value" diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index e62d9680665b..9022f9c38182 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -13,13 +13,10 @@ private import semmle.python.dataflow.new.DataFlow private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.TaintTracking private import experimental.semmle.python.Frameworks -private import semmle.python.ApiGraphs module LDAPQuery { abstract class Range extends DataFlow::Node { abstract DataFlow::Node getLDAPNode(); - - abstract string getLDAPPart(); } } @@ -29,8 +26,6 @@ class LDAPQuery extends DataFlow::Node { LDAPQuery() { this = range } DataFlow::Node getLDAPNode() { result = range.getLDAPNode() } - - string getLDAPPart() { result = range.getLDAPPart() } } module LDAPEscape { diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index cfd02b8b5a55..5a7984fab43a 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -20,7 +20,6 @@ private module LDAP { private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; - string ldapPart; LDAP2Query() { exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode initCall | @@ -29,21 +28,17 @@ private module LDAP { initCall = searchMethod.getObject().getALocalSource() and searchMethod.getAttributeName() instanceof LDAP2QueryMethods and ( - ldapNode = this.getArg(0) and - ldapPart = "DN" + ldapNode = this.getArg(0) or ( ldapNode = this.getArg(2) or ldapNode = this.getArgByName("filterstr") - ) and - ldapPart = "search_filter" + ) ) ) } override DataFlow::Node getLDAPNode() { result = ldapNode } - - override string getLDAPPart() { result = ldapPart } } private class LDAP2EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { @@ -71,7 +66,6 @@ private module LDAP { private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; - string ldapPart; LDAP3Query() { exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode connCall | @@ -80,18 +74,13 @@ private module LDAP { connCall = searchMethod.getObject().getALocalSource() and searchMethod.getAttributeName() instanceof LDAP3QueryMethods and ( - ldapNode = this.getArg(0) and - ldapPart = "DN" + ldapNode = this.getArg(0) or + ldapNode = this.getArg(1) ) - or - ldapNode = this.getArg(1) and - ldapPart = "search_filter" ) } override DataFlow::Node getLDAPNode() { result = ldapNode } - - override string getLDAPPart() { result = ldapPart } } private class LDAP3EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll index da71f38457af..febebe0a8fd8 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll @@ -8,23 +8,6 @@ import semmle.python.dataflow.new.DataFlow import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources -class LDAPInjectionSink extends DataFlow::Node { - DataFlow::Node ldapNode; - string ldapPart; - - LDAPInjectionSink() { - exists(LDAPQuery ldapQuery | - this = ldapQuery and - ldapNode = ldapQuery.getLDAPNode() and - ldapPart = ldapQuery.getLDAPPart() - ) - } - - DataFlow::Node getLDAPNode() { result = ldapNode } - - string getLDAPPart() { result = ldapPart } -} - /** * A taint-tracking configuration for detecting regular expression injections. */ @@ -33,9 +16,7 @@ class LDAPInjectionFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - sink = any(LDAPInjectionSink ldapInjSink).getLDAPNode() - } + override predicate isSink(DataFlow::Node sink) { sink = any(LDAPQuery ldapQuery).getLDAPNode() } override predicate isSanitizer(DataFlow::Node sanitizer) { sanitizer = any(LDAPEscape ldapEsc).getEscapeNode() From acf8fd0f038aaafed40c7d3e8643024dcc2a8f97 Mon Sep 17 00:00:00 2001 From: yoff Date: Tue, 6 Apr 2021 22:45:03 +0200 Subject: [PATCH 0081/1662] Apply suggestions from code review Co-authored-by: Rasmus Wriedt Larsen --- .../src/Security/CWE-327/FluentApiModel.qll | 22 ++++++++---------- python/ql/src/Security/CWE-327/Ssl.qll | 23 ++++--------------- .../src/Security/CWE-327/TlsLibraryModel.qll | 2 +- 3 files changed, 16 insertions(+), 31 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 803b7adab40e..c6836ba60579 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -3,7 +3,8 @@ import TlsLibraryModel /** * Configuration to determine the state of a context being used to create - * a conection. + * a conection. There is one configuration for each pair of `TlsLibrary` and `ProtocolVersion`, + * such that a single configuration only tracks contexts where a specific `ProtocolVersion` is allowed. * * The state is in terms of whether a specific protocol is allowed. This is * either true or false when the context is created and can then be modified @@ -72,20 +73,18 @@ predicate unsafe_connection_creation_with_context( boolean specific ) { // Connection created from a context allowing `insecure_version`. - exists(InsecureContextConfiguration c, ProtocolUnrestriction co | - c.hasFlow(co, connectionCreation) + exists(InsecureContextConfiguration c | + c.hasFlow(contextOrigin, connectionCreation) | insecure_version = c.getTrackedVersion() and - contextOrigin = co and + contextOrigin instanceof ProtocolUnrestriction and specific = false ) or // Connection created from a context specifying `insecure_version`. - exists(TlsLibrary l, DataFlow::CfgNode cc | - cc = l.insecure_connection_creation(insecure_version) - | - connectionCreation = cc and - contextOrigin = cc and + exists(TlsLibrary l | + connectionCreation = l.insecure_connection_creation(insecure_version) and + contextOrigin = connectionCreation and specific = true ) } @@ -105,7 +104,6 @@ predicate unsafe_connection_creation_without_context( /** Holds if `contextCreation` is creating a context ties to a specific insecure version. */ predicate unsafe_context_creation(DataFlow::CallCfgNode contextCreation, string insecure_version) { - exists(TlsLibrary l, ContextCreation cc | cc = l.insecure_context_creation(insecure_version) | - contextCreation = cc - ) + contextCreation instanceof ContextCreation and + exists(TlsLibrary l | contextCreation = l.insecure_context_creation(insecure_version)) } diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 928a5f74e2d3..9def499fb118 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -23,30 +23,17 @@ class SSLDefaultContextCreation extends ContextCreation { } /** Gets a reference to an `ssl.Context` instance. */ -private DataFlow::LocalSourceNode sslContextInstance(DataFlow::TypeTracker t) { - t.start() and - result = API::moduleImport("ssl").getMember(["SSLContext", "create_default_context"]).getACall() - or - exists(DataFlow::TypeTracker t2 | result = sslContextInstance(t2).track(t2, t)) -} - -/** Gets a reference to an `ssl.Context` instance. */ -DataFlow::Node sslContextInstance() { - sslContextInstance(DataFlow::TypeTracker::end()).flowsTo(result) +API::Node sslContextInstance() { + result = API::moduleImport("ssl").getMember(["SSLContext", "create_default_context"]).getReturn() } -class WrapSocketCall extends ConnectionCreation { - override CallNode node; - +class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { WrapSocketCall() { - exists(DataFlow::AttrRead call | node.getFunction() = call.asCfgNode() | - call.getAttributeName() = "wrap_socket" and - call.getObject() = sslContextInstance() - ) + this = sslContextInstance().getMember("wrap_socket").getACall() } override DataFlow::CfgNode getContext() { - result.getNode() = node.getFunction().(AttrNode).getObject() + result = this.getFunction().(DataFlow::AttrRead).getObject() } } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 245a60b02955..73ab52be8070 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -84,7 +84,7 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest } } -/** A model of a TLS library. */ +/** A model of a SSL/TLS library. */ abstract class TlsLibrary extends string { TlsLibrary() { this in ["ssl", "pyOpenSSL"] } From 062668444220f9b00476c92df3dd1c6b52b33148 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 6 Apr 2021 22:55:32 +0200 Subject: [PATCH 0082/1662] Python: small cleanups enabled by review --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index c6836ba60579..652a4bae2a10 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -3,7 +3,7 @@ import TlsLibraryModel /** * Configuration to determine the state of a context being used to create - * a conection. There is one configuration for each pair of `TlsLibrary` and `ProtocolVersion`, + * a connection. There is one configuration for each pair of `TlsLibrary` and `ProtocolVersion`, * such that a single configuration only tracks contexts where a specific `ProtocolVersion` is allowed. * * The state is in terms of whether a specific protocol is allowed. This is @@ -73,11 +73,8 @@ predicate unsafe_connection_creation_with_context( boolean specific ) { // Connection created from a context allowing `insecure_version`. - exists(InsecureContextConfiguration c | - c.hasFlow(contextOrigin, connectionCreation) - | + exists(InsecureContextConfiguration c | c.hasFlow(contextOrigin, connectionCreation) | insecure_version = c.getTrackedVersion() and - contextOrigin instanceof ProtocolUnrestriction and specific = false ) or @@ -104,6 +101,5 @@ predicate unsafe_connection_creation_without_context( /** Holds if `contextCreation` is creating a context ties to a specific insecure version. */ predicate unsafe_context_creation(DataFlow::CallCfgNode contextCreation, string insecure_version) { - contextCreation instanceof ContextCreation and exists(TlsLibrary l | contextCreation = l.insecure_context_creation(insecure_version)) } From a44490b47053f6b7339a1c26b01070dfa878d73c Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 6 Apr 2021 22:56:07 +0200 Subject: [PATCH 0083/1662] Python: remove unused file --- .../src/Security/CWE-327/examples/secure_protocol.py | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 python/ql/src/Security/CWE-327/examples/secure_protocol.py diff --git a/python/ql/src/Security/CWE-327/examples/secure_protocol.py b/python/ql/src/Security/CWE-327/examples/secure_protocol.py deleted file mode 100644 index e349bdae832d..000000000000 --- a/python/ql/src/Security/CWE-327/examples/secure_protocol.py +++ /dev/null @@ -1,11 +0,0 @@ -import socket -import ssl - -hostname = 'www.python.org' -context = ssl.SSLContext(ssl.PROTOCOL_TLS) -context.options |= ssl.OP_NO_TLSv1 -context.options |= ssl.OP_NO_TLSv1_1 - -with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) From 094d2f3b7d3d628b7e1a8e7d3999f6ce235bb642 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 6 Apr 2021 22:59:58 +0200 Subject: [PATCH 0084/1662] Python: clean up tests --- .../Security/CWE-327/ssl_fluent.py | 59 ++----------------- 1 file changed, 6 insertions(+), 53 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index ceddaa32f091..0f7620f21ea1 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -56,58 +56,11 @@ def test_fluent_ssl(): print(ssock.version()) -def test_fluent_ssl_no_TLSv1(): - hostname = 'www.python.org' - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_TLSv1 - - with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) - -def test_fluent_ssl_safe(): - hostname = 'www.python.org' - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_TLSv1 - context.options |= ssl.OP_NO_TLSv1_1 - - with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) - -def test_fluent_ssl_safe_combined(): - hostname = 'www.python.org' - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 - - with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) - -def test_fluent_ssl_unsafe_combined_wrongly(): - hostname = 'www.python.org' - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_TLSv1 & ssl.OP_NO_TLSv1_1 - - with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) - -def test_fluent_ssl_safe_combined_multiple(): - hostname = 'www.python.org' - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2 - - with socket.create_connection((hostname, 443)) as sock: - with context.wrap_socket(sock, server_hostname=hostname) as ssock: - print(ssock.version()) - - def create_relaxed_context(): - return ssl.SSLContext(ssl.PROTOCOL_SSLv23) + return ssl.SSLContext(ssl.PROTOCOL_TLS) def create_secure_context(): - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 return context @@ -143,21 +96,21 @@ def test_delegated_context_made_unsafe(): print(ssock.version()) def test_delegated_connection_unsafe(): - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) create_connection(context) def test_delegated_connection_safe(): - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 create_connection(context) def test_delegated_connection_made_safe(): - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 create_connection(context) def test_delegated_connection_made_unsafe(): - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 context.options &= ~ssl.OP_NO_TLSv1_1 create_connection(context) From 59ff3f315b34bdb4989ea17d9c8f9387bdc821d5 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 31 Mar 2021 19:11:28 +0100 Subject: [PATCH 0085/1662] C++: Add test cases exploring issues and potential issues with the query (especially related to simple range analysis). --- ...dDifferenceExpressionComparedZero.expected | 18 ++ .../test.cpp | 192 +++++++++++++++++- 2 files changed, 209 insertions(+), 1 deletion(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 2d28795d1269..447d98c1fd7c 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -8,3 +8,21 @@ | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:69:5:69:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:83:6:83:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:92:6:92:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:110:6:110:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:119:6:119:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:128:6:128:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:156:7:156:15 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:169:6:169:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:219:7:219:15 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:226:8:226:16 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index 11de69e8c625..c16608ef0f8f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -74,4 +74,194 @@ void test(unsigned x, unsigned y, bool unknown) { y += n; // NOTE: `n` is at most `x - y` at this point. if (x - y > 0) {} // GOOD [FALSE POSITIVE] } -} \ No newline at end of file +} + +void test2() { + unsigned int a = getAnInt(); + unsigned int b = a; + + if (a - b > 0) { // GOOD (as a = b) [FALSE POSITIVE] + // ... + } +} + +void test3() { + unsigned int a = getAnInt(); + unsigned int b = a - 1; + + if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + // ... + } +} + +void test4() { + unsigned int a = getAnInt(); + unsigned int b = a + 1; + + if (a - b > 0) { // BAD + // ... + } +} + +void test5() { + unsigned int b = getAnInt(); + unsigned int a = b; + + if (a - b > 0) { // GOOD (as a = b) [FALSE POSITIVE] + // ... + } +} + +void test6() { + unsigned int b = getAnInt(); + unsigned int a = b + 1; + + if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + // ... + } +} + +void test7() { + unsigned int b = getAnInt(); + unsigned int a = b - 1; + + if (a - b > 0) { // BAD + // ... + } +} + +void test8() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (a - b > 0) { // BAD + // ... + } + + if (a >= b) { // GOOD + if (a - b > 0) { // GOOD (as a >= b) + // ... + } + } else { + if (a - b > 0) { // BAD + // ... + } + } + + if (b >= a) { // GOOD + if (a - b > 0) { // BAD + // ... + } + } else { + if (a - b > 0) { // GOOD (as a > b) [FALSE POSITIVE] + // ... + } + } + + while (a >= b) { // GOOD + if (a - b > 0) { // GOOD (as a >= b) + // ... + } + } + + if (a < b) return; + + if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + // ... + } +} + +void test9() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (a < b) { + b = 0; + } + + if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + // ... + } +} + +void test10() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (a < b) { + a = b; + } + + if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + // ... + } +} + +void test11() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (a < b) return; + + b = getAnInt(); + + if (a - b > 0) { // BAD + // ... + } +} + +void test12() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + unsigned int c; + + if ((b <= c) && (c <= a)) { + if (a - b > 0) { // GOOD (as b <= a) [FALSE POSITIVE] + // ... + } + } + + if (b <= c) { + if (c <= a) { + if (a - b > 0) { // GOOD (as b <= a) [FALSE POSITIVE] + // ... + } + } + } +} + +int test13() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (b != 0) { + return 0; + } + + return (a - b > 0); // GOOD (as b = 0) +} + +int test14() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (!b) { + return 0; + } + + return (a - b > 0); // GOOD (as b = 0) [FALSE POSITIVE] +} + +struct Numbers +{ + unsigned int a, b; +}; + +int test15(Numbers *n) { + + if (!n) { + return 0; + } + + return (n->a - n->b > 0); // BAD +} From 3ecd13531f7be2d4ee5c7bd5733bde6be1217439 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 6 Apr 2021 17:59:22 +0100 Subject: [PATCH 0086/1662] C++: Improve isGuarded. --- .../UnsignedDifferenceExpressionComparedZero.ql | 12 ++++++++---- ...UnsignedDifferenceExpressionComparedZero.expected | 2 -- .../test.cpp | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 007a4fd746d1..0b30cc7e2138 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -16,12 +16,16 @@ import semmle.code.cpp.valuenumbering.GlobalValueNumbering import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis import semmle.code.cpp.controlflow.Guards -/** Holds if `sub` is guarded by a condition which ensures that `left >= right`. */ +/** + * Holds if `sub` is guarded by a condition which ensures that + * `left >= right`. + */ pragma[noinline] predicate isGuarded(SubExpr sub, Expr left, Expr right) { - exists(GuardCondition guard | - guard.controls(sub.getBasicBlock(), true) and - guard.ensuresLt(left, right, 0, sub.getBasicBlock(), false) + exists(GuardCondition guard, int k | + guard.controls(sub.getBasicBlock(), _) and + guard.ensuresLt(left, right, k, sub.getBasicBlock(), false) and + k >= 0 ) } diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 447d98c1fd7c..36dc7cf4c5b5 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -17,8 +17,6 @@ | test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:156:7:156:15 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:169:6:169:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index c16608ef0f8f..bf2b2eb5dada 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -153,7 +153,7 @@ void test8() { // ... } } else { - if (a - b > 0) { // GOOD (as a > b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a > b) // ... } } @@ -166,7 +166,7 @@ void test8() { if (a < b) return; - if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a >= b) // ... } } From 48ff8e237c1aba54368196193c2fa09b109e771e Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:57:58 +0100 Subject: [PATCH 0087/1662] C++: Rewrite the range analysis exclusion to be recursive and more robust. --- ...nsignedDifferenceExpressionComparedZero.ql | 26 ++++++++++++------- ...dDifferenceExpressionComparedZero.expected | 5 +--- .../test.cpp | 10 +++---- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 0b30cc7e2138..26c2c6ae869c 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -29,16 +29,22 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) { ) } -/** Holds if `sub` will never be negative. */ -predicate nonNegative(SubExpr sub) { - not exprMightOverflowNegatively(sub.getFullyConverted()) +/** + * Holds if `e` is known to be less than or equal to `sub.getLeftOperand()`. + */ +predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { + e = sub.getLeftOperand() + or + exists(Expr other | + // GVN equality + exprIsSubLeftOrLess(sub, other) and + globalValueNumber(e) = globalValueNumber(other) + ) or - // The subtraction is guarded by a check of the form `left >= right`. - exists(GVN left, GVN right | - // This is basically a poor man's version of a directional unbind operator. - strictcount([left, globalValueNumber(sub.getLeftOperand())]) = 1 and - strictcount([right, globalValueNumber(sub.getRightOperand())]) = 1 and - isGuarded(sub, left.getAnExpr(), right.getAnExpr()) + exists(Expr other | + // guard constraining `sub` + exprIsSubLeftOrLess(sub, other) and + isGuarded(sub, other, e) // left >= right ) } @@ -49,5 +55,5 @@ where ro.getLesserOperand().getValue().toInt() = 0 and ro.getGreaterOperand() = sub and sub.getFullyConverted().getUnspecifiedType().(IntegralType).isUnsigned() and - not nonNegative(sub) + not exprIsSubLeftOrLess(sub, sub.getRightOperand()) select ro, "Unsigned subtraction can never be negative." diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 36dc7cf4c5b5..0acb75de56f7 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -8,10 +8,8 @@ | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:69:5:69:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:83:6:83:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:92:6:92:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:110:6:110:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:119:6:119:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:128:6:128:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. | @@ -20,7 +18,6 @@ | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:219:7:219:15 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:226:8:226:16 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:241:10:241:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index bf2b2eb5dada..e42ffd8d3266 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -80,7 +80,7 @@ void test2() { unsigned int a = getAnInt(); unsigned int b = a; - if (a - b > 0) { // GOOD (as a = b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a = b) // ... } } @@ -107,7 +107,7 @@ void test5() { unsigned int b = getAnInt(); unsigned int a = b; - if (a - b > 0) { // GOOD (as a = b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a = b) // ... } } @@ -216,14 +216,14 @@ void test12() { unsigned int c; if ((b <= c) && (c <= a)) { - if (a - b > 0) { // GOOD (as b <= a) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as b <= a) // ... } } if (b <= c) { if (c <= a) { - if (a - b > 0) { // GOOD (as b <= a) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as b <= a) // ... } } @@ -238,7 +238,7 @@ int test13() { return 0; } - return (a - b > 0); // GOOD (as b = 0) + return (a - b > 0); // GOOD (as b = 0) [FALSE POSITIVE] } int test14() { From 60e4faba4c24686ad74ba45197ccd38c289b91f5 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 6 Apr 2021 18:30:18 +0100 Subject: [PATCH 0088/1662] C++: Add linear expression logic. --- .../UnsignedDifferenceExpressionComparedZero.ql | 17 +++++++++++++++++ ...nedDifferenceExpressionComparedZero.expected | 2 -- .../test.cpp | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 26c2c6ae869c..8073a3567d26 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -14,6 +14,7 @@ import cpp import semmle.code.cpp.commons.Exclusions import semmle.code.cpp.valuenumbering.GlobalValueNumbering import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis +import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils import semmle.code.cpp.controlflow.Guards /** @@ -46,6 +47,22 @@ predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { exprIsSubLeftOrLess(sub, other) and isGuarded(sub, other, e) // left >= right ) + or + exists(Expr other, float p, float q | + // linear access of `other` + exprIsSubLeftOrLess(sub, other) and + linearAccess(e, other, p, q) and // e = p * other + q + p <= 1 and + q <= 0 + ) + or + exists(Expr other, float p, float q | + // linear access of `e` + exprIsSubLeftOrLess(sub, other) and + linearAccess(other, e, p, q) and // other = p * e + q + p >= 1 and + q >= 0 + ) } from RelationalOperation ro, SubExpr sub diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 0acb75de56f7..06fcf0ebb72f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -8,9 +8,7 @@ | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:69:5:69:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:92:6:92:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:119:6:119:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:128:6:128:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:137:6:137:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index e42ffd8d3266..c0a4d38d14ae 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -89,7 +89,7 @@ void test3() { unsigned int a = getAnInt(); unsigned int b = a - 1; - if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a >= b) // ... } } @@ -116,7 +116,7 @@ void test6() { unsigned int b = getAnInt(); unsigned int a = b + 1; - if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a >= b) // ... } } From a8193dac087f12d487eef9091dfe57135fe7690f Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 6 Apr 2021 22:35:04 +0100 Subject: [PATCH 0089/1662] C++: Reintroduce the exprMightOverflowNegatively bit. --- .../CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql | 3 ++- .../UnsignedDifferenceExpressionComparedZero.expected | 1 - .../CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 8073a3567d26..bca77f99a721 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -72,5 +72,6 @@ where ro.getLesserOperand().getValue().toInt() = 0 and ro.getGreaterOperand() = sub and sub.getFullyConverted().getUnspecifiedType().(IntegralType).isUnsigned() and - not exprIsSubLeftOrLess(sub, sub.getRightOperand()) + exprMightOverflowNegatively(sub.getFullyConverted()) and // generally catches false positives involving constants + not exprIsSubLeftOrLess(sub, sub.getRightOperand()) // generally catches false positives where there's a relation between the left and right operands select ro, "Unsigned subtraction can never be negative." diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 06fcf0ebb72f..46bf57ee52a7 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -16,6 +16,5 @@ | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:241:10:241:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index c0a4d38d14ae..dfaedbb9d2b5 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -238,7 +238,7 @@ int test13() { return 0; } - return (a - b > 0); // GOOD (as b = 0) [FALSE POSITIVE] + return (a - b > 0); // GOOD (as b = 0) } int test14() { From fb95c488e8854e816ef8da12450ad262b47867a7 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 7 Apr 2021 08:20:52 +0200 Subject: [PATCH 0090/1662] Python: format --- python/ql/src/Security/CWE-327/Ssl.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 9def499fb118..26928e31cb0b 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -28,9 +28,7 @@ API::Node sslContextInstance() { } class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { - WrapSocketCall() { - this = sslContextInstance().getMember("wrap_socket").getACall() - } + WrapSocketCall() { this = sslContextInstance().getMember("wrap_socket").getACall() } override DataFlow::CfgNode getContext() { result = this.getFunction().(DataFlow::AttrRead).getObject() From a0e3e3afaf2456f9ad80c9fd9d639c2daecb1373 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 7 Apr 2021 08:22:36 +0200 Subject: [PATCH 0091/1662] Python: adjust test expectations --- .../CWE-327/InsecureProtocol.expected | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index f4cd96eb82e2..57b19cef0b17 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -24,19 +24,16 @@ | ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:33:15:33:53 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:65:14:65:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:61:15:61:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:93:14:93:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:89:15:89:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:93:14:93:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:89:15:89:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:146:15:146:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:146:15:146:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:162:5:162:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:116:14:116:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:180:5:180:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:122:14:122:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:122:14:122:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:107:12:107:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:142:14:142:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:140:5:140:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:191:14:191:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:188:5:188:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:207:5:207:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:206:15:206:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | -| ssl_fluent.py:210:14:210:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:206:15:206:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:99:15:99:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:99:15:99:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:115:5:115:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:133:5:133:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:95:14:95:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:93:5:93:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:144:14:144:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:141:5:141:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:160:5:160:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:159:15:159:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:159:15:159:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | From f22db2a30b305ba15019fb77463e42c2022cfe86 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 7 Apr 2021 08:32:21 +0200 Subject: [PATCH 0092/1662] Python: One family to rule them all... --- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 73ab52be8070..82c251f3f810 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -71,15 +71,10 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest override DataFlow::CfgNode getContext() { result = this } override ProtocolVersion getUnrestriction() { - // see https://www.openssl.org/docs/man1.1.0/man3/TLS_method.html - family = "TLS" and - result in ["SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] - or - // This can negotiate a TLS 1.3 connection (!) - // see - // - https://docs.python.org/3/library/ssl.html#ssl-contexts - // - https://www.openssl.org/docs/man1.0.2/man3/TLSv1_method.html - family = "SSLv23" and + // There is only one family, the two names are aliases in OpenSSL. + // see https://github.com/openssl/openssl/blob/13888e797c5a3193e91d71e5f5a196a2d68d266f/include/openssl/ssl.h.in#L1953-L1955 + family in ["SSLv23", "TLS"] and + // see https://docs.python.org/3/library/ssl.html#ssl-contexts result in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } } From a006a92f8dd93e5503108e02762188f63fad288b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Wed, 7 Apr 2021 08:32:40 +0200 Subject: [PATCH 0093/1662] Python: Expand commentary --- python/ql/src/Security/CWE-327/Ssl.qll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 26928e31cb0b..fc4d13bffae9 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -141,13 +141,15 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext UnspecificSSLContextCreation() { library = "ssl" } override ProtocolVersion getUnrestriction() { + // Case: A protocol argument is present. result = UnspecificContextCreation.super.getUnrestriction() and // These are turned off by default // see https://docs.python.org/3/library/ssl.html#ssl-contexts not result in ["SSLv2", "SSLv3"] or - // The default argument is TLS and the SSL versions are turned off by default. + // Case: No protocol arguemnt is present. not exists(this.getProtocol()) and + // The default argument is TLS and the SSL versions are turned off by default. result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } } From 36de496d47b6fb95058920cb3cf7412a5001af95 Mon Sep 17 00:00:00 2001 From: ihsinme Date: Tue, 6 Apr 2021 10:35:28 +0300 Subject: [PATCH 0094/1662] Add files via upload --- ...rolFlowManagementAfterRefactoringTheCode.c | 17 +++ ...lowManagementAfterRefactoringTheCode.qhelp | 28 +++++ ...olFlowManagementAfterRefactoringTheCode.ql | 118 ++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c create mode 100644 cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp create mode 100644 cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c new file mode 100644 index 000000000000..3ba47068244d --- /dev/null +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c @@ -0,0 +1,17 @@ +while(flagsLoop) +{ + ... + if(flagsIf) break; + ... +}while(flagsLoop); // BAD: when exiting through `break`, it is possible to get into an eternal loop. +... +while(flagsLoop) +{ + ... + if(flagsIf) break; + ... +} // GOOD: coreten cycle +... +if(intA+intB) return 1; // BAD: possibly no comparison +... +if(intA+intB>intC) return 1; // GOOD: correct comparison diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp new file mode 100644 index 000000000000..2c485dfd0cf4 --- /dev/null +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp @@ -0,0 +1,28 @@ + + + +

    In some situations, after code refactoring, parts of the old constructs may remain. They are correctly accepted by the compiler, but can critically affect program execution. For example, if you switch from `do {...} while ();` to `while () {...}` with errors, you run the risk of running out of resources. These code snippets look suspicious and require the developer's attention.

    + + +
    + + +

    We recommend that you use more explicit code transformations.

    + +
    + +

    The following example demonstrates the erroneous and corrected sections of the code.

    + + +
    + + +
  • + CWE Common Weakness Enumeration: + CWE-691: Insufficient Control Flow Management. +
  • + +
    +
    diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql new file mode 100644 index 000000000000..6b9639fe8b9b --- /dev/null +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql @@ -0,0 +1,118 @@ +/** + * @name Errors After Refactoring + * @description --In some situations, after code refactoring, parts of the old constructs may remain. + * --They are correctly accepted by the compiler, but can critically affect program execution. + * --For example, if you switch from `do {...} while ();` to `while () {...}` with errors, you run the risk of running out of resources. + * --These code snippets look suspicious and require the developer's attention. + * @kind problem + * @id cpp/errors-after-refactoring + * @problem.severity warning + * @precision medium + * @tags correctness + * security + * external/cwe/cwe-691 + */ + +import cpp +import semmle.code.cpp.valuenumbering.HashCons +import semmle.code.cpp.valuenumbering.GlobalValueNumbering + +/** + * Using `while` directly after the body of another` while`. + */ +class UsingWhileAfterWhile extends WhileStmt { + /** + * Using a loop call after another loop has finished running can result in an eternal loop. + * For example, perhaps as a result of refactoring, the `do ... while ()` loop was incorrectly corrected. + * Even in the case of deliberate use of such an expression, it is better to correct it. + */ + UsingWhileAfterWhile() { + exists(WhileStmt wh1 | + wh1.getStmt().getAChild*().(BreakStmt).(ControlFlowNode).getASuccessor().getASuccessor() = + this and + hashCons(wh1.getCondition()) = hashCons(this.getCondition()) and + this.getStmt() instanceof EmptyStmt + ) + or + exists(ForStmt fr1 | + fr1.getStmt().getAChild*().(BreakStmt).(ControlFlowNode).getASuccessor().getASuccessor() = + this and + hashCons(fr1.getCondition()) = hashCons(this.getCondition()) and + this.getStmt() instanceof EmptyStmt + ) + } +} + +/** + * Using arithmetic in comparison. + */ +class UsingArithmeticInComparison extends BinaryArithmeticOperation { + /** + * Using arithmetic operations in a comparison operation can be dangerous. + * For example, part of the comparison may have been lost as a result of refactoring. + * Even if you deliberately use such an expression, it is better to add an explicit comparison. + */ + UsingArithmeticInComparison() { + this.getParent*() instanceof IfStmt and + not this.getAChild*().isConstant() and + not this.getParent*() instanceof Call and + not this.getParent*() instanceof AssignExpr and + not this.getParent*() instanceof RemExpr and + not this.getParent*() instanceof AssignBitwiseOperation and + not this.getParent*() instanceof AssignArithmeticOperation and + not this.getParent*() instanceof EqualityOperation and + not this.getParent*() instanceof RelationalOperation + } + + /** Holds when the expression is inside the loop body. */ + predicate insideTheLoop() { exists(Loop lp | lp.getStmt().getAChild*() = this.getParent*()) } + + /** Holds when the expression is used in binary operations. */ + predicate workingWithValue() { + this.getParent*() instanceof BinaryBitwiseOperation or + this.getParent*() instanceof NotExpr + } + + /** Holds when the expression contains a pointer. */ + predicate workingWithPointer() { + this.getAChild*().getFullyConverted().getType() instanceof DerivedType + } + + /** Holds when a null comparison expression exists. */ + predicate compareWithZero() { + exists(Expr exp | + exp instanceof ComparisonOperation and + ( + globalValueNumber(exp.getAChild*()) = globalValueNumber(this) or + hashCons(exp.getAChild*()) = hashCons(this) + ) and + ( + exp.(ComparisonOperation).getLeftOperand().getValue() = "0" or + exp.(ComparisonOperation).getRightOperand().getValue() = "0" + ) + ) + } + + /** Holds when a comparison expression exists. */ + predicate compareWithOutZero() { + exists(Expr exp | + exp instanceof ComparisonOperation and + ( + globalValueNumber(exp.getAChild*()) = globalValueNumber(this) or + hashCons(exp.getAChild*()) = hashCons(this) + ) + ) + } +} + +from Expr exp, WhileStmt wst +where + exp instanceof UsingArithmeticInComparison and + not exp.(UsingArithmeticInComparison).workingWithValue() and + not exp.(UsingArithmeticInComparison).workingWithPointer() and + not exp.(UsingArithmeticInComparison).insideTheLoop() and + not exp.(UsingArithmeticInComparison).compareWithZero() and + exp.(UsingArithmeticInComparison).compareWithOutZero() + or + wst instanceof UsingWhileAfterWhile and exp = wst.getCondition() +select exp, "this expression needs your attention" From cbf158ea6bbd4f5f98c5e1ad997fe6a58902e993 Mon Sep 17 00:00:00 2001 From: ihsinme Date: Tue, 6 Apr 2021 10:36:22 +0300 Subject: [PATCH 0095/1662] Add files via upload --- ...ManagementAfterRefactoringTheCode.expected | 3 ++ ...lowManagementAfterRefactoringTheCode.qlref | 1 + .../Security/CWE/CWE-691/semmle/tests/test.c | 28 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected create mode 100644 cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.qlref create mode 100644 cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected new file mode 100644 index 000000000000..cc1b5cf46d80 --- /dev/null +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected @@ -0,0 +1,3 @@ +| test.c:15:6:15:16 | ... + ... | this expression needs your attention | +| test.c:17:17:17:27 | ... + ... | this expression needs your attention | +| test.c:22:10:22:15 | ... > ... | this expression needs your attention | diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.qlref b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.qlref new file mode 100644 index 000000000000..496d5f1b7be6 --- /dev/null +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c new file mode 100644 index 000000000000..fc30f7a6e97e --- /dev/null +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c @@ -0,0 +1,28 @@ +int tmpFunction(){ + return 5; +} +void workFunction_0(char *s) { + int intSize; + char buf[80]; + if(intSize>0 && intSize<80 && memset(buf,0,intSize)) return; // GOOD + if(intSize>0 & intSize<80 & memset(buf,0,intSize)) return; // BAD + if(intSize>0 && tmpFunction()) return; + if(intSize<0 & tmpFunction()) return; // BAD +} +void workFunction_1(char *s) { + int intA,intB; + + if(intA + intB) return; // BAD + if(intA + intB>4) return; // GOOD + if(intA>0 && (intA + intB)) return; // BAD + while(intA>0) + { + if(intB - intA<10) break; + intA--; + }while(intA>0); // BAD + while(intA>0) + { + if(intB - intA<10) break; + intA--; + } // GOOD +} From 38daeb4df23057c160c744387316c012ea80f92a Mon Sep 17 00:00:00 2001 From: yoff Date: Wed, 7 Apr 2021 15:50:51 +0200 Subject: [PATCH 0096/1662] Apply suggestions from code review Co-authored-by: Rasmus Wriedt Larsen --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 4 ++-- python/ql/src/Security/CWE-327/Ssl.qll | 3 ++- python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 652a4bae2a10..b5d6823c44c2 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -65,8 +65,8 @@ class InsecureContextConfiguration extends DataFlow::Configuration { * Holds if `conectionCreation` marks the creation of a connetion based on the contex * found at `contextOrigin` and allowing `insecure_version`. * - * `specific` is true iff the context is configured for a specific protocol version rather - * than for a family of protocols. + * `specific` is true iff the context is configured for a specific protocol version (`ssl.PROTOCOL_TLSv1_2`) rather + * than for a family of protocols (`ssl.PROTOCOL_TLS`). */ predicate unsafe_connection_creation_with_context( DataFlow::Node connectionCreation, ProtocolVersion insecure_version, DataFlow::Node contextOrigin, diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index fc4d13bffae9..2ca7dcce1f90 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -149,7 +149,8 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext or // Case: No protocol arguemnt is present. not exists(this.getProtocol()) and - // The default argument is TLS and the SSL versions are turned off by default. + // The default argument is TLS and the SSL versions are turned off by default since Python 3.6 + // see https://docs.python.org/3.6/library/ssl.html#ssl.SSLContext result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } } diff --git a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py index 0f7620f21ea1..a8e491a42f1e 100644 --- a/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py +++ b/python/ql/test/query-tests/Security/CWE-327/ssl_fluent.py @@ -49,6 +49,8 @@ def test_fluent_tls_safe(): def test_fluent_ssl(): hostname = 'www.python.org' + # notice that `ssl.PROTOCOL_SSLv23` is just a deprecated alias for `ssl.PROTOCOL_TLS`. + # Therefore, we only have this one test using PROTOCOL_SSLv23, to show that we handle this alias correctly. context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) with socket.create_connection((hostname, 443)) as sock: From 80ac2aff268cd11501e8aaea05842c63bbc7afb4 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 7 Apr 2021 20:55:03 +0300 Subject: [PATCH 0097/1662] Fixed typos Co-authored-by: Marcono1234 --- .../CWE-094/JakartaExpressionInjection.qhelp | 18 +++++++++--------- .../SaferExpressionEvaluationWithJuel.java | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp index 6e6b5f633947..8a9e4e7276f0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp @@ -4,22 +4,22 @@

    Jakarta Expression Language (EL) is an expression language for Java applications. -There are a single language specification and multiple implementations +There is a single language specification and multiple implementations such as Glassfish, Juel, Apache Commons EL, etc. The language allows invocation of methods available in the JVM. If an expression is built using attacker-controlled data, -and then evaluated, then it may allow the attacker to run arbitrary code. +and then evaluated, it may allow the attacker to run arbitrary code.

    It is generally recommended to avoid using untrusted data in an EL expression. -Before using untrusted data to build an EL expressoin, the data should be validated -to ensure it is not evaluated as expression language. If the EL implementaion offers -configuring a sandbox for EL expression, they should be run in a restircitive sandbox +Before using untrusted data to build an EL expression, the data should be validated +to ensure it is not evaluated as expression language. If the EL implementation offers +configuring a sandbox for EL expressions, they should be run in a restrictive sandbox that allows accessing only explicitly allowed classes. If the EL implementation -does not allow sandboxing, consider using other expressiong language implementations +does not support sandboxing, consider using other expression language implementations with sandboxing capabilities such as Apache Commons JEXL or the Spring Expression Language.

    @@ -32,9 +32,9 @@ using the JUEL interpreter:

    -JUEL does not allow to run expression in a sandbox. To prevent running arbitrary code, -incoming data has to be checked before including to an expression. The next example -uses a Regex pattern to check whether a user tries to run an allowed exression or not: +JUEL does not support to run expressions in a sandbox. To prevent running arbitrary code, +incoming data has to be checked before including it in an expression. The next example +uses a Regex pattern to check whether a user tries to run an allowed expression or not:

    diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java b/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java index 54fb9a0ed36c..3dfaaead68a5 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java +++ b/java/ql/src/experimental/Security/CWE/CWE-094/SaferExpressionEvaluationWithJuel.java @@ -1,10 +1,10 @@ String input = getRemoteUserInput(); String pattern = "(inside|outside)\\.(temperature|humidity)"; if (!input.matches(pattern)) { - throw new IllegalArgumentException("Unexpected exression"); + throw new IllegalArgumentException("Unexpected expression"); } String expression = "${" + input + "}"; ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); ValueExpression e = factory.createValueExpression(context, expression, Object.class); SimpleContext context = getContext(); -Object result = e.getValue(context); \ No newline at end of file +Object result = e.getValue(context); From 3d8e173c5770a32804cbffb798ce63cfaddb795d Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 7 Apr 2021 20:59:07 +0300 Subject: [PATCH 0098/1662] Removed a reference to Apache Commons EL --- .../Security/CWE/CWE-094/JakartaExpressionInjection.qhelp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp index 8a9e4e7276f0..a6d66c1d1d16 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp @@ -57,9 +57,5 @@ uses a Regex pattern to check whether a user tries to run an allowed expression JUEL: Home page -
  • - Apache Foundation: - Apache Commons EL -
  • From c13ee0859acb4222aae8d4071d039494edfc782a Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 7 Apr 2021 21:02:21 +0300 Subject: [PATCH 0099/1662] LambdaExpression should extend JakartaType --- .../Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index 22f421b8bf8c..5b652d3d8e65 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -97,6 +97,6 @@ private class MethodExpression extends JakartaType { MethodExpression() { hasName("MethodExpression") } } -private class LambdaExpression extends RefType { +private class LambdaExpression extends JakartaType { LambdaExpression() { hasName("LambdaExpression") } } From a764a79090e17ce22b7e1a3d8927dc80f0effd1b Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 7 Apr 2021 21:12:21 +0300 Subject: [PATCH 0100/1662] Always bind arguments in TaintPropagatingCall --- .../CWE-094/JakartaExpressionInjectionLib.qll | 20 ++++++++++--------- .../JakartaExpressionInjection.expected | 18 ----------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index 5b652d3d8e65..e3a3994c8818 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -56,15 +56,17 @@ private class TaintPropagatingCall extends Call { TaintPropagatingCall() { taintFromExpr = this.getArgument(1) and - exists(Method m | this.(MethodAccess).getMethod() = m | - m.getDeclaringType() instanceof ExpressionFactory and - m.hasName(["createValueExpression", "createMethodExpression"]) and - taintFromExpr.getType() instanceof TypeString - ) - or - exists(Constructor c | this.(ConstructorCall).getConstructor() = c | - c.getDeclaringType() instanceof LambdaExpression and - taintFromExpr.getType() instanceof ValueExpression + ( + exists(Method m | this.(MethodAccess).getMethod() = m | + m.getDeclaringType() instanceof ExpressionFactory and + m.hasName(["createValueExpression", "createMethodExpression"]) and + taintFromExpr.getType() instanceof TypeString + ) + or + exists(Constructor c | this.(ConstructorCall).getConstructor() = c | + c.getDeclaringType() instanceof LambdaExpression and + taintFromExpr.getType() instanceof ValueExpression + ) ) } diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected index 111cc81541c2..e0d699b14e3a 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected @@ -10,22 +10,9 @@ edges | JakartaExpressionInjection.java:30:24:30:33 | expression : String | JakartaExpressionInjection.java:32:28:32:37 | expression | | JakartaExpressionInjection.java:37:24:37:33 | expression : String | JakartaExpressionInjection.java:39:32:39:41 | expression | | JakartaExpressionInjection.java:44:24:44:33 | expression : String | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | -| JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | | JakartaExpressionInjection.java:54:24:54:33 | expression : String | JakartaExpressionInjection.java:56:32:56:41 | expression | -| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | | JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:65:13:65:13 | e | -| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | -| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | -| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:65:13:65:13 | e | -| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | -| JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | -| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | | JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:74:13:74:13 | e | -| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | -| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | -| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:74:13:74:13 | e | -| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | -| JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | | JakartaExpressionInjection.java:79:24:79:33 | expression : String | JakartaExpressionInjection.java:83:13:83:13 | e | nodes | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | @@ -35,18 +22,13 @@ nodes | JakartaExpressionInjection.java:37:24:37:33 | expression : String | semmle.label | expression : String | | JakartaExpressionInjection.java:39:32:39:41 | expression | semmle.label | expression | | JakartaExpressionInjection.java:44:24:44:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:48:49:48:104 | new LambdaExpression(...) : LambdaExpression | semmle.label | new LambdaExpression(...) : LambdaExpression | | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | semmle.label | lambdaExpression | | JakartaExpressionInjection.java:54:24:54:33 | expression : String | semmle.label | expression : String | | JakartaExpressionInjection.java:56:32:56:41 | expression | semmle.label | expression | | JakartaExpressionInjection.java:61:24:61:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:64:33:64:96 | createValueExpression(...) : ValueExpression | semmle.label | createValueExpression(...) : ValueExpression | | JakartaExpressionInjection.java:65:13:65:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:65:13:65:13 | e : ValueExpression | semmle.label | e : ValueExpression | | JakartaExpressionInjection.java:70:24:70:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:73:33:73:96 | createValueExpression(...) : ValueExpression | semmle.label | createValueExpression(...) : ValueExpression | | JakartaExpressionInjection.java:74:13:74:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:74:13:74:13 | e : ValueExpression | semmle.label | e : ValueExpression | | JakartaExpressionInjection.java:79:24:79:33 | expression : String | semmle.label | expression : String | | JakartaExpressionInjection.java:83:13:83:13 | e | semmle.label | e | #select From 33423eaef3386b3e6e782c35fb2fb99c8a4cf150 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 00:31:53 +0200 Subject: [PATCH 0101/1662] Optimize calls --- .../experimental/semmle/python/frameworks/Stdlib.qll | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 5a7984fab43a..24def6be2773 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -22,10 +22,10 @@ private module LDAP { DataFlow::Node ldapNode; LDAP2Query() { - exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode initCall | + exists(DataFlow::AttrRead searchMethod | this.getFunction() = searchMethod and - initCall = API::moduleImport("ldap").getMember("initialize").getACall() and - initCall = searchMethod.getObject().getALocalSource() and + API::moduleImport("ldap").getMember("initialize").getACall() = + searchMethod.getObject().getALocalSource() and searchMethod.getAttributeName() instanceof LDAP2QueryMethods and ( ldapNode = this.getArg(0) @@ -68,10 +68,10 @@ private module LDAP { DataFlow::Node ldapNode; LDAP3Query() { - exists(DataFlow::AttrRead searchMethod, DataFlow::CallCfgNode connCall | + exists(DataFlow::AttrRead searchMethod | this.getFunction() = searchMethod and - connCall = API::moduleImport("ldap3").getMember("Connection").getACall() and - connCall = searchMethod.getObject().getALocalSource() and + API::moduleImport("ldap3").getMember("Connection").getACall() = + searchMethod.getObject().getALocalSource() and searchMethod.getAttributeName() instanceof LDAP3QueryMethods and ( ldapNode = this.getArg(0) or From 517fd23ca59aa75899be0efb1a582436791ca8d8 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 8 Apr 2021 09:42:53 +0100 Subject: [PATCH 0102/1662] C++: Correct and add to test cases. --- ...dDifferenceExpressionComparedZero.expected | 2 + .../test.cpp | 39 +++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 46bf57ee52a7..64a1aa0ab899 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -18,3 +18,5 @@ | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:276:11:276:19 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:288:10:288:18 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index dfaedbb9d2b5..f151c593a2de 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -236,7 +236,7 @@ int test13() { if (b != 0) { return 0; - } + } // b = 0 return (a - b > 0); // GOOD (as b = 0) } @@ -247,9 +247,9 @@ int test14() { if (!b) { return 0; - } + } // b != 0 - return (a - b > 0); // GOOD (as b = 0) [FALSE POSITIVE] + return (a - b > 0); // BAD } struct Numbers @@ -265,3 +265,36 @@ int test15(Numbers *n) { return (n->a - n->b > 0); // BAD } + +int test16() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (!b) { + return 0; + } else { + return (a - b > 0); // BAD + } +} + +int test17() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (b == 0) { + return 0; + } // b != 0 + + return (a - b > 0); // BAD +} + +int test18() { + unsigned int a = getAnInt(); + unsigned int b = getAnInt(); + + if (b) { + return 0; + } // b == 0 + + return (a - b > 0); // GOOD (as b = 0) +} From 3f0a3266aa61617fb374c0d49e006dfabe429fc0 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 8 Apr 2021 17:14:03 +0800 Subject: [PATCH 0103/1662] [Java] CWE-348: Use of less trusted source --- .../CWE/CWE-348/UseOfLessTrustedSource.java | 74 +++++++ .../CWE/CWE-348/UseOfLessTrustedSource.qhelp | 38 ++++ .../CWE/CWE-348/UseOfLessTrustedSource.ql | 44 ++++ .../CWE/CWE-348/UseOfLessTrustedSourceLib.qll | 88 ++++++++ .../CWE-348/UseOfLessTrustedSource.expected | 14 ++ .../CWE-348/UseOfLessTrustedSource.java | 74 +++++++ .../CWE-348/UseOfLessTrustedSource.qlref | 1 + .../query-tests/security/CWE-348/options | 2 + .../slf4j-api-1.6.4/org/slf4j/Logger.java | 127 +++++++++++ .../org/slf4j/LoggerFactory.java | 21 ++ .../slf4j-api-1.6.4/org/slf4j/Marker.java | 30 +++ .../core/annotation/AliasFor.java | 21 ++ .../stereotype/Controller.java | 15 +- .../org/springframework/util/ObjectUtils.java | 202 ++++++++++++++++++ .../org/springframework/util/StringUtils.java | 30 +++ .../web/bind/annotation/GetMapping.java | 51 +++++ .../web/bind/annotation/Mapping.java | 4 + .../web/bind/annotation/RequestMapping.java | 23 +- .../web/bind/annotation/RequestParam.java | 23 +- .../web/bind/annotation/ResponseBody.java | 13 ++ 20 files changed, 885 insertions(+), 10 deletions(-) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp create mode 100644 java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql create mode 100644 java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll create mode 100644 java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.qlref create mode 100644 java/ql/test/experimental/query-tests/security/CWE-348/options create mode 100644 java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Logger.java create mode 100644 java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/LoggerFactory.java create mode 100644 java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Marker.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.java b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.java new file mode 100644 index 000000000000..d338134ed3ed --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.java @@ -0,0 +1,74 @@ +import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class UseOfLessTrustedSource { + + private static final Logger log = LoggerFactory.getLogger(UseOfLessTrustedSource.class); + + @GetMapping(value = "bad1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String remoteAddr = ""; + if (request != null) { + remoteAddr = request.getHeader("X-FORWARDED-FOR"); + remoteAddr = remoteAddr.split(",")[0]; + if (remoteAddr == null || "".equals(remoteAddr)) { + remoteAddr = request.getRemoteAddr(); + } + } + return remoteAddr; + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) { + String ip = request.getHeader("X-Forwarded-For"); + + log.debug("getClientIP header X-Forwarded-For:{}", ip); + + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("Proxy-Client-IP"); + log.debug("getClientIP header Proxy-Client-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + log.debug("getClientIP header WL-Proxy-Client-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("HTTP_CLIENT_IP"); + log.debug("getClientIP header HTTP_CLIENT_IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("HTTP_X_FORWARDED_FOR"); + log.debug("getClientIP header HTTP_X_FORWARDED_FOR:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("X-Real-IP"); + log.debug("getClientIP header X-Real-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getRemoteAddr(); + log.debug("getRemoteAddr IP:{}", ip); + } + System.out.println("client ip is: " + ip); + } + + @GetMapping(value = "good1") + @ResponseBody + public String good1(HttpServletRequest request) { + String remoteAddr = ""; + if (request != null) { + remoteAddr = request.getHeader("X-FORWARDED-FOR"); + remoteAddr = remoteAddr.split(",")[remoteAddr.split(",").length - 1]; // good + if (remoteAddr == null || "".equals(remoteAddr)) { + remoteAddr = request.getRemoteAddr(); + } + } + return remoteAddr; + } +} \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp new file mode 100644 index 000000000000..1c3a4485cbd8 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp @@ -0,0 +1,38 @@ + + + +

    The software obtains the original client IP address through the http header X-Forwarded-For, which is used to ensure +security or track it in the log for statistical or other reasons. Attackers can use X-Forwarded-For Spoofing software.

    + +
    + + +

    When the software is not using a proxy server, get the last ip.

    + +
    + + +

    The following examples show the bad case and the good case respectively. Bad case, such as bad1 to bad2. +In the bad1 method, the value of X-Forwarded-For in header is split, and the first value of +the split array is obtained. Good case, such as good1, split the value of X-Forwarded-For in header +and get the last value of the split array.

    + + + +
    + + +
  • Prevent IP address spoofing with X-Forwarded-For header when using AWS ELB and Clojure Ring: + +Prevent IP address spoofing with... +
  • + +
  • Security Rule Zero: A Warning about X-Forwarded-For: + +Security Rule Zero: A Warning about X-Forwarded-For +
  • + +
    +
    diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql new file mode 100644 index 000000000000..15d665d37abd --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql @@ -0,0 +1,44 @@ +/** + * @name X-Forwarded-For spoofing + * @description The software obtains the client ip through `X-Forwarded-For`, + * and the attacker can modify the value of `X-Forwarded-For` to forge the ip. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/use-of-less-trusted-source + * @tags security + * external/cwe/cwe-348 + */ + +import java +import UseOfLessTrustedSourceLib +import semmle.code.java.dataflow.FlowSources +import DataFlow::PathGraph + +class UseOfLessTrustedSourceConfig extends TaintTracking::Configuration { + UseOfLessTrustedSourceConfig() { this = "UseOfLessTrustedSourceConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof UseOfLessTrustedSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof UseOfLessTrustedSink } + + /** + * When using `,` split request data and not taking the first value of + * the array, it is considered as `good`. + */ + override predicate isSanitizer(DataFlow::Node node) { + exists(ArrayAccess aa, MethodAccess ma | aa.getArray() = ma | + ma.getQualifier() = node.asExpr() and + ma.getMethod() instanceof SplitMethod and + not aa.getIndexExpr().toString() = "0" + ) + } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, UseOfLessTrustedSourceConfig conf +where + conf.hasFlowPath(source, sink) and + source.getNode().getEnclosingCallable() = sink.getNode().getEnclosingCallable() and + xffIsFirstGet(source.getNode()) +select sink.getNode(), source, sink, "X-Forwarded-For spoofing might include code from $@.", + source.getNode(), "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll new file mode 100644 index 000000000000..0598f8438404 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll @@ -0,0 +1,88 @@ +import java +import DataFlow +import semmle.code.java.dataflow.DataFlow +import experimental.semmle.code.java.Logging + +/** A data flow source of the value of the `x-forwarded-for` field in the `header`. */ +class UseOfLessTrustedSource extends DataFlow::Node { + UseOfLessTrustedSource() { + exists(MethodAccess ma | + ma.getMethod().hasName("getHeader") and + ma.getArgument(0).toString().toLowerCase() = "\"x-forwarded-for\"" and + ma = this.asExpr() + ) + } +} + +/** A data flow sink of method return or log output or local print. */ +class UseOfLessTrustedSink extends DataFlow::Node { + UseOfLessTrustedSink() { + exists(ReturnStmt rs | rs.getResult() = this.asExpr()) + or + exists(MethodAccess ma | + ma.getMethod().getName() in ["print", "println"] and + ( + ma.getMethod().getDeclaringType().hasQualifiedName("java.io", "PrintWriter") or + ma.getMethod().getDeclaringType().hasQualifiedName("java.io", "PrintStream") + ) and + ma.getAnArgument() = this.asExpr() + ) + or + exists(LoggingCall lc | lc.getAnArgument() = this.asExpr()) + } +} + +/** A method that split string. */ +class SplitMethod extends Method { + SplitMethod() { + this.getNumberOfParameters() = 1 and + this.hasQualifiedName("java.lang", "String", "split") + } +} + +/** + * A call to the ServletRequest.getHeader method and the argument are + * `wl-proxy-client-ip`/`proxy-client-ip`/`http_client_ip`/`http_x_forwarded_for`/`x-real-ip`. + */ +class HeaderIpCall extends MethodAccess { + HeaderIpCall() { + this.getMethod().hasName("getHeader") and + this.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("javax.servlet", "ServletRequest") and + this.getArgument(0).toString().toLowerCase() in [ + "\"wl-proxy-client-ip\"", "\"proxy-client-ip\"", "\"http_client_ip\"", + "\"http_x_forwarded_for\"", "\"x-real-ip\"" + ] + } +} + +/** A call to `ServletRequest.getRemoteAddr` method. */ +class RemoteAddrCall extends MethodAccess { + RemoteAddrCall() { + this.getMethod().hasName("getRemoteAddr") and + this.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("javax.servlet", "ServletRequest") + } +} + +/** The first one in the method to get the ip value through `x-forwarded-for`. */ +predicate xffIsFirstGet(Node node) { + exists(HeaderIpCall hic | + node.getEnclosingCallable() = hic.getEnclosingCallable() and + node.getLocation().getEndLine() < hic.getLocation().getEndLine() + ) + or + exists(RemoteAddrCall rac | + node.getEnclosingCallable() = rac.getEnclosingCallable() and + node.getLocation().getEndLine() < rac.getLocation().getEndLine() + ) + or + not exists(HeaderIpCall hic, RemoteAddrCall rac | + node.getEnclosingCallable() = hic.getEnclosingCallable() and + node.getEnclosingCallable() = rac.getEnclosingCallable() + ) +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.expected b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.expected new file mode 100644 index 000000000000..a71ad9629ceb --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.expected @@ -0,0 +1,14 @@ +edges +| UseOfLessTrustedSource.java:19:26:19:61 | getHeader(...) : String | UseOfLessTrustedSource.java:25:16:25:25 | remoteAddr | +| UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) : String | UseOfLessTrustedSource.java:32:60:32:61 | ip | +| UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) : String | UseOfLessTrustedSource.java:58:28:58:48 | ... + ... | +nodes +| UseOfLessTrustedSource.java:19:26:19:61 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| UseOfLessTrustedSource.java:25:16:25:25 | remoteAddr | semmle.label | remoteAddr | +| UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) : String | semmle.label | getHeader(...) : String | +| UseOfLessTrustedSource.java:32:60:32:61 | ip | semmle.label | ip | +| UseOfLessTrustedSource.java:58:28:58:48 | ... + ... | semmle.label | ... + ... | +#select +| UseOfLessTrustedSource.java:25:16:25:25 | remoteAddr | UseOfLessTrustedSource.java:19:26:19:61 | getHeader(...) : String | UseOfLessTrustedSource.java:25:16:25:25 | remoteAddr | X-Forwarded-For spoofing might include code from $@. | UseOfLessTrustedSource.java:19:26:19:61 | getHeader(...) | this user input | +| UseOfLessTrustedSource.java:32:60:32:61 | ip | UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) : String | UseOfLessTrustedSource.java:32:60:32:61 | ip | X-Forwarded-For spoofing might include code from $@. | UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) | this user input | +| UseOfLessTrustedSource.java:58:28:58:48 | ... + ... | UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) : String | UseOfLessTrustedSource.java:58:28:58:48 | ... + ... | X-Forwarded-For spoofing might include code from $@. | UseOfLessTrustedSource.java:30:21:30:56 | getHeader(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.java b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.java new file mode 100644 index 000000000000..d338134ed3ed --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.java @@ -0,0 +1,74 @@ +import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class UseOfLessTrustedSource { + + private static final Logger log = LoggerFactory.getLogger(UseOfLessTrustedSource.class); + + @GetMapping(value = "bad1") + @ResponseBody + public String bad1(HttpServletRequest request) { + String remoteAddr = ""; + if (request != null) { + remoteAddr = request.getHeader("X-FORWARDED-FOR"); + remoteAddr = remoteAddr.split(",")[0]; + if (remoteAddr == null || "".equals(remoteAddr)) { + remoteAddr = request.getRemoteAddr(); + } + } + return remoteAddr; + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) { + String ip = request.getHeader("X-Forwarded-For"); + + log.debug("getClientIP header X-Forwarded-For:{}", ip); + + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("Proxy-Client-IP"); + log.debug("getClientIP header Proxy-Client-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + log.debug("getClientIP header WL-Proxy-Client-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("HTTP_CLIENT_IP"); + log.debug("getClientIP header HTTP_CLIENT_IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("HTTP_X_FORWARDED_FOR"); + log.debug("getClientIP header HTTP_X_FORWARDED_FOR:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getHeader("X-Real-IP"); + log.debug("getClientIP header X-Real-IP:{}", ip); + } + if (StringUtils.isBlank(ip) || StringUtils.equalsIgnoreCase("unknown", ip)) { + ip = request.getRemoteAddr(); + log.debug("getRemoteAddr IP:{}", ip); + } + System.out.println("client ip is: " + ip); + } + + @GetMapping(value = "good1") + @ResponseBody + public String good1(HttpServletRequest request) { + String remoteAddr = ""; + if (request != null) { + remoteAddr = request.getHeader("X-FORWARDED-FOR"); + remoteAddr = remoteAddr.split(",")[remoteAddr.split(",").length - 1]; // good + if (remoteAddr == null || "".equals(remoteAddr)) { + remoteAddr = request.getRemoteAddr(); + } + } + return remoteAddr; + } +} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.qlref b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.qlref new file mode 100644 index 000000000000..3c547a2c8714 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-348/UseOfLessTrustedSource.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.ql \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-348/options b/java/ql/test/experimental/query-tests/security/CWE-348/options new file mode 100644 index 000000000000..40bcee8c133d --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-348/options @@ -0,0 +1,2 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/springframework-5.2.3/:${tes +tdir}/../../../../stubs/slf4j-api-1.6.4/:${testdir}/../../../../stubs/apache-commons-lang3-3.7/ \ No newline at end of file diff --git a/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Logger.java b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Logger.java new file mode 100644 index 000000000000..1d8b7ea23189 --- /dev/null +++ b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Logger.java @@ -0,0 +1,127 @@ +package org.slf4j; + +public interface Logger { + String ROOT_LOGGER_NAME = "ROOT"; + + String getName(); + + boolean isTraceEnabled(); + + void trace(String var1); + + void trace(String var1, Object var2); + + void trace(String var1, Object var2, Object var3); + + void trace(String var1, Object[] var2); + + void trace(String var1, Throwable var2); + + boolean isTraceEnabled(Marker var1); + + void trace(Marker var1, String var2); + + void trace(Marker var1, String var2, Object var3); + + void trace(Marker var1, String var2, Object var3, Object var4); + + void trace(Marker var1, String var2, Object[] var3); + + void trace(Marker var1, String var2, Throwable var3); + + boolean isDebugEnabled(); + + void debug(String var1); + + void debug(String var1, Object var2); + + void debug(String var1, Object var2, Object var3); + + void debug(String var1, Object[] var2); + + void debug(String var1, Throwable var2); + + boolean isDebugEnabled(Marker var1); + + void debug(Marker var1, String var2); + + void debug(Marker var1, String var2, Object var3); + + void debug(Marker var1, String var2, Object var3, Object var4); + + void debug(Marker var1, String var2, Object[] var3); + + void debug(Marker var1, String var2, Throwable var3); + + boolean isInfoEnabled(); + + void info(String var1); + + void info(String var1, Object var2); + + void info(String var1, Object var2, Object var3); + + void info(String var1, Object[] var2); + + void info(String var1, Throwable var2); + + boolean isInfoEnabled(Marker var1); + + void info(Marker var1, String var2); + + void info(Marker var1, String var2, Object var3); + + void info(Marker var1, String var2, Object var3, Object var4); + + void info(Marker var1, String var2, Object[] var3); + + void info(Marker var1, String var2, Throwable var3); + + boolean isWarnEnabled(); + + void warn(String var1); + + void warn(String var1, Object var2); + + void warn(String var1, Object[] var2); + + void warn(String var1, Object var2, Object var3); + + void warn(String var1, Throwable var2); + + boolean isWarnEnabled(Marker var1); + + void warn(Marker var1, String var2); + + void warn(Marker var1, String var2, Object var3); + + void warn(Marker var1, String var2, Object var3, Object var4); + + void warn(Marker var1, String var2, Object[] var3); + + void warn(Marker var1, String var2, Throwable var3); + + boolean isErrorEnabled(); + + void error(String var1); + + void error(String var1, Object var2); + + void error(String var1, Object var2, Object var3); + + void error(String var1, Object[] var2); + + void error(String var1, Throwable var2); + + boolean isErrorEnabled(Marker var1); + + void error(Marker var1, String var2); + + void error(Marker var1, String var2, Object var3); + + void error(Marker var1, String var2, Object var3, Object var4); + + void error(Marker var1, String var2, Object[] var3); + + void error(Marker var1, String var2, Throwable var3); +} \ No newline at end of file diff --git a/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/LoggerFactory.java b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/LoggerFactory.java new file mode 100644 index 000000000000..21ef158130a8 --- /dev/null +++ b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/LoggerFactory.java @@ -0,0 +1,21 @@ +package org.slf4j; + +import java.io.IOException; +import java.net.URL; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; + +public final class LoggerFactory { + + public static Logger getLogger(String name) { + return null; + } + + public static Logger getLogger(Class clazz) { + return null; + } + +} \ No newline at end of file diff --git a/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Marker.java b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Marker.java new file mode 100644 index 000000000000..e6ac4846a791 --- /dev/null +++ b/java/ql/test/stubs/slf4j-api-1.6.4/org/slf4j/Marker.java @@ -0,0 +1,30 @@ +package org.slf4j; + +import java.io.Serializable; +import java.util.Iterator; + +public interface Marker extends Serializable { + String ANY_MARKER = "*"; + String ANY_NON_NULL_MARKER = "+"; + + String getName(); + + void add(Marker var1); + + boolean remove(Marker var1); + + /** @deprecated */ + boolean hasChildren(); + + boolean hasReferences(); + + Iterator iterator(); + + boolean contains(Marker var1); + + boolean contains(String var1); + + boolean equals(Object var1); + + int hashCode(); +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java new file mode 100644 index 000000000000..edfe917400b7 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java @@ -0,0 +1,21 @@ +package org.springframework.core.annotation; + +import java.lang.annotation.Annotation; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +@Documented +public @interface AliasFor { + @AliasFor("attribute") + String value() default ""; + + @AliasFor("value") + String attribute() default ""; + + Class annotation() default Annotation.class; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java index 0bfb67d99c18..9b1751fa2ae3 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java @@ -1,9 +1,14 @@ package org.springframework.stereotype; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; -@Target(value=ElementType.TYPE) -@Retention(value=RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) @Documented -@Component -public @interface Controller { } +public @interface Controller { + String value() default ""; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java new file mode 100644 index 000000000000..a5a51786d209 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java @@ -0,0 +1,202 @@ +package org.springframework.util; + +import java.lang.reflect.Array; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Optional; +import java.util.StringJoiner; +import org.springframework.lang.Nullable; + +public abstract class ObjectUtils { + + private static final int INITIAL_HASH = 7; + private static final int MULTIPLIER = 31; + private static final String EMPTY_STRING = ""; + private static final String NULL_STRING = "null"; + private static final String ARRAY_START = "{"; + private static final String ARRAY_END = "}"; + private static final String EMPTY_ARRAY = "{}"; + private static final String ARRAY_ELEMENT_SEPARATOR = ", "; + private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; + + public ObjectUtils() { + } + + public static boolean isCheckedException(Throwable ex) { + return false; + } + + public static boolean isCompatibleWithThrowsClause(Throwable ex, @Nullable Class... declaredExceptions) { + return false; + } + + public static boolean isArray(@Nullable Object obj) { + return false; + } + + public static boolean isEmpty(@Nullable Object[] array) { + return false; + } + + public static boolean isEmpty(@Nullable Object obj) { + return false; + } + + @Nullable + public static Object unwrapOptional(@Nullable Object obj) { + return null; + } + + public static boolean containsElement(@Nullable Object[] array, Object element) { + return true; + } + + public static boolean containsConstant(Enum[] enumValues, String constant) { + return true; + } + + public static boolean containsConstant(Enum[] enumValues, String constant, boolean caseSensitive) { + return true; + } + + public static > E caseInsensitiveValueOf(E[] enumValues, String constant) { + return null; + } + + public static A[] addObjectToArray(@Nullable A[] array, @Nullable O obj) { + return null; + } + + public static Object[] toObjectArray(@Nullable Object source) { + return null; + } + + public static boolean nullSafeEquals(@Nullable Object o1, @Nullable Object o2) { + return false; + } + + private static boolean arrayEquals(Object o1, Object o2) { + return false; + } + + public static int nullSafeHashCode(@Nullable Object obj) { + return 1; + } + + public static int nullSafeHashCode(@Nullable Object[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable boolean[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable byte[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable char[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable double[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable float[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable int[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable long[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable short[] array) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(boolean bool) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(double dbl) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(float flt) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(long lng) { + return 1; + } + + public static String identityToString(@Nullable Object obj) { + return ""; + } + + public static String getIdentityHexString(Object obj) { + return ""; + } + + public static String getDisplayString(@Nullable Object obj) { + return ""; + } + + public static String nullSafeClassName(@Nullable Object obj) { + return ""; + } + + public static String nullSafeToString(@Nullable Object obj) { + return ""; + } + + public static String nullSafeToString(@Nullable Object[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable boolean[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable byte[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable char[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable double[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable float[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable int[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable long[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable short[] array) { + return ""; + } +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java new file mode 100644 index 000000000000..a78d47e44c6a --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java @@ -0,0 +1,30 @@ +package org.springframework.util; + +import java.io.ByteArrayOutputStream; +import java.nio.charset.Charset; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Deque; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Locale; +import java.util.Properties; +import java.util.Set; +import java.util.StringJoiner; +import java.util.StringTokenizer; +import java.util.TimeZone; +import org.springframework.lang.Nullable; + +public abstract class StringUtils { + + @Deprecated + public static boolean isEmpty(@Nullable Object str) { + return true; + } + +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java new file mode 100644 index 000000000000..541c7cd4e217 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java @@ -0,0 +1,51 @@ +package org.springframework.web.bind.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; + +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@RequestMapping( + method = {RequestMethod.GET} +) +public @interface GetMapping { + @AliasFor( + annotation = RequestMapping.class + ) + String name() default ""; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] value() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] path() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] params() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] headers() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] consumes() default {}; + + @AliasFor( + annotation = RequestMapping.class + ) + String[] produces() default {}; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java new file mode 100644 index 000000000000..5f269bbcbb87 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java @@ -0,0 +1,4 @@ +package org.springframework.web.bind.annotation; + +public @interface Mapping { +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java index 73ff8d1b03af..093065ca5f16 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java @@ -1,11 +1,32 @@ package org.springframework.web.bind.annotation; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; @Target(value={ElementType.METHOD,ElementType.TYPE}) @Retention(value=RetentionPolicy.RUNTIME) @Documented +@Mapping public @interface RequestMapping { + String name() default ""; + + @AliasFor("path") + String[] value() default {}; + + @AliasFor("value") + String[] path() default {}; RequestMethod[] method() default {}; + + String[] params() default {}; + + String[] headers() default {}; + + String[] consumes() default {}; + + String[] produces() default {}; } diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java index 5ae52ad123fa..56094811c376 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java @@ -1,8 +1,23 @@ package org.springframework.web.bind.annotation; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; -@Target(value=ElementType.PARAMETER) -@Retention(value=RetentionPolicy.RUNTIME) +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) @Documented -public @interface RequestParam { } +public @interface RequestParam { + @AliasFor("name") + String value() default ""; + + @AliasFor("value") + String name() default ""; + + boolean required() default true; + + String defaultValue() default "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java new file mode 100644 index 000000000000..4f21b6daaaf0 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java @@ -0,0 +1,13 @@ +package org.springframework.web.bind.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface ResponseBody { +} From 86ef2588f1599cbf0c1ed578676b0e51728823d6 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 8 Apr 2021 17:55:29 +0800 Subject: [PATCH 0104/1662] Restore @Component annotation --- .../org/springframework/stereotype/Controller.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java index 9b1751fa2ae3..a4a49fffb90a 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java @@ -9,6 +9,7 @@ @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented +@Component public @interface Controller { String value() default ""; } From 21004006d652b82213ff502bc3609b57afa626a9 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 8 Apr 2021 19:17:04 +0800 Subject: [PATCH 0105/1662] Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll Co-authored-by: Chris Smowton --- .../Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll index 0598f8438404..a3204dc109a4 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSourceLib.qll @@ -41,7 +41,7 @@ class SplitMethod extends Method { } /** - * A call to the ServletRequest.getHeader method and the argument are + * A call to the ServletRequest.getHeader method with an argument * `wl-proxy-client-ip`/`proxy-client-ip`/`http_client_ip`/`http_x_forwarded_for`/`x-real-ip`. */ class HeaderIpCall extends MethodAccess { From bfbfe7af13617476188fa08f69d5f670727c721f Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 8 Apr 2021 19:21:58 +0800 Subject: [PATCH 0106/1662] Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp Co-authored-by: Chris Smowton --- .../Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp index 1c3a4485cbd8..031aa0d11fdb 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp @@ -24,9 +24,8 @@ and get the last value of the split array.

    -
  • Prevent IP address spoofing with X-Forwarded-For header when using AWS ELB and Clojure Ring: - -Prevent IP address spoofing with... +
  • Dennis Schneider: +Prevent IP address spoofing with X-Forwarded-For header when using AWS ELB and Clojure Ring
  • Security Rule Zero: A Warning about X-Forwarded-For: From 1da48ed4d10b1ed7ed9585c647db3094f1d813e3 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 8 Apr 2021 19:22:14 +0800 Subject: [PATCH 0107/1662] Update java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp Co-authored-by: Chris Smowton --- .../Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp index 031aa0d11fdb..6b2eb2e7eed1 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-348/UseOfLessTrustedSource.qhelp @@ -28,9 +28,7 @@ and get the last value of the split array.

    Prevent IP address spoofing with X-Forwarded-For header when using AWS ELB and Clojure Ring
  • -
  • Security Rule Zero: A Warning about X-Forwarded-For: - -Security Rule Zero: A Warning about X-Forwarded-For +
  • Security Rule Zero: A Warning about X-Forwarded-For
  • From b39a3ab12ccd57ec76fc22b58d2fde78aadf38c7 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Thu, 8 Apr 2021 20:32:10 +0300 Subject: [PATCH 0108/1662] Added setVariable() sink --- .../CWE-094/JakartaExpressionInjectionLib.qll | 4 +++ .../JakartaExpressionInjection.expected | 31 +++++++++++-------- .../CWE-094/JakartaExpressionInjection.java | 7 +++++ .../java-ee-el/javax/el/ELProcessor.java | 1 + 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index e3a3994c8818..b1c5d1e8ae20 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -44,6 +44,10 @@ private class ExpressionEvaluationSink extends DataFlow::ExprNode { m.getDeclaringType() instanceof ELProcessor and m.hasName(["eval", "getValue", "setValue"]) and ma.getArgument(0) = taintFrom + or + m.getDeclaringType() instanceof ELProcessor and + m.hasName("setVariable") and + ma.getArgument(1) = taintFrom ) } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected index e0d699b14e3a..ef002aefdf5c 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected @@ -5,15 +5,17 @@ edges | JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:44:24:44:33 | expression : String | | JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:54:24:54:33 | expression : String | | JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:61:24:61:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:70:24:70:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:79:24:79:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:68:24:68:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:77:24:77:33 | expression : String | +| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:86:24:86:33 | expression : String | | JakartaExpressionInjection.java:30:24:30:33 | expression : String | JakartaExpressionInjection.java:32:28:32:37 | expression | | JakartaExpressionInjection.java:37:24:37:33 | expression : String | JakartaExpressionInjection.java:39:32:39:41 | expression | | JakartaExpressionInjection.java:44:24:44:33 | expression : String | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | | JakartaExpressionInjection.java:54:24:54:33 | expression : String | JakartaExpressionInjection.java:56:32:56:41 | expression | -| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:65:13:65:13 | e | -| JakartaExpressionInjection.java:70:24:70:33 | expression : String | JakartaExpressionInjection.java:74:13:74:13 | e | -| JakartaExpressionInjection.java:79:24:79:33 | expression : String | JakartaExpressionInjection.java:83:13:83:13 | e | +| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:63:43:63:52 | expression | +| JakartaExpressionInjection.java:68:24:68:33 | expression : String | JakartaExpressionInjection.java:72:13:72:13 | e | +| JakartaExpressionInjection.java:77:24:77:33 | expression : String | JakartaExpressionInjection.java:81:13:81:13 | e | +| JakartaExpressionInjection.java:86:24:86:33 | expression : String | JakartaExpressionInjection.java:90:13:90:13 | e | nodes | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | JakartaExpressionInjection.java:24:31:24:40 | expression : String | semmle.label | expression : String | @@ -26,16 +28,19 @@ nodes | JakartaExpressionInjection.java:54:24:54:33 | expression : String | semmle.label | expression : String | | JakartaExpressionInjection.java:56:32:56:41 | expression | semmle.label | expression | | JakartaExpressionInjection.java:61:24:61:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:65:13:65:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:70:24:70:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:74:13:74:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:79:24:79:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:83:13:83:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:63:43:63:52 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:68:24:68:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:72:13:72:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:77:24:77:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:81:13:81:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:86:24:86:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:90:13:90:13 | e | semmle.label | e | #select | JakartaExpressionInjection.java:32:28:32:37 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:32:28:32:37 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | | JakartaExpressionInjection.java:39:32:39:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:39:32:39:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | | JakartaExpressionInjection.java:56:32:56:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:56:32:56:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:65:13:65:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:65:13:65:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:74:13:74:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:74:13:74:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:83:13:83:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:83:13:83:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:63:43:63:52 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:63:43:63:52 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:72:13:72:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:72:13:72:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:81:13:81:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:81:13:81:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:90:13:90:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:90:13:90:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java index a9fb2d45d6f4..2e1d1e55b020 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java @@ -57,6 +57,13 @@ private static void testWithELProcessorSetValue() throws IOException { }); } + private static void testWithELProcessorSetVariable() throws IOException { + testWithSocket(expression -> { + ELProcessor processor = new ELProcessor(); + processor.setVariable("test", expression); + }); + } + private static void testWithJuelValueExpressionGetValue() throws IOException { testWithSocket(expression -> { ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); diff --git a/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java b/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java index 3c523e685c5e..95895fabc648 100644 --- a/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java +++ b/java/ql/test/stubs/java-ee-el/javax/el/ELProcessor.java @@ -4,4 +4,5 @@ public class ELProcessor { public Object eval(String expression) { return null; } public Object getValue(String expression, Class expectedType) { return null; } public void setValue(String expression, Object value) {} + public void setVariable(String var, String expression) {} } From 3d117243e4acd9c3fd48bc13807e5e22dbf4aebc Mon Sep 17 00:00:00 2001 From: ihsinme Date: Thu, 8 Apr 2021 22:05:31 +0300 Subject: [PATCH 0109/1662] Update test.c --- .../query-tests/Security/CWE/CWE-691/semmle/tests/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c index fc30f7a6e97e..e2fccf587366 100644 --- a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c @@ -5,9 +5,9 @@ void workFunction_0(char *s) { int intSize; char buf[80]; if(intSize>0 && intSize<80 && memset(buf,0,intSize)) return; // GOOD - if(intSize>0 & intSize<80 & memset(buf,0,intSize)) return; // BAD + if(intSize>0 & intSize<80 & memset(buf,0,intSize)) return; // BAD [NOT DETECTED] if(intSize>0 && tmpFunction()) return; - if(intSize<0 & tmpFunction()) return; // BAD + if(intSize<0 & tmpFunction()) return; // BAD [NOT DETECTED] } void workFunction_1(char *s) { int intA,intB; From a1850ddad47a07e93e9c2f94b10db2827fc5d863 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 22:55:48 +0200 Subject: [PATCH 0110/1662] Change LDAP config (qll) filename --- python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql | 2 +- .../python/security/injection/{LDAPInjection.qll => LDAP.qll} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename python/ql/src/experimental/semmle/python/security/injection/{LDAPInjection.qll => LDAP.qll} (100%) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 945a7b94473d..28748595c465 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -11,7 +11,7 @@ // Determine precision above import python -import experimental.semmle.python.security.injection.LDAPInjection +import experimental.semmle.python.security.injection.LDAP import DataFlow::PathGraph from LDAPInjectionFlowConfig config, DataFlow::PathNode source, DataFlow::PathNode sink diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAP.qll similarity index 100% rename from python/ql/src/experimental/semmle/python/security/injection/LDAPInjection.qll rename to python/ql/src/experimental/semmle/python/security/injection/LDAP.qll From 8661cb071948d0311660ff720842f4e42d85d399 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 22:56:12 +0200 Subject: [PATCH 0111/1662] Polish LDAP3Query --- .../ql/src/experimental/semmle/python/frameworks/Stdlib.qll | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 24def6be2773..76d4f3268788 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -60,10 +60,6 @@ private module LDAP { } private module LDAP3 { - private class LDAP3QueryMethods extends string { - LDAP3QueryMethods() { this in ["search"] } - } - private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; @@ -72,7 +68,7 @@ private module LDAP { this.getFunction() = searchMethod and API::moduleImport("ldap3").getMember("Connection").getACall() = searchMethod.getObject().getALocalSource() and - searchMethod.getAttributeName() instanceof LDAP3QueryMethods and + searchMethod.getAttributeName() = "search" and ( ldapNode = this.getArg(0) or ldapNode = this.getArg(1) From 7296879bc9f1b40a508d69e74c6f047c6395e009 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:11:20 +0200 Subject: [PATCH 0112/1662] Polish tests --- .../Security/CWE-090/unit_tests/ldap3_bad.py | 21 +++++----- .../Security/CWE-090/unit_tests/ldap3_good.py | 26 +++++-------- .../Security/CWE-090/unit_tests/ldap_bad.py | 34 +++++++---------- .../Security/CWE-090/unit_tests/ldap_good.py | 38 +++++++------------ 4 files changed, 46 insertions(+), 73 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py index 76b7f309bd17..a5b4748c1467 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py @@ -6,17 +6,10 @@ @app.route("/normal") def normal(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] + """ + A RemoteFlowSource is used directly as DN and search filter + """ - srv = ldap3.Server('ldap://127.0.0.1', port=1337) - conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) - conn.search(unsafe_dn, unsafe_filter, attributes=[ - "testAttr1", "testAttr2"]) - - -@app.route("/normal_noAttrs") -def normal_noAttrs(): unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -27,12 +20,16 @@ def normal_noAttrs(): @app.route("/direct") def direct(): + """ + A RemoteFlowSource is used directly as DN and search filter using a oneline call to .search + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] srv = ldap3.Server('ldap://127.0.0.1', port=1337) - conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True).search(unsafe_dn, unsafe_filter, attributes=[ - "testAttr1", "testAttr2"]) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True).search( + unsafe_dn, unsafe_filter) # if __name__ == "__main__": # app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py index c3cc1272ea77..a4fbb718c5b7 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py @@ -8,20 +8,10 @@ @app.route("/normal") def normal(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] - - safe_dn = escape_rdn(unsafe_dn) - safe_filter = escape_filter_chars(unsafe_filter) + """ + A RemoteFlowSource is sanitized and used as DN and search filter + """ - srv = ldap3.Server('ldap://127.0.0.1', port=1337) - conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) - conn.search(safe_dn, safe_filter, attributes=[ - "testAttr1", "testAttr2"]) - - -@app.route("/normal_noAttrs") -def normal_noAttrs(): unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -29,12 +19,16 @@ def normal_noAttrs(): safe_filter = escape_filter_chars(unsafe_filter) srv = ldap3.Server('ldap://127.0.0.1', port=1337) - conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn = ldap3.Connection(srv, user=safe_dn, auto_bind=True) conn.search(safe_dn, safe_filter) @app.route("/direct") def direct(): + """ + A RemoteFlowSource is sanitized and used as DN and search filter using a oneline call to .search + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -42,8 +36,8 @@ def direct(): safe_filter = escape_filter_chars(unsafe_filter) srv = ldap3.Server('ldap://127.0.0.1', port=1337) - conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True).search(safe_dn, safe_filter, attributes=[ - "testAttr1", "testAttr2"]) + conn = ldap3.Connection(srv, user=safe_dn, auto_bind=True).search( + safe_dn, safe_filter) # if __name__ == "__main__": # app.run(debug=True) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py index 011f3b828654..728a9179c7a0 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py @@ -6,16 +6,10 @@ @app.route("/normal") def normal(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] - - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter, ["testAttr1", "testAttr2"]) - + """ + A RemoteFlowSource is used directly as DN and search filter + """ -@app.route("/normal_noAttrs") -def normal_noAttrs(): unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -26,30 +20,30 @@ def normal_noAttrs(): @app.route("/direct") def direct(): + """ + A RemoteFlowSource is used directly as DN and search filter using a oneline call to .search_s + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] user = ldap.initialize("ldap://127.0.0.1:1337").search_s( - unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter, ["testAttr1", "testAttr2"]) + unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter) @app.route("/normal_argbyname") def normal_argbyname(): + """ + A RemoteFlowSource is used directly as DN and search filter, while the search filter is specified as + an argument by name + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") user = ldap_connection.search_s( - unsafe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=unsafe_filter) - - -@app.route("/direct_argbyname") -def direct_argbyname(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] - - user = ldap.initialize("ldap://127.0.0.1:1337").search_s( - unsafe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=unsafe_filter) + unsafe_dn, ldap.SCOPE_SUBTREE, filterstr=unsafe_filter) # if __name__ == "__main__": diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py index eda3883da6dc..b2c00cc04cb3 100644 --- a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py +++ b/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py @@ -8,19 +8,10 @@ @app.route("/normal") def normal(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] - - safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) - safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + """ + A RemoteFlowSource is sanitized and used as DN and search filter + """ - ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") - user = ldap_connection.search_s( - safe_dn, ldap.SCOPE_SUBTREE, safe_filter, ["testAttr1", "testAttr2"]) - - -@app.route("/normal_noAttrs") -def normal_noAttrs(): unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -34,6 +25,10 @@ def normal_noAttrs(): @app.route("/direct") def direct(): + """ + A RemoteFlowSource is sanitized and used as DN and search filter using a oneline call to .search_s + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -46,6 +41,11 @@ def direct(): @app.route("/normal_argbyname") def normal_argbyname(): + """ + A RemoteFlowSource is sanitized and used as DN and search filter, while the search filter is specified as + an argument by name + """ + unsafe_dn = "dc=%s" % request.args['dc'] unsafe_filter = "(user=%s)" % request.args['username'] @@ -54,19 +54,7 @@ def normal_argbyname(): ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") user = ldap_connection.search_s( - safe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=safe_filter) - - -@app.route("/direct_argbyname") -def direct_argbyname(): - unsafe_dn = "dc=%s" % request.args['dc'] - unsafe_filter = "(user=%s)" % request.args['username'] - - safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) - safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) - - user = ldap.initialize("ldap://127.0.0.1:1337").search_s( - safe_dn, ldap.SCOPE_SUBTREE, attrlist=["testAttr1", "testAttr2"], filterstr=safe_filter) + safe_dn, ldap.SCOPE_SUBTREE, filterstr=safe_filter) # if __name__ == "__main__": From 3c1ca7232469c71e96732e0fbbc4b8a825e3884a Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:44:30 +0200 Subject: [PATCH 0113/1662] Improve qhelp --- .../Security/CWE-090/LDAPInjection.qhelp | 66 ++++++++++++------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp index a570549abfc4..0c6c4b9ca205 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp @@ -1,28 +1,50 @@ - - + - -

    If an LDAP query is built by a not sanitized user-provided value, a user is likely to be able to run malicious LDAP queries.

    -
    + +

    If an LDAP query or DN is built using string concatenation or string formatting, and the +components of the concatenation include user input without any proper sanitization, a user +is likely to be able to run malicious LDAP queries.

    +
    + + +

    If user input must be included in an LDAP query or DN, it should be escaped to +avoid a malicious user providing special characters that change the meaning +of the query. In Python2, user input should be escaped with ldap.dn.escape_dn_chars +or ldap.filter.escape_filter_chars, while in Python3, user input should be escaped with +ldap3.utils.dn.escape_rdn or ldap3.utils.conv.escape_filter_chars +depending on the component tainted by the user. A good practice is to escape filter characters +that could change the meaning of the query (https://tools.ietf.org/search/rfc4515#section-3).

    +
    + + +

    In the following examples, the code accepts both username and dc from the user, +which it then uses to build a LDAP query and DN.

    + +

    The first and the second example uses the unsanitized user input directly +in the search filter and DN for the LDAP query. +A malicious user could provide special characters to change the meaning of these +components, and search for a completely different set of values.

    - -

    In case user input must compose an LDAP query, it should be escaped in order to avoid a malicious user supplying special characters that change the actual purpose of the query. To do so, functions that ldap frameworks provide such as escape_filter_chars should be applied to that user input. - + + +

    In the third and four example, the input provided by the user is sanitized before it is included in the search filter or DN. +This ensures the meaning of the query cannot be changed by a malicious user.

    - -
  • - OWASP - LDAP Injection -
  • -
  • - SonarSource - RSPEC-2078 -
  • -
  • - Python - LDAP Documentation -
  • -
    + + +
    + +
  • OWASP: LDAP Injection Prevention Cheat Sheet.
  • +
  • OWASP: LDAP Injection.
  • +
  • SonarSource: RSPEC-2078.
  • +
  • Python2: LDAP Documentation.
  • +
  • Python3: LDAP Documentation.
  • +
  • Wikipedia: LDAP injection.
  • +
  • BlackHat: LDAP Injection and Blind LDAP Injection.
  • +
  • LDAP: Understanding and Defending Against LDAP Injection Attacks.
  • +
    \ No newline at end of file From 1554f4f48d04e89c78783f2ec54c4f878fff60fe Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:44:46 +0200 Subject: [PATCH 0114/1662] Create qhelp examples --- .../Security/CWE-090/examples/example_bad1.py | 12 ++++++++++++ .../Security/CWE-090/examples/example_bad2.py | 12 ++++++++++++ .../Security/CWE-090/examples/example_good1.py | 17 +++++++++++++++++ .../Security/CWE-090/examples/example_good2.py | 17 +++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 python/ql/src/experimental/Security/CWE-090/examples/example_bad1.py create mode 100644 python/ql/src/experimental/Security/CWE-090/examples/example_bad2.py create mode 100644 python/ql/src/experimental/Security/CWE-090/examples/example_good1.py create mode 100644 python/ql/src/experimental/Security/CWE-090/examples/example_good2.py diff --git a/python/ql/src/experimental/Security/CWE-090/examples/example_bad1.py b/python/ql/src/experimental/Security/CWE-090/examples/example_bad1.py new file mode 100644 index 000000000000..4a1f86fd9811 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/examples/example_bad1.py @@ -0,0 +1,12 @@ +from flask import request, Flask +import ldap + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + unsafe_dn, ldap.SCOPE_SUBTREE, unsafe_filter) diff --git a/python/ql/src/experimental/Security/CWE-090/examples/example_bad2.py b/python/ql/src/experimental/Security/CWE-090/examples/example_bad2.py new file mode 100644 index 000000000000..87cb4a65b8b0 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/examples/example_bad2.py @@ -0,0 +1,12 @@ +from flask import request, Flask +import ldap3 + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=unsafe_dn, auto_bind=True) + conn.search(unsafe_dn, unsafe_filter) diff --git a/python/ql/src/experimental/Security/CWE-090/examples/example_good1.py b/python/ql/src/experimental/Security/CWE-090/examples/example_good1.py new file mode 100644 index 000000000000..ad9e9fe84f5d --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/examples/example_good1.py @@ -0,0 +1,17 @@ +from flask import request, Flask +import ldap +import ldap.filter +import ldap.dn + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = ldap.dn.escape_dn_chars(unsafe_dn) + safe_filter = ldap.filter.escape_filter_chars(unsafe_filter) + + ldap_connection = ldap.initialize("ldap://127.0.0.1:1337") + user = ldap_connection.search_s( + safe_dn, ldap.SCOPE_SUBTREE, safe_filter) diff --git a/python/ql/src/experimental/Security/CWE-090/examples/example_good2.py b/python/ql/src/experimental/Security/CWE-090/examples/example_good2.py new file mode 100644 index 000000000000..c86db1780406 --- /dev/null +++ b/python/ql/src/experimental/Security/CWE-090/examples/example_good2.py @@ -0,0 +1,17 @@ +from flask import request, Flask +import ldap3 +from ldap3.utils.dn import escape_rdn +from ldap3.utils.conv import escape_filter_chars + + +@app.route("/normal") +def normal(): + unsafe_dn = "dc=%s" % request.args['dc'] + unsafe_filter = "(user=%s)" % request.args['username'] + + safe_dn = escape_rdn(unsafe_dn) + safe_filter = escape_filter_chars(unsafe_filter) + + srv = ldap3.Server('ldap://127.0.0.1', port=1337) + conn = ldap3.Connection(srv, user=safe_dn, auto_bind=True) + conn.search(safe_dn, safe_filter) From 95bfdc49558f3fdee343fd9b018e45922a24678f Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:45:03 +0200 Subject: [PATCH 0115/1662] Move tests to /test --- .../experimental/query-tests/Security/CWE-090}/ldap3_bad.py | 0 .../experimental/query-tests/Security/CWE-090}/ldap3_good.py | 0 .../experimental/query-tests/Security/CWE-090}/ldap_bad.py | 0 .../experimental/query-tests/Security/CWE-090}/ldap_good.py | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename python/ql/{src/experimental/Security/CWE-090/unit_tests => test/experimental/query-tests/Security/CWE-090}/ldap3_bad.py (100%) rename python/ql/{src/experimental/Security/CWE-090/unit_tests => test/experimental/query-tests/Security/CWE-090}/ldap3_good.py (100%) rename python/ql/{src/experimental/Security/CWE-090/unit_tests => test/experimental/query-tests/Security/CWE-090}/ldap_bad.py (100%) rename python/ql/{src/experimental/Security/CWE-090/unit_tests => test/experimental/query-tests/Security/CWE-090}/ldap_good.py (100%) diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py b/python/ql/test/experimental/query-tests/Security/CWE-090/ldap3_bad.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_bad.py rename to python/ql/test/experimental/query-tests/Security/CWE-090/ldap3_bad.py diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py b/python/ql/test/experimental/query-tests/Security/CWE-090/ldap3_good.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/unit_tests/ldap3_good.py rename to python/ql/test/experimental/query-tests/Security/CWE-090/ldap3_good.py diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py b/python/ql/test/experimental/query-tests/Security/CWE-090/ldap_bad.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_bad.py rename to python/ql/test/experimental/query-tests/Security/CWE-090/ldap_bad.py diff --git a/python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py b/python/ql/test/experimental/query-tests/Security/CWE-090/ldap_good.py similarity index 100% rename from python/ql/src/experimental/Security/CWE-090/unit_tests/ldap_good.py rename to python/ql/test/experimental/query-tests/Security/CWE-090/ldap_good.py From 4f85de87debf91ace22bdea6cffc4c5f9788c4c0 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:45:12 +0200 Subject: [PATCH 0116/1662] Add qlref --- .../query-tests/Security/CWE-090/LDAPInjection.qlref | 1 + 1 file changed, 1 insertion(+) create mode 100644 python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.qlref diff --git a/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.qlref b/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.qlref new file mode 100644 index 000000000000..98b37bfdcf6e --- /dev/null +++ b/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE-090/LDAPInjection.ql From 7819d1a30b856d15c1ec3d7c051a0ec890d80b9f Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:45:26 +0200 Subject: [PATCH 0117/1662] Generate .expected --- .../Security/CWE-090/LDAPInjection.expected | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.expected diff --git a/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.expected b/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.expected new file mode 100644 index 000000000000..07f46fbecdc3 --- /dev/null +++ b/python/ql/test/experimental/query-tests/Security/CWE-090/LDAPInjection.expected @@ -0,0 +1,98 @@ +edges +| ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | ldap3_bad.py:13:27:13:38 | ControlFlowNode for Attribute | +| ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | ldap3_bad.py:14:35:14:41 | ControlFlowNode for request | +| ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | ldap3_bad.py:14:35:14:46 | ControlFlowNode for Attribute | +| ldap3_bad.py:13:27:13:38 | ControlFlowNode for Attribute | ldap3_bad.py:13:27:13:44 | ControlFlowNode for Subscript | +| ldap3_bad.py:13:27:13:44 | ControlFlowNode for Subscript | ldap3_bad.py:18:17:18:25 | ControlFlowNode for unsafe_dn | +| ldap3_bad.py:14:35:14:41 | ControlFlowNode for request | ldap3_bad.py:14:35:14:46 | ControlFlowNode for Attribute | +| ldap3_bad.py:14:35:14:46 | ControlFlowNode for Attribute | ldap3_bad.py:14:35:14:58 | ControlFlowNode for Subscript | +| ldap3_bad.py:14:35:14:58 | ControlFlowNode for Subscript | ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | +| ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | ldap3_bad.py:27:27:27:38 | ControlFlowNode for Attribute | +| ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | ldap3_bad.py:28:35:28:41 | ControlFlowNode for request | +| ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | ldap3_bad.py:28:35:28:46 | ControlFlowNode for Attribute | +| ldap3_bad.py:27:27:27:38 | ControlFlowNode for Attribute | ldap3_bad.py:27:27:27:44 | ControlFlowNode for Subscript | +| ldap3_bad.py:27:27:27:44 | ControlFlowNode for Subscript | ldap3_bad.py:32:9:32:17 | ControlFlowNode for unsafe_dn | +| ldap3_bad.py:28:35:28:41 | ControlFlowNode for request | ldap3_bad.py:28:35:28:46 | ControlFlowNode for Attribute | +| ldap3_bad.py:28:35:28:46 | ControlFlowNode for Attribute | ldap3_bad.py:28:35:28:58 | ControlFlowNode for Subscript | +| ldap3_bad.py:28:35:28:58 | ControlFlowNode for Subscript | ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | +| ldap_bad.py:13:27:13:33 | ControlFlowNode for request | ldap_bad.py:13:27:13:38 | ControlFlowNode for Attribute | +| ldap_bad.py:13:27:13:33 | ControlFlowNode for request | ldap_bad.py:14:35:14:41 | ControlFlowNode for request | +| ldap_bad.py:13:27:13:33 | ControlFlowNode for request | ldap_bad.py:14:35:14:46 | ControlFlowNode for Attribute | +| ldap_bad.py:13:27:13:38 | ControlFlowNode for Attribute | ldap_bad.py:13:27:13:44 | ControlFlowNode for Subscript | +| ldap_bad.py:13:27:13:44 | ControlFlowNode for Subscript | ldap_bad.py:18:9:18:17 | ControlFlowNode for unsafe_dn | +| ldap_bad.py:14:35:14:41 | ControlFlowNode for request | ldap_bad.py:14:35:14:46 | ControlFlowNode for Attribute | +| ldap_bad.py:14:35:14:46 | ControlFlowNode for Attribute | ldap_bad.py:14:35:14:58 | ControlFlowNode for Subscript | +| ldap_bad.py:14:35:14:58 | ControlFlowNode for Subscript | ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | +| ldap_bad.py:27:27:27:33 | ControlFlowNode for request | ldap_bad.py:27:27:27:38 | ControlFlowNode for Attribute | +| ldap_bad.py:27:27:27:33 | ControlFlowNode for request | ldap_bad.py:28:35:28:41 | ControlFlowNode for request | +| ldap_bad.py:27:27:27:33 | ControlFlowNode for request | ldap_bad.py:28:35:28:46 | ControlFlowNode for Attribute | +| ldap_bad.py:27:27:27:38 | ControlFlowNode for Attribute | ldap_bad.py:27:27:27:44 | ControlFlowNode for Subscript | +| ldap_bad.py:27:27:27:44 | ControlFlowNode for Subscript | ldap_bad.py:31:9:31:17 | ControlFlowNode for unsafe_dn | +| ldap_bad.py:28:35:28:41 | ControlFlowNode for request | ldap_bad.py:28:35:28:46 | ControlFlowNode for Attribute | +| ldap_bad.py:28:35:28:46 | ControlFlowNode for Attribute | ldap_bad.py:28:35:28:58 | ControlFlowNode for Subscript | +| ldap_bad.py:28:35:28:58 | ControlFlowNode for Subscript | ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | +| ldap_bad.py:41:27:41:33 | ControlFlowNode for request | ldap_bad.py:41:27:41:38 | ControlFlowNode for Attribute | +| ldap_bad.py:41:27:41:33 | ControlFlowNode for request | ldap_bad.py:42:35:42:41 | ControlFlowNode for request | +| ldap_bad.py:41:27:41:33 | ControlFlowNode for request | ldap_bad.py:42:35:42:46 | ControlFlowNode for Attribute | +| ldap_bad.py:41:27:41:38 | ControlFlowNode for Attribute | ldap_bad.py:41:27:41:44 | ControlFlowNode for Subscript | +| ldap_bad.py:41:27:41:44 | ControlFlowNode for Subscript | ldap_bad.py:46:9:46:17 | ControlFlowNode for unsafe_dn | +| ldap_bad.py:42:35:42:41 | ControlFlowNode for request | ldap_bad.py:42:35:42:46 | ControlFlowNode for Attribute | +| ldap_bad.py:42:35:42:46 | ControlFlowNode for Attribute | ldap_bad.py:42:35:42:58 | ControlFlowNode for Subscript | +| ldap_bad.py:42:35:42:58 | ControlFlowNode for Subscript | ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | +nodes +| ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap3_bad.py:13:27:13:38 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap3_bad.py:13:27:13:44 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap3_bad.py:14:35:14:41 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap3_bad.py:14:35:14:46 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap3_bad.py:14:35:14:58 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap3_bad.py:18:17:18:25 | ControlFlowNode for unsafe_dn | semmle.label | ControlFlowNode for unsafe_dn | +| ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | semmle.label | ControlFlowNode for unsafe_filter | +| ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap3_bad.py:27:27:27:38 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap3_bad.py:27:27:27:44 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap3_bad.py:28:35:28:41 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap3_bad.py:28:35:28:46 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap3_bad.py:28:35:28:58 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap3_bad.py:32:9:32:17 | ControlFlowNode for unsafe_dn | semmle.label | ControlFlowNode for unsafe_dn | +| ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | semmle.label | ControlFlowNode for unsafe_filter | +| ldap_bad.py:13:27:13:33 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:13:27:13:38 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:13:27:13:44 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:14:35:14:41 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:14:35:14:46 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:14:35:14:58 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:18:9:18:17 | ControlFlowNode for unsafe_dn | semmle.label | ControlFlowNode for unsafe_dn | +| ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | semmle.label | ControlFlowNode for unsafe_filter | +| ldap_bad.py:27:27:27:33 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:27:27:27:38 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:27:27:27:44 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:28:35:28:41 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:28:35:28:46 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:28:35:28:58 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:31:9:31:17 | ControlFlowNode for unsafe_dn | semmle.label | ControlFlowNode for unsafe_dn | +| ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | semmle.label | ControlFlowNode for unsafe_filter | +| ldap_bad.py:41:27:41:33 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:41:27:41:38 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:41:27:41:44 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:42:35:42:41 | ControlFlowNode for request | semmle.label | ControlFlowNode for request | +| ldap_bad.py:42:35:42:46 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | +| ldap_bad.py:42:35:42:58 | ControlFlowNode for Subscript | semmle.label | ControlFlowNode for Subscript | +| ldap_bad.py:46:9:46:17 | ControlFlowNode for unsafe_dn | semmle.label | ControlFlowNode for unsafe_dn | +| ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | semmle.label | ControlFlowNode for unsafe_filter | +#select +| ldap3_bad.py:18:17:18:25 | ControlFlowNode for unsafe_dn | ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | ldap3_bad.py:18:17:18:25 | ControlFlowNode for unsafe_dn | $@ LDAP query parameter comes from $@. | ldap3_bad.py:18:17:18:25 | ControlFlowNode for unsafe_dn | This | ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | a user-provided value | +| ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | This | ldap3_bad.py:13:27:13:33 | ControlFlowNode for request | a user-provided value | +| ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | ldap3_bad.py:14:35:14:41 | ControlFlowNode for request | ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap3_bad.py:18:28:18:40 | ControlFlowNode for unsafe_filter | This | ldap3_bad.py:14:35:14:41 | ControlFlowNode for request | a user-provided value | +| ldap3_bad.py:32:9:32:17 | ControlFlowNode for unsafe_dn | ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | ldap3_bad.py:32:9:32:17 | ControlFlowNode for unsafe_dn | $@ LDAP query parameter comes from $@. | ldap3_bad.py:32:9:32:17 | ControlFlowNode for unsafe_dn | This | ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | a user-provided value | +| ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | This | ldap3_bad.py:27:27:27:33 | ControlFlowNode for request | a user-provided value | +| ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | ldap3_bad.py:28:35:28:41 | ControlFlowNode for request | ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap3_bad.py:32:20:32:32 | ControlFlowNode for unsafe_filter | This | ldap3_bad.py:28:35:28:41 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:18:9:18:17 | ControlFlowNode for unsafe_dn | ldap_bad.py:13:27:13:33 | ControlFlowNode for request | ldap_bad.py:18:9:18:17 | ControlFlowNode for unsafe_dn | $@ LDAP query parameter comes from $@. | ldap_bad.py:18:9:18:17 | ControlFlowNode for unsafe_dn | This | ldap_bad.py:13:27:13:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | ldap_bad.py:13:27:13:33 | ControlFlowNode for request | ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:13:27:13:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | ldap_bad.py:14:35:14:41 | ControlFlowNode for request | ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:18:40:18:52 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:14:35:14:41 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:31:9:31:17 | ControlFlowNode for unsafe_dn | ldap_bad.py:27:27:27:33 | ControlFlowNode for request | ldap_bad.py:31:9:31:17 | ControlFlowNode for unsafe_dn | $@ LDAP query parameter comes from $@. | ldap_bad.py:31:9:31:17 | ControlFlowNode for unsafe_dn | This | ldap_bad.py:27:27:27:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | ldap_bad.py:27:27:27:33 | ControlFlowNode for request | ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:27:27:27:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | ldap_bad.py:28:35:28:41 | ControlFlowNode for request | ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:31:40:31:52 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:28:35:28:41 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:46:9:46:17 | ControlFlowNode for unsafe_dn | ldap_bad.py:41:27:41:33 | ControlFlowNode for request | ldap_bad.py:46:9:46:17 | ControlFlowNode for unsafe_dn | $@ LDAP query parameter comes from $@. | ldap_bad.py:46:9:46:17 | ControlFlowNode for unsafe_dn | This | ldap_bad.py:41:27:41:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | ldap_bad.py:41:27:41:33 | ControlFlowNode for request | ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:41:27:41:33 | ControlFlowNode for request | a user-provided value | +| ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | ldap_bad.py:42:35:42:41 | ControlFlowNode for request | ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | $@ LDAP query parameter comes from $@. | ldap_bad.py:46:50:46:62 | ControlFlowNode for unsafe_filter | This | ldap_bad.py:42:35:42:41 | ControlFlowNode for request | a user-provided value | From b405c675c2bb7a62faac778b968b827ef9b8b9f7 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:49:33 +0200 Subject: [PATCH 0118/1662] Add qhelp last newline --- python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp index 0c6c4b9ca205..e3b47f23b0f3 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp @@ -47,4 +47,4 @@ This ensures the meaning of the query cannot be changed by a malicious user.

  • BlackHat: LDAP Injection and Blind LDAP Injection.
  • LDAP: Understanding and Defending Against LDAP Injection Attacks.
  • - \ No newline at end of file + From 82f47f85715f8d92839b820ccb5bd4b8cc48b41c Mon Sep 17 00:00:00 2001 From: jorgectf Date: Thu, 8 Apr 2021 23:55:34 +0200 Subject: [PATCH 0119/1662] Polish metadata --- .../ql/src/experimental/Security/CWE-090/LDAPInjection.ql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql index 28748595c465..50c892483181 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.ql @@ -1,9 +1,10 @@ /** - * @name Python LDAP Injection - * @description Python LDAP Injection through search filter + * @name LDAP query built from user-controlled sources + * @description Building an LDAP query from user-controlled sources is vulnerable to insertion of + * malicious LDAP code by the user. * @kind path-problem * @problem.severity error - * @id python/ldap-injection + * @id py/ldap-injection * @tags experimental * security * external/cwe/cwe-090 From cd75433e3945fd6ffa4166d4c09108b489e37587 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Fri, 9 Apr 2021 00:52:50 +0200 Subject: [PATCH 0120/1662] Fix qhelp examples extension --- .../src/experimental/Security/CWE-090/LDAPInjection.qhelp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp index e3b47f23b0f3..bda9b75da99d 100644 --- a/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp +++ b/python/ql/src/experimental/Security/CWE-090/LDAPInjection.qhelp @@ -27,14 +27,14 @@ in the search filter and DN for the LDAP query. A malicious user could provide special characters to change the meaning of these components, and search for a completely different set of values.

    - - + +

    In the third and four example, the input provided by the user is sanitized before it is included in the search filter or DN. This ensures the meaning of the query cannot be changed by a malicious user.

    - - + + From a2e8d88a07df14cf22bbca4e3039b54107f8983a Mon Sep 17 00:00:00 2001 From: jorgectf Date: Fri, 9 Apr 2021 01:47:44 +0200 Subject: [PATCH 0121/1662] Write documentation --- .../experimental/semmle/python/Concepts.qll | 32 +++++++++++++ .../semmle/python/frameworks/Stdlib.qll | 46 +++++++++++++++++++ .../semmle/python/security/injection/LDAP.qll | 2 +- 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index 9022f9c38182..9d0dddc3f143 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -14,12 +14,28 @@ private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.TaintTracking private import experimental.semmle.python.Frameworks +/** Provides classes for modeling LDAP-related APIs. */ module LDAPQuery { + /** + * A data-flow node that collects methods executing a LDAP query. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `LDAPQuery` instead. + */ abstract class Range extends DataFlow::Node { + /** + * Gets the argument containing the executed expression. + */ abstract DataFlow::Node getLDAPNode(); } } +/** + * A data-flow node that collect methods executing a LDAP query. + * + * Extend this class to refine existing API models. If you want to model new APIs, + * extend `LDAPQuery::Range` instead. + */ class LDAPQuery extends DataFlow::Node { LDAPQuery::Range range; @@ -28,12 +44,28 @@ class LDAPQuery extends DataFlow::Node { DataFlow::Node getLDAPNode() { result = range.getLDAPNode() } } +/** Provides classes for modeling LDAP components escape-related APIs. */ module LDAPEscape { + /** + * A data-flow node that collects functions escaping LDAP components. + * + * Extend this class to model new APIs. If you want to refine existing API models, + * extend `LDAPEscape` instead. + */ abstract class Range extends DataFlow::Node { + /** + * Gets the argument containing the escaped expression. + */ abstract DataFlow::Node getEscapeNode(); } } +/** + * A data-flow node that collects functions escaping LDAP components. + * + * Extend this class to refine existing API models. If you want to model new APIs, + * extend `RegexEscape::Range` instead. + */ class LDAPEscape extends DataFlow::Node { LDAPEscape::Range range; diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 76d4f3268788..2bbca55f820c 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -10,14 +10,32 @@ private import semmle.python.dataflow.new.RemoteFlowSources private import experimental.semmle.python.Concepts private import semmle.python.ApiGraphs +/** + * Provides models for Python's ldap-related libraries. + */ private module LDAP { + /** + * Provides models for Python's `ldap` library. + * + * See https://www.python-ldap.org/en/python-ldap-3.3.0/index.html + */ private module LDAP2 { + /** + * List of `ldap` methods used to execute a query. + * + * See https://www.python-ldap.org/en/python-ldap-3.3.0/reference/ldap.html#functions + */ private class LDAP2QueryMethods extends string { LDAP2QueryMethods() { this in ["search", "search_s", "search_st", "search_ext", "search_ext_s"] } } + /** + * A class to find `ldap` methods executing a query. + * + * See `LDAP2QueryMethods` + */ private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; @@ -41,6 +59,11 @@ private module LDAP { override DataFlow::Node getLDAPNode() { result = ldapNode } } + /** + * A class to find calls to `ldap.dn.escape_dn_chars`. + * + * See https://github.com/python-ldap/python-ldap/blob/7ce471e238cdd9a4dd8d17baccd1c9e05e6f894a/Lib/ldap/dn.py#L17 + */ private class LDAP2EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { LDAP2EscapeDNCall() { this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() @@ -49,6 +72,11 @@ private module LDAP { override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } + /** + * A class to find calls to `ldap.filter.escape_filter_chars`. + * + * See https://www.python-ldap.org/en/python-ldap-3.3.0/reference/ldap-filter.html#ldap.filter.escape_filter_chars + */ private class LDAP2EscapeFilterCall extends DataFlow::CallCfgNode, LDAPEscape::Range { LDAP2EscapeFilterCall() { this = @@ -59,7 +87,15 @@ private module LDAP { } } + /** + * Provides models for Python's `ldap3` library. + * + * See https://pypi.org/project/ldap3/ + */ private module LDAP3 { + /** + * A class to find `ldap3` methods executing a query. + */ private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { DataFlow::Node ldapNode; @@ -79,6 +115,11 @@ private module LDAP { override DataFlow::Node getLDAPNode() { result = ldapNode } } + /** + * A class to find calls to `ldap3.utils.dn.escape_rdn`. + * + * See https://github.com/cannatag/ldap3/blob/4d33166f0869b929f59c6e6825a1b9505eb99967/ldap3/utils/dn.py#L390 + */ private class LDAP3EscapeDNCall extends DataFlow::CallCfgNode, LDAPEscape::Range { LDAP3EscapeDNCall() { this = @@ -92,6 +133,11 @@ private module LDAP { override DataFlow::Node getEscapeNode() { result = this.getArg(0) } } + /** + * A class to find calls to `ldap3.utils.conv.escape_filter_chars`. + * + * See https://github.com/cannatag/ldap3/blob/4d33166f0869b929f59c6e6825a1b9505eb99967/ldap3/utils/conv.py#L91 + */ private class LDAP3EscapeFilterCall extends DataFlow::CallCfgNode, LDAPEscape::Range { LDAP3EscapeFilterCall() { this = diff --git a/python/ql/src/experimental/semmle/python/security/injection/LDAP.qll b/python/ql/src/experimental/semmle/python/security/injection/LDAP.qll index febebe0a8fd8..9f91f91b3214 100644 --- a/python/ql/src/experimental/semmle/python/security/injection/LDAP.qll +++ b/python/ql/src/experimental/semmle/python/security/injection/LDAP.qll @@ -9,7 +9,7 @@ import semmle.python.dataflow.new.TaintTracking import semmle.python.dataflow.new.RemoteFlowSources /** - * A taint-tracking configuration for detecting regular expression injections. + * A taint-tracking configuration for detecting LDAP injections. */ class LDAPInjectionFlowConfig extends TaintTracking::Configuration { LDAPInjectionFlowConfig() { this = "LDAPInjectionFlowConfig" } From b020ea6e3aef0c0716cb931d9e22bd4f48c5bd18 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Fri, 9 Apr 2021 01:50:23 +0200 Subject: [PATCH 0122/1662] Polish documentation --- python/ql/src/experimental/semmle/python/Concepts.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index 9d0dddc3f143..89a82fff87c4 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -14,7 +14,7 @@ private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.dataflow.new.TaintTracking private import experimental.semmle.python.Frameworks -/** Provides classes for modeling LDAP-related APIs. */ +/** Provides classes for modeling LDAP query execution-related APIs. */ module LDAPQuery { /** * A data-flow node that collects methods executing a LDAP query. From 1c34230efbab719f332e1feb35ef7460edc3ae39 Mon Sep 17 00:00:00 2001 From: jorgectf Date: Fri, 9 Apr 2021 01:58:18 +0200 Subject: [PATCH 0123/1662] Fix documentation typo --- python/ql/src/experimental/semmle/python/Concepts.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/experimental/semmle/python/Concepts.qll b/python/ql/src/experimental/semmle/python/Concepts.qll index 89a82fff87c4..cb90a465a547 100644 --- a/python/ql/src/experimental/semmle/python/Concepts.qll +++ b/python/ql/src/experimental/semmle/python/Concepts.qll @@ -64,7 +64,7 @@ module LDAPEscape { * A data-flow node that collects functions escaping LDAP components. * * Extend this class to refine existing API models. If you want to model new APIs, - * extend `RegexEscape::Range` instead. + * extend `LDAPEscape::Range` instead. */ class LDAPEscape extends DataFlow::Node { LDAPEscape::Range range; From 53daa7c43685304e6e7463890bcf4d8b77d59ee6 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 17 Mar 2021 12:10:19 +0100 Subject: [PATCH 0124/1662] Java: Migrate LDAP injection sinks to CSV format --- .../code/java/dataflow/ExternalFlow.qll | 1 + .../code/java/security/LdapInjection.qll | 107 ++++++++---------- 2 files changed, 48 insertions(+), 60 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 4bb79e84ead9..94bca372bb02 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -76,6 +76,7 @@ private module Frameworks { private import semmle.code.java.frameworks.ApacheHttp private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.guava.Guava + private import semmle.code.java.security.LdapInjection } private predicate sourceModelCsv(string row) { diff --git a/java/ql/src/semmle/code/java/security/LdapInjection.qll b/java/ql/src/semmle/code/java/security/LdapInjection.qll index 2c1f493c6917..f5e0994c68f9 100644 --- a/java/ql/src/semmle/code/java/security/LdapInjection.qll +++ b/java/ql/src/semmle/code/java/security/LdapInjection.qll @@ -6,6 +6,7 @@ import semmle.code.java.frameworks.Jndi import semmle.code.java.frameworks.UnboundId import semmle.code.java.frameworks.SpringLdap import semmle.code.java.frameworks.ApacheLdap +private import semmle.code.java.dataflow.ExternalFlow /** A data flow sink for unvalidated user input that is used to construct LDAP queries. */ abstract class LdapInjectionSink extends DataFlow::Node { } @@ -28,68 +29,54 @@ class LdapInjectionAdditionalTaintStep extends Unit { /** Default sink for LDAP injection vulnerabilities. */ private class DefaultLdapInjectionSink extends LdapInjectionSink { - DefaultLdapInjectionSink() { - exists(MethodAccess ma, Method m, int index | - ma.getMethod() = m and - ma.getArgument(index) = this.asExpr() and - ldapInjectionSinkMethod(m, index) - ) - } -} - -/** Holds if the method parameter at `index` is susceptible to an LDAP injection attack. */ -private predicate ldapInjectionSinkMethod(Method m, int index) { - jndiLdapInjectionSinkMethod(m, index) or - unboundIdLdapInjectionSinkMethod(m, index) or - springLdapInjectionSinkMethod(m, index) or - apacheLdapInjectionSinkMethod(m, index) -} - -/** Holds if the JNDI method parameter at `index` is susceptible to an LDAP injection attack. */ -private predicate jndiLdapInjectionSinkMethod(Method m, int index) { - m.getDeclaringType().getAnAncestor() instanceof TypeDirContext and - m.hasName("search") and - index in [0 .. 1] -} - -/** Holds if the UnboundID method parameter at `index` is susceptible to an LDAP injection attack. */ -private predicate unboundIdLdapInjectionSinkMethod(Method m, int index) { - exists(Parameter param | m.getParameter(index) = param and not param.isVarargs() | - m instanceof MethodUnboundIdLDAPConnectionSearch or - m instanceof MethodUnboundIdLDAPConnectionAsyncSearch or - m instanceof MethodUnboundIdLDAPConnectionSearchForEntry - ) + DefaultLdapInjectionSink() { sinkNode(this, "ldap") } } -/** Holds if the Spring method parameter at `index` is susceptible to an LDAP injection attack. */ -private predicate springLdapInjectionSinkMethod(Method m, int index) { - // LdapTemplate.authenticate, LdapTemplate.find* or LdapTemplate.search* method - ( - m instanceof MethodSpringLdapTemplateAuthenticate or - m instanceof MethodSpringLdapTemplateFind or - m instanceof MethodSpringLdapTemplateFindOne or - m instanceof MethodSpringLdapTemplateSearch or - m instanceof MethodSpringLdapTemplateSearchForContext or - m instanceof MethodSpringLdapTemplateSearchForObject - ) and - ( - // Parameter index is 1 (DN or query) or 2 (filter) if method is not authenticate - index in [0 .. 1] and - not m instanceof MethodSpringLdapTemplateAuthenticate - or - // But it's not the last parameter in case of authenticate method (last param is password) - index in [0 .. 1] and - index < m.getNumberOfParameters() - 1 and - m instanceof MethodSpringLdapTemplateAuthenticate - ) -} - -/** Holds if the Apache LDAP API method parameter at `index` is susceptible to an LDAP injection attack. */ -private predicate apacheLdapInjectionSinkMethod(Method m, int index) { - exists(Parameter param | m.getParameter(index) = param and not param.isVarargs() | - m.getDeclaringType().getAnAncestor() instanceof TypeApacheLdapConnection and - m.hasName("search") - ) +private class DefaultLdapInjectionSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + // jndi + "javax.naming.directory;DirContext;true;search;;;Argument[0..1];ldap", + // apache + "org.apache.directory.ldap.client.api;LdapConnection;true;search;;;Argument[0..2];ldap", + // UnboundID: search + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(ReadOnlySearchRequest);;Argument[0];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(SearchRequest);;Argument[0];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(SearchResultListener,String,SearchScope,DereferencePolicy,int,int,boolean,Filter,String[]);;Argument[0..7];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(SearchResultListener,String,SearchScope,DereferencePolicy,int,int,boolean,String,String[]);;Argument[0..7];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(SearchResultListener,String,SearchScope,Filter,String[]]);;Argument[0..3];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(SearchResultListener,String,SearchScope,String,String[]]);;Argument[0..3];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(String,SearchScope,DereferencePolicy,int,int,boolean,Filter,String[]]);;Argument[0..6];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(String,SearchScope,DereferencePolicy,int,int,boolean,String,String[]]);;Argument[0..6];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(String,SearchScope,Filter,String[]]);;Argument[0..2];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;search;(String,SearchScope,String,String[]]);;Argument[0..2];ldap", + // UnboundID: searchForEntry + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(ReadOnlySearchRequest);;Argument[0];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(SearchRequest);;Argument[0];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(String,SearchScope,DereferencePolicy,int,boolean,Filter,String[]);;Argument[0..5];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(String,SearchScope,DereferencePolicy,int,boolean,String,String[]);;Argument[0..5];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(String,SearchScope,Filter,String[]);;Argument[0..2];ldap", + "com.unboundid.ldap.sdk;LDAPConnection;false;searchForEntry;(String,SearchScope,String,String[]);;Argument[0..2];ldap", + // UnboundID: asyncSearch + "com.unboundid.ldap.sdk;LDAPConnection;false;asyncSearch;;;Argument[0];ldap", + // Spring + "org.springframework.ldap.core;LdapTemplate;false;find;;;Argument[0..1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;findOne;;;Argument[0..1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;search;;;Argument[0..1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;searchForContext;;;Argument[0..1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;searchForObject;;;Argument[0..1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;;;Argument[0];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(Name,String,String);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(Name,String,String,AuthenticatedLdapEntryContextCallback);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(Name,String,String,AuthenticatedLdapEntryContextCallback,AuthenticationErrorCallback);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(Name,String,String,AuthenticationErrorCallback);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(String,String,String);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(String,String,String,AuthenticatedLdapEntryContextCallback);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(String,String,String,AuthenticatedLdapEntryContextCallback,AuthenticationErrorCallback);;Argument[1];ldap", + "org.springframework.ldap.core;LdapTemplate;false;authenticate;(String,String,String,AuthenticationErrorCallback);;Argument[1];ldap" + ] + } } /** A sanitizer that clears the taint on (boxed) primitive types. */ From b9ce1aefc09f72f53a3ecc1940fe396a679433be Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 30 Mar 2021 09:31:38 +0200 Subject: [PATCH 0125/1662] Java: Convert unsafe URL opening sinks to CSV format --- java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql | 17 ++--------------- .../semmle/code/java/dataflow/ExternalFlow.qll | 9 ++++++++- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql b/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql index 306bf27ab9c0..d1bce930054a 100644 --- a/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql +++ b/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql @@ -13,6 +13,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.frameworks.Networking import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow class HTTPString extends StringLiteral { HTTPString() { @@ -30,26 +31,12 @@ class HTTPString extends StringLiteral { } } -class URLOpenMethod extends Method { - URLOpenMethod() { - this.getDeclaringType().getQualifiedName() = "java.net.URL" and - ( - this.getName() = "openConnection" or - this.getName() = "openStream" - ) - } -} - class HTTPStringToURLOpenMethodFlowConfig extends TaintTracking::Configuration { HTTPStringToURLOpenMethodFlowConfig() { this = "HttpsUrls::HTTPStringToURLOpenMethodFlowConfig" } override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof HTTPString } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess m | - sink.asExpr() = m.getQualifier() and m.getMethod() instanceof URLOpenMethod - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "open-url") } override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { exists(UrlConstructorCall u | diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 4bb79e84ead9..ece2c7cff749 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -184,7 +184,14 @@ private predicate sourceModelCsv(string row) { ] } -private predicate sinkModelCsv(string row) { none() } +private predicate sinkModelCsv(string row) { + row = + [ + // Open URL + "java.net;URL;false;openConnection;;;Argument[-1];open-url", + "java.net;URL;false;openStream;;;Argument[-1];open-url" + ] +} private predicate summaryModelCsv(string row) { row = From 9e2832a82d7e3f51c7967c8aafee2d48c01b8b2c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 30 Mar 2021 16:24:32 +0200 Subject: [PATCH 0126/1662] Java: Convert zipslip sinks to CSV format --- java/ql/src/Security/CWE/CWE-022/ZipSlip.ql | 31 ++----------------- .../code/java/dataflow/ExternalFlow.qll | 16 +++++++++- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql b/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql index 7d74f8b79ac4..80de02d70679 100644 --- a/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql +++ b/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql @@ -17,6 +17,7 @@ import semmle.code.java.dataflow.SSA import semmle.code.java.dataflow.TaintTracking import DataFlow import PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * A method that returns the name of an archive entry. @@ -33,34 +34,6 @@ class ArchiveEntryNameMethod extends Method { } } -/** - * An expression that will be treated as the destination of a write. - */ -class WrittenFileName extends Expr { - WrittenFileName() { - // Constructors that write to their first argument. - exists(ConstructorCall ctr | this = ctr.getArgument(0) | - exists(Class c | ctr.getConstructor() = c.getAConstructor() | - c.hasQualifiedName("java.io", "FileOutputStream") or - c.hasQualifiedName("java.io", "RandomAccessFile") or - c.hasQualifiedName("java.io", "FileWriter") - ) - ) - or - // Methods that write to their n'th argument - exists(MethodAccess call, int n | this = call.getArgument(n) | - call.getMethod().getDeclaringType().hasQualifiedName("java.nio.file", "Files") and - ( - call.getMethod().getName().regexpMatch("new.*Reader|newOutputStream|create.*") and n = 0 - or - call.getMethod().hasName("copy") and n = 1 - or - call.getMethod().hasName("move") and n = 1 - ) - ) - } -} - /** * Holds if `n1` to `n2` is a dataflow step that converts between `String`, * `File`, and `Path`. @@ -151,7 +124,7 @@ class ZipSlipConfiguration extends TaintTracking::Configuration { source.asExpr().(MethodAccess).getMethod() instanceof ArchiveEntryNameMethod } - override predicate isSink(Node sink) { sink.asExpr() instanceof WrittenFileName } + override predicate isSink(Node sink) { sinkNode(sink, "create-file") } override predicate isAdditionalTaintStep(Node n1, Node n2) { filePathStep(n1, n2) or fileTaintStep(n1, n2) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index ece2c7cff749..2aa0b1d14e47 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -189,7 +189,21 @@ private predicate sinkModelCsv(string row) { [ // Open URL "java.net;URL;false;openConnection;;;Argument[-1];open-url", - "java.net;URL;false;openStream;;;Argument[-1];open-url" + "java.net;URL;false;openStream;;;Argument[-1];open-url", + // Create file + "java.io;FileOutputStream;false;FileOutputStream;;;Argument[0];create-file", + "java.io;RandomAccessFile;false;RandomAccessFile;;;Argument[0];create-file", + "java.io;FileWriter;false;FileWriter;;;Argument[0];create-file", + "java.nio.file;Files;false;move;;;Argument[1];create-file", + "java.nio.file;Files;false;copy;;;Argument[1];create-file", + "java.nio.file;Files;false;newOutputStream;;;Argument[0];create-file", + "java.nio.file;Files;false;newBufferedReader;;;Argument[0];create-file", + "java.nio.file;Files;false;createDirectory;;;Argument[0];create-file", + "java.nio.file;Files;false;createFile;;;Argument[0];create-file", + "java.nio.file;Files;false;createLink;;;Argument[0];create-file", + "java.nio.file;Files;false;createSymbolicLink;;;Argument[0];create-file", + "java.nio.file;Files;false;createTempDirectory;;;Argument[0];create-file", + "java.nio.file;Files;false;createTempFile;;;Argument[0];create-file" ] } From f329c3fdab6064ffd82b2a3a54de826395c08c9e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 31 Mar 2021 10:09:58 +0200 Subject: [PATCH 0127/1662] Java: Convert insecure bean validation sink to CSV format --- .../CWE/CWE-094/InsecureBeanValidation.ql | 21 ++----------------- .../code/java/dataflow/ExternalFlow.qll | 4 +++- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql b/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql index 6b8ab0851329..e4ee42008a17 100644 --- a/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql +++ b/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql @@ -13,6 +13,7 @@ import java import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * A message interpolator Type that perform Expression Language (EL) evaluations @@ -50,19 +51,6 @@ class SetMessageInterpolatorCall extends MethodAccess { predicate isSafe() { not this.getAnArgument().getType() instanceof ELMessageInterpolatorType } } -/** - * A method named `buildConstraintViolationWithTemplate` declared on a subtype - * of `javax.validation.ConstraintValidatorContext`. - */ -class BuildConstraintViolationWithTemplateMethod extends Method { - BuildConstraintViolationWithTemplateMethod() { - this.getDeclaringType() - .getASupertype*() - .hasQualifiedName("javax.validation", "ConstraintValidatorContext") and - this.hasName("buildConstraintViolationWithTemplate") - } -} - /** * Taint tracking BeanValidationConfiguration describing the flow of data from user input * to the argument of a method that builds constraint error messages. @@ -72,12 +60,7 @@ class BeanValidationConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - ma.getMethod() instanceof BuildConstraintViolationWithTemplateMethod and - sink.asExpr() = ma.getArgument(0) - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "bean-validation") } } from BeanValidationConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 2aa0b1d14e47..337f26d82c63 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -203,7 +203,9 @@ private predicate sinkModelCsv(string row) { "java.nio.file;Files;false;createLink;;;Argument[0];create-file", "java.nio.file;Files;false;createSymbolicLink;;;Argument[0];create-file", "java.nio.file;Files;false;createTempDirectory;;;Argument[0];create-file", - "java.nio.file;Files;false;createTempFile;;;Argument[0];create-file" + "java.nio.file;Files;false;createTempFile;;;Argument[0];create-file", + // Bean validation + "javax.validation;ConstraintValidatorContext;true;buildConstraintViolationWithTemplate;;;Argument[0];bean-validation" ] } From 0b7a6671dd75b8cd1ab54cac2b7d0cbd8604dd2a Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 31 Mar 2021 10:16:14 +0200 Subject: [PATCH 0128/1662] Java: Convert header splitting sinks to CSV format --- .../code/java/dataflow/ExternalFlow.qll | 1 + .../code/java/security/ResponseSplitting.qll | 43 +++++++------------ 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 337f26d82c63..f728c0f9fcaf 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -76,6 +76,7 @@ private module Frameworks { private import semmle.code.java.frameworks.ApacheHttp private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.guava.Guava + private import semmle.code.java.security.ResponseSplitting } private predicate sourceModelCsv(string row) { diff --git a/java/ql/src/semmle/code/java/security/ResponseSplitting.qll b/java/ql/src/semmle/code/java/security/ResponseSplitting.qll index d09e6567b152..040174d50b50 100644 --- a/java/ql/src/semmle/code/java/security/ResponseSplitting.qll +++ b/java/ql/src/semmle/code/java/security/ResponseSplitting.qll @@ -5,41 +5,30 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.Servlets import semmle.code.java.frameworks.JaxWS +private import semmle.code.java.dataflow.ExternalFlow /** A sink that is vulnerable to an HTTP header splitting attack. */ -abstract class HeaderSplittingSink extends DataFlow::Node { } +class HeaderSplittingSink extends DataFlow::Node { + HeaderSplittingSink() { sinkNode(this, "header-splitting") } +} + +private class HeaderSplittingSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.servlet.http;HttpServletResponse;false;addCookie;;;Argument[0];header-splitting", + "javax.servlet.http;HttpServletResponse;false;addHeader;;;Argument;header-splitting", + "javax.servlet.http;HttpServletResponse;false;setHeader;;;Argument;header-splitting", + "javax.ws.rs.core;ResponseBuilder;false;header;;;Argument[1];header-splitting" + ] + } +} /** A source that introduces data considered safe to use by a header splitting source. */ abstract class SafeHeaderSplittingSource extends DataFlow::Node { SafeHeaderSplittingSource() { this instanceof RemoteFlowSource } } -/** A sink that identifies a Java Servlet or JaxWs method that is vulnerable to an HTTP header splitting attack. */ -private class ServletHeaderSplittingSink extends HeaderSplittingSink { - ServletHeaderSplittingSink() { - exists(ResponseAddCookieMethod m, MethodAccess ma | - ma.getMethod() = m and - this.asExpr() = ma.getArgument(0) - ) - or - exists(ResponseAddHeaderMethod m, MethodAccess ma | - ma.getMethod() = m and - this.asExpr() = ma.getAnArgument() - ) - or - exists(ResponseSetHeaderMethod m, MethodAccess ma | - ma.getMethod() = m and - this.asExpr() = ma.getAnArgument() - ) - or - exists(JaxRsResponseBuilder builder, Method m | - m = builder.getAMethod() and m.getName() = "header" - | - this.asExpr() = m.getAReference().getArgument(1) - ) - } -} - /** A default source that introduces data considered safe to use by a header splitting source. */ private class DefaultSafeHeaderSplittingSource extends SafeHeaderSplittingSource { DefaultSafeHeaderSplittingSource() { From 17fd758df1ec1c600ef8aef4454485b6c2bf5123 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 31 Mar 2021 10:31:21 +0200 Subject: [PATCH 0129/1662] Java: Convert XSS sinks to CSV format --- .../code/java/dataflow/ExternalFlow.qll | 1 + java/ql/src/semmle/code/java/security/XSS.qll | 28 ++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index f728c0f9fcaf..402bb7fd7476 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -77,6 +77,7 @@ private module Frameworks { private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.guava.Guava private import semmle.code.java.security.ResponseSplitting + private import semmle.code.java.security.XSS } private predicate sourceModelCsv(string row) { diff --git a/java/ql/src/semmle/code/java/security/XSS.qll b/java/ql/src/semmle/code/java/security/XSS.qll index f51bc0bbdf56..9791eed203b8 100644 --- a/java/ql/src/semmle/code/java/security/XSS.qll +++ b/java/ql/src/semmle/code/java/security/XSS.qll @@ -29,33 +29,29 @@ class XssAdditionalTaintStep extends Unit { abstract predicate step(DataFlow::Node node1, DataFlow::Node node2); } +private class DefaultXssSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.servlet.http;HttpServletResponse;false;sendError;(int,String);;Argument[1];xss", + "android.webkit;WebView;false;loadData;;;Argument[0];xss", + "android.webkit;WebView;false;loadUrl;;;Argument[0];xss", + "android.webkit;WebView;false;loadDataWithBaseURL;;;Argument[1];xss" + ] + } +} + /** A default sink representing methods susceptible to XSS attacks. */ private class DefaultXssSink extends XssSink { DefaultXssSink() { sinkNode(this, "xss") or - exists(HttpServletResponseSendErrorMethod m, MethodAccess ma | - ma.getMethod() = m and - this.asExpr() = ma.getArgument(1) - ) - or exists(ServletWriterSourceToWritingMethodFlowConfig writer, MethodAccess ma | ma.getMethod() instanceof WritingMethod and writer.hasFlowToExpr(ma.getQualifier()) and this.asExpr() = ma.getArgument(_) ) or - exists(Method m | - m.getDeclaringType() instanceof TypeWebView and - ( - m.getAReference().getArgument(0) = this.asExpr() and m.getName() = "loadData" - or - m.getAReference().getArgument(0) = this.asExpr() and m.getName() = "loadUrl" - or - m.getAReference().getArgument(1) = this.asExpr() and m.getName() = "loadDataWithBaseURL" - ) - ) - or exists(SpringRequestMappingMethod requestMappingMethod, ReturnStmt rs | requestMappingMethod = rs.getEnclosingCallable() and this.asExpr() = rs.getResult() and From e544faed6de23be9821771087b22c7ffb87a5005 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 1 Apr 2021 09:11:47 +0200 Subject: [PATCH 0130/1662] Java: Convert unsafe hostname verification sinks to CSV format --- .../Security/CWE/CWE-297/UnsafeHostnameVerification.ql | 10 ++-------- java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll | 5 ++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql index 9c060565f284..058a1f9e1695 100644 --- a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql +++ b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql @@ -15,6 +15,7 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.Encryption import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * Holds if `m` always returns `true` ignoring any exceptional flow. @@ -49,14 +50,7 @@ class TrustAllHostnameVerifierConfiguration extends DataFlow::Configuration { source.asExpr().(ClassInstanceExpr).getConstructedType() instanceof TrustAllHostnameVerifier } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma, Method m | - (m instanceof SetDefaultHostnameVerifierMethod or m instanceof SetHostnameVerifierMethod) and - ma.getMethod() = m - | - ma.getArgument(0) = sink.asExpr() - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "set-hostname") } override predicate isBarrier(DataFlow::Node barrier) { // ignore nodes that are in functions that intentionally disable hostname verification diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 402bb7fd7476..ba329d99f21b 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -207,7 +207,10 @@ private predicate sinkModelCsv(string row) { "java.nio.file;Files;false;createTempDirectory;;;Argument[0];create-file", "java.nio.file;Files;false;createTempFile;;;Argument[0];create-file", // Bean validation - "javax.validation;ConstraintValidatorContext;true;buildConstraintViolationWithTemplate;;;Argument[0];bean-validation" + "javax.validation;ConstraintValidatorContext;true;buildConstraintViolationWithTemplate;;;Argument[0];bean-validation", + // Set hostname + "javax.net.ssl;HttpsURLConnection;true;setDefaultHostnameVerifier;;;Argument[0];set-hostname", + "javax.net.ssl;HttpsURLConnection;true;setHostnameVerifier;;;Argument[0];set-hostname" ] } From 3e53484bb3b942c58f2bf1b90301a9779ebc34aa Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 1 Apr 2021 09:21:49 +0200 Subject: [PATCH 0131/1662] Java: Convert Google HTTP client API parseAs sink to CSV format --- .../code/java/dataflow/ExternalFlow.qll | 1 + .../frameworks/google/GoogleHttpClientApi.qll | 22 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index ba329d99f21b..154ec98f2ad8 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -76,6 +76,7 @@ private module Frameworks { private import semmle.code.java.frameworks.ApacheHttp private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.guava.Guava + private import semmle.code.java.frameworks.google.GoogleHttpClientApi private import semmle.code.java.security.ResponseSplitting private import semmle.code.java.security.XSS } diff --git a/java/ql/src/semmle/code/java/frameworks/google/GoogleHttpClientApi.qll b/java/ql/src/semmle/code/java/frameworks/google/GoogleHttpClientApi.qll index ccc446892f12..07e30711b449 100644 --- a/java/ql/src/semmle/code/java/frameworks/google/GoogleHttpClientApi.qll +++ b/java/ql/src/semmle/code/java/frameworks/google/GoogleHttpClientApi.qll @@ -2,14 +2,7 @@ import java import semmle.code.java.Serializability import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.DataFlow5 - -/** The method `parseAs` in `com.google.api.client.http.HttpResponse`. */ -private class ParseAsMethod extends Method { - ParseAsMethod() { - this.getDeclaringType().hasQualifiedName("com.google.api.client.http", "HttpResponse") and - this.hasName("parseAs") - } -} +private import semmle.code.java.dataflow.ExternalFlow private class TypeLiteralToParseAsFlowConfiguration extends DataFlow5::Configuration { TypeLiteralToParseAsFlowConfiguration() { @@ -18,16 +11,17 @@ private class TypeLiteralToParseAsFlowConfiguration extends DataFlow5::Configura override predicate isSource(DataFlow::Node source) { source.asExpr() instanceof TypeLiteral } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - ma.getAnArgument() = sink.asExpr() and - ma.getMethod() instanceof ParseAsMethod - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "google-parse-as") } TypeLiteral getSourceWithFlowToParseAs() { hasFlow(DataFlow::exprNode(result), _) } } +private class ParseAsSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["com.google.api.client.http;HttpResponse;false;parseAs;;;Argument;google-parse-as"] + } +} + /** A field that is deserialized by `HttpResponse.parseAs`. */ class HttpResponseParseAsDeserializableField extends DeserializableField { HttpResponseParseAsDeserializableField() { From 87d42b02c0c49ff717c941d6ea5290b6ca3c40df Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 31 Mar 2021 10:21:12 +0200 Subject: [PATCH 0132/1662] Java: Convert other sinks --- .../CWE/CWE-209/StackTraceExposure.ql | 11 +- .../Security/CWE/CWE-036/OpenStream.ql | 15 +- .../Security/CWE/CWE-074/XsltInjectionLib.qll | 41 +++-- .../Security/CWE/CWE-094/JexlInjectionLib.qll | 139 +++++++-------- .../Security/CWE/CWE-094/MvelInjectionLib.qll | 56 +++--- .../CWE/CWE-326/InsufficientKeySize.ql | 23 +-- .../Security/CWE/CWE-327/SslLib.qll | 20 ++- .../Security/CWE/CWE-346/UnvalidatedCors.ql | 29 ++- .../Security/CWE/CWE-522/InsecureLdapAuth.ql | 26 +-- .../Security/CWE/CWE-643/XPathInjection.ql | 23 +-- .../Security/CWE/CWE-652/XQueryInjection.ql | 7 +- .../CWE/CWE-652/XQueryInjectionLib.qll | 12 ++ .../Security/CWE/CWE-917/OgnlInjectionLib.qll | 26 ++- .../Security/CWE/CWE-918/RequestForgery.ql | 5 +- .../Security/CWE/CWE-918/RequestForgery.qll | 168 ++++-------------- .../code/java/dataflow/ExternalFlow.qll | 23 ++- .../java/security/UnsafeDeserialization.qll | 32 ++-- 17 files changed, 302 insertions(+), 354 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql index c9c1e2917c0e..1f49d5cb06ac 100644 --- a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql +++ b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql @@ -16,6 +16,7 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.XSS +private import semmle.code.java.dataflow.ExternalFlow /** * One of the `printStackTrace()` overloads on `Throwable`. @@ -37,10 +38,12 @@ class ServletWriterSourceToPrintStackTraceMethodFlowConfig extends TaintTracking override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ServletWriterSource } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - sink.asExpr() = ma.getAnArgument() and ma.getMethod() instanceof PrintStackTraceMethod - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "print-stack-trace") } +} + +private class PrintStackTraceSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["java.lang;Throwable;true;printStackTrace;;;Argument;print-stack-trace"] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql index 871d6bb4737c..6f75b3fc8ae5 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql @@ -15,6 +15,7 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.ExternalFlow import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow class URLConstructor extends ClassInstanceExpr { URLConstructor() { this.getConstructor().getDeclaringType() instanceof TypeUrl } @@ -39,13 +40,7 @@ class RemoteURLToOpenStreamFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess m | - sink.asExpr() = m.getQualifier() and m.getMethod() instanceof URLOpenStreamMethod - ) - or - sinkNode(sink, "url-open-stream") - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "url-open-stream") } override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { exists(URLConstructor u | @@ -55,6 +50,12 @@ class RemoteURLToOpenStreamFlowConfig extends TaintTracking::Configuration { } } +private class URLOpenStreamSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["java.net;URL;false;openStream;;;Argument[-1];url-open-stream"] + } +} + from DataFlow::PathNode source, DataFlow::PathNode sink, MethodAccess call where sink.getNode().asExpr() = call.getQualifier() and diff --git a/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll index 4ba0eb6d0b11..bc0c8352a20f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll @@ -2,6 +2,7 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.XmlParsers import DataFlow +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unvalidated user input that is used in XSLT transformation. @@ -103,15 +104,20 @@ class TypeXsltPackage extends Class { /** A data flow sink for unvalidated user input that is used in XSLT transformation. */ class XsltInjectionSink extends DataFlow::ExprNode { - XsltInjectionSink() { - exists(MethodAccess ma, Method m | m = ma.getMethod() and ma.getQualifier() = this.getExpr() | - ma instanceof TransformerTransform or - m instanceof XsltTransformerTransformMethod or - m instanceof Xslt30TransformerTransformMethod or - m instanceof Xslt30TransformerApplyTemplatesMethod or - m instanceof Xslt30TransformerCallFunctionMethod or - m instanceof Xslt30TransformerCallTemplateMethod - ) + XsltInjectionSink() { sinkNode(this, "xslt") } +} + +private class XsltInjectionSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "net.sf.saxon.s9api;XsltTransformer;false;transform;;;Argument[-1];xslt", + "net.sf.saxon.s9api;Xslt30Transformer;false;transform;;;Argument[-1];xslt", + "net.sf.saxon.s9api;Xslt30Transformer;false;applyTemplates;;;Argument[-1];xslt", + "net.sf.saxon.s9api;Xslt30Transformer;false;callFunction;;;Argument[-1];xslt", + "net.sf.saxon.s9api;Xslt30Transformer;false;callTemplate;;;Argument[-1];xslt", + "javax.xml.transform;Transformer;false;transform;;;Argument[-1];xslt" + ] } } @@ -186,16 +192,21 @@ private class TransformerFactoryWithSecureProcessingFeatureFlowConfig extends Da ) } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - sink.asExpr() = ma.getQualifier() and - ma.getMethod().getDeclaringType() instanceof TransformerFactory - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "xslt-transformer") } override int fieldFlowBranchLimit() { result = 0 } } +private class TransformerFactorySinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.xml.transform;TransformerFactory;false;;;;Argument[-1];xslt-transformer", + "javax.xml.transform.sax;SAXTransformerFactory;false;;;;Argument[-1];xslt-transformer" + ] + } +} + /** A `ParserConfig` specific to `TransformerFactory`. */ private class TransformerFactoryFeatureConfig extends ParserConfig { TransformerFactoryFeatureConfig() { diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll index 561d7e46ae90..8fcde750e54c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll @@ -1,6 +1,7 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe user input @@ -21,7 +22,7 @@ class JexlInjectionConfig extends TaintTracking::Configuration { } /** - * A sink for Expresssion Language injection vulnerabilities via Jexl, + * A sink for Expression Language injection vulnerabilities via Jexl, * i.e. method calls that run evaluation of a JEXL expression. * * Creating a `Callable` from a tainted JEXL expression or script is considered as a sink @@ -30,18 +31,41 @@ class JexlInjectionConfig extends TaintTracking::Configuration { * maybe stored in an object field and then reached by a different flow. */ private class JexlEvaluationSink extends DataFlow::ExprNode { - JexlEvaluationSink() { - exists(MethodAccess ma, Method m, Expr taintFrom | - ma.getMethod() = m and taintFrom = this.asExpr() - | - m instanceof DirectJexlEvaluationMethod and ma.getQualifier() = taintFrom - or - m instanceof CreateJexlCallableMethod and ma.getQualifier() = taintFrom - or - m instanceof JexlEngineGetSetPropertyMethod and - taintFrom.getType() instanceof TypeString and - ma.getAnArgument() = taintFrom - ) + JexlEvaluationSink() { sinkNode(this, "jexl") } +} + +private class JexlEvaluationSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + // Direct JEXL evaluation + "org.apache.commons.jexl2;Expression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JexlExpression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl2;Script;false;execute;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JexlScript;false;execute;;;Argument[-1];jexl", + "org.apache.commons.jexl2;JxltEngine$Expression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JxltEngine$Expression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl2;JxltEngine$Expression;false;prepare;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JxltEngine$Expression;false;prepare;;;Argument[-1];jexl", + "org.apache.commons.jexl2;JxltEngine$Template;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JxltEngine$Template;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl2;UnifiedJEXL$Expression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl3;UnifiedJEXL$Expression;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl2;UnifiedJEXL$Expression;false;prepare;;;Argument[-1];jexl", + "org.apache.commons.jexl3;UnifiedJEXL$Expression;false;prepare;;;Argument[-1];jexl", + "org.apache.commons.jexl2;UnifiedJEXL$Template;false;evaluate;;;Argument[-1];jexl", + "org.apache.commons.jexl3;UnifiedJEXL$Template;false;evaluate;;;Argument[-1];jexl", + // JEXL callable + "org.apache.commons.jexl2;Expression;false;callable;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JexlExpression;false;callable;;;Argument[-1];jexl", + "org.apache.commons.jexl2;Script;false;callable;;;Argument[-1];jexl", + "org.apache.commons.jexl3;JexlScript;false;callable;;;Argument[-1];jexl", + // Methods in the `JexlEngine` class that gets or sets a property with a JEXL expression. + "org.apache.commons.jexl2;JexlEngine;false;getProperty;;;Argument[1..2];jexl", + "org.apache.commons.jexl3;JexlEngine;false;getProperty;;;Argument[1..2];jexl", + "org.apache.commons.jexl2;JexlEngine;false;setProperty;;;Argument[1];jexl", + "org.apache.commons.jexl3;JexlEngine;false;setProperty;;;Argument[1];jexl" + ] } } @@ -98,22 +122,36 @@ private class SandboxedJexlFlowConfig extends DataFlow2::Configuration { override predicate isSource(DataFlow::Node node) { node instanceof SandboxedJexlSource } - override predicate isSink(DataFlow::Node node) { - exists(MethodAccess ma, Method m | ma.getMethod() = m | - ( - m instanceof CreateJexlScriptMethod or - m instanceof CreateJexlExpressionMethod or - m instanceof CreateJexlTemplateMethod - ) and - ma.getQualifier() = node.asExpr() - ) - } + override predicate isSink(DataFlow::Node node) { sinkNode(node, "sandboxed-jexl") } override predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { createsJexlEngine(fromNode, toNode) } } +private class SandboxedJexlEvaluationSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + // CreateJexlScriptMethod + "org.apache.commons.jexl2;JexlEngine;false;createScript;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;JexlEngine;false;createScript;;;Argument[-1];sandboxed-jexl", + // CreateJexlExpressionMethod + "org.apache.commons.jexl2;UnifiedJEXL;false;parse;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;UnifiedJEXL;false;parse;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl2;JxltEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;JxltEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl2;JexlEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;JexlEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", + // CreateJexlTemplateMethod + "org.apache.commons.jexl2;JxltEngine;false;createTemplate;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;JxltEngine;false;createTemplate;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl2;UnifiedJEXL;false;createTemplate;;;Argument[-1];sandboxed-jexl", + "org.apache.commons.jexl3;UnifiedJEXL;false;createTemplate;;;Argument[-1];sandboxed-jexl" + ] + } +} + /** * Defines a data flow source for JEXL engines configured with a sandbox. */ @@ -164,35 +202,6 @@ private predicate returnsDataFromBean(DataFlow::Node fromNode, DataFlow::Node to ) } -/** - * A methods in the `JexlEngine` class that gets or sets a property with a JEXL expression. - */ -private class JexlEngineGetSetPropertyMethod extends Method { - JexlEngineGetSetPropertyMethod() { - getDeclaringType() instanceof JexlEngine and - hasName(["getProperty", "setProperty"]) - } -} - -/** - * A method that triggers direct evaluation of JEXL expressions. - */ -private class DirectJexlEvaluationMethod extends Method { - DirectJexlEvaluationMethod() { - getDeclaringType() instanceof JexlExpression and hasName("evaluate") - or - getDeclaringType() instanceof JexlScript and hasName("execute") - or - getDeclaringType() instanceof JxltEngineExpression and hasName(["evaluate", "prepare"]) - or - getDeclaringType() instanceof JxltEngineTemplate and hasName("evaluate") - or - getDeclaringType() instanceof UnifiedJexlExpression and hasName(["evaluate", "prepare"]) - or - getDeclaringType() instanceof UnifiedJexlTemplate and hasName("evaluate") - } -} - /** * A method that creates a JEXL script. */ @@ -200,16 +209,6 @@ private class CreateJexlScriptMethod extends Method { CreateJexlScriptMethod() { getDeclaringType() instanceof JexlEngine and hasName("createScript") } } -/** - * A method that creates a `Callable` for a JEXL expression or script. - */ -private class CreateJexlCallableMethod extends Method { - CreateJexlCallableMethod() { - (getDeclaringType() instanceof JexlExpression or getDeclaringType() instanceof JexlScript) and - hasName("callable") - } -} - /** * A method that creates a JEXL template. */ @@ -267,22 +266,6 @@ private class JexlUberspect extends Interface { } } -private class JxltEngineExpression extends NestedType { - JxltEngineExpression() { getEnclosingType() instanceof JxltEngine and hasName("Expression") } -} - -private class JxltEngineTemplate extends NestedType { - JxltEngineTemplate() { getEnclosingType() instanceof JxltEngine and hasName("Template") } -} - -private class UnifiedJexlExpression extends NestedType { - UnifiedJexlExpression() { getEnclosingType() instanceof UnifiedJexl and hasName("Expression") } -} - -private class UnifiedJexlTemplate extends NestedType { - UnifiedJexlTemplate() { getEnclosingType() instanceof UnifiedJexl and hasName("Template") } -} - private class Reader extends RefType { Reader() { hasQualifiedName("java.io", "Reader") } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll index a6cf891330f0..dec268a2a4bc 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll @@ -1,6 +1,7 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe user input @@ -30,36 +31,31 @@ class MvelInjectionConfig extends TaintTracking::Configuration { * i.e. methods that run evaluation of a MVEL expression. */ class MvelEvaluationSink extends DataFlow::ExprNode { - MvelEvaluationSink() { - exists(StaticMethodAccess ma, Method m | m = ma.getMethod() | - ( - m instanceof MvelEvalMethod or - m instanceof TemplateRuntimeEvaluationMethod - ) and - ma.getArgument(0) = asExpr() - ) - or - exists(MethodAccess ma, Method m | m = ma.getMethod() | - m instanceof MvelScriptEngineEvaluationMethod and - ma.getArgument(0) = asExpr() - ) - or - exists(MethodAccess ma, Method m | m = ma.getMethod() | - ( - m instanceof ExecutableStatementEvaluationMethod or - m instanceof CompiledExpressionEvaluationMethod or - m instanceof CompiledAccExpressionEvaluationMethod or - m instanceof AccessorEvaluationMethod or - m instanceof CompiledScriptEvaluationMethod or - m instanceof MvelCompiledScriptEvaluationMethod - ) and - ma.getQualifier() = asExpr() - ) - or - exists(StaticMethodAccess ma, Method m | m = ma.getMethod() | - m instanceof MvelRuntimeEvaluationMethod and - ma.getArgument(1) = asExpr() - ) + MvelEvaluationSink() { sinkNode(this, "mvel") } +} + +private class MvelEvaluationSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "org.mvel2.jsr223;MvelScriptEngine;false;evaluate;;;Argument[0];mvel", + "org.mvel2.jsr223;MvelScriptEngine;false;eval;;;Argument[0];mvel", + "org.mvel2.compiler;ExecutableStatement;false;getValue;;;Argument[-1];mvel", + "org.mvel2.compiler;CompiledExpression;false;getDirectValue;;;Argument[-1];mvel", + "org.mvel2.compiler;CompiledAccExpression;false;getValue;;;Argument[-1];mvel", + "org.mvel2.compiler;Accessor;false;getValue;;;Argument[-1];mvel", + "javax.script;CompiledScript;false;eval;;;Argument[-1];mvel", + "org.mvel2.jsr223;MvelCompiledScript;false;eval;;;Argument[-1];mvel", + "org.mvel2;MVEL;false;eval;;;Argument[0];mvel", + "org.mvel2;MVEL;false;executeExpression;;;Argument[0];mvel", + "org.mvel2;MVEL;false;evalToBoolean;;;Argument[0];mvel", + "org.mvel2;MVEL;false;evalToString;;;Argument[0];mvel", + "org.mvel2;MVEL;false;executeAllExpression;;;Argument[0];mvel", + "org.mvel2;MVEL;false;executeSetExpression;;;Argument[0];mvel", + "org.mvel2.templates;TemplateRuntime;false;eval;;;Argument[0];mvel", + "org.mvel2.templates;TemplateRuntime;false;execute;;;Argument[0];mvel", + "org.mvel2;MVELRuntime;false;execute;;;Argument[1];mvel" + ] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql b/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql index 155d05abfae3..ca86f42c561a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql @@ -12,6 +12,7 @@ import java import semmle.code.java.security.Encryption import semmle.code.java.dataflow.TaintTracking +private import semmle.code.java.dataflow.ExternalFlow /** The Java class `java.security.spec.ECGenParameterSpec`. */ class ECGenParameterSpec extends RefType { @@ -55,11 +56,12 @@ class KeyGeneratorInitConfiguration extends TaintTracking::Configuration { exists(JavaxCryptoKeyGenerator jcg | jcg = source.asExpr()) } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - ma.getMethod() instanceof KeyGeneratorInitMethod and - sink.asExpr() = ma.getQualifier() - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "keygen") } +} + +private class KeyGeneratorInitSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["javax.crypto;KeyGenerator;false;init;;;Argument[-1];keygen"] } } @@ -71,11 +73,12 @@ class KeyPairGeneratorInitConfiguration extends TaintTracking::Configuration { exists(JavaSecurityKeyPairGenerator jkg | jkg = source.asExpr()) } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - ma.getMethod() instanceof KeyPairGeneratorInitMethod and - sink.asExpr() = ma.getQualifier() - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "keypairgen") } +} + +private class KeyPairGeneratorInitSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["java.security;KeyPairGenerator;false;initialize;;;Argument[-1];keypairgen"] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll b/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll index bfa2530b07e7..3845953f0aab 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll @@ -3,6 +3,7 @@ import semmle.code.java.security.Encryption import semmle.code.java.dataflow.TaintTracking import DataFlow import PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe SSL and TLS versions. @@ -12,11 +13,20 @@ class UnsafeTlsVersionConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source.asExpr() instanceof UnsafeTlsVersion } - override predicate isSink(DataFlow::Node sink) { - sink instanceof SslContextGetInstanceSink or - sink instanceof CreateSslParametersSink or - sink instanceof SslParametersSetProtocolsSink or - sink instanceof SetEnabledProtocolsSink + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ssl") } +} + +private class UnsafeTlsVersionSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.net.ssl;SSLContext;false;getInstance;;;Argument[0];ssl", + "javax.net.ssl;SSLParameters;false;SSLParameters;;;Argument[1];ssl", + "javax.net.ssl;SSLParameters;false;setProtocols;;;Argument[0];ssl", + "javax.net.ssl;SSLSocket;false;setEnabledProtocols;;;Argument[0];ssl", + "javax.net.ssl;SSLServerSocket;false;setEnabledProtocols;;;Argument[0];ssl", + "javax.net.ssl;SSLEngine;false;setEnabledProtocols;;;Argument[0];ssl" + ] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql index c5a6c36d6a61..2fe6569318fc 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql @@ -15,6 +15,7 @@ import semmle.code.java.frameworks.Servlets import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.TaintTracking2 import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * Holds if `header` sets `Access-Control-Allow-Credentials` to `true`. This ensures fair chances of exploitability. @@ -29,33 +30,29 @@ private predicate setsAllowCredentials(MethodAccess header) { header.getArgument(1).(CompileTimeConstantExpr).getStringValue().toLowerCase() = "true" } -private class CorsProbableCheckAccess extends MethodAccess { - CorsProbableCheckAccess() { - getMethod().hasName("contains") and - getMethod().getDeclaringType().getASourceSupertype*() instanceof CollectionType - or - getMethod().hasName("containsKey") and - getMethod().getDeclaringType().getASourceSupertype*() instanceof MapType - or - getMethod().hasName("equals") and - getQualifier().getType() instanceof TypeString - } -} - private Expr getAccessControlAllowOriginHeaderName() { result.(CompileTimeConstantExpr).getStringValue().toLowerCase() = "access-control-allow-origin" } /** - * This taintflow2 configuration checks if there is a flow from source node towards CorsProbableCheckAccess methods. + * This taintflow2 configuration checks if there is a flow from source node towards probably CORS checking methods. */ class CorsSourceReachesCheckConfig extends TaintTracking2::Configuration { CorsSourceReachesCheckConfig() { this = "CorsOriginConfig" } override predicate isSource(DataFlow::Node source) { any(CorsOriginConfig c).hasFlow(source, _) } - override predicate isSink(DataFlow::Node sink) { - sink.asExpr() = any(CorsProbableCheckAccess check).getAnArgument() + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "cors") } +} + +private class CorsProbableCheckAccessSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "java.util;Collection;true;contains;;;Argument;cors", + "java.util;Map;true;containsKey;;;Argument;cors", + "java.lang;String;true;equals;;;Argument;cors" + ] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql index 4ce2b8b7134c..3c445934ad33 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql @@ -16,6 +16,7 @@ import semmle.code.java.frameworks.Jndi import semmle.code.java.frameworks.Networking import semmle.code.java.dataflow.TaintTracking import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * Insecure (non-SSL, non-private) LDAP URL string literal. @@ -145,12 +146,7 @@ class InsecureUrlFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof InsecureLdapUrl } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { - exists(ConstructorCall cc | - cc.getConstructedType().getASupertype*() instanceof TypeDirContext and - sink.asExpr() = cc.getArgument(0) - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } /** Method call of `env.put()`. */ override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { @@ -176,11 +172,12 @@ class BasicAuthFlowConfig extends DataFlow::Configuration { } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { - exists(ConstructorCall cc | - cc.getConstructedType().getASupertype*() instanceof TypeDirContext and - sink.asExpr() = cc.getArgument(0) - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } +} + +private class LdapSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = ["javax.naming.directory;DirContext;true;.ctor;;;Argument[0];ldap"] } } @@ -198,12 +195,7 @@ class SSLFlowConfig extends DataFlow::Configuration { } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { - exists(ConstructorCall cc | - cc.getConstructedType().getASupertype*() instanceof TypeDirContext and - sink.asExpr() = cc.getArgument(0) - ) - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } } from DataFlow::PathNode source, DataFlow::PathNode sink, InsecureUrlFlowConfig config diff --git a/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql index e5a29df46d59..598f42b0c703 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql @@ -15,6 +15,7 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.XmlParsers import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow class XPathInjectionConfiguration extends TaintTracking::Configuration { XPathInjectionConfiguration() { this = "XPathInjection" } @@ -25,16 +26,18 @@ class XPathInjectionConfiguration extends TaintTracking::Configuration { } class XPathInjectionSink extends DataFlow::ExprNode { - XPathInjectionSink() { - exists(Method m, MethodAccess ma | ma.getMethod() = m | - m.getDeclaringType().hasQualifiedName("javax.xml.xpath", "XPath") and - (m.hasName("evaluate") or m.hasName("compile")) and - ma.getArgument(0) = this.getExpr() - or - m.getDeclaringType().hasQualifiedName("org.dom4j", "Node") and - (m.hasName("selectNodes") or m.hasName("selectSingleNode")) and - ma.getArgument(0) = this.getExpr() - ) + XPathInjectionSink() { sinkNode(this, "xpath") } +} + +private class XPathInjectionSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.xml.xpath;XPath;false;compile;;;Argument[0];xpath", + "javax.xml.xpath;XPath;false;evaluate;;;Argument[0];xpath", + "org.dom4j;Node;false;selectNodes;;;Argument[0];xpath", + "org.dom4j;Node;false;selectSingleNode;;;Argument[0];xpath" + ] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql index 0bb85272f085..3b8e43c5d7d2 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql @@ -14,6 +14,7 @@ import java import semmle.code.java.dataflow.FlowSources import XQueryInjectionLib import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration tracing flow from remote sources, through an XQuery parser, to its eventual execution. @@ -23,11 +24,7 @@ class XQueryInjectionConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - sink.asExpr() = any(XQueryPreparedExecuteCall xpec).getPreparedExpression() or - sink.asExpr() = any(XQueryExecuteCall xec).getExecuteQueryArgument() or - sink.asExpr() = any(XQueryExecuteCommandCall xecc).getExecuteCommandArgument() - } + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "xquery") } /** * Holds if taint from the input `pred` to a `prepareExpression` call flows to the returned prepared expression `succ`. diff --git a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll index 2a4019f2c9a9..13452e4e55dc 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll @@ -1,4 +1,5 @@ import java +private import semmle.code.java.dataflow.ExternalFlow /** A call to `XQConnection.prepareExpression`. */ class XQueryParserCall extends MethodAccess { @@ -66,3 +67,14 @@ class XQueryExecuteCommandCall extends MethodAccess { /** Return this execute command argument. */ Expr getExecuteCommandArgument() { result = this.getArgument(0) } } + +private class XQuerySinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "javax.xml.xquery;XQPreparedExpression;true;executeQuery;;;Argument[-1];xquery", + "javax.xml.xquery;XQExpression;true;executeQuery;;;Argument[0];xquery", + "javax.xml.xquery;XQExpression;true;executeCommand;;;Argument[0];xquery" + ] + } +} diff --git a/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll index 569e18a29c38..002e06aaafdc 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll @@ -2,6 +2,7 @@ import java import semmle.code.java.dataflow.FlowSources import DataFlow import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unvalidated user input that is used in OGNL EL evaluation. @@ -82,12 +83,25 @@ predicate ognlInjectionSinkMethod(Method m, int index) { /** A data flow sink for unvalidated user input that is used in OGNL EL evaluation. */ class OgnlInjectionSink extends DataFlow::ExprNode { - OgnlInjectionSink() { - exists(MethodAccess ma, Method m, int index | - ma.getMethod() = m and - (ma.getArgument(index) = this.getExpr() or ma.getQualifier() = this.getExpr()) and - ognlInjectionSinkMethod(m, index) - ) + OgnlInjectionSink() { sinkNode(this, "ognl") } +} + +private class OgnlInjectionSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.ognl;Ognl;false;setValue;;;Argument[-1..0];ognl", + "org.apache.commons.ognl;Ognl;false;getValue;;;Argument[-1..0];ognl", + "ognl;Ognl;false;setValue;;;Argument[-1..0];ognl", + "ognl;Ognl;false;getValue;;;Argument[-1..0];ognl", + "org.apache.commons.ognl;Node;true;setValue;;;Argument[-1..0];ognl", + "org.apache.commons.ognl;Node;true;getValue;;;Argument[-1..0];ognl", + "ognl;Node;true;setValue;;;Argument[-1..0];ognl", + "ognl;Node;true;getValue;;;Argument[-1..0];ognl", + "com.opensymphony.xwork2.ognl;OgnlUtil;false;setValue;;;Argument[-1..0];ognl", + "com.opensymphony.xwork2.ognl;OgnlUtil;false;getValue;;;Argument[-1..0];ognl", + "com.opensymphony.xwork2.ognl;OgnlUtil;false;callMethod;;;Argument[-1..0];ognl" + ] } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql index c3bf787881fa..6b0333da4709 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql @@ -14,13 +14,16 @@ import java import semmle.code.java.dataflow.FlowSources import RequestForgery import DataFlow::PathGraph +private import semmle.code.java.dataflow.ExternalFlow class RequestForgeryConfiguration extends TaintTracking::Configuration { RequestForgeryConfiguration() { this = "Server Side Request Forgery" } override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } + override predicate isSink(DataFlow::Node sink) { + sink instanceof RequestForgerySink or sinkNode(sink, "request-forgery-sink") + } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { requestForgeryStep(pred, succ) diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll index 3fc52ddca766..fa784baa7f23 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll @@ -5,6 +5,7 @@ import semmle.code.java.frameworks.spring.Spring import semmle.code.java.frameworks.JaxWS import semmle.code.java.frameworks.javase.Http import semmle.code.java.dataflow.DataFlow +private import semmle.code.java.dataflow.ExternalFlow predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { // propagate to a URI when its host is assigned to @@ -38,119 +39,42 @@ predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { ) } -/** A data flow sink for request forgery vulnerabilities. */ -abstract class RequestForgerySink extends DataFlow::Node { } - -/** - * An argument to an url `openConnection` or `openStream` call - * taken as a sink for request forgery vulnerabilities. - */ -private class UrlOpen extends RequestForgerySink { - UrlOpen() { - exists(MethodAccess ma | - ma.getMethod() instanceof UrlOpenConnectionMethod or - ma.getMethod() instanceof UrlOpenStreamMethod - | - this.asExpr() = ma.getQualifier() - ) - } -} - -/** - * An argument to an Apache `setURI` call taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheSetUri extends RequestForgerySink { - ApacheSetUri() { - exists(MethodAccess ma | - ma.getReceiverType() instanceof ApacheHttpRequest and - ma.getMethod().hasName("setURI") - | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to any Apache Request Instantiation call taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheHttpRequestInstantiation extends RequestForgerySink { - ApacheHttpRequestInstantiation() { - exists(ClassInstanceExpr c | c.getConstructedType() instanceof ApacheHttpRequest | - this.asExpr() = c.getArgument(0) - ) - } -} - -/** - * An argument to a Apache RequestBuilder method call taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { - ApacheHttpRequestBuilderArgument() { - exists(MethodAccess ma | - ma.getReceiverType() instanceof TypeApacheHttpRequestBuilder and - ma.getMethod().hasName(["setURI", "get", "post", "put", "optons", "head", "delete"]) - | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to any Java.net.http.request Instantiation call taken as a - * sink for request forgery vulnerabilities. - */ -private class HttpRequestNewBuilder extends RequestForgerySink { - HttpRequestNewBuilder() { - exists(MethodAccess call | - call.getCallee().hasName("newBuilder") and - call.getMethod().getDeclaringType().getName() = "HttpRequest" - | - this.asExpr() = call.getArgument(0) - ) - } -} - -/** - * An argument to an Http Builder `uri` call taken as a - * sink for request forgery vulnerabilities. - */ -private class HttpBuilderUriArgument extends RequestForgerySink { - HttpBuilderUriArgument() { - exists(MethodAccess ma | ma.getMethod() instanceof HttpBuilderUri | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to a Spring Rest Template method call taken as a - * sink for request forgery vulnerabilities. - */ -private class SpringRestTemplateArgument extends RequestForgerySink { - SpringRestTemplateArgument() { - exists(MethodAccess ma | - this.asExpr() = ma.getMethod().(SpringRestTemplateUrlMethods).getUrlArgument(ma) - ) +private class RequestForgerySinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "java.net;URL;false;openConnection;;;Argument[-1];request-forgery-sink", + "java.net;URL;false;openStream;;;Argument[-1];request-forgery-sink", + "org.apache.http.client.methods;HttpRequestBase;true;setURI;;;Argument[0];request-forgery-sink", + "org.apache.http.message;BasicHttpRequest;true;setURI;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;HttpRequestBase;true;.ctor;;;Argument[0];request-forgery-sink", + "org.apache.http.message;BasicHttpRequest;true;.ctor;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;setURI;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;get;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;post;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;put;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;options;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;head;;;Argument[0];request-forgery-sink", + "org.apache.http.client.methods;RequestBuilder;false;delete;;;Argument[0];request-forgery-sink", + "java.net.http;HttpRequest$Builder;false;uri;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;patchForObject;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;getForObject;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;getForEntity;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;execute;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;exchange;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;put;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;postForObject;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;postForLocation;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;postForEntity;;;Argument[0];request-forgery-sink", + "org.springframework.web.client;RestTemplate;false;doExecute;;;Argument[0];request-forgery-sink", + "javax.ws.rs.client;Client;false;target;;;Argument[0];request-forgery-sink", + "java.net.http;HttpRequest;false;newBuilder;;;Argument[0];request-forgery-sink" // todo: this might be stricter than before. Previously the package name was not checked. + ] } } -/** - * An argument to `javax.ws.rs.Client`s `target` method call taken as a - * sink for request forgery vulnerabilities. - */ -private class JaxRsClientTarget extends RequestForgerySink { - JaxRsClientTarget() { - exists(MethodAccess ma | - ma.getMethod().getDeclaringType() instanceof JaxRsClient and - ma.getMethod().hasName("target") - | - this.asExpr() = ma.getArgument(0) - ) - } -} +/** A data flow sink for request forgery vulnerabilities. */ +abstract class RequestForgerySink extends DataFlow::Node { } /** * An argument to `org.springframework.http.RequestEntity`s constructor call @@ -166,27 +90,3 @@ private class RequestEntityUriArg extends RequestForgerySink { ) } } - -/** - * A class representing all Spring Rest Template methods - * which take an URL as an argument. - */ -private class SpringRestTemplateUrlMethods extends Method { - SpringRestTemplateUrlMethods() { - this.getDeclaringType() instanceof SpringRestTemplate and - this.hasName([ - "doExecute", "postForEntity", "postForLocation", "postForObject", "put", "exchange", - "execute", "getForEntity", "getForObject", "patchForObject" - ]) - } - - /** - * Gets the argument which corresponds to a URL argument - * passed as a `java.net.URL` object or as a string or the like - */ - Argument getUrlArgument(MethodAccess ma) { - // doExecute(URI url, HttpMethod method, RequestCallback requestCallback, - // ResponseExtractor responseExtractor) - result = ma.getArgument(0) - } -} diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 154ec98f2ad8..3cda09c14889 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -472,7 +472,7 @@ module CsvValidation { not type.regexpMatch("[a-zA-Z0-9_\\$]+") and msg = "Dubious type \"" + type + "\" in " + pred + " model." or - not name.regexpMatch("[a-zA-Z0-9_]*") and + not (name.regexpMatch("[a-zA-Z0-9_]*") or name = ".ctor") and msg = "Dubious name \"" + name + "\" in " + pred + " model." or not signature.regexpMatch("|\\([a-zA-Z0-9_\\.\\$<>,\\[\\]]*\\)") and @@ -562,23 +562,34 @@ private string paramsString(Callable c) { } private Element interpretElement0( - string namespace, string type, boolean subtypes, string name, string signature + string namespace, string type, boolean subtypes, string name, string signature, string ext ) { elementSpec(namespace, type, subtypes, name, signature, _) and exists(RefType t | t = interpretType(namespace, type, subtypes) | exists(Member m | result = m and m.getDeclaringType() = t and - m.hasName(name) + ( + m.hasName(name) + or + name = ".ctor" and m.hasName(t.getName()) + ) | signature = "" or m.(Callable).getSignature() = any(string nameprefix) + signature or paramsString(m) = signature - ) + ) and + ext = "" or result = t and name = "" and - signature = "" + signature = "" and + ext = "Annotated" + or + result = t.getAMember() and + name = "" and + signature = "" and + ext = "" ) } @@ -586,7 +597,7 @@ private Element interpretElement( string namespace, string type, boolean subtypes, string name, string signature, string ext ) { elementSpec(namespace, type, subtypes, name, signature, ext) and - exists(Element e | e = interpretElement0(namespace, type, subtypes, name, signature) | + exists(Element e | e = interpretElement0(namespace, type, subtypes, name, signature, ext) | ext = "" and result = e or ext = "Annotated" and result.(Annotatable).getAnAnnotation().getType() = e diff --git a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll index ab809f07d6d1..d84ee67bca5c 100644 --- a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll +++ b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll @@ -3,6 +3,7 @@ import semmle.code.java.frameworks.XStream import semmle.code.java.frameworks.SnakeYaml import semmle.code.java.frameworks.FastJson import semmle.code.java.frameworks.apache.Lang +private import semmle.code.java.dataflow.ExternalFlow class ObjectInputStreamReadObjectMethod extends Method { ObjectInputStreamReadObjectMethod() { @@ -26,11 +27,16 @@ class SafeXStream extends DataFlow2::Configuration { src.asExpr() } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - sink.asExpr() = ma.getQualifier() and - ma.getMethod() instanceof XStreamReadObjectMethod - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "safe-xstream") } +} + +private class SafeXStreamSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "com.thoughtworks.xstream;XStream;false;unmarshal;;;Argument[-1];safe-xstream", + "com.thoughtworks.xstream;XStream;false;fromXML;;;Argument[-1];safe-xstream" + ] } } @@ -42,11 +48,17 @@ class SafeKryo extends DataFlow2::Configuration { src.asExpr() } - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma | - sink.asExpr() = ma.getQualifier() and - ma.getMethod() instanceof KryoReadObjectMethod - ) + override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "safe-kryo") } +} + +private class SafeKryoSinkModel extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "com.esotericsoftware.kryo;Kryo;false;readObjectOrNull;;;Argument[-1];safe-kryo", + "com.esotericsoftware.kryo;Kryo;false;readObject;;;Argument[-1];safe-kryo", + "com.esotericsoftware.kryo;Kryo;false;readClassAndObject;;;Argument[-1];safe-kryo" + ] } } From 351f35d9bce68e79b921511ba91f9f17172de7c5 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 9 Apr 2021 13:13:49 +0200 Subject: [PATCH 0133/1662] Revert "Java: Convert other sinks" This reverts commit 87d42b02c0c49ff717c941d6ea5290b6ca3c40df. --- .../CWE/CWE-209/StackTraceExposure.ql | 11 +- .../Security/CWE/CWE-036/OpenStream.ql | 15 +- .../Security/CWE/CWE-074/XsltInjectionLib.qll | 41 ++--- .../Security/CWE/CWE-094/JexlInjectionLib.qll | 139 ++++++++------- .../Security/CWE/CWE-094/MvelInjectionLib.qll | 56 +++--- .../CWE/CWE-326/InsufficientKeySize.ql | 23 ++- .../Security/CWE/CWE-327/SslLib.qll | 20 +-- .../Security/CWE/CWE-346/UnvalidatedCors.ql | 29 +-- .../Security/CWE/CWE-522/InsecureLdapAuth.ql | 26 ++- .../Security/CWE/CWE-643/XPathInjection.ql | 23 ++- .../Security/CWE/CWE-652/XQueryInjection.ql | 7 +- .../CWE/CWE-652/XQueryInjectionLib.qll | 12 -- .../Security/CWE/CWE-917/OgnlInjectionLib.qll | 26 +-- .../Security/CWE/CWE-918/RequestForgery.ql | 5 +- .../Security/CWE/CWE-918/RequestForgery.qll | 168 ++++++++++++++---- .../code/java/dataflow/ExternalFlow.qll | 23 +-- .../java/security/UnsafeDeserialization.qll | 32 ++-- 17 files changed, 354 insertions(+), 302 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql index 1f49d5cb06ac..c9c1e2917c0e 100644 --- a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql +++ b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql @@ -16,7 +16,6 @@ import java import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.XSS -private import semmle.code.java.dataflow.ExternalFlow /** * One of the `printStackTrace()` overloads on `Throwable`. @@ -38,12 +37,10 @@ class ServletWriterSourceToPrintStackTraceMethodFlowConfig extends TaintTracking override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ServletWriterSource } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "print-stack-trace") } -} - -private class PrintStackTraceSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = ["java.lang;Throwable;true;printStackTrace;;;Argument;print-stack-trace"] + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + sink.asExpr() = ma.getAnArgument() and ma.getMethod() instanceof PrintStackTraceMethod + ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql index 6f75b3fc8ae5..871d6bb4737c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql @@ -15,7 +15,6 @@ import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.ExternalFlow import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow class URLConstructor extends ClassInstanceExpr { URLConstructor() { this.getConstructor().getDeclaringType() instanceof TypeUrl } @@ -40,7 +39,13 @@ class RemoteURLToOpenStreamFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "url-open-stream") } + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess m | + sink.asExpr() = m.getQualifier() and m.getMethod() instanceof URLOpenStreamMethod + ) + or + sinkNode(sink, "url-open-stream") + } override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { exists(URLConstructor u | @@ -50,12 +55,6 @@ class RemoteURLToOpenStreamFlowConfig extends TaintTracking::Configuration { } } -private class URLOpenStreamSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = ["java.net;URL;false;openStream;;;Argument[-1];url-open-stream"] - } -} - from DataFlow::PathNode source, DataFlow::PathNode sink, MethodAccess call where sink.getNode().asExpr() = call.getQualifier() and diff --git a/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll index bc0c8352a20f..4ba0eb6d0b11 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-074/XsltInjectionLib.qll @@ -2,7 +2,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.XmlParsers import DataFlow -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unvalidated user input that is used in XSLT transformation. @@ -104,20 +103,15 @@ class TypeXsltPackage extends Class { /** A data flow sink for unvalidated user input that is used in XSLT transformation. */ class XsltInjectionSink extends DataFlow::ExprNode { - XsltInjectionSink() { sinkNode(this, "xslt") } -} - -private class XsltInjectionSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "net.sf.saxon.s9api;XsltTransformer;false;transform;;;Argument[-1];xslt", - "net.sf.saxon.s9api;Xslt30Transformer;false;transform;;;Argument[-1];xslt", - "net.sf.saxon.s9api;Xslt30Transformer;false;applyTemplates;;;Argument[-1];xslt", - "net.sf.saxon.s9api;Xslt30Transformer;false;callFunction;;;Argument[-1];xslt", - "net.sf.saxon.s9api;Xslt30Transformer;false;callTemplate;;;Argument[-1];xslt", - "javax.xml.transform;Transformer;false;transform;;;Argument[-1];xslt" - ] + XsltInjectionSink() { + exists(MethodAccess ma, Method m | m = ma.getMethod() and ma.getQualifier() = this.getExpr() | + ma instanceof TransformerTransform or + m instanceof XsltTransformerTransformMethod or + m instanceof Xslt30TransformerTransformMethod or + m instanceof Xslt30TransformerApplyTemplatesMethod or + m instanceof Xslt30TransformerCallFunctionMethod or + m instanceof Xslt30TransformerCallTemplateMethod + ) } } @@ -192,21 +186,16 @@ private class TransformerFactoryWithSecureProcessingFeatureFlowConfig extends Da ) } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "xslt-transformer") } + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + sink.asExpr() = ma.getQualifier() and + ma.getMethod().getDeclaringType() instanceof TransformerFactory + ) + } override int fieldFlowBranchLimit() { result = 0 } } -private class TransformerFactorySinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "javax.xml.transform;TransformerFactory;false;;;;Argument[-1];xslt-transformer", - "javax.xml.transform.sax;SAXTransformerFactory;false;;;;Argument[-1];xslt-transformer" - ] - } -} - /** A `ParserConfig` specific to `TransformerFactory`. */ private class TransformerFactoryFeatureConfig extends ParserConfig { TransformerFactoryFeatureConfig() { diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll index 8fcde750e54c..561d7e46ae90 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll @@ -1,7 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe user input @@ -22,7 +21,7 @@ class JexlInjectionConfig extends TaintTracking::Configuration { } /** - * A sink for Expression Language injection vulnerabilities via Jexl, + * A sink for Expresssion Language injection vulnerabilities via Jexl, * i.e. method calls that run evaluation of a JEXL expression. * * Creating a `Callable` from a tainted JEXL expression or script is considered as a sink @@ -31,41 +30,18 @@ class JexlInjectionConfig extends TaintTracking::Configuration { * maybe stored in an object field and then reached by a different flow. */ private class JexlEvaluationSink extends DataFlow::ExprNode { - JexlEvaluationSink() { sinkNode(this, "jexl") } -} - -private class JexlEvaluationSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - // Direct JEXL evaluation - "org.apache.commons.jexl2;Expression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JexlExpression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl2;Script;false;execute;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JexlScript;false;execute;;;Argument[-1];jexl", - "org.apache.commons.jexl2;JxltEngine$Expression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JxltEngine$Expression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl2;JxltEngine$Expression;false;prepare;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JxltEngine$Expression;false;prepare;;;Argument[-1];jexl", - "org.apache.commons.jexl2;JxltEngine$Template;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JxltEngine$Template;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl2;UnifiedJEXL$Expression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl3;UnifiedJEXL$Expression;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl2;UnifiedJEXL$Expression;false;prepare;;;Argument[-1];jexl", - "org.apache.commons.jexl3;UnifiedJEXL$Expression;false;prepare;;;Argument[-1];jexl", - "org.apache.commons.jexl2;UnifiedJEXL$Template;false;evaluate;;;Argument[-1];jexl", - "org.apache.commons.jexl3;UnifiedJEXL$Template;false;evaluate;;;Argument[-1];jexl", - // JEXL callable - "org.apache.commons.jexl2;Expression;false;callable;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JexlExpression;false;callable;;;Argument[-1];jexl", - "org.apache.commons.jexl2;Script;false;callable;;;Argument[-1];jexl", - "org.apache.commons.jexl3;JexlScript;false;callable;;;Argument[-1];jexl", - // Methods in the `JexlEngine` class that gets or sets a property with a JEXL expression. - "org.apache.commons.jexl2;JexlEngine;false;getProperty;;;Argument[1..2];jexl", - "org.apache.commons.jexl3;JexlEngine;false;getProperty;;;Argument[1..2];jexl", - "org.apache.commons.jexl2;JexlEngine;false;setProperty;;;Argument[1];jexl", - "org.apache.commons.jexl3;JexlEngine;false;setProperty;;;Argument[1];jexl" - ] + JexlEvaluationSink() { + exists(MethodAccess ma, Method m, Expr taintFrom | + ma.getMethod() = m and taintFrom = this.asExpr() + | + m instanceof DirectJexlEvaluationMethod and ma.getQualifier() = taintFrom + or + m instanceof CreateJexlCallableMethod and ma.getQualifier() = taintFrom + or + m instanceof JexlEngineGetSetPropertyMethod and + taintFrom.getType() instanceof TypeString and + ma.getAnArgument() = taintFrom + ) } } @@ -122,36 +98,22 @@ private class SandboxedJexlFlowConfig extends DataFlow2::Configuration { override predicate isSource(DataFlow::Node node) { node instanceof SandboxedJexlSource } - override predicate isSink(DataFlow::Node node) { sinkNode(node, "sandboxed-jexl") } + override predicate isSink(DataFlow::Node node) { + exists(MethodAccess ma, Method m | ma.getMethod() = m | + ( + m instanceof CreateJexlScriptMethod or + m instanceof CreateJexlExpressionMethod or + m instanceof CreateJexlTemplateMethod + ) and + ma.getQualifier() = node.asExpr() + ) + } override predicate isAdditionalFlowStep(DataFlow::Node fromNode, DataFlow::Node toNode) { createsJexlEngine(fromNode, toNode) } } -private class SandboxedJexlEvaluationSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - // CreateJexlScriptMethod - "org.apache.commons.jexl2;JexlEngine;false;createScript;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;JexlEngine;false;createScript;;;Argument[-1];sandboxed-jexl", - // CreateJexlExpressionMethod - "org.apache.commons.jexl2;UnifiedJEXL;false;parse;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;UnifiedJEXL;false;parse;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl2;JxltEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;JxltEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl2;JexlEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;JexlEngine;false;createExpression;;;Argument[-1];sandboxed-jexl", - // CreateJexlTemplateMethod - "org.apache.commons.jexl2;JxltEngine;false;createTemplate;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;JxltEngine;false;createTemplate;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl2;UnifiedJEXL;false;createTemplate;;;Argument[-1];sandboxed-jexl", - "org.apache.commons.jexl3;UnifiedJEXL;false;createTemplate;;;Argument[-1];sandboxed-jexl" - ] - } -} - /** * Defines a data flow source for JEXL engines configured with a sandbox. */ @@ -202,6 +164,35 @@ private predicate returnsDataFromBean(DataFlow::Node fromNode, DataFlow::Node to ) } +/** + * A methods in the `JexlEngine` class that gets or sets a property with a JEXL expression. + */ +private class JexlEngineGetSetPropertyMethod extends Method { + JexlEngineGetSetPropertyMethod() { + getDeclaringType() instanceof JexlEngine and + hasName(["getProperty", "setProperty"]) + } +} + +/** + * A method that triggers direct evaluation of JEXL expressions. + */ +private class DirectJexlEvaluationMethod extends Method { + DirectJexlEvaluationMethod() { + getDeclaringType() instanceof JexlExpression and hasName("evaluate") + or + getDeclaringType() instanceof JexlScript and hasName("execute") + or + getDeclaringType() instanceof JxltEngineExpression and hasName(["evaluate", "prepare"]) + or + getDeclaringType() instanceof JxltEngineTemplate and hasName("evaluate") + or + getDeclaringType() instanceof UnifiedJexlExpression and hasName(["evaluate", "prepare"]) + or + getDeclaringType() instanceof UnifiedJexlTemplate and hasName("evaluate") + } +} + /** * A method that creates a JEXL script. */ @@ -209,6 +200,16 @@ private class CreateJexlScriptMethod extends Method { CreateJexlScriptMethod() { getDeclaringType() instanceof JexlEngine and hasName("createScript") } } +/** + * A method that creates a `Callable` for a JEXL expression or script. + */ +private class CreateJexlCallableMethod extends Method { + CreateJexlCallableMethod() { + (getDeclaringType() instanceof JexlExpression or getDeclaringType() instanceof JexlScript) and + hasName("callable") + } +} + /** * A method that creates a JEXL template. */ @@ -266,6 +267,22 @@ private class JexlUberspect extends Interface { } } +private class JxltEngineExpression extends NestedType { + JxltEngineExpression() { getEnclosingType() instanceof JxltEngine and hasName("Expression") } +} + +private class JxltEngineTemplate extends NestedType { + JxltEngineTemplate() { getEnclosingType() instanceof JxltEngine and hasName("Template") } +} + +private class UnifiedJexlExpression extends NestedType { + UnifiedJexlExpression() { getEnclosingType() instanceof UnifiedJexl and hasName("Expression") } +} + +private class UnifiedJexlTemplate extends NestedType { + UnifiedJexlTemplate() { getEnclosingType() instanceof UnifiedJexl and hasName("Template") } +} + private class Reader extends RefType { Reader() { hasQualifiedName("java.io", "Reader") } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll index dec268a2a4bc..a6cf891330f0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/MvelInjectionLib.qll @@ -1,7 +1,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe user input @@ -31,31 +30,36 @@ class MvelInjectionConfig extends TaintTracking::Configuration { * i.e. methods that run evaluation of a MVEL expression. */ class MvelEvaluationSink extends DataFlow::ExprNode { - MvelEvaluationSink() { sinkNode(this, "mvel") } -} - -private class MvelEvaluationSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "org.mvel2.jsr223;MvelScriptEngine;false;evaluate;;;Argument[0];mvel", - "org.mvel2.jsr223;MvelScriptEngine;false;eval;;;Argument[0];mvel", - "org.mvel2.compiler;ExecutableStatement;false;getValue;;;Argument[-1];mvel", - "org.mvel2.compiler;CompiledExpression;false;getDirectValue;;;Argument[-1];mvel", - "org.mvel2.compiler;CompiledAccExpression;false;getValue;;;Argument[-1];mvel", - "org.mvel2.compiler;Accessor;false;getValue;;;Argument[-1];mvel", - "javax.script;CompiledScript;false;eval;;;Argument[-1];mvel", - "org.mvel2.jsr223;MvelCompiledScript;false;eval;;;Argument[-1];mvel", - "org.mvel2;MVEL;false;eval;;;Argument[0];mvel", - "org.mvel2;MVEL;false;executeExpression;;;Argument[0];mvel", - "org.mvel2;MVEL;false;evalToBoolean;;;Argument[0];mvel", - "org.mvel2;MVEL;false;evalToString;;;Argument[0];mvel", - "org.mvel2;MVEL;false;executeAllExpression;;;Argument[0];mvel", - "org.mvel2;MVEL;false;executeSetExpression;;;Argument[0];mvel", - "org.mvel2.templates;TemplateRuntime;false;eval;;;Argument[0];mvel", - "org.mvel2.templates;TemplateRuntime;false;execute;;;Argument[0];mvel", - "org.mvel2;MVELRuntime;false;execute;;;Argument[1];mvel" - ] + MvelEvaluationSink() { + exists(StaticMethodAccess ma, Method m | m = ma.getMethod() | + ( + m instanceof MvelEvalMethod or + m instanceof TemplateRuntimeEvaluationMethod + ) and + ma.getArgument(0) = asExpr() + ) + or + exists(MethodAccess ma, Method m | m = ma.getMethod() | + m instanceof MvelScriptEngineEvaluationMethod and + ma.getArgument(0) = asExpr() + ) + or + exists(MethodAccess ma, Method m | m = ma.getMethod() | + ( + m instanceof ExecutableStatementEvaluationMethod or + m instanceof CompiledExpressionEvaluationMethod or + m instanceof CompiledAccExpressionEvaluationMethod or + m instanceof AccessorEvaluationMethod or + m instanceof CompiledScriptEvaluationMethod or + m instanceof MvelCompiledScriptEvaluationMethod + ) and + ma.getQualifier() = asExpr() + ) + or + exists(StaticMethodAccess ma, Method m | m = ma.getMethod() | + m instanceof MvelRuntimeEvaluationMethod and + ma.getArgument(1) = asExpr() + ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql b/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql index ca86f42c561a..155d05abfae3 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-326/InsufficientKeySize.ql @@ -12,7 +12,6 @@ import java import semmle.code.java.security.Encryption import semmle.code.java.dataflow.TaintTracking -private import semmle.code.java.dataflow.ExternalFlow /** The Java class `java.security.spec.ECGenParameterSpec`. */ class ECGenParameterSpec extends RefType { @@ -56,12 +55,11 @@ class KeyGeneratorInitConfiguration extends TaintTracking::Configuration { exists(JavaxCryptoKeyGenerator jcg | jcg = source.asExpr()) } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "keygen") } -} - -private class KeyGeneratorInitSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = ["javax.crypto;KeyGenerator;false;init;;;Argument[-1];keygen"] + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + ma.getMethod() instanceof KeyGeneratorInitMethod and + sink.asExpr() = ma.getQualifier() + ) } } @@ -73,12 +71,11 @@ class KeyPairGeneratorInitConfiguration extends TaintTracking::Configuration { exists(JavaSecurityKeyPairGenerator jkg | jkg = source.asExpr()) } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "keypairgen") } -} - -private class KeyPairGeneratorInitSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = ["java.security;KeyPairGenerator;false;initialize;;;Argument[-1];keypairgen"] + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + ma.getMethod() instanceof KeyPairGeneratorInitMethod and + sink.asExpr() = ma.getQualifier() + ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll b/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll index 3845953f0aab..bfa2530b07e7 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-327/SslLib.qll @@ -3,7 +3,6 @@ import semmle.code.java.security.Encryption import semmle.code.java.dataflow.TaintTracking import DataFlow import PathGraph -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unsafe SSL and TLS versions. @@ -13,20 +12,11 @@ class UnsafeTlsVersionConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source.asExpr() instanceof UnsafeTlsVersion } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ssl") } -} - -private class UnsafeTlsVersionSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "javax.net.ssl;SSLContext;false;getInstance;;;Argument[0];ssl", - "javax.net.ssl;SSLParameters;false;SSLParameters;;;Argument[1];ssl", - "javax.net.ssl;SSLParameters;false;setProtocols;;;Argument[0];ssl", - "javax.net.ssl;SSLSocket;false;setEnabledProtocols;;;Argument[0];ssl", - "javax.net.ssl;SSLServerSocket;false;setEnabledProtocols;;;Argument[0];ssl", - "javax.net.ssl;SSLEngine;false;setEnabledProtocols;;;Argument[0];ssl" - ] + override predicate isSink(DataFlow::Node sink) { + sink instanceof SslContextGetInstanceSink or + sink instanceof CreateSslParametersSink or + sink instanceof SslParametersSetProtocolsSink or + sink instanceof SetEnabledProtocolsSink } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql index 2fe6569318fc..c5a6c36d6a61 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-346/UnvalidatedCors.ql @@ -15,7 +15,6 @@ import semmle.code.java.frameworks.Servlets import semmle.code.java.dataflow.TaintTracking import semmle.code.java.dataflow.TaintTracking2 import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow /** * Holds if `header` sets `Access-Control-Allow-Credentials` to `true`. This ensures fair chances of exploitability. @@ -30,29 +29,33 @@ private predicate setsAllowCredentials(MethodAccess header) { header.getArgument(1).(CompileTimeConstantExpr).getStringValue().toLowerCase() = "true" } +private class CorsProbableCheckAccess extends MethodAccess { + CorsProbableCheckAccess() { + getMethod().hasName("contains") and + getMethod().getDeclaringType().getASourceSupertype*() instanceof CollectionType + or + getMethod().hasName("containsKey") and + getMethod().getDeclaringType().getASourceSupertype*() instanceof MapType + or + getMethod().hasName("equals") and + getQualifier().getType() instanceof TypeString + } +} + private Expr getAccessControlAllowOriginHeaderName() { result.(CompileTimeConstantExpr).getStringValue().toLowerCase() = "access-control-allow-origin" } /** - * This taintflow2 configuration checks if there is a flow from source node towards probably CORS checking methods. + * This taintflow2 configuration checks if there is a flow from source node towards CorsProbableCheckAccess methods. */ class CorsSourceReachesCheckConfig extends TaintTracking2::Configuration { CorsSourceReachesCheckConfig() { this = "CorsOriginConfig" } override predicate isSource(DataFlow::Node source) { any(CorsOriginConfig c).hasFlow(source, _) } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "cors") } -} - -private class CorsProbableCheckAccessSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "java.util;Collection;true;contains;;;Argument;cors", - "java.util;Map;true;containsKey;;;Argument;cors", - "java.lang;String;true;equals;;;Argument;cors" - ] + override predicate isSink(DataFlow::Node sink) { + sink.asExpr() = any(CorsProbableCheckAccess check).getAnArgument() } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql index 3c445934ad33..4ce2b8b7134c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureLdapAuth.ql @@ -16,7 +16,6 @@ import semmle.code.java.frameworks.Jndi import semmle.code.java.frameworks.Networking import semmle.code.java.dataflow.TaintTracking import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow /** * Insecure (non-SSL, non-private) LDAP URL string literal. @@ -146,7 +145,12 @@ class InsecureUrlFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof InsecureLdapUrl } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } + override predicate isSink(DataFlow::Node sink) { + exists(ConstructorCall cc | + cc.getConstructedType().getASupertype*() instanceof TypeDirContext and + sink.asExpr() = cc.getArgument(0) + ) + } /** Method call of `env.put()`. */ override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { @@ -172,12 +176,11 @@ class BasicAuthFlowConfig extends DataFlow::Configuration { } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } -} - -private class LdapSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = ["javax.naming.directory;DirContext;true;.ctor;;;Argument[0];ldap"] + override predicate isSink(DataFlow::Node sink) { + exists(ConstructorCall cc | + cc.getConstructedType().getASupertype*() instanceof TypeDirContext and + sink.asExpr() = cc.getArgument(0) + ) } } @@ -195,7 +198,12 @@ class SSLFlowConfig extends DataFlow::Configuration { } /** Sink of directory context creation. */ - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "ldap") } + override predicate isSink(DataFlow::Node sink) { + exists(ConstructorCall cc | + cc.getConstructedType().getASupertype*() instanceof TypeDirContext and + sink.asExpr() = cc.getArgument(0) + ) + } } from DataFlow::PathNode source, DataFlow::PathNode sink, InsecureUrlFlowConfig config diff --git a/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql index 598f42b0c703..e5a29df46d59 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-643/XPathInjection.ql @@ -15,7 +15,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking import semmle.code.java.security.XmlParsers import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow class XPathInjectionConfiguration extends TaintTracking::Configuration { XPathInjectionConfiguration() { this = "XPathInjection" } @@ -26,18 +25,16 @@ class XPathInjectionConfiguration extends TaintTracking::Configuration { } class XPathInjectionSink extends DataFlow::ExprNode { - XPathInjectionSink() { sinkNode(this, "xpath") } -} - -private class XPathInjectionSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "javax.xml.xpath;XPath;false;compile;;;Argument[0];xpath", - "javax.xml.xpath;XPath;false;evaluate;;;Argument[0];xpath", - "org.dom4j;Node;false;selectNodes;;;Argument[0];xpath", - "org.dom4j;Node;false;selectSingleNode;;;Argument[0];xpath" - ] + XPathInjectionSink() { + exists(Method m, MethodAccess ma | ma.getMethod() = m | + m.getDeclaringType().hasQualifiedName("javax.xml.xpath", "XPath") and + (m.hasName("evaluate") or m.hasName("compile")) and + ma.getArgument(0) = this.getExpr() + or + m.getDeclaringType().hasQualifiedName("org.dom4j", "Node") and + (m.hasName("selectNodes") or m.hasName("selectSingleNode")) and + ma.getArgument(0) = this.getExpr() + ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql index 3b8e43c5d7d2..0bb85272f085 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjection.ql @@ -14,7 +14,6 @@ import java import semmle.code.java.dataflow.FlowSources import XQueryInjectionLib import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration tracing flow from remote sources, through an XQuery parser, to its eventual execution. @@ -24,7 +23,11 @@ class XQueryInjectionConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "xquery") } + override predicate isSink(DataFlow::Node sink) { + sink.asExpr() = any(XQueryPreparedExecuteCall xpec).getPreparedExpression() or + sink.asExpr() = any(XQueryExecuteCall xec).getExecuteQueryArgument() or + sink.asExpr() = any(XQueryExecuteCommandCall xecc).getExecuteCommandArgument() + } /** * Holds if taint from the input `pred` to a `prepareExpression` call flows to the returned prepared expression `succ`. diff --git a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll index 13452e4e55dc..2a4019f2c9a9 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-652/XQueryInjectionLib.qll @@ -1,5 +1,4 @@ import java -private import semmle.code.java.dataflow.ExternalFlow /** A call to `XQConnection.prepareExpression`. */ class XQueryParserCall extends MethodAccess { @@ -67,14 +66,3 @@ class XQueryExecuteCommandCall extends MethodAccess { /** Return this execute command argument. */ Expr getExecuteCommandArgument() { result = this.getArgument(0) } } - -private class XQuerySinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "javax.xml.xquery;XQPreparedExpression;true;executeQuery;;;Argument[-1];xquery", - "javax.xml.xquery;XQExpression;true;executeQuery;;;Argument[0];xquery", - "javax.xml.xquery;XQExpression;true;executeCommand;;;Argument[0];xquery" - ] - } -} diff --git a/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll index 002e06aaafdc..569e18a29c38 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-917/OgnlInjectionLib.qll @@ -2,7 +2,6 @@ import java import semmle.code.java.dataflow.FlowSources import DataFlow import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow /** * A taint-tracking configuration for unvalidated user input that is used in OGNL EL evaluation. @@ -83,25 +82,12 @@ predicate ognlInjectionSinkMethod(Method m, int index) { /** A data flow sink for unvalidated user input that is used in OGNL EL evaluation. */ class OgnlInjectionSink extends DataFlow::ExprNode { - OgnlInjectionSink() { sinkNode(this, "ognl") } -} - -private class OgnlInjectionSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "org.apache.commons.ognl;Ognl;false;setValue;;;Argument[-1..0];ognl", - "org.apache.commons.ognl;Ognl;false;getValue;;;Argument[-1..0];ognl", - "ognl;Ognl;false;setValue;;;Argument[-1..0];ognl", - "ognl;Ognl;false;getValue;;;Argument[-1..0];ognl", - "org.apache.commons.ognl;Node;true;setValue;;;Argument[-1..0];ognl", - "org.apache.commons.ognl;Node;true;getValue;;;Argument[-1..0];ognl", - "ognl;Node;true;setValue;;;Argument[-1..0];ognl", - "ognl;Node;true;getValue;;;Argument[-1..0];ognl", - "com.opensymphony.xwork2.ognl;OgnlUtil;false;setValue;;;Argument[-1..0];ognl", - "com.opensymphony.xwork2.ognl;OgnlUtil;false;getValue;;;Argument[-1..0];ognl", - "com.opensymphony.xwork2.ognl;OgnlUtil;false;callMethod;;;Argument[-1..0];ognl" - ] + OgnlInjectionSink() { + exists(MethodAccess ma, Method m, int index | + ma.getMethod() = m and + (ma.getArgument(index) = this.getExpr() or ma.getQualifier() = this.getExpr()) and + ognlInjectionSinkMethod(m, index) + ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql index 6b0333da4709..c3bf787881fa 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql @@ -14,16 +14,13 @@ import java import semmle.code.java.dataflow.FlowSources import RequestForgery import DataFlow::PathGraph -private import semmle.code.java.dataflow.ExternalFlow class RequestForgeryConfiguration extends TaintTracking::Configuration { RequestForgeryConfiguration() { this = "Server Side Request Forgery" } override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - sink instanceof RequestForgerySink or sinkNode(sink, "request-forgery-sink") - } + override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { requestForgeryStep(pred, succ) diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll index fa784baa7f23..3fc52ddca766 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll @@ -5,7 +5,6 @@ import semmle.code.java.frameworks.spring.Spring import semmle.code.java.frameworks.JaxWS import semmle.code.java.frameworks.javase.Http import semmle.code.java.dataflow.DataFlow -private import semmle.code.java.dataflow.ExternalFlow predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { // propagate to a URI when its host is assigned to @@ -39,42 +38,119 @@ predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { ) } -private class RequestForgerySinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "java.net;URL;false;openConnection;;;Argument[-1];request-forgery-sink", - "java.net;URL;false;openStream;;;Argument[-1];request-forgery-sink", - "org.apache.http.client.methods;HttpRequestBase;true;setURI;;;Argument[0];request-forgery-sink", - "org.apache.http.message;BasicHttpRequest;true;setURI;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;HttpRequestBase;true;.ctor;;;Argument[0];request-forgery-sink", - "org.apache.http.message;BasicHttpRequest;true;.ctor;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;setURI;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;get;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;post;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;put;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;options;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;head;;;Argument[0];request-forgery-sink", - "org.apache.http.client.methods;RequestBuilder;false;delete;;;Argument[0];request-forgery-sink", - "java.net.http;HttpRequest$Builder;false;uri;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;patchForObject;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;getForObject;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;getForEntity;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;execute;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;exchange;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;put;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;postForObject;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;postForLocation;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;postForEntity;;;Argument[0];request-forgery-sink", - "org.springframework.web.client;RestTemplate;false;doExecute;;;Argument[0];request-forgery-sink", - "javax.ws.rs.client;Client;false;target;;;Argument[0];request-forgery-sink", - "java.net.http;HttpRequest;false;newBuilder;;;Argument[0];request-forgery-sink" // todo: this might be stricter than before. Previously the package name was not checked. - ] +/** A data flow sink for request forgery vulnerabilities. */ +abstract class RequestForgerySink extends DataFlow::Node { } + +/** + * An argument to an url `openConnection` or `openStream` call + * taken as a sink for request forgery vulnerabilities. + */ +private class UrlOpen extends RequestForgerySink { + UrlOpen() { + exists(MethodAccess ma | + ma.getMethod() instanceof UrlOpenConnectionMethod or + ma.getMethod() instanceof UrlOpenStreamMethod + | + this.asExpr() = ma.getQualifier() + ) } } -/** A data flow sink for request forgery vulnerabilities. */ -abstract class RequestForgerySink extends DataFlow::Node { } +/** + * An argument to an Apache `setURI` call taken as a + * sink for request forgery vulnerabilities. + */ +private class ApacheSetUri extends RequestForgerySink { + ApacheSetUri() { + exists(MethodAccess ma | + ma.getReceiverType() instanceof ApacheHttpRequest and + ma.getMethod().hasName("setURI") + | + this.asExpr() = ma.getArgument(0) + ) + } +} + +/** + * An argument to any Apache Request Instantiation call taken as a + * sink for request forgery vulnerabilities. + */ +private class ApacheHttpRequestInstantiation extends RequestForgerySink { + ApacheHttpRequestInstantiation() { + exists(ClassInstanceExpr c | c.getConstructedType() instanceof ApacheHttpRequest | + this.asExpr() = c.getArgument(0) + ) + } +} + +/** + * An argument to a Apache RequestBuilder method call taken as a + * sink for request forgery vulnerabilities. + */ +private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { + ApacheHttpRequestBuilderArgument() { + exists(MethodAccess ma | + ma.getReceiverType() instanceof TypeApacheHttpRequestBuilder and + ma.getMethod().hasName(["setURI", "get", "post", "put", "optons", "head", "delete"]) + | + this.asExpr() = ma.getArgument(0) + ) + } +} + +/** + * An argument to any Java.net.http.request Instantiation call taken as a + * sink for request forgery vulnerabilities. + */ +private class HttpRequestNewBuilder extends RequestForgerySink { + HttpRequestNewBuilder() { + exists(MethodAccess call | + call.getCallee().hasName("newBuilder") and + call.getMethod().getDeclaringType().getName() = "HttpRequest" + | + this.asExpr() = call.getArgument(0) + ) + } +} + +/** + * An argument to an Http Builder `uri` call taken as a + * sink for request forgery vulnerabilities. + */ +private class HttpBuilderUriArgument extends RequestForgerySink { + HttpBuilderUriArgument() { + exists(MethodAccess ma | ma.getMethod() instanceof HttpBuilderUri | + this.asExpr() = ma.getArgument(0) + ) + } +} + +/** + * An argument to a Spring Rest Template method call taken as a + * sink for request forgery vulnerabilities. + */ +private class SpringRestTemplateArgument extends RequestForgerySink { + SpringRestTemplateArgument() { + exists(MethodAccess ma | + this.asExpr() = ma.getMethod().(SpringRestTemplateUrlMethods).getUrlArgument(ma) + ) + } +} + +/** + * An argument to `javax.ws.rs.Client`s `target` method call taken as a + * sink for request forgery vulnerabilities. + */ +private class JaxRsClientTarget extends RequestForgerySink { + JaxRsClientTarget() { + exists(MethodAccess ma | + ma.getMethod().getDeclaringType() instanceof JaxRsClient and + ma.getMethod().hasName("target") + | + this.asExpr() = ma.getArgument(0) + ) + } +} /** * An argument to `org.springframework.http.RequestEntity`s constructor call @@ -90,3 +166,27 @@ private class RequestEntityUriArg extends RequestForgerySink { ) } } + +/** + * A class representing all Spring Rest Template methods + * which take an URL as an argument. + */ +private class SpringRestTemplateUrlMethods extends Method { + SpringRestTemplateUrlMethods() { + this.getDeclaringType() instanceof SpringRestTemplate and + this.hasName([ + "doExecute", "postForEntity", "postForLocation", "postForObject", "put", "exchange", + "execute", "getForEntity", "getForObject", "patchForObject" + ]) + } + + /** + * Gets the argument which corresponds to a URL argument + * passed as a `java.net.URL` object or as a string or the like + */ + Argument getUrlArgument(MethodAccess ma) { + // doExecute(URI url, HttpMethod method, RequestCallback requestCallback, + // ResponseExtractor responseExtractor) + result = ma.getArgument(0) + } +} diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 3cda09c14889..154ec98f2ad8 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -472,7 +472,7 @@ module CsvValidation { not type.regexpMatch("[a-zA-Z0-9_\\$]+") and msg = "Dubious type \"" + type + "\" in " + pred + " model." or - not (name.regexpMatch("[a-zA-Z0-9_]*") or name = ".ctor") and + not name.regexpMatch("[a-zA-Z0-9_]*") and msg = "Dubious name \"" + name + "\" in " + pred + " model." or not signature.regexpMatch("|\\([a-zA-Z0-9_\\.\\$<>,\\[\\]]*\\)") and @@ -562,34 +562,23 @@ private string paramsString(Callable c) { } private Element interpretElement0( - string namespace, string type, boolean subtypes, string name, string signature, string ext + string namespace, string type, boolean subtypes, string name, string signature ) { elementSpec(namespace, type, subtypes, name, signature, _) and exists(RefType t | t = interpretType(namespace, type, subtypes) | exists(Member m | result = m and m.getDeclaringType() = t and - ( - m.hasName(name) - or - name = ".ctor" and m.hasName(t.getName()) - ) + m.hasName(name) | signature = "" or m.(Callable).getSignature() = any(string nameprefix) + signature or paramsString(m) = signature - ) and - ext = "" + ) or result = t and name = "" and - signature = "" and - ext = "Annotated" - or - result = t.getAMember() and - name = "" and - signature = "" and - ext = "" + signature = "" ) } @@ -597,7 +586,7 @@ private Element interpretElement( string namespace, string type, boolean subtypes, string name, string signature, string ext ) { elementSpec(namespace, type, subtypes, name, signature, ext) and - exists(Element e | e = interpretElement0(namespace, type, subtypes, name, signature, ext) | + exists(Element e | e = interpretElement0(namespace, type, subtypes, name, signature) | ext = "" and result = e or ext = "Annotated" and result.(Annotatable).getAnAnnotation().getType() = e diff --git a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll index d84ee67bca5c..ab809f07d6d1 100644 --- a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll +++ b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll @@ -3,7 +3,6 @@ import semmle.code.java.frameworks.XStream import semmle.code.java.frameworks.SnakeYaml import semmle.code.java.frameworks.FastJson import semmle.code.java.frameworks.apache.Lang -private import semmle.code.java.dataflow.ExternalFlow class ObjectInputStreamReadObjectMethod extends Method { ObjectInputStreamReadObjectMethod() { @@ -27,16 +26,11 @@ class SafeXStream extends DataFlow2::Configuration { src.asExpr() } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "safe-xstream") } -} - -private class SafeXStreamSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "com.thoughtworks.xstream;XStream;false;unmarshal;;;Argument[-1];safe-xstream", - "com.thoughtworks.xstream;XStream;false;fromXML;;;Argument[-1];safe-xstream" - ] + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + sink.asExpr() = ma.getQualifier() and + ma.getMethod() instanceof XStreamReadObjectMethod + ) } } @@ -48,17 +42,11 @@ class SafeKryo extends DataFlow2::Configuration { src.asExpr() } - override predicate isSink(DataFlow::Node sink) { sinkNode(sink, "safe-kryo") } -} - -private class SafeKryoSinkModel extends SinkModelCsv { - override predicate row(string row) { - row = - [ - "com.esotericsoftware.kryo;Kryo;false;readObjectOrNull;;;Argument[-1];safe-kryo", - "com.esotericsoftware.kryo;Kryo;false;readObject;;;Argument[-1];safe-kryo", - "com.esotericsoftware.kryo;Kryo;false;readClassAndObject;;;Argument[-1];safe-kryo" - ] + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma | + sink.asExpr() = ma.getQualifier() and + ma.getMethod() instanceof KryoReadObjectMethod + ) } } From 3b437fe6cf1e4d9cee9b807869ddd0272e35d732 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 8 Apr 2021 15:52:41 +0100 Subject: [PATCH 0134/1662] C++: Replace GVN with some other libraries. --- ...nsignedDifferenceExpressionComparedZero.ql | 20 +++++++++++++++---- ...dDifferenceExpressionComparedZero.expected | 7 ------- .../test.cpp | 14 ++++++------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index bca77f99a721..cbdae0b66518 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -12,10 +12,10 @@ import cpp import semmle.code.cpp.commons.Exclusions -import semmle.code.cpp.valuenumbering.GlobalValueNumbering import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils import semmle.code.cpp.controlflow.Guards +import semmle.code.cpp.dataflow.DataFlow /** * Holds if `sub` is guarded by a condition which ensures that @@ -37,15 +37,27 @@ predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { e = sub.getLeftOperand() or exists(Expr other | - // GVN equality + // use-use exprIsSubLeftOrLess(sub, other) and - globalValueNumber(e) = globalValueNumber(other) + ( + useUsePair(_, other, e) or + useUsePair(_, e, other) + ) + ) + or + exists(Expr other | + // dataflow + exprIsSubLeftOrLess(sub, other) and + ( + DataFlow::localFlowStep(DataFlow::exprNode(e), DataFlow::exprNode(other)) or + DataFlow::localFlowStep(DataFlow::exprNode(other), DataFlow::exprNode(e)) + ) ) or exists(Expr other | // guard constraining `sub` exprIsSubLeftOrLess(sub, other) and - isGuarded(sub, other, e) // left >= right + isGuarded(sub, other, e) // other >= e ) or exists(Expr other, float p, float q | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 64a1aa0ab899..85938f154996 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -1,12 +1,6 @@ | test.cpp:6:5:6:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:10:8:10:24 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:15:9:15:25 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:32:12:32:20 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:39:12:39:20 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:47:5:47:13 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:55:5:55:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:69:5:69:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:128:6:128:14 | ... > ... | Unsigned subtraction can never be negative. | @@ -14,7 +8,6 @@ | test.cpp:146:7:146:15 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:195:6:195:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp index f151c593a2de..1a6aaa618e58 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/test.cpp @@ -12,7 +12,7 @@ void test(unsigned x, unsigned y, bool unknown) { } if(total <= limit) { - while(limit - total > 0) { // GOOD [FALSE POSITIVE] + while(limit - total > 0) { // GOOD total += getAnInt(); if(total > limit) break; } @@ -29,14 +29,14 @@ void test(unsigned x, unsigned y, bool unknown) { } else { y = x; } - bool b1 = x - y > 0; // GOOD [FALSE POSITIVE] + bool b1 = x - y > 0; // GOOD x = getAnInt(); y = getAnInt(); if(y > x) { y = x - 1; } - bool b2 = x - y > 0; // GOOD [FALSE POSITIVE] + bool b2 = x - y > 0; // GOOD int N = getAnInt(); y = x; @@ -44,7 +44,7 @@ void test(unsigned x, unsigned y, bool unknown) { if(unknown) { y--; } } - if(x - y > 0) { } // GOOD [FALSE POSITIVE] + if(x - y > 0) { } // GOOD x = y; while(cond()) { @@ -52,7 +52,7 @@ void test(unsigned x, unsigned y, bool unknown) { y--; } - if(x - y > 0) { } // GOOD [FALSE POSITIVE] + if(x - y > 0) { } // GOOD y = 0; for(int i = 0; i < x; ++i) { @@ -66,7 +66,7 @@ void test(unsigned x, unsigned y, bool unknown) { if(unknown) { x++; } } - if(x - y > 0) { } // GOOD [FALSE POSITIVE] + if(x - y > 0) { } // GOOD int n = getAnInt(); if (n > x - y) { n = x - y; } @@ -192,7 +192,7 @@ void test10() { a = b; } - if (a - b > 0) { // GOOD (as a >= b) [FALSE POSITIVE] + if (a - b > 0) { // GOOD (as a >= b) // ... } } From 0818c1d7038a84c39a04d2282f023d56ff280f4a Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 9 Apr 2021 18:11:48 +0100 Subject: [PATCH 0135/1662] C++: Update QLDoc. --- .../CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index cbdae0b66518..074ecfc821e1 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -31,7 +31,8 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) { } /** - * Holds if `e` is known to be less than or equal to `sub.getLeftOperand()`. + * Holds if `e` is known or suspected to be less than or equal to + * `sub.getLeftOperand()`. */ predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { e = sub.getLeftOperand() From 40637c18ceb1684c16db25f2e59275497f287871 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 9 Apr 2021 18:14:12 +0100 Subject: [PATCH 0136/1662] C++: Add change note. --- .../2021-04-09-unsigned-difference-expression-compared-zero.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cpp/change-notes/2021-04-09-unsigned-difference-expression-compared-zero.md diff --git a/cpp/change-notes/2021-04-09-unsigned-difference-expression-compared-zero.md b/cpp/change-notes/2021-04-09-unsigned-difference-expression-compared-zero.md new file mode 100644 index 000000000000..3297dfce9a97 --- /dev/null +++ b/cpp/change-notes/2021-04-09-unsigned-difference-expression-compared-zero.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The 'Unsigned difference expression compared to zero' (cpp/unsigned-difference-expression-compared-zero) query has been improved to produce fewer false positive results. \ No newline at end of file From b8c11503f0fcc66c07169a0d9cb413726af347ff Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:21:49 +0800 Subject: [PATCH 0137/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index 2712f30a3f2b..f49100089028 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -4,7 +4,7 @@

    The software uses external input as the function name to wrap JSON data and returns it to the client as a request response. -When there is a cross-domain problem, the problem of sensitive information leakage may occur.

    +When there is a cross-domain problem, this could lead to information leakage.

    From ebd38eaf3bd0d5f4cb15bf4724fb2bb90ad1f8a6 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:22:08 +0800 Subject: [PATCH 0138/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index f49100089028..e3d61a0342e3 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -14,7 +14,7 @@ When there is a cross-domain problem, this could lead to information leakage.

    -

    The following examples show the bad case and the good case respectively. Bad case, such as bad1 to bad8, +

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad8, will cause information leakage problems when there are cross-domain problems. In a good case, for example, in the good1 method and the good2 method, use the verifToken method to do the random token Verification can solve the problem of information leakage caused by cross-domain.

    From d8165145c71e1c21c8e274fca2d807ad34b0001d Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:22:44 +0800 Subject: [PATCH 0139/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index e3d61a0342e3..f8c01cf5a328 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -15,7 +15,7 @@ When there is a cross-domain problem, this could lead to information leakage.

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad8, -will cause information leakage problems when there are cross-domain problems. In a good case, for example, in the good1 +will cause information leakage when there are cross-domain problems. In a good case, for example, in the good1 method and the good2 method, use the verifToken method to do the random token Verification can solve the problem of information leakage caused by cross-domain.

    From 1510048f7afb17ae4e63b38c7e83c2ef05c9aa11 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:23:13 +0800 Subject: [PATCH 0140/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index f8c01cf5a328..10c6aa056adb 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -16,7 +16,7 @@ When there is a cross-domain problem, this could lead to information leakage.

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad8, will cause information leakage when there are cross-domain problems. In a good case, for example, in the good1 -method and the good2 method, use the verifToken method to do the random token Verification can +method and the good2 method, using the verifToken method to do random token verification solve the problem of information leakage caused by cross-domain.

    From 79c1374925f72b59ac9ad6f41ad2ad0b759c0eb5 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:24:49 +0800 Subject: [PATCH 0141/1662] Update java/ql/src/semmle/code/java/frameworks/Servlets.qll Co-authored-by: Chris Smowton --- java/ql/src/semmle/code/java/frameworks/Servlets.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index 21f55d396853..a99df9816f15 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -354,7 +354,7 @@ class FilterChain extends Interface { /** Holds if `m` is a filter handler method (for example `doFilter`). */ predicate isDoFilterMethod(Method m) { - m.getName().matches("doFilter") and + m.getName() ="doFilter" and m.getDeclaringType() instanceof FilterClass and m.getNumberOfParameters() = 3 and m.getParameter(0).getType() instanceof ServletRequest and From 157e4670fd5ec92f9f86b2fc23eae3eda103375d Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:25:11 +0800 Subject: [PATCH 0142/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index 10c6aa056adb..2a3f0861cdf9 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -17,7 +17,7 @@ When there is a cross-domain problem, this could lead to information leakage.

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad8, will cause information leakage when there are cross-domain problems. In a good case, for example, in the good1 method and the good2 method, using the verifToken method to do random token verification -solve the problem of information leakage caused by cross-domain.

    +solves the problem of information leakage even in the presence of cross-domain access issues.

    From 837f20108ddabb25c4c04f45c1c1324b456d2ce0 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:25:43 +0800 Subject: [PATCH 0143/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index bf90926f72f0..507a93454d78 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -7,7 +7,7 @@ import semmle.code.java.dataflow.DataFlow3 import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController -/** A data flow configuration is tracing flow from the access to the authentication method of token/auth/referer/origin to if condition. */ +/** A data flow configuration tracing flow from the result of a method whose name includes token/auth/referer/origin to an if-statement condition. */ class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } From c77c7b0a982bfe6eb88911bc7ac5cfb26b58d245 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:27:16 +0800 Subject: [PATCH 0144/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../Security/CWE/CWE-352/JsonpInjectionLib.qll | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 507a93454d78..f30a31f41337 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -27,7 +27,12 @@ class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { } } -/** Taint-tracking configuration tracing flow from untrusted inputs to verification of remote user input. */ +/** Taint-tracking configuration tracing flow from untrusted inputs to an argument of a function whose result is used as an if-statement condition. +* +* For example, in the context `String userControlled = request.getHeader("xyz"); boolean isGood = checkToken(userControlled); if(isGood) { ...`, +* the flow from `checkToken`'s result to the condition of `if(isGood)` matches the configuration `VerificationMethodToIfFlowConfig` above, +* and so the flow from `getHeader(...)` to the argument to `checkToken` matches this configuration. + */ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } From 760231c0046b559279eefe79c60de6e0092a96ba Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:28:17 +0800 Subject: [PATCH 0145/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index f30a31f41337..c63473cafa86 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -60,6 +60,9 @@ Callable getACallingCallableOrSelf(Callable call) { result = getACallingCallableOrSelf(call.getAReference().getEnclosingCallable()) } +/** + * A method that is called to handle an HTTP GET request. + */ abstract class RequestGetMethod extends Method { } /** Override method of `doGet` of `Servlet` subclass. */ From 9635a36044677ba4b3849f61480a16934b99bf76 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:29:06 +0800 Subject: [PATCH 0146/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.ql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index 6e333d839930..9e210dd0e7ba 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -16,7 +16,10 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.deadcode.WebEntryPoints import DataFlow::PathGraph -/** Determine whether there is a verification method for the remote streaming source data flow path method. */ +/** + * Holds if some `Filter.doFilter` method exists in the whole program that takes some user-controlled + * input and tests it with what appears to be a token- or authentication-checking function. + */ predicate existsFilterVerificationMethod() { exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc, Method m | vmfc.hasFlow(source, sink) and From 4c21980d4f34ab44bb684ff23c8c113028b355f0 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:29:30 +0800 Subject: [PATCH 0147/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index c63473cafa86..3ba559a81c06 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -141,7 +141,7 @@ class JsonDataFlowConfig extends DataFlow2::Configuration { } } -/** Taint-tracking configuration tracing flow from user-controllable function name jsonp data to output jsonp data. */ +/** Taint-tracking configuration tracing flow from probable jsonp data with a user-controlled function name to an outgoing HTTP entity. */ class JsonpInjectionFlowConfig extends TaintTracking::Configuration { JsonpInjectionFlowConfig() { this = "JsonpInjectionFlowConfig" } From 8a7d28a2ed8f235a82b20803da94f4f6828f26e5 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 04:29:49 +0800 Subject: [PATCH 0148/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 3ba559a81c06..5e9b447f51c7 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -130,7 +130,7 @@ class RemoteFlowConfig extends DataFlow2::Configuration { } } -/** A data flow configuration tracing flow from json data to splicing jsonp data. */ +/** A data flow configuration tracing flow from json data into the argument `json` of JSONP-like string `someFunctionName + "(" + json + ")"`. */ class JsonDataFlowConfig extends DataFlow2::Configuration { JsonDataFlowConfig() { this = "JsonDataFlowConfig" } From a5ebe8c60055b44c2e522019df2eb14e0a7b03d5 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 09:26:08 +0800 Subject: [PATCH 0149/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 5e9b447f51c7..da1e17fd75c9 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -12,7 +12,7 @@ class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } override predicate isSource(DataFlow::Node src) { - exists(MethodAccess ma, BarrierGuard bg | ma = bg | + exists(MethodAccess ma | ma instanceof BarrierGuard | ( ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") or From 650446f761fc943d7a5d7c891402ea22b46b202d Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 09:26:32 +0800 Subject: [PATCH 0150/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index da1e17fd75c9..c5b0de71fad3 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -39,8 +39,8 @@ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma, BarrierGuard bg, int i, VerificationMethodToIfFlowConfig vmtifc | - ma = bg + exists(MethodAccess ma, int i, VerificationMethodToIfFlowConfig vmtifc | + ma instanceof BarrierGuard | ( ma.getMethod().getParameter(i).getName().regexpMatch("(?i).*(token|auth|referer|origin).*") From 8b756d7f1bcf090b0a890df81fe85dd712e56e05 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 09:27:03 +0800 Subject: [PATCH 0151/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjection.ql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index 9e210dd0e7ba..aa046e7cd2c6 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -28,7 +28,11 @@ predicate existsFilterVerificationMethod() { ) } -/** Determine whether there is a verification method for the remote streaming source data flow path method. */ +/** + * Holds if somewhere in the whole program some user-controlled + * input is tested with what appears to be a token- or authentication-checking function, + * and `checkNode` is reachable from any function that can reach the user-controlled input source. + */ predicate existsServletVerificationMethod(Node checkNode) { exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc | vmfc.hasFlow(source, sink) and From 046aeaa38cd5478670e711357d965a30077ef89f Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 09:37:29 +0800 Subject: [PATCH 0152/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index c5b0de71fad3..1a1d8487149e 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -98,7 +98,7 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod } /** A concatenate expression using `(` and `)` or `);`. */ -class JsonpInjectionExpr extends AddExpr { +class JsonpBuilderExpr extends AddExpr { JsonpInjectionExpr() { getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and getLeftOperand() From eeae91e62012dce68650e2a2d696adbded055218 Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 09:48:55 +0800 Subject: [PATCH 0153/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 1a1d8487149e..589a565c590f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -100,7 +100,7 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod /** A concatenate expression using `(` and `)` or `);`. */ class JsonpBuilderExpr extends AddExpr { JsonpInjectionExpr() { - getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and + getRightOperand().toString().regexpMatch("\"\\);?\"") and getLeftOperand() .(AddExpr) .getLeftOperand() From d90527bead69c90f6a2f2ce12bce0cd82dd44ebd Mon Sep 17 00:00:00 2001 From: haby0 Date: Sat, 10 Apr 2021 10:33:21 +0800 Subject: [PATCH 0154/1662] JsonpInjectionExpr updated to JsonpBuilderExpr --- .../Security/CWE/CWE-352/JsonpInjectionLib.qll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 589a565c590f..380087cdd05e 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -99,7 +99,7 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod /** A concatenate expression using `(` and `)` or `);`. */ class JsonpBuilderExpr extends AddExpr { - JsonpInjectionExpr() { + JsonpBuilderExpr() { getRightOperand().toString().regexpMatch("\"\\);?\"") and getLeftOperand() .(AddExpr) @@ -126,7 +126,7 @@ class RemoteFlowConfig extends DataFlow2::Configuration { override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { - exists(JsonpInjectionExpr jhe | jhe.getFunctionName() = sink.asExpr()) + exists(JsonpBuilderExpr jhe | jhe.getFunctionName() = sink.asExpr()) } } @@ -137,7 +137,7 @@ class JsonDataFlowConfig extends DataFlow2::Configuration { override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } override predicate isSink(DataFlow::Node sink) { - exists(JsonpInjectionExpr jhe | jhe.getJsonExpr() = sink.asExpr()) + exists(JsonpBuilderExpr jhe | jhe.getJsonExpr() = sink.asExpr()) } } @@ -146,7 +146,7 @@ class JsonpInjectionFlowConfig extends TaintTracking::Configuration { JsonpInjectionFlowConfig() { this = "JsonpInjectionFlowConfig" } override predicate isSource(DataFlow::Node src) { - exists(JsonpInjectionExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | + exists(JsonpBuilderExpr jhe, JsonDataFlowConfig jdfc, RemoteFlowConfig rfc | jhe = src.asExpr() and jdfc.hasFlowTo(DataFlow::exprNode(jhe.getJsonExpr())) and rfc.hasFlowTo(DataFlow::exprNode(jhe.getFunctionName())) From 8d11bc97ca60523f671fb2706caf27cacde65467 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 6 Apr 2021 23:49:21 +0200 Subject: [PATCH 0155/1662] [Java] Add "missing jwt signature check" qhelp. --- .../CWE/CWE-347/MissingJWTSignatureCheck.java | 34 ++++++++++++++++ .../CWE-347/MissingJWTSignatureCheck.qhelp | 39 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.qhelp diff --git a/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.java b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.java new file mode 100644 index 000000000000..1760b4d60973 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.java @@ -0,0 +1,34 @@ +public void badJwt(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parse(token); // BAD: Does not verify the signature +} + +public void badJwtHandler(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parse(plaintextJwt, new JwtHandlerAdapter>() { + @Override + public Jwt onPlaintextJwt(Jwt jwt) { + return jwt; + } + }); // BAD: The handler is called on an unverified JWT +} + +public void goodJwt(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parseClaimsJws(token) // GOOD: Verify the signature + .getBody(); +} + +public void goodJwtHandler(String token) { + Jwts.parserBuilder() + .setSigningKey("someBase64EncodedKey").build() + .parse(plaintextJwt, new JwtHandlerAdapter>() { + @Override + public Jws onPlaintextJws(Jws jws) { + return jws; + } + }); // GOOD: The handler is called on a verified JWS +} \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.qhelp b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.qhelp new file mode 100644 index 000000000000..4a5398f1ac54 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-347/MissingJWTSignatureCheck.qhelp @@ -0,0 +1,39 @@ + + + + +

    A JWT consists of three parts: header, payload, and signature. +The io.jsonwebtoken.jjwt library is one of many libraries used for working with JWTs. +It offers different methods for parsing tokens like parse, parseClaimsJws, and parsePlaintextJws. +The last two correctly verify that the JWT is properly signed. +This is done by computing the signature of the combination of header and payload and +comparing the locally computed signature with the signature part of the JWT. +

    +

    +Therefore it is necessary to provide the JwtParser with a key that is used for signature validation. +Unfortunately the parse method accepts a JWT whose signature is empty although a signing key has been set for the parser. +This means that an attacker can create arbitrary JWTs that will be accepted. +

    +
    + + +

    Always verify the signature by using either the parseClaimsJws and parsePlaintextJws methods or +by overriding the onPlaintextJws or onClaimsJws of JwtHandlerAdapter. +

    + +
    + + +

    The following example shows four cases where a signing key is set for a parser. +In the first bad case the parse method is used which will not validate the signature. +The second bad case uses a JwtHandlerAdapter where the onPlaintextJwt method is overriden so it will not validate the signature. +The third and fourth good cases use parseClaimsJws method or override the onPlaintextJws method. +

    + + + +
    + +
  • zofrex: How I Found An alg=none JWT Vulnerability in the NHS Contact Tracing App.
  • +
    +
    \ No newline at end of file From 17d1c77a144bd2dff785bdd9950f9668b3d1f7ab Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 08:14:17 +0300 Subject: [PATCH 0156/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql --- .../InsufficientControlFlowManagementAfterRefactoringTheCode.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql index 6b9639fe8b9b..fa8780d6e450 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql @@ -44,7 +44,7 @@ class UsingWhileAfterWhile extends WhileStmt { } /** - * Using arithmetic in comparison. + * Using arithmetic in a condition. */ class UsingArithmeticInComparison extends BinaryArithmeticOperation { /** From 3da88f2103406da69d287ef8880ca001e7efc084 Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 08:15:36 +0300 Subject: [PATCH 0157/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.c --- .../InsufficientControlFlowManagementAfterRefactoringTheCode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c index 3ba47068244d..1f1f10b89cc5 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.c @@ -10,7 +10,7 @@ while(flagsLoop) ... if(flagsIf) break; ... -} // GOOD: coreten cycle +} // GOOD: correct cycle ... if(intA+intB) return 1; // BAD: possibly no comparison ... From 6924c6c51c4fd8235dab112580bd5c1faa40802f Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 08:23:06 +0300 Subject: [PATCH 0158/1662] Update test.c --- .../query-tests/Security/CWE/CWE-691/semmle/tests/test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c index e2fccf587366..230b027b39b2 100644 --- a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/test.c @@ -20,6 +20,10 @@ void workFunction_1(char *s) { if(intB - intA<10) break; intA--; }while(intA>0); // BAD + for(intA=100; intA>0; intA--) + { + if(intB - intA<10) break; + }while(intA>0); // BAD while(intA>0) { if(intB - intA<10) break; From feb3a8deb10231e6e042da3d33dec445a251d3e4 Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 08:23:41 +0300 Subject: [PATCH 0159/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.expected --- ...fficientControlFlowManagementAfterRefactoringTheCode.expected | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected index cc1b5cf46d80..1eca77a526f1 100644 --- a/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected +++ b/cpp/ql/test/experimental/query-tests/Security/CWE/CWE-691/semmle/tests/InsufficientControlFlowManagementAfterRefactoringTheCode.expected @@ -1,3 +1,4 @@ | test.c:15:6:15:16 | ... + ... | this expression needs your attention | | test.c:17:17:17:27 | ... + ... | this expression needs your attention | | test.c:22:10:22:15 | ... > ... | this expression needs your attention | +| test.c:26:10:26:15 | ... > ... | this expression needs your attention | From 02d6de81a7e5e4cee907d5b67b7757e51178294e Mon Sep 17 00:00:00 2001 From: yoff Date: Mon, 12 Apr 2021 08:16:36 +0200 Subject: [PATCH 0160/1662] Apply suggestions from code review Co-authored-by: Taus --- python/ql/src/Security/CWE-327/README.md | 2 +- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/README.md b/python/ql/src/Security/CWE-327/README.md index 680ae56f4934..f80dfd0a2963 100644 --- a/python/ql/src/Security/CWE-327/README.md +++ b/python/ql/src/Security/CWE-327/README.md @@ -12,7 +12,7 @@ This should be kept up to date; the world is moving fast and protocols are being - `ssl.wrap_socket` is creating insecure connections, use `SSLContext.wrap_socket` instead. [link](https://docs.python.org/3/library/ssl.html#ssl.wrap_socket) > Deprecated since version 3.7: Since Python 3.2 and 2.7.9, it is recommended to use the `SSLContext.wrap_socket()` instead of `wrap_socket()`. The top-level function is limited and creates an insecure client socket without server name indication or hostname matching. -- Default consteructors are fine, a fluent api is used to constrain possible protocols later. +- Default constructors are fine, a fluent API is used to constrain possible protocols later. ## Current recomendation diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 82c251f3f810..dfbc989150bc 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -116,7 +116,7 @@ abstract class TlsLibrary extends string { } /** The creation of a context with an unspecific protocol version, say TLS, known to have insecure instances. */ - DataFlow::CfgNode unspecific_context_creation(ProtocolFamily family) { + ContextCreation unspecific_context_creation(ProtocolFamily family) { result = default_context_creation() or result = specific_context_creation() and From 036fddfdb53cdaf356422a9bdc277d024bd69ae1 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 12 Apr 2021 08:18:24 +0200 Subject: [PATCH 0161/1662] Python: `Namable` -> `Nameable` --- python/ql/src/Security/CWE-327/InsecureProtocol.ql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 19f6acf5512c..e31bf78443b2 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -33,19 +33,19 @@ class ProtocolConfiguration extends DataFlow::Node { // // Note that AstNode is abstract and AstNode_ is a library class, so // we have to extend @py_ast_node. -class Namable extends @py_ast_node { - Namable() { +class Nameable extends @py_ast_node { + Nameable() { exists(ProtocolConfiguration protocolConfiguration | this = protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode() ) or - exists(Namable attr | this = attr.(Attribute).getObject()) + exists(Nameable attr | this = attr.(Attribute).getObject()) } string toString() { result = "AstNode" } } -string callName(Namable call) { +string callName(Nameable call) { result = call.(Name).getId() or exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) From 1b948ac2e2e44cc95d8340755f2d51bb8d4ec1c9 Mon Sep 17 00:00:00 2001 From: haby0 Date: Mon, 12 Apr 2021 15:44:39 +0800 Subject: [PATCH 0162/1662] Combine two Configurations into one --- .../Security/CWE/CWE-352/JsonpInjection.ql | 6 +-- .../CWE/CWE-352/JsonpInjectionLib.qll | 51 ++++++++----------- 2 files changed, 23 insertions(+), 34 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index aa046e7cd2c6..a02891e8a566 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -16,7 +16,7 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.deadcode.WebEntryPoints import DataFlow::PathGraph -/** +/** * Holds if some `Filter.doFilter` method exists in the whole program that takes some user-controlled * input and tests it with what appears to be a token- or authentication-checking function. */ @@ -28,7 +28,7 @@ predicate existsFilterVerificationMethod() { ) } -/** +/** * Holds if somewhere in the whole program some user-controlled * input is tested with what appears to be a token- or authentication-checking function, * and `checkNode` is reachable from any function that can reach the user-controlled input source. @@ -69,4 +69,4 @@ where conf.hasFlowPath(source, sink) and exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) select sink.getNode(), source, sink, "Jsonp response might include code from $@.", source.getNode(), - "this user input" + "this user input" \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 380087cdd05e..f0a1a9de81c8 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -7,31 +7,11 @@ import semmle.code.java.dataflow.DataFlow3 import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController -/** A data flow configuration tracing flow from the result of a method whose name includes token/auth/referer/origin to an if-statement condition. */ -class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { - VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(MethodAccess ma | ma instanceof BarrierGuard | - ( - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - or - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - ) and - ma = src.asExpr() - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(IfStmt is | is.getCondition() = sink.asExpr()) - } -} - -/** Taint-tracking configuration tracing flow from untrusted inputs to an argument of a function whose result is used as an if-statement condition. -* -* For example, in the context `String userControlled = request.getHeader("xyz"); boolean isGood = checkToken(userControlled); if(isGood) { ...`, -* the flow from `checkToken`'s result to the condition of `if(isGood)` matches the configuration `VerificationMethodToIfFlowConfig` above, -* and so the flow from `getHeader(...)` to the argument to `checkToken` matches this configuration. +/** + * Taint-tracking configuration tracing flow from untrusted inputs to an argument of a function whose result is used as an if-statement condition. + * + * For example, in the context `String userControlled = request.getHeader("xyz"); boolean isGood = checkToken(userControlled); if(isGood) { ...`, + * the flow from `getHeader(...)` to the argument to `checkToken`, and then the flow from `checkToken`'s result to the condition of `if(isGood)`. */ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } @@ -39,16 +19,25 @@ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma, int i, VerificationMethodToIfFlowConfig vmtifc | - ma instanceof BarrierGuard - | + exists(IfStmt is, Method m | is.getEnclosingCallable() = m | ( - ma.getMethod().getParameter(i).getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + not m.getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + or + not m.getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + ) and + sink.asExpr() = is.getCondition() + ) + } + + override predicate isAdditionalTaintStep(DataFlow::Node prod, DataFlow::Node succ) { + exists(MethodAccess ma | + ( + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") or ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") ) and - ma.getArgument(i) = sink.asExpr() and - vmtifc.hasFlow(exprNode(ma), _) + ma.getAnArgument() = prod.asExpr() and + ma = succ.asExpr() ) } } From 9f91dde76fb55ecea5b6fdbb81d3e837f7dfa4e7 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 12 Apr 2021 09:58:06 +0200 Subject: [PATCH 0163/1662] Python: Update test expectation after comment --- .../CWE-327/InsecureProtocol.expected | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected index 57b19cef0b17..359a8d28ba1a 100644 --- a/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected +++ b/python/ql/test/query-tests/Security/CWE-327/InsecureProtocol.expected @@ -22,18 +22,18 @@ | ssl_fluent.py:19:14:19:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:15:15:15:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:28:14:28:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:24:15:24:53 | ControlFlowNode for Attribute() | call to ssl.SSLContext | | ssl_fluent.py:37:14:37:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:33:15:33:53 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:55:14:55:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:52:15:52:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:99:15:99:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:99:15:99:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:115:5:115:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:69:14:69:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:133:5:133:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:75:14:75:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:60:12:60:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | -| ssl_fluent.py:95:14:95:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:93:5:93:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:144:14:144:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:141:5:141:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:160:5:160:11 | ControlFlowNode for context | context modification | -| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:159:15:159:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | -| ssl_fluent.py:163:14:163:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:159:15:159:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:57:14:57:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:54:15:54:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:57:14:57:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:54:15:54:49 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:62:12:62:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:101:15:101:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:62:12:62:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:101:15:101:46 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:117:5:117:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:71:14:71:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:135:5:135:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:77:14:77:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:62:12:62:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:77:14:77:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:62:12:62:43 | ControlFlowNode for Attribute() | call to ssl.SSLContext | +| ssl_fluent.py:97:14:97:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:95:5:95:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:146:14:146:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:143:5:143:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:165:14:165:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version SSLv3 allowed by $@ | ssl_fluent.py:162:5:162:11 | ControlFlowNode for context | context modification | +| ssl_fluent.py:165:14:165:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1 allowed by $@ | ssl_fluent.py:161:15:161:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | +| ssl_fluent.py:165:14:165:20 | ControlFlowNode for context | Insecure SSL/TLS protocol version TLSv1_1 allowed by $@ | ssl_fluent.py:161:15:161:65 | ControlFlowNode for Attribute() | call to ssl.create_default_context | From 3ff8e010b292598e7422f294907d950e9bfb6ad2 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 12 Apr 2021 10:00:07 +0200 Subject: [PATCH 0164/1662] Python: Refactor based on review - more natural handling of default arguments - do not assume default construction gives a family - simplifies `UnspecificSSLContextCreation` --- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 8 ++++-- python/ql/src/Security/CWE-327/Ssl.qll | 25 ++++++++++--------- .../src/Security/CWE-327/TlsLibraryModel.qll | 22 ++++++++-------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index d2cfb74b3ab9..55b77386f2f8 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -9,8 +9,12 @@ class PyOpenSSLContextCreation extends ContextCreation { this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Context").getACall() } - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("method")] + override string getProtocol() { + exists(ControlFlowNode protocolArg, PyOpenSSL pyo | + protocolArg in [node.getArg(0), node.getArgByName("method")] + | + protocolArg = [pyo.specific_version(result), pyo.unspecific_version(result)].asCfgNode() + ) } } diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 2ca7dcce1f90..cb19fb8f11ff 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -7,8 +7,15 @@ class SSLContextCreation extends ContextCreation { SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } - override DataFlow::CfgNode getProtocol() { - result.getNode() in [node.getArg(0), node.getArgByName("protocol")] + override string getProtocol() { + exists(ControlFlowNode protocolArg, Ssl ssl | + protocolArg in [node.getArg(0), node.getArgByName("protocol")] + | + protocolArg = [ssl.specific_version(result), ssl.unspecific_version(result)].asCfgNode() + ) + or + not exists(node.getAnArg()) and + result = "TLS" } } @@ -19,7 +26,7 @@ class SSLDefaultContextCreation extends ContextCreation { // Allowed insecure versions are "TLSv1" and "TLSv1_1" // see https://docs.python.org/3/library/ssl.html#context-creation - override DataFlow::CfgNode getProtocol() { none() } + override string getProtocol() { result = "TLS" } } /** Gets a reference to an `ssl.Context` instance. */ @@ -141,17 +148,10 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext UnspecificSSLContextCreation() { library = "ssl" } override ProtocolVersion getUnrestriction() { - // Case: A protocol argument is present. result = UnspecificContextCreation.super.getUnrestriction() and // These are turned off by default // see https://docs.python.org/3/library/ssl.html#ssl-contexts not result in ["SSLv2", "SSLv3"] - or - // Case: No protocol arguemnt is present. - not exists(this.getProtocol()) and - // The default argument is TLS and the SSL versions are turned off by default since Python 3.6 - // see https://docs.python.org/3.6/library/ssl.html#ssl.SSLContext - result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } } @@ -185,8 +185,9 @@ class Ssl extends TlsLibrary { override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { result = API::moduleImport("ssl").getMember("wrap_socket").getACall() and - insecure_version(version).asCfgNode() = - result.asCfgNode().(CallNode).getArgByName("ssl_version") + specific_version(version).asCfgNode() = + result.asCfgNode().(CallNode).getArgByName("ssl_version") and + version.isInsecure() } override ConnectionCreation connection_creation() { result instanceof WrapSocketCall } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index dfbc989150bc..685485004b25 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -30,8 +30,8 @@ class ProtocolFamily extends string { /** The creation of a context. */ abstract class ContextCreation extends DataFlow::CfgNode { - /** Gets the requested protocol if any. */ - abstract DataFlow::CfgNode getProtocol(); + /** Gets the protocol version or family for this context. */ + abstract string getProtocol(); } /** The creation of a connection from a context. */ @@ -66,7 +66,7 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest TlsLibrary library; ProtocolFamily family; - UnspecificContextCreation() { this.getProtocol() = library.unspecific_version(family) } + UnspecificContextCreation() { this.getProtocol() = family } override DataFlow::CfgNode getContext() { result = this } @@ -92,9 +92,8 @@ abstract class TlsLibrary extends string { /** The module or class holding the version constants. */ abstract API::Node version_constants(); - /** A dataflow node representing a specific protocol version, known to be insecure. */ - DataFlow::Node insecure_version(ProtocolVersion version) { - version.isInsecure() and + /** A dataflow node representing a specific protocol version. */ + DataFlow::Node specific_version(ProtocolVersion version) { result = version_constants().getMember(specific_version_name(version)).getAUse() } @@ -111,16 +110,15 @@ abstract class TlsLibrary extends string { /** The creation of a context with a specific protocol version, known to be insecure. */ ContextCreation insecure_context_creation(ProtocolVersion version) { - result = specific_context_creation() and - result.getProtocol() = insecure_version(version) + result in [specific_context_creation(), default_context_creation()] and + result.getProtocol() = version and + version.isInsecure() } /** The creation of a context with an unspecific protocol version, say TLS, known to have insecure instances. */ ContextCreation unspecific_context_creation(ProtocolFamily family) { - result = default_context_creation() - or - result = specific_context_creation() and - result.(ContextCreation).getProtocol() = unspecific_version(family) + result in [specific_context_creation(), default_context_creation()] and + result.getProtocol() = family } /** A connection is created in an insecure manner, not from a context. */ From b4d35b52c386072c1eb8561cf4e68cc87d292b87 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 2 Mar 2021 13:22:21 +0100 Subject: [PATCH 0165/1662] C#: Add Console.Read* to local flow sources --- .../csharp/security/dataflow/flowsources/Local.qll | 14 ++++++++++++++ .../CWE-134/ConsoleUncontrolledFormatString.cs | 13 +++++++++++++ .../CWE-134/UncontrolledFormatString.expected | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 csharp/ql/test/query-tests/Security Features/CWE-134/ConsoleUncontrolledFormatString.cs diff --git a/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Local.qll b/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Local.qll index e867c9be3ddc..b1b0bf8df850 100644 --- a/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Local.qll +++ b/csharp/ql/src/semmle/code/csharp/security/dataflow/flowsources/Local.qll @@ -20,3 +20,17 @@ class TextFieldSource extends LocalUserInputSource { override string getSourceType() { result = "TextBox text" } } + +/** A call to any `System.Console.Read*` method. */ +class SystemConsoleReadSource extends LocalUserInputSource { + SystemConsoleReadSource() { + this.asExpr() = + any(MethodCall call | + call.getTarget().hasQualifiedName("System.Console", "ReadLine") or + call.getTarget().hasQualifiedName("System.Console", "Read") or + call.getTarget().hasQualifiedName("System.Console", "ReadKey") + ) + } + + override string getSourceType() { result = "TextBox text" } +} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-134/ConsoleUncontrolledFormatString.cs b/csharp/ql/test/query-tests/Security Features/CWE-134/ConsoleUncontrolledFormatString.cs new file mode 100644 index 000000000000..c9d4440cf787 --- /dev/null +++ b/csharp/ql/test/query-tests/Security Features/CWE-134/ConsoleUncontrolledFormatString.cs @@ -0,0 +1,13 @@ +using System; +using System; + +public class Program +{ + public static void Main() + { + var format = Console.ReadLine(); + + // BAD: Uncontrolled format string. + var x = string.Format(format, 1, 2); + } +} diff --git a/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.expected b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.expected index bc87c96b194b..4923cd34e70d 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.expected +++ b/csharp/ql/test/query-tests/Security Features/CWE-134/UncontrolledFormatString.expected @@ -1,8 +1,11 @@ edges +| ConsoleUncontrolledFormatString.cs:8:22:8:39 | call to method ReadLine : String | ConsoleUncontrolledFormatString.cs:11:31:11:36 | access to local variable format | | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString : NameValueCollection | UncontrolledFormatString.cs:14:23:14:26 | access to local variable path | | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString : NameValueCollection | UncontrolledFormatString.cs:17:46:17:49 | access to local variable path | | UncontrolledFormatStringBad.cs:9:25:9:47 | access to property QueryString : NameValueCollection | UncontrolledFormatStringBad.cs:12:39:12:44 | access to local variable format | nodes +| ConsoleUncontrolledFormatString.cs:8:22:8:39 | call to method ReadLine : String | semmle.label | call to method ReadLine : String | +| ConsoleUncontrolledFormatString.cs:11:31:11:36 | access to local variable format | semmle.label | access to local variable format | | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | | UncontrolledFormatString.cs:14:23:14:26 | access to local variable path | semmle.label | access to local variable path | | UncontrolledFormatString.cs:17:46:17:49 | access to local variable path | semmle.label | access to local variable path | @@ -10,6 +13,7 @@ nodes | UncontrolledFormatStringBad.cs:9:25:9:47 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection | | UncontrolledFormatStringBad.cs:12:39:12:44 | access to local variable format | semmle.label | access to local variable format | #select +| ConsoleUncontrolledFormatString.cs:11:31:11:36 | access to local variable format | ConsoleUncontrolledFormatString.cs:8:22:8:39 | call to method ReadLine : String | ConsoleUncontrolledFormatString.cs:11:31:11:36 | access to local variable format | $@ flows to here and is used as a format string. | ConsoleUncontrolledFormatString.cs:8:22:8:39 | call to method ReadLine | call to method ReadLine | | UncontrolledFormatString.cs:14:23:14:26 | access to local variable path | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString : NameValueCollection | UncontrolledFormatString.cs:14:23:14:26 | access to local variable path | $@ flows to here and is used as a format string. | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString | access to property QueryString | | UncontrolledFormatString.cs:17:46:17:49 | access to local variable path | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString : NameValueCollection | UncontrolledFormatString.cs:17:46:17:49 | access to local variable path | $@ flows to here and is used as a format string. | UncontrolledFormatString.cs:11:23:11:45 | access to property QueryString | access to property QueryString | | UncontrolledFormatString.cs:34:23:34:31 | access to property Text | UncontrolledFormatString.cs:34:23:34:31 | access to property Text | UncontrolledFormatString.cs:34:23:34:31 | access to property Text | $@ flows to here and is used as a format string. | UncontrolledFormatString.cs:34:23:34:31 | access to property Text | access to property Text | From 24de826133e685ad1bede8549661cdb4e11eef0f Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Mon, 12 Apr 2021 13:23:12 +0100 Subject: [PATCH 0166/1662] JS: Add file diagnostics errors --- .../ql/src/Diagnostics/ExtractionErrors.ql | 18 ++++++++++++++++++ .../Diagnostics/SuccessfullyExtractedFiles.ql | 14 ++++++++++++++ javascript/ql/src/semmle/javascript/Errors.qll | 5 +++++ javascript/ql/src/semmle/javascript/Regexp.qll | 2 ++ 4 files changed, 39 insertions(+) create mode 100644 javascript/ql/src/Diagnostics/ExtractionErrors.ql create mode 100644 javascript/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql diff --git a/javascript/ql/src/Diagnostics/ExtractionErrors.ql b/javascript/ql/src/Diagnostics/ExtractionErrors.ql new file mode 100644 index 000000000000..d68fe6a24238 --- /dev/null +++ b/javascript/ql/src/Diagnostics/ExtractionErrors.ql @@ -0,0 +1,18 @@ +/** + * @name Extraction errors + * @description List all extraction errors for files in the source code directory. + * @kind diagnostic + * @id js/diagnostics/extraction-errors + */ + +import javascript + +/** Gets the SARIF severity to associate an error. */ +int getSeverity() { result = 2 } + +from Error error +where + exists(error.getFile().getRelativePath()) and + error.isFatal() +select error, "Extraction failed in " + error.getFile() + " with error " + error.getMessage(), + getSeverity() diff --git a/javascript/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql b/javascript/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql new file mode 100644 index 000000000000..78fb74799e21 --- /dev/null +++ b/javascript/ql/src/Diagnostics/SuccessfullyExtractedFiles.ql @@ -0,0 +1,14 @@ +/** + * @name Successfully extracted files + * @description Lists all files in the source code directory that were extracted without encountering an error in the file. + * @kind diagnostic + * @id js/diagnostics/successfully-extracted-files + */ + +import javascript + +from File f +where + not exists(Error e | e.isFatal() and e.getFile() = f) and + exists(f.getRelativePath()) +select f, "" diff --git a/javascript/ql/src/semmle/javascript/Errors.qll b/javascript/ql/src/semmle/javascript/Errors.qll index f4836e53c06a..271a8f9b186e 100644 --- a/javascript/ql/src/semmle/javascript/Errors.qll +++ b/javascript/ql/src/semmle/javascript/Errors.qll @@ -10,6 +10,9 @@ abstract class Error extends Locatable { abstract string getMessage(); override string toString() { result = getMessage() } + + /** Holds if this error prevented the file from being extracted. */ + predicate isFatal() { any() } } /** A JavaScript parse error encountered during extraction. */ @@ -21,4 +24,6 @@ class JSParseError extends @js_parse_error, Error { /** Gets the source text of the line this error occurs on. */ string getLine() { js_parse_errors(this, _, _, result) } + + override predicate isFatal() { not getTopLevel() instanceof Angular2::TemplateTopLevel } } diff --git a/javascript/ql/src/semmle/javascript/Regexp.qll b/javascript/ql/src/semmle/javascript/Regexp.qll index 842cf0705c72..c2e1c787303c 100644 --- a/javascript/ql/src/semmle/javascript/Regexp.qll +++ b/javascript/ql/src/semmle/javascript/Regexp.qll @@ -827,6 +827,8 @@ class RegExpParseError extends Error, @regexp_parse_error { override string getMessage() { regexp_parse_errors(this, _, result) } override string toString() { result = getMessage() } + + override predicate isFatal() { none() } } /** From d7c14775bf607f92ca473d34c79bbc540b8defbc Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 16:56:48 +0300 Subject: [PATCH 0167/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp --- ...sufficientControlFlowManagementAfterRefactoringTheCode.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp index 2c485dfd0cf4..4167ce57d65e 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.qhelp @@ -3,7 +3,7 @@ "qhelp.dtd"> -

    In some situations, after code refactoring, parts of the old constructs may remain. They are correctly accepted by the compiler, but can critically affect program execution. For example, if you switch from `do {...} while ();` to `while () {...}` with errors, you run the risk of running out of resources. These code snippets look suspicious and require the developer's attention.

    +

    In some situations, after code refactoring, parts of the old constructs may remain. They are correctly accepted by the compiler, but can critically affect program execution. For example, if you switch from `do {...} while ();` to `while () {...}` forgetting to remove the old construct completely, you get `while(){...}while();` which may be vulnerable. These code snippets look suspicious and require the developer's attention.

    From 58d5ad48d56fb7556b4aae4dd8e9a97946532bf8 Mon Sep 17 00:00:00 2001 From: ihsinme Date: Mon, 12 Apr 2021 17:00:34 +0300 Subject: [PATCH 0168/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql --- ...nsufficientControlFlowManagementAfterRefactoringTheCode.ql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql index fa8780d6e450..dc5b2225a623 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql @@ -105,7 +105,7 @@ class UsingArithmeticInComparison extends BinaryArithmeticOperation { } } -from Expr exp, WhileStmt wst +from Expr exp where exp instanceof UsingArithmeticInComparison and not exp.(UsingArithmeticInComparison).workingWithValue() and @@ -114,5 +114,5 @@ where not exp.(UsingArithmeticInComparison).compareWithZero() and exp.(UsingArithmeticInComparison).compareWithOutZero() or - wst instanceof UsingWhileAfterWhile and exp = wst.getCondition() + exists(WhileStmt wst | wst instanceof UsingWhileAfterWhile and exp = wst.getCondition()) select exp, "this expression needs your attention" From d2fad180f88aaad1bcb3a27055653a6f67838458 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Mon, 12 Apr 2021 15:07:45 +0100 Subject: [PATCH 0169/1662] JS: Add test --- .../ql/test/query-tests/Diagnostics/ExtractionErrors.expected | 4 ++++ .../ql/test/query-tests/Diagnostics/ExtractionErrors.qlref | 1 + .../Diagnostics/SuccessfullyExtractedFiles.expected | 4 ++++ .../query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref | 1 + javascript/ql/test/query-tests/Diagnostics/bad1.js | 1 + javascript/ql/test/query-tests/Diagnostics/bad2.ts | 1 + javascript/ql/test/query-tests/Diagnostics/bad3.html | 3 +++ .../ql/test/query-tests/Diagnostics/contains-template.js | 4 ++++ javascript/ql/test/query-tests/Diagnostics/good1.js | 1 + javascript/ql/test/query-tests/Diagnostics/good2.ts | 1 + javascript/ql/test/query-tests/Diagnostics/good3.html | 3 +++ javascript/ql/test/query-tests/Diagnostics/options | 1 + 12 files changed, 25 insertions(+) create mode 100644 javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.expected create mode 100644 javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.qlref create mode 100644 javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected create mode 100644 javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref create mode 100644 javascript/ql/test/query-tests/Diagnostics/bad1.js create mode 100644 javascript/ql/test/query-tests/Diagnostics/bad2.ts create mode 100644 javascript/ql/test/query-tests/Diagnostics/bad3.html create mode 100644 javascript/ql/test/query-tests/Diagnostics/contains-template.js create mode 100644 javascript/ql/test/query-tests/Diagnostics/good1.js create mode 100644 javascript/ql/test/query-tests/Diagnostics/good2.ts create mode 100644 javascript/ql/test/query-tests/Diagnostics/good3.html create mode 100644 javascript/ql/test/query-tests/Diagnostics/options diff --git a/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.expected b/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.expected new file mode 100644 index 000000000000..b9f23c1be79f --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.expected @@ -0,0 +1,4 @@ +| bad1.js:1:7:1:7 | Error: Unexpected token | Extraction failed in bad1.js with error Error: Unexpected token | 2 | +| bad2.ts:1:11:1:11 | Error: Expression expected. | Extraction failed in bad2.ts with error Error: Expression expected. | 2 | +| bad2.ts:1:13:1:13 | Error: Expression expected. | Extraction failed in bad2.ts with error Error: Expression expected. | 2 | +| bad3.html:2:11:2:11 | Error: Unexpected token | Extraction failed in bad3.html with error Error: Unexpected token | 2 | diff --git a/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.qlref b/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.qlref new file mode 100644 index 000000000000..5e501b2469d2 --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/ExtractionErrors.qlref @@ -0,0 +1 @@ +Diagnostics/ExtractionErrors.ql \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected b/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected new file mode 100644 index 000000000000..493e7abac8bf --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.expected @@ -0,0 +1,4 @@ +| contains-template.js:0:0:0:0 | contains-template.js | | +| good1.js:0:0:0:0 | good1.js | | +| good2.ts:0:0:0:0 | good2.ts | | +| good3.html:0:0:0:0 | good3.html | | diff --git a/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref b/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref new file mode 100644 index 000000000000..c797180b20f1 --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/SuccessfullyExtractedFiles.qlref @@ -0,0 +1 @@ +Diagnostics/SuccessfullyExtractedFiles.ql \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Diagnostics/bad1.js b/javascript/ql/test/query-tests/Diagnostics/bad1.js new file mode 100644 index 000000000000..e0fad94a6c13 --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/bad1.js @@ -0,0 +1 @@ +let x x x; diff --git a/javascript/ql/test/query-tests/Diagnostics/bad2.ts b/javascript/ql/test/query-tests/Diagnostics/bad2.ts new file mode 100644 index 000000000000..bc65d7f91b2c --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/bad2.ts @@ -0,0 +1 @@ +const z = ??; diff --git a/javascript/ql/test/query-tests/Diagnostics/bad3.html b/javascript/ql/test/query-tests/Diagnostics/bad3.html new file mode 100644 index 000000000000..7ed5ed66f723 --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/bad3.html @@ -0,0 +1,3 @@ + diff --git a/javascript/ql/test/query-tests/Diagnostics/contains-template.js b/javascript/ql/test/query-tests/Diagnostics/contains-template.js new file mode 100644 index 000000000000..6ab50e09c78c --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/contains-template.js @@ -0,0 +1,4 @@ +const obj = { + // Template where we can't parse `x x x` but surrounding file still OK + template: '' +}; diff --git a/javascript/ql/test/query-tests/Diagnostics/good1.js b/javascript/ql/test/query-tests/Diagnostics/good1.js new file mode 100644 index 000000000000..7e41af70a466 --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/good1.js @@ -0,0 +1 @@ +let x = 123; diff --git a/javascript/ql/test/query-tests/Diagnostics/good2.ts b/javascript/ql/test/query-tests/Diagnostics/good2.ts new file mode 100644 index 000000000000..40bb197bf72d --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/good2.ts @@ -0,0 +1 @@ +const y: string = "dfg"; diff --git a/javascript/ql/test/query-tests/Diagnostics/good3.html b/javascript/ql/test/query-tests/Diagnostics/good3.html new file mode 100644 index 000000000000..1b3c248897bd --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/good3.html @@ -0,0 +1,3 @@ + diff --git a/javascript/ql/test/query-tests/Diagnostics/options b/javascript/ql/test/query-tests/Diagnostics/options new file mode 100644 index 000000000000..096355709a6f --- /dev/null +++ b/javascript/ql/test/query-tests/Diagnostics/options @@ -0,0 +1 @@ +semmle-extractor-options: --tolerate-parse-errors --experimental From b96b6652626cbeb232748ac782130b884335725d Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Mon, 12 Apr 2021 21:40:49 +0300 Subject: [PATCH 0170/1662] Renaming in java/ql/src/experimental/Security/CWE/CWE-094 --- .../CWE/CWE-094/{InjectionLib.qll => FlowUtils.qll} | 2 +- .../Security/CWE/CWE-094/JakartaExpressionInjection.qhelp | 6 +++--- .../Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll | 4 ++-- .../experimental/Security/CWE/CWE-094/JexlInjectionLib.qll | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename java/ql/src/experimental/Security/CWE/CWE-094/{InjectionLib.qll => FlowUtils.qll} (81%) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/FlowUtils.qll similarity index 81% rename from java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll rename to java/ql/src/experimental/Security/CWE/CWE-094/FlowUtils.qll index adab79d6f5c3..5371c51aa8f0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/InjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/FlowUtils.qll @@ -5,7 +5,7 @@ import semmle.code.java.dataflow.FlowSources * Holds if `fromNode` to `toNode` is a dataflow step that returns data from * a bean by calling one of its getters. */ -predicate returnsDataFromBean(DataFlow::Node fromNode, DataFlow::Node toNode) { +predicate hasGetterFlow(DataFlow::Node fromNode, DataFlow::Node toNode) { exists(MethodAccess ma, Method m | ma.getMethod() = m | m instanceof GetterMethod and ma.getQualifier() = fromNode.asExpr() and diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp index a6d66c1d1d16..a8d3cd0fe70e 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjection.qhelp @@ -29,14 +29,14 @@ with sandboxing capabilities such as Apache Commons JEXL or the Spring Expressio The following example shows how untrusted data is used to build and run an expression using the JUEL interpreter:

    - +

    -JUEL does not support to run expressions in a sandbox. To prevent running arbitrary code, +JUEL does not support running expressions in a sandbox. To prevent running arbitrary code, incoming data has to be checked before including it in an expression. The next example uses a Regex pattern to check whether a user tries to run an allowed expression or not:

    - +
    diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll index b1c5d1e8ae20..430909743647 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JakartaExpressionInjectionLib.qll @@ -1,5 +1,5 @@ import java -import InjectionLib +import FlowUtils import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking @@ -16,7 +16,7 @@ class JakartaExpressionInjectionConfig extends TaintTracking::Configuration { override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { any(TaintPropagatingCall c).taintFlow(fromNode, toNode) or - returnsDataFromBean(fromNode, toNode) + hasGetterFlow(fromNode, toNode) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll index 51084a9862ce..89d7cb496a41 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JexlInjectionLib.qll @@ -1,5 +1,5 @@ import java -import InjectionLib +import FlowUtils import semmle.code.java.dataflow.FlowSources import semmle.code.java.dataflow.TaintTracking @@ -17,7 +17,7 @@ class JexlInjectionConfig extends TaintTracking::Configuration { override predicate isAdditionalTaintStep(DataFlow::Node fromNode, DataFlow::Node toNode) { any(TaintPropagatingJexlMethodCall c).taintFlow(fromNode, toNode) or - returnsDataFromBean(fromNode, toNode) + hasGetterFlow(fromNode, toNode) } } From e4d74cf0986c59a3cec6f09687e81da7c4f7f0ed Mon Sep 17 00:00:00 2001 From: yoff Date: Mon, 12 Apr 2021 23:47:54 +0200 Subject: [PATCH 0171/1662] Apply suggestions from code review Co-authored-by: Rasmus Wriedt Larsen --- .../src/Security/CWE-327/FluentApiModel.qll | 7 ++----- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 10 +++++++--- python/ql/src/Security/CWE-327/Ssl.qll | 18 ++++++++++------- .../src/Security/CWE-327/TlsLibraryModel.qll | 20 ++++++++++--------- 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index b5d6823c44c2..6010417b68d6 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -1,4 +1,4 @@ -import python +private import python import TlsLibraryModel /** @@ -89,9 +89,6 @@ predicate unsafe_connection_creation_with_context( /** * Holds if `conectionCreation` marks the creation of a connetion witout reference to a context * and allowing `insecure_version`. - * - * `specific` is true iff the context is configured for a specific protocol version rather - * than for a family of protocols. */ predicate unsafe_connection_creation_without_context( DataFlow::CallCfgNode connectionCreation, string insecure_version @@ -99,7 +96,7 @@ predicate unsafe_connection_creation_without_context( exists(TlsLibrary l | connectionCreation = l.insecure_connection_creation(insecure_version)) } -/** Holds if `contextCreation` is creating a context ties to a specific insecure version. */ +/** Holds if `contextCreation` is creating a context tied to a specific insecure version. */ predicate unsafe_context_creation(DataFlow::CallCfgNode contextCreation, string insecure_version) { exists(TlsLibrary l | contextCreation = l.insecure_context_creation(insecure_version)) } diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index 55b77386f2f8..3cd9b064e24c 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -1,5 +1,9 @@ -import python -import semmle.python.ApiGraphs +/** + * Provides modeling of SSL/TLS functionality of the `OpenSSL` module from the `pyOpenSSL` PyPI package. + * See https://www.pyopenssl.org/en/stable/ + */ +private import python +private import semmle.python.ApiGraphs import TlsLibraryModel class PyOpenSSLContextCreation extends ContextCreation { @@ -49,7 +53,7 @@ class SetOptionsCall extends ProtocolRestriction { } class UnspecificPyOpenSSLContextCreation extends PyOpenSSLContextCreation, UnspecificContextCreation { - UnspecificPyOpenSSLContextCreation() { library = "pyOpenSSL" } + UnspecificPyOpenSSLContextCreation() { library instanceof PyOpenSSL } } class PyOpenSSL extends TlsLibrary { diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index cb19fb8f11ff..b44ae1814151 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -1,5 +1,9 @@ -import python -import semmle.python.ApiGraphs +/** + * Provides modeling of SSL/TLS functionality of the `ssl` module from the standard library. + * See https://docs.python.org/3.9/library/ssl.html + */ +private import python +private import semmle.python.ApiGraphs import TlsLibraryModel class SSLContextCreation extends ContextCreation { @@ -145,12 +149,12 @@ class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction { } class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContextCreation { - UnspecificSSLContextCreation() { library = "ssl" } + UnspecificSSLContextCreation() { library instanceof Ssl } override ProtocolVersion getUnrestriction() { result = UnspecificContextCreation.super.getUnrestriction() and - // These are turned off by default - // see https://docs.python.org/3/library/ssl.html#ssl-contexts + // These are turned off by default since Python 3.6 + // see https://docs.python.org/3.6/library/ssl.html#ssl.SSLContext not result in ["SSLv2", "SSLv3"] } } @@ -185,8 +189,8 @@ class Ssl extends TlsLibrary { override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { result = API::moduleImport("ssl").getMember("wrap_socket").getACall() and - specific_version(version).asCfgNode() = - result.asCfgNode().(CallNode).getArgByName("ssl_version") and + this.specific_version(version) = + result.(DataFlow::CallCfgNode).getArgByName("ssl_version") and version.isInsecure() } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index 685485004b25..c49113f8f68d 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -1,15 +1,15 @@ -import python -import semmle.python.ApiGraphs +private import python +private import semmle.python.ApiGraphs import Ssl import PyOpenSSL /** - * A specific protocol version. - * We use this to identify a protocol. + * A specific protocol version of SSL or TLS. */ class ProtocolVersion extends string { ProtocolVersion() { this in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"] } + /** Gets a `ProtocolVersion` that is less than this `ProtocolVersion`, if any. */ predicate lessThan(ProtocolVersion version) { this = "SSLv2" and version = "SSLv3" or @@ -20,6 +20,7 @@ class ProtocolVersion extends string { this = ["TLSv1", "TLSv1_1", "TLSv1_2"] and version = "TLSv1_3" } + /** Holds if this protocol version is known to be insecure. */ predicate isInsecure() { this in ["SSLv2", "SSLv3", "TLSv1", "TLSv1_1"] } } @@ -81,12 +82,13 @@ abstract class UnspecificContextCreation extends ContextCreation, ProtocolUnrest /** A model of a SSL/TLS library. */ abstract class TlsLibrary extends string { - TlsLibrary() { this in ["ssl", "pyOpenSSL"] } + bindingset[this] + TlsLibrary() { any() } /** The name of a specific protocol version. */ abstract string specific_version_name(ProtocolVersion version); - /** The name of an unspecific protocol version, say TLS, known to have insecure instances. */ + /** Gets a name, which is a member of `version_constants`, that can be used to specify the protocol family `family`. */ abstract string unspecific_version_name(ProtocolFamily family); /** The module or class holding the version constants. */ @@ -97,12 +99,12 @@ abstract class TlsLibrary extends string { result = version_constants().getMember(specific_version_name(version)).getAUse() } - /** A dataflow node representing an unspecific protocol version, say TLS, known to have insecure instances. */ + /** Gets a dataflow node representing the protocol family `family`. */ DataFlow::Node unspecific_version(ProtocolFamily family) { result = version_constants().getMember(unspecific_version_name(family)).getAUse() } - /** The creation of a context with a deafult protocol. */ + /** The creation of a context with a default protocol. */ abstract ContextCreation default_context_creation(); /** The creation of a context with a specific protocol. */ @@ -115,7 +117,7 @@ abstract class TlsLibrary extends string { version.isInsecure() } - /** The creation of a context with an unspecific protocol version, say TLS, known to have insecure instances. */ + /** Gets a context that was created using `family`, known to have insecure instances. */ ContextCreation unspecific_context_creation(ProtocolFamily family) { result in [specific_context_creation(), default_context_creation()] and result.getProtocol() = family From b6bd782746b59aedde860320c6700320de1b395e Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 12 Apr 2021 23:55:59 +0200 Subject: [PATCH 0172/1662] Python: Modernize via `CallCfgNode` --- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 13 ++++--------- python/ql/src/Security/CWE-327/Ssl.qll | 14 ++++++-------- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 14 +++++++------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index 3cd9b064e24c..9f42b83572ed 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -2,13 +2,12 @@ * Provides modeling of SSL/TLS functionality of the `OpenSSL` module from the `pyOpenSSL` PyPI package. * See https://www.pyopenssl.org/en/stable/ */ + private import python private import semmle.python.ApiGraphs import TlsLibraryModel -class PyOpenSSLContextCreation extends ContextCreation { - override CallNode node; - +class PyOpenSSLContextCreation extends ContextCreation, DataFlow::CallCfgNode { PyOpenSSLContextCreation() { this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Context").getACall() } @@ -22,9 +21,7 @@ class PyOpenSSLContextCreation extends ContextCreation { } } -class ConnectionCall extends ConnectionCreation { - override CallNode node; - +class ConnectionCall extends ConnectionCreation, DataFlow::CallCfgNode { ConnectionCall() { this = API::moduleImport("OpenSSL").getMember("SSL").getMember("Connection").getACall() } @@ -36,9 +33,7 @@ class ConnectionCall extends ConnectionCreation { // This cannot be used to unrestrict, // see https://www.pyopenssl.org/en/stable/api/ssl.html#OpenSSL.SSL.Context.set_options -class SetOptionsCall extends ProtocolRestriction { - override CallNode node; - +class SetOptionsCall extends ProtocolRestriction, DataFlow::CallCfgNode { SetOptionsCall() { node.getFunction().(AttrNode).getName() = "set_options" } override DataFlow::CfgNode getContext() { diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index b44ae1814151..99bb24b7076e 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -2,13 +2,12 @@ * Provides modeling of SSL/TLS functionality of the `ssl` module from the standard library. * See https://docs.python.org/3.9/library/ssl.html */ + private import python private import semmle.python.ApiGraphs import TlsLibraryModel -class SSLContextCreation extends ContextCreation { - override CallNode node; - +class SSLContextCreation extends ContextCreation, DataFlow::CallCfgNode { SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } override string getProtocol() { @@ -46,7 +45,7 @@ class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { } } -class OptionsAugOr extends ProtocolRestriction { +class OptionsAugOr extends ProtocolRestriction, DataFlow::CallCfgNode { ProtocolVersion restriction; OptionsAugOr() { @@ -69,7 +68,7 @@ class OptionsAugOr extends ProtocolRestriction { override ProtocolVersion getRestriction() { result = restriction } } -class OptionsAugAndNot extends ProtocolUnrestriction { +class OptionsAugAndNot extends ProtocolUnrestriction, DataFlow::CallCfgNode { ProtocolVersion restriction; OptionsAugAndNot() { @@ -127,7 +126,7 @@ predicate impliesBitSet(BinaryExpr whole, Expr part, boolean partHasBitSet, bool ) } -class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction { +class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction, DataFlow::CallCfgNode { ProtocolVersion restriction; ContextSetVersion() { @@ -189,8 +188,7 @@ class Ssl extends TlsLibrary { override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { result = API::moduleImport("ssl").getMember("wrap_socket").getACall() and - this.specific_version(version) = - result.(DataFlow::CallCfgNode).getArgByName("ssl_version") and + this.specific_version(version) = result.(DataFlow::CallCfgNode).getArgByName("ssl_version") and version.isInsecure() } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index c49113f8f68d..cd38ad4ab5ec 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -30,30 +30,30 @@ class ProtocolFamily extends string { } /** The creation of a context. */ -abstract class ContextCreation extends DataFlow::CfgNode { +abstract class ContextCreation extends DataFlow::Node { /** Gets the protocol version or family for this context. */ abstract string getProtocol(); } /** The creation of a connection from a context. */ -abstract class ConnectionCreation extends DataFlow::CfgNode { +abstract class ConnectionCreation extends DataFlow::Node { /** Gets the context used to create the connection. */ - abstract DataFlow::CfgNode getContext(); + abstract DataFlow::Node getContext(); } /** A context is being restricted on which protocols it can accepts. */ -abstract class ProtocolRestriction extends DataFlow::CfgNode { +abstract class ProtocolRestriction extends DataFlow::Node { /** Gets the context being restricted. */ - abstract DataFlow::CfgNode getContext(); + abstract DataFlow::Node getContext(); /** Gets the protocol version being disallowed. */ abstract ProtocolVersion getRestriction(); } /** A context is being relaxed on which protocols it can accepts. */ -abstract class ProtocolUnrestriction extends DataFlow::CfgNode { +abstract class ProtocolUnrestriction extends DataFlow::Node { /** Gets the context being relaxed. */ - abstract DataFlow::CfgNode getContext(); + abstract DataFlow::Node getContext(); /** Gets the protocol version being allowed. */ abstract ProtocolVersion getUnrestriction(); From be39883166a410baabd3c24e9d7c575962ac7a86 Mon Sep 17 00:00:00 2001 From: haby0 Date: Tue, 13 Apr 2021 14:10:10 +0800 Subject: [PATCH 0173/1662] Change the class name and comment,Use .(CompileTimeConstantExpr).getStringValue() --- .../Security/CWE/CWE-352/JsonStringLib.qll | 29 ++++++++++++++----- .../Security/CWE/CWE-352/JsonpInjection.ql | 2 +- .../CWE/CWE-352/JsonpInjectionLib.qll | 14 +++++---- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll index 5cc52e97e338..b8f1a13b119b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonStringLib.qll @@ -4,10 +4,15 @@ import semmle.code.java.dataflow.FlowSources import DataFlow::PathGraph /** Json string type data. */ -abstract class JsonpStringSource extends DataFlow::Node { } +abstract class JsonStringSource extends DataFlow::Node { } -/** Convert to String using Gson library. */ -private class GsonString extends JsonpStringSource { +/** + * Convert to String using Gson library. * + * + * For example, in the method access `Gson.toJson(...)`, + * the `Object` type data is converted to the `String` type data. + */ +private class GsonString extends JsonStringSource { GsonString() { exists(MethodAccess ma, Method m | ma.getMethod() = m | m.hasName("toJson") and @@ -17,8 +22,13 @@ private class GsonString extends JsonpStringSource { } } -/** Convert to String using Fastjson library. */ -private class FastjsonString extends JsonpStringSource { +/** + * Convert to String using Fastjson library. + * + * For example, in the method access `JSON.toJSONString(...)`, + * the `Object` type data is converted to the `String` type data. + */ +private class FastjsonString extends JsonStringSource { FastjsonString() { exists(MethodAccess ma, Method m | ma.getMethod() = m | m.hasName("toJSONString") and @@ -28,8 +38,13 @@ private class FastjsonString extends JsonpStringSource { } } -/** Convert to String using Jackson library. */ -private class JacksonString extends JsonpStringSource { +/** + * Convert to String using Jackson library. + * + * For example, in the method access `ObjectMapper.writeValueAsString(...)`, + * the `Object` type data is converted to the `String` type data. + */ +private class JacksonString extends JsonStringSource { JacksonString() { exists(MethodAccess ma, Method m | ma.getMethod() = m | m.hasName("writeValueAsString") and diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index a02891e8a566..927c3db03d25 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -69,4 +69,4 @@ where conf.hasFlowPath(source, sink) and exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) select sink.getNode(), source, sink, "Jsonp response might include code from $@.", source.getNode(), - "this user input" \ No newline at end of file + "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index f0a1a9de81c8..6a21ce8ff3a8 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -86,17 +86,21 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod } } -/** A concatenate expression using `(` and `)` or `);`. */ +/** + * A concatenate expression using `(` and `)` or `);`. + * + * E.g: `functionName + "(" + json + ")"` or `functionName + "(" + json + ");"` + */ class JsonpBuilderExpr extends AddExpr { JsonpBuilderExpr() { - getRightOperand().toString().regexpMatch("\"\\);?\"") and + getRightOperand().(CompileTimeConstantExpr).getStringValue().regexpMatch("\\);?") and getLeftOperand() .(AddExpr) .getLeftOperand() .(AddExpr) .getRightOperand() - .toString() - .regexpMatch("\"\\(\"") + .(CompileTimeConstantExpr) + .getStringValue() = "(" } /** Get the jsonp function name of this expression. */ @@ -123,7 +127,7 @@ class RemoteFlowConfig extends DataFlow2::Configuration { class JsonDataFlowConfig extends DataFlow2::Configuration { JsonDataFlowConfig() { this = "JsonDataFlowConfig" } - override predicate isSource(DataFlow::Node src) { src instanceof JsonpStringSource } + override predicate isSource(DataFlow::Node src) { src instanceof JsonStringSource } override predicate isSink(DataFlow::Node sink) { exists(JsonpBuilderExpr jhe | jhe.getJsonExpr() = sink.asExpr()) From 7c0b0642c89efb06eca443ba46bb7e2738807aac Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 13 Apr 2021 11:09:27 +0200 Subject: [PATCH 0174/1662] Python: Add imports to make code compile --- python/ql/src/Security/CWE-327/FluentApiModel.qll | 1 + python/ql/src/Security/CWE-327/InsecureProtocol.ql | 1 + 2 files changed, 2 insertions(+) diff --git a/python/ql/src/Security/CWE-327/FluentApiModel.qll b/python/ql/src/Security/CWE-327/FluentApiModel.qll index 6010417b68d6..a66f949e72d6 100644 --- a/python/ql/src/Security/CWE-327/FluentApiModel.qll +++ b/python/ql/src/Security/CWE-327/FluentApiModel.qll @@ -1,4 +1,5 @@ private import python +private import semmle.python.dataflow.new.DataFlow import TlsLibraryModel /** diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index e31bf78443b2..99e2d83420d1 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -10,6 +10,7 @@ */ import python +import semmle.python.dataflow.new.DataFlow import FluentApiModel // Helper for pretty printer `configName`. From 178cb6c90faa726331b5b6658863b22d156130c2 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 13 Apr 2021 11:26:05 +0200 Subject: [PATCH 0175/1662] Python: Bit too eager with the modernisation... Lift type restrictions to recover results. --- python/ql/src/Security/CWE-327/Ssl.qll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 99bb24b7076e..c1c6d65402ce 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -45,7 +45,7 @@ class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { } } -class OptionsAugOr extends ProtocolRestriction, DataFlow::CallCfgNode { +class OptionsAugOr extends ProtocolRestriction, DataFlow::CfgNode { ProtocolVersion restriction; OptionsAugOr() { @@ -68,7 +68,7 @@ class OptionsAugOr extends ProtocolRestriction, DataFlow::CallCfgNode { override ProtocolVersion getRestriction() { result = restriction } } -class OptionsAugAndNot extends ProtocolUnrestriction, DataFlow::CallCfgNode { +class OptionsAugAndNot extends ProtocolUnrestriction, DataFlow::CfgNode { ProtocolVersion restriction; OptionsAugAndNot() { @@ -126,7 +126,7 @@ predicate impliesBitSet(BinaryExpr whole, Expr part, boolean partHasBitSet, bool ) } -class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction, DataFlow::CallCfgNode { +class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction, DataFlow::CfgNode { ProtocolVersion restriction; ContextSetVersion() { From 30fbb8f1e7993ba509378c65e78d391aaa604791 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Tue, 13 Apr 2021 11:34:47 +0200 Subject: [PATCH 0176/1662] Python: clean up interface --- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 2 +- python/ql/src/Security/CWE-327/Ssl.qll | 14 +++++++------- python/ql/src/Security/CWE-327/TlsLibraryModel.qll | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index 9f42b83572ed..d886d46efefa 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -69,7 +69,7 @@ class PyOpenSSL extends TlsLibrary { result instanceof PyOpenSSLContextCreation } - override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { none() } + override DataFlow::Node insecure_connection_creation(ProtocolVersion version) { none() } override ConnectionCreation connection_creation() { result instanceof ConnectionCall } diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index c1c6d65402ce..e943470e917e 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -40,7 +40,7 @@ API::Node sslContextInstance() { class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { WrapSocketCall() { this = sslContextInstance().getMember("wrap_socket").getACall() } - override DataFlow::CfgNode getContext() { + override DataFlow::Node getContext() { result = this.getFunction().(DataFlow::AttrRead).getObject() } } @@ -63,7 +63,7 @@ class OptionsAugOr extends ProtocolRestriction, DataFlow::CfgNode { ) } - override DataFlow::CfgNode getContext() { result = this } + override DataFlow::Node getContext() { result = this } override ProtocolVersion getRestriction() { result = restriction } } @@ -88,7 +88,7 @@ class OptionsAugAndNot extends ProtocolUnrestriction, DataFlow::CfgNode { ) } - override DataFlow::CfgNode getContext() { result = this } + override DataFlow::Node getContext() { result = this } override ProtocolVersion getUnrestriction() { result = restriction } } @@ -138,7 +138,7 @@ class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction, Data ) } - override DataFlow::CfgNode getContext() { result = this } + override DataFlow::Node getContext() { result = this } override ProtocolVersion getRestriction() { result.lessThan(restriction) } @@ -159,7 +159,7 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext } class UnspecificSSLDefaultContextCreation extends SSLDefaultContextCreation, ProtocolUnrestriction { - override DataFlow::CfgNode getContext() { result = this } + override DataFlow::Node getContext() { result = this } // see https://docs.python.org/3/library/ssl.html#ssl.create_default_context override ProtocolVersion getUnrestriction() { @@ -186,9 +186,9 @@ class Ssl extends TlsLibrary { override ContextCreation specific_context_creation() { result instanceof SSLContextCreation } - override DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version) { + override DataFlow::CallCfgNode insecure_connection_creation(ProtocolVersion version) { result = API::moduleImport("ssl").getMember("wrap_socket").getACall() and - this.specific_version(version) = result.(DataFlow::CallCfgNode).getArgByName("ssl_version") and + this.specific_version(version) = result.getArgByName("ssl_version") and version.isInsecure() } diff --git a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll index cd38ad4ab5ec..ba54ea3ccd42 100644 --- a/python/ql/src/Security/CWE-327/TlsLibraryModel.qll +++ b/python/ql/src/Security/CWE-327/TlsLibraryModel.qll @@ -124,7 +124,7 @@ abstract class TlsLibrary extends string { } /** A connection is created in an insecure manner, not from a context. */ - abstract DataFlow::CfgNode insecure_connection_creation(ProtocolVersion version); + abstract DataFlow::Node insecure_connection_creation(ProtocolVersion version); /** A connection is created from a context. */ abstract ConnectionCreation connection_creation(); From b0ad927fddd2a874f7b08acd6fc89e7cc44650a6 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 13 Apr 2021 15:03:06 +0100 Subject: [PATCH 0177/1662] C++: Remove useUsePair. --- .../CWE-191/UnsignedDifferenceExpressionComparedZero.ql | 9 --------- .../UnsignedDifferenceExpressionComparedZero.expected | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 074ecfc821e1..3e2d49f4987e 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -37,15 +37,6 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) { predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { e = sub.getLeftOperand() or - exists(Expr other | - // use-use - exprIsSubLeftOrLess(sub, other) and - ( - useUsePair(_, other, e) or - useUsePair(_, e, other) - ) - ) - or exists(Expr other | // dataflow exprIsSubLeftOrLess(sub, other) and diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 85938f154996..7f03b7bcdc75 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -1,5 +1,7 @@ | test.cpp:6:5:6:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:10:8:10:24 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:22:12:22:20 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:32:12:32:20 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | @@ -9,6 +11,8 @@ | test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:219:7:219:15 | ... > ... | Unsigned subtraction can never be negative. | +| test.cpp:226:8:226:16 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:276:11:276:19 | ... > ... | Unsigned subtraction can never be negative. | From 4879104568879fe39c6c1c324f6e91f3df40c41a Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 13 Apr 2021 14:50:13 +0100 Subject: [PATCH 0178/1662] C++: Add more dataflow cases to replace the loss. --- ...nsignedDifferenceExpressionComparedZero.ql | 20 ++++++++++++++++++- ...dDifferenceExpressionComparedZero.expected | 4 ---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 3e2d49f4987e..682341ed4b20 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -34,7 +34,7 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) { * Holds if `e` is known or suspected to be less than or equal to * `sub.getLeftOperand()`. */ -predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { +predicate exprIsSubLeftOrLess(SubExpr sub, Element e) { e = sub.getLeftOperand() or exists(Expr other | @@ -46,6 +46,24 @@ predicate exprIsSubLeftOrLess(SubExpr sub, Expr e) { ) ) or + exists(Element other | + // dataflow (via parameter) + exprIsSubLeftOrLess(sub, other) and + ( + DataFlow::localFlowStep(DataFlow::parameterNode(e), DataFlow::exprNode(other)) or + DataFlow::localFlowStep(DataFlow::parameterNode(other), DataFlow::exprNode(e)) + ) + ) + or + exists(Element other | + // dataflow (via uninitialized) + exprIsSubLeftOrLess(sub, other) and + ( + DataFlow::localFlowStep(DataFlow::uninitializedNode(e), DataFlow::exprNode(other)) or + DataFlow::localFlowStep(DataFlow::uninitializedNode(other), DataFlow::exprNode(e)) + ) + ) + or exists(Expr other | // guard constraining `sub` exprIsSubLeftOrLess(sub, other) and diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected index 7f03b7bcdc75..85938f154996 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero/UnsignedDifferenceExpressionComparedZero.expected @@ -1,7 +1,5 @@ | test.cpp:6:5:6:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:10:8:10:24 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:22:12:22:20 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:32:12:32:20 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:62:5:62:13 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:75:8:75:16 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:101:6:101:14 | ... > ... | Unsigned subtraction can never be negative. | @@ -11,8 +9,6 @@ | test.cpp:152:7:152:15 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:182:6:182:14 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:208:6:208:14 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:219:7:219:15 | ... > ... | Unsigned subtraction can never be negative. | -| test.cpp:226:8:226:16 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:252:10:252:18 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:266:10:266:24 | ... > ... | Unsigned subtraction can never be negative. | | test.cpp:276:11:276:19 | ... > ... | Unsigned subtraction can never be negative. | From 8daca01c87336be802e4470d84ee0de676cdd998 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 13 Apr 2021 15:13:11 +0100 Subject: [PATCH 0179/1662] C++: Cleaner use of DataFlow::Node in exprIsSubLeftOrLess. --- ...nsignedDifferenceExpressionComparedZero.ql | 44 ++++++------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index 682341ed4b20..b002cd3631e8 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -31,57 +31,39 @@ predicate isGuarded(SubExpr sub, Expr left, Expr right) { } /** - * Holds if `e` is known or suspected to be less than or equal to + * Holds if `n` is known or suspected to be less than or equal to * `sub.getLeftOperand()`. */ -predicate exprIsSubLeftOrLess(SubExpr sub, Element e) { - e = sub.getLeftOperand() +predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) { + n = DataFlow::exprNode(sub.getLeftOperand()) or - exists(Expr other | + exists(DataFlow::Node other | // dataflow exprIsSubLeftOrLess(sub, other) and ( - DataFlow::localFlowStep(DataFlow::exprNode(e), DataFlow::exprNode(other)) or - DataFlow::localFlowStep(DataFlow::exprNode(other), DataFlow::exprNode(e)) + DataFlow::localFlowStep(n, other) or + DataFlow::localFlowStep(other, n) ) ) or - exists(Element other | - // dataflow (via parameter) - exprIsSubLeftOrLess(sub, other) and - ( - DataFlow::localFlowStep(DataFlow::parameterNode(e), DataFlow::exprNode(other)) or - DataFlow::localFlowStep(DataFlow::parameterNode(other), DataFlow::exprNode(e)) - ) - ) - or - exists(Element other | - // dataflow (via uninitialized) - exprIsSubLeftOrLess(sub, other) and - ( - DataFlow::localFlowStep(DataFlow::uninitializedNode(e), DataFlow::exprNode(other)) or - DataFlow::localFlowStep(DataFlow::uninitializedNode(other), DataFlow::exprNode(e)) - ) - ) - or - exists(Expr other | + exists(DataFlow::Node other | // guard constraining `sub` exprIsSubLeftOrLess(sub, other) and - isGuarded(sub, other, e) // other >= e + isGuarded(sub, other.asExpr(), n.asExpr()) // other >= e ) or - exists(Expr other, float p, float q | + exists(DataFlow::Node other, float p, float q | // linear access of `other` exprIsSubLeftOrLess(sub, other) and - linearAccess(e, other, p, q) and // e = p * other + q + linearAccess(n.asExpr(), other.asExpr(), p, q) and // e = p * other + q p <= 1 and q <= 0 ) or - exists(Expr other, float p, float q | + exists(DataFlow::Node other, float p, float q | // linear access of `e` exprIsSubLeftOrLess(sub, other) and - linearAccess(other, e, p, q) and // other = p * e + q + linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * e + q p >= 1 and q >= 0 ) @@ -95,5 +77,5 @@ where ro.getGreaterOperand() = sub and sub.getFullyConverted().getUnspecifiedType().(IntegralType).isUnsigned() and exprMightOverflowNegatively(sub.getFullyConverted()) and // generally catches false positives involving constants - not exprIsSubLeftOrLess(sub, sub.getRightOperand()) // generally catches false positives where there's a relation between the left and right operands + not exprIsSubLeftOrLess(sub, DataFlow::exprNode(sub.getRightOperand())) // generally catches false positives where there's a relation between the left and right operands select ro, "Unsigned subtraction can never be negative." From d1457995dd9fd565e18ec0c28fa5f1aa7199115b Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 13 Apr 2021 16:15:37 +0200 Subject: [PATCH 0180/1662] C++: Use range analysis in Overflow.qll --- cpp/ql/src/semmle/code/cpp/security/Overflow.qll | 7 +++++-- .../semmle/extreme/ArithmeticWithExtremeValues.expected | 2 -- .../query-tests/Security/CWE/CWE-190/semmle/extreme/test.c | 4 ++-- .../CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected | 3 --- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll index e7ad1c559e63..3f7a7b17b059 100644 --- a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll +++ b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll @@ -5,6 +5,7 @@ import cpp import semmle.code.cpp.controlflow.Dominance +import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis /** * Holds if the value of `use` is guarded using `abs`. @@ -94,9 +95,10 @@ predicate guardedGreater(Operation e, Expr use) { VariableAccess varUse(LocalScopeVariable v) { result = v.getAnAccess() } /** - * Holds if `e` is not guarded against overflow by `use`. + * Holds if `e` potentially overflows and `use` is an operand of `e` that is not guarded. */ predicate missingGuardAgainstOverflow(Operation e, VariableAccess use) { + convertedExprMightOverflow(e) and use = e.getAnOperand() and exists(LocalScopeVariable v | use.getTarget() = v | // overflow possible if large @@ -115,9 +117,10 @@ predicate missingGuardAgainstOverflow(Operation e, VariableAccess use) { } /** - * Holds if `e` is not guarded against underflow by `use`. + * Holds if `e` potentially underflows and `use` is an operand of `e` that is not guarded. */ predicate missingGuardAgainstUnderflow(Operation e, VariableAccess use) { + convertedExprMightOverflowNegatively(e) and use = e.getAnOperand() and exists(LocalScopeVariable v | use.getTarget() = v | // underflow possible if use is left operand and small diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected index a46371f36b6c..cbaf5d630795 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected @@ -3,6 +3,4 @@ | test.c:50:3:50:5 | sc3 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:49:9:49:16 | 127 | Extreme value | | test.c:59:3:59:5 | sc6 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:58:9:58:16 | 127 | Extreme value | | test.c:63:3:63:5 | sc8 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:62:9:62:16 | - ... | Extreme value | -| test.c:75:3:75:5 | sc1 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:74:9:74:16 | 127 | Extreme value | -| test.c:76:3:76:5 | sc1 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:74:9:74:16 | 127 | Extreme value | | test.c:124:9:124:9 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:118:17:118:23 | 2147483647 | Extreme value | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c index 8c40d984ee0a..8760641c8e2d 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c @@ -72,8 +72,8 @@ void test_negatives() { signed char sc1, sc2, sc3, sc4, sc5, sc6, sc7, sc8; sc1 = CHAR_MAX; - sc1 += 0; // GOOD [FALSE POSITIVE] - sc1 += -1; // GOOD [FALSE POSITIVE] + sc1 += 0; // GOOD + sc1 += -1; // GOOD sc2 = CHAR_MIN; sc2 += -1; // BAD [NOT DETECTED] sc3 = CHAR_MIN; diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected index 8bb25025b868..bdf00e0a5df5 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected @@ -1,8 +1,5 @@ | test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | | test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | -| test3.c:15:10:15:10 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test3.c:11:15:11:18 | argv | User-provided value | -| test3.c:15:14:15:14 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test3.c:11:15:11:18 | argv | User-provided value | -| test3.c:15:18:15:18 | z | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test3.c:11:15:11:18 | argv | User-provided value | | test5.cpp:17:6:17:18 | call to getTaintedInt | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | | test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | | test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test5.cpp:9:7:9:9 | buf | User-provided value | From 10084115947e610724e8b6fd2d42e1f4ea7d7327 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 13 Apr 2021 14:49:44 +0000 Subject: [PATCH 0181/1662] Python: Use API graphs in Fabric model --- .../src/semmle/python/frameworks/Fabric.qll | 360 ++---------------- 1 file changed, 41 insertions(+), 319 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Fabric.qll b/python/ql/src/semmle/python/frameworks/Fabric.qll index 764dce0de808..6e92cddfdfd7 100644 --- a/python/ql/src/semmle/python/frameworks/Fabric.qll +++ b/python/ql/src/semmle/python/frameworks/Fabric.qll @@ -11,6 +11,7 @@ private import python private import semmle.python.dataflow.new.DataFlow private import semmle.python.dataflow.new.RemoteFlowSources private import semmle.python.Concepts +private import semmle.python.ApiGraphs /** * Provides classes modeling security-relevant aspects of the `fabric` PyPI package, for @@ -20,54 +21,13 @@ private import semmle.python.Concepts */ private module FabricV1 { /** Gets a reference to the `fabric` module. */ - private DataFlow::Node fabric(DataFlow::TypeTracker t) { - t.start() and - result = DataFlow::importNode("fabric") - or - exists(DataFlow::TypeTracker t2 | result = fabric(t2).track(t2, t)) - } - - /** Gets a reference to the `fabric` module. */ - DataFlow::Node fabric() { result = fabric(DataFlow::TypeTracker::end()) } - - /** - * Gets a reference to the attribute `attr_name` of the `fabric` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node fabric_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in ["api"] and - ( - t.start() and - result = DataFlow::importNode("fabric" + "." + attr_name) - or - t.startInAttr(attr_name) and - result = fabric() - ) - or - // Due to bad performance when using normal setup with `fabric_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - fabric_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate fabric_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(fabric_attr(t2, attr_name), res, summary) - } + API::Node fabric() { result = API::moduleImport("fabric") } /** * Gets a reference to the attribute `attr_name` of the `fabric` module. * WARNING: Only holds for a few predefined attributes. */ - private DataFlow::Node fabric_attr(string attr_name) { - result = fabric_attr(DataFlow::TypeTracker::end(), attr_name) - } + private API::Node fabric_attr(string attr_name) { result = fabric().getMember(attr_name) } /** Provides models for the `fabric` module. */ module fabric { @@ -75,7 +35,7 @@ private module FabricV1 { // fabric.api // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.api` module. */ - DataFlow::Node api() { result = fabric_attr("api") } + API::Node api() { result = fabric_attr("api") } /** Provides models for the `fabric.api` module */ module api { @@ -83,41 +43,7 @@ private module FabricV1 { * Gets a reference to the attribute `attr_name` of the `fabric.api` module. * WARNING: Only holds for a few predefined attributes. */ - private DataFlow::Node api_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in ["run", "local", "sudo"] and - ( - t.start() and - result = DataFlow::importNode("fabric.api" + "." + attr_name) - or - t.startInAttr(attr_name) and - result = api() - ) - or - // Due to bad performance when using normal setup with `api_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - api_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate api_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, - DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(api_attr(t2, attr_name), res, summary) - } - - /** - * Gets a reference to the attribute `attr_name` of the `fabric.api` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node api_attr(string attr_name) { - result = api_attr(DataFlow::TypeTracker::end(), attr_name) - } + private API::Node api_attr(string attr_name) { result = api().getMember(attr_name) } /** * A call to either @@ -130,12 +56,8 @@ private module FabricV1 { * - https://docs.fabfile.org/en/1.14/api/core/operations.html#fabric.operations.sudo */ private class FabricApiLocalRunSudoCall extends SystemCommandExecution::Range, - DataFlow::CfgNode { - override CallNode node; - - FabricApiLocalRunSudoCall() { - node.getFunction() = api_attr(["local", "run", "sudo"]).asCfgNode() - } + DataFlow::CallCfgNode { + FabricApiLocalRunSudoCall() { this = api_attr(["local", "run", "sudo"]).getACall() } override DataFlow::Node getCommand() { result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] @@ -153,61 +75,13 @@ private module FabricV1 { */ private module FabricV2 { /** Gets a reference to the `fabric` module. */ - private DataFlow::Node fabric(DataFlow::TypeTracker t) { - t.start() and - result = DataFlow::importNode("fabric") - or - exists(DataFlow::TypeTracker t2 | result = fabric(t2).track(t2, t)) - } - - /** Gets a reference to the `fabric` module. */ - DataFlow::Node fabric() { result = fabric(DataFlow::TypeTracker::end()) } - - /** - * Gets a reference to the attribute `attr_name` of the `fabric` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node fabric_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in [ - // connection.py - "connection", "Connection", - // group.py - "group", "SerialGroup", "ThreadingGroup", - // tasks.py - "tasks", "task" - ] and - ( - t.start() and - result = DataFlow::importNode("fabric" + "." + attr_name) - or - t.startInAttr(attr_name) and - result = fabric() - ) - or - // Due to bad performance when using normal setup with `fabric_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - fabric_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate fabric_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(fabric_attr(t2, attr_name), res, summary) - } + API::Node fabric() { result = API::moduleImport("fabric") } /** * Gets a reference to the attribute `attr_name` of the `fabric` module. * WARNING: Only holds for a few predefined attributes. */ - private DataFlow::Node fabric_attr(string attr_name) { - result = fabric_attr(DataFlow::TypeTracker::end(), attr_name) - } + private API::Node fabric_attr(string attr_name) { result = fabric().getMember(attr_name) } /** Provides models for the `fabric` module. */ module fabric { @@ -215,7 +89,7 @@ private module FabricV2 { // fabric.connection // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.connection` module. */ - DataFlow::Node connection() { result = fabric_attr("connection") } + API::Node connection() { result = fabric_attr("connection") } /** Provides models for the `fabric.connection` module */ module connection { @@ -223,40 +97,8 @@ private module FabricV2 { * Gets a reference to the attribute `attr_name` of the `fabric.connection` module. * WARNING: Only holds for a few predefined attributes. */ - private DataFlow::Node connection_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in ["Connection"] and - ( - t.start() and - result = DataFlow::importNode("fabric.connection" + "." + attr_name) - or - t.startInAttr(attr_name) and - result = connection() - ) - or - // Due to bad performance when using normal setup with `connection_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - connection_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate connection_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, - DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(connection_attr(t2, attr_name), res, summary) - } - - /** - * Gets a reference to the attribute `attr_name` of the `fabric.connection` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node connection_attr(string attr_name) { - result = connection_attr(DataFlow::TypeTracker::end(), attr_name) + private API::Node connection_attr(string attr_name) { + result = connection().getMember(attr_name) } /** @@ -266,20 +108,10 @@ private module FabricV2 { */ module Connection { /** Gets a reference to the `fabric.connection.Connection` class. */ - private DataFlow::Node classRef(DataFlow::TypeTracker t) { - t.start() and - result = connection_attr("Connection") - or - // handle `fabric.Connection` alias - t.start() and - result = fabric_attr("Connection") - or - exists(DataFlow::TypeTracker t2 | result = classRef(t2).track(t2, t)) + API::Node classRef() { + result in [fabric_attr("Connection"), connection_attr("Connection")] } - /** Gets a reference to the `fabric.connection.Connection` class. */ - DataFlow::Node classRef() { result = classRef(DataFlow::TypeTracker::end()) } - /** * A source of instances of `fabric.connection.Connection`, extend this class to model new instances. * @@ -289,16 +121,14 @@ private module FabricV2 { * * Use the predicate `Connection::instance()` to get references to instances of `fabric.connection.Connection`. */ - abstract class InstanceSource extends DataFlow::Node { } - - private class ClassInstantiation extends InstanceSource, DataFlow::CfgNode { - override CallNode node; + abstract class InstanceSource extends DataFlow::LocalSourceNode { } - ClassInstantiation() { node.getFunction() = classRef().asCfgNode() } + private class ClassInstantiation extends InstanceSource, DataFlow::CallCfgNode { + ClassInstantiation() { this = classRef().getACall() } } /** Gets a reference to an instance of `fabric.connection.Connection`. */ - private DataFlow::Node instance(DataFlow::TypeTracker t) { + private DataFlow::LocalSourceNode instance(DataFlow::TypeTracker t) { t.start() and result instanceof InstanceSource or @@ -306,7 +136,7 @@ private module FabricV2 { } /** Gets a reference to an instance of `fabric.connection.Connection`. */ - DataFlow::Node instance() { result = instance(DataFlow::TypeTracker::end()) } + DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } /** * Gets a reference to either `run`, `sudo`, or `local` method on a @@ -317,7 +147,7 @@ private module FabricV2 { * - https://docs.fabfile.org/en/2.5/api/connection.html#fabric.connection.Connection.sudo * - https://docs.fabfile.org/en/2.5/api/connection.html#fabric.connection.Connection.local */ - private DataFlow::Node instanceRunMethods(DataFlow::TypeTracker t) { + private DataFlow::LocalSourceNode instanceRunMethods(DataFlow::TypeTracker t) { t.startInAttr(["run", "sudo", "local"]) and result = instance() or @@ -334,7 +164,7 @@ private module FabricV2 { * - https://docs.fabfile.org/en/2.5/api/connection.html#fabric.connection.Connection.local */ DataFlow::Node instanceRunMethods() { - result = instanceRunMethods(DataFlow::TypeTracker::end()) + instanceRunMethods(DataFlow::TypeTracker::end()).flowsTo(result) } } } @@ -347,11 +177,9 @@ private module FabricV2 { * - https://docs.fabfile.org/en/2.5/api/connection.html#fabric.connection.Connection.local */ private class FabricConnectionRunSudoLocalCall extends SystemCommandExecution::Range, - DataFlow::CfgNode { - override CallNode node; - + DataFlow::CallCfgNode { FabricConnectionRunSudoLocalCall() { - node.getFunction() = fabric::connection::Connection::instanceRunMethods().asCfgNode() + this.getFunction() = fabric::connection::Connection::instanceRunMethods() } override DataFlow::Node getCommand() { @@ -363,34 +191,19 @@ private module FabricV2 { // fabric.tasks // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.tasks` module. */ - DataFlow::Node tasks() { result = fabric_attr("tasks") } + API::Node tasks() { result = fabric_attr("tasks") } /** Provides models for the `fabric.tasks` module */ module tasks { /** Gets a reference to the `fabric.tasks.task` decorator. */ - private DataFlow::Node task(DataFlow::TypeTracker t) { - t.start() and - result = DataFlow::importNode("fabric.tasks.task") - or - t.startInAttr("task") and - result = tasks() - or - // Handle `fabric.task` alias - t.startInAttr("task") and - result = fabric() - or - exists(DataFlow::TypeTracker t2 | result = task(t2).track(t2, t)) - } - - /** Gets a reference to the `fabric.tasks.task` decorator. */ - DataFlow::Node task() { result = task(DataFlow::TypeTracker::end()) } + API::Node task() { result in [tasks().getMember("task"), fabric().getMember("task")] } } class FabricTaskFirstParamConnectionInstance extends fabric::connection::Connection::InstanceSource, DataFlow::ParameterNode { FabricTaskFirstParamConnectionInstance() { exists(Function func | - func.getADecorator() = fabric::tasks::task().asExpr() and + func.getADecorator() = fabric::tasks::task().getAUse().asExpr() and this.getParameter() = func.getArg(0) ) } @@ -400,7 +213,7 @@ private module FabricV2 { // fabric.group // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.group` module. */ - DataFlow::Node group() { result = fabric_attr("group") } + API::Node group() { result = fabric_attr("group") } /** Provides models for the `fabric.group` module */ module group { @@ -408,41 +221,7 @@ private module FabricV2 { * Gets a reference to the attribute `attr_name` of the `fabric.group` module. * WARNING: Only holds for a few predefined attributes. */ - private DataFlow::Node group_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in ["SerialGroup", "ThreadingGroup"] and - ( - t.start() and - result = DataFlow::importNode("fabric.group" + "." + attr_name) - or - t.startInAttr(attr_name) and - result = group() - ) - or - // Due to bad performance when using normal setup with `group_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - group_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate group_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, - DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(group_attr(t2, attr_name), res, summary) - } - - /** - * Gets a reference to the attribute `attr_name` of the `fabric.group` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node group_attr(string attr_name) { - result = group_attr(DataFlow::TypeTracker::end(), attr_name) - } + private API::Node group_attr(string attr_name) { result = group().getMember(attr_name) } /** * Provides models for the `fabric.group.Group` class and its subclasses. @@ -465,41 +244,20 @@ private module FabricV2 { * * Use `Group::subclassInstance()` predicate to get references to an instance of a subclass of `fabric.group.Group`. */ - abstract class SubclassInstanceSource extends DataFlow::Node { } - - /** Gets a reference to an instance of a subclass of `fabric.group.Group`. */ - private DataFlow::Node subclassInstance(DataFlow::TypeTracker t) { - t.start() and - result instanceof SubclassInstanceSource - or - exists(DataFlow::TypeTracker t2 | result = subclassInstance(t2).track(t2, t)) + abstract class ModeledSubclass extends API::Node { + /** Gets a string representation of this element. */ + override string toString() { result = this.(API::Node).toString() } } /** Gets a reference to an instance of a subclass of `fabric.group.Group`. */ - DataFlow::Node subclassInstance() { - result = subclassInstance(DataFlow::TypeTracker::end()) - } + API::Node subclassInstance() { result = any(ModeledSubclass m).getASubclass*().getReturn() } /** * Gets a reference to the `run` method on an instance of a subclass of `fabric.group.Group`. * * See https://docs.fabfile.org/en/2.5/api/group.html#fabric.group.Group.run */ - private DataFlow::Node subclassInstanceRunMethod(DataFlow::TypeTracker t) { - t.startInAttr("run") and - result = subclassInstance() - or - exists(DataFlow::TypeTracker t2 | result = subclassInstanceRunMethod(t2).track(t2, t)) - } - - /** - * Gets a reference to the `run` method on an instance of a subclass of `fabric.group.Group`. - * - * See https://docs.fabfile.org/en/2.5/api/group.html#fabric.group.Group.run - */ - DataFlow::Node subclassInstanceRunMethod() { - result = subclassInstanceRunMethod(DataFlow::TypeTracker::end()) - } + API::Node subclassInstanceRunMethod() { result = subclassInstance().getMember("run") } } /** @@ -507,12 +265,8 @@ private module FabricV2 { * * See https://docs.fabfile.org/en/2.5/api/group.html#fabric.group.Group.run */ - private class FabricGroupRunCall extends SystemCommandExecution::Range, DataFlow::CfgNode { - override CallNode node; - - FabricGroupRunCall() { - node.getFunction() = fabric::group::Group::subclassInstanceRunMethod().asCfgNode() - } + private class FabricGroupRunCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { + FabricGroupRunCall() { this = fabric::group::Group::subclassInstanceRunMethod().getACall() } override DataFlow::Node getCommand() { result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] @@ -525,25 +279,8 @@ private module FabricV2 { * See https://docs.fabfile.org/en/2.5/api/group.html#fabric.group.SerialGroup. */ module SerialGroup { - /** Gets a reference to the `fabric.group.SerialGroup` class. */ - private DataFlow::Node classRef(DataFlow::TypeTracker t) { - t.start() and - result = group_attr("SerialGroup") - or - // Handle `fabric.SerialGroup` alias - t.start() and - result = fabric_attr("SerialGroup") - or - exists(DataFlow::TypeTracker t2 | result = classRef(t2).track(t2, t)) - } - - /** Gets a reference to the `fabric.group.SerialGroup` class. */ - private DataFlow::Node classRef() { result = classRef(DataFlow::TypeTracker::end()) } - - private class ClassInstantiation extends Group::SubclassInstanceSource, DataFlow::CfgNode { - override CallNode node; - - ClassInstantiation() { node.getFunction() = classRef().asCfgNode() } + private class ClassInstantiation extends Group::ModeledSubclass { + ClassInstantiation() { this in [group_attr("SerialGroup"), fabric_attr("SerialGroup")] } } } @@ -553,25 +290,10 @@ private module FabricV2 { * See https://docs.fabfile.org/en/2.5/api/group.html#fabric.group.ThreadingGroup. */ module ThreadingGroup { - /** Gets a reference to the `fabric.group.ThreadingGroup` class. */ - private DataFlow::Node classRef(DataFlow::TypeTracker t) { - t.start() and - result = group_attr("ThreadingGroup") - or - // Handle `fabric.ThreadingGroup` alias - t.start() and - result = fabric_attr("ThreadingGroup") - or - exists(DataFlow::TypeTracker t2 | result = classRef(t2).track(t2, t)) - } - - /** Gets a reference to the `fabric.group.ThreadingGroup` class. */ - DataFlow::Node classRef() { result = classRef(DataFlow::TypeTracker::end()) } - - private class ClassInstantiation extends Group::SubclassInstanceSource, DataFlow::CfgNode { - override CallNode node; - - ClassInstantiation() { node.getFunction() = classRef().asCfgNode() } + private class ClassInstantiation extends Group::ModeledSubclass { + ClassInstantiation() { + this in [group_attr("ThreadingGroup"), fabric_attr("ThreadingGroup")] + } } } } From 7f131c1f352e7829fff6fab17fa38a51dd65dee7 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 13 Apr 2021 14:55:44 +0000 Subject: [PATCH 0182/1662] Python: Get rid of `_attr` predicates --- .../src/semmle/python/frameworks/Fabric.qll | 52 ++++--------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Fabric.qll b/python/ql/src/semmle/python/frameworks/Fabric.qll index 6e92cddfdfd7..177f5592f665 100644 --- a/python/ql/src/semmle/python/frameworks/Fabric.qll +++ b/python/ql/src/semmle/python/frameworks/Fabric.qll @@ -23,28 +23,16 @@ private module FabricV1 { /** Gets a reference to the `fabric` module. */ API::Node fabric() { result = API::moduleImport("fabric") } - /** - * Gets a reference to the attribute `attr_name` of the `fabric` module. - * WARNING: Only holds for a few predefined attributes. - */ - private API::Node fabric_attr(string attr_name) { result = fabric().getMember(attr_name) } - /** Provides models for the `fabric` module. */ module fabric { // ------------------------------------------------------------------------- // fabric.api // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.api` module. */ - API::Node api() { result = fabric_attr("api") } + API::Node api() { result = fabric().getMember("api") } /** Provides models for the `fabric.api` module */ module api { - /** - * Gets a reference to the attribute `attr_name` of the `fabric.api` module. - * WARNING: Only holds for a few predefined attributes. - */ - private API::Node api_attr(string attr_name) { result = api().getMember(attr_name) } - /** * A call to either * - `fabric.api.local` @@ -57,7 +45,7 @@ private module FabricV1 { */ private class FabricApiLocalRunSudoCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { - FabricApiLocalRunSudoCall() { this = api_attr(["local", "run", "sudo"]).getACall() } + FabricApiLocalRunSudoCall() { this = api().getMember(["local", "run", "sudo"]).getACall() } override DataFlow::Node getCommand() { result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] @@ -77,30 +65,16 @@ private module FabricV2 { /** Gets a reference to the `fabric` module. */ API::Node fabric() { result = API::moduleImport("fabric") } - /** - * Gets a reference to the attribute `attr_name` of the `fabric` module. - * WARNING: Only holds for a few predefined attributes. - */ - private API::Node fabric_attr(string attr_name) { result = fabric().getMember(attr_name) } - /** Provides models for the `fabric` module. */ module fabric { // ------------------------------------------------------------------------- // fabric.connection // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.connection` module. */ - API::Node connection() { result = fabric_attr("connection") } + API::Node connection() { result = fabric().getMember("connection") } /** Provides models for the `fabric.connection` module */ module connection { - /** - * Gets a reference to the attribute `attr_name` of the `fabric.connection` module. - * WARNING: Only holds for a few predefined attributes. - */ - private API::Node connection_attr(string attr_name) { - result = connection().getMember(attr_name) - } - /** * Provides models for the `fabric.connection.Connection` class * @@ -109,7 +83,7 @@ private module FabricV2 { module Connection { /** Gets a reference to the `fabric.connection.Connection` class. */ API::Node classRef() { - result in [fabric_attr("Connection"), connection_attr("Connection")] + result in [fabric().getMember("Connection"), connection().getMember("Connection")] } /** @@ -136,7 +110,7 @@ private module FabricV2 { } /** Gets a reference to an instance of `fabric.connection.Connection`. */ - DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } + DataFlow::LocalSourceNode instance() { result = instance(DataFlow::TypeTracker::end()) } /** * Gets a reference to either `run`, `sudo`, or `local` method on a @@ -191,7 +165,7 @@ private module FabricV2 { // fabric.tasks // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.tasks` module. */ - API::Node tasks() { result = fabric_attr("tasks") } + API::Node tasks() { result = fabric().getMember("tasks") } /** Provides models for the `fabric.tasks` module */ module tasks { @@ -213,16 +187,10 @@ private module FabricV2 { // fabric.group // ------------------------------------------------------------------------- /** Gets a reference to the `fabric.group` module. */ - API::Node group() { result = fabric_attr("group") } + API::Node group() { result = fabric().getMember("group") } /** Provides models for the `fabric.group` module */ module group { - /** - * Gets a reference to the attribute `attr_name` of the `fabric.group` module. - * WARNING: Only holds for a few predefined attributes. - */ - private API::Node group_attr(string attr_name) { result = group().getMember(attr_name) } - /** * Provides models for the `fabric.group.Group` class and its subclasses. * @@ -280,7 +248,9 @@ private module FabricV2 { */ module SerialGroup { private class ClassInstantiation extends Group::ModeledSubclass { - ClassInstantiation() { this in [group_attr("SerialGroup"), fabric_attr("SerialGroup")] } + ClassInstantiation() { + this in [group().getMember("SerialGroup"), fabric().getMember("SerialGroup")] + } } } @@ -292,7 +262,7 @@ private module FabricV2 { module ThreadingGroup { private class ClassInstantiation extends Group::ModeledSubclass { ClassInstantiation() { - this in [group_attr("ThreadingGroup"), fabric_attr("ThreadingGroup")] + this in [group().getMember("ThreadingGroup"), fabric().getMember("ThreadingGroup")] } } } From aa5258512048c2d6404acc221b6c4f66e98eab81 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Tue, 13 Apr 2021 17:17:05 +0200 Subject: [PATCH 0183/1662] C++: Add change-note. --- cpp/change-notes/2021-04-13-arithmetic-queries.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cpp/change-notes/2021-04-13-arithmetic-queries.md diff --git a/cpp/change-notes/2021-04-13-arithmetic-queries.md b/cpp/change-notes/2021-04-13-arithmetic-queries.md new file mode 100644 index 000000000000..4d0f8833adc9 --- /dev/null +++ b/cpp/change-notes/2021-04-13-arithmetic-queries.md @@ -0,0 +1,2 @@ +lgtm +* The queries cpp/tainted-arithmetic, cpp/uncontrolled-arithmetic, and cpp/arithmetic-with-extreme-values have been improved to produce fewer false positives. From 7ed09904b48867367a3f6445d9187ad75c72b8d2 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 13 Apr 2021 15:21:19 +0000 Subject: [PATCH 0184/1662] Python: Use API graphs for Invoke A few stragglers remain, as they are modelling the use of decorators. They will be dealt with at a later date. --- .../src/semmle/python/frameworks/Invoke.qll | 104 ++++-------------- 1 file changed, 21 insertions(+), 83 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Invoke.qll b/python/ql/src/semmle/python/frameworks/Invoke.qll index 02db1cb5db2b..5b5a5e6e7f06 100644 --- a/python/ql/src/semmle/python/frameworks/Invoke.qll +++ b/python/ql/src/semmle/python/frameworks/Invoke.qll @@ -6,6 +6,7 @@ private import python private import semmle.python.dataflow.new.DataFlow private import semmle.python.Concepts +private import semmle.python.ApiGraphs /** * Provides models for the `invoke` PyPI package. @@ -16,102 +17,44 @@ private module Invoke { // invoke // --------------------------------------------------------------------------- /** Gets a reference to the `invoke` module. */ - private DataFlow::Node invoke(DataFlow::TypeTracker t) { - t.start() and - result = DataFlow::importNode("invoke") - or - exists(DataFlow::TypeTracker t2 | result = invoke(t2).track(t2, t)) - } - - /** Gets a reference to the `invoke` module. */ - DataFlow::Node invoke() { result = invoke(DataFlow::TypeTracker::end()) } - - /** - * Gets a reference to the attribute `attr_name` of the `invoke` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node invoke_attr(DataFlow::TypeTracker t, string attr_name) { - attr_name in ["run", "sudo", "context", "Context", "task"] and - ( - t.start() and - result = DataFlow::importNode("invoke." + attr_name) - or - t.startInAttr(attr_name) and - result = DataFlow::importNode("invoke") - ) - or - // Due to bad performance when using normal setup with `invoke_attr(t2, attr_name).track(t2, t)` - // we have inlined that code and forced a join - exists(DataFlow::TypeTracker t2 | - exists(DataFlow::StepSummary summary | - invoke_attr_first_join(t2, attr_name, result, summary) and - t = t2.append(summary) - ) - ) - } - - pragma[nomagic] - private predicate invoke_attr_first_join( - DataFlow::TypeTracker t2, string attr_name, DataFlow::Node res, DataFlow::StepSummary summary - ) { - DataFlow::StepSummary::step(invoke_attr(t2, attr_name), res, summary) - } - - /** - * Gets a reference to the attribute `attr_name` of the `invoke` module. - * WARNING: Only holds for a few predefined attributes. - */ - private DataFlow::Node invoke_attr(string attr_name) { - result = invoke_attr(DataFlow::TypeTracker::end(), attr_name) - } + API::Node invoke() { result = API::moduleImport("invoke") } /** Provides models for the `invoke` module. */ module invoke { /** Gets a reference to the `invoke.context` module. */ - DataFlow::Node context() { result = invoke_attr("context") } + API::Node context() { result = invoke().getMember("context") } /** Provides models for the `invoke.context` module */ module context { /** Provides models for the `invoke.context.Context` class */ module Context { /** Gets a reference to the `invoke.context.Context` class. */ - private DataFlow::Node classRef(DataFlow::TypeTracker t) { - t.start() and - result = DataFlow::importNode("invoke.context.Context") - or - t.startInAttr("Context") and - result = invoke::context() - or - // handle invoke.Context alias - t.start() and - result = invoke_attr("Context") - or - exists(DataFlow::TypeTracker t2 | result = classRef(t2).track(t2, t)) + API::Node classRef() { + result = + [API::moduleImport("invoke").getMember("context"), API::moduleImport("invoke")] + .getMember("Context") } - /** Gets a reference to the `invoke.context.Context` class. */ - DataFlow::Node classRef() { result = classRef(DataFlow::TypeTracker::end()) } - /** Gets a reference to an instance of `invoke.context.Context`. */ - private DataFlow::Node instance(DataFlow::TypeTracker t) { + private DataFlow::LocalSourceNode instance(DataFlow::TypeTracker t) { t.start() and - result.asCfgNode().(CallNode).getFunction() = - invoke::context::Context::classRef().asCfgNode() - or - t.start() and - exists(Function func | - func.getADecorator() = invoke_attr("task").asExpr() and - result.(DataFlow::ParameterNode).getParameter() = func.getArg(0) + ( + result = invoke::context::Context::classRef().getACall() + or + exists(Function func | + func.getADecorator() = invoke().getMember("task").getAUse().asExpr() and + result.(DataFlow::ParameterNode).getParameter() = func.getArg(0) + ) ) or exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) } /** Gets a reference to an instance of `invoke.context.Context`. */ - DataFlow::Node instance() { result = instance(DataFlow::TypeTracker::end()) } + DataFlow::LocalSourceNode instance() { result = instance(DataFlow::TypeTracker::end()) } /** Gets a reference to the `run` or `sudo` methods on a `invoke.context.Context` instance. */ - private DataFlow::Node instanceRunMethods(DataFlow::TypeTracker t) { + private DataFlow::LocalSourceNode instanceRunMethods(DataFlow::TypeTracker t) { t.startInAttr(["run", "sudo"]) and result = invoke::context::Context::instance() or @@ -120,7 +63,7 @@ private module Invoke { /** Gets a reference to the `run` or `sudo` methods on a `invoke.context.Context` instance. */ DataFlow::Node instanceRunMethods() { - result = instanceRunMethods(DataFlow::TypeTracker::end()) + instanceRunMethods(DataFlow::TypeTracker::end()).flowsTo(result) } } } @@ -131,15 +74,10 @@ private module Invoke { * - `invoke.run` or `invoke.sudo` functions (http://docs.pyinvoke.org/en/stable/api/__init__.html) * - `run` or `sudo` methods on a `invoke.context.Context` instance (http://docs.pyinvoke.org/en/stable/api/context.html#invoke.context.Context.run) */ - private class InvokeRunCommandCall extends SystemCommandExecution::Range, DataFlow::CfgNode { - override CallNode node; - + private class InvokeRunCommandCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { InvokeRunCommandCall() { - exists(DataFlow::Node callFunction | node.getFunction() = callFunction.asCfgNode() | - callFunction = invoke_attr(["run", "sudo"]) - or - callFunction = invoke::context::Context::instanceRunMethods() - ) + this = invoke().getMember(["run", "sudo"]).getACall() or + this.getFunction() = invoke::context::Context::instanceRunMethods() } override DataFlow::Node getCommand() { From 6e73d136702f882c7582da0dffd9ee635d53c739 Mon Sep 17 00:00:00 2001 From: haby0 Date: Tue, 13 Apr 2021 23:48:45 +0800 Subject: [PATCH 0185/1662] Update java/ql/src/semmle/code/java/frameworks/Servlets.qll Co-authored-by: Chris Smowton --- java/ql/src/semmle/code/java/frameworks/Servlets.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index a99df9816f15..3c57b8b7c828 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -354,7 +354,7 @@ class FilterChain extends Interface { /** Holds if `m` is a filter handler method (for example `doFilter`). */ predicate isDoFilterMethod(Method m) { - m.getName() ="doFilter" and + m.getName() = "doFilter" and m.getDeclaringType() instanceof FilterClass and m.getNumberOfParameters() = 3 and m.getParameter(0).getType() instanceof ServletRequest and From 7be45e7c5e450129253458072b766d9717d8b0ce Mon Sep 17 00:00:00 2001 From: haby0 Date: Tue, 13 Apr 2021 23:56:17 +0800 Subject: [PATCH 0186/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql Co-authored-by: Chris Smowton --- java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index 927c3db03d25..f9c16a546ca0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -52,7 +52,7 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink and - getACallingCallableOrSelf(sink.getEnclosingCallable()) instanceof RequestGetMethod + any(RequestGetMethod m).polyCalls*(source.getEnclosingCallable()) } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { From 25b012db48c7b67f8801770d5056ac39681e3622 Mon Sep 17 00:00:00 2001 From: haby0 Date: Tue, 13 Apr 2021 23:58:28 +0800 Subject: [PATCH 0187/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql Co-authored-by: Chris Smowton --- java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index f9c16a546ca0..e3673e504100 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -47,7 +47,7 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource and - getACallingCallableOrSelf(source.getEnclosingCallable()) instanceof RequestGetMethod + any(RequestGetMethod m).polyCalls*(source.getEnclosingCallable()) } override predicate isSink(DataFlow::Node sink) { From 00235ed3b39a51adbbeadc42f97cdc5cd5d5c780 Mon Sep 17 00:00:00 2001 From: haby0 Date: Tue, 13 Apr 2021 23:58:52 +0800 Subject: [PATCH 0188/1662] Update java/ql/src/semmle/code/java/frameworks/Servlets.qll Co-authored-by: Chris Smowton --- java/ql/src/semmle/code/java/frameworks/Servlets.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index 3c57b8b7c828..c733023bbdce 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -352,7 +352,7 @@ class FilterChain extends Interface { FilterChain() { hasQualifiedName("javax.servlet", "FilterChain") } } -/** Holds if `m` is a filter handler method (for example `doFilter`). */ +/** Holds if `m` is an implementation of `javax.servlet.Filter.doFilter`. */ predicate isDoFilterMethod(Method m) { m.getName() = "doFilter" and m.getDeclaringType() instanceof FilterClass and From 37dae67a0d57589a6fd97c842d05f2b5c9cf830d Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 14 Apr 2021 09:55:24 +0800 Subject: [PATCH 0189/1662] Fix RequestResponseFlowConfig.isSink error --- .../experimental/Security/CWE/CWE-352/JsonpInjection.ql | 2 +- .../Security/CWE/CWE-352/JsonpInjectionLib.qll | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index e3673e504100..f6f876488120 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -52,7 +52,7 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof XssSink and - any(RequestGetMethod m).polyCalls*(source.getEnclosingCallable()) + any(RequestGetMethod m).polyCalls*(sink.getEnclosingCallable()) } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 6a21ce8ff3a8..5f2ad8e85321 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -77,10 +77,13 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod this.getAnAnnotation() .getType() .hasQualifiedName("org.springframework.web.bind.annotation", "RequestMapping") and - this.getAnAnnotation().getValue("method").toString().regexpMatch("RequestMethod.GET|\\{...\\}") and + ( + this.getAnAnnotation().getValue("method").(VarAccess).getVariable().getName() = "GET" or + this.getAnAnnotation().getValue("method").(ArrayInit).getSize() = 0 //Java code example: @RequestMapping(value = "test") + ) and not exists(MethodAccess ma | ma.getMethod() instanceof ServletRequestGetBodyMethod and - this = getACallingCallableOrSelf(ma.getEnclosingCallable()) + any(this).polyCalls*(ma.getEnclosingCallable()) ) and not this.getAParamType().getName() = "MultipartFile" } From e2ed0d02b0182dee63b7f0ab855dd3d145c13209 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 14 Apr 2021 12:34:52 +0800 Subject: [PATCH 0190/1662] Delete existsFilterVerificationMethod and existsServletVerificationMethod, add from get handler to filter --- .../Security/CWE/CWE-352/JsonpInjection.ql | 27 --- .../CWE/CWE-352/JsonpInjectionLib.qll | 24 +- .../JsonpController.java | 218 ------------------ .../JsonpInjection.expected | 81 ------- .../JsonpInjection.qlref | 1 - .../JsonpInjectionServlet1.java | 64 ----- .../JsonpInjectionServlet2.java | 50 ---- .../RefererFilter.java | 43 ---- .../CWE-352/JsonpInjectionWithFilter/options | 1 - .../JsonpInjection.expected | 6 - .../JsonpInjection.expected | 9 - 11 files changed, 12 insertions(+), 512 deletions(-) delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql index f6f876488120..c28af8aaa152 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.ql @@ -16,31 +16,6 @@ import semmle.code.java.dataflow.FlowSources import semmle.code.java.deadcode.WebEntryPoints import DataFlow::PathGraph -/** - * Holds if some `Filter.doFilter` method exists in the whole program that takes some user-controlled - * input and tests it with what appears to be a token- or authentication-checking function. - */ -predicate existsFilterVerificationMethod() { - exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc, Method m | - vmfc.hasFlow(source, sink) and - m = getACallingCallableOrSelf(source.getEnclosingCallable()) and - isDoFilterMethod(m) - ) -} - -/** - * Holds if somewhere in the whole program some user-controlled - * input is tested with what appears to be a token- or authentication-checking function, - * and `checkNode` is reachable from any function that can reach the user-controlled input source. - */ -predicate existsServletVerificationMethod(Node checkNode) { - exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc | - vmfc.hasFlow(source, sink) and - getACallingCallableOrSelf(source.getEnclosingCallable()) = - getACallingCallableOrSelf(checkNode.getEnclosingCallable()) - ) -} - /** Taint-tracking configuration tracing flow from get method request sources to output jsonp data. */ class RequestResponseFlowConfig extends TaintTracking::Configuration { RequestResponseFlowConfig() { this = "RequestResponseFlowConfig" } @@ -64,8 +39,6 @@ class RequestResponseFlowConfig extends TaintTracking::Configuration { from DataFlow::PathNode source, DataFlow::PathNode sink, RequestResponseFlowConfig conf where - not existsServletVerificationMethod(source.getNode()) and - not existsFilterVerificationMethod() and conf.hasFlowPath(source, sink) and exists(JsonpInjectionFlowConfig jhfc | jhfc.hasFlowTo(sink.getNode())) select sink.getNode(), source, sink, "Jsonp response might include code from $@.", source.getNode(), diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 5f2ad8e85321..af9cebb865ce 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -42,17 +42,21 @@ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { } } -/** Get Callable by recursive method. */ -Callable getACallingCallableOrSelf(Callable call) { - result = call - or - result = getACallingCallableOrSelf(call.getAReference().getEnclosingCallable()) -} - /** * A method that is called to handle an HTTP GET request. */ -abstract class RequestGetMethod extends Method { } +abstract class RequestGetMethod extends Method { + RequestGetMethod() { + not exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc | + vmfc.hasFlow(source, sink) and + any(this).polyCalls*(source.getEnclosingCallable()) + ) and + not exists(MethodAccess ma | + ma.getMethod() instanceof ServletRequestGetBodyMethod and + any(this).polyCalls*(ma.getEnclosingCallable()) + ) + } +} /** Override method of `doGet` of `Servlet` subclass. */ private class ServletGetMethod extends RequestGetMethod { @@ -81,10 +85,6 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod this.getAnAnnotation().getValue("method").(VarAccess).getVariable().getName() = "GET" or this.getAnAnnotation().getValue("method").(ArrayInit).getSize() = 0 //Java code example: @RequestMapping(value = "test") ) and - not exists(MethodAccess ma | - ma.getMethod() instanceof ServletRequestGetBodyMethod and - any(this).polyCalls*(ma.getEnclosingCallable()) - ) and not this.getAParamType().getName() = "MultipartFile" } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java deleted file mode 100644 index e875da2f6995..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpController.java +++ /dev/null @@ -1,218 +0,0 @@ -import com.alibaba.fastjson.JSONObject; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.Gson; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; - -@Controller -public class JsonpController { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - @GetMapping(value = "jsonp1") - @ResponseBody - public String bad1(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp2") - @ResponseBody - public String bad2(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp3") - @ResponseBody - public String bad3(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp4") - @ResponseBody - public String bad4(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @GetMapping(value = "jsonp5") - @ResponseBody - public void bad5(HttpServletRequest request, - HttpServletResponse response) throws Exception { - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp6") - @ResponseBody - public void bad6(HttpServletRequest request, - HttpServletResponse response) throws Exception { - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @RequestMapping(value = "jsonp7", method = RequestMethod.GET) - @ResponseBody - public String bad7(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp8") - @ResponseBody - public String bad8(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); //Just check. - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - - @GetMapping(value = "jsonp9") - @ResponseBody - public String good1(HttpServletRequest request) { - String resultStr = null; - String referer = request.getParameter("referer"); - if (verifReferer(referer)){ - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - return "error"; - } - - - @GetMapping(value = "jsonp10") - @ResponseBody - public String good2(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); - if (result){ - return ""; - } - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @RequestMapping(value = "jsonp11") - @ResponseBody - public String good3(HttpServletRequest request) { - JSONObject parameterObj = readToJSONObect(request); - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @RequestMapping(value = "jsonp12") - @ResponseBody - public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { - if(null == file){ - return "upload file error"; - } - String fileName = file.getOriginalFilename(); - System.out.println("file operations"); - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - public static JSONObject readToJSONObect(HttpServletRequest request){ - String jsonText = readPostContent(request); - JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); - return jsonObj; - } - - public static String readPostContent(HttpServletRequest request){ - BufferedReader in= null; - String content = null; - String line = null; - try { - in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); - StringBuilder buf = new StringBuilder(); - while ((line = in.readLine()) != null) { - buf.append(line); - } - content = buf.toString(); - } catch (IOException e) { - e.printStackTrace(); - } - String uri = request.getRequestURI(); - return content; - } - - public static String getJsonStr(Object result) { - return JSONObject.toJSONString(result); - } - - public static boolean verifToken(String token){ - if (token != "xxxx"){ - return false; - } - return true; - } - - public static boolean verifReferer(String str){ - if (str != "xxxx"){ - return false; - } - return true; - } -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected deleted file mode 100644 index 3da805c6a698..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.expected +++ /dev/null @@ -1,81 +0,0 @@ -edges -| JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | -| JsonpController.java:36:21:36:54 | ... + ... : String | JsonpController.java:37:16:37:24 | resultStr | -| JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | -| JsonpController.java:45:21:45:80 | ... + ... : String | JsonpController.java:46:16:46:24 | resultStr | -| JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | -| JsonpController.java:55:21:55:55 | ... + ... : String | JsonpController.java:56:16:56:24 | resultStr | -| JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | -| JsonpController.java:65:21:65:54 | ... + ... : String | JsonpController.java:66:16:66:24 | resultStr | -| JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | -| JsonpController.java:79:21:79:54 | ... + ... : String | JsonpController.java:80:20:80:28 | resultStr | -| JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | -| JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | -| JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | -| JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | -| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -nodes -| JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:44:32:44:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:45:21:45:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:53:32:53:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:55:21:55:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:63:32:63:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:65:21:65:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:73:32:73:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:87:32:87:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:101:32:101:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -#select diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref deleted file mode 100644 index 3f5fc4506696..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java deleted file mode 100644 index 14ef76275b1d..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet1.java +++ /dev/null @@ -1,64 +0,0 @@ -import com.google.gson.Gson; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class JsonpInjectionServlet1 extends HttpServlet { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - private static final long serialVersionUID = 1L; - - private String key = "test"; - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - doPost(req, resp); - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("application/json"); - String jsonpCallback = req.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String jsonResult = gson.toJson(hashMap); - - String referer = req.getHeader("Referer"); - - boolean result = verifReferer(referer); - - // good - if (result){ - String resultStr = null; - pw = resp.getWriter(); - resultStr = jsonpCallback + "(" + jsonResult + ")"; - pw.println(resultStr); - pw.flush(); - } - } - - public static boolean verifReferer(String referer){ - if (!referer.startsWith("http://test.com/")){ - return false; - } - return true; - } - - @Override - public void init(ServletConfig config) throws ServletException { - this.key = config.getInitParameter("key"); - System.out.println("åˆå§‹åŒ–" + this.key); - super.init(config); - } - -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java deleted file mode 100644 index bbfbc2dc4360..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/JsonpInjectionServlet2.java +++ /dev/null @@ -1,50 +0,0 @@ -import com.google.gson.Gson; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class JsonpInjectionServlet2 extends HttpServlet { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - private static final long serialVersionUID = 1L; - - private String key = "test"; - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - doPost(req, resp); - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("application/json"); - String jsonpCallback = req.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - - String resultStr = null; - pw = resp.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - pw.flush(); - } - - @Override - public void init(ServletConfig config) throws ServletException { - this.key = config.getInitParameter("key"); - System.out.println("åˆå§‹åŒ–" + this.key); - super.init(config); - } - -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java deleted file mode 100644 index 97444932ae17..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/RefererFilter.java +++ /dev/null @@ -1,43 +0,0 @@ -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.util.StringUtils; - -public class RefererFilter implements Filter { - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - HttpServletRequest request = (HttpServletRequest) servletRequest; - HttpServletResponse response = (HttpServletResponse) servletResponse; - String refefer = request.getHeader("Referer"); - boolean result = verifReferer(refefer); - if (result){ - filterChain.doFilter(servletRequest, servletResponse); - } - response.sendError(444, "Referer xxx."); - } - - @Override - public void destroy() { - } - - public static boolean verifReferer(String referer){ - if (StringUtils.isEmpty(referer)){ - return false; - } - if (referer.startsWith("http://www.baidu.com/")){ - return true; - } - return false; - } -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options deleted file mode 100644 index c53e31e467fa..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithFilter/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected index 2e4bc97ff973..83f2b7f206a5 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected @@ -15,9 +15,7 @@ edges | JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | | JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | | JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | | JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | | JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | | JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | @@ -54,14 +52,10 @@ nodes | JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | | JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | | JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | | JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected index d90d51ab5524..dfbe0628760b 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected @@ -15,13 +15,10 @@ edges | JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | | JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | JsonpController.java:130:20:130:28 | resultStr | | JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | JsonpController.java:148:16:148:24 | resultStr | | JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | | JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | | JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | | JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | @@ -58,22 +55,16 @@ nodes | JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | | JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:127:36:127:72 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:145:32:145:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | | JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | | JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | From 77208bcc91d7dfc0d53a8eb2f429b1deebded47b Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 14 Apr 2021 13:14:43 +0800 Subject: [PATCH 0191/1662] Fix the error that there is no VerificationMethodToIfFlowConfig --- .../CWE/CWE-352/JsonpInjectionLib.qll | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index af9cebb865ce..6b989c3c0cff 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -7,11 +7,32 @@ import semmle.code.java.dataflow.DataFlow3 import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController +/** A data flow configuration tracing flow from the result of a method whose name includes token/auth/referer/origin to an if-statement condition. */ +class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { + VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } + + override predicate isSource(DataFlow::Node src) { + exists(MethodAccess ma | ma instanceof BarrierGuard | + ( + ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + or + ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + ) and + ma = src.asExpr() + ) + } + + override predicate isSink(DataFlow::Node sink) { + exists(IfStmt is | is.getCondition() = sink.asExpr()) + } +} + /** * Taint-tracking configuration tracing flow from untrusted inputs to an argument of a function whose result is used as an if-statement condition. * * For example, in the context `String userControlled = request.getHeader("xyz"); boolean isGood = checkToken(userControlled); if(isGood) { ...`, - * the flow from `getHeader(...)` to the argument to `checkToken`, and then the flow from `checkToken`'s result to the condition of `if(isGood)`. + * the flow from `checkToken`'s result to the condition of `if(isGood)` matches the configuration `VerificationMethodToIfFlowConfig` above, + * and so the flow from `getHeader(...)` to the argument to `checkToken` matches this configuration. */ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } @@ -19,25 +40,16 @@ class VerificationMethodFlowConfig extends TaintTracking2::Configuration { override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { - exists(IfStmt is, Method m | is.getEnclosingCallable() = m | - ( - not m.getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - or - not m.getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - ) and - sink.asExpr() = is.getCondition() - ) - } - - override predicate isAdditionalTaintStep(DataFlow::Node prod, DataFlow::Node succ) { - exists(MethodAccess ma | + exists(MethodAccess ma, int i, VerificationMethodToIfFlowConfig vmtifc | + ma instanceof BarrierGuard + | ( - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") + ma.getMethod().getParameter(i).getName().regexpMatch("(?i).*(token|auth|referer|origin).*") or ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") ) and - ma.getAnArgument() = prod.asExpr() and - ma = succ.asExpr() + ma.getArgument(i) = sink.asExpr() and + vmtifc.hasFlow(exprNode(ma), _) ) } } From 4810308b16d9c6af09f2bababb64992482a328bc Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 14 Apr 2021 09:16:31 +0200 Subject: [PATCH 0192/1662] C#: Add `Customizations.qll` --- csharp/ql/src/Customizations.qll | 12 ++++++++++++ csharp/ql/src/csharp.qll | 1 + 2 files changed, 13 insertions(+) create mode 100644 csharp/ql/src/Customizations.qll diff --git a/csharp/ql/src/Customizations.qll b/csharp/ql/src/Customizations.qll new file mode 100644 index 000000000000..d5378a44f0de --- /dev/null +++ b/csharp/ql/src/Customizations.qll @@ -0,0 +1,12 @@ +/** + * Contains customizations to the standard library. + * + * This module is imported by `csharp.qll`, so any customizations defined here automatically + * apply to all queries. + * + * Typical examples of customizations include adding new subclasses of abstract classes such as + * the `RemoteFlowSource` and `SummarizedCallable` classes associated with the security queries + * to model frameworks that are not covered by the standard library. + */ + +import csharp diff --git a/csharp/ql/src/csharp.qll b/csharp/ql/src/csharp.qll index 3c821c9a4433..dc187fc8d923 100644 --- a/csharp/ql/src/csharp.qll +++ b/csharp/ql/src/csharp.qll @@ -2,6 +2,7 @@ * The default C# QL library. */ +import Customizations import semmle.code.csharp.Attribute import semmle.code.csharp.Callable import semmle.code.csharp.Comments From 36fe72246b9dc5d19397fab44c86187e81feaf1a Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 14 Apr 2021 09:22:16 +0200 Subject: [PATCH 0193/1662] C#: Add change note --- csharp/change-notes/2021-04-14-customizations.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 csharp/change-notes/2021-04-14-customizations.md diff --git a/csharp/change-notes/2021-04-14-customizations.md b/csharp/change-notes/2021-04-14-customizations.md new file mode 100644 index 000000000000..a2f957ca9230 --- /dev/null +++ b/csharp/change-notes/2021-04-14-customizations.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* A new library, `Customizations.qll`, has been added, which allows for global customizations that affect all queries. \ No newline at end of file From 2e40d013973f8439bcc9085ff9e651b3c1af2e5c Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 14 Apr 2021 13:01:31 +0200 Subject: [PATCH 0194/1662] Update cpp/ql/src/semmle/code/cpp/security/Overflow.qll Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- cpp/ql/src/semmle/code/cpp/security/Overflow.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll index 3f7a7b17b059..74b61c379257 100644 --- a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll +++ b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll @@ -98,7 +98,7 @@ VariableAccess varUse(LocalScopeVariable v) { result = v.getAnAccess() } * Holds if `e` potentially overflows and `use` is an operand of `e` that is not guarded. */ predicate missingGuardAgainstOverflow(Operation e, VariableAccess use) { - convertedExprMightOverflow(e) and + convertedExprMightOverflowPositively(e) and use = e.getAnOperand() and exists(LocalScopeVariable v | use.getTarget() = v | // overflow possible if large From bb447d7174141dc518e6ce90367121280fec1d80 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 14 Apr 2021 16:30:43 +0200 Subject: [PATCH 0195/1662] C++: Make sure missingGuardAgainstOverflow (and underflow) holds when range analysis fails to deduce a bound. --- cpp/ql/src/semmle/code/cpp/security/Overflow.qll | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll index 74b61c379257..465e64b9b6ca 100644 --- a/cpp/ql/src/semmle/code/cpp/security/Overflow.qll +++ b/cpp/ql/src/semmle/code/cpp/security/Overflow.qll @@ -6,6 +6,7 @@ import cpp import semmle.code.cpp.controlflow.Dominance import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis +import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils /** * Holds if the value of `use` is guarded using `abs`. @@ -98,7 +99,12 @@ VariableAccess varUse(LocalScopeVariable v) { result = v.getAnAccess() } * Holds if `e` potentially overflows and `use` is an operand of `e` that is not guarded. */ predicate missingGuardAgainstOverflow(Operation e, VariableAccess use) { - convertedExprMightOverflowPositively(e) and + ( + convertedExprMightOverflowPositively(e) + or + // Ensure that the predicate holds when range analysis cannot determine an upper bound + upperBound(e.getFullyConverted()) = exprMaxVal(e.getFullyConverted()) + ) and use = e.getAnOperand() and exists(LocalScopeVariable v | use.getTarget() = v | // overflow possible if large @@ -120,7 +126,12 @@ predicate missingGuardAgainstOverflow(Operation e, VariableAccess use) { * Holds if `e` potentially underflows and `use` is an operand of `e` that is not guarded. */ predicate missingGuardAgainstUnderflow(Operation e, VariableAccess use) { - convertedExprMightOverflowNegatively(e) and + ( + convertedExprMightOverflowNegatively(e) + or + // Ensure that the predicate holds when range analysis cannot determine a lower bound + lowerBound(e.getFullyConverted()) = exprMinVal(e.getFullyConverted()) + ) and use = e.getAnOperand() and exists(LocalScopeVariable v | use.getTarget() = v | // underflow possible if use is left operand and small From ed64ed3d8d64cb27f18488cef355fa23911ba302 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 14 Apr 2021 16:45:27 +0200 Subject: [PATCH 0196/1662] C++: Make exprMightOverflowPositively/exprMightOverFlowNegatively hold for unanalyzable expressions. This hopefully means that expressions that do not satisfy these predicates will never overflow/underflow. --- .../semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpp/ql/src/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll b/cpp/ql/src/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll index f3bbbddd97e4..d22a7f96a45f 100644 --- a/cpp/ql/src/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll +++ b/cpp/ql/src/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll @@ -1630,6 +1630,9 @@ private module SimpleRangeAnalysisCached { // bound of `x`, so the standard logic (above) does not work for // detecting whether it might overflow. getLowerBoundsImpl(expr.(PostfixDecrExpr)) = exprMinVal(expr) + or + // Expressions we cannot analyze could potentially overflow + not analyzableExpr(expr) } /** @@ -1657,6 +1660,9 @@ private module SimpleRangeAnalysisCached { // bound of `x`, so the standard logic (above) does not work for // detecting whether it might overflow. getUpperBoundsImpl(expr.(PostfixIncrExpr)) = exprMaxVal(expr) + or + // Expressions we cannot analyze could potentially overflow + not analyzableExpr(expr) } /** From a7fcf52267604a257937f2a18ba2be321debea9e Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 14 Apr 2021 15:36:01 +0000 Subject: [PATCH 0197/1662] Python: Fix bad join in `total_cost` The recent change to `appliesTo` lead to a perturbation in the join order of this predicate, which resulted in a cartesian product between `call` and `ctx` being created (before being filtered by `appliesTo`). By splitting the intermediate result into its own helper predicate, suitably marked to prevent inlining/magic, we prevent this from happening again. --- python/ql/src/semmle/python/pointsto/PointsToContext.qll | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/ql/src/semmle/python/pointsto/PointsToContext.qll b/python/ql/src/semmle/python/pointsto/PointsToContext.qll index 15b28d9cdb07..e85761e39169 100644 --- a/python/ql/src/semmle/python/pointsto/PointsToContext.qll +++ b/python/ql/src/semmle/python/pointsto/PointsToContext.qll @@ -100,10 +100,14 @@ private int total_call_cost(CallNode call) { if call_to_init_or_del(call) then result = 1 else result = call_cost(call) + splay_cost(call) } +pragma[nomagic] +private int relevant_call_cost(PointsToContext ctx, CallNode call) { + ctx.appliesTo(call) and result = total_call_cost(call) +} + pragma[noinline] private int total_cost(CallNode call, PointsToContext ctx) { - ctx.appliesTo(call) and - result = total_call_cost(call) + context_cost(ctx) + result = relevant_call_cost(ctx, call) + context_cost(ctx) } cached From 97186b3d30bcfc095cd4f30cc407330c094687a6 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 14 Apr 2021 19:30:58 +0300 Subject: [PATCH 0198/1662] Added comments for tests --- .../JakartaExpressionInjection.expected | 86 +++++++++---------- .../CWE-094/JakartaExpressionInjection.java | 9 ++ 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected index ef002aefdf5c..390871b54cf1 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.expected @@ -1,46 +1,46 @@ edges -| JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:24:31:24:40 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:30:24:30:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:37:24:37:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:44:24:44:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:54:24:54:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:61:24:61:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:68:24:68:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:77:24:77:33 | expression : String | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | JakartaExpressionInjection.java:86:24:86:33 | expression : String | -| JakartaExpressionInjection.java:30:24:30:33 | expression : String | JakartaExpressionInjection.java:32:28:32:37 | expression | -| JakartaExpressionInjection.java:37:24:37:33 | expression : String | JakartaExpressionInjection.java:39:32:39:41 | expression | -| JakartaExpressionInjection.java:44:24:44:33 | expression : String | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | -| JakartaExpressionInjection.java:54:24:54:33 | expression : String | JakartaExpressionInjection.java:56:32:56:41 | expression | -| JakartaExpressionInjection.java:61:24:61:33 | expression : String | JakartaExpressionInjection.java:63:43:63:52 | expression | -| JakartaExpressionInjection.java:68:24:68:33 | expression : String | JakartaExpressionInjection.java:72:13:72:13 | e | -| JakartaExpressionInjection.java:77:24:77:33 | expression : String | JakartaExpressionInjection.java:81:13:81:13 | e | -| JakartaExpressionInjection.java:86:24:86:33 | expression : String | JakartaExpressionInjection.java:90:13:90:13 | e | +| JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:25:31:25:40 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:32:24:32:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:40:24:40:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:48:24:48:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:59:24:59:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:67:24:67:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:75:24:75:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:85:24:85:33 | expression : String | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | JakartaExpressionInjection.java:95:24:95:33 | expression : String | +| JakartaExpressionInjection.java:32:24:32:33 | expression : String | JakartaExpressionInjection.java:34:28:34:37 | expression | +| JakartaExpressionInjection.java:40:24:40:33 | expression : String | JakartaExpressionInjection.java:42:32:42:41 | expression | +| JakartaExpressionInjection.java:48:24:48:33 | expression : String | JakartaExpressionInjection.java:53:13:53:28 | lambdaExpression | +| JakartaExpressionInjection.java:59:24:59:33 | expression : String | JakartaExpressionInjection.java:61:32:61:41 | expression | +| JakartaExpressionInjection.java:67:24:67:33 | expression : String | JakartaExpressionInjection.java:69:43:69:52 | expression | +| JakartaExpressionInjection.java:75:24:75:33 | expression : String | JakartaExpressionInjection.java:79:13:79:13 | e | +| JakartaExpressionInjection.java:85:24:85:33 | expression : String | JakartaExpressionInjection.java:89:13:89:13 | e | +| JakartaExpressionInjection.java:95:24:95:33 | expression : String | JakartaExpressionInjection.java:99:13:99:13 | e | nodes -| JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| JakartaExpressionInjection.java:24:31:24:40 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:30:24:30:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:32:28:32:37 | expression | semmle.label | expression | -| JakartaExpressionInjection.java:37:24:37:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:39:32:39:41 | expression | semmle.label | expression | -| JakartaExpressionInjection.java:44:24:44:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | semmle.label | lambdaExpression | -| JakartaExpressionInjection.java:54:24:54:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:56:32:56:41 | expression | semmle.label | expression | -| JakartaExpressionInjection.java:61:24:61:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:63:43:63:52 | expression | semmle.label | expression | -| JakartaExpressionInjection.java:68:24:68:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:72:13:72:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:77:24:77:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:81:13:81:13 | e | semmle.label | e | -| JakartaExpressionInjection.java:86:24:86:33 | expression : String | semmle.label | expression : String | -| JakartaExpressionInjection.java:90:13:90:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| JakartaExpressionInjection.java:25:31:25:40 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:32:24:32:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:34:28:34:37 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:40:24:40:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:42:32:42:41 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:48:24:48:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:53:13:53:28 | lambdaExpression | semmle.label | lambdaExpression | +| JakartaExpressionInjection.java:59:24:59:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:61:32:61:41 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:67:24:67:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:69:43:69:52 | expression | semmle.label | expression | +| JakartaExpressionInjection.java:75:24:75:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:79:13:79:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:85:24:85:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:89:13:89:13 | e | semmle.label | e | +| JakartaExpressionInjection.java:95:24:95:33 | expression : String | semmle.label | expression : String | +| JakartaExpressionInjection.java:99:13:99:13 | e | semmle.label | e | #select -| JakartaExpressionInjection.java:32:28:32:37 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:32:28:32:37 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:39:32:39:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:39:32:39:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:49:13:49:28 | lambdaExpression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:56:32:56:41 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:56:32:56:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:63:43:63:52 | expression | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:63:43:63:52 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:72:13:72:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:72:13:72:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:81:13:81:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:81:13:81:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | -| JakartaExpressionInjection.java:90:13:90:13 | e | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:90:13:90:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:22:25:22:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:34:28:34:37 | expression | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:34:28:34:37 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:42:32:42:41 | expression | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:42:32:42:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:53:13:53:28 | lambdaExpression | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:53:13:53:28 | lambdaExpression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:61:32:61:41 | expression | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:61:32:61:41 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:69:43:69:52 | expression | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:69:43:69:52 | expression | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:79:13:79:13 | e | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:79:13:79:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:89:13:89:13 | e | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:89:13:89:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | +| JakartaExpressionInjection.java:99:13:99:13 | e | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) : InputStream | JakartaExpressionInjection.java:99:13:99:13 | e | Jakarta Expression Language injection from $@. | JakartaExpressionInjection.java:23:25:23:47 | getInputStream(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java index 2e1d1e55b020..ae5b6a8d5e41 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JakartaExpressionInjection.java @@ -15,6 +15,7 @@ public class JakartaExpressionInjection { + // calls a consumer with a string received from a socket private static void testWithSocket(Consumer action) throws IOException { try (ServerSocket serverSocket = new ServerSocket(0)) { try (Socket socket = serverSocket.accept()) { @@ -26,6 +27,7 @@ private static void testWithSocket(Consumer action) throws IOException { } } + // BAD (untrusted input to ELProcessor.eval) private static void testWithELProcessorEval() throws IOException { testWithSocket(expression -> { ELProcessor processor = new ELProcessor(); @@ -33,6 +35,7 @@ private static void testWithELProcessorEval() throws IOException { }); } + // BAD (untrusted input to ELProcessor.getValue) private static void testWithELProcessorGetValue() throws IOException { testWithSocket(expression -> { ELProcessor processor = new ELProcessor(); @@ -40,6 +43,7 @@ private static void testWithELProcessorGetValue() throws IOException { }); } + // BAD (untrusted input to LambdaExpression.invoke) private static void testWithLambdaExpressionInvoke() throws IOException { testWithSocket(expression -> { ExpressionFactory factory = ELManager.getExpressionFactory(); @@ -50,6 +54,7 @@ private static void testWithLambdaExpressionInvoke() throws IOException { }); } + // BAD (untrusted input to ELProcessor.setValue) private static void testWithELProcessorSetValue() throws IOException { testWithSocket(expression -> { ELProcessor processor = new ELProcessor(); @@ -57,6 +62,7 @@ private static void testWithELProcessorSetValue() throws IOException { }); } + // BAD (untrusted input to ELProcessor.setVariable) private static void testWithELProcessorSetVariable() throws IOException { testWithSocket(expression -> { ELProcessor processor = new ELProcessor(); @@ -64,6 +70,7 @@ private static void testWithELProcessorSetVariable() throws IOException { }); } + // BAD (untrusted input to ValueExpression.getValue when it was created by JUEL) private static void testWithJuelValueExpressionGetValue() throws IOException { testWithSocket(expression -> { ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); @@ -73,6 +80,7 @@ private static void testWithJuelValueExpressionGetValue() throws IOException { }); } + // BAD (untrusted input to ValueExpression.setValue when it was created by JUEL) private static void testWithJuelValueExpressionSetValue() throws IOException { testWithSocket(expression -> { ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); @@ -82,6 +90,7 @@ private static void testWithJuelValueExpressionSetValue() throws IOException { }); } + // BAD (untrusted input to MethodExpression.invoke when it was created by JUEL) private static void testWithJuelMethodExpressionInvoke() throws IOException { testWithSocket(expression -> { ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl(); From 897d12420b6fa5f22b0716af82af65a5db00bb56 Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 14 Apr 2021 16:49:12 +0000 Subject: [PATCH 0199/1662] Python: Prevent bad join in `isinstanceEvaluatesTo` In some cases, we were joining the result of `val.getClass()` against the first argument of `Types::improperSubclass` before filtering out the vast majority of tuples by the call to `isinstance_call`. To fix this, we let `isinstance_call` take care of figuring out the class of the value being tested. As a bonus, this cleans up the only other place where `isinstance_call` is used, where we _also_ want to know the class of the value being tested in the `isinstance` call. --- python/ql/src/semmle/python/pointsto/PointsTo.qll | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/ql/src/semmle/python/pointsto/PointsTo.qll b/python/ql/src/semmle/python/pointsto/PointsTo.qll index 9706c6846f31..48bbb283d078 100644 --- a/python/ql/src/semmle/python/pointsto/PointsTo.qll +++ b/python/ql/src/semmle/python/pointsto/PointsTo.qll @@ -1853,8 +1853,10 @@ module Expressions { private boolean isinstanceEvaluatesTo( CallNode call, PointsToContext context, ControlFlowNode use, ObjectInternal val ) { - exists(ObjectInternal cls | isinstance_call(call, use, context, val, cls) | - result = Types::improperSubclass(val.getClass(), cls) + exists(ObjectInternal cls, ObjectInternal val_cls | + isinstance_call(call, use, context, val, val_cls, cls) + | + result = Types::improperSubclass(val_cls, cls) or val = ObjectInternal::unknown() and result = maybe() or @@ -1866,12 +1868,13 @@ module Expressions { private predicate isinstance_call( CallNode call, ControlFlowNode use, PointsToContext context, ObjectInternal val, - ObjectInternal cls + ObjectInternal val_cls, ObjectInternal cls ) { exists(ControlFlowNode func, ControlFlowNode arg1 | call2(call, func, use, arg1) and points_to_isinstance(func, context) and PointsToInternal::pointsTo(use, context, val, _) and + val_cls = val.getClass() and PointsToInternal::pointsTo(arg1, context, cls, _) ) } @@ -1993,10 +1996,7 @@ module Expressions { exists(ObjectInternal sup_or_tuple | issubclass_call(_, _, _, sub, sup_or_tuple) and sub.isClass() = true or - exists(ObjectInternal val | - isinstance_call(_, _, _, val, sup_or_tuple) and - sub = val.getClass() - ) + exists(ObjectInternal val | isinstance_call(_, _, _, val, sub, sup_or_tuple)) | sup = sup_or_tuple or From b30ae3980c0a067d525e5c957497a69498bb6b0b Mon Sep 17 00:00:00 2001 From: ihsinme Date: Wed, 14 Apr 2021 20:48:20 +0300 Subject: [PATCH 0200/1662] Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql --- .../InsufficientControlFlowManagementAfterRefactoringTheCode.ql | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql index dc5b2225a623..163305dd0399 100644 --- a/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql +++ b/cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementAfterRefactoringTheCode.ql @@ -57,6 +57,7 @@ class UsingArithmeticInComparison extends BinaryArithmeticOperation { not this.getAChild*().isConstant() and not this.getParent*() instanceof Call and not this.getParent*() instanceof AssignExpr and + not this.getParent*() instanceof ArrayExpr and not this.getParent*() instanceof RemExpr and not this.getParent*() instanceof AssignBitwiseOperation and not this.getParent*() instanceof AssignArithmeticOperation and From b3bdf89fc2230f8e280036166a249c6303106d61 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 10:25:40 +0800 Subject: [PATCH 0201/1662] rm VerificationMethodFlowConfig, use springframework-5.2.3 stub --- .../Security/CWE/CWE-352/JsonpInjection.java | 61 +---- .../Security/CWE/CWE-352/JsonpInjection.qhelp | 5 +- .../CWE/CWE-352/JsonpInjectionLib.qll | 51 ---- .../JsonpController.java | 61 +---- .../JsonpInjection.expected | 25 +- .../JsonpInjection.qlref | 0 .../options | 1 - .../JsonpController.java | 218 ------------------ .../JsonpInjection.expected | 81 ------- .../JsonpInjection.qlref | 1 - .../JsonpInjectionServlet1.java | 64 ----- .../JsonpInjectionServlet2.java | 50 ---- .../options | 1 - .../query-tests/security/CWE-352/options | 1 + .../stereotype/Controller.java | 14 -- .../core/io/InputStreamSource.java | 8 - .../org/springframework/core/io/Resource.java | 46 ---- .../org/springframework/lang/Nullable.java | 13 -- .../springframework/util/FileCopyUtils.java | 53 ----- .../org/springframework/util/StringUtils.java | 8 - .../web/bind/annotation/RequestMapping.java | 32 --- .../web/bind/annotation/RequestMethod.java | 15 -- .../web/bind/annotation/RequestParam.java | 23 -- .../web/multipart/MultipartFile.java | 38 --- java/ql/test/stubs/springframework-5.2.3.zip | Bin 0 -> 57066 bytes .../boot/SpringBootConfiguration.java | 10 + .../autoconfigure/SpringBootApplication.java | 12 + .../context/annotation/Bean.java | 10 + .../context/annotation/Configuration.java | 7 + .../core/annotation/AliasFor.java | 0 .../HttpInvokerServiceExporter.java | 8 + .../RemoteInvocationSerializingExporter.java | 3 + .../stereotype/Controller.java | 14 +- .../org/springframework/util/ObjectUtils.java | 202 ++++++++++++++++ .../org/springframework/util/StringUtils.java | 30 +++ .../web/bind/annotation/GetMapping.java | 0 .../web/bind/annotation/Mapping.java | 0 .../web/bind/annotation/RequestMapping.java | 23 +- .../web/bind/annotation/RequestParam.java | 23 +- .../web/bind/annotation/ResponseBody.java | 0 40 files changed, 346 insertions(+), 866 deletions(-) rename java/ql/test/experimental/query-tests/security/CWE-352/{JsonpInjectionWithSpringController => }/JsonpController.java (76%) rename java/ql/test/experimental/query-tests/security/CWE-352/{JsonpInjectionWithSpringController => }/JsonpInjection.expected (76%) rename java/ql/test/experimental/query-tests/security/CWE-352/{JsonpInjectionWithSpringController => }/JsonpInjection.qlref (100%) delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options create mode 100644 java/ql/test/experimental/query-tests/security/CWE-352/options delete mode 100644 java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java delete mode 100644 java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMethod.java delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java delete mode 100644 java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java create mode 100644 java/ql/test/stubs/springframework-5.2.3.zip create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/SpringBootConfiguration.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/autoconfigure/SpringBootApplication.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Bean.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Configuration.java rename java/ql/test/stubs/{spring-core-5.3.2 => springframework-5.2.3}/org/springframework/core/annotation/AliasFor.java (100%) create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java rename java/ql/test/stubs/{spring-web-5.3.2 => springframework-5.2.3}/org/springframework/web/bind/annotation/GetMapping.java (100%) rename java/ql/test/stubs/{spring-web-5.3.2 => springframework-5.2.3}/org/springframework/web/bind/annotation/Mapping.java (100%) rename java/ql/test/stubs/{spring-web-5.3.2 => springframework-5.2.3}/org/springframework/web/bind/annotation/ResponseBody.java (100%) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java index 8e2a0c9005ff..8f39efbc2b6a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.java @@ -105,52 +105,9 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") - @ResponseBody - public String bad8(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); //Just check. - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - - @GetMapping(value = "jsonp9") - @ResponseBody - public String good1(HttpServletRequest request) { - String resultStr = null; - String referer = request.getParameter("referer"); - if (verifReferer(referer)){ - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - return "error"; - } - - - @GetMapping(value = "jsonp10") - @ResponseBody - public String good2(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); - if (result){ - return ""; - } - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - @RequestMapping(value = "jsonp11") @ResponseBody - public String good3(HttpServletRequest request) { + public String good1(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); @@ -161,7 +118,7 @@ public String good3(HttpServletRequest request) { @RequestMapping(value = "jsonp12") @ResponseBody - public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + public String good2(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ return "upload file error"; } @@ -201,18 +158,4 @@ public static String readPostContent(HttpServletRequest request){ public static String getJsonStr(Object result) { return JSONObject.toJSONString(result); } - - public static boolean verifToken(String token){ - if (token != "xxxx"){ - return false; - } - return true; - } - - public static boolean verifReferer(String str){ - if (str != "xxxx"){ - return false; - } - return true; - } } \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp index 2a3f0861cdf9..e8fb89d3989f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjection.qhelp @@ -14,10 +14,9 @@ When there is a cross-domain problem, this could lead to information leakage.

    -

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad8, +

    The following examples show the bad case and the good case respectively. Bad cases, such as bad1 to bad7, will cause information leakage when there are cross-domain problems. In a good case, for example, in the good1 -method and the good2 method, using the verifToken method to do random token verification -solves the problem of information leakage even in the presence of cross-domain access issues.

    +method and the good2 method, When these two methods process the request, there must be a request body in the request, which does not meet the conditions of Jsonp injection.

    diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 6b989c3c0cff..8220745e6672 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -7,62 +7,11 @@ import semmle.code.java.dataflow.DataFlow3 import semmle.code.java.dataflow.FlowSources import semmle.code.java.frameworks.spring.SpringController -/** A data flow configuration tracing flow from the result of a method whose name includes token/auth/referer/origin to an if-statement condition. */ -class VerificationMethodToIfFlowConfig extends DataFlow3::Configuration { - VerificationMethodToIfFlowConfig() { this = "VerificationMethodToIfFlowConfig" } - - override predicate isSource(DataFlow::Node src) { - exists(MethodAccess ma | ma instanceof BarrierGuard | - ( - ma.getMethod().getAParameter().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - or - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - ) and - ma = src.asExpr() - ) - } - - override predicate isSink(DataFlow::Node sink) { - exists(IfStmt is | is.getCondition() = sink.asExpr()) - } -} - -/** - * Taint-tracking configuration tracing flow from untrusted inputs to an argument of a function whose result is used as an if-statement condition. - * - * For example, in the context `String userControlled = request.getHeader("xyz"); boolean isGood = checkToken(userControlled); if(isGood) { ...`, - * the flow from `checkToken`'s result to the condition of `if(isGood)` matches the configuration `VerificationMethodToIfFlowConfig` above, - * and so the flow from `getHeader(...)` to the argument to `checkToken` matches this configuration. - */ -class VerificationMethodFlowConfig extends TaintTracking2::Configuration { - VerificationMethodFlowConfig() { this = "VerificationMethodFlowConfig" } - - override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource } - - override predicate isSink(DataFlow::Node sink) { - exists(MethodAccess ma, int i, VerificationMethodToIfFlowConfig vmtifc | - ma instanceof BarrierGuard - | - ( - ma.getMethod().getParameter(i).getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - or - ma.getMethod().getName().regexpMatch("(?i).*(token|auth|referer|origin).*") - ) and - ma.getArgument(i) = sink.asExpr() and - vmtifc.hasFlow(exprNode(ma), _) - ) - } -} - /** * A method that is called to handle an HTTP GET request. */ abstract class RequestGetMethod extends Method { RequestGetMethod() { - not exists(DataFlow::Node source, DataFlow::Node sink, VerificationMethodFlowConfig vmfc | - vmfc.hasFlow(source, sink) and - any(this).polyCalls*(source.getEnclosingCallable()) - ) and not exists(MethodAccess ma | ma.getMethod() instanceof ServletRequestGetBodyMethod and any(this).polyCalls*(ma.getEnclosingCallable()) diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java similarity index 76% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java index 4c60b356cfb4..c7fd850bb093 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpController.java +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpController.java @@ -105,52 +105,9 @@ public String bad7(HttpServletRequest request) { return resultStr; } - @GetMapping(value = "jsonp8") - @ResponseBody - public String bad8(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); //Just check. - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - - @GetMapping(value = "jsonp9") - @ResponseBody - public String good1(HttpServletRequest request) { - String resultStr = null; - String referer = request.getParameter("referer"); - if (verifReferer(referer)){ - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - return "error"; - } - - - @GetMapping(value = "jsonp10") - @ResponseBody - public String good2(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); - if (result){ - return ""; - } - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - @RequestMapping(value = "jsonp11") @ResponseBody - public String good3(HttpServletRequest request) { + public String good1(HttpServletRequest request) { JSONObject parameterObj = readToJSONObect(request); String resultStr = null; String jsonpCallback = request.getParameter("jsonpCallback"); @@ -161,7 +118,7 @@ public String good3(HttpServletRequest request) { @RequestMapping(value = "jsonp12") @ResponseBody - public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { + public String good2(@RequestParam("file") MultipartFile file,HttpServletRequest request) { if(null == file){ return "upload file error"; } @@ -201,18 +158,4 @@ public static String readPostContent(HttpServletRequest request){ public static String getJsonStr(Object result) { return JSONObject.toJSONString(result); } - - public static boolean verifToken(String token){ - if (token != "xxxx"){ - return false; - } - return true; - } - - public static boolean verifReferer(String str){ - if (str != "xxxx"){ - return false; - } - return true; - } } \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected similarity index 76% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected index 83f2b7f206a5..14912328a1e1 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.expected @@ -13,12 +13,8 @@ edges | JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | | JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | | JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | +| JsonpController.java:115:21:115:54 | ... + ... : String | JsonpController.java:116:16:116:24 | resultStr | +| JsonpController.java:130:21:130:54 | ... + ... : String | JsonpController.java:131:16:131:24 | resultStr | nodes | JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | @@ -48,18 +44,10 @@ nodes | JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | | JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | | JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:115:21:115:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:116:16:116:24 | resultStr | semmle.label | resultStr | +| JsonpController.java:130:21:130:54 | ... + ... : String | semmle.label | ... + ... : String | +| JsonpController.java:131:16:131:24 | resultStr | semmle.label | resultStr | #select | JsonpController.java:37:16:37:24 | resultStr | JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:33:32:33:68 | getParameter(...) | this user input | | JsonpController.java:46:16:46:24 | resultStr | JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:44:32:44:68 | getParameter(...) | this user input | @@ -68,4 +56,3 @@ nodes | JsonpController.java:80:20:80:28 | resultStr | JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:73:32:73:68 | getParameter(...) | this user input | | JsonpController.java:94:20:94:28 | resultStr | JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:87:32:87:68 | getParameter(...) | this user input | | JsonpController.java:105:16:105:24 | resultStr | JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:101:32:101:68 | getParameter(...) | this user input | -| JsonpController.java:117:16:117:24 | resultStr | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:114:32:114:68 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/JsonpInjection.qlref rename to java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjection.qlref diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options deleted file mode 100644 index c53e31e467fa..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringController/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java deleted file mode 100644 index 4c60b356cfb4..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpController.java +++ /dev/null @@ -1,218 +0,0 @@ -import com.alibaba.fastjson.JSONObject; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.gson.Gson; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; - -@Controller -public class JsonpController { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - @GetMapping(value = "jsonp1") - @ResponseBody - public String bad1(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp2") - @ResponseBody - public String bad2(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - resultStr = jsonpCallback + "(" + JSONObject.toJSONString(hashMap) + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp3") - @ResponseBody - public String bad3(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp4") - @ResponseBody - public String bad4(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @GetMapping(value = "jsonp5") - @ResponseBody - public void bad5(HttpServletRequest request, - HttpServletResponse response) throws Exception { - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @GetMapping(value = "jsonp6") - @ResponseBody - public void bad6(HttpServletRequest request, - HttpServletResponse response) throws Exception { - String jsonpCallback = request.getParameter("jsonpCallback"); - PrintWriter pw = null; - ObjectMapper mapper = new ObjectMapper(); - String result = mapper.writeValueAsString(hashMap); - String resultStr = null; - pw = response.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - } - - @RequestMapping(value = "jsonp7", method = RequestMethod.GET) - @ResponseBody - public String bad7(HttpServletRequest request) { - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - resultStr = jsonpCallback + "(" + result + ")"; - return resultStr; - } - - @GetMapping(value = "jsonp8") - @ResponseBody - public String bad8(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); //Just check. - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - - @GetMapping(value = "jsonp9") - @ResponseBody - public String good1(HttpServletRequest request) { - String resultStr = null; - String referer = request.getParameter("referer"); - if (verifReferer(referer)){ - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - return "error"; - } - - - @GetMapping(value = "jsonp10") - @ResponseBody - public String good2(HttpServletRequest request) { - String resultStr = null; - String token = request.getParameter("token"); - boolean result = verifToken(token); - if (result){ - return ""; - } - String jsonpCallback = request.getParameter("jsonpCallback"); - String jsonStr = getJsonStr(hashMap); - resultStr = jsonpCallback + "(" + jsonStr + ")"; - return resultStr; - } - - @RequestMapping(value = "jsonp11") - @ResponseBody - public String good3(HttpServletRequest request) { - JSONObject parameterObj = readToJSONObect(request); - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - @RequestMapping(value = "jsonp12") - @ResponseBody - public String good4(@RequestParam("file") MultipartFile file,HttpServletRequest request) { - if(null == file){ - return "upload file error"; - } - String fileName = file.getOriginalFilename(); - System.out.println("file operations"); - String resultStr = null; - String jsonpCallback = request.getParameter("jsonpCallback"); - String restr = JSONObject.toJSONString(hashMap); - resultStr = jsonpCallback + "(" + restr + ");"; - return resultStr; - } - - public static JSONObject readToJSONObect(HttpServletRequest request){ - String jsonText = readPostContent(request); - JSONObject jsonObj = JSONObject.parseObject(jsonText, JSONObject.class); - return jsonObj; - } - - public static String readPostContent(HttpServletRequest request){ - BufferedReader in= null; - String content = null; - String line = null; - try { - in = new BufferedReader(new InputStreamReader(request.getInputStream(),"UTF-8")); - StringBuilder buf = new StringBuilder(); - while ((line = in.readLine()) != null) { - buf.append(line); - } - content = buf.toString(); - } catch (IOException e) { - e.printStackTrace(); - } - String uri = request.getRequestURI(); - return content; - } - - public static String getJsonStr(Object result) { - return JSONObject.toJSONString(result); - } - - public static boolean verifToken(String token){ - if (token != "xxxx"){ - return false; - } - return true; - } - - public static boolean verifReferer(String str){ - if (str != "xxxx"){ - return false; - } - return true; - } -} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected deleted file mode 100644 index dfbe0628760b..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.expected +++ /dev/null @@ -1,81 +0,0 @@ -edges -| JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | -| JsonpController.java:36:21:36:54 | ... + ... : String | JsonpController.java:37:16:37:24 | resultStr | -| JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | -| JsonpController.java:45:21:45:80 | ... + ... : String | JsonpController.java:46:16:46:24 | resultStr | -| JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | -| JsonpController.java:55:21:55:55 | ... + ... : String | JsonpController.java:56:16:56:24 | resultStr | -| JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | -| JsonpController.java:65:21:65:54 | ... + ... : String | JsonpController.java:66:16:66:24 | resultStr | -| JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | -| JsonpController.java:79:21:79:54 | ... + ... : String | JsonpController.java:80:20:80:28 | resultStr | -| JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | -| JsonpController.java:93:21:93:54 | ... + ... : String | JsonpController.java:94:20:94:28 | resultStr | -| JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | -| JsonpController.java:104:21:104:54 | ... + ... : String | JsonpController.java:105:16:105:24 | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:116:21:116:55 | ... + ... : String | JsonpController.java:117:16:117:24 | resultStr | -| JsonpController.java:129:25:129:59 | ... + ... : String | JsonpController.java:130:20:130:28 | resultStr | -| JsonpController.java:147:21:147:55 | ... + ... : String | JsonpController.java:148:16:148:24 | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | JsonpController.java:159:16:159:24 | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | JsonpController.java:174:16:174:24 | resultStr | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | JsonpInjectionServlet1.java:45:24:45:32 | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | -nodes -| JsonpController.java:33:32:33:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:36:21:36:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:37:16:37:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:44:32:44:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:45:21:45:80 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:46:16:46:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:53:32:53:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:55:21:55:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:56:16:56:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:63:32:63:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:65:21:65:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:66:16:66:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:73:32:73:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:79:21:79:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:80:20:80:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:87:32:87:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:93:21:93:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:94:20:94:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:101:32:101:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:104:21:104:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:105:16:105:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:114:32:114:68 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpController.java:116:21:116:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:117:16:117:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:129:25:129:59 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:130:20:130:28 | resultStr | semmle.label | resultStr | -| JsonpController.java:147:21:147:55 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:148:16:148:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:158:21:158:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:159:16:159:24 | resultStr | semmle.label | resultStr | -| JsonpController.java:173:21:173:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpController.java:174:16:174:24 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet1.java:44:25:44:62 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet1.java:45:24:45:32 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JsonpInjectionServlet2.java:38:21:38:54 | ... + ... : String | semmle.label | ... + ... : String | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | semmle.label | resultStr | -#select -| JsonpController.java:37:16:37:24 | resultStr | JsonpController.java:33:32:33:68 | getParameter(...) : String | JsonpController.java:37:16:37:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:33:32:33:68 | getParameter(...) | this user input | -| JsonpController.java:46:16:46:24 | resultStr | JsonpController.java:44:32:44:68 | getParameter(...) : String | JsonpController.java:46:16:46:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:44:32:44:68 | getParameter(...) | this user input | -| JsonpController.java:56:16:56:24 | resultStr | JsonpController.java:53:32:53:68 | getParameter(...) : String | JsonpController.java:56:16:56:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:53:32:53:68 | getParameter(...) | this user input | -| JsonpController.java:66:16:66:24 | resultStr | JsonpController.java:63:32:63:68 | getParameter(...) : String | JsonpController.java:66:16:66:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:63:32:63:68 | getParameter(...) | this user input | -| JsonpController.java:80:20:80:28 | resultStr | JsonpController.java:73:32:73:68 | getParameter(...) : String | JsonpController.java:80:20:80:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:73:32:73:68 | getParameter(...) | this user input | -| JsonpController.java:94:20:94:28 | resultStr | JsonpController.java:87:32:87:68 | getParameter(...) : String | JsonpController.java:94:20:94:28 | resultStr | Jsonp response might include code from $@. | JsonpController.java:87:32:87:68 | getParameter(...) | this user input | -| JsonpController.java:105:16:105:24 | resultStr | JsonpController.java:101:32:101:68 | getParameter(...) : String | JsonpController.java:105:16:105:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:101:32:101:68 | getParameter(...) | this user input | -| JsonpController.java:117:16:117:24 | resultStr | JsonpController.java:114:32:114:68 | getParameter(...) : String | JsonpController.java:117:16:117:24 | resultStr | Jsonp response might include code from $@. | JsonpController.java:114:32:114:68 | getParameter(...) | this user input | -| JsonpInjectionServlet2.java:39:20:39:28 | resultStr | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) : String | JsonpInjectionServlet2.java:39:20:39:28 | resultStr | Jsonp response might include code from $@. | JsonpInjectionServlet2.java:31:32:31:64 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref deleted file mode 100644 index 3f5fc4506696..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/Security/CWE/CWE-352/JsonpInjection.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java deleted file mode 100644 index 14ef76275b1d..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet1.java +++ /dev/null @@ -1,64 +0,0 @@ -import com.google.gson.Gson; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class JsonpInjectionServlet1 extends HttpServlet { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - private static final long serialVersionUID = 1L; - - private String key = "test"; - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - doPost(req, resp); - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("application/json"); - String jsonpCallback = req.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String jsonResult = gson.toJson(hashMap); - - String referer = req.getHeader("Referer"); - - boolean result = verifReferer(referer); - - // good - if (result){ - String resultStr = null; - pw = resp.getWriter(); - resultStr = jsonpCallback + "(" + jsonResult + ")"; - pw.println(resultStr); - pw.flush(); - } - } - - public static boolean verifReferer(String referer){ - if (!referer.startsWith("http://test.com/")){ - return false; - } - return true; - } - - @Override - public void init(ServletConfig config) throws ServletException { - this.key = config.getInitParameter("key"); - System.out.println("åˆå§‹åŒ–" + this.key); - super.init(config); - } - -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java deleted file mode 100644 index bbfbc2dc4360..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/JsonpInjectionServlet2.java +++ /dev/null @@ -1,50 +0,0 @@ -import com.google.gson.Gson; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class JsonpInjectionServlet2 extends HttpServlet { - - private static HashMap hashMap = new HashMap(); - - static { - hashMap.put("username","admin"); - hashMap.put("password","123456"); - } - - private static final long serialVersionUID = 1L; - - private String key = "test"; - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - doPost(req, resp); - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - resp.setContentType("application/json"); - String jsonpCallback = req.getParameter("jsonpCallback"); - PrintWriter pw = null; - Gson gson = new Gson(); - String result = gson.toJson(hashMap); - - String resultStr = null; - pw = resp.getWriter(); - resultStr = jsonpCallback + "(" + result + ")"; - pw.println(resultStr); - pw.flush(); - } - - @Override - public void init(ServletConfig config) throws ServletException { - this.key = config.getInitParameter("key"); - System.out.println("åˆå§‹åŒ–" + this.key); - super.init(config); - } - -} diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options b/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options deleted file mode 100644 index c53e31e467fa..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-352/JsonpInjectionWithSpringControllerAndServlet/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../../stubs/servlet-api-2.4:${testdir}/../../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../../stubs/gson-2.8.6/:${testdir}/../../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../../stubs/spring-context-5.3.2/:${testdir}/../../../../../stubs/spring-web-5.3.2/:${testdir}/../../../../../stubs/spring-core-5.3.2/:${testdir}/../../../../../stubs/tomcat-embed-core-9.0.41/ diff --git a/java/ql/test/experimental/query-tests/security/CWE-352/options b/java/ql/test/experimental/query-tests/security/CWE-352/options new file mode 100644 index 000000000000..5e5f10f69456 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-352/options @@ -0,0 +1 @@ + //semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/fastjson-1.2.74/:${testdir}/../../../../stubs/gson-2.8.6/:${testdir}/../../../../stubs/jackson-databind-2.10/:${testdir}/../../../../stubs/springframework-5.2.3/ diff --git a/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java b/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java deleted file mode 100644 index 9b1751fa2ae3..000000000000 --- a/java/ql/test/stubs/spring-context-5.3.2/org/springframework/stereotype/Controller.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.springframework.stereotype; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface Controller { - String value() default ""; -} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java deleted file mode 100644 index 372d06cc7383..000000000000 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/InputStreamSource.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.springframework.core.io; - -import java.io.IOException; -import java.io.InputStream; - -public interface InputStreamSource { - InputStream getInputStream() throws IOException; -} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java deleted file mode 100644 index 6bd357f2228e..000000000000 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/io/Resource.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.springframework.core.io; - -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.nio.channels.Channels; -import java.nio.channels.ReadableByteChannel; -import org.springframework.lang.Nullable; - -public interface Resource extends InputStreamSource { - boolean exists(); - - default boolean isReadable() { - return this.exists(); - } - - default boolean isOpen() { - return false; - } - - default boolean isFile() { - return false; - } - - URL getURL() throws IOException; - - URI getURI() throws IOException; - - File getFile() throws IOException; - - default ReadableByteChannel readableChannel() throws IOException { - return null; - } - - long contentLength() throws IOException; - - long lastModified() throws IOException; - - Resource createRelative(String var1) throws IOException; - - @Nullable - String getFilename(); - - String getDescription(); -} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java deleted file mode 100644 index 44bdae10fda5..000000000000 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/lang/Nullable.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.springframework.lang; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface Nullable { -} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java deleted file mode 100644 index 78d384d72660..000000000000 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/FileCopyUtils.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.springframework.util; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.Closeable; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Reader; -import java.io.StringWriter; -import java.io.Writer; -import java.nio.file.Files; -import org.springframework.lang.Nullable; - -public abstract class FileCopyUtils { - public static final int BUFFER_SIZE = 4096; - - public FileCopyUtils() { - } - - public static int copy(File in, File out) throws IOException { - return 1; - } - - public static void copy(byte[] in, File out) throws IOException {} - - public static byte[] copyToByteArray(File in) throws IOException { - return null; - } - - public static int copy(InputStream in, OutputStream out) throws IOException { - return 1; - } - - public static void copy(byte[] in, OutputStream out) throws IOException {} - - public static byte[] copyToByteArray(@Nullable InputStream in) throws IOException { - return null; - } - - public static int copy(Reader in, Writer out) throws IOException { - return 1; - } - - public static void copy(String in, Writer out) throws IOException {} - - public static String copyToString(@Nullable Reader in) throws IOException { - return null; - } - - private static void close(Closeable closeable) {} -} diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java b/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java deleted file mode 100644 index 6ea27bbffa2f..000000000000 --- a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/util/StringUtils.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.springframework.util; - -public abstract class StringUtils { - - public static boolean isEmpty(Object str) { - return str == null || "".equals(str); - } -} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java deleted file mode 100644 index ed692a03063c..000000000000 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMapping.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.springframework.web.bind.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import org.springframework.core.annotation.AliasFor; - -@Target({ElementType.TYPE, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Mapping -public @interface RequestMapping { - String name() default ""; - - @AliasFor("path") - String[] value() default {}; - - @AliasFor("value") - String[] path() default {}; - - RequestMethod[] method() default {}; - - String[] params() default {}; - - String[] headers() default {}; - - String[] consumes() default {}; - - String[] produces() default {}; -} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMethod.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMethod.java deleted file mode 100644 index 78c90a6ef75b..000000000000 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestMethod.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.springframework.web.bind.annotation; - -public enum RequestMethod { - GET, - HEAD, - POST, - PUT, - PATCH, - DELETE, - OPTIONS, - TRACE; - - private RequestMethod() { - } -} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java deleted file mode 100644 index 56094811c376..000000000000 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/RequestParam.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.springframework.web.bind.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import org.springframework.core.annotation.AliasFor; - -@Target({ElementType.PARAMETER}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface RequestParam { - @AliasFor("name") - String value() default ""; - - @AliasFor("value") - String name() default ""; - - boolean required() default true; - - String defaultValue() default "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"; -} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java b/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java deleted file mode 100644 index 93ea3439fede..000000000000 --- a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/multipart/MultipartFile.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.springframework.web.multipart; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import org.springframework.core.io.InputStreamSource; -import org.springframework.core.io.Resource; -import org.springframework.lang.Nullable; -import org.springframework.util.FileCopyUtils; - -public interface MultipartFile extends InputStreamSource { - String getName(); - - @Nullable - String getOriginalFilename(); - - @Nullable - String getContentType(); - - boolean isEmpty(); - - long getSize(); - - byte[] getBytes() throws IOException; - - InputStream getInputStream() throws IOException; - - default Resource getResource() { - return null; - } - - void transferTo(File var1) throws IOException, IllegalStateException; - - default void transferTo(Path dest) throws IOException, IllegalStateException { - } -} diff --git a/java/ql/test/stubs/springframework-5.2.3.zip b/java/ql/test/stubs/springframework-5.2.3.zip new file mode 100644 index 0000000000000000000000000000000000000000..b54730e4bbcd561f20961940fb62c54dcee1225f GIT binary patch literal 57066 zcmcG$1yont);>&kcT0Ckr*wCxbW68%H%NDPr*tFT9nvKrT>>Kb{m>I0zjM$3dhdN5 zW63$g!Q6X2GuE8XoNLQVfr7yRJ^k5H2vhv_AHV&D0r=@)Yj19CYGSW%W$a>O|B8;4 zo{65BK_2isXn=o(0%AzAQ`8*NqvJya0@9-e0wVgCzauRnBqFOMLhtD6xT>iYx7>j4 zbyLO9I&*LWN5^eG%{D&M-)cR}r8!~olKl-5v}Cb>AMoH@ZOWIMOjv%O*m>t7o7Ldn z*bs+Kk3FA>-o3|4E{&4}*D|R&x9gIHiu6xpPy8@|wZcsTd)(YYPj#`?7PeoThw#CmOY zRj1QCQWx`T_S(Y1yYcfTua^*5hi2F-l|$7V!VKLPuv@f#lCYaM(^ylKOJM}c#|f|6 zqOHgzmsLF^XXit^%LF;*IJMx(yk3GS-dYxTo?bb3od#az3MQ7KEGt+l4+(dGd>%(= zZNHUW#Cc)nI-V$$_x@3x{!kW-#)_S*efg$`Kyw!?1Ps!N4~Fx~{qU+YR5#n3->l#_6_bUR@XlWREHyIxHZ%WFha z>uB#wy|6$WM&Eb=sUt|_IP#TV*hYk^``}hPyN53ZJl)KQ#swxL*yBO|#9uFv;|RS3 zagCxQ)@(14(=38K+dk)-taaejDLCHZr9Uh8t|Y1F`SHlQE(-UdGNT76%T)(tSsr4S zjO?8_vbePhtSDtYi^Ip1^r2n8Wql(0@;vY6KI0RorC1pPM^-{Qii=w)uvrrEGF})E zd-nJ4Fs@Y70R&ERUbH}xr!`y(@Sp`QfVKNHCP&^vs3fS!w}}J%psV- zNpsAs7$U4$>>>Hwv~D2b806r(sS>CQS4aeX;rQfxzf@gY+g@=u^%a+UtXO{q&#|R$ zu@rkmSb2^${O0`&* zjA7o=Wb{nOueQnFbL#P7MXfi52F#&%7}^J{_>>G0BHPU4x~7!?@jhl0#=`1YBYtQ zZ(v1uR(ZJfcpVkeJNhCXVHgcv5aw5uR2#`_2db&eFZe13YGmi?t{8f2?)iVeSW3u%L-S2JdN>=Z;N69Kw$Jt?W}{!yM1v$I}{l z>w46pgDW}^G>jSfg%!gSumMqd#x#~g!`w~Xl%Bta4$kDJv?L2+$rrd?{70+qgrL|M~?=jXK@Do(hn#WE`5PPD3LG%c36RX2S>31eoL+-^ zdLR@J9NXH~=CM57wmHMRFb8r*Z0HsAnjU-iB^Yk|EjR_?09V9zoMh7QYj(@ca_r~w z+$00Uo}f$)W!G2mG(2g`_Q`y61|TC8coT0OO6iWW`AiVpC~Ec}pSkXVM3qzyfceMd z?HQ2*^CAi-G;qJmhT0YJHH&I+isYE+d2JYWrdv!oe|?l(f&i9Xu1(FX zz{~=CPidd<($se4Z3XtyuzIVXSwT$8`R0;z^YNgt{h_Q=UEtBR4wuZ526yobyIcjX zPaQnx3}471x*Jq-ND>=>g_&~PxSTx*qoGmhUxjWl52nFls^d+f*DTQWm5P3ai;WybaiTE}Iym0`Ifz4AEl-C3OiOo*c@09t!G&Reu~NJG5k3*q)2dM-Dh5tY?m8 z?>TrsNAM;#QRT;wN1bpp1sQNTj2rhal@Oqmhct2GZYsFN@2fXQocA(<3;SXxwiqJk zwszI3Q}xP-K#-rweWF_Rvu2^qh}&z*55u(x*1Z;{K%xviarlLQ6z zs6N#^RVr08{N))0pX0TGr+cTHXPwWE`_a%^va>Iw;7NpB=1UD|4inGu+MTKhWjtQ8 zTY1&RXSLZ%rek3u5?h({HbR|Y+1_fP zs9gD(F$^$NGSHF+|D?)ts?!Z8JbRA4; zgfZD-^h}jIEV=V=TInKZzN2?EB;;|c=u4j?SVSb#QiJ-=LlsEZ$3>Qzd5!SJN5MIo zD~8|m2esHGSvrQ~@k2cuAy3GY(EAW=W4;K@4m?OK=IceZ);KA`%PGSPlBc+RD}`1E z8{36>JuxwnqyY`V*WLmX&_H6xqqD;}yZm8!@2d$5EMs`@C`gcmdXj>A(B-S;?VN*8 zL7zwFFXV&FTl3Ck8wFVS__@zYiPQVdqnk+?4IH~+r*#Tq%=XYAAF-GM$eFH-hs%5O zIEDyikMl`}WKG`KVxCb@1|s{o(uQM4Rnn@AXA-$MlLQ1IVp_oIf;gdQKbgm5y8=! z#wbsoebamzSByzXLk|z)I~063)6|j9d4qDJDSv^fhFkNVwii(?ZH^r0=H17~f#sW< zt#@;)t8<^doa&GpUGD0?9OK&6KWcpOtnYwm%DaQOMQ+S{VV+x3sl1fRVvKYwVO*}1 z$5CBkMrdC|h7s|)v&Gw8$!Bh1LhX> zSA)9{GJ_5W^?0a{JI4# zw1vyoOg9qv&tBl3V#1->7TH`S0^vh9zVqyLv_aPRbPM5Ew0wSf*FEPj|H76E^`!~R za})lq%7n<3F_&9ct`3xF9fY%tp4RK5Pa0}amUq;^z;LII=YsS|k?1%s)`aYpW%%nU zhM0%}xAV8IlVq&Q{Bu^n_`ad*aglofc)7TA(>SlYqL3oeZ1O2U|9-{TgnMoUdGmv z0ZF;zMnVHKt<1*==*wXox_E*(J7cxm+ zpiE0NQkLWv$tYkzz-gJAOtVh!1c=>3EYHSSQLDUb>Y)I_Rx?%In`TuGC2qq2yz)ri^IIgG1LR>QP2X~RdLA#iji!LwJ5=b^T40ruUU6hVIP$nu$KbJdMdx#K{ow=W zptNZRSS}yUZSzt^qs<}Z~#^*{dJPaMDx za(-qE7=KBQfw8`|!#_yl_z$F+=o>oP*uVaXp?K~Xup|bMCJk8P|AkaRz#EHxe*(RQ zzOz1!xb(QJw4BNygX97YJ>~GIlpKxZs0`f%!|=S6q|7MIyp)tQ{SZUx+YejRlrqCZ z(yD`_G!k?mVTIHj!01f^`RJvunt}dGr%>O(#%lsz(h{(g|BIIuH#fG|w>LC1H`KTM z`Nd_1pCkAX!U1(;<5l8ze7=CFbrLRmH5vOqr%3n(?M|mi3I*)Oz zk9v;5O){6SW-7h*5(y+Up`Pj;WqI*iDE)mcf({rD)hH$3&eb=sf&aRfw!{1&S->9T z0ZZn;*o%a5lZlMnpHgFSiGPyfR3-Ku}LLuqpdM|}fJX2ZbVo)JmpKKLvt`?eRCXt~w5IcrT9dwn{*Vv&61FgA3uH+TFVX#PGJtNzcQnj!M z*d_mo@i`bh`Q1AT%Ny!#F3nfj8gXpdbMnz@v$*%PsKbweY1!s+jHyodOvc9Uv`OIU zBCy`XHd<0WA0ZzH9!}U#FBoN?&9eV%N8|kubnyQ(-|y5<_(Lj^4^|sTm)8(~V*YdD@r$X#lVATE9?bviaQ`9o z?|n6JHYz?4Aax3`jQ+k+4qwi>FW^Dh>O|4|4U_hS3txizc`|0o_ z8_ip{31}M7&9Jdb;ES}if(u~T-aJ<6t23fh3m3^KMq+jg(u{2J)NvL}k}Wv^HJjG1 zvJ_0KAKC0C=?t}6Q?>eGRFa-ZH_BQRG2qiw+^2(NtD(X{5am(hY2i|9ZgDxVx-B*| zWg#*?GNYFkRp1*r#(-Ua3;I78@|zl%9!8{~ z8y*qSmlq%}!=_(Whi|iL3t75hj=xgrb!nU>1GnS3eLUS}x&;Q&Ox&>6AP&^g>*XHV z;4-O*2sJcOa1X@R27y5cQ5PVIdxa7u{{98Cs&_XAshCTjp5Nu^TU*;We#7sFtocbvr$_lLMSxel04&k}=v99Z{YTd3DL3+@AD*L=Y)GwcZDHa07WkTD^4@EagHEmU>9|IHol!7a>bGDoG(BObYUoJVuC8jP15I<1 z%#1$yZShb@Hk02{+V(+y#92a6&X}J?3V#hL`G^BADmC3W=4G~mkn0wgs?w3(6P;$N zVg11*!<3?Ky>L}H@V?m@d{mo{DN!AX77AOlK$QEAfD_O6o@N_bySUe#ZqhmQ<4^Wl z&3}jB1Aw3vu;l(*DE`J~quQT>Z@`nyssn76I_CsV150K{xG)qSJLwtGS_Vv_tR=;& zXI7<9YECvL-RAp*CZoV0mnlwC{dd9OdKjQ2o86oiFK54iTO(21F1^(+U5uuC!HwV@ zjQlpcqTxIVz!db(*u8JmDQ!Ge)zi85>`&)>>gVbTbcxOYHn|9J zPKp0$v;Y6F^jp3lU=0XFA`7Eb9zK+qdUM33^qSC9sIGq4v?fP`)ac3> zI=wZWS)I&faiuQxTK&n~r58+W)gbKw&O$uH}& z20vcBwse>6nu9Bg2b1Gm0K-t#cuD7nL&_c8i3DtIiMA1?kfTAnHq@TEv+alKC8s5) z;=;Ur>r2~(Z*t4YYWi2?LbxqII|2}k1gxi$=ig5?e|N?okP~q>wsw?vGO#pv_&t)d z4s#>)@WY8rt(DnA%dka5z(g18!A98y5p^4K#=SwSabY4Hc3ETHit^LDkca=EAar;Y z%lTT(ZkkrA5*T4mfpZ{#R+sHEQN63b@J+-yqASa?kEBbg@MQ(qJ0UzZ{&dB*yoY`F z)5D)jC~->Y9!lZizVH1mrNVvMK5Ei`E26(A;y;JQU#ol!ZT?b0{49*?7dH(M z_Cpl>(_Exf>=bDwA~ik(`Oeb*ZKrRU6J21Fk+nXgl9W2BO(D#EMJ zZ%+mToqDIR4yR~dDfTO`s_$)r$_=vOa2{Ta!D(+ds5-J@%k6R{z4}-$~k5wHDQCU>Uw-M;OSPdF_~dh?FK*@A_F zyVPi4xE0l&)d=)(JwslH9D=7AT#lK!MrQ4IUfi~Vs|xA-66ntFh0qEtOAtnNtIB*P79BQJHC+*e_xC-|2n+J*3Lg1h);nL)CFBf z5+LZQihTO{i~4#JC}QnwZf|341#oR4ecLBy;F}A8cYmWYfV%j;Q5oiV`7D7f;>*gt z!FDdEcqN90)n<1WNLH-2XNFVE8nz}cwIscgl%Rwu#6%1@93_$w=9}{jIkDFm9-b`h z?;-frYy)6n<~BbeP~FGJhy(@%)B^RZMA|pE0?3oFwsmq;aezuq4qw?INIrE(F zZOt`9EdxD`z`o`>O`A1^P}ufBMzv0!ACL)^%fJ_?`?C>P1P2h|qbU+?NChQ8mJl%; z7vxW33z9rg?;OY{Lx0(49PNSSqTd%3k?T7ngj$b5=uEgtaAzlAmq88Z=VWu{R6W*b ze~evO8=G!*$X$JTUx>~HiSf0pfNUt7H6+Z;*g(K2!OV|ODje-H$edl(tt5%Ww(u;n zdXTZ%acx-S_(uCsLbB1t#{(57s)&m8;CWkCp#+yf^y$#{z+I!*?F&!WWJ;>Y=pQbUr#!__G}95pg8#KX&g(4NaVfh@l#3=q=_H{Pq1C0TkvO$TXTN?W{k3ghX;HKA^}U2)#F*~!O3T`a|!+(q#2 zgEkDYwY~y9atE<>e7VVa(+NAYx{of(ogRV35WPos3RaG7B_W|9X=1;URGYWh-J$EA zu1Pb`J&BL-W}WkJ)V+GOM9(_3rQ(_Zb+c#xU^I6i#5UhKv&b1tkZQ(u4=a)fzn2=( zI!IOF6~dGZ)3^%)zXlCMbF@w(78^nUQ~Vb6%U1FRXZy!oRbSx9Q9nZA4=y3T?zW|9 ziqGTEGJ`UmniQZm!u5)tJF>4&?MUpD5e3$TVx9PO*b+TZ+2D1qmYBmK-I4bDRsaO_rE_ewbUuMRO!0mXiAz^P8~y&pM+@4jRs-wjg5a&_!ylLp$jXy6 zD!|BsoV&n9Qqe!2IS~fQUI-F-%~U}*acP0`lzyT(r+v(cjoNP_rA}?A+J?x>gmZtr z_^OIcbr5yK4@7mGm&r03t0zKHQ*nSf75cGus4H{!Qx+HoUbOSP<93}eALG{@#~C*h zp}@sDy~Ruob}L4tB#*{$YuFpfl8yZG48*Ky@K4Q76|*1S_Fd7u!f8C7aZkNWIll?2 zZjiz-Iv4x0l09Q1z6|S`|A{c}4!FzaGCf6emzP~Br#~IJe`=~L6|`srDU0oa{PRyq zhc&hF)jLQapcBAEBHypaT|m@PGzacrcBFL;rj_sKp{?CBk7u0@n{c|$OH$5xWs%6? z1%^pgy1E@L9uFTdKO}asAi(sIZP#mA_;+r5vmG*ZUWN|}Xi%zGz%Y8v6mQ+3Opp3J zphlo;){Gpn9!~j%b2v?P5~Je2tc$fto{pNsm<+16q$g!`9nG6_m*tHNt6Ke74Zm9&Lx2@yT0ikNW=5wn?Xo`Q+vJTMam4b<1Gge)eZJ zMbC6|mhG0+$htL6HgxM5p;1D^;F+;#7cd$);>NbYr_*I$3 zvDM??^M~6L3~x_^yk)+{_5Q|Z5OC4VJdgx5LQs=30v>{!LunvK&5R4(WLg6BABe@w zEEF!ms{?g>6+%K(^d$8Ubm+L$qp_(ZH=8bn#G3ZA^&7)^_@ar7xatxFq#WK!slU36 z-hIzcex=eFK5o9f=+d#p5$!2Rr;U#gb^5~1X~S;7p|o^$7JFm&F&!kyGb2I{-is4U znE5W227KCt{X8p+HU)@59HP?-uXmT5uxJvcXvvC>?6{}kU6PKW;cnOHYXWQEyv6cL z_($5V52DKB>+miS6Y``yE?Cr}NtqU3R2(E!R|-KCJ3Aqob6}-{AV%l!V(r=*kc`Y2 zlkij&>>4c-3vRvC+MiL)6UXls4`5rD@e6FWgQ4}A?3E-lZ({M}hS5O)Ym_A7hU*iX zzvk4VwBo_%EP8j~jLoDfe%8>rFh2zhp>4H=Y(xUNZOENr$n3oC(+@AzfkJ9|SPxHD zOxUj`(GNZCByG~UpofvYXbP|B$G80+M)G-5r;!akvvi<0yg$}628<0&+N;m*%uu^# zMjniU99lx_jI5J$a>VH-TcUYj1glfGY9u!Uwh@+@xLMZa{uhfptJi#IrEg5cTSyFV zKbRGQx3RJxsb0g?JwuH&nW0_l099H1G;W@JH+AeReu&TV2#i;N3~t#DmX+giBFBz* zs%q_Q@Lo-E{unHDZKeT5X5Wtqbu6X>HW@Y$+ZDVUWOCOacj6g@Be9z?m2F$XDo6zG zxR>@`%Odc5@<5Bg6FnvtJONPr+AT%2HDMazcNVAX)ypa7biQR!c?+Euc8sdvTXx(q zXp$Ji!&cQno7lrk@&oUCd$ELpz_p-H;2)Y21$pscotCSwWW-_O1IAKt8iMtqrJZB0-^d6E!Gf$YZqnc|#hP(l$mboRQ!L&LZV`iHB8{ zM=D6X_q4^gAP%z~dSTJJ`%T*mdzqos*q!i(aL19w(}c5ZXvNm`h$alGj%M437?L~`UJ>a1s(T6&bmxCde6Pgn`}7pn>E z5249QNx4RVSQxl$r+MZ&NrwgLsuAi1E1feMigMJoyb;!aY>f=RqqsbIc$R?CH_j{k zMQ`GOer;T-XJj1ZbuiG4#1%OrmIrn7k-|Prj{E`Np@S(9BUfyaX$;o9h41IaYXji; zOgH5Pn8+M{OE!tzP9@wo0@Kt`T1L+fG*HFVQyhE@_$r{KTHflZrYqC3L-H74;!sHn zUL$|TSe_pb{p=7m%lLp+632)h<}$mg{Y)PB!B#47A+a8Z)dKz#XeAj>*)9ysFq#>6 zh^$dG{xPzzPDf8K|E4gvb8YDDV7qeCQVoe(5mDsV;OPFZ$oYlLLu+hM1GLxJ6C&a+ zU!+5h*Kq5uDIzO&vcT{!`r*8{rO12H>y!OW?QO9l_iXq#@8%&X8yxfuUc|7DAt;ID zZ~+FAP>1kRu4!3;FSV@=^|D+ck6_Lgk)=HX1!Qen% z%D0)GhfYbtM1wqL&qUHWD22|{?FRZeed$~PSy^|B8*|5zBTaLARHm`RA3sks31Mzt zQ3ayWxSas#WO|)oE$xTkeD`;a5ugdE3pE#xd!z3~3I{SLK$| z8R_ys%yzVoFG@6^e^e9$=z(*e z$fMkq=-pA?mT+=Ixzx99BW}L1`e|~k?x7KiG3)I+Wetrb6dkh9qFOQrh04|57BBE= zWGe~@VA{dGuX0MQ%x*Ynje34H*66Hq+=Cj?p*>}OoVs~)D!HN~(qmvU>21#Xu86gA zC;Uvu%!tg=tm@(MicBiGaBd!Wovq_U%ciDv$%QtLVLFT)@f7N=TIh&#$@we%pLO(8 zU1o<;l=VbNJdstu)khak``i(XJUXme!b@8cagR|(tb{uW+U<%4d(V{%- zU&}bKP+{&(+1{t6qxcv&ppnOk9L_*=)tuFr{}xx;A{zc31$@~d@bG=$w^Ziu3$p)! zN&uuX4o&$^JaQmGd6)WYfL%Oxk zK>k(9^aEj(*MQym1IUtJYvX=rbo8I@umE;s?q+PH{My!7(b&Y;-q`v#4k|%$#QGf} zQrkVvr+sbt)6n-qFS1qQo~fU`C(qfSl`4HZ+=;oOeA0blh)65QT=%Za=R*j-z=mv} zZ^fx*Kc*YJhcY>1MVW>8dkxUyJVqSgZAMYo9zRrrd(p8+rb*`d-W_{Pb}zV!6xE3-(-6=W!?a z7(1{7PR3&SVmvLFXYjMh(lGtOx!5eT^o-WR7lWKHHuUtO0cb@e1Yi*t%M2a};TLLBr0MY@(`BMkv8)E`L^fO};D~J=#1|Hwr)ar4H zCe$xXnCPLjotnET@<#m=%Um&QVhd-{HZ7jdD~fO|s3_c#t`6sX$N3ZI|0ESelc#gmv-?20>d;r5ds@>KLCJ?;J9Fs@M`nih<7P z^LEQmMBYi|TKi2k}LED>Hfac5SzB+I+H=P{uxu5nng1+YF0%q>@&d#4D zvUFaCc4~SZ@uAt|*;F*Qfa_PL$9`d^d>Sk*2KL7w-ps#-i+wB^K0N>kUV!y$T;1P- zAg^x^=;;2x>FNqfN=Z8U@zII8KN;(%i7!bhX;~H9z!3;i4D=!lDrE;dDoRSiP#QEJ zQY4Sa4U}kbm_9wpnbb0jABgOqyWGEaVEnKT2U}yyZ?5_G2ayl}qyNa;zsUs*I9VI% z+Z+Al`#GHWW3d3ir~oU}{@*-639t>3KkV`cl>|od!n|XI6LrZFG<@HUIk?gujanRq zBmE`VXh!gCbvs}hO|uw-sN;q=esYupSvd18X@hJH?Xh4W*4uu3SBH?Tkaq21bxLQs<4>diP|ELB#30 zr8IW>D8vQLT?>Tr_LSMHpT;X?O-w&n0Wc~AEWQ5?R=+vGzd$SEIRc>R33l%;ViD%y zgK`d{qi0VZHeN%w>>G#V-6^j$S;4|wCeK!!+-u=n-+!$?c}~_~yfQc04lNfD?^zty z_gX{qYn1ntc`Db*tRywq$pJ09hUYyZyDZ_D7jQ-$aW8UKx!&VgX>NiX-4FvobEWTSAtVX=9iD~Li zQorv@@WO4Dd!vt!KUt`#|Ag@s02O3VAfOk&j`R}{BG!(8;lyvpRl8!%Q`3F*l!nJI zAoqkYNHsxSJ~*@G{zMuDN+Oj*8S4C0#;sUnpVGL5V#MoocbAM{8D0_uGe6{o8I2ln z`X{LRXq@Dw+GstX;y zXP$%I@cxW&;FIo!XJ8sW;7u-ma*QS6LbTjyp{1>jr?+s%V#XhJ9Fj*A*u}QX?lZFt z7vp0y!XlvGsJf21qoV>DwbXFxD_g^5NxMU+pO3XpH>s}O{M-OZ2tAjS~4 zkne;+1vhC2kW3LNm;2@hSbNcj&k>={uWn$2E(HDXGJKipe=_N6WT>7FK;Z@jVDbOM z%_sq8l$^e6AX0hAewh)j{hsCvF#cD524ivYo@8PydL6gT;*!I{C7!4m0{TejvnUZe@0tIWKl^t`p3O;O*n>$B`Ph#RpfeHM)*W+2EVHrOn-$hvPAio7)RU z2CR#sk5?BwUpdpp?kI-9SdiE1v%De&Fw8ED@WEsAJxw=lpx5e3K#hRy&7o!Xfiyp1 zKoa|W>h`9@>V^9Pkq_lTq_BeYZ-dRjsWtSxg5vhAf=$t6PCsvIUAJqlsJ*!l ze2*X1n)dPSJb$R9)Xyi`JThd>LKVjp&8qWhfD0J z&#<^7hL|?t{iMUazyj(pm=eUyLrn4N3;~UTf)*cksJLD?>#oYqg5|b;(YAYOra7Iu zV^4@LLm}uC`0|E(rp(2vK*AUNT^jYhn3K0a(aanA!@mWm-^Q_ji1){;Qx-jpXr8BPD+4fOeA%~zaCkxxm4LErp#f)xwt0zs ztCPVhfi-Oy&j6biQNm1aobzVQHgsz!%oM6%JXxV7dP(q-wIji;&z^V=5yW^eSDX-e z1uJ?b2j1?r*F6uW-t z*$OD@E*eHv*?{Ws!WN9;5wY@cXZ03?et5IpVkexW%l3v?DAgR9AbM_6TvaMsHRLg7 zJBXv%*yeMqIYY4J4iiUhpsm8GVN<@1t2viSPnkOby9n2!GZjqhbmhs&aqn`UVnMV1 zVrK2JWU^AMi|R)-a1>{9U21AcbFYGR9u|+D?ssQqH|Et9Z`I^tAzVw5)j~>9gWp^h z9NJuWG+L!C;U69OA^uf~agGR5Edb@^0~Gmd`TcK7{GPV_pv8jd3BZ&jTt8rj2M;~p z-6xd2J1yJY*Rp@9qM<cd(c*mCxq+peBR^RJ-xN#aK8{U%xGfx_q zQF_dtKE*N^>PVulFuywT$(8D@%eTqE8OfvM9;AaJk}jOu0X}FN5E8EZ0Ex=RfVu{7 z4dvUR7#ZDd@s1Hmc;b^9E$5Q_6)1gyy!`KXUW0N1?$z`w*^dMhqfw??X%*5ID`Q`V@I!Vpp*U z*`7^&E}jIpGLNveGkptUoPTr1(Vw`;NdnqKC1YZDm$7ThRn#f9;LQJ#RqJDPPZ6-5 zGtV)OGH^t_mE)3597{F)%xgwL1BA^k=d&|-rydC`AtR6;{ivY}Vj1%Edn?DNse8;J zmd_pyVfhHfn&ql@;5Q9z{ugELQ*NM$GeB{pw>YeZDjm(<-A2ZbsFcktpH$U0o|jko zf2p70^!!G${yi)3YZZf~zV-JThJP|?*!~!h)_@%LJp>RC&o8O#n=n}?OUpk7q#~8S z4G6U#s=?Vyf@(R}?d!Am^;jHbOQKR#r+=Rhl8Vvx>YalC%m?L{_l|=Icrpd&vD*-= zkM7g@GB+u=uzIxH*}fpiLYx>l{R-A7Adj{a3$3?i6`ynYm?eW6qPup6QqTv}RzBJL zhG}dV{u4XsZCJlO*(MMEJ9BZ4CEbj+Rw$&3i^*z?eESVL6o^K72Vb8~$ytP^07X_! zTXLxYI+rwc(>Ex|T{pZznw+8s5icekOA%3hn|TjzmpO`#b@Qg2TV*uz)2ZtSLg|;H ztS?5E+LGZzKRwn#QcY?y-oDuj($uN%Vws{|3LAuJi2Pg*Kb@iE`)S^GVAl;ubc7=c}+FH6tLX}@9y{o8vFkAq{^o&l|tHWKrr_r)z@WY6QYS$_V z{pp7pkCgSX14rLTYby(BR8A1O5=$*NvUR1DRd zz6z*!6DBDknKZ+(e%Go=tPYOVjeC+Dp7Zq@9VRk1!0{2=NBm&cLP)$`AKp6QE+vQ> zQ$lbw-tNqww-!q>CBF2XOi}3-yd=tpt+BS0uIL6!){cxO{$Qpr_hWC}MJ84|GTMwx zBBQvlGenk+y4&G-jgWDJl4dtzVWb552`iEhtExecxT@u+FRPF;$qP!6@-Yn-N^r9) zERZCv#nBIY9Ip)T6ux@;U#aHT2Ob(c|6=$B7{}4_R&mvtykfAkQpkjczUh^}Lsdzg z?YaVDv@Df=>%k###exC^6Mymw2eNKFsb5@z$EQr zPY(8E6Q>O+57VX{lGGd?m6p6WaiCVdr*ceDiPk#_V%%45}p>jubIL5Eom@ zz*Cbnyk(R(@b1Dm?^1F24}{&ju49KxbM z6SzOhT*GrTgLu%yJ%!;)^uRTX?1djG#Crhe{n?Sx>EJlx6RK6_yG752LCP0ec)?W{ zOJj~V^eH@YO9y4Ir7#gMjlH<@(v#q$%{p_Xl5M$CQWa<(W_pxrr5-{5jNw1u6#lh2 zN_%4~8%MyE&2Mr1dzATE;I9>Ae+Ya!H_fe`ZC)AM|8Ph=-CF2Xo2$$LL>olFA@OTm z*xw3&s{SOtKS&91{m$Ib7{EXR`ftB?#NNmt`0+oH47pOPqu|;&s2VBz(ET}j;3ni5 zVPHM0bbNLaE>%^huXNs4HlPb`4CfE-l*L+wuXok!Tl(+!w+R#9(a#PR(S~Q43L$74 zD*2UZ-dXTQbKAQf80rZ?9D#ere41K`ZJq!z4XYFErU|hW^8f6;m~5O~_izG&9xdOH z6uf*HDN9&!0k!?sCDWZOQPp9uz@H5}h>Ydo2R8X<(lo@(rWKZX5^P{k)>F@D1O`?WLx+`nJ>{R`yiBj0YSiEi>1ok80Jn?R^?_`XUR zv_KK_Uh(5!X*c%#yr!qoOvx#k2|7Q5x^lIv&iwXuI$7QlSwRimT!3o|a3Wy|55?+N zaT`yUO~zBiK)d>hyO-vRdeeVL=>H)Qa9IFw>FEcj`dRL; zHNk(D`?vGzPkr{R{!#`{fP$Y=-B-V)=zn;GfPsUfJ>Zh<@3&%%jg)@7TPx^fZuxsR z-Z(DG|Q!Wh*DpjcQ+@Izp2S3h$mc%kilX>w)cQ+n~%j~ADZ?yy1Fr~*?vhq<)o ziXPLNj-L_)l^PlmMaX3dM8b0HV(J{EaG4>yYElgtp|D>C9RpCCY7mJWpG!i`#}j?d4Wlcqu75 zM}Rf$Bw;>U0RwDJ5QN5$zPjoB!L9O!>UzlewYI?f;uZCGn{T{24t{F6r_rEzJP~Jl zfc5nA-*@bP(D&c%kZ$;oW-cQzteHoX4~NSvLAOZ=IW;zDD4MauWTd zIbXo~wU*Ssv7bNe_j{L+7qBIO(tx_W3(tTkVSPSRf}ZJtY;(oT8Hh!Z@Q17-L!EcL z5~opxxJ-3-n9{_n@?h3=FvX!iA2ia;H&L$dLYncEw9;lHLW2L~*K7NDyv>ei%9rlU z2)gd?bl{y8Y&im11f5xR_3c{hpXMo7nbz>M!8*V)1g!t5(*E3}fRVoK?}wmO#LK5* z)hBB~X$NQ;mJ)Oi*aJX~CM8tU)0q#Wou6zWd7R(fQ(<95fNA7aiD+zj$LA&LqTLH=my}^hgbmt^*zUF+MjZ%4qo>dn{KLiIU%S8d4{CNXHuxdYc#4LMtmRb|0Dy%6iN@2nI{qg> zKRxF6i1-_~^V?NkMPpOIwK-*0R0eLy47KL_U*FJ_jq*$^cc&X=&m%YgxO zC-?cWv3NZ0ANFF767Ymjf?uOOTh%bzaF3-iX%K0XHB;ho4@NUoRLmk?YhK6R4t^f` zc&dsL{@Dk#q`g{ips`0oE=!%x@W8*3-&2*SOb>JyZh)-vJSwB=-h7>4Lmw#78Wyc6 zaK&;R6G)#9g(wlp+3ESho%Nt(I{Tqm$gNacn@n9TTV2W+>c2k!6#tj78GJu3zJF2X zPk&&a4RA>YsAvUHh5pa{;Ym$@Jntz*{5`6D;}t66R}}$=RbbU}(ID9<$7|r^amtVT z;OrbP_@SiIh-5yRkQ8sX;(AfTFZykf$$VPo-LotX&%?n`flNf_FrlvLN$wuPL| z%VnppNGVH)HKc`BoIfLzzMG}t1$FdiQ86}-@q%s6ff#4+l>8*o5u@&TFv-<4Q&oLQP1O&>f$wawNB9XVzqXHntkXUY7cK%Ew#H6)!4BF6WiRTr10t_tKp|@oQN>XE;PkMFTsz|qm(+`!2ZFz@#5!ySJYO)~zBCY%EFK!T-Qb+(`sP2Co0V9N?6 zNG?U$wL}o}MK|jVNDv`r%wiOQRDGHHJ)D;tU_!>zeSzt2VF-%DFp`|j*bkyKBqQTk zsgfoSMKf*+LD>{-s%X4^L9iFlBo!VSGXkt5&?f*4wPu~3JG55`%Gorhn&bOe66ROWZ z)0nn!>BMW-;I;H=-R~1wjKgkEtg8?DeBB0#hO!vEQM%G|M0T6!o-;N#=r`%@-IbH1 z_L8z&wY@5y+epVmx{!5IkDTirv`a8{gwEVm8`rnA(kXX>7l>B#27xqmk74v35pHj5tL+B&M(TmB5` z_ZbqPy$|TGfrcTAsez@i)nRzL;K_yKNjai`h#qBqOF;?w;Rq}<#xePAy0fp0l;Mmr zG*FMuHq6V2KME(xNxC;Si26EY`c}An^l@^L2|x=LTzq-f`_)zQ1LJA5UF{f5$+ZA} z3V+=!d@rTgDwk74{`0fgREcNNa-;;JqK&6yCpzyklSGJWkCt3XvSco3YoAHd zur#!1UX*^l$HpBLvBQmNcjmzn9W^@aRo{G}zk^-9MtB|8*M3Y)zXkJGONH;KhW`YB z)f~|4^!mSo_s&$!}l7_>G*%cq8z{Z;LFhV(1b=8#)z2O4s3zZkWUpz~)#om36ZYX65V#bYL$39H}LTg12XFMplF|H2Tf3 z>%w;STZc^6JQoYZVFYVSOYV?k;d6s3jdTzyb;?+C9a*zQ<4%XMZ z++3;(bcLon4!yVXk}Il|@c1d`R~GbAjt6K$0$}j}Uv1|BPi6bYaU`-Op==Tg8D($T zdxns`_g>j#BqKs0GnEQiAu=+<=XYQC zb&uz|uglPfa7P&Q~&e;}wuDH(k$e6JpU$GRK1T7GK`^ z+od1ALV*>c!q-o{VZ?HnN1=Tw{m51HLeR3UuAyQLij#_xjJ4U!t@1l;^c}txlU#ko z;Rj@vx>{+9B$t&k9<3h{7w6IObN>=6OWAyEgl=gF*l701>~lf03+I=+ZPEYe>7)D1 z>$Y}nqgtB--?lq-V$D;7OjsdH`M;YVi@7*C+t~mS)thUcb4^e`iPY{@MI%|cjDC{l zP{8WCaHIuBe{5{Y5%OX zI}SdUMv5^cGQMr143a~Yy`~Z0-<%me$|bBLKPV-6Tf%x0*>w%HMY(e<-`l>{)|CI( z34W;^&pXHtq8ISlTTDINkDfO%HE^+ZhRqNqEUW>qC}wV8v6*6aDT{c1z@NT0x$L zxrOOo_i07>$6LWB&}@j%*w{lMEfppcNWsY*1RP6*u&juid&WCkcyBM0;Lu&1Eq059 z-CMZyufJ@wnRaQ%N|Etgsv=~Dc@g+PLd*BDQiND1lpS^l_~{&UnnKr7f#U}RCRGcn z8l#-4#y)GU{~$qsLE4@SvPl$>oA>xZ^5F;*%bw+?X7@&Q>uj_ScYL~nlgg(h_$rw4 zse}3^<>@{S=hp{t56_qj{-71KTia#Mytgv~PJq#y*f|3SFLsEtieJQ;4v5kOe8l!9 z&h}4=+1UVre?WjCR0x5WP(Oq=eetH_;OxjgtJPMv#|udp)vbdcu~9$#F8RZ&p|UjMejc%E>IDx&zK1r}K`i%bE>P4u zzml=M{i@(##A4GI+7`L0aY^tHReUW}04|6V`(=)HjvlO@cYQHzQ zv`MtcutdJ-@)}MHGf6wJf=X(jDji11f-6(`=DR+(!Ogqcb*X5{u{DB5iAI;%>4T87B|{%@-!T>Mbte(u5bHT)Tx7pi!`7MXHIsQ+F`m0O?C`_0GwuZ#IS9^p0 z7>lBzrHPTVI^an+!|_<0-0VN~RVdW45~2;Mnx?619m8(r&VCo75Q=f48@ae*w4B<8 zAgAPo_#qOH!+HnM1`nhjyh4PUe&F=-M%Jaq=7LH|9)nCT=h~GoxE|-eE*Hrd7r8ED zsjPN044+DP%2jnWSV8=Gw!({Vwh>r?&9iMBDfd6{l7u=PUi%p5;_ourj>gI5K=e6M zswbGUu1$Avtlytgx$MYQ-DK2H_GwwuYuV!sHmFD@vMHY?G%_`99^@6odqNiA`ah7W zzdL#a&wA@73Z7B0%2oq(8QK8;;`fEt^Zct9=U?AWIRXDS64FF34qHp30fFpE(dnzv*P733zNo@ZEVRntZYy?pKyq%f z0f|@0r9tg$!8HyOZK3{8?;3cIG+%uk)@1fnpj$e_*uh+4shY&Wv`tJ11sONj9>YBo;1-m&CYe>pzAD(l%bq4G|r>iIz=pFtmlaD1CDN z#YwiclmvEh6ShDZ6Z7wP3>Z5Pa&qV5 zHk!y$i)!d{c=myNR6Q>qM~h}3vid;uBiXN3Zs=llI|sdaSsD(V!1$+NDjlj%LRgbB z-z4)&_41AkGt&39dWl!QSz(bhn;dQa!k0l_a#{JHHWu2(y)5eHLY&Z8^K3&2W2}Oe zAFVi@$z5_@Hd)s#2M^{tl@g&HJ9+)}F`nFasa81B7OOV}QhNqm8V$Yt-t0yyfbitgEF@T^=Mf*`MUBIzALPy3Fd!MN! z7Qws3jblsX2V%Oym~p7bC72u@w&|+yXpuFtv2{JKd8mmY6sHqQ-uUW@P=sUYS2}*v zl&iTJLyPU5gE4s{Un<4M4;&j=u)p~c+kd`9jpNEmVn$LLGR>T3R!xoI>vTQtbm5qk zg}%qj4b5$pYu=YTx-xzbicjvoblGvJh_D`G@KW;H=&bz#TUA3ZOKn9D_iB`cyE=t; zi4%IRioPCMN%|t^!4~7=E5huG()5@e%OFUe_RSIZ(9zI%N#}Rx%3BzG)mS23hO6%k zI+ckwe2?Ysi&^rv8vLB^K~9&2#xdA2{@`HX(f9zem-jl3va6lBrf}{pLXgJ>C~I24D}_iF4JU(eYBI_2zzXxe0Ie9#t(0~ zH_Ipd*6AauQN20_1dk3Z_x4M>-&5Dq->}z~azPhzlFlZXAmaP-(j0GZ$OSY^RvEyu6l z%Cd}IAq1SJcKE-8(&k6DovoI&LpB)Qs5}aHW zTH$HLMP8wpKZH+AD~lG8-=Q>wAy?*}FDh>SP>trgA6D?}0&NL{DXnaEbU+T%#Y6nL z58Fr++;wad?>bqMVVIGg?B{;N+J|$M=ML$euPs5}t{*`&WUI6wS8h*DWb}YjWUrGcagLJ-*~IvRh_H7wkshuwH@aMTXLa9~m3Wo(pXFyLMi1H_-3r~%z}fjV^1{piZsLICc;mCoNQ4!HF&BXeYGtADQQ48zgl!HQD_C9l#^*jM zoGIWf(R29_MYrrPozX-)#fs0%8to*x8ig_;8z*&%ioTXJNv=kjWWb=|E&1!=Fu_un zk3`6Ch?_VWKd*DAu=u`pSYaPMT|8exb1^P@WMTTo$_;)(il>#Kky?~^HD8E7qV=~^ zo2f5*&a2)*yX>%>6Wc*V=Xv@R`r}>=qepYjbT~|nF0*282ghUb1FGW+mD!AWfVvJz9Xa&$Q=M0Y{c>&%NYdwY%#ZgN zn#-b&s__Vrw9XwK8xa-#F+^ghZ1Ul&iex+cQGW(fa!s6O0cr1b8`198@rCM@B`0!S zmN~O1;d4j452OI!`%6zD`+u$o=re%7n_y0;k36f-FkmB6#s&65$F-fmJUfz_E-{^MsTH7a)4-%+&xewT; zwS)6->Ew$l7V^cNw=|txie+WEb-gKhkUi30HbLTuDsp1Ms&S9Q8ZlG$wJ(}M?_!2R zCn|ACWRbPY+dEfqyKHr5e6mXEE-us2D%QrFCy#%ZAp5{2aq>WgFgvE*lk6eEh^vv) zQ^9q&Q##KqkQ`r1tZejT)oal4GDDuu3ec$Wl*4%0km}Wgdg-X}Gvqr?;i5$GB{^&K z=PWh`i7ZVONvgBOi9g$)TW3be^?a}Rc(VDk^vu(sv$9C>2GMm51^2J@fRcOf+PK|*z<20TG(zLv)%l`+8rtW1^4%Z2;+S+v>a4)gP*Gi0A}Zly4T}* z(D$PdSkP}vnm7Z~Odx8{3_8^;j(q_bA-?$P56s+L<59}H(E;5`nuJOir|S(r%BiR} za+Y-64_}<)X1u&`H(I80zSe0nwTzZ@2#X=c@*=z010@rK^xF6mtdiPew=m*4lw`c- zMRTdCGuZn)zoNTWRYhj`tgO{7D={=pm9nU_FqvZy>84Uy=-!l^K#Xz*^?ISGo{@h z-dj2Qpga%4pb@RR*Z#^yAF0vMF;|*gdnF=#wHSWcNe4PA7OUoFy#2867Z4vYa0MJ z612ny>meYDB}X6FoE$~L6*+Aqb@b5dWrKIRbG{1Msz7E+caPALE3w@lu{WIK2cPU7gPYi+5!f)x4lS2#sy?6G1o8v z0tR6jH6x>HAlvZg=hnk17CI@1P{PRg^$*<}EY0u6ENas}QNK24C>7^UHE7ClrjUc; zKG9i6N$q$1$8t#nC?q8xk|<-CSTk2^6H}3x89kSqBR}X9%omFLK(EYj?tZ!?Y5p~? zvIlisC+Va5^}~=qEv}t;V4rgDj*TXY1@=;`v2w@#NQO@KHjbotz8l^unYX=_Q?D&X zn{h1Zwti1Dy-sghb=M!$19{jHjXjNb4DWgBj$JWjv(b!UK%FOmI(y4@f>0ehC%C>B z8Pf(C02=2!Fe&?i!VRJy4dRECG;GF$xSu>Et?fKv{PK=PU&VEHwv)I=1sh(z^7ZwY zal3m+N6B$6u*4FZyQ3pGgVqXviVt<|uvK_o}H5OWl zdOl4`)_%Ulk;J^-oaAMKs7}?6W%6iMzB^=tE$W|$`E%!0)XsP_7AG>A%@z<-eDWjV z@f305rV-T7?bPB_PtentwUuZiFvZTX1`Jl7LMakK&m?W$m~VcCJ&M6^X=uliB(`{@ z?&^h+>t!SQA<@bHaZ}txT z>8|`Wp?xD|L*grAM3+@RT2O@_l6Fc#m*}-Fs>6^WWY+n3S`hr6C_cttCH1o1RTe<9 zBfwfg`LEr|)`s==5D*z74|zWsyviFq-{PNvl^B5KU_opl_K`*AgCR{6`MHv;7DrLm zDle1C92&Me+F?m^k%OcbLl+sMPpRf>lTt^#6Atz=DY1^SDj{MwqRM`(9~^s_I-|2i z^D7RYK3!Ao^y9J-`QT1NB6&yYFo7EsXB7fZ7coTPZD3uzuQFeEHaUQ?T`#dDkd( zcVun8OXs<)Bs(;pJZ|=<)g4w0EEYg6qU%oK>d#5*%symxwvOy(XD3x?Q~R}7jJ3jn z1E?H|%U{INjZzp zP6-p7Xa2m4Sld%Vi2L;Pe)rlNXp~^!1M&NNo0LE&5}>ge);QY-hL1i6;uon1k=hI8 z7SO4fhQf;KZ{Ce2LibyV$YQ1nUe3RY-@6JXk{~h=?$& z)69dEVJej?z`JVuNgo1c7-}e}LJF8+7%=($`+?%;lLE;@3~ZqD5TN_o1p-Fswt*Re zK@{O?LalPIoBC)*k?M^DxMR=XbiWD9VA!Y($%@N3)Ke$D@@;T{&rNAIUF5!V-B$&t zx829J`A=1vNiu2Hm^28>m{i--(TckFGulkillfspx5=3(-Y;U72~;m?p+iAu5^{Nh zYih2fhrWR&8$UE|LH<&N%lzcT;6!#Ocd0e%l^^-KEl-x#cqgK)DN}VCO^u87U z7KO0p@&RoF91W6>9*4EcB_{H0%$;AUGtl9m=wU(Y)odflWR@@<9J}MqL_0I~a;8;{ zImCeb^_2p_!8m1?z%yf{+wIT@%m%$@?(&xbmgWnz#lL8W%`=Z6H@X>Q1DtrIIGS~4 z$fOC)Q>pPTdemDYSr=KEUY_Uk11X1i`LXS!f8bS}zzruQiJOVEOfEHMp|G5J^Iq*r zSqpPKW+=CCzMK`c^`|%J9>IKfF`ML6jyiR`mO_5WBB z$uml6t@#deIJQq_#;GVqpaC|BC-{4NLk1bR5oXCS46<8>L`p*5LGSH-J?JNY+P#>8 zwY8yvkrmYRaay;+t|70UKcLyRa|WNK(Ptb6W_Nae(@pfI{-!+FY_*-(pBkUz8zl(W zQM+$Py(}$$EINerai9jVY!k|rcd8+CnwaaP{KGpV<%_M{>LAdN_nxxAXKz00rxviB z9^&rMV*)>O+>Y$>^?u3U-uhoq09hX<|A1zqV5 z4kLY4^{R?s9OJ0}l8pU_Vs)=5v-`0Z-z@1k#;$XD`|AZAV1!JMBj z?^*~9BTTk$zDiBY${kX6<`~MC{tx(GbO$^~1&>{49OBBRJo&16;RT16ff~D=3?*B# zKdQECv)3F|(XpzWnza@VR-ez*0#qepjKy~0m*lWGWAq>Ko^VOe?Wvuq5fN)d?-;dj zu8~aVpWbK*LBlSRd@9^BeRt^-cRTwv$-o1Iv4b4XRy*_)-Ypm2oj(5&x$|~rg(!m+ zhGObv;*Olm`oi=pD3|Ke*~*`!P&Q)wxwaJB3d&5CyDVp2PsctNZ#=JIT)Hwzlz5;I zzju)NZdMZI^2CR)`t8S`Vf!ApkhvLug?`j8PcD)3{ZX^@_yB@J)$h0u@OTdQ(bcbH zS|$Ei3DjLLJ7O*$tUY4yFJsd+{;J#FMYfQl8|V6r1_35x@n>-x6#iN6c1y2}&$c~k z@ltUsY!{d+TJklTEf+F^jBan3r92S*e#N<*<=AYklGxFh3MUAvCHJ)1L z7H#-+2?q%9Ws*OfmS0~VjK`Obe|bmoHG1ka`3kMR-Q?R1igxvD14Xn}&s$b<<1Axd znTg?b#8WY+XK*4b=H?GK&@h!*SzJLme7YJvNwRcywxD^2YrW?pJUU9YT+Sko$SAkaR3QN<7a;;ZL$?ChgI^q$e4M3-y980E+){1jUf%Y8(xZaciT4jfuSVbuhfrbJ_ z(#TY0{kJzu?M;@8=T1+zMm{|pJ}6-A6Yu?Pm$TNKd-sl@YEavuUFTM{l8u4i$^kxm zpA`au%g_o_7l7gf+vVYa$jz;+i#8DjkPs8pZ*s#JkCBcV9g8aF8J@N@D4K=eN$w9Avhfx6VIq4l9UA$GtT$f2E`6v%BZz0MkYzp`*u> zj}ZO18z-L7^)Q<5W_&YYWRGLr8WYpdO)le==cn?*8-%$zR!J@V>&IF=aywhxlyW20 z9u*=xTn~14%)idmzYkmrm4M%)TS0hKZZR>m}XS_4)wYYM$*k(Y~9mD@j8B*iRa#+ z2oTV{iFYKta0PARghX!qV&_t>z%!|i{9du-IVpUalqa1TS!MC3-;j7ESX0Ss#IM|s zdwqM=(>$XkE`yYk605sBovDl+*;NwjyJeIGKM7WzyycE3Vnh-M)|yd3@YpzO1! zTqDtyNd@_tW|pUJ)qGJ^7zpt4=0LuE_4LCq1M{}|gGUw!c%)*2Xolp^OWsh+=48LZ zeG2IL0 z?jvL(i1ncF))^aOAU`7F(|yOrgH$Cl%O>tMjrh6aCwOQDZlQ@QG>HqJw~&{xj1Z4( z6KC>zudYw56zYangcc#&*4bKne4|o6KjbE#ow zMBXM?5_!VoF2UlAYh#R^1_f*(hLtjFGr^ZDRg&g2!mLE}tPDlQ|w#Cw+ojgpoAlv#DgW%%q zXrb8;;rfhL{m@X9$In=)gKs3_Gg3(xX4lkK6X2l*(z#HXGE!W=l^dXaZCtYKM)V1y^H@{LG(yVjdYpso1?>#G_&j+nto$zw`(8DOS^sK@*3(Idk2w$W1VWigK3po02tdvtyv;M_=j$3r+6>1bn zl~|NQ?z6oX7{6(eWK4N5Pv54oH|< zMG*qUdf#sg%}l(z>3Z+`t=ErmT$BZm<%_ZNzFu@bU-yG0Yj|J-XR-nHR*2bJWzGOS^8cEEakd2o>$=m0yaOz>J z_uQ0^;MY@M*hdDeFZ$*Ax;eR-nhZ}AJU!>ctfiByJw*EP<;z@}YT4XxkpefWjt&~} zis$?wM+-n!%&8#N)bu)nGCOvBMBn={YKq%QE#7Blu_SGz1{D#Z0@*`Eb-{%!uaAs- zcv7*9`4v)m*`(N!k%|k-CM&Kh6jIYKiM@0f!^WY=;)xa|>aJE!W8L0&?#|ODl|s-qWAEL}D*@$;h#<#$W5Uv2vp7T}keIdIQtCG^$kbJGoCE z$ustZlFi{JNMT(}f+_*j6*GPTx;nmq2Dh=gW~T!Rd+G70&{nmW?^ zMvT`+-E-#-QOq2SCQCzq@g)&YjO^Z58cNaJs#Tp^OgD~LPvv)j1B;HXfAc7D9bIGmoS^1FX0y(A;`PX^!BY+9tW-mbpc{$8vmrgj z!>co<)Lz(l#A3ZEhG9OZAANqOJaUKv>xB@7Lo@MImyuOdHr^r1Bg9kD?W@^i0xHzD zxOF-M#;+yDBflmYC|~`WUd7Ih-R`SHBfX(R&5GSB$`GEqAQ_tnCm?0Di8oq3h}%4SA=2 zPJDq|&kP&s`7)KR@qS8w>HMJYrRGCgHzv9yGHOT0nvg?;NX%C3U*`r6iu9dTUma~v z`ig%G)pfP9^xKVNRnkK^$ySBMKus%FUY=u>5|pLJeaX~+U5h#kMT}a z(XryzeCI?l^$Bya_BWx{!EMb*f|)KV39K@TL!oELo@dsLswx!p9DUG0B=afVQHm!k zQ1lcq{Rz>Yjrx$` za@~?Yg)*krKd#i1Ffi}w=);quTSfPVZASH8J5T@2jZ)i~e%b5z;WI#dJaF|LdrlQX?CzvRxDgu~sO(ER=5 zL>F1rRXe-Jt}kPbXk4ZCJ{*;at@K=~o?nqhKU`RIVXq`XiZxY3r;Ic~Lsfm8nuxw& z8cKdB_z^WvU=owDM0bk`-Hk)C>wYCCB=p-KWsg?zq9i&Ur|a#+qSX8B?vQQ}8~t)M zIW$for6BHJzF{P(&0H4_OQ%cr)3dc-yG~Gt_IW-zf=Bc4soID7%%gh!T|YX`NtaB1 zmNZBu_>|k++G&wZSUSI4e9J{JWK|1zhu2!iWxzVYU-0;ZdvF>?TR}8kx$rYO!sloy z=rJbg=x8>CFY-_;OZev`t|xHQtqL1g5!}CBo6Wkw&#*RC&^j&s-Sv*K2Oj0E7Z=VB zaunfVuG^58Sn+!i4Sbgkb`7J`u~5VOw3Jy;nHl)rd3-=S=m7m&@66?I&VkI6+B{T&wL4IJCe=c^_*jxcrjrY$j|lab$Ei66smJuDmBd^fxV zt-MvHj<$hL>SGH7vpfHjZdr1)!<^?%bnzI_9+?p)q7oQ8uB(3~YAm;jRtb+#`0VBT zT=kqQlj3$OrFZCMBG^0c`9H^HjTtmAWUt_+Rjw|4Ue_!#sZBekjN1C-M|?6l^T6$J z>HDL7Ys}1IlN*Yb?1N)N%~S8Q>6Nwh9?tQV_Afa5(&bL|rw~of+9j13_2DXt-1b~D zS}BtnJ^vC?xx@0QxtHjp&nB5a@^m){nY^bA z#JzsO7{hMG(y4}__xw^>f3=-FU;ly-Sz;-rtiphU+}i4M&KCu`x$>B}Q%R!SIUJ1q z6Df}aFHc8BYWr3%J;I;+ntMkh-K4Gf)%15KnfHmK2aR7FCwvEvDj}m#A|c*9Btkj? zEaD*l;BQ`jvwen%L*m#q(8nuQC_10~%j0d{YiG3dDY$!m-1S~NDB$khv_ggqk+hzi9D0SZ z?AC;=aQ9{h9(Knan9s4Wvv8b&Jm-$ToG~;puyukXfZY-H^sw){5pcs1`0azh6iCft z=jgEql5I0%a}Ihd3AC^r@R8agp#r|W{tFUFC25IGD(Gknwh)*#>Rd8}b^v&dw#iPd zV#R3#9FSvhYH(zMhxgt}FpZ=vOdJgyjm#~K46Ofzl1$oYSIVc;Ss{>@|4P6|9*$Cx zVE>fTwieE?#7bLLxe;PJ7>5a5PDn#3E~ZIi)>!u?F_Nkk2QhGQwgdJIH;)|uHI@P#R@cA6+B&2M zHgT9tdy!28j!)?5zS|F8wkrFb1C4h--Rt4h?KE^i=%1}iNh5I`Z8#H{g*L}H|ZnC$jM%0 z7%=R*TbG6(=W|K+tlO3qf?IHR>qG42gtsJvv>@`a{gdq0AByUB?+?M<*Ww_NF&)6i zWQ&Lj_;%?Z5P@3n=gX0wec)$um0y|^))f@IOc8X2&29{_J-YRS7BK)MB+0QX9Jbl< zJqx*QZ2%nfn8x(JAK96Ox9V*tF}epBe5k374Qw4Y(J8K za1hSSU`-{i>ICIeW!}8*_cSJY{0`+dc?E3+1!^>I|So0w4HUtsv!JqKUf#C)AZ( z46QAk%zvKK23sABkU-IVS3+Je+t`RQn;62Ws~jn3WN@6YHs;MSzuQf z8`!>O)g4rrq$9Py0(X`L=3|muEPxJ3Hh;w;Vr^mIB=Iu_3Jiwy?LB?(@m^#Y80@+U zhIpvv*aCxy)Jn5wkxXn|5zhMmYji%~c2rLWxFuw5E3*Yb1$-l?-4}$ot*eEjovjVf zy~GUcx6S~-3G{QHikQRdw`RQaun+tw_iFEKK)F^h!>d_c=>FAz>670e#EK8RoG3rE zbKis#*c1HoRU@pltF*1Xi!*Qt%*4RvKRS7*m^A`*w$~Z9r%aaXfVhcSBFI5B*ajt} z<>DFkLk0x*?e29rO>B1sf-n6G1}bL#8z4|2U~mh=9_TZCmgKe!-kK+4rm& zG`{=y<$e+IrPEj^E-~u>EtWZLbAi<`&#|GC;WEz8Vj{s_t)#-hydiKGt{s&zn;ePC^ZyzoPwF zmKMykd$VpU2w%JwtYFDMVcM;fEtnUkp+uhxf-bSm3tvDM%saySFEmu$wVW&>V&r;P z1jL9t4*b%rjc+f+=0Iv(gkx6J$Ib0HSd;HI9pZ#DyW{+O2Kad{1S|yXzKA)tn-0F- zEV$`x_sy|+xC4?66n0YOx6amN`Z9uc+Qx$~{0hbk64O z;Z!hBH;`)J&wU%zZXi71GOCDx!V=tf1%j`M3I+-X(qilb2vi{z5s!+t$F4l^Wlh06 z7lil41N41ZkyAuGSXQ39^1v691oJqE?V0E2p7wv(P_LTTu1N5u5y42DK$V(3HW{pk z{RdOTRc{1Lf8r07fPJ+;XM$E01h>zC!rxkuq!OI2s~=;gxKC}fh;&p_6Gs+!?2=hV4$!CIw;VcM-0%b z8w&;W3T`9F>nZrsYT!1i{d*wD_^?Z%H83yiHHaz6rjRiH-2{Y>zIYFu=iEmtLTaCZ zL8@4ophCf}uom4Z9DIc|uyALAJ-#t2`L4QyEC zO8aW3pAvzv;LC{sRZS4qX9F7<%*h@Z@<-rgx8dOnse$2XmH#okDuR-7h>+jS2keRr zUl9$Aj02p||MQN#)h~Y4`%h70`T}=Fg)epnMjiOqsIYg!yX-Tm)dxXoVTKL%kdRGk z_^M@K+FI3rEbKNdxP}=bYdHKU7y&e52ethc8!|xGtNkNr$RSoR8caW!zk+?=sV97K zGO(Vf)&C(H%sIfvzo>vqm4WGDp5b*u$R7)<0=Hja2;`IaC*2Gp>{bOYFe6OS|56yf zt{7P1&i@M|WPSwm4Zq!C(2EWIV`0_dgq;Q=dHnETK^|Zm?dv|hd-&B1%5D?VIT1hL!kfmkOyDM3jAR4KsfsUMSs|XLF{MS_5Id@ zl=ZLf`ULO=q`*%wbn*ZE1iO@zLev(74w1V)34E<4@RJDX{-2)Yk1IDJdY%{B*LHm# z_)16M=jqV(;0uk4BpUx^5eJa*}CkayH2LWHKU;s-^8EdX{~0l}{w zOZE4K_Pde%zkDHl6(X=k*arIs`Hz}Jhy-(wjoP&>;cE+lIS2R82^;Ws7EM9~$n71C z01)wPjUR68OETQIkkI_fU>ewvhPYV~(`*OvLFSH2e@O$Y5QKX7hsnR<~ud9MGK3bMk3 zFWdvBN;lmn6}XHK7zrkn5N#X+q|H9KbAuKBy=a2jUXXrq0!2rjK=%bXR4Qa?E2p)G|-s9#G~fRV;*_KdW%fCU)HPtN#NFQ8GrbrDn}*cGhNuNnElKsOxr z474*pKOB(6%qj#3W=gQ@CJ^HBgavMNBXrse(9UVfSiK9>bk8(zjvVkUg!umOJI4BZ zzCScOEm#EDO?QL%H5opvRUm_E!TumX`=DT+19zsO)&aZ1_`p{3YXW^34;8?J>5l9@0>YLq8A<-mKXG#Wca(yn^w5%^MHKD|Y!?Ja86yIJVdx&x5ub^7 z!mfPqNzcK2J??+Y_j3}rmAe-apOjGIZ~1=BE)M3y_WVbDzq3KV+r5$R0iQbIn)F*l zNE5^7*ajos^ZHka+ZneJi5UIp=5Gmq&5aEvyzc#v2%(YGzs%G9E+4)Nkx)MI)^7oS zO&SdbB=z}wz#S>1!3z4NkR?NWV0;_AtKMzggkMOA`0f=DL1fzQ!{_$KAbgHzuugIN z#rWAt;W9ph6@tyZ-dUymwh1A<06vQ|7){=9p9*co@xbMDMg*7Zow_R=e2!)?9Jc@d z;SgqQMuaC4d3#qp_~gi7JobRUz=KPbjED;}H4VxIGr!%e9zGz`3OF|X=ljr**&?vn z|I2w^*nMFWHrV%_qda`RTChIP_RVqOx7lkEDV6y>{g0J`KV=^ivR9?H)5d{GVA}kb zR`5A%!CFoJ1<9`&Y{6_WA7MO^fk35g_XVF$56m`oZT~85vHf&qzl=gKykhU{9e4-P UfJruz5Ad%hka^zwI^^5`0C;tDe*gdg literal 0 HcmV?d00001 diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/SpringBootConfiguration.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/SpringBootConfiguration.java new file mode 100644 index 000000000000..483c5cc56065 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/SpringBootConfiguration.java @@ -0,0 +1,10 @@ +package org.springframework.boot; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +import org.springframework.context.annotation.Configuration; + +@Target(ElementType.TYPE) +@Configuration +public @interface SpringBootConfiguration {} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/autoconfigure/SpringBootApplication.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/autoconfigure/SpringBootApplication.java new file mode 100644 index 000000000000..38bbc35733e9 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/boot/autoconfigure/SpringBootApplication.java @@ -0,0 +1,12 @@ +package org.springframework.boot.autoconfigure; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; + +import org.springframework.boot.SpringBootConfiguration; + +@Target(ElementType.TYPE) +@Inherited +@SpringBootConfiguration +public @interface SpringBootApplication {} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Bean.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Bean.java new file mode 100644 index 000000000000..24d7be0f8174 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Bean.java @@ -0,0 +1,10 @@ +package org.springframework.context.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE}) +public @interface Bean { + + String[] name() default {}; +} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Configuration.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Configuration.java new file mode 100644 index 000000000000..0024b3ba8338 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/context/annotation/Configuration.java @@ -0,0 +1,7 @@ +package org.springframework.context.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +public @interface Configuration {} \ No newline at end of file diff --git a/java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java similarity index 100% rename from java/ql/test/stubs/spring-core-5.3.2/org/springframework/core/annotation/AliasFor.java rename to java/ql/test/stubs/springframework-5.2.3/org/springframework/core/annotation/AliasFor.java diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java new file mode 100644 index 000000000000..5eb56c0897b2 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java @@ -0,0 +1,8 @@ +package org.springframework.remoting.httpinvoker; + +public class HttpInvokerServiceExporter extends org.springframework.remoting.rmi.RemoteInvocationSerializingExporter { + + public void setService(Object service) {} + + public void setServiceInterface(Class clazz) {} +} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java new file mode 100644 index 000000000000..5449b83ba865 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java @@ -0,0 +1,3 @@ +package org.springframework.remoting.rmi; + +public abstract class RemoteInvocationSerializingExporter {} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java index 0bfb67d99c18..a4a49fffb90a 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/stereotype/Controller.java @@ -1,9 +1,15 @@ package org.springframework.stereotype; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; -@Target(value=ElementType.TYPE) -@Retention(value=RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) @Documented @Component -public @interface Controller { } +public @interface Controller { + String value() default ""; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java new file mode 100644 index 000000000000..a5a51786d209 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/ObjectUtils.java @@ -0,0 +1,202 @@ +package org.springframework.util; + +import java.lang.reflect.Array; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Optional; +import java.util.StringJoiner; +import org.springframework.lang.Nullable; + +public abstract class ObjectUtils { + + private static final int INITIAL_HASH = 7; + private static final int MULTIPLIER = 31; + private static final String EMPTY_STRING = ""; + private static final String NULL_STRING = "null"; + private static final String ARRAY_START = "{"; + private static final String ARRAY_END = "}"; + private static final String EMPTY_ARRAY = "{}"; + private static final String ARRAY_ELEMENT_SEPARATOR = ", "; + private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; + + public ObjectUtils() { + } + + public static boolean isCheckedException(Throwable ex) { + return false; + } + + public static boolean isCompatibleWithThrowsClause(Throwable ex, @Nullable Class... declaredExceptions) { + return false; + } + + public static boolean isArray(@Nullable Object obj) { + return false; + } + + public static boolean isEmpty(@Nullable Object[] array) { + return false; + } + + public static boolean isEmpty(@Nullable Object obj) { + return false; + } + + @Nullable + public static Object unwrapOptional(@Nullable Object obj) { + return null; + } + + public static boolean containsElement(@Nullable Object[] array, Object element) { + return true; + } + + public static boolean containsConstant(Enum[] enumValues, String constant) { + return true; + } + + public static boolean containsConstant(Enum[] enumValues, String constant, boolean caseSensitive) { + return true; + } + + public static > E caseInsensitiveValueOf(E[] enumValues, String constant) { + return null; + } + + public static A[] addObjectToArray(@Nullable A[] array, @Nullable O obj) { + return null; + } + + public static Object[] toObjectArray(@Nullable Object source) { + return null; + } + + public static boolean nullSafeEquals(@Nullable Object o1, @Nullable Object o2) { + return false; + } + + private static boolean arrayEquals(Object o1, Object o2) { + return false; + } + + public static int nullSafeHashCode(@Nullable Object obj) { + return 1; + } + + public static int nullSafeHashCode(@Nullable Object[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable boolean[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable byte[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable char[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable double[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable float[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable int[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable long[] array) { + return 1; + } + + public static int nullSafeHashCode(@Nullable short[] array) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(boolean bool) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(double dbl) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(float flt) { + return 1; + } + + /** @deprecated */ + @Deprecated + public static int hashCode(long lng) { + return 1; + } + + public static String identityToString(@Nullable Object obj) { + return ""; + } + + public static String getIdentityHexString(Object obj) { + return ""; + } + + public static String getDisplayString(@Nullable Object obj) { + return ""; + } + + public static String nullSafeClassName(@Nullable Object obj) { + return ""; + } + + public static String nullSafeToString(@Nullable Object obj) { + return ""; + } + + public static String nullSafeToString(@Nullable Object[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable boolean[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable byte[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable char[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable double[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable float[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable int[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable long[] array) { + return ""; + } + + public static String nullSafeToString(@Nullable short[] array) { + return ""; + } +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java new file mode 100644 index 000000000000..a78d47e44c6a --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/util/StringUtils.java @@ -0,0 +1,30 @@ +package org.springframework.util; + +import java.io.ByteArrayOutputStream; +import java.nio.charset.Charset; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Deque; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Locale; +import java.util.Properties; +import java.util.Set; +import java.util.StringJoiner; +import java.util.StringTokenizer; +import java.util.TimeZone; +import org.springframework.lang.Nullable; + +public abstract class StringUtils { + + @Deprecated + public static boolean isEmpty(@Nullable Object str) { + return true; + } + +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java similarity index 100% rename from java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/GetMapping.java rename to java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/GetMapping.java diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java similarity index 100% rename from java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/Mapping.java rename to java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/Mapping.java diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java index 73ff8d1b03af..093065ca5f16 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestMapping.java @@ -1,11 +1,32 @@ package org.springframework.web.bind.annotation; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; @Target(value={ElementType.METHOD,ElementType.TYPE}) @Retention(value=RetentionPolicy.RUNTIME) @Documented +@Mapping public @interface RequestMapping { + String name() default ""; + + @AliasFor("path") + String[] value() default {}; + + @AliasFor("value") + String[] path() default {}; RequestMethod[] method() default {}; + + String[] params() default {}; + + String[] headers() default {}; + + String[] consumes() default {}; + + String[] produces() default {}; } diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java index 5ae52ad123fa..56094811c376 100644 --- a/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/RequestParam.java @@ -1,8 +1,23 @@ package org.springframework.web.bind.annotation; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; -@Target(value=ElementType.PARAMETER) -@Retention(value=RetentionPolicy.RUNTIME) +@Target({ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) @Documented -public @interface RequestParam { } +public @interface RequestParam { + @AliasFor("name") + String value() default ""; + + @AliasFor("value") + String name() default ""; + + boolean required() default true; + + String defaultValue() default "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n"; +} diff --git a/java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java similarity index 100% rename from java/ql/test/stubs/spring-web-5.3.2/org/springframework/web/bind/annotation/ResponseBody.java rename to java/ql/test/stubs/springframework-5.2.3/org/springframework/web/bind/annotation/ResponseBody.java From 848940305122bb268b9baed789bc4ea2cc9e82e0 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 8 Apr 2021 16:18:03 +0200 Subject: [PATCH 0202/1662] Python: Add some tests for pathlib --- .../frameworks/stdlib/FileSystemAccess.py | 15 +++++++++++++++ .../frameworks/stdlib/SafeAccessCheck.py | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py index 109af9bd4fd4..95824aa1e9e7 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py +++ b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py @@ -16,3 +16,18 @@ io.open("filepath") # $getAPathArgument="filepath" io.open(file="filepath") # $getAPathArgument="filepath" + +from pathlib import Path, PosixPath, WindowsPath + +p = Path("filepath") +posix = PosixPath("posix/filepath") +windows = WindowsPath("windows/filepath") + +p.chmod(0o777) # MISSING: $getAPathArgument=p +posix.chmod(0o777) # MISSING: $getAPathArgument=posix +windows.chmod(0o777) # MISSING: $getAPathArgument=windows + +with p.open() as f: # MISSING: $getAPathArgument=p + f.read() + +p.write_bytes(b"hello") # MISSING: $getAPathArgument=p diff --git a/python/ql/test/library-tests/frameworks/stdlib/SafeAccessCheck.py b/python/ql/test/library-tests/frameworks/stdlib/SafeAccessCheck.py index d5a727311ff0..69839c6dea9f 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/SafeAccessCheck.py +++ b/python/ql/test/library-tests/frameworks/stdlib/SafeAccessCheck.py @@ -3,6 +3,6 @@ if s.startswith("tainted"): # $checks=s branch=true pass -sw = s.startswith # $ MISSING: checks=s branch=true -if sw("safe"): +sw = s.startswith +if sw("safe"): # $ MISSING: checks=s branch=true pass From 2387dc640cb7d7aedf89250246d190057524595f Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Mon, 12 Apr 2021 07:51:11 +0200 Subject: [PATCH 0203/1662] Python: Attempts at modelling `pathlib`-`Path`s --- .../src/semmle/python/frameworks/Stdlib.qll | 213 ++++++++++++++++++ 1 file changed, 213 insertions(+) diff --git a/python/ql/src/semmle/python/frameworks/Stdlib.qll b/python/ql/src/semmle/python/frameworks/Stdlib.qll index 01df130d0db2..cb508723fbab 100644 --- a/python/ql/src/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/semmle/python/frameworks/Stdlib.qll @@ -864,6 +864,219 @@ private module Stdlib { class Sqlite3 extends PEP249ModuleApiNode { Sqlite3() { this = API::moduleImport("sqlite3") } } + + // --------------------------------------------------------------------------- + // pathlib + // --------------------------------------------------------------------------- + /** Gets a reference to the `pathlib` module. */ + private API::Node pathlib() { result = API::moduleImport("pathlib") } + + /** + * Gets a name of a constructor for a `pathlib.Path` object. + * We include the pure paths, as they can be "exported" (say with `as_posix`) and then used to acces the underlying file system. + */ + private string pathlibPathConstructor() { + result in ["Path", "PurePath", "PurePosixPath", "PureWindowsPath", "PosixPath", "WindowsPath"] + } + + /** + * Gets a name of an attribute of a `pathlib.Path` object that is also a `pathlib.Path` object. + */ + private string pathlibPathAttribute() { result in ["parent"] } + + /** + * Gets a name of a method of a `pathlib.Path` object that returns a `pathlib.Path` object. + */ + private string pathlibPathMethod() { result in ["absolute", "relative_to"] } + + /** + * Gets a name of a method of a `pathlib.Path` object that modifies a `pathlib.Path` object based on new data. + */ + private string pathlibPathInjection() { + result in ["joinpath", "with_name", "with_stem", "with_suffix"] + } + + /** + * Gets a name of an attribute of a `pathlib.Path` object that exports information about the `pathlib.Path` object. + */ + private string pathlibPathAttributeExport() { + result in ["drive", "root", "anchor", "name", "suffix", "stem"] + } + + /** + * Gets a name of a method of a `pathlib.Path` object that exports information about the `pathlib.Path` object. + */ + private string pathlibPathMethodExport() { result in ["as_posix", "as_uri"] } + + /** + * Gets a reference to a `pathlib.Path` object. + * This type tracker makes the monomorphic API use assumption. + */ + private DataFlow::LocalSourceNode pathlibPath(DataFlow::TypeTracker t) { + // Type construction + t.start() and + result = pathlib().getMember(pathlibPathConstructor()).getACall() + or + // Type-preserving call + exists(DataFlow::AttrRead returnsPath, DataFlow::TypeTracker t2 | + returnsPath.getAttributeName() = pathlibPathMethod() and + returnsPath.getObject().getALocalSource() = pathlibPath(t2) and + t2.end() + | + t.start() and + result.(DataFlow::CallCfgNode).getFunction() = returnsPath + ) + or + // Type-preserving attribute + exists(DataFlow::AttrRead isPath, DataFlow::TypeTracker t2 | + isPath.getAttributeName() = pathlibPathAttribute() and + isPath.getObject().getALocalSource() = pathlibPath(t2) and + t2.end() + | + t.start() and + result = isPath + ) + or + // Data injection + exists( + BinaryExprNode slash, DataFlow::Node right, DataFlow::Node left, DataFlow::TypeTracker t2 + | + slash.getOp() instanceof Div and + right.asCfgNode() = slash.getRight() and + left.asCfgNode() = slash.getLeft() and + left.getALocalSource() = pathlibPath(t2) and + t2.end() + | + t.start() and + result.asCfgNode() = slash + ) + or + exists(DataFlow::AttrRead returnsPath, DataFlow::TypeTracker t2 | + returnsPath.getAttributeName() = pathlibPathInjection() and + returnsPath.getObject().getALocalSource() = pathlibPath(t2) and + t2.end() + | + t.start() and + result.(DataFlow::CallCfgNode).getFunction() = returnsPath + ) + or + // Due to bad performance when using normal setup with `path(t2).track(t2, t)` + // we have inlined that code and forced a join + exists(DataFlow::TypeTracker t2 | + exists(DataFlow::StepSummary summary | + pathlibPath_first_join(t2, result, summary) and + t = t2.append(summary) + ) + ) + } + + pragma[nomagic] + private predicate pathlibPath_first_join( + DataFlow::TypeTracker t2, DataFlow::Node res, DataFlow::StepSummary summary + ) { + DataFlow::StepSummary::step(pathlibPath(t2), res, summary) + } + + /** Gets a reference to a `pathlib.Path` object. */ + DataFlow::LocalSourceNode pathlibPath() { result = pathlibPath(DataFlow::TypeTracker::end()) } + + private class PathlibFileAccess extends FileSystemAccess::Range, DataFlow::CallCfgNode { + DataFlow::AttrRead fileAccess; + + PathlibFileAccess() { + fileAccess.getAttributeName() in [ + "stat", "chmod", "exists", "expanduser", "glob", "group", "is_dir", "is_file", "is_mount", + "is_symlink", "is_socket", "is_fifo", "is_block_device", "is_char_device", "iter_dir", + "lchmod", "lstat", "mkdir", "open", "owner", "read_bytes", "read_text", "readlink", + "rename", "replace", "resolve", "rglob", "rmdir", "samefile", "symlink_to", "touch", + "unlink", "link_to", "write_bytes", "write_text" + ] and + fileAccess.getObject().getALocalSource() = pathlibPath() and + this.getFunction() = fileAccess + } + + override DataFlow::Node getAPathArgument() { result = fileAccess.getObject() } + } + + /** An additional taint steps for objects of type `pathlib.Path` */ + private class PathlibPathTaintStep extends TaintTracking::AdditionalTaintStep { + override predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + // Type construction + nodeTo = pathlib().getMember(pathlibPathConstructor()).getACall() and + nodeFrom = nodeTo.(DataFlow::CallCfgNode).getArg(_) + or + // Type preservation + nodeFrom.getALocalSource() = pathlibPath() and + nodeTo.getALocalSource() = pathlibPath() and + ( + // Type-preserving call + exists(DataFlow::AttrRead returnsPath | + returnsPath.getAttributeName() = pathlibPathMethod() + | + nodeTo.(DataFlow::CallCfgNode).getFunction() = returnsPath and + nodeFrom = returnsPath.getObject() + ) + or + // Type-preserving attribute + exists(DataFlow::AttrRead isPath | isPath.getAttributeName() = pathlibPathAttribute() | + nodeTo = isPath and + nodeFrom = isPath.getObject() + ) + ) + or + // Data injection + nodeTo.getALocalSource() = pathlibPath() and + ( + // Special handling of the `/` operator + exists(BinaryExprNode slash, DataFlow::Node left | + slash.getOp() instanceof Div and + left.asCfgNode() = slash.getLeft() and + left.getALocalSource() = pathlibPath() + | + nodeTo.asCfgNode() = slash and + ( + // type-preserving call + nodeFrom = left + or + // data injection + nodeFrom.asCfgNode() = slash.getRight() + ) + ) + or + // standard case + exists(DataFlow::AttrRead augmentsPath | + augmentsPath.getAttributeName() = pathlibPathInjection() + | + nodeTo.(DataFlow::CallCfgNode).getFunction() = augmentsPath and + ( + // type-preserving call + nodeFrom = augmentsPath.getObject() + or + // data injection + nodeFrom = nodeTo.(DataFlow::CallCfgNode).getArg(_) + ) + ) + ) + or + // Export data from type + nodeFrom.getALocalSource() = pathlibPath() and + ( + // exporting attribute + exists(DataFlow::AttrRead export | + export.getAttributeName() = pathlibPathAttributeExport() + | + nodeTo = export and + nodeFrom = export.getObject() + ) + or + // exporting call + exists(DataFlow::AttrRead export | export.getAttributeName() = pathlibPathMethodExport() | + nodeTo.(DataFlow::CallCfgNode).getFunction() = export and + nodeFrom = export.getObject() + ) + ) + } + } } // --------------------------------------------------------------------------- From 52a9040d73af7310dcbd8338b60f909ed72408ee Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 09:46:53 +0200 Subject: [PATCH 0204/1662] Python update tests --- .../frameworks/stdlib/FileSystemAccess.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py index 95824aa1e9e7..1703869d4f46 100644 --- a/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py +++ b/python/ql/test/library-tests/frameworks/stdlib/FileSystemAccess.py @@ -23,11 +23,14 @@ posix = PosixPath("posix/filepath") windows = WindowsPath("windows/filepath") -p.chmod(0o777) # MISSING: $getAPathArgument=p -posix.chmod(0o777) # MISSING: $getAPathArgument=posix -windows.chmod(0o777) # MISSING: $getAPathArgument=windows +p.chmod(0o777) # $getAPathArgument=p +posix.chmod(0o777) # $getAPathArgument=posix +windows.chmod(0o777) # $getAPathArgument=windows -with p.open() as f: # MISSING: $getAPathArgument=p +with p.open() as f: # $getAPathArgument=p f.read() -p.write_bytes(b"hello") # MISSING: $getAPathArgument=p +p.write_bytes(b"hello") # $getAPathArgument=p + +name = windows.parent.name +o(name) # $getAPathArgument=name From c9b2c7885ef3b33cb2e1639d217beb8048b0ff12 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 10:14:35 +0200 Subject: [PATCH 0205/1662] Python: add changenote --- python/change-notes/2021-04-15-pathlib-Paths.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 python/change-notes/2021-04-15-pathlib-Paths.md diff --git a/python/change-notes/2021-04-15-pathlib-Paths.md b/python/change-notes/2021-04-15-pathlib-Paths.md new file mode 100644 index 000000000000..d92212c10f27 --- /dev/null +++ b/python/change-notes/2021-04-15-pathlib-Paths.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Added modeling of `pathlib` from the standard library to recognize `Path` objects constructed in various ways and resulting file accesses. This can lead to new results for `py/path-injection`. From bd3b3178ba2a914567d831518490967676bfb0b0 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 15 Apr 2021 09:16:51 +0100 Subject: [PATCH 0206/1662] Fix documentation of Modifier.qll --- java/ql/src/semmle/code/java/Modifier.qll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/Modifier.qll b/java/ql/src/semmle/code/java/Modifier.qll index 7fb9f9826163..39cbe5a3c294 100755 --- a/java/ql/src/semmle/code/java/Modifier.qll +++ b/java/ql/src/semmle/code/java/Modifier.qll @@ -18,7 +18,9 @@ abstract class Modifiable extends Element { * Holds if this element has modifier `m`. * * For most purposes, the more specialized predicates `isAbstract`, `isPublic`, etc. - * should be used, which also take implicit modifiers into account. + * should be used. + * + * Both this method and those specialized predicates take implicit modifiers into account. * For instance, non-default instance methods in interfaces are implicitly * abstract, so `isAbstract()` will hold for them even if `hasModifier("abstract")` * does not. From b4a2a9db255d64b1aa1da203e78326768b1153d5 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Thu, 15 Apr 2021 09:23:45 +0100 Subject: [PATCH 0207/1662] JS: Fix extraction of non-substitution template literal types --- .../ts/extractor/TypeScriptASTConverter.java | 15 +++++++++------ .../TemplateTypes/TemplateTypes.expected | 6 ++++++ .../TemplateTypes/TemplateTypes.ql | 3 +++ .../RegressionTests/TemplateTypes/tsconfig.json | 3 +++ .../RegressionTests/TemplateTypes/tst.ts | 7 +++++++ 5 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.expected create mode 100644 javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.ql create mode 100644 javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tsconfig.json create mode 100644 javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tst.ts diff --git a/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptASTConverter.java b/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptASTConverter.java index 36d4f8886187..f8ad99915c90 100644 --- a/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptASTConverter.java +++ b/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptASTConverter.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Collectors; import com.google.gson.JsonArray; import com.google.gson.JsonElement; @@ -1001,10 +1000,10 @@ private Node convertConditionalExpression(JsonObject node, SourceLocation loc) t private Node convertConditionalType(JsonObject node, SourceLocation loc) throws ParseError { return new ConditionalTypeExpr( loc, - convertChild(node, "checkType"), - convertChild(node, "extendsType"), - convertChild(node, "trueType"), - convertChild(node, "falseType")); + convertChildAsType(node, "checkType"), + convertChildAsType(node, "extendsType"), + convertChildAsType(node, "trueType"), + convertChildAsType(node, "falseType")); } private SourceLocation getSourceRange(Position from, Position to) { @@ -1613,6 +1612,10 @@ private Node convertLiteralType(JsonObject node, SourceLocation loc) throws Pars literal = new Literal(loc, arg.getTokenType(), "-" + arg.getValue()); } } + if (literal instanceof TemplateLiteral) { + // A LiteralType containing a NoSubstitutionTemplateLiteral must produce a TemplateLiteralTypeExpr + return new TemplateLiteralTypeExpr(literal.getLoc(), new ArrayList<>(), ((TemplateLiteral)literal).getQuasis()); + } return literal; } @@ -1842,7 +1845,7 @@ private Node convertOmittedExpression() { } private Node convertOptionalType(JsonObject node, SourceLocation loc) throws ParseError { - return new OptionalTypeExpr(loc, convertChild(node, "type")); + return new OptionalTypeExpr(loc, convertChildAsType(node, "type")); } private ITypeExpression asType(Node node) { diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.expected b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.expected new file mode 100644 index 000000000000..e713b3e48049 --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.expected @@ -0,0 +1,6 @@ +| tst.ts:2:11:2:21 | `foo ${T1}` | +| tst.ts:4:45:4:49 | `foo` | +| tst.ts:4:53:4:57 | `bar` | +| tst.ts:5:46:5:50 | `foo` | +| tst.ts:5:54:5:63 | `bar ${K}` | +| tst.ts:7:15:7:19 | `foo` | diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.ql b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.ql new file mode 100644 index 000000000000..f08f5a201dda --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/TemplateTypes.ql @@ -0,0 +1,3 @@ +import javascript + +query TemplateLiteralTypeExpr literalType() { any() } diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tsconfig.json b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tsconfig.json new file mode 100644 index 000000000000..82194fc7ab06 --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tsconfig.json @@ -0,0 +1,3 @@ +{ + "include": ["."] +} diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tst.ts b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tst.ts new file mode 100644 index 000000000000..21718ea3b340 --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/TemplateTypes/tst.ts @@ -0,0 +1,7 @@ +type T1 = 'foo' | 'bar'; +type T2 = `foo ${T1}`; + +type FooToBar = K extends `foo` ? `bar` : K; +type FooToBar2 = K extends `foo` ? `bar ${K}` : K; + +type Tuple = [`foo`?]; From cb736c8c82b0a8f91e18e9dfd2b3a16f3b5194a2 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Thu, 15 Apr 2021 09:37:57 +0100 Subject: [PATCH 0208/1662] JS: Change note --- .../2021-04-15-typescript-template-literal-type-crash.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 javascript/change-notes/2021-04-15-typescript-template-literal-type-crash.md diff --git a/javascript/change-notes/2021-04-15-typescript-template-literal-type-crash.md b/javascript/change-notes/2021-04-15-typescript-template-literal-type-crash.md new file mode 100644 index 000000000000..e08dbd54dd69 --- /dev/null +++ b/javascript/change-notes/2021-04-15-typescript-template-literal-type-crash.md @@ -0,0 +1,3 @@ +lgtm,codescanning +* Fixed a bug that could cause extraction to fail when extracting a TypeScript + code base containing a template literal type without substitutions. From 3eb18135847693e0e7d0494642aa4c12048c031b Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 10:47:49 +0200 Subject: [PATCH 0209/1662] Python: update test expectations --- .../TestTaint.expected | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/TestTaint.expected b/python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/TestTaint.expected index 2a48c5b56042..7ff94f218a3e 100644 --- a/python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/TestTaint.expected +++ b/python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep-py3/TestTaint.expected @@ -1,18 +1,18 @@ | test_collections.py:16 | ok | test_access | tainted_list.copy() | | test_collections.py:24 | ok | list_clear | tainted_list | | test_collections.py:27 | fail | list_clear | tainted_list | -| test_pathlib.py:26 | fail | test_basic | tainted_path | -| test_pathlib.py:28 | fail | test_basic | tainted_pure_path | -| test_pathlib.py:29 | fail | test_basic | tainted_pure_posix_path | -| test_pathlib.py:30 | fail | test_basic | tainted_pure_windows_path | -| test_pathlib.py:32 | fail | test_basic | BinaryExpr | +| test_pathlib.py:26 | ok | test_basic | tainted_path | +| test_pathlib.py:28 | ok | test_basic | tainted_pure_path | +| test_pathlib.py:29 | ok | test_basic | tainted_pure_posix_path | +| test_pathlib.py:30 | ok | test_basic | tainted_pure_windows_path | +| test_pathlib.py:32 | ok | test_basic | BinaryExpr | | test_pathlib.py:33 | fail | test_basic | BinaryExpr | -| test_pathlib.py:35 | fail | test_basic | tainted_path.joinpath(..) | -| test_pathlib.py:36 | fail | test_basic | pathlib.Path(..).joinpath(..) | -| test_pathlib.py:37 | fail | test_basic | pathlib.Path(..).joinpath(..) | -| test_pathlib.py:39 | fail | test_basic | str(..) | -| test_pathlib.py:49 | fail | test_basic | tainted_posix_path | -| test_pathlib.py:55 | fail | test_basic | tainted_windows_path | +| test_pathlib.py:35 | ok | test_basic | tainted_path.joinpath(..) | +| test_pathlib.py:36 | ok | test_basic | pathlib.Path(..).joinpath(..) | +| test_pathlib.py:37 | ok | test_basic | pathlib.Path(..).joinpath(..) | +| test_pathlib.py:39 | ok | test_basic | str(..) | +| test_pathlib.py:49 | ok | test_basic | tainted_posix_path | +| test_pathlib.py:55 | ok | test_basic | tainted_windows_path | | test_string.py:17 | ok | str_methods | ts.casefold() | | test_string.py:19 | ok | str_methods | ts.format_map(..) | | test_string.py:20 | ok | str_methods | "{unsafe}".format_map(..) | From 02e41d8018180dd0248c9fae5db610c213934298 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 10:49:22 +0200 Subject: [PATCH 0210/1662] Python: update annotations This because `resolve` accesses the file system, I am open to not include that fact in the modelling. --- .../library-tests/frameworks/django-v2-v3/testproj/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/settings.py b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/settings.py index 4e34a751a6f5..1339a14312c8 100644 --- a/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/settings.py +++ b/python/ql/test/library-tests/frameworks/django-v2-v3/testproj/settings.py @@ -13,7 +13,7 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent +BASE_DIR = Path(__file__).resolve().parent.parent #$ getAPathArgument=Path() # Quick-start development settings - unsuitable for production From d361d999b7ad57a0f0d87a25f762bbd9d0b0d21f Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 10:55:09 +0200 Subject: [PATCH 0211/1662] Python: add some path returning functions that were only listed as file sytem accesses. --- python/ql/src/semmle/python/frameworks/Stdlib.qll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/ql/src/semmle/python/frameworks/Stdlib.qll b/python/ql/src/semmle/python/frameworks/Stdlib.qll index cb508723fbab..739872e44836 100644 --- a/python/ql/src/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/semmle/python/frameworks/Stdlib.qll @@ -887,7 +887,9 @@ private module Stdlib { /** * Gets a name of a method of a `pathlib.Path` object that returns a `pathlib.Path` object. */ - private string pathlibPathMethod() { result in ["absolute", "relative_to"] } + private string pathlibPathMethod() { + result in ["absolute", "relative_to", "rename", "replace", "resolve"] + } /** * Gets a name of a method of a `pathlib.Path` object that modifies a `pathlib.Path` object based on new data. From f8570bb293b257444413398aa073ee263203afd3 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Thu, 15 Apr 2021 10:16:46 +0100 Subject: [PATCH 0212/1662] JS: Update TRAP --- .../ts/output/trap/importNonStrings.ts.trap | 269 ++++++++++++++++-- 1 file changed, 242 insertions(+), 27 deletions(-) diff --git a/javascript/extractor/tests/ts/output/trap/importNonStrings.ts.trap b/javascript/extractor/tests/ts/output/trap/importNonStrings.ts.trap index c5fc95ddcb86..af044be98c89 100644 --- a/javascript/extractor/tests/ts/output/trap/importNonStrings.ts.trap +++ b/javascript/extractor/tests/ts/output/trap/importNonStrings.ts.trap @@ -9,34 +9,249 @@ hasLocation(#10000,#10002) #20000=@"global_scope" scopes(#20000,0) #20001=@"script;{#10000},1,1" -toplevels(#20001,0) -#20002=@"loc,{#10000},1,1,1,1" -locations_default(#20002,#10000,1,1,1,1) -hasLocation(#20001,#20002) -#20003=* -js_parse_errors(#20003,#20001,"Error: Unsupported syntax in import","type Y = import(`Foo`); -") -#20004=@"loc,{#10000},2,10,2,10" -locations_default(#20004,#10000,2,10,2,10) -hasLocation(#20003,#20004) -#20005=* -lines(#20005,#20001,"type X = import(3);"," +#20002=* +lines(#20002,#20001,"type X = import(3);"," ") -#20006=@"loc,{#10000},1,1,1,19" -locations_default(#20006,#10000,1,1,1,19) -hasLocation(#20005,#20006) -#20007=* -lines(#20007,#20001,"type Y = import(`Foo`);"," +#20003=@"loc,{#10000},1,1,1,19" +locations_default(#20003,#10000,1,1,1,19) +hasLocation(#20002,#20003) +#20004=* +lines(#20004,#20001,"type Y = import(`Foo`);"," ") -#20008=@"loc,{#10000},2,1,2,23" -locations_default(#20008,#10000,2,1,2,23) -hasLocation(#20007,#20008) -#20009=* -lines(#20009,#20001,"type Z = import(Y);"," +#20005=@"loc,{#10000},2,1,2,23" +locations_default(#20005,#10000,2,1,2,23) +hasLocation(#20004,#20005) +#20006=* +lines(#20006,#20001,"type Z = import(Y);"," ") -#20010=@"loc,{#10000},3,1,3,19" -locations_default(#20010,#10000,3,1,3,19) -hasLocation(#20009,#20010) -numlines(#20001,3,0,0) -numlines(#10000,3,0,0) +#20007=@"loc,{#10000},3,1,3,19" +locations_default(#20007,#10000,3,1,3,19) +hasLocation(#20006,#20007) +numlines(#20001,3,3,0) +#20008=* +tokeninfo(#20008,7,#20001,0,"type") +#20009=@"loc,{#10000},1,1,1,4" +locations_default(#20009,#10000,1,1,1,4) +hasLocation(#20008,#20009) +#20010=* +tokeninfo(#20010,6,#20001,1,"X") +#20011=@"loc,{#10000},1,6,1,6" +locations_default(#20011,#10000,1,6,1,6) +hasLocation(#20010,#20011) +#20012=* +tokeninfo(#20012,8,#20001,2,"=") +#20013=@"loc,{#10000},1,8,1,8" +locations_default(#20013,#10000,1,8,1,8) +hasLocation(#20012,#20013) +#20014=* +tokeninfo(#20014,7,#20001,3,"import") +#20015=@"loc,{#10000},1,10,1,15" +locations_default(#20015,#10000,1,10,1,15) +hasLocation(#20014,#20015) +#20016=* +tokeninfo(#20016,8,#20001,4,"(") +#20017=@"loc,{#10000},1,16,1,16" +locations_default(#20017,#10000,1,16,1,16) +hasLocation(#20016,#20017) +#20018=* +tokeninfo(#20018,3,#20001,5,"3") +#20019=@"loc,{#10000},1,17,1,17" +locations_default(#20019,#10000,1,17,1,17) +hasLocation(#20018,#20019) +#20020=* +tokeninfo(#20020,8,#20001,6,")") +#20021=@"loc,{#10000},1,18,1,18" +locations_default(#20021,#10000,1,18,1,18) +hasLocation(#20020,#20021) +#20022=* +tokeninfo(#20022,8,#20001,7,";") +#20023=@"loc,{#10000},1,19,1,19" +locations_default(#20023,#10000,1,19,1,19) +hasLocation(#20022,#20023) +#20024=* +tokeninfo(#20024,7,#20001,8,"type") +#20025=@"loc,{#10000},2,1,2,4" +locations_default(#20025,#10000,2,1,2,4) +hasLocation(#20024,#20025) +#20026=* +tokeninfo(#20026,6,#20001,9,"Y") +#20027=@"loc,{#10000},2,6,2,6" +locations_default(#20027,#10000,2,6,2,6) +hasLocation(#20026,#20027) +#20028=* +tokeninfo(#20028,8,#20001,10,"=") +#20029=@"loc,{#10000},2,8,2,8" +locations_default(#20029,#10000,2,8,2,8) +hasLocation(#20028,#20029) +#20030=* +tokeninfo(#20030,7,#20001,11,"import") +#20031=@"loc,{#10000},2,10,2,15" +locations_default(#20031,#10000,2,10,2,15) +hasLocation(#20030,#20031) +#20032=* +tokeninfo(#20032,8,#20001,12,"(") +#20033=@"loc,{#10000},2,16,2,16" +locations_default(#20033,#10000,2,16,2,16) +hasLocation(#20032,#20033) +#20034=* +tokeninfo(#20034,4,#20001,13,"`Foo`") +#20035=@"loc,{#10000},2,17,2,21" +locations_default(#20035,#10000,2,17,2,21) +hasLocation(#20034,#20035) +#20036=* +tokeninfo(#20036,8,#20001,14,")") +#20037=@"loc,{#10000},2,22,2,22" +locations_default(#20037,#10000,2,22,2,22) +hasLocation(#20036,#20037) +#20038=* +tokeninfo(#20038,8,#20001,15,";") +#20039=@"loc,{#10000},2,23,2,23" +locations_default(#20039,#10000,2,23,2,23) +hasLocation(#20038,#20039) +#20040=* +tokeninfo(#20040,7,#20001,16,"type") +#20041=@"loc,{#10000},3,1,3,4" +locations_default(#20041,#10000,3,1,3,4) +hasLocation(#20040,#20041) +#20042=* +tokeninfo(#20042,6,#20001,17,"Z") +#20043=@"loc,{#10000},3,6,3,6" +locations_default(#20043,#10000,3,6,3,6) +hasLocation(#20042,#20043) +#20044=* +tokeninfo(#20044,8,#20001,18,"=") +#20045=@"loc,{#10000},3,8,3,8" +locations_default(#20045,#10000,3,8,3,8) +hasLocation(#20044,#20045) +#20046=* +tokeninfo(#20046,7,#20001,19,"import") +#20047=@"loc,{#10000},3,10,3,15" +locations_default(#20047,#10000,3,10,3,15) +hasLocation(#20046,#20047) +#20048=* +tokeninfo(#20048,8,#20001,20,"(") +#20049=@"loc,{#10000},3,16,3,16" +locations_default(#20049,#10000,3,16,3,16) +hasLocation(#20048,#20049) +#20050=* +tokeninfo(#20050,6,#20001,21,"Y") +#20051=@"loc,{#10000},3,17,3,17" +locations_default(#20051,#10000,3,17,3,17) +hasLocation(#20050,#20051) +#20052=* +tokeninfo(#20052,8,#20001,22,")") +#20053=@"loc,{#10000},3,18,3,18" +locations_default(#20053,#10000,3,18,3,18) +hasLocation(#20052,#20053) +#20054=* +tokeninfo(#20054,8,#20001,23,";") +#20055=@"loc,{#10000},3,19,3,19" +locations_default(#20055,#10000,3,19,3,19) +hasLocation(#20054,#20055) +#20056=* +tokeninfo(#20056,0,#20001,24,"") +#20057=@"loc,{#10000},4,1,4,0" +locations_default(#20057,#10000,4,1,4,0) +hasLocation(#20056,#20057) +toplevels(#20001,0) +#20058=@"loc,{#10000},1,1,4,0" +locations_default(#20058,#10000,1,1,4,0) +hasLocation(#20001,#20058) +#20059=@"local_type_name;{X};{#20000}" +local_type_names(#20059,"X",#20000) +#20060=@"local_type_name;{Y};{#20000}" +local_type_names(#20060,"Y",#20000) +#20061=@"local_type_name;{Z};{#20000}" +local_type_names(#20061,"Z",#20000) +#20062=* +stmts(#20062,35,#20001,0,"type X = import(3);") +hasLocation(#20062,#20003) +stmt_containers(#20062,#20001) +#20063=* +typeexprs(#20063,1,#20062,0,"X") +hasLocation(#20063,#20011) +enclosing_stmt(#20063,#20062) +expr_containers(#20063,#20001) +literals("X","X",#20063) +typedecl(#20063,#20059) +#20064=* +typeexprs(#20064,30,#20062,1,"import(3)") +#20065=@"loc,{#10000},1,10,1,18" +locations_default(#20065,#10000,1,10,1,18) +hasLocation(#20064,#20065) +enclosing_stmt(#20064,#20062) +expr_containers(#20064,#20001) +#20066=* +typeexprs(#20066,4,#20064,0,"3") +hasLocation(#20066,#20019) +enclosing_stmt(#20066,#20062) +expr_containers(#20066,#20001) +literals("3","3",#20066) +#20067=* +stmts(#20067,35,#20001,1,"type Y ... `Foo`);") +hasLocation(#20067,#20005) +stmt_containers(#20067,#20001) +#20068=* +typeexprs(#20068,1,#20067,0,"Y") +hasLocation(#20068,#20027) +enclosing_stmt(#20068,#20067) +expr_containers(#20068,#20001) +literals("Y","Y",#20068) +typedecl(#20068,#20060) +#20069=* +typeexprs(#20069,30,#20067,1,"import(`Foo`)") +#20070=@"loc,{#10000},2,10,2,22" +locations_default(#20070,#10000,2,10,2,22) +hasLocation(#20069,#20070) +enclosing_stmt(#20069,#20067) +expr_containers(#20069,#20001) +#20071=* +typeexprs(#20071,37,#20069,0,"`Foo`") +hasLocation(#20071,#20035) +enclosing_stmt(#20071,#20067) +expr_containers(#20071,#20001) +#20072=* +typeexprs(#20072,3,#20071,0,"`Foo`") +hasLocation(#20072,#20035) +enclosing_stmt(#20072,#20067) +expr_containers(#20072,#20001) +literals("Foo","Foo",#20072) +#20073=* +stmts(#20073,35,#20001,2,"type Z = import(Y);") +hasLocation(#20073,#20007) +stmt_containers(#20073,#20001) +#20074=* +typeexprs(#20074,1,#20073,0,"Z") +hasLocation(#20074,#20043) +enclosing_stmt(#20074,#20073) +expr_containers(#20074,#20001) +literals("Z","Z",#20074) +typedecl(#20074,#20061) +#20075=* +typeexprs(#20075,30,#20073,1,"import(Y)") +#20076=@"loc,{#10000},3,10,3,18" +locations_default(#20076,#10000,3,10,3,18) +hasLocation(#20075,#20076) +enclosing_stmt(#20075,#20073) +expr_containers(#20075,#20001) +#20077=* +typeexprs(#20077,0,#20075,0,"Y") +hasLocation(#20077,#20051) +enclosing_stmt(#20077,#20073) +expr_containers(#20077,#20001) +literals("Y","Y",#20077) +typebind(#20077,#20060) +#20078=* +entry_cfg_node(#20078,#20001) +#20079=@"loc,{#10000},1,1,1,0" +locations_default(#20079,#10000,1,1,1,0) +hasLocation(#20078,#20079) +#20080=* +exit_cfg_node(#20080,#20001) +hasLocation(#20080,#20057) +successor(#20073,#20080) +successor(#20067,#20073) +successor(#20062,#20067) +successor(#20078,#20062) +numlines(#10000,3,3,0) filetype(#10000,"typescript") From 0f24db8759b822f8db969bf71f95e4c184e72c40 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 12 Apr 2021 14:41:28 +0200 Subject: [PATCH 0213/1662] C#: Improve performance of `SsaImpl::CallGraph::SimpleDelegateAnalysis` --- .../code/csharp/dataflow/internal/SsaImpl.qll | 152 ++++++++++++++---- 1 file changed, 121 insertions(+), 31 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImpl.qll index 41da2b8f0b5d..63d6c902fed2 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/SsaImpl.qll @@ -268,56 +268,146 @@ private module CallGraph { ) } + /** + * A simple flow step that does not take flow through fields or flow out + * of callables into account. + */ + pragma[nomagic] private predicate delegateFlowStep(Expr pred, Expr succ) { Steps::stepClosed(pred, succ) or - exists(Call call, Callable callable | - callable.getUnboundDeclaration().canReturn(pred) and - call = succ - | - callable = call.getTarget() or - callable = call.getTarget().(Method).getAnOverrider+() or - callable = call.getTarget().(Method).getAnUltimateImplementor() or - callable = getARuntimeDelegateTarget(call, false) - ) - or pred = succ.(DelegateCreation).getArgument() or - exists(AssignableDefinition def, Assignable a | - a instanceof Field or - a instanceof Property - | - a = def.getTarget() and - succ.(AssignableRead) = a.getAnAccess() and - pred = def.getSource() - ) - or exists(AddEventExpr ae | succ.(EventAccess).getTarget() = ae.getTarget() | pred = ae.getRValue() ) } - private predicate reachesDelegateCall(Expr e) { - delegateCall(_, e, _) + private predicate delegateCreationReaches(Callable c, Expr e) { + delegateCreation(e, c, _) or - exists(Expr mid | reachesDelegateCall(mid) | delegateFlowStep(e, mid)) + exists(Expr mid | + delegateCreationReaches(c, mid) and + delegateFlowStep(mid, e) + ) } - pragma[nomagic] - private predicate delegateFlowStepReaches(Expr pred, Expr succ) { - delegateFlowStep(pred, succ) and - reachesDelegateCall(succ) + private predicate reachesDelegateCall(Expr e, Call c, boolean libraryDelegateCall) { + delegateCall(c, e, libraryDelegateCall) + or + exists(Expr mid | + reachesDelegateCall(mid, c, libraryDelegateCall) and + delegateFlowStep(e, mid) + ) } - private Expr delegateCallSource(Callable c) { - delegateCreation(result, c, _) - or - delegateFlowStepReaches(delegateCallSource(c), result) + /** + * A "busy" flow element, that is, a node in the data-flow graph that typically + * has a large fan-in or a large fan-out (or both). + * + * For such busy elements, we do not track flow directly from all delegate + * creations, but instead we first perform a flow analysis between busy elements, + * and then only in the end join up with delegate creations and delegate calls. + */ + abstract private class BusyFlowElement extends Element { + pragma[nomagic] + abstract Expr getAnInput(); + + pragma[nomagic] + abstract Expr getAnOutput(); + + /** Holds if this element can be reached from expression `e`. */ + pragma[nomagic] + private predicate exprReaches(Expr e) { + this.reachesCall(_) and + e = this.getAnInput() + or + exists(Expr mid | + this.exprReaches(mid) and + delegateFlowStep(e, mid) + ) + } + + /** + * Holds if this element can reach a delegate call `c` directly without + * passing through another busy element. + */ + pragma[nomagic] + predicate delegateCall(Call c, boolean libraryDelegateCall) { + reachesDelegateCall(this.getAnOutput(), c, libraryDelegateCall) + } + + pragma[nomagic] + private BusyFlowElement getASuccessor() { result.exprReaches(this.getAnOutput()) } + + /** + * Holds if this element reaches another busy element `other`, + * which can reach a delegate call directly without passing + * through another busy element. + */ + pragma[nomagic] + private predicate reachesCall(BusyFlowElement other) { + this = other and + other.delegateCall(_, _) + or + this.getASuccessor().reachesCall(other) + } + + /** Holds if this element is reached by a delegate creation for `c`. */ + pragma[nomagic] + predicate isReachedBy(Callable c) { + exists(BusyFlowElement pred | + pred.reachesCall(this) and + delegateCreationReaches(c, pred.getAnInput()) + ) + } + } + + private class TFieldOrProperty = @field or @property; + + private class FieldOrPropertyFlow extends BusyFlowElement, Assignable, TFieldOrProperty { + final override Expr getAnInput() { + exists(Assignable target | + target = this.getUnboundDeclaration() and + result = target.getAnAssignedValue() + ) + } + + final override AssignableRead getAnOutput() { + exists(Assignable target | + target = this.getUnboundDeclaration() and + result = target.getAnAccess() + ) + } + } + + private class CallOutputFlow extends BusyFlowElement, Callable { + final override Expr getAnInput() { this.canReturn(result) } + + final override Call getAnOutput() { + exists(Callable target | this = target.getUnboundDeclaration() | + target = result.getTarget() or + target = result.getTarget().(Method).getAnOverrider+() or + target = result.getTarget().(Method).getAnUltimateImplementor() or + target = getARuntimeDelegateTarget(result, false) + ) + } } /** Gets a run-time target for the delegate call `c`. */ + pragma[nomagic] Callable getARuntimeDelegateTarget(Call c, boolean libraryDelegateCall) { - delegateCall(c, delegateCallSource(result), libraryDelegateCall) + // directly resolvable without going through a "busy" element + exists(Expr e | + delegateCreationReaches(result, e) and + delegateCall(c, e, libraryDelegateCall) + ) + or + // resolvable by going through one or more "busy" elements + exists(BusyFlowElement busy | + busy.isReachedBy(result) and + busy.delegateCall(c, libraryDelegateCall) + ) } } From 5d05e4d22413e5e78b0e1834fddf73deaa3c8016 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 17:28:53 +0800 Subject: [PATCH 0214/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 8220745e6672..07ed446dcdf9 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -21,7 +21,7 @@ abstract class RequestGetMethod extends Method { /** Override method of `doGet` of `Servlet` subclass. */ private class ServletGetMethod extends RequestGetMethod { - ServletGetMethod() { this instanceof DoGetServletMethod } + ServletGetMethod() { isServletRequestMethod(this) and m.getName() = "doGet" } } /** The method of SpringController class processing `get` request. */ From 583d0889e257be00ee2d60b15d0a3ac401fbb644 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 17:40:51 +0800 Subject: [PATCH 0215/1662] delete tomcat-embed-core stub, update the ServletGetMethod class --- .../CWE/CWE-352/JsonpInjectionLib.qll | 2 +- .../semmle/code/java/frameworks/Servlets.qll | 10 -- .../javax/servlet/Filter.java | 13 -- .../javax/servlet/FilterChain.java | 8 -- .../javax/servlet/FilterConfig.java | 3 - .../javax/servlet/ServletException.java | 8 -- .../javax/servlet/ServletRequest.java | 87 ------------- .../javax/servlet/ServletResponse.java | 39 ------ .../javax/servlet/annotation/WebServlet.java | 30 ----- .../servlet/http/HttpServletRequest.java | 116 ------------------ .../servlet/http/HttpServletResponse.java | 106 ---------------- 11 files changed, 1 insertion(+), 421 deletions(-) delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java delete mode 100644 java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 07ed446dcdf9..8c7433fd1b69 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -21,7 +21,7 @@ abstract class RequestGetMethod extends Method { /** Override method of `doGet` of `Servlet` subclass. */ private class ServletGetMethod extends RequestGetMethod { - ServletGetMethod() { isServletRequestMethod(this) and m.getName() = "doGet" } + ServletGetMethod() { isServletRequestMethod(this) and this.getName() = "doGet" } } /** The method of SpringController class processing `get` request. */ diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index c733023bbdce..08d5a80dd81b 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -361,13 +361,3 @@ predicate isDoFilterMethod(Method m) { m.getParameter(1).getType() instanceof ServletResponse and m.getParameter(2).getType() instanceof FilterChain } - -/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ -predicate isGetServletMethod(Method m) { - isServletRequestMethod(m) and m.getName() = "doGet" -} - -/** The `doGet` method of `HttpServlet`. */ -class DoGetServletMethod extends Method { - DoGetServletMethod() { isGetServletMethod(this) } -} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java deleted file mode 100644 index 5833e3c909da..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/Filter.java +++ /dev/null @@ -1,13 +0,0 @@ -package javax.servlet; - -import java.io.IOException; - -public interface Filter { - default void init(FilterConfig filterConfig) throws ServletException { - } - - void doFilter(ServletRequest var1, ServletResponse var2, FilterChain var3) throws IOException, ServletException; - - default void destroy() { - } -} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java deleted file mode 100644 index 6a1dfc588b6a..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterChain.java +++ /dev/null @@ -1,8 +0,0 @@ -package javax.servlet; - -import java.io.IOException; - -public interface FilterChain { - void doFilter(ServletRequest var1, ServletResponse var2) throws IOException, ServletException; -} - diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java deleted file mode 100644 index 66c13eb54f0b..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/FilterConfig.java +++ /dev/null @@ -1,3 +0,0 @@ -package javax.servlet; - -public interface FilterConfig {} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java deleted file mode 100644 index ce5f7c4465ae..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletException.java +++ /dev/null @@ -1,8 +0,0 @@ -package javax.servlet; - -public class ServletException extends Exception { - private static final long serialVersionUID = 1L; - - public ServletException() { - } -} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java deleted file mode 100644 index 4ee0026d0668..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletRequest.java +++ /dev/null @@ -1,87 +0,0 @@ -package javax.servlet; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.util.Enumeration; -import java.util.Locale; -import java.util.Map; - -public interface ServletRequest { - Object getAttribute(String var1); - - Enumeration getAttributeNames(); - - String getCharacterEncoding(); - - void setCharacterEncoding(String var1) throws UnsupportedEncodingException; - - int getContentLength(); - - long getContentLengthLong(); - - String getContentType(); - - ServletInputStream getInputStream() throws IOException; - - String getParameter(String var1); - - Enumeration getParameterNames(); - - String[] getParameterValues(String var1); - - Map getParameterMap(); - - String getProtocol(); - - String getScheme(); - - String getServerName(); - - int getServerPort(); - - BufferedReader getReader() throws IOException; - - String getRemoteAddr(); - - String getRemoteHost(); - - void setAttribute(String var1, Object var2); - - void removeAttribute(String var1); - - Locale getLocale(); - - Enumeration getLocales(); - - boolean isSecure(); - - RequestDispatcher getRequestDispatcher(String var1); - - /** @deprecated */ - @Deprecated - String getRealPath(String var1); - - int getRemotePort(); - - String getLocalName(); - - String getLocalAddr(); - - int getLocalPort(); - - ServletContext getServletContext(); - - AsyncContext startAsync() throws IllegalStateException; - - AsyncContext startAsync(ServletRequest var1, ServletResponse var2) throws IllegalStateException; - - boolean isAsyncStarted(); - - boolean isAsyncSupported(); - - AsyncContext getAsyncContext(); - - DispatcherType getDispatcherType(); -} - diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java deleted file mode 100644 index 0aa6121e686d..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/ServletResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package javax.servlet; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Locale; - -public interface ServletResponse { - String getCharacterEncoding(); - - String getContentType(); - - ServletOutputStream getOutputStream() throws IOException; - - PrintWriter getWriter() throws IOException; - - void setCharacterEncoding(String var1); - - void setContentLength(int var1); - - void setContentLengthLong(long var1); - - void setContentType(String var1); - - void setBufferSize(int var1); - - int getBufferSize(); - - void flushBuffer() throws IOException; - - void resetBuffer(); - - boolean isCommitted(); - - void reset(); - - void setLocale(Locale var1); - - Locale getLocale(); -} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java deleted file mode 100644 index cc255efc00ff..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/annotation/WebServlet.java +++ /dev/null @@ -1,30 +0,0 @@ -package javax.servlet.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface WebServlet { - String name() default ""; - - String[] value() default {}; - - String[] urlPatterns() default {}; - - int loadOnStartup() default -1; - - boolean asyncSupported() default false; - - String smallIcon() default ""; - - String largeIcon() default ""; - - String description() default ""; - - String displayName() default ""; -} diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java deleted file mode 100644 index 02d53a96a333..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletRequest.java +++ /dev/null @@ -1,116 +0,0 @@ -package javax.servlet.http; - -import java.io.IOException; -import java.security.Principal; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Map; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; - -public interface HttpServletRequest extends ServletRequest { - String BASIC_AUTH = "BASIC"; - String FORM_AUTH = "FORM"; - String CLIENT_CERT_AUTH = "CLIENT_CERT"; - String DIGEST_AUTH = "DIGEST"; - - String getAuthType(); - - Cookie[] getCookies(); - - long getDateHeader(String var1); - - String getHeader(String var1); - - Enumeration getHeaders(String var1); - - Enumeration getHeaderNames(); - - int getIntHeader(String var1); - - default HttpServletMapping getHttpServletMapping() { - return new HttpServletMapping() { - public String getMatchValue() { - return ""; - } - - public String getPattern() { - return ""; - } - - public String getServletName() { - return ""; - } - - public MappingMatch getMappingMatch() { - return null; - } - }; - } - - String getMethod(); - - String getPathInfo(); - - String getPathTranslated(); - - default PushBuilder newPushBuilder() { - return null; - } - - String getContextPath(); - - String getQueryString(); - - String getRemoteUser(); - - boolean isUserInRole(String var1); - - Principal getUserPrincipal(); - - String getRequestedSessionId(); - - String getRequestURI(); - - StringBuffer getRequestURL(); - - String getServletPath(); - - HttpSession getSession(boolean var1); - - HttpSession getSession(); - - String changeSessionId(); - - boolean isRequestedSessionIdValid(); - - boolean isRequestedSessionIdFromCookie(); - - boolean isRequestedSessionIdFromURL(); - - /** @deprecated */ - @Deprecated - boolean isRequestedSessionIdFromUrl(); - - boolean authenticate(HttpServletResponse var1) throws IOException, ServletException; - - void login(String var1, String var2) throws ServletException; - - void logout() throws ServletException; - - Collection getParts() throws IOException, ServletException; - - Part getPart(String var1) throws IOException, ServletException; - - T upgrade(Class var1) throws IOException, ServletException; - - default Map getTrailerFields() { - return Collections.emptyMap(); - } - - default boolean isTrailerFieldsReady() { - return false; - } -} - diff --git a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java b/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java deleted file mode 100644 index 0a2c6af0913c..000000000000 --- a/java/ql/test/stubs/tomcat-embed-core-9.0.41/javax/servlet/http/HttpServletResponse.java +++ /dev/null @@ -1,106 +0,0 @@ -package javax.servlet.http; - -import java.io.IOException; -import java.util.Collection; -import java.util.Map; -import java.util.function.Supplier; -import javax.servlet.ServletResponse; - -public interface HttpServletResponse extends ServletResponse { - int SC_CONTINUE = 100; - int SC_SWITCHING_PROTOCOLS = 101; - int SC_OK = 200; - int SC_CREATED = 201; - int SC_ACCEPTED = 202; - int SC_NON_AUTHORITATIVE_INFORMATION = 203; - int SC_NO_CONTENT = 204; - int SC_RESET_CONTENT = 205; - int SC_PARTIAL_CONTENT = 206; - int SC_MULTIPLE_CHOICES = 300; - int SC_MOVED_PERMANENTLY = 301; - int SC_MOVED_TEMPORARILY = 302; - int SC_FOUND = 302; - int SC_SEE_OTHER = 303; - int SC_NOT_MODIFIED = 304; - int SC_USE_PROXY = 305; - int SC_TEMPORARY_REDIRECT = 307; - int SC_BAD_REQUEST = 400; - int SC_UNAUTHORIZED = 401; - int SC_PAYMENT_REQUIRED = 402; - int SC_FORBIDDEN = 403; - int SC_NOT_FOUND = 404; - int SC_METHOD_NOT_ALLOWED = 405; - int SC_NOT_ACCEPTABLE = 406; - int SC_PROXY_AUTHENTICATION_REQUIRED = 407; - int SC_REQUEST_TIMEOUT = 408; - int SC_CONFLICT = 409; - int SC_GONE = 410; - int SC_LENGTH_REQUIRED = 411; - int SC_PRECONDITION_FAILED = 412; - int SC_REQUEST_ENTITY_TOO_LARGE = 413; - int SC_REQUEST_URI_TOO_LONG = 414; - int SC_UNSUPPORTED_MEDIA_TYPE = 415; - int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; - int SC_EXPECTATION_FAILED = 417; - int SC_INTERNAL_SERVER_ERROR = 500; - int SC_NOT_IMPLEMENTED = 501; - int SC_BAD_GATEWAY = 502; - int SC_SERVICE_UNAVAILABLE = 503; - int SC_GATEWAY_TIMEOUT = 504; - int SC_HTTP_VERSION_NOT_SUPPORTED = 505; - - void addCookie(Cookie var1); - - boolean containsHeader(String var1); - - String encodeURL(String var1); - - String encodeRedirectURL(String var1); - - /** @deprecated */ - @Deprecated - String encodeUrl(String var1); - - /** @deprecated */ - @Deprecated - String encodeRedirectUrl(String var1); - - void sendError(int var1, String var2) throws IOException; - - void sendError(int var1) throws IOException; - - void sendRedirect(String var1) throws IOException; - - void setDateHeader(String var1, long var2); - - void addDateHeader(String var1, long var2); - - void setHeader(String var1, String var2); - - void addHeader(String var1, String var2); - - void setIntHeader(String var1, int var2); - - void addIntHeader(String var1, int var2); - - void setStatus(int var1); - - /** @deprecated */ - @Deprecated - void setStatus(int var1, String var2); - - int getStatus(); - - String getHeader(String var1); - - Collection getHeaders(String var1); - - Collection getHeaderNames(); - - default void setTrailerFields(Supplier> supplier) { - } - - default Supplier> getTrailerFields() { - return null; - } -} From 216f204438bdd65961609081c00f71ce3b2b67c0 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 19:28:25 +0800 Subject: [PATCH 0216/1662] delete FilterClass --- .../semmle/code/java/frameworks/Servlets.qll | 24 ------------------ java/ql/test/stubs/springframework-5.2.3.zip | Bin 57066 -> 0 bytes 2 files changed, 24 deletions(-) delete mode 100644 java/ql/test/stubs/springframework-5.2.3.zip diff --git a/java/ql/src/semmle/code/java/frameworks/Servlets.qll b/java/ql/src/semmle/code/java/frameworks/Servlets.qll index 08d5a80dd81b..1dd4373fb548 100644 --- a/java/ql/src/semmle/code/java/frameworks/Servlets.qll +++ b/java/ql/src/semmle/code/java/frameworks/Servlets.qll @@ -337,27 +337,3 @@ predicate isRequestGetParamMethod(MethodAccess ma) { ma.getMethod() instanceof ServletRequestGetParameterMapMethod or ma.getMethod() instanceof HttpServletRequestGetQueryStringMethod } - -/** - * A class that has `javax.servlet.Filter` as an ancestor. - */ -class FilterClass extends Class { - FilterClass() { getAnAncestor().hasQualifiedName("javax.servlet", "Filter") } -} - -/** - * The interface `javax.servlet.FilterChain` - */ -class FilterChain extends Interface { - FilterChain() { hasQualifiedName("javax.servlet", "FilterChain") } -} - -/** Holds if `m` is an implementation of `javax.servlet.Filter.doFilter`. */ -predicate isDoFilterMethod(Method m) { - m.getName() = "doFilter" and - m.getDeclaringType() instanceof FilterClass and - m.getNumberOfParameters() = 3 and - m.getParameter(0).getType() instanceof ServletRequest and - m.getParameter(1).getType() instanceof ServletResponse and - m.getParameter(2).getType() instanceof FilterChain -} diff --git a/java/ql/test/stubs/springframework-5.2.3.zip b/java/ql/test/stubs/springframework-5.2.3.zip deleted file mode 100644 index b54730e4bbcd561f20961940fb62c54dcee1225f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 57066 zcmcG$1yont);>&kcT0Ckr*wCxbW68%H%NDPr*tFT9nvKrT>>Kb{m>I0zjM$3dhdN5 zW63$g!Q6X2GuE8XoNLQVfr7yRJ^k5H2vhv_AHV&D0r=@)Yj19CYGSW%W$a>O|B8;4 zo{65BK_2isXn=o(0%AzAQ`8*NqvJya0@9-e0wVgCzauRnBqFOMLhtD6xT>iYx7>j4 zbyLO9I&*LWN5^eG%{D&M-)cR}r8!~olKl-5v}Cb>AMoH@ZOWIMOjv%O*m>t7o7Ldn z*bs+Kk3FA>-o3|4E{&4}*D|R&x9gIHiu6xpPy8@|wZcsTd)(YYPj#`?7PeoThw#CmOY zRj1QCQWx`T_S(Y1yYcfTua^*5hi2F-l|$7V!VKLPuv@f#lCYaM(^ylKOJM}c#|f|6 zqOHgzmsLF^XXit^%LF;*IJMx(yk3GS-dYxTo?bb3od#az3MQ7KEGt+l4+(dGd>%(= zZNHUW#Cc)nI-V$$_x@3x{!kW-#)_S*efg$`Kyw!?1Ps!N4~Fx~{qU+YR5#n3->l#_6_bUR@XlWREHyIxHZ%WFha z>uB#wy|6$WM&Eb=sUt|_IP#TV*hYk^``}hPyN53ZJl)KQ#swxL*yBO|#9uFv;|RS3 zagCxQ)@(14(=38K+dk)-taaejDLCHZr9Uh8t|Y1F`SHlQE(-UdGNT76%T)(tSsr4S zjO?8_vbePhtSDtYi^Ip1^r2n8Wql(0@;vY6KI0RorC1pPM^-{Qii=w)uvrrEGF})E zd-nJ4Fs@Y70R&ERUbH}xr!`y(@Sp`QfVKNHCP&^vs3fS!w}}J%psV- zNpsAs7$U4$>>>Hwv~D2b806r(sS>CQS4aeX;rQfxzf@gY+g@=u^%a+UtXO{q&#|R$ zu@rkmSb2^${O0`&* zjA7o=Wb{nOueQnFbL#P7MXfi52F#&%7}^J{_>>G0BHPU4x~7!?@jhl0#=`1YBYtQ zZ(v1uR(ZJfcpVkeJNhCXVHgcv5aw5uR2#`_2db&eFZe13YGmi?t{8f2?)iVeSW3u%L-S2JdN>=Z;N69Kw$Jt?W}{!yM1v$I}{l z>w46pgDW}^G>jSfg%!gSumMqd#x#~g!`w~Xl%Bta4$kDJv?L2+$rrd?{70+qgrL|M~?=jXK@Do(hn#WE`5PPD3LG%c36RX2S>31eoL+-^ zdLR@J9NXH~=CM57wmHMRFb8r*Z0HsAnjU-iB^Yk|EjR_?09V9zoMh7QYj(@ca_r~w z+$00Uo}f$)W!G2mG(2g`_Q`y61|TC8coT0OO6iWW`AiVpC~Ec}pSkXVM3qzyfceMd z?HQ2*^CAi-G;qJmhT0YJHH&I+isYE+d2JYWrdv!oe|?l(f&i9Xu1(FX zz{~=CPidd<($se4Z3XtyuzIVXSwT$8`R0;z^YNgt{h_Q=UEtBR4wuZ526yobyIcjX zPaQnx3}471x*Jq-ND>=>g_&~PxSTx*qoGmhUxjWl52nFls^d+f*DTQWm5P3ai;WybaiTE}Iym0`Ifz4AEl-C3OiOo*c@09t!G&Reu~NJG5k3*q)2dM-Dh5tY?m8 z?>TrsNAM;#QRT;wN1bpp1sQNTj2rhal@Oqmhct2GZYsFN@2fXQocA(<3;SXxwiqJk zwszI3Q}xP-K#-rweWF_Rvu2^qh}&z*55u(x*1Z;{K%xviarlLQ6z zs6N#^RVr08{N))0pX0TGr+cTHXPwWE`_a%^va>Iw;7NpB=1UD|4inGu+MTKhWjtQ8 zTY1&RXSLZ%rek3u5?h({HbR|Y+1_fP zs9gD(F$^$NGSHF+|D?)ts?!Z8JbRA4; zgfZD-^h}jIEV=V=TInKZzN2?EB;;|c=u4j?SVSb#QiJ-=LlsEZ$3>Qzd5!SJN5MIo zD~8|m2esHGSvrQ~@k2cuAy3GY(EAW=W4;K@4m?OK=IceZ);KA`%PGSPlBc+RD}`1E z8{36>JuxwnqyY`V*WLmX&_H6xqqD;}yZm8!@2d$5EMs`@C`gcmdXj>A(B-S;?VN*8 zL7zwFFXV&FTl3Ck8wFVS__@zYiPQVdqnk+?4IH~+r*#Tq%=XYAAF-GM$eFH-hs%5O zIEDyikMl`}WKG`KVxCb@1|s{o(uQM4Rnn@AXA-$MlLQ1IVp_oIf;gdQKbgm5y8=! z#wbsoebamzSByzXLk|z)I~063)6|j9d4qDJDSv^fhFkNVwii(?ZH^r0=H17~f#sW< zt#@;)t8<^doa&GpUGD0?9OK&6KWcpOtnYwm%DaQOMQ+S{VV+x3sl1fRVvKYwVO*}1 z$5CBkMrdC|h7s|)v&Gw8$!Bh1LhX> zSA)9{GJ_5W^?0a{JI4# zw1vyoOg9qv&tBl3V#1->7TH`S0^vh9zVqyLv_aPRbPM5Ew0wSf*FEPj|H76E^`!~R za})lq%7n<3F_&9ct`3xF9fY%tp4RK5Pa0}amUq;^z;LII=YsS|k?1%s)`aYpW%%nU zhM0%}xAV8IlVq&Q{Bu^n_`ad*aglofc)7TA(>SlYqL3oeZ1O2U|9-{TgnMoUdGmv z0ZF;zMnVHKt<1*==*wXox_E*(J7cxm+ zpiE0NQkLWv$tYkzz-gJAOtVh!1c=>3EYHSSQLDUb>Y)I_Rx?%In`TuGC2qq2yz)ri^IIgG1LR>QP2X~RdLA#iji!LwJ5=b^T40ruUU6hVIP$nu$KbJdMdx#K{ow=W zptNZRSS}yUZSzt^qs<}Z~#^*{dJPaMDx za(-qE7=KBQfw8`|!#_yl_z$F+=o>oP*uVaXp?K~Xup|bMCJk8P|AkaRz#EHxe*(RQ zzOz1!xb(QJw4BNygX97YJ>~GIlpKxZs0`f%!|=S6q|7MIyp)tQ{SZUx+YejRlrqCZ z(yD`_G!k?mVTIHj!01f^`RJvunt}dGr%>O(#%lsz(h{(g|BIIuH#fG|w>LC1H`KTM z`Nd_1pCkAX!U1(;<5l8ze7=CFbrLRmH5vOqr%3n(?M|mi3I*)Oz zk9v;5O){6SW-7h*5(y+Up`Pj;WqI*iDE)mcf({rD)hH$3&eb=sf&aRfw!{1&S->9T z0ZZn;*o%a5lZlMnpHgFSiGPyfR3-Ku}LLuqpdM|}fJX2ZbVo)JmpKKLvt`?eRCXt~w5IcrT9dwn{*Vv&61FgA3uH+TFVX#PGJtNzcQnj!M z*d_mo@i`bh`Q1AT%Ny!#F3nfj8gXpdbMnz@v$*%PsKbweY1!s+jHyodOvc9Uv`OIU zBCy`XHd<0WA0ZzH9!}U#FBoN?&9eV%N8|kubnyQ(-|y5<_(Lj^4^|sTm)8(~V*YdD@r$X#lVATE9?bviaQ`9o z?|n6JHYz?4Aax3`jQ+k+4qwi>FW^Dh>O|4|4U_hS3txizc`|0o_ z8_ip{31}M7&9Jdb;ES}if(u~T-aJ<6t23fh3m3^KMq+jg(u{2J)NvL}k}Wv^HJjG1 zvJ_0KAKC0C=?t}6Q?>eGRFa-ZH_BQRG2qiw+^2(NtD(X{5am(hY2i|9ZgDxVx-B*| zWg#*?GNYFkRp1*r#(-Ua3;I78@|zl%9!8{~ z8y*qSmlq%}!=_(Whi|iL3t75hj=xgrb!nU>1GnS3eLUS}x&;Q&Ox&>6AP&^g>*XHV z;4-O*2sJcOa1X@R27y5cQ5PVIdxa7u{{98Cs&_XAshCTjp5Nu^TU*;We#7sFtocbvr$_lLMSxel04&k}=v99Z{YTd3DL3+@AD*L=Y)GwcZDHa07WkTD^4@EagHEmU>9|IHol!7a>bGDoG(BObYUoJVuC8jP15I<1 z%#1$yZShb@Hk02{+V(+y#92a6&X}J?3V#hL`G^BADmC3W=4G~mkn0wgs?w3(6P;$N zVg11*!<3?Ky>L}H@V?m@d{mo{DN!AX77AOlK$QEAfD_O6o@N_bySUe#ZqhmQ<4^Wl z&3}jB1Aw3vu;l(*DE`J~quQT>Z@`nyssn76I_CsV150K{xG)qSJLwtGS_Vv_tR=;& zXI7<9YECvL-RAp*CZoV0mnlwC{dd9OdKjQ2o86oiFK54iTO(21F1^(+U5uuC!HwV@ zjQlpcqTxIVz!db(*u8JmDQ!Ge)zi85>`&)>>gVbTbcxOYHn|9J zPKp0$v;Y6F^jp3lU=0XFA`7Eb9zK+qdUM33^qSC9sIGq4v?fP`)ac3> zI=wZWS)I&faiuQxTK&n~r58+W)gbKw&O$uH}& z20vcBwse>6nu9Bg2b1Gm0K-t#cuD7nL&_c8i3DtIiMA1?kfTAnHq@TEv+alKC8s5) z;=;Ur>r2~(Z*t4YYWi2?LbxqII|2}k1gxi$=ig5?e|N?okP~q>wsw?vGO#pv_&t)d z4s#>)@WY8rt(DnA%dka5z(g18!A98y5p^4K#=SwSabY4Hc3ETHit^LDkca=EAar;Y z%lTT(ZkkrA5*T4mfpZ{#R+sHEQN63b@J+-yqASa?kEBbg@MQ(qJ0UzZ{&dB*yoY`F z)5D)jC~->Y9!lZizVH1mrNVvMK5Ei`E26(A;y;JQU#ol!ZT?b0{49*?7dH(M z_Cpl>(_Exf>=bDwA~ik(`Oeb*ZKrRU6J21Fk+nXgl9W2BO(D#EMJ zZ%+mToqDIR4yR~dDfTO`s_$)r$_=vOa2{Ta!D(+ds5-J@%k6R{z4}-$~k5wHDQCU>Uw-M;OSPdF_~dh?FK*@A_F zyVPi4xE0l&)d=)(JwslH9D=7AT#lK!MrQ4IUfi~Vs|xA-66ntFh0qEtOAtnNtIB*P79BQJHC+*e_xC-|2n+J*3Lg1h);nL)CFBf z5+LZQihTO{i~4#JC}QnwZf|341#oR4ecLBy;F}A8cYmWYfV%j;Q5oiV`7D7f;>*gt z!FDdEcqN90)n<1WNLH-2XNFVE8nz}cwIscgl%Rwu#6%1@93_$w=9}{jIkDFm9-b`h z?;-frYy)6n<~BbeP~FGJhy(@%)B^RZMA|pE0?3oFwsmq;aezuq4qw?INIrE(F zZOt`9EdxD`z`o`>O`A1^P}ufBMzv0!ACL)^%fJ_?`?C>P1P2h|qbU+?NChQ8mJl%; z7vxW33z9rg?;OY{Lx0(49PNSSqTd%3k?T7ngj$b5=uEgtaAzlAmq88Z=VWu{R6W*b ze~evO8=G!*$X$JTUx>~HiSf0pfNUt7H6+Z;*g(K2!OV|ODje-H$edl(tt5%Ww(u;n zdXTZ%acx-S_(uCsLbB1t#{(57s)&m8;CWkCp#+yf^y$#{z+I!*?F&!WWJ;>Y=pQbUr#!__G}95pg8#KX&g(4NaVfh@l#3=q=_H{Pq1C0TkvO$TXTN?W{k3ghX;HKA^}U2)#F*~!O3T`a|!+(q#2 zgEkDYwY~y9atE<>e7VVa(+NAYx{of(ogRV35WPos3RaG7B_W|9X=1;URGYWh-J$EA zu1Pb`J&BL-W}WkJ)V+GOM9(_3rQ(_Zb+c#xU^I6i#5UhKv&b1tkZQ(u4=a)fzn2=( zI!IOF6~dGZ)3^%)zXlCMbF@w(78^nUQ~Vb6%U1FRXZy!oRbSx9Q9nZA4=y3T?zW|9 ziqGTEGJ`UmniQZm!u5)tJF>4&?MUpD5e3$TVx9PO*b+TZ+2D1qmYBmK-I4bDRsaO_rE_ewbUuMRO!0mXiAz^P8~y&pM+@4jRs-wjg5a&_!ylLp$jXy6 zD!|BsoV&n9Qqe!2IS~fQUI-F-%~U}*acP0`lzyT(r+v(cjoNP_rA}?A+J?x>gmZtr z_^OIcbr5yK4@7mGm&r03t0zKHQ*nSf75cGus4H{!Qx+HoUbOSP<93}eALG{@#~C*h zp}@sDy~Ruob}L4tB#*{$YuFpfl8yZG48*Ky@K4Q76|*1S_Fd7u!f8C7aZkNWIll?2 zZjiz-Iv4x0l09Q1z6|S`|A{c}4!FzaGCf6emzP~Br#~IJe`=~L6|`srDU0oa{PRyq zhc&hF)jLQapcBAEBHypaT|m@PGzacrcBFL;rj_sKp{?CBk7u0@n{c|$OH$5xWs%6? z1%^pgy1E@L9uFTdKO}asAi(sIZP#mA_;+r5vmG*ZUWN|}Xi%zGz%Y8v6mQ+3Opp3J zphlo;){Gpn9!~j%b2v?P5~Je2tc$fto{pNsm<+16q$g!`9nG6_m*tHNt6Ke74Zm9&Lx2@yT0ikNW=5wn?Xo`Q+vJTMam4b<1Gge)eZJ zMbC6|mhG0+$htL6HgxM5p;1D^;F+;#7cd$);>NbYr_*I$3 zvDM??^M~6L3~x_^yk)+{_5Q|Z5OC4VJdgx5LQs=30v>{!LunvK&5R4(WLg6BABe@w zEEF!ms{?g>6+%K(^d$8Ubm+L$qp_(ZH=8bn#G3ZA^&7)^_@ar7xatxFq#WK!slU36 z-hIzcex=eFK5o9f=+d#p5$!2Rr;U#gb^5~1X~S;7p|o^$7JFm&F&!kyGb2I{-is4U znE5W227KCt{X8p+HU)@59HP?-uXmT5uxJvcXvvC>?6{}kU6PKW;cnOHYXWQEyv6cL z_($5V52DKB>+miS6Y``yE?Cr}NtqU3R2(E!R|-KCJ3Aqob6}-{AV%l!V(r=*kc`Y2 zlkij&>>4c-3vRvC+MiL)6UXls4`5rD@e6FWgQ4}A?3E-lZ({M}hS5O)Ym_A7hU*iX zzvk4VwBo_%EP8j~jLoDfe%8>rFh2zhp>4H=Y(xUNZOENr$n3oC(+@AzfkJ9|SPxHD zOxUj`(GNZCByG~UpofvYXbP|B$G80+M)G-5r;!akvvi<0yg$}628<0&+N;m*%uu^# zMjniU99lx_jI5J$a>VH-TcUYj1glfGY9u!Uwh@+@xLMZa{uhfptJi#IrEg5cTSyFV zKbRGQx3RJxsb0g?JwuH&nW0_l099H1G;W@JH+AeReu&TV2#i;N3~t#DmX+giBFBz* zs%q_Q@Lo-E{unHDZKeT5X5Wtqbu6X>HW@Y$+ZDVUWOCOacj6g@Be9z?m2F$XDo6zG zxR>@`%Odc5@<5Bg6FnvtJONPr+AT%2HDMazcNVAX)ypa7biQR!c?+Euc8sdvTXx(q zXp$Ji!&cQno7lrk@&oUCd$ELpz_p-H;2)Y21$pscotCSwWW-_O1IAKt8iMtqrJZB0-^d6E!Gf$YZqnc|#hP(l$mboRQ!L&LZV`iHB8{ zM=D6X_q4^gAP%z~dSTJJ`%T*mdzqos*q!i(aL19w(}c5ZXvNm`h$alGj%M437?L~`UJ>a1s(T6&bmxCde6Pgn`}7pn>E z5249QNx4RVSQxl$r+MZ&NrwgLsuAi1E1feMigMJoyb;!aY>f=RqqsbIc$R?CH_j{k zMQ`GOer;T-XJj1ZbuiG4#1%OrmIrn7k-|Prj{E`Np@S(9BUfyaX$;o9h41IaYXji; zOgH5Pn8+M{OE!tzP9@wo0@Kt`T1L+fG*HFVQyhE@_$r{KTHflZrYqC3L-H74;!sHn zUL$|TSe_pb{p=7m%lLp+632)h<}$mg{Y)PB!B#47A+a8Z)dKz#XeAj>*)9ysFq#>6 zh^$dG{xPzzPDf8K|E4gvb8YDDV7qeCQVoe(5mDsV;OPFZ$oYlLLu+hM1GLxJ6C&a+ zU!+5h*Kq5uDIzO&vcT{!`r*8{rO12H>y!OW?QO9l_iXq#@8%&X8yxfuUc|7DAt;ID zZ~+FAP>1kRu4!3;FSV@=^|D+ck6_Lgk)=HX1!Qen% z%D0)GhfYbtM1wqL&qUHWD22|{?FRZeed$~PSy^|B8*|5zBTaLARHm`RA3sks31Mzt zQ3ayWxSas#WO|)oE$xTkeD`;a5ugdE3pE#xd!z3~3I{SLK$| z8R_ys%yzVoFG@6^e^e9$=z(*e z$fMkq=-pA?mT+=Ixzx99BW}L1`e|~k?x7KiG3)I+Wetrb6dkh9qFOQrh04|57BBE= zWGe~@VA{dGuX0MQ%x*Ynje34H*66Hq+=Cj?p*>}OoVs~)D!HN~(qmvU>21#Xu86gA zC;Uvu%!tg=tm@(MicBiGaBd!Wovq_U%ciDv$%QtLVLFT)@f7N=TIh&#$@we%pLO(8 zU1o<;l=VbNJdstu)khak``i(XJUXme!b@8cagR|(tb{uW+U<%4d(V{%- zU&}bKP+{&(+1{t6qxcv&ppnOk9L_*=)tuFr{}xx;A{zc31$@~d@bG=$w^Ziu3$p)! zN&uuX4o&$^JaQmGd6)WYfL%Oxk zK>k(9^aEj(*MQym1IUtJYvX=rbo8I@umE;s?q+PH{My!7(b&Y;-q`v#4k|%$#QGf} zQrkVvr+sbt)6n-qFS1qQo~fU`C(qfSl`4HZ+=;oOeA0blh)65QT=%Za=R*j-z=mv} zZ^fx*Kc*YJhcY>1MVW>8dkxUyJVqSgZAMYo9zRrrd(p8+rb*`d-W_{Pb}zV!6xE3-(-6=W!?a z7(1{7PR3&SVmvLFXYjMh(lGtOx!5eT^o-WR7lWKHHuUtO0cb@e1Yi*t%M2a};TLLBr0MY@(`BMkv8)E`L^fO};D~J=#1|Hwr)ar4H zCe$xXnCPLjotnET@<#m=%Um&QVhd-{HZ7jdD~fO|s3_c#t`6sX$N3ZI|0ESelc#gmv-?20>d;r5ds@>KLCJ?;J9Fs@M`nih<7P z^LEQmMBYi|TKi2k}LED>Hfac5SzB+I+H=P{uxu5nng1+YF0%q>@&d#4D zvUFaCc4~SZ@uAt|*;F*Qfa_PL$9`d^d>Sk*2KL7w-ps#-i+wB^K0N>kUV!y$T;1P- zAg^x^=;;2x>FNqfN=Z8U@zII8KN;(%i7!bhX;~H9z!3;i4D=!lDrE;dDoRSiP#QEJ zQY4Sa4U}kbm_9wpnbb0jABgOqyWGEaVEnKT2U}yyZ?5_G2ayl}qyNa;zsUs*I9VI% z+Z+Al`#GHWW3d3ir~oU}{@*-639t>3KkV`cl>|od!n|XI6LrZFG<@HUIk?gujanRq zBmE`VXh!gCbvs}hO|uw-sN;q=esYupSvd18X@hJH?Xh4W*4uu3SBH?Tkaq21bxLQs<4>diP|ELB#30 zr8IW>D8vQLT?>Tr_LSMHpT;X?O-w&n0Wc~AEWQ5?R=+vGzd$SEIRc>R33l%;ViD%y zgK`d{qi0VZHeN%w>>G#V-6^j$S;4|wCeK!!+-u=n-+!$?c}~_~yfQc04lNfD?^zty z_gX{qYn1ntc`Db*tRywq$pJ09hUYyZyDZ_D7jQ-$aW8UKx!&VgX>NiX-4FvobEWTSAtVX=9iD~Li zQorv@@WO4Dd!vt!KUt`#|Ag@s02O3VAfOk&j`R}{BG!(8;lyvpRl8!%Q`3F*l!nJI zAoqkYNHsxSJ~*@G{zMuDN+Oj*8S4C0#;sUnpVGL5V#MoocbAM{8D0_uGe6{o8I2ln z`X{LRXq@Dw+GstX;y zXP$%I@cxW&;FIo!XJ8sW;7u-ma*QS6LbTjyp{1>jr?+s%V#XhJ9Fj*A*u}QX?lZFt z7vp0y!XlvGsJf21qoV>DwbXFxD_g^5NxMU+pO3XpH>s}O{M-OZ2tAjS~4 zkne;+1vhC2kW3LNm;2@hSbNcj&k>={uWn$2E(HDXGJKipe=_N6WT>7FK;Z@jVDbOM z%_sq8l$^e6AX0hAewh)j{hsCvF#cD524ivYo@8PydL6gT;*!I{C7!4m0{TejvnUZe@0tIWKl^t`p3O;O*n>$B`Ph#RpfeHM)*W+2EVHrOn-$hvPAio7)RU z2CR#sk5?BwUpdpp?kI-9SdiE1v%De&Fw8ED@WEsAJxw=lpx5e3K#hRy&7o!Xfiyp1 zKoa|W>h`9@>V^9Pkq_lTq_BeYZ-dRjsWtSxg5vhAf=$t6PCsvIUAJqlsJ*!l ze2*X1n)dPSJb$R9)Xyi`JThd>LKVjp&8qWhfD0J z&#<^7hL|?t{iMUazyj(pm=eUyLrn4N3;~UTf)*cksJLD?>#oYqg5|b;(YAYOra7Iu zV^4@LLm}uC`0|E(rp(2vK*AUNT^jYhn3K0a(aanA!@mWm-^Q_ji1){;Qx-jpXr8BPD+4fOeA%~zaCkxxm4LErp#f)xwt0zs ztCPVhfi-Oy&j6biQNm1aobzVQHgsz!%oM6%JXxV7dP(q-wIji;&z^V=5yW^eSDX-e z1uJ?b2j1?r*F6uW-t z*$OD@E*eHv*?{Ws!WN9;5wY@cXZ03?et5IpVkexW%l3v?DAgR9AbM_6TvaMsHRLg7 zJBXv%*yeMqIYY4J4iiUhpsm8GVN<@1t2viSPnkOby9n2!GZjqhbmhs&aqn`UVnMV1 zVrK2JWU^AMi|R)-a1>{9U21AcbFYGR9u|+D?ssQqH|Et9Z`I^tAzVw5)j~>9gWp^h z9NJuWG+L!C;U69OA^uf~agGR5Edb@^0~Gmd`TcK7{GPV_pv8jd3BZ&jTt8rj2M;~p z-6xd2J1yJY*Rp@9qM<cd(c*mCxq+peBR^RJ-xN#aK8{U%xGfx_q zQF_dtKE*N^>PVulFuywT$(8D@%eTqE8OfvM9;AaJk}jOu0X}FN5E8EZ0Ex=RfVu{7 z4dvUR7#ZDd@s1Hmc;b^9E$5Q_6)1gyy!`KXUW0N1?$z`w*^dMhqfw??X%*5ID`Q`V@I!Vpp*U z*`7^&E}jIpGLNveGkptUoPTr1(Vw`;NdnqKC1YZDm$7ThRn#f9;LQJ#RqJDPPZ6-5 zGtV)OGH^t_mE)3597{F)%xgwL1BA^k=d&|-rydC`AtR6;{ivY}Vj1%Edn?DNse8;J zmd_pyVfhHfn&ql@;5Q9z{ugELQ*NM$GeB{pw>YeZDjm(<-A2ZbsFcktpH$U0o|jko zf2p70^!!G${yi)3YZZf~zV-JThJP|?*!~!h)_@%LJp>RC&o8O#n=n}?OUpk7q#~8S z4G6U#s=?Vyf@(R}?d!Am^;jHbOQKR#r+=Rhl8Vvx>YalC%m?L{_l|=Icrpd&vD*-= zkM7g@GB+u=uzIxH*}fpiLYx>l{R-A7Adj{a3$3?i6`ynYm?eW6qPup6QqTv}RzBJL zhG}dV{u4XsZCJlO*(MMEJ9BZ4CEbj+Rw$&3i^*z?eESVL6o^K72Vb8~$ytP^07X_! zTXLxYI+rwc(>Ex|T{pZznw+8s5icekOA%3hn|TjzmpO`#b@Qg2TV*uz)2ZtSLg|;H ztS?5E+LGZzKRwn#QcY?y-oDuj($uN%Vws{|3LAuJi2Pg*Kb@iE`)S^GVAl;ubc7=c}+FH6tLX}@9y{o8vFkAq{^o&l|tHWKrr_r)z@WY6QYS$_V z{pp7pkCgSX14rLTYby(BR8A1O5=$*NvUR1DRd zz6z*!6DBDknKZ+(e%Go=tPYOVjeC+Dp7Zq@9VRk1!0{2=NBm&cLP)$`AKp6QE+vQ> zQ$lbw-tNqww-!q>CBF2XOi}3-yd=tpt+BS0uIL6!){cxO{$Qpr_hWC}MJ84|GTMwx zBBQvlGenk+y4&G-jgWDJl4dtzVWb552`iEhtExecxT@u+FRPF;$qP!6@-Yn-N^r9) zERZCv#nBIY9Ip)T6ux@;U#aHT2Ob(c|6=$B7{}4_R&mvtykfAkQpkjczUh^}Lsdzg z?YaVDv@Df=>%k###exC^6Mymw2eNKFsb5@z$EQr zPY(8E6Q>O+57VX{lGGd?m6p6WaiCVdr*ceDiPk#_V%%45}p>jubIL5Eom@ zz*Cbnyk(R(@b1Dm?^1F24}{&ju49KxbM z6SzOhT*GrTgLu%yJ%!;)^uRTX?1djG#Crhe{n?Sx>EJlx6RK6_yG752LCP0ec)?W{ zOJj~V^eH@YO9y4Ir7#gMjlH<@(v#q$%{p_Xl5M$CQWa<(W_pxrr5-{5jNw1u6#lh2 zN_%4~8%MyE&2Mr1dzATE;I9>Ae+Ya!H_fe`ZC)AM|8Ph=-CF2Xo2$$LL>olFA@OTm z*xw3&s{SOtKS&91{m$Ib7{EXR`ftB?#NNmt`0+oH47pOPqu|;&s2VBz(ET}j;3ni5 zVPHM0bbNLaE>%^huXNs4HlPb`4CfE-l*L+wuXok!Tl(+!w+R#9(a#PR(S~Q43L$74 zD*2UZ-dXTQbKAQf80rZ?9D#ere41K`ZJq!z4XYFErU|hW^8f6;m~5O~_izG&9xdOH z6uf*HDN9&!0k!?sCDWZOQPp9uz@H5}h>Ydo2R8X<(lo@(rWKZX5^P{k)>F@D1O`?WLx+`nJ>{R`yiBj0YSiEi>1ok80Jn?R^?_`XUR zv_KK_Uh(5!X*c%#yr!qoOvx#k2|7Q5x^lIv&iwXuI$7QlSwRimT!3o|a3Wy|55?+N zaT`yUO~zBiK)d>hyO-vRdeeVL=>H)Qa9IFw>FEcj`dRL; zHNk(D`?vGzPkr{R{!#`{fP$Y=-B-V)=zn;GfPsUfJ>Zh<@3&%%jg)@7TPx^fZuxsR z-Z(DG|Q!Wh*DpjcQ+@Izp2S3h$mc%kilX>w)cQ+n~%j~ADZ?yy1Fr~*?vhq<)o ziXPLNj-L_)l^PlmMaX3dM8b0HV(J{EaG4>yYElgtp|D>C9RpCCY7mJWpG!i`#}j?d4Wlcqu75 zM}Rf$Bw;>U0RwDJ5QN5$zPjoB!L9O!>UzlewYI?f;uZCGn{T{24t{F6r_rEzJP~Jl zfc5nA-*@bP(D&c%kZ$;oW-cQzteHoX4~NSvLAOZ=IW;zDD4MauWTd zIbXo~wU*Ssv7bNe_j{L+7qBIO(tx_W3(tTkVSPSRf}ZJtY;(oT8Hh!Z@Q17-L!EcL z5~opxxJ-3-n9{_n@?h3=FvX!iA2ia;H&L$dLYncEw9;lHLW2L~*K7NDyv>ei%9rlU z2)gd?bl{y8Y&im11f5xR_3c{hpXMo7nbz>M!8*V)1g!t5(*E3}fRVoK?}wmO#LK5* z)hBB~X$NQ;mJ)Oi*aJX~CM8tU)0q#Wou6zWd7R(fQ(<95fNA7aiD+zj$LA&LqTLH=my}^hgbmt^*zUF+MjZ%4qo>dn{KLiIU%S8d4{CNXHuxdYc#4LMtmRb|0Dy%6iN@2nI{qg> zKRxF6i1-_~^V?NkMPpOIwK-*0R0eLy47KL_U*FJ_jq*$^cc&X=&m%YgxO zC-?cWv3NZ0ANFF767Ymjf?uOOTh%bzaF3-iX%K0XHB;ho4@NUoRLmk?YhK6R4t^f` zc&dsL{@Dk#q`g{ips`0oE=!%x@W8*3-&2*SOb>JyZh)-vJSwB=-h7>4Lmw#78Wyc6 zaK&;R6G)#9g(wlp+3ESho%Nt(I{Tqm$gNacn@n9TTV2W+>c2k!6#tj78GJu3zJF2X zPk&&a4RA>YsAvUHh5pa{;Ym$@Jntz*{5`6D;}t66R}}$=RbbU}(ID9<$7|r^amtVT z;OrbP_@SiIh-5yRkQ8sX;(AfTFZykf$$VPo-LotX&%?n`flNf_FrlvLN$wuPL| z%VnppNGVH)HKc`BoIfLzzMG}t1$FdiQ86}-@q%s6ff#4+l>8*o5u@&TFv-<4Q&oLQP1O&>f$wawNB9XVzqXHntkXUY7cK%Ew#H6)!4BF6WiRTr10t_tKp|@oQN>XE;PkMFTsz|qm(+`!2ZFz@#5!ySJYO)~zBCY%EFK!T-Qb+(`sP2Co0V9N?6 zNG?U$wL}o}MK|jVNDv`r%wiOQRDGHHJ)D;tU_!>zeSzt2VF-%DFp`|j*bkyKBqQTk zsgfoSMKf*+LD>{-s%X4^L9iFlBo!VSGXkt5&?f*4wPu~3JG55`%Gorhn&bOe66ROWZ z)0nn!>BMW-;I;H=-R~1wjKgkEtg8?DeBB0#hO!vEQM%G|M0T6!o-;N#=r`%@-IbH1 z_L8z&wY@5y+epVmx{!5IkDTirv`a8{gwEVm8`rnA(kXX>7l>B#27xqmk74v35pHj5tL+B&M(TmB5` z_ZbqPy$|TGfrcTAsez@i)nRzL;K_yKNjai`h#qBqOF;?w;Rq}<#xePAy0fp0l;Mmr zG*FMuHq6V2KME(xNxC;Si26EY`c}An^l@^L2|x=LTzq-f`_)zQ1LJA5UF{f5$+ZA} z3V+=!d@rTgDwk74{`0fgREcNNa-;;JqK&6yCpzyklSGJWkCt3XvSco3YoAHd zur#!1UX*^l$HpBLvBQmNcjmzn9W^@aRo{G}zk^-9MtB|8*M3Y)zXkJGONH;KhW`YB z)f~|4^!mSo_s&$!}l7_>G*%cq8z{Z;LFhV(1b=8#)z2O4s3zZkWUpz~)#om36ZYX65V#bYL$39H}LTg12XFMplF|H2Tf3 z>%w;STZc^6JQoYZVFYVSOYV?k;d6s3jdTzyb;?+C9a*zQ<4%XMZ z++3;(bcLon4!yVXk}Il|@c1d`R~GbAjt6K$0$}j}Uv1|BPi6bYaU`-Op==Tg8D($T zdxns`_g>j#BqKs0GnEQiAu=+<=XYQC zb&uz|uglPfa7P&Q~&e;}wuDH(k$e6JpU$GRK1T7GK`^ z+od1ALV*>c!q-o{VZ?HnN1=Tw{m51HLeR3UuAyQLij#_xjJ4U!t@1l;^c}txlU#ko z;Rj@vx>{+9B$t&k9<3h{7w6IObN>=6OWAyEgl=gF*l701>~lf03+I=+ZPEYe>7)D1 z>$Y}nqgtB--?lq-V$D;7OjsdH`M;YVi@7*C+t~mS)thUcb4^e`iPY{@MI%|cjDC{l zP{8WCaHIuBe{5{Y5%OX zI}SdUMv5^cGQMr143a~Yy`~Z0-<%me$|bBLKPV-6Tf%x0*>w%HMY(e<-`l>{)|CI( z34W;^&pXHtq8ISlTTDINkDfO%HE^+ZhRqNqEUW>qC}wV8v6*6aDT{c1z@NT0x$L zxrOOo_i07>$6LWB&}@j%*w{lMEfppcNWsY*1RP6*u&juid&WCkcyBM0;Lu&1Eq059 z-CMZyufJ@wnRaQ%N|Etgsv=~Dc@g+PLd*BDQiND1lpS^l_~{&UnnKr7f#U}RCRGcn z8l#-4#y)GU{~$qsLE4@SvPl$>oA>xZ^5F;*%bw+?X7@&Q>uj_ScYL~nlgg(h_$rw4 zse}3^<>@{S=hp{t56_qj{-71KTia#Mytgv~PJq#y*f|3SFLsEtieJQ;4v5kOe8l!9 z&h}4=+1UVre?WjCR0x5WP(Oq=eetH_;OxjgtJPMv#|udp)vbdcu~9$#F8RZ&p|UjMejc%E>IDx&zK1r}K`i%bE>P4u zzml=M{i@(##A4GI+7`L0aY^tHReUW}04|6V`(=)HjvlO@cYQHzQ zv`MtcutdJ-@)}MHGf6wJf=X(jDji11f-6(`=DR+(!Ogqcb*X5{u{DB5iAI;%>4T87B|{%@-!T>Mbte(u5bHT)Tx7pi!`7MXHIsQ+F`m0O?C`_0GwuZ#IS9^p0 z7>lBzrHPTVI^an+!|_<0-0VN~RVdW45~2;Mnx?619m8(r&VCo75Q=f48@ae*w4B<8 zAgAPo_#qOH!+HnM1`nhjyh4PUe&F=-M%Jaq=7LH|9)nCT=h~GoxE|-eE*Hrd7r8ED zsjPN044+DP%2jnWSV8=Gw!({Vwh>r?&9iMBDfd6{l7u=PUi%p5;_ourj>gI5K=e6M zswbGUu1$Avtlytgx$MYQ-DK2H_GwwuYuV!sHmFD@vMHY?G%_`99^@6odqNiA`ah7W zzdL#a&wA@73Z7B0%2oq(8QK8;;`fEt^Zct9=U?AWIRXDS64FF34qHp30fFpE(dnzv*P733zNo@ZEVRntZYy?pKyq%f z0f|@0r9tg$!8HyOZK3{8?;3cIG+%uk)@1fnpj$e_*uh+4shY&Wv`tJ11sONj9>YBo;1-m&CYe>pzAD(l%bq4G|r>iIz=pFtmlaD1CDN z#YwiclmvEh6ShDZ6Z7wP3>Z5Pa&qV5 zHk!y$i)!d{c=myNR6Q>qM~h}3vid;uBiXN3Zs=llI|sdaSsD(V!1$+NDjlj%LRgbB z-z4)&_41AkGt&39dWl!QSz(bhn;dQa!k0l_a#{JHHWu2(y)5eHLY&Z8^K3&2W2}Oe zAFVi@$z5_@Hd)s#2M^{tl@g&HJ9+)}F`nFasa81B7OOV}QhNqm8V$Yt-t0yyfbitgEF@T^=Mf*`MUBIzALPy3Fd!MN! z7Qws3jblsX2V%Oym~p7bC72u@w&|+yXpuFtv2{JKd8mmY6sHqQ-uUW@P=sUYS2}*v zl&iTJLyPU5gE4s{Un<4M4;&j=u)p~c+kd`9jpNEmVn$LLGR>T3R!xoI>vTQtbm5qk zg}%qj4b5$pYu=YTx-xzbicjvoblGvJh_D`G@KW;H=&bz#TUA3ZOKn9D_iB`cyE=t; zi4%IRioPCMN%|t^!4~7=E5huG()5@e%OFUe_RSIZ(9zI%N#}Rx%3BzG)mS23hO6%k zI+ckwe2?Ysi&^rv8vLB^K~9&2#xdA2{@`HX(f9zem-jl3va6lBrf}{pLXgJ>C~I24D}_iF4JU(eYBI_2zzXxe0Ie9#t(0~ zH_Ipd*6AauQN20_1dk3Z_x4M>-&5Dq->}z~azPhzlFlZXAmaP-(j0GZ$OSY^RvEyu6l z%Cd}IAq1SJcKE-8(&k6DovoI&LpB)Qs5}aHW zTH$HLMP8wpKZH+AD~lG8-=Q>wAy?*}FDh>SP>trgA6D?}0&NL{DXnaEbU+T%#Y6nL z58Fr++;wad?>bqMVVIGg?B{;N+J|$M=ML$euPs5}t{*`&WUI6wS8h*DWb}YjWUrGcagLJ-*~IvRh_H7wkshuwH@aMTXLa9~m3Wo(pXFyLMi1H_-3r~%z}fjV^1{piZsLICc;mCoNQ4!HF&BXeYGtADQQ48zgl!HQD_C9l#^*jM zoGIWf(R29_MYrrPozX-)#fs0%8to*x8ig_;8z*&%ioTXJNv=kjWWb=|E&1!=Fu_un zk3`6Ch?_VWKd*DAu=u`pSYaPMT|8exb1^P@WMTTo$_;)(il>#Kky?~^HD8E7qV=~^ zo2f5*&a2)*yX>%>6Wc*V=Xv@R`r}>=qepYjbT~|nF0*282ghUb1FGW+mD!AWfVvJz9Xa&$Q=M0Y{c>&%NYdwY%#ZgN zn#-b&s__Vrw9XwK8xa-#F+^ghZ1Ul&iex+cQGW(fa!s6O0cr1b8`198@rCM@B`0!S zmN~O1;d4j452OI!`%6zD`+u$o=re%7n_y0;k36f-FkmB6#s&65$F-fmJUfz_E-{^MsTH7a)4-%+&xewT; zwS)6->Ew$l7V^cNw=|txie+WEb-gKhkUi30HbLTuDsp1Ms&S9Q8ZlG$wJ(}M?_!2R zCn|ACWRbPY+dEfqyKHr5e6mXEE-us2D%QrFCy#%ZAp5{2aq>WgFgvE*lk6eEh^vv) zQ^9q&Q##KqkQ`r1tZejT)oal4GDDuu3ec$Wl*4%0km}Wgdg-X}Gvqr?;i5$GB{^&K z=PWh`i7ZVONvgBOi9g$)TW3be^?a}Rc(VDk^vu(sv$9C>2GMm51^2J@fRcOf+PK|*z<20TG(zLv)%l`+8rtW1^4%Z2;+S+v>a4)gP*Gi0A}Zly4T}* z(D$PdSkP}vnm7Z~Odx8{3_8^;j(q_bA-?$P56s+L<59}H(E;5`nuJOir|S(r%BiR} za+Y-64_}<)X1u&`H(I80zSe0nwTzZ@2#X=c@*=z010@rK^xF6mtdiPew=m*4lw`c- zMRTdCGuZn)zoNTWRYhj`tgO{7D={=pm9nU_FqvZy>84Uy=-!l^K#Xz*^?ISGo{@h z-dj2Qpga%4pb@RR*Z#^yAF0vMF;|*gdnF=#wHSWcNe4PA7OUoFy#2867Z4vYa0MJ z612ny>meYDB}X6FoE$~L6*+Aqb@b5dWrKIRbG{1Msz7E+caPALE3w@lu{WIK2cPU7gPYi+5!f)x4lS2#sy?6G1o8v z0tR6jH6x>HAlvZg=hnk17CI@1P{PRg^$*<}EY0u6ENas}QNK24C>7^UHE7ClrjUc; zKG9i6N$q$1$8t#nC?q8xk|<-CSTk2^6H}3x89kSqBR}X9%omFLK(EYj?tZ!?Y5p~? zvIlisC+Va5^}~=qEv}t;V4rgDj*TXY1@=;`v2w@#NQO@KHjbotz8l^unYX=_Q?D&X zn{h1Zwti1Dy-sghb=M!$19{jHjXjNb4DWgBj$JWjv(b!UK%FOmI(y4@f>0ehC%C>B z8Pf(C02=2!Fe&?i!VRJy4dRECG;GF$xSu>Et?fKv{PK=PU&VEHwv)I=1sh(z^7ZwY zal3m+N6B$6u*4FZyQ3pGgVqXviVt<|uvK_o}H5OWl zdOl4`)_%Ulk;J^-oaAMKs7}?6W%6iMzB^=tE$W|$`E%!0)XsP_7AG>A%@z<-eDWjV z@f305rV-T7?bPB_PtentwUuZiFvZTX1`Jl7LMakK&m?W$m~VcCJ&M6^X=uliB(`{@ z?&^h+>t!SQA<@bHaZ}txT z>8|`Wp?xD|L*grAM3+@RT2O@_l6Fc#m*}-Fs>6^WWY+n3S`hr6C_cttCH1o1RTe<9 zBfwfg`LEr|)`s==5D*z74|zWsyviFq-{PNvl^B5KU_opl_K`*AgCR{6`MHv;7DrLm zDle1C92&Me+F?m^k%OcbLl+sMPpRf>lTt^#6Atz=DY1^SDj{MwqRM`(9~^s_I-|2i z^D7RYK3!Ao^y9J-`QT1NB6&yYFo7EsXB7fZ7coTPZD3uzuQFeEHaUQ?T`#dDkd( zcVun8OXs<)Bs(;pJZ|=<)g4w0EEYg6qU%oK>d#5*%symxwvOy(XD3x?Q~R}7jJ3jn z1E?H|%U{INjZzp zP6-p7Xa2m4Sld%Vi2L;Pe)rlNXp~^!1M&NNo0LE&5}>ge);QY-hL1i6;uon1k=hI8 z7SO4fhQf;KZ{Ce2LibyV$YQ1nUe3RY-@6JXk{~h=?$& z)69dEVJej?z`JVuNgo1c7-}e}LJF8+7%=($`+?%;lLE;@3~ZqD5TN_o1p-Fswt*Re zK@{O?LalPIoBC)*k?M^DxMR=XbiWD9VA!Y($%@N3)Ke$D@@;T{&rNAIUF5!V-B$&t zx829J`A=1vNiu2Hm^28>m{i--(TckFGulkillfspx5=3(-Y;U72~;m?p+iAu5^{Nh zYih2fhrWR&8$UE|LH<&N%lzcT;6!#Ocd0e%l^^-KEl-x#cqgK)DN}VCO^u87U z7KO0p@&RoF91W6>9*4EcB_{H0%$;AUGtl9m=wU(Y)odflWR@@<9J}MqL_0I~a;8;{ zImCeb^_2p_!8m1?z%yf{+wIT@%m%$@?(&xbmgWnz#lL8W%`=Z6H@X>Q1DtrIIGS~4 z$fOC)Q>pPTdemDYSr=KEUY_Uk11X1i`LXS!f8bS}zzruQiJOVEOfEHMp|G5J^Iq*r zSqpPKW+=CCzMK`c^`|%J9>IKfF`ML6jyiR`mO_5WBB z$uml6t@#deIJQq_#;GVqpaC|BC-{4NLk1bR5oXCS46<8>L`p*5LGSH-J?JNY+P#>8 zwY8yvkrmYRaay;+t|70UKcLyRa|WNK(Ptb6W_Nae(@pfI{-!+FY_*-(pBkUz8zl(W zQM+$Py(}$$EINerai9jVY!k|rcd8+CnwaaP{KGpV<%_M{>LAdN_nxxAXKz00rxviB z9^&rMV*)>O+>Y$>^?u3U-uhoq09hX<|A1zqV5 z4kLY4^{R?s9OJ0}l8pU_Vs)=5v-`0Z-z@1k#;$XD`|AZAV1!JMBj z?^*~9BTTk$zDiBY${kX6<`~MC{tx(GbO$^~1&>{49OBBRJo&16;RT16ff~D=3?*B# zKdQECv)3F|(XpzWnza@VR-ez*0#qepjKy~0m*lWGWAq>Ko^VOe?Wvuq5fN)d?-;dj zu8~aVpWbK*LBlSRd@9^BeRt^-cRTwv$-o1Iv4b4XRy*_)-Ypm2oj(5&x$|~rg(!m+ zhGObv;*Olm`oi=pD3|Ke*~*`!P&Q)wxwaJB3d&5CyDVp2PsctNZ#=JIT)Hwzlz5;I zzju)NZdMZI^2CR)`t8S`Vf!ApkhvLug?`j8PcD)3{ZX^@_yB@J)$h0u@OTdQ(bcbH zS|$Ei3DjLLJ7O*$tUY4yFJsd+{;J#FMYfQl8|V6r1_35x@n>-x6#iN6c1y2}&$c~k z@ltUsY!{d+TJklTEf+F^jBan3r92S*e#N<*<=AYklGxFh3MUAvCHJ)1L z7H#-+2?q%9Ws*OfmS0~VjK`Obe|bmoHG1ka`3kMR-Q?R1igxvD14Xn}&s$b<<1Axd znTg?b#8WY+XK*4b=H?GK&@h!*SzJLme7YJvNwRcywxD^2YrW?pJUU9YT+Sko$SAkaR3QN<7a;;ZL$?ChgI^q$e4M3-y980E+){1jUf%Y8(xZaciT4jfuSVbuhfrbJ_ z(#TY0{kJzu?M;@8=T1+zMm{|pJ}6-A6Yu?Pm$TNKd-sl@YEavuUFTM{l8u4i$^kxm zpA`au%g_o_7l7gf+vVYa$jz;+i#8DjkPs8pZ*s#JkCBcV9g8aF8J@N@D4K=eN$w9Avhfx6VIq4l9UA$GtT$f2E`6v%BZz0MkYzp`*u> zj}ZO18z-L7^)Q<5W_&YYWRGLr8WYpdO)le==cn?*8-%$zR!J@V>&IF=aywhxlyW20 z9u*=xTn~14%)idmzYkmrm4M%)TS0hKZZR>m}XS_4)wYYM$*k(Y~9mD@j8B*iRa#+ z2oTV{iFYKta0PARghX!qV&_t>z%!|i{9du-IVpUalqa1TS!MC3-;j7ESX0Ss#IM|s zdwqM=(>$XkE`yYk605sBovDl+*;NwjyJeIGKM7WzyycE3Vnh-M)|yd3@YpzO1! zTqDtyNd@_tW|pUJ)qGJ^7zpt4=0LuE_4LCq1M{}|gGUw!c%)*2Xolp^OWsh+=48LZ zeG2IL0 z?jvL(i1ncF))^aOAU`7F(|yOrgH$Cl%O>tMjrh6aCwOQDZlQ@QG>HqJw~&{xj1Z4( z6KC>zudYw56zYangcc#&*4bKne4|o6KjbE#ow zMBXM?5_!VoF2UlAYh#R^1_f*(hLtjFGr^ZDRg&g2!mLE}tPDlQ|w#Cw+ojgpoAlv#DgW%%q zXrb8;;rfhL{m@X9$In=)gKs3_Gg3(xX4lkK6X2l*(z#HXGE!W=l^dXaZCtYKM)V1y^H@{LG(yVjdYpso1?>#G_&j+nto$zw`(8DOS^sK@*3(Idk2w$W1VWigK3po02tdvtyv;M_=j$3r+6>1bn zl~|NQ?z6oX7{6(eWK4N5Pv54oH|< zMG*qUdf#sg%}l(z>3Z+`t=ErmT$BZm<%_ZNzFu@bU-yG0Yj|J-XR-nHR*2bJWzGOS^8cEEakd2o>$=m0yaOz>J z_uQ0^;MY@M*hdDeFZ$*Ax;eR-nhZ}AJU!>ctfiByJw*EP<;z@}YT4XxkpefWjt&~} zis$?wM+-n!%&8#N)bu)nGCOvBMBn={YKq%QE#7Blu_SGz1{D#Z0@*`Eb-{%!uaAs- zcv7*9`4v)m*`(N!k%|k-CM&Kh6jIYKiM@0f!^WY=;)xa|>aJE!W8L0&?#|ODl|s-qWAEL}D*@$;h#<#$W5Uv2vp7T}keIdIQtCG^$kbJGoCE z$ustZlFi{JNMT(}f+_*j6*GPTx;nmq2Dh=gW~T!Rd+G70&{nmW?^ zMvT`+-E-#-QOq2SCQCzq@g)&YjO^Z58cNaJs#Tp^OgD~LPvv)j1B;HXfAc7D9bIGmoS^1FX0y(A;`PX^!BY+9tW-mbpc{$8vmrgj z!>co<)Lz(l#A3ZEhG9OZAANqOJaUKv>xB@7Lo@MImyuOdHr^r1Bg9kD?W@^i0xHzD zxOF-M#;+yDBflmYC|~`WUd7Ih-R`SHBfX(R&5GSB$`GEqAQ_tnCm?0Di8oq3h}%4SA=2 zPJDq|&kP&s`7)KR@qS8w>HMJYrRGCgHzv9yGHOT0nvg?;NX%C3U*`r6iu9dTUma~v z`ig%G)pfP9^xKVNRnkK^$ySBMKus%FUY=u>5|pLJeaX~+U5h#kMT}a z(XryzeCI?l^$Bya_BWx{!EMb*f|)KV39K@TL!oELo@dsLswx!p9DUG0B=afVQHm!k zQ1lcq{Rz>Yjrx$` za@~?Yg)*krKd#i1Ffi}w=);quTSfPVZASH8J5T@2jZ)i~e%b5z;WI#dJaF|LdrlQX?CzvRxDgu~sO(ER=5 zL>F1rRXe-Jt}kPbXk4ZCJ{*;at@K=~o?nqhKU`RIVXq`XiZxY3r;Ic~Lsfm8nuxw& z8cKdB_z^WvU=owDM0bk`-Hk)C>wYCCB=p-KWsg?zq9i&Ur|a#+qSX8B?vQQ}8~t)M zIW$for6BHJzF{P(&0H4_OQ%cr)3dc-yG~Gt_IW-zf=Bc4soID7%%gh!T|YX`NtaB1 zmNZBu_>|k++G&wZSUSI4e9J{JWK|1zhu2!iWxzVYU-0;ZdvF>?TR}8kx$rYO!sloy z=rJbg=x8>CFY-_;OZev`t|xHQtqL1g5!}CBo6Wkw&#*RC&^j&s-Sv*K2Oj0E7Z=VB zaunfVuG^58Sn+!i4Sbgkb`7J`u~5VOw3Jy;nHl)rd3-=S=m7m&@66?I&VkI6+B{T&wL4IJCe=c^_*jxcrjrY$j|lab$Ei66smJuDmBd^fxV zt-MvHj<$hL>SGH7vpfHjZdr1)!<^?%bnzI_9+?p)q7oQ8uB(3~YAm;jRtb+#`0VBT zT=kqQlj3$OrFZCMBG^0c`9H^HjTtmAWUt_+Rjw|4Ue_!#sZBekjN1C-M|?6l^T6$J z>HDL7Ys}1IlN*Yb?1N)N%~S8Q>6Nwh9?tQV_Afa5(&bL|rw~of+9j13_2DXt-1b~D zS}BtnJ^vC?xx@0QxtHjp&nB5a@^m){nY^bA z#JzsO7{hMG(y4}__xw^>f3=-FU;ly-Sz;-rtiphU+}i4M&KCu`x$>B}Q%R!SIUJ1q z6Df}aFHc8BYWr3%J;I;+ntMkh-K4Gf)%15KnfHmK2aR7FCwvEvDj}m#A|c*9Btkj? zEaD*l;BQ`jvwen%L*m#q(8nuQC_10~%j0d{YiG3dDY$!m-1S~NDB$khv_ggqk+hzi9D0SZ z?AC;=aQ9{h9(Knan9s4Wvv8b&Jm-$ToG~;puyukXfZY-H^sw){5pcs1`0azh6iCft z=jgEql5I0%a}Ihd3AC^r@R8agp#r|W{tFUFC25IGD(Gknwh)*#>Rd8}b^v&dw#iPd zV#R3#9FSvhYH(zMhxgt}FpZ=vOdJgyjm#~K46Ofzl1$oYSIVc;Ss{>@|4P6|9*$Cx zVE>fTwieE?#7bLLxe;PJ7>5a5PDn#3E~ZIi)>!u?F_Nkk2QhGQwgdJIH;)|uHI@P#R@cA6+B&2M zHgT9tdy!28j!)?5zS|F8wkrFb1C4h--Rt4h?KE^i=%1}iNh5I`Z8#H{g*L}H|ZnC$jM%0 z7%=R*TbG6(=W|K+tlO3qf?IHR>qG42gtsJvv>@`a{gdq0AByUB?+?M<*Ww_NF&)6i zWQ&Lj_;%?Z5P@3n=gX0wec)$um0y|^))f@IOc8X2&29{_J-YRS7BK)MB+0QX9Jbl< zJqx*QZ2%nfn8x(JAK96Ox9V*tF}epBe5k374Qw4Y(J8K za1hSSU`-{i>ICIeW!}8*_cSJY{0`+dc?E3+1!^>I|So0w4HUtsv!JqKUf#C)AZ( z46QAk%zvKK23sABkU-IVS3+Je+t`RQn;62Ws~jn3WN@6YHs;MSzuQf z8`!>O)g4rrq$9Py0(X`L=3|muEPxJ3Hh;w;Vr^mIB=Iu_3Jiwy?LB?(@m^#Y80@+U zhIpvv*aCxy)Jn5wkxXn|5zhMmYji%~c2rLWxFuw5E3*Yb1$-l?-4}$ot*eEjovjVf zy~GUcx6S~-3G{QHikQRdw`RQaun+tw_iFEKK)F^h!>d_c=>FAz>670e#EK8RoG3rE zbKis#*c1HoRU@pltF*1Xi!*Qt%*4RvKRS7*m^A`*w$~Z9r%aaXfVhcSBFI5B*ajt} z<>DFkLk0x*?e29rO>B1sf-n6G1}bL#8z4|2U~mh=9_TZCmgKe!-kK+4rm& zG`{=y<$e+IrPEj^E-~u>EtWZLbAi<`&#|GC;WEz8Vj{s_t)#-hydiKGt{s&zn;ePC^ZyzoPwF zmKMykd$VpU2w%JwtYFDMVcM;fEtnUkp+uhxf-bSm3tvDM%saySFEmu$wVW&>V&r;P z1jL9t4*b%rjc+f+=0Iv(gkx6J$Ib0HSd;HI9pZ#DyW{+O2Kad{1S|yXzKA)tn-0F- zEV$`x_sy|+xC4?66n0YOx6amN`Z9uc+Qx$~{0hbk64O z;Z!hBH;`)J&wU%zZXi71GOCDx!V=tf1%j`M3I+-X(qilb2vi{z5s!+t$F4l^Wlh06 z7lil41N41ZkyAuGSXQ39^1v691oJqE?V0E2p7wv(P_LTTu1N5u5y42DK$V(3HW{pk z{RdOTRc{1Lf8r07fPJ+;XM$E01h>zC!rxkuq!OI2s~=;gxKC}fh;&p_6Gs+!?2=hV4$!CIw;VcM-0%b z8w&;W3T`9F>nZrsYT!1i{d*wD_^?Z%H83yiHHaz6rjRiH-2{Y>zIYFu=iEmtLTaCZ zL8@4ophCf}uom4Z9DIc|uyALAJ-#t2`L4QyEC zO8aW3pAvzv;LC{sRZS4qX9F7<%*h@Z@<-rgx8dOnse$2XmH#okDuR-7h>+jS2keRr zUl9$Aj02p||MQN#)h~Y4`%h70`T}=Fg)epnMjiOqsIYg!yX-Tm)dxXoVTKL%kdRGk z_^M@K+FI3rEbKNdxP}=bYdHKU7y&e52ethc8!|xGtNkNr$RSoR8caW!zk+?=sV97K zGO(Vf)&C(H%sIfvzo>vqm4WGDp5b*u$R7)<0=Hja2;`IaC*2Gp>{bOYFe6OS|56yf zt{7P1&i@M|WPSwm4Zq!C(2EWIV`0_dgq;Q=dHnETK^|Zm?dv|hd-&B1%5D?VIT1hL!kfmkOyDM3jAR4KsfsUMSs|XLF{MS_5Id@ zl=ZLf`ULO=q`*%wbn*ZE1iO@zLev(74w1V)34E<4@RJDX{-2)Yk1IDJdY%{B*LHm# z_)16M=jqV(;0uk4BpUx^5eJa*}CkayH2LWHKU;s-^8EdX{~0l}{w zOZE4K_Pde%zkDHl6(X=k*arIs`Hz}Jhy-(wjoP&>;cE+lIS2R82^;Ws7EM9~$n71C z01)wPjUR68OETQIkkI_fU>ewvhPYV~(`*OvLFSH2e@O$Y5QKX7hsnR<~ud9MGK3bMk3 zFWdvBN;lmn6}XHK7zrkn5N#X+q|H9KbAuKBy=a2jUXXrq0!2rjK=%bXR4Qa?E2p)G|-s9#G~fRV;*_KdW%fCU)HPtN#NFQ8GrbrDn}*cGhNuNnElKsOxr z474*pKOB(6%qj#3W=gQ@CJ^HBgavMNBXrse(9UVfSiK9>bk8(zjvVkUg!umOJI4BZ zzCScOEm#EDO?QL%H5opvRUm_E!TumX`=DT+19zsO)&aZ1_`p{3YXW^34;8?J>5l9@0>YLq8A<-mKXG#Wca(yn^w5%^MHKD|Y!?Ja86yIJVdx&x5ub^7 z!mfPqNzcK2J??+Y_j3}rmAe-apOjGIZ~1=BE)M3y_WVbDzq3KV+r5$R0iQbIn)F*l zNE5^7*ajos^ZHka+ZneJi5UIp=5Gmq&5aEvyzc#v2%(YGzs%G9E+4)Nkx)MI)^7oS zO&SdbB=z}wz#S>1!3z4NkR?NWV0;_AtKMzggkMOA`0f=DL1fzQ!{_$KAbgHzuugIN z#rWAt;W9ph6@tyZ-dUymwh1A<06vQ|7){=9p9*co@xbMDMg*7Zow_R=e2!)?9Jc@d z;SgqQMuaC4d3#qp_~gi7JobRUz=KPbjED;}H4VxIGr!%e9zGz`3OF|X=ljr**&?vn z|I2w^*nMFWHrV%_qda`RTChIP_RVqOx7lkEDV6y>{g0J`KV=^ivR9?H)5d{GVA}kb zR`5A%!CFoJ1<9`&Y{6_WA7MO^fk35g_XVF$56m`oZT~85vHf&qzl=gKykhU{9e4-P UfJruz5Ad%hka^zwI^^5`0C;tDe*gdg From d269a7e717c343c34a82e0d366ab8547cb1a873e Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 19:33:15 +0800 Subject: [PATCH 0217/1662] CWE-598 reduction --- .../Security/CWE/CWE-598/SensitiveGetQuery.ql | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql index c381595af14b..f0f2fe905f7b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql @@ -2,6 +2,8 @@ * @name Sensitive GET Query * @description Use of GET request method with sensitive query strings. * @kind path-problem + * @problem.severity warning + * @precision medium * @id java/sensitive-query-with-get * @tags security * external/cwe-598 @@ -23,6 +25,16 @@ class SensitiveInfoExpr extends Expr { } } +/** Holds if `m` is a method of some override of `HttpServlet.doGet`. */ +private predicate isGetServletMethod(Method m) { + isServletRequestMethod(m) and m.getName() = "doGet" +} + +/** The `doGet` method of `HttpServlet`. */ +class DoGetServletMethod extends Method { + DoGetServletMethod() { isGetServletMethod(this) } +} + /** Holds if `ma` is (perhaps indirectly) called from the `doGet` method of `HttpServlet`. */ predicate isReachableFromServletDoGet(MethodAccess ma) { ma.getEnclosingCallable() instanceof DoGetServletMethod @@ -64,4 +76,4 @@ from DataFlow::PathNode source, DataFlow::PathNode sink, SensitiveGetQueryConfig where c.hasFlowPath(source, sink) select sink.getNode(), source, sink, "$@ uses the GET request method to transmit sensitive information.", source.getNode(), - "This request" + "This request" \ No newline at end of file From 0e183ab4a48acc09add7ef400b535b0159a807cc Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 19:49:06 +0800 Subject: [PATCH 0218/1662] Finish comment --- .../experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 3 ++- .../src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 8c7433fd1b69..1bef46f99d05 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -13,8 +13,9 @@ import semmle.code.java.frameworks.spring.SpringController abstract class RequestGetMethod extends Method { RequestGetMethod() { not exists(MethodAccess ma | + // Exclude apparent GET handlers that read a request entity, because this is the principle of JSONP. ma.getMethod() instanceof ServletRequestGetBodyMethod and - any(this).polyCalls*(ma.getEnclosingCallable()) + this.polyCalls*(ma.getEnclosingCallable()) ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql index f0f2fe905f7b..a9528ee2f9b0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-598/SensitiveGetQuery.ql @@ -76,4 +76,4 @@ from DataFlow::PathNode source, DataFlow::PathNode sink, SensitiveGetQueryConfig where c.hasFlowPath(source, sink) select sink.getNode(), source, sink, "$@ uses the GET request method to transmit sensitive information.", source.getNode(), - "This request" \ No newline at end of file + "This request" From 7fbc62358e11ba18c4c5bbbe4f471e665c112125 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Thu, 15 Apr 2021 13:57:44 +0200 Subject: [PATCH 0219/1662] C++: Accept test changes after making the exprMightOverFlow predicates more sound. --- .../CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected | 1 + .../test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected index cbaf5d630795..77b08e62d838 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/ArithmeticWithExtremeValues.expected @@ -3,4 +3,5 @@ | test.c:50:3:50:5 | sc3 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:49:9:49:16 | 127 | Extreme value | | test.c:59:3:59:5 | sc6 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:58:9:58:16 | 127 | Extreme value | | test.c:63:3:63:5 | sc8 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:62:9:62:16 | - ... | Extreme value | +| test.c:75:3:75:5 | sc1 | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:74:9:74:16 | 127 | Extreme value | | test.c:124:9:124:9 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:118:17:118:23 | 2147483647 | Extreme value | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c index 8760641c8e2d..ee2e041db3c3 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/extreme/test.c @@ -72,7 +72,7 @@ void test_negatives() { signed char sc1, sc2, sc3, sc4, sc5, sc6, sc7, sc8; sc1 = CHAR_MAX; - sc1 += 0; // GOOD + sc1 += 0; // GOOD [FALSE POSITIVE] sc1 += -1; // GOOD sc2 = CHAR_MIN; sc2 += -1; // BAD [NOT DETECTED] From b359205d17c6fa39c3ad36c41df9f69d237cde76 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Thu, 15 Apr 2021 13:37:11 +0200 Subject: [PATCH 0220/1662] Python: Add taint tests for .get() in flask --- .../frameworks/flask/TestTaint.expected | 162 +++++++++--------- .../frameworks/flask/taint_test.py | 8 + 2 files changed, 93 insertions(+), 77 deletions(-) diff --git a/python/ql/test/library-tests/frameworks/flask/TestTaint.expected b/python/ql/test/library-tests/frameworks/flask/TestTaint.expected index 8c3b4ea57c9d..1d514b934e2b 100644 --- a/python/ql/test/library-tests/frameworks/flask/TestTaint.expected +++ b/python/ql/test/library-tests/frameworks/flask/TestTaint.expected @@ -19,80 +19,88 @@ | taint_test.py:36 | ok | test_taint | request.access_route[0] | | taint_test.py:39 | ok | test_taint | request.args | | taint_test.py:40 | ok | test_taint | request.args['key'] | -| taint_test.py:41 | ok | test_taint | request.args.getlist(..) | -| taint_test.py:44 | ok | test_taint | request.authorization | -| taint_test.py:45 | ok | test_taint | request.authorization['username'] | -| taint_test.py:46 | fail | test_taint | request.authorization.username | -| taint_test.py:49 | ok | test_taint | request.cache_control | -| taint_test.py:51 | fail | test_taint | request.cache_control.max_age | -| taint_test.py:52 | fail | test_taint | request.cache_control.max_stale | -| taint_test.py:53 | fail | test_taint | request.cache_control.min_fresh | -| taint_test.py:55 | ok | test_taint | request.content_encoding | -| taint_test.py:57 | ok | test_taint | request.content_md5 | -| taint_test.py:59 | ok | test_taint | request.content_type | -| taint_test.py:62 | ok | test_taint | request.cookies | -| taint_test.py:63 | ok | test_taint | request.cookies['key'] | -| taint_test.py:65 | ok | test_taint | request.data | -| taint_test.py:68 | ok | test_taint | request.files | -| taint_test.py:69 | ok | test_taint | request.files['key'] | -| taint_test.py:70 | fail | test_taint | request.files['key'].filename | -| taint_test.py:71 | fail | test_taint | request.files['key'].stream | -| taint_test.py:72 | ok | test_taint | request.files.getlist(..) | -| taint_test.py:73 | fail | test_taint | request.files.getlist(..)[0].filename | -| taint_test.py:74 | fail | test_taint | request.files.getlist(..)[0].stream | -| taint_test.py:77 | ok | test_taint | request.form | -| taint_test.py:78 | ok | test_taint | request.form['key'] | -| taint_test.py:79 | ok | test_taint | request.form.getlist(..) | -| taint_test.py:81 | ok | test_taint | request.get_data() | -| taint_test.py:83 | ok | test_taint | request.get_json() | -| taint_test.py:84 | ok | test_taint | request.get_json()['foo'] | -| taint_test.py:85 | ok | test_taint | request.get_json()['foo']['bar'] | -| taint_test.py:89 | ok | test_taint | request.headers | -| taint_test.py:90 | ok | test_taint | request.headers['key'] | -| taint_test.py:91 | fail | test_taint | request.headers.get_all(..) | -| taint_test.py:92 | fail | test_taint | request.headers.getlist(..) | -| taint_test.py:93 | ok | test_taint | list(..) | -| taint_test.py:94 | fail | test_taint | request.headers.to_wsgi_list() | -| taint_test.py:96 | ok | test_taint | request.json | -| taint_test.py:97 | ok | test_taint | request.json['foo'] | -| taint_test.py:98 | ok | test_taint | request.json['foo']['bar'] | -| taint_test.py:100 | ok | test_taint | request.method | -| taint_test.py:102 | ok | test_taint | request.mimetype | -| taint_test.py:104 | ok | test_taint | request.mimetype_params | -| taint_test.py:106 | ok | test_taint | request.origin | -| taint_test.py:109 | ok | test_taint | request.pragma | -| taint_test.py:111 | ok | test_taint | request.query_string | -| taint_test.py:113 | ok | test_taint | request.referrer | -| taint_test.py:115 | ok | test_taint | request.remote_addr | -| taint_test.py:117 | ok | test_taint | request.remote_user | -| taint_test.py:120 | ok | test_taint | request.stream | -| taint_test.py:121 | ok | test_taint | request.input_stream | -| taint_test.py:123 | ok | test_taint | request.url | -| taint_test.py:125 | ok | test_taint | request.user_agent | -| taint_test.py:128 | ok | test_taint | request.values | -| taint_test.py:129 | ok | test_taint | request.values['key'] | -| taint_test.py:130 | ok | test_taint | request.values.getlist(..) | -| taint_test.py:133 | ok | test_taint | request.view_args | -| taint_test.py:134 | ok | test_taint | request.view_args['key'] | -| taint_test.py:138 | ok | test_taint | request.script_root | -| taint_test.py:139 | ok | test_taint | request.url_root | -| taint_test.py:143 | ok | test_taint | request.charset | -| taint_test.py:144 | ok | test_taint | request.url_charset | -| taint_test.py:148 | ok | test_taint | request.date | -| taint_test.py:151 | ok | test_taint | request.endpoint | -| taint_test.py:156 | ok | test_taint | request.host | -| taint_test.py:157 | ok | test_taint | request.host_url | -| taint_test.py:159 | ok | test_taint | request.scheme | -| taint_test.py:161 | ok | test_taint | request.script_root | -| taint_test.py:169 | ok | test_taint | request.args | -| taint_test.py:170 | ok | test_taint | a | -| taint_test.py:171 | ok | test_taint | b | -| taint_test.py:173 | ok | test_taint | request.args['key'] | -| taint_test.py:174 | ok | test_taint | a['key'] | -| taint_test.py:175 | ok | test_taint | b['key'] | -| taint_test.py:177 | ok | test_taint | request.args.getlist(..) | -| taint_test.py:178 | ok | test_taint | a.getlist(..) | -| taint_test.py:179 | ok | test_taint | b.getlist(..) | -| taint_test.py:180 | ok | test_taint | gl(..) | -| taint_test.py:187 | ok | test_taint | req.path | -| taint_test.py:188 | ok | test_taint | gd() | +| taint_test.py:41 | ok | test_taint | request.args.get(..) | +| taint_test.py:42 | ok | test_taint | request.args.getlist(..) | +| taint_test.py:45 | ok | test_taint | request.authorization | +| taint_test.py:46 | ok | test_taint | request.authorization['username'] | +| taint_test.py:47 | fail | test_taint | request.authorization.username | +| taint_test.py:50 | ok | test_taint | request.cache_control | +| taint_test.py:52 | fail | test_taint | request.cache_control.max_age | +| taint_test.py:53 | fail | test_taint | request.cache_control.max_stale | +| taint_test.py:54 | fail | test_taint | request.cache_control.min_fresh | +| taint_test.py:56 | ok | test_taint | request.content_encoding | +| taint_test.py:58 | ok | test_taint | request.content_md5 | +| taint_test.py:60 | ok | test_taint | request.content_type | +| taint_test.py:63 | ok | test_taint | request.cookies | +| taint_test.py:64 | ok | test_taint | request.cookies['key'] | +| taint_test.py:66 | ok | test_taint | request.data | +| taint_test.py:69 | ok | test_taint | request.files | +| taint_test.py:70 | ok | test_taint | request.files['key'] | +| taint_test.py:71 | fail | test_taint | request.files['key'].filename | +| taint_test.py:72 | fail | test_taint | request.files['key'].stream | +| taint_test.py:73 | ok | test_taint | request.files.get(..) | +| taint_test.py:74 | fail | test_taint | request.files.get(..).filename | +| taint_test.py:75 | fail | test_taint | request.files.get(..).stream | +| taint_test.py:76 | ok | test_taint | request.files.getlist(..) | +| taint_test.py:77 | fail | test_taint | request.files.getlist(..)[0].filename | +| taint_test.py:78 | fail | test_taint | request.files.getlist(..)[0].stream | +| taint_test.py:81 | ok | test_taint | request.form | +| taint_test.py:82 | ok | test_taint | request.form['key'] | +| taint_test.py:83 | ok | test_taint | request.form.get(..) | +| taint_test.py:84 | ok | test_taint | request.form.getlist(..) | +| taint_test.py:86 | ok | test_taint | request.get_data() | +| taint_test.py:88 | ok | test_taint | request.get_json() | +| taint_test.py:89 | ok | test_taint | request.get_json()['foo'] | +| taint_test.py:90 | ok | test_taint | request.get_json()['foo']['bar'] | +| taint_test.py:94 | ok | test_taint | request.headers | +| taint_test.py:95 | ok | test_taint | request.headers['key'] | +| taint_test.py:96 | ok | test_taint | request.headers.get(..) | +| taint_test.py:97 | fail | test_taint | request.headers.get_all(..) | +| taint_test.py:98 | fail | test_taint | request.headers.getlist(..) | +| taint_test.py:99 | ok | test_taint | list(..) | +| taint_test.py:100 | fail | test_taint | request.headers.to_wsgi_list() | +| taint_test.py:102 | ok | test_taint | request.json | +| taint_test.py:103 | ok | test_taint | request.json['foo'] | +| taint_test.py:104 | ok | test_taint | request.json['foo']['bar'] | +| taint_test.py:106 | ok | test_taint | request.method | +| taint_test.py:108 | ok | test_taint | request.mimetype | +| taint_test.py:110 | ok | test_taint | request.mimetype_params | +| taint_test.py:112 | ok | test_taint | request.origin | +| taint_test.py:115 | ok | test_taint | request.pragma | +| taint_test.py:117 | ok | test_taint | request.query_string | +| taint_test.py:119 | ok | test_taint | request.referrer | +| taint_test.py:121 | ok | test_taint | request.remote_addr | +| taint_test.py:123 | ok | test_taint | request.remote_user | +| taint_test.py:126 | ok | test_taint | request.stream | +| taint_test.py:127 | ok | test_taint | request.input_stream | +| taint_test.py:129 | ok | test_taint | request.url | +| taint_test.py:131 | ok | test_taint | request.user_agent | +| taint_test.py:134 | ok | test_taint | request.values | +| taint_test.py:135 | ok | test_taint | request.values['key'] | +| taint_test.py:136 | ok | test_taint | request.values.get(..) | +| taint_test.py:137 | ok | test_taint | request.values.getlist(..) | +| taint_test.py:140 | ok | test_taint | request.view_args | +| taint_test.py:141 | ok | test_taint | request.view_args['key'] | +| taint_test.py:142 | ok | test_taint | request.view_args.get(..) | +| taint_test.py:146 | ok | test_taint | request.script_root | +| taint_test.py:147 | ok | test_taint | request.url_root | +| taint_test.py:151 | ok | test_taint | request.charset | +| taint_test.py:152 | ok | test_taint | request.url_charset | +| taint_test.py:156 | ok | test_taint | request.date | +| taint_test.py:159 | ok | test_taint | request.endpoint | +| taint_test.py:164 | ok | test_taint | request.host | +| taint_test.py:165 | ok | test_taint | request.host_url | +| taint_test.py:167 | ok | test_taint | request.scheme | +| taint_test.py:169 | ok | test_taint | request.script_root | +| taint_test.py:177 | ok | test_taint | request.args | +| taint_test.py:178 | ok | test_taint | a | +| taint_test.py:179 | ok | test_taint | b | +| taint_test.py:181 | ok | test_taint | request.args['key'] | +| taint_test.py:182 | ok | test_taint | a['key'] | +| taint_test.py:183 | ok | test_taint | b['key'] | +| taint_test.py:185 | ok | test_taint | request.args.getlist(..) | +| taint_test.py:186 | ok | test_taint | a.getlist(..) | +| taint_test.py:187 | ok | test_taint | b.getlist(..) | +| taint_test.py:188 | ok | test_taint | gl(..) | +| taint_test.py:195 | ok | test_taint | req.path | +| taint_test.py:196 | ok | test_taint | gd() | diff --git a/python/ql/test/library-tests/frameworks/flask/taint_test.py b/python/ql/test/library-tests/frameworks/flask/taint_test.py index 31c0c7e6121b..986bbcfec79e 100644 --- a/python/ql/test/library-tests/frameworks/flask/taint_test.py +++ b/python/ql/test/library-tests/frameworks/flask/taint_test.py @@ -38,6 +38,7 @@ def test_taint(name = "World!", number="0", foo="foo"): # $requestHandler route # By default werkzeug.datastructures.ImmutableMultiDict -- although can be changed :\ request.args, request.args['key'], + request.args.get('key'), request.args.getlist('key'), # werkzeug.datastructures.Authorization (a dict, with some properties) @@ -69,6 +70,9 @@ def test_taint(name = "World!", number="0", foo="foo"): # $requestHandler route request.files['key'], request.files['key'].filename, request.files['key'].stream, + request.files.get('key'), + request.files.get('key').filename, + request.files.get('key').stream, request.files.getlist('key'), request.files.getlist('key')[0].filename, request.files.getlist('key')[0].stream, @@ -76,6 +80,7 @@ def test_taint(name = "World!", number="0", foo="foo"): # $requestHandler route # By default werkzeug.datastructures.ImmutableMultiDict -- although can be changed :\ request.form, request.form['key'], + request.form.get('key'), request.form.getlist('key'), request.get_data(), @@ -88,6 +93,7 @@ def test_taint(name = "World!", number="0", foo="foo"): # $requestHandler route # which has same interface as werkzeug.datastructures.Headers request.headers, request.headers['key'], + request.headers.get('key'), request.headers.get_all('key'), request.headers.getlist('key'), list(request.headers), # (k, v) list @@ -127,11 +133,13 @@ def test_taint(name = "World!", number="0", foo="foo"): # $requestHandler route # werkzeug.datastructures.CombinedMultiDict, which is basically just a werkzeug.datastructures.MultiDict request.values, request.values['key'], + request.values.get('key'), request.values.getlist('key'), # dict request.view_args, request.view_args['key'], + request.view_args.get('key'), ) ensure_not_tainted( From 42ae5f4f7d99f1f18e8821a0d4520f969a023943 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 15 Apr 2021 16:07:35 +0200 Subject: [PATCH 0221/1662] Python: support / from the right Will also support both operands being paths --- .../src/semmle/python/frameworks/Stdlib.qll | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Stdlib.qll b/python/ql/src/semmle/python/frameworks/Stdlib.qll index 739872e44836..9fb704e1c02f 100644 --- a/python/ql/src/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/semmle/python/frameworks/Stdlib.qll @@ -946,7 +946,11 @@ private module Stdlib { slash.getOp() instanceof Div and right.asCfgNode() = slash.getRight() and left.asCfgNode() = slash.getLeft() and - left.getALocalSource() = pathlibPath(t2) and + ( + left.getALocalSource() = pathlibPath(t2) + or + right.getALocalSource() = pathlibPath(t2) + ) and t2.end() | t.start() and @@ -1030,19 +1034,24 @@ private module Stdlib { nodeTo.getALocalSource() = pathlibPath() and ( // Special handling of the `/` operator - exists(BinaryExprNode slash, DataFlow::Node left | + exists(BinaryExprNode slash, DataFlow::Node path_operand, DataFlow::Node data_operand | slash.getOp() instanceof Div and - left.asCfgNode() = slash.getLeft() and - left.getALocalSource() = pathlibPath() - | - nodeTo.asCfgNode() = slash and ( - // type-preserving call - nodeFrom = left + path_operand.asCfgNode() = slash.getLeft() and + data_operand.asCfgNode() = slash.getRight() or - // data injection - nodeFrom.asCfgNode() = slash.getRight() - ) + path_operand.asCfgNode() = slash.getRight() and + data_operand.asCfgNode() = slash.getLeft() + ) and + path_operand.getALocalSource() = pathlibPath() + | + nodeTo.asCfgNode() = slash and + nodeFrom in [ + // type-preserving call + path_operand, + // data injection + data_operand + ] ) or // standard case From dedf7655422036df96a3c1ffdd58e5017189d81f Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 15 Apr 2021 22:59:22 +0800 Subject: [PATCH 0222/1662] Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll Co-authored-by: Chris Smowton --- .../experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll index 1bef46f99d05..6da4f87294a5 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll @@ -13,7 +13,10 @@ import semmle.code.java.frameworks.spring.SpringController abstract class RequestGetMethod extends Method { RequestGetMethod() { not exists(MethodAccess ma | - // Exclude apparent GET handlers that read a request entity, because this is the principle of JSONP. + // Exclude apparent GET handlers that read a request entity, because this likely indicates this is not in fact a GET handler. + // This is particularly a problem with Spring handlers, which can sometimes neglect to specify a request method. + // Even if it is in fact a GET handler, such a request method will be unusable in the context ` From c58942092f1467a2ec5b5a2bb91d59989e79f8fa Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Mon, 14 Jun 2021 13:43:11 +0200 Subject: [PATCH 1306/1662] JS: Add change note --- javascript/change-notes/2021-06-14-script-with-tsx-lang.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 javascript/change-notes/2021-06-14-script-with-tsx-lang.md diff --git a/javascript/change-notes/2021-06-14-script-with-tsx-lang.md b/javascript/change-notes/2021-06-14-script-with-tsx-lang.md new file mode 100644 index 000000000000..9457f0c3a6f1 --- /dev/null +++ b/javascript/change-notes/2021-06-14-script-with-tsx-lang.md @@ -0,0 +1,3 @@ +lgtm,codescanning +* Script tags with the `lang="tsx"` attribute are now recognized as containing TypeScript code + and are analyzed accordingly. From 4eed94a26298b4543b42c0eda9caf2e6a2b2b4e0 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 14 Jun 2021 14:01:19 +0200 Subject: [PATCH 1307/1662] Python: Fix CWE tag for py/use-of-input So it better matches what is in `py/code-injection`. I had my doubts about CWE-95, but after reading https://owasp.org/www-community/attacks/Direct_Dynamic_Code_Evaluation_Eval%20Injection I think it's fine to add CWE-95 as well :+1: Definitions are: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') CWE-94: Improper Control of Generation of Code ('Code Injection') CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') --- python/ql/src/Expressions/UseofInput.ql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ql/src/Expressions/UseofInput.ql b/python/ql/src/Expressions/UseofInput.ql index 68566ab0f955..a22510ac22e1 100644 --- a/python/ql/src/Expressions/UseofInput.ql +++ b/python/ql/src/Expressions/UseofInput.ql @@ -4,7 +4,8 @@ * @kind problem * @tags security * correctness - * security/cwe/cwe-78 + * security/cwe/cwe-94 + * security/cwe/cwe-95 * @problem.severity error * @security-severity 5.9 * @sub-severity high From 17f9aecab82e0c7d52e9e4ac1ff65684c9fedfd3 Mon Sep 17 00:00:00 2001 From: shati-patel <42641846+shati-patel@users.noreply.github.com> Date: Mon, 14 Jun 2021 13:33:40 +0100 Subject: [PATCH 1308/1662] Docs: Update setting in CodeQL for VS Code --- .../codeql-for-visual-studio-code/customizing-settings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst index 8197858d3ab2..ac498d401f5e 100644 --- a/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst +++ b/docs/codeql/codeql-for-visual-studio-code/customizing-settings.rst @@ -30,7 +30,7 @@ Choosing a version of the CodeQL CLI The CodeQL extension uses the CodeQL CLI to run commands. If you already have the CLI installed and added to your ``PATH``, the extension uses that version. This might be the case if you create your own CodeQL databases instead of downloading them from LGTM.com. Otherwise, the extension automatically manages access to the executable of the CLI for you. For more information about creating databases, see ":ref:`Creating CodeQL databases `" in the CLI help. -To override the default behavior and use a different CLI, you can specify the CodeQL CLI **Executable Path**. Note that this is only available as a user setting, not as a workspace setting. +To override the default behavior and use a different CLI, you can specify the CodeQL CLI **Executable Path**. Changing the labels of query history items -------------------------------------------- From d19bc1252b65f8405e56e787bf829706d75577ab Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 14 Jun 2021 15:06:42 +0200 Subject: [PATCH 1309/1662] Python: limit size of `extraStepForCalls` predicate On django/django, this reduced the number of results in `extraStepForCalls` from 201,283 to 541 --- .../dataflow/new/SensitiveDataSources.qll | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll b/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll index a812b48ba745..de2ccbd5b84a 100644 --- a/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll +++ b/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll @@ -115,6 +115,25 @@ private module SensitiveDataModeling { override SensitiveDataClassification getClassification() { result = classification } } + /** + * Tracks any modeled source of sensitive data (with any classification), + * to limit the scope of `extraStepForCalls`. See it's QLDoc for more context. + */ + private DataFlow::LocalSourceNode possibleSensitiveCallable(DataFlow::TypeTracker t) { + t.start() and + result instanceof SensitiveDataSource + or + exists(DataFlow::TypeTracker t2 | result = possibleSensitiveCallable(t2).track(t2, t)) + } + + /** + * Tracks any modeled source of sensitive data (with any classification), + * to limit the scope of `extraStepForCalls`. See it's QLDoc for more context. + */ + private DataFlow::Node possibleSensitiveCallable() { + possibleSensitiveCallable(DataFlow::TypeTracker::end()).flowsTo(result) + } + /** * Holds if the step from `nodeFrom` to `nodeTo` should be considered a * taint-flow step for sensitive-data, to ensure calls are handled correctly. @@ -147,7 +166,10 @@ private module SensitiveDataModeling { * ``` */ predicate extraStepForCalls(DataFlow::Node nodeFrom, DataFlow::CallCfgNode nodeTo) { - nodeTo.getFunction() = nodeFrom + // However, we do still use the type-tracking approach to limit the size of this + // predicate. + nodeTo.getFunction() = nodeFrom and + nodeFrom = possibleSensitiveCallable() } /** From 6b63e032a9c88d2c6e9cf0e8b73099959dfe6701 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 4 Jun 2021 14:57:02 +0200 Subject: [PATCH 1310/1662] C#: Populate labels earlier --- csharp/extractor/Semmle.Extraction/Context.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Extraction/Context.cs b/csharp/extractor/Semmle.Extraction/Context.cs index b08fb98fc553..410b3c6980ac 100644 --- a/csharp/extractor/Semmle.Extraction/Context.cs +++ b/csharp/extractor/Semmle.Extraction/Context.cs @@ -35,12 +35,14 @@ public class Context // A recursion guard against writing to the trap file whilst writing an id to the trap file. private bool writingLabel = false; + private readonly Queue labelQueue = new(); + protected void DefineLabel(IEntity entity) { if (writingLabel) { // Don't define a label whilst writing a label. - PopulateLater(() => DefineLabel(entity)); + labelQueue.Enqueue(entity); } else { @@ -52,6 +54,10 @@ protected void DefineLabel(IEntity entity) finally { writingLabel = false; + if (labelQueue.Any()) + { + DefineLabel(labelQueue.Dequeue()); + } } } } From e71264d1d2255a46f88cbc1625baebf3097765d8 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:03:16 +0100 Subject: [PATCH 1311/1662] C++: Lines of user code query. --- cpp/ql/src/Summary/LinesOfUserCode.ql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cpp/ql/src/Summary/LinesOfUserCode.ql diff --git a/cpp/ql/src/Summary/LinesOfUserCode.ql b/cpp/ql/src/Summary/LinesOfUserCode.ql new file mode 100644 index 000000000000..67d3aa6a8e05 --- /dev/null +++ b/cpp/ql/src/Summary/LinesOfUserCode.ql @@ -0,0 +1,17 @@ +/** + * @name Total lines of user written C/C++ code in the database + * @description The total number of lines of C/C++ code from the source code directory, excluding auto-generated files. This query counts the lines of code, excluding whitespace or comments. Note: If external libraries are included in the codebase either in a checked-in virtual environment or as vendored code, that will currently be counted as user written code. + * @kind metric + * @tags summary + * lines-of-code + * @id cpp/summary/lines-of-user-code + */ + +import cpp +import semmle.code.cpp.AutogeneratedFile + +select sum(File f | + f.fromSource() and exists(f.getRelativePath()) and not f instanceof AutogeneratedFile + | + f.getMetrics().getNumberOfLinesOfCode() + ) From 1e1ae2797453b18cd36376a90785dce92bdaf1a3 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:06:20 +0100 Subject: [PATCH 1312/1662] C++: Test the new query. --- cpp/ql/test/query-tests/Summary/LinesOfUserCode.expected | 1 + cpp/ql/test/query-tests/Summary/LinesOfUserCode.qlref | 1 + 2 files changed, 2 insertions(+) create mode 100644 cpp/ql/test/query-tests/Summary/LinesOfUserCode.expected create mode 100644 cpp/ql/test/query-tests/Summary/LinesOfUserCode.qlref diff --git a/cpp/ql/test/query-tests/Summary/LinesOfUserCode.expected b/cpp/ql/test/query-tests/Summary/LinesOfUserCode.expected new file mode 100644 index 000000000000..a75c288c151d --- /dev/null +++ b/cpp/ql/test/query-tests/Summary/LinesOfUserCode.expected @@ -0,0 +1 @@ +| 93 | diff --git a/cpp/ql/test/query-tests/Summary/LinesOfUserCode.qlref b/cpp/ql/test/query-tests/Summary/LinesOfUserCode.qlref new file mode 100644 index 000000000000..baaa947e6afa --- /dev/null +++ b/cpp/ql/test/query-tests/Summary/LinesOfUserCode.qlref @@ -0,0 +1 @@ +Summary/LinesOfUserCode.ql From d7db18213de47288e25c3e5810b6f6f4cad909ae Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:12:43 +0100 Subject: [PATCH 1313/1662] C++: Add a generated file to the test. --- cpp/ql/test/query-tests/Summary/LinesOfCode.expected | 2 +- cpp/ql/test/query-tests/Summary/generated-file.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cpp/ql/test/query-tests/Summary/generated-file.cpp diff --git a/cpp/ql/test/query-tests/Summary/LinesOfCode.expected b/cpp/ql/test/query-tests/Summary/LinesOfCode.expected index a75c288c151d..8628859feb72 100644 --- a/cpp/ql/test/query-tests/Summary/LinesOfCode.expected +++ b/cpp/ql/test/query-tests/Summary/LinesOfCode.expected @@ -1 +1 @@ -| 93 | +| 96 | diff --git a/cpp/ql/test/query-tests/Summary/generated-file.cpp b/cpp/ql/test/query-tests/Summary/generated-file.cpp new file mode 100644 index 000000000000..e15ecb227b99 --- /dev/null +++ b/cpp/ql/test/query-tests/Summary/generated-file.cpp @@ -0,0 +1,12 @@ +/** + * This file is generated by abc.xyz. Do not edit! + * + * (except that this isn't really a generated file, but the above is the typical sort of comment + * you see at the beginning of a true generated file). + */ + +int generated_function() { + // ... + + return 1; +} From 53bef94b753ef363be4abac51de509096ce3b14b Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Tue, 15 Jun 2021 09:34:54 +0200 Subject: [PATCH 1314/1662] JS: Extractor version bump --- javascript/extractor/src/com/semmle/js/extractor/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/extractor/src/com/semmle/js/extractor/Main.java b/javascript/extractor/src/com/semmle/js/extractor/Main.java index 5d417940d758..a86fa422c397 100644 --- a/javascript/extractor/src/com/semmle/js/extractor/Main.java +++ b/javascript/extractor/src/com/semmle/js/extractor/Main.java @@ -43,7 +43,7 @@ public class Main { * A version identifier that should be updated every time the extractor changes in such a way that * it may produce different tuples for the same file under the same {@link ExtractorConfig}. */ - public static final String EXTRACTOR_VERSION = "2021-05-31"; + public static final String EXTRACTOR_VERSION = "2021-06-15"; public static final Pattern NEWLINE = Pattern.compile("\n"); From 416c986cbca69568c2fe0945df8a8c0c0be72434 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 15 Jun 2021 09:43:11 +0200 Subject: [PATCH 1315/1662] add support for graphql in `@actions/github` --- javascript/change-notes/2021-06-09-graphql.md | 3 ++- .../ql/src/semmle/javascript/frameworks/GraphQL.qll | 2 ++ .../Security/CWE-089/untyped/SqlInjection.expected | 12 ++++++++++++ .../query-tests/Security/CWE-089/untyped/graphql.js | 8 ++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-09-graphql.md b/javascript/change-notes/2021-06-09-graphql.md index cf036e39aae1..b747906a9828 100644 --- a/javascript/change-notes/2021-06-09-graphql.md +++ b/javascript/change-notes/2021-06-09-graphql.md @@ -4,5 +4,6 @@ lgtm,codescanning [@octokit/core](https://npmjs.com/package/@octokit/core), [@octokit/rest](https://npmjs.com/package/@octokit/rest), [@octokit/graphql](https://npmjs.com/package/@octokit/graphql), - [@octokit/request](https://npmjs.com/package/@octokit/request), and + [@octokit/request](https://npmjs.com/package/@octokit/request), + [@actions/github](https://npmjs.com/package/@actions/github), and [graphql](https://npmjs.com/package/graphql) \ No newline at end of file diff --git a/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll b/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll index d2c0c4dfbeef..e0a9679a7a15 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll @@ -20,6 +20,8 @@ private module Octokit { private API::Node octokit() { result = API::moduleImport(["@octokit/core", "@octokit/rest"]).getMember("Octokit").getInstance() + or + result = API::moduleImport("@actions/github").getMember("getOctokit").getReturn() } /** diff --git a/javascript/ql/test/query-tests/Security/CWE-089/untyped/SqlInjection.expected b/javascript/ql/test/query-tests/Security/CWE-089/untyped/SqlInjection.expected index 67c89bb2cdf6..daed7f03e20b 100644 --- a/javascript/ql/test/query-tests/Security/CWE-089/untyped/SqlInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-089/untyped/SqlInjection.expected @@ -44,6 +44,12 @@ nodes | graphql.js:84:14:90:8 | `{\\n ... }` | | graphql.js:84:14:90:8 | `{\\n ... }` | | graphql.js:88:13:88:14 | id | +| graphql.js:119:11:119:28 | id | +| graphql.js:119:16:119:28 | req.params.id | +| graphql.js:119:16:119:28 | req.params.id | +| graphql.js:120:38:120:48 | `foo ${id}` | +| graphql.js:120:38:120:48 | `foo ${id}` | +| graphql.js:120:45:120:46 | id | | json-schema-validator.js:25:15:25:48 | query | | json-schema-validator.js:25:23:25:48 | JSON.pa ... y.data) | | json-schema-validator.js:25:34:25:47 | req.query.data | @@ -417,6 +423,11 @@ edges | graphql.js:75:56:75:57 | id | graphql.js:75:46:75:64 | "{ foo" + id + " }" | | graphql.js:88:13:88:14 | id | graphql.js:84:14:90:8 | `{\\n ... }` | | graphql.js:88:13:88:14 | id | graphql.js:84:14:90:8 | `{\\n ... }` | +| graphql.js:119:11:119:28 | id | graphql.js:120:45:120:46 | id | +| graphql.js:119:16:119:28 | req.params.id | graphql.js:119:11:119:28 | id | +| graphql.js:119:16:119:28 | req.params.id | graphql.js:119:11:119:28 | id | +| graphql.js:120:45:120:46 | id | graphql.js:120:38:120:48 | `foo ${id}` | +| graphql.js:120:45:120:46 | id | graphql.js:120:38:120:48 | `foo ${id}` | | json-schema-validator.js:25:15:25:48 | query | json-schema-validator.js:33:22:33:26 | query | | json-schema-validator.js:25:15:25:48 | query | json-schema-validator.js:33:22:33:26 | query | | json-schema-validator.js:25:15:25:48 | query | json-schema-validator.js:35:18:35:22 | query | @@ -835,6 +846,7 @@ edges | graphql.js:58:66:58:76 | `foo ${id}` | graphql.js:55:16:55:28 | req.params.id | graphql.js:58:66:58:76 | `foo ${id}` | This query depends on $@. | graphql.js:55:16:55:28 | req.params.id | a user-provided value | | graphql.js:75:46:75:64 | "{ foo" + id + " }" | graphql.js:74:14:74:25 | req.query.id | graphql.js:75:46:75:64 | "{ foo" + id + " }" | This query depends on $@. | graphql.js:74:14:74:25 | req.query.id | a user-provided value | | graphql.js:84:14:90:8 | `{\\n ... }` | graphql.js:74:14:74:25 | req.query.id | graphql.js:84:14:90:8 | `{\\n ... }` | This query depends on $@. | graphql.js:74:14:74:25 | req.query.id | a user-provided value | +| graphql.js:120:38:120:48 | `foo ${id}` | graphql.js:119:16:119:28 | req.params.id | graphql.js:120:38:120:48 | `foo ${id}` | This query depends on $@. | graphql.js:119:16:119:28 | req.params.id | a user-provided value | | json-schema-validator.js:33:22:33:26 | query | json-schema-validator.js:25:34:25:47 | req.query.data | json-schema-validator.js:33:22:33:26 | query | This query depends on $@. | json-schema-validator.js:25:34:25:47 | req.query.data | a user-provided value | | json-schema-validator.js:35:18:35:22 | query | json-schema-validator.js:25:34:25:47 | req.query.data | json-schema-validator.js:35:18:35:22 | query | This query depends on $@. | json-schema-validator.js:25:34:25:47 | req.query.data | a user-provided value | | json-schema-validator.js:55:22:55:26 | query | json-schema-validator.js:50:34:50:47 | req.query.data | json-schema-validator.js:55:22:55:26 | query | This query depends on $@. | json-schema-validator.js:50:34:50:47 | req.query.data | a user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-089/untyped/graphql.js b/javascript/ql/test/query-tests/Security/CWE-089/untyped/graphql.js index a3359cb55007..723348daf574 100644 --- a/javascript/ql/test/query-tests/Security/CWE-089/untyped/graphql.js +++ b/javascript/ql/test/query-tests/Security/CWE-089/untyped/graphql.js @@ -111,3 +111,11 @@ app.get('/thing/:id', async function(req, res) { }) }) }); + +const github = require('@actions/github'); +app.get('/event/:id/', async function(req, res) { + const kit = github.getOctokit("foo") + + const id = req.params.id; + const result = await kit.graphql(`foo ${id}`); // NOT OK +}); From 60920c1eccb4cedec44f601f5fe62cae30b40443 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 15 Jun 2021 09:53:32 +0200 Subject: [PATCH 1316/1662] require that the URL refers to graphql in some way --- .../semmle/javascript/frameworks/GraphQL.qll | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll b/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll index e0a9679a7a15..6193f68f99d3 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/GraphQL.qll @@ -62,7 +62,9 @@ private module Octokit { private class RequestClientRequest extends ClientRequest::Range, API::CallNode { RequestClientRequest() { this = requestCallee().getACall() } - override DataFlow::Node getUrl() { none() } + override DataFlow::Node getUrl() { + result = this.getArgument(0) // contains both the method and the URL, but it's close enough + } override DataFlow::Node getHost() { none() } @@ -96,7 +98,22 @@ private module GraphQLLib { .getALocalSource() .getAPropertyWrite("query") .getRhs() + | + containsGraphQLIndicator(req.getUrl()) ) } } + + /** + * Holds if `node` is a node that likely contains an URL to a GraphQL endpoint. + */ + private predicate containsGraphQLIndicator(DataFlow::Node node) { + node.getStringValue().regexpMatch("(?i).*graphql.*") + or + node.(DataFlow::PropRead).getPropertyName().regexpMatch("(?i).*graphql.*") + or + containsGraphQLIndicator(node.(StringOps::Concatenation).getAnOperand()) + or + containsGraphQLIndicator(node.getAPredecessor()) + } } From 00af18a62232e5684044eece719eb780bfd8eb5a Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 15 Jun 2021 11:31:38 +0200 Subject: [PATCH 1317/1662] Python: Autoformat --- python/ql/src/semmle/python/Frameworks.qll | 1 - 1 file changed, 1 deletion(-) diff --git a/python/ql/src/semmle/python/Frameworks.qll b/python/ql/src/semmle/python/Frameworks.qll index d2867c7f4528..c75c09f2023c 100644 --- a/python/ql/src/semmle/python/Frameworks.qll +++ b/python/ql/src/semmle/python/Frameworks.qll @@ -1,4 +1,3 @@ - /** * Helper file that imports all framework modeling. */ From 255e4221721d6bffc7a136ad53043f34cf3c7de5 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 11:35:10 +0200 Subject: [PATCH 1318/1662] Apply code review findings --- .github/workflows/csv-coverage-timeseries.yml | 10 ++++------ .github/workflows/csv-coverage.yml | 18 +++++------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/csv-coverage-timeseries.yml b/.github/workflows/csv-coverage-timeseries.yml index 99e7c18d6044..e7c01623e04f 100644 --- a/.github/workflows/csv-coverage-timeseries.yml +++ b/.github/workflows/csv-coverage-timeseries.yml @@ -23,12 +23,10 @@ jobs: with: python-version: 3.8 - name: Download CodeQL CLI - uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c - with: - repo: "github/codeql-cli-binaries" - version: "latest" - file: "codeql-linux64.zip" - token: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" - name: Unzip CodeQL CLI run: unzip -d codeql-cli codeql-linux64.zip - name: Build modeled package list diff --git a/.github/workflows/csv-coverage.yml b/.github/workflows/csv-coverage.yml index 3c551ae02dfc..c7ab92eb0f31 100644 --- a/.github/workflows/csv-coverage.yml +++ b/.github/workflows/csv-coverage.yml @@ -17,28 +17,20 @@ jobs: uses: actions/checkout@v2 with: path: script - - name: Clone self (github/codeql) at a given SHA for analysis - if: github.event.inputs.qlModelShaOverride != '' - uses: actions/checkout@v2 - with: - path: codeqlModels - ref: ${{ github.event.inputs.qlModelShaOverride }} - name: Clone self (github/codeql) for analysis - if: github.event.inputs.qlModelShaOverride == '' uses: actions/checkout@v2 with: path: codeqlModels + ref: ${{ github.event.inputs.qlModelShaOverride || github.ref }} - name: Set up Python 3.8 uses: actions/setup-python@v2 with: python-version: 3.8 - name: Download CodeQL CLI - uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c - with: - repo: "github/codeql-cli-binaries" - version: "latest" - file: "codeql-linux64.zip" - token: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" - name: Unzip CodeQL CLI run: unzip -d codeql-cli codeql-linux64.zip - name: Build modeled package list From b154f034cb8a1af5de446407f33ac5cc5414cd8b Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 15 Jun 2021 12:55:52 +0200 Subject: [PATCH 1319/1662] Python: Fix names of supported PyPI packages --- docs/codeql/support/reusables/frameworks.rst | 3 ++- python/ql/src/semmle/python/frameworks/MySQLdb.qll | 6 ++++-- .../src/semmle/python/frameworks/MysqlConnectorPython.qll | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/codeql/support/reusables/frameworks.rst b/docs/codeql/support/reusables/frameworks.rst index d39b85931ce0..0205c4b2df97 100644 --- a/docs/codeql/support/reusables/frameworks.rst +++ b/docs/codeql/support/reusables/frameworks.rst @@ -166,7 +166,8 @@ Python built-in support multidict, Utility library yarl, Utility library mysql-connector-python, Database - MySQLdb, Database + mysql-connector, Database + MySQL-python, Database psycopg2, Database sqlite3, Database cryptography, Cryptography library diff --git a/python/ql/src/semmle/python/frameworks/MySQLdb.qll b/python/ql/src/semmle/python/frameworks/MySQLdb.qll index 4f9c799d6409..5f10cdc0c847 100644 --- a/python/ql/src/semmle/python/frameworks/MySQLdb.qll +++ b/python/ql/src/semmle/python/frameworks/MySQLdb.qll @@ -1,5 +1,7 @@ /** - * Provides classes modeling security-relevant aspects of the `MySQLdb` PyPI package. + * Provides classes modeling security-relevant aspects of the `MySQL-python` PyPI package + * (imported as `MySQLdb`). + * * See * - https://mysqlclient.readthedocs.io/index.html * - https://pypi.org/project/MySQL-python/ @@ -13,7 +15,7 @@ private import semmle.python.ApiGraphs private import semmle.python.frameworks.PEP249 /** - * Provides models for the `MySQLdb` PyPI package. + * Provides models for the `MySQL-python` PyPI package (imported as `MySQLdb`). * See * - https://mysqlclient.readthedocs.io/index.html * - https://pypi.org/project/MySQL-python/ diff --git a/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll b/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll index 989fb668746f..89cbb857235b 100644 --- a/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll +++ b/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll @@ -1,5 +1,6 @@ /** - * Provides classes modeling security-relevant aspects of the `mysql-connector-python` package. + * Provides classes modeling security-relevant aspects of the `mysql-connector-python` + * and `mysql-connector` (old package name) PyPI packages (imported as `mysql`). * See * - https://dev.mysql.com/doc/connector-python/en/ * - https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html @@ -13,7 +14,8 @@ private import semmle.python.ApiGraphs private import semmle.python.frameworks.PEP249 /** - * Provides models for the `mysql-connector-python` package. + * Provides classes modeling security-relevant aspects of the `mysql-connector-python` + * and `mysql-connector` (old package name) PyPI packages (imported as `mysql`). * See * - https://dev.mysql.com/doc/connector-python/en/ * - https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html From b1fb68bc541829a410bca4dd989e11678e59cebd Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 15 Jun 2021 13:00:54 +0200 Subject: [PATCH 1320/1662] Python: Rename .qll file for mysql-connector-python support Just like our support for the `PyYAML` PyPI package that you import with `import yaml` is in `Yaml.qll`. Since this file does not provide any public predicates/modules, it should be safe to rename it. --- python/ql/src/semmle/python/Frameworks.qll | 2 +- .../python/frameworks/{MysqlConnectorPython.qll => Mysql.qll} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename python/ql/src/semmle/python/frameworks/{MysqlConnectorPython.qll => Mysql.qll} (97%) diff --git a/python/ql/src/semmle/python/Frameworks.qll b/python/ql/src/semmle/python/Frameworks.qll index 523f844954b3..0eed2efaf77f 100644 --- a/python/ql/src/semmle/python/Frameworks.qll +++ b/python/ql/src/semmle/python/Frameworks.qll @@ -14,7 +14,7 @@ private import semmle.python.frameworks.Flask private import semmle.python.frameworks.Idna private import semmle.python.frameworks.Invoke private import semmle.python.frameworks.Multidict -private import semmle.python.frameworks.MysqlConnectorPython +private import semmle.python.frameworks.Mysql private import semmle.python.frameworks.MySQLdb private import semmle.python.frameworks.Psycopg2 private import semmle.python.frameworks.PyMySQL diff --git a/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll b/python/ql/src/semmle/python/frameworks/Mysql.qll similarity index 97% rename from python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll rename to python/ql/src/semmle/python/frameworks/Mysql.qll index 89cbb857235b..5049124ad83c 100644 --- a/python/ql/src/semmle/python/frameworks/MysqlConnectorPython.qll +++ b/python/ql/src/semmle/python/frameworks/Mysql.qll @@ -20,7 +20,7 @@ private import semmle.python.frameworks.PEP249 * - https://dev.mysql.com/doc/connector-python/en/ * - https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html */ -private module MysqlConnectorPython { +private module Mysql { // --------------------------------------------------------------------------- // mysql // --------------------------------------------------------------------------- From c03ee32f02b4ff6f2e02692cbe6f3214dad200bb Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 15 Jun 2021 13:42:43 +0200 Subject: [PATCH 1321/1662] Python: Move cached predicates in type tracker library to same stage --- .../dataflow/new/internal/TypeTracker.qll | 135 ++++++++++-------- 1 file changed, 73 insertions(+), 62 deletions(-) diff --git a/python/ql/src/semmle/python/dataflow/new/internal/TypeTracker.qll b/python/ql/src/semmle/python/dataflow/new/internal/TypeTracker.qll index 48627668fb38..8b917edc60b1 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/TypeTracker.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/TypeTracker.qll @@ -23,15 +23,57 @@ class OptionalContentName extends string { OptionalContentName() { this instanceof ContentName or this = "" } } -/** - * A description of a step on an inter-procedural data flow path. - */ -private newtype TStepSummary = - LevelStep() or - CallStep() or - ReturnStep() or - StoreStep(ContentName content) or - LoadStep(ContentName content) +cached +private module Cached { + /** + * A description of a step on an inter-procedural data flow path. + */ + cached + newtype TStepSummary = + LevelStep() or + CallStep() or + ReturnStep() or + StoreStep(ContentName content) or + LoadStep(ContentName content) + + /** Gets the summary resulting from appending `step` to type-tracking summary `tt`. */ + cached + TypeTracker append(TypeTracker tt, StepSummary step) { + exists(Boolean hasCall, OptionalContentName content | tt = MkTypeTracker(hasCall, content) | + step = LevelStep() and result = tt + or + step = CallStep() and result = MkTypeTracker(true, content) + or + step = ReturnStep() and hasCall = false and result = tt + or + step = LoadStep(content) and result = MkTypeTracker(hasCall, "") + or + exists(string p | step = StoreStep(p) and content = "" and result = MkTypeTracker(hasCall, p)) + ) + } + + /** + * Gets the summary that corresponds to having taken a forwards + * heap and/or intra-procedural step from `nodeFrom` to `nodeTo`. + * + * Steps contained in this predicate should _not_ depend on the call graph. + */ + cached + predicate stepNoCall(LocalSourceNode nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { + exists(Node mid | nodeFrom.flowsTo(mid) and smallstepNoCall(mid, nodeTo, summary)) + } + + /** + * Gets the summary that corresponds to having taken a forwards + * inter-procedural step from `nodeFrom` to `nodeTo`. + */ + cached + predicate stepCall(LocalSourceNode nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { + exists(Node mid | nodeFrom.flowsTo(mid) and smallstepCall(mid, nodeTo, summary)) + } +} + +private import Cached /** * INTERNAL: Use `TypeTracker` or `TypeBackTracker` instead. @@ -53,28 +95,29 @@ class StepSummary extends TStepSummary { } } -/** Provides predicates for updating step summaries (`StepSummary`s). */ -module StepSummary { - /** - * Gets the summary that corresponds to having taken a forwards - * heap and/or intra-procedural step from `nodeFrom` to `nodeTo`. - * - * Steps contained in this predicate should _not_ depend on the call graph. - */ - cached - private predicate stepNoCall(LocalSourceNode nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { - exists(Node mid | nodeFrom.flowsTo(mid) and smallstepNoCall(mid, nodeTo, summary)) - } +pragma[noinline] +private predicate smallstepNoCall(Node nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { + jumpStep(nodeFrom, nodeTo) and + summary = LevelStep() + or + exists(string content | + StepSummary::localSourceStoreStep(nodeFrom, nodeTo, content) and + summary = StoreStep(content) + or + basicLoadStep(nodeFrom, nodeTo, content) and summary = LoadStep(content) + ) +} - /** - * Gets the summary that corresponds to having taken a forwards - * inter-procedural step from `nodeFrom` to `nodeTo`. - */ - cached - private predicate stepCall(LocalSourceNode nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { - exists(Node mid | nodeFrom.flowsTo(mid) and smallstepCall(mid, nodeTo, summary)) - } +pragma[noinline] +private predicate smallstepCall(Node nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { + callStep(nodeFrom, nodeTo) and summary = CallStep() + or + returnStep(nodeFrom, nodeTo) and + summary = ReturnStep() +} +/** Provides predicates for updating step summaries (`StepSummary`s). */ +module StepSummary { /** * Gets the summary that corresponds to having taken a forwards * heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. @@ -92,27 +135,6 @@ module StepSummary { stepCall(nodeFrom, nodeTo, summary) } - pragma[noinline] - private predicate smallstepNoCall(Node nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { - jumpStep(nodeFrom, nodeTo) and - summary = LevelStep() - or - exists(string content | - localSourceStoreStep(nodeFrom, nodeTo, content) and - summary = StoreStep(content) - or - basicLoadStep(nodeFrom, nodeTo, content) and summary = LoadStep(content) - ) - } - - pragma[noinline] - private predicate smallstepCall(Node nodeFrom, LocalSourceNode nodeTo, StepSummary summary) { - callStep(nodeFrom, nodeTo) and summary = CallStep() - or - returnStep(nodeFrom, nodeTo) and - summary = ReturnStep() - } - /** * Gets the summary that corresponds to having taken a forwards * local, heap and/or inter-procedural step from `nodeFrom` to `nodeTo`. @@ -193,18 +215,7 @@ class TypeTracker extends TTypeTracker { TypeTracker() { this = MkTypeTracker(hasCall, content) } /** Gets the summary resulting from appending `step` to this type-tracking summary. */ - cached - TypeTracker append(StepSummary step) { - step = LevelStep() and result = this - or - step = CallStep() and result = MkTypeTracker(true, content) - or - step = ReturnStep() and hasCall = false and result = this - or - step = LoadStep(content) and result = MkTypeTracker(hasCall, "") - or - exists(string p | step = StoreStep(p) and content = "" and result = MkTypeTracker(hasCall, p)) - } + TypeTracker append(StepSummary step) { result = append(this, step) } /** Gets a textual representation of this summary. */ string toString() { From 771e686946c34946a6b961b71a5ccadf5d67afa5 Mon Sep 17 00:00:00 2001 From: Calum Grant Date: Tue, 15 Jun 2021 13:25:17 +0100 Subject: [PATCH 1322/1662] Update security-severity scores --- .../Best Practices/Likely Errors/OffsetUseBeforeRangeCheck.ql | 2 +- cpp/ql/src/Critical/DescriptorMayNotBeClosed.ql | 2 +- cpp/ql/src/Critical/DescriptorNeverClosed.ql | 2 +- cpp/ql/src/Critical/FileMayNotBeClosed.ql | 2 +- cpp/ql/src/Critical/FileNeverClosed.ql | 2 +- cpp/ql/src/Critical/GlobalUseBeforeInit.ql | 2 +- cpp/ql/src/Critical/InconsistentNullnessTesting.ql | 2 +- cpp/ql/src/Critical/InitialisationNotRun.ql | 2 +- cpp/ql/src/Critical/LateNegativeTest.ql | 2 +- cpp/ql/src/Critical/MemoryMayNotBeFreed.ql | 2 +- cpp/ql/src/Critical/MemoryNeverFreed.ql | 2 +- cpp/ql/src/Critical/MissingNegativityTest.ql | 2 +- cpp/ql/src/Critical/MissingNullTest.ql | 2 +- cpp/ql/src/Critical/NewFreeMismatch.ql | 2 +- cpp/ql/src/Critical/OverflowCalculated.ql | 2 +- cpp/ql/src/Critical/OverflowDestination.ql | 2 +- cpp/ql/src/Critical/OverflowStatic.ql | 2 +- cpp/ql/src/Critical/ReturnStackAllocatedObject.ql | 2 +- cpp/ql/src/Critical/SizeCheck.ql | 2 +- cpp/ql/src/Critical/SizeCheck2.ql | 2 +- cpp/ql/src/Critical/UseAfterFree.ql | 2 +- cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql | 2 +- cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql | 2 +- cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql | 2 +- cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql | 2 +- cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql | 2 +- cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql | 2 +- cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql | 2 +- cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql | 2 +- .../src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql | 2 +- .../Likely Bugs/Memory Management/ImproperNullTermination.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.ql | 2 +- .../Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/SuspiciousSizeof.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql | 2 +- cpp/ql/src/Likely Bugs/Memory Management/UnsafeUseOfStrcat.ql | 2 +- cpp/ql/src/Likely Bugs/OO/SelfAssignmentCheck.ql | 2 +- cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql | 2 +- .../src/Likely Bugs/Underspecified Functions/TooFewArguments.ql | 2 +- cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql | 2 +- cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql | 2 +- cpp/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql | 2 +- cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql | 2 +- cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql | 2 +- cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql | 2 +- cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql | 2 +- cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql | 2 +- cpp/ql/src/Security/CWE/CWE-119/OverflowBuffer.ql | 2 +- cpp/ql/src/Security/CWE/CWE-120/BadlyBoundedWrite.ql | 2 +- cpp/ql/src/Security/CWE/CWE-120/OverrunWrite.ql | 2 +- cpp/ql/src/Security/CWE/CWE-120/OverrunWriteFloat.ql | 2 +- cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql | 2 +- cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql | 2 +- cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql | 2 +- cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql | 2 +- cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql | 2 +- .../CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql | 2 +- cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql | 2 +- .../CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql | 2 +- cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql | 2 +- cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql | 2 +- cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql | 2 +- cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql | 2 +- cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql | 2 +- cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql | 2 +- cpp/ql/src/Security/CWE/CWE-327/OpenSslHeartbleed.ql | 2 +- cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql | 2 +- cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.ql | 2 +- .../Security/CWE/CWE-457/ConditionallyUninitializedVariable.ql | 2 +- cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScaling.ql | 2 +- cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql | 2 +- cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql | 2 +- cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql | 2 +- cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql | 2 +- cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql | 2 +- cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql | 2 +- cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql | 2 +- cpp/ql/src/Security/CWE/CWE-764/LockOrderCycle.ql | 2 +- cpp/ql/src/Security/CWE/CWE-764/TwiceLocked.ql | 2 +- cpp/ql/src/Security/CWE/CWE-764/UnreleasedLock.ql | 2 +- cpp/ql/src/Security/CWE/CWE-807/TaintedCondition.ql | 2 +- .../CWE/CWE-835/InfiniteLoopWithUnsatisfiableExitCondition.ql | 2 +- csharp/ql/src/Bad Practices/UseOfHtmlInputHidden.ql | 2 +- csharp/ql/src/Configuration/EmptyPasswordInConfigurationFile.ql | 2 +- csharp/ql/src/Configuration/PasswordInConfigurationFile.ql | 2 +- csharp/ql/src/Input Validation/UseOfFileUpload.ql | 2 +- csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransform.ql | 2 +- csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransformLambda.ql | 2 +- csharp/ql/src/Security Features/CWE-011/ASPNetDebug.ql | 2 +- .../ql/src/Security Features/CWE-016/ASPNetMaxRequestLength.ql | 2 +- .../src/Security Features/CWE-016/ASPNetPagesValidateRequest.ql | 2 +- .../Security Features/CWE-016/ASPNetRequestValidationMode.ql | 2 +- csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql | 2 +- .../src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql | 2 +- csharp/ql/src/Security Features/CWE-022/TaintedPath.ql | 2 +- csharp/ql/src/Security Features/CWE-022/ZipSlip.ql | 2 +- csharp/ql/src/Security Features/CWE-078/CommandInjection.ql | 2 +- .../ql/src/Security Features/CWE-078/StoredCommandInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-079/StoredXSS.ql | 2 +- csharp/ql/src/Security Features/CWE-079/XSS.ql | 2 +- .../ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-089/SqlInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-090/LDAPInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-091/XMLInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-094/CodeInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-099/ResourceInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-112/MissingXMLValidation.ql | 2 +- .../ql/src/Security Features/CWE-114/AssemblyPathInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-117/LogForging.ql | 2 +- .../src/Security Features/CWE-119/LocalUnvalidatedArithmetic.ql | 2 +- .../src/Security Features/CWE-134/UncontrolledFormatString.ql | 2 +- .../src/Security Features/CWE-201/ExposureInTransmittedData.ql | 2 +- .../Security Features/CWE-209/ExceptionInformationExposure.ql | 2 +- .../CWE-248/MissingASPNETGlobalErrorHandler.ql | 2 +- csharp/ql/src/Security Features/CWE-312/CleartextStorage.ql | 2 +- .../ql/src/Security Features/CWE-321/HardcodedEncryptionKey.ql | 2 +- .../CWE-321/HardcodedSymmetricEncryptionKey.ql | 2 +- csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql | 2 +- .../ql/src/Security Features/CWE-327/InsecureSQLConnection.ql | 2 +- .../CWE-352/MissingAntiForgeryTokenValidation.ql | 2 +- .../Security Features/CWE-359/ExposureOfPrivateInformation.ql | 2 +- csharp/ql/src/Security Features/CWE-384/AbandonSession.ql | 2 +- csharp/ql/src/Security Features/CWE-451/MissingXFrameOptions.ql | 2 +- csharp/ql/src/Security Features/CWE-502/DeserializedDelegate.ql | 2 +- .../ql/src/Security Features/CWE-502/UnsafeDeserialization.ql | 2 +- .../CWE-502/UnsafeDeserializationUntrustedInput.ql | 2 +- .../ql/src/Security Features/CWE-548/ASPNetDirectoryListing.ql | 2 +- csharp/ql/src/Security Features/CWE-601/UrlRedirect.ql | 2 +- .../src/Security Features/CWE-611/UntrustedDataInsecureXml.ql | 2 +- csharp/ql/src/Security Features/CWE-611/UseXmlSecureResolver.ql | 2 +- csharp/ql/src/Security Features/CWE-614/RequireSSL.ql | 2 +- csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-643/XPathInjection.ql | 2 +- csharp/ql/src/Security Features/CWE-730/ReDoS.ql | 2 +- csharp/ql/src/Security Features/CWE-730/RegexInjection.ql | 2 +- .../src/Security Features/CWE-798/HardcodedConnectionString.ql | 2 +- csharp/ql/src/Security Features/CWE-798/HardcodedCredentials.ql | 2 +- csharp/ql/src/Security Features/CWE-807/ConditionalBypass.ql | 2 +- .../ql/src/Security Features/CWE-838/InappropriateEncoding.ql | 2 +- csharp/ql/src/Security Features/CookieWithOverlyBroadDomain.ql | 2 +- csharp/ql/src/Security Features/CookieWithOverlyBroadPath.ql | 2 +- csharp/ql/src/Security Features/Encryption using ECB.ql | 2 +- csharp/ql/src/Security Features/HeaderCheckingDisabled.ql | 2 +- csharp/ql/src/Security Features/InadequateRSAPadding.ql | 2 +- csharp/ql/src/Security Features/InsecureRandomness.ql | 2 +- csharp/ql/src/Security Features/InsufficientKeySize.ql | 2 +- csharp/ql/src/Security Features/PersistentCookie.ql | 2 +- csharp/ql/src/Security Features/WeakEncryption.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql | 2 +- java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql | 2 +- java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql | 2 +- java/ql/src/Likely Bugs/Arithmetic/RandomUsedOnce.ql | 2 +- java/ql/src/Likely Bugs/Concurrency/UnreleasedLock.ql | 2 +- java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql | 2 +- java/ql/src/Security/CWE/CWE-022/TaintedPath.ql | 2 +- java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-022/ZipSlip.ql | 2 +- java/ql/src/Security/CWE/CWE-078/ExecRelative.ql | 2 +- java/ql/src/Security/CWE/CWE-078/ExecTainted.ql | 2 +- java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-078/ExecUnescaped.ql | 2 +- java/ql/src/Security/CWE/CWE-079/XSS.ql | 2 +- java/ql/src/Security/CWE/CWE-079/XSSLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-089/SqlTainted.ql | 2 +- java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-089/SqlUnescaped.ql | 2 +- java/ql/src/Security/CWE/CWE-090/LdapInjection.ql | 2 +- java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql | 2 +- java/ql/src/Security/CWE/CWE-094/JexlInjection.ql | 2 +- java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql | 2 +- java/ql/src/Security/CWE/CWE-113/ResponseSplitting.ql | 2 +- java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql | 2 +- .../CWE/CWE-129/ImproperValidationOfArrayConstruction.ql | 2 +- .../ImproperValidationOfArrayConstructionCodeSpecified.ql | 2 +- .../CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql | 2 +- .../src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql | 2 +- .../CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql | 2 +- .../Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql | 2 +- .../Security/CWE/CWE-134/ExternallyControlledFormatString.ql | 2 +- .../CWE/CWE-134/ExternallyControlledFormatStringLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql | 2 +- java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql | 2 +- java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql | 2 +- java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql | 2 +- java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql | 2 +- java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql | 2 +- java/ql/src/Security/CWE/CWE-312/CleartextStorageClass.ql | 2 +- java/ql/src/Security/CWE/CWE-312/CleartextStorageCookie.ql | 2 +- java/ql/src/Security/CWE/CWE-312/CleartextStorageProperties.ql | 2 +- java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql | 2 +- java/ql/src/Security/CWE/CWE-319/UseSSL.ql | 2 +- java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql | 2 +- java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql | 2 +- java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql | 2 +- java/ql/src/Security/CWE/CWE-335/PredictableSeed.ql | 2 +- java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.ql | 2 +- java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql | 2 +- java/ql/src/Security/CWE/CWE-367/TOCTOURace.ql | 2 +- java/ql/src/Security/CWE/CWE-421/SocketAuthRace.ql | 2 +- java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.ql | 2 +- java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql | 2 +- java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql | 2 +- java/ql/src/Security/CWE/CWE-611/XXE.ql | 2 +- java/ql/src/Security/CWE/CWE-614/InsecureCookie.ql | 2 +- java/ql/src/Security/CWE/CWE-643/XPathInjection.ql | 2 +- java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql | 2 +- java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql | 2 +- .../ql/src/Security/CWE/CWE-732/ReadingFromWorldWritableFile.ql | 2 +- java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql | 2 +- .../src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql | 2 +- .../src/Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql | 2 +- java/ql/src/Security/CWE/CWE-798/HardcodedPasswordField.ql | 2 +- java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql | 2 +- java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql | 2 +- .../ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql | 2 +- java/ql/src/Security/CWE/CWE-833/LockOrderInconsistency.ql | 2 +- java/ql/src/Security/CWE/CWE-835/InfiniteLoop.ql | 2 +- javascript/ql/src/AngularJS/DisablingSce.ql | 2 +- javascript/ql/src/AngularJS/DoubleCompilation.ql | 2 +- javascript/ql/src/AngularJS/InsecureUrlWhitelist.ql | 2 +- javascript/ql/src/DOM/TargetBlank.ql | 2 +- javascript/ql/src/Electron/AllowRunningInsecureContent.ql | 2 +- javascript/ql/src/Electron/DisablingWebSecurity.ql | 2 +- javascript/ql/src/Electron/EnablingNodeIntegration.ql | 2 +- javascript/ql/src/Performance/PolynomialReDoS.ql | 2 +- javascript/ql/src/Performance/ReDoS.ql | 2 +- javascript/ql/src/RegExp/IdentityReplacement.ql | 2 +- javascript/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql | 2 +- javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql | 2 +- .../src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql | 2 +- javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql | 2 +- javascript/ql/src/Security/CWE-020/MissingRegExpAnchor.ql | 2 +- .../ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql | 2 +- .../ql/src/Security/CWE-020/UselessRegExpCharacterEscape.ql | 2 +- javascript/ql/src/Security/CWE-022/TaintedPath.ql | 2 +- javascript/ql/src/Security/CWE-022/ZipSlip.ql | 2 +- javascript/ql/src/Security/CWE-073/TemplateObjectInjection.ql | 2 +- javascript/ql/src/Security/CWE-078/CommandInjection.ql | 2 +- javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql | 2 +- .../Security/CWE-078/ShellCommandInjectionFromEnvironment.ql | 2 +- .../ql/src/Security/CWE-078/UnsafeShellCommandConstruction.ql | 2 +- javascript/ql/src/Security/CWE-078/UselessUseOfCat.ql | 2 +- javascript/ql/src/Security/CWE-079/ExceptionXss.ql | 2 +- javascript/ql/src/Security/CWE-079/ReflectedXss.ql | 2 +- javascript/ql/src/Security/CWE-079/StoredXss.ql | 2 +- javascript/ql/src/Security/CWE-079/UnsafeHtmlConstruction.ql | 2 +- javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql | 2 +- javascript/ql/src/Security/CWE-079/Xss.ql | 2 +- javascript/ql/src/Security/CWE-079/XssThroughDom.ql | 2 +- javascript/ql/src/Security/CWE-089/SqlInjection.ql | 2 +- javascript/ql/src/Security/CWE-094/CodeInjection.ql | 2 +- javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql | 2 +- javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql | 2 +- javascript/ql/src/Security/CWE-116/DoubleEscaping.ql | 2 +- .../src/Security/CWE-116/IncompleteHtmlAttributeSanitization.ql | 2 +- .../Security/CWE-116/IncompleteMultiCharacterSanitization.ql | 2 +- javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql | 2 +- javascript/ql/src/Security/CWE-116/UnsafeHtmlExpansion.ql | 2 +- javascript/ql/src/Security/CWE-117/LogInjection.ql | 2 +- javascript/ql/src/Security/CWE-134/TaintedFormatString.ql | 2 +- javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql | 2 +- javascript/ql/src/Security/CWE-200/PrivateFileExposure.ql | 2 +- javascript/ql/src/Security/CWE-201/PostMessageStar.ql | 2 +- javascript/ql/src/Security/CWE-209/StackTraceExposure.ql | 2 +- .../ql/src/Security/CWE-295/DisablingCertificateValidation.ql | 2 +- javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql | 2 +- javascript/ql/src/Security/CWE-312/CleartextLogging.ql | 2 +- javascript/ql/src/Security/CWE-312/CleartextStorage.ql | 2 +- .../ql/src/Security/CWE-313/PasswordInConfigurationFile.ql | 2 +- javascript/ql/src/Security/CWE-327/BadRandomness.ql | 2 +- javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql | 2 +- javascript/ql/src/Security/CWE-338/InsecureRandomness.ql | 2 +- .../src/Security/CWE-346/CorsMisconfigurationForCredentials.ql | 2 +- javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql | 2 +- .../ql/src/Security/CWE-400/DeepObjectResourceExhaustion.ql | 2 +- javascript/ql/src/Security/CWE-400/RemotePropertyInjection.ql | 2 +- javascript/ql/src/Security/CWE-451/MissingXFrameOptions.ql | 2 +- javascript/ql/src/Security/CWE-502/UnsafeDeserialization.ql | 2 +- .../ql/src/Security/CWE-506/HardcodedDataInterpretedAsCode.ql | 2 +- javascript/ql/src/Security/CWE-601/ClientSideUrlRedirect.ql | 2 +- javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.ql | 2 +- javascript/ql/src/Security/CWE-611/Xxe.ql | 2 +- .../Security/CWE-640/HostHeaderPoisoningInEmailGeneration.ql | 2 +- javascript/ql/src/Security/CWE-643/XpathInjection.ql | 2 +- javascript/ql/src/Security/CWE-730/RegExpInjection.ql | 2 +- javascript/ql/src/Security/CWE-730/ServerCrash.ql | 2 +- .../ql/src/Security/CWE-754/UnvalidatedDynamicMethodCall.ql | 2 +- javascript/ql/src/Security/CWE-770/MissingRateLimiting.ql | 2 +- javascript/ql/src/Security/CWE-776/XmlBomb.ql | 2 +- javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql | 2 +- javascript/ql/src/Security/CWE-807/ConditionalBypass.ql | 2 +- .../ql/src/Security/CWE-807/DifferentKindsComparisonBypass.ql | 2 +- javascript/ql/src/Security/CWE-829/InsecureDownload.ql | 2 +- javascript/ql/src/Security/CWE-834/LoopBoundInjection.ql | 2 +- .../Security/CWE-843/TypeConfusionThroughParameterTampering.ql | 2 +- javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql | 2 +- .../ql/src/Security/CWE-915/PrototypePollutingAssignment.ql | 2 +- .../ql/src/Security/CWE-915/PrototypePollutingFunction.ql | 2 +- .../ql/src/Security/CWE-915/PrototypePollutingMergeCall.ql | 2 +- javascript/ql/src/Security/CWE-916/InsufficientPasswordHash.ql | 2 +- javascript/ql/src/Security/CWE-918/RequestForgery.ql | 2 +- python/ql/src/Expressions/UseofInput.ql | 2 +- python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql | 2 +- .../Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql | 2 +- python/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql | 2 +- .../src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql | 2 +- python/ql/src/Security/CWE-022/PathInjection.ql | 2 +- python/ql/src/Security/CWE-022/TarSlip.ql | 2 +- python/ql/src/Security/CWE-078/CommandInjection.ql | 2 +- python/ql/src/Security/CWE-079/Jinja2WithoutEscaping.ql | 2 +- python/ql/src/Security/CWE-079/ReflectedXss.ql | 2 +- python/ql/src/Security/CWE-089/SqlInjection.ql | 2 +- python/ql/src/Security/CWE-094/CodeInjection.ql | 2 +- python/ql/src/Security/CWE-209/StackTraceExposure.ql | 2 +- python/ql/src/Security/CWE-215/FlaskDebug.ql | 2 +- python/ql/src/Security/CWE-295/MissingHostKeyValidation.ql | 2 +- python/ql/src/Security/CWE-295/RequestWithoutValidation.ql | 2 +- python/ql/src/Security/CWE-312/CleartextLogging.ql | 2 +- python/ql/src/Security/CWE-312/CleartextStorage.ql | 2 +- python/ql/src/Security/CWE-326/WeakCryptoKey.ql | 2 +- python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql | 2 +- python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql | 2 +- python/ql/src/Security/CWE-327/InsecureProtocol.ql | 2 +- python/ql/src/Security/CWE-327/WeakSensitiveDataHashing.ql | 2 +- python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql | 2 +- python/ql/src/Security/CWE-502/UnsafeDeserialization.ql | 2 +- python/ql/src/Security/CWE-601/UrlRedirect.ql | 2 +- python/ql/src/Security/CWE-732/WeakFilePermissions.ql | 2 +- python/ql/src/Security/CWE-798/HardcodedCredentials.ql | 2 +- 343 files changed, 343 insertions(+), 343 deletions(-) diff --git a/cpp/ql/src/Best Practices/Likely Errors/OffsetUseBeforeRangeCheck.ql b/cpp/ql/src/Best Practices/Likely Errors/OffsetUseBeforeRangeCheck.ql index ecf739b91be3..c8bf38427730 100644 --- a/cpp/ql/src/Best Practices/Likely Errors/OffsetUseBeforeRangeCheck.ql +++ b/cpp/ql/src/Best Practices/Likely Errors/OffsetUseBeforeRangeCheck.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/offset-use-before-range-check * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.2 * @precision medium * @tags reliability * security diff --git a/cpp/ql/src/Critical/DescriptorMayNotBeClosed.ql b/cpp/ql/src/Critical/DescriptorMayNotBeClosed.ql index 24cd9dc16fd7..3ef487fbec29 100644 --- a/cpp/ql/src/Critical/DescriptorMayNotBeClosed.ql +++ b/cpp/ql/src/Critical/DescriptorMayNotBeClosed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/descriptor-may-not-be-closed * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @tags efficiency * security * external/cwe/cwe-775 diff --git a/cpp/ql/src/Critical/DescriptorNeverClosed.ql b/cpp/ql/src/Critical/DescriptorNeverClosed.ql index 331d787be62e..85e41ad19280 100644 --- a/cpp/ql/src/Critical/DescriptorNeverClosed.ql +++ b/cpp/ql/src/Critical/DescriptorNeverClosed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/descriptor-never-closed * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @tags efficiency * security * external/cwe/cwe-775 diff --git a/cpp/ql/src/Critical/FileMayNotBeClosed.ql b/cpp/ql/src/Critical/FileMayNotBeClosed.ql index 395bac61f0b9..af38b437778b 100644 --- a/cpp/ql/src/Critical/FileMayNotBeClosed.ql +++ b/cpp/ql/src/Critical/FileMayNotBeClosed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/file-may-not-be-closed * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @tags efficiency * security * external/cwe/cwe-775 diff --git a/cpp/ql/src/Critical/FileNeverClosed.ql b/cpp/ql/src/Critical/FileNeverClosed.ql index eeeed80af924..b9e71978359b 100644 --- a/cpp/ql/src/Critical/FileNeverClosed.ql +++ b/cpp/ql/src/Critical/FileNeverClosed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/file-never-closed * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @tags efficiency * security * external/cwe/cwe-775 diff --git a/cpp/ql/src/Critical/GlobalUseBeforeInit.ql b/cpp/ql/src/Critical/GlobalUseBeforeInit.ql index 7abfaeb9ebeb..6c3435eeba91 100644 --- a/cpp/ql/src/Critical/GlobalUseBeforeInit.ql +++ b/cpp/ql/src/Critical/GlobalUseBeforeInit.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/global-use-before-init * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.8 * @tags reliability * security * external/cwe/cwe-457 diff --git a/cpp/ql/src/Critical/InconsistentNullnessTesting.ql b/cpp/ql/src/Critical/InconsistentNullnessTesting.ql index b356c64b3fc1..da64be1fdb93 100644 --- a/cpp/ql/src/Critical/InconsistentNullnessTesting.ql +++ b/cpp/ql/src/Critical/InconsistentNullnessTesting.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/inconsistent-nullness-testing * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @tags reliability * security * external/cwe/cwe-476 diff --git a/cpp/ql/src/Critical/InitialisationNotRun.ql b/cpp/ql/src/Critical/InitialisationNotRun.ql index d4bb90962f78..ba575c55921b 100644 --- a/cpp/ql/src/Critical/InitialisationNotRun.ql +++ b/cpp/ql/src/Critical/InitialisationNotRun.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/initialization-not-run * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @tags reliability * security * external/cwe/cwe-456 diff --git a/cpp/ql/src/Critical/LateNegativeTest.ql b/cpp/ql/src/Critical/LateNegativeTest.ql index 98d1d7cba2bc..5de36fcc5a98 100644 --- a/cpp/ql/src/Critical/LateNegativeTest.ql +++ b/cpp/ql/src/Critical/LateNegativeTest.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/late-negative-test * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @tags reliability * security * external/cwe/cwe-823 diff --git a/cpp/ql/src/Critical/MemoryMayNotBeFreed.ql b/cpp/ql/src/Critical/MemoryMayNotBeFreed.ql index 3726117615e9..51467b52be87 100644 --- a/cpp/ql/src/Critical/MemoryMayNotBeFreed.ql +++ b/cpp/ql/src/Critical/MemoryMayNotBeFreed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/memory-may-not-be-freed * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @tags efficiency * security * external/cwe/cwe-401 diff --git a/cpp/ql/src/Critical/MemoryNeverFreed.ql b/cpp/ql/src/Critical/MemoryNeverFreed.ql index 89ca2245d7f5..e9593e9d7494 100644 --- a/cpp/ql/src/Critical/MemoryNeverFreed.ql +++ b/cpp/ql/src/Critical/MemoryNeverFreed.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/memory-never-freed * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @tags efficiency * security * external/cwe/cwe-401 diff --git a/cpp/ql/src/Critical/MissingNegativityTest.ql b/cpp/ql/src/Critical/MissingNegativityTest.ql index 937510afec67..a4409f2dabfd 100644 --- a/cpp/ql/src/Critical/MissingNegativityTest.ql +++ b/cpp/ql/src/Critical/MissingNegativityTest.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/missing-negativity-test * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @tags reliability * security * external/cwe/cwe-823 diff --git a/cpp/ql/src/Critical/MissingNullTest.ql b/cpp/ql/src/Critical/MissingNullTest.ql index dcd45f2baf12..b50d06a8dd1c 100644 --- a/cpp/ql/src/Critical/MissingNullTest.ql +++ b/cpp/ql/src/Critical/MissingNullTest.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/missing-null-test * @problem.severity recommendation - * @security-severity 3.6 + * @security-severity 7.5 * @tags reliability * security * external/cwe/cwe-476 diff --git a/cpp/ql/src/Critical/NewFreeMismatch.ql b/cpp/ql/src/Critical/NewFreeMismatch.ql index 09356762e43e..19b9b197214a 100644 --- a/cpp/ql/src/Critical/NewFreeMismatch.ql +++ b/cpp/ql/src/Critical/NewFreeMismatch.ql @@ -3,7 +3,7 @@ * @description An object that was allocated with 'malloc' or 'new' is being freed using a mismatching 'free' or 'delete'. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id cpp/new-free-mismatch * @tags reliability diff --git a/cpp/ql/src/Critical/OverflowCalculated.ql b/cpp/ql/src/Critical/OverflowCalculated.ql index 01cb7b3eaa3c..d8a08cc6a69f 100644 --- a/cpp/ql/src/Critical/OverflowCalculated.ql +++ b/cpp/ql/src/Critical/OverflowCalculated.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/overflow-calculated * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @tags reliability * security * external/cwe/cwe-131 diff --git a/cpp/ql/src/Critical/OverflowDestination.ql b/cpp/ql/src/Critical/OverflowDestination.ql index c89ec46cb422..94d460016606 100644 --- a/cpp/ql/src/Critical/OverflowDestination.ql +++ b/cpp/ql/src/Critical/OverflowDestination.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/overflow-destination * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision low * @tags reliability * security diff --git a/cpp/ql/src/Critical/OverflowStatic.ql b/cpp/ql/src/Critical/OverflowStatic.ql index d287f43b1c80..7c447c12323d 100644 --- a/cpp/ql/src/Critical/OverflowStatic.ql +++ b/cpp/ql/src/Critical/OverflowStatic.ql @@ -4,7 +4,7 @@ * may result in a buffer overflow. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision medium * @id cpp/static-buffer-overflow * @tags reliability diff --git a/cpp/ql/src/Critical/ReturnStackAllocatedObject.ql b/cpp/ql/src/Critical/ReturnStackAllocatedObject.ql index 72ff93e24ab3..40082ad5d9c9 100644 --- a/cpp/ql/src/Critical/ReturnStackAllocatedObject.ql +++ b/cpp/ql/src/Critical/ReturnStackAllocatedObject.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/return-stack-allocated-object * @problem.severity warning - * @security-severity 2.9 + * @security-severity 2.1 * @tags reliability * security * external/cwe/cwe-562 diff --git a/cpp/ql/src/Critical/SizeCheck.ql b/cpp/ql/src/Critical/SizeCheck.ql index 7fff35cf717f..e7a00ea3621d 100644 --- a/cpp/ql/src/Critical/SizeCheck.ql +++ b/cpp/ql/src/Critical/SizeCheck.ql @@ -4,7 +4,7 @@ * an instance of the type of the pointer may result in a buffer overflow * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 8.1 * @precision medium * @id cpp/allocation-too-small * @tags reliability diff --git a/cpp/ql/src/Critical/SizeCheck2.ql b/cpp/ql/src/Critical/SizeCheck2.ql index f9a09b66352c..eb3aec9a5fe5 100644 --- a/cpp/ql/src/Critical/SizeCheck2.ql +++ b/cpp/ql/src/Critical/SizeCheck2.ql @@ -4,7 +4,7 @@ * multiple instances of the type of the pointer may result in a buffer overflow * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 8.1 * @precision medium * @id cpp/suspicious-allocation-size * @tags reliability diff --git a/cpp/ql/src/Critical/UseAfterFree.ql b/cpp/ql/src/Critical/UseAfterFree.ql index 1b714267ef15..d770a42b3c2a 100644 --- a/cpp/ql/src/Critical/UseAfterFree.ql +++ b/cpp/ql/src/Critical/UseAfterFree.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/use-after-free * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.3 * @tags reliability * security * external/cwe/cwe-416 diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql b/cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql index 1037e4d90634..5a7389205f90 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/BadAdditionOverflowCheck.ql @@ -6,7 +6,7 @@ * to a larger type. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.1 * @precision very-high * @id cpp/bad-addition-overflow-check * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql b/cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql index 941fecc453da..03ad085b6d33 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/IntMultToLong.ql @@ -4,7 +4,7 @@ * be a sign that the result can overflow the type converted from. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision high * @id cpp/integer-multiplication-cast-to-long * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql b/cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql index 6da994e67292..7911049599a2 100644 --- a/cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql +++ b/cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql @@ -5,7 +5,7 @@ * unsigned integer values. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision high * @id cpp/signed-overflow-check * @tags correctness diff --git a/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql b/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql index 19e50a3f368a..9032919da443 100644 --- a/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql +++ b/cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql @@ -6,7 +6,7 @@ * use the width of the base type, leading to misaligned reads. * @kind path-problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id cpp/upcast-array-pointer-arithmetic * @tags correctness diff --git a/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql b/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql index f480501f7baf..f00dfa2213b4 100644 --- a/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql +++ b/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql @@ -6,7 +6,7 @@ * from an untrusted source, this can be used for exploits. * @kind problem * @problem.severity recommendation - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id cpp/non-constant-format * @tags maintainability diff --git a/cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql b/cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql index 78427655c22b..7da8db7f226e 100644 --- a/cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql +++ b/cpp/ql/src/Likely Bugs/Format/SnprintfOverflow.ql @@ -3,7 +3,7 @@ * @description Using the return value from snprintf without proper checks can cause overflow. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision high * @id cpp/overflowing-snprintf * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql index 1147c6c66a1f..cc3510ee5eb7 100644 --- a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql +++ b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql @@ -4,7 +4,7 @@ * a source of security issues. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 5.0 * @precision high * @id cpp/wrong-number-format-arguments * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql index d1624e484fed..a7306e401e4a 100644 --- a/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql +++ b/cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql @@ -4,7 +4,7 @@ * behavior. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id cpp/wrong-type-format-argument * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.ql b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.ql index 1b20aa1b224e..30664869adc8 100644 --- a/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.ql +++ b/cpp/ql/src/Likely Bugs/Likely Typos/IncorrectNotOperatorUsage.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/incorrect-not-operator-usage * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision medium * @tags security * external/cwe/cwe-480 diff --git a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql index 1af4ba839b5d..61d7a266d860 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql @@ -3,7 +3,7 @@ * @description Using alloca in a loop can lead to a stack overflow * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id cpp/alloca-in-loop * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Memory Management/ImproperNullTermination.ql b/cpp/ql/src/Likely Bugs/Memory Management/ImproperNullTermination.ql index c72086060fde..7f1541f7ea8f 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/ImproperNullTermination.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/ImproperNullTermination.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/improper-null-termination * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @tags security * external/cwe/cwe-170 * external/cwe/cwe-665 diff --git a/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql b/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql index 3035d3ba2ea3..e11d114d1fb6 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql @@ -4,7 +4,7 @@ * on undefined behavior and may lead to memory corruption. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 2.1 * @precision high * @id cpp/pointer-overflow-check * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.ql b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.ql index 4a9fc949f898..8e7bc5bfcf45 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/StrncpyFlippedArgs.ql @@ -4,7 +4,7 @@ * as the third argument may result in a buffer overflow. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision medium * @id cpp/bad-strncpy-size * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql index 28742629b370..644c48622a2b 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.ql @@ -3,7 +3,7 @@ * @description Calling 'strncat' with an incorrect size argument may result in a buffer overflow. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision medium * @id cpp/unsafe-strncat * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousSizeof.ql b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousSizeof.ql index 9198cd0497ec..a80af562bda7 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousSizeof.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousSizeof.ql @@ -5,7 +5,7 @@ * the machine pointer size. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id cpp/suspicious-sizeof * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql b/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql index 94e230e8838c..5861167659f8 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/uninitialized-local * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @tags security * external/cwe/cwe-665 diff --git a/cpp/ql/src/Likely Bugs/Memory Management/UnsafeUseOfStrcat.ql b/cpp/ql/src/Likely Bugs/Memory Management/UnsafeUseOfStrcat.ql index 2eb8d0b40604..d0b0f7f1e71b 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/UnsafeUseOfStrcat.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/UnsafeUseOfStrcat.ql @@ -4,7 +4,7 @@ * may result in a buffer overflow * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id cpp/unsafe-strcat * @tags reliability diff --git a/cpp/ql/src/Likely Bugs/OO/SelfAssignmentCheck.ql b/cpp/ql/src/Likely Bugs/OO/SelfAssignmentCheck.ql index 2702cbdcea76..9ddf445f4bfa 100644 --- a/cpp/ql/src/Likely Bugs/OO/SelfAssignmentCheck.ql +++ b/cpp/ql/src/Likely Bugs/OO/SelfAssignmentCheck.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/self-assignment-check * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.0 * @tags reliability * security * external/cwe/cwe-826 diff --git a/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql b/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql index 746a2761e493..04325e8497e7 100644 --- a/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql +++ b/cpp/ql/src/Likely Bugs/OO/UnsafeUseOfThis.ql @@ -6,7 +6,7 @@ * @kind path-problem * @id cpp/unsafe-use-of-this * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision very-high * @tags correctness * language-features diff --git a/cpp/ql/src/Likely Bugs/Underspecified Functions/TooFewArguments.ql b/cpp/ql/src/Likely Bugs/Underspecified Functions/TooFewArguments.ql index 3196143c5d11..bc53015c9056 100644 --- a/cpp/ql/src/Likely Bugs/Underspecified Functions/TooFewArguments.ql +++ b/cpp/ql/src/Likely Bugs/Underspecified Functions/TooFewArguments.ql @@ -7,7 +7,7 @@ * undefined data. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 5.0 * @precision very-high * @id cpp/too-few-arguments * @tags correctness diff --git a/cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql b/cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql index 77c4f149cac0..33c319722958 100644 --- a/cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql +++ b/cpp/ql/src/Security/CWE/CWE-014/MemsetMayBeDeleted.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/memset-may-be-deleted * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.8 * @precision high * @tags security * external/cwe/cwe-14 diff --git a/cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql b/cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql index 0396d5c7bb01..47a0bf14b7fa 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql +++ b/cpp/ql/src/Security/CWE/CWE-020/IRUntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/cpp/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql b/cpp/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql index 196fe57f74ba..b85a5b26a7f5 100644 --- a/cpp/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql +++ b/cpp/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql b/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql index c96b6f6dc5b1..5e22506d03a5 100644 --- a/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql +++ b/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql @@ -4,7 +4,7 @@ * attacker to access unexpected resources. * @kind path-problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id cpp/path-injection * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql b/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql index d3020406f156..5f516eec83bf 100644 --- a/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql @@ -5,7 +5,7 @@ * to command injection. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision low * @id cpp/command-line-injection * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql b/cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql index 0b56e9723206..bb38609927e2 100644 --- a/cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql +++ b/cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql @@ -4,7 +4,7 @@ * allows for a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id cpp/cgi-xss * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql b/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql index 1e4536f09420..a3f935170d77 100644 --- a/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql @@ -5,7 +5,7 @@ * to SQL Injection. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id cpp/sql-injection * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql index 3aba72ed7417..e75f62b0eb77 100644 --- a/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql +++ b/cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql @@ -5,7 +5,7 @@ * commands. * @kind path-problem * @problem.severity warning - * @security-severity 6.0 + * @security-severity 8.2 * @precision medium * @id cpp/uncontrolled-process-operation * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-119/OverflowBuffer.ql b/cpp/ql/src/Security/CWE/CWE-119/OverflowBuffer.ql index c61498ac2e0b..1c903081baf2 100644 --- a/cpp/ql/src/Security/CWE/CWE-119/OverflowBuffer.ql +++ b/cpp/ql/src/Security/CWE/CWE-119/OverflowBuffer.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/overflow-buffer * @problem.severity recommendation - * @security-severity 10.0 + * @security-severity 9.3 * @tags security * external/cwe/cwe-119 * external/cwe/cwe-121 diff --git a/cpp/ql/src/Security/CWE/CWE-120/BadlyBoundedWrite.ql b/cpp/ql/src/Security/CWE/CWE-120/BadlyBoundedWrite.ql index 01d8d8db4e2b..247606c683de 100644 --- a/cpp/ql/src/Security/CWE/CWE-120/BadlyBoundedWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-120/BadlyBoundedWrite.ql @@ -5,7 +5,7 @@ * overflow. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.3 * @precision high * @id cpp/badly-bounded-write * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-120/OverrunWrite.ql b/cpp/ql/src/Security/CWE/CWE-120/OverrunWrite.ql index 6832561e10c1..ac4144d1c6f6 100644 --- a/cpp/ql/src/Security/CWE/CWE-120/OverrunWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-120/OverrunWrite.ql @@ -4,7 +4,7 @@ * of data written may overflow. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.3 * @precision medium * @id cpp/overrunning-write * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-120/OverrunWriteFloat.ql b/cpp/ql/src/Security/CWE/CWE-120/OverrunWriteFloat.ql index 73ef5e62fb25..27adab9b06c9 100644 --- a/cpp/ql/src/Security/CWE/CWE-120/OverrunWriteFloat.ql +++ b/cpp/ql/src/Security/CWE/CWE-120/OverrunWriteFloat.ql @@ -5,7 +5,7 @@ * take extreme values. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.3 * @precision medium * @id cpp/overrunning-write-with-float * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql b/cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql index 656b52b03bf4..b9922da9c758 100644 --- a/cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql @@ -4,7 +4,7 @@ * of data written may overflow. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.3 * @precision medium * @id cpp/unbounded-write * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql b/cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql index 3dacc443a747..842798102bd8 100644 --- a/cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql +++ b/cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql @@ -5,7 +5,7 @@ * a specific value to terminate the argument list. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id cpp/unterminated-variadic-call * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql index 59498017b1ff..0621def4d98d 100644 --- a/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql +++ b/cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/unclear-array-index-validation * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @tags security * external/cwe/cwe-129 */ diff --git a/cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql b/cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql index b31213b09f30..1780c2a01998 100644 --- a/cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql +++ b/cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.ql @@ -5,7 +5,7 @@ * terminator can cause a buffer overrun. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cpp/no-space-for-terminator * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql index 0593679c3f52..f24510bba056 100644 --- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql +++ b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql @@ -5,7 +5,7 @@ * or data representation problems. * @kind path-problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id cpp/tainted-format-string * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql index 67853b9e3617..d2f5243d4a48 100644 --- a/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql +++ b/cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatStringThroughGlobalVar.ql @@ -5,7 +5,7 @@ * or data representation problems. * @kind path-problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id cpp/tainted-format-string-through-global * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index ad4d0389f0c0..e3634734b5e4 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -4,7 +4,7 @@ * not validated can cause overflows. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.6 * @precision low * @id cpp/tainted-arithmetic * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index 359ac7a0d1a0..fd486efdab09 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -4,7 +4,7 @@ * validated can cause overflows. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.6 * @precision medium * @id cpp/uncontrolled-arithmetic * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql index 9addbab5c1c9..35668953acc0 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/arithmetic-with-extreme-values * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.6 * @precision low * @tags security * reliability diff --git a/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql b/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql index 1ec3c6554fea..6636d100746c 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql @@ -5,7 +5,7 @@ * @id cpp/comparison-with-wider-type * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @tags reliability * security diff --git a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql index 7e4880ffca6f..bc0dff582448 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/integer-overflow-tainted * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision low * @tags security * external/cwe/cwe-190 diff --git a/cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql b/cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql index 765a2519a383..585875798cc3 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql @@ -4,7 +4,7 @@ * user can result in integer overflow. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.1 * @precision medium * @id cpp/uncontrolled-allocation-size * @tags reliability diff --git a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql index ddd7bf3430fb..5be71472c920 100644 --- a/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql +++ b/cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/unsigned-difference-expression-compared-zero * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @tags security * correctness diff --git a/cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql b/cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql index bde1e265690a..67ba5b0c45b3 100644 --- a/cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql +++ b/cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql @@ -4,7 +4,7 @@ * @kind problem * @id cpp/hresult-boolean-conversion * @problem.severity error - * @security-severity 4.2 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-253 diff --git a/cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql b/cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql index 7cdd5c34b8b9..814c6aff21bb 100644 --- a/cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql +++ b/cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql @@ -5,7 +5,7 @@ * vulnerable to spoofing attacks. * @kind path-problem * @problem.severity warning - * @security-severity 5.8 + * @security-severity 8.1 * @precision medium * @id cpp/user-controlled-bypass * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql b/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql index 6785700d0771..696c5764fcd6 100644 --- a/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql @@ -4,7 +4,7 @@ * to an attacker. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.5 * @precision medium * @id cpp/cleartext-storage-buffer * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql b/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql index fcf2a00435ef..aa90ff9567c8 100644 --- a/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql +++ b/cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql @@ -4,7 +4,7 @@ * to an attacker. * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id cpp/cleartext-storage-file * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql b/cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql index ccb67f54d3a0..bb9135a92ff8 100644 --- a/cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql +++ b/cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql @@ -4,7 +4,7 @@ * database can expose it to an attacker. * @kind path-problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id cpp/cleartext-storage-database * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index 848adfd7adcc..aef114bcc4e4 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -4,7 +4,7 @@ * an attacker to compromise security. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id cpp/weak-cryptographic-algorithm * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-327/OpenSslHeartbleed.ql b/cpp/ql/src/Security/CWE/CWE-327/OpenSslHeartbleed.ql index 5ee196994ac6..38067ae200c2 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/OpenSslHeartbleed.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/OpenSslHeartbleed.ql @@ -4,7 +4,7 @@ * attackers to retrieve portions of memory. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision very-high * @id cpp/openssl-heartbleed * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql index 7d19e323f2bf..f5bed0bee642 100644 --- a/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql +++ b/cpp/ql/src/Security/CWE/CWE-367/TOCTOUFilesystemRace.ql @@ -5,7 +5,7 @@ * the two operations. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.7 * @precision medium * @id cpp/toctou-race-condition * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.ql b/cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.ql index 73e0d8794ade..7c540e9d3133 100644 --- a/cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.ql +++ b/cpp/ql/src/Security/CWE/CWE-428/UnsafeCreateProcessCall.ql @@ -4,7 +4,7 @@ * @id cpp/unsafe-create-process-call * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @msrc.severity important * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-457/ConditionallyUninitializedVariable.ql b/cpp/ql/src/Security/CWE/CWE-457/ConditionallyUninitializedVariable.ql index 3d6c54e33aef..c6a797929bbc 100644 --- a/cpp/ql/src/Security/CWE/CWE-457/ConditionallyUninitializedVariable.ql +++ b/cpp/ql/src/Security/CWE/CWE-457/ConditionallyUninitializedVariable.ql @@ -5,7 +5,7 @@ * state, and reading the variable may result in undefined behavior. * @kind problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.8 * @opaque-id SM02313 * @id cpp/conditionally-uninitialized-variable * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScaling.ql b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScaling.ql index a582813ed5fd..ce99ce1ebce0 100644 --- a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScaling.ql +++ b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScaling.ql @@ -4,7 +4,7 @@ * can cause buffer overflow conditions. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id cpp/suspicious-pointer-scaling * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql index c1bfb9c4ee9b..5b7e33799295 100644 --- a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql +++ b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/incorrect-pointer-scaling-char * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision low * @tags security * external/cwe/cwe-468 diff --git a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql index aa267a25f4ee..460c98bf1e32 100644 --- a/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql +++ b/cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql @@ -4,7 +4,7 @@ * can cause buffer overflow conditions. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id cpp/suspicious-pointer-scaling-void * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql b/cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql index 7532f7e9fcfd..4ac00fc42c6d 100644 --- a/cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql +++ b/cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql @@ -5,7 +5,7 @@ * implicitly scaled. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision high * @id cpp/suspicious-add-sizeof * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql b/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql index ead50c9620ed..bbe3b0805e19 100644 --- a/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql +++ b/cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql @@ -5,7 +5,7 @@ * attack plan. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @precision medium * @id cpp/system-data-exposure * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql b/cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql index 321684dc93c0..65551a1f138b 100644 --- a/cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql +++ b/cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/incorrect-string-type-conversion * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.8 * @precision high * @tags security * external/cwe/cwe-704 diff --git a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql index 67dce658ed86..1fd55a02d016 100644 --- a/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql +++ b/cpp/ql/src/Security/CWE/CWE-732/DoNotCreateWorldWritable.ql @@ -3,7 +3,7 @@ * @description Creating a file that is world-writable can allow an attacker to write to the file. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id cpp/world-writable-file-creation * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql b/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql index 72399cec376e..bf6738263474 100644 --- a/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql +++ b/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql @@ -7,7 +7,7 @@ * @id cpp/unsafe-dacl-security-descriptor * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @tags security * external/cwe/cwe-732 diff --git a/cpp/ql/src/Security/CWE/CWE-764/LockOrderCycle.ql b/cpp/ql/src/Security/CWE/CWE-764/LockOrderCycle.ql index 2a0d765f2391..cd5d87718078 100644 --- a/cpp/ql/src/Security/CWE/CWE-764/LockOrderCycle.ql +++ b/cpp/ql/src/Security/CWE/CWE-764/LockOrderCycle.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/lock-order-cycle * @problem.severity error - * @security-severity 6.9 + * @security-severity 5.0 * @tags security * external/cwe/cwe-764 * external/cwe/cwe-833 diff --git a/cpp/ql/src/Security/CWE/CWE-764/TwiceLocked.ql b/cpp/ql/src/Security/CWE/CWE-764/TwiceLocked.ql index c32e747f3e4d..051ad2eeeeab 100644 --- a/cpp/ql/src/Security/CWE/CWE-764/TwiceLocked.ql +++ b/cpp/ql/src/Security/CWE/CWE-764/TwiceLocked.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/twice-locked * @problem.severity error - * @security-severity 6.9 + * @security-severity 5.0 * @precision low * @tags security * external/cwe/cwe-764 diff --git a/cpp/ql/src/Security/CWE/CWE-764/UnreleasedLock.ql b/cpp/ql/src/Security/CWE/CWE-764/UnreleasedLock.ql index 8f3d9e921498..dd224352b12b 100644 --- a/cpp/ql/src/Security/CWE/CWE-764/UnreleasedLock.ql +++ b/cpp/ql/src/Security/CWE/CWE-764/UnreleasedLock.ql @@ -5,7 +5,7 @@ * @kind problem * @id cpp/unreleased-lock * @problem.severity error - * @security-severity 6.9 + * @security-severity 5.0 * @precision low * @tags security * external/cwe/cwe-764 diff --git a/cpp/ql/src/Security/CWE/CWE-807/TaintedCondition.ql b/cpp/ql/src/Security/CWE/CWE-807/TaintedCondition.ql index 08a5ceb49dba..64505ee82836 100644 --- a/cpp/ql/src/Security/CWE/CWE-807/TaintedCondition.ql +++ b/cpp/ql/src/Security/CWE/CWE-807/TaintedCondition.ql @@ -5,7 +5,7 @@ * attack. * @kind path-problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id cpp/tainted-permissions-check * @tags security diff --git a/cpp/ql/src/Security/CWE/CWE-835/InfiniteLoopWithUnsatisfiableExitCondition.ql b/cpp/ql/src/Security/CWE/CWE-835/InfiniteLoopWithUnsatisfiableExitCondition.ql index cd85179d14d8..3db5e15874b5 100644 --- a/cpp/ql/src/Security/CWE/CWE-835/InfiniteLoopWithUnsatisfiableExitCondition.ql +++ b/cpp/ql/src/Security/CWE/CWE-835/InfiniteLoopWithUnsatisfiableExitCondition.ql @@ -6,7 +6,7 @@ * @kind problem * @id cpp/infinite-loop-with-unsatisfiable-exit-condition * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @tags security * external/cwe/cwe-835 */ diff --git a/csharp/ql/src/Bad Practices/UseOfHtmlInputHidden.ql b/csharp/ql/src/Bad Practices/UseOfHtmlInputHidden.ql index 09ee699163fc..47097fea7539 100644 --- a/csharp/ql/src/Bad Practices/UseOfHtmlInputHidden.ql +++ b/csharp/ql/src/Bad Practices/UseOfHtmlInputHidden.ql @@ -3,7 +3,7 @@ * @description Finds uses of hidden fields on forms * @kind problem * @problem.severity recommendation - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id cs/web/html-hidden-input * @tags security diff --git a/csharp/ql/src/Configuration/EmptyPasswordInConfigurationFile.ql b/csharp/ql/src/Configuration/EmptyPasswordInConfigurationFile.ql index e7dee2143c16..9fe53d2cc904 100644 --- a/csharp/ql/src/Configuration/EmptyPasswordInConfigurationFile.ql +++ b/csharp/ql/src/Configuration/EmptyPasswordInConfigurationFile.ql @@ -3,7 +3,7 @@ * @description Finds empty passwords in configuration files. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id cs/empty-password-in-configuration * @tags security diff --git a/csharp/ql/src/Configuration/PasswordInConfigurationFile.ql b/csharp/ql/src/Configuration/PasswordInConfigurationFile.ql index eb4756ea962c..8e4dd77febd8 100644 --- a/csharp/ql/src/Configuration/PasswordInConfigurationFile.ql +++ b/csharp/ql/src/Configuration/PasswordInConfigurationFile.ql @@ -3,7 +3,7 @@ * @description Finds passwords in configuration files. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision medium * @id cs/password-in-configuration * @tags security diff --git a/csharp/ql/src/Input Validation/UseOfFileUpload.ql b/csharp/ql/src/Input Validation/UseOfFileUpload.ql index 4eb96e2c072f..e936962ad51f 100644 --- a/csharp/ql/src/Input Validation/UseOfFileUpload.ql +++ b/csharp/ql/src/Input Validation/UseOfFileUpload.ql @@ -3,7 +3,7 @@ * @description Finds uses of file upload * @kind problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/web/file-upload * @tags security diff --git a/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransform.ql b/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransform.ql index 1ee9c4a2bfaf..392c3e843d75 100644 --- a/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransform.ql +++ b/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransform.ql @@ -5,7 +5,7 @@ * but under some circumstances may also result in incorrect results. * @kind problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.0 * @precision medium * @id cs/thread-unsafe-icryptotransform-field-in-class * @tags concurrency diff --git a/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransformLambda.ql b/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransformLambda.ql index 33f8a8ab47c0..7787a1bd6227 100644 --- a/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransformLambda.ql +++ b/csharp/ql/src/Likely Bugs/ThreadUnsafeICryptoTransformLambda.ql @@ -6,7 +6,7 @@ * but under some circumstances may also result in incorrect results. * @kind problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.0 * @precision medium * @id cs/thread-unsafe-icryptotransform-captured-in-lambda * @tags concurrency diff --git a/csharp/ql/src/Security Features/CWE-011/ASPNetDebug.ql b/csharp/ql/src/Security Features/CWE-011/ASPNetDebug.ql index c9b2112b4881..3bccd9b03318 100644 --- a/csharp/ql/src/Security Features/CWE-011/ASPNetDebug.ql +++ b/csharp/ql/src/Security Features/CWE-011/ASPNetDebug.ql @@ -4,7 +4,7 @@ * debug builds provide additional information useful to a malicious attacker. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.5 * @precision very-high * @id cs/web/debug-binary * @tags security diff --git a/csharp/ql/src/Security Features/CWE-016/ASPNetMaxRequestLength.ql b/csharp/ql/src/Security Features/CWE-016/ASPNetMaxRequestLength.ql index 6c58c9100893..5a527c96084f 100644 --- a/csharp/ql/src/Security Features/CWE-016/ASPNetMaxRequestLength.ql +++ b/csharp/ql/src/Security Features/CWE-016/ASPNetMaxRequestLength.ql @@ -4,7 +4,7 @@ * denial-of-service attacks. * @kind problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.5 * @id cs/web/large-max-request-length * @tags security * frameworks/asp.net diff --git a/csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.ql b/csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.ql index 362b8a70ebe1..f093a8884469 100644 --- a/csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.ql +++ b/csharp/ql/src/Security Features/CWE-016/ASPNetPagesValidateRequest.ql @@ -3,7 +3,7 @@ * @description ASP.NET pages should not disable the built-in request validation. * @kind problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.5 * @id cs/web/request-validation-disabled * @tags security * frameworks/asp.net diff --git a/csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.ql b/csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.ql index a270a5928bb4..dd9ed5218ff5 100644 --- a/csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.ql +++ b/csharp/ql/src/Security Features/CWE-016/ASPNetRequestValidationMode.ql @@ -6,7 +6,7 @@ * @kind problem * @id cs/insecure-request-validation-mode * @problem.severity warning - * @security-severity 6.9 + * @security-severity 7.5 * @tags security * external/cwe/cwe-016 */ diff --git a/csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql b/csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql index cda257234ab2..6148f0f6ae91 100644 --- a/csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql +++ b/csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql @@ -4,7 +4,7 @@ * @kind problem * @id cs/serialization-check-bypass * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @tags security * external/cwe/cwe-20 diff --git a/csharp/ql/src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql b/csharp/ql/src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql index c378e31d8aa8..ca21947ee9b2 100644 --- a/csharp/ql/src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql +++ b/csharp/ql/src/Security Features/CWE-020/UntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/csharp/ql/src/Security Features/CWE-022/TaintedPath.ql b/csharp/ql/src/Security Features/CWE-022/TaintedPath.ql index bf75ab47904a..b3659df1617f 100644 --- a/csharp/ql/src/Security Features/CWE-022/TaintedPath.ql +++ b/csharp/ql/src/Security Features/CWE-022/TaintedPath.ql @@ -3,7 +3,7 @@ * @description Accessing paths influenced by users can allow an attacker to access unexpected resources. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id cs/path-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-022/ZipSlip.ql b/csharp/ql/src/Security Features/CWE-022/ZipSlip.ql index 5f6855701ed0..4203f94cb33f 100644 --- a/csharp/ql/src/Security Features/CWE-022/ZipSlip.ql +++ b/csharp/ql/src/Security Features/CWE-022/ZipSlip.ql @@ -6,7 +6,7 @@ * @kind path-problem * @id cs/zipslip * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-022 diff --git a/csharp/ql/src/Security Features/CWE-078/CommandInjection.ql b/csharp/ql/src/Security Features/CWE-078/CommandInjection.ql index 7056d3222f2c..f66f86f290e0 100644 --- a/csharp/ql/src/Security Features/CWE-078/CommandInjection.ql +++ b/csharp/ql/src/Security Features/CWE-078/CommandInjection.ql @@ -4,7 +4,7 @@ * user to change the meaning of the command. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/command-line-injection * @tags correctness diff --git a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql b/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql index b8264b4d8a13..b15dd866e726 100644 --- a/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql +++ b/csharp/ql/src/Security Features/CWE-078/StoredCommandInjection.ql @@ -4,7 +4,7 @@ * user to change the meaning of the command. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id cs/stored-command-line-injection * @tags correctness diff --git a/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql b/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql index fcf10553a6a7..548e72dbd564 100644 --- a/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql +++ b/csharp/ql/src/Security Features/CWE-079/StoredXSS.ql @@ -4,7 +4,7 @@ * scripting vulnerability if the data was originally user-provided. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision medium * @id cs/web/stored-xss * @tags security diff --git a/csharp/ql/src/Security Features/CWE-079/XSS.ql b/csharp/ql/src/Security Features/CWE-079/XSS.ql index d58a7828a6f2..34a7ea87a720 100644 --- a/csharp/ql/src/Security Features/CWE-079/XSS.ql +++ b/csharp/ql/src/Security Features/CWE-079/XSS.ql @@ -4,7 +4,7 @@ * allows for a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id cs/web/xss * @tags security diff --git a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql b/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql index fde86253edcb..7b9bfef0ef9d 100644 --- a/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql +++ b/csharp/ql/src/Security Features/CWE-089/SecondOrderSqlInjection.ql @@ -4,7 +4,7 @@ * of malicious SQL code by the user. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision medium * @id cs/second-order-sql-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql b/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql index 456e36db36e4..e818eaeb0afd 100644 --- a/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql +++ b/csharp/ql/src/Security Features/CWE-089/SqlInjection.ql @@ -4,7 +4,7 @@ * malicious SQL code by the user. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id cs/sql-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-090/LDAPInjection.ql b/csharp/ql/src/Security Features/CWE-090/LDAPInjection.ql index e0e667ed8da2..4878b449eb8f 100644 --- a/csharp/ql/src/Security Features/CWE-090/LDAPInjection.ql +++ b/csharp/ql/src/Security Features/CWE-090/LDAPInjection.ql @@ -4,7 +4,7 @@ * malicious LDAP code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/ldap-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql b/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql index 0c705fbce33f..c2791b8f2b1d 100644 --- a/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql +++ b/csharp/ql/src/Security Features/CWE-090/StoredLDAPInjection.ql @@ -4,7 +4,7 @@ * insertion of malicious LDAP code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id cs/stored-ldap-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql index 4e2548895ad2..1ad4fad9e411 100644 --- a/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql +++ b/csharp/ql/src/Security Features/CWE-091/XMLInjection.ql @@ -5,7 +5,7 @@ * @kind problem * @id cs/xml-injection * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.8 * @precision high * @tags security * external/cwe/cwe-091 diff --git a/csharp/ql/src/Security Features/CWE-094/CodeInjection.ql b/csharp/ql/src/Security Features/CWE-094/CodeInjection.ql index 8c711400d618..2d85c9aabbcf 100644 --- a/csharp/ql/src/Security Features/CWE-094/CodeInjection.ql +++ b/csharp/ql/src/Security Features/CWE-094/CodeInjection.ql @@ -4,7 +4,7 @@ * malicious code. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id cs/code-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-099/ResourceInjection.ql b/csharp/ql/src/Security Features/CWE-099/ResourceInjection.ql index ca32d21b3cbd..dee11139a588 100644 --- a/csharp/ql/src/Security Features/CWE-099/ResourceInjection.ql +++ b/csharp/ql/src/Security Features/CWE-099/ResourceInjection.ql @@ -4,7 +4,7 @@ * malicious user providing an unintended resource. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/resource-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-112/MissingXMLValidation.ql b/csharp/ql/src/Security Features/CWE-112/MissingXMLValidation.ql index b13d357980bb..24716639aa56 100644 --- a/csharp/ql/src/Security Features/CWE-112/MissingXMLValidation.ql +++ b/csharp/ql/src/Security Features/CWE-112/MissingXMLValidation.ql @@ -4,7 +4,7 @@ * schema. * @kind path-problem * @problem.severity recommendation - * @security-severity 3.6 + * @security-severity 4.3 * @precision high * @id cs/xml/missing-validation * @tags security diff --git a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql index 54b578d30724..9c3b9b21bac7 100644 --- a/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-114/AssemblyPathInjection.ql @@ -6,7 +6,7 @@ * @kind problem * @id cs/assembly-path-injection * @problem.severity error - * @security-severity 6.0 + * @security-severity 8.2 * @precision high * @tags security * external/cwe/cwe-114 diff --git a/csharp/ql/src/Security Features/CWE-117/LogForging.ql b/csharp/ql/src/Security Features/CWE-117/LogForging.ql index b7642d4e15a8..4c31a02c86eb 100644 --- a/csharp/ql/src/Security Features/CWE-117/LogForging.ql +++ b/csharp/ql/src/Security Features/CWE-117/LogForging.ql @@ -4,7 +4,7 @@ * insertion of forged log entries by a malicious user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id cs/log-forging * @tags security diff --git a/csharp/ql/src/Security Features/CWE-119/LocalUnvalidatedArithmetic.ql b/csharp/ql/src/Security Features/CWE-119/LocalUnvalidatedArithmetic.ql index 263429e69952..57d6e500134a 100644 --- a/csharp/ql/src/Security Features/CWE-119/LocalUnvalidatedArithmetic.ql +++ b/csharp/ql/src/Security Features/CWE-119/LocalUnvalidatedArithmetic.ql @@ -5,7 +5,7 @@ * to return any value. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id cs/unvalidated-local-pointer-arithmetic * @tags security diff --git a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql index 7494412e3b3c..d079c4f9ac96 100644 --- a/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql +++ b/csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql @@ -4,7 +4,7 @@ * and cause a denial of service. * @kind path-problem * @problem.severity error - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id cs/uncontrolled-format-string * @tags security diff --git a/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql b/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql index fa40db533d5c..ed3e5da0b1f4 100644 --- a/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql +++ b/csharp/ql/src/Security Features/CWE-201/ExposureInTransmittedData.ql @@ -3,7 +3,7 @@ * @description Transmitting sensitive information to the user is a potential security risk. * @kind path-problem * @problem.severity error - * @security-severity 1.4 + * @security-severity 4.3 * @precision high * @id cs/sensitive-data-transmission * @tags security diff --git a/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql b/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql index 23e72e4e5e96..34f45c0c64e0 100644 --- a/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql +++ b/csharp/ql/src/Security Features/CWE-209/ExceptionInformationExposure.ql @@ -5,7 +5,7 @@ * developing a subsequent exploit. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 5.4 * @precision high * @id cs/information-exposure-through-exception * @tags security diff --git a/csharp/ql/src/Security Features/CWE-248/MissingASPNETGlobalErrorHandler.ql b/csharp/ql/src/Security Features/CWE-248/MissingASPNETGlobalErrorHandler.ql index 323630d0c4ed..416608b91159 100644 --- a/csharp/ql/src/Security Features/CWE-248/MissingASPNETGlobalErrorHandler.ql +++ b/csharp/ql/src/Security Features/CWE-248/MissingASPNETGlobalErrorHandler.ql @@ -4,7 +4,7 @@ * a global error handler, otherwise they may leak exception information. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id cs/web/missing-global-error-handler * @tags security diff --git a/csharp/ql/src/Security Features/CWE-312/CleartextStorage.ql b/csharp/ql/src/Security Features/CWE-312/CleartextStorage.ql index b19ca4ff1bde..6e957788776f 100644 --- a/csharp/ql/src/Security Features/CWE-312/CleartextStorage.ql +++ b/csharp/ql/src/Security Features/CWE-312/CleartextStorage.ql @@ -4,7 +4,7 @@ * attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id cs/cleartext-storage-of-sensitive-information * @tags security diff --git a/csharp/ql/src/Security Features/CWE-321/HardcodedEncryptionKey.ql b/csharp/ql/src/Security Features/CWE-321/HardcodedEncryptionKey.ql index ff244adee959..20298cac6f76 100644 --- a/csharp/ql/src/Security Features/CWE-321/HardcodedEncryptionKey.ql +++ b/csharp/ql/src/Security Features/CWE-321/HardcodedEncryptionKey.ql @@ -4,7 +4,7 @@ * @kind problem * @id cs/hardcoded-key * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.1 * @tags security * external/cwe/cwe-320 */ diff --git a/csharp/ql/src/Security Features/CWE-321/HardcodedSymmetricEncryptionKey.ql b/csharp/ql/src/Security Features/CWE-321/HardcodedSymmetricEncryptionKey.ql index 2cabc38aa8b7..4de91b9a2149 100644 --- a/csharp/ql/src/Security Features/CWE-321/HardcodedSymmetricEncryptionKey.ql +++ b/csharp/ql/src/Security Features/CWE-321/HardcodedSymmetricEncryptionKey.ql @@ -4,7 +4,7 @@ * @kind path-problem * @id cs/hard-coded-symmetric-encryption-key * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @tags security * external/cwe/cwe-321 */ diff --git a/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql b/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql index a843008e582a..a4f4d63d6ee2 100644 --- a/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql +++ b/csharp/ql/src/Security Features/CWE-327/DontInstallRootCert.ql @@ -5,7 +5,7 @@ * @kind path-problem * @id cs/adding-cert-to-root-store * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @tags security * external/cwe/cwe-327 */ diff --git a/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql b/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql index a16358b1f90c..fd4a37f7ee37 100644 --- a/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql +++ b/csharp/ql/src/Security Features/CWE-327/InsecureSQLConnection.ql @@ -4,7 +4,7 @@ * @kind path-problem * @id cs/insecure-sql-connection * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @tags security * external/cwe/cwe-327 diff --git a/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql b/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql index fb40413716fa..e50566d6ca99 100644 --- a/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql +++ b/csharp/ql/src/Security Features/CWE-352/MissingAntiForgeryTokenValidation.ql @@ -4,7 +4,7 @@ * allows a malicious attacker to submit a request on behalf of the user. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id cs/web/missing-token-validation * @tags security diff --git a/csharp/ql/src/Security Features/CWE-359/ExposureOfPrivateInformation.ql b/csharp/ql/src/Security Features/CWE-359/ExposureOfPrivateInformation.ql index 20323b66bb96..de509e38a3c4 100644 --- a/csharp/ql/src/Security Features/CWE-359/ExposureOfPrivateInformation.ql +++ b/csharp/ql/src/Security Features/CWE-359/ExposureOfPrivateInformation.ql @@ -4,7 +4,7 @@ * unauthorized persons. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 6.5 * @precision high * @id cs/exposure-of-sensitive-information * @tags security diff --git a/csharp/ql/src/Security Features/CWE-384/AbandonSession.ql b/csharp/ql/src/Security Features/CWE-384/AbandonSession.ql index 75daa5fc10cf..87dab0811880 100644 --- a/csharp/ql/src/Security Features/CWE-384/AbandonSession.ql +++ b/csharp/ql/src/Security Features/CWE-384/AbandonSession.ql @@ -5,7 +5,7 @@ * their session. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.8 * @precision high * @id cs/session-reuse * @tags security diff --git a/csharp/ql/src/Security Features/CWE-451/MissingXFrameOptions.ql b/csharp/ql/src/Security Features/CWE-451/MissingXFrameOptions.ql index 87757be54003..67f3ae1d7b84 100644 --- a/csharp/ql/src/Security Features/CWE-451/MissingXFrameOptions.ql +++ b/csharp/ql/src/Security Features/CWE-451/MissingXFrameOptions.ql @@ -4,7 +4,7 @@ * overlay their own UI on top of the site by using an iframe. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id cs/web/missing-x-frame-options * @tags security diff --git a/csharp/ql/src/Security Features/CWE-502/DeserializedDelegate.ql b/csharp/ql/src/Security Features/CWE-502/DeserializedDelegate.ql index 76035d9fcba4..c0d0d7ad00b1 100644 --- a/csharp/ql/src/Security Features/CWE-502/DeserializedDelegate.ql +++ b/csharp/ql/src/Security Features/CWE-502/DeserializedDelegate.ql @@ -5,7 +5,7 @@ * @kind problem * @id cs/deserialized-delegate * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @tags security * external/cwe/cwe-502 diff --git a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserialization.ql b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserialization.ql index 338347c08870..68c4822544d9 100644 --- a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserialization.ql +++ b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserialization.ql @@ -5,7 +5,7 @@ * @kind problem * @id cs/unsafe-deserialization * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision low * @tags security * external/cwe/cwe-502 diff --git a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql index 32981563ab62..949daa4986ce 100644 --- a/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql +++ b/csharp/ql/src/Security Features/CWE-502/UnsafeDeserializationUntrustedInput.ql @@ -5,7 +5,7 @@ * @kind path-problem * @id cs/unsafe-deserialization-untrusted-input * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @tags security * external/cwe/cwe-502 diff --git a/csharp/ql/src/Security Features/CWE-548/ASPNetDirectoryListing.ql b/csharp/ql/src/Security Features/CWE-548/ASPNetDirectoryListing.ql index 82532ed40e05..9416fa32f0af 100644 --- a/csharp/ql/src/Security Features/CWE-548/ASPNetDirectoryListing.ql +++ b/csharp/ql/src/Security Features/CWE-548/ASPNetDirectoryListing.ql @@ -3,7 +3,7 @@ * @description Directory browsing should not be enabled in production as it can leak sensitive information. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @precision very-high * @id cs/web/directory-browse-enabled * @tags security diff --git a/csharp/ql/src/Security Features/CWE-601/UrlRedirect.ql b/csharp/ql/src/Security Features/CWE-601/UrlRedirect.ql index 37594e7cf724..18aaed307b54 100644 --- a/csharp/ql/src/Security Features/CWE-601/UrlRedirect.ql +++ b/csharp/ql/src/Security Features/CWE-601/UrlRedirect.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity error - * @security-severity 2.7 + * @security-severity 6.1 * @precision high * @id cs/web/unvalidated-url-redirection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-611/UntrustedDataInsecureXml.ql b/csharp/ql/src/Security Features/CWE-611/UntrustedDataInsecureXml.ql index 2b37eb333909..29bd2386316b 100644 --- a/csharp/ql/src/Security Features/CWE-611/UntrustedDataInsecureXml.ql +++ b/csharp/ql/src/Security Features/CWE-611/UntrustedDataInsecureXml.ql @@ -3,7 +3,7 @@ * @description Untrusted XML is read with an insecure resolver and DTD processing enabled. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.1 * @precision high * @id cs/xml/insecure-dtd-handling * @tags security diff --git a/csharp/ql/src/Security Features/CWE-611/UseXmlSecureResolver.ql b/csharp/ql/src/Security Features/CWE-611/UseXmlSecureResolver.ql index 1073c873d8c1..afda204d1157 100644 --- a/csharp/ql/src/Security Features/CWE-611/UseXmlSecureResolver.ql +++ b/csharp/ql/src/Security Features/CWE-611/UseXmlSecureResolver.ql @@ -4,7 +4,7 @@ * be restricted using a secure resolver or disabling DTD processing. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.1 * @precision low * @id cs/insecure-xml-read * @tags security diff --git a/csharp/ql/src/Security Features/CWE-614/RequireSSL.ql b/csharp/ql/src/Security Features/CWE-614/RequireSSL.ql index 49dd6e52e131..3e5e64ca22e3 100644 --- a/csharp/ql/src/Security Features/CWE-614/RequireSSL.ql +++ b/csharp/ql/src/Security Features/CWE-614/RequireSSL.ql @@ -5,7 +5,7 @@ * is used at all times. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id cs/web/requiressl-not-set * @tags security diff --git a/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql b/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql index 5d3ee1db4e75..c63ed490d09c 100644 --- a/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-643/StoredXPathInjection.ql @@ -4,7 +4,7 @@ * user is vulnerable to insertion of malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id cs/xml/stored-xpath-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-643/XPathInjection.ql b/csharp/ql/src/Security Features/CWE-643/XPathInjection.ql index a158ccfab695..15a5cf11be9f 100644 --- a/csharp/ql/src/Security Features/CWE-643/XPathInjection.ql +++ b/csharp/ql/src/Security Features/CWE-643/XPathInjection.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/xml/xpath-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-730/ReDoS.ql b/csharp/ql/src/Security Features/CWE-730/ReDoS.ql index 79ade61af908..7a933dc18bd8 100644 --- a/csharp/ql/src/Security Features/CWE-730/ReDoS.ql +++ b/csharp/ql/src/Security Features/CWE-730/ReDoS.ql @@ -4,7 +4,7 @@ * exponential time on certain input. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id cs/redos * @tags security diff --git a/csharp/ql/src/Security Features/CWE-730/RegexInjection.ql b/csharp/ql/src/Security Features/CWE-730/RegexInjection.ql index 5aca2ad9c492..e358e59b6126 100644 --- a/csharp/ql/src/Security Features/CWE-730/RegexInjection.ql +++ b/csharp/ql/src/Security Features/CWE-730/RegexInjection.ql @@ -5,7 +5,7 @@ * exponential time on certain inputs. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id cs/regex-injection * @tags security diff --git a/csharp/ql/src/Security Features/CWE-798/HardcodedConnectionString.ql b/csharp/ql/src/Security Features/CWE-798/HardcodedConnectionString.ql index 0aa5f9026d1d..697ce99d1271 100644 --- a/csharp/ql/src/Security Features/CWE-798/HardcodedConnectionString.ql +++ b/csharp/ql/src/Security Features/CWE-798/HardcodedConnectionString.ql @@ -3,7 +3,7 @@ * @description Credentials are hard-coded in a connection string in the source code of the application. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/hardcoded-connection-string-credentials * @tags security diff --git a/csharp/ql/src/Security Features/CWE-798/HardcodedCredentials.ql b/csharp/ql/src/Security Features/CWE-798/HardcodedCredentials.ql index 7b1831899210..34961ac0953b 100644 --- a/csharp/ql/src/Security Features/CWE-798/HardcodedCredentials.ql +++ b/csharp/ql/src/Security Features/CWE-798/HardcodedCredentials.ql @@ -3,7 +3,7 @@ * @description Credentials are hard coded in the source code of the application. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id cs/hardcoded-credentials * @tags security diff --git a/csharp/ql/src/Security Features/CWE-807/ConditionalBypass.ql b/csharp/ql/src/Security Features/CWE-807/ConditionalBypass.ql index 3922c2620312..9069c77b603d 100644 --- a/csharp/ql/src/Security Features/CWE-807/ConditionalBypass.ql +++ b/csharp/ql/src/Security Features/CWE-807/ConditionalBypass.ql @@ -4,7 +4,7 @@ * passing through authentication systems. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id cs/user-controlled-bypass * @tags security diff --git a/csharp/ql/src/Security Features/CWE-838/InappropriateEncoding.ql b/csharp/ql/src/Security Features/CWE-838/InappropriateEncoding.ql index 8b8bd478031a..75982a029439 100644 --- a/csharp/ql/src/Security Features/CWE-838/InappropriateEncoding.ql +++ b/csharp/ql/src/Security Features/CWE-838/InappropriateEncoding.ql @@ -4,7 +4,7 @@ * pose a security risk. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision low * @id cs/inappropriate-encoding * @tags security diff --git a/csharp/ql/src/Security Features/CookieWithOverlyBroadDomain.ql b/csharp/ql/src/Security Features/CookieWithOverlyBroadDomain.ql index 472a87441ed2..ca59bd42bdc7 100644 --- a/csharp/ql/src/Security Features/CookieWithOverlyBroadDomain.ql +++ b/csharp/ql/src/Security Features/CookieWithOverlyBroadDomain.ql @@ -3,7 +3,7 @@ * @description Finds cookies with an overly broad domain. * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 9.3 * @precision high * @id cs/web/broad-cookie-domain * @tags security diff --git a/csharp/ql/src/Security Features/CookieWithOverlyBroadPath.ql b/csharp/ql/src/Security Features/CookieWithOverlyBroadPath.ql index ec6953f72e14..bfb2f24f3609 100644 --- a/csharp/ql/src/Security Features/CookieWithOverlyBroadPath.ql +++ b/csharp/ql/src/Security Features/CookieWithOverlyBroadPath.ql @@ -3,7 +3,7 @@ * @description Finds cookies with an overly broad path. * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 9.3 * @precision high * @id cs/web/broad-cookie-path * @tags security diff --git a/csharp/ql/src/Security Features/Encryption using ECB.ql b/csharp/ql/src/Security Features/Encryption using ECB.ql index 72c63b9c5658..ec9719aa7812 100644 --- a/csharp/ql/src/Security Features/Encryption using ECB.ql +++ b/csharp/ql/src/Security Features/Encryption using ECB.ql @@ -3,7 +3,7 @@ * @description Highlights uses of the encryption mode 'CipherMode.ECB'. This mode should normally not be used because it is vulnerable to replay attacks. * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id cs/ecb-encryption * @tags security diff --git a/csharp/ql/src/Security Features/HeaderCheckingDisabled.ql b/csharp/ql/src/Security Features/HeaderCheckingDisabled.ql index 94d016091001..631b408a5a33 100644 --- a/csharp/ql/src/Security Features/HeaderCheckingDisabled.ql +++ b/csharp/ql/src/Security Features/HeaderCheckingDisabled.ql @@ -3,7 +3,7 @@ * @description Finds places where header checking is disabled. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id cs/web/disabled-header-checking * @tags security diff --git a/csharp/ql/src/Security Features/InadequateRSAPadding.ql b/csharp/ql/src/Security Features/InadequateRSAPadding.ql index ddeb9b370f65..2968b39b6b3b 100644 --- a/csharp/ql/src/Security Features/InadequateRSAPadding.ql +++ b/csharp/ql/src/Security Features/InadequateRSAPadding.ql @@ -3,7 +3,7 @@ * @description Finds uses of RSA encryption with inadequate padding. * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id cs/inadequate-rsa-padding * @tags security diff --git a/csharp/ql/src/Security Features/InsecureRandomness.ql b/csharp/ql/src/Security Features/InsecureRandomness.ql index 434f8c287f2c..b618bff07a56 100644 --- a/csharp/ql/src/Security Features/InsecureRandomness.ql +++ b/csharp/ql/src/Security Features/InsecureRandomness.ql @@ -5,7 +5,7 @@ * be generated. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id cs/insecure-randomness * @tags security diff --git a/csharp/ql/src/Security Features/InsufficientKeySize.ql b/csharp/ql/src/Security Features/InsufficientKeySize.ql index 70caea4b1790..9829d1dcf4d2 100644 --- a/csharp/ql/src/Security Features/InsufficientKeySize.ql +++ b/csharp/ql/src/Security Features/InsufficientKeySize.ql @@ -3,7 +3,7 @@ * @description Finds uses of encryption algorithms with too small a key size * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id cs/insufficient-key-size * @tags security diff --git a/csharp/ql/src/Security Features/PersistentCookie.ql b/csharp/ql/src/Security Features/PersistentCookie.ql index c7041cb7a368..be99e63b906d 100644 --- a/csharp/ql/src/Security Features/PersistentCookie.ql +++ b/csharp/ql/src/Security Features/PersistentCookie.ql @@ -3,7 +3,7 @@ * @description Persistent cookies are vulnerable to attacks. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.2 * @precision high * @id cs/web/persistent-cookie * @tags security diff --git a/csharp/ql/src/Security Features/WeakEncryption.ql b/csharp/ql/src/Security Features/WeakEncryption.ql index b6d543d6de7f..9bf7fae73566 100644 --- a/csharp/ql/src/Security Features/WeakEncryption.ql +++ b/csharp/ql/src/Security Features/WeakEncryption.ql @@ -3,7 +3,7 @@ * @description Finds uses of encryption algorithms that are weak and obsolete * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id cs/weak-encryption * @tags security diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql index 6b08a14c2441..cbd74a838f3f 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbContainerInterference.ql @@ -7,7 +7,7 @@ * Such operations could interfere with the EJB container's operation. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/container-interference * @tags reliability diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql index 62b2d5f48ecf..ec406ac31716 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbFileIO.ql @@ -5,7 +5,7 @@ * for enterprise components. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/file-io * @tags reliability diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql index 787ae9a72c5f..bbc57fca5e97 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbNative.ql @@ -4,7 +4,7 @@ * Such use could compromise security and system stability. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/native-code * @tags reliability diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql index 4e6eea2cbf13..7bc062209dff 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbReflection.ql @@ -4,7 +4,7 @@ * as this could compromise security. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/reflection * @tags external/cwe/cwe-573 diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql index 4efde8d82bfb..ea8a7087d26a 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbSecurityConfiguration.ql @@ -5,7 +5,7 @@ * This functionality is reserved for the EJB container for security reasons. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/security-configuration-access * @tags external/cwe/cwe-573 diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql index 02c493c7a703..7de0a0f8aed2 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbSerialization.ql @@ -4,7 +4,7 @@ * the Java serialization protocol, since their use could compromise security. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/substitution-in-serialization * @tags external/cwe/cwe-573 diff --git a/java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql b/java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql index 8011b3c1d226..e8b898b00cc2 100644 --- a/java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql +++ b/java/ql/src/Frameworks/JavaEE/EJB/EjbSetSocketOrUrlFactory.ql @@ -5,7 +5,7 @@ * compromise security or interfere with the EJB container's operation. * @kind problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.8 * @precision low * @id java/ejb/socket-or-stream-handler-factory * @tags reliability diff --git a/java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql b/java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql index 52bb9f04289d..29b60cae0123 100644 --- a/java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql +++ b/java/ql/src/Likely Bugs/Arithmetic/InformationLoss.ql @@ -5,7 +5,7 @@ * numeric errors such as overflows. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision very-high * @id java/implicit-cast-in-compound-assignment * @tags reliability diff --git a/java/ql/src/Likely Bugs/Arithmetic/RandomUsedOnce.ql b/java/ql/src/Likely Bugs/Arithmetic/RandomUsedOnce.ql index fb1a44b2222b..f2b78dcaf180 100644 --- a/java/ql/src/Likely Bugs/Arithmetic/RandomUsedOnce.ql +++ b/java/ql/src/Likely Bugs/Arithmetic/RandomUsedOnce.ql @@ -4,7 +4,7 @@ * guarantee an evenly distributed sequence of random numbers. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id java/random-used-once * @tags reliability diff --git a/java/ql/src/Likely Bugs/Concurrency/UnreleasedLock.ql b/java/ql/src/Likely Bugs/Concurrency/UnreleasedLock.ql index 4a3fc548085e..10a054f4106c 100644 --- a/java/ql/src/Likely Bugs/Concurrency/UnreleasedLock.ql +++ b/java/ql/src/Likely Bugs/Concurrency/UnreleasedLock.ql @@ -4,7 +4,7 @@ * may cause a deadlock. * @kind problem * @problem.severity error - * @security-severity 6.9 + * @security-severity 5.0 * @precision medium * @id java/unreleased-lock * @tags reliability diff --git a/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql b/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql index bf2e3f06f264..63c66ffa9d0f 100644 --- a/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql +++ b/java/ql/src/Security/CWE/CWE-020/UntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql b/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql index ac3ec8664a21..adb51f751b4a 100644 --- a/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql +++ b/java/ql/src/Security/CWE/CWE-022/TaintedPath.ql @@ -3,7 +3,7 @@ * @description Accessing paths influenced by users can allow an attacker to access unexpected resources. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id java/path-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql b/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql index 90b77661500e..ebd9c4f079d7 100644 --- a/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql +++ b/java/ql/src/Security/CWE/CWE-022/TaintedPathLocal.ql @@ -3,7 +3,7 @@ * @description Accessing paths influenced by users can allow an attacker to access unexpected resources. * @kind path-problem * @problem.severity recommendation - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id java/path-injection-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql b/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql index 1a70b273d84a..a7c15a82b87e 100644 --- a/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql +++ b/java/ql/src/Security/CWE/CWE-022/ZipSlip.ql @@ -6,7 +6,7 @@ * @kind path-problem * @id java/zipslip * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-022 diff --git a/java/ql/src/Security/CWE/CWE-078/ExecRelative.ql b/java/ql/src/Security/CWE/CWE-078/ExecRelative.ql index f7d844f225a3..501826c6426f 100644 --- a/java/ql/src/Security/CWE/CWE-078/ExecRelative.ql +++ b/java/ql/src/Security/CWE/CWE-078/ExecRelative.ql @@ -4,7 +4,7 @@ * malicious changes in the PATH environment variable. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id java/relative-path-command * @tags security diff --git a/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql b/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql index fc409bcfd5a1..e95d81dcf069 100644 --- a/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql +++ b/java/ql/src/Security/CWE/CWE-078/ExecTainted.ql @@ -4,7 +4,7 @@ * changes in the strings. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/command-line-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql index c98a45a06d8e..febd020db461 100644 --- a/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql +++ b/java/ql/src/Security/CWE/CWE-078/ExecTaintedLocal.ql @@ -4,7 +4,7 @@ * changes in the strings. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id java/command-line-injection-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-078/ExecUnescaped.ql b/java/ql/src/Security/CWE/CWE-078/ExecUnescaped.ql index a3b88b40ae7c..d250b242c054 100644 --- a/java/ql/src/Security/CWE/CWE-078/ExecUnescaped.ql +++ b/java/ql/src/Security/CWE/CWE-078/ExecUnescaped.ql @@ -4,7 +4,7 @@ * insertion of special characters in the strings. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/concatenated-command-line * @tags security diff --git a/java/ql/src/Security/CWE/CWE-079/XSS.ql b/java/ql/src/Security/CWE/CWE-079/XSS.ql index d864d24a95e6..f1f8a5afa9bd 100644 --- a/java/ql/src/Security/CWE/CWE-079/XSS.ql +++ b/java/ql/src/Security/CWE/CWE-079/XSS.ql @@ -4,7 +4,7 @@ * allows for a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id java/xss * @tags security diff --git a/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql b/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql index 44ab185b3b52..e16a9bbc2e9e 100644 --- a/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql +++ b/java/ql/src/Security/CWE/CWE-079/XSSLocal.ql @@ -4,7 +4,7 @@ * allows for a cross-site scripting vulnerability. * @kind path-problem * @problem.severity recommendation - * @security-severity 2.9 + * @security-severity 6.1 * @precision medium * @id java/xss-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-089/SqlTainted.ql b/java/ql/src/Security/CWE/CWE-089/SqlTainted.ql index d002bb96ce14..28b09d37dbb1 100644 --- a/java/ql/src/Security/CWE/CWE-089/SqlTainted.ql +++ b/java/ql/src/Security/CWE/CWE-089/SqlTainted.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id java/sql-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql index ada846dcf471..df5807f3f5f7 100644 --- a/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql +++ b/java/ql/src/Security/CWE/CWE-089/SqlTaintedLocal.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity recommendation - * @security-severity 6.4 + * @security-severity 8.8 * @precision medium * @id java/sql-injection-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-089/SqlUnescaped.ql b/java/ql/src/Security/CWE/CWE-089/SqlUnescaped.ql index 9ddd5def8838..6ec2be3e1c84 100644 --- a/java/ql/src/Security/CWE/CWE-089/SqlUnescaped.ql +++ b/java/ql/src/Security/CWE/CWE-089/SqlUnescaped.ql @@ -4,7 +4,7 @@ * characters is vulnerable to insertion of malicious code. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id java/concatenated-sql-query * @tags security diff --git a/java/ql/src/Security/CWE/CWE-090/LdapInjection.ql b/java/ql/src/Security/CWE/CWE-090/LdapInjection.ql index 5a7ab632a558..df57a8100337 100644 --- a/java/ql/src/Security/CWE/CWE-090/LdapInjection.ql +++ b/java/ql/src/Security/CWE/CWE-090/LdapInjection.ql @@ -4,7 +4,7 @@ * malicious LDAP code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/ldap-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql b/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql index f865d7d16b15..a673142f8103 100644 --- a/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql +++ b/java/ql/src/Security/CWE/CWE-094/InsecureBeanValidation.ql @@ -3,7 +3,7 @@ * @description User-controlled data may be evaluated as a Java EL expression, leading to arbitrary code execution. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id java/insecure-bean-validation * @tags security diff --git a/java/ql/src/Security/CWE/CWE-094/JexlInjection.ql b/java/ql/src/Security/CWE/CWE-094/JexlInjection.ql index cf555aa3442b..c780fa60f20a 100644 --- a/java/ql/src/Security/CWE/CWE-094/JexlInjection.ql +++ b/java/ql/src/Security/CWE/CWE-094/JexlInjection.ql @@ -4,7 +4,7 @@ * may lead to arbitrary code execution. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id java/jexl-expression-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql b/java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql index 76fa154ae7b4..350358b69c11 100644 --- a/java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql +++ b/java/ql/src/Security/CWE/CWE-113/NettyResponseSplitting.ql @@ -5,7 +5,7 @@ * an HTTP header. * @kind problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id java/netty-http-response-splitting * @tags security diff --git a/java/ql/src/Security/CWE/CWE-113/ResponseSplitting.ql b/java/ql/src/Security/CWE/CWE-113/ResponseSplitting.ql index 92468d619366..d32e7544f3e4 100644 --- a/java/ql/src/Security/CWE/CWE-113/ResponseSplitting.ql +++ b/java/ql/src/Security/CWE/CWE-113/ResponseSplitting.ql @@ -4,7 +4,7 @@ * makes code vulnerable to attack by header splitting. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id java/http-response-splitting * @tags security diff --git a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql b/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql index ff9a379d1f7d..608636982c9f 100644 --- a/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql +++ b/java/ql/src/Security/CWE/CWE-113/ResponseSplittingLocal.ql @@ -4,7 +4,7 @@ * makes code vulnerable to attack by header splitting. * @kind path-problem * @problem.severity recommendation - * @security-severity 3.6 + * @security-severity 6.1 * @precision medium * @id java/http-response-splitting-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql index ca5d05db10cd..8ccf937355ca 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstruction.ql @@ -3,7 +3,7 @@ * @description Using unvalidated external input as the argument to a construction of an array can lead to index out of bound exceptions. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-construction * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql index f3471027561c..62038fe73a68 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionCodeSpecified.ql @@ -4,7 +4,7 @@ * a construction of an array can lead to index out of bound exceptions. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-construction-code-specified * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql index 94e06109da4d..db7dfc0aec55 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayConstructionLocal.ql @@ -4,7 +4,7 @@ * a construction of an array can lead to index out of bound exceptions. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-construction-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql index 5fe23b564d68..4cc9c58e64f7 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndex.ql @@ -3,7 +3,7 @@ * @description Using external input as an index to an array, without proper validation, can lead to index out of bound exceptions. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-index * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql index 99c819533cb2..79911f5422d9 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexCodeSpecified.ql @@ -4,7 +4,7 @@ * proper validation, can lead to index out of bound exceptions. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-index-code-specified * @tags security diff --git a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql index c246bcff1585..537c47b34ccd 100644 --- a/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql +++ b/java/ql/src/Security/CWE/CWE-129/ImproperValidationOfArrayIndexLocal.ql @@ -4,7 +4,7 @@ * proper validation, can lead to index out of bound exceptions. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.8 * @precision medium * @id java/improper-validation-of-array-index-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql index 0208955e10ff..4e319b388e66 100644 --- a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql +++ b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatString.ql @@ -3,7 +3,7 @@ * @description Using external input in format strings can lead to exceptions or information leaks. * @kind path-problem * @problem.severity error - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id java/tainted-format-string * @tags security diff --git a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql index 5dd2f629393e..36027f97c307 100644 --- a/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql +++ b/java/ql/src/Security/CWE/CWE-134/ExternallyControlledFormatStringLocal.ql @@ -3,7 +3,7 @@ * @description Using external input in format strings can lead to exceptions or information leaks. * @kind path-problem * @problem.severity recommendation - * @security-severity 6.9 + * @security-severity 9.3 * @precision medium * @id java/tainted-format-string-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index 261c68910397..5fa48ee10d15 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -4,7 +4,7 @@ * overflows. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.6 * @precision medium * @id java/tainted-arithmetic * @tags security diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql index 54e3fa1b10a6..20bec26dd9fc 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticTaintedLocal.ql @@ -4,7 +4,7 @@ * overflows. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.6 * @precision medium * @id java/tainted-arithmetic-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index ad67e3b55bc0..9cc3dfbabeb2 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -4,7 +4,7 @@ * overflows. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.6 * @precision medium * @id java/uncontrolled-arithmetic * @tags security diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql index 0ffcbec38e62..5c49e1b3229e 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql @@ -4,7 +4,7 @@ * is then used in an arithmetic expression, this may result in an overflow. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 8.6 * @precision medium * @id java/extreme-value-arithmetic * @tags security diff --git a/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql b/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql index c6e72a94b65b..259f36fb42b5 100644 --- a/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql +++ b/java/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.ql @@ -4,7 +4,7 @@ * to behave unexpectedly. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision medium * @id java/comparison-with-wider-type * @tags reliability diff --git a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql index bf96ee8d1bbb..3b085b609b21 100644 --- a/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql +++ b/java/ql/src/Security/CWE/CWE-209/StackTraceExposure.ql @@ -5,7 +5,7 @@ * that are useful to an attacker for developing a subsequent exploit. * @kind problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 5.4 * @precision high * @id java/stack-trace-exposure * @tags security diff --git a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql index d7a5f3749532..1828b924752c 100644 --- a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql +++ b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql @@ -3,7 +3,7 @@ * @description Marking a certificate as valid for a host without checking the certificate hostname allows an attacker to perform a machine-in-the-middle attack. * @kind path-problem * @problem.severity error - * @security-severity 4.9 + * @security-severity 5.9 * @precision high * @id java/unsafe-hostname-verification * @tags security diff --git a/java/ql/src/Security/CWE/CWE-312/CleartextStorageClass.ql b/java/ql/src/Security/CWE/CWE-312/CleartextStorageClass.ql index 00527d4ab609..e14b9bfe552d 100644 --- a/java/ql/src/Security/CWE/CWE-312/CleartextStorageClass.ql +++ b/java/ql/src/Security/CWE/CWE-312/CleartextStorageClass.ql @@ -3,7 +3,7 @@ * @description Storing sensitive information in cleartext can expose it to an attacker. * @kind problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 7.5 * @precision medium * @id java/cleartext-storage-in-class * @tags security diff --git a/java/ql/src/Security/CWE/CWE-312/CleartextStorageCookie.ql b/java/ql/src/Security/CWE/CWE-312/CleartextStorageCookie.ql index 7a3c55379de8..c5a76434dcd6 100644 --- a/java/ql/src/Security/CWE/CWE-312/CleartextStorageCookie.ql +++ b/java/ql/src/Security/CWE/CWE-312/CleartextStorageCookie.ql @@ -3,7 +3,7 @@ * @description Storing sensitive information in cleartext can expose it to an attacker. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 5.0 * @precision high * @id java/cleartext-storage-in-cookie * @tags security diff --git a/java/ql/src/Security/CWE/CWE-312/CleartextStorageProperties.ql b/java/ql/src/Security/CWE/CWE-312/CleartextStorageProperties.ql index 7f05192357de..495fd3f6f208 100644 --- a/java/ql/src/Security/CWE/CWE-312/CleartextStorageProperties.ql +++ b/java/ql/src/Security/CWE/CWE-312/CleartextStorageProperties.ql @@ -3,7 +3,7 @@ * @description Storing sensitive information in cleartext can expose it to an attacker. * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @id java/cleartext-storage-in-properties * @tags security diff --git a/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql b/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql index 544197f0252e..001afb8efb1d 100644 --- a/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql +++ b/java/ql/src/Security/CWE/CWE-319/HttpsUrls.ql @@ -3,7 +3,7 @@ * @description Non-HTTPS connections can be intercepted by third parties. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id java/non-https-url * @tags security diff --git a/java/ql/src/Security/CWE/CWE-319/UseSSL.ql b/java/ql/src/Security/CWE/CWE-319/UseSSL.ql index b4fabf15940a..1b267af52cfc 100644 --- a/java/ql/src/Security/CWE/CWE-319/UseSSL.ql +++ b/java/ql/src/Security/CWE/CWE-319/UseSSL.ql @@ -3,7 +3,7 @@ * @description Non-SSL connections can be intercepted by third parties. * @kind problem * @problem.severity recommendation - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id java/non-ssl-connection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql b/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql index 6fa51d4caf28..5defe0cd612c 100644 --- a/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql +++ b/java/ql/src/Security/CWE/CWE-319/UseSSLSocketFactories.ql @@ -4,7 +4,7 @@ * third parties. * @kind problem * @problem.severity recommendation - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id java/non-ssl-socket-factory * @tags security diff --git a/java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index 194d7ecf7d5a..5c8a5b51df04 100644 --- a/java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -3,7 +3,7 @@ * @description Using broken or weak cryptographic algorithms can allow an attacker to compromise security. * @kind path-problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id java/weak-cryptographic-algorithm * @tags security diff --git a/java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql b/java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql index fac3d66f2b8e..1b99c53561bb 100644 --- a/java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql +++ b/java/ql/src/Security/CWE/CWE-327/MaybeBrokenCryptoAlgorithm.ql @@ -3,7 +3,7 @@ * @description Using broken or weak cryptographic algorithms can allow an attacker to compromise security. * @kind path-problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id java/potentially-weak-cryptographic-algorithm * @tags security diff --git a/java/ql/src/Security/CWE/CWE-335/PredictableSeed.ql b/java/ql/src/Security/CWE/CWE-335/PredictableSeed.ql index 2cd7bbae1dd7..9b873aa407fa 100644 --- a/java/ql/src/Security/CWE/CWE-335/PredictableSeed.ql +++ b/java/ql/src/Security/CWE/CWE-335/PredictableSeed.ql @@ -3,7 +3,7 @@ * @description Using a predictable seed in a pseudo-random number generator can lead to predictability of the numbers generated by it. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/predictable-seed * @tags security diff --git a/java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.ql b/java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.ql index 6a456fbae322..9a530e5078f2 100644 --- a/java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.ql +++ b/java/ql/src/Security/CWE/CWE-338/JHipsterGeneratedPRNG.ql @@ -3,7 +3,7 @@ * @description Using a vulnerable version of JHipster to generate random numbers makes it easier for attackers to take over accounts. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision very-high * @id java/jhipster-prng * @tags security diff --git a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql index d7fe7b8611ea..9bca9dc3ed9f 100644 --- a/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql +++ b/java/ql/src/Security/CWE/CWE-352/SpringCSRFProtection.ql @@ -4,7 +4,7 @@ * a Cross-Site Request Forgery (CSRF) attack. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id java/spring-disabled-csrf-protection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-367/TOCTOURace.ql b/java/ql/src/Security/CWE/CWE-367/TOCTOURace.ql index 740dd6ba3146..2fb46ad8943f 100644 --- a/java/ql/src/Security/CWE/CWE-367/TOCTOURace.ql +++ b/java/ql/src/Security/CWE/CWE-367/TOCTOURace.ql @@ -4,7 +4,7 @@ * if the state may be changed between the check and use. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.7 * @precision medium * @id java/toctou-race-condition * @tags security diff --git a/java/ql/src/Security/CWE/CWE-421/SocketAuthRace.ql b/java/ql/src/Security/CWE/CWE-421/SocketAuthRace.ql index d4301a3d620d..c8515f2b0850 100644 --- a/java/ql/src/Security/CWE/CWE-421/SocketAuthRace.ql +++ b/java/ql/src/Security/CWE/CWE-421/SocketAuthRace.ql @@ -3,7 +3,7 @@ * @description Opening a socket after authenticating via a different channel may allow an attacker to connect to the port first. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 7.2 * @precision medium * @id java/socket-auth-race-condition * @tags security diff --git a/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.ql b/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.ql index 82dd42c3c32d..1e7f734a8752 100644 --- a/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.ql +++ b/java/ql/src/Security/CWE/CWE-502/UnsafeDeserialization.ql @@ -4,7 +4,7 @@ * execute arbitrary code. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/unsafe-deserialization * @tags security diff --git a/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql b/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql index 7d072091245e..02840afaf653 100644 --- a/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql +++ b/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity error - * @security-severity 2.7 + * @security-severity 6.1 * @precision high * @id java/unvalidated-url-redirection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql b/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql index 4f60a15d8a64..a8157748d7bf 100644 --- a/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql +++ b/java/ql/src/Security/CWE/CWE-601/UrlRedirectLocal.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity recommendation - * @security-severity 2.7 + * @security-severity 6.1 * @precision medium * @id java/unvalidated-url-redirection-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-611/XXE.ql b/java/ql/src/Security/CWE/CWE-611/XXE.ql index dc277337769e..bfcedb19d170 100644 --- a/java/ql/src/Security/CWE/CWE-611/XXE.ql +++ b/java/ql/src/Security/CWE/CWE-611/XXE.ql @@ -4,7 +4,7 @@ * references may lead to disclosure of confidential data or denial of service. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.1 * @precision high * @id java/xxe * @tags security diff --git a/java/ql/src/Security/CWE/CWE-614/InsecureCookie.ql b/java/ql/src/Security/CWE/CWE-614/InsecureCookie.ql index ef6d143ece89..d71be47bc79e 100644 --- a/java/ql/src/Security/CWE/CWE-614/InsecureCookie.ql +++ b/java/ql/src/Security/CWE/CWE-614/InsecureCookie.ql @@ -4,7 +4,7 @@ * interception. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 5.0 * @precision high * @id java/insecure-cookie * @tags security diff --git a/java/ql/src/Security/CWE/CWE-643/XPathInjection.ql b/java/ql/src/Security/CWE/CWE-643/XPathInjection.ql index 0dd733705694..9e2d1c1a2ac4 100644 --- a/java/ql/src/Security/CWE/CWE-643/XPathInjection.ql +++ b/java/ql/src/Security/CWE/CWE-643/XPathInjection.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id java/xml/xpath-injection * @tags security diff --git a/java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql b/java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql index 0518b99e2211..fcc2651ae9e7 100644 --- a/java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql +++ b/java/ql/src/Security/CWE/CWE-681/NumericCastTainted.ql @@ -4,7 +4,7 @@ * can cause unexpected truncation. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.0 * @precision high * @id java/tainted-numeric-cast * @tags security diff --git a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql b/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql index 519e4c398ee4..ad02cb21bc75 100644 --- a/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql +++ b/java/ql/src/Security/CWE/CWE-681/NumericCastTaintedLocal.ql @@ -4,7 +4,7 @@ * can cause unexpected truncation. * @kind path-problem * @problem.severity recommendation - * @security-severity 5.9 + * @security-severity 9.0 * @precision medium * @id java/tainted-numeric-cast-local * @tags security diff --git a/java/ql/src/Security/CWE/CWE-732/ReadingFromWorldWritableFile.ql b/java/ql/src/Security/CWE/CWE-732/ReadingFromWorldWritableFile.ql index 3797f11dfd5a..7d2a309c6c05 100644 --- a/java/ql/src/Security/CWE/CWE-732/ReadingFromWorldWritableFile.ql +++ b/java/ql/src/Security/CWE/CWE-732/ReadingFromWorldWritableFile.ql @@ -4,7 +4,7 @@ * the file may be modified or removed by external actors. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id java/world-writable-file-read * @tags security diff --git a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql index 5300e3864efd..13cb2a7a69d4 100644 --- a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql +++ b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql @@ -3,7 +3,7 @@ * @description Using a hard-coded credential in a call to a sensitive Java API may compromise security. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id java/hardcoded-credential-api-call * @tags security diff --git a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql index 8583f4bef391..d43530f7d697 100644 --- a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql +++ b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql @@ -3,7 +3,7 @@ * @description Comparing a parameter to a hard-coded credential may compromise security. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision low * @id java/hardcoded-credential-comparison * @tags security diff --git a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql index 724916f15119..e14188905fa9 100644 --- a/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql +++ b/java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql @@ -3,7 +3,7 @@ * @description Using a hard-coded credential in a sensitive call may compromise security. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision low * @id java/hardcoded-credential-sensitive-call * @tags security diff --git a/java/ql/src/Security/CWE/CWE-798/HardcodedPasswordField.ql b/java/ql/src/Security/CWE/CWE-798/HardcodedPasswordField.ql index 4464268a5ec2..0a98c000300f 100644 --- a/java/ql/src/Security/CWE/CWE-798/HardcodedPasswordField.ql +++ b/java/ql/src/Security/CWE/CWE-798/HardcodedPasswordField.ql @@ -3,7 +3,7 @@ * @description Hard-coding a password string may compromise security. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision low * @id java/hardcoded-password-field * @tags security diff --git a/java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql b/java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql index 6f1c7275bb46..0dca7acd64de 100644 --- a/java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql +++ b/java/ql/src/Security/CWE/CWE-807/ConditionalBypass.ql @@ -4,7 +4,7 @@ * passing through authentication systems. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id java/user-controlled-bypass * @tags security diff --git a/java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql b/java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql index 7eb03c1ecd71..beabdead5af6 100644 --- a/java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql +++ b/java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql @@ -4,7 +4,7 @@ * permissions being granted. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id java/tainted-permissions-check * @tags security diff --git a/java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql b/java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql index d3b833eaf721..0123354572da 100644 --- a/java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql +++ b/java/ql/src/Security/CWE/CWE-829/InsecureDependencyResolution.ql @@ -3,7 +3,7 @@ * @description Non-HTTPS connections can be intercepted by third parties. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.1 * @precision very-high * @id java/maven/non-https-url * @tags security diff --git a/java/ql/src/Security/CWE/CWE-833/LockOrderInconsistency.ql b/java/ql/src/Security/CWE/CWE-833/LockOrderInconsistency.ql index 241965f4b090..5ad653bd6dd7 100644 --- a/java/ql/src/Security/CWE/CWE-833/LockOrderInconsistency.ql +++ b/java/ql/src/Security/CWE/CWE-833/LockOrderInconsistency.ql @@ -3,7 +3,7 @@ * @description Acquiring multiple locks in a different order may cause deadlock. * @kind problem * @problem.severity recommendation - * @security-severity 6.9 + * @security-severity 5.0 * @precision medium * @id java/lock-order-inconsistency * @tags security diff --git a/java/ql/src/Security/CWE/CWE-835/InfiniteLoop.ql b/java/ql/src/Security/CWE/CWE-835/InfiniteLoop.ql index 4fe1c38c6d55..35f951d6d529 100644 --- a/java/ql/src/Security/CWE/CWE-835/InfiniteLoop.ql +++ b/java/ql/src/Security/CWE/CWE-835/InfiniteLoop.ql @@ -5,7 +5,7 @@ * looping. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision medium * @id java/unreachable-exit-in-loop * @tags security diff --git a/javascript/ql/src/AngularJS/DisablingSce.ql b/javascript/ql/src/AngularJS/DisablingSce.ql index eae9a924a2c8..7ec1b5405b21 100644 --- a/javascript/ql/src/AngularJS/DisablingSce.ql +++ b/javascript/ql/src/AngularJS/DisablingSce.ql @@ -3,7 +3,7 @@ * @description Disabling strict contextual escaping (SCE) can cause security vulnerabilities. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision very-high * @id js/angular/disabling-sce * @tags security diff --git a/javascript/ql/src/AngularJS/DoubleCompilation.ql b/javascript/ql/src/AngularJS/DoubleCompilation.ql index e81351ea0d49..95f088d20ce2 100644 --- a/javascript/ql/src/AngularJS/DoubleCompilation.ql +++ b/javascript/ql/src/AngularJS/DoubleCompilation.ql @@ -4,7 +4,7 @@ * unexpected behavior of directives, performance problems, and memory leaks. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.8 * @id js/angular/double-compilation * @tags reliability * frameworks/angularjs diff --git a/javascript/ql/src/AngularJS/InsecureUrlWhitelist.ql b/javascript/ql/src/AngularJS/InsecureUrlWhitelist.ql index b17c3188328c..ac4c4772f11d 100644 --- a/javascript/ql/src/AngularJS/InsecureUrlWhitelist.ql +++ b/javascript/ql/src/AngularJS/InsecureUrlWhitelist.ql @@ -3,7 +3,7 @@ * @description URL whitelists that are too permissive can cause security vulnerabilities. * @kind problem * @problem.severity warning - * @security-severity 6.4 + * @security-severity 7.5 * @precision very-high * @id js/angular/insecure-url-whitelist * @tags security diff --git a/javascript/ql/src/DOM/TargetBlank.ql b/javascript/ql/src/DOM/TargetBlank.ql index 588552c9bff4..8d16a60bc831 100644 --- a/javascript/ql/src/DOM/TargetBlank.ql +++ b/javascript/ql/src/DOM/TargetBlank.ql @@ -4,7 +4,7 @@ * link type 'noopener' or 'noreferrer' are a potential security risk. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @id js/unsafe-external-link * @tags maintainability * security diff --git a/javascript/ql/src/Electron/AllowRunningInsecureContent.ql b/javascript/ql/src/Electron/AllowRunningInsecureContent.ql index 8a4535992d92..327caf9a4bdc 100644 --- a/javascript/ql/src/Electron/AllowRunningInsecureContent.ql +++ b/javascript/ql/src/Electron/AllowRunningInsecureContent.ql @@ -3,7 +3,7 @@ * @description Enabling allowRunningInsecureContent can allow remote code execution. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 8.8 * @precision very-high * @tags security * frameworks/electron diff --git a/javascript/ql/src/Electron/DisablingWebSecurity.ql b/javascript/ql/src/Electron/DisablingWebSecurity.ql index 07b4d98ad3cb..a2b0c0a8a01f 100644 --- a/javascript/ql/src/Electron/DisablingWebSecurity.ql +++ b/javascript/ql/src/Electron/DisablingWebSecurity.ql @@ -3,7 +3,7 @@ * @description Disabling webSecurity can cause critical security vulnerabilities. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision very-high * @tags security * frameworks/electron diff --git a/javascript/ql/src/Electron/EnablingNodeIntegration.ql b/javascript/ql/src/Electron/EnablingNodeIntegration.ql index 6bf424d52e9a..074470b6a645 100644 --- a/javascript/ql/src/Electron/EnablingNodeIntegration.ql +++ b/javascript/ql/src/Electron/EnablingNodeIntegration.ql @@ -3,7 +3,7 @@ * @description Enabling `nodeIntegration` or `nodeIntegrationInWorker` can expose the application to remote code execution. * @kind problem * @problem.severity warning - * @security-severity 10.0 + * @security-severity 9.3 * @precision low * @id js/enabling-electron-renderer-node-integration * @tags security diff --git a/javascript/ql/src/Performance/PolynomialReDoS.ql b/javascript/ql/src/Performance/PolynomialReDoS.ql index d463b450bfef..5f46b36b5e19 100644 --- a/javascript/ql/src/Performance/PolynomialReDoS.ql +++ b/javascript/ql/src/Performance/PolynomialReDoS.ql @@ -4,7 +4,7 @@ * to match may be vulnerable to denial-of-service attacks. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/polynomial-redos * @tags security diff --git a/javascript/ql/src/Performance/ReDoS.ql b/javascript/ql/src/Performance/ReDoS.ql index 39b8dbce9b3f..804e59fe813a 100644 --- a/javascript/ql/src/Performance/ReDoS.ql +++ b/javascript/ql/src/Performance/ReDoS.ql @@ -5,7 +5,7 @@ * attacks. * @kind problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/redos * @tags security diff --git a/javascript/ql/src/RegExp/IdentityReplacement.ql b/javascript/ql/src/RegExp/IdentityReplacement.ql index 8d74e7350537..0949423aa8b5 100644 --- a/javascript/ql/src/RegExp/IdentityReplacement.ql +++ b/javascript/ql/src/RegExp/IdentityReplacement.ql @@ -3,7 +3,7 @@ * @description Replacing a substring with itself has no effect and may indicate a mistake. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @id js/identity-replacement * @precision very-high * @tags correctness diff --git a/javascript/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql b/javascript/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql index ba4db85c4485..bd0958870115 100644 --- a/javascript/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql +++ b/javascript/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql @@ -3,7 +3,7 @@ * @description Matching a URL or hostname against a regular expression that contains an unescaped dot as part of the hostname might match more hostnames than expected. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incomplete-hostname-regexp * @tags correctness diff --git a/javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql b/javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql index a40924a13114..81276ff98aa2 100644 --- a/javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql +++ b/javascript/ql/src/Security/CWE-020/IncompleteUrlSchemeCheck.ql @@ -4,7 +4,7 @@ * and "data:" suggests a logic error or even a security vulnerability. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incomplete-url-scheme-check * @tags security diff --git a/javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql b/javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql index a9e2366c4a26..56ab631d1e14 100644 --- a/javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql +++ b/javascript/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql @@ -3,7 +3,7 @@ * @description Security checks on the substrings of an unparsed URL are often vulnerable to bypassing. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incomplete-url-substring-sanitization * @tags correctness diff --git a/javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql b/javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql index 640f0f5ed345..e6ec89da5345 100644 --- a/javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql +++ b/javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql @@ -3,7 +3,7 @@ * @description Using indexOf to implement endsWith functionality is error-prone if the -1 case is not explicitly handled. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incorrect-suffix-check * @tags security diff --git a/javascript/ql/src/Security/CWE-020/MissingRegExpAnchor.ql b/javascript/ql/src/Security/CWE-020/MissingRegExpAnchor.ql index 4cbd92613e89..cd71f5c6a49c 100644 --- a/javascript/ql/src/Security/CWE-020/MissingRegExpAnchor.ql +++ b/javascript/ql/src/Security/CWE-020/MissingRegExpAnchor.ql @@ -3,7 +3,7 @@ * @description Regular expressions without anchors can be vulnerable to bypassing. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id js/regex/missing-regexp-anchor * @tags correctness diff --git a/javascript/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql b/javascript/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql index 3c87f57f3dff..898e3b616cc4 100644 --- a/javascript/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql +++ b/javascript/ql/src/Security/CWE-020/UntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/javascript/ql/src/Security/CWE-020/UselessRegExpCharacterEscape.ql b/javascript/ql/src/Security/CWE-020/UselessRegExpCharacterEscape.ql index a48fbbb84b94..29933de7848c 100644 --- a/javascript/ql/src/Security/CWE-020/UselessRegExpCharacterEscape.ql +++ b/javascript/ql/src/Security/CWE-020/UselessRegExpCharacterEscape.ql @@ -5,7 +5,7 @@ * behave unexpectedly. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/useless-regexp-character-escape * @tags correctness diff --git a/javascript/ql/src/Security/CWE-022/TaintedPath.ql b/javascript/ql/src/Security/CWE-022/TaintedPath.ql index cda0074aa866..a9b197a28dec 100644 --- a/javascript/ql/src/Security/CWE-022/TaintedPath.ql +++ b/javascript/ql/src/Security/CWE-022/TaintedPath.ql @@ -4,7 +4,7 @@ * unexpected resources. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id js/path-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-022/ZipSlip.ql b/javascript/ql/src/Security/CWE-022/ZipSlip.ql index 4282de767429..8fcb9d7edaa0 100644 --- a/javascript/ql/src/Security/CWE-022/ZipSlip.ql +++ b/javascript/ql/src/Security/CWE-022/ZipSlip.ql @@ -6,7 +6,7 @@ * @kind path-problem * @id js/zipslip * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-022 diff --git a/javascript/ql/src/Security/CWE-073/TemplateObjectInjection.ql b/javascript/ql/src/Security/CWE-073/TemplateObjectInjection.ql index 7f413152df10..17d65433b540 100644 --- a/javascript/ql/src/Security/CWE-073/TemplateObjectInjection.ql +++ b/javascript/ql/src/Security/CWE-073/TemplateObjectInjection.ql @@ -3,7 +3,7 @@ * @description Instantiating a template using a user-controlled object is vulnerable to local file read and potential remote code execution. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id js/template-object-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-078/CommandInjection.ql b/javascript/ql/src/Security/CWE-078/CommandInjection.ql index aa9b3920e06d..59ebd7cc1ee3 100644 --- a/javascript/ql/src/Security/CWE-078/CommandInjection.ql +++ b/javascript/ql/src/Security/CWE-078/CommandInjection.ql @@ -4,7 +4,7 @@ * user to change the meaning of the command. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/command-line-injection * @tags correctness diff --git a/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql b/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql index ae665a250e7d..31bf6cfdf853 100644 --- a/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql +++ b/javascript/ql/src/Security/CWE-078/IndirectCommandInjection.ql @@ -5,7 +5,7 @@ * command-line injection vulnerabilities. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id js/indirect-command-line-injection * @tags correctness diff --git a/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql b/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql index cccb26ec5452..a1c3f879961d 100644 --- a/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql +++ b/javascript/ql/src/Security/CWE-078/ShellCommandInjectionFromEnvironment.ql @@ -4,7 +4,7 @@ * environment may cause subtle bugs or vulnerabilities. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/shell-command-injection-from-environment * @tags correctness diff --git a/javascript/ql/src/Security/CWE-078/UnsafeShellCommandConstruction.ql b/javascript/ql/src/Security/CWE-078/UnsafeShellCommandConstruction.ql index d0d0129e2140..a1dafda39213 100644 --- a/javascript/ql/src/Security/CWE-078/UnsafeShellCommandConstruction.ql +++ b/javascript/ql/src/Security/CWE-078/UnsafeShellCommandConstruction.ql @@ -4,7 +4,7 @@ * user to change the meaning of the command. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/shell-command-constructed-from-input * @tags correctness diff --git a/javascript/ql/src/Security/CWE-078/UselessUseOfCat.ql b/javascript/ql/src/Security/CWE-078/UselessUseOfCat.ql index 81134d6bb5b1..fd29399546a4 100644 --- a/javascript/ql/src/Security/CWE-078/UselessUseOfCat.ql +++ b/javascript/ql/src/Security/CWE-078/UselessUseOfCat.ql @@ -3,7 +3,7 @@ * @description Using the `cat` process to read a file is unnecessarily complex, inefficient, unportable, and can lead to subtle bugs, or even security vulnerabilities. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/unnecessary-use-of-cat * @tags correctness diff --git a/javascript/ql/src/Security/CWE-079/ExceptionXss.ql b/javascript/ql/src/Security/CWE-079/ExceptionXss.ql index b82676dca612..3723bfc99f89 100644 --- a/javascript/ql/src/Security/CWE-079/ExceptionXss.ql +++ b/javascript/ql/src/Security/CWE-079/ExceptionXss.ql @@ -4,7 +4,7 @@ * can lead to a cross-site scripting vulnerability. * @kind path-problem * @problem.severity warning - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/xss-through-exception * @tags security diff --git a/javascript/ql/src/Security/CWE-079/ReflectedXss.ql b/javascript/ql/src/Security/CWE-079/ReflectedXss.ql index 958d5296e71c..9a102fcc57f6 100644 --- a/javascript/ql/src/Security/CWE-079/ReflectedXss.ql +++ b/javascript/ql/src/Security/CWE-079/ReflectedXss.ql @@ -4,7 +4,7 @@ * a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/reflected-xss * @tags security diff --git a/javascript/ql/src/Security/CWE-079/StoredXss.ql b/javascript/ql/src/Security/CWE-079/StoredXss.ql index df674173c28b..ed9aac39bd98 100644 --- a/javascript/ql/src/Security/CWE-079/StoredXss.ql +++ b/javascript/ql/src/Security/CWE-079/StoredXss.ql @@ -4,7 +4,7 @@ * a stored cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/stored-xss * @tags security diff --git a/javascript/ql/src/Security/CWE-079/UnsafeHtmlConstruction.ql b/javascript/ql/src/Security/CWE-079/UnsafeHtmlConstruction.ql index ca4564a59682..cc85e07f61a9 100644 --- a/javascript/ql/src/Security/CWE-079/UnsafeHtmlConstruction.ql +++ b/javascript/ql/src/Security/CWE-079/UnsafeHtmlConstruction.ql @@ -4,7 +4,7 @@ * user to perform a cross-site scripting attack. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/html-constructed-from-input * @tags security diff --git a/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql b/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql index fdbdc74f2a5f..24db75323df8 100644 --- a/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql +++ b/javascript/ql/src/Security/CWE-079/UnsafeJQueryPlugin.ql @@ -3,7 +3,7 @@ * @description A jQuery plugin that unintentionally constructs HTML from some of its options may be unsafe to use for clients. * @kind path-problem * @problem.severity warning - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/unsafe-jquery-plugin * @tags security diff --git a/javascript/ql/src/Security/CWE-079/Xss.ql b/javascript/ql/src/Security/CWE-079/Xss.ql index 7ae8268ca0f7..20aaa86e61a1 100644 --- a/javascript/ql/src/Security/CWE-079/Xss.ql +++ b/javascript/ql/src/Security/CWE-079/Xss.ql @@ -4,7 +4,7 @@ * a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/xss * @tags security diff --git a/javascript/ql/src/Security/CWE-079/XssThroughDom.ql b/javascript/ql/src/Security/CWE-079/XssThroughDom.ql index 9e3b1231346c..3b15e6def61b 100644 --- a/javascript/ql/src/Security/CWE-079/XssThroughDom.ql +++ b/javascript/ql/src/Security/CWE-079/XssThroughDom.ql @@ -4,7 +4,7 @@ * can lead to a cross-site scripting vulnerability. * @kind path-problem * @problem.severity warning - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/xss-through-dom * @tags security diff --git a/javascript/ql/src/Security/CWE-089/SqlInjection.ql b/javascript/ql/src/Security/CWE-089/SqlInjection.ql index 43e7ef9f5deb..4aac9d9a1b77 100644 --- a/javascript/ql/src/Security/CWE-089/SqlInjection.ql +++ b/javascript/ql/src/Security/CWE-089/SqlInjection.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id js/sql-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-094/CodeInjection.ql b/javascript/ql/src/Security/CWE-094/CodeInjection.ql index df22801f5301..4c233079f445 100644 --- a/javascript/ql/src/Security/CWE-094/CodeInjection.ql +++ b/javascript/ql/src/Security/CWE-094/CodeInjection.ql @@ -4,7 +4,7 @@ * code execution. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/code-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql b/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql index e33a2ff38fa8..7a8aedcb8c51 100644 --- a/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql +++ b/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql @@ -3,7 +3,7 @@ * @description Escaping code as HTML does not provide protection against code injection. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/bad-code-sanitization * @tags security diff --git a/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql b/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql index bae55692732f..918f09496afa 100644 --- a/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql +++ b/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql @@ -3,7 +3,7 @@ * @description Invoking user-controlled methods on certain objects can lead to remote code execution. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @precision high * @id js/unsafe-dynamic-method-access * @tags security diff --git a/javascript/ql/src/Security/CWE-116/DoubleEscaping.ql b/javascript/ql/src/Security/CWE-116/DoubleEscaping.ql index 84053c9767e2..6a647db75cd9 100644 --- a/javascript/ql/src/Security/CWE-116/DoubleEscaping.ql +++ b/javascript/ql/src/Security/CWE-116/DoubleEscaping.ql @@ -5,7 +5,7 @@ * and conversely it has to be unescaped last to avoid double-unescaping. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/double-escaping * @tags correctness diff --git a/javascript/ql/src/Security/CWE-116/IncompleteHtmlAttributeSanitization.ql b/javascript/ql/src/Security/CWE-116/IncompleteHtmlAttributeSanitization.ql index a38cc7be61dd..ecfe0f63ea12 100644 --- a/javascript/ql/src/Security/CWE-116/IncompleteHtmlAttributeSanitization.ql +++ b/javascript/ql/src/Security/CWE-116/IncompleteHtmlAttributeSanitization.ql @@ -5,7 +5,7 @@ * scripting vulnerability. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id js/incomplete-html-attribute-sanitization * @tags security diff --git a/javascript/ql/src/Security/CWE-116/IncompleteMultiCharacterSanitization.ql b/javascript/ql/src/Security/CWE-116/IncompleteMultiCharacterSanitization.ql index 326d7c0e3358..1cd23ea44328 100644 --- a/javascript/ql/src/Security/CWE-116/IncompleteMultiCharacterSanitization.ql +++ b/javascript/ql/src/Security/CWE-116/IncompleteMultiCharacterSanitization.ql @@ -3,7 +3,7 @@ * @description A sanitizer that removes a sequence of characters may reintroduce the dangerous sequence. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incomplete-multi-character-sanitization * @tags correctness diff --git a/javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql b/javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql index 1894326a989e..08bb355799af 100644 --- a/javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql +++ b/javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql @@ -4,7 +4,7 @@ * meta-character may be ineffective. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/incomplete-sanitization * @tags correctness diff --git a/javascript/ql/src/Security/CWE-116/UnsafeHtmlExpansion.ql b/javascript/ql/src/Security/CWE-116/UnsafeHtmlExpansion.ql index 5141e3403eff..1ef9e434339e 100644 --- a/javascript/ql/src/Security/CWE-116/UnsafeHtmlExpansion.ql +++ b/javascript/ql/src/Security/CWE-116/UnsafeHtmlExpansion.ql @@ -4,7 +4,7 @@ * tags may lead to cross-site scripting vulnerabilities. * @kind problem * @problem.severity warning - * @security-severity 2.9 + * @security-severity 6.1 * @precision very-high * @id js/unsafe-html-expansion * @tags correctness diff --git a/javascript/ql/src/Security/CWE-117/LogInjection.ql b/javascript/ql/src/Security/CWE-117/LogInjection.ql index 038992e0876f..bcdd80ec543b 100644 --- a/javascript/ql/src/Security/CWE-117/LogInjection.ql +++ b/javascript/ql/src/Security/CWE-117/LogInjection.ql @@ -4,7 +4,7 @@ * insertion of forged log entries by a malicious user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id js/log-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-134/TaintedFormatString.ql b/javascript/ql/src/Security/CWE-134/TaintedFormatString.ql index fff23183a9ac..00b7ea626e5b 100644 --- a/javascript/ql/src/Security/CWE-134/TaintedFormatString.ql +++ b/javascript/ql/src/Security/CWE-134/TaintedFormatString.ql @@ -3,7 +3,7 @@ * @description Using external input in format strings can lead to garbled output. * @kind path-problem * @problem.severity warning - * @security-severity 6.9 + * @security-severity 9.3 * @precision high * @id js/tainted-format-string * @tags security diff --git a/javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql b/javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql index d13c52183496..928b22fdff41 100644 --- a/javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql +++ b/javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql @@ -3,7 +3,7 @@ * @description Directly sending file data in an outbound network request can indicate unauthorized information disclosure. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @precision medium * @id js/file-access-to-http * @tags security diff --git a/javascript/ql/src/Security/CWE-200/PrivateFileExposure.ql b/javascript/ql/src/Security/CWE-200/PrivateFileExposure.ql index 5ea4fbc6a3a6..45e6ab2572cd 100644 --- a/javascript/ql/src/Security/CWE-200/PrivateFileExposure.ql +++ b/javascript/ql/src/Security/CWE-200/PrivateFileExposure.ql @@ -4,7 +4,7 @@ * of private information. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @id js/exposure-of-private-files * @tags security * external/cwe/cwe-200 diff --git a/javascript/ql/src/Security/CWE-201/PostMessageStar.ql b/javascript/ql/src/Security/CWE-201/PostMessageStar.ql index 991eaa3c6e35..cbb3df5cf5d2 100644 --- a/javascript/ql/src/Security/CWE-201/PostMessageStar.ql +++ b/javascript/ql/src/Security/CWE-201/PostMessageStar.ql @@ -5,7 +5,7 @@ * information leaks. * @kind path-problem * @problem.severity error - * @security-severity 1.4 + * @security-severity 4.3 * @precision high * @id js/cross-window-information-leak * @tags security diff --git a/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql b/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql index 1ff12bae7cb0..a5e05eab0bb7 100644 --- a/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql +++ b/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql @@ -5,7 +5,7 @@ * to an attacker for developing a subsequent exploit. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 5.4 * @precision very-high * @id js/stack-trace-exposure * @tags security diff --git a/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql b/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql index a17d41dffc96..2f785bace35e 100644 --- a/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql +++ b/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql @@ -3,7 +3,7 @@ * @description Disabling cryptographic certificate validation can cause security vulnerabilities. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision very-high * @id js/disabling-certificate-validation * @tags security diff --git a/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql b/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql index e2b9f3a9b84a..e99c8076678e 100644 --- a/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql +++ b/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql @@ -4,7 +4,7 @@ * expose it to an attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id js/build-artifact-leak * @tags security diff --git a/javascript/ql/src/Security/CWE-312/CleartextLogging.ql b/javascript/ql/src/Security/CWE-312/CleartextLogging.ql index 99933087daa7..7a3626b4860c 100644 --- a/javascript/ql/src/Security/CWE-312/CleartextLogging.ql +++ b/javascript/ql/src/Security/CWE-312/CleartextLogging.ql @@ -4,7 +4,7 @@ * expose it to an attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id js/clear-text-logging * @tags security diff --git a/javascript/ql/src/Security/CWE-312/CleartextStorage.ql b/javascript/ql/src/Security/CWE-312/CleartextStorage.ql index 6d2fbe2c6a59..ee9944c9b8d9 100644 --- a/javascript/ql/src/Security/CWE-312/CleartextStorage.ql +++ b/javascript/ql/src/Security/CWE-312/CleartextStorage.ql @@ -4,7 +4,7 @@ * attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id js/clear-text-storage-of-sensitive-data * @tags security diff --git a/javascript/ql/src/Security/CWE-313/PasswordInConfigurationFile.ql b/javascript/ql/src/Security/CWE-313/PasswordInConfigurationFile.ql index df6cb0d6046d..4d534248f45c 100644 --- a/javascript/ql/src/Security/CWE-313/PasswordInConfigurationFile.ql +++ b/javascript/ql/src/Security/CWE-313/PasswordInConfigurationFile.ql @@ -3,7 +3,7 @@ * @description Storing unencrypted passwords in configuration files is unsafe. * @kind problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision medium * @id js/password-in-configuration-file * @tags security diff --git a/javascript/ql/src/Security/CWE-327/BadRandomness.ql b/javascript/ql/src/Security/CWE-327/BadRandomness.ql index b6ef62f3eeaf..41b0602da651 100644 --- a/javascript/ql/src/Security/CWE-327/BadRandomness.ql +++ b/javascript/ql/src/Security/CWE-327/BadRandomness.ql @@ -4,7 +4,7 @@ * the results and compromise security. * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id js/biased-cryptographic-random * @tags security diff --git a/javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql b/javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql index f79c59d9ccc0..32625d62f771 100644 --- a/javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql +++ b/javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql @@ -3,7 +3,7 @@ * @description Using broken or weak cryptographic algorithms can compromise security. * @kind path-problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id js/weak-cryptographic-algorithm * @tags security diff --git a/javascript/ql/src/Security/CWE-338/InsecureRandomness.ql b/javascript/ql/src/Security/CWE-338/InsecureRandomness.ql index 16b32b409bac..66e86f65ffd9 100644 --- a/javascript/ql/src/Security/CWE-338/InsecureRandomness.ql +++ b/javascript/ql/src/Security/CWE-338/InsecureRandomness.ql @@ -5,7 +5,7 @@ * be generated. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id js/insecure-randomness * @tags security diff --git a/javascript/ql/src/Security/CWE-346/CorsMisconfigurationForCredentials.ql b/javascript/ql/src/Security/CWE-346/CorsMisconfigurationForCredentials.ql index 1a7d592498bf..185533f93fb2 100644 --- a/javascript/ql/src/Security/CWE-346/CorsMisconfigurationForCredentials.ql +++ b/javascript/ql/src/Security/CWE-346/CorsMisconfigurationForCredentials.ql @@ -3,7 +3,7 @@ * @description Misconfiguration of CORS HTTP headers allows for leaks of secret credentials. * @kind path-problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id js/cors-misconfiguration-for-credentials * @tags security diff --git a/javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql b/javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql index d18fae34091f..4aed89d69f74 100644 --- a/javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql +++ b/javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql @@ -4,7 +4,7 @@ * submit requests on behalf of the user. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id js/missing-token-validation * @tags security diff --git a/javascript/ql/src/Security/CWE-400/DeepObjectResourceExhaustion.ql b/javascript/ql/src/Security/CWE-400/DeepObjectResourceExhaustion.ql index 9c18a5fe6866..3e2ab24f70d5 100644 --- a/javascript/ql/src/Security/CWE-400/DeepObjectResourceExhaustion.ql +++ b/javascript/ql/src/Security/CWE-400/DeepObjectResourceExhaustion.ql @@ -3,7 +3,7 @@ * @description Processing user-controlled object hierarchies inefficiently can lead to denial of service. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/resource-exhaustion-from-deep-object-traversal * @tags security diff --git a/javascript/ql/src/Security/CWE-400/RemotePropertyInjection.ql b/javascript/ql/src/Security/CWE-400/RemotePropertyInjection.ql index 1cb5511cda36..4bfbbd85d237 100644 --- a/javascript/ql/src/Security/CWE-400/RemotePropertyInjection.ql +++ b/javascript/ql/src/Security/CWE-400/RemotePropertyInjection.ql @@ -4,7 +4,7 @@ * denial-of-service attacks. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision medium * @id js/remote-property-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-451/MissingXFrameOptions.ql b/javascript/ql/src/Security/CWE-451/MissingXFrameOptions.ql index e21bffa64989..316af8d4a363 100644 --- a/javascript/ql/src/Security/CWE-451/MissingXFrameOptions.ql +++ b/javascript/ql/src/Security/CWE-451/MissingXFrameOptions.ql @@ -4,7 +4,7 @@ * overlay their own UI on top of the site by using an iframe. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision low * @id js/missing-x-frame-options * @tags security diff --git a/javascript/ql/src/Security/CWE-502/UnsafeDeserialization.ql b/javascript/ql/src/Security/CWE-502/UnsafeDeserialization.ql index 795c9372527f..89302f775f26 100644 --- a/javascript/ql/src/Security/CWE-502/UnsafeDeserialization.ql +++ b/javascript/ql/src/Security/CWE-502/UnsafeDeserialization.ql @@ -4,7 +4,7 @@ * execute arbitrary code. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/unsafe-deserialization * @tags security diff --git a/javascript/ql/src/Security/CWE-506/HardcodedDataInterpretedAsCode.ql b/javascript/ql/src/Security/CWE-506/HardcodedDataInterpretedAsCode.ql index e1e68854227d..f0dfe833b063 100644 --- a/javascript/ql/src/Security/CWE-506/HardcodedDataInterpretedAsCode.ql +++ b/javascript/ql/src/Security/CWE-506/HardcodedDataInterpretedAsCode.ql @@ -5,7 +5,7 @@ * be avoided. * @kind path-problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 9.1 * @precision medium * @id js/hardcoded-data-interpreted-as-code * @tags security diff --git a/javascript/ql/src/Security/CWE-601/ClientSideUrlRedirect.ql b/javascript/ql/src/Security/CWE-601/ClientSideUrlRedirect.ql index a93dfd8dc342..9e2987c966f5 100644 --- a/javascript/ql/src/Security/CWE-601/ClientSideUrlRedirect.ql +++ b/javascript/ql/src/Security/CWE-601/ClientSideUrlRedirect.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision high * @id js/client-side-unvalidated-url-redirection * @tags security diff --git a/javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.ql b/javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.ql index d0d68278ff08..3440d9ee405e 100644 --- a/javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.ql +++ b/javascript/ql/src/Security/CWE-601/ServerSideUrlRedirect.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity warning - * @security-severity 2.7 + * @security-severity 6.1 * @id js/server-side-unvalidated-url-redirection * @tags security * external/cwe/cwe-601 diff --git a/javascript/ql/src/Security/CWE-611/Xxe.ql b/javascript/ql/src/Security/CWE-611/Xxe.ql index 42ff8cc23388..b2733d068a22 100644 --- a/javascript/ql/src/Security/CWE-611/Xxe.ql +++ b/javascript/ql/src/Security/CWE-611/Xxe.ql @@ -4,7 +4,7 @@ * entity expansion is vulnerable to XXE attacks. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.1 * @precision high * @id js/xxe * @tags security diff --git a/javascript/ql/src/Security/CWE-640/HostHeaderPoisoningInEmailGeneration.ql b/javascript/ql/src/Security/CWE-640/HostHeaderPoisoningInEmailGeneration.ql index 332d29e0cb7d..a2e24a9dd428 100644 --- a/javascript/ql/src/Security/CWE-640/HostHeaderPoisoningInEmailGeneration.ql +++ b/javascript/ql/src/Security/CWE-640/HostHeaderPoisoningInEmailGeneration.ql @@ -4,7 +4,7 @@ * attacks and leak password reset tokens. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/host-header-forgery-in-email-generation * @tags security diff --git a/javascript/ql/src/Security/CWE-643/XpathInjection.ql b/javascript/ql/src/Security/CWE-643/XpathInjection.ql index 675b078a5d64..5aa4142cde77 100644 --- a/javascript/ql/src/Security/CWE-643/XpathInjection.ql +++ b/javascript/ql/src/Security/CWE-643/XpathInjection.ql @@ -4,7 +4,7 @@ * malicious code by the user. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/xpath-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-730/RegExpInjection.ql b/javascript/ql/src/Security/CWE-730/RegExpInjection.ql index cd7ee8a2509a..4278df33f8a4 100644 --- a/javascript/ql/src/Security/CWE-730/RegExpInjection.ql +++ b/javascript/ql/src/Security/CWE-730/RegExpInjection.ql @@ -5,7 +5,7 @@ * exponential time on certain inputs. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/regex-injection * @tags security diff --git a/javascript/ql/src/Security/CWE-730/ServerCrash.ql b/javascript/ql/src/Security/CWE-730/ServerCrash.ql index a05351f851fc..7c16287d48cf 100644 --- a/javascript/ql/src/Security/CWE-730/ServerCrash.ql +++ b/javascript/ql/src/Security/CWE-730/ServerCrash.ql @@ -4,7 +4,7 @@ * attacks. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/server-crash * @tags security diff --git a/javascript/ql/src/Security/CWE-754/UnvalidatedDynamicMethodCall.ql b/javascript/ql/src/Security/CWE-754/UnvalidatedDynamicMethodCall.ql index f21382d68d9f..088d98bbbcba 100644 --- a/javascript/ql/src/Security/CWE-754/UnvalidatedDynamicMethodCall.ql +++ b/javascript/ql/src/Security/CWE-754/UnvalidatedDynamicMethodCall.ql @@ -4,7 +4,7 @@ * an unexpected target, which could cause an exception. * @kind path-problem * @problem.severity warning - * @security-severity 4.2 + * @security-severity 7.5 * @precision high * @id js/unvalidated-dynamic-method-call * @tags security diff --git a/javascript/ql/src/Security/CWE-770/MissingRateLimiting.ql b/javascript/ql/src/Security/CWE-770/MissingRateLimiting.ql index 6827b23d0672..9ed860fd169c 100644 --- a/javascript/ql/src/Security/CWE-770/MissingRateLimiting.ql +++ b/javascript/ql/src/Security/CWE-770/MissingRateLimiting.ql @@ -5,7 +5,7 @@ * to denial-of-service attacks. * @kind problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/missing-rate-limiting * @tags security diff --git a/javascript/ql/src/Security/CWE-776/XmlBomb.ql b/javascript/ql/src/Security/CWE-776/XmlBomb.ql index 26c16a37bf0b..5320236421c8 100644 --- a/javascript/ql/src/Security/CWE-776/XmlBomb.ql +++ b/javascript/ql/src/Security/CWE-776/XmlBomb.ql @@ -4,7 +4,7 @@ * entity expansion is vulnerable to denial-of-service attacks. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 7.5 * @precision high * @id js/xml-bomb * @tags security diff --git a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql index c17bfac7836b..60269e8a6349 100644 --- a/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/javascript/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -4,7 +4,7 @@ * to gain unauthorized access. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/hardcoded-credentials * @tags security diff --git a/javascript/ql/src/Security/CWE-807/ConditionalBypass.ql b/javascript/ql/src/Security/CWE-807/ConditionalBypass.ql index a94780bec1ef..ee88eec03d2f 100644 --- a/javascript/ql/src/Security/CWE-807/ConditionalBypass.ql +++ b/javascript/ql/src/Security/CWE-807/ConditionalBypass.ql @@ -3,7 +3,7 @@ * @description Conditions that the user controls are not suited for making security-related decisions. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision medium * @id js/user-controlled-bypass * @tags security diff --git a/javascript/ql/src/Security/CWE-807/DifferentKindsComparisonBypass.ql b/javascript/ql/src/Security/CWE-807/DifferentKindsComparisonBypass.ql index d8cf7ef37164..20cd64466832 100644 --- a/javascript/ql/src/Security/CWE-807/DifferentKindsComparisonBypass.ql +++ b/javascript/ql/src/Security/CWE-807/DifferentKindsComparisonBypass.ql @@ -3,7 +3,7 @@ * @description Comparing different kinds of HTTP request data may be a symptom of an insufficient security check. * @kind problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @precision low * @id js/different-kinds-comparison-bypass * @tags security diff --git a/javascript/ql/src/Security/CWE-829/InsecureDownload.ql b/javascript/ql/src/Security/CWE-829/InsecureDownload.ql index 2df6d29f0386..41fea83ef1f9 100644 --- a/javascript/ql/src/Security/CWE-829/InsecureDownload.ql +++ b/javascript/ql/src/Security/CWE-829/InsecureDownload.ql @@ -4,7 +4,7 @@ * opens up for potential man-in-the-middle attacks. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.1 * @precision high * @id js/insecure-download * @tags security diff --git a/javascript/ql/src/Security/CWE-834/LoopBoundInjection.ql b/javascript/ql/src/Security/CWE-834/LoopBoundInjection.ql index 726f88272fc9..bbbd4da1e9ac 100644 --- a/javascript/ql/src/Security/CWE-834/LoopBoundInjection.ql +++ b/javascript/ql/src/Security/CWE-834/LoopBoundInjection.ql @@ -4,7 +4,7 @@ * property can cause indefinite looping. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.5 * @id js/loop-bound-injection * @tags security * external/cwe/cwe-834 diff --git a/javascript/ql/src/Security/CWE-843/TypeConfusionThroughParameterTampering.ql b/javascript/ql/src/Security/CWE-843/TypeConfusionThroughParameterTampering.ql index 218cb70f5716..8dbef4a8cced 100644 --- a/javascript/ql/src/Security/CWE-843/TypeConfusionThroughParameterTampering.ql +++ b/javascript/ql/src/Security/CWE-843/TypeConfusionThroughParameterTampering.ql @@ -3,7 +3,7 @@ * @description Sanitizing an HTTP request parameter may be ineffective if the user controls its type. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision high * @id js/type-confusion-through-parameter-tampering * @tags security diff --git a/javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql b/javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql index 72393fd4f5a7..3bed7d8c190e 100644 --- a/javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql +++ b/javascript/ql/src/Security/CWE-912/HttpToFileAccess.ql @@ -3,7 +3,7 @@ * @description Writing network data directly to the file system allows arbitrary file upload and might indicate a backdoor. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id js/http-to-file-access * @tags security diff --git a/javascript/ql/src/Security/CWE-915/PrototypePollutingAssignment.ql b/javascript/ql/src/Security/CWE-915/PrototypePollutingAssignment.ql index 4447eef043a5..cdcc474ef928 100644 --- a/javascript/ql/src/Security/CWE-915/PrototypePollutingAssignment.ql +++ b/javascript/ql/src/Security/CWE-915/PrototypePollutingAssignment.ql @@ -5,7 +5,7 @@ * and possibly escalate to remote code execution or cross-site scripting. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id js/prototype-polluting-assignment * @tags security diff --git a/javascript/ql/src/Security/CWE-915/PrototypePollutingFunction.ql b/javascript/ql/src/Security/CWE-915/PrototypePollutingFunction.ql index 3980557174b0..b279c6cbe128 100644 --- a/javascript/ql/src/Security/CWE-915/PrototypePollutingFunction.ql +++ b/javascript/ql/src/Security/CWE-915/PrototypePollutingFunction.ql @@ -4,7 +4,7 @@ * the cause of accidental modification of a built-in prototype object. * @kind path-problem * @problem.severity warning - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id js/prototype-pollution-utility * @tags security diff --git a/javascript/ql/src/Security/CWE-915/PrototypePollutingMergeCall.ql b/javascript/ql/src/Security/CWE-915/PrototypePollutingMergeCall.ql index 2bc625bceddb..53b6378fad8c 100644 --- a/javascript/ql/src/Security/CWE-915/PrototypePollutingMergeCall.ql +++ b/javascript/ql/src/Security/CWE-915/PrototypePollutingMergeCall.ql @@ -5,7 +5,7 @@ * and possibly escalate to remote code execution or cross-site scripting. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 6.1 * @precision high * @id js/prototype-pollution * @tags security diff --git a/javascript/ql/src/Security/CWE-916/InsufficientPasswordHash.ql b/javascript/ql/src/Security/CWE-916/InsufficientPasswordHash.ql index 995ede73f38f..61c341bba028 100644 --- a/javascript/ql/src/Security/CWE-916/InsufficientPasswordHash.ql +++ b/javascript/ql/src/Security/CWE-916/InsufficientPasswordHash.ql @@ -3,7 +3,7 @@ * @description Creating a hash of a password with low computational effort makes the hash vulnerable to password cracking attacks. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 8.1 * @precision high * @id js/insufficient-password-hash * @tags security diff --git a/javascript/ql/src/Security/CWE-918/RequestForgery.ql b/javascript/ql/src/Security/CWE-918/RequestForgery.ql index 8d56a4771771..9697904ce0ea 100644 --- a/javascript/ql/src/Security/CWE-918/RequestForgery.ql +++ b/javascript/ql/src/Security/CWE-918/RequestForgery.ql @@ -3,7 +3,7 @@ * @description Sending network requests with user-controlled data allows for request forgery attacks. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.1 * @precision medium * @id js/request-forgery * @tags security diff --git a/python/ql/src/Expressions/UseofInput.ql b/python/ql/src/Expressions/UseofInput.ql index 68566ab0f955..8d95ce6b241c 100644 --- a/python/ql/src/Expressions/UseofInput.ql +++ b/python/ql/src/Expressions/UseofInput.ql @@ -6,7 +6,7 @@ * correctness * security/cwe/cwe-78 * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @sub-severity high * @precision high * @id py/use-of-input diff --git a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql index e5cc90196d19..9baa6e177757 100644 --- a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql +++ b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql @@ -6,7 +6,7 @@ * @tags security * external/cwe/cwe-200 * @problem.severity error - * @security-severity 3.6 + * @security-severity 6.5 * @sub-severity low * @precision high * @id py/bind-socket-all-network-interfaces diff --git a/python/ql/src/Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql b/python/ql/src/Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql index 17af70d836f1..c1298ed99985 100644 --- a/python/ql/src/Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql +++ b/python/ql/src/Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql @@ -5,7 +5,7 @@ * @kind path-problem * @precision low * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.8 * @tags security external/cwe/cwe-20 */ diff --git a/python/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql b/python/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql index be44f462d53c..7f32419261cb 100644 --- a/python/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql +++ b/python/ql/src/Security/CWE-020/IncompleteHostnameRegExp.ql @@ -3,7 +3,7 @@ * @description Matching a URL or hostname against a regular expression that contains an unescaped dot as part of the hostname might match more hostnames than expected. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id py/incomplete-hostname-regexp * @tags correctness diff --git a/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql b/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql index 5b25f8fe595d..7db2b972da0e 100644 --- a/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql +++ b/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql @@ -3,7 +3,7 @@ * @description Security checks on the substrings of an unparsed URL are often vulnerable to bypassing. * @kind problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @precision high * @id py/incomplete-url-substring-sanitization * @tags correctness diff --git a/python/ql/src/Security/CWE-022/PathInjection.ql b/python/ql/src/Security/CWE-022/PathInjection.ql index 7083f12ab2b4..ed4d9fc6a32f 100644 --- a/python/ql/src/Security/CWE-022/PathInjection.ql +++ b/python/ql/src/Security/CWE-022/PathInjection.ql @@ -3,7 +3,7 @@ * @description Accessing paths influenced by users can allow an attacker to access unexpected resources. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @sub-severity high * @precision high * @id py/path-injection diff --git a/python/ql/src/Security/CWE-022/TarSlip.ql b/python/ql/src/Security/CWE-022/TarSlip.ql index cb6faccd1e29..f671072a6ef1 100644 --- a/python/ql/src/Security/CWE-022/TarSlip.ql +++ b/python/ql/src/Security/CWE-022/TarSlip.ql @@ -6,7 +6,7 @@ * @kind path-problem * @id py/tarslip * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision medium * @tags security * external/cwe/cwe-022 diff --git a/python/ql/src/Security/CWE-078/CommandInjection.ql b/python/ql/src/Security/CWE-078/CommandInjection.ql index 5a2a475ea10b..8eaadf3b6429 100755 --- a/python/ql/src/Security/CWE-078/CommandInjection.ql +++ b/python/ql/src/Security/CWE-078/CommandInjection.ql @@ -4,7 +4,7 @@ * user to change the meaning of the command. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @sub-severity high * @precision high * @id py/command-line-injection diff --git a/python/ql/src/Security/CWE-079/Jinja2WithoutEscaping.ql b/python/ql/src/Security/CWE-079/Jinja2WithoutEscaping.ql index fb443d15d2c7..1ab93ae4a2bc 100644 --- a/python/ql/src/Security/CWE-079/Jinja2WithoutEscaping.ql +++ b/python/ql/src/Security/CWE-079/Jinja2WithoutEscaping.ql @@ -4,7 +4,7 @@ * cause a cross-site scripting vulnerability. * @kind problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @precision medium * @id py/jinja2/autoescape-false * @tags security diff --git a/python/ql/src/Security/CWE-079/ReflectedXss.ql b/python/ql/src/Security/CWE-079/ReflectedXss.ql index ca81f589b0ea..ae037e5aa67d 100644 --- a/python/ql/src/Security/CWE-079/ReflectedXss.ql +++ b/python/ql/src/Security/CWE-079/ReflectedXss.ql @@ -4,7 +4,7 @@ * allows for a cross-site scripting vulnerability. * @kind path-problem * @problem.severity error - * @security-severity 2.9 + * @security-severity 6.1 * @sub-severity high * @precision high * @id py/reflective-xss diff --git a/python/ql/src/Security/CWE-089/SqlInjection.ql b/python/ql/src/Security/CWE-089/SqlInjection.ql index c7ce0ebd4a7c..1d34b1a58f2a 100644 --- a/python/ql/src/Security/CWE-089/SqlInjection.ql +++ b/python/ql/src/Security/CWE-089/SqlInjection.ql @@ -4,7 +4,7 @@ * malicious SQL code by the user. * @kind path-problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 8.8 * @precision high * @id py/sql-injection * @tags security diff --git a/python/ql/src/Security/CWE-094/CodeInjection.ql b/python/ql/src/Security/CWE-094/CodeInjection.ql index 7f7a391db815..980b9bde0408 100644 --- a/python/ql/src/Security/CWE-094/CodeInjection.ql +++ b/python/ql/src/Security/CWE-094/CodeInjection.ql @@ -4,7 +4,7 @@ * code execution. * @kind path-problem * @problem.severity error - * @security-severity 10.0 + * @security-severity 9.3 * @sub-severity high * @precision high * @id py/code-injection diff --git a/python/ql/src/Security/CWE-209/StackTraceExposure.ql b/python/ql/src/Security/CWE-209/StackTraceExposure.ql index c092f3990550..03ebdc844429 100644 --- a/python/ql/src/Security/CWE-209/StackTraceExposure.ql +++ b/python/ql/src/Security/CWE-209/StackTraceExposure.ql @@ -5,7 +5,7 @@ * developing a subsequent exploit. * @kind path-problem * @problem.severity error - * @security-severity 3.6 + * @security-severity 5.4 * @precision high * @id py/stack-trace-exposure * @tags security diff --git a/python/ql/src/Security/CWE-215/FlaskDebug.ql b/python/ql/src/Security/CWE-215/FlaskDebug.ql index f55844ae1b52..0bca0cd2c313 100644 --- a/python/ql/src/Security/CWE-215/FlaskDebug.ql +++ b/python/ql/src/Security/CWE-215/FlaskDebug.ql @@ -3,7 +3,7 @@ * @description Running a Flask app in debug mode may allow an attacker to run arbitrary code through the Werkzeug debugger. * @kind problem * @problem.severity error - * @security-severity 6.4 + * @security-severity 7.5 * @precision high * @id py/flask-debug * @tags security diff --git a/python/ql/src/Security/CWE-295/MissingHostKeyValidation.ql b/python/ql/src/Security/CWE-295/MissingHostKeyValidation.ql index adc04dc2984c..89548d714ce5 100644 --- a/python/ql/src/Security/CWE-295/MissingHostKeyValidation.ql +++ b/python/ql/src/Security/CWE-295/MissingHostKeyValidation.ql @@ -3,7 +3,7 @@ * @description Accepting unknown host keys can allow man-in-the-middle attacks. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id py/paramiko-missing-host-key-validation * @tags security diff --git a/python/ql/src/Security/CWE-295/RequestWithoutValidation.ql b/python/ql/src/Security/CWE-295/RequestWithoutValidation.ql index 97711bacbbb4..5a3819f498ec 100644 --- a/python/ql/src/Security/CWE-295/RequestWithoutValidation.ql +++ b/python/ql/src/Security/CWE-295/RequestWithoutValidation.ql @@ -3,7 +3,7 @@ * @description Making a request without certificate validation can allow man-in-the-middle attacks. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision medium * @id py/request-without-cert-validation * @tags security diff --git a/python/ql/src/Security/CWE-312/CleartextLogging.ql b/python/ql/src/Security/CWE-312/CleartextLogging.ql index c5f4c3345575..61fb693aafb0 100644 --- a/python/ql/src/Security/CWE-312/CleartextLogging.ql +++ b/python/ql/src/Security/CWE-312/CleartextLogging.ql @@ -4,7 +4,7 @@ * expose it to an attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id py/clear-text-logging-sensitive-data * @tags security diff --git a/python/ql/src/Security/CWE-312/CleartextStorage.ql b/python/ql/src/Security/CWE-312/CleartextStorage.ql index 8ae5af8ef355..d54fbd94d502 100644 --- a/python/ql/src/Security/CWE-312/CleartextStorage.ql +++ b/python/ql/src/Security/CWE-312/CleartextStorage.ql @@ -4,7 +4,7 @@ * attacker. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id py/clear-text-storage-sensitive-data * @tags security diff --git a/python/ql/src/Security/CWE-326/WeakCryptoKey.ql b/python/ql/src/Security/CWE-326/WeakCryptoKey.ql index 0f48dc91a886..cb62940cc26a 100644 --- a/python/ql/src/Security/CWE-326/WeakCryptoKey.ql +++ b/python/ql/src/Security/CWE-326/WeakCryptoKey.ql @@ -3,7 +3,7 @@ * @description Use of a cryptographic key that is too small may allow the encryption to be broken. * @kind problem * @problem.severity error - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id py/weak-crypto-key * @tags security diff --git a/python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql b/python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql index 9c64ece8b117..9ee3e49a0a1b 100644 --- a/python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql +++ b/python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.ql @@ -3,7 +3,7 @@ * @description Using broken or weak cryptographic algorithms can compromise security. * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @id py/weak-cryptographic-algorithm * @tags security diff --git a/python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql b/python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql index 07dfe9e412a7..5d9c72a3cb18 100644 --- a/python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureDefaultProtocol.ql @@ -5,7 +5,7 @@ * @id py/insecure-default-protocol * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-327 diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index bb9c2f71ca24..540691a4c117 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -4,7 +4,7 @@ * @id py/insecure-protocol * @kind problem * @problem.severity warning - * @security-severity 5.2 + * @security-severity 7.5 * @precision high * @tags security * external/cwe/cwe-327 diff --git a/python/ql/src/Security/CWE-327/WeakSensitiveDataHashing.ql b/python/ql/src/Security/CWE-327/WeakSensitiveDataHashing.ql index e5bc4b95c826..846abd78eaf4 100644 --- a/python/ql/src/Security/CWE-327/WeakSensitiveDataHashing.ql +++ b/python/ql/src/Security/CWE-327/WeakSensitiveDataHashing.ql @@ -3,7 +3,7 @@ * @description Using broken or weak cryptographic hashing algorithms can compromise security. * @kind path-problem * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.5 * @precision high * @id py/weak-sensitive-data-hashing * @tags security diff --git a/python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql b/python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql index d224d35e2f65..05905cda9605 100644 --- a/python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql +++ b/python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql @@ -4,7 +4,7 @@ * @kind problem * @id py/insecure-temporary-file * @problem.severity error - * @security-severity 5.9 + * @security-severity 7.0 * @sub-severity high * @precision high * @tags external/cwe/cwe-377 diff --git a/python/ql/src/Security/CWE-502/UnsafeDeserialization.ql b/python/ql/src/Security/CWE-502/UnsafeDeserialization.ql index 7994431d9402..c054a3706d0a 100644 --- a/python/ql/src/Security/CWE-502/UnsafeDeserialization.ql +++ b/python/ql/src/Security/CWE-502/UnsafeDeserialization.ql @@ -4,7 +4,7 @@ * @kind path-problem * @id py/unsafe-deserialization * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @sub-severity high * @precision high * @tags external/cwe/cwe-502 diff --git a/python/ql/src/Security/CWE-601/UrlRedirect.ql b/python/ql/src/Security/CWE-601/UrlRedirect.ql index 77948b017791..ace3e9bf98db 100644 --- a/python/ql/src/Security/CWE-601/UrlRedirect.ql +++ b/python/ql/src/Security/CWE-601/UrlRedirect.ql @@ -4,7 +4,7 @@ * may cause redirection to malicious web sites. * @kind path-problem * @problem.severity error - * @security-severity 2.7 + * @security-severity 6.1 * @sub-severity low * @id py/url-redirection * @tags security diff --git a/python/ql/src/Security/CWE-732/WeakFilePermissions.ql b/python/ql/src/Security/CWE-732/WeakFilePermissions.ql index e964df073df5..033083ceeb0d 100644 --- a/python/ql/src/Security/CWE-732/WeakFilePermissions.ql +++ b/python/ql/src/Security/CWE-732/WeakFilePermissions.ql @@ -4,7 +4,7 @@ * @kind problem * @id py/overly-permissive-file * @problem.severity warning - * @security-severity 5.9 + * @security-severity 7.8 * @sub-severity high * @precision medium * @tags external/cwe/cwe-732 diff --git a/python/ql/src/Security/CWE-798/HardcodedCredentials.ql b/python/ql/src/Security/CWE-798/HardcodedCredentials.ql index 84bf1e2f16ee..cd00908fe051 100644 --- a/python/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/python/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -3,7 +3,7 @@ * @description Credentials are hard coded in the source code of the application. * @kind path-problem * @problem.severity error - * @security-severity 5.9 + * @security-severity 9.8 * @precision medium * @id py/hardcoded-credentials * @tags security From d4b05547ba3d461e00efcf13ff4e186dd2169e50 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 13:41:33 +0000 Subject: [PATCH 1323/1662] Python: Add `MethodCallNode` class Roughly patterned after the JS equivalent. --- .../dataflow/new/internal/DataFlowPublic.qll | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 03912ca1b867..0a3e68024df9 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -180,6 +180,30 @@ class CallCfgNode extends CfgNode, LocalSourceNode { Node getArgByName(string name) { result.asCfgNode() = node.getArgByName(name) } } +/** + * A data-flow node corresponding to a method call, that is `foo.bar(...)`. + * + * Also covers the case where the method lookup is done separately from the call itself, as in + * `temp = foo.bar; temp(...)`. + */ +class MethodCallNode extends CallCfgNode { + AttrRead method_lookup; + + MethodCallNode() { method_lookup = this.getFunction().getALocalSource() } + + /** Gets the name of the method being invoked (the `bar` in `foo.bar(...)`, if it can be determined. */ + string getMethodName() { result = method_lookup.getAttributeName() } + + /** Gets the data-flow node corresponding to the receiver of this call. That is, the `foo` in `foo.bar(...)`. */ + Node getReceiver() { result = method_lookup.getObject() } + + /** Holds if this data-flow node calls method `methodName` on receiver node `receiver`. */ + predicate calls(Node receiver, string methodName) { + receiver = this.getReceiver() and + methodName = this.getMethodName() + } +} + /** * An expression, viewed as a node in a data flow graph. * From 82fab3ba751d16f88ed6050083ac15b2f68501d7 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 14:35:55 +0000 Subject: [PATCH 1324/1662] Python: Clean up `Cryptography.qll` --- .../semmle/python/frameworks/Cryptography.qll | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Cryptography.qll b/python/ql/src/semmle/python/frameworks/Cryptography.qll index 7f7e23e7286a..70650f4d3304 100644 --- a/python/ql/src/semmle/python/frameworks/Cryptography.qll +++ b/python/ql/src/semmle/python/frameworks/Cryptography.qll @@ -228,11 +228,7 @@ private module CryptographyModel { /** Gets a reference to the encryptor of a Cipher instance using algorithm with `algorithmName`. */ DataFlow::LocalSourceNode cipherEncryptor(DataFlow::TypeTracker t, string algorithmName) { t.start() and - exists(DataFlow::AttrRead attr | - result.(DataFlow::CallCfgNode).getFunction() = attr and - attr.getAttributeName() = "encryptor" and - attr.getObject() = cipherInstance(algorithmName) - ) + result.(DataFlow::MethodCallNode).calls(cipherInstance(algorithmName), "encryptor") or exists(DataFlow::TypeTracker t2 | result = cipherEncryptor(t2, algorithmName).track(t2, t)) } @@ -249,11 +245,7 @@ private module CryptographyModel { /** Gets a reference to the dncryptor of a Cipher instance using algorithm with `algorithmName`. */ DataFlow::LocalSourceNode cipherDecryptor(DataFlow::TypeTracker t, string algorithmName) { t.start() and - exists(DataFlow::AttrRead attr | - result.(DataFlow::CallCfgNode).getFunction() = attr and - attr.getAttributeName() = "decryptor" and - attr.getObject() = cipherInstance(algorithmName) - ) + result.(DataFlow::MethodCallNode).calls(cipherInstance(algorithmName), "decryptor") or exists(DataFlow::TypeTracker t2 | result = cipherDecryptor(t2, algorithmName).track(t2, t)) } @@ -271,19 +263,12 @@ private module CryptographyModel { * An encrypt or decrypt operation from `cryptography.hazmat.primitives.ciphers`. */ class CryptographyGenericCipherOperation extends Cryptography::CryptographicOperation::Range, - DataFlow::CallCfgNode { + DataFlow::MethodCallNode { string algorithmName; CryptographyGenericCipherOperation() { - exists(DataFlow::AttrRead attr | - this.getFunction() = attr and - attr.getAttributeName() = ["update", "update_into"] and - ( - attr.getObject() = cipherEncryptor(algorithmName) - or - attr.getObject() = cipherDecryptor(algorithmName) - ) - ) + this.getMethodName() in ["update", "update_into"] and + this.getReceiver() in [cipherEncryptor(algorithmName), cipherDecryptor(algorithmName)] } override Cryptography::CryptographicAlgorithm getAlgorithm() { @@ -337,16 +322,10 @@ private module CryptographyModel { * An hashing operation from `cryptography.hazmat.primitives.hashes`. */ class CryptographyGenericHashOperation extends Cryptography::CryptographicOperation::Range, - DataFlow::CallCfgNode { + DataFlow::MethodCallNode { string algorithmName; - CryptographyGenericHashOperation() { - exists(DataFlow::AttrRead attr | - this.getFunction() = attr and - attr.getAttributeName() = "update" and - attr.getObject() = hashInstance(algorithmName) - ) - } + CryptographyGenericHashOperation() { this.calls(hashInstance(algorithmName), "update") } override Cryptography::CryptographicAlgorithm getAlgorithm() { result.matchesName(algorithmName) From e90ec807ef9658210841167c9133b99e20d689e1 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 14:37:24 +0000 Subject: [PATCH 1325/1662] Python: Clean up `Ssl.qll` --- python/ql/src/Security/CWE-327/Ssl.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 73041e3393f7..1538b0af8212 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -39,11 +39,11 @@ API::Node sslContextInstance() { result = API::moduleImport("ssl").getMember(["SSLContext", "create_default_context"]).getReturn() } -class WrapSocketCall extends ConnectionCreation, DataFlow::CallCfgNode { +class WrapSocketCall extends ConnectionCreation, DataFlow::MethodCallNode { WrapSocketCall() { this = sslContextInstance().getMember("wrap_socket").getACall() } override DataFlow::Node getContext() { - result = this.getFunction().(DataFlow::AttrRead).getObject() + result = this.getReceiver() } } From 41ee325bc96d0c828b5dfce7f0d5d27c5e28797e Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 14:37:46 +0000 Subject: [PATCH 1326/1662] Python: Clean up `Stdlib.qll` Not as many opportunities to clean stuff up here. --- .../src/experimental/semmle/python/frameworks/Stdlib.qll | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index 4f3457e0a99b..edf610b26185 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -64,15 +64,14 @@ private module Re { * * See https://docs.python.org/3/library/re.html#regular-expression-objects */ - private class CompiledRegex extends DataFlow::CallCfgNode, RegexExecution::Range { + private class CompiledRegex extends DataFlow::MethodCallNode, RegexExecution::Range { DataFlow::Node regexNode; CompiledRegex() { - exists(DataFlow::CallCfgNode patternCall, DataFlow::AttrRead reMethod | - this.getFunction() = reMethod and + exists(DataFlow::MethodCallNode patternCall | patternCall = API::moduleImport("re").getMember("compile").getACall() and - patternCall.flowsTo(reMethod.getObject()) and - reMethod.getAttributeName() instanceof RegexExecutionMethods and + patternCall.flowsTo(this.getReceiver()) and + this.getMethodName() instanceof RegexExecutionMethods and regexNode = patternCall.getArg(0) ) } From 92063dc1914d898fd9b81660027c4752bf72d3fd Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 15:12:44 +0000 Subject: [PATCH 1327/1662] Python: Add change note --- .../change-notes/2021-06-15-add-method-call-conveniences.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/change-notes/2021-06-15-add-method-call-conveniences.md diff --git a/python/change-notes/2021-06-15-add-method-call-conveniences.md b/python/change-notes/2021-06-15-add-method-call-conveniences.md new file mode 100644 index 000000000000..9bd8c5ac4a21 --- /dev/null +++ b/python/change-notes/2021-06-15-add-method-call-conveniences.md @@ -0,0 +1,5 @@ +lgtm,codescanning +* A new class `DataFlow::MethodCallNode` extends `DataFlow::CallCfgNode` with convenient methods for + accessing the receiver and method name of a method call. +* The `LocalSourceNode` class now has a `getAMethodCall` method, with which one can easily access + method calls with the given node as a receiver. From b55c034502034fbc6cca905b9bf2447b552f7791 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 15:13:54 +0000 Subject: [PATCH 1328/1662] Python: Fix up `getAMethodCall` Now that we have a `MethodCallNode` class, it would be silly not to use that as the return type. --- .../ql/src/semmle/python/dataflow/new/internal/LocalSources.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll b/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll index f124bdb31b60..138fca069159 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll @@ -84,7 +84,7 @@ class LocalSourceNode extends Node { * Includes both calls that have the syntactic shape of a method call (as in `obj.m(...)`), and * calls where the callee undergoes some additional local data flow (as in `tmp = obj.m; m(...)`). */ - CallCfgNode getAMethodCall(string methodName) { + MethodCallNode getAMethodCall(string methodName) { result = this.getAnAttributeRead(methodName).getACall() } From 9f052a2ecd1116691f047ae188383015d61f65cd Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Thu, 10 Jun 2021 22:54:42 +0200 Subject: [PATCH 1329/1662] JS: Add Knex model --- javascript/ql/src/javascript.qll | 1 + .../src/semmle/javascript/frameworks/Knex.qll | 62 +++++ .../frameworks/Knex/test.expected | 232 ++++++++++++++++++ .../library-tests/frameworks/Knex/test.ql | 9 + .../test/library-tests/frameworks/Knex/tst.js | 188 ++++++++++++++ 5 files changed, 492 insertions(+) create mode 100644 javascript/ql/src/semmle/javascript/frameworks/Knex.qll create mode 100644 javascript/ql/test/library-tests/frameworks/Knex/test.expected create mode 100644 javascript/ql/test/library-tests/frameworks/Knex/test.ql create mode 100644 javascript/ql/test/library-tests/frameworks/Knex/tst.js diff --git a/javascript/ql/src/javascript.qll b/javascript/ql/src/javascript.qll index 83e9ffc32326..8b3b7349b92a 100644 --- a/javascript/ql/src/javascript.qll +++ b/javascript/ql/src/javascript.qll @@ -95,6 +95,7 @@ import semmle.javascript.frameworks.JWT import semmle.javascript.frameworks.Handlebars import semmle.javascript.frameworks.History import semmle.javascript.frameworks.Immutable +import semmle.javascript.frameworks.Knex import semmle.javascript.frameworks.LazyCache import semmle.javascript.frameworks.LodashUnderscore import semmle.javascript.frameworks.Logging diff --git a/javascript/ql/src/semmle/javascript/frameworks/Knex.qll b/javascript/ql/src/semmle/javascript/frameworks/Knex.qll new file mode 100644 index 000000000000..41d54afde820 --- /dev/null +++ b/javascript/ql/src/semmle/javascript/frameworks/Knex.qll @@ -0,0 +1,62 @@ +/** + * Provides classes and predicates for working with [knex](https://knexjs.org). + */ + +private import javascript + +/** + * Provides classes and predicates for working with [knex](https://knexjs.org). + */ +module Knex { + /** Gets an API node referring to the `knex` library. */ + API::Node knexLibrary() { result = API::moduleImport("knex") } + + /** Gets a method name on Knex objects which return a Knex object. */ + bindingset[result] + private string chainableKnexMethod() { + not result in [ + "toString", "valueOf", "then", "catch", "finally", "toSQL", "asCallback", "stream" + ] + } + + /** Gets an API node referring to a `knex` object, such as `knex.from('foo')`. */ + API::Node knexObject() { + result = knexLibrary().getReturn() + or + result = knexObject().getReturn() + or + result = knexObject().getMember("schema") + or + result = knexObject().getMember(chainableKnexMethod()).getReturn() + or + // callback for building inner queries, such as `knex.join(function() { this.on('blah') })` + result = knexObject().getMember(chainableKnexMethod()).getParameter(0).getReceiver() + or + // knex.transaction(trx => { ... }) + result = knexObject().getMember("transaction").getParameter(0).getParameter(0) + } + + /** A call to a Knex method that takes a raw SQL string as input. */ + class RawKnexCall extends DataFlow::CallNode { + RawKnexCall() { this = knexObject().getMember(["raw", any(string s) + "Raw"]).getACall() } + } + + /** A SQL string passed to a raw Knex method. */ + private class RawKnexSqlString extends SQL::SqlString { + RawKnexSqlString() { this = any(RawKnexCall call).getArgument(0).asExpr() } + } + + /** A call that triggers a SQL query submission. */ + private class KnexDatabaseAccess extends DatabaseAccess { + KnexDatabaseAccess() { + this = knexObject().getMember(["then", "stream", "asCallback"]).getACall() + or + exists(AwaitExpr await | + this = await.flow() and + await.getOperand() = knexObject().getAUse().asExpr() + ) + } + + override DataFlow::Node getAQueryArgument() { none() } + } +} diff --git a/javascript/ql/test/library-tests/frameworks/Knex/test.expected b/javascript/ql/test/library-tests/frameworks/Knex/test.expected new file mode 100644 index 000000000000..b76370ae4f41 --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/Knex/test.expected @@ -0,0 +1,232 @@ +rawCall +| tst.js:5:1:10:52 | knex({ ... mn_2']) | +| tst.js:25:25:25:84 | knex.ra ... 'Test') | +| tst.js:100:3:100:78 | this.se ... ts.id') | +| tst.js:103:27:103:102 | knex.se ... ts.id') | +| tst.js:106:3:106:78 | this.se ... ts.id') | +| tst.js:113:1:113:37 | knex('u ... ', [1]) | +| tst.js:134:66:134:89 | knex.ra ... dmin']) | +| tst.js:150:1:150:69 | knex.se ... able1') | +| tst.js:162:1:162:89 | knex.se ... OLLUP') | +| tst.js:162:21:162:43 | knex.ra ... ofit)') | +| tst.js:166:1:166:64 | knex.se ... LAST') | +| tst.js:175:1:178:32 | knex('u ... [100]) | +sqlString +| tst.js:10:13:10:21 | '?? = ??' | +| tst.js:25:34:25:75 | 'select ... r" = ?' | +| tst.js:100:46:100:77 | 'users. ... nts.id' | +| tst.js:103:70:103:101 | 'users. ... nts.id' | +| tst.js:106:46:106:77 | 'users. ... nts.id' | +| tst.js:113:24:113:31 | 'id = ?' | +| tst.js:134:75:134:77 | '?' | +| tst.js:150:43:150:68 | 'natura ... table1' | +| tst.js:162:30:162:42 | 'SUM(profit)' | +| tst.js:162:71:162:88 | 'year WITH ROLLUP' | +| tst.js:166:43:166:63 | 'col DE ... S LAST' | +| tst.js:178:14:178:24 | 'count > ?' | +knexLibrary +| file://:0:0:0:0 | use (member exports (module knex)) | +knexObject +| tst.js:3:14:3:30 | use (return (member exports (module knex))) | +| tst.js:5:1:5:32 | use (return (return (member exports (module knex)))) | +| tst.js:5:1:9:4 | use (return (member select (return (return (member exports (module knex)))))) | +| tst.js:5:1:10:52 | use (return (member whereRaw (return (member select (return (return (member exports (module knex)))))))) | +| tst.js:12:1:12:48 | use (return (member withUserParams (return (member exports (module knex))))) | +| tst.js:12:1:12:59 | use (return (member table (return (member withUserParams (return (member exports (module knex))))))) | +| tst.js:12:1:12:71 | use (return (member select (return (member table (return (member withUserParams (return (member exports (module knex))))))))) | +| tst.js:14:1:14:13 | use (return (member select (return (member exports (module knex))))) | +| tst.js:14:1:14:27 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:14:1:14:41 | use (return (member timeout (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:15:1:15:38 | use (return (member select (return (member exports (module knex))))) | +| tst.js:15:1:15:52 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:17:1:17:23 | use (return (member avg (return (member exports (module knex))))) | +| tst.js:17:1:19:4 | use (return (member from (return (member avg (return (member exports (module knex))))))) | +| tst.js:17:1:19:24 | use (return (member as (return (member from (return (member avg (return (member exports (module knex))))))))) | +| tst.js:17:30:17:29 | use (parameter -1 (parameter 0 (member from (return (member avg (return (member exports (module knex)))))))) | +| tst.js:18:5:18:38 | use (return (member sum (parameter -1 (parameter 0 (member from (return (member avg (return (member exports (module knex)))))))))) | +| tst.js:18:5:18:49 | use (return (member from (return (member sum (parameter -1 (parameter 0 (member from (return (member avg (return (member exports (module knex)))))))))))) | +| tst.js:18:5:18:68 | use (return (member groupBy (return (member from (return (member sum (parameter -1 (parameter 0 (member from (return (member avg (return (member exports (module knex)))))))))))))) | +| tst.js:18:5:18:77 | use (return (member as (return (member groupBy (return (member from (return (member sum (parameter -1 (parameter 0 (member from (return (member avg (return (member exports (module knex)))))))))))))))) | +| tst.js:21:1:21:38 | use (return (member column (return (member exports (module knex))))) | +| tst.js:21:1:21:47 | use (return (member select (return (member column (return (member exports (module knex))))))) | +| tst.js:21:1:21:61 | use (return (member from (return (member select (return (member column (return (member exports (module knex))))))))) | +| tst.js:23:1:23:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:23:1:23:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:25:1:25:85 | use (return (member with (return (member exports (module knex))))) | +| tst.js:25:1:25:97 | use (return (member select (return (member with (return (member exports (module knex))))))) | +| tst.js:25:1:25:116 | use (return (member from (return (member select (return (member with (return (member exports (module knex))))))))) | +| tst.js:25:25:25:84 | use (return (member raw (return (member exports (module knex))))) | +| tst.js:27:1:31:4 | use (return (member withRecursive (return (member exports (module knex))))) | +| tst.js:27:1:31:16 | use (return (member select (return (member withRecursive (return (member exports (module knex))))))) | +| tst.js:27:1:31:34 | use (return (member from (return (member select (return (member withRecursive (return (member exports (module knex))))))))) | +| tst.js:33:1:33:25 | use (return (member withSchema (return (member exports (module knex))))) | +| tst.js:33:1:33:37 | use (return (member select (return (member withSchema (return (member exports (module knex))))))) | +| tst.js:33:1:33:51 | use (return (member from (return (member select (return (member withSchema (return (member exports (module knex))))))))) | +| tst.js:35:1:35:13 | use (return (return (member exports (module knex)))) | +| tst.js:35:1:38:4 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:35:1:38:17 | use (return (member select (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:40:1:40:13 | use (return (return (member exports (module knex)))) | +| tst.js:40:1:40:28 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:42:1:42:13 | use (return (return (member exports (module knex)))) | +| tst.js:42:1:45:3 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:42:1:48:4 | use (return (member andWhere (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:46:13:46:12 | use (parameter -1 (parameter 0 (member andWhere (return (member where (return (return (member exports (module knex))))))))) | +| tst.js:47:5:47:29 | use (return (member where (parameter -1 (parameter 0 (member andWhere (return (member where (return (return (member exports (module knex))))))))))) | +| tst.js:50:1:50:13 | use (return (return (member exports (module knex)))) | +| tst.js:50:1:52:2 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:50:1:52:28 | use (return (member orWhere (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:50:21:50:20 | use (parameter -1 (parameter 0 (member where (return (return (member exports (module knex))))))) | +| tst.js:51:3:51:21 | use (return (member where (parameter -1 (parameter 0 (member where (return (return (member exports (module knex))))))))) | +| tst.js:51:3:51:44 | use (return (member orWhere (return (member where (parameter -1 (parameter 0 (member where (return (return (member exports (module knex))))))))))) | +| tst.js:54:1:54:13 | use (return (return (member exports (module knex)))) | +| tst.js:54:1:54:56 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:56:1:56:13 | use (return (return (member exports (module knex)))) | +| tst.js:56:1:56:38 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:58:18:58:30 | use (return (return (member exports (module knex)))) | +| tst.js:58:18:58:55 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:58:18:58:84 | use (return (member andWhere (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:58:18:58:108 | use (return (member orWhere (return (member andWhere (return (member where (return (return (member exports (module knex)))))))))) | +| tst.js:58:18:58:121 | use (return (member select (return (member orWhere (return (member andWhere (return (member where (return (return (member exports (module knex)))))))))))) | +| tst.js:59:1:59:16 | use (return (return (member exports (module knex)))) | +| tst.js:59:1:59:44 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:61:1:61:13 | use (return (return (member exports (module knex)))) | +| tst.js:61:1:61:28 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:61:1:61:64 | use (return (member orWhere (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:63:1:63:13 | use (return (return (member exports (module knex)))) | +| tst.js:63:1:66:2 | use (return (member whereNot (return (return (member exports (module knex)))))) | +| tst.js:63:1:66:15 | use (return (member select (return (member whereNot (return (return (member exports (module knex)))))))) | +| tst.js:68:1:68:13 | use (return (return (member exports (module knex)))) | +| tst.js:68:1:68:31 | use (return (member whereNot (return (return (member exports (module knex)))))) | +| tst.js:70:1:70:13 | use (return (return (member exports (module knex)))) | +| tst.js:70:1:72:2 | use (return (member whereNot (return (return (member exports (module knex)))))) | +| tst.js:70:1:72:31 | use (return (member orWhereNot (return (member whereNot (return (return (member exports (module knex)))))))) | +| tst.js:70:24:70:23 | use (parameter -1 (parameter 0 (member whereNot (return (return (member exports (module knex))))))) | +| tst.js:71:3:71:21 | use (return (member where (parameter -1 (parameter 0 (member whereNot (return (return (member exports (module knex))))))))) | +| tst.js:71:3:71:47 | use (return (member orWhereNot (return (member where (parameter -1 (parameter 0 (member whereNot (return (return (member exports (module knex))))))))))) | +| tst.js:74:19:74:31 | use (return (return (member exports (module knex)))) | +| tst.js:74:19:75:30 | use (return (member whereNot (return (return (member exports (module knex)))))) | +| tst.js:74:19:76:31 | use (return (member andWhere (return (member whereNot (return (return (member exports (module knex)))))))) | +| tst.js:74:19:77:26 | use (return (member orWhere (return (member andWhere (return (member whereNot (return (return (member exports (module knex)))))))))) | +| tst.js:74:19:78:15 | use (return (member select (return (member orWhere (return (member andWhere (return (member whereNot (return (return (member exports (module knex)))))))))))) | +| tst.js:80:1:80:16 | use (return (return (member exports (module knex)))) | +| tst.js:80:1:80:49 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:82:1:82:19 | use (return (member select (return (member exports (module knex))))) | +| tst.js:82:1:82:33 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:82:1:83:27 | use (return (member whereIn (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:82:1:84:29 | use (return (member orWhereIn (return (member whereIn (return (member from (return (member select (return (member exports (module knex))))))))))) | +| tst.js:86:1:86:19 | use (return (member select (return (member exports (module knex))))) | +| tst.js:86:1:86:33 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:86:1:89:4 | use (return (member whereIn (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:91:1:91:13 | use (return (return (member exports (module knex)))) | +| tst.js:91:1:91:41 | use (return (member whereNotIn (return (return (member exports (module knex)))))) | +| tst.js:93:1:93:13 | use (return (return (member exports (module knex)))) | +| tst.js:93:1:93:45 | use (return (member where (return (return (member exports (module knex)))))) | +| tst.js:93:1:93:75 | use (return (member orWhereNotIn (return (member where (return (return (member exports (module knex)))))))) | +| tst.js:95:1:95:13 | use (return (return (member exports (module knex)))) | +| tst.js:95:1:95:37 | use (return (member whereNull (return (return (member exports (module knex)))))) | +| tst.js:97:1:97:13 | use (return (return (member exports (module knex)))) | +| tst.js:97:1:97:40 | use (return (member whereNotNull (return (return (member exports (module knex)))))) | +| tst.js:99:1:99:13 | use (return (return (member exports (module knex)))) | +| tst.js:99:1:101:2 | use (return (member whereExists (return (return (member exports (module knex)))))) | +| tst.js:99:27:99:26 | use (parameter -1 (parameter 0 (member whereExists (return (return (member exports (module knex))))))) | +| tst.js:100:3:100:18 | use (return (member select (parameter -1 (parameter 0 (member whereExists (return (return (member exports (module knex))))))))) | +| tst.js:100:3:100:35 | use (return (member from (return (member select (parameter -1 (parameter 0 (member whereExists (return (return (member exports (module knex))))))))))) | +| tst.js:100:3:100:78 | use (return (member whereRaw (return (member from (return (member select (parameter -1 (parameter 0 (member whereExists (return (return (member exports (module knex))))))))))))) | +| tst.js:103:1:103:13 | use (return (return (member exports (module knex)))) | +| tst.js:103:1:103:103 | use (return (member whereExists (return (return (member exports (module knex)))))) | +| tst.js:103:27:103:42 | use (return (member select (return (member exports (module knex))))) | +| tst.js:103:27:103:59 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:103:27:103:102 | use (return (member whereRaw (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:105:1:105:13 | use (return (return (member exports (module knex)))) | +| tst.js:105:1:107:2 | use (return (member whereNotExists (return (return (member exports (module knex)))))) | +| tst.js:105:30:105:29 | use (parameter -1 (parameter 0 (member whereNotExists (return (return (member exports (module knex))))))) | +| tst.js:106:3:106:18 | use (return (member select (parameter -1 (parameter 0 (member whereNotExists (return (return (member exports (module knex))))))))) | +| tst.js:106:3:106:35 | use (return (member from (return (member select (parameter -1 (parameter 0 (member whereNotExists (return (return (member exports (module knex))))))))))) | +| tst.js:106:3:106:78 | use (return (member whereRaw (return (member from (return (member select (parameter -1 (parameter 0 (member whereNotExists (return (return (member exports (module knex))))))))))))) | +| tst.js:109:1:109:13 | use (return (return (member exports (module knex)))) | +| tst.js:109:1:109:45 | use (return (member whereBetween (return (return (member exports (module knex)))))) | +| tst.js:111:1:111:13 | use (return (return (member exports (module knex)))) | +| tst.js:111:1:111:48 | use (return (member whereNotBetween (return (return (member exports (module knex)))))) | +| tst.js:113:1:113:13 | use (return (return (member exports (module knex)))) | +| tst.js:113:1:113:37 | use (return (member whereRaw (return (return (member exports (module knex)))))) | +| tst.js:115:1:115:13 | use (return (return (member exports (module knex)))) | +| tst.js:115:1:116:56 | use (return (member join (return (return (member exports (module knex)))))) | +| tst.js:115:1:117:39 | use (return (member select (return (member join (return (return (member exports (module knex)))))))) | +| tst.js:119:1:119:13 | use (return (return (member exports (module knex)))) | +| tst.js:119:1:120:51 | use (return (member join (return (return (member exports (module knex)))))) | +| tst.js:119:1:121:39 | use (return (member select (return (member join (return (return (member exports (module knex)))))))) | +| tst.js:123:1:123:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:123:1:123:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:123:1:125:2 | use (return (member join (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:127:1:127:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:127:1:127:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:127:1:132:2 | use (return (member join (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:134:1:134:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:134:1:134:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:134:1:134:90 | use (return (member join (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:134:66:134:89 | use (return (member raw (return (member exports (module knex))))) | +| tst.js:136:1:136:18 | use (return (member from (return (member exports (module knex))))) | +| tst.js:136:1:136:72 | use (return (member innerJoin (return (member from (return (member exports (module knex))))))) | +| tst.js:138:1:138:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:138:1:138:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:138:1:138:83 | use (return (member leftJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:140:1:140:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:140:1:140:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:140:1:140:88 | use (return (member leftOuterJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:142:1:142:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:142:1:142:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:142:1:142:84 | use (return (member rightJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:144:1:144:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:144:1:144:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:144:1:144:89 | use (return (member rightOuterJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:146:1:146:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:146:1:146:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:146:1:146:88 | use (return (member fullOuterJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:148:1:148:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:148:1:148:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:148:1:148:52 | use (return (member crossJoin (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:150:1:150:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:150:1:150:33 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:150:1:150:69 | use (return (member joinRaw (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:150:1:150:84 | use (return (member where (return (member joinRaw (return (member from (return (member select (return (member exports (module knex))))))))))) | +| tst.js:152:1:152:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:152:1:152:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:152:1:154:2 | use (return (member join (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:156:1:156:28 | use (return (member select (return (member exports (module knex))))) | +| tst.js:156:1:156:42 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:156:1:156:63 | use (return (member where (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:156:1:156:79 | use (return (member clear (return (member where (return (member from (return (member select (return (member exports (module knex))))))))))) | +| tst.js:156:1:156:94 | use (return (member clear (return (member clear (return (member where (return (member from (return (member select (return (member exports (module knex))))))))))))) | +| tst.js:158:1:158:17 | use (return (return (member exports (module knex)))) | +| tst.js:158:1:158:53 | use (return (member distinct (return (return (member exports (module knex)))))) | +| tst.js:160:1:160:13 | use (return (return (member exports (module knex)))) | +| tst.js:160:1:160:31 | use (return (member distinctOn (return (return (member exports (module knex)))))) | +| tst.js:162:1:162:44 | use (return (member select (return (member exports (module knex))))) | +| tst.js:162:1:162:58 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:162:1:162:89 | use (return (member groupByRaw (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:162:21:162:43 | use (return (member raw (return (member exports (module knex))))) | +| tst.js:164:1:164:13 | use (return (return (member exports (module knex)))) | +| tst.js:164:1:164:30 | use (return (member orderBy (return (return (member exports (module knex)))))) | +| tst.js:166:1:166:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:166:1:166:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:166:1:166:64 | use (return (member orderByRaw (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:168:1:168:13 | use (return (return (member exports (module knex)))) | +| tst.js:168:1:169:19 | use (return (member groupBy (return (return (member exports (module knex)))))) | +| tst.js:168:1:170:26 | use (return (member orderBy (return (member groupBy (return (return (member exports (module knex)))))))) | +| tst.js:168:1:171:28 | use (return (member having (return (member orderBy (return (member groupBy (return (return (member exports (module knex)))))))))) | +| tst.js:173:1:173:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:173:1:173:30 | use (return (member from (return (member select (return (member exports (module knex))))))) | +| tst.js:173:1:173:61 | use (return (member havingIn (return (member from (return (member select (return (member exports (module knex))))))))) | +| tst.js:175:1:175:13 | use (return (return (member exports (module knex)))) | +| tst.js:175:1:176:19 | use (return (member groupBy (return (return (member exports (module knex)))))) | +| tst.js:175:1:177:26 | use (return (member orderBy (return (member groupBy (return (return (member exports (module knex)))))))) | +| tst.js:175:1:178:32 | use (return (member havingRaw (return (member orderBy (return (member groupBy (return (return (member exports (module knex)))))))))) | +| tst.js:180:1:180:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:181:1:181:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:182:1:182:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:183:1:183:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:184:1:184:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:185:1:185:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:186:1:186:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:187:1:187:16 | use (return (member select (return (member exports (module knex))))) | +| tst.js:188:1:188:16 | use (return (member select (return (member exports (module knex))))) | diff --git a/javascript/ql/test/library-tests/frameworks/Knex/test.ql b/javascript/ql/test/library-tests/frameworks/Knex/test.ql new file mode 100644 index 000000000000..86125aae2fef --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/Knex/test.ql @@ -0,0 +1,9 @@ +import javascript + +query predicate knexLibrary = Knex::knexLibrary/0; + +query predicate knexObject = Knex::knexObject/0; + +query Knex::RawKnexCall rawCall() { any() } + +query SQL::SqlString sqlString() { any() } diff --git a/javascript/ql/test/library-tests/frameworks/Knex/tst.js b/javascript/ql/test/library-tests/frameworks/Knex/tst.js new file mode 100644 index 000000000000..8317fe9f0bc6 --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/Knex/tst.js @@ -0,0 +1,188 @@ +// Based on example code from https://knexjs.org + +const knex = require('knex')(); + +knex({ a: 'table', b: 'table' }) + .select({ + aTitle: 'a.title', + bTitle: 'b.title' + }) + .whereRaw('?? = ??', ['a.column_1', 'b.column_2']); + +knex.withUserParams({customUserParam: 'table1'}).table('t').select('x'); + +knex.select().from('books').timeout(1000); +knex.select('title', 'author', 'year').from('books'); + +knex.avg('sum_column1').from(function() { + this.sum('column1 as sum_column1').from('t1').groupBy('column1').as('t1') + }).as('ignored_alias'); + +knex.column('title', 'author', 'year').select().from('books'); + +knex.select('*').from('users'); + +knex.with('with_alias', knex.raw('select * from "books" where "author" = ?', 'Test')).select('*').from('with_alias'); + +knex.withRecursive('ancestors', (qb) => { + qb.select('*').from('people').where('people.id', 1).union((qb) => { + qb.select('*').from('people').join('ancestors', 'ancestors.parentId', 'people.id') + }) + }).select('*').from('ancestors'); + +knex.withSchema('public').select('*').from('users'); + +knex('users').where({ + first_name: 'Test', + last_name: 'User' + }).select('id'); + +knex('users').where('id', 1); + +knex('users') + .where((builder) => + builder.whereIn('id', [1, 11, 15]).whereNotIn('id', [17, 19]) + ) + .andWhere(function() { + this.where('id', '>', 10) + }); + +knex('users').where(function() { + this.where('id', 1).orWhere('id', '>', 10) +}).orWhere({name: 'Tester'}); + +knex('users').where('columnName', 'like', '%rowlikeme%'); + +knex('users').where('votes', '>', 100); + +const subquery = knex('users').where('votes', '>', 100).andWhere('status', 'active').orWhere('name', 'John').select('id'); +knex('accounts').where('id', 'in', subquery); + +knex('users').where('id', 1).orWhere({votes: 100, user: 'knex'}); + +knex('users').whereNot({ + first_name: 'Test', + last_name: 'User' +}).select('id'); + +knex('users').whereNot('id', 1); + +knex('users').whereNot(function() { + this.where('id', 1).orWhereNot('id', '>', 10) +}).orWhereNot({name: 'Tester'}); + +const subquery2 = knex('users') + .whereNot('votes', '>', 100) + .andWhere('status', 'active') + .orWhere('name', 'John') + .select('id'); + +knex('accounts').where('id', 'not in', subquery2); + +knex.select('name').from('users') + .whereIn('id', [1, 2, 3]) + .orWhereIn('id', [4, 5, 6]); + +knex.select('name').from('users') + .whereIn('account_id', function() { + this.select('id').from('accounts'); + }); + +knex('users').whereNotIn('id', [1, 2, 3]); + +knex('users').where('name', 'like', '%Test%').orWhereNotIn('id', [1, 2, 3]); + +knex('users').whereNull('updated_at'); + +knex('users').whereNotNull('created_at'); + +knex('users').whereExists(function() { + this.select('*').from('accounts').whereRaw('users.account_id = accounts.id'); +}); + +knex('users').whereExists(knex.select('*').from('accounts').whereRaw('users.account_id = accounts.id')); + +knex('users').whereNotExists(function() { + this.select('*').from('accounts').whereRaw('users.account_id = accounts.id'); +}); + +knex('users').whereBetween('votes', [1, 100]); + +knex('users').whereNotBetween('votes', [1, 100]); + +knex('users').whereRaw('id = ?', [1]); + +knex('users') + .join('contacts', 'users.id', '=', 'contacts.user_id') + .select('users.id', 'contacts.phone'); + +knex('users') + .join('contacts', 'users.id', 'contacts.user_id') + .select('users.id', 'contacts.phone'); + +knex.select('*').from('users').join('accounts', function() { + this.on('accounts.id', '=', 'users.account_id').orOn('accounts.owner_id', '=', 'users.id') +}); + +knex.select('*').from('users').join('accounts', function() { + this.on(function() { + this.on('accounts.id', '=', 'users.account_id') + this.orOn('accounts.owner_id', '=', 'users.id') + }) +}); + +knex.select('*').from('users').join('accounts', 'accounts.type', knex.raw('?', ['admin'])); + +knex.from('users').innerJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').leftJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').leftOuterJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').rightJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').rightOuterJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').fullOuterJoin('accounts', 'users.id', 'accounts.user_id'); + +knex.select('*').from('users').crossJoin('accounts'); + +knex.select('*').from('accounts').joinRaw('natural full join table1').where('id', 1); + +knex.select('*').from('users').join('contacts', function() { + this.on('users.id', '=', 'contacts.id').onNotNull('contacts.email') +}); + +knex.select('email', 'name').from('users').where('id', '<', 10).clear('select').clear('where'); + +knex('customers').distinct('first_name', 'last_name'); + +knex('users').distinctOn('age'); + +knex.select('year', knex.raw('SUM(profit)')).from('sales').groupByRaw('year WITH ROLLUP'); + +knex('users').orderBy('email'); + +knex.select('*').from('table').orderByRaw('col DESC NULLS LAST'); + +knex('users') + .groupBy('count') + .orderBy('name', 'desc') + .having('count', '>', 100); + +knex.select('*').from('users').havingIn('id', [5, 3, 10, 17]); + +knex('users') + .groupBy('count') + .orderBy('name', 'desc') + .havingRaw('count > ?', [100]); + +knex.select('x').toString(); +knex.select('x').valueOf(); +knex.select('x').toSQL(); +knex.select('x').then(); +knex.select('x').catch(); +knex.select('x').finally(); +knex.select('x').asCallback(); +knex.select('x').stream(); +knex.select('x').stream(stream => { }); From af9cc0706638a93f0cf51b77e4837d65e80479c0 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Fri, 11 Jun 2021 09:00:41 +0200 Subject: [PATCH 1330/1662] JS: Change note --- javascript/change-notes/2021-06-11-knex.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 javascript/change-notes/2021-06-11-knex.md diff --git a/javascript/change-notes/2021-06-11-knex.md b/javascript/change-notes/2021-06-11-knex.md new file mode 100644 index 000000000000..2aea58b0aece --- /dev/null +++ b/javascript/change-notes/2021-06-11-knex.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* SQL injection sinks from the `knex` library are now recognized. From 44b30b70da8e40e2d2abba7cbbf5083a59fd3bab Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 16:27:27 +0200 Subject: [PATCH 1331/1662] C#: Fix Modifiable::isUnsafe to handle declarations extracted from assemblies --- csharp/ql/src/semmle/code/csharp/Member.qll | 7 ++++++- csharp/ql/test/library-tests/unsafe/unsafe4.ql | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 520df43cfb8d..65fe94a0c50e 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -86,7 +86,12 @@ class Modifiable extends Declaration, @modifiable { predicate isConst() { this.hasModifier("const") } /** Holds if this declaration is `unsafe`. */ - predicate isUnsafe() { this.hasModifier("unsafe") } + predicate isUnsafe() { + this.hasModifier("unsafe") or + this.(Parameterizable).getAParameter().getType() instanceof PointerType or + this.(Property).getType() instanceof PointerType or + this.(Callable).getReturnType() instanceof PointerType + } /** Holds if this declaration is `async`. */ predicate isAsync() { this.hasModifier("async") } diff --git a/csharp/ql/test/library-tests/unsafe/unsafe4.ql b/csharp/ql/test/library-tests/unsafe/unsafe4.ql index 8aa38fc8fbb2..c086e0c00a55 100644 --- a/csharp/ql/test/library-tests/unsafe/unsafe4.ql +++ b/csharp/ql/test/library-tests/unsafe/unsafe4.ql @@ -1,3 +1,3 @@ import csharp -select any(Modifiable m | m.isUnsafe()) +select any(Modifiable m | m.isUnsafe() and m.fromSource()) From 74c4765ab999a9dcfeefa8d465c90921aa852a01 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 16:28:26 +0200 Subject: [PATCH 1332/1662] Add change note --- csharp/change-notes/2021-06-15-unsafe-non-source-code.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 csharp/change-notes/2021-06-15-unsafe-non-source-code.md diff --git a/csharp/change-notes/2021-06-15-unsafe-non-source-code.md b/csharp/change-notes/2021-06-15-unsafe-non-source-code.md new file mode 100644 index 000000000000..8e45080b132a --- /dev/null +++ b/csharp/change-notes/2021-06-15-unsafe-non-source-code.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The `Modifiable::isUnsafe` predicate has been fixed to handle symbols that are not extracted from source code. \ No newline at end of file From 359bc5eff93a31f383c4d658356c8e9ba51dfa3e Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 15 Jun 2021 15:56:40 +0000 Subject: [PATCH 1333/1662] Python: Autoformat --- python/ql/src/Security/CWE-327/Ssl.qll | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 1538b0af8212..327d68f289c6 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -42,9 +42,7 @@ API::Node sslContextInstance() { class WrapSocketCall extends ConnectionCreation, DataFlow::MethodCallNode { WrapSocketCall() { this = sslContextInstance().getMember("wrap_socket").getACall() } - override DataFlow::Node getContext() { - result = this.getReceiver() - } + override DataFlow::Node getContext() { result = this.getReceiver() } } class OptionsAugOr extends ProtocolRestriction, DataFlow::CfgNode { From 9badd7aa274ad6a3af01ff354781c6dece0725f4 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 16 Jun 2021 11:29:37 +0800 Subject: [PATCH 1334/1662] change name --- java/ql/src/semmle/code/java/frameworks/Castor.qll | 4 ++-- .../src/semmle/code/java/security/UnsafeDeserialization.qll | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/Castor.qll b/java/ql/src/semmle/code/java/frameworks/Castor.qll index 16884849d51e..f1e1b8257252 100644 --- a/java/ql/src/semmle/code/java/frameworks/Castor.qll +++ b/java/ql/src/semmle/code/java/frameworks/Castor.qll @@ -12,8 +12,8 @@ class CastorUnmarshaller extends RefType { } /** A method with the name `unmarshal` declared in `org.exolab.castor.xml.Unmarshaller`. */ -class UnmarshalMethod extends Method { - UnmarshalMethod() { +class CastorUnmarshalMethod extends Method { + CastorUnmarshalMethod() { this.getDeclaringType() instanceof CastorUnmarshaller and this.getName() = "unmarshal" } diff --git a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll index 41840e4c1f73..b8cc7ede9bcb 100644 --- a/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll +++ b/java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll @@ -100,7 +100,7 @@ predicate unsafeDeserialization(MethodAccess ma, Expr sink) { or ma.getMethod() instanceof UnsafeHessianInputReadObjectMethod and sink = ma.getQualifier() or - ma.getMethod() instanceof UnmarshalMethod and sink = ma.getAnArgument() + ma.getMethod() instanceof CastorUnmarshalMethod and sink = ma.getAnArgument() or ma.getMethod() instanceof BurlapInputReadObjectMethod and sink = ma.getQualifier() ) From 5838e54a469a101aad3f4aaaface87c720624f10 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Tue, 15 Jun 2021 09:32:37 +0200 Subject: [PATCH 1335/1662] JS: Sharpen recognition of string 'match' calls --- .../ql/src/semmle/javascript/Regexp.qll | 35 ++++++++++++++++++- .../CWE-020/IncompleteHostnameRegExp.expected | 2 +- .../CWE-020/MissingRegExpAnchor.expected | 18 +++++----- .../CWE-020/tst-IncompleteHostnameRegExp.js | 2 +- .../CWE-020/tst-UnanchoredUrlRegExp.js | 20 +++++------ 5 files changed, 55 insertions(+), 22 deletions(-) diff --git a/javascript/ql/src/semmle/javascript/Regexp.qll b/javascript/ql/src/semmle/javascript/Regexp.qll index c0f01fa130a7..5eb20b5f9153 100644 --- a/javascript/ql/src/semmle/javascript/Regexp.qll +++ b/javascript/ql/src/semmle/javascript/Regexp.qll @@ -922,6 +922,36 @@ private predicate isNativeStringMethod(Function func, string name) { ) } +/** + * Holds if `name` is the name of a property on a Match object returned by `String.prototype.match`, + * not including array indices. + */ +private predicate isMatchObjectProperty(string name) { + any(ExternalInstanceMemberDecl decl).hasQualifiedName("Array", name) + or + name in ["length", "index", "input", "groups"] +} + +/** Holds if `call` is a call to `match` whose result is used in a way that is incompatible with Match objects. */ +private predicate isUsedAsNonMatchObject(DataFlow::MethodCallNode call) { + call.getMethodName() = "match" and + call.getNumArgument() = 1 and + ( + // Accessing a property that is absent on Match objects + exists(string propName | + exists(call.getAPropertyRead(propName)) and + not isMatchObjectProperty(propName) and + not exists(propName.toInt()) + ) + or + // Awaiting the result + call.flowsToExpr(any(AwaitExpr await).getOperand()) + or + // Result is obviously unused + call.asExpr() = any(ExprStmt stmt).getExpr() + ) +} + /** * Holds if `source` may be interpreted as a regular expression. */ @@ -939,7 +969,10 @@ predicate isInterpretedAsRegExp(DataFlow::Node source) { not isNativeStringMethod(func, methodName) ) | - methodName = "match" and source = mce.getArgument(0) and mce.getNumArgument() = 1 + methodName = "match" and + source = mce.getArgument(0) and + mce.getNumArgument() = 1 and + not isUsedAsNonMatchObject(mce) or methodName = "search" and source = mce.getArgument(0) and diff --git a/javascript/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegExp.expected b/javascript/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegExp.expected index 2b90af205e19..4911f159e47a 100644 --- a/javascript/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegExp.expected +++ b/javascript/ql/test/query-tests/Security/CWE-020/IncompleteHostnameRegExp.expected @@ -5,7 +5,7 @@ | tst-IncompleteHostnameRegExp.js:7:3:7:30 | ^http:\\/\\/(.+).example.com\\/ | This regular expression has an unrestricted wildcard '.+' which may cause 'example.com' to be matched anywhere in the URL, outside the hostname. | tst-IncompleteHostnameRegExp.js:7:2:7:31 | /^http: ... .com\\// | here | | tst-IncompleteHostnameRegExp.js:10:3:10:36 | ^http:\\/\\/test.example.com\\/(?:.*) | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:10:2:10:37 | /^http: ... (?:.*)/ | here | | tst-IncompleteHostnameRegExp.js:11:14:11:37 | ^http://test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:11:13:11:38 | "^http: ... le.com" | here | -| tst-IncompleteHostnameRegExp.js:12:11:12:34 | ^http://test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:12:10:12:35 | "^http: ... le.com" | here | +| tst-IncompleteHostnameRegExp.js:12:15:12:38 | ^http://test.example.com | This regular expression has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:12:14:12:39 | "^http: ... le.com" | here | | tst-IncompleteHostnameRegExp.js:15:23:15:46 | ^http://test.example.com | This string, which is used as a regular expression $@, has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:15:13:15:50 | id(id(i ... com"))) | here | | tst-IncompleteHostnameRegExp.js:19:18:19:34 | ^test.example.com | This string, which is used as a regular expression $@, has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:20:13:20:26 | `${hostname}$` | here | | tst-IncompleteHostnameRegExp.js:22:28:22:44 | test.example.com$ | This string, which is used as a regular expression $@, has an unescaped '.' before 'example.com', so it might match more hosts than expected. | tst-IncompleteHostnameRegExp.js:23:13:23:27 | domain.hostname | here | diff --git a/javascript/ql/test/query-tests/Security/CWE-020/MissingRegExpAnchor.expected b/javascript/ql/test/query-tests/Security/CWE-020/MissingRegExpAnchor.expected index 01a1dc538523..abc97d625d92 100644 --- a/javascript/ql/test/query-tests/Security/CWE-020/MissingRegExpAnchor.expected +++ b/javascript/ql/test/query-tests/Security/CWE-020/MissingRegExpAnchor.expected @@ -3,7 +3,7 @@ | tst-IncompleteHostnameRegExp.js:5:2:5:29 | /^http: ... le.net/ | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-IncompleteHostnameRegExp.js:6:2:6:43 | /^http: ... b).com/ | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-IncompleteHostnameRegExp.js:11:13:11:38 | "^http: ... le.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | -| tst-IncompleteHostnameRegExp.js:12:10:12:35 | "^http: ... le.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | +| tst-IncompleteHostnameRegExp.js:12:14:12:39 | "^http: ... le.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-IncompleteHostnameRegExp.js:15:22:15:47 | "^http: ... le.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-IncompleteHostnameRegExp.js:19:17:19:35 | '^test.example.com' | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-IncompleteHostnameRegExp.js:40:2:40:30 | /^https ... le.com/ | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | @@ -51,18 +51,18 @@ | tst-SemiAnchoredRegExp.js:96:2:96:55 | /^mouse ... ragend/ | Misleading operator precedence. The subexpression '^mouse' is anchored at the beginning, but the other parts of this regular expression are not | | tst-SemiAnchoredRegExp.js:97:2:97:14 | /^xxx:\|yyy:/i | Misleading operator precedence. The subexpression '^xxx:' is anchored at the beginning, but the other parts of this regular expression are not | | tst-SemiAnchoredRegExp.js:98:2:98:18 | /_xxx\|_yyy\|_zzz$/ | Misleading operator precedence. The subexpression '_zzz$' is anchored at the end, but the other parts of this regular expression are not | -| tst-UnanchoredUrlRegExp.js:3:43:3:61 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | -| tst-UnanchoredUrlRegExp.js:4:54:4:72 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | -| tst-UnanchoredUrlRegExp.js:5:43:5:62 | "^https?://good.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | -| tst-UnanchoredUrlRegExp.js:6:43:6:64 | /^https ... od.com/ | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | -| tst-UnanchoredUrlRegExp.js:7:43:7:87 | "(^http ... 2.com)" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | -| tst-UnanchoredUrlRegExp.js:8:43:8:86 | "(https ... e.com)" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | +| tst-UnanchoredUrlRegExp.js:3:47:3:65 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| tst-UnanchoredUrlRegExp.js:4:58:4:76 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| tst-UnanchoredUrlRegExp.js:5:47:5:66 | "^https?://good.com" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | +| tst-UnanchoredUrlRegExp.js:6:47:6:68 | /^https ... od.com/ | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | +| tst-UnanchoredUrlRegExp.js:7:47:7:91 | "(^http ... 2.com)" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | +| tst-UnanchoredUrlRegExp.js:8:47:8:90 | "(https ... e.com)" | This hostname pattern may match any domain name, as it is missing a '$' or '/' at the end. | | tst-UnanchoredUrlRegExp.js:10:2:10:22 | /https? ... od.com/ | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:11:13:11:31 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:13:44:13:62 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:15:13:15:31 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | -| tst-UnanchoredUrlRegExp.js:19:43:19:61 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | -| tst-UnanchoredUrlRegExp.js:20:43:20:66 | "https? ... m:8080" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| tst-UnanchoredUrlRegExp.js:19:47:19:65 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | +| tst-UnanchoredUrlRegExp.js:20:47:20:70 | "https? ... m:8080" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:23:3:23:21 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:24:3:24:23 | /https? ... od.com/ | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | | tst-UnanchoredUrlRegExp.js:25:14:25:32 | "https?://good.com" | When this is used as a regular expression on a URL, it may match anywhere, and arbitrary hosts may come before or after it. | diff --git a/javascript/ql/test/query-tests/Security/CWE-020/tst-IncompleteHostnameRegExp.js b/javascript/ql/test/query-tests/Security/CWE-020/tst-IncompleteHostnameRegExp.js index b88a6715306e..403366064c19 100644 --- a/javascript/ql/test/query-tests/Security/CWE-020/tst-IncompleteHostnameRegExp.js +++ b/javascript/ql/test/query-tests/Security/CWE-020/tst-IncompleteHostnameRegExp.js @@ -9,7 +9,7 @@ /^http:\/\/(?:.+)\\.test\\.example.com\//; // NOT OK /^http:\/\/test.example.com\/(?:.*)/; // OK new RegExp("^http://test.example.com"); // NOT OK - s.match("^http://test.example.com"); // NOT OK + if (s.match("^http://test.example.com")) {} // NOT OK function id(e) { return e; } new RegExp(id(id(id("^http://test.example.com")))); // NOT OK diff --git a/javascript/ql/test/query-tests/Security/CWE-020/tst-UnanchoredUrlRegExp.js b/javascript/ql/test/query-tests/Security/CWE-020/tst-UnanchoredUrlRegExp.js index f56dcab74da0..5db3aa740fb5 100644 --- a/javascript/ql/test/query-tests/Security/CWE-020/tst-UnanchoredUrlRegExp.js +++ b/javascript/ql/test/query-tests/Security/CWE-020/tst-UnanchoredUrlRegExp.js @@ -1,11 +1,11 @@ (function(x){ - "http://evil.com/?http://good.com".match("https?://good.com"); // NOT OK - "http://evil.com/?http://good.com".match(new RegExp("https?://good.com")); // NOT OK - "http://evil.com/?http://good.com".match("^https?://good.com"); // NOT OK - missing post-anchor - "http://evil.com/?http://good.com".match(/^https?:\/\/good.com/); // NOT OK - missing post-anchor - "http://evil.com/?http://good.com".match("(^https?://good1.com)|(^https?://good2.com)"); // NOT OK - missing post-anchor - "http://evil.com/?http://good.com".match("(https?://good.com)|(^https?://goodie.com)"); // NOT OK - missing post-anchor + if ("http://evil.com/?http://good.com".match("https?://good.com")) {} // NOT OK + if ("http://evil.com/?http://good.com".match(new RegExp("https?://good.com"))) {} // NOT OK + if ("http://evil.com/?http://good.com".match("^https?://good.com")) {} // NOT OK - missing post-anchor + if ("http://evil.com/?http://good.com".match(/^https?:\/\/good.com/)) {} // NOT OK - missing post-anchor + if ("http://evil.com/?http://good.com".match("(^https?://good1.com)|(^https?://good2.com)")) {} // NOT OK - missing post-anchor + if ("http://evil.com/?http://good.com".match("(https?://good.com)|(^https?://goodie.com)")) {} // NOT OK - missing post-anchor /https?:\/\/good.com/.exec("http://evil.com/?http://good.com"); // NOT OK new RegExp("https?://good.com").exec("http://evil.com/?http://good.com"); // NOT OK @@ -14,10 +14,10 @@ new RegExp("https?://good.com").test("http://evil.com/?http://good.com"); // NOT OK - "something".match("other"); // OK - "something".match("x.commissary"); // OK - "http://evil.com/?http://good.com".match("https?://good.com"); // NOT OK - "http://evil.com/?http://good.com".match("https?://good.com:8080"); // NOT OK + if ("something".match("other")) {} // OK + if ("something".match("x.commissary")) {} // OK + if ("http://evil.com/?http://good.com".match("https?://good.com")) {} // NOT OK + if ("http://evil.com/?http://good.com".match("https?://good.com:8080")) {} // NOT OK let trustedUrls = [ "https?://good.com", // NOT OK, referenced below From dacb044790cfa79141d4fd0e01ca9e21ba391198 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 09:51:04 +0200 Subject: [PATCH 1336/1662] C#: Add tests for abstract/virtual modifier of interface members --- csharp/ql/test/library-tests/modifiers/Effectively.expected | 3 +++ csharp/ql/test/library-tests/modifiers/Modifiers.cs | 6 ++++++ csharp/ql/test/library-tests/modifiers/Modifiers.expected | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/csharp/ql/test/library-tests/modifiers/Effectively.expected b/csharp/ql/test/library-tests/modifiers/Effectively.expected index 454295f0065a..f25ae319cfb2 100644 --- a/csharp/ql/test/library-tests/modifiers/Effectively.expected +++ b/csharp/ql/test/library-tests/modifiers/Effectively.expected @@ -21,3 +21,6 @@ | Modifiers.cs:54:52:54:54 | set_P1 | public | | Modifiers.cs:55:20:55:21 | P2 | public | | Modifiers.cs:55:36:55:38 | get_P2 | public | +| Modifiers.cs:60:22:60:23 | I1 | public | +| Modifiers.cs:62:14:62:15 | M1 | public | +| Modifiers.cs:63:14:63:15 | M2 | public | diff --git a/csharp/ql/test/library-tests/modifiers/Modifiers.cs b/csharp/ql/test/library-tests/modifiers/Modifiers.cs index c0377abb9e0c..e0f687b2dbb0 100644 --- a/csharp/ql/test/library-tests/modifiers/Modifiers.cs +++ b/csharp/ql/test/library-tests/modifiers/Modifiers.cs @@ -56,4 +56,10 @@ public struct S /*private*/ int P3 { /*private*/ get; /*private*/ set; } } + + public interface I1 + { + void M1(); + void M2() => throw null; + } } diff --git a/csharp/ql/test/library-tests/modifiers/Modifiers.expected b/csharp/ql/test/library-tests/modifiers/Modifiers.expected index 8f89e302453e..855b0bae9f1e 100644 --- a/csharp/ql/test/library-tests/modifiers/Modifiers.expected +++ b/csharp/ql/test/library-tests/modifiers/Modifiers.expected @@ -44,3 +44,8 @@ | Modifiers.cs:57:13:57:14 | P3 | file://:0:0:0:0 | private | | Modifiers.cs:57:30:57:32 | get_P3 | file://:0:0:0:0 | private | | Modifiers.cs:57:47:57:49 | set_P3 | file://:0:0:0:0 | private | +| Modifiers.cs:60:22:60:23 | I1 | file://:0:0:0:0 | public | +| Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | public | +| Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | virtual | +| Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | public | +| Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | virtual | From 66835651fee221eb6da959f98deeef6e63af6ccb Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 09:41:33 +0200 Subject: [PATCH 1337/1662] C#: Allow abstract modifier on interface members --- .../Semmle.Extraction.CSharp/Entities/Modifier.cs | 10 +--------- .../ql/test/library-tests/modifiers/Modifiers.expected | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs index 806e73e35903..3d6cb01837ec 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Modifier.cs @@ -72,15 +72,11 @@ public static void HasModifier(Context cx, TextWriter trapFile, IEntity target, public static void ExtractModifiers(Context cx, TextWriter trapFile, IEntity key, ISymbol symbol) { - var interfaceDefinition = symbol.ContainingType is not null - && symbol.ContainingType.Kind == SymbolKind.NamedType - && symbol.ContainingType.TypeKind == TypeKind.Interface; - HasAccessibility(cx, trapFile, key, symbol.DeclaredAccessibility); if (symbol.Kind == SymbolKind.ErrorType) trapFile.has_modifiers(key, Modifier.Create(cx, Accessibility.Public)); - if (symbol.IsAbstract && (symbol.Kind != SymbolKind.NamedType || ((INamedTypeSymbol)symbol).TypeKind != TypeKind.Interface) && !interfaceDefinition) + if (symbol.IsAbstract && (symbol.Kind != SymbolKind.NamedType || ((INamedTypeSymbol)symbol).TypeKind != TypeKind.Interface)) HasModifier(cx, trapFile, key, "abstract"); if (symbol.IsSealed) @@ -94,10 +90,6 @@ public static void ExtractModifiers(Context cx, TextWriter trapFile, IEntity key if (symbol.IsVirtual) HasModifier(cx, trapFile, key, "virtual"); - // For some reason, method in interfaces are "virtual", not "abstract" - if (symbol.IsAbstract && interfaceDefinition) - HasModifier(cx, trapFile, key, "virtual"); - if (symbol.Kind == SymbolKind.Field && ((IFieldSymbol)symbol).IsReadOnly) HasModifier(cx, trapFile, key, "readonly"); diff --git a/csharp/ql/test/library-tests/modifiers/Modifiers.expected b/csharp/ql/test/library-tests/modifiers/Modifiers.expected index 855b0bae9f1e..52deb0c6da7f 100644 --- a/csharp/ql/test/library-tests/modifiers/Modifiers.expected +++ b/csharp/ql/test/library-tests/modifiers/Modifiers.expected @@ -45,7 +45,7 @@ | Modifiers.cs:57:30:57:32 | get_P3 | file://:0:0:0:0 | private | | Modifiers.cs:57:47:57:49 | set_P3 | file://:0:0:0:0 | private | | Modifiers.cs:60:22:60:23 | I1 | file://:0:0:0:0 | public | +| Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | abstract | | Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | public | -| Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | virtual | | Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | public | | Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | virtual | From e2918d55b593a089513b747cf03ea8529c0337cf Mon Sep 17 00:00:00 2001 From: Tony Torralba Date: Wed, 16 Jun 2021 10:09:44 +0200 Subject: [PATCH 1338/1662] Move tests back from internal repo --- .../CWE-311/CWE-319/HttpsUrls.expected | 19 +++ .../security/CWE-311/CWE-319/HttpsUrls.qlref | 1 + .../CWE-311/CWE-319/HttpsUrlsTest.java | 119 ++++++++++++++++++ .../security/CWE-311/CWE-319/UseSSL.expected | 2 +- .../CWE-319/{Test.java => UseSSLTest.java} | 2 +- 5 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.expected create mode 100644 java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref create mode 100644 java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrlsTest.java rename java/ql/test/query-tests/security/CWE-311/CWE-319/{Test.java => UseSSLTest.java} (95%) diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.expected b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.expected new file mode 100644 index 000000000000..35595b1bfc35 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.expected @@ -0,0 +1,19 @@ +edges +| HttpsUrlsTest.java:23:23:23:31 | "http://" : String | HttpsUrlsTest.java:28:50:28:50 | u | +| HttpsUrlsTest.java:36:23:36:28 | "http" : String | HttpsUrlsTest.java:41:50:41:50 | u | +| HttpsUrlsTest.java:49:23:49:31 | "http://" : String | HttpsUrlsTest.java:55:50:55:50 | u | +| HttpsUrlsTest.java:87:23:87:28 | "http" : String | HttpsUrlsTest.java:92:50:92:50 | u | +nodes +| HttpsUrlsTest.java:23:23:23:31 | "http://" : String | semmle.label | "http://" : String | +| HttpsUrlsTest.java:28:50:28:50 | u | semmle.label | u | +| HttpsUrlsTest.java:36:23:36:28 | "http" : String | semmle.label | "http" : String | +| HttpsUrlsTest.java:41:50:41:50 | u | semmle.label | u | +| HttpsUrlsTest.java:49:23:49:31 | "http://" : String | semmle.label | "http://" : String | +| HttpsUrlsTest.java:55:50:55:50 | u | semmle.label | u | +| HttpsUrlsTest.java:87:23:87:28 | "http" : String | semmle.label | "http" : String | +| HttpsUrlsTest.java:92:50:92:50 | u | semmle.label | u | +#select +| HttpsUrlsTest.java:28:50:28:67 | openConnection(...) | HttpsUrlsTest.java:23:23:23:31 | "http://" : String | HttpsUrlsTest.java:28:50:28:50 | u | URL may have been constructed with HTTP protocol, using $@. | HttpsUrlsTest.java:23:23:23:31 | "http://" | this source | +| HttpsUrlsTest.java:41:50:41:67 | openConnection(...) | HttpsUrlsTest.java:36:23:36:28 | "http" : String | HttpsUrlsTest.java:41:50:41:50 | u | URL may have been constructed with HTTP protocol, using $@. | HttpsUrlsTest.java:36:23:36:28 | "http" | this source | +| HttpsUrlsTest.java:55:50:55:67 | openConnection(...) | HttpsUrlsTest.java:49:23:49:31 | "http://" : String | HttpsUrlsTest.java:55:50:55:50 | u | URL may have been constructed with HTTP protocol, using $@. | HttpsUrlsTest.java:49:23:49:31 | "http://" | this source | +| HttpsUrlsTest.java:92:50:92:67 | openConnection(...) | HttpsUrlsTest.java:87:23:87:28 | "http" : String | HttpsUrlsTest.java:92:50:92:50 | u | URL may have been constructed with HTTP protocol, using $@. | HttpsUrlsTest.java:87:23:87:28 | "http" | this source | diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref new file mode 100644 index 000000000000..bd936a400c0d --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrls.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-319/HttpsUrls.ql \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrlsTest.java b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrlsTest.java new file mode 100644 index 000000000000..900718904d29 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/HttpsUrlsTest.java @@ -0,0 +1,119 @@ +// Semmle test case for CWE-319: Cleartext Transmission of Sensitive Data +// http://cwe.mitre.org/data/definitions/319.html +package test.cwe319.cwe.examples; + +import java.net.URL; +import java.io.*; +import java.rmi.*; +import java.rmi.server.*; +import java.rmi.registry.*; + +import javax.net.ssl.HttpsURLConnection; +import javax.rmi.ssl.*; + +interface Hello extends java.rmi.Remote { + String sayHello() throws java.rmi.RemoteException; +} + +class HelloImpl implements Hello { + public static void main(String[] args) { + try { + // HttpsUrls + { + String protocol = "http://"; + URL u = new URL(protocol + "www.secret.example.org/"); + // using HttpsURLConnections to enforce SSL is desirable + // BAD: this will give a ClassCastException at runtime, as the + // http URL cannot be used to make an HttpsURLConnection + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String protocol = "http"; + URL u = new URL(protocol, "www.secret.example.org", "foo"); + // using HttpsURLConnections to enforce SSL is desirable + // BAD: this will give a ClassCastException at runtime, as the + // http URL cannot be used to make an HttpsURLConnection + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String protocol = "http://"; + // the second URL overwrites the first, as it has a protocol + URL u = new URL(new URL("https://www.secret.example.org"), protocol + "www.secret.example.org"); + // using HttpsURLConnections to enforce SSL is desirable + // BAD: this will give a ClassCastException at runtime, as the + // http URL cannot be used to make an HttpsURLConnection + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String protocol = "https://"; + URL u = new URL(protocol + "www.secret.example.org/"); + // using HttpsURLConnections to enforce SSL is desirable + // GOOD: open connection to URL using HTTPS + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String protocol = "https"; + URL u = new URL(protocol, "www.secret.example.org", "foo"); + // using HttpsURLConnections to enforce SSL is desirable + // GOOD: open connection to URL using HTTPS + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String protocol = "http"; + URL u = new URL(protocol, "internal-url", "foo"); + // FALSE POSITIVE: the query has no way of knowing whether the url will + // resolve to somewhere outside the internal network, where there + // are unlikely to be interception attempts + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + + { + String input = "URL is: http://www.secret-example.org"; + String url = input.substring(8); + URL u = new URL(url); + // FALSE NEGATIVE: we cannot tell that the substring results in a url + // string + HttpsURLConnection hu = (HttpsURLConnection) u.openConnection(); + hu.setRequestMethod("PUT"); + hu.connect(); + OutputStream os = hu.getOutputStream(); + hu.disconnect(); + } + } catch (Exception e) { + // fail + } + } + + public String sayHello() { + return "Hello"; + } +} \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSL.expected b/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSL.expected index d7769378f726..40f76e3bb10c 100644 --- a/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSL.expected +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSL.expected @@ -1 +1 @@ -| Test.java:11:15:11:41 | getInputStream(...) | Stream using vulnerable non-SSL connection. | +| UseSSLTest.java:11:15:11:41 | getInputStream(...) | Stream using vulnerable non-SSL connection. | diff --git a/java/ql/test/query-tests/security/CWE-311/CWE-319/Test.java b/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSLTest.java similarity index 95% rename from java/ql/test/query-tests/security/CWE-311/CWE-319/Test.java rename to java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSLTest.java index 9e2f3f923e85..b6ff8b57fbf1 100644 --- a/java/ql/test/query-tests/security/CWE-311/CWE-319/Test.java +++ b/java/ql/test/query-tests/security/CWE-311/CWE-319/UseSSLTest.java @@ -2,7 +2,7 @@ import javax.net.ssl.HttpsURLConnection; import java.io.*; -class Test { +class UseSSLTest { public void m1(HttpURLConnection connection) throws java.io.IOException { InputStream input; if (connection instanceof HttpsURLConnection) { From a24006239b0980ec2fdd6e66f3fb6c0da758c29e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 10:18:19 +0200 Subject: [PATCH 1339/1662] C#: Add more tests to effective visibility --- .../library-tests/modifiers/Effectively.expected | 2 ++ csharp/ql/test/library-tests/modifiers/Modifiers.cs | 13 +++++++++++++ .../test/library-tests/modifiers/Modifiers.expected | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/csharp/ql/test/library-tests/modifiers/Effectively.expected b/csharp/ql/test/library-tests/modifiers/Effectively.expected index f25ae319cfb2..04b73e9fee09 100644 --- a/csharp/ql/test/library-tests/modifiers/Effectively.expected +++ b/csharp/ql/test/library-tests/modifiers/Effectively.expected @@ -24,3 +24,5 @@ | Modifiers.cs:60:22:60:23 | I1 | public | | Modifiers.cs:62:14:62:15 | M1 | public | | Modifiers.cs:63:14:63:15 | M2 | public | +| Modifiers.cs:68:14:68:15 | M1 | internal | +| Modifiers.cs:71:18:71:19 | C2 | public | diff --git a/csharp/ql/test/library-tests/modifiers/Modifiers.cs b/csharp/ql/test/library-tests/modifiers/Modifiers.cs index e0f687b2dbb0..3868b5f9cc49 100644 --- a/csharp/ql/test/library-tests/modifiers/Modifiers.cs +++ b/csharp/ql/test/library-tests/modifiers/Modifiers.cs @@ -62,4 +62,17 @@ public interface I1 void M1(); void M2() => throw null; } + + internal interface I2 + { + void M1() => throw null; + } + + public class C2 : I2 + { + void I2.M1() => throw null; + + protected private void M2() { } + protected internal void M3() { } + } } diff --git a/csharp/ql/test/library-tests/modifiers/Modifiers.expected b/csharp/ql/test/library-tests/modifiers/Modifiers.expected index 52deb0c6da7f..50f6ee31a0ba 100644 --- a/csharp/ql/test/library-tests/modifiers/Modifiers.expected +++ b/csharp/ql/test/library-tests/modifiers/Modifiers.expected @@ -49,3 +49,12 @@ | Modifiers.cs:62:14:62:15 | M1 | file://:0:0:0:0 | public | | Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | public | | Modifiers.cs:63:14:63:15 | M2 | file://:0:0:0:0 | virtual | +| Modifiers.cs:66:24:66:25 | I2 | file://:0:0:0:0 | internal | +| Modifiers.cs:68:14:68:15 | M1 | file://:0:0:0:0 | public | +| Modifiers.cs:68:14:68:15 | M1 | file://:0:0:0:0 | virtual | +| Modifiers.cs:71:18:71:19 | C2 | file://:0:0:0:0 | public | +| Modifiers.cs:73:17:73:18 | M1 | file://:0:0:0:0 | private | +| Modifiers.cs:75:32:75:33 | M2 | file://:0:0:0:0 | private | +| Modifiers.cs:75:32:75:33 | M2 | file://:0:0:0:0 | protected | +| Modifiers.cs:76:33:76:34 | M3 | file://:0:0:0:0 | internal | +| Modifiers.cs:76:33:76:34 | M3 | file://:0:0:0:0 | protected | From f715445c7ae1ff3ffab86332b153710666069097 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 15:10:35 +0200 Subject: [PATCH 1340/1662] Fix effective privateness of explicitly implemented members --- csharp/ql/src/semmle/code/csharp/Member.qll | 11 +++++++++-- .../test/library-tests/modifiers/Effectively.expected | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 65fe94a0c50e..5fb9de956f15 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -102,7 +102,8 @@ class Modifiable extends Declaration, @modifiable { */ predicate isEffectivelyPrivate() { this.isPrivate() or - this.getDeclaringType+().isPrivate() + this.getDeclaringType+().isPrivate() or + this.(Virtualizable).getExplicitlyImplementedInterface().isEffectivelyPrivate() } /** @@ -111,7 +112,8 @@ class Modifiable extends Declaration, @modifiable { */ predicate isEffectivelyInternal() { this.isInternal() or - this.getDeclaringType+().isInternal() + this.getDeclaringType+().isInternal() or + this.(Virtualizable).getExplicitlyImplementedInterface().isInternal() } /** @@ -159,6 +161,11 @@ class Virtualizable extends Member, @virtualizable { implementsExplicitInterface() } + override predicate isPrivate() { + Member.super.isPrivate() and + not implementsExplicitInterface() + } + /** * Gets any interface this member explicitly implements; this only applies * to members that can be declared on an interface, i.e. methods, properties, diff --git a/csharp/ql/test/library-tests/modifiers/Effectively.expected b/csharp/ql/test/library-tests/modifiers/Effectively.expected index 04b73e9fee09..e7914af884a4 100644 --- a/csharp/ql/test/library-tests/modifiers/Effectively.expected +++ b/csharp/ql/test/library-tests/modifiers/Effectively.expected @@ -26,3 +26,4 @@ | Modifiers.cs:63:14:63:15 | M2 | public | | Modifiers.cs:68:14:68:15 | M1 | internal | | Modifiers.cs:71:18:71:19 | C2 | public | +| Modifiers.cs:73:17:73:18 | M1 | internal | From eea96a55855dd52c763d3eb52c1acde9097c387b Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 15 Apr 2021 16:31:27 +0200 Subject: [PATCH 1341/1662] Fix effective publicness of `protected private` and `protected internal` --- csharp/ql/src/semmle/code/csharp/Member.qll | 18 +++++++++++++----- .../modifiers/Effectively.expected | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 5fb9de956f15..90d803f90ffb 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -96,24 +96,32 @@ class Modifiable extends Declaration, @modifiable { /** Holds if this declaration is `async`. */ predicate isAsync() { this.hasModifier("async") } + private predicate isReallyPrivate() { this.isPrivate() and not this.isProtected() } + /** * Holds if this declaration is effectively `private` (either directly or * because one of the enclosing types is `private`). */ predicate isEffectivelyPrivate() { - this.isPrivate() or - this.getDeclaringType+().isPrivate() or + this.isReallyPrivate() or + this.getDeclaringType+().(Modifiable).isReallyPrivate() or this.(Virtualizable).getExplicitlyImplementedInterface().isEffectivelyPrivate() } + private predicate isReallyInternal() { + this.isInternal() and not this.isProtected() + or + this.isPrivate() and this.isProtected() + } + /** * Holds if this declaration is effectively `internal` (either directly or * because one of the enclosing types is `internal`). */ predicate isEffectivelyInternal() { - this.isInternal() or - this.getDeclaringType+().isInternal() or - this.(Virtualizable).getExplicitlyImplementedInterface().isInternal() + this.isReallyInternal() or + this.getDeclaringType+().(Modifiable).isReallyInternal() or + this.(Virtualizable).getExplicitlyImplementedInterface().isEffectivelyInternal() } /** diff --git a/csharp/ql/test/library-tests/modifiers/Effectively.expected b/csharp/ql/test/library-tests/modifiers/Effectively.expected index e7914af884a4..36afd1bc2884 100644 --- a/csharp/ql/test/library-tests/modifiers/Effectively.expected +++ b/csharp/ql/test/library-tests/modifiers/Effectively.expected @@ -27,3 +27,5 @@ | Modifiers.cs:68:14:68:15 | M1 | internal | | Modifiers.cs:71:18:71:19 | C2 | public | | Modifiers.cs:73:17:73:18 | M1 | internal | +| Modifiers.cs:75:32:75:33 | M2 | internal | +| Modifiers.cs:76:33:76:34 | M3 | public | From 77f8f3fa8ae98e915e2ad160c8bb697f8a780245 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 12:07:49 +0200 Subject: [PATCH 1342/1662] Adjust comments on isEffectively* --- csharp/ql/src/semmle/code/csharp/Member.qll | 25 ++++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 90d803f90ffb..bff14e67c6f6 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -99,8 +99,15 @@ class Modifiable extends Declaration, @modifiable { private predicate isReallyPrivate() { this.isPrivate() and not this.isProtected() } /** - * Holds if this declaration is effectively `private` (either directly or - * because one of the enclosing types is `private`). + * Holds if this declaration is effectively `private`. A declaration is considered + * effectively `private` if it can only be referenced from + * - the declaring and its nested types, similarly to `private` declarations, and + * - the enclosing types. + * + * Note that explicit interface implementation are also considered effectively + * `private` if the implemented interface is itself effectively `private`. Finally, + * `private protected` members are not considered effectively `private`, because + * they can be overriden within the declaring assembly. */ predicate isEffectivelyPrivate() { this.isReallyPrivate() or @@ -115,8 +122,14 @@ class Modifiable extends Declaration, @modifiable { } /** - * Holds if this declaration is effectively `internal` (either directly or - * because one of the enclosing types is `internal`). + * Holds if this declaration is effectively `internal`. A declaration is considered + * effectively `internal` if it can only be referenced from the declaring assembly. + * + * Note that friend assemblies declared in `InternalsVisibleToAttribute` are not + * considered. Explicit interface implementation are also considered effectively + * `internal` if the implemented interface is itself effectively `internal`. Finally, + * `internal protected` members are not considered effectively `internal`, because + * they can be overriden outside the declaring assembly. */ predicate isEffectivelyInternal() { this.isReallyInternal() or @@ -125,8 +138,8 @@ class Modifiable extends Declaration, @modifiable { } /** - * Holds if this declaration is effectively `public`, because it - * and all enclosing types are `public`. + * Holds if this declaration is effectively `public`, meaning that it can be + * referenced outside the declaring assembly. */ predicate isEffectivelyPublic() { not isEffectivelyPrivate() and not isEffectivelyInternal() } } From db8a777aa9b6eeba77972274c4090e86e960c244 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 16:19:46 +0200 Subject: [PATCH 1343/1662] Fix isEffectively* predicates to members extracted from multiple assemblies --- csharp/ql/src/semmle/code/csharp/Member.qll | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index bff14e67c6f6..de51f5a9f23e 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -96,7 +96,12 @@ class Modifiable extends Declaration, @modifiable { /** Holds if this declaration is `async`. */ predicate isAsync() { this.hasModifier("async") } - private predicate isReallyPrivate() { this.isPrivate() and not this.isProtected() } + private predicate isReallyPrivate() { + this.isPrivate() and + not this.isProtected() and + // Rare case when a member is defined with the same name in multiple assemblies with different visibility + not this.isPublic() + } /** * Holds if this declaration is effectively `private`. A declaration is considered @@ -116,9 +121,13 @@ class Modifiable extends Declaration, @modifiable { } private predicate isReallyInternal() { - this.isInternal() and not this.isProtected() - or - this.isPrivate() and this.isProtected() + ( + this.isInternal() and not this.isProtected() + or + this.isPrivate() and this.isProtected() + ) and + // Rare case when a member is defined with the same name in multiple assemblies with different visibility + not this.isPublic() } /** From c5b8acf216fb9c4fa91c58cb9915d53662b7eb2b Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 16:23:14 +0200 Subject: [PATCH 1344/1662] Add change notes --- csharp/change-notes/2021-06-15-effective-visibility.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 csharp/change-notes/2021-06-15-effective-visibility.md diff --git a/csharp/change-notes/2021-06-15-effective-visibility.md b/csharp/change-notes/2021-06-15-effective-visibility.md new file mode 100644 index 000000000000..f14e338079ab --- /dev/null +++ b/csharp/change-notes/2021-06-15-effective-visibility.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The `isEffectivelyPrivate`, `isEffectivelyInternal` and `isEffectivelyPublic` predicates on `Modifiable` have been reworked to handle `private protected` and `internal protected` visibilities and explicitly implemented interfaces. \ No newline at end of file From 28ef0e86f6c8960bf2ec6f83db701bdbf81c930f Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 10:26:27 +0200 Subject: [PATCH 1345/1662] Apply code review findings --- csharp/ql/src/semmle/code/csharp/Member.qll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index de51f5a9f23e..191c7c85516c 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -109,7 +109,7 @@ class Modifiable extends Declaration, @modifiable { * - the declaring and its nested types, similarly to `private` declarations, and * - the enclosing types. * - * Note that explicit interface implementation are also considered effectively + * Note that explicit interface implementations are also considered effectively * `private` if the implemented interface is itself effectively `private`. Finally, * `private protected` members are not considered effectively `private`, because * they can be overriden within the declaring assembly. @@ -135,7 +135,7 @@ class Modifiable extends Declaration, @modifiable { * effectively `internal` if it can only be referenced from the declaring assembly. * * Note that friend assemblies declared in `InternalsVisibleToAttribute` are not - * considered. Explicit interface implementation are also considered effectively + * considered. Explicit interface implementations are also considered effectively * `internal` if the implemented interface is itself effectively `internal`. Finally, * `internal protected` members are not considered effectively `internal`, because * they can be overriden outside the declaring assembly. @@ -192,7 +192,7 @@ class Virtualizable extends Member, @virtualizable { } override predicate isPrivate() { - Member.super.isPrivate() and + super.isPrivate() and not implementsExplicitInterface() } From e6474039483c8886d33df317ee4ae53dd0bf20ee Mon Sep 17 00:00:00 2001 From: Taus Date: Wed, 16 Jun 2021 10:59:56 +0000 Subject: [PATCH 1346/1662] Python: Avoid `__main__.py` files as entry points. According to the official documentation, the purpose of `__main__.py` files is that their presence in a package (say, `foo`) means one can execute the package directly using `python -m foo` (which will run the aforementioned `foo/__main__.py` file). In principle this means that adding `if __name__ == "__main__"` in these files is superfluous, as they are only intended to be executed (and not imported by some other file). However, in practice people often _do_ include the above construct. Here are some instances of this on LGTM.com: https://lgtm.com/query/7521266095072095777/ In particular, 10 out of 33 files in `cpython` have this construct. This causes some confusion in our module naming, as we usually see the presence of `__name__ == "__main__"` as an indication that a file may be run directly (and hence with "absolute import" semantics). However, when run with `python -m`, the interpreter uses the usual package semantics, and this leads to modules getting multiple names. For this reason, I think it makes sense to simply exclude `__main__.py` files from consideration. Note that if there is a `#!` line mentioning the Python interpreter, then they will still be included as entry points. --- python/ql/src/semmle/python/Files.qll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/ql/src/semmle/python/Files.qll b/python/ql/src/semmle/python/Files.qll index 6eb6b2a18aca..885a902f4e7d 100644 --- a/python/ql/src/semmle/python/Files.qll +++ b/python/ql/src/semmle/python/Files.qll @@ -89,7 +89,10 @@ class File extends Container { i.getTest().(Compare).compares(name, op, main) and name.getId() = "__name__" and main.getText() = "__main__" - ) + ) and + // Exclude files named `__main__.py`. These are often _not_ meant to be run directly, but + // contain this construct anyway. + not this.getShortName() = "__main__.py" or // The file contains a `#!` line referencing the python interpreter exists(Comment c | From 5d00bb23e462d5e33585a6f0a62a7375fb29bf94 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 16 Jun 2021 12:48:11 +0100 Subject: [PATCH 1347/1662] Move logic for URL redirection sinks --- java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql | 7 +------ java/ql/src/semmle/code/java/security/UrlRedirect.qll | 8 +++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql b/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql index 8e3741e436bf..455f6add626b 100644 --- a/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql +++ b/java/ql/src/Security/CWE/CWE-601/UrlRedirect.ql @@ -13,7 +13,6 @@ import java import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.UrlRedirect -import semmle.code.java.dataflow.ExternalFlow import DataFlow::PathGraph class UrlRedirectConfig extends TaintTracking::Configuration { @@ -21,11 +20,7 @@ class UrlRedirectConfig extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } - override predicate isSink(DataFlow::Node sink) { - sink instanceof UrlRedirectSink - or - sinkNode(sink, "url-redirect") - } + override predicate isSink(DataFlow::Node sink) { sink instanceof UrlRedirectSink } } from DataFlow::PathNode source, DataFlow::PathNode sink, UrlRedirectConfig conf diff --git a/java/ql/src/semmle/code/java/security/UrlRedirect.qll b/java/ql/src/semmle/code/java/security/UrlRedirect.qll index 49ba24c77a91..254ea873fcc1 100644 --- a/java/ql/src/semmle/code/java/security/UrlRedirect.qll +++ b/java/ql/src/semmle/code/java/security/UrlRedirect.qll @@ -2,13 +2,19 @@ import java import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.ExternalFlow import semmle.code.java.frameworks.Servlets import semmle.code.java.frameworks.ApacheHttp private import semmle.code.java.frameworks.JaxWS -/** A URL redirection sink */ +/** A URL redirection sink. */ abstract class UrlRedirectSink extends DataFlow::Node { } +/** A default sink represeting methods susceptible to URL redirection attacks. */ +private class DefaultUrlRedirectSink extends UrlRedirectSink { + DefaultUrlRedirectSink() { sinkNode(this, "url-redirect") } +} + /** A Servlet URL redirection sink. */ private class ServletUrlRedirectSink extends UrlRedirectSink { ServletUrlRedirectSink() { From def3d6bac4149155907c86ab817b1b94bebb225b Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 1 Jun 2021 20:28:00 +0200 Subject: [PATCH 1348/1662] C#: CSV-based flow summaries --- .../code/csharp/dataflow/ExternalFlow.qll | 428 ++++++++++++++++++ .../internal/FlowSummaryImplSpecific.qll | 48 +- .../dataflow/external-models/Sinks.cs | 40 ++ .../dataflow/external-models/Sources.cs | 62 +++ .../dataflow/external-models/Steps.cs | 78 ++++ .../dataflow/external-models/sinks.expected | 8 + .../dataflow/external-models/sinks.ql | 23 + .../dataflow/external-models/srcs.expected | 24 + .../dataflow/external-models/srcs.ql | 34 ++ .../dataflow/external-models/steps.expected | 20 + .../dataflow/external-models/steps.ql | 41 ++ 11 files changed, 793 insertions(+), 13 deletions(-) create mode 100644 csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/Sinks.cs create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/Sources.cs create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/Steps.cs create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/sinks.expected create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/sinks.ql create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/srcs.expected create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/srcs.ql create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/steps.expected create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/steps.ql diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll new file mode 100644 index 000000000000..8b56507535dc --- /dev/null +++ b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll @@ -0,0 +1,428 @@ +/** + * INTERNAL use only. This is an experimental API subject to change without notice. + * + * Provides classes and predicates for dealing with flow models specified in CSV format. + * + * The CSV specification has the following columns: + * - Sources: + * `namespace; type; subtypes; name; signature; ext; output; kind` + * - Sinks: + * `namespace; type; subtypes; name; signature; ext; input; kind` + * - Summaries: + * `namespace; type; subtypes; name; signature; ext; input; output; kind` + * + * The interpretation of a row is similar to API-graphs with a left-to-right + * reading. + * 1. The `namespace` column selects a namespace. + * 2. The `type` column selects a type within that namespace. + * 3. The `subtypes` is a boolean that indicates whether to jump to an + * arbitrary subtype of that type. + * 4. The `name` column optionally selects a specific named member of the type. + * 5. The `signature` column optionally restricts the named member. If + * `signature` is blank then no such filtering is done. The format of the + * signature is a comma-separated list of types enclosed in parentheses. The + * types can be short names or fully qualified names (mixing these two options + * is not allowed within a single signature). + * 6. The `ext` column specifies additional API-graph-like edges. Currently + * there are only two valid values: "" and "Attribute". The empty string has no + * effect. "Attribute" applies if `name` and `signature` were left blank and + * acts by selecting an element that is attributed with the attribute type + * selected by the first 4 columns. This can be another member such as a field, + * property, method, or parameter. + * 7. The `input` column specifies how data enters the element selected by the + * first 6 columns, and the `output` column specifies how data leaves the + * element selected by the first 6 columns. For sinks, an `input` can be either "", + * "Argument[n]", "Argument[n1..n2]", or "ReturnValue": + * - "": Selects a write to the selected element in case this is a field or property. + * - "Argument[n]": Selects an argument in a call to the selected element. + * The arguments are zero-indexed, and `-1` specifies the qualifier. + * - "Argument[n1..n2]": Similar to "Argument[n]" but select any argument in + * the given range. The range is inclusive at both ends. + * - "ReturnValue": Selects a value being returned by the selected element. + * This requires that the selected element is a method with a body. + * + * For sources, an `output` can be either "", "Argument[n]", "Argument[n1..n2]", + * "Parameter", "Parameter[n]", "Parameter[n1..n2]", or "ReturnValue": + * - "": Selects a read of a selected field, property, or parameter. + * - "Argument[n]": Selects the post-update value of an argument in a call to the + * selected element. That is, the value of the argument after the call returns. + * The arguments are zero-indexed, and `-1` specifies the qualifier. + * - "Argument[n1..n2]": Similar to "Argument[n]" but select any argument in + * the given range. The range is inclusive at both ends. + * - "Parameter": Selects the value of a parameter of the selected element. + * "Parameter" is also allowed in case the selected element is already a + * parameter itself. + * - "Parameter[n]": Similar to "Parameter" but restricted to a specific + * numbered parameter (zero-indexed, and `-1` specifies the value of `this`). + * - "Parameter[n1..n2]": Similar to "Parameter[n]" but selects any parameter + * in the given range. The range is inclusive at both ends. + * - "ReturnValue": Selects the return value of a call to the selected element. + * + * For summaries, `input` and `output` may be prefixed by one of the following, + * separated by the "of" keyword: + * - "Element": Selects an element in a collection. + * - "Field[f]": Selects the contents of field `f`. + * - "Property[p]": Selects the contents of property `p`. + * + * 8. The `kind` column is a tag that can be referenced from QL to determine to + * which classes the interpreted elements should be added. For example, for + * sources "remote" indicates a default remote flow source, and for summaries + * "taint" indicates a default additional taint step and "value" indicates a + * globally applicable value-preserving step. + */ + +import csharp +private import internal.DataFlowDispatch +private import internal.DataFlowPrivate +private import internal.DataFlowPublic +private import internal.FlowSummaryImpl::Public +private import internal.FlowSummaryImpl::Private::External +private import internal.FlowSummaryImplSpecific + +/** + * A module importing the frameworks that provide external flow data, + * ensuring that they are visible to the taint tracking / data flow library. + */ +private module Frameworks { + // TODO +} + +/** + * A unit class for adding additional source model rows. + * + * Extend this class to add additional source definitions. + */ +class SourceModelCsv extends Unit { + /** Holds if `row` specifies a source definition. */ + abstract predicate row(string row); +} + +/** + * A unit class for adding additional sink model rows. + * + * Extend this class to add additional sink definitions. + */ +class SinkModelCsv extends Unit { + /** Holds if `row` specifies a sink definition. */ + abstract predicate row(string row); +} + +/** + * A unit class for adding additional summary model rows. + * + * Extend this class to add additional flow summary definitions. + */ +class SummaryModelCsv extends Unit { + /** Holds if `row` specifies a summary definition. */ + abstract predicate row(string row); +} + +private predicate sourceModel(string row) { any(SourceModelCsv s).row(row) } + +private predicate sinkModel(string row) { any(SinkModelCsv s).row(row) } + +private predicate summaryModel(string row) { any(SummaryModelCsv s).row(row) } + +/** Holds if a source model exists for the given parameters. */ +predicate sourceModel( + string namespace, string type, boolean subtypes, string name, string signature, string ext, + string output, string kind +) { + exists(string row | + sourceModel(row) and + row.splitAt(";", 0) = namespace and + row.splitAt(";", 1) = type and + row.splitAt(";", 2) = subtypes.toString() and + subtypes = [true, false] and + row.splitAt(";", 3) = name and + row.splitAt(";", 4) = signature and + row.splitAt(";", 5) = ext and + row.splitAt(";", 6) = output and + row.splitAt(";", 7) = kind + ) +} + +/** Holds if a sink model exists for the given parameters. */ +predicate sinkModel( + string namespace, string type, boolean subtypes, string name, string signature, string ext, + string input, string kind +) { + exists(string row | + sinkModel(row) and + row.splitAt(";", 0) = namespace and + row.splitAt(";", 1) = type and + row.splitAt(";", 2) = subtypes.toString() and + subtypes = [true, false] and + row.splitAt(";", 3) = name and + row.splitAt(";", 4) = signature and + row.splitAt(";", 5) = ext and + row.splitAt(";", 6) = input and + row.splitAt(";", 7) = kind + ) +} + +/** Holds if a summary model exists for the given parameters. */ +predicate summaryModel( + string namespace, string type, boolean subtypes, string name, string signature, string ext, + string input, string output, string kind +) { + exists(string row | + summaryModel(row) and + row.splitAt(";", 0) = namespace and + row.splitAt(";", 1) = type and + row.splitAt(";", 2) = subtypes.toString() and + subtypes = [true, false] and + row.splitAt(";", 3) = name and + row.splitAt(";", 4) = signature and + row.splitAt(";", 5) = ext and + row.splitAt(";", 6) = input and + row.splitAt(";", 7) = output and + row.splitAt(";", 8) = kind + ) +} + +private predicate relevantNamespace(string namespace) { + sourceModel(namespace, _, _, _, _, _, _, _) or + sinkModel(namespace, _, _, _, _, _, _, _) or + summaryModel(namespace, _, _, _, _, _, _, _, _) +} + +private predicate namespaceLink(string shortns, string longns) { + relevantNamespace(shortns) and + relevantNamespace(longns) and + longns.prefix(longns.indexOf(".")) = shortns +} + +private predicate canonicalNamespace(string namespace) { + relevantNamespace(namespace) and not namespaceLink(_, namespace) +} + +private predicate canonicalNamespaceLink(string namespace, string subns) { + canonicalNamespace(namespace) and + (subns = namespace or namespaceLink(namespace, subns)) +} + +/** + * Holds if CSV framework coverage of `namespace` is `n` api endpoints of the + * kind `(kind, part)`. + */ +predicate modelCoverage(string namespace, int namespaces, string kind, string part, int n) { + namespaces = strictcount(string subns | canonicalNamespaceLink(namespace, subns)) and + ( + part = "source" and + n = + strictcount(string subns, string type, boolean subtypes, string name, string signature, + string ext, string output | + canonicalNamespaceLink(namespace, subns) and + sourceModel(subns, type, subtypes, name, signature, ext, output, kind) + ) + or + part = "sink" and + n = + strictcount(string subns, string type, boolean subtypes, string name, string signature, + string ext, string input | + canonicalNamespaceLink(namespace, subns) and + sinkModel(subns, type, subtypes, name, signature, ext, input, kind) + ) + or + part = "summary" and + n = + strictcount(string subns, string type, boolean subtypes, string name, string signature, + string ext, string input, string output | + canonicalNamespaceLink(namespace, subns) and + summaryModel(subns, type, subtypes, name, signature, ext, input, output, kind) + ) + ) +} + +/** Provides a query predicate to check the CSV data for validation errors. */ +module CsvValidation { + /** Holds if some row in a CSV-based flow model appears to contain typos. */ + query predicate invalidModelRow(string msg) { + exists(string pred, string namespace, string type, string name, string signature, string ext | + sourceModel(namespace, type, _, name, signature, ext, _, _) and pred = "source" + or + sinkModel(namespace, type, _, name, signature, ext, _, _) and pred = "sink" + or + summaryModel(namespace, type, _, name, signature, ext, _, _, _) and pred = "summary" + | + not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and + msg = "Dubious namespace \"" + namespace + "\" in " + pred + " model." + or + not type.regexpMatch("[a-zA-Z0-9_<>\\.]+") and + msg = "Dubious type \"" + type + "\" in " + pred + " model." + or + not name.regexpMatch("[a-zA-Z0-9_]*") and + msg = "Dubious name \"" + name + "\" in " + pred + " model." + or + not signature.regexpMatch("|\\([a-zA-Z0-9_\\.<>,\\[\\]]*\\)") and + msg = "Dubious signature \"" + signature + "\" in " + pred + " model." + or + not ext.regexpMatch("|Attribute") and + msg = "Unrecognized extra API graph element \"" + ext + "\" in " + pred + " model." + ) + or + exists(string pred, string input, string part | + sinkModel(_, _, _, _, _, _, input, _) and pred = "sink" + or + summaryModel(_, _, _, _, _, _, input, _, _) and pred = "summary" + | + ( + invalidSpecComponent(input, part) and + not part = "" and + not (part = "Argument" and pred = "sink") and + not parseArg(part, _) + or + specSplit(input, part, _) and + parseParam(part, _) + ) and + msg = "Unrecognized input specification \"" + part + "\" in " + pred + " model." + ) + or + exists(string pred, string output, string part | + sourceModel(_, _, _, _, _, _, output, _) and pred = "source" + or + summaryModel(_, _, _, _, _, _, _, output, _) and pred = "summary" + | + invalidSpecComponent(output, part) and + not part = "" and + not (part = ["Argument", "Parameter"] and pred = "source") and + msg = "Unrecognized output specification \"" + part + "\" in " + pred + " model." + ) + or + exists(string pred, string row, int expect | + sourceModel(row) and expect = 8 and pred = "source" + or + sinkModel(row) and expect = 8 and pred = "sink" + or + summaryModel(row) and expect = 9 and pred = "summary" + | + exists(int cols | + cols = 1 + max(int n | exists(row.splitAt(";", n))) and + cols != expect and + msg = + "Wrong number of columns in " + pred + " model row, expected " + expect + ", got " + cols + + "." + ) + or + exists(string b | + b = row.splitAt(";", 2) and + not b = ["true", "false"] and + msg = "Invalid boolean \"" + b + "\" in " + pred + " model." + ) + ) + } +} + +private predicate elementSpec( + string namespace, string type, boolean subtypes, string name, string signature, string ext +) { + sourceModel(namespace, type, subtypes, name, signature, ext, _, _) or + sinkModel(namespace, type, subtypes, name, signature, ext, _, _) or + summaryModel(namespace, type, subtypes, name, signature, ext, _, _, _) +} + +private class UnboundValueOrRefType extends ValueOrRefType { + UnboundValueOrRefType() { this.isUnboundDeclaration() } + + UnboundValueOrRefType getASubTypeUnbound() { result = this.getASubType().getUnboundDeclaration() } +} + +bindingset[namespace, type, subtypes] +private UnboundValueOrRefType interpretType(string namespace, string type, boolean subtypes) { + exists(UnboundValueOrRefType t | + t.hasQualifiedName(namespace, type) and + if subtypes = true then result = t.getASubTypeUnbound*() else result = t + ) +} + +private string paramsStringPartA(Callable c, int i) { + i = -1 and result = "(" + or + exists(int n | + exists(c.getParameter(n)) and + i = 2 * n - 1 and + result = "," and + n != 0 + ) + or + i = 2 * c.getNumberOfParameters() and result = ")" +} + +private string paramsStringPartB(Callable c, int i, boolean fullyQualified) { + exists(int n, string p, Type t | + t = c.getParameter(n).getType() and + i = 2 * n and + result = p + | + fullyQualified = true and p = t.getQualifiedName() + or + fullyQualified = false and p = t.toStringWithTypes() + ) +} + +private string paramsString(Callable c, boolean fullyQualified) { + fullyQualified in [false, true] and + result = + strictconcat(int i, string s | + s in [paramsStringPartA(c, i), paramsStringPartB(c, i, fullyQualified)] + | + s order by i + ) +} + +private Element interpretElement0( + string namespace, string type, boolean subtypes, string name, string signature +) { + elementSpec(namespace, type, subtypes, name, signature, _) and + exists(UnboundValueOrRefType t | t = interpretType(namespace, type, subtypes) | + exists(Member m | + result = m and + m.getDeclaringType() = t and + m.hasName(name) + | + signature = "" + or + paramsString(m, _) = signature + ) + or + result = t and + name = "" and + signature = "" + ) +} + +/** Gets the source/sink/summary element corresponding to the supplied parameters. */ +Element interpretElement( + string namespace, string type, boolean subtypes, string name, string signature, string ext +) { + elementSpec(namespace, type, subtypes, name, signature, ext) and + exists(Element e | e = interpretElement0(namespace, type, subtypes, name, signature) | + ext = "" and result = e + or + ext = "Attribute" and result.(Attributable).getAnAttribute().getType() = e + ) +} + +cached +private module Cached { + /** + * Holds if `node` is specified as a source with the given kind in a CSV flow + * model. + */ + cached + predicate sourceNode(Node node, string kind) { + exists(InterpretNode n | isSourceNode(n, kind) and n.asNode() = node) + } + + /** + * Holds if `node` is specified as a sink with the given kind in a CSV flow + * model. + */ + cached + predicate sinkNode(Node node, string kind) { + exists(InterpretNode n | isSinkNode(n, kind) and n.asNode() = node) + } +} + +import Cached diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll index efab6eb9e3cf..ed4536979f61 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/FlowSummaryImplSpecific.qll @@ -10,6 +10,7 @@ private import DataFlowPublic private import FlowSummaryImpl::Private private import FlowSummaryImpl::Public private import semmle.code.csharp.Unification +private import semmle.code.csharp.dataflow.ExternalFlow /** Holds is `i` is a valid parameter position. */ predicate parameterPosition(int i) { i in [-1 .. any(Parameter p).getPosition()] } @@ -82,7 +83,40 @@ DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) { * Holds if an external flow summary exists for `c` with input specification * `input`, output specification `output`, and kind `kind`. */ -predicate summaryElement(DataFlowCallable c, string input, string output, string kind) { none() } +predicate summaryElement(DataFlowCallable c, string input, string output, string kind) { + exists( + string namespace, string type, boolean subtypes, string name, string signature, string ext + | + summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind) and + c = interpretElement(namespace, type, subtypes, name, signature, ext) + ) +} + +/** + * Holds if an external source specification exists for `e` with output specification + * `output` and kind `kind`. + */ +predicate sourceElement(Element e, string output, string kind) { + exists( + string namespace, string type, boolean subtypes, string name, string signature, string ext + | + sourceModel(namespace, type, subtypes, name, signature, ext, output, kind) and + e = interpretElement(namespace, type, subtypes, name, signature, ext) + ) +} + +/** + * Holds if an external sink specification exists for `n` with input specification + * `input` and kind `kind`. + */ +predicate sinkElement(Element e, string input, string kind) { + exists( + string namespace, string type, boolean subtypes, string name, string signature, string ext + | + sinkModel(namespace, type, subtypes, name, signature, ext, input, kind) and + e = interpretElement(namespace, type, subtypes, name, signature, ext) + ) +} /** Gets the summary component for specification component `c`, if any. */ bindingset[c] @@ -102,18 +136,6 @@ SummaryComponent interpretComponentSpecific(string c) { class SourceOrSinkElement = Element; -/** - * Holds if an external source specification exists for `e` with output specification - * `output` and kind `kind`. - */ -predicate sourceElement(Element e, string output, string kind) { none() } - -/** - * Holds if an external sink specification exists for `n` with input specification - * `input` and kind `kind`. - */ -predicate sinkElement(Element e, string input, string kind) { none() } - /** Gets the return kind corresponding to specification `"ReturnValue"`. */ NormalReturnKind getReturnValueKind() { any() } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/Sinks.cs b/csharp/ql/test/library-tests/dataflow/external-models/Sinks.cs new file mode 100644 index 000000000000..6adbd64e5bac --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/Sinks.cs @@ -0,0 +1,40 @@ +namespace My.Qltest +{ + public class B + { + void Foo() + { + object arg1 = new object(); + Sink1(arg1); + + object argToTagged = new object(); + TaggedSinkMethod(argToTagged); + + object fieldWrite = new object(); + TaggedField = fieldWrite; + } + + object SinkMethod() + { + object res = new object(); + return res; + } + + [SinkAttribute] + object TaggedSinkMethod() + { + object resTag = new object(); + return resTag; + } + + void Sink1(object x) { } + + [SinkAttribute] + void TaggedSinkMethod(object x) { } + + [SinkAttribute] + object TaggedField; + } + + class SinkAttribute : System.Attribute { } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs b/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs new file mode 100644 index 000000000000..03d174ccb987 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/Sources.cs @@ -0,0 +1,62 @@ +namespace My.Qltest +{ + public class A + { + void Foo() + { + object x; + x = Src1(); + x = Src1(""); + + Sub sub = new Sub(); + x = sub.Src2(); + x = sub.Src3(); + + SrcArg(x); + + x = TaggedSrcMethod(); + x = TaggedSrcField; + + x = SrcTwoArg("", ""); + } + + [SourceAttribute()] + void Tagged1(object taggedMethodParam) + { + } + + void Tagged2([SourceAttribute()] object taggedSrcParam) + { + } + + object Src1() { return null; } + + object Src1(string s) { return null; } + + object Src2() { return null; } + + public virtual object Src3() { return null; } + + public virtual void SrcParam(object p) { } + + class Sub : A + { + // inherit src2 + public override object Src3() { return null; } + + public override void SrcParam(object p) { } + } + + void SrcArg(object src) { } + + [SourceAttribute()] + object TaggedSrcMethod() { return null; } + + [SourceAttribute()] + object TaggedSrcField; + + object SrcTwoArg(string s1, string s2) { return null; } + } + + class SourceAttribute : System.Attribute { } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/external-models/Steps.cs b/csharp/ql/test/library-tests/dataflow/external-models/Steps.cs new file mode 100644 index 000000000000..ef026f1e3c58 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/Steps.cs @@ -0,0 +1,78 @@ +namespace My.Qltest +{ + public class C + { + void Foo() + { + object arg1 = new object(); + StepArgRes(arg1); + + object argIn1 = new object(); + object argOut1 = new object(); + StepArgArg(argIn1, argOut1); + object argIn2 = new object(); + object argOut2 = new object(); + StepArgArg(argIn2, argOut2); + + object arg2 = new object(); + StepArgQual(arg2); + object arg3 = new object(); + this.StepArgQual(arg3); + + this.StepQualRes(); + StepQualRes(); + + object argOut = new object(); + StepQualArg(argOut); + + this.StepFieldGetter(); + + this.StepFieldSetter(0); + + this.StepPropertyGetter(); + + this.StepPropertySetter(0); + + this.StepElementGetter(); + + this.StepElementSetter(0); + + var gen = new Generic(); + gen.StepGeneric(0); + gen.StepGeneric2(false); + } + + object StepArgRes(object x) { return null; } + + void StepArgArg(object @in, object @out) { } + + void StepArgQual(object x) { } + + object StepQualRes() { return null; } + + void StepQualArg(object @out) { } + + int Field; + + int StepFieldGetter() => throw null; + + void StepFieldSetter(int value) => throw null; + + int Property { get; set; } + + int StepPropertyGetter() => throw null; + + void StepPropertySetter(int value) => throw null; + + int StepElementGetter() => throw null; + + void StepElementSetter(int value) => throw null; + + class Generic + { + public T StepGeneric(T t) => throw null; + + public T StepGeneric2(S s) => throw null; + } + } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/external-models/sinks.expected b/csharp/ql/test/library-tests/dataflow/external-models/sinks.expected new file mode 100644 index 000000000000..be62f27f08b0 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/sinks.expected @@ -0,0 +1,8 @@ +invalidModelRow +#select +| Sinks.cs:8:19:8:22 | access to local variable arg1 | qltest | +| Sinks.cs:11:13:11:41 | this access | qltest-arg | +| Sinks.cs:11:30:11:40 | access to local variable argToTagged | qltest-arg | +| Sinks.cs:14:27:14:36 | access to local variable fieldWrite | qltest-nospec | +| Sinks.cs:20:20:20:22 | access to local variable res | qltest | +| Sinks.cs:27:20:27:25 | access to local variable resTag | qltest-retval | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql b/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql new file mode 100644 index 000000000000..933e6e7494e9 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql @@ -0,0 +1,23 @@ +import csharp +import DataFlow +import semmle.code.csharp.dataflow.ExternalFlow +import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import CsvValidation + +class SinkModelTest extends SinkModelCsv { + override predicate row(string row) { + row = + [ + //"namespace;type;overrides;name;signature;ext;spec;kind", + "My.Qltest;B;false;Sink1;(object);;Argument[0];qltest", + "My.Qltest;B;false;SinkMethod;();;ReturnValue;qltest", + "My.Qltest;SinkAttribute;false;;;Attribute;ReturnValue;qltest-retval", + "My.Qltest;SinkAttribute;false;;;Attribute;Argument;qltest-arg", + "My.Qltest;SinkAttribute;false;;;Attribute;;qltest-nospec" + ] + } +} + +from DataFlow::Node node, string kind +where sinkNode(node, kind) +select node, kind diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected new file mode 100644 index 000000000000..d0f314105db4 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected @@ -0,0 +1,24 @@ +invalidModelRow +#select +| Sources.cs:8:17:8:22 | call to method Src1 | qltest | +| Sources.cs:8:17:8:22 | call to method Src1 | qltest-all-overloads | +| Sources.cs:9:17:9:24 | call to method Src1 | qltest | +| Sources.cs:9:17:9:24 | call to method Src1 | qltest-all-overloads | +| Sources.cs:9:17:9:24 | call to method Src1 | qltest-alt | +| Sources.cs:12:17:12:26 | call to method Src2 | qltest | +| Sources.cs:12:17:12:26 | call to method Src2 | qltest-w-subtypes | +| Sources.cs:13:17:13:26 | call to method Src3 | qltest-w-subtypes | +| Sources.cs:15:13:15:21 | [post] this access | qltest-argany | +| Sources.cs:15:20:15:20 | [post] access to local variable x | qltest-argany | +| Sources.cs:15:20:15:20 | [post] access to local variable x | qltest-argnum | +| Sources.cs:17:17:17:33 | call to method TaggedSrcMethod | qltest-retval | +| Sources.cs:18:17:18:30 | access to field TaggedSrcField | qltest-nospec | +| Sources.cs:20:17:20:33 | call to method SrcTwoArg | qltest-longsig | +| Sources.cs:20:17:20:33 | call to method SrcTwoArg | qltest-shortsig | +| Sources.cs:24:14:24:20 | this | qltest-param | +| Sources.cs:24:29:24:45 | taggedMethodParam | qltest-param | +| Sources.cs:28:49:28:62 | taggedSrcParam | qltest-nospec | +| Sources.cs:28:49:28:62 | taggedSrcParam | qltest-param | +| Sources.cs:40:45:40:45 | p | qltest-param-override | +| Sources.cs:47:50:47:50 | p | qltest-param-override | +| Sources.cs:53:16:53:30 | this | qltest-param | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql new file mode 100644 index 000000000000..9e01e9e8b0fe --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql @@ -0,0 +1,34 @@ +import csharp +import DataFlow +import semmle.code.csharp.dataflow.ExternalFlow +import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import CsvValidation + +class SourceModelTest extends SourceModelCsv { + override predicate row(string row) { + row = + [ + //"namespace;type;overrides;name;signature;ext;spec;kind", + "My.Qltest;A;false;Src1;();;ReturnValue;qltest", + "My.Qltest;A;false;Src1;(string);;ReturnValue;qltest", + "My.Qltest;A;false;Src1;(System.String);;ReturnValue;qltest-alt", + "My.Qltest;A;false;Src1;;;ReturnValue;qltest-all-overloads", + "My.Qltest;A;false;Src2;();;ReturnValue;qltest", + "My.Qltest;A;false;Src3;();;ReturnValue;qltest", + "My.Qltest;A;true;Src2;();;ReturnValue;qltest-w-subtypes", + "My.Qltest;A;true;Src3;();;ReturnValue;qltest-w-subtypes", + "My.Qltest;A;false;SrcArg;(object);;Argument[0];qltest-argnum", + "My.Qltest;A;false;SrcArg;(object);;Argument;qltest-argany", + "My.Qltest;A;true;SrcParam;(object);;Parameter[0];qltest-param-override", + "My.Qltest;SourceAttribute;false;;;Attribute;ReturnValue;qltest-retval", + "My.Qltest;SourceAttribute;false;;;Attribute;Parameter;qltest-param", + "My.Qltest;SourceAttribute;false;;;Attribute;;qltest-nospec", + "My.Qltest;A;false;SrcTwoArg;(string,string);;ReturnValue;qltest-shortsig", + "My.Qltest;A;false;SrcTwoArg;(System.String,System.String);;ReturnValue;qltest-longsig" + ] + } +} + +from DataFlow::Node node, string kind +where sourceNode(node, kind) +select node, kind diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.expected b/csharp/ql/test/library-tests/dataflow/external-models/steps.expected new file mode 100644 index 000000000000..a34a7373bc3c --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -0,0 +1,20 @@ +invalidModelRow +summaryThroughStep +| Steps.cs:8:24:8:27 | access to local variable arg1 | Steps.cs:8:13:8:28 | call to method StepArgRes | false | +| Steps.cs:12:24:12:29 | access to local variable argIn1 | Steps.cs:12:32:12:38 | [post] access to local variable argOut1 | false | +| Steps.cs:15:24:15:29 | access to local variable argIn2 | Steps.cs:15:32:15:38 | [post] access to local variable argOut2 | false | +| Steps.cs:18:25:18:28 | access to local variable arg2 | Steps.cs:18:13:18:29 | [post] this access | false | +| Steps.cs:20:30:20:33 | access to local variable arg3 | Steps.cs:20:13:20:16 | [post] this access | false | +| Steps.cs:22:13:22:16 | this access | Steps.cs:22:13:22:30 | call to method StepQualRes | false | +| Steps.cs:23:13:23:25 | this access | Steps.cs:23:13:23:25 | call to method StepQualRes | false | +| Steps.cs:26:13:26:31 | this access | Steps.cs:26:25:26:30 | [post] access to local variable argOut | false | +| Steps.cs:41:29:41:29 | 0 | Steps.cs:41:13:41:30 | call to method StepGeneric | true | +| Steps.cs:42:30:42:34 | false | Steps.cs:42:13:42:35 | call to method StepGeneric2 | true | +summaryGetterStep +| Steps.cs:28:13:28:16 | this access | Steps.cs:28:13:28:34 | call to method StepFieldGetter | Steps.cs:55:13:55:17 | field Field | +| Steps.cs:32:13:32:16 | this access | Steps.cs:32:13:32:37 | call to method StepPropertyGetter | Steps.cs:61:13:61:20 | property Property | +| Steps.cs:36:13:36:16 | this access | Steps.cs:36:13:36:36 | call to method StepElementGetter | file://:0:0:0:0 | element | +summarySetterStep +| Steps.cs:30:34:30:34 | 0 | Steps.cs:30:13:30:16 | [post] this access | Steps.cs:55:13:55:17 | field Field | +| Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:61:13:61:20 | property Property | +| Steps.cs:38:36:38:36 | 0 | Steps.cs:38:13:38:16 | [post] this access | file://:0:0:0:0 | element | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql new file mode 100644 index 000000000000..fa97d49c4cc5 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql @@ -0,0 +1,41 @@ +import csharp +import DataFlow +import semmle.code.csharp.dataflow.ExternalFlow +import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl +import CsvValidation + +class SummaryModelTest extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + //"namespace;type;overrides;name;signature;ext;inputspec;outputspec;kind", + "My.Qltest;C;false;StepArgRes;(object);;Argument[0];ReturnValue;taint", + "My.Qltest;C;false;StepArgArg;(object,object);;Argument[0];Argument[1];taint", + "My.Qltest;C;false;StepArgQual;(object);;Argument[0];Argument[-1];taint", + "My.Qltest;C;false;StepQualRes;();;Argument[-1];ReturnValue;taint", + "My.Qltest;C;false;StepQualArg;(object);;Argument[-1];Argument[0];taint", + "My.Qltest;C;false;StepFieldGetter;();;Field[My.Qltest.C.Field] of Argument[-1];ReturnValue;value", + "My.Qltest;C;false;StepFieldSetter;(int);;Argument[0];Field[My.Qltest.C.Field] of Argument[-1];value", + "My.Qltest;C;false;StepPropertyGetter;();;Property[My.Qltest.C.Property] of Argument[-1];ReturnValue;value", + "My.Qltest;C;false;StepPropertySetter;(int);;Argument[0];Property[My.Qltest.C.Property] of Argument[-1];value", + "My.Qltest;C;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", + "My.Qltest;C;false;StepElementSetter;(int);;Argument[0];Element of Argument[-1];value", + "My.Qltest.C;Generic<>;false;StepGeneric;(T);;Argument[0];ReturnValue;value", + "My.Qltest.C;Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value" + ] + } +} + +query predicate summaryThroughStep( + DataFlow::Node node1, DataFlow::Node node2, boolean preservesValue +) { + FlowSummaryImpl::Private::Steps::summaryThroughStep(node1, node2, preservesValue) +} + +query predicate summaryGetterStep(DataFlow::Node arg, DataFlow::Node out, Content c) { + FlowSummaryImpl::Private::Steps::summaryGetterStep(arg, c, out) +} + +query predicate summarySetterStep(DataFlow::Node arg, DataFlow::Node out, Content c) { + FlowSummaryImpl::Private::Steps::summarySetterStep(arg, c, out) +} From 8866e6c96991e45451e1546c632b43cdd23c2377 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 16 Jun 2021 13:58:31 +0200 Subject: [PATCH 1349/1662] C#: Always use fully qualified names in CSV data-flow summaries --- .../code/csharp/dataflow/ExternalFlow.qll | 33 ++++++++++++------- .../dataflow/external-models/sinks.ql | 2 +- .../dataflow/external-models/srcs.expected | 4 +-- .../dataflow/external-models/srcs.ql | 12 +++---- .../dataflow/external-models/steps.ql | 14 ++++---- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll index 8b56507535dc..983e507078ef 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll @@ -336,7 +336,22 @@ private UnboundValueOrRefType interpretType(string namespace, string type, boole ) } -private string paramsStringPartA(Callable c, int i) { +private Member interpretMember( + string namespace, string type, boolean subtypes, string name, string signature +) { + elementSpec(namespace, type, subtypes, name, signature, _) and + exists(UnboundValueOrRefType t | + t = interpretType(namespace, type, subtypes) and + result.getDeclaringType() = t and + result.hasName(name) + ) +} + +private class InterpretedCallable extends Callable { + InterpretedCallable() { this = interpretMember(_, _, _, _, _) } +} + +private string paramsStringPartA(InterpretedCallable c, int i) { i = -1 and result = "(" or exists(int n | @@ -349,23 +364,19 @@ private string paramsStringPartA(Callable c, int i) { i = 2 * c.getNumberOfParameters() and result = ")" } -private string paramsStringPartB(Callable c, int i, boolean fullyQualified) { +private string paramsStringPartB(InterpretedCallable c, int i) { exists(int n, string p, Type t | t = c.getParameter(n).getType() and i = 2 * n and - result = p - | - fullyQualified = true and p = t.getQualifiedName() - or - fullyQualified = false and p = t.toStringWithTypes() + result = p and + p = t.getQualifiedName() ) } -private string paramsString(Callable c, boolean fullyQualified) { - fullyQualified in [false, true] and +private string paramsString(InterpretedCallable c) { result = strictconcat(int i, string s | - s in [paramsStringPartA(c, i), paramsStringPartB(c, i, fullyQualified)] + s in [paramsStringPartA(c, i), paramsStringPartB(c, i)] | s order by i ) @@ -383,7 +394,7 @@ private Element interpretElement0( | signature = "" or - paramsString(m, _) = signature + paramsString(m) = signature ) or result = t and diff --git a/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql b/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql index 933e6e7494e9..b18b0e5573c8 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/sinks.ql @@ -9,7 +9,7 @@ class SinkModelTest extends SinkModelCsv { row = [ //"namespace;type;overrides;name;signature;ext;spec;kind", - "My.Qltest;B;false;Sink1;(object);;Argument[0];qltest", + "My.Qltest;B;false;Sink1;(System.Object);;Argument[0];qltest", "My.Qltest;B;false;SinkMethod;();;ReturnValue;qltest", "My.Qltest;SinkAttribute;false;;;Attribute;ReturnValue;qltest-retval", "My.Qltest;SinkAttribute;false;;;Attribute;Argument;qltest-arg", diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected index d0f314105db4..ad709033a9f7 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.expected @@ -4,7 +4,6 @@ invalidModelRow | Sources.cs:8:17:8:22 | call to method Src1 | qltest-all-overloads | | Sources.cs:9:17:9:24 | call to method Src1 | qltest | | Sources.cs:9:17:9:24 | call to method Src1 | qltest-all-overloads | -| Sources.cs:9:17:9:24 | call to method Src1 | qltest-alt | | Sources.cs:12:17:12:26 | call to method Src2 | qltest | | Sources.cs:12:17:12:26 | call to method Src2 | qltest-w-subtypes | | Sources.cs:13:17:13:26 | call to method Src3 | qltest-w-subtypes | @@ -13,8 +12,7 @@ invalidModelRow | Sources.cs:15:20:15:20 | [post] access to local variable x | qltest-argnum | | Sources.cs:17:17:17:33 | call to method TaggedSrcMethod | qltest-retval | | Sources.cs:18:17:18:30 | access to field TaggedSrcField | qltest-nospec | -| Sources.cs:20:17:20:33 | call to method SrcTwoArg | qltest-longsig | -| Sources.cs:20:17:20:33 | call to method SrcTwoArg | qltest-shortsig | +| Sources.cs:20:17:20:33 | call to method SrcTwoArg | qltest | | Sources.cs:24:14:24:20 | this | qltest-param | | Sources.cs:24:29:24:45 | taggedMethodParam | qltest-param | | Sources.cs:28:49:28:62 | taggedSrcParam | qltest-nospec | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql index 9e01e9e8b0fe..03345bdba959 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/srcs.ql @@ -10,21 +10,19 @@ class SourceModelTest extends SourceModelCsv { [ //"namespace;type;overrides;name;signature;ext;spec;kind", "My.Qltest;A;false;Src1;();;ReturnValue;qltest", - "My.Qltest;A;false;Src1;(string);;ReturnValue;qltest", - "My.Qltest;A;false;Src1;(System.String);;ReturnValue;qltest-alt", + "My.Qltest;A;false;Src1;(System.String);;ReturnValue;qltest", "My.Qltest;A;false;Src1;;;ReturnValue;qltest-all-overloads", "My.Qltest;A;false;Src2;();;ReturnValue;qltest", "My.Qltest;A;false;Src3;();;ReturnValue;qltest", "My.Qltest;A;true;Src2;();;ReturnValue;qltest-w-subtypes", "My.Qltest;A;true;Src3;();;ReturnValue;qltest-w-subtypes", - "My.Qltest;A;false;SrcArg;(object);;Argument[0];qltest-argnum", - "My.Qltest;A;false;SrcArg;(object);;Argument;qltest-argany", - "My.Qltest;A;true;SrcParam;(object);;Parameter[0];qltest-param-override", + "My.Qltest;A;false;SrcArg;(System.Object);;Argument[0];qltest-argnum", + "My.Qltest;A;false;SrcArg;(System.Object);;Argument;qltest-argany", + "My.Qltest;A;true;SrcParam;(System.Object);;Parameter[0];qltest-param-override", "My.Qltest;SourceAttribute;false;;;Attribute;ReturnValue;qltest-retval", "My.Qltest;SourceAttribute;false;;;Attribute;Parameter;qltest-param", "My.Qltest;SourceAttribute;false;;;Attribute;;qltest-nospec", - "My.Qltest;A;false;SrcTwoArg;(string,string);;ReturnValue;qltest-shortsig", - "My.Qltest;A;false;SrcTwoArg;(System.String,System.String);;ReturnValue;qltest-longsig" + "My.Qltest;A;false;SrcTwoArg;(System.String,System.String);;ReturnValue;qltest" ] } } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql index fa97d49c4cc5..4d15c0992e56 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql @@ -9,17 +9,17 @@ class SummaryModelTest extends SummaryModelCsv { row = [ //"namespace;type;overrides;name;signature;ext;inputspec;outputspec;kind", - "My.Qltest;C;false;StepArgRes;(object);;Argument[0];ReturnValue;taint", - "My.Qltest;C;false;StepArgArg;(object,object);;Argument[0];Argument[1];taint", - "My.Qltest;C;false;StepArgQual;(object);;Argument[0];Argument[-1];taint", + "My.Qltest;C;false;StepArgRes;(System.Object);;Argument[0];ReturnValue;taint", + "My.Qltest;C;false;StepArgArg;(System.Object,System.Object);;Argument[0];Argument[1];taint", + "My.Qltest;C;false;StepArgQual;(System.Object);;Argument[0];Argument[-1];taint", "My.Qltest;C;false;StepQualRes;();;Argument[-1];ReturnValue;taint", - "My.Qltest;C;false;StepQualArg;(object);;Argument[-1];Argument[0];taint", + "My.Qltest;C;false;StepQualArg;(System.Object);;Argument[-1];Argument[0];taint", "My.Qltest;C;false;StepFieldGetter;();;Field[My.Qltest.C.Field] of Argument[-1];ReturnValue;value", - "My.Qltest;C;false;StepFieldSetter;(int);;Argument[0];Field[My.Qltest.C.Field] of Argument[-1];value", + "My.Qltest;C;false;StepFieldSetter;(System.Int32);;Argument[0];Field[My.Qltest.C.Field] of Argument[-1];value", "My.Qltest;C;false;StepPropertyGetter;();;Property[My.Qltest.C.Property] of Argument[-1];ReturnValue;value", - "My.Qltest;C;false;StepPropertySetter;(int);;Argument[0];Property[My.Qltest.C.Property] of Argument[-1];value", + "My.Qltest;C;false;StepPropertySetter;(System.Int32);;Argument[0];Property[My.Qltest.C.Property] of Argument[-1];value", "My.Qltest;C;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", - "My.Qltest;C;false;StepElementSetter;(int);;Argument[0];Element of Argument[-1];value", + "My.Qltest;C;false;StepElementSetter;(System.Int32);;Argument[0];Element of Argument[-1];value", "My.Qltest.C;Generic<>;false;StepGeneric;(T);;Argument[0];ReturnValue;value", "My.Qltest.C;Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value" ] From 0af44a7f948ff502951a64e7703c2b0d6da4da57 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 16 Jun 2021 13:59:18 +0200 Subject: [PATCH 1350/1662] C#: Changes to `Type::{getQualifier,hasQualifiedName}` --- .../2021-06-16-qualified-names.md | 10 + csharp/ql/src/semmle/code/csharp/Generics.qll | 5 + csharp/ql/src/semmle/code/csharp/Member.qll | 7 +- csharp/ql/src/semmle/code/csharp/Type.qll | 59 +- .../code/csharp/dataflow/ExternalFlow.qll | 4 +- .../library-tests/csharp9/foreach.expected | 6 +- .../dataflow/external-models/steps.ql | 4 +- .../dataflow/library/FlowSummaries.expected | 516 +++++++-------- .../dispatch/GetADynamicTarget.expected | 589 +++++++++--------- .../expressions/OperatorCall6.ql | 2 +- .../system/Dispose/Dispose.expected | 4 +- .../library-tests/generics/Generics.expected | 144 ++--- .../library-tests/namespaces/Namespaces9.ql | 2 +- .../library-tests/nestedtypes/NestedTypes1.ql | 2 +- .../library-tests/nestedtypes/NestedTypes2.ql | 2 +- .../library-tests/nestedtypes/NestedTypes3.ql | 2 +- .../library-tests/nestedtypes/NestedTypes4.ql | 2 +- .../library-tests/nestedtypes/NestedTypes5.ql | 2 +- .../library-tests/nestedtypes/NestedTypes6.ql | 2 +- .../library-tests/nestedtypes/NestedTypes7.ql | 2 +- .../library-tests/nestedtypes/NestedTypes8.ql | 4 +- .../library-tests/nestedtypes/NestedTypes9.ql | 2 +- .../overrides/Overrides22.expected | 18 +- .../unification/Unification.expected | 134 ++-- .../NonOverridingMethod.expected | 2 +- 25 files changed, 808 insertions(+), 718 deletions(-) create mode 100644 csharp/change-notes/2021-06-16-qualified-names.md diff --git a/csharp/change-notes/2021-06-16-qualified-names.md b/csharp/change-notes/2021-06-16-qualified-names.md new file mode 100644 index 000000000000..738aa76527b9 --- /dev/null +++ b/csharp/change-notes/2021-06-16-qualified-names.md @@ -0,0 +1,10 @@ +lgtm,codescanning +* The following has changed in `Type::getQualifiedName`/`Type::hasQualifiedName`: + - Type parameters now have the qualified name of the declaring generic as + qualifier, and `` as name, where `i` is the index of the type parameter. + Example: in `class C { }`, `T` has qualified name `C.<0>`. + - Constructed types now use qualified names for type arguments. For example, the + qualified name of `C` is `C`. This also includes array types + and pointer types. + - Nested types are now delimited by `+` instead of `.`. For example, the qualified + name of `Inner` in `class Outer { class Inner { } }` is `Outer+Inner`. diff --git a/csharp/ql/src/semmle/code/csharp/Generics.qll b/csharp/ql/src/semmle/code/csharp/Generics.qll index 8077245adb37..7e0e325a4291 100644 --- a/csharp/ql/src/semmle/code/csharp/Generics.qll +++ b/csharp/ql/src/semmle/code/csharp/Generics.qll @@ -185,6 +185,11 @@ class TypeParameter extends DotNet::TypeParameter, Type, @type_parameter { /** Gets the generic that defines this type parameter. */ UnboundGeneric getGeneric() { type_parameters(this, _, result, _) } + final override predicate hasQualifiedName(string qualifier, string name) { + qualifier = this.getGeneric().getQualifiedName() and + name = "<" + this.getIndex().toString() + ">" + } + override string getAPrimaryQlClass() { result = "TypeParameter" } } diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 191c7c85516c..6c0870bfc390 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -34,7 +34,12 @@ class Declaration extends DotNet::Declaration, Element, @declaration { * ``` */ string getQualifiedNameWithTypes() { - result = this.getDeclaringType().getQualifiedName() + "." + this.toStringWithTypes() + exists(string qual | + qual = this.getDeclaringType().getQualifiedName() and + if this instanceof NestedType + then result = qual + "+" + this.toStringWithTypes() + else result = qual + "." + this.toStringWithTypes() + ) } /** diff --git a/csharp/ql/src/semmle/code/csharp/Type.qll b/csharp/ql/src/semmle/code/csharp/Type.qll index cf055062e33c..eea631ba377b 100644 --- a/csharp/ql/src/semmle/code/csharp/Type.qll +++ b/csharp/ql/src/semmle/code/csharp/Type.qll @@ -55,6 +55,28 @@ private predicate isObjectClass(Class c) { c instanceof ObjectType } * Either a value type (`ValueType`) or a reference type (`RefType`). */ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_or_ref_type { + /** Gets the name of this type without `<...>` brackets, in case it is a constructed type. */ + private string getNameWithoutBrackets() { + exists(UnboundGenericType unbound, string name | + unbound = this.(ConstructedType).getUnboundDeclaration() and + name = unbound.getName() and + result = name.prefix(name.length() - unbound.getNumberOfTypeParameters() - 1) + ) + or + not this instanceof ConstructedType and + result = this.getName() + } + + language[monotonicAggregates] + private string getQualifiedTypeArguments() { + result = + strictconcat(Type t, int i | + t = this.(ConstructedType).getTypeArgument(i) + | + t.getQualifiedName(), "," order by i + ) + } + /** * Holds if this type has the qualified name `qualifier`.`name`. * @@ -62,10 +84,21 @@ class ValueOrRefType extends DotNet::ValueOrRefType, Type, Attributable, @value_ * `qualifier`=`System.IO` and `name`=`IOException`. */ override predicate hasQualifiedName(string qualifier, string name) { - name = this.getName() and - if exists(this.getDeclaringType()) - then qualifier = this.getDeclaringType().getQualifiedName() - else qualifier = this.getNamespace().getQualifiedName() + exists(string name0 | + not this instanceof ConstructedType and + name = name0 + or + name = name0 + "<" + this.getQualifiedTypeArguments() + ">" + | + exists(string enclosing | + this.getDeclaringType().hasQualifiedName(qualifier, enclosing) and + name0 = enclosing + "+" + this.getNameWithoutBrackets() + ) + or + not exists(this.getDeclaringType()) and + qualifier = this.getNamespace().getQualifiedName() and + name0 = this.getNameWithoutBrackets() + ) } /** Gets the namespace containing this type. */ @@ -994,6 +1027,13 @@ class ArrayType extends DotNet::ArrayType, RefType, @array_type { not type_location(this, _) and result = this.getElementType().getALocation() } + + final override predicate hasQualifiedName(string qualifier, string name) { + exists(Type elementType, string name0 | + elementType.hasQualifiedName(qualifier, name0) and + name = name0 + this.getDimensionString(elementType) + ) + } } /** @@ -1013,6 +1053,13 @@ class PointerType extends DotNet::PointerType, Type, @pointer_type { override string toString() { result = DotNet::PointerType.super.toString() } override string getAPrimaryQlClass() { result = "PointerType" } + + final override predicate hasQualifiedName(string qualifier, string name) { + exists(string name0 | + this.getReferentType().hasQualifiedName(qualifier, name0) and + name = name0 + "*" + ) + } } /** @@ -1083,6 +1130,10 @@ class TupleType extends ValueType, @tuple_type { override string getLabel() { result = getUnderlyingType().getLabel() } override Type getChild(int i) { result = this.getUnderlyingType().getChild(i) } + + final override predicate hasQualifiedName(string qualifier, string name) { + this.getUnderlyingType().hasQualifiedName(qualifier, name) + } } /** diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll index 983e507078ef..fceaeb3cda57 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/ExternalFlow.qll @@ -249,13 +249,13 @@ module CsvValidation { not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and msg = "Dubious namespace \"" + namespace + "\" in " + pred + " model." or - not type.regexpMatch("[a-zA-Z0-9_<>\\.]+") and + not type.regexpMatch("[a-zA-Z0-9_<>\\.\\+]+") and msg = "Dubious type \"" + type + "\" in " + pred + " model." or not name.regexpMatch("[a-zA-Z0-9_]*") and msg = "Dubious name \"" + name + "\" in " + pred + " model." or - not signature.regexpMatch("|\\([a-zA-Z0-9_\\.<>,\\[\\]]*\\)") and + not signature.regexpMatch("|\\([a-zA-Z0-9_<>\\.\\+,\\[\\]]*\\)") and msg = "Dubious signature \"" + signature + "\" in " + pred + " model." or not ext.regexpMatch("|Attribute") and diff --git a/csharp/ql/test/library-tests/csharp9/foreach.expected b/csharp/ql/test/library-tests/csharp9/foreach.expected index 39694665cb0b..551729436d38 100644 --- a/csharp/ql/test/library-tests/csharp9/foreach.expected +++ b/csharp/ql/test/library-tests/csharp9/foreach.expected @@ -1,4 +1,4 @@ -| ForeachExtension.cs:24:9:26:9 | foreach (... ... in ...) ... | Int32 | sync | Extensions | ForeachExtension.cs:8:34:8:49 | System.Collections.Generic.IEnumerator | - | System.Collections.IEnumerator | - | -| ForeachExtension.cs:29:9:31:9 | foreach (... ... in ...) ... | Int32 | async | Extensions | ForeachExtension.cs:9:39:9:59 | System.Collections.Generic.IAsyncEnumerator | - | System.Collections.Generic.IAsyncEnumerator | - | -| ForeachExtension.cs:33:9:35:9 | foreach (... ... in ...) ... | Int32 | sync | Extensions | ForeachExtension.cs:10:36:10:48 | System.Collections.Generic.IEnumerator | - | System.Collections.IEnumerator | - | +| ForeachExtension.cs:24:9:26:9 | foreach (... ... in ...) ... | Int32 | sync | Extensions | ForeachExtension.cs:8:34:8:49 | System.Collections.Generic.IEnumerator | - | System.Collections.IEnumerator | - | +| ForeachExtension.cs:29:9:31:9 | foreach (... ... in ...) ... | Int32 | async | Extensions | ForeachExtension.cs:9:39:9:59 | System.Collections.Generic.IAsyncEnumerator | - | System.Collections.Generic.IAsyncEnumerator | - | +| ForeachExtension.cs:33:9:35:9 | foreach (... ... in ...) ... | Int32 | sync | Extensions | ForeachExtension.cs:10:36:10:48 | System.Collections.Generic.IEnumerator | - | System.Collections.IEnumerator | - | | ForeachExtension.cs:37:9:39:9 | foreach (... ... in ...) ... | Int32 | sync | System.Collections.IEnumerable | - | System.Collections.IEnumerator | - | System.Collections.IEnumerator | - | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql index 4d15c0992e56..7bb2616b7687 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql @@ -20,8 +20,8 @@ class SummaryModelTest extends SummaryModelCsv { "My.Qltest;C;false;StepPropertySetter;(System.Int32);;Argument[0];Property[My.Qltest.C.Property] of Argument[-1];value", "My.Qltest;C;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", "My.Qltest;C;false;StepElementSetter;(System.Int32);;Argument[0];Element of Argument[-1];value", - "My.Qltest.C;Generic<>;false;StepGeneric;(T);;Argument[0];ReturnValue;value", - "My.Qltest.C;Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value" + "My.Qltest;C+Generic<>;false;StepGeneric;(My.Qltest.C+Generic<>.<0>);;Argument[0];ReturnValue;value", + "My.Qltest;C+Generic<>;false;StepGeneric2;(My.Qltest.C+Generic<>.StepGeneric2.<0>);;Argument[0];ReturnValue;value" ] } } diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected index 10499656cb13..72d303b64eed 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected @@ -21,98 +21,98 @@ | System.Boolean.Parse(string) | argument 0 -> return (normal) | false | | System.Boolean.TryParse(string, out bool) | argument 0 -> return (normal) | false | | System.Boolean.TryParse(string, out bool) | argument 0 -> return (out parameter 1) | false | +| System.Collections.ArrayList+FixedSizeArrayList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeArrayList.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+FixedSizeArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+FixedSizeArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+FixedSizeList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+FixedSizeList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+FixedSizeList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+FixedSizeList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+IListWrapper.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+IListWrapper.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+IListWrapper.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+IListWrapper.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+IListWrapper.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+IListWrapper.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+IListWrapper.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+IListWrapper.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+IListWrapper.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+IListWrapper.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+IListWrapper.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+IListWrapper.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+Range.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+Range.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+Range.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+Range.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+Range.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+Range.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+Range.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+Range.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+Range.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+Range.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+Range.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+Range.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyArrayList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyArrayList.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+ReadOnlyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+ReadOnlyList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+ReadOnlyList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+ReadOnlyList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncArrayList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncArrayList.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+SyncArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+SyncArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncIList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncIList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+SyncIList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ArrayList+SyncIList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ArrayList+SyncIList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.ArrayList+SyncIList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList.Clone() | element of argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.ArrayList.FixedSize(ArrayList) | element of argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.FixedSize(IList) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.FixedSizeArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.FixedSizeArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.FixedSizeList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.FixedSizeList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.FixedSizeList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.FixedSizeList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.IListWrapper.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.IListWrapper.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.IListWrapper.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.IListWrapper.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.IListWrapper.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.IListWrapper.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.IListWrapper.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.Range.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.Range.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.Range.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.Range.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.Range.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.Range.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.Range.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.Range.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.Range.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.Range.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.Range.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.Range.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyArrayList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.ReadOnlyArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.ReadOnlyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.ReadOnlyList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.ReadOnlyList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.ReadOnlyList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.Repeat(object, int) | argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.Reverse() | element of argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.SyncArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncArrayList.InsertRange(int, ICollection) | element of argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncArrayList.Reverse(int, int) | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.SyncArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncIList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncIList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ArrayList.SyncIList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ArrayList.SyncIList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ArrayList.SyncIList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.ArrayList.SyncIList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.BitArray.Clone() | element of argument 0 -> element of return (normal) | true | @@ -124,7 +124,7 @@ | System.Collections.CollectionBase.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.CollectionBase.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.CollectionBase.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.Concurrent.BlockingCollection<>.d__68.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.BlockingCollection<>+d__68.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.BlockingCollection<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Collections.Concurrent.BlockingCollection<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Concurrent.BlockingCollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | @@ -165,12 +165,12 @@ | System.Collections.Concurrent.ConcurrentStack<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.ConcurrentStack<>.GetEnumerator(Node) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.IProducerConsumerCollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.OrderablePartitioner<>.EnumerableDropIndices.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.Partitioner.d__7.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.Partitioner.d__10.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.Partitioner.DynamicPartitionerForArray<>.InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.Partitioner.DynamicPartitionerForIEnumerable<>.InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.Partitioner.DynamicPartitionerForIList<>.InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.OrderablePartitioner<>+EnumerableDropIndices.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.Partitioner+d__7.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.Partitioner+d__10.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.Partitioner+DynamicPartitionerForArray<>+InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.Partitioner+DynamicPartitionerForIEnumerable<>+InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Concurrent.Partitioner+DynamicPartitionerForIList<>+InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.DictionaryBase.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.DictionaryBase.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.DictionaryBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | @@ -189,6 +189,14 @@ | System.Collections.EmptyReadOnlyDictionaryInternal.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.EmptyReadOnlyDictionaryInternal.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.EmptyReadOnlyDictionaryInternal.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Dictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | @@ -207,14 +215,6 @@ | System.Collections.Generic.Dictionary<,>.Dictionary(IEnumerable>, IEqualityComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.Dictionary<,>.Dictionary(IEnumerable>, IEqualityComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Generic.Dictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.Dictionary<,>.KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.Dictionary<,>.KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>.KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>.KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.Dictionary<,>.ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.Dictionary<,>.ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>.ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>.ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Dictionary<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.Dictionary<,>.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.Dictionary<,>.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -275,6 +275,14 @@ | System.Collections.Generic.Queue<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Generic.Queue<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Queue<>.Peek() | element of argument -1 -> return (normal) | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | @@ -285,18 +293,10 @@ | System.Collections.Generic.SortedDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Generic.SortedDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Generic.SortedDictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.SortedDictionary<,>.KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedDictionary<,>.KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>.KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>.KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary, IComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary, IComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.Generic.SortedDictionary<,>.ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedDictionary<,>.ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>.ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>.ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -305,6 +305,20 @@ | System.Collections.Generic.SortedDictionary<,>.set_Item(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+KeyList.Add(TKey) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Generic.SortedList<,>+KeyList.Insert(int, TKey) | argument 1 -> element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.Generic.SortedList<,>+KeyList.set_Item(int, TKey) | argument 1 -> element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+ValueList.Add(TValue) | argument 0 -> element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Generic.SortedList<,>+ValueList.Insert(int, TValue) | argument 1 -> element of argument -1 | true | +| System.Collections.Generic.SortedList<,>+ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.Generic.SortedList<,>+ValueList.set_Item(int, TValue) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedList<,>.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | @@ -316,24 +330,10 @@ | System.Collections.Generic.SortedList<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Generic.SortedList<,>.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedList<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.SortedList<,>.KeyList.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>.KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>.KeyList.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>.KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.SortedList<,>.KeyList.Insert(int, TKey) | argument 1 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>.KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.Generic.SortedList<,>.KeyList.set_Item(int, TKey) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>.SortedList(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.SortedList<,>.SortedList(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Generic.SortedList<,>.SortedList(IDictionary, IComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.SortedList<,>.SortedList(IDictionary, IComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.Generic.SortedList<,>.ValueList.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>.ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>.ValueList.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>.ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Generic.SortedList<,>.ValueList.Insert(int, TValue) | argument 1 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>.ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.Generic.SortedList<,>.ValueList.set_Item(int, TValue) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedList<,>.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedList<,>.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -342,7 +342,7 @@ | System.Collections.Generic.SortedList<,>.set_Item(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedList<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedList<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Generic.SortedSet<>.d__84.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Generic.SortedSet<>+d__84.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedSet<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.SortedSet<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Generic.SortedSet<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | @@ -353,6 +353,22 @@ | System.Collections.Generic.Stack<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Stack<>.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Generic.Stack<>.Pop() | element of argument -1 -> return (normal) | true | +| System.Collections.Hashtable+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | +| System.Collections.Hashtable+SyncHashtable.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Hashtable+SyncHashtable.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+SyncHashtable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.SyncHashtable(Hashtable) | property Key of element of argument 0 -> property Key of element of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.SyncHashtable(Hashtable) | property Value of element of argument 0 -> property Value of element of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | +| System.Collections.Hashtable+SyncHashtable.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | +| System.Collections.Hashtable+SyncHashtable.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Hashtable+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Hashtable.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Hashtable.Clone() | element of argument 0 -> element of return (normal) | true | @@ -370,22 +386,6 @@ | System.Collections.Hashtable.Hashtable(IDictionary, float, IEqualityComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Hashtable.Hashtable(IDictionary, float, IHashCodeProvider, IComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Hashtable.Hashtable(IDictionary, float, IHashCodeProvider, IComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.Hashtable.KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Hashtable.KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | -| System.Collections.Hashtable.SyncHashtable.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Hashtable.SyncHashtable.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Hashtable.SyncHashtable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.SyncHashtable(Hashtable) | property Key of element of argument 0 -> property Key of element of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.SyncHashtable(Hashtable) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | -| System.Collections.Hashtable.SyncHashtable.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | -| System.Collections.Hashtable.SyncHashtable.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Hashtable.ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Hashtable.ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Hashtable.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Collections.Hashtable.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | @@ -404,12 +404,12 @@ | System.Collections.IList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.IList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.IList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ListDictionaryInternal+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ListDictionaryInternal+NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ListDictionaryInternal.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.ListDictionaryInternal.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.ListDictionaryInternal.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.ListDictionaryInternal.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ListDictionaryInternal.NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ListDictionaryInternal.NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ListDictionaryInternal.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.ListDictionaryInternal.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Collections.ListDictionaryInternal.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | @@ -436,6 +436,14 @@ | System.Collections.ObjectModel.ReadOnlyCollection<>.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | @@ -446,16 +454,8 @@ | System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.ReadOnlyDictionary(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.ReadOnlyDictionary(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -464,16 +464,39 @@ | System.Collections.ObjectModel.ReadOnlyDictionary<,>.set_Item(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Queue+SynchronizedQueue.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.Queue+SynchronizedQueue.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Queue+SynchronizedQueue.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Queue+SynchronizedQueue.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Queue.Clone() | element of argument 0 -> element of return (normal) | true | | System.Collections.Queue.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Queue.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Queue.Peek() | element of argument -1 -> return (normal) | true | -| System.Collections.Queue.SynchronizedQueue.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Queue.SynchronizedQueue.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Queue.SynchronizedQueue.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Queue.SynchronizedQueue.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.ReadOnlyCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.ReadOnlyCollectionBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.SortedList+KeyList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.SortedList+KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.SortedList+KeyList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.SortedList+KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.SortedList+KeyList.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.SortedList+SyncSortedList.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | +| System.Collections.SortedList+SyncSortedList.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.SortedList+SyncSortedList.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.SortedList+SyncSortedList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+SyncSortedList.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | +| System.Collections.SortedList+SyncSortedList.GetValueList() | property Value of element of argument -1 -> element of return (normal) | true | +| System.Collections.SortedList+SyncSortedList.SyncSortedList(SortedList) | property Key of element of argument 0 -> property Key of element of return (normal) | true | +| System.Collections.SortedList+SyncSortedList.SyncSortedList(SortedList) | property Value of element of argument 0 -> property Value of element of return (normal) | true | +| System.Collections.SortedList+SyncSortedList.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | +| System.Collections.SortedList+SyncSortedList.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | +| System.Collections.SortedList+SyncSortedList.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.SortedList+ValueList.Add(object) | argument 0 -> element of argument -1 | true | +| System.Collections.SortedList+ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.SortedList+ValueList.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.Collections.SortedList+ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.Collections.SortedList+ValueList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.SortedList.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.SortedList.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.SortedList.Clone() | element of argument 0 -> element of return (normal) | true | @@ -481,33 +504,10 @@ | System.Collections.SortedList.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.SortedList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.SortedList.GetValueList() | property Value of element of argument -1 -> element of return (normal) | true | -| System.Collections.SortedList.KeyList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.SortedList.KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.SortedList.KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.SortedList.KeyList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.SortedList.KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.SortedList.KeyList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.SortedList.SortedList(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.SortedList.SortedList(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.SortedList.SortedList(IDictionary, IComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.SortedList.SortedList(IDictionary, IComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.SortedList.SyncSortedList.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | -| System.Collections.SortedList.SyncSortedList.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.SortedList.SyncSortedList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.SortedList.SyncSortedList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.SortedList.SyncSortedList.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | -| System.Collections.SortedList.SyncSortedList.GetValueList() | property Value of element of argument -1 -> element of return (normal) | true | -| System.Collections.SortedList.SyncSortedList.SyncSortedList(SortedList) | property Key of element of argument 0 -> property Key of element of return (normal) | true | -| System.Collections.SortedList.SyncSortedList.SyncSortedList(SortedList) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.SortedList.SyncSortedList.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | -| System.Collections.SortedList.SyncSortedList.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | -| System.Collections.SortedList.SyncSortedList.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.SortedList.ValueList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.SortedList.ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.SortedList.ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.SortedList.ValueList.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.SortedList.ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.Collections.SortedList.ValueList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.SortedList.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.SortedList.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Collections.SortedList.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | @@ -525,23 +525,25 @@ | System.Collections.Specialized.IOrderedDictionary.get_Item(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.IOrderedDictionary.set_Item(int, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.IOrderedDictionary.set_Item(int, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Specialized.ListDictionary+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.ListDictionary+NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.ListDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.ListDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Specialized.ListDictionary.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Specialized.ListDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Specialized.ListDictionary.NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Specialized.ListDictionary.NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.Specialized.ListDictionary.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.ListDictionary.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | +| System.Collections.Specialized.NameObjectCollectionBase+KeysCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.NameObjectCollectionBase+KeysCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.NameObjectCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Specialized.NameObjectCollectionBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.NameValueCollection.Add(NameValueCollection) | argument 0 -> element of argument -1 | true | | System.Collections.Specialized.NameValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.OrderedDictionary+OrderedDictionaryKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.OrderedDictionary+OrderedDictionaryKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.OrderedDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Specialized.OrderedDictionary.AsReadOnly() | element of argument 0 -> element of return (normal) | true | @@ -549,8 +551,6 @@ | System.Collections.Specialized.OrderedDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.OrderedDictionary(OrderedDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.OrderedDictionary(OrderedDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | -| System.Collections.Specialized.OrderedDictionary.OrderedDictionaryKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Specialized.OrderedDictionary.OrderedDictionaryKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.get_Item(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.OrderedDictionary.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.OrderedDictionary.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -577,28 +577,28 @@ | System.Collections.Specialized.StringCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.Specialized.StringCollection.set_Item(int, string) | argument 1 -> element of argument -1 | true | | System.Collections.Specialized.StringDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Stack+SyncStack.Clone() | element of argument 0 -> element of return (normal) | true | +| System.Collections.Stack+SyncStack.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Stack+SyncStack.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Collections.Stack+SyncStack.Peek() | element of argument -1 -> return (normal) | true | +| System.Collections.Stack+SyncStack.Pop() | element of argument -1 -> return (normal) | true | | System.Collections.Stack.Clone() | element of argument 0 -> element of return (normal) | true | | System.Collections.Stack.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Collections.Stack.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Stack.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Stack.Pop() | element of argument -1 -> return (normal) | true | -| System.Collections.Stack.SyncStack.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Stack.SyncStack.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Stack.SyncStack.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Stack.SyncStack.Peek() | element of argument -1 -> return (normal) | true | -| System.Collections.Stack.SyncStack.Pop() | element of argument -1 -> return (normal) | true | | System.ComponentModel.AttributeCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.ComponentModel.AttributeCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.BindingList<>.Find(PropertyDescriptor, object) | element of argument -1 -> return (normal) | true | | System.ComponentModel.Design.DesignerCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | | System.ComponentModel.Design.DesignerCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.get_Item(int) | element of argument -1 -> return (normal) | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.get_Item(string) | element of argument -1 -> return (normal) | true | -| System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.Add(object) | argument 0 -> element of argument -1 | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.get_Item(int) | element of argument -1 -> return (normal) | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.get_Item(string) | element of argument -1 -> return (normal) | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.Add(DesignerVerb) | argument 0 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.AddRange(DesignerVerbCollection) | element of argument 0 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.AddRange(DesignerVerb[]) | element of argument 0 -> element of argument -1 | true | @@ -659,10 +659,10 @@ | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.ComponentModel.TypeConverter.StandardValuesCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.ComponentModel.TypeConverter.StandardValuesCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.ConsolePal.UnixConsoleStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.ConsolePal.UnixConsoleStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | +| System.ComponentModel.TypeConverter+StandardValuesCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.TypeConverter+StandardValuesCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.ConsolePal+UnixConsoleStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.ConsolePal+UnixConsoleStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Convert.ChangeType(object, Type) | argument 0 -> return (normal) | false | | System.Convert.ChangeType(object, Type, IFormatProvider) | argument 0 -> return (normal) | false | | System.Convert.ChangeType(object, TypeCode) | argument 0 -> return (normal) | false | @@ -1001,7 +1001,7 @@ | System.Convert.TryFromBase64String(string, Span, out int) | argument 0 -> return (normal) | false | | System.Convert.TryToBase64Chars(ReadOnlySpan, Span, out int, Base64FormattingOptions) | argument 0 -> return (normal) | false | | System.Convert.WriteThreeLowOrderBytes(ref byte, int) | argument 0 -> return (normal) | false | -| System.Diagnostics.Tracing.CounterPayload.d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Diagnostics.Tracing.CounterPayload+d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Diagnostics.Tracing.CounterPayload.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Diagnostics.Tracing.EventPayload.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Diagnostics.Tracing.EventPayload.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | @@ -1019,8 +1019,15 @@ | System.Diagnostics.Tracing.EventPayload.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Diagnostics.Tracing.EventPayload.set_Item(string, object) | argument 0 -> property Key of element of argument -1 | true | | System.Diagnostics.Tracing.EventPayload.set_Item(string, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Diagnostics.Tracing.IncrementingCounterPayload.d__39.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Diagnostics.Tracing.IncrementingCounterPayload+d__39.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Diagnostics.Tracing.IncrementingCounterPayload.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Dynamic.ExpandoObject+KeyCollection.Add(string) | argument 0 -> element of argument -1 | true | +| System.Dynamic.ExpandoObject+KeyCollection.CopyTo(String[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.ExpandoObject+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Dynamic.ExpandoObject+MetaExpando+d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Dynamic.ExpandoObject+ValueCollection.Add(object) | argument 0 -> element of argument -1 | true | +| System.Dynamic.ExpandoObject+ValueCollection.CopyTo(Object[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.ExpandoObject+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | @@ -1028,13 +1035,6 @@ | System.Dynamic.ExpandoObject.Add(string, object) | argument 1 -> property Value of element of argument -1 | true | | System.Dynamic.ExpandoObject.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Dynamic.ExpandoObject.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Dynamic.ExpandoObject.KeyCollection.Add(string) | argument 0 -> element of argument -1 | true | -| System.Dynamic.ExpandoObject.KeyCollection.CopyTo(String[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Dynamic.ExpandoObject.KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Dynamic.ExpandoObject.MetaExpando.d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Dynamic.ExpandoObject.ValueCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.Dynamic.ExpandoObject.ValueCollection.CopyTo(Object[], int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Dynamic.ExpandoObject.ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject.get_Item(string) | property Value of element of argument -1 -> return (normal) | true | | System.Dynamic.ExpandoObject.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Dynamic.ExpandoObject.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | @@ -1060,13 +1060,13 @@ | System.IO.Compression.DeflateManagedStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Compression.DeflateManagedStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | | System.IO.Compression.DeflateManagedStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | +| System.IO.Compression.DeflateStream+CopyToStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateStream+CopyToStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | +| System.IO.Compression.DeflateStream+CopyToStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.IO.Compression.DeflateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | | System.IO.Compression.DeflateStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | | System.IO.Compression.DeflateStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Compression.DeflateStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateStream.CopyToStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateStream.CopyToStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.DeflateStream.CopyToStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel, bool) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel, bool, int) | argument 0 -> return (normal) | false | @@ -1094,8 +1094,8 @@ | System.IO.Compression.SubReadStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Compression.WrappedStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Compression.WrappedStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.ZipArchiveEntry.DirectToArchiveWriterStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.ZipArchiveEntry.DirectToArchiveWriterStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | +| System.IO.Compression.ZipArchiveEntry+DirectToArchiveWriterStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.ZipArchiveEntry+DirectToArchiveWriterStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.FileStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | | System.IO.FileStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | | System.IO.FileStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | @@ -1146,6 +1146,18 @@ | System.IO.Pipes.PipeStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | | System.IO.Pipes.PipeStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Pipes.PipeStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | +| System.IO.Stream+NullStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | +| System.IO.Stream+NullStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | +| System.IO.Stream+NullStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | +| System.IO.Stream+SyncStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+SyncStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | +| System.IO.Stream+SyncStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+SyncStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.BeginEndReadAsync(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Stream.BeginEndWriteAsync(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | @@ -1161,21 +1173,9 @@ | System.IO.Stream.CopyToAsync(Stream, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Stream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | | System.IO.Stream.CopyToAsyncInternal(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Stream.NullStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.NullStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Stream.NullStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.IO.Stream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Stream.ReadAsync(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | | System.IO.Stream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.SyncStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.SyncStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Stream.SyncStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.SyncStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.WriteAsync(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | @@ -1231,25 +1231,26 @@ | System.Lazy<>.Lazy(Func, bool) | return (normal) of argument 0 -> property Value of return (normal) | true | | System.Lazy<>.get_Value() | argument -1 -> return (normal) | false | | System.Linq.EmptyPartition<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__64<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__81<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__98<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__101<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__105<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__62<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__174<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__177<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__179<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__181<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__194<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__190<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__192<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__221<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__217<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__219<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__240<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__243<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Enumerable.d__244<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__64<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__81<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__98<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__101<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__105<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__62<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__174<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__177<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__179<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__181<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__194<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__190<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__192<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__221<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__217<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__219<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__240<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__243<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+d__244<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Enumerable+Iterator<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Enumerable.Aggregate(IEnumerable, TAccumulate, Func, Func) | argument 1 -> parameter 0 of argument 2 | true | | System.Linq.Enumerable.Aggregate(IEnumerable, TAccumulate, Func, Func) | element of argument 0 -> parameter 1 of argument 2 | true | | System.Linq.Enumerable.Aggregate(IEnumerable, TAccumulate, Func, Func) | return (normal) of argument 2 -> parameter 0 of argument 3 | true | @@ -1330,7 +1331,6 @@ | System.Linq.Enumerable.Intersect(IEnumerable, IEnumerable) | element of argument 1 -> element of return (normal) | true | | System.Linq.Enumerable.Intersect(IEnumerable, IEnumerable, IEqualityComparer) | element of argument 0 -> element of return (normal) | true | | System.Linq.Enumerable.Intersect(IEnumerable, IEnumerable, IEqualityComparer) | element of argument 1 -> element of return (normal) | true | -| System.Linq.Enumerable.Iterator<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Enumerable.Join(IEnumerable, IEnumerable, Func, Func, Func) | element of argument 0 -> parameter 0 of argument 2 | true | | System.Linq.Enumerable.Join(IEnumerable, IEnumerable, Func, Func, Func) | element of argument 0 -> parameter 0 of argument 4 | true | | System.Linq.Enumerable.Join(IEnumerable, IEnumerable, Func, Func, Func) | element of argument 1 -> parameter 0 of argument 3 | true | @@ -1470,9 +1470,9 @@ | System.Linq.Expressions.BlockExpressionList.Insert(int, Expression) | argument 1 -> element of argument -1 | true | | System.Linq.Expressions.BlockExpressionList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Linq.Expressions.BlockExpressionList.set_Item(int, Expression) | argument 1 -> element of argument -1 | true | -| System.Linq.Expressions.Compiler.CompilerScope.d__32.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Expressions.Compiler.CompilerScope+d__32.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Expressions.Compiler.ParameterList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Expressions.Interpreter.InterpretedFrame.d__29.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Expressions.Interpreter.InterpretedFrame+d__29.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.GroupedEnumerable<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.GroupedEnumerable<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.GroupedResultEnumerable<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -1483,15 +1483,15 @@ | System.Linq.Grouping<,>.Insert(int, TElement) | argument 1 -> element of argument -1 | true | | System.Linq.Grouping<,>.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Linq.Grouping<,>.set_Item(int, TElement) | argument 1 -> element of argument -1 | true | -| System.Linq.Lookup<,>.d__19<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Lookup<,>+d__19<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Lookup<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.OrderedEnumerable<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.OrderedEnumerable<>.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Linq.OrderedPartition<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Parallel.CancellableEnumerable.d__0<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Parallel.CancellableEnumerable+d__0<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.EnumerableWrapperWeakToStrong.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Parallel.ExceptionAggregator.d__0<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Parallel.ExceptionAggregator.d__1<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Parallel.ExceptionAggregator+d__0<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Parallel.ExceptionAggregator+d__1<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.GroupByGrouping<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.ListChunk<>.Add(TInputOutput) | argument 0 -> element of argument -1 | true | | System.Linq.Parallel.ListChunk<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -1500,7 +1500,7 @@ | System.Linq.Parallel.MergeExecutor<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.OrderedGroupByGrouping<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.ParallelEnumerableWrapper.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Parallel.PartitionerQueryOperator<>.d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Parallel.PartitionerQueryOperator<>+d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.QueryResults<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Linq.Parallel.QueryResults<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Linq.Parallel.QueryResults<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -1508,7 +1508,7 @@ | System.Linq.Parallel.QueryResults<>.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Linq.Parallel.QueryResults<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | | System.Linq.Parallel.RangeEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Linq.Parallel.ZipQueryOperator<,,>.d__9.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Linq.Parallel.ZipQueryOperator<,,>+d__9.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.ParallelEnumerable.Aggregate(ParallelQuery, TAccumulate, Func, Func) | argument 1 -> parameter 0 of argument 2 | true | | System.Linq.ParallelEnumerable.Aggregate(ParallelQuery, TAccumulate, Func, Func) | element of argument 0 -> parameter 1 of argument 2 | true | | System.Linq.ParallelEnumerable.Aggregate(ParallelQuery, TAccumulate, Func, Func) | return (normal) of argument 2 -> parameter 0 of argument 3 | true | @@ -1951,7 +1951,7 @@ | System.Net.NetworkInformation.IPAddressCollection.Add(IPAddress) | argument 0 -> element of argument -1 | true | | System.Net.NetworkInformation.IPAddressCollection.CopyTo(IPAddress[], int) | element of argument -1 -> element of return (out parameter 0) | true | | System.Net.NetworkInformation.IPAddressCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Net.Security.CipherSuitesPolicy.d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Net.Security.CipherSuitesPolicy+d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Net.Security.NegotiateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | | System.Net.Security.NegotiateStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | | System.Net.Security.NegotiateStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | @@ -1974,14 +1974,14 @@ | System.Nullable<>.Nullable(T) | argument 0 -> property Value of return (normal) | true | | System.Nullable<>.get_HasValue() | property Value of argument -1 -> return (normal) | false | | System.Nullable<>.get_Value() | argument -1 -> return (normal) | false | -| System.Reflection.TypeInfo.d__10.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Reflection.TypeInfo.d__22.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Reflection.TypeInfo+d__10.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Reflection.TypeInfo+d__22.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Resources.ResourceFallbackManager.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Resources.ResourceReader.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Resources.ResourceSet.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Resources.RuntimeResourceSet.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Runtime.CompilerServices.ConditionalWeakTable<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.ConfiguredTaskAwaiter.GetResult() | property Result of field m_task of argument -1 -> return (normal) | true | +| System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>+ConfiguredTaskAwaiter.GetResult() | property Result of field m_task of argument -1 -> return (normal) | true | | System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.GetAwaiter() | field m_configuredTaskAwaiter of argument -1 -> return (normal) | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Add(object) | argument 0 -> element of argument -1 | true | @@ -1996,10 +1996,10 @@ | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Runtime.CompilerServices.TaskAwaiter<>.GetResult() | property Result of field m_task of argument -1 -> return (normal) | true | -| System.Runtime.InteropServices.MemoryMarshal.d__15<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Runtime.Loader.AssemblyLoadContext.d__83.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Runtime.Loader.AssemblyLoadContext.d__53.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Runtime.Loader.LibraryNameVariation.d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Runtime.InteropServices.MemoryMarshal+d__15<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Runtime.Loader.AssemblyLoadContext+d__83.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Runtime.Loader.AssemblyLoadContext+d__53.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Runtime.Loader.LibraryNameVariation+d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Security.Cryptography.CryptoStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | | System.Security.Cryptography.CryptoStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | | System.Security.Cryptography.CryptoStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | @@ -2153,8 +2153,8 @@ | System.Text.RegularExpressions.CaptureCollection.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Text.RegularExpressions.CaptureCollection.set_Item(int, Capture) | argument 1 -> element of argument -1 | true | | System.Text.RegularExpressions.CaptureCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Text.RegularExpressions.GroupCollection.d__49.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Text.RegularExpressions.GroupCollection.d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Text.RegularExpressions.GroupCollection+d__49.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Text.RegularExpressions.GroupCollection+d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Text.RegularExpressions.GroupCollection.Add(Group) | argument 0 -> element of argument -1 | true | | System.Text.RegularExpressions.GroupCollection.Add(object) | argument 0 -> element of argument -1 | true | | System.Text.RegularExpressions.GroupCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | @@ -2452,9 +2452,9 @@ | System.Threading.Tasks.TaskFactory<>.StartNew(Func, CancellationToken) | return (normal) of argument 0 -> property Result of return (normal) | true | | System.Threading.Tasks.TaskFactory<>.StartNew(Func, CancellationToken, TaskCreationOptions, TaskScheduler) | return (normal) of argument 0 -> property Result of return (normal) | true | | System.Threading.Tasks.TaskFactory<>.StartNew(Func, TaskCreationOptions) | return (normal) of argument 0 -> property Result of return (normal) | true | -| System.Threading.Tasks.ThreadPoolTaskScheduler.d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Threading.ThreadPool.d__52.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Threading.ThreadPool.d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Threading.Tasks.ThreadPoolTaskScheduler+d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Threading.ThreadPool+d__52.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | +| System.Threading.ThreadPool+d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Tuple.Create(T1, T2, T3, T4, T5, T6, T7, T8) | argument 0 -> property Item1 of return (normal) | true | | System.Tuple.Create(T1, T2, T3, T4, T5, T6, T7, T8) | argument 1 -> property Item2 of return (normal) | true | | System.Tuple.Create(T1, T2, T3, T4, T5, T6, T7, T8) | argument 2 -> property Item3 of return (normal) | true | diff --git a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected index 23d7f1dc5f99..0945d94b7f9a 100644 --- a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected +++ b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected @@ -1,299 +1,306 @@ -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C1.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C2.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C3.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C4.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C5.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic.C6.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | TypeFlow.C1.Method() | -| Dynamic.cs:44:9:44:18 | dynamic call to method Method | TypeFlow.C2.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic.C1.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic.C2.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic.C3.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic.C4.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | TypeFlow.C1.Method() | -| Dynamic.cs:47:9:47:24 | dynamic call to method Method | TypeFlow.C2.Method() | -| Dynamic.cs:51:9:51:26 | dynamic call to method Method | Dynamic.C3.Method() | -| Dynamic.cs:54:9:54:30 | dynamic call to method Method | Dynamic.C3.Method() | -| Dynamic.cs:54:9:54:30 | dynamic call to method Method | Dynamic.C4.Method() | -| Dynamic.cs:58:9:58:32 | dynamic call to method Method | Dynamic.C3.Method() | -| ExactCallable.cs:10:13:10:53 | call to method Run | Test.MainClass.Tests.Run, ImplBeta>(Tests) | -| ExactCallable.cs:19:17:19:29 | call to method M | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:23:17:23:28 | call to method M | Test.MainClass.ImplBeta.M() | -| ExactCallable.cs:27:17:27:31 | call to method M | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:32:17:32:28 | call to method M | Test.MainClass.ImplBeta.M() | -| ExactCallable.cs:36:17:36:38 | call to method M | Test.MainClass.ImplBeta.M() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C1.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C2.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C3.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C4.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C5.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | Dynamic+C6.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | TypeFlow+C1.Method() | +| Dynamic.cs:44:9:44:18 | dynamic call to method Method | TypeFlow+C2.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic+C1.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic+C2.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic+C3.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | Dynamic+C4.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | TypeFlow+C1.Method() | +| Dynamic.cs:47:9:47:24 | dynamic call to method Method | TypeFlow+C2.Method() | +| Dynamic.cs:51:9:51:26 | dynamic call to method Method | Dynamic+C3.Method() | +| Dynamic.cs:54:9:54:30 | dynamic call to method Method | Dynamic+C3.Method() | +| Dynamic.cs:54:9:54:30 | dynamic call to method Method | Dynamic+C4.Method() | +| Dynamic.cs:58:9:58:32 | dynamic call to method Method | Dynamic+C3.Method() | +| ExactCallable.cs:10:13:10:53 | call to method Run | Test.MainClass+Tests.Run, ImplBeta>(Tests) | +| ExactCallable.cs:19:17:19:29 | call to method M | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:23:17:23:28 | call to method M | Test.MainClass+ImplBeta.M() | +| ExactCallable.cs:27:17:27:31 | call to method M | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:32:17:32:28 | call to method M | Test.MainClass+ImplBeta.M() | +| ExactCallable.cs:36:17:36:38 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:39:17:39:30 | call to method UnqualifiedM | Test.MainClass.UnqualifiedM() | -| ExactCallable.cs:43:17:43:39 | call to method M | Test.MainClass.SecondLevelImpl.M() | -| ExactCallable.cs:46:17:46:35 | call to method M | Test.MainClass.OnlyStaticClass.M() | +| ExactCallable.cs:43:17:43:39 | call to method M | Test.MainClass+SecondLevelImpl.M() | +| ExactCallable.cs:46:17:46:35 | call to method M | Test.MainClass+OnlyStaticClass.M() | | ExactCallable.cs:49:17:49:30 | call to method AlphaFactory | Test.MainClass.AlphaFactory() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass.SecondLevelImpl.M() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass.Tests<>.M() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass.Tests.M() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass.Tests.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+SecondLevelImpl.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | | ExactCallable.cs:52:17:52:29 | call to method BetaFactory | Test.MainClass.BetaFactory() | -| ExactCallable.cs:52:17:52:33 | call to method M | Test.MainClass.ImplBeta.M() | +| ExactCallable.cs:52:17:52:33 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:55:17:55:34 | call to method InterfaceFactory | Test.MainClass.InterfaceFactory() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.ImplBeta.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.SecondLevelImpl.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.Tests<>.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.Tests.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass.Tests.M() | -| ExactCallable.cs:58:17:58:24 | call to method M | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:61:17:61:24 | call to method M | Test.MainClass.Tests<>.M() | -| ExactCallable.cs:64:17:64:19 | call to method M | Test.MainClass.Tests<>.M() | -| ExactCallable.cs:67:17:67:20 | call to method M2 | Test.MainClass.ImplAlpha.M2() | -| ExactCallable.cs:70:17:70:20 | call to method M3 | Test.MainClass.ImplAlpha.M3() | -| ExactCallable.cs:73:17:73:124 | call to method InvokeMember | Test.MainClass.ImplAlpha.M() | -| ExactCallable.cs:79:17:79:52 | call to method Invoke | Test.MainClass.ImplAlpha.M(int, int) | -| ExactCallable.cs:82:17:82:161 | call to method Invoke | Test.MainClass.ImplAlpha.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+ImplBeta.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+SecondLevelImpl.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | +| ExactCallable.cs:58:17:58:24 | call to method M | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:61:17:61:24 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:64:17:64:19 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:67:17:67:20 | call to method M2 | Test.MainClass+ImplAlpha.M2() | +| ExactCallable.cs:70:17:70:20 | call to method M3 | Test.MainClass+ImplAlpha.M3() | +| ExactCallable.cs:73:17:73:124 | call to method InvokeMember | Test.MainClass+ImplAlpha.M() | +| ExactCallable.cs:79:17:79:52 | call to method Invoke | Test.MainClass+ImplAlpha.M(int, int) | +| ExactCallable.cs:82:17:82:161 | call to method Invoke | Test.MainClass+ImplAlpha.M() | | ExactCallable.cs:85:17:85:128 | call to method InvokeMember | Test.MainClass.UnqualifiedM() | | ExactCallable.cs:91:17:91:55 | call to method Invoke | Test.MainClass.UnqualifiedM() | | ExactCallable.cs:94:17:94:155 | call to method Invoke | Test.MainClass.UnqualifiedM() | | ExactCallable.cs:98:17:98:120 | call to method InvokeMember | Test.MainClass.MethodWithOut(int, out bool) | | ExactCallable.cs:101:17:101:121 | call to method InvokeMember | Test.MainClass.MethodWithOut2(int, out object) | -| ExactCallable.cs:104:17:104:23 | call to method M | Test.MainClass.Tests.M() | -| ExactCallable.cs:107:17:107:28 | call to method M | Test.MainClass.ImplBeta.M() | +| ExactCallable.cs:104:17:104:23 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | +| ExactCallable.cs:107:17:107:28 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:184:13:184:16 | call to method M2 | Test.MainClass.M2() | | ExactCallable.cs:191:13:191:16 | call to method M1 | Test.MainClass.M1() | | TypeFlow.cs:7:7:7:23 | call to method Run | TypeFlow.Run(C1, C1) | | TypeFlow.cs:22:8:22:11 | access to property Prop | TypeFlow.set_Prop(C1) | -| TypeFlow.cs:27:9:27:22 | call to method Method | TypeFlow.C2.Method() | +| TypeFlow.cs:27:9:27:22 | call to method Method | TypeFlow+C2.Method() | | TypeFlow.cs:30:9:30:12 | access to property Prop | TypeFlow.get_Prop() | -| TypeFlow.cs:30:9:30:21 | call to method Method | TypeFlow.C2.Method() | -| TypeFlow.cs:33:9:33:18 | call to method Method | TypeFlow.C1.Method() | -| TypeFlow.cs:33:9:33:18 | call to method Method | TypeFlow.C2.Method() | -| TypeFlow.cs:37:11:37:26 | call to method Method | TypeFlow.C2.Method() | -| TypeFlow.cs:40:9:40:18 | call to method Method | TypeFlow.C2.Method() | +| TypeFlow.cs:30:9:30:21 | call to method Method | TypeFlow+C2.Method() | +| TypeFlow.cs:33:9:33:18 | call to method Method | TypeFlow+C1.Method() | +| TypeFlow.cs:33:9:33:18 | call to method Method | TypeFlow+C2.Method() | +| TypeFlow.cs:37:11:37:26 | call to method Method | TypeFlow+C2.Method() | +| TypeFlow.cs:40:9:40:18 | call to method Method | TypeFlow+C2.Method() | | ViableCallable.cs:12:9:12:28 | call to method M | C2<>.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C2.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C3.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C4<>.M(T[], T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C4.M(Int32[], T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C4.M(Int32[], T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C5.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6<,>.M(T1, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(bool, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(Int32[], T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(T1, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(bool, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(Int32[], T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6,System.Boolean>.M(T1, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6,System.Byte>.M(T1, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C7.M(bool, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C2<>.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C2.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C3.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C4<>.set_Prop(T[]) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C4.set_Prop(Int32[]) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C4.set_Prop(Int32[]) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C5.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6<,>.set_Prop(T1) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(bool) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(Int32[]) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(T1) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(T1) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.<0>,System.Byte>.set_Prop(T1) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(bool) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(Int32[]) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6,System.Boolean>.set_Prop(T1) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6,System.Byte>.set_Prop(T1) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C7<>.set_Prop(T1) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C7.set_Prop(bool) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C7.set_Prop(bool) | | ViableCallable.cs:14:19:14:25 | access to property Prop | C2<>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C2.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C3.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C4<>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C4.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C4.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C5.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6<,>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.<0>,System.Byte>.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6,System.Boolean>.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6,System.Byte>.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C7<>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C7.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C7.get_Prop() | | ViableCallable.cs:16:9:16:23 | access to indexer | C2<>.set_Item(T, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(bool, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(decimal, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(int, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(bool, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(decimal, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C2.set_Item(int, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C3.set_Item(decimal, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C4<>.set_Item(bool, T[]) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C4.set_Item(bool, Int32[]) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C4.set_Item(bool, Int32[]) | | ViableCallable.cs:16:9:16:23 | access to indexer | C5.set_Item(bool, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6<,>.set_Item(T2, T1) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(byte, bool) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, Int32[]) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(decimal, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(int, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, T1) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(byte, T1) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.<0>,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(byte, bool) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, Int32[]) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(decimal, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(int, string) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6,System.Boolean>.set_Item(bool, T1) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6,System.Byte>.set_Item(byte, T1) | | ViableCallable.cs:16:9:16:23 | access to indexer | C7<>.set_Item(byte, T1) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C7.set_Item(byte, bool) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C7.set_Item(byte, bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C2<>.get_Item(T) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(decimal) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(int) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(decimal) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C2.get_Item(int) | | ViableCallable.cs:16:27:16:41 | access to indexer | C3.get_Item(decimal) | | ViableCallable.cs:16:27:16:41 | access to indexer | C4<>.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C4.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C4.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C5.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6<,>.get_Item(T2) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(byte) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(decimal) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(int) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(byte) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.<0>,System.Byte>.get_Item(byte) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(byte) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(decimal) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(int) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6,System.Boolean>.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6,System.Byte>.get_Item(byte) | | ViableCallable.cs:16:27:16:41 | access to indexer | C7<>.get_Item(byte) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C7.get_Item(byte) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C7.get_Item(byte) | | ViableCallable.cs:18:9:18:16 | access to event Event | C2<>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C2.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C3.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C4<>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C4.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C4.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C5.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6<,>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.<0>,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6,System.Boolean>.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6,System.Byte>.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C7<>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C7.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C7.add_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C2<>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C2.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C3.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C4<>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C4.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C4.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C5.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6<,>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.<0>,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6,System.Boolean>.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6,System.Byte>.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C7<>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C7.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C7.remove_Event(EventHandler) | | ViableCallable.cs:22:9:22:30 | call to method M | C4<>.M(T[], T3) | -| ViableCallable.cs:22:9:22:30 | call to method M | C4.M(Int32[], T3) | -| ViableCallable.cs:22:9:22:30 | call to method M | C6.M(Int32[], T3) | +| ViableCallable.cs:22:9:22:30 | call to method M | C4.M(Int32[], T3) | +| ViableCallable.cs:22:9:22:30 | call to method M | C6.M(Int32[], T3) | | ViableCallable.cs:24:9:24:15 | access to property Prop | C4<>.set_Prop(T[]) | -| ViableCallable.cs:24:9:24:15 | access to property Prop | C4.set_Prop(Int32[]) | -| ViableCallable.cs:24:9:24:15 | access to property Prop | C6.set_Prop(Int32[]) | +| ViableCallable.cs:24:9:24:15 | access to property Prop | C4.set_Prop(Int32[]) | +| ViableCallable.cs:24:9:24:15 | access to property Prop | C6.set_Prop(Int32[]) | | ViableCallable.cs:24:19:24:25 | access to property Prop | C4<>.get_Prop() | -| ViableCallable.cs:24:19:24:25 | access to property Prop | C4.get_Prop() | -| ViableCallable.cs:24:19:24:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:24:19:24:25 | access to property Prop | C4.get_Prop() | +| ViableCallable.cs:24:19:24:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:26:9:26:23 | access to indexer | C4<>.set_Item(bool, T[]) | -| ViableCallable.cs:26:9:26:23 | access to indexer | C4.set_Item(bool, Int32[]) | -| ViableCallable.cs:26:9:26:23 | access to indexer | C6.set_Item(bool, Int32[]) | +| ViableCallable.cs:26:9:26:23 | access to indexer | C4.set_Item(bool, Int32[]) | +| ViableCallable.cs:26:9:26:23 | access to indexer | C6.set_Item(bool, Int32[]) | | ViableCallable.cs:26:27:26:41 | access to indexer | C4<>.get_Item(bool) | -| ViableCallable.cs:26:27:26:41 | access to indexer | C4.get_Item(bool) | -| ViableCallable.cs:26:27:26:41 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:26:27:26:41 | access to indexer | C4.get_Item(bool) | +| ViableCallable.cs:26:27:26:41 | access to indexer | C6.get_Item(bool) | | ViableCallable.cs:28:9:28:16 | access to event Event | C4<>.add_Event(EventHandler) | -| ViableCallable.cs:28:9:28:16 | access to event Event | C4.add_Event(EventHandler) | -| ViableCallable.cs:28:9:28:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:28:9:28:16 | access to event Event | C4.add_Event(EventHandler) | +| ViableCallable.cs:28:9:28:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:29:9:29:16 | access to event Event | C4<>.remove_Event(EventHandler) | -| ViableCallable.cs:29:9:29:16 | access to event Event | C4.remove_Event(EventHandler) | -| ViableCallable.cs:29:9:29:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:29:9:29:16 | access to event Event | C4.remove_Event(EventHandler) | +| ViableCallable.cs:29:9:29:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:32:30:32:52 | call to method Mock | ViableCallable.Mock>() | -| ViableCallable.cs:33:9:33:23 | call to method M | C2.M(string, T3) | -| ViableCallable.cs:33:9:33:23 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:35:9:35:15 | access to property Prop | C2.set_Prop(string) | -| ViableCallable.cs:35:9:35:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:35:19:35:25 | access to property Prop | C2.get_Prop() | -| ViableCallable.cs:35:19:35:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:37:9:37:13 | access to indexer | C2.set_Item(int, string) | -| ViableCallable.cs:37:9:37:13 | access to indexer | C6.set_Item(int, string) | -| ViableCallable.cs:37:17:37:21 | access to indexer | C2.get_Item(int) | -| ViableCallable.cs:37:17:37:21 | access to indexer | C6.get_Item(int) | -| ViableCallable.cs:39:9:39:16 | access to event Event | C2.add_Event(EventHandler) | -| ViableCallable.cs:39:9:39:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:40:9:40:16 | access to event Event | C2.remove_Event(EventHandler) | -| ViableCallable.cs:40:9:40:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:33:9:33:23 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:33:9:33:23 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:35:9:35:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:35:9:35:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:35:19:35:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:35:19:35:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:37:9:37:13 | access to indexer | C2.set_Item(int, string) | +| ViableCallable.cs:37:9:37:13 | access to indexer | C6.set_Item(int, string) | +| ViableCallable.cs:37:17:37:21 | access to indexer | C2.get_Item(int) | +| ViableCallable.cs:37:17:37:21 | access to indexer | C6.get_Item(int) | +| ViableCallable.cs:39:9:39:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:39:9:39:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:40:9:40:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:40:9:40:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:43:34:43:60 | call to method Mock | ViableCallable.Mock>() | -| ViableCallable.cs:44:9:44:24 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:44:9:44:24 | call to method M | C2.M(string, T3) | | ViableCallable.cs:44:9:44:24 | call to method M | C3.M(string, T3) | -| ViableCallable.cs:44:9:44:24 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:46:9:46:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:44:9:44:24 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:46:9:46:15 | access to property Prop | C2.set_Prop(string) | | ViableCallable.cs:46:9:46:15 | access to property Prop | C3.set_Prop(string) | -| ViableCallable.cs:46:9:46:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:46:19:46:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:46:9:46:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:46:19:46:25 | access to property Prop | C2.get_Prop() | | ViableCallable.cs:46:19:46:25 | access to property Prop | C3.get_Prop() | -| ViableCallable.cs:46:19:46:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:48:9:48:14 | access to indexer | C2.set_Item(decimal, string) | +| ViableCallable.cs:46:19:46:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:48:9:48:14 | access to indexer | C2.set_Item(decimal, string) | | ViableCallable.cs:48:9:48:14 | access to indexer | C3.set_Item(decimal, string) | -| ViableCallable.cs:48:9:48:14 | access to indexer | C6.set_Item(decimal, string) | -| ViableCallable.cs:48:18:48:23 | access to indexer | C2.get_Item(decimal) | +| ViableCallable.cs:48:9:48:14 | access to indexer | C6.set_Item(decimal, string) | +| ViableCallable.cs:48:18:48:23 | access to indexer | C2.get_Item(decimal) | | ViableCallable.cs:48:18:48:23 | access to indexer | C3.get_Item(decimal) | -| ViableCallable.cs:48:18:48:23 | access to indexer | C6.get_Item(decimal) | -| ViableCallable.cs:50:9:50:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:48:18:48:23 | access to indexer | C6.get_Item(decimal) | +| ViableCallable.cs:50:9:50:16 | access to event Event | C2.add_Event(EventHandler) | | ViableCallable.cs:50:9:50:16 | access to event Event | C3.add_Event(EventHandler) | -| ViableCallable.cs:50:9:50:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:51:9:51:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:50:9:50:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:51:9:51:16 | access to event Event | C2.remove_Event(EventHandler) | | ViableCallable.cs:51:9:51:16 | access to event Event | C3.remove_Event(EventHandler) | -| ViableCallable.cs:51:9:51:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:51:9:51:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:54:30:54:52 | call to method Mock | ViableCallable.Mock>() | -| ViableCallable.cs:55:9:55:44 | call to method M | C4.M(Int32[], T3) | -| ViableCallable.cs:55:9:55:44 | call to method M | C6.M(Int32[], T3) | -| ViableCallable.cs:57:9:57:15 | access to property Prop | C4.set_Prop(Int32[]) | -| ViableCallable.cs:57:9:57:15 | access to property Prop | C6.set_Prop(Int32[]) | -| ViableCallable.cs:57:19:57:25 | access to property Prop | C4.get_Prop() | -| ViableCallable.cs:57:19:57:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:59:9:59:17 | access to indexer | C4.set_Item(bool, Int32[]) | -| ViableCallable.cs:59:9:59:17 | access to indexer | C6.set_Item(bool, Int32[]) | -| ViableCallable.cs:59:21:59:29 | access to indexer | C4.get_Item(bool) | -| ViableCallable.cs:59:21:59:29 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:61:9:61:16 | access to event Event | C4.add_Event(EventHandler) | -| ViableCallable.cs:61:9:61:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:62:9:62:16 | access to event Event | C4.remove_Event(EventHandler) | -| ViableCallable.cs:62:9:62:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:55:9:55:44 | call to method M | C4.M(Int32[], T3) | +| ViableCallable.cs:55:9:55:44 | call to method M | C6.M(Int32[], T3) | +| ViableCallable.cs:57:9:57:15 | access to property Prop | C4.set_Prop(Int32[]) | +| ViableCallable.cs:57:9:57:15 | access to property Prop | C6.set_Prop(Int32[]) | +| ViableCallable.cs:57:19:57:25 | access to property Prop | C4.get_Prop() | +| ViableCallable.cs:57:19:57:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:59:9:59:17 | access to indexer | C4.set_Item(bool, Int32[]) | +| ViableCallable.cs:59:9:59:17 | access to indexer | C6.set_Item(bool, Int32[]) | +| ViableCallable.cs:59:21:59:29 | access to indexer | C4.get_Item(bool) | +| ViableCallable.cs:59:21:59:29 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:61:9:61:16 | access to event Event | C4.add_Event(EventHandler) | +| ViableCallable.cs:61:9:61:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:62:9:62:16 | access to event Event | C4.remove_Event(EventHandler) | +| ViableCallable.cs:62:9:62:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:65:31:65:54 | call to method Mock | ViableCallable.Mock>() | -| ViableCallable.cs:66:9:66:30 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:66:9:66:30 | call to method M | C2.M(string, T3) | | ViableCallable.cs:66:9:66:30 | call to method M | C5.M(string, T3) | -| ViableCallable.cs:66:9:66:30 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:68:9:68:15 | access to property Prop | C2.set_Prop(string) | +| ViableCallable.cs:66:9:66:30 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:68:9:68:15 | access to property Prop | C2.set_Prop(string) | | ViableCallable.cs:68:9:68:15 | access to property Prop | C5.set_Prop(string) | -| ViableCallable.cs:68:9:68:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:68:19:68:25 | access to property Prop | C2.get_Prop() | +| ViableCallable.cs:68:9:68:15 | access to property Prop | C6.set_Prop(string) | +| ViableCallable.cs:68:19:68:25 | access to property Prop | C2.get_Prop() | | ViableCallable.cs:68:19:68:25 | access to property Prop | C5.get_Prop() | -| ViableCallable.cs:68:19:68:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:70:9:70:17 | access to indexer | C2.set_Item(bool, string) | +| ViableCallable.cs:68:19:68:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:70:9:70:17 | access to indexer | C2.set_Item(bool, string) | | ViableCallable.cs:70:9:70:17 | access to indexer | C5.set_Item(bool, string) | -| ViableCallable.cs:70:9:70:17 | access to indexer | C6.set_Item(bool, string) | -| ViableCallable.cs:70:21:70:29 | access to indexer | C2.get_Item(bool) | +| ViableCallable.cs:70:9:70:17 | access to indexer | C6.set_Item(bool, string) | +| ViableCallable.cs:70:21:70:29 | access to indexer | C2.get_Item(bool) | | ViableCallable.cs:70:21:70:29 | access to indexer | C5.get_Item(bool) | -| ViableCallable.cs:70:21:70:29 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:72:9:72:16 | access to event Event | C2.add_Event(EventHandler) | +| ViableCallable.cs:70:21:70:29 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:72:9:72:16 | access to event Event | C2.add_Event(EventHandler) | | ViableCallable.cs:72:9:72:16 | access to event Event | C5.add_Event(EventHandler) | -| ViableCallable.cs:72:9:72:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:73:9:73:16 | access to event Event | C2.remove_Event(EventHandler) | +| ViableCallable.cs:72:9:72:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:73:9:73:16 | access to event Event | C2.remove_Event(EventHandler) | | ViableCallable.cs:73:9:73:16 | access to event Event | C5.remove_Event(EventHandler) | -| ViableCallable.cs:73:9:73:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:77:9:77:29 | call to method M | C6.M(T1, T3) | -| ViableCallable.cs:79:9:79:15 | access to property Prop | C6.set_Prop(T1) | -| ViableCallable.cs:79:19:79:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:81:9:81:17 | access to indexer | C6.set_Item(bool, T1) | -| ViableCallable.cs:81:21:81:29 | access to indexer | C6.get_Item(bool) | -| ViableCallable.cs:83:9:83:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:84:9:84:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:73:9:73:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:77:9:77:29 | call to method M | C6,System.Boolean>.M(T1, T3) | +| ViableCallable.cs:79:9:79:15 | access to property Prop | C6,System.Boolean>.set_Prop(T1) | +| ViableCallable.cs:79:19:79:25 | access to property Prop | C6,System.Boolean>.get_Prop() | +| ViableCallable.cs:81:9:81:17 | access to indexer | C6,System.Boolean>.set_Item(bool, T1) | +| ViableCallable.cs:81:21:81:29 | access to indexer | C6,System.Boolean>.get_Item(bool) | +| ViableCallable.cs:83:9:83:16 | access to event Event | C6,System.Boolean>.add_Event(EventHandler) | +| ViableCallable.cs:84:9:84:16 | access to event Event | C6,System.Boolean>.remove_Event(EventHandler) | | ViableCallable.cs:87:21:87:30 | call to method Mock | ViableCallable.Mock() | | ViableCallable.cs:88:9:88:44 | dynamic call to method M | C8.M(IEnumerable>) | | ViableCallable.cs:88:9:88:44 | dynamic call to method M | C9<>.M(IEnumerable>) | @@ -313,18 +320,25 @@ | ViableCallable.cs:106:9:106:17 | access to event Event2 | C5.remove_Event2(EventHandler) | | ViableCallable.cs:120:9:120:25 | dynamic call to method M2 | C8.M2(Decimal[]) | | ViableCallable.cs:124:9:124:24 | dynamic call to method M2 | C8.M2(String[]) | -| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.M(bool, T3) | -| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.M(T1, T3) | -| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.set_Prop(bool) | -| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.set_Prop(T1) | -| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.get_Prop() | -| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.get_Prop() | -| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.set_Item(byte, bool) | -| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.set_Item(byte, T1) | -| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.get_Item(byte) | -| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.get_Item(byte) | -| ViableCallable.cs:138:9:138:52 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:139:9:139:52 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.<0>,System.Byte>.M(T1, T3) | +| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.M(bool, T3) | +| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6,System.Byte>.M(T1, T3) | +| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.<0>,System.Byte>.set_Prop(T1) | +| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.set_Prop(bool) | +| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6,System.Byte>.set_Prop(T1) | +| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.<0>,System.Byte>.get_Prop() | +| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.get_Prop() | +| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6,System.Byte>.get_Prop() | +| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.<0>,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.set_Item(byte, bool) | +| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.<0>,System.Byte>.get_Item(byte) | +| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.get_Item(byte) | +| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6,System.Byte>.get_Item(byte) | +| ViableCallable.cs:138:9:138:52 | ... += ... | C6.<0>,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:138:9:138:52 | ... += ... | C6,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:139:9:139:52 | ... -= ... | C6.<0>,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:139:9:139:52 | ... -= ... | C6,System.Byte>.remove_Event(EventHandler) | | ViableCallable.cs:143:13:143:22 | call to method Mock | ViableCallable.Mock() | | ViableCallable.cs:144:9:144:14 | dynamic call to method M3 | C8.M3(params Double[]) | | ViableCallable.cs:144:9:144:14 | dynamic call to method M3 | C9<>.M3(params T[]) | @@ -335,8 +349,8 @@ | ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | C8.M3(params Double[]) | | ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | C9<>.M3(params T[]) | | ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | C10.M3(params Double[]) | -| ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | Test.MainClass.ImplAlpha.M3() | -| ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | Test.MainClass.SecondLevelImpl.M3() | +| ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | Test.MainClass+ImplAlpha.M3() | +| ViableCallable.cs:149:9:149:16 | dynamic call to method M3 | Test.MainClass+SecondLevelImpl.M3() | | ViableCallable.cs:150:9:150:17 | dynamic call to method M3 | C8.M3(params Double[]) | | ViableCallable.cs:150:9:150:17 | dynamic call to method M3 | C9<>.M3(params T[]) | | ViableCallable.cs:150:9:150:17 | dynamic call to method M3 | C10.M3(params Double[]) | @@ -350,60 +364,64 @@ | ViableCallable.cs:153:21:153:29 | dynamic access to member Prop1 | C9<>.get_Prop1() | | ViableCallable.cs:153:21:153:29 | dynamic access to member Prop1 | C10.get_Prop1() | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C2<>.set_Item(T, string) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C2.set_Item(decimal, string) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C2.set_Item(int, string) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C2.set_Item(decimal, string) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C2.set_Item(int, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C3.set_Item(decimal, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C6<,>.set_Item(T2, T1) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(byte, bool) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(decimal, string) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(int, string) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(byte, T1) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.<0>,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(byte, bool) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(decimal, string) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(int, string) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6,System.Byte>.set_Item(byte, T1) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C7<>.set_Item(byte, T1) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C7.set_Item(byte, bool) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C7.set_Item(byte, bool) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C8.set_Item(int, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C9<>.set_Item(int, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C10.set_Item(int, bool) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C2<>.get_Item(T) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C2.get_Item(decimal) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C2.get_Item(int) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C2.get_Item(decimal) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C2.get_Item(int) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C3.get_Item(decimal) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C6<,>.get_Item(T2) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(byte) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(decimal) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(int) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(byte) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.<0>,System.Byte>.get_Item(byte) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(byte) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(decimal) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(int) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6,System.Byte>.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C7<>.get_Item(byte) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C7.get_Item(byte) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C7.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C8.get_Item(int) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C9<>.get_Item(int) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C10.get_Item(int) | | ViableCallable.cs:157:9:157:54 | ... += ... | C2<>.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C2.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C3.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C5.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C6<,>.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.<0>,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6,System.Boolean>.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6,System.Byte>.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C7<>.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C8.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C9<>.add_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C2<>.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C2.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C3.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C5.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C6<,>.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.<0>,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6,System.Boolean>.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6,System.Byte>.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C7<>.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C8.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C9<>.remove_Event(EventHandler) | @@ -423,49 +441,50 @@ | ViableCallable.cs:199:9:199:147 | call to method InvokeMember | C10.add_Event(EventHandler) | | ViableCallable.cs:200:9:200:150 | call to method InvokeMember | C10.remove_Event(EventHandler) | | ViableCallable.cs:235:9:235:15 | call to method M | C2<>.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C2.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C3.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C4<>.M(T[], T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C4.M(Int32[], T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C4.M(Int32[], T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C5.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6<,>.M(T1, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(bool, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(Int32[], T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(T1, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(bool, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(Int32[], T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6,System.Boolean>.M(T1, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6,System.Byte>.M(T1, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C7.M(bool, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:284:9:284:15 | call to method M | C6<,>.M(T1, T3) | | ViableCallable.cs:284:9:284:15 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:284:9:284:15 | call to method M | C7.M(bool, T3) | +| ViableCallable.cs:284:9:284:15 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:287:9:287:20 | call to method M | C6<,>.M(T1, T3) | | ViableCallable.cs:287:9:287:20 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:287:9:287:20 | call to method M | C7.M(bool, T3) | +| ViableCallable.cs:287:9:287:20 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:301:9:301:15 | call to method M | C7<>.M(T1, T3) | | ViableCallable.cs:304:9:304:20 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:307:9:307:20 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:307:9:307:20 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | | ViableCallable.cs:354:9:354:14 | dynamic call to method M | C11.M(dynamic) | | ViableCallable.cs:356:9:356:18 | dynamic object creation of type C11 | C11.C11(C11) | -| ViableCallable.cs:379:9:379:13 | call to method M | C12.C13.M() | +| ViableCallable.cs:379:9:379:13 | call to method M | C12+C13.M() | | ViableCallable.cs:384:9:384:14 | call to method Run | C12.Run(T2) | | ViableCallable.cs:389:9:389:23 | call to method Run2 | C12.Run2(C13) | -| ViableCallable.cs:412:9:412:18 | call to method M | C15.A1.M() | -| ViableCallable.cs:412:9:412:18 | call to method M | C15.A4.M() | -| ViableCallable.cs:412:9:412:18 | call to method M | C15.A5.M() | -| ViableCallable.cs:416:9:416:19 | call to method M | C15.A1.M() | -| ViableCallable.cs:420:9:420:21 | call to method M | C15.A4.M() | +| ViableCallable.cs:412:9:412:18 | call to method M | C15+A1.M() | +| ViableCallable.cs:412:9:412:18 | call to method M | C15+A4.M() | +| ViableCallable.cs:412:9:412:18 | call to method M | C15+A5.M() | +| ViableCallable.cs:416:9:416:19 | call to method M | C15+A1.M() | +| ViableCallable.cs:420:9:420:21 | call to method M | C15+A4.M() | | ViableCallable.cs:422:13:422:37 | call to method Mock | ViableCallable.Mock() | -| ViableCallable.cs:424:9:424:21 | call to method M | C15.A4.M() | -| ViableCallable.cs:424:9:424:21 | call to method M | C15.A5.M() | -| ViableCallable.cs:439:9:439:19 | call to method M1 | C16.M1(string) | +| ViableCallable.cs:424:9:424:21 | call to method M | C15+A4.M() | +| ViableCallable.cs:424:9:424:21 | call to method M | C15+A5.M() | +| ViableCallable.cs:439:9:439:19 | call to method M1 | C16.M1(string) | | ViableCallable.cs:442:9:442:24 | call to method M2 | C17.M2(Func) | | ViableCallable.cs:450:9:450:21 | call to method M2 | C17.M2(Func) | -| ViableCallable.cs:456:9:456:30 | call to method M2 | C16.M2(Func) | +| ViableCallable.cs:456:9:456:30 | call to method M2 | C16,System.Int32>.M2(Func) | | ViableCallable.cs:456:9:456:30 | call to method M2 | C17.M2(Func) | -| ViableCallable.cs:462:9:462:30 | call to method M2 | C16.M2(Func) | +| ViableCallable.cs:462:9:462:30 | call to method M2 | C16,System.Int32>.M2(Func) | | ViableCallable.cs:462:9:462:30 | call to method M2 | C17.M2(Func) | diff --git a/csharp/ql/test/library-tests/expressions/OperatorCall6.ql b/csharp/ql/test/library-tests/expressions/OperatorCall6.ql index d796d852c171..68bbd3fa268a 100644 --- a/csharp/ql/test/library-tests/expressions/OperatorCall6.ql +++ b/csharp/ql/test/library-tests/expressions/OperatorCall6.ql @@ -10,5 +10,5 @@ where e.getEnclosingCallable() = m and t = e.getTarget() and t.getName() = "+" and - t.getDeclaringType().hasQualifiedName("Expressions.OperatorCalls", "Num") + t.getDeclaringType().hasQualifiedName("Expressions", "OperatorCalls+Num") select m, e.getAnArgument(), t diff --git a/csharp/ql/test/library-tests/frameworks/system/Dispose/Dispose.expected b/csharp/ql/test/library-tests/frameworks/system/Dispose/Dispose.expected index 9b2081d3479d..182e8fc7b054 100644 --- a/csharp/ql/test/library-tests/frameworks/system/Dispose/Dispose.expected +++ b/csharp/ql/test/library-tests/frameworks/system/Dispose/Dispose.expected @@ -1,7 +1,7 @@ | Dispose.cs:6:7:6:14 | Dispose1 | Dispose1.Dispose() | true | | Dispose.cs:11:7:11:17 | Dispose2<> | Dispose2<>.Dispose() | true | -| Dispose.cs:11:7:11:17 | Dispose2 | Dispose2.Dispose() | true | +| Dispose.cs:11:7:11:17 | Dispose2 | Dispose2.Dispose() | true | | Dispose.cs:17:7:17:14 | Dispose3 | Dispose3.Dispose(bool) | true | -| Dispose.cs:22:7:22:14 | Dispose4 | Dispose2.Dispose(bool) | false | +| Dispose.cs:22:7:22:14 | Dispose4 | Dispose2.Dispose(bool) | false | | Dispose.cs:24:7:24:14 | Dispose5 | Dispose5.Dispose(bool) | true | | Dispose.cs:31:8:31:21 | Dispose1Struct | Dispose1Struct.Dispose() | true | diff --git a/csharp/ql/test/library-tests/generics/Generics.expected b/csharp/ql/test/library-tests/generics/Generics.expected index 49fe2914a48f..d432306ced2b 100644 --- a/csharp/ql/test/library-tests/generics/Generics.expected +++ b/csharp/ql/test/library-tests/generics/Generics.expected @@ -91,88 +91,88 @@ test27 | generics.cs:51:22:51:29 | Inner | generics.cs:51:22:51:29 | Inner<> | generics.cs:51:22:51:29 | Inner<> | test28 | Nesting.cs:4:17:4:23 | MA2 | A<>.MA2(T1, T2) | -| Nesting.cs:4:17:4:23 | MA2 | A.MA2(int, T2) | -| Nesting.cs:4:17:4:23 | MA2 | A.MA2(string, T2) | -| Nesting.cs:6:18:6:22 | B<> | A<>.B | -| Nesting.cs:6:18:6:22 | B<> | A.B | -| Nesting.cs:6:18:6:22 | B<> | A.B | -| Nesting.cs:9:21:9:27 | MB2 | A<>.B<>.MB2(T1, T3, T4) | -| Nesting.cs:9:21:9:27 | MB2 | A.B.MB2(int, string, T4) | -| Nesting.cs:9:21:9:27 | MB2 | A.B.MB2(string, int, T4) | -| Nesting.cs:15:21:15:27 | MC2 | A<>.C.MC2(T1, T5) | -| Nesting.cs:15:21:15:27 | MC2 | A.C.MC2(int, T5) | -| Nesting.cs:15:21:15:27 | MC2 | A.C.MC2(string, T5) | -| Nesting.cs:17:22:17:26 | D<> | A<>.C.D | -| Nesting.cs:17:22:17:26 | D<> | A.C.D | -| Nesting.cs:17:22:17:26 | D<> | A.C.D | -| Nesting.cs:20:25:20:31 | MD2 | A<>.C.D<>.MD2(T1, T6, T7) | -| Nesting.cs:20:25:20:31 | MD2 | A.C.D.MD2(int, bool, T7) | -| Nesting.cs:20:25:20:31 | MD2 | A.C.D.MD2(string, decimal, T7) | -| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A<>.GenericDelegateInGenericClass(T, U) | -| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A.GenericDelegateInGenericClass(int, U) | -| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A.GenericDelegateInGenericClass(string, U) | +| Nesting.cs:4:17:4:23 | MA2 | A.MA2(int, T2) | +| Nesting.cs:4:17:4:23 | MA2 | A.MA2(string, T2) | +| Nesting.cs:6:18:6:22 | B<> | A<>+B | +| Nesting.cs:6:18:6:22 | B<> | A+B | +| Nesting.cs:6:18:6:22 | B<> | A+B | +| Nesting.cs:9:21:9:27 | MB2 | A<>+B<>.MB2(T1, T3, T4) | +| Nesting.cs:9:21:9:27 | MB2 | A+B.MB2(int, string, T4) | +| Nesting.cs:9:21:9:27 | MB2 | A+B.MB2(string, int, T4) | +| Nesting.cs:15:21:15:27 | MC2 | A<>+C.MC2(T1, T5) | +| Nesting.cs:15:21:15:27 | MC2 | A+C.MC2(int, T5) | +| Nesting.cs:15:21:15:27 | MC2 | A+C.MC2(string, T5) | +| Nesting.cs:17:22:17:26 | D<> | A<>+C+D | +| Nesting.cs:17:22:17:26 | D<> | A+C+D | +| Nesting.cs:17:22:17:26 | D<> | A+C+D | +| Nesting.cs:20:25:20:31 | MD2 | A<>+C+D<>.MD2(T1, T6, T7) | +| Nesting.cs:20:25:20:31 | MD2 | A+C+D.MD2(int, bool, T7) | +| Nesting.cs:20:25:20:31 | MD2 | A+C+D.MD2(string, decimal, T7) | +| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A<>+GenericDelegateInGenericClass(T, U) | +| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A+GenericDelegateInGenericClass(int, U) | +| generics.cs:16:27:16:58 | GenericDelegateInGenericClass<> | generics.A+GenericDelegateInGenericClass(string, U) | | generics.cs:18:18:18:23 | bar | generics.A<>.bar(X, T) | -| generics.cs:18:18:18:23 | bar | generics.A.bar(X, int) | -| generics.cs:18:18:18:23 | bar | generics.A.bar(X, string) | +| generics.cs:18:18:18:23 | bar | generics.A.bar(X, int) | +| generics.cs:18:18:18:23 | bar | generics.A.bar(X, string) | | generics.cs:45:14:45:17 | f | generics.B<>.f() | -| generics.cs:45:14:45:17 | f | generics.B.f() | -| generics.cs:45:14:45:17 | f | generics.B.f() | -| generics.cs:45:14:45:17 | f | generics.B.f() | -| generics.cs:51:22:51:29 | Inner<> | generics.Outer<>.Inner | -| generics.cs:51:22:51:29 | Inner<> | generics.Outer.Inner | +| generics.cs:45:14:45:17 | f | generics.B.f() | +| generics.cs:45:14:45:17 | f | generics.B.f() | +| generics.cs:45:14:45:17 | f | generics.B.f.<0>>.f() | +| generics.cs:51:22:51:29 | Inner<> | generics.Outer<>+Inner | +| generics.cs:51:22:51:29 | Inner<> | generics.Outer+Inner | | generics.cs:137:21:137:25 | fs | generics.Subtle.fs(int) | | generics.cs:139:21:139:25 | fs | generics.Subtle.fs(int, int) | | generics.cs:152:14:152:19 | CM1 | generics.ConstructedMethods.CM1() | | generics.cs:153:11:153:16 | CM2 | generics.ConstructedMethods.CM2(T) | -| generics.cs:155:15:155:23 | Class<> | generics.ConstructedMethods.Class | -| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods.Class<>.CM3(T2, T1) | -| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods.Class.CM3(T2, double) | -| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods.Class.CM3(T2, int) | +| generics.cs:155:15:155:23 | Class<> | generics.ConstructedMethods+Class | +| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods+Class<>.CM3(T2, T1) | +| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods+Class.CM3(T2, double) | +| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods+Class.CM3(T2, int) | test29 -| Nesting.cs:4:17:4:23 | MA2 | A.MA2(int, string) | -| Nesting.cs:4:17:4:23 | MA2 | A.MA2(string, int) | -| Nesting.cs:6:18:6:22 | B | A.B | -| Nesting.cs:6:18:6:22 | B | A.B | -| Nesting.cs:9:21:9:27 | MB2 | A.B.MB2(int, string, bool) | -| Nesting.cs:9:21:9:27 | MB2 | A.B.MB2(string, int, bool) | -| Nesting.cs:15:21:15:27 | MC2 | A.C.MC2(int, bool) | -| Nesting.cs:15:21:15:27 | MC2 | A.C.MC2(string, bool) | -| Nesting.cs:17:22:17:26 | D | A.C.D | -| Nesting.cs:17:22:17:26 | D | A.C.D | -| Nesting.cs:20:25:20:31 | MD2 | A.C.D.MD2(int, bool, string) | -| Nesting.cs:20:25:20:31 | MD2 | A.C.D.MD2(string, decimal, bool) | -| generics.cs:18:18:18:23 | bar | generics.A.bar(Test, int) | -| generics.cs:18:18:18:23 | bar | generics.A.bar(int, string) | -| generics.cs:51:22:51:29 | Inner | generics.Outer.Inner | +| Nesting.cs:4:17:4:23 | MA2 | A.MA2(int, string) | +| Nesting.cs:4:17:4:23 | MA2 | A.MA2(string, int) | +| Nesting.cs:6:18:6:22 | B | A+B | +| Nesting.cs:6:18:6:22 | B | A+B | +| Nesting.cs:9:21:9:27 | MB2 | A+B.MB2(int, string, bool) | +| Nesting.cs:9:21:9:27 | MB2 | A+B.MB2(string, int, bool) | +| Nesting.cs:15:21:15:27 | MC2 | A+C.MC2(int, bool) | +| Nesting.cs:15:21:15:27 | MC2 | A+C.MC2(string, bool) | +| Nesting.cs:17:22:17:26 | D | A+C+D | +| Nesting.cs:17:22:17:26 | D | A+C+D | +| Nesting.cs:20:25:20:31 | MD2 | A+C+D.MD2(int, bool, string) | +| Nesting.cs:20:25:20:31 | MD2 | A+C+D.MD2(string, decimal, bool) | +| generics.cs:18:18:18:23 | bar | generics.A.bar(Test, int) | +| generics.cs:18:18:18:23 | bar | generics.A.bar(int, string) | +| generics.cs:51:22:51:29 | Inner | generics.Outer+Inner | | generics.cs:152:14:152:19 | CM1 | generics.ConstructedMethods.CM1() | | generics.cs:152:14:152:19 | CM1 | generics.ConstructedMethods.CM1() | | generics.cs:153:11:153:16 | CM2 | generics.ConstructedMethods.CM2(double) | | generics.cs:153:11:153:16 | CM2 | generics.ConstructedMethods.CM2(int) | -| generics.cs:155:15:155:23 | Class | generics.ConstructedMethods.Class | -| generics.cs:155:15:155:23 | Class | generics.ConstructedMethods.Class | -| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods.Class.CM3(double, double) | -| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods.Class.CM3(double, int) | +| generics.cs:155:15:155:23 | Class | generics.ConstructedMethods+Class | +| generics.cs:155:15:155:23 | Class | generics.ConstructedMethods+Class | +| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods+Class.CM3(double, double) | +| generics.cs:157:23:157:29 | CM3 | generics.ConstructedMethods+Class.CM3(double, int) | test30 -| Nesting.cs:3:17:3:19 | MA1 | A.MA1(int) | -| Nesting.cs:3:17:3:19 | MA1 | A.MA1(string) | -| Nesting.cs:8:21:8:23 | MB1 | A.B.MB1(int, string) | -| Nesting.cs:8:21:8:23 | MB1 | A.B.MB1(string, int) | -| Nesting.cs:12:18:12:18 | C | A.C | -| Nesting.cs:12:18:12:18 | C | A.C | -| Nesting.cs:14:21:14:23 | MC1 | A.C.MC1(int) | -| Nesting.cs:14:21:14:23 | MC1 | A.C.MC1(string) | -| Nesting.cs:19:25:19:27 | MD1 | A.C.D.MD1(int, bool) | -| Nesting.cs:19:25:19:27 | MD1 | A.C.D.MD1(string, decimal) | -| Nesting.cs:24:10:24:18 | Construct | A.Construct() | -| Nesting.cs:24:10:24:18 | Construct | A.Construct() | -| generics.cs:29:21:29:23 | foo | generics.B.foo() | -| generics.cs:29:21:29:23 | foo | generics.B.foo() | -| generics.cs:29:21:29:23 | foo | generics.B.foo() | -| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params Object[]) | -| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params String[]) | -| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params X[]) | -| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | -| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | -| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | -| generics.cs:175:14:175:16 | set | generics.Interface.set(T) | +| Nesting.cs:3:17:3:19 | MA1 | A.MA1(int) | +| Nesting.cs:3:17:3:19 | MA1 | A.MA1(string) | +| Nesting.cs:8:21:8:23 | MB1 | A+B.MB1(int, string) | +| Nesting.cs:8:21:8:23 | MB1 | A+B.MB1(string, int) | +| Nesting.cs:12:18:12:18 | C | A+C | +| Nesting.cs:12:18:12:18 | C | A+C | +| Nesting.cs:14:21:14:23 | MC1 | A+C.MC1(int) | +| Nesting.cs:14:21:14:23 | MC1 | A+C.MC1(string) | +| Nesting.cs:19:25:19:27 | MD1 | A+C+D.MD1(int, bool) | +| Nesting.cs:19:25:19:27 | MD1 | A+C+D.MD1(string, decimal) | +| Nesting.cs:24:10:24:18 | Construct | A.Construct() | +| Nesting.cs:24:10:24:18 | Construct | A.Construct() | +| generics.cs:29:21:29:23 | foo | generics.B.foo() | +| generics.cs:29:21:29:23 | foo | generics.B.foo() | +| generics.cs:29:21:29:23 | foo | generics.B.f.<0>>.foo() | +| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params Object[]) | +| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params String[]) | +| generics.cs:31:21:31:29 | fooParams | generics.B.f.<0>>.fooParams(params X[]) | +| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | +| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | +| generics.cs:33:28:33:36 | staticFoo | generics.B.f.<0>>.staticFoo() | +| generics.cs:175:14:175:16 | set | generics.Interface.<0>>.set(T) | test31 diff --git a/csharp/ql/test/library-tests/namespaces/Namespaces9.ql b/csharp/ql/test/library-tests/namespaces/Namespaces9.ql index 047524c1f55a..253e74ddfd63 100644 --- a/csharp/ql/test/library-tests/namespaces/Namespaces9.ql +++ b/csharp/ql/test/library-tests/namespaces/Namespaces9.ql @@ -10,5 +10,5 @@ where a.getATypeParameter().hasName("T") and a.getANestedType() = b and b.getName() = "B" and - b.hasQualifiedName("R1.A<>.B") + b.hasQualifiedName("R1.A<>+B") select a, b diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes1.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes1.ql index 0bd3610f2d95..411ff0b664f2 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes1.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes1.ql @@ -7,7 +7,7 @@ import csharp from Class c, Struct s where c.hasQualifiedName("NestedTypes.Base") and - s.hasQualifiedName("NestedTypes.Base.S") and + s.hasQualifiedName("NestedTypes.Base+S") and s = c.getANestedType() and s.(NestedType).isProtected() and c.isPublic() diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes2.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes2.ql index 1222441765de..0432b5e4303e 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes2.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes2.ql @@ -7,7 +7,7 @@ import csharp from Class c, Interface i where c.hasQualifiedName("NestedTypes.Base") and - i.hasQualifiedName("NestedTypes.Base.I") and + i.hasQualifiedName("NestedTypes.Base+I") and i.(NestedType).isPrivate() and i = c.getANestedType() select c, i diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes3.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes3.ql index 989bff15dbe1..d636c18b6d35 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes3.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes3.ql @@ -7,7 +7,7 @@ import csharp from Class c, DelegateType d where c.hasQualifiedName("NestedTypes.Base") and - d.hasQualifiedName("NestedTypes.Base.MyDelegate") and + d.hasQualifiedName("NestedTypes.Base+MyDelegate") and d.(NestedType).isPrivate() and d = c.getANestedType() select c, d diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes4.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes4.ql index 16b853d8a9e6..e52c9149db13 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes4.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes4.ql @@ -8,7 +8,7 @@ from Class base, Class derived, Class nested where base.hasQualifiedName("NestedTypes.Base") and derived.hasQualifiedName("NestedTypes.Derived") and - nested.hasQualifiedName("NestedTypes.Derived.Nested") and + nested.hasQualifiedName("NestedTypes.Derived+Nested") and nested.getNamespace().hasName("NestedTypes") and derived.getBaseClass() = base and derived.isInternal() and diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes5.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes5.ql index d6b48f928c6f..d7a71757724a 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes5.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes5.ql @@ -8,7 +8,7 @@ from Class base, Class derived, Class nested where base.hasQualifiedName("NestedTypes.Base") and derived.hasQualifiedName("NestedTypes.Derived") and - nested.hasQualifiedName("NestedTypes.Derived.Nested") and + nested.hasQualifiedName("NestedTypes.Derived+Nested") and nested.getNamespace().hasName("NestedTypes") and nested.getDeclaringType() = derived select base, derived, nested diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes6.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes6.ql index dcce4ac68654..40c3337d6430 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes6.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes6.ql @@ -7,6 +7,6 @@ import csharp from UnboundGenericClass o, UnboundGenericClass i where o.hasQualifiedName("NestedTypes.Outer<>") and - i.hasQualifiedName("NestedTypes.Outer<>.Inner<>") and + i.hasQualifiedName("NestedTypes.Outer<>+Inner<>") and i = o.getANestedType() select o, i diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes7.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes7.ql index 484052bb248a..b8a584177890 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes7.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes7.ql @@ -7,7 +7,7 @@ import csharp from UnboundGenericClass o, UnboundGenericClass i where o.hasQualifiedName("NestedTypes.Outer2<>") and - i.hasQualifiedName("NestedTypes.Outer2<>.Inner2<>") and + i.hasQualifiedName("NestedTypes.Outer2<>+Inner2<>") and i = o.getANestedType() and i.getTypeParameter(0).getName() = o.getTypeParameter(0).getName() select o, i diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes8.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes8.ql index 9cb2c5c58de0..b854068b1e96 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes8.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes8.ql @@ -6,8 +6,8 @@ import csharp from ConstructedClass o, ConstructedClass i where - o.hasQualifiedName("NestedTypes.Outer") and - i.hasQualifiedName("NestedTypes.Outer.Inner") and + o.hasQualifiedName("NestedTypes.Outer") and + i.hasQualifiedName("NestedTypes.Outer+Inner") and i = o.getANestedType() and o.getTypeArgument(0) instanceof IntType and i.getTypeArgument(0) instanceof StringType diff --git a/csharp/ql/test/library-tests/nestedtypes/NestedTypes9.ql b/csharp/ql/test/library-tests/nestedtypes/NestedTypes9.ql index 908d9fe59343..2b926ce8ec6b 100644 --- a/csharp/ql/test/library-tests/nestedtypes/NestedTypes9.ql +++ b/csharp/ql/test/library-tests/nestedtypes/NestedTypes9.ql @@ -7,7 +7,7 @@ import csharp from UnboundGenericClass o, ConstructedClass i where o.hasQualifiedName("NestedTypes.Outer<>") and - i.hasQualifiedName("NestedTypes.Outer<>.Inner") and + i.hasQualifiedName("NestedTypes.Outer<>+Inner") and i.getUnboundGeneric() = o.getANestedType() and i.getTypeArgument(0) instanceof StringType select o, i diff --git a/csharp/ql/test/library-tests/overrides/Overrides22.expected b/csharp/ql/test/library-tests/overrides/Overrides22.expected index 1322e0c3ccf0..364d4554e86e 100644 --- a/csharp/ql/test/library-tests/overrides/Overrides22.expected +++ b/csharp/ql/test/library-tests/overrides/Overrides22.expected @@ -2,15 +2,15 @@ | CallTargets.C3.m() | CallTargets.C2.m() | overrides | | overrides.A1.Event | overrides.I5.Event | implements | | overrides.A1.Item[int] | overrides.I5.Item[int] | implements | -| overrides.A1.M(dynamic[], T) | overrides.I2.M(Object[], S) | implements | +| overrides.A1.M(dynamic[], T) | overrides.I2.M(Object[], S) | implements | | overrides.A1.Property | overrides.I5.Property | implements | | overrides.A4.Event | overrides.I5.Event | implements | | overrides.A4.Item[int] | overrides.I5.Item[int] | implements | -| overrides.A4.M(dynamic[], T) | overrides.I2.M(Object[], S) | implements | +| overrides.A4.M(dynamic[], T) | overrides.I2.M(Object[], S) | implements | | overrides.A4.Property | overrides.I5.Property | implements | | overrides.A6.Event | overrides.I5.Event | implements | | overrides.A6.Item[int] | overrides.I5.Item[int] | implements | -| overrides.A6.M(Object[], T) | overrides.I2.M(Object[], S) | implements | +| overrides.A6.M(Object[], T) | overrides.I2.M(Object[], S) | implements | | overrides.A6.Property | overrides.I5.Property | implements | | overrides.A8.Event | overrides.A1.Event | overrides | | overrides.A8.Item[int] | overrides.A1.Item[int] | overrides | @@ -36,15 +36,15 @@ | overrides.C3<>.Item[int] | overrides.I4.MyIndexer[int] | implements | | overrides.C3<>.Method() | overrides.I4.Method() | implements | | overrides.C3<>.Prop | overrides.I3.Prop | implements | -| overrides.C3.Item[int] | overrides.I4.MyIndexer[int] | implements | -| overrides.C3.Method() | overrides.I4.Method() | implements | -| overrides.C3.Prop | overrides.I3.Prop | implements | +| overrides.C3.Item[int] | overrides.I4.MyIndexer[int] | implements | +| overrides.C3.Method() | overrides.I4.Method() | implements | +| overrides.C3.Prop | overrides.I3.Prop | implements | | overrides.D.ToString() | overrides.C.ToString() | overrides | | overrides.D.f2() | overrides.A.f2() | overrides | | overrides.E2.M() | overrides.E.M() | overrides | | overrides.E.M() | overrides.I.M() | implements | | overrides.F.M() | overrides.I.M() | implements | | overrides.G2.M(string, S) | overrides.G.M(string, S) | overrides | -| overrides.G.M(string, S) | overrides.I2.M(string, S) | implements | -| overrides.H<>.M(TA, S) | overrides.I2.M(TA, S) | implements | -| overrides.Outer<>.A10.M(Inner) | overrides.Outer<>.I6.M(Inner) | implements | +| overrides.G.M(string, S) | overrides.I2.M(string, S) | implements | +| overrides.H<>.M(TA, S) | overrides.I2.<0>>.M(TA, S) | implements | +| overrides.Outer<>+A10.M(Inner) | overrides.Outer<>+I6.M(Inner) | implements | diff --git a/csharp/ql/test/library-tests/unification/Unification.expected b/csharp/ql/test/library-tests/unification/Unification.expected index 3a341b3bcff9..50b8297e2e67 100644 --- a/csharp/ql/test/library-tests/unification/Unification.expected +++ b/csharp/ql/test/library-tests/unification/Unification.expected @@ -44,19 +44,19 @@ constrainedTypeParameterSubsumes | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested<>.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested<>+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | | Unification.cs:10:10:10:11 | T4 | Unification.cs:7:7:7:12 | C1 | | Unification.cs:10:10:10:11 | T4 | Unification.cs:10:10:10:11 | T4 | | Unification.cs:11:10:11:11 | T5 | Unification.cs:8:7:8:12 | C2 | @@ -145,19 +145,19 @@ constrainedTypeParameterUnifiable | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | | Unification.cs:9:10:9:11 | T3 | Unification.cs:36:7:36:17 | Nested | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested<>.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested<>+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:9:10:9:11 | T3 | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | | Unification.cs:10:10:10:11 | T4 | Unification.cs:7:7:7:12 | C1 | | Unification.cs:10:10:10:11 | T4 | Unification.cs:7:7:7:12 | C1 | | Unification.cs:10:10:10:11 | T4 | Unification.cs:7:7:7:12 | C1 | @@ -285,33 +285,33 @@ subsumes | Unification.cs:36:7:36:17 | Nested | Unification.cs:36:7:36:17 | Nested | | Unification.cs:36:7:36:17 | Nested | Unification.cs:36:7:36:17 | Nested | | Unification.cs:36:7:36:17 | Nested | Unification.cs:36:7:36:17 | Nested | -| Unification.cs:38:11:38:22 | Nested<>.NestedA | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:38:11:38:22 | Nested<>.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested<>.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested<>.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested<>.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:39:11:39:17 | Nested<>.NestedB | Unification.cs:39:11:39:17 | Nested<>.NestedB | -| Unification.cs:39:11:39:17 | Nested<>.NestedB | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:39:11:39:17 | Nested<>.NestedB | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:39:11:39:17 | Nested.NestedB | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:39:11:39:17 | Nested.NestedB | Unification.cs:39:11:39:17 | Nested.NestedB | -| Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | +| Unification.cs:38:11:38:22 | Nested<>+NestedA | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:38:11:38:22 | Nested<>+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested<>+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested<>+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested<>+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:39:11:39:17 | Nested<>+NestedB | Unification.cs:39:11:39:17 | Nested<>+NestedB | +| Unification.cs:39:11:39:17 | Nested<>+NestedB | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:39:11:39:17 | Nested<>+NestedB | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:39:11:39:17 | Nested+NestedB | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:39:11:39:17 | Nested+NestedB | Unification.cs:39:11:39:17 | Nested+NestedB | +| Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | subsumptionImpliesUnification unifiable | Unification.cs:7:7:7:12 | C1 | Unification.cs:7:7:7:12 | C1 | @@ -349,17 +349,17 @@ unifiable | Unification.cs:31:12:31:23 | (string, T9) | Unification.cs:32:12:32:19 | (T8, T9) | | Unification.cs:36:7:36:17 | Nested | Unification.cs:36:7:36:17 | Nested | | Unification.cs:36:7:36:17 | Nested | Unification.cs:36:7:36:17 | Nested | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested.NestedA | -| Unification.cs:38:11:38:22 | Nested.NestedA | Unification.cs:38:11:38:22 | Nested<>.NestedA | -| Unification.cs:39:11:39:17 | Nested.NestedB | Unification.cs:39:11:39:17 | Nested<>.NestedB | -| Unification.cs:39:11:39:17 | Nested.NestedB | Unification.cs:39:11:39:17 | Nested<>.NestedB | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | -| Unification.cs:41:22:41:33 | Nested.NestedB.NestedC | Unification.cs:41:22:41:33 | Nested<>.NestedB.NestedC | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested+NestedA | +| Unification.cs:38:11:38:22 | Nested+NestedA | Unification.cs:38:11:38:22 | Nested<>+NestedA | +| Unification.cs:39:11:39:17 | Nested+NestedB | Unification.cs:39:11:39:17 | Nested<>+NestedB | +| Unification.cs:39:11:39:17 | Nested+NestedB | Unification.cs:39:11:39:17 | Nested<>+NestedB | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | +| Unification.cs:41:22:41:33 | Nested+NestedB+NestedC | Unification.cs:41:22:41:33 | Nested<>+NestedB+NestedC | diff --git a/csharp/ql/test/query-tests/API Abuse/NonOverridingMethod/NonOverridingMethod.expected b/csharp/ql/test/query-tests/API Abuse/NonOverridingMethod/NonOverridingMethod.expected index ae8a44c03e79..02c245c0b0dd 100644 --- a/csharp/ql/test/query-tests/API Abuse/NonOverridingMethod/NonOverridingMethod.expected +++ b/csharp/ql/test/query-tests/API Abuse/NonOverridingMethod/NonOverridingMethod.expected @@ -1,3 +1,3 @@ | NonOverridingMethod.cs:15:16:15:17 | M1 | Method 'M1' looks like it should override $@ but does not do so. | NonOverridingMethod.cs:5:24:5:25 | M1 | C1.M1 | | NonOverridingMethod.cs:21:27:21:31 | M3 | Method 'M3' looks like it should override $@ but does not do so. | NonOverridingMethod.cs:7:35:7:39 | M3 | C1.M3 | -| NonOverridingMethodBad.cs:10:21:10:23 | Foo | Method 'Foo' looks like it should override $@ but does not do so. | NonOverridingMethodBad.cs:5:29:5:31 | Foo | Bad.Super.Foo | +| NonOverridingMethodBad.cs:10:21:10:23 | Foo | Method 'Foo' looks like it should override $@ but does not do so. | NonOverridingMethodBad.cs:5:29:5:31 | Foo | Bad+Super.Foo | From 3f6beaf9df55e7450aa161894eaa13ee24c5f4c3 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Wed, 16 Jun 2021 15:25:04 +0200 Subject: [PATCH 1351/1662] C#: Add tests for complex CSV flow summaries --- .../dataflow/external-models/ExternalFlow.cs | 120 ++++++++++++++++++ .../external-models/ExternalFlow.expected | 117 +++++++++++++++++ .../dataflow/external-models/ExternalFlow.ql | 47 +++++++ 3 files changed, 284 insertions(+) create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected create mode 100644 csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs new file mode 100644 index 000000000000..c156daa0c82b --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs @@ -0,0 +1,120 @@ +using System; + +namespace My.Qltest +{ + public class D + { + void M1() + { + object arg1 = new object(); + Sink(StepArgRes(arg1)); + } + + void M2() + { + object argIn1 = new object(); + object argOut1 = new object(); + StepArgArg(argIn1, argOut1); + Sink(argOut1); + } + + void M3() + { + object arg2 = new object(); + StepArgQual(arg2); + Sink(this); + } + + void M4() + { + this.Field = new object(); + Sink(this.StepFieldGetter()); + } + + void M5() + { + this.StepFieldSetter(new object()); + Sink(this.Field); + } + + void M6() + { + this.Property = new object(); + Sink(this.StepPropertyGetter()); + } + + void M7() + { + this.StepPropertySetter(new object()); + Sink(this.Property); + } + + void M8() + { + this.StepElementSetter(new object()); + Sink(this.StepElementGetter()); + } + + void M9() + { + Apply(o => { Sink(o); return o; }, new object()); + } + + void M10() + { + var o = Apply(_ => new object(), 0); + Sink(o); + } + + void M11() + { + var objs = new[] { new object() }; + Map(objs, o => { Sink(o); return o; }); + } + + void M12() + { + var objs = Map(new[] { 0 }, _ => new object()); + Sink(objs[0]); + } + + void M13() + { + var objs = new[] { new object() }; + var objs2 = Map(objs, o => o); + Sink(objs2[0]); + } + + object StepArgRes(object x) { return null; } + + void StepArgArg(object @in, object @out) { } + + void StepArgQual(object x) { } + + object StepQualRes() { return null; } + + void StepQualArg(object @out) { } + + object Field; + + object StepFieldGetter() => throw null; + + void StepFieldSetter(object value) => throw null; + + object Property { get; set; } + + object StepPropertyGetter() => throw null; + + void StepPropertySetter(object value) => throw null; + + object StepElementGetter() => throw null; + + void StepElementSetter(object value) => throw null; + + static T Apply(Func f, T t) => throw null; + + static S[] Map(S[] elements, Func f) => throw null; + + static void Sink(object o) { } + } +} \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected new file mode 100644 index 000000000000..c69f303b9429 --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected @@ -0,0 +1,117 @@ +edges +| ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | ExternalFlow.cs:10:29:10:32 | access to local variable arg1 : Object | +| ExternalFlow.cs:10:29:10:32 | access to local variable arg1 : Object | ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | +| ExternalFlow.cs:15:29:15:40 | object creation of type Object : Object | ExternalFlow.cs:17:24:17:29 | access to local variable argIn1 : Object | +| ExternalFlow.cs:16:30:16:41 | object creation of type Object : Object | ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | +| ExternalFlow.cs:17:24:17:29 | access to local variable argIn1 : Object | ExternalFlow.cs:17:32:17:38 | [post] access to local variable argOut1 : Object | +| ExternalFlow.cs:17:32:17:38 | [post] access to local variable argOut1 : Object | ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | +| ExternalFlow.cs:23:27:23:38 | object creation of type Object : Object | ExternalFlow.cs:24:25:24:28 | access to local variable arg2 : Object | +| ExternalFlow.cs:24:13:24:29 | [post] this access : D | ExternalFlow.cs:25:18:25:21 | this access | +| ExternalFlow.cs:24:25:24:28 | access to local variable arg2 : Object | ExternalFlow.cs:24:13:24:29 | [post] this access : D | +| ExternalFlow.cs:30:13:30:16 | [post] this access [field Field] : Object | ExternalFlow.cs:31:18:31:21 | this access [field Field] : Object | +| ExternalFlow.cs:30:26:30:37 | object creation of type Object : Object | ExternalFlow.cs:30:13:30:16 | [post] this access [field Field] : Object | +| ExternalFlow.cs:31:18:31:21 | this access [field Field] : Object | ExternalFlow.cs:31:18:31:39 | call to method StepFieldGetter | +| ExternalFlow.cs:36:13:36:16 | [post] this access [field Field] : Object | ExternalFlow.cs:37:18:37:21 | this access [field Field] : Object | +| ExternalFlow.cs:36:34:36:45 | object creation of type Object : Object | ExternalFlow.cs:36:13:36:16 | [post] this access [field Field] : Object | +| ExternalFlow.cs:37:18:37:21 | this access [field Field] : Object | ExternalFlow.cs:37:18:37:27 | access to field Field | +| ExternalFlow.cs:42:13:42:16 | [post] this access [property Property] : Object | ExternalFlow.cs:43:18:43:21 | this access [property Property] : Object | +| ExternalFlow.cs:42:29:42:40 | object creation of type Object : Object | ExternalFlow.cs:42:13:42:16 | [post] this access [property Property] : Object | +| ExternalFlow.cs:43:18:43:21 | this access [property Property] : Object | ExternalFlow.cs:43:18:43:42 | call to method StepPropertyGetter | +| ExternalFlow.cs:48:13:48:16 | [post] this access [property Property] : Object | ExternalFlow.cs:49:18:49:21 | this access [property Property] : Object | +| ExternalFlow.cs:48:37:48:48 | object creation of type Object : Object | ExternalFlow.cs:48:13:48:16 | [post] this access [property Property] : Object | +| ExternalFlow.cs:49:18:49:21 | this access [property Property] : Object | ExternalFlow.cs:49:18:49:30 | access to property Property | +| ExternalFlow.cs:54:13:54:16 | [post] this access [element] : Object | ExternalFlow.cs:55:18:55:21 | this access [element] : Object | +| ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | ExternalFlow.cs:54:13:54:16 | [post] this access [element] : Object | +| ExternalFlow.cs:55:18:55:21 | this access [element] : Object | ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | +| ExternalFlow.cs:60:35:60:35 | o : Object | ExternalFlow.cs:60:47:60:47 | access to parameter o | +| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:114:46:114:46 | t : Object | +| ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | ExternalFlow.cs:66:18:66:18 | access to local variable o | +| ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | +| ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | +| ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | +| ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | ExternalFlow.cs:116:34:116:41 | elements [element] : Object | +| ExternalFlow.cs:72:23:72:23 | o : Object | ExternalFlow.cs:72:35:72:35 | access to parameter o | +| ExternalFlow.cs:77:24:77:58 | call to method Map [element] : Object | ExternalFlow.cs:78:18:78:21 | access to local variable objs [element] : Object | +| ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | ExternalFlow.cs:77:24:77:58 | call to method Map [element] : Object | +| ExternalFlow.cs:78:18:78:21 | access to local variable objs [element] : Object | ExternalFlow.cs:78:18:78:24 | access to array element : Object | +| ExternalFlow.cs:78:18:78:24 | access to array element : Object | ExternalFlow.cs:78:18:78:24 | (...) ... | +| ExternalFlow.cs:83:30:83:45 | { ..., ... } [element] : Object | ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | +| ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | ExternalFlow.cs:83:30:83:45 | { ..., ... } [element] : Object | +| ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | +| ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | +| ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | ExternalFlow.cs:85:18:85:25 | access to array element | +| ExternalFlow.cs:114:46:114:46 | t : Object | ExternalFlow.cs:60:35:60:35 | o : Object | +| ExternalFlow.cs:116:34:116:41 | elements [element] : Object | ExternalFlow.cs:72:23:72:23 | o : Object | +nodes +| ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | semmle.label | call to method StepArgRes | +| ExternalFlow.cs:10:29:10:32 | access to local variable arg1 : Object | semmle.label | access to local variable arg1 : Object | +| ExternalFlow.cs:15:29:15:40 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:16:30:16:41 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:17:24:17:29 | access to local variable argIn1 : Object | semmle.label | access to local variable argIn1 : Object | +| ExternalFlow.cs:17:32:17:38 | [post] access to local variable argOut1 : Object | semmle.label | [post] access to local variable argOut1 : Object | +| ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | semmle.label | access to local variable argOut1 | +| ExternalFlow.cs:23:27:23:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:24:13:24:29 | [post] this access : D | semmle.label | [post] this access : D | +| ExternalFlow.cs:24:25:24:28 | access to local variable arg2 : Object | semmle.label | access to local variable arg2 : Object | +| ExternalFlow.cs:25:18:25:21 | this access | semmle.label | this access | +| ExternalFlow.cs:30:13:30:16 | [post] this access [field Field] : Object | semmle.label | [post] this access [field Field] : Object | +| ExternalFlow.cs:30:26:30:37 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:31:18:31:21 | this access [field Field] : Object | semmle.label | this access [field Field] : Object | +| ExternalFlow.cs:31:18:31:39 | call to method StepFieldGetter | semmle.label | call to method StepFieldGetter | +| ExternalFlow.cs:36:13:36:16 | [post] this access [field Field] : Object | semmle.label | [post] this access [field Field] : Object | +| ExternalFlow.cs:36:34:36:45 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:37:18:37:21 | this access [field Field] : Object | semmle.label | this access [field Field] : Object | +| ExternalFlow.cs:37:18:37:27 | access to field Field | semmle.label | access to field Field | +| ExternalFlow.cs:42:13:42:16 | [post] this access [property Property] : Object | semmle.label | [post] this access [property Property] : Object | +| ExternalFlow.cs:42:29:42:40 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:43:18:43:21 | this access [property Property] : Object | semmle.label | this access [property Property] : Object | +| ExternalFlow.cs:43:18:43:42 | call to method StepPropertyGetter | semmle.label | call to method StepPropertyGetter | +| ExternalFlow.cs:48:13:48:16 | [post] this access [property Property] : Object | semmle.label | [post] this access [property Property] : Object | +| ExternalFlow.cs:48:37:48:48 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:49:18:49:21 | this access [property Property] : Object | semmle.label | this access [property Property] : Object | +| ExternalFlow.cs:49:18:49:30 | access to property Property | semmle.label | access to property Property | +| ExternalFlow.cs:54:13:54:16 | [post] this access [element] : Object | semmle.label | [post] this access [element] : Object | +| ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:55:18:55:21 | this access [element] : Object | semmle.label | this access [element] : Object | +| ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | semmle.label | call to method StepElementGetter | +| ExternalFlow.cs:60:35:60:35 | o : Object | semmle.label | o : Object | +| ExternalFlow.cs:60:47:60:47 | access to parameter o | semmle.label | access to parameter o | +| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | semmle.label | call to method Apply : Object | +| ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:66:18:66:18 | access to local variable o | semmle.label | access to local variable o | +| ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | semmle.label | { ..., ... } [element] : Object | +| ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | semmle.label | access to local variable objs [element] : Object | +| ExternalFlow.cs:72:23:72:23 | o : Object | semmle.label | o : Object | +| ExternalFlow.cs:72:35:72:35 | access to parameter o | semmle.label | access to parameter o | +| ExternalFlow.cs:77:24:77:58 | call to method Map [element] : Object | semmle.label | call to method Map [element] : Object | +| ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:78:18:78:21 | access to local variable objs [element] : Object | semmle.label | access to local variable objs [element] : Object | +| ExternalFlow.cs:78:18:78:24 | (...) ... | semmle.label | (...) ... | +| ExternalFlow.cs:78:18:78:24 | access to array element : Object | semmle.label | access to array element : Object | +| ExternalFlow.cs:83:30:83:45 | { ..., ... } [element] : Object | semmle.label | { ..., ... } [element] : Object | +| ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | +| ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | semmle.label | call to method Map [element] : Object | +| ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | semmle.label | access to local variable objs [element] : Object | +| ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | semmle.label | access to local variable objs2 [element] : Object | +| ExternalFlow.cs:85:18:85:25 | access to array element | semmle.label | access to array element | +| ExternalFlow.cs:114:46:114:46 | t : Object | semmle.label | t : Object | +| ExternalFlow.cs:116:34:116:41 | elements [element] : Object | semmle.label | elements [element] : Object | +invalidModelRow +#select +| ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | $@ | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | ExternalFlow.cs:15:29:15:40 | object creation of type Object : Object | ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | $@ | ExternalFlow.cs:15:29:15:40 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | ExternalFlow.cs:16:30:16:41 | object creation of type Object : Object | ExternalFlow.cs:18:18:18:24 | access to local variable argOut1 | $@ | ExternalFlow.cs:16:30:16:41 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:25:18:25:21 | this access | ExternalFlow.cs:23:27:23:38 | object creation of type Object : Object | ExternalFlow.cs:25:18:25:21 | this access | $@ | ExternalFlow.cs:23:27:23:38 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:31:18:31:39 | call to method StepFieldGetter | ExternalFlow.cs:30:26:30:37 | object creation of type Object : Object | ExternalFlow.cs:31:18:31:39 | call to method StepFieldGetter | $@ | ExternalFlow.cs:30:26:30:37 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:37:18:37:27 | access to field Field | ExternalFlow.cs:36:34:36:45 | object creation of type Object : Object | ExternalFlow.cs:37:18:37:27 | access to field Field | $@ | ExternalFlow.cs:36:34:36:45 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:43:18:43:42 | call to method StepPropertyGetter | ExternalFlow.cs:42:29:42:40 | object creation of type Object : Object | ExternalFlow.cs:43:18:43:42 | call to method StepPropertyGetter | $@ | ExternalFlow.cs:42:29:42:40 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:49:18:49:30 | access to property Property | ExternalFlow.cs:48:37:48:48 | object creation of type Object : Object | ExternalFlow.cs:49:18:49:30 | access to property Property | $@ | ExternalFlow.cs:48:37:48:48 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | $@ | ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:60:47:60:47 | access to parameter o | ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:60:47:60:47 | access to parameter o | $@ | ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:66:18:66:18 | access to local variable o | ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | ExternalFlow.cs:66:18:66:18 | access to local variable o | $@ | ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:72:35:72:35 | access to parameter o | ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | ExternalFlow.cs:72:35:72:35 | access to parameter o | $@ | ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:78:18:78:24 | (...) ... | ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | ExternalFlow.cs:78:18:78:24 | (...) ... | $@ | ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:85:18:85:25 | access to array element | ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | ExternalFlow.cs:85:18:85:25 | access to array element | $@ | ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | object creation of type Object : Object | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql new file mode 100644 index 000000000000..b2acfbd6b9dc --- /dev/null +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql @@ -0,0 +1,47 @@ +/** + * @kind path-problem + */ + +import csharp +import semmle.code.csharp.dataflow.ExternalFlow +import DataFlow::PathGraph +import CsvValidation + +class SummaryModelTest extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + //"namespace;type;overrides;name;signature;ext;inputspec;outputspec;kind", + "My.Qltest;D;false;StepArgRes;(System.Object);;Argument[0];ReturnValue;taint", + "My.Qltest;D;false;StepArgArg;(System.Object,System.Object);;Argument[0];Argument[1];taint", + "My.Qltest;D;false;StepArgQual;(System.Object);;Argument[0];Argument[-1];taint", + "My.Qltest;D;false;StepFieldGetter;();;Field[My.Qltest.D.Field] of Argument[-1];ReturnValue;value", + "My.Qltest;D;false;StepFieldSetter;(System.Object);;Argument[0];Field[My.Qltest.D.Field] of Argument[-1];value", + "My.Qltest;D;false;StepPropertyGetter;();;Property[My.Qltest.D.Property] of Argument[-1];ReturnValue;value", + "My.Qltest;D;false;StepPropertySetter;(System.Object);;Argument[0];Property[My.Qltest.D.Property] of Argument[-1];value", + "My.Qltest;D;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", + "My.Qltest;D;false;StepElementSetter;(System.Object);;Argument[0];Element of Argument[-1];value", + "My.Qltest;D;false;Apply;(System.Func,My.Qltest.D.Apply.<1>>,My.Qltest.D.Apply.<1>);;Argument[1];Parameter[0] of Argument[0];value", + "My.Qltest;D;false;Apply;(System.Func,My.Qltest.D.Apply.<1>>,My.Qltest.D.Apply.<1>);;ReturnValue of Argument[0];ReturnValue;value", + "My.Qltest;D;false;Map;(My.Qltest.D.Map.<0>[],System.Func,My.Qltest.D.Map.<1>>);;Element of Argument[0];Parameter[0] of Argument[1];value", + "My.Qltest;D;false;Map;(My.Qltest.D.Map.<0>[],System.Func,My.Qltest.D.Map.<1>>);;ReturnValue of Argument[1];Element of ReturnValue;value" + ] + } +} + +class Conf extends TaintTracking::Configuration { + Conf() { this = "ExternalFlow" } + + override predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ObjectCreation } + + override predicate isSink(DataFlow::Node sink) { + exists(MethodCall mc | + mc.getTarget().hasName("Sink") and + mc.getAnArgument() = sink.asExpr() + ) + } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, Conf conf +where conf.hasFlowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() From 5f82993b0bee647f807b65b93ee46c36a1fde77a Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 17 Jun 2021 06:16:14 +0100 Subject: [PATCH 1352/1662] Put parameters with inline expectation comments on their own lines --- .../frameworks/JaxWs/JakartaRs1.java | 33 +++++++++++++++---- .../frameworks/JaxWs/JakartaRs2.java | 22 ++++++++++--- .../frameworks/JaxWs/JaxRs1.java | 33 +++++++++++++++---- .../frameworks/JaxWs/JaxRs2.java | 23 ++++++++++--- 4 files changed, 87 insertions(+), 24 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java index 9c765361cb8e..40380f8913a7 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java @@ -106,8 +106,14 @@ class AnotherNonRootResourceClassJakarta { // $NonRootResourceClass public AnotherNonRootResourceClassJakarta() { } - public AnotherNonRootResourceClassJakarta(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public AnotherNonRootResourceClassJakarta( + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } @@ -120,14 +126,27 @@ class FooJakarta { FooJakarta() { // $BeanParamConstructor } - public FooJakarta(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation $BeanParamConstructor - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public FooJakarta( // $BeanParamConstructor + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } - public FooJakarta(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, int paramWithoutAnnotation) { // $InjectionAnnotation + public FooJakarta( + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation + @Context int context, // $InjectionAnnotation + int paramWithoutAnnotation) { } } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java index 90cd9052cb72..bfd7b1471811 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java @@ -29,14 +29,26 @@ class JakartaRs2 { // $RootResourceClass JakartaRs2() { } - public JakartaRs2(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation $InjectableConstructor - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public JakartaRs2(// $InjectableConstructor + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } - public JakartaRs2(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, int paramWithoutAnnotation) { // $InjectionAnnotation + public JakartaRs2(@BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation + @Context int context, // $InjectionAnnotation + int paramWithoutAnnotation) { } @BeanParam // $InjectionAnnotation diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java index 271cba9b52c7..e8acd4a05072 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java @@ -106,8 +106,14 @@ class AnotherNonRootResourceClass { // $NonRootResourceClass public AnotherNonRootResourceClass() { } - public AnotherNonRootResourceClass(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public AnotherNonRootResourceClass( + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } @@ -120,14 +126,27 @@ class Foo { Foo() { // $BeanParamConstructor } - public Foo(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation $BeanParamConstructor - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public Foo( // $BeanParamConstructor + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } - public Foo(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, int paramWithoutAnnotation) { // $InjectionAnnotation + public Foo( + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation + @Context int context, // $InjectionAnnotation + int paramWithoutAnnotation) { } } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java index 14cacc5bb2db..5913d0b998e5 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java @@ -29,14 +29,27 @@ class JaxRs2 { // $RootResourceClass JaxRs2() { } - public JaxRs2(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation $InjectableConstructor - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation + public JaxRs2(// $InjectableConstructor + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation @Context int context) { // $InjectionAnnotation } - public JaxRs2(@BeanParam int beanParam, @CookieParam("") int cookieParam, @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, @MatrixParam("") int matrixParam, @PathParam("") int pathParam, @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, int paramWithoutAnnotation) { // $InjectionAnnotation + public JaxRs2( + @BeanParam int beanParam, // $InjectionAnnotation + @CookieParam("") int cookieParam, // $InjectionAnnotation + @FormParam("") int formParam, // $InjectionAnnotation + @HeaderParam("") int headerParam, // $InjectionAnnotation + @MatrixParam("") int matrixParam, // $InjectionAnnotation + @PathParam("") int pathParam, // $InjectionAnnotation + @QueryParam("") int queryParam, // $InjectionAnnotation + @Context int context, // $InjectionAnnotation + int paramWithoutAnnotation) { } @BeanParam // $InjectionAnnotation From 3dd851fffb39bef31907ed6d15015f1051f91af6 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 17 Jun 2021 15:20:03 +0800 Subject: [PATCH 1353/1662] expected --- .../CWE-502/UnsafeDeserialization.expected | 75 ++++--------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected index 99b8c2ea94c8..6f25b28bda5e 100644 --- a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected +++ b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected @@ -1,53 +1,30 @@ edges -| A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:14:50:14:60 | inputStream : InputStream | | A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:15:12:15:13 | in | -| A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:15:12:15:13 | in | -| A.java:14:50:14:60 | inputStream : InputStream | A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | -| A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:20:50:20:60 | inputStream : InputStream | | A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:21:12:21:13 | in | -| A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:21:12:21:13 | in | -| A.java:20:50:20:60 | inputStream : InputStream | A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | -| A.java:25:31:25:51 | getInputStream(...) : InputStream | A.java:26:35:26:45 | inputStream : InputStream | -| A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | A.java:27:12:27:12 | d | -| A.java:26:35:26:45 | inputStream : InputStream | A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | -| A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:33:43:33:53 | inputStream : InputStream | -| A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | A.java:34:23:34:28 | reader | -| A.java:33:43:33:53 | inputStream : InputStream | A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | -| A.java:39:19:39:50 | new Input(...) : Input | A.java:40:28:40:32 | input | -| A.java:39:19:39:50 | new Input(...) : Input | A.java:41:34:41:38 | input | -| A.java:39:19:39:50 | new Input(...) : Input | A.java:42:40:42:44 | input | -| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:39:19:39:50 | new Input(...) : Input | +| A.java:25:31:25:51 | getInputStream(...) : InputStream | A.java:27:12:27:12 | d | +| A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:34:23:34:28 | reader | +| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:40:28:40:32 | input | +| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:41:34:41:38 | input | +| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:42:40:42:44 | input | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:61:26:61:30 | input | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:62:30:62:34 | input | -| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:63:50:63:54 | input : InputStream | +| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:63:28:63:55 | new InputStreamReader(...) | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:64:24:64:28 | input | -| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:65:46:65:50 | input : InputStream | -| A.java:63:50:63:54 | input : InputStream | A.java:63:28:63:55 | new InputStreamReader(...) | -| A.java:65:46:65:50 | input : InputStream | A.java:65:24:65:51 | new InputStreamReader(...) | +| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:65:24:65:51 | new InputStreamReader(...) | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:71:26:71:30 | input | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:72:30:72:34 | input | -| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:73:50:73:54 | input : InputStream | +| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:73:28:73:55 | new InputStreamReader(...) | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:74:24:74:28 | input | -| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:75:46:75:50 | input : InputStream | -| A.java:73:50:73:54 | input : InputStream | A.java:73:28:73:55 | new InputStreamReader(...) | -| A.java:75:46:75:50 | input : InputStream | A.java:75:24:75:51 | new InputStreamReader(...) | +| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:75:24:75:51 | new InputStreamReader(...) | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:91:26:91:30 | input | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:92:30:92:34 | input | -| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:93:50:93:54 | input : InputStream | +| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:93:28:93:55 | new InputStreamReader(...) | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:94:24:94:28 | input | -| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:95:46:95:50 | input : InputStream | -| A.java:93:50:93:54 | input : InputStream | A.java:93:28:93:55 | new InputStreamReader(...) | -| A.java:95:46:95:50 | input : InputStream | A.java:95:24:95:51 | new InputStreamReader(...) | +| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:95:24:95:51 | new InputStreamReader(...) | | B.java:7:31:7:51 | getInputStream(...) : InputStream | B.java:8:29:8:39 | inputStream | -| B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:14:5:14:15 | inputStream : InputStream | -| B.java:14:5:14:15 | inputStream : InputStream | B.java:14:22:14:26 | bytes [post update] : byte[] | -| B.java:14:22:14:26 | bytes [post update] : byte[] | B.java:15:23:15:27 | bytes | -| B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:21:5:21:15 | inputStream : InputStream | -| B.java:21:5:21:15 | inputStream : InputStream | B.java:21:22:21:26 | bytes [post update] : byte[] | -| B.java:21:22:21:26 | bytes [post update] : byte[] | B.java:23:29:23:29 | s | -| B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:29:5:29:15 | inputStream : InputStream | -| B.java:29:5:29:15 | inputStream : InputStream | B.java:29:22:29:26 | bytes [post update] : byte[] | -| B.java:29:22:29:26 | bytes [post update] : byte[] | B.java:31:23:31:23 | s | +| B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:15:23:15:27 | bytes | +| B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:23:29:23:29 | s | +| B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:31:23:31:23 | s | | C.java:23:17:23:44 | getParameter(...) : String | C.java:24:13:24:16 | data | | C.java:23:17:23:44 | getParameter(...) : String | C.java:25:19:25:22 | data | | C.java:23:17:23:44 | getParameter(...) : String | C.java:26:25:26:28 | data | @@ -69,26 +46,15 @@ edges | C.java:84:27:84:54 | getParameter(...) : String | C.java:87:3:87:13 | burlapInput | | C.java:84:27:84:54 | getParameter(...) : String | C.java:91:3:91:14 | burlapInput1 | | TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | -| TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | -| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | nodes | A.java:13:31:13:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | -| A.java:14:50:14:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:15:12:15:13 | in | semmle.label | in | | A.java:19:31:19:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | -| A.java:20:50:20:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:21:12:21:13 | in | semmle.label | in | | A.java:25:31:25:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | semmle.label | new XMLDecoder(...) : XMLDecoder | -| A.java:26:35:26:45 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:27:12:27:12 | d | semmle.label | d | | A.java:32:31:32:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | -| A.java:33:43:33:53 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:34:23:34:28 | reader | semmle.label | reader | -| A.java:39:19:39:50 | new Input(...) : Input | semmle.label | new Input(...) : Input | | A.java:39:29:39:49 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:40:28:40:32 | input | semmle.label | input | | A.java:41:34:41:38 | input | semmle.label | input | @@ -97,39 +63,27 @@ nodes | A.java:61:26:61:30 | input | semmle.label | input | | A.java:62:30:62:34 | input | semmle.label | input | | A.java:63:28:63:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:63:50:63:54 | input : InputStream | semmle.label | input : InputStream | | A.java:64:24:64:28 | input | semmle.label | input | | A.java:65:24:65:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:65:46:65:50 | input : InputStream | semmle.label | input : InputStream | | A.java:70:25:70:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:71:26:71:30 | input | semmle.label | input | | A.java:72:30:72:34 | input | semmle.label | input | | A.java:73:28:73:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:73:50:73:54 | input : InputStream | semmle.label | input : InputStream | | A.java:74:24:74:28 | input | semmle.label | input | | A.java:75:24:75:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:75:46:75:50 | input : InputStream | semmle.label | input : InputStream | | A.java:90:25:90:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:91:26:91:30 | input | semmle.label | input | | A.java:92:30:92:34 | input | semmle.label | input | | A.java:93:28:93:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:93:50:93:54 | input : InputStream | semmle.label | input : InputStream | | A.java:94:24:94:28 | input | semmle.label | input | | A.java:95:24:95:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | -| A.java:95:46:95:50 | input : InputStream | semmle.label | input : InputStream | | B.java:7:31:7:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | B.java:8:29:8:39 | inputStream | semmle.label | inputStream | | B.java:12:31:12:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| B.java:14:5:14:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | -| B.java:14:22:14:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:15:23:15:27 | bytes | semmle.label | bytes | | B.java:19:31:19:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| B.java:21:5:21:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | -| B.java:21:22:21:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:23:29:23:29 | s | semmle.label | s | | B.java:27:31:27:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | -| B.java:29:5:29:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | -| B.java:29:22:29:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:31:23:31:23 | s | semmle.label | s | | C.java:23:17:23:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | | C.java:24:13:24:16 | data | semmle.label | data | @@ -160,7 +114,6 @@ nodes | C.java:91:3:91:14 | burlapInput1 | semmle.label | burlapInput1 | | TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | semmle.label | entityStream : InputStream | | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | semmle.label | new ObjectInputStream(...) | -| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | semmle.label | entityStream : InputStream | #select | A.java:15:12:15:26 | readObject(...) | A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:15:12:15:13 | in | Unsafe deserialization of $@. | A.java:13:31:13:51 | getInputStream(...) | user input | | A.java:21:12:21:28 | readUnshared(...) | A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:21:12:21:13 | in | Unsafe deserialization of $@. | A.java:19:31:19:51 | getInputStream(...) | user input | From cc383e0f6a844d57167c3ffcc992d53b197b0b86 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 17 Jun 2021 09:43:36 +0200 Subject: [PATCH 1354/1662] Data flow: Workaround for too clever compiler in consistency queries --- .../cpp/dataflow/internal/DataFlowImplConsistency.qll | 8 +++++++- .../cpp/ir/dataflow/internal/DataFlowImplConsistency.qll | 8 +++++++- .../csharp/dataflow/internal/DataFlowImplConsistency.qll | 8 +++++++- .../java/dataflow/internal/DataFlowImplConsistency.qll | 8 +++++++- .../dataflow/new/internal/DataFlowImplConsistency.qll | 8 +++++++- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll index 4e1cd281488f..a55e65a81f69 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll @@ -168,7 +168,13 @@ module Consistency { msg = "ArgumentNode is missing PostUpdateNode." } - query predicate postWithInFlow(PostUpdateNode n, string msg) { + // This predicate helps the compiler forget that in some languages + // it is impossible for a `PostUpdateNode` to be the target of + // `simpleLocalFlowStep`. + private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() } + + query predicate postWithInFlow(Node n, string msg) { + isPostUpdateNode(n) and simpleLocalFlowStep(_, n) and msg = "PostUpdateNode should not be the target of local flow." } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll index 4e1cd281488f..a55e65a81f69 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll @@ -168,7 +168,13 @@ module Consistency { msg = "ArgumentNode is missing PostUpdateNode." } - query predicate postWithInFlow(PostUpdateNode n, string msg) { + // This predicate helps the compiler forget that in some languages + // it is impossible for a `PostUpdateNode` to be the target of + // `simpleLocalFlowStep`. + private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() } + + query predicate postWithInFlow(Node n, string msg) { + isPostUpdateNode(n) and simpleLocalFlowStep(_, n) and msg = "PostUpdateNode should not be the target of local flow." } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll index 4e1cd281488f..a55e65a81f69 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplConsistency.qll @@ -168,7 +168,13 @@ module Consistency { msg = "ArgumentNode is missing PostUpdateNode." } - query predicate postWithInFlow(PostUpdateNode n, string msg) { + // This predicate helps the compiler forget that in some languages + // it is impossible for a `PostUpdateNode` to be the target of + // `simpleLocalFlowStep`. + private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() } + + query predicate postWithInFlow(Node n, string msg) { + isPostUpdateNode(n) and simpleLocalFlowStep(_, n) and msg = "PostUpdateNode should not be the target of local flow." } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll index 4e1cd281488f..a55e65a81f69 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll @@ -168,7 +168,13 @@ module Consistency { msg = "ArgumentNode is missing PostUpdateNode." } - query predicate postWithInFlow(PostUpdateNode n, string msg) { + // This predicate helps the compiler forget that in some languages + // it is impossible for a `PostUpdateNode` to be the target of + // `simpleLocalFlowStep`. + private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() } + + query predicate postWithInFlow(Node n, string msg) { + isPostUpdateNode(n) and simpleLocalFlowStep(_, n) and msg = "PostUpdateNode should not be the target of local flow." } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll index 4e1cd281488f..a55e65a81f69 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplConsistency.qll @@ -168,7 +168,13 @@ module Consistency { msg = "ArgumentNode is missing PostUpdateNode." } - query predicate postWithInFlow(PostUpdateNode n, string msg) { + // This predicate helps the compiler forget that in some languages + // it is impossible for a `PostUpdateNode` to be the target of + // `simpleLocalFlowStep`. + private predicate isPostUpdateNode(Node n) { n instanceof PostUpdateNode or none() } + + query predicate postWithInFlow(Node n, string msg) { + isPostUpdateNode(n) and simpleLocalFlowStep(_, n) and msg = "PostUpdateNode should not be the target of local flow." } From ffb2350a54058f2df1803d7bb03610c47558f2a8 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 17 Jun 2021 10:02:31 +0200 Subject: [PATCH 1355/1662] Data flow: Fix `getLocalCallContext` join-order --- cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll | 4 ++-- .../src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll | 4 ++-- .../src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll | 4 ++-- .../src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll | 4 ++-- .../semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll | 4 ++-- .../src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 4 ++-- .../semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 4 ++-- .../semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 4 ++-- .../semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 4 ++-- .../src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll | 4 ++-- .../semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll | 4 ++-- .../semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll | 4 ++-- .../semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll | 4 ++-- .../semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll | 4 ++-- .../src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll | 4 ++-- .../src/semmle/python/dataflow/new/internal/DataFlowImpl.qll | 4 ++-- .../src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll | 4 ++-- .../src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll | 4 ++-- .../src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll | 4 ++-- 24 files changed, 48 insertions(+), 48 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..3721374f320c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..3721374f320c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..3721374f320c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..3721374f320c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..3721374f320c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 9b14db7ef882..3721374f320c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 9b14db7ef882..3721374f320c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 9b14db7ef882..3721374f320c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 9b14db7ef882..3721374f320c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 9b14db7ef882..3721374f320c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 9b14db7ef882..3721374f320c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -2220,7 +2220,7 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(node)) + result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3255,7 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_out](cc), getNodeEnclosingCallable(midnode)) and + localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and From 0987425f9469588ef8afa7183e3a7e35d7b93e52 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 17 Jun 2021 06:40:25 +0100 Subject: [PATCH 1356/1662] Reinstate failing tests with MISSING: prefix --- .../ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java | 4 ++-- java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java index 997ffab5ebb9..0a8cf67f2292 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java @@ -160,12 +160,12 @@ public MyAbstractMultivaluedMapJak(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMapJak(map1); - // sink(amm1.keySet().iterator().next()); // $hasValueFlow + sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMapJak(map2); - // sink(amm2.get("key").get(0)); // $hasValueFlow + sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow } void testMultivaluedHashMap(Map map1, Map map2, diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java index 17390344a14b..91d1b384d379 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java @@ -160,12 +160,12 @@ public MyAbstractMultivaluedMap(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMap(map1); - sink(amm1.keySet().iterator().next()); // $hasValueFlow + sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMap(map2); - sink(amm2.get("key").get(0)); // $hasValueFlow + sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow } void testMultivaluedHashMap(Map map1, Map map2, From 558813acf77edf1f876de95c17b71f801b51498c Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 09:44:39 +0100 Subject: [PATCH 1357/1662] Inline expectation tests: accept // $MISSING: and // $SPURIOUS: Previously there had to be a space after the $ token, unlike ordinary expectations (i.e., // $xss was already accepted) --- cpp/ql/test/TestUtilities/InlineExpectationsTest.qll | 4 ++-- java/ql/test/TestUtilities/InlineExpectationsTest.qll | 4 ++-- python/ql/test/TestUtilities/InlineExpectationsTest.qll | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll b/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll index e086b8104787..d351bac89a82 100644 --- a/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/cpp/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) { min(string name, int cand | exists(TNamedColumn(name)) and cand = content.indexOf(name + ":") and - cand > start + cand >= start | cand ) or not exists(string name | exists(TNamedColumn(name)) and - content.indexOf(name + ":") > start + content.indexOf(name + ":") >= start ) and result = content.length() } diff --git a/java/ql/test/TestUtilities/InlineExpectationsTest.qll b/java/ql/test/TestUtilities/InlineExpectationsTest.qll index e086b8104787..d351bac89a82 100644 --- a/java/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/java/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) { min(string name, int cand | exists(TNamedColumn(name)) and cand = content.indexOf(name + ":") and - cand > start + cand >= start | cand ) or not exists(string name | exists(TNamedColumn(name)) and - content.indexOf(name + ":") > start + content.indexOf(name + ":") >= start ) and result = content.length() } diff --git a/python/ql/test/TestUtilities/InlineExpectationsTest.qll b/python/ql/test/TestUtilities/InlineExpectationsTest.qll index e086b8104787..d351bac89a82 100644 --- a/python/ql/test/TestUtilities/InlineExpectationsTest.qll +++ b/python/ql/test/TestUtilities/InlineExpectationsTest.qll @@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) { min(string name, int cand | exists(TNamedColumn(name)) and cand = content.indexOf(name + ":") and - cand > start + cand >= start | cand ) or not exists(string name | exists(TNamedColumn(name)) and - content.indexOf(name + ":") > start + content.indexOf(name + ":") >= start ) and result = content.length() } From b9bc1f978ce8f18cc48b1414ec401e9696e13951 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 17 Jun 2021 10:04:15 +0100 Subject: [PATCH 1358/1662] Update style of inline expectation comments --- .../frameworks/JaxWs/JakartaRs1.java | 132 ++--- .../frameworks/JaxWs/JakartaRs2.java | 82 +-- .../frameworks/JaxWs/JakartaRsFlow.java | 478 +++++++++--------- .../frameworks/JaxWs/JaxRs1.java | 132 ++--- .../frameworks/JaxWs/JaxRs2.java | 82 +-- .../frameworks/JaxWs/JaxRsFlow.java | 478 +++++++++--------- .../frameworks/JaxWs/JaxWsEndpoint.java | 18 +- 7 files changed, 701 insertions(+), 701 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java index 40380f8913a7..271f3594eb0c 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java @@ -25,75 +25,75 @@ import jakarta.ws.rs.ext.MessageBodyReader; @Path("") -public class JakartaRs1 { // $RootResourceClass - public JakartaRs1() { // $InjectableConstructor +public class JakartaRs1 { // $ RootResourceClass + public JakartaRs1() { // $ InjectableConstructor } @GET - int Get() { // $ResourceMethod $ResourceMethodOnResourceClass - return 0; // $XssSink + int Get() { // $ ResourceMethod ResourceMethodOnResourceClass + return 0; // $ XssSink } @POST - void Post() { // $ResourceMethod $ResourceMethodOnResourceClass + void Post() { // $ ResourceMethod ResourceMethodOnResourceClass } - @Produces("text/plain") // $ProducesAnnotation=text/plain + @Produces("text/plain") // $ ProducesAnnotation=text/plain @DELETE - double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass - return 0.0; // $XssSink + double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass + return 0.0; // $ XssSink } - @Produces(MediaType.TEXT_HTML) // $ProducesAnnotation=text/html + @Produces(MediaType.TEXT_HTML) // $ ProducesAnnotation=text/html @PUT - void Put() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass + void Put() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass } @OPTIONS - void Options() { // $ResourceMethod $ResourceMethodOnResourceClass + void Options() { // $ ResourceMethod ResourceMethodOnResourceClass } @HEAD - void Head() { // $ResourceMethod $ResourceMethodOnResourceClass + void Head() { // $ ResourceMethod ResourceMethodOnResourceClass } @Path("") - NonRootResourceClassJakarta subResourceLocator() { // $SubResourceLocator + NonRootResourceClassJakarta subResourceLocator() { // $ SubResourceLocator return null; } - public class NonRootResourceClassJakarta { // $NonRootResourceClass + public class NonRootResourceClassJakarta { // $ NonRootResourceClass @GET - int Get() { // $ResourceMethod $ResourceMethodOnResourceClass - return 0; // $XssSink + int Get() { // $ ResourceMethod ResourceMethodOnResourceClass + return 0; // $ XssSink } - @Produces("text/html") // $ProducesAnnotation=text/html + @Produces("text/html") // $ ProducesAnnotation=text/html @POST - boolean Post() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass + boolean Post() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass return false; } - @Produces(MediaType.TEXT_PLAIN) // $ProducesAnnotation=text/plain + @Produces(MediaType.TEXT_PLAIN) // $ ProducesAnnotation=text/plain @DELETE - double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass - return 0.0; // $XssSink + double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass + return 0.0; // $ XssSink } @Path("") - AnotherNonRootResourceClassJakarta subResourceLocator1() { // $SubResourceLocator + AnotherNonRootResourceClassJakarta subResourceLocator1() { // $ SubResourceLocator return null; } @GET @Path("") - NotAResourceClass1Jakarta NotASubResourceLocator1() { // $ResourceMethod $ResourceMethodOnResourceClass - return null; // $XssSink + NotAResourceClass1Jakarta NotASubResourceLocator1() { // $ ResourceMethod ResourceMethodOnResourceClass + return null; // $ XssSink } @GET - NotAResourceClass2Jakarta NotASubResourceLocator2() { // $ResourceMethod $ResourceMethodOnResourceClass - return null; // $XssSink + NotAResourceClass2Jakarta NotASubResourceLocator2() { // $ ResourceMethod ResourceMethodOnResourceClass + return null; // $ XssSink } NotAResourceClass2Jakarta NotASubResourceLocator3() { @@ -102,50 +102,50 @@ NotAResourceClass2Jakarta NotASubResourceLocator3() { } } -class AnotherNonRootResourceClassJakarta { // $NonRootResourceClass +class AnotherNonRootResourceClassJakarta { // $ NonRootResourceClass public AnotherNonRootResourceClassJakarta() { } public AnotherNonRootResourceClassJakarta( - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } @Path("") - public void resourceMethodWithBeanParamParameter(@BeanParam FooJakarta FooJakarta) { // $SubResourceLocator $InjectionAnnotation + public void resourceMethodWithBeanParamParameter(@BeanParam FooJakarta FooJakarta) { // $ SubResourceLocator InjectionAnnotation } } class FooJakarta { - FooJakarta() { // $BeanParamConstructor + FooJakarta() { // $ BeanParamConstructor } - public FooJakarta( // $BeanParamConstructor - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + public FooJakarta( // $ BeanParamConstructor + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } public FooJakarta( - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, // $InjectionAnnotation + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context, // $ InjectionAnnotation int paramWithoutAnnotation) { } } @@ -158,58 +158,58 @@ class NotAResourceClass2Jakarta { class ExtendsJakartaRs1 extends JakartaRs1 { @Override - int Get() { // $ResourceMethod + int Get() { // $ ResourceMethod return 1; } @Override - @QueryParam("") // $InjectionAnnotation + @QueryParam("") // $ InjectionAnnotation void Post() { } @Override - double Delete() { // $ResourceMethod=text/plain + double Delete() { // $ ResourceMethod=text/plain return 1.0; } @Override - void Put() { // $ResourceMethod=text/html + void Put() { // $ ResourceMethod=text/html } - @Produces("application/json") // $ProducesAnnotation=application/json + @Produces("application/json") // $ ProducesAnnotation=application/json @Override void Options() { } - @Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml + @Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml @Override void Head() { } } -@Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml +@Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml class ExtendsJakartaRs1WithProducesAnnotation extends JakartaRs1 { @Override - int Get() { // $ResourceMethod=text/xml + int Get() { // $ ResourceMethod=text/xml return 2; } @Override - @QueryParam("") // $InjectionAnnotation + @QueryParam("") // $ InjectionAnnotation void Post() { } @Override - double Delete() { // $ResourceMethod=text/plain + double Delete() { // $ ResourceMethod=text/plain return 2.0; } @Override - void Put() { // $ResourceMethod=text/html + void Put() { // $ ResourceMethod=text/html } @Override - void Options() { // $ResourceMethod=text/xml + void Options() { // $ ResourceMethod=text/xml } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java index bfd7b1471811..26537bae815b 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java @@ -25,48 +25,48 @@ import jakarta.ws.rs.ext.MessageBodyReader; @Path("") -class JakartaRs2 { // $RootResourceClass +class JakartaRs2 { // $ RootResourceClass JakartaRs2() { } - public JakartaRs2(// $InjectableConstructor - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + public JakartaRs2(// $ InjectableConstructor + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } - public JakartaRs2(@BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, // $InjectionAnnotation + public JakartaRs2(@BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context, // $ InjectionAnnotation int paramWithoutAnnotation) { } - @BeanParam // $InjectionAnnotation - int beanField; // $InjectableField - @CookieParam("") // $InjectionAnnotation - int cookieField; // $InjectableField - @FormParam("") // $InjectionAnnotation - int formField; // $InjectableField - @HeaderParam("") // $InjectionAnnotation - int headerField; // $InjectableField - @MatrixParam("") // $InjectionAnnotation - int matrixField; // $InjectableField - @PathParam("") // $InjectionAnnotation - int pathField; // $InjectableField - @QueryParam("") // $InjectionAnnotation - int queryField; // $InjectableField - @Context // $InjectionAnnotation - int context; // $InjectableField + @BeanParam // $ InjectionAnnotation + int beanField; // $ InjectableField + @CookieParam("") // $ InjectionAnnotation + int cookieField; // $ InjectableField + @FormParam("") // $ InjectionAnnotation + int formField; // $ InjectableField + @HeaderParam("") // $ InjectionAnnotation + int headerField; // $ InjectableField + @MatrixParam("") // $ InjectionAnnotation + int matrixField; // $ InjectableField + @PathParam("") // $ InjectionAnnotation + int pathField; // $ InjectableField + @QueryParam("") // $ InjectionAnnotation + int queryField; // $ InjectableField + @Context // $ InjectionAnnotation + int context; // $ InjectableField int fieldWithoutAnnotation; } @@ -85,14 +85,14 @@ public Object readFrom(Class aClass, Type type, Annotation[] annotations, MediaT } class MiscellaneousJakarta { - @Consumes("") // $ConsumesAnnotation + @Consumes("") // $ ConsumesAnnotation public static void miscellaneousJakarta() throws IOException { - Response.ResponseBuilder responseBuilder = Response.accepted(); // $ResponseBuilderDeclaration - Response response = responseBuilder.build(); // $ResponseDeclaration - Client client; // $ClientDeclaration - MessageBodyReader messageBodyReader = null; // $MessageBodyReaderDeclaration - messageBodyReader.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadFromCall $MessageBodyReaderReadCall + Response.ResponseBuilder responseBuilder = Response.accepted(); // $ ResponseBuilderDeclaration + Response response = responseBuilder.build(); // $ ResponseDeclaration + Client client; // $ ClientDeclaration + MessageBodyReader messageBodyReader = null; // $ MessageBodyReaderDeclaration + messageBodyReader.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadFromCall MessageBodyReaderReadCall CustomUnmarshallerJakarta CustomUnmarshallerJakarta = null; - CustomUnmarshallerJakarta.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadCall + CustomUnmarshallerJakarta.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadCall } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java index 0a8cf67f2292..f534e59b8542 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java @@ -71,84 +71,84 @@ private static class UriSource { void sink(Object o) {} void testResponse() { - sink(Response.accepted(taint())); // $hasTaintFlow - sink(Response.fromResponse(ResponseSource.taint())); // $hasTaintFlow - sink(Response.ok(taint())); // $hasTaintFlow - sink(Response.ok(taint(), new MediaType())); // $hasTaintFlow - sink(Response.ok(taint(), "type")); // $hasTaintFlow - sink(Response.ok(taint(), new Variant(new MediaType(), "", ""))); // $hasTaintFlow + sink(Response.accepted(taint())); // $ hasTaintFlow + sink(Response.fromResponse(ResponseSource.taint())); // $ hasTaintFlow + sink(Response.ok(taint())); // $ hasTaintFlow + sink(Response.ok(taint(), new MediaType())); // $ hasTaintFlow + sink(Response.ok(taint(), "type")); // $ hasTaintFlow + sink(Response.ok(taint(), new Variant(new MediaType(), "", ""))); // $ hasTaintFlow } void testResponseBuilder(MultivaluedMap multivaluedMap, List list) throws Exception { - sink(ResponseBuilderSource.taint().build()); // $hasTaintFlow - sink(Response.noContent().entity(taint())); // $hasTaintFlow - sink(ResponseBuilderSource.taint().allow(new HashSet())); // $hasValueFlow - sink(ResponseBuilderSource.taint().cacheControl(new CacheControl())); // $hasValueFlow - sink(ResponseBuilderSource.taint().clone()); // $hasTaintFlow - sink(ResponseBuilderSource.taint().contentLocation(new URI(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().cookie()); // $hasValueFlow - sink(ResponseBuilderSource.taint().encoding("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().entity("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().expires(new Date())); // $hasValueFlow - sink(ResponseBuilderSource.taint().header("", "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().language("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().lastModified(new Date())); // $hasValueFlow - sink(ResponseBuilderSource.taint().link("", "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().link(new URI(""), "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().links()); // $hasValueFlow - sink(ResponseBuilderSource.taint().location(new URI(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().replaceAll(multivaluedMap)); // $hasValueFlow - sink(ResponseBuilderSource.taint().status(400)); // $hasValueFlow - sink(ResponseBuilderSource.taint().tag(new EntityTag(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().tag("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().type("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().variant(new Variant(new MediaType(), "", ""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().variants(list)); // $hasValueFlow - sink(ResponseBuilderSource.taint().variants()); // $hasValueFlow + sink(ResponseBuilderSource.taint().build()); // $ hasTaintFlow + sink(Response.noContent().entity(taint())); // $ hasTaintFlow + sink(ResponseBuilderSource.taint().allow(new HashSet())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().cacheControl(new CacheControl())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().clone()); // $ hasTaintFlow + sink(ResponseBuilderSource.taint().contentLocation(new URI(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().cookie()); // $ hasValueFlow + sink(ResponseBuilderSource.taint().encoding("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().entity("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().expires(new Date())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().header("", "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().language("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().lastModified(new Date())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().link("", "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().link(new URI(""), "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().links()); // $ hasValueFlow + sink(ResponseBuilderSource.taint().location(new URI(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().replaceAll(multivaluedMap)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().status(400)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().tag(new EntityTag(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().tag("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().type("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variant(new Variant(new MediaType(), "", ""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variants(list)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variants()); // $ hasValueFlow } void testHttpHeaders(HttpHeaders h) { - sink(taint(h).getAcceptableLanguages()); // $hasTaintFlow - sink(taint(h).getAcceptableMediaTypes()); // $hasTaintFlow - sink(taint(h).getCookies()); // $hasTaintFlow - sink(taint(h).getHeaderString("")); // $hasTaintFlow - sink(taint(h).getLanguage()); // $hasTaintFlow - sink(taint(h).getMediaType()); // $hasTaintFlow - sink(taint(h).getRequestHeader("")); // $hasTaintFlow - sink(taint(h).getRequestHeaders()); // $hasTaintFlow + sink(taint(h).getAcceptableLanguages()); // $ hasTaintFlow + sink(taint(h).getAcceptableMediaTypes()); // $ hasTaintFlow + sink(taint(h).getCookies()); // $ hasTaintFlow + sink(taint(h).getHeaderString("")); // $ hasTaintFlow + sink(taint(h).getLanguage()); // $ hasTaintFlow + sink(taint(h).getMediaType()); // $ hasTaintFlow + sink(taint(h).getRequestHeader("")); // $ hasTaintFlow + sink(taint(h).getRequestHeaders()); // $ hasTaintFlow } void testMultivaluedMapAdd(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.add(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.add("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow } void testMultivaluedMapAddAll(MultivaluedMap mm1, MultivaluedMap mm2, MultivaluedMap mm3) { mm1.addAll(taint(), "a", "b"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow List l = new ArrayList(); l.add(taint()); mm2.addAll("key", l); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow mm3.addAll("key", "a", taint()); - sink(mm3.get("key").get(0)); // $hasValueFlow + sink(mm3.get("key").get(0)); // $ hasValueFlow } void testMultivaluedMapAddFirst(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.addFirst(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.addFirst("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow - sink(mm2.getFirst("key")); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow + sink(mm2.getFirst("key")); // $ hasValueFlow } void testMultivaluedMapputSingle(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.putSingle(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.putSingle("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow } class MyAbstractMultivaluedMapJak extends AbstractMultivaluedMap { @@ -160,248 +160,248 @@ public MyAbstractMultivaluedMapJak(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMapJak(map1); - sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow + sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMapJak(map2); - sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow + sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow } void testMultivaluedHashMap(Map map1, Map map2, MultivaluedMap mm1, MultivaluedMap mm2) { map1.put(taint(), "value"); MultivaluedHashMap mhm1 = new MultivaluedHashMap(map1); - sink(mhm1.keySet().iterator().next()); // $hasValueFlow + sink(mhm1.keySet().iterator().next()); // $ hasValueFlow map2.put("key", taint()); MultivaluedHashMap mhm2 = new MultivaluedHashMap(map2); - sink(mhm2.get("key").get(0)); // $hasValueFlow + sink(mhm2.get("key").get(0)); // $ hasValueFlow mm1.add(taint(), "value"); MultivaluedHashMap mhm3 = new MultivaluedHashMap(mm1); - sink(mhm3.keySet().iterator().next()); // $hasValueFlow + sink(mhm3.keySet().iterator().next()); // $ hasValueFlow mm2.add("key", taint()); MultivaluedHashMap mhm4 = new MultivaluedHashMap(mm2); - sink(mhm4.get("key").get(0)); // $hasValueFlow + sink(mhm4.get("key").get(0)); // $ hasValueFlow } void testPathSegment(PathSegment ps1, PathSegment ps2) { - sink(taint(ps1).getMatrixParameters()); // $hasTaintFlow - sink(taint(ps2).getPath()); // $hasTaintFlow + sink(taint(ps1).getMatrixParameters()); // $ hasTaintFlow + sink(taint(ps2).getPath()); // $ hasTaintFlow } void testUriInfo(UriInfo ui1, UriInfo ui2, UriInfo ui3, UriInfo ui4, UriInfo ui5) { - sink(taint(ui1).getPathParameters()); // $hasTaintFlow - sink(taint(ui2).getPathSegments()); // $hasTaintFlow - sink(taint(ui2).getQueryParameters()); // $hasTaintFlow - sink(taint(ui2).getRequestUri()); // $hasTaintFlow - sink(taint(ui2).getRequestUriBuilder()); // $hasTaintFlow + sink(taint(ui1).getPathParameters()); // $ hasTaintFlow + sink(taint(ui2).getPathSegments()); // $ hasTaintFlow + sink(taint(ui2).getQueryParameters()); // $ hasTaintFlow + sink(taint(ui2).getRequestUri()); // $ hasTaintFlow + sink(taint(ui2).getRequestUriBuilder()); // $ hasTaintFlow } void testCookie() { - sink(new Cookie(taint(), "", "", "", 0)); // $hasTaintFlow - sink(new Cookie("", taint(), "", "", 0)); // $hasTaintFlow - sink(new Cookie("", "", taint(), "", 0)); // $hasTaintFlow - sink(new Cookie("", "", "", taint(), 0)); // $hasTaintFlow - sink(new Cookie("", "", "", "", IntSource.taint())); // $hasTaintFlow - sink(new Cookie(taint(), "", "", "")); // $hasTaintFlow - sink(new Cookie("", taint(), "", "")); // $hasTaintFlow - sink(new Cookie("", "", taint(), "")); // $hasTaintFlow - sink(new Cookie("", "", "", taint())); // $hasTaintFlow - sink(new Cookie(taint(), "")); // $hasTaintFlow - sink(new Cookie("", taint())); // $hasTaintFlow - sink(Cookie.valueOf(taint())); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getDomain()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getName()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getPath()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getValue()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getVersion()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).toString()); // $hasTaintFlow + sink(new Cookie(taint(), "", "", "", 0)); // $ hasTaintFlow + sink(new Cookie("", taint(), "", "", 0)); // $ hasTaintFlow + sink(new Cookie("", "", taint(), "", 0)); // $ hasTaintFlow + sink(new Cookie("", "", "", taint(), 0)); // $ hasTaintFlow + sink(new Cookie("", "", "", "", IntSource.taint())); // $ hasTaintFlow + sink(new Cookie(taint(), "", "", "")); // $ hasTaintFlow + sink(new Cookie("", taint(), "", "")); // $ hasTaintFlow + sink(new Cookie("", "", taint(), "")); // $ hasTaintFlow + sink(new Cookie("", "", "", taint())); // $ hasTaintFlow + sink(new Cookie(taint(), "")); // $ hasTaintFlow + sink(new Cookie("", taint())); // $ hasTaintFlow + sink(Cookie.valueOf(taint())); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getDomain()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getName()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getPath()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getValue()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getVersion()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).toString()); // $ hasTaintFlow } void testNewCookie() { - sink(new NewCookie(Cookie.valueOf(taint()))); // $hasTaintFlow - - sink(new NewCookie(Cookie.valueOf(taint()), "", 0, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(Cookie.valueOf(taint()), "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), taint(), 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, DateSource.taint(), false, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), BooleanSource.taint(), false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), true, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "")); // $hasTaintFlow - sink(new NewCookie("", taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", 0, "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", 0, "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", 0, "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), 0, "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", 0, "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", 0, "", 0, new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", 0, "", 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), 0, "", 0, new Date(), false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, taint(), 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, DateSource.taint(), false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), BooleanSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), false, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", "", 0, true, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", "", 0, false, true)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", "", 0, true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), "", 0, false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", taint(), 0, true, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", IntSource.taint(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint(), false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, true, BooleanSource.taint())); // $hasTaintFlow - - sink(NewCookie.valueOf(taint()).getComment()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).getExpiry()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).getMaxAge()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).toCookie()); // $hasTaintFlow - sink(NewCookie.valueOf(taint())); // $hasTaintFlow + sink(new NewCookie(Cookie.valueOf(taint()))); // $ hasTaintFlow + + sink(new NewCookie(Cookie.valueOf(taint()), "", 0, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(Cookie.valueOf(taint()), "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), taint(), 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, DateSource.taint(), false, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), BooleanSource.taint(), false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), true, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "")); // $ hasTaintFlow + sink(new NewCookie("", taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", 0, "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", 0, "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", 0, "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), 0, "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", 0, "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", 0, "", 0, new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", 0, "", 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), 0, "", 0, new Date(), false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, taint(), 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, DateSource.taint(), false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), BooleanSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), false, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", "", 0, true, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", "", 0, false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", "", 0, true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), "", 0, false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", taint(), 0, true, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", IntSource.taint(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint(), false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, true, BooleanSource.taint())); // $ hasTaintFlow + + sink(NewCookie.valueOf(taint()).getComment()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).getExpiry()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).getMaxAge()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).toCookie()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint())); // $ hasTaintFlow } void testForm(MultivaluedMap mm1, MultivaluedMap mm2) { - sink(new Form(taint(), "")); // $hasTaintFlow - sink(new Form("", taint())); // $hasTaintFlow + sink(new Form(taint(), "")); // $ hasTaintFlow + sink(new Form("", taint())); // $ hasTaintFlow mm1.add(taint(), "value"); - sink(new Form(mm1)); // $hasTaintFlow + sink(new Form(mm1)); // $ hasTaintFlow mm2.add("key", taint()); - sink(new Form(mm2)); // $hasTaintFlow + sink(new Form(mm2)); // $ hasTaintFlow Form f1 = new Form(taint(), ""); - sink(f1.asMap()); // $hasTaintFlow + sink(f1.asMap()); // $ hasTaintFlow Form f2 = new Form(); - sink(f2.param(taint(), "b")); // $hasTaintFlow + sink(f2.param(taint(), "b")); // $ hasTaintFlow Form f3 = new Form(); - sink(f3.param("a", taint())); // $hasTaintFlow + sink(f3.param("a", taint())); // $ hasTaintFlow Form f4 = new Form(taint(), ""); - sink(f4.param("a", "b")); // $hasTaintFlow + sink(f4.param("a", "b")); // $ hasTaintFlow } void testGenericEntity() { Method m = DummyJakarta.class.getMethods()[0]; GenericEntity> ge = new GenericEntity>(SetStringSource.taint(), m.getGenericReturnType()); - sink(ge); // $hasTaintFlow - sink(ge.getEntity()); // $hasTaintFlow + sink(ge); // $ hasTaintFlow + sink(ge.getEntity()); // $ hasTaintFlow } void testMediaType(Map m) { - sink(new MediaType(taint(), "")); // $hasTaintFlow - sink(new MediaType("", taint())); // $hasTaintFlow - sink(new MediaType(taint(), "", m)); // $hasTaintFlow - sink(new MediaType("", taint(), m)); // $hasTaintFlow - sink(new MediaType("", "", taint(m))); // $hasTaintFlow - sink(new MediaType(taint(), "", "")); // $hasTaintFlow - sink(new MediaType("", taint(), "")); // $hasTaintFlow - sink(new MediaType("", "", taint())); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getParameters()); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getSubtype()); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getType()); // $hasTaintFlow - sink(MediaType.valueOf(taint())); // $hasTaintFlow + sink(new MediaType(taint(), "")); // $ hasTaintFlow + sink(new MediaType("", taint())); // $ hasTaintFlow + sink(new MediaType(taint(), "", m)); // $ hasTaintFlow + sink(new MediaType("", taint(), m)); // $ hasTaintFlow + sink(new MediaType("", "", taint(m))); // $ hasTaintFlow + sink(new MediaType(taint(), "", "")); // $ hasTaintFlow + sink(new MediaType("", taint(), "")); // $ hasTaintFlow + sink(new MediaType("", "", taint())); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getParameters()); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getSubtype()); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getType()); // $ hasTaintFlow + sink(MediaType.valueOf(taint())); // $ hasTaintFlow } void testUriBuilder() throws Exception { - sink(UriBuilder.fromPath("").build(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").build("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").build(taint(), false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").build("", taint(), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).build("")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).build("", false)); // $hasTaintFlow - - sink(UriBuilder.fromPath("").buildFromEncoded(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromEncoded("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromEncoded("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromEncodedMap(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromEncodedMap(new HashMap())); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromMap(taint(new HashMap()), false)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromMap(new HashMap(), true)); // $hasTaintFlow + sink(UriBuilder.fromPath("").build(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build(taint(), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build("", taint(), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).build("")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).build("", false)); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").buildFromEncoded(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromEncoded("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromEncoded("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromEncodedMap(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromEncodedMap(new HashMap())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromMap(taint(new HashMap()), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromMap(new HashMap(), true)); // $ hasTaintFlow - sink(UriBuilder.fromPath(taint()).clone()); // $hasTaintFlow - sink(UriBuilder.fromPath("").fragment(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).fragment("")); // $hasTaintFlow - sink(UriBuilder.fromLink(taint(Link.valueOf("")))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint())); // $hasTaintFlow - sink(UriBuilder.fromUri(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").host(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).host("")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").matrixParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").matrixParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).matrixParam("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").path(taint(DummyJakarta.class))); // $hasTaintFlow - sink(UriBuilder.fromPath("").path(DummyJakarta.class, taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).path(DummyJakarta.class)); // $hasTaintFlow - sink(UriBuilder.fromPath("").queryParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").queryParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).queryParam("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").replaceMatrix(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceMatrix("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceMatrixParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceMatrixParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceMatrixParam("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replacePath(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replacePath("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQuery(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceQuery("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQueryParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQueryParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceQueryParam("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").resolveTemplate(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate(taint(), "", false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate("", taint(), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplate("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplate("", "", false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplateFromEncoded(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplateFromEncoded("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplateFromEncoded("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap(), false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplatesFromEncoded(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplatesFromEncoded(new HashMap())); // $hasTaintFlow - - sink(UriBuilder.fromPath("").scheme(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).scheme("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").schemeSpecificPart(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).schemeSpecificPart("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").segment(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").segment("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).segment("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).toTemplate()); // $hasTaintFlow - - sink(UriBuilder.fromPath("").uri(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).uri("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").uri(UriSource.taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).uri(new URI(""))); // $hasTaintFlow - sink(UriBuilder.fromPath("").userInfo(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).userInfo("")); // $hasTaintFlow + sink(UriBuilder.fromPath(taint()).clone()); // $ hasTaintFlow + sink(UriBuilder.fromPath("").fragment(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).fragment("")); // $ hasTaintFlow + sink(UriBuilder.fromLink(taint(Link.valueOf("")))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint())); // $ hasTaintFlow + sink(UriBuilder.fromUri(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").host(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).host("")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").matrixParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").matrixParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).matrixParam("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").path(taint(DummyJakarta.class))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").path(DummyJakarta.class, taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).path(DummyJakarta.class)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").queryParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").queryParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).queryParam("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").replaceMatrix(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceMatrix("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceMatrixParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceMatrixParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceMatrixParam("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replacePath(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replacePath("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQuery(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceQuery("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQueryParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQueryParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceQueryParam("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").resolveTemplate(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate(taint(), "", false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate("", taint(), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplate("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplate("", "", false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplateFromEncoded(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplateFromEncoded("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplateFromEncoded("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap(), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplatesFromEncoded(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplatesFromEncoded(new HashMap())); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").scheme(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).scheme("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").schemeSpecificPart(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).schemeSpecificPart("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").segment(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").segment("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).segment("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).toTemplate()); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").uri(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).uri("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").uri(UriSource.taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).uri(new URI(""))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").userInfo(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).userInfo("")); // $ hasTaintFlow } } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java index e8acd4a05072..ba21f36069ba 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs1.java @@ -25,75 +25,75 @@ import javax.ws.rs.ext.MessageBodyReader; @Path("") -public class JaxRs1 { // $RootResourceClass - public JaxRs1() { // $InjectableConstructor +public class JaxRs1 { // $ RootResourceClass + public JaxRs1() { // $ InjectableConstructor } @GET - int Get() { // $ResourceMethod $ResourceMethodOnResourceClass - return 0; // $XssSink + int Get() { // $ ResourceMethod ResourceMethodOnResourceClass + return 0; // $ XssSink } @POST - void Post() { // $ResourceMethod $ResourceMethodOnResourceClass + void Post() { // $ ResourceMethod ResourceMethodOnResourceClass } - @Produces("text/plain") // $ProducesAnnotation=text/plain + @Produces("text/plain") // $ ProducesAnnotation=text/plain @DELETE - double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass - return 0.0; // $XssSink + double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass + return 0.0; // $ XssSink } - @Produces(MediaType.TEXT_HTML) // $ProducesAnnotation=text/html + @Produces(MediaType.TEXT_HTML) // $ ProducesAnnotation=text/html @PUT - void Put() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass + void Put() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass } @OPTIONS - void Options() { // $ResourceMethod $ResourceMethodOnResourceClass + void Options() { // $ ResourceMethod ResourceMethodOnResourceClass } @HEAD - void Head() { // $ResourceMethod $ResourceMethodOnResourceClass + void Head() { // $ ResourceMethod ResourceMethodOnResourceClass } @Path("") - NonRootResourceClass subResourceLocator() { // $SubResourceLocator + NonRootResourceClass subResourceLocator() { // $ SubResourceLocator return null; } - public class NonRootResourceClass { // $NonRootResourceClass + public class NonRootResourceClass { // $ NonRootResourceClass @GET - int Get() { // $ResourceMethod $ResourceMethodOnResourceClass - return 0; // $XssSink + int Get() { // $ ResourceMethod ResourceMethodOnResourceClass + return 0; // $ XssSink } - @Produces("text/html") // $ProducesAnnotation=text/html + @Produces("text/html") // $ ProducesAnnotation=text/html @POST - boolean Post() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass + boolean Post() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass return false; } - @Produces(MediaType.TEXT_PLAIN) // $ProducesAnnotation=text/plain + @Produces(MediaType.TEXT_PLAIN) // $ ProducesAnnotation=text/plain @DELETE - double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass - return 0.0; // $XssSink + double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass + return 0.0; // $ XssSink } @Path("") - AnotherNonRootResourceClass subResourceLocator1() { // $SubResourceLocator + AnotherNonRootResourceClass subResourceLocator1() { // $ SubResourceLocator return null; } @GET @Path("") - NotAResourceClass1 NotASubResourceLocator1() { // $ResourceMethod $ResourceMethodOnResourceClass - return null; // $XssSink + NotAResourceClass1 NotASubResourceLocator1() { // $ ResourceMethod ResourceMethodOnResourceClass + return null; // $ XssSink } @GET - NotAResourceClass2 NotASubResourceLocator2() { // $ResourceMethod $ResourceMethodOnResourceClass - return null; // $XssSink + NotAResourceClass2 NotASubResourceLocator2() { // $ ResourceMethod ResourceMethodOnResourceClass + return null; // $ XssSink } NotAResourceClass2 NotASubResourceLocator3() { @@ -102,50 +102,50 @@ NotAResourceClass2 NotASubResourceLocator3() { } } -class AnotherNonRootResourceClass { // $NonRootResourceClass +class AnotherNonRootResourceClass { // $ NonRootResourceClass public AnotherNonRootResourceClass() { } public AnotherNonRootResourceClass( - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } @Path("") - public void resourceMethodWithBeanParamParameter(@BeanParam Foo foo) { // $SubResourceLocator $InjectionAnnotation + public void resourceMethodWithBeanParamParameter(@BeanParam Foo foo) { // $ SubResourceLocator InjectionAnnotation } } class Foo { - Foo() { // $BeanParamConstructor + Foo() { // $ BeanParamConstructor } - public Foo( // $BeanParamConstructor - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + public Foo( // $ BeanParamConstructor + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } public Foo( - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, // $InjectionAnnotation + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context, // $ InjectionAnnotation int paramWithoutAnnotation) { } } @@ -158,58 +158,58 @@ class NotAResourceClass2 { class ExtendsJaxRs1 extends JaxRs1 { @Override - int Get() { // $ResourceMethod + int Get() { // $ ResourceMethod return 1; } @Override - @QueryParam("") // $InjectionAnnotation + @QueryParam("") // $ InjectionAnnotation void Post() { } @Override - double Delete() { // $ResourceMethod=text/plain + double Delete() { // $ ResourceMethod=text/plain return 1.0; } @Override - void Put() { // $ResourceMethod=text/html + void Put() { // $ ResourceMethod=text/html } - @Produces("application/json") // $ProducesAnnotation=application/json + @Produces("application/json") // $ ProducesAnnotation=application/json @Override void Options() { } - @Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml + @Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml @Override void Head() { } } -@Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml +@Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml class ExtendsJaxRs1WithProducesAnnotation extends JaxRs1 { @Override - int Get() { // $ResourceMethod=text/xml + int Get() { // $ ResourceMethod=text/xml return 2; } @Override - @QueryParam("") // $InjectionAnnotation + @QueryParam("") // $ InjectionAnnotation void Post() { } @Override - double Delete() { // $ResourceMethod=text/plain + double Delete() { // $ ResourceMethod=text/plain return 2.0; } @Override - void Put() { // $ResourceMethod=text/html + void Put() { // $ ResourceMethod=text/html } @Override - void Options() { // $ResourceMethod=text/xml + void Options() { // $ ResourceMethod=text/xml } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java index 5913d0b998e5..7fa0413e841f 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRs2.java @@ -25,49 +25,49 @@ import javax.ws.rs.ext.MessageBodyReader; @Path("") -class JaxRs2 { // $RootResourceClass +class JaxRs2 { // $ RootResourceClass JaxRs2() { } - public JaxRs2(// $InjectableConstructor - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context) { // $InjectionAnnotation + public JaxRs2(// $ InjectableConstructor + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context) { // $ InjectionAnnotation } public JaxRs2( - @BeanParam int beanParam, // $InjectionAnnotation - @CookieParam("") int cookieParam, // $InjectionAnnotation - @FormParam("") int formParam, // $InjectionAnnotation - @HeaderParam("") int headerParam, // $InjectionAnnotation - @MatrixParam("") int matrixParam, // $InjectionAnnotation - @PathParam("") int pathParam, // $InjectionAnnotation - @QueryParam("") int queryParam, // $InjectionAnnotation - @Context int context, // $InjectionAnnotation + @BeanParam int beanParam, // $ InjectionAnnotation + @CookieParam("") int cookieParam, // $ InjectionAnnotation + @FormParam("") int formParam, // $ InjectionAnnotation + @HeaderParam("") int headerParam, // $ InjectionAnnotation + @MatrixParam("") int matrixParam, // $ InjectionAnnotation + @PathParam("") int pathParam, // $ InjectionAnnotation + @QueryParam("") int queryParam, // $ InjectionAnnotation + @Context int context, // $ InjectionAnnotation int paramWithoutAnnotation) { } - @BeanParam // $InjectionAnnotation - int beanField; // $InjectableField - @CookieParam("") // $InjectionAnnotation - int cookieField; // $InjectableField - @FormParam("") // $InjectionAnnotation - int formField; // $InjectableField - @HeaderParam("") // $InjectionAnnotation - int headerField; // $InjectableField - @MatrixParam("") // $InjectionAnnotation - int matrixField; // $InjectableField - @PathParam("") // $InjectionAnnotation - int pathField; // $InjectableField - @QueryParam("") // $InjectionAnnotation - int queryField; // $InjectableField - @Context // $InjectionAnnotation - int context; // $InjectableField + @BeanParam // $ InjectionAnnotation + int beanField; // $ InjectableField + @CookieParam("") // $ InjectionAnnotation + int cookieField; // $ InjectableField + @FormParam("") // $ InjectionAnnotation + int formField; // $ InjectableField + @HeaderParam("") // $ InjectionAnnotation + int headerField; // $ InjectableField + @MatrixParam("") // $ InjectionAnnotation + int matrixField; // $ InjectableField + @PathParam("") // $ InjectionAnnotation + int pathField; // $ InjectableField + @QueryParam("") // $ InjectionAnnotation + int queryField; // $ InjectableField + @Context // $ InjectionAnnotation + int context; // $ InjectableField int fieldWithoutAnnotation; } @@ -86,14 +86,14 @@ public Object readFrom(Class aClass, Type type, Annotation[] annotations, MediaT } class Miscellaneous { - @Consumes("") // $ConsumesAnnotation + @Consumes("") // $ ConsumesAnnotation public static void miscellaneous() throws IOException { - Response.ResponseBuilder responseBuilder = Response.accepted(); // $ResponseBuilderDeclaration - Response response = responseBuilder.build(); // $ResponseDeclaration - Client client; // $ClientDeclaration - MessageBodyReader messageBodyReader = null; // $MessageBodyReaderDeclaration - messageBodyReader.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadFromCall $MessageBodyReaderReadCall + Response.ResponseBuilder responseBuilder = Response.accepted(); // $ ResponseBuilderDeclaration + Response response = responseBuilder.build(); // $ ResponseDeclaration + Client client; // $ ClientDeclaration + MessageBodyReader messageBodyReader = null; // $ MessageBodyReaderDeclaration + messageBodyReader.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadFromCall MessageBodyReaderReadCall CustomUnmarshaller customUnmarshaller = null; - customUnmarshaller.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadCall + customUnmarshaller.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadCall } } \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java index 91d1b384d379..eecc3e444c9d 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java @@ -71,84 +71,84 @@ private static class UriSource { void sink(Object o) {} void testResponse() { - sink(Response.accepted(taint())); // $hasTaintFlow - sink(Response.fromResponse(ResponseSource.taint())); // $hasTaintFlow - sink(Response.ok(taint())); // $hasTaintFlow - sink(Response.ok(taint(), new MediaType())); // $hasTaintFlow - sink(Response.ok(taint(), "type")); // $hasTaintFlow - sink(Response.ok(taint(), new Variant(new MediaType(), "", ""))); // $hasTaintFlow + sink(Response.accepted(taint())); // $ hasTaintFlow + sink(Response.fromResponse(ResponseSource.taint())); // $ hasTaintFlow + sink(Response.ok(taint())); // $ hasTaintFlow + sink(Response.ok(taint(), new MediaType())); // $ hasTaintFlow + sink(Response.ok(taint(), "type")); // $ hasTaintFlow + sink(Response.ok(taint(), new Variant(new MediaType(), "", ""))); // $ hasTaintFlow } void testResponseBuilder(MultivaluedMap multivaluedMap, List list) throws Exception { - sink(ResponseBuilderSource.taint().build()); // $hasTaintFlow - sink(Response.noContent().entity(taint())); // $hasTaintFlow - sink(ResponseBuilderSource.taint().allow(new HashSet())); // $hasValueFlow - sink(ResponseBuilderSource.taint().cacheControl(new CacheControl())); // $hasValueFlow - sink(ResponseBuilderSource.taint().clone()); // $hasTaintFlow - sink(ResponseBuilderSource.taint().contentLocation(new URI(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().cookie()); // $hasValueFlow - sink(ResponseBuilderSource.taint().encoding("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().entity("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().expires(new Date())); // $hasValueFlow - sink(ResponseBuilderSource.taint().header("", "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().language("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().lastModified(new Date())); // $hasValueFlow - sink(ResponseBuilderSource.taint().link("", "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().link(new URI(""), "")); // $hasValueFlow - sink(ResponseBuilderSource.taint().links()); // $hasValueFlow - sink(ResponseBuilderSource.taint().location(new URI(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().replaceAll(multivaluedMap)); // $hasValueFlow - sink(ResponseBuilderSource.taint().status(400)); // $hasValueFlow - sink(ResponseBuilderSource.taint().tag(new EntityTag(""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().tag("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().type("")); // $hasValueFlow - sink(ResponseBuilderSource.taint().variant(new Variant(new MediaType(), "", ""))); // $hasValueFlow - sink(ResponseBuilderSource.taint().variants(list)); // $hasValueFlow - sink(ResponseBuilderSource.taint().variants()); // $hasValueFlow + sink(ResponseBuilderSource.taint().build()); // $ hasTaintFlow + sink(Response.noContent().entity(taint())); // $ hasTaintFlow + sink(ResponseBuilderSource.taint().allow(new HashSet())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().cacheControl(new CacheControl())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().clone()); // $ hasTaintFlow + sink(ResponseBuilderSource.taint().contentLocation(new URI(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().cookie()); // $ hasValueFlow + sink(ResponseBuilderSource.taint().encoding("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().entity("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().expires(new Date())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().header("", "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().language("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().lastModified(new Date())); // $ hasValueFlow + sink(ResponseBuilderSource.taint().link("", "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().link(new URI(""), "")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().links()); // $ hasValueFlow + sink(ResponseBuilderSource.taint().location(new URI(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().replaceAll(multivaluedMap)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().status(400)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().tag(new EntityTag(""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().tag("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().type("")); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variant(new Variant(new MediaType(), "", ""))); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variants(list)); // $ hasValueFlow + sink(ResponseBuilderSource.taint().variants()); // $ hasValueFlow } void testHttpHeaders(HttpHeaders h) { - sink(taint(h).getAcceptableLanguages()); // $hasTaintFlow - sink(taint(h).getAcceptableMediaTypes()); // $hasTaintFlow - sink(taint(h).getCookies()); // $hasTaintFlow - sink(taint(h).getHeaderString("")); // $hasTaintFlow - sink(taint(h).getLanguage()); // $hasTaintFlow - sink(taint(h).getMediaType()); // $hasTaintFlow - sink(taint(h).getRequestHeader("")); // $hasTaintFlow - sink(taint(h).getRequestHeaders()); // $hasTaintFlow + sink(taint(h).getAcceptableLanguages()); // $ hasTaintFlow + sink(taint(h).getAcceptableMediaTypes()); // $ hasTaintFlow + sink(taint(h).getCookies()); // $ hasTaintFlow + sink(taint(h).getHeaderString("")); // $ hasTaintFlow + sink(taint(h).getLanguage()); // $ hasTaintFlow + sink(taint(h).getMediaType()); // $ hasTaintFlow + sink(taint(h).getRequestHeader("")); // $ hasTaintFlow + sink(taint(h).getRequestHeaders()); // $ hasTaintFlow } void testMultivaluedMapAdd(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.add(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.add("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow } void testMultivaluedMapAddAll(MultivaluedMap mm1, MultivaluedMap mm2, MultivaluedMap mm3) { mm1.addAll(taint(), "a", "b"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow List l = new ArrayList(); l.add(taint()); mm2.addAll("key", l); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow mm3.addAll("key", "a", taint()); - sink(mm3.get("key").get(0)); // $hasValueFlow + sink(mm3.get("key").get(0)); // $ hasValueFlow } void testMultivaluedMapAddFirst(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.addFirst(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.addFirst("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow - sink(mm2.getFirst("key")); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow + sink(mm2.getFirst("key")); // $ hasValueFlow } void testMultivaluedMapputSingle(MultivaluedMap mm1, MultivaluedMap mm2) { mm1.putSingle(taint(), "value"); - sink(mm1.keySet().iterator().next()); // $hasValueFlow + sink(mm1.keySet().iterator().next()); // $ hasValueFlow mm2.putSingle("key", taint()); - sink(mm2.get("key").get(0)); // $hasValueFlow + sink(mm2.get("key").get(0)); // $ hasValueFlow } class MyAbstractMultivaluedMap extends AbstractMultivaluedMap { @@ -160,248 +160,248 @@ public MyAbstractMultivaluedMap(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMap(map1); - sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow + sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMap(map2); - sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow + sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow } void testMultivaluedHashMap(Map map1, Map map2, MultivaluedMap mm1, MultivaluedMap mm2) { map1.put(taint(), "value"); MultivaluedHashMap mhm1 = new MultivaluedHashMap(map1); - sink(mhm1.keySet().iterator().next()); // $hasValueFlow + sink(mhm1.keySet().iterator().next()); // $ hasValueFlow map2.put("key", taint()); MultivaluedHashMap mhm2 = new MultivaluedHashMap(map2); - sink(mhm2.get("key").get(0)); // $hasValueFlow + sink(mhm2.get("key").get(0)); // $ hasValueFlow mm1.add(taint(), "value"); MultivaluedHashMap mhm3 = new MultivaluedHashMap(mm1); - sink(mhm3.keySet().iterator().next()); // $hasValueFlow + sink(mhm3.keySet().iterator().next()); // $ hasValueFlow mm2.add("key", taint()); MultivaluedHashMap mhm4 = new MultivaluedHashMap(mm2); - sink(mhm4.get("key").get(0)); // $hasValueFlow + sink(mhm4.get("key").get(0)); // $ hasValueFlow } void testPathSegment(PathSegment ps1, PathSegment ps2) { - sink(taint(ps1).getMatrixParameters()); // $hasTaintFlow - sink(taint(ps2).getPath()); // $hasTaintFlow + sink(taint(ps1).getMatrixParameters()); // $ hasTaintFlow + sink(taint(ps2).getPath()); // $ hasTaintFlow } void testUriInfo(UriInfo ui1, UriInfo ui2, UriInfo ui3, UriInfo ui4, UriInfo ui5) { - sink(taint(ui1).getPathParameters()); // $hasTaintFlow - sink(taint(ui2).getPathSegments()); // $hasTaintFlow - sink(taint(ui2).getQueryParameters()); // $hasTaintFlow - sink(taint(ui2).getRequestUri()); // $hasTaintFlow - sink(taint(ui2).getRequestUriBuilder()); // $hasTaintFlow + sink(taint(ui1).getPathParameters()); // $ hasTaintFlow + sink(taint(ui2).getPathSegments()); // $ hasTaintFlow + sink(taint(ui2).getQueryParameters()); // $ hasTaintFlow + sink(taint(ui2).getRequestUri()); // $ hasTaintFlow + sink(taint(ui2).getRequestUriBuilder()); // $ hasTaintFlow } void testCookie() { - sink(new Cookie(taint(), "", "", "", 0)); // $hasTaintFlow - sink(new Cookie("", taint(), "", "", 0)); // $hasTaintFlow - sink(new Cookie("", "", taint(), "", 0)); // $hasTaintFlow - sink(new Cookie("", "", "", taint(), 0)); // $hasTaintFlow - sink(new Cookie("", "", "", "", IntSource.taint())); // $hasTaintFlow - sink(new Cookie(taint(), "", "", "")); // $hasTaintFlow - sink(new Cookie("", taint(), "", "")); // $hasTaintFlow - sink(new Cookie("", "", taint(), "")); // $hasTaintFlow - sink(new Cookie("", "", "", taint())); // $hasTaintFlow - sink(new Cookie(taint(), "")); // $hasTaintFlow - sink(new Cookie("", taint())); // $hasTaintFlow - sink(Cookie.valueOf(taint())); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getDomain()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getName()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getPath()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getValue()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).getVersion()); // $hasTaintFlow - sink(Cookie.valueOf(taint()).toString()); // $hasTaintFlow + sink(new Cookie(taint(), "", "", "", 0)); // $ hasTaintFlow + sink(new Cookie("", taint(), "", "", 0)); // $ hasTaintFlow + sink(new Cookie("", "", taint(), "", 0)); // $ hasTaintFlow + sink(new Cookie("", "", "", taint(), 0)); // $ hasTaintFlow + sink(new Cookie("", "", "", "", IntSource.taint())); // $ hasTaintFlow + sink(new Cookie(taint(), "", "", "")); // $ hasTaintFlow + sink(new Cookie("", taint(), "", "")); // $ hasTaintFlow + sink(new Cookie("", "", taint(), "")); // $ hasTaintFlow + sink(new Cookie("", "", "", taint())); // $ hasTaintFlow + sink(new Cookie(taint(), "")); // $ hasTaintFlow + sink(new Cookie("", taint())); // $ hasTaintFlow + sink(Cookie.valueOf(taint())); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getDomain()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getName()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getPath()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getValue()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).getVersion()); // $ hasTaintFlow + sink(Cookie.valueOf(taint()).toString()); // $ hasTaintFlow } void testNewCookie() { - sink(new NewCookie(Cookie.valueOf(taint()))); // $hasTaintFlow - - sink(new NewCookie(Cookie.valueOf(taint()), "", 0, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(Cookie.valueOf(taint()), "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), taint(), 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, DateSource.taint(), false, false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), BooleanSource.taint(), false)); // $hasTaintFlow - sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), true, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "")); // $hasTaintFlow - sink(new NewCookie("", taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", 0, "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", 0, "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", 0, "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), 0, "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", 0, "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", 0, "", 0, new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", 0, "", 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), 0, "", 0, new Date(), false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, new Date(), true, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, taint(), 0, new Date(), true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), new Date(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, DateSource.taint(), false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), BooleanSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), false, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", "", 0, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), "", 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", taint(), 0, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", IntSource.taint(), true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint())); // $hasTaintFlow - - sink(new NewCookie(taint(), "", "", "", "", 0, true, true)); // $hasTaintFlow - sink(new NewCookie("", taint(), "", "", "", 0, false, true)); // $hasTaintFlow - sink(new NewCookie("", "", taint(), "", "", 0, true, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", taint(), "", 0, false, false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", taint(), 0, true, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", IntSource.taint(), false, true)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint(), false)); // $hasTaintFlow - sink(new NewCookie("", "", "", "", "", 0, true, BooleanSource.taint())); // $hasTaintFlow - - sink(NewCookie.valueOf(taint()).getComment()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).getExpiry()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).getMaxAge()); // $hasTaintFlow - sink(NewCookie.valueOf(taint()).toCookie()); // $hasTaintFlow - sink(NewCookie.valueOf(taint())); // $hasTaintFlow + sink(new NewCookie(Cookie.valueOf(taint()))); // $ hasTaintFlow + + sink(new NewCookie(Cookie.valueOf(taint()), "", 0, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(Cookie.valueOf(taint()), "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), taint(), 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", IntSource.taint(), new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, DateSource.taint(), false, false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), BooleanSource.taint(), false)); // $ hasTaintFlow + sink(new NewCookie(Cookie.valueOf(""), "", 0, new Date(), true, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "")); // $ hasTaintFlow + sink(new NewCookie("", taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", 0, "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", 0, "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", 0, "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), 0, "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", 0, "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", 0, "", 0, new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", 0, "", 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), 0, "", 0, new Date(), false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", IntSource.taint(), "", 0, new Date(), true, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, taint(), 0, new Date(), true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", IntSource.taint(), new Date(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, DateSource.taint(), false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), BooleanSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", 0, "", 0, new Date(), false, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", "", 0, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), "", 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", taint(), 0, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", IntSource.taint(), true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint())); // $ hasTaintFlow + + sink(new NewCookie(taint(), "", "", "", "", 0, true, true)); // $ hasTaintFlow + sink(new NewCookie("", taint(), "", "", "", 0, false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", taint(), "", "", 0, true, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", taint(), "", 0, false, false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", taint(), 0, true, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", IntSource.taint(), false, true)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, BooleanSource.taint(), false)); // $ hasTaintFlow + sink(new NewCookie("", "", "", "", "", 0, true, BooleanSource.taint())); // $ hasTaintFlow + + sink(NewCookie.valueOf(taint()).getComment()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).getExpiry()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).getMaxAge()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint()).toCookie()); // $ hasTaintFlow + sink(NewCookie.valueOf(taint())); // $ hasTaintFlow } void testForm(MultivaluedMap mm1, MultivaluedMap mm2) { - sink(new Form(taint(), "")); // $hasTaintFlow - sink(new Form("", taint())); // $hasTaintFlow + sink(new Form(taint(), "")); // $ hasTaintFlow + sink(new Form("", taint())); // $ hasTaintFlow mm1.add(taint(), "value"); - sink(new Form(mm1)); // $hasTaintFlow + sink(new Form(mm1)); // $ hasTaintFlow mm2.add("key", taint()); - sink(new Form(mm2)); // $hasTaintFlow + sink(new Form(mm2)); // $ hasTaintFlow Form f1 = new Form(taint(), ""); - sink(f1.asMap()); // $hasTaintFlow + sink(f1.asMap()); // $ hasTaintFlow Form f2 = new Form(); - sink(f2.param(taint(), "b")); // $hasTaintFlow + sink(f2.param(taint(), "b")); // $ hasTaintFlow Form f3 = new Form(); - sink(f3.param("a", taint())); // $hasTaintFlow + sink(f3.param("a", taint())); // $ hasTaintFlow Form f4 = new Form(taint(), ""); - sink(f4.param("a", "b")); // $hasTaintFlow + sink(f4.param("a", "b")); // $ hasTaintFlow } void testGenericEntity() { Method m = Dummy.class.getMethods()[0]; GenericEntity> ge = new GenericEntity>(SetStringSource.taint(), m.getGenericReturnType()); - sink(ge); // $hasTaintFlow - sink(ge.getEntity()); // $hasTaintFlow + sink(ge); // $ hasTaintFlow + sink(ge.getEntity()); // $ hasTaintFlow } void testMediaType(Map m) { - sink(new MediaType(taint(), "")); // $hasTaintFlow - sink(new MediaType("", taint())); // $hasTaintFlow - sink(new MediaType(taint(), "", m)); // $hasTaintFlow - sink(new MediaType("", taint(), m)); // $hasTaintFlow - sink(new MediaType("", "", taint(m))); // $hasTaintFlow - sink(new MediaType(taint(), "", "")); // $hasTaintFlow - sink(new MediaType("", taint(), "")); // $hasTaintFlow - sink(new MediaType("", "", taint())); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getParameters()); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getSubtype()); // $hasTaintFlow - sink(MediaType.valueOf(taint()).getType()); // $hasTaintFlow - sink(MediaType.valueOf(taint())); // $hasTaintFlow + sink(new MediaType(taint(), "")); // $ hasTaintFlow + sink(new MediaType("", taint())); // $ hasTaintFlow + sink(new MediaType(taint(), "", m)); // $ hasTaintFlow + sink(new MediaType("", taint(), m)); // $ hasTaintFlow + sink(new MediaType("", "", taint(m))); // $ hasTaintFlow + sink(new MediaType(taint(), "", "")); // $ hasTaintFlow + sink(new MediaType("", taint(), "")); // $ hasTaintFlow + sink(new MediaType("", "", taint())); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getParameters()); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getSubtype()); // $ hasTaintFlow + sink(MediaType.valueOf(taint()).getType()); // $ hasTaintFlow + sink(MediaType.valueOf(taint())); // $ hasTaintFlow } void testUriBuilder() throws Exception { - sink(UriBuilder.fromPath("").build(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").build("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").build(taint(), false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").build("", taint(), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).build("")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).build("", false)); // $hasTaintFlow - - sink(UriBuilder.fromPath("").buildFromEncoded(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromEncoded("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromEncoded("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromEncodedMap(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromEncodedMap(new HashMap())); // $hasTaintFlow - sink(UriBuilder.fromPath("").buildFromMap(taint(new HashMap()), false)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).buildFromMap(new HashMap(), true)); // $hasTaintFlow + sink(UriBuilder.fromPath("").build(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build(taint(), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").build("", taint(), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).build("")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).build("", false)); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").buildFromEncoded(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromEncoded("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromEncoded("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromEncodedMap(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromEncodedMap(new HashMap())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").buildFromMap(taint(new HashMap()), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).buildFromMap(new HashMap(), true)); // $ hasTaintFlow - sink(UriBuilder.fromPath(taint()).clone()); // $hasTaintFlow - sink(UriBuilder.fromPath("").fragment(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).fragment("")); // $hasTaintFlow - sink(UriBuilder.fromLink(taint(Link.valueOf("")))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint())); // $hasTaintFlow - sink(UriBuilder.fromUri(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").host(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).host("")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").matrixParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").matrixParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).matrixParam("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").path(taint(Dummy.class))); // $hasTaintFlow - sink(UriBuilder.fromPath("").path(Dummy.class, taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).path(Dummy.class)); // $hasTaintFlow - sink(UriBuilder.fromPath("").queryParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").queryParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).queryParam("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").replaceMatrix(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceMatrix("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceMatrixParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceMatrixParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceMatrixParam("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replacePath(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replacePath("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQuery(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceQuery("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQueryParam(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").replaceQueryParam("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).replaceQueryParam("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").resolveTemplate(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate(taint(), "", false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplate("", taint(), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplate("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplate("", "", false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplateFromEncoded(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplateFromEncoded("", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplateFromEncoded("", "")); // $hasTaintFlow - - sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()), true)); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap(), false)); // $hasTaintFlow - sink(UriBuilder.fromPath("").resolveTemplatesFromEncoded(taint(new HashMap()))); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).resolveTemplatesFromEncoded(new HashMap())); // $hasTaintFlow - - sink(UriBuilder.fromPath("").scheme(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).scheme("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").schemeSpecificPart(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).schemeSpecificPart("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").segment(taint(), "")); // $hasTaintFlow - sink(UriBuilder.fromPath("").segment("", "", taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).segment("", "")); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).toTemplate()); // $hasTaintFlow - - sink(UriBuilder.fromPath("").uri(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).uri("")); // $hasTaintFlow - sink(UriBuilder.fromPath("").uri(UriSource.taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).uri(new URI(""))); // $hasTaintFlow - sink(UriBuilder.fromPath("").userInfo(taint())); // $hasTaintFlow - sink(UriBuilder.fromPath(taint()).userInfo("")); // $hasTaintFlow + sink(UriBuilder.fromPath(taint()).clone()); // $ hasTaintFlow + sink(UriBuilder.fromPath("").fragment(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).fragment("")); // $ hasTaintFlow + sink(UriBuilder.fromLink(taint(Link.valueOf("")))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint())); // $ hasTaintFlow + sink(UriBuilder.fromUri(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").host(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).host("")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").matrixParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").matrixParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).matrixParam("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").path(taint(Dummy.class))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").path(Dummy.class, taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).path(Dummy.class)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").queryParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").queryParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).queryParam("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").replaceMatrix(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceMatrix("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceMatrixParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceMatrixParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceMatrixParam("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replacePath(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replacePath("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQuery(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceQuery("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQueryParam(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").replaceQueryParam("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).replaceQueryParam("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").resolveTemplate(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate(taint(), "", false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplate("", taint(), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplate("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplate("", "", false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplateFromEncoded(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplateFromEncoded("", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplateFromEncoded("", "")); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplates(taint(new HashMap()), true)); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplates(new HashMap(), false)); // $ hasTaintFlow + sink(UriBuilder.fromPath("").resolveTemplatesFromEncoded(taint(new HashMap()))); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).resolveTemplatesFromEncoded(new HashMap())); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").scheme(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).scheme("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").schemeSpecificPart(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).schemeSpecificPart("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").segment(taint(), "")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").segment("", "", taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).segment("", "")); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).toTemplate()); // $ hasTaintFlow + + sink(UriBuilder.fromPath("").uri(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).uri("")); // $ hasTaintFlow + sink(UriBuilder.fromPath("").uri(UriSource.taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).uri(new URI(""))); // $ hasTaintFlow + sink(UriBuilder.fromPath("").userInfo(taint())); // $ hasTaintFlow + sink(UriBuilder.fromPath(taint()).userInfo("")); // $ hasTaintFlow } } diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.java index 5817f433aaf2..511508cd7749 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxWsEndpoint.java @@ -5,40 +5,40 @@ import javax.xml.ws.WebServiceProvider; @WebService -class WebServiceClass { // $JaxWsEndpoint +class WebServiceClass { // $ JaxWsEndpoint @WebMethod - void WebMethodMethod() { // $JaxWsEndpointRemoteMethod + void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod } @WebEndpoint - void WebEndpointMethod() { // $JaxWsEndpointRemoteMethod + void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod } } @WebServiceProvider -class WebServiceProviderClass { // $JaxWsEndpoint +class WebServiceProviderClass { // $ JaxWsEndpoint @WebMethod - void WebMethodMethod() { // $JaxWsEndpointRemoteMethod + void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod } @WebEndpoint - void WebEndpointMethod() { // $JaxWsEndpointRemoteMethod + void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod } } @WebServiceClient -class WebServiceClientClass { // $JaxWsEndpoint +class WebServiceClientClass { // $ JaxWsEndpoint @WebMethod - void WebMethodMethod() { // $JaxWsEndpointRemoteMethod + void WebMethodMethod() { // $ JaxWsEndpointRemoteMethod } @WebEndpoint - void WebEndpointMethod() { // $JaxWsEndpointRemoteMethod + void WebEndpointMethod() { // $ JaxWsEndpointRemoteMethod } } From 945db01f56bf38f77c63654cfb54adc25d0df019 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 17 Jun 2021 10:29:33 +0100 Subject: [PATCH 1359/1662] Address review comments --- java/ql/src/semmle/code/java/frameworks/JaxWS.qll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll index 157cf1ba18ea..bfe332da2b61 100644 --- a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll +++ b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll @@ -81,13 +81,13 @@ class JaxRsResourceMethod extends Method { result = this.getAnAnnotation() or // No direct annotations - not exists(this.getAnAnnotation().(JaxRSProducesAnnotation)) and + not this.getAnAnnotation() instanceof JaxRSProducesAnnotation and ( // Annotations on a method we've overridden result = this.getAnOverride().getAnAnnotation() or // No annotations on this method, or a method we've overridden, so look to the class - not exists(this.getAnOverride().getAnAnnotation().(JaxRSProducesAnnotation)) and + not this.getAnOverride().getAnAnnotation() instanceof JaxRSProducesAnnotation and result = this.getDeclaringType().getAnAnnotation() ) } @@ -267,7 +267,7 @@ class MessageBodyReader extends GenericInterface { */ class MessageBodyReaderReadFrom extends Method { MessageBodyReaderReadFrom() { - this.getDeclaringType().(RefType).getSourceDeclaration() instanceof MessageBodyReader and + this.getDeclaringType().getSourceDeclaration() instanceof MessageBodyReader and this.hasName("readFrom") } } From 363ad5b4708bbffed03f30807f1de67dd255cce8 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 17 Jun 2021 17:36:35 +0800 Subject: [PATCH 1360/1662] Fix error --- .../CWE-502/UnsafeDeserialization.expected | 93 ++++++++++++++++--- 1 file changed, 79 insertions(+), 14 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected index 6f25b28bda5e..7b02131cd734 100644 --- a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected +++ b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected @@ -1,30 +1,53 @@ edges +| A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:14:50:14:60 | inputStream : InputStream | | A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:15:12:15:13 | in | +| A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:15:12:15:13 | in | +| A.java:14:50:14:60 | inputStream : InputStream | A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | +| A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:20:50:20:60 | inputStream : InputStream | | A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:21:12:21:13 | in | -| A.java:25:31:25:51 | getInputStream(...) : InputStream | A.java:27:12:27:12 | d | -| A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:34:23:34:28 | reader | -| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:40:28:40:32 | input | -| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:41:34:41:38 | input | -| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:42:40:42:44 | input | +| A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:21:12:21:13 | in | +| A.java:20:50:20:60 | inputStream : InputStream | A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | +| A.java:25:31:25:51 | getInputStream(...) : InputStream | A.java:26:35:26:45 | inputStream : InputStream | +| A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | A.java:27:12:27:12 | d | +| A.java:26:35:26:45 | inputStream : InputStream | A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | +| A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:33:43:33:53 | inputStream : InputStream | +| A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | A.java:34:23:34:28 | reader | +| A.java:33:43:33:53 | inputStream : InputStream | A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | +| A.java:39:19:39:50 | new Input(...) : Input | A.java:40:28:40:32 | input | +| A.java:39:19:39:50 | new Input(...) : Input | A.java:41:34:41:38 | input | +| A.java:39:19:39:50 | new Input(...) : Input | A.java:42:40:42:44 | input | +| A.java:39:29:39:49 | getInputStream(...) : InputStream | A.java:39:19:39:50 | new Input(...) : Input | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:61:26:61:30 | input | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:62:30:62:34 | input | -| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:63:28:63:55 | new InputStreamReader(...) | +| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:63:50:63:54 | input : InputStream | | A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:64:24:64:28 | input | -| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:65:24:65:51 | new InputStreamReader(...) | +| A.java:60:25:60:45 | getInputStream(...) : InputStream | A.java:65:46:65:50 | input : InputStream | +| A.java:63:50:63:54 | input : InputStream | A.java:63:28:63:55 | new InputStreamReader(...) | +| A.java:65:46:65:50 | input : InputStream | A.java:65:24:65:51 | new InputStreamReader(...) | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:71:26:71:30 | input | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:72:30:72:34 | input | -| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:73:28:73:55 | new InputStreamReader(...) | +| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:73:50:73:54 | input : InputStream | | A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:74:24:74:28 | input | -| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:75:24:75:51 | new InputStreamReader(...) | +| A.java:70:25:70:45 | getInputStream(...) : InputStream | A.java:75:46:75:50 | input : InputStream | +| A.java:73:50:73:54 | input : InputStream | A.java:73:28:73:55 | new InputStreamReader(...) | +| A.java:75:46:75:50 | input : InputStream | A.java:75:24:75:51 | new InputStreamReader(...) | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:91:26:91:30 | input | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:92:30:92:34 | input | -| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:93:28:93:55 | new InputStreamReader(...) | +| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:93:50:93:54 | input : InputStream | | A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:94:24:94:28 | input | -| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:95:24:95:51 | new InputStreamReader(...) | +| A.java:90:25:90:45 | getInputStream(...) : InputStream | A.java:95:46:95:50 | input : InputStream | +| A.java:93:50:93:54 | input : InputStream | A.java:93:28:93:55 | new InputStreamReader(...) | +| A.java:95:46:95:50 | input : InputStream | A.java:95:24:95:51 | new InputStreamReader(...) | | B.java:7:31:7:51 | getInputStream(...) : InputStream | B.java:8:29:8:39 | inputStream | -| B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:15:23:15:27 | bytes | -| B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:23:29:23:29 | s | -| B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:31:23:31:23 | s | +| B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:14:5:14:15 | inputStream : InputStream | +| B.java:14:5:14:15 | inputStream : InputStream | B.java:14:22:14:26 | bytes [post update] : byte[] | +| B.java:14:22:14:26 | bytes [post update] : byte[] | B.java:15:23:15:27 | bytes | +| B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:21:5:21:15 | inputStream : InputStream | +| B.java:21:5:21:15 | inputStream : InputStream | B.java:21:22:21:26 | bytes [post update] : byte[] | +| B.java:21:22:21:26 | bytes [post update] : byte[] | B.java:23:29:23:29 | s | +| B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:29:5:29:15 | inputStream : InputStream | +| B.java:29:5:29:15 | inputStream : InputStream | B.java:29:22:29:26 | bytes [post update] : byte[] | +| B.java:29:22:29:26 | bytes [post update] : byte[] | B.java:31:23:31:23 | s | | C.java:23:17:23:44 | getParameter(...) : String | C.java:24:13:24:16 | data | | C.java:23:17:23:44 | getParameter(...) : String | C.java:25:19:25:22 | data | | C.java:23:17:23:44 | getParameter(...) : String | C.java:26:25:26:28 | data | @@ -38,23 +61,46 @@ edges | C.java:51:17:51:44 | getParameter(...) : String | C.java:53:3:53:3 | r | | C.java:51:17:51:44 | getParameter(...) : String | C.java:54:3:54:3 | r | | C.java:51:17:51:44 | getParameter(...) : String | C.java:55:3:55:3 | r | +| C.java:60:18:60:45 | getParameter(...) : String | C.java:61:55:61:59 | bytes : byte[] | | C.java:60:18:60:45 | getParameter(...) : String | C.java:63:3:63:14 | hessianInput | | C.java:60:18:60:45 | getParameter(...) : String | C.java:64:3:64:14 | hessianInput | +| C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:63:3:63:14 | hessianInput | +| C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:64:3:64:14 | hessianInput | +| C.java:61:55:61:59 | bytes : byte[] | C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:69:18:69:45 | getParameter(...) : String | C.java:70:55:70:59 | bytes : byte[] | | C.java:69:18:69:45 | getParameter(...) : String | C.java:72:3:72:14 | hessianInput | | C.java:69:18:69:45 | getParameter(...) : String | C.java:73:3:73:14 | hessianInput | +| C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:72:3:72:14 | hessianInput | +| C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:73:3:73:14 | hessianInput | +| C.java:70:55:70:59 | bytes : byte[] | C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | | C.java:79:43:79:70 | getParameter(...) : String | C.java:79:26:79:71 | new StringReader(...) | +| C.java:84:27:84:54 | getParameter(...) : String | C.java:85:54:85:67 | serializedData : byte[] | | C.java:84:27:84:54 | getParameter(...) : String | C.java:87:3:87:13 | burlapInput | | C.java:84:27:84:54 | getParameter(...) : String | C.java:91:3:91:14 | burlapInput1 | +| C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:87:3:87:13 | burlapInput | +| C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:91:3:91:14 | burlapInput1 | +| C.java:85:54:85:67 | serializedData : byte[] | C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | | TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | +| TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | +| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | nodes | A.java:13:31:13:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:14:28:14:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | +| A.java:14:50:14:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:15:12:15:13 | in | semmle.label | in | | A.java:19:31:19:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:20:28:20:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | +| A.java:20:50:20:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:21:12:21:13 | in | semmle.label | in | | A.java:25:31:25:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:26:20:26:46 | new XMLDecoder(...) : XMLDecoder | semmle.label | new XMLDecoder(...) : XMLDecoder | +| A.java:26:35:26:45 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:27:12:27:12 | d | semmle.label | d | | A.java:32:31:32:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:33:21:33:54 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| A.java:33:43:33:53 | inputStream : InputStream | semmle.label | inputStream : InputStream | | A.java:34:23:34:28 | reader | semmle.label | reader | +| A.java:39:19:39:50 | new Input(...) : Input | semmle.label | new Input(...) : Input | | A.java:39:29:39:49 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:40:28:40:32 | input | semmle.label | input | | A.java:41:34:41:38 | input | semmle.label | input | @@ -63,27 +109,39 @@ nodes | A.java:61:26:61:30 | input | semmle.label | input | | A.java:62:30:62:34 | input | semmle.label | input | | A.java:63:28:63:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:63:50:63:54 | input : InputStream | semmle.label | input : InputStream | | A.java:64:24:64:28 | input | semmle.label | input | | A.java:65:24:65:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:65:46:65:50 | input : InputStream | semmle.label | input : InputStream | | A.java:70:25:70:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:71:26:71:30 | input | semmle.label | input | | A.java:72:30:72:34 | input | semmle.label | input | | A.java:73:28:73:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:73:50:73:54 | input : InputStream | semmle.label | input : InputStream | | A.java:74:24:74:28 | input | semmle.label | input | | A.java:75:24:75:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:75:46:75:50 | input : InputStream | semmle.label | input : InputStream | | A.java:90:25:90:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | A.java:91:26:91:30 | input | semmle.label | input | | A.java:92:30:92:34 | input | semmle.label | input | | A.java:93:28:93:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:93:50:93:54 | input : InputStream | semmle.label | input : InputStream | | A.java:94:24:94:28 | input | semmle.label | input | | A.java:95:24:95:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:95:46:95:50 | input : InputStream | semmle.label | input : InputStream | | B.java:7:31:7:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | | B.java:8:29:8:39 | inputStream | semmle.label | inputStream | | B.java:12:31:12:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:14:5:14:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:14:22:14:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:15:23:15:27 | bytes | semmle.label | bytes | | B.java:19:31:19:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:21:5:21:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:21:22:21:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:23:29:23:29 | s | semmle.label | s | | B.java:27:31:27:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:29:5:29:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:29:22:29:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | | B.java:31:23:31:23 | s | semmle.label | s | | C.java:23:17:23:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | | C.java:24:13:24:16 | data | semmle.label | data | @@ -102,18 +160,25 @@ nodes | C.java:54:3:54:3 | r | semmle.label | r | | C.java:55:3:55:3 | r | semmle.label | r | | C.java:60:18:60:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:61:55:61:59 | bytes : byte[] | semmle.label | bytes : byte[] | | C.java:63:3:63:14 | hessianInput | semmle.label | hessianInput | | C.java:64:3:64:14 | hessianInput | semmle.label | hessianInput | | C.java:69:18:69:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:70:55:70:59 | bytes : byte[] | semmle.label | bytes : byte[] | | C.java:72:3:72:14 | hessianInput | semmle.label | hessianInput | | C.java:73:3:73:14 | hessianInput | semmle.label | hessianInput | | C.java:79:26:79:71 | new StringReader(...) | semmle.label | new StringReader(...) | | C.java:79:43:79:70 | getParameter(...) : String | semmle.label | getParameter(...) : String | | C.java:84:27:84:54 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:85:54:85:67 | serializedData : byte[] | semmle.label | serializedData : byte[] | | C.java:87:3:87:13 | burlapInput | semmle.label | burlapInput | | C.java:91:3:91:14 | burlapInput1 | semmle.label | burlapInput1 | | TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | semmle.label | entityStream : InputStream | | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | semmle.label | new ObjectInputStream(...) | +| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | semmle.label | entityStream : InputStream | #select | A.java:15:12:15:26 | readObject(...) | A.java:13:31:13:51 | getInputStream(...) : InputStream | A.java:15:12:15:13 | in | Unsafe deserialization of $@. | A.java:13:31:13:51 | getInputStream(...) | user input | | A.java:21:12:21:28 | readUnshared(...) | A.java:19:31:19:51 | getInputStream(...) : InputStream | A.java:21:12:21:13 | in | Unsafe deserialization of $@. | A.java:19:31:19:51 | getInputStream(...) | user input | From 487c1db6ed5004161ad5dd56ed9d2ddd3fa01ca8 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 23 Mar 2021 15:53:34 +0000 Subject: [PATCH 1361/1662] Promote SSRF query to main query set --- .../Security/CWE/CWE-918/RequestForgery.java | 0 .../Security/CWE/CWE-918/RequestForgery.qhelp | 0 .../Security/CWE/CWE-918/RequestForgery.ql | 0 .../Security/CWE/CWE-918/RequestForgery.qll | 0 .../security/CWE-918/RequestForgery.qlref | 1 - .../query-tests/security/CWE-918/options | 1 - .../javax/ws/rs/client/Client.java | 12 ---- .../javax/ws/rs/core/Configurable.java | 6 -- .../javax/ws/rs/core/Link.java | 61 ------------------ .../javax/ws/rs/core/UriBuilder.java | 62 ------------------- .../javax/ws/rs/core/UriBuilderException.java | 18 ------ .../security/CWE-918/JaxWsSSRF.java | 0 .../security/CWE-918/RequestForgery.expected | 0 .../security/CWE-918/RequestForgery.java | 0 .../security/CWE-918/RequestForgery.qlref | 1 + .../security/CWE-918/RequestForgery2.java | 0 .../query-tests/security/CWE-918/Sinks.java | 0 .../security/CWE-918/SpringSSRF.java | 0 .../test/query-tests/security/CWE-918/options | 1 + .../javax/ws/rs/client/ClientBuilder.java | 0 .../javax/ws/rs/client/WebTarget.java | 0 .../javax/ws/rs/core/Configuration.java | 0 22 files changed, 2 insertions(+), 161 deletions(-) rename java/ql/src/{experimental => }/Security/CWE/CWE-918/RequestForgery.java (100%) rename java/ql/src/{experimental => }/Security/CWE/CWE-918/RequestForgery.qhelp (100%) rename java/ql/src/{experimental => }/Security/CWE/CWE-918/RequestForgery.ql (100%) rename java/ql/src/{experimental => }/Security/CWE/CWE-918/RequestForgery.qll (100%) delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.qlref delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-918/options delete mode 100644 java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java delete mode 100644 java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configurable.java delete mode 100644 java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Link.java delete mode 100644 java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilder.java delete mode 100644 java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilderException.java rename java/ql/test/{experimental => }/query-tests/security/CWE-918/JaxWsSSRF.java (100%) rename java/ql/test/{experimental => }/query-tests/security/CWE-918/RequestForgery.expected (100%) rename java/ql/test/{experimental => }/query-tests/security/CWE-918/RequestForgery.java (100%) create mode 100644 java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref rename java/ql/test/{experimental => }/query-tests/security/CWE-918/RequestForgery2.java (100%) rename java/ql/test/{experimental => }/query-tests/security/CWE-918/Sinks.java (100%) rename java/ql/test/{experimental => }/query-tests/security/CWE-918/SpringSSRF.java (100%) create mode 100644 java/ql/test/query-tests/security/CWE-918/options rename java/ql/test/{experimental => }/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/ClientBuilder.java (100%) rename java/ql/test/{experimental => }/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/WebTarget.java (100%) rename java/ql/test/{experimental => }/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configuration.java (100%) diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.java b/java/ql/src/Security/CWE/CWE-918/RequestForgery.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.java rename to java/ql/src/Security/CWE/CWE-918/RequestForgery.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qhelp b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qhelp rename to java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.ql rename to java/ql/src/Security/CWE/CWE-918/RequestForgery.ql diff --git a/java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-918/RequestForgery.qll rename to java/ql/src/Security/CWE/CWE-918/RequestForgery.qll diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.qlref b/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.qlref deleted file mode 100644 index 3e35024c2128..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/Security/CWE/CWE-918/RequestForgery.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/options b/java/ql/test/experimental/query-tests/security/CWE-918/options deleted file mode 100644 index 1f5354b3f8d1..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-918/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../../stubs/apache-http-4.4.13/:${testdir}/../../../../stubs/servlet-api-2.4/ diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java b/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java deleted file mode 100644 index cddcf668d148..000000000000 --- a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java +++ /dev/null @@ -1,12 +0,0 @@ -package javax.ws.rs.client; - -public abstract interface Client extends javax.ws.rs.core.Configurable { - - public abstract javax.ws.rs.client.WebTarget target(java.lang.String arg0); - - public abstract javax.ws.rs.client.WebTarget target(java.net.URI arg0); - - public abstract javax.ws.rs.client.WebTarget target(javax.ws.rs.core.UriBuilder arg0); - - public abstract javax.ws.rs.client.WebTarget target(javax.ws.rs.core.Link arg0); -} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configurable.java b/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configurable.java deleted file mode 100644 index e132dd5b4189..000000000000 --- a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configurable.java +++ /dev/null @@ -1,6 +0,0 @@ -package javax.ws.rs.core; - -public abstract interface Configurable { - - public abstract javax.ws.rs.core.Configuration getConfiguration(); -} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Link.java b/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Link.java deleted file mode 100644 index 38ed9572dca7..000000000000 --- a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Link.java +++ /dev/null @@ -1,61 +0,0 @@ -package javax.ws.rs.core; - -public abstract class Link { - - public static final java.lang.String TITLE = "title"; - - public static final java.lang.String REL = "rel"; - - public static final java.lang.String TYPE = "type"; - - public Link() { - } - - public abstract java.net.URI getUri(); - - public abstract javax.ws.rs.core.UriBuilder getUriBuilder(); - - public abstract java.lang.String getRel(); - - public abstract java.util.List getRels(); - - public abstract java.lang.String getTitle(); - - public abstract java.lang.String getType(); - - public abstract java.util.Map getParams(); - - public abstract java.lang.String toString(); - - public static javax.ws.rs.core.Link valueOf(java.lang.String value) { - return null; - } - - // public static javax.ws.rs.core.Link.Builder fromUri(java.net.URI uri) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromUri(java.lang.String uri) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromUriBuilder(javax.ws.rs.core.UriBuilder uriBuilder) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromLink(javax.ws.rs.core.Link link) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromPath(java.lang.String path) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromResource(java.lang.Class resource) { - // return null; - // } - - // public static javax.ws.rs.core.Link.Builder fromMethod(java.lang.Class resource, java.lang.String method) { - // return null; - // } -} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilder.java b/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilder.java deleted file mode 100644 index d32f96c5043c..000000000000 --- a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Failed to get sources. Instead, stub sources have been generated by the disassembler. -// Implementation of methods is unavailable. -package javax.ws.rs.core; - -public abstract class UriBuilder { - - protected UriBuilder() { - } - - protected static javax.ws.rs.core.UriBuilder newInstance() { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromUri(java.net.URI uri) { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromUri(java.lang.String uriTemplate) { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromLink(javax.ws.rs.core.Link link) { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromPath(java.lang.String path) - throws java.lang.IllegalArgumentException { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromResource(java.lang.Class resource) { - return null; - } - - public static javax.ws.rs.core.UriBuilder fromMethod(java.lang.Class resource, java.lang.String method) { - return null; - } - - public abstract javax.ws.rs.core.UriBuilder clone(); - - public abstract javax.ws.rs.core.UriBuilder uri(java.net.URI arg0); - - public abstract javax.ws.rs.core.UriBuilder uri(java.lang.String arg0); - - public abstract java.net.URI buildFromMap(java.util.Map arg0); - - public abstract java.net.URI buildFromMap(java.util.Map arg0, boolean arg1) - throws java.lang.IllegalArgumentException, javax.ws.rs.core.UriBuilderException; - - public abstract java.net.URI buildFromEncodedMap(java.util.Map arg0) - throws java.lang.IllegalArgumentException, javax.ws.rs.core.UriBuilderException; - - public abstract java.net.URI build(java.lang.Object... arg0) - throws java.lang.IllegalArgumentException, javax.ws.rs.core.UriBuilderException; - - public abstract java.net.URI build(java.lang.Object[] arg0, boolean arg1) - throws java.lang.IllegalArgumentException, javax.ws.rs.core.UriBuilderException; - - public abstract java.net.URI buildFromEncoded(java.lang.Object... arg0) - throws java.lang.IllegalArgumentException, javax.ws.rs.core.UriBuilderException; - -} \ No newline at end of file diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilderException.java b/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilderException.java deleted file mode 100644 index 55aad43d0412..000000000000 --- a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/UriBuilderException.java +++ /dev/null @@ -1,18 +0,0 @@ -package javax.ws.rs.core; - -public class UriBuilderException extends java.lang.RuntimeException { - - private static final long serialVersionUID = 956255913370721193L; - - public UriBuilderException() { - } - - public UriBuilderException(java.lang.String msg) { - } - - public UriBuilderException(java.lang.String msg, java.lang.Throwable cause) { - } - - public UriBuilderException(java.lang.Throwable cause) { - } -} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/JaxWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/JaxWsSSRF.java rename to java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.expected rename to java/ql/test/query-tests/security/CWE-918/RequestForgery.expected diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery.java rename to java/ql/test/query-tests/security/CWE-918/RequestForgery.java diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref b/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref new file mode 100644 index 000000000000..15a8cbb95d34 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-918/RequestForgery.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery2.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/RequestForgery2.java rename to java/ql/test/query-tests/security/CWE-918/RequestForgery2.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/Sinks.java b/java/ql/test/query-tests/security/CWE-918/Sinks.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/Sinks.java rename to java/ql/test/query-tests/security/CWE-918/Sinks.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-918/SpringSSRF.java b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-918/SpringSSRF.java rename to java/ql/test/query-tests/security/CWE-918/SpringSSRF.java diff --git a/java/ql/test/query-tests/security/CWE-918/options b/java/ql/test/query-tests/security/CWE-918/options new file mode 100644 index 000000000000..a0b82c9046f2 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../stubs/springframework-5.2.3:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../stubs/apache-http-4.4.13/:${testdir}/../../../stubs/servlet-api-2.4/ diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/ClientBuilder.java b/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/ClientBuilder.java similarity index 100% rename from java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/ClientBuilder.java rename to java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/ClientBuilder.java diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/WebTarget.java b/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/WebTarget.java similarity index 100% rename from java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/WebTarget.java rename to java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/WebTarget.java diff --git a/java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configuration.java b/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configuration.java similarity index 100% rename from java/ql/test/experimental/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configuration.java rename to java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/core/Configuration.java From b5a450b8810fce53b7d3e28d05c352b88da87ec8 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 30 Mar 2021 19:35:30 +0100 Subject: [PATCH 1362/1662] SSRF query: add sanitizer looking for a variety of ways of prepending a sanitizing prefix, such as one that restricts the hostname a URI will refer to. --- .../Security/CWE/CWE-918/RequestForgery.ql | 2 + .../Security/CWE/CWE-918/RequestForgery.qll | 82 +++++++++++++++++++ java/ql/src/semmle/code/java/StringFormat.qll | 30 +++++++ .../security/CWE-918/RequestForgery.expected | 24 ++++++ .../security/CWE-918/RequestForgery.java | 56 +++++++++++++ 5 files changed, 194 insertions(+) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index c3bf787881fa..e765a0553da5 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -25,6 +25,8 @@ class RequestForgeryConfiguration extends TaintTracking::Configuration { override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { requestForgeryStep(pred, succ) } + + override predicate isSanitizer(DataFlow::Node node) { node instanceof RequestForgerySanitizer } } from DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 3fc52ddca766..1e80b14d3e53 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -5,6 +5,8 @@ import semmle.code.java.frameworks.spring.Spring import semmle.code.java.frameworks.JaxWS import semmle.code.java.frameworks.javase.Http import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.TaintTracking +private import semmle.code.java.StringFormat predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { // propagate to a URI when its host is assigned to @@ -190,3 +192,83 @@ private class SpringRestTemplateUrlMethods extends Method { result = ma.getArgument(0) } } + +/** A sanitizer for request forgery vulnerabilities. */ +abstract class RequestForgerySanitizer extends DataFlow::Node { } + +private class HostnameSanitzingPrefix extends CompileTimeConstantExpr { + int offset; + + HostnameSanitzingPrefix() { + exists( + this.getStringValue().regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*", 0, offset) + ) + } + + int getOffset() { result = offset } +} + +private AddExpr getParentAdd(AddExpr e) { result = e.getParent() } + +private AddExpr getAnAddContainingHostnameSanitizingPrefix() { + result = getParentAdd*(any(HostnameSanitzingPrefix p).getParent()) +} + +private Expr getASanitizedAddOperand() { + exists(AddExpr e | + e = getAnAddContainingHostnameSanitizingPrefix() and + ( + e.getLeftOperand() = getAnAddContainingHostnameSanitizingPrefix() or + e.getLeftOperand() instanceof HostnameSanitzingPrefix + ) and + result = e.getRightOperand() + ) +} + +private MethodAccess getNextAppend(MethodAccess append) { + result = any(StringBuilderVar sbv).getNextAppend(append) +} + +class HostnameSanitizedExpr extends Expr { + HostnameSanitizedExpr() { + // Sanitize expressions that come after a sanitizing prefix in a tree of string additions: + this = getASanitizedAddOperand() + or + // Sanitize expressions that come after a sanitizing prefix in a sequence of StringBuilder operations: + exists(MethodAccess appendSanitizingConstant, MethodAccess subsequentAppend | + appendSanitizingConstant.getArgument(0) instanceof HostnameSanitzingPrefix and + getNextAppend*(appendSanitizingConstant) = subsequentAppend and + this = subsequentAppend.getArgument(0) + ) + or + // Sanitize expressions that come after a sanitizing prefix in the args to a format call: + exists( + FormattingCall formatCall, FormatString formatString, HostnameSanitzingPrefix prefix, + int sanitizedFromOffset, int laterOffset, int sanitizedArg + | + formatString = unique(FormatString fs | fs = formatCall.getAFormatString()) and + ( + // An argument that sanitizes will be come before this: + exists(int argIdx | + formatCall.getArgumentToBeFormatted(argIdx) = prefix and + sanitizedFromOffset = formatString.getAnArgUsageOffset(argIdx) + ) + or + // The format string itself sanitizes subsequent arguments: + formatString = prefix.getStringValue() and + sanitizedFromOffset = prefix.getOffset() + ) and + laterOffset > sanitizedFromOffset and + laterOffset = formatString.getAnArgUsageOffset(sanitizedArg) and + this = formatCall.getArgumentToBeFormatted(sanitizedArg) + ) + } +} + +/** + * A value that is the result of prepending a string that prevents any value from controlling the + * host of a URL. + */ +class HostnameSantizer extends RequestForgerySanitizer { + HostnameSantizer() { this.asExpr() instanceof HostnameSanitizedExpr } +} diff --git a/java/ql/src/semmle/code/java/StringFormat.qll b/java/ql/src/semmle/code/java/StringFormat.qll index aa77feafeb98..d0d788f54ffa 100644 --- a/java/ql/src/semmle/code/java/StringFormat.qll +++ b/java/ql/src/semmle/code/java/StringFormat.qll @@ -175,6 +175,16 @@ class FormattingCall extends Call { ) } + /** Gets the `i`th argument to be formatted. */ + Expr getArgumentToBeFormatted(int i) { + i >= 0 and + if this.hasExplicitVarargsArray() + then + result = + this.getArgument(1 + this.getFormatStringIndex()).(ArrayCreationExpr).getInit().getInit(i) + else result = this.getArgument(this.getFormatStringIndex() + 1 + i) + } + /** Holds if the varargs argument is given as an explicit array. */ private predicate hasExplicitVarargsArray() { this.getNumArgument() = this.getFormatStringIndex() + 2 and @@ -353,6 +363,11 @@ class FormatString extends string { * is not referred by any format specifier. */ /*abstract*/ int getASkippedFmtSpecIndex() { none() } + + /** + * Gets an offset in this format string where argument `argNo` will be interpolated, if any. + */ + int getAnArgUsageOffset(int argNo) { none() } } private class PrintfFormatString extends FormatString { @@ -425,6 +440,16 @@ private class PrintfFormatString extends FormatString { result > count(int i | fmtSpecRefersToSequentialIndex(i)) and not result = fmtSpecRefersToSpecificIndex(_) } + + override int getAnArgUsageOffset(int argNo) { + argNo = fmtSpecRefersToSpecificIndex(result) + or + fmtSpecRefersToSequentialIndex(result) and + argNo = count(int i | i < result and fmtSpecRefersToSequentialIndex(i)) + or + fmtSpecRefersToPrevious(result) and + argNo = count(int i | i < result and fmtSpecRefersToSequentialIndex(i)) - 1 + } } private class LoggerFormatString extends FormatString { @@ -449,4 +474,9 @@ private class LoggerFormatString extends FormatString { } override int getMaxFmtSpecIndex() { result = count(int i | fmtPlaceholder(i)) } + + override int getAnArgUsageOffset(int argNo) { + fmtPlaceholder(result) and + argNo = count(int i | fmtPlaceholder(i) and i < result) + } } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index f6c7072a5198..eac1933b388b 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -16,6 +16,12 @@ edges | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:19:23:19:58 | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:27:57:27:59 | uri | +| RequestForgery.java:61:33:61:63 | getParameter(...) : String | RequestForgery.java:62:59:62:77 | new URI(...) | +| RequestForgery.java:65:49:65:79 | getParameter(...) : String | RequestForgery.java:66:59:66:77 | new URI(...) | +| RequestForgery.java:70:31:70:61 | getParameter(...) : String | RequestForgery.java:71:59:71:88 | new URI(...) | +| RequestForgery.java:74:73:74:103 | getParameter(...) : String | RequestForgery.java:75:59:75:77 | new URI(...) | +| RequestForgery.java:78:56:78:86 | getParameter(...) : String | RequestForgery.java:79:59:79:77 | new URI(...) | +| RequestForgery.java:82:55:82:85 | getParameter(...) : String | RequestForgery.java:83:59:83:77 | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | @@ -44,6 +50,18 @@ nodes | RequestForgery.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:22:52:22:54 | uri | semmle.label | uri | | RequestForgery.java:27:57:27:59 | uri | semmle.label | uri | +| RequestForgery.java:61:33:61:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:62:59:62:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:65:49:65:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:66:59:66:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:70:31:70:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:71:59:71:88 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:74:73:74:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:75:59:75:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:78:56:78:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:79:59:79:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:82:55:82:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:83:59:83:77 | new URI(...) | semmle.label | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | | SpringSSRF.java:32:47:32:67 | ... + ... | semmle.label | ... + ... | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | @@ -66,6 +84,12 @@ nodes | RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | | RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | | RequestForgery.java:27:57:27:59 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:27:57:27:59 | uri | Potential server side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | +| RequestForgery.java:62:59:62:77 | new URI(...) | RequestForgery.java:61:33:61:63 | getParameter(...) : String | RequestForgery.java:62:59:62:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:61:33:61:63 | getParameter(...) | a user-provided value | +| RequestForgery.java:66:59:66:77 | new URI(...) | RequestForgery.java:65:49:65:79 | getParameter(...) : String | RequestForgery.java:66:59:66:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:65:49:65:79 | getParameter(...) | a user-provided value | +| RequestForgery.java:71:59:71:88 | new URI(...) | RequestForgery.java:70:31:70:61 | getParameter(...) : String | RequestForgery.java:71:59:71:88 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:70:31:70:61 | getParameter(...) | a user-provided value | +| RequestForgery.java:75:59:75:77 | new URI(...) | RequestForgery.java:74:73:74:103 | getParameter(...) : String | RequestForgery.java:75:59:75:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:74:73:74:103 | getParameter(...) | a user-provided value | +| RequestForgery.java:79:59:79:77 | new URI(...) | RequestForgery.java:78:56:78:86 | getParameter(...) : String | RequestForgery.java:79:59:79:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:78:56:78:86 | getParameter(...) | a user-provided value | +| RequestForgery.java:83:59:83:77 | new URI(...) | RequestForgery.java:82:55:82:85 | getParameter(...) : String | RequestForgery.java:83:59:83:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:82:55:82:85 | getParameter(...) | a user-provided value | | SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java index a9e41a8172f3..9fc323759bfb 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java @@ -27,6 +27,62 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest r2 = HttpRequest.newBuilder(uri).build(); client.send(r2, null); } + + // GOOD: sanitisation by concatenation with a prefix that prevents targeting an arbitrary host. + // We test a few different ways of sanitisation: via string conctentation (perhaps nested), + // via a stringbuilder and via String.format. + String safeUri3 = "https://example.com/" + request.getParameter("uri3"); + HttpRequest r3 = HttpRequest.newBuilder(new URI(safeUri3)).build(); + client.send(r3, null); + + String safeUri4 = "https://example.com/" + ("someprefix" + request.getParameter("uri4")); + HttpRequest r4 = HttpRequest.newBuilder(new URI(safeUri4)).build(); + client.send(r4, null); + + StringBuilder safeUri5 = new StringBuilder(); + safeUri5.append("https://example.com/").append(request.getParameter("uri5")); + HttpRequest r5 = HttpRequest.newBuilder(new URI(safeUri5.toString())).build(); + client.send(r5, null); + + String safeUri6 = String.format("https://example.com/%s", request.getParameter("uri6")); + HttpRequest r6 = HttpRequest.newBuilder(new URI(safeUri6)).build(); + client.send(r6, null); + + String safeUri7 = String.format("%s/%s", "https://example.com", request.getParameter("uri7")); + HttpRequest r7 = HttpRequest.newBuilder(new URI(safeUri7)).build(); + client.send(r7, null); + + String safeUri8 = String.format("%s%s", "https://example.com/", request.getParameter("uri8")); + HttpRequest r8 = HttpRequest.newBuilder(new URI(safeUri8)).build(); + client.send(r8, null); + + // BAD: cases where a string that would sanitise is used, but occurs in the wrong + // place to sanitise user input: + String unsafeUri3 = request.getParameter("baduri3") + "https://example.com/"; + HttpRequest unsafer3 = HttpRequest.newBuilder(new URI(unsafeUri3)).build(); + client.send(unsafer3, null); + + String unsafeUri4 = ("someprefix" + request.getParameter("baduri4")) + "https://example.com/"; + HttpRequest unsafer4 = HttpRequest.newBuilder(new URI(unsafeUri4)).build(); + client.send(unsafer4, null); + + StringBuilder unsafeUri5 = new StringBuilder(); + unsafeUri5.append(request.getParameter("baduri5")).append("https://example.com/"); + HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); + client.send(unsafer5, null); + + String unsafeUri6 = String.format("%shttps://example.com/", request.getParameter("baduri6")); + HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); + client.send(unsafer6, null); + + String unsafeUri7 = String.format("%s/%s", request.getParameter("baduri7"), "https://example.com"); + HttpRequest unsafer7 = HttpRequest.newBuilder(new URI(unsafeUri7)).build(); + client.send(unsafer7, null); + + String unsafeUri8 = String.format("%s%s", request.getParameter("baduri8"), "https://example.com/"); + HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); + client.send(unsafer8, null); + } catch (Exception e) { // TODO: handle exception } From c63d5986cf0aa790164198f8038b8574fd3caba2 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 1 Apr 2021 15:31:56 +0100 Subject: [PATCH 1363/1662] Sanitize StringBuilder appends that follow directly from a constructor. Note that some of this logic ought to be incorporated into StringBuilderVar once that code can be reviewed. --- .../Security/CWE/CWE-918/RequestForgery.qll | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 1e80b14d3e53..34c3ee04fae6 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -229,11 +229,37 @@ private MethodAccess getNextAppend(MethodAccess append) { result = any(StringBuilderVar sbv).getNextAppend(append) } +private Expr getQualifier(MethodAccess e) { result = e.getQualifier() } + +private MethodAccess getAChainedAppend(Expr e) { + ( + result.getQualifier() = e + or + result.getQualifier() = getAChainedAppend(e) + ) and + result.getCallee().getDeclaringType() instanceof StringBuildingType and + result.getCallee().getName() = "append" +} + class HostnameSanitizedExpr extends Expr { HostnameSanitizedExpr() { // Sanitize expressions that come after a sanitizing prefix in a tree of string additions: this = getASanitizedAddOperand() or + // Sanitize all appends to a StringBuilder that is initialized with a sanitizing prefix: + // (note imprecision: if the same StringBuilder/StringBuffer has more than one constructor call, + // this sanitizes all of its append calls, not just those that may follow the constructor). + exists(StringBuilderVar sbv, ConstructorCall constructor, Expr initializer | + initializer = sbv.getAnAssignedValue() and + constructor = getQualifier*(initializer) and + constructor.getArgument(0) instanceof HostnameSanitzingPrefix and + ( + this = sbv.getAnAppend().getArgument(0) + or + this = getAChainedAppend(constructor).getArgument(0) + ) + ) + or // Sanitize expressions that come after a sanitizing prefix in a sequence of StringBuilder operations: exists(MethodAccess appendSanitizingConstant, MethodAccess subsequentAppend | appendSanitizingConstant.getArgument(0) instanceof HostnameSanitzingPrefix and From 26e10f3ad593e6a4dce48f6eda1a7432a69f2adc Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 1 Apr 2021 15:45:32 +0100 Subject: [PATCH 1364/1662] SSRF: don't consider results of fetches we initiated to be untrustworthy --- java/ql/src/Security/CWE/CWE-918/RequestForgery.ql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index e765a0553da5..cbae9afdb17d 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -18,7 +18,13 @@ import DataFlow::PathGraph class RequestForgeryConfiguration extends TaintTracking::Configuration { RequestForgeryConfiguration() { this = "Server Side Request Forgery" } - override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + override predicate isSource(DataFlow::Node source) { + source instanceof RemoteFlowSource and + // Exclude results of remote HTTP requests: fetching something else based on that result + // is no worse than following a redirect returned by the remote server, and typically + // we're requesting a resource via https which we trust to only send us to safe URLs. + not source.asExpr().(MethodAccess).getCallee() instanceof URLConnectionGetInputStreamMethod + } override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } From e6249eed79e28ebb04fc724a4640e6fbe80bee4e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 1 Apr 2021 16:34:31 +0100 Subject: [PATCH 1365/1662] Add doc comments --- java/ql/src/Security/CWE/CWE-918/RequestForgery.qll | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 34c3ee04fae6..b9eef13c1b2f 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -8,6 +8,9 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.StringFormat +/** + * Holds if taint is propagated from `pred` to `succ`. + */ predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { // propagate to a URI when its host is assigned to exists(UriCreation c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) @@ -205,6 +208,9 @@ private class HostnameSanitzingPrefix extends CompileTimeConstantExpr { ) } + /** + * Gets the offset in this constant string where a sanitizing substring begins. + */ int getOffset() { result = offset } } @@ -241,6 +247,11 @@ private MethodAccess getAChainedAppend(Expr e) { result.getCallee().getName() = "append" } +/** + * An expression that is sanitized because it is concatenated onto a string that looks like + * a hostname or a URL separator, preventing the appended string from arbitrarily controlling + * the addressed server. + */ class HostnameSanitizedExpr extends Expr { HostnameSanitizedExpr() { // Sanitize expressions that come after a sanitizing prefix in a tree of string additions: From bc43b6d76078668bf807ea0cc9056d07a9ac1fbd Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 6 Apr 2021 11:33:08 +0100 Subject: [PATCH 1366/1662] Fix typo --- .../ql/src/Security/CWE/CWE-918/RequestForgery.qll | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index b9eef13c1b2f..57f91afc7fee 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -199,10 +199,10 @@ private class SpringRestTemplateUrlMethods extends Method { /** A sanitizer for request forgery vulnerabilities. */ abstract class RequestForgerySanitizer extends DataFlow::Node { } -private class HostnameSanitzingPrefix extends CompileTimeConstantExpr { +private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { int offset; - HostnameSanitzingPrefix() { + HostnameSanitizingPrefix() { exists( this.getStringValue().regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*", 0, offset) ) @@ -217,7 +217,7 @@ private class HostnameSanitzingPrefix extends CompileTimeConstantExpr { private AddExpr getParentAdd(AddExpr e) { result = e.getParent() } private AddExpr getAnAddContainingHostnameSanitizingPrefix() { - result = getParentAdd*(any(HostnameSanitzingPrefix p).getParent()) + result = getParentAdd*(any(HostnameSanitizingPrefix p).getParent()) } private Expr getASanitizedAddOperand() { @@ -225,7 +225,7 @@ private Expr getASanitizedAddOperand() { e = getAnAddContainingHostnameSanitizingPrefix() and ( e.getLeftOperand() = getAnAddContainingHostnameSanitizingPrefix() or - e.getLeftOperand() instanceof HostnameSanitzingPrefix + e.getLeftOperand() instanceof HostnameSanitizingPrefix ) and result = e.getRightOperand() ) @@ -263,7 +263,7 @@ class HostnameSanitizedExpr extends Expr { exists(StringBuilderVar sbv, ConstructorCall constructor, Expr initializer | initializer = sbv.getAnAssignedValue() and constructor = getQualifier*(initializer) and - constructor.getArgument(0) instanceof HostnameSanitzingPrefix and + constructor.getArgument(0) instanceof HostnameSanitizingPrefix and ( this = sbv.getAnAppend().getArgument(0) or @@ -273,14 +273,14 @@ class HostnameSanitizedExpr extends Expr { or // Sanitize expressions that come after a sanitizing prefix in a sequence of StringBuilder operations: exists(MethodAccess appendSanitizingConstant, MethodAccess subsequentAppend | - appendSanitizingConstant.getArgument(0) instanceof HostnameSanitzingPrefix and + appendSanitizingConstant.getArgument(0) instanceof HostnameSanitizingPrefix and getNextAppend*(appendSanitizingConstant) = subsequentAppend and this = subsequentAppend.getArgument(0) ) or // Sanitize expressions that come after a sanitizing prefix in the args to a format call: exists( - FormattingCall formatCall, FormatString formatString, HostnameSanitzingPrefix prefix, + FormattingCall formatCall, FormatString formatString, HostnameSanitizingPrefix prefix, int sanitizedFromOffset, int laterOffset, int sanitizedArg | formatString = unique(FormatString fs | fs = formatCall.getAFormatString()) and From 6933d06a46912287a73d061e836a3893971c3dc5 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 6 Apr 2021 15:29:42 +0100 Subject: [PATCH 1367/1662] Add exactly the string '/' as a sanitizing prefix. Usually this is ignored for suspicion that it could be taken for a protocol specifier, but on balance the context `(something) + "/" + tainted()` is more likely to be taken for a user-controlled location within a host the user does not control. --- java/ql/src/Security/CWE/CWE-918/RequestForgery.qll | 3 ++- .../test/query-tests/security/CWE-918/RequestForgery.java | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 57f91afc7fee..7a90e1172e16 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -204,7 +204,8 @@ private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { HostnameSanitizingPrefix() { exists( - this.getStringValue().regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*", 0, offset) + this.getStringValue() + .regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*|^/$", 0, offset) ) } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java index 9fc323759bfb..d42377005d10 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java @@ -56,6 +56,10 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest r8 = HttpRequest.newBuilder(new URI(safeUri8)).build(); client.send(r8, null); + String safeUri9 = String.format("http://%s", "myserver.com") + "/" + request.getParameter("uri9"); + HttpRequest r9 = HttpRequest.newBuilder(new URI(safeUri9)).build(); + client.send(r9, null); + // BAD: cases where a string that would sanitise is used, but occurs in the wrong // place to sanitise user input: String unsafeUri3 = request.getParameter("baduri3") + "https://example.com/"; @@ -83,6 +87,10 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); client.send(unsafer8, null); + String unsafeUri9 = request.getParameter("baduri9") + "/" + String.format("http://%s", "myserver.com"); + HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); + client.send(unsafer9, null); + } catch (Exception e) { // TODO: handle exception } From 77904d95973ed59d731bc1dbd58c7c4eea687394 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 6 Apr 2021 15:34:04 +0100 Subject: [PATCH 1368/1662] Remove failing test The case where something might be exactly a constant is general across all queries, and not handled yet, particularly in the case where the result of `getParameter("uri")` might have changed between the check and the use. --- .../security/CWE-918/RequestForgery.expected | 55 ++++++++++--------- .../security/CWE-918/RequestForgery.java | 6 -- 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index eac1933b388b..61015908ef76 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -15,13 +15,13 @@ edges | RequestForgery.java:19:23:19:58 | new URI(...) : URI | RequestForgery.java:27:57:27:59 | uri | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:19:23:19:58 | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | -| RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:27:57:27:59 | uri | -| RequestForgery.java:61:33:61:63 | getParameter(...) : String | RequestForgery.java:62:59:62:77 | new URI(...) | -| RequestForgery.java:65:49:65:79 | getParameter(...) : String | RequestForgery.java:66:59:66:77 | new URI(...) | -| RequestForgery.java:70:31:70:61 | getParameter(...) : String | RequestForgery.java:71:59:71:88 | new URI(...) | -| RequestForgery.java:74:73:74:103 | getParameter(...) : String | RequestForgery.java:75:59:75:77 | new URI(...) | -| RequestForgery.java:78:56:78:86 | getParameter(...) : String | RequestForgery.java:79:59:79:77 | new URI(...) | -| RequestForgery.java:82:55:82:85 | getParameter(...) : String | RequestForgery.java:83:59:83:77 | new URI(...) | +| RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | +| RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | +| RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | +| RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | +| RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | +| RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | +| RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | @@ -49,19 +49,20 @@ nodes | RequestForgery.java:19:23:19:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:22:52:22:54 | uri | semmle.label | uri | -| RequestForgery.java:27:57:27:59 | uri | semmle.label | uri | -| RequestForgery.java:61:33:61:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:62:59:62:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:65:49:65:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:66:59:66:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:70:31:70:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:71:59:71:88 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:74:73:74:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:75:59:75:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:78:56:78:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:79:59:79:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:82:55:82:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:83:59:83:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:59:33:59:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:60:59:60:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:63:49:63:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:64:59:64:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:68:31:68:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:69:59:69:88 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:72:73:72:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:73:59:73:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:76:56:76:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:77:59:77:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:80:55:80:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:81:59:81:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:84:33:84:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:85:59:85:77 | new URI(...) | semmle.label | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | | SpringSSRF.java:32:47:32:67 | ... + ... | semmle.label | ... + ... | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | @@ -83,13 +84,13 @@ nodes | RequestForgery2.java:67:43:67:45 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | | RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | | RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | -| RequestForgery.java:27:57:27:59 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:27:57:27:59 | uri | Potential server side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | -| RequestForgery.java:62:59:62:77 | new URI(...) | RequestForgery.java:61:33:61:63 | getParameter(...) : String | RequestForgery.java:62:59:62:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:61:33:61:63 | getParameter(...) | a user-provided value | -| RequestForgery.java:66:59:66:77 | new URI(...) | RequestForgery.java:65:49:65:79 | getParameter(...) : String | RequestForgery.java:66:59:66:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:65:49:65:79 | getParameter(...) | a user-provided value | -| RequestForgery.java:71:59:71:88 | new URI(...) | RequestForgery.java:70:31:70:61 | getParameter(...) : String | RequestForgery.java:71:59:71:88 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:70:31:70:61 | getParameter(...) | a user-provided value | -| RequestForgery.java:75:59:75:77 | new URI(...) | RequestForgery.java:74:73:74:103 | getParameter(...) : String | RequestForgery.java:75:59:75:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:74:73:74:103 | getParameter(...) | a user-provided value | -| RequestForgery.java:79:59:79:77 | new URI(...) | RequestForgery.java:78:56:78:86 | getParameter(...) : String | RequestForgery.java:79:59:79:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:78:56:78:86 | getParameter(...) | a user-provided value | -| RequestForgery.java:83:59:83:77 | new URI(...) | RequestForgery.java:82:55:82:85 | getParameter(...) : String | RequestForgery.java:83:59:83:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:82:55:82:85 | getParameter(...) | a user-provided value | +| RequestForgery.java:60:59:60:77 | new URI(...) | RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:59:33:59:63 | getParameter(...) | a user-provided value | +| RequestForgery.java:64:59:64:77 | new URI(...) | RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:63:49:63:79 | getParameter(...) | a user-provided value | +| RequestForgery.java:69:59:69:88 | new URI(...) | RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:68:31:68:61 | getParameter(...) | a user-provided value | +| RequestForgery.java:73:59:73:77 | new URI(...) | RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:72:73:72:103 | getParameter(...) | a user-provided value | +| RequestForgery.java:77:59:77:77 | new URI(...) | RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:76:56:76:86 | getParameter(...) | a user-provided value | +| RequestForgery.java:81:59:81:77 | new URI(...) | RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:80:55:80:85 | getParameter(...) | a user-provided value | +| RequestForgery.java:85:59:85:77 | new URI(...) | RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:84:33:84:63 | getParameter(...) | a user-provided value | | SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java index d42377005d10..d4febb9b94b5 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java @@ -22,12 +22,6 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest r = HttpRequest.newBuilder(uri).build(); client.send(r, null); - // GOOD: the request parameter is validated against a known fixed string - if (VALID_URI.equals(request.getParameter("uri"))) { - HttpRequest r2 = HttpRequest.newBuilder(uri).build(); - client.send(r2, null); - } - // GOOD: sanitisation by concatenation with a prefix that prevents targeting an arbitrary host. // We test a few different ways of sanitisation: via string conctentation (perhaps nested), // via a stringbuilder and via String.format. From 93a9f471cedd3c4f308771199a4defcd395cb97c Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 6 Apr 2021 15:41:18 +0100 Subject: [PATCH 1369/1662] Add change note --- java/change-notes/2021-04-06-ssrf-query.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-04-06-ssrf-query.md diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md new file mode 100644 index 000000000000..869ecb878358 --- /dev/null +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The server-side request forgery (SSRF) query has been promoted from experimental to the main query pack. Its results will now appear by default. From 3333e7d186d9360ff95c63aabee2e1cf64dd8b30 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 14 Apr 2021 13:07:57 +0100 Subject: [PATCH 1370/1662] Java SSRF query: sanitize primitives Even 'char' isn't a realistic vector for an exploit, unless somebody is copying out a string char by char. --- java/ql/src/Security/CWE/CWE-918/RequestForgery.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 7a90e1172e16..370ceb8fe1c2 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -199,6 +199,10 @@ private class SpringRestTemplateUrlMethods extends Method { /** A sanitizer for request forgery vulnerabilities. */ abstract class RequestForgerySanitizer extends DataFlow::Node { } +private class PrimitiveSanitizer extends RequestForgerySanitizer { + PrimitiveSanitizer() { this.getType() instanceof PrimitiveType } +} + private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { int offset; From e8613367e85d3fb011c1c0270beba58ac0fe79e4 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 14 Apr 2021 13:09:58 +0100 Subject: [PATCH 1371/1662] Java SSRF query: copyedit qhelp --- java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp index 0a34747413de..22271ee4feb9 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp @@ -5,22 +5,22 @@ -

    Directly incorporating user input into a HTTP request without validating the input +

    Directly incorporating user input into an HTTP request without validating the input can facilitate Server Side Request Forgery (SSRF) attacks. In these attacks, the server -may be tricked into making a request and interacting with an attacker-controlled server. +may be tricked into making a request and interacting with an attacker-controlled server.

    To guard against SSRF attacks, it is advisable to avoid putting user input -directly into the request URL. Instead, maintain a list of authorized +directly into a request URL. Instead, maintain a list of authorized URLs on the server; then choose from that list based on the user input provided.

    -

    The following example shows an HTTP request parameter being used directly in a forming a +

    The following example shows an HTTP request parameter being used directly to form a new request without validating the input, which facilitates SSRF attacks. It also shows how to remedy the problem by validating the user input against a known fixed string.

    From 5bdd9da27a5571ff9c742aa058fdf93d97eb82a1 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 14 Apr 2021 13:11:31 +0100 Subject: [PATCH 1372/1662] Java SSRF query: credit original author --- java/change-notes/2021-04-06-ssrf-query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md index 869ecb878358..180c2511d0c5 100644 --- a/java/change-notes/2021-04-06-ssrf-query.md +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The server-side request forgery (SSRF) query has been promoted from experimental to the main query pack. Its results will now appear by default. +* The server-side request forgery (SSRF) query has been promoted from experimental to the main query pack. Its results will now appear by default. Thanks to original experimental query author @porcupineyhairs. From 532a10bfdfe580a18eed2b84c12ef01b88e1bbf4 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 15 Apr 2021 14:47:50 +0100 Subject: [PATCH 1373/1662] Java SSRF query: Provide hook for custom taint-propagating steps; make all default sinks/sanitizers/steps private. --- .../Security/CWE/CWE-918/RequestForgery.ql | 2 +- .../Security/CWE/CWE-918/RequestForgery.qll | 74 ++++++++++--------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index cbae9afdb17d..424edf3b36a7 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -29,7 +29,7 @@ class RequestForgeryConfiguration extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - requestForgeryStep(pred, succ) + any(RequestForgeryAdditionalTaintStep r).propagatesTaint(pred, succ) } override predicate isSanitizer(DataFlow::Node node) { node instanceof RequestForgerySanitizer } diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll index 370ceb8fe1c2..f9694f1ca258 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll @@ -8,39 +8,47 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.StringFormat -/** - * Holds if taint is propagated from `pred` to `succ`. - */ -predicate requestForgeryStep(DataFlow::Node pred, DataFlow::Node succ) { - // propagate to a URI when its host is assigned to - exists(UriCreation c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) - or - // propagate to a URL when its host is assigned to - exists(UrlConstructorCall c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) - or - // propagate to a RequestEntity when its url is assigned to - exists(MethodAccess m | - m.getMethod().getDeclaringType() instanceof SpringRequestEntity and - ( - m.getMethod().hasName(["get", "post", "head", "delete", "options", "patch", "put"]) and - m.getArgument(0) = pred.asExpr() and - m = succ.asExpr() - or - m.getMethod().hasName("method") and - m.getArgument(1) = pred.asExpr() and +abstract class RequestForgeryAdditionalTaintStep extends string { + bindingset[this] + RequestForgeryAdditionalTaintStep() { any() } + + abstract predicate propagatesTaint(DataFlow::Node pred, DataFlow::Node succ); +} + +private class DefaultRequestForgeryAdditionalTaintStep extends RequestForgeryAdditionalTaintStep { + DefaultRequestForgeryAdditionalTaintStep() { this = "DefaultRequestForgeryAdditionalTaintStep" } + + override predicate propagatesTaint(DataFlow::Node pred, DataFlow::Node succ) { + // propagate to a URI when its host is assigned to + exists(UriCreation c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) + or + // propagate to a URL when its host is assigned to + exists(UrlConstructorCall c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) + or + // propagate to a RequestEntity when its url is assigned to + exists(MethodAccess m | + m.getMethod().getDeclaringType() instanceof SpringRequestEntity and + ( + m.getMethod().hasName(["get", "post", "head", "delete", "options", "patch", "put"]) and + m.getArgument(0) = pred.asExpr() and + m = succ.asExpr() + or + m.getMethod().hasName("method") and + m.getArgument(1) = pred.asExpr() and + m = succ.asExpr() + ) + ) + or + // propagate from a `RequestEntity<>$BodyBuilder` to a `RequestEntity` + // when the builder is tainted + exists(MethodAccess m, RefType t | + m.getMethod().getDeclaringType() = t and + t.hasQualifiedName("org.springframework.http", "RequestEntity<>$BodyBuilder") and + m.getMethod().hasName("body") and + m.getQualifier() = pred.asExpr() and m = succ.asExpr() ) - ) - or - // propagate from a `RequestEntity<>$BodyBuilder` to a `RequestEntity` - // when the builder is tainted - exists(MethodAccess m, RefType t | - m.getMethod().getDeclaringType() = t and - t.hasQualifiedName("org.springframework.http", "RequestEntity<>$BodyBuilder") and - m.getMethod().hasName("body") and - m.getQualifier() = pred.asExpr() and - m = succ.asExpr() - ) + } } /** A data flow sink for request forgery vulnerabilities. */ @@ -257,7 +265,7 @@ private MethodAccess getAChainedAppend(Expr e) { * a hostname or a URL separator, preventing the appended string from arbitrarily controlling * the addressed server. */ -class HostnameSanitizedExpr extends Expr { +private class HostnameSanitizedExpr extends Expr { HostnameSanitizedExpr() { // Sanitize expressions that come after a sanitizing prefix in a tree of string additions: this = getASanitizedAddOperand() @@ -311,6 +319,6 @@ class HostnameSanitizedExpr extends Expr { * A value that is the result of prepending a string that prevents any value from controlling the * host of a URL. */ -class HostnameSantizer extends RequestForgerySanitizer { +private class HostnameSantizer extends RequestForgerySanitizer { HostnameSantizer() { this.asExpr() instanceof HostnameSanitizedExpr } } From 7899e17f3a01e4617e3ca44433bf43dcd29fbff9 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 15 Apr 2021 15:15:17 +0100 Subject: [PATCH 1374/1662] Java SSRF query: move RequestForgery qll file into semmle/code hierarchy This makes it importable by people wishing to extend the query. --- java/ql/src/Security/CWE/CWE-918/RequestForgery.ql | 2 +- .../CWE-918 => semmle/code/java/security}/RequestForgery.qll | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename java/ql/src/{Security/CWE/CWE-918 => semmle/code/java/security}/RequestForgery.qll (100%) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index 424edf3b36a7..0efc36471ca8 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -12,7 +12,7 @@ import java import semmle.code.java.dataflow.FlowSources -import RequestForgery +import semmle.code.java.security.RequestForgery import DataFlow::PathGraph class RequestForgeryConfiguration extends TaintTracking::Configuration { diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll similarity index 100% rename from java/ql/src/Security/CWE/CWE-918/RequestForgery.qll rename to java/ql/src/semmle/code/java/security/RequestForgery.qll From 575198a0e4858bf651b352ae9d5bfbebed99a4bb Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 15 Apr 2021 15:15:56 +0100 Subject: [PATCH 1375/1662] Java SSRF query: Server Side -> Server-Side everywhere. --- java/change-notes/2021-04-06-ssrf-query.md | 2 +- .../Security/CWE/CWE-918/RequestForgery.qhelp | 2 +- .../Security/CWE/CWE-918/RequestForgery.ql | 6 +-- .../security/CWE-918/RequestForgery.expected | 50 +++++++++---------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md index 180c2511d0c5..ad8e11c6132e 100644 --- a/java/change-notes/2021-04-06-ssrf-query.md +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The server-side request forgery (SSRF) query has been promoted from experimental to the main query pack. Its results will now appear by default. Thanks to original experimental query author @porcupineyhairs. +* The query "Server-Side Request Forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. Thanks to original experimental query author @porcupineyhairs. diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp index 22271ee4feb9..d1aa772de2b1 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp @@ -6,7 +6,7 @@

    Directly incorporating user input into an HTTP request without validating the input -can facilitate Server Side Request Forgery (SSRF) attacks. In these attacks, the server +can facilitate Server-Side Request Forgery (SSRF) attacks. In these attacks, the server may be tricked into making a request and interacting with an attacker-controlled server.

    diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index 0efc36471ca8..27d55836f073 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -1,5 +1,5 @@ /** - * @name Server Side Request Forgery (SSRF) + * @name Server-Side Request Forgery (SSRF) * @description Making web requests based on unvalidated user-input * may cause server to communicate with malicious servers. * @kind path-problem @@ -16,7 +16,7 @@ import semmle.code.java.security.RequestForgery import DataFlow::PathGraph class RequestForgeryConfiguration extends TaintTracking::Configuration { - RequestForgeryConfiguration() { this = "Server Side Request Forgery" } + RequestForgeryConfiguration() { this = "Server-Side Request Forgery" } override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource and @@ -37,5 +37,5 @@ class RequestForgeryConfiguration extends TaintTracking::Configuration { from DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf where conf.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "Potential server side request forgery due to $@.", +select sink.getNode(), source, sink, "Potential server-side request forgery due to $@.", source.getNode(), "a user-provided value" diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index 61015908ef76..f3aa952103a8 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -75,28 +75,28 @@ nodes | SpringSSRF.java:66:48:66:61 | fooResourceUrl | semmle.label | fooResourceUrl | | SpringSSRF.java:69:30:69:43 | fooResourceUrl | semmle.label | fooResourceUrl | #select -| JaxWsSSRF.java:22:23:22:25 | url | JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | JaxWsSSRF.java:22:23:22:25 | url | Potential server side request forgery due to $@. | JaxWsSSRF.java:21:22:21:48 | getParameter(...) | a user-provided value | -| RequestForgery2.java:55:32:55:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:55:32:55:35 | url1 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:58:32:58:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:58:32:58:35 | url1 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:59:30:59:33 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:59:30:59:33 | url1 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:63:65:63:68 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:63:65:63:68 | uri2 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:64:59:64:61 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:64:59:64:61 | uri | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:67:43:67:45 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | -| RequestForgery.java:60:59:60:77 | new URI(...) | RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:59:33:59:63 | getParameter(...) | a user-provided value | -| RequestForgery.java:64:59:64:77 | new URI(...) | RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:63:49:63:79 | getParameter(...) | a user-provided value | -| RequestForgery.java:69:59:69:88 | new URI(...) | RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:68:31:68:61 | getParameter(...) | a user-provided value | -| RequestForgery.java:73:59:73:77 | new URI(...) | RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:72:73:72:103 | getParameter(...) | a user-provided value | -| RequestForgery.java:77:59:77:77 | new URI(...) | RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:76:56:76:86 | getParameter(...) | a user-provided value | -| RequestForgery.java:81:59:81:77 | new URI(...) | RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:80:55:80:85 | getParameter(...) | a user-provided value | -| RequestForgery.java:85:59:85:77 | new URI(...) | RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | Potential server side request forgery due to $@. | RequestForgery.java:84:33:84:63 | getParameter(...) | a user-provided value | -| SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:45:47:45:60 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:54:59:54:72 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:58:74:58:96 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:62:57:62:70 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:66:48:66:61 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:66:48:66:61 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:69:30:69:43 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:69:30:69:43 | fooResourceUrl | Potential server side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| JaxWsSSRF.java:22:23:22:25 | url | JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | JaxWsSSRF.java:22:23:22:25 | url | Potential server-side request forgery due to $@. | JaxWsSSRF.java:21:22:21:48 | getParameter(...) | a user-provided value | +| RequestForgery2.java:55:32:55:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:55:32:55:35 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:58:32:58:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:58:32:58:35 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:59:30:59:33 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:59:30:59:33 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:63:65:63:68 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:63:65:63:68 | uri2 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:64:59:64:61 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:64:59:64:61 | uri | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:67:43:67:45 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | +| RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server-side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | +| RequestForgery.java:60:59:60:77 | new URI(...) | RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:59:33:59:63 | getParameter(...) | a user-provided value | +| RequestForgery.java:64:59:64:77 | new URI(...) | RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:63:49:63:79 | getParameter(...) | a user-provided value | +| RequestForgery.java:69:59:69:88 | new URI(...) | RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:68:31:68:61 | getParameter(...) | a user-provided value | +| RequestForgery.java:73:59:73:77 | new URI(...) | RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:72:73:72:103 | getParameter(...) | a user-provided value | +| RequestForgery.java:77:59:77:77 | new URI(...) | RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:76:56:76:86 | getParameter(...) | a user-provided value | +| RequestForgery.java:81:59:81:77 | new URI(...) | RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:80:55:80:85 | getParameter(...) | a user-provided value | +| RequestForgery.java:85:59:85:77 | new URI(...) | RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:84:33:84:63 | getParameter(...) | a user-provided value | +| SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:45:47:45:60 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:54:59:54:72 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:58:74:58:96 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:62:57:62:70 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:66:48:66:61 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:66:48:66:61 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:69:30:69:43 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:69:30:69:43 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | From 960a9031853292488e92df2f3494f2f16fb7b3ad Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 16 Apr 2021 11:18:57 +0100 Subject: [PATCH 1376/1662] Java SSRF query: document RequestForgeryAdditionalTaintStep and use Unit not string for a supertype. --- .../code/java/security/RequestForgery.qll | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index f9694f1ca258..32ef13706b3a 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -1,3 +1,5 @@ +/** Provides classes to reason about Server-side Request Forgery attacks. */ + import java import semmle.code.java.frameworks.Networking import semmle.code.java.frameworks.ApacheHttp @@ -8,16 +10,21 @@ import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.StringFormat -abstract class RequestForgeryAdditionalTaintStep extends string { - bindingset[this] - RequestForgeryAdditionalTaintStep() { any() } - +/** + * A unit class for adding additional taint steps that are specific to Server-side + * Request Forgery (SSRF) attacks. + * + * Extend this class to add additional taint steps to the SSRF query. + */ +class RequestForgeryAdditionalTaintStep extends Unit { + /** + * Holds if the step from `pred` to `succ` should be considered a taint + * step for Server-side Request Forgery. + */ abstract predicate propagatesTaint(DataFlow::Node pred, DataFlow::Node succ); } private class DefaultRequestForgeryAdditionalTaintStep extends RequestForgeryAdditionalTaintStep { - DefaultRequestForgeryAdditionalTaintStep() { this = "DefaultRequestForgeryAdditionalTaintStep" } - override predicate propagatesTaint(DataFlow::Node pred, DataFlow::Node succ) { // propagate to a URI when its host is assigned to exists(UriCreation c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) From fb2989c16b9fb37227cc1f0b1b6f11191bc8a77b Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 19 Apr 2021 14:02:27 +0100 Subject: [PATCH 1377/1662] Copyedit comments and function names Co-authored-by: Felicity Chapman --- java/change-notes/2021-04-06-ssrf-query.md | 2 +- .../Security/CWE/CWE-918/RequestForgery.qhelp | 2 +- .../Security/CWE/CWE-918/RequestForgery.ql | 4 +-- .../code/java/security/RequestForgery.qll | 32 +++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md index ad8e11c6132e..2ad36dcab83a 100644 --- a/java/change-notes/2021-04-06-ssrf-query.md +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The query "Server-Side Request Forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. Thanks to original experimental query author @porcupineyhairs. +* The query "Server-Side Request Forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/3454). diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp index d1aa772de2b1..1b63afde6fe7 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp @@ -6,7 +6,7 @@

    Directly incorporating user input into an HTTP request without validating the input -can facilitate Server-Side Request Forgery (SSRF) attacks. In these attacks, the server +can facilitate server-side request forgery (SSRF) attacks. In these attacks, the server may be tricked into making a request and interacting with an attacker-controlled server.

    diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index 27d55836f073..8071202a4b0f 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -1,7 +1,7 @@ /** - * @name Server-Side Request Forgery (SSRF) + * @name Server-side request forgery * @description Making web requests based on unvalidated user-input - * may cause server to communicate with malicious servers. + * may cause the server to communicate with malicious servers. * @kind path-problem * @problem.severity error * @precision high diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 32ef13706b3a..0a453aafe493 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -1,4 +1,4 @@ -/** Provides classes to reason about Server-side Request Forgery attacks. */ +/** Provides classes to reason about server-side request forgery (SSRF) attacks. */ import java import semmle.code.java.frameworks.Networking @@ -58,11 +58,11 @@ private class DefaultRequestForgeryAdditionalTaintStep extends RequestForgeryAdd } } -/** A data flow sink for request forgery vulnerabilities. */ +/** A data flow sink for server-side request forgery (SSRF) vulnerabilities. */ abstract class RequestForgerySink extends DataFlow::Node { } /** - * An argument to an url `openConnection` or `openStream` call + * An argument to a url `openConnection` or `openStream` call * taken as a sink for request forgery vulnerabilities. */ private class UrlOpen extends RequestForgerySink { @@ -92,7 +92,7 @@ private class ApacheSetUri extends RequestForgerySink { } /** - * An argument to any Apache Request Instantiation call taken as a + * An argument to any Apache `HttpRequest` instantiation taken as a * sink for request forgery vulnerabilities. */ private class ApacheHttpRequestInstantiation extends RequestForgerySink { @@ -104,7 +104,7 @@ private class ApacheHttpRequestInstantiation extends RequestForgerySink { } /** - * An argument to a Apache RequestBuilder method call taken as a + * An argument to an Apache `RequestBuilder` method call taken as a * sink for request forgery vulnerabilities. */ private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { @@ -119,14 +119,14 @@ private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { } /** - * An argument to any Java.net.http.request Instantiation call taken as a + * An argument to any `java.net.http.HttpRequest` Instantiation taken as a * sink for request forgery vulnerabilities. */ private class HttpRequestNewBuilder extends RequestForgerySink { HttpRequestNewBuilder() { exists(MethodAccess call | call.getCallee().hasName("newBuilder") and - call.getMethod().getDeclaringType().getName() = "HttpRequest" + call.getMethod().getDeclaringType().hasQualifiedName("java.net.http", "HttpRequest") | this.asExpr() = call.getArgument(0) ) @@ -134,7 +134,7 @@ private class HttpRequestNewBuilder extends RequestForgerySink { } /** - * An argument to an Http Builder `uri` call taken as a + * An argument to an `HttpBuilder` `uri` call taken as a * sink for request forgery vulnerabilities. */ private class HttpBuilderUriArgument extends RequestForgerySink { @@ -146,7 +146,7 @@ private class HttpBuilderUriArgument extends RequestForgerySink { } /** - * An argument to a Spring Rest Template method call taken as a + * An argument to a Spring `RestTemplate` method call taken as a * sink for request forgery vulnerabilities. */ private class SpringRestTemplateArgument extends RequestForgerySink { @@ -158,7 +158,7 @@ private class SpringRestTemplateArgument extends RequestForgerySink { } /** - * An argument to `javax.ws.rs.Client`s `target` method call taken as a + * An argument to a `javax.ws.rs.Client` `target` method call taken as a * sink for request forgery vulnerabilities. */ private class JaxRsClientTarget extends RequestForgerySink { @@ -173,7 +173,7 @@ private class JaxRsClientTarget extends RequestForgerySink { } /** - * An argument to `org.springframework.http.RequestEntity`s constructor call + * An argument to an `org.springframework.http.RequestEntity` constructor call * which is an URI taken as a sink for request forgery vulnerabilities. */ private class RequestEntityUriArg extends RequestForgerySink { @@ -188,11 +188,11 @@ private class RequestEntityUriArg extends RequestForgerySink { } /** - * A class representing all Spring Rest Template methods - * which take an URL as an argument. + * A Spring Rest Template method + * which take a URL as an argument. */ -private class SpringRestTemplateUrlMethods extends Method { - SpringRestTemplateUrlMethods() { +private class SpringRestTemplateUrlMethod extends Method { + SpringRestTemplateUrlMethod() { this.getDeclaringType() instanceof SpringRestTemplate and this.hasName([ "doExecute", "postForEntity", "postForLocation", "postForObject", "put", "exchange", @@ -305,7 +305,7 @@ private class HostnameSanitizedExpr extends Expr { | formatString = unique(FormatString fs | fs = formatCall.getAFormatString()) and ( - // An argument that sanitizes will be come before this: + // A sanitizing argument comes before this: exists(int argIdx | formatCall.getArgumentToBeFormatted(argIdx) = prefix and sanitizedFromOffset = formatString.getAnArgUsageOffset(argIdx) From 0d9a6e2b6174b724dc54e88318a0f212bc819b93 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 19 Apr 2021 14:25:34 +0100 Subject: [PATCH 1378/1662] Update java/ql/src/semmle/code/java/security/RequestForgery.qll SpringRestTemplateUrlMethods -> SpringRestTemplateUrlMethod --- java/ql/src/semmle/code/java/security/RequestForgery.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 0a453aafe493..1ff2a58b7a0b 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -152,7 +152,7 @@ private class HttpBuilderUriArgument extends RequestForgerySink { private class SpringRestTemplateArgument extends RequestForgerySink { SpringRestTemplateArgument() { exists(MethodAccess ma | - this.asExpr() = ma.getMethod().(SpringRestTemplateUrlMethods).getUrlArgument(ma) + this.asExpr() = ma.getMethod().(SpringRestTemplateUrlMethod).getUrlArgument(ma) ) } } From a665d5d11127b94fd430e06a33e5f178cb3f5b53 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 19 Apr 2021 14:51:56 +0100 Subject: [PATCH 1379/1662] Improve RequestForgery.qhelp recommendation --- java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp index 1b63afde6fe7..f89198ee378c 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.qhelp @@ -13,9 +13,11 @@ may be tricked into making a request and interacting with an attacker-controlled
    -

    To guard against SSRF attacks, it is advisable to avoid putting user input +

    To guard against SSRF attacks, you should avoid putting user-provided input directly into a request URL. Instead, maintain a list of authorized -URLs on the server; then choose from that list based on the user input provided.

    +URLs on the server; then choose from that list based on the input provided. +Alternatively, ensure requests constructed from user input are limited to +a particular host or more restrictive URL prefix.

    From b25e8671b931e5c33e6f818dcda5dc102d2ea434 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 19 Apr 2021 16:33:29 +0100 Subject: [PATCH 1380/1662] Java SSRF query: comment on sanitizing regex --- java/ql/src/semmle/code/java/security/RequestForgery.qll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 1ff2a58b7a0b..c57fb0b33cb3 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -222,6 +222,10 @@ private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { int offset; HostnameSanitizingPrefix() { + // Matches strings that look like when prepended to untrusted input, they will restrict + // the host or entity addressed: for example, anything containing `?` or `#`, or a slash that + // doesn't appear to be a protocol specifier (e.g. `http://` is not sanitizing), or specifically + // the string "/". exists( this.getStringValue() .regexpFind(".*([?#]|[^?#:/\\\\][/\\\\]).*|[/\\\\][^/\\\\].*|^/$", 0, offset) From 9138d2b8f53f90d725a12306da104af59745cd62 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 22 Apr 2021 12:07:33 +0100 Subject: [PATCH 1381/1662] Improve comment casing Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> --- java/ql/src/semmle/code/java/security/RequestForgery.qll | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index c57fb0b33cb3..d69a78519a65 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -11,15 +11,14 @@ import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.StringFormat /** - * A unit class for adding additional taint steps that are specific to Server-side - * Request Forgery (SSRF) attacks. + * A unit class for adding additional taint steps that are specific to server-side request forgery (SSRF) attacks. * * Extend this class to add additional taint steps to the SSRF query. */ class RequestForgeryAdditionalTaintStep extends Unit { /** * Holds if the step from `pred` to `succ` should be considered a taint - * step for Server-side Request Forgery. + * step for server-side request forgery. */ abstract predicate propagatesTaint(DataFlow::Node pred, DataFlow::Node succ); } @@ -119,7 +118,7 @@ private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { } /** - * An argument to any `java.net.http.HttpRequest` Instantiation taken as a + * An argument to any `java.net.http.HttpRequest` instantiation taken as a * sink for request forgery vulnerabilities. */ private class HttpRequestNewBuilder extends RequestForgerySink { From 8d70e3d22e27d4997450aba62f57f04a36703afb Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 28 Apr 2021 15:15:01 +0100 Subject: [PATCH 1382/1662] Fix casing of change note --- java/change-notes/2021-04-06-ssrf-query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md index 2ad36dcab83a..99b4d77aaadc 100644 --- a/java/change-notes/2021-04-06-ssrf-query.md +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The query "Server-Side Request Forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/3454). +* The query "Server-side request forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/3454). From 1549993565744a40c847bee2ca3452d946d85260 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 28 Apr 2021 15:20:53 +0100 Subject: [PATCH 1383/1662] Update test results to account for changed model structure (Models now have internal nodes in order to allow field flow through them) --- .../security/CWE-918/RequestForgery.expected | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index f3aa952103a8..170ae08cd720 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -12,16 +12,29 @@ edges | RequestForgery2.java:25:23:25:35 | new URI(...) : URI | RequestForgery2.java:67:43:67:45 | uri | | RequestForgery2.java:25:31:25:34 | sink : String | RequestForgery2.java:25:23:25:35 | new URI(...) : URI | | RequestForgery.java:19:23:19:58 | new URI(...) : URI | RequestForgery.java:22:52:22:54 | uri | -| RequestForgery.java:19:23:19:58 | new URI(...) : URI | RequestForgery.java:27:57:27:59 | uri | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:19:23:19:58 | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | | RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | +| RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:67:60:76 | unsafeUri3 : String | +| RequestForgery.java:60:67:60:76 | unsafeUri3 : String | RequestForgery.java:60:59:60:77 | new URI(...) | | RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | +| RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:67:64:76 | unsafeUri4 : String | +| RequestForgery.java:64:67:64:76 | unsafeUri4 : String | RequestForgery.java:64:59:64:77 | new URI(...) | | RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | +| RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:67:69:87 | toString(...) : String | +| RequestForgery.java:69:67:69:87 | toString(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | | RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | +| RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:67:73:76 | unsafeUri6 : String | +| RequestForgery.java:73:67:73:76 | unsafeUri6 : String | RequestForgery.java:73:59:73:77 | new URI(...) | | RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | +| RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:67:77:76 | unsafeUri7 : String | +| RequestForgery.java:77:67:77:76 | unsafeUri7 : String | RequestForgery.java:77:59:77:77 | new URI(...) | | RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | +| RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:67:81:76 | unsafeUri8 : String | +| RequestForgery.java:81:67:81:76 | unsafeUri8 : String | RequestForgery.java:81:59:81:77 | new URI(...) | | RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | +| RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:67:85:76 | unsafeUri9 : String | +| RequestForgery.java:85:67:85:76 | unsafeUri9 : String | RequestForgery.java:85:59:85:77 | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | @@ -51,18 +64,25 @@ nodes | RequestForgery.java:22:52:22:54 | uri | semmle.label | uri | | RequestForgery.java:59:33:59:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:60:59:60:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:60:67:60:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | | RequestForgery.java:63:49:63:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:64:59:64:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:64:67:64:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | | RequestForgery.java:68:31:68:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:69:59:69:88 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:69:67:69:87 | toString(...) : String | semmle.label | toString(...) : String | | RequestForgery.java:72:73:72:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:73:59:73:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:73:67:73:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | | RequestForgery.java:76:56:76:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:77:59:77:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:77:67:77:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | | RequestForgery.java:80:55:80:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:81:59:81:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:81:67:81:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | | RequestForgery.java:84:33:84:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:85:59:85:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:85:67:85:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | | SpringSSRF.java:32:47:32:67 | ... + ... | semmle.label | ... + ... | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | From 0db5484399fae140d38cfc3a69bec8b1c11e4dc3 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 10 May 2021 16:55:32 +0100 Subject: [PATCH 1384/1662] Copyedit documentation Co-authored-by: Anders Schack-Mulligen --- .../code/java/security/RequestForgery.qll | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index d69a78519a65..5758bbb38199 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -62,7 +62,7 @@ abstract class RequestForgerySink extends DataFlow::Node { } /** * An argument to a url `openConnection` or `openStream` call - * taken as a sink for request forgery vulnerabilities. + * taken as a sink for request forgery vulnerabilities. */ private class UrlOpen extends RequestForgerySink { UrlOpen() { @@ -77,7 +77,7 @@ private class UrlOpen extends RequestForgerySink { /** * An argument to an Apache `setURI` call taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class ApacheSetUri extends RequestForgerySink { ApacheSetUri() { @@ -92,7 +92,7 @@ private class ApacheSetUri extends RequestForgerySink { /** * An argument to any Apache `HttpRequest` instantiation taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class ApacheHttpRequestInstantiation extends RequestForgerySink { ApacheHttpRequestInstantiation() { @@ -104,7 +104,7 @@ private class ApacheHttpRequestInstantiation extends RequestForgerySink { /** * An argument to an Apache `RequestBuilder` method call taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { ApacheHttpRequestBuilderArgument() { @@ -119,7 +119,7 @@ private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { /** * An argument to any `java.net.http.HttpRequest` instantiation taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class HttpRequestNewBuilder extends RequestForgerySink { HttpRequestNewBuilder() { @@ -134,7 +134,7 @@ private class HttpRequestNewBuilder extends RequestForgerySink { /** * An argument to an `HttpBuilder` `uri` call taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class HttpBuilderUriArgument extends RequestForgerySink { HttpBuilderUriArgument() { @@ -146,7 +146,7 @@ private class HttpBuilderUriArgument extends RequestForgerySink { /** * An argument to a Spring `RestTemplate` method call taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class SpringRestTemplateArgument extends RequestForgerySink { SpringRestTemplateArgument() { @@ -158,7 +158,7 @@ private class SpringRestTemplateArgument extends RequestForgerySink { /** * An argument to a `javax.ws.rs.Client` `target` method call taken as a - * sink for request forgery vulnerabilities. + * sink for request forgery vulnerabilities. */ private class JaxRsClientTarget extends RequestForgerySink { JaxRsClientTarget() { @@ -172,8 +172,8 @@ private class JaxRsClientTarget extends RequestForgerySink { } /** - * An argument to an `org.springframework.http.RequestEntity` constructor call - * which is an URI taken as a sink for request forgery vulnerabilities. + * A URI argument to an `org.springframework.http.RequestEntity` constructor call + * taken as a sink for request forgery vulnerabilities. */ private class RequestEntityUriArg extends RequestForgerySink { RequestEntityUriArg() { @@ -188,7 +188,7 @@ private class RequestEntityUriArg extends RequestForgerySink { /** * A Spring Rest Template method - * which take a URL as an argument. + * that takes a URL as an argument. */ private class SpringRestTemplateUrlMethod extends Method { SpringRestTemplateUrlMethod() { From f388aae78eae22abadaa675efc82eac8d6e8edcc Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 12 May 2021 12:15:25 +0100 Subject: [PATCH 1385/1662] Fix getAnArgUsageOffset and improve its space complexity Also add tests checking the output of the new function --- java/ql/src/semmle/code/java/StringFormat.qll | 22 ++++++++++++++----- .../library-tests/format-strings/Test.java | 17 ++++++++++++++ .../format-strings/test.expected | 22 +++++++++++++++++++ .../test/library-tests/format-strings/test.ql | 6 +++++ 4 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 java/ql/test/library-tests/format-strings/Test.java create mode 100644 java/ql/test/library-tests/format-strings/test.expected create mode 100644 java/ql/test/library-tests/format-strings/test.ql diff --git a/java/ql/src/semmle/code/java/StringFormat.qll b/java/ql/src/semmle/code/java/StringFormat.qll index d0d788f54ffa..52169e703dd4 100644 --- a/java/ql/src/semmle/code/java/StringFormat.qll +++ b/java/ql/src/semmle/code/java/StringFormat.qll @@ -175,14 +175,17 @@ class FormattingCall extends Call { ) } - /** Gets the `i`th argument to be formatted. */ + /** Gets the `i`th argument to be formatted. The index `i` is one-based. */ Expr getArgumentToBeFormatted(int i) { - i >= 0 and + i >= 1 and if this.hasExplicitVarargsArray() then result = - this.getArgument(1 + this.getFormatStringIndex()).(ArrayCreationExpr).getInit().getInit(i) - else result = this.getArgument(this.getFormatStringIndex() + 1 + i) + this.getArgument(1 + this.getFormatStringIndex()) + .(ArrayCreationExpr) + .getInit() + .getInit(i - 1) + else result = this.getArgument(this.getFormatStringIndex() + i) } /** Holds if the varargs argument is given as an explicit array. */ @@ -441,14 +444,21 @@ private class PrintfFormatString extends FormatString { not result = fmtSpecRefersToSpecificIndex(_) } + private int getFmtSpecRank(int specOffset) { + rank[result](int i | this.fmtSpecIsRef(i)) = specOffset + } + override int getAnArgUsageOffset(int argNo) { argNo = fmtSpecRefersToSpecificIndex(result) or fmtSpecRefersToSequentialIndex(result) and - argNo = count(int i | i < result and fmtSpecRefersToSequentialIndex(i)) + result = rank[argNo](int i | fmtSpecRefersToSequentialIndex(i)) or fmtSpecRefersToPrevious(result) and - argNo = count(int i | i < result and fmtSpecRefersToSequentialIndex(i)) - 1 + exists(int previousOffset | + getFmtSpecRank(previousOffset) = getFmtSpecRank(result) - 1 and + previousOffset = getAnArgUsageOffset(argNo) + ) } } diff --git a/java/ql/test/library-tests/format-strings/Test.java b/java/ql/test/library-tests/format-strings/Test.java new file mode 100644 index 000000000000..fe58a2b975cc --- /dev/null +++ b/java/ql/test/library-tests/format-strings/Test.java @@ -0,0 +1,17 @@ +public class Test { + + public static void test () { + String.format("%s", "", ""); + String.format("s", ""); + String.format("%2$s %2$s", "", ""); + String.format("%2$s %1$s", "", ""); + String.format("%2$s %s", ""); + String.format("%s% Date: Wed, 12 May 2021 15:02:18 +0100 Subject: [PATCH 1386/1662] Tidy and remove catersian product from getUrlArgument --- .../code/java/security/RequestForgery.qll | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 5758bbb38199..a0b26f11096b 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -150,9 +150,7 @@ private class HttpBuilderUriArgument extends RequestForgerySink { */ private class SpringRestTemplateArgument extends RequestForgerySink { SpringRestTemplateArgument() { - exists(MethodAccess ma | - this.asExpr() = ma.getMethod().(SpringRestTemplateUrlMethod).getUrlArgument(ma) - ) + this.asExpr() = any(SpringRestTemplateUrlMethodAccess m).getUrlArgument() } } @@ -198,16 +196,19 @@ private class SpringRestTemplateUrlMethod extends Method { "execute", "getForEntity", "getForObject", "patchForObject" ]) } +} + +/** + * A call to a Spring Rest Template method + * that takes a URL as an argument. + */ +private class SpringRestTemplateUrlMethodAccess extends MethodAccess { + SpringRestTemplateUrlMethodAccess() { this.getMethod() instanceof SpringRestTemplateUrlMethod } /** - * Gets the argument which corresponds to a URL argument - * passed as a `java.net.URL` object or as a string or the like + * Gets the URL argument of this template call. */ - Argument getUrlArgument(MethodAccess ma) { - // doExecute(URI url, HttpMethod method, RequestCallback requestCallback, - // ResponseExtractor responseExtractor) - result = ma.getArgument(0) - } + Argument getUrlArgument() { result = this.getArgument(0) } } /** A sanitizer for request forgery vulnerabilities. */ From 6b76f42d2247a839fb046b894e0da32180b3f91a Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 12 May 2021 15:21:40 +0100 Subject: [PATCH 1387/1662] Broaden PrimitiveSanitizer to include boxed primitives and other java.lang.Numbers --- java/ql/src/semmle/code/java/security/RequestForgery.qll | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index a0b26f11096b..f669a434ae65 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -215,7 +215,11 @@ private class SpringRestTemplateUrlMethodAccess extends MethodAccess { abstract class RequestForgerySanitizer extends DataFlow::Node { } private class PrimitiveSanitizer extends RequestForgerySanitizer { - PrimitiveSanitizer() { this.getType() instanceof PrimitiveType } + PrimitiveSanitizer() { + this.getType() instanceof PrimitiveType or + this.getType() instanceof BoxedType or + this.getType() instanceof NumberType + } } private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { From 5b25694a524e005c8b6742d06a9225f4a6fb125e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 13 May 2021 10:55:33 +0100 Subject: [PATCH 1388/1662] Simplify and improve AddExpr logic The improvement is in considering (userSupplied + "/") itself a sanitising prefix. --- .../code/java/security/RequestForgery.qll | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index f669a434ae65..bcbde5d1a780 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -222,10 +222,10 @@ private class PrimitiveSanitizer extends RequestForgerySanitizer { } } -private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { +private class HostnameSanitizingConstantPrefix extends CompileTimeConstantExpr { int offset; - HostnameSanitizingPrefix() { + HostnameSanitizingConstantPrefix() { // Matches strings that look like when prepended to untrusted input, they will restrict // the host or entity addressed: for example, anything containing `?` or `#`, or a slash that // doesn't appear to be a protocol specifier (e.g. `http://` is not sanitizing), or specifically @@ -242,21 +242,10 @@ private class HostnameSanitizingPrefix extends CompileTimeConstantExpr { int getOffset() { result = offset } } -private AddExpr getParentAdd(AddExpr e) { result = e.getParent() } - -private AddExpr getAnAddContainingHostnameSanitizingPrefix() { - result = getParentAdd*(any(HostnameSanitizingPrefix p).getParent()) -} - -private Expr getASanitizedAddOperand() { - exists(AddExpr e | - e = getAnAddContainingHostnameSanitizingPrefix() and - ( - e.getLeftOperand() = getAnAddContainingHostnameSanitizingPrefix() or - e.getLeftOperand() instanceof HostnameSanitizingPrefix - ) and - result = e.getRightOperand() - ) +private Expr getAHostnameSanitizingPrefix() { + result instanceof HostnameSanitizingConstantPrefix + or + result.(AddExpr).getAnOperand() = getAHostnameSanitizingPrefix() } private MethodAccess getNextAppend(MethodAccess append) { @@ -283,7 +272,8 @@ private MethodAccess getAChainedAppend(Expr e) { private class HostnameSanitizedExpr extends Expr { HostnameSanitizedExpr() { // Sanitize expressions that come after a sanitizing prefix in a tree of string additions: - this = getASanitizedAddOperand() + this = + any(AddExpr add | add.getLeftOperand() = getAHostnameSanitizingPrefix()).getRightOperand() or // Sanitize all appends to a StringBuilder that is initialized with a sanitizing prefix: // (note imprecision: if the same StringBuilder/StringBuffer has more than one constructor call, @@ -291,7 +281,7 @@ private class HostnameSanitizedExpr extends Expr { exists(StringBuilderVar sbv, ConstructorCall constructor, Expr initializer | initializer = sbv.getAnAssignedValue() and constructor = getQualifier*(initializer) and - constructor.getArgument(0) instanceof HostnameSanitizingPrefix and + constructor.getArgument(0) = getAHostnameSanitizingPrefix() and ( this = sbv.getAnAppend().getArgument(0) or @@ -301,14 +291,15 @@ private class HostnameSanitizedExpr extends Expr { or // Sanitize expressions that come after a sanitizing prefix in a sequence of StringBuilder operations: exists(MethodAccess appendSanitizingConstant, MethodAccess subsequentAppend | - appendSanitizingConstant.getArgument(0) instanceof HostnameSanitizingPrefix and + appendSanitizingConstant = any(StringBuilderVar v).getAnAppend() and + appendSanitizingConstant.getArgument(0) = getAHostnameSanitizingPrefix() and getNextAppend*(appendSanitizingConstant) = subsequentAppend and this = subsequentAppend.getArgument(0) ) or // Sanitize expressions that come after a sanitizing prefix in the args to a format call: exists( - FormattingCall formatCall, FormatString formatString, HostnameSanitizingPrefix prefix, + FormattingCall formatCall, FormatString formatString, HostnameSanitizingConstantPrefix prefix, int sanitizedFromOffset, int laterOffset, int sanitizedArg | formatString = unique(FormatString fs | fs = formatCall.getAFormatString()) and From 55c72cebf2b23ba0788a60c3300fd1190ae73545 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 8 Jun 2021 12:43:23 +0100 Subject: [PATCH 1389/1662] Improve StringBuilder append chain tracking Previously this didn't catch the case of constructors chaining directly into appends, like `StringBuilder sb = new StringBuilder("1").append("2")` --- .../code/java/security/RequestForgery.qll | 108 ++++++++++++---- .../security/CWE-918/RequestForgery.expected | 119 ++++++++++-------- .../security/CWE-918/RequestForgery.java | 33 ++++- 3 files changed, 183 insertions(+), 77 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index bcbde5d1a780..8a0087bb9fb4 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -248,20 +248,85 @@ private Expr getAHostnameSanitizingPrefix() { result.(AddExpr).getAnOperand() = getAHostnameSanitizingPrefix() } -private MethodAccess getNextAppend(MethodAccess append) { - result = any(StringBuilderVar sbv).getNextAppend(append) +private class StringBuilderAppend extends MethodAccess { + StringBuilderAppend() { + this.getMethod().getDeclaringType() instanceof StringBuildingType and + this.getMethod().hasName("append") + } } -private Expr getQualifier(MethodAccess e) { result = e.getQualifier() } +private class StringBuilderConstructorOrAppend extends Call { + StringBuilderConstructorOrAppend() { + this instanceof StringBuilderAppend or + this.(ClassInstanceExpr).getConstructedType() instanceof StringBuildingType + } +} + +private Expr getQualifier(Expr e) { result = e.(MethodAccess).getQualifier() } + +/** + * An extension of `StringBuilderVar` that also accounts for strings appended in StringBuilder/Buffer's constructor + * and in `append` calls chained onto the constructor call. + * + * The original `StringBuilderVar` doesn't care about these because it is designed to model taint, and + * in taint rules terms these are not needed, as the connection between construction, appends and the + * eventual `toString` is more obvious. + */ +private class StringBuilderVarExt extends StringBuilderVar { + /** + * Returns a first assignment after this StringBuilderVar is first assigned. + * + * For example, for `StringBuilder sbv = new StringBuilder("1").append("2"); sbv.append("3").append("4");` + * this returns the append of `"3"`. + */ + private StringBuilderAppend getAFirstAppendAfterAssignment() { + // + result = this.getAnAppend() and not result = this.getNextAppend(_) + } + + /** + * Gets the next `append` after `prev`, where `prev` is, perhaps after some more `append` or other + * chained calls, assigned to this `StringBuilderVar`. + */ + private StringBuilderAppend getNextAssignmentChainedAppend(StringBuilderConstructorOrAppend prev) { + getQualifier*(result) = this.getAnAssignedValue() and + result.getQualifier() = prev + } + + /** + * Get a constructor call or `append` call that contributes a string to this string builder. + */ + StringBuilderConstructorOrAppend getAConstructorOrAppend() { + exists(this.getNextAssignmentChainedAppend(result)) or + result = this.getAnAssignedValue() or + result = this.getAnAppend() + } -private MethodAccess getAChainedAppend(Expr e) { - ( - result.getQualifier() = e + /** + * Like `StringBuilderVar.getNextAppend`, except including appends and constructors directly + * assigned to this `StringBuilderVar`. + */ + private StringBuilderAppend getNextAppendIncludingAssignmentChains( + StringBuilderConstructorOrAppend prev + ) { + result = getNextAssignmentChainedAppend(prev) + or + prev = this.getAnAssignedValue() and + result = this.getAFirstAppendAfterAssignment() or - result.getQualifier() = getAChainedAppend(e) - ) and - result.getCallee().getDeclaringType() instanceof StringBuildingType and - result.getCallee().getName() = "append" + result = this.getNextAppend(prev) + } + + /** + * Implements `StringBuilderVarExt.getNextAppendIncludingAssignmentChains+(prev)`. + */ + StringBuilderAppend getSubsequentAppendIncludingAssignmentChains( + StringBuilderConstructorOrAppend prev + ) { + result = this.getNextAppendIncludingAssignmentChains(prev) or + result = + this.getSubsequentAppendIncludingAssignmentChains(this.getNextAppendIncludingAssignmentChains(prev)) + } } /** @@ -275,25 +340,14 @@ private class HostnameSanitizedExpr extends Expr { this = any(AddExpr add | add.getLeftOperand() = getAHostnameSanitizingPrefix()).getRightOperand() or - // Sanitize all appends to a StringBuilder that is initialized with a sanitizing prefix: - // (note imprecision: if the same StringBuilder/StringBuffer has more than one constructor call, - // this sanitizes all of its append calls, not just those that may follow the constructor). - exists(StringBuilderVar sbv, ConstructorCall constructor, Expr initializer | - initializer = sbv.getAnAssignedValue() and - constructor = getQualifier*(initializer) and - constructor.getArgument(0) = getAHostnameSanitizingPrefix() and - ( - this = sbv.getAnAppend().getArgument(0) - or - this = getAChainedAppend(constructor).getArgument(0) - ) - ) - or // Sanitize expressions that come after a sanitizing prefix in a sequence of StringBuilder operations: - exists(MethodAccess appendSanitizingConstant, MethodAccess subsequentAppend | - appendSanitizingConstant = any(StringBuilderVar v).getAnAppend() and + exists( + StringBuilderConstructorOrAppend appendSanitizingConstant, + StringBuilderAppend subsequentAppend, StringBuilderVarExt v + | + appendSanitizingConstant = v.getAConstructorOrAppend() and appendSanitizingConstant.getArgument(0) = getAHostnameSanitizingPrefix() and - getNextAppend*(appendSanitizingConstant) = subsequentAppend and + v.getSubsequentAppendIncludingAssignmentChains(appendSanitizingConstant) = subsequentAppend and this = subsequentAppend.getArgument(0) ) or diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index 170ae08cd720..8c50a69c1b7e 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -14,27 +14,36 @@ edges | RequestForgery.java:19:23:19:58 | new URI(...) : URI | RequestForgery.java:22:52:22:54 | uri | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:19:23:19:58 | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | -| RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | -| RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:67:60:76 | unsafeUri3 : String | -| RequestForgery.java:60:67:60:76 | unsafeUri3 : String | RequestForgery.java:60:59:60:77 | new URI(...) | -| RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | -| RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:67:64:76 | unsafeUri4 : String | -| RequestForgery.java:64:67:64:76 | unsafeUri4 : String | RequestForgery.java:64:59:64:77 | new URI(...) | -| RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | -| RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:67:69:87 | toString(...) : String | -| RequestForgery.java:69:67:69:87 | toString(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | -| RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | -| RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:67:73:76 | unsafeUri6 : String | -| RequestForgery.java:73:67:73:76 | unsafeUri6 : String | RequestForgery.java:73:59:73:77 | new URI(...) | -| RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | -| RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:67:77:76 | unsafeUri7 : String | -| RequestForgery.java:77:67:77:76 | unsafeUri7 : String | RequestForgery.java:77:59:77:77 | new URI(...) | -| RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | -| RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:67:81:76 | unsafeUri8 : String | -| RequestForgery.java:81:67:81:76 | unsafeUri8 : String | RequestForgery.java:81:59:81:77 | new URI(...) | -| RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | -| RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:67:85:76 | unsafeUri9 : String | -| RequestForgery.java:85:67:85:76 | unsafeUri9 : String | RequestForgery.java:85:59:85:77 | new URI(...) | +| RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:59:76:77 | new URI(...) | +| RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:67:76:76 | unsafeUri3 : String | +| RequestForgery.java:76:67:76:76 | unsafeUri3 : String | RequestForgery.java:76:59:76:77 | new URI(...) | +| RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:59:80:77 | new URI(...) | +| RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:67:80:76 | unsafeUri4 : String | +| RequestForgery.java:80:67:80:76 | unsafeUri4 : String | RequestForgery.java:80:59:80:77 | new URI(...) | +| RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | +| RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:67:85:87 | toString(...) : String | +| RequestForgery.java:85:67:85:87 | toString(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | +| RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | +| RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:68:90:88 | toString(...) : String | +| RequestForgery.java:90:68:90:88 | toString(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | +| RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | +| RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:68:95:89 | toString(...) : String | +| RequestForgery.java:95:68:95:89 | toString(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | +| RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | +| RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:68:100:89 | toString(...) : String | +| RequestForgery.java:100:68:100:89 | toString(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | +| RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:59:104:77 | new URI(...) | +| RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:67:104:76 | unsafeUri6 : String | +| RequestForgery.java:104:67:104:76 | unsafeUri6 : String | RequestForgery.java:104:59:104:77 | new URI(...) | +| RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:59:108:77 | new URI(...) | +| RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:67:108:76 | unsafeUri7 : String | +| RequestForgery.java:108:67:108:76 | unsafeUri7 : String | RequestForgery.java:108:59:108:77 | new URI(...) | +| RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:59:112:77 | new URI(...) | +| RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:67:112:76 | unsafeUri8 : String | +| RequestForgery.java:112:67:112:76 | unsafeUri8 : String | RequestForgery.java:112:59:112:77 | new URI(...) | +| RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:59:116:77 | new URI(...) | +| RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:67:116:76 | unsafeUri9 : String | +| RequestForgery.java:116:67:116:76 | unsafeUri9 : String | RequestForgery.java:116:59:116:77 | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | @@ -62,27 +71,36 @@ nodes | RequestForgery.java:19:23:19:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | | RequestForgery.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | | RequestForgery.java:22:52:22:54 | uri | semmle.label | uri | -| RequestForgery.java:59:33:59:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:60:59:60:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:60:67:60:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | -| RequestForgery.java:63:49:63:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:64:59:64:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:64:67:64:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | -| RequestForgery.java:68:31:68:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:69:59:69:88 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:69:67:69:87 | toString(...) : String | semmle.label | toString(...) : String | -| RequestForgery.java:72:73:72:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:73:59:73:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:73:67:73:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | -| RequestForgery.java:76:56:76:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:77:59:77:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:77:67:77:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | -| RequestForgery.java:80:55:80:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:81:59:81:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:81:67:81:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | -| RequestForgery.java:84:33:84:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:85:59:85:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:85:67:85:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | +| RequestForgery.java:75:33:75:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:76:59:76:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:76:67:76:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | +| RequestForgery.java:79:49:79:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:80:59:80:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:80:67:80:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | +| RequestForgery.java:84:31:84:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:85:59:85:88 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:85:67:85:87 | toString(...) : String | semmle.label | toString(...) : String | +| RequestForgery.java:88:58:88:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:90:60:90:89 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:90:68:90:88 | toString(...) : String | semmle.label | toString(...) : String | +| RequestForgery.java:93:60:93:88 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:95:60:95:90 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:95:68:95:89 | toString(...) : String | semmle.label | toString(...) : String | +| RequestForgery.java:98:77:98:105 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:100:60:100:90 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:100:68:100:89 | toString(...) : String | semmle.label | toString(...) : String | +| RequestForgery.java:103:73:103:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:104:59:104:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:104:67:104:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | +| RequestForgery.java:107:56:107:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:108:59:108:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:108:67:108:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | +| RequestForgery.java:111:55:111:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:112:59:112:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:112:67:112:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | +| RequestForgery.java:115:33:115:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RequestForgery.java:116:59:116:77 | new URI(...) | semmle.label | new URI(...) | +| RequestForgery.java:116:67:116:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | | SpringSSRF.java:32:47:32:67 | ... + ... | semmle.label | ... + ... | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | @@ -104,13 +122,16 @@ nodes | RequestForgery2.java:67:43:67:45 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | | RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | | RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server-side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | -| RequestForgery.java:60:59:60:77 | new URI(...) | RequestForgery.java:59:33:59:63 | getParameter(...) : String | RequestForgery.java:60:59:60:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:59:33:59:63 | getParameter(...) | a user-provided value | -| RequestForgery.java:64:59:64:77 | new URI(...) | RequestForgery.java:63:49:63:79 | getParameter(...) : String | RequestForgery.java:64:59:64:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:63:49:63:79 | getParameter(...) | a user-provided value | -| RequestForgery.java:69:59:69:88 | new URI(...) | RequestForgery.java:68:31:68:61 | getParameter(...) : String | RequestForgery.java:69:59:69:88 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:68:31:68:61 | getParameter(...) | a user-provided value | -| RequestForgery.java:73:59:73:77 | new URI(...) | RequestForgery.java:72:73:72:103 | getParameter(...) : String | RequestForgery.java:73:59:73:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:72:73:72:103 | getParameter(...) | a user-provided value | -| RequestForgery.java:77:59:77:77 | new URI(...) | RequestForgery.java:76:56:76:86 | getParameter(...) : String | RequestForgery.java:77:59:77:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:76:56:76:86 | getParameter(...) | a user-provided value | -| RequestForgery.java:81:59:81:77 | new URI(...) | RequestForgery.java:80:55:80:85 | getParameter(...) : String | RequestForgery.java:81:59:81:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:80:55:80:85 | getParameter(...) | a user-provided value | -| RequestForgery.java:85:59:85:77 | new URI(...) | RequestForgery.java:84:33:84:63 | getParameter(...) : String | RequestForgery.java:85:59:85:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:84:33:84:63 | getParameter(...) | a user-provided value | +| RequestForgery.java:76:59:76:77 | new URI(...) | RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:59:76:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:75:33:75:63 | getParameter(...) | a user-provided value | +| RequestForgery.java:80:59:80:77 | new URI(...) | RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:59:80:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:79:49:79:79 | getParameter(...) | a user-provided value | +| RequestForgery.java:85:59:85:88 | new URI(...) | RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:84:31:84:61 | getParameter(...) | a user-provided value | +| RequestForgery.java:90:60:90:89 | new URI(...) | RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:88:58:88:86 | getParameter(...) | a user-provided value | +| RequestForgery.java:95:60:95:90 | new URI(...) | RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:93:60:93:88 | getParameter(...) | a user-provided value | +| RequestForgery.java:100:60:100:90 | new URI(...) | RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:98:77:98:105 | getParameter(...) | a user-provided value | +| RequestForgery.java:104:59:104:77 | new URI(...) | RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:59:104:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:103:73:103:103 | getParameter(...) | a user-provided value | +| RequestForgery.java:108:59:108:77 | new URI(...) | RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:59:108:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:107:56:107:86 | getParameter(...) | a user-provided value | +| RequestForgery.java:112:59:112:77 | new URI(...) | RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:59:112:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:111:55:111:85 | getParameter(...) | a user-provided value | +| RequestForgery.java:116:59:116:77 | new URI(...) | RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:59:116:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:115:33:115:63 | getParameter(...) | a user-provided value | | SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java index d4febb9b94b5..f298ab31d1bb 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java @@ -24,7 +24,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) // GOOD: sanitisation by concatenation with a prefix that prevents targeting an arbitrary host. // We test a few different ways of sanitisation: via string conctentation (perhaps nested), - // via a stringbuilder and via String.format. + // via a stringbuilder (for which we consider appends done in the constructor, chained onto + // the constructor and applied in subsequent statements) and via String.format. String safeUri3 = "https://example.com/" + request.getParameter("uri3"); HttpRequest r3 = HttpRequest.newBuilder(new URI(safeUri3)).build(); client.send(r3, null); @@ -38,6 +39,21 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest r5 = HttpRequest.newBuilder(new URI(safeUri5.toString())).build(); client.send(r5, null); + StringBuilder safeUri5a = new StringBuilder("https://example.com/"); + safeUri5a.append(request.getParameter("uri5a")); + HttpRequest r5a = HttpRequest.newBuilder(new URI(safeUri5a.toString())).build(); + client.send(r5a, null); + + StringBuilder safeUri5b = (new StringBuilder("https://example.com/")).append("dir/"); + safeUri5b.append(request.getParameter("uri5b")); + HttpRequest r5b = HttpRequest.newBuilder(new URI(safeUri5b.toString())).build(); + client.send(r5b, null); + + StringBuilder safeUri5c = (new StringBuilder("prefix")).append("https://example.com/dir/"); + safeUri5c.append(request.getParameter("uri5c")); + HttpRequest r5c = HttpRequest.newBuilder(new URI(safeUri5c.toString())).build(); + client.send(r5c, null); + String safeUri6 = String.format("https://example.com/%s", request.getParameter("uri6")); HttpRequest r6 = HttpRequest.newBuilder(new URI(safeUri6)).build(); client.send(r6, null); @@ -69,6 +85,21 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); client.send(unsafer5, null); + StringBuilder unafeUri5a = new StringBuilder(request.getParameter("uri5a")); + unafeUri5a.append("https://example.com/"); + HttpRequest unsafer5a = HttpRequest.newBuilder(new URI(unafeUri5a.toString())).build(); + client.send(unsafer5a, null); + + StringBuilder unsafeUri5b = (new StringBuilder(request.getParameter("uri5b"))).append("dir/"); + unsafeUri5b.append("https://example.com/"); + HttpRequest unsafer5b = HttpRequest.newBuilder(new URI(unsafeUri5b.toString())).build(); + client.send(unsafer5b, null); + + StringBuilder unsafeUri5c = (new StringBuilder("https")).append(request.getParameter("uri5c")); + unsafeUri5c.append("://example.com/dir/"); + HttpRequest unsafer5c = HttpRequest.newBuilder(new URI(unsafeUri5c.toString())).build(); + client.send(unsafer5c, null); + String unsafeUri6 = String.format("%shttps://example.com/", request.getParameter("baduri6")); HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); client.send(unsafer6, null); From 0f2139ff5d245819441538f880a7034f647057df Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 8 Jun 2021 13:15:01 +0100 Subject: [PATCH 1390/1662] Fix and document one-based argument indexing in StringFormat's `getAnArgUsageOffset` --- java/ql/src/semmle/code/java/StringFormat.qll | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/java/ql/src/semmle/code/java/StringFormat.qll b/java/ql/src/semmle/code/java/StringFormat.qll index 52169e703dd4..cc37ee8212a9 100644 --- a/java/ql/src/semmle/code/java/StringFormat.qll +++ b/java/ql/src/semmle/code/java/StringFormat.qll @@ -368,7 +368,7 @@ class FormatString extends string { /*abstract*/ int getASkippedFmtSpecIndex() { none() } /** - * Gets an offset in this format string where argument `argNo` will be interpolated, if any. + * Gets an offset (zero-based) in this format string where argument `argNo` (1-based) will be interpolated, if any. */ int getAnArgUsageOffset(int argNo) { none() } } @@ -451,7 +451,6 @@ private class PrintfFormatString extends FormatString { override int getAnArgUsageOffset(int argNo) { argNo = fmtSpecRefersToSpecificIndex(result) or - fmtSpecRefersToSequentialIndex(result) and result = rank[argNo](int i | fmtSpecRefersToSequentialIndex(i)) or fmtSpecRefersToPrevious(result) and @@ -485,8 +484,5 @@ private class LoggerFormatString extends FormatString { override int getMaxFmtSpecIndex() { result = count(int i | fmtPlaceholder(i)) } - override int getAnArgUsageOffset(int argNo) { - fmtPlaceholder(result) and - argNo = count(int i | fmtPlaceholder(i) and i < result) - } + override int getAnArgUsageOffset(int argNo) { result = rank[argNo](int i | fmtPlaceholder(i)) } } From 49bbfc3f4b16c4ef911c001c09dc1dea9a57cdb9 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 8 Jun 2021 16:06:17 +0100 Subject: [PATCH 1391/1662] Convert SSRF sinks into url-open CSV sinks I also drop the previous approach of taint-tracking through various builder objects in favour of assuming that a URI set in a request-builder object is highly likely to end up requested in some way or another. This will cause the `java/non-https-url` query to pick the new sinks up too, and fixes a Spring case that had never worked but went unnoticed until now. --- .../code/java/dataflow/ExternalFlow.qll | 4 + .../code/java/frameworks/ApacheHttp.qll | 31 +++ .../src/semmle/code/java/frameworks/JaxWS.qll | 6 + .../java/frameworks/spring/SpringHttp.qll | 23 +++ .../frameworks/spring/SpringWebClient.qll | 19 ++ .../code/java/security/RequestForgery.qll | 176 +----------------- .../security/CWE-918/RequestForgery.expected | 6 + 7 files changed, 92 insertions(+), 173 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 71b11b0900b6..d23cfe5b5d4f 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -82,6 +82,8 @@ private module Frameworks { private import semmle.code.java.frameworks.guava.Guava private import semmle.code.java.frameworks.jackson.JacksonSerializability private import semmle.code.java.frameworks.JaxWS + private import semmle.code.java.frameworks.spring.SpringHttp + private import semmle.code.java.frameworks.spring.SpringWebClient private import semmle.code.java.security.ResponseSplitting private import semmle.code.java.security.InformationLeak private import semmle.code.java.security.XSS @@ -209,6 +211,8 @@ private predicate sinkModelCsv(string row) { // Open URL "java.net;URL;false;openConnection;;;Argument[-1];open-url", "java.net;URL;false;openStream;;;Argument[-1];open-url", + "java.net.http;HttpRequest;false;newBuilder;;;Argument[0];open-url", + "java.net.http;HttpRequest$Builder;false;uri;;;Argument[0];open-url", // Create file "java.io;FileOutputStream;false;FileOutputStream;;;Argument[0];create-file", "java.io;RandomAccessFile;false;RandomAccessFile;;;Argument[0];create-file", diff --git a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll index 80cb589e6f2c..e006c245ecb8 100644 --- a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll @@ -92,6 +92,37 @@ private class ApacheHttpXssSink extends SinkModelCsv { } } +private class ApacheHttpOpenUrlSink extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.http;HttpRequest;true;setURI;;;Argument[0];open-url", + "org.apache.http.message;BasicHttpRequest;false;BasicHttpRequest;(RequestLine);;Argument[0];open-url", + "org.apache.http.message;BasicHttpRequest;false;BasicHttpRequest;(String,String);;Argument[1];open-url", + "org.apache.http.message;BasicHttpRequest;false;BasicHttpRequest;(String,String,ProtocolVersion);;Argument[1];open-url", + "org.apache.http.message;BasicHttpEntityEnclosingRequest;false;BasicHttpEntityEnclosingRequest;(RequestLine);;Argument[0];open-url", + "org.apache.http.message;BasicHttpEntityEnclosingRequest;false;BasicHttpEntityEnclosingRequest;(String,String);;Argument[1];open-url", + "org.apache.http.message;BasicHttpEntityEnclosingRequest;false;BasicHttpEntityEnclosingRequest;(String,String,ProtocolVersion);;Argument[1];open-url", + "org.apache.http.client.methods;HttpGet;false;HttpGet;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpHead;false;HttpHead;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpPut;false;HttpPut;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpPost;false;HttpPost;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpDelete;false;HttpDelete;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpOptions;false;HttpOptions;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpTrace;false;HttpTrace;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpPatch;false;HttpPatch;;;Argument[0];open-url", + "org.apache.http.client.methods;HttpRequestBase;true;setURI;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;setUri;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;get;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;post;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;put;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;options;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;head;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;delete;;;Argument[0];open-url" + ] + } +} + private class ApacheHttpFlowStep extends SummaryModelCsv { override predicate row(string row) { row = diff --git a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll index bfe332da2b61..0ca3175b58d6 100644 --- a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll +++ b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll @@ -786,3 +786,9 @@ private class UriBuilderModel extends SummaryModelCsv { ] } } + +private class JaxRsUrlOpenSink extends SinkModelCsv { + override predicate row(string row) { + row = ["javax.ws.rs.client;Client;true;target;;;Argument[0];open-url"] + } +} diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll index 59016df25f80..c56329d3a5ab 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll @@ -4,6 +4,7 @@ */ import java +private import semmle.code.java.dataflow.ExternalFlow /** The class `org.springframework.http.HttpEntity` or an instantiation of it. */ class SpringHttpEntity extends Class { @@ -38,3 +39,25 @@ class SpringResponseEntityBodyBuilder extends Interface { class SpringHttpHeaders extends Class { SpringHttpHeaders() { this.hasQualifiedName("org.springframework.http", "HttpHeaders") } } + +private class UrlOpenSink extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "org.springframework.http;RequestEntity;false;get;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;post;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;head;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;delete;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;options;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;patch;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;put;;;Argument[0];open-url", + "org.springframework.http;RequestEntity;false;method;;;Argument[1];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(HttpMethod,URI);;Argument[1];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(MultiValueMap,HttpMethod,URI);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI,Type);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI);;Argument[3];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI,Type);;Argument[3];open-url" + ] + } +} diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll index 3a8d4bb084a4..b76723a3bccb 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll @@ -4,6 +4,7 @@ import java import SpringHttp +private import semmle.code.java.dataflow.ExternalFlow /** The class `org.springframework.web.client.RestTemplate`. */ class SpringRestTemplate extends Class { @@ -27,3 +28,21 @@ class SpringWebClient extends Interface { this.hasQualifiedName("org.springframework.web.reactive.function.client", "WebClient") } } + +private class UrlOpenSink extends SinkModelCsv { + override predicate row(string row) { + row = + [ + "org.springframework.web.client;RestTemplate;false;doExecute;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForEntity;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForLocation;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForObject;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;put;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;exchange;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;execute;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;getForEntity;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;getForObject;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;patchForObject;;;Argument[0];open-url" + ] + } +} diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 8a0087bb9fb4..7ee59fec8ddb 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -9,6 +9,7 @@ import semmle.code.java.frameworks.javase.Http import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.TaintTracking private import semmle.code.java.StringFormat +private import semmle.code.java.dataflow.ExternalFlow /** * A unit class for adding additional taint steps that are specific to server-side request forgery (SSRF) attacks. @@ -30,185 +31,14 @@ private class DefaultRequestForgeryAdditionalTaintStep extends RequestForgeryAdd or // propagate to a URL when its host is assigned to exists(UrlConstructorCall c | c.getHostArg() = pred.asExpr() | succ.asExpr() = c) - or - // propagate to a RequestEntity when its url is assigned to - exists(MethodAccess m | - m.getMethod().getDeclaringType() instanceof SpringRequestEntity and - ( - m.getMethod().hasName(["get", "post", "head", "delete", "options", "patch", "put"]) and - m.getArgument(0) = pred.asExpr() and - m = succ.asExpr() - or - m.getMethod().hasName("method") and - m.getArgument(1) = pred.asExpr() and - m = succ.asExpr() - ) - ) - or - // propagate from a `RequestEntity<>$BodyBuilder` to a `RequestEntity` - // when the builder is tainted - exists(MethodAccess m, RefType t | - m.getMethod().getDeclaringType() = t and - t.hasQualifiedName("org.springframework.http", "RequestEntity<>$BodyBuilder") and - m.getMethod().hasName("body") and - m.getQualifier() = pred.asExpr() and - m = succ.asExpr() - ) } } /** A data flow sink for server-side request forgery (SSRF) vulnerabilities. */ abstract class RequestForgerySink extends DataFlow::Node { } -/** - * An argument to a url `openConnection` or `openStream` call - * taken as a sink for request forgery vulnerabilities. - */ -private class UrlOpen extends RequestForgerySink { - UrlOpen() { - exists(MethodAccess ma | - ma.getMethod() instanceof UrlOpenConnectionMethod or - ma.getMethod() instanceof UrlOpenStreamMethod - | - this.asExpr() = ma.getQualifier() - ) - } -} - -/** - * An argument to an Apache `setURI` call taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheSetUri extends RequestForgerySink { - ApacheSetUri() { - exists(MethodAccess ma | - ma.getReceiverType() instanceof ApacheHttpRequest and - ma.getMethod().hasName("setURI") - | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to any Apache `HttpRequest` instantiation taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheHttpRequestInstantiation extends RequestForgerySink { - ApacheHttpRequestInstantiation() { - exists(ClassInstanceExpr c | c.getConstructedType() instanceof ApacheHttpRequest | - this.asExpr() = c.getArgument(0) - ) - } -} - -/** - * An argument to an Apache `RequestBuilder` method call taken as a - * sink for request forgery vulnerabilities. - */ -private class ApacheHttpRequestBuilderArgument extends RequestForgerySink { - ApacheHttpRequestBuilderArgument() { - exists(MethodAccess ma | - ma.getReceiverType() instanceof TypeApacheHttpRequestBuilder and - ma.getMethod().hasName(["setURI", "get", "post", "put", "optons", "head", "delete"]) - | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to any `java.net.http.HttpRequest` instantiation taken as a - * sink for request forgery vulnerabilities. - */ -private class HttpRequestNewBuilder extends RequestForgerySink { - HttpRequestNewBuilder() { - exists(MethodAccess call | - call.getCallee().hasName("newBuilder") and - call.getMethod().getDeclaringType().hasQualifiedName("java.net.http", "HttpRequest") - | - this.asExpr() = call.getArgument(0) - ) - } -} - -/** - * An argument to an `HttpBuilder` `uri` call taken as a - * sink for request forgery vulnerabilities. - */ -private class HttpBuilderUriArgument extends RequestForgerySink { - HttpBuilderUriArgument() { - exists(MethodAccess ma | ma.getMethod() instanceof HttpBuilderUri | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * An argument to a Spring `RestTemplate` method call taken as a - * sink for request forgery vulnerabilities. - */ -private class SpringRestTemplateArgument extends RequestForgerySink { - SpringRestTemplateArgument() { - this.asExpr() = any(SpringRestTemplateUrlMethodAccess m).getUrlArgument() - } -} - -/** - * An argument to a `javax.ws.rs.Client` `target` method call taken as a - * sink for request forgery vulnerabilities. - */ -private class JaxRsClientTarget extends RequestForgerySink { - JaxRsClientTarget() { - exists(MethodAccess ma | - ma.getMethod().getDeclaringType() instanceof JaxRsClient and - ma.getMethod().hasName("target") - | - this.asExpr() = ma.getArgument(0) - ) - } -} - -/** - * A URI argument to an `org.springframework.http.RequestEntity` constructor call - * taken as a sink for request forgery vulnerabilities. - */ -private class RequestEntityUriArg extends RequestForgerySink { - RequestEntityUriArg() { - exists(ClassInstanceExpr e, Argument a | - e.getConstructedType() instanceof SpringRequestEntity and - e.getAnArgument() = a and - a.getType() instanceof TypeUri and - this.asExpr() = a - ) - } -} - -/** - * A Spring Rest Template method - * that takes a URL as an argument. - */ -private class SpringRestTemplateUrlMethod extends Method { - SpringRestTemplateUrlMethod() { - this.getDeclaringType() instanceof SpringRestTemplate and - this.hasName([ - "doExecute", "postForEntity", "postForLocation", "postForObject", "put", "exchange", - "execute", "getForEntity", "getForObject", "patchForObject" - ]) - } -} - -/** - * A call to a Spring Rest Template method - * that takes a URL as an argument. - */ -private class SpringRestTemplateUrlMethodAccess extends MethodAccess { - SpringRestTemplateUrlMethodAccess() { this.getMethod() instanceof SpringRestTemplateUrlMethod } - - /** - * Gets the URL argument of this template call. - */ - Argument getUrlArgument() { result = this.getArgument(0) } +private class UrlOpenSinkAsRequestForgerySink extends RequestForgerySink { + UrlOpenSinkAsRequestForgerySink() { sinkNode(this, "open-url") } } /** A sanitizer for request forgery vulnerabilities. */ diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index 8c50a69c1b7e..ad5b0625a777 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -48,12 +48,15 @@ edges | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | +| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:40:50:62 | new URI(...) | +| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:66:48:66:61 | fooResourceUrl | | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:69:30:69:43 | fooResourceUrl | +| SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | SpringSSRF.java:50:40:50:62 | new URI(...) | | SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | SpringSSRF.java:58:74:58:96 | new URI(...) | nodes | JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | semmle.label | getParameter(...) : String | @@ -106,6 +109,8 @@ nodes | SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | | SpringSSRF.java:41:42:41:55 | fooResourceUrl | semmle.label | fooResourceUrl | | SpringSSRF.java:45:47:45:60 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:50:40:50:62 | new URI(...) | semmle.label | new URI(...) | +| SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | | SpringSSRF.java:54:59:54:72 | fooResourceUrl | semmle.label | fooResourceUrl | | SpringSSRF.java:58:74:58:96 | new URI(...) | semmle.label | new URI(...) | | SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | @@ -136,6 +141,7 @@ nodes | SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:45:47:45:60 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | +| SpringSSRF.java:50:40:50:62 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:40:50:62 | new URI(...) | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:54:59:54:72 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:58:74:58:96 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | | SpringSSRF.java:62:57:62:70 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | From ee872f175255d71625b8cce55ccc44bada211db7 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 15:28:37 +0100 Subject: [PATCH 1392/1662] Add missing tests, add additional models revealed missing in the process, and add stubs to support them all. --- .../code/java/frameworks/ApacheHttp.qll | 4 +- .../frameworks/spring/SpringWebClient.qll | 13 +- .../security/CWE-918/RequestForgery2.java | 38 ++ .../security/CWE-918/SpringSSRF.java | 32 +- .../org/apache/http/Contract.java | 45 ++ .../org/apache/http/HttpHost.java | 233 ++++++++++ .../org/apache/http/annotation/Contract.java | 45 ++ .../http/annotation/ThreadingBehavior.java | 63 +++ .../http/client/config/RequestConfig.java | 423 ++++++++++++++++++ .../http/client/methods/HttpDelete.java | 69 +++ .../apache/http/client/methods/HttpHead.java | 72 +++ .../http/client/methods/HttpOptions.java | 82 ++++ .../apache/http/client/methods/HttpPatch.java | 69 +++ .../apache/http/client/methods/HttpTrace.java | 71 +++ .../http/client/methods/HttpUriRequest.java | 85 ++++ .../http/client/methods/RequestBuilder.java | 369 +++++++++++++++ 16 files changed, 1704 insertions(+), 9 deletions(-) create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/Contract.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpHost.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/Contract.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/ThreadingBehavior.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/config/RequestConfig.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpDelete.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpHead.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpOptions.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPatch.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpTrace.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpUriRequest.java create mode 100644 java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/RequestBuilder.java diff --git a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll index e006c245ecb8..28908c2cec1d 100644 --- a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll @@ -118,7 +118,9 @@ private class ApacheHttpOpenUrlSink extends SinkModelCsv { "org.apache.http.client.methods;RequestBuilder;false;put;;;Argument[0];open-url", "org.apache.http.client.methods;RequestBuilder;false;options;;;Argument[0];open-url", "org.apache.http.client.methods;RequestBuilder;false;head;;;Argument[0];open-url", - "org.apache.http.client.methods;RequestBuilder;false;delete;;;Argument[0];open-url" + "org.apache.http.client.methods;RequestBuilder;false;delete;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;trace;;;Argument[0];open-url", + "org.apache.http.client.methods;RequestBuilder;false;patch;;;Argument[0];open-url" ] } } diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll index b76723a3bccb..cb5391257d85 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll @@ -33,16 +33,19 @@ private class UrlOpenSink extends SinkModelCsv { override predicate row(string row) { row = [ + "org.springframework.web.client;RestTemplate;false;delete;;;Argument[0];open-url", "org.springframework.web.client;RestTemplate;false;doExecute;;;Argument[0];open-url", - "org.springframework.web.client;RestTemplate;false;postForEntity;;;Argument[0];open-url", - "org.springframework.web.client;RestTemplate;false;postForLocation;;;Argument[0];open-url", - "org.springframework.web.client;RestTemplate;false;postForObject;;;Argument[0];open-url", - "org.springframework.web.client;RestTemplate;false;put;;;Argument[0];open-url", "org.springframework.web.client;RestTemplate;false;exchange;;;Argument[0];open-url", "org.springframework.web.client;RestTemplate;false;execute;;;Argument[0];open-url", "org.springframework.web.client;RestTemplate;false;getForEntity;;;Argument[0];open-url", "org.springframework.web.client;RestTemplate;false;getForObject;;;Argument[0];open-url", - "org.springframework.web.client;RestTemplate;false;patchForObject;;;Argument[0];open-url" + "org.springframework.web.client;RestTemplate;false;headForHeaders;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;optionsForAllow;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;patchForObject;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForEntity;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForLocation;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;postForObject;;;Argument[0];open-url", + "org.springframework.web.client;RestTemplate;false;put;;;Argument[0];open-url" ] } } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java index eb910bedd363..646ae2c3804a 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java @@ -7,6 +7,17 @@ import java.io.InputStream; import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpHead; +import org.apache.http.client.methods.HttpOptions; +import org.apache.http.client.methods.HttpTrace; +import org.apache.http.client.methods.HttpPatch; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.message.BasicHttpRequest; +import org.apache.http.message.BasicHttpEntityEnclosingRequest; +import org.apache.http.message.BasicRequestLine; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -67,6 +78,33 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) HttpGet httpGet = new HttpGet(uri); HttpGet httpGet2 = new HttpGet(); httpGet2.setURI(uri2); + + new HttpHead(uri); + new HttpPost(uri); + new HttpPut(uri); + new HttpDelete(uri); + new HttpOptions(uri); + new HttpTrace(uri); + new HttpPatch(uri); + + new BasicHttpRequest(new BasicRequestLine("GET", uri2.toString(), null)); + new BasicHttpRequest("GET", uri2.toString()); + new BasicHttpRequest("GET", uri2.toString(), null); + + new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri2.toString(), null)); + new BasicHttpEntityEnclosingRequest("GET", uri2.toString()); + new BasicHttpEntityEnclosingRequest("GET", uri2.toString(), null); + + RequestBuilder.get(uri2); + RequestBuilder.post(uri2); + RequestBuilder.put(uri2); + RequestBuilder.delete(uri2); + RequestBuilder.options(uri2); + RequestBuilder.head(uri2); + RequestBuilder.trace(uri2); + RequestBuilder.patch(uri2); + RequestBuilder.get("").setUri(uri2); + } catch (Exception e) { // TODO: handle exception } diff --git a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java index a7d3cb32b871..29b7ad686412 100644 --- a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java @@ -1,3 +1,4 @@ +import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; @@ -41,14 +42,22 @@ protected void doGet(HttpServletRequest request2, HttpServletResponse response2) restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); } { - ResponseEntity response = - restTemplate.getForEntity(fooResourceUrl, String.class, "test"); + String response = + restTemplate.getForObject(fooResourceUrl, String.class, "test"); } { String body = new String("body"); + URI uri = new URI(fooResourceUrl); RequestEntity requestEntity = - RequestEntity.post(new URI(fooResourceUrl)).body(body); + RequestEntity.post(uri).body(body); ResponseEntity response = restTemplate.exchange(requestEntity, String.class); + RequestEntity.get(uri); + RequestEntity.put(uri); + RequestEntity.delete(uri); + RequestEntity.options(uri); + RequestEntity.patch(uri); + RequestEntity.head(uri); + RequestEntity.method(null, uri); } { String response = restTemplate.patchForObject(fooResourceUrl, new String("object"), @@ -68,6 +77,23 @@ protected void doGet(HttpServletRequest request2, HttpServletResponse response2) { restTemplate.put(fooResourceUrl, new String("object")); } + { + URI uri = new URI(fooResourceUrl); + MultiValueMap headers = null; + java.lang.reflect.Type type = null; + new RequestEntity(null, uri); + new RequestEntity(headers, null, uri); + new RequestEntity("body", null, uri); + new RequestEntity("body", headers, null, uri); + new RequestEntity("body", null, uri, type); + new RequestEntity("body", headers, null, uri, type); + } + { + URI uri = new URI(fooResourceUrl); + restTemplate.delete(uri); + restTemplate.headForHeaders(uri); + restTemplate.optionsForAllow(uri); + } } catch (org.springframework.web.client.RestClientException | java.net.URISyntaxException e) {} } } diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/Contract.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/Contract.java new file mode 100644 index 000000000000..f268a1457632 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/Contract.java @@ -0,0 +1,45 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ +package org.apache.http.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This annotation defines behavioral contract enforced at runtime by instances of annotated classes. + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface Contract { + + ThreadingBehavior threading() default ThreadingBehavior.UNSAFE; + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpHost.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpHost.java new file mode 100644 index 000000000000..aef2fa447203 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/HttpHost.java @@ -0,0 +1,233 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http; + +import java.io.Serializable; +import java.net.InetAddress; + +import org.apache.http.annotation.ThreadingBehavior; +import org.apache.http.annotation.Contract; + +/** + * Holds all of the variables needed to describe an HTTP connection to a host. + * This includes remote host name, port and scheme. + * + * @since 4.0 + */ +@Contract(threading = ThreadingBehavior.IMMUTABLE) +public final class HttpHost implements Cloneable, Serializable { + + /** The default scheme is "http". */ + public static final String DEFAULT_SCHEME_NAME = "http"; + + /** + * Creates {@code HttpHost} instance with the given scheme, hostname and port. + * + * @param hostname the hostname (IP or DNS name) + * @param port the port number. + * {@code -1} indicates the scheme default port. + * @param scheme the name of the scheme. + * {@code null} indicates the + * {@link #DEFAULT_SCHEME_NAME default scheme} + */ + public HttpHost(final String hostname, final int port, final String scheme) { + } + + /** + * Creates {@code HttpHost} instance with the default scheme and the given hostname and port. + * + * @param hostname the hostname (IP or DNS name) + * @param port the port number. + * {@code -1} indicates the scheme default port. + */ + public HttpHost(final String hostname, final int port) { + } + + /** + * Creates {@code HttpHost} instance from string. Text may not contain any blanks. + * + * @since 4.4 + */ + public static HttpHost create(final String s) { + return null; + } + + /** + * Creates {@code HttpHost} instance with the default scheme and port and the given hostname. + * + * @param hostname the hostname (IP or DNS name) + */ + public HttpHost(final String hostname) { + } + + /** + * Creates {@code HttpHost} instance with the given scheme, inet address and port. + * + * @param address the inet address. + * @param port the port number. + * {@code -1} indicates the scheme default port. + * @param scheme the name of the scheme. + * {@code null} indicates the + * {@link #DEFAULT_SCHEME_NAME default scheme} + * + * @since 4.3 + */ + public HttpHost(final InetAddress address, final int port, final String scheme) { + } + /** + * Creates a new {@link HttpHost HttpHost}, specifying all values. + * Constructor for HttpHost. + * + * @param address the inet address. + * @param hostname the hostname (IP or DNS name) + * @param port the port number. + * {@code -1} indicates the scheme default port. + * @param scheme the name of the scheme. + * {@code null} indicates the + * {@link #DEFAULT_SCHEME_NAME default scheme} + * + * @since 4.4 + */ + public HttpHost(final InetAddress address, final String hostname, final int port, final String scheme) { + } + + /** + * Creates {@code HttpHost} instance with the default scheme and the given inet address + * and port. + * + * @param address the inet address. + * @param port the port number. + * {@code -1} indicates the scheme default port. + * + * @since 4.3 + */ + public HttpHost(final InetAddress address, final int port) { + } + + /** + * Creates {@code HttpHost} instance with the default scheme and port and the given inet + * address. + * + * @param address the inet address. + * + * @since 4.3 + */ + public HttpHost(final InetAddress address) { + } + + /** + * Copy constructor for {@link HttpHost HttpHost}. + * + * @param httphost the HTTP host to copy details from + */ + public HttpHost (final HttpHost httphost) { + } + + /** + * Returns the host name. + * + * @return the host name (IP or DNS name) + */ + public String getHostName() { + return null; + } + + /** + * Returns the port. + * + * @return the host port, or {@code -1} if not set + */ + public int getPort() { + return 0; + } + + /** + * Returns the scheme name. + * + * @return the scheme name + */ + public String getSchemeName() { + return null; + } + + /** + * Returns the inet address if explicitly set by a constructor, + * {@code null} otherwise. + * @return the inet address + * + * @since 4.3 + */ + public InetAddress getAddress() { + return null; + } + + /** + * Return the host URI, as a string. + * + * @return the host URI + */ + public String toURI() { + return null; + } + + + /** + * Obtains the host string, without scheme prefix. + * + * @return the host string, for example {@code localhost:8080} + */ + public String toHostString() { + return null; + } + + + @Override + public String toString() { + return null; + } + + + @Override + public boolean equals(final Object obj) { + return false; + } + + /** + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + return 0; + } + + @Override + public Object clone() throws CloneNotSupportedException { + return null; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/Contract.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/Contract.java new file mode 100644 index 000000000000..f268a1457632 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/Contract.java @@ -0,0 +1,45 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ +package org.apache.http.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This annotation defines behavioral contract enforced at runtime by instances of annotated classes. + */ +@Documented +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface Contract { + + ThreadingBehavior threading() default ThreadingBehavior.UNSAFE; + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/ThreadingBehavior.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/ThreadingBehavior.java new file mode 100644 index 000000000000..55e80d59a131 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/annotation/ThreadingBehavior.java @@ -0,0 +1,63 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ +package org.apache.http.annotation; + +/** + Defines types of threading behavior enforced at runtime. + */ +public enum ThreadingBehavior { + + /** + * Instances of classes with the given contract are expected to be fully immutable + * and thread-safe. + */ + IMMUTABLE, + + /** + * Instances of classes with the given contract are expected to be immutable if their + * dependencies injected at construction time are immutable and are expected to be thread-safe + * if their dependencies are thread-safe. + */ + IMMUTABLE_CONDITIONAL, + + /** + * Instances of classes with the given contract are expected to be fully thread-safe. + */ + SAFE, + + /** + * Instances of classes with the given contract are expected to be thread-safe if their + * dependencies injected at construction time are thread-safe. + */ + SAFE_CONDITIONAL, + + /** + * Instances of classes with the given contract are expected to be non thread-safe. + */ + UNSAFE + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/config/RequestConfig.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/config/RequestConfig.java new file mode 100644 index 000000000000..fb1037188fd1 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/config/RequestConfig.java @@ -0,0 +1,423 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.config; + +import java.net.InetAddress; +import java.util.Collection; + +import org.apache.http.HttpHost; +import org.apache.http.annotation.Contract; +import org.apache.http.annotation.ThreadingBehavior; + +/** + * Immutable class encapsulating request configuration items. + * The default setting for stale connection checking changed + * to false, and the feature was deprecated starting with version 4.4. + */ +@Contract(threading = ThreadingBehavior.IMMUTABLE) +public class RequestConfig implements Cloneable { + + public static final RequestConfig DEFAULT = null; + + /** + * Intended for CDI compatibility + */ + protected RequestConfig() { + } + + RequestConfig( + final boolean expectContinueEnabled, + final HttpHost proxy, + final InetAddress localAddress, + final boolean staleConnectionCheckEnabled, + final String cookieSpec, + final boolean redirectsEnabled, + final boolean relativeRedirectsAllowed, + final boolean circularRedirectsAllowed, + final int maxRedirects, + final boolean authenticationEnabled, + final Collection targetPreferredAuthSchemes, + final Collection proxyPreferredAuthSchemes, + final int connectionRequestTimeout, + final int connectTimeout, + final int socketTimeout, + final boolean contentCompressionEnabled, + final boolean normalizeUri) { + } + + /** + * Determines whether the 'Expect: 100-Continue' handshake is enabled + * for entity enclosing methods. The purpose of the 'Expect: 100-Continue' + * handshake is to allow a client that is sending a request message with + * a request body to determine if the origin server is willing to + * accept the request (based on the request headers) before the client + * sends the request body. + *

    + * The use of the 'Expect: 100-continue' handshake can result in + * a noticeable performance improvement for entity enclosing requests + * (such as POST and PUT) that require the target server's + * authentication. + *

    + *

    + * 'Expect: 100-continue' handshake should be used with caution, as it + * may cause problems with HTTP servers and proxies that do not support + * HTTP/1.1 protocol. + *

    + *

    + * Default: {@code false} + *

    + */ + public boolean isExpectContinueEnabled() { + return false; + } + + /** + * Returns HTTP proxy to be used for request execution. + *

    + * Default: {@code null} + *

    + */ + public HttpHost getProxy() { + return null; + } + + /** + * Returns local address to be used for request execution. + *

    + * On machines with multiple network interfaces, this parameter + * can be used to select the network interface from which the + * connection originates. + *

    + *

    + * Default: {@code null} + *

    + */ + public InetAddress getLocalAddress() { + return null; + } + + /** + * Determines whether stale connection check is to be used. The stale + * connection check can cause up to 30 millisecond overhead per request and + * should be used only when appropriate. For performance critical + * operations this check should be disabled. + *

    + * Default: {@code false} since 4.4 + *

    + * + * @deprecated (4.4) Use {@link + * org.apache.http.impl.conn.PoolingHttpClientConnectionManager#getValidateAfterInactivity()} + */ + @Deprecated + public boolean isStaleConnectionCheckEnabled() { + return false; + } + + /** + * Determines the name of the cookie specification to be used for HTTP state + * management. + *

    + * Default: {@code null} + *

    + */ + public String getCookieSpec() { + return null; + } + + /** + * Determines whether redirects should be handled automatically. + *

    + * Default: {@code true} + *

    + */ + public boolean isRedirectsEnabled() { + return false; + } + + /** + * Determines whether relative redirects should be rejected. HTTP specification + * requires the location value be an absolute URI. + *

    + * Default: {@code true} + *

    + */ + public boolean isRelativeRedirectsAllowed() { + return false; + } + + /** + * Determines whether circular redirects (redirects to the same location) should + * be allowed. The HTTP spec is not sufficiently clear whether circular redirects + * are permitted, therefore optionally they can be enabled + *

    + * Default: {@code false} + *

    + */ + public boolean isCircularRedirectsAllowed() { + return false; + } + + /** + * Returns the maximum number of redirects to be followed. The limit on number + * of redirects is intended to prevent infinite loops. + *

    + * Default: {@code 50} + *

    + */ + public int getMaxRedirects() { + return 0; + } + + /** + * Determines whether authentication should be handled automatically. + *

    + * Default: {@code true} + *

    + */ + public boolean isAuthenticationEnabled() { + return false; + } + + /** + * Determines the order of preference for supported authentication schemes + * when authenticating with the target host. + *

    + * Default: {@code null} + *

    + */ + public Collection getTargetPreferredAuthSchemes() { + return null; + } + + /** + * Determines the order of preference for supported authentication schemes + * when authenticating with the proxy host. + *

    + * Default: {@code null} + *

    + */ + public Collection getProxyPreferredAuthSchemes() { + return null; + } + + /** + * Returns the timeout in milliseconds used when requesting a connection + * from the connection manager. + *

    + * A timeout value of zero is interpreted as an infinite timeout. + * A negative value is interpreted as undefined (system default if applicable). + *

    + *

    + * Default: {@code -1} + *

    + */ + public int getConnectionRequestTimeout() { + return 0; + } + + /** + * Determines the timeout in milliseconds until a connection is established. + *

    + * A timeout value of zero is interpreted as an infinite timeout. + * A negative value is interpreted as undefined (system default if applicable). + *

    + *

    + * Default: {@code -1} + *

    + */ + public int getConnectTimeout() { + return 0; + } + + /** + * Defines the socket timeout ({@code SO_TIMEOUT}) in milliseconds, + * which is the timeout for waiting for data or, put differently, + * a maximum period inactivity between two consecutive data packets). + *

    + * A timeout value of zero is interpreted as an infinite timeout. + * A negative value is interpreted as undefined (system default if applicable). + *

    + *

    + * Default: {@code -1} + *

    + */ + public int getSocketTimeout() { + return 0; + } + + /** + * Determines whether compressed entities should be decompressed automatically. + *

    + * Default: {@code true} + *

    + * + * @since 4.4 + * @deprecated (4.5) Use {@link #isContentCompressionEnabled()} + */ + @Deprecated + public boolean isDecompressionEnabled() { + return false; + } + + /** + * Determines whether the target server is requested to compress content. + *

    + * Default: {@code true} + *

    + * + * @since 4.5 + */ + public boolean isContentCompressionEnabled() { + return false; + } + + /** + * Determines whether client should normalize URIs in requests or not. + *

    + * Default: {@code true} + *

    + * + * @since 4.5.8 + */ + public boolean isNormalizeUri() { + return false; + } + + @Override + protected RequestConfig clone() throws CloneNotSupportedException { + return null; + } + + @Override + public String toString() { + return null; + } + + public static RequestConfig.Builder custom() { + return null; + } + + @SuppressWarnings("deprecation") + public static RequestConfig.Builder copy(final RequestConfig config) { + return null; + } + + public static class Builder { + + Builder() { + } + + public Builder setExpectContinueEnabled(final boolean expectContinueEnabled) { + return null; + } + + public Builder setProxy(final HttpHost proxy) { + return null; + } + + public Builder setLocalAddress(final InetAddress localAddress) { + return null; + } + + /** + * @deprecated (4.4) Use {@link + * org.apache.http.impl.conn.PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)} + */ + @Deprecated + public Builder setStaleConnectionCheckEnabled(final boolean staleConnectionCheckEnabled) { + return null; + } + + public Builder setCookieSpec(final String cookieSpec) { + return null; + } + + public Builder setRedirectsEnabled(final boolean redirectsEnabled) { + return null; + } + + public Builder setRelativeRedirectsAllowed(final boolean relativeRedirectsAllowed) { + return null; + } + + public Builder setCircularRedirectsAllowed(final boolean circularRedirectsAllowed) { + return null; + } + + public Builder setMaxRedirects(final int maxRedirects) { + return null; + } + + public Builder setAuthenticationEnabled(final boolean authenticationEnabled) { + return null; + } + + public Builder setTargetPreferredAuthSchemes(final Collection targetPreferredAuthSchemes) { + return null; + } + + public Builder setProxyPreferredAuthSchemes(final Collection proxyPreferredAuthSchemes) { + return null; + } + + public Builder setConnectionRequestTimeout(final int connectionRequestTimeout) { + return null; + } + + public Builder setConnectTimeout(final int connectTimeout) { + return null; + } + + public Builder setSocketTimeout(final int socketTimeout) { + return null; + } + + /** + * @deprecated (4.5) Set {@link #setContentCompressionEnabled(boolean)} to {@code false} and + * add the {@code Accept-Encoding} request header. + */ + @Deprecated + public Builder setDecompressionEnabled(final boolean decompressionEnabled) { + return null; + } + + public Builder setContentCompressionEnabled(final boolean contentCompressionEnabled) { + return null; + } + + public Builder setNormalizeUri(final boolean normalizeUri) { + return null; + } + + public RequestConfig build() { + return null; + } + + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpDelete.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpDelete.java new file mode 100644 index 000000000000..cde9b50443f3 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpDelete.java @@ -0,0 +1,69 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; + +/** + * HTTP DELETE method + *

    + * The HTTP DELETE method is defined in section 9.7 of + * RFC2616: + *

    + * The DELETE method requests that the origin server delete the resource + * identified by the Request-URI. [...] The client cannot + * be guaranteed that the operation has been carried out, even if the + * status code returned from the origin server indicates that the action + * has been completed successfully. + *
    + * + * @since 4.0 + */ +public class HttpDelete extends HttpRequestBase { + + public final static String METHOD_NAME = "DELETE"; + + + public HttpDelete() { + } + + public HttpDelete(final URI uri) { + } + + /** + * @throws IllegalArgumentException if the uri is invalid. + */ + public HttpDelete(final String uri) { + } + + @Override + public String getMethod() { + return METHOD_NAME; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpHead.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpHead.java new file mode 100644 index 000000000000..ad9cb1c19c6c --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpHead.java @@ -0,0 +1,72 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; + +/** + * HTTP HEAD method. + *

    + * The HTTP HEAD method is defined in section 9.4 of + * RFC2616: + *

    + *
    + * The HEAD method is identical to GET except that the server MUST NOT + * return a message-body in the response. The metainformation contained + * in the HTTP headers in response to a HEAD request SHOULD be identical + * to the information sent in response to a GET request. This method can + * be used for obtaining metainformation about the entity implied by the + * request without transferring the entity-body itself. This method is + * often used for testing hypertext links for validity, accessibility, + * and recent modification. + *
    + * + * @since 4.0 + */ +public class HttpHead extends HttpRequestBase { + + public final static String METHOD_NAME = "HEAD"; + + public HttpHead() { + } + + public HttpHead(final URI uri) { + } + + /** + * @throws IllegalArgumentException if the uri is invalid. + */ + public HttpHead(final String uri) { + } + + @Override + public String getMethod() { + return METHOD_NAME; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpOptions.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpOptions.java new file mode 100644 index 000000000000..078bacf8f7f5 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpOptions.java @@ -0,0 +1,82 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; +import java.util.HashSet; +import java.util.Set; + +import org.apache.http.Header; +import org.apache.http.HeaderElement; +import org.apache.http.HeaderIterator; +import org.apache.http.HttpResponse; +import org.apache.http.util.Args; + +/** + * HTTP OPTIONS method. + *

    + * The HTTP OPTIONS method is defined in section 9.2 of + * RFC2616: + *

    + *
    + * The OPTIONS method represents a request for information about the + * communication options available on the request/response chain + * identified by the Request-URI. This method allows the client to + * determine the options and/or requirements associated with a resource, + * or the capabilities of a server, without implying a resource action + * or initiating a resource retrieval. + *
    + * + * @since 4.0 + */ +public class HttpOptions extends HttpRequestBase { + + public final static String METHOD_NAME = "OPTIONS"; + + public HttpOptions() { + } + + public HttpOptions(final URI uri) { + } + + /** + * @throws IllegalArgumentException if the uri is invalid. + */ + public HttpOptions(final String uri) { + } + + @Override + public String getMethod() { + return null; + } + + public Set getAllowedMethods(final HttpResponse response) { + return null; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPatch.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPatch.java new file mode 100644 index 000000000000..6c4a26a76f9b --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpPatch.java @@ -0,0 +1,69 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; + +/** + * HTTP PATCH method. + *

    + * The HTTP PATCH method is defined in RF5789: + *

    + *
    The PATCH + * method requests that a set of changes described in the request entity be + * applied to the resource identified by the Request- URI. Differs from the PUT + * method in the way the server processes the enclosed entity to modify the + * resource identified by the Request-URI. In a PUT request, the enclosed entity + * origin server, and the client is requesting that the stored version be + * replaced. With PATCH, however, the enclosed entity contains a set of + * instructions describing how a resource currently residing on the origin + * server should be modified to produce a new version. + *
    + * + * @since 4.2 + */ +public class HttpPatch extends HttpEntityEnclosingRequestBase { + + public final static String METHOD_NAME = "PATCH"; + + public HttpPatch() { + } + + public HttpPatch(final URI uri) { + } + + public HttpPatch(final String uri) { + } + + @Override + public String getMethod() { + return null; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpTrace.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpTrace.java new file mode 100644 index 000000000000..0860c8e3ec41 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpTrace.java @@ -0,0 +1,71 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; + +/** + * HTTP TRACE method. + *

    + * The HTTP TRACE method is defined in section 9.6 of + * RFC2616: + *

    + *
    + * The TRACE method is used to invoke a remote, application-layer loop- + * back of the request message. The final recipient of the request + * SHOULD reflect the message received back to the client as the + * entity-body of a 200 (OK) response. The final recipient is either the + * origin server or the first proxy or gateway to receive a Max-Forwards + * value of zero (0) in the request (see section 14.31). A TRACE request + * MUST NOT include an entity. + *
    + * + * @since 4.0 + */ +public class HttpTrace extends HttpRequestBase { + + public final static String METHOD_NAME = "TRACE"; + + public HttpTrace() { + } + + public HttpTrace(final URI uri) { + } + + /** + * @throws IllegalArgumentException if the uri is invalid. + */ + public HttpTrace(final String uri) { + } + + @Override + public String getMethod() { + return METHOD_NAME; + } + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpUriRequest.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpUriRequest.java new file mode 100644 index 000000000000..56de260424a2 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/HttpUriRequest.java @@ -0,0 +1,85 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; + +import org.apache.http.HttpRequest; + +/** + * Extended version of the {@link HttpRequest} interface that provides + * convenience methods to access request properties such as request URI + * and method type. + * + * @since 4.0 + */ +public interface HttpUriRequest extends HttpRequest { + + /** + * Returns the HTTP method this request uses, such as {@code GET}, + * {@code PUT}, {@code POST}, or other. + */ + String getMethod(); + + /** + * Returns the URI this request uses, such as + * {@code http://example.org/path/to/file}. + *

    + * Note that the URI may be absolute URI (as above) or may be a relative URI. + *

    + *

    + * Implementations are encouraged to return + * the URI that was initially requested. + *

    + *

    + * To find the final URI after any redirects have been processed, + * please see the section entitled + * HTTP execution context + * in the + * HttpClient Tutorial + *

    + */ + URI getURI(); + + /** + * Aborts execution of the request. + * + * @throws UnsupportedOperationException if the abort operation + * is not supported / cannot be implemented. + */ + void abort() throws UnsupportedOperationException; + + /** + * Tests if the request execution has been aborted. + * + * @return {@code true} if the request execution has been aborted, + * {@code false} otherwise. + */ + boolean isAborted(); + +} diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/RequestBuilder.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/RequestBuilder.java new file mode 100644 index 000000000000..b22b3e367335 --- /dev/null +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/client/methods/RequestBuilder.java @@ -0,0 +1,369 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.client.methods; + +import java.net.URI; +import java.nio.charset.Charset; +import java.util.List; + +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.HttpEntityEnclosingRequest; +import org.apache.http.HttpRequest; +import org.apache.http.NameValuePair; +import org.apache.http.ProtocolVersion; +import org.apache.http.client.config.RequestConfig; + +/** + * Builder for {@link HttpUriRequest} instances. + *

    + * Please note that this class treats parameters differently depending on composition + * of the request: if the request has a content entity explicitly set with + * {@link #setEntity(org.apache.http.HttpEntity)} or it is not an entity enclosing method + * (such as POST or PUT), parameters will be added to the query component of the request URI. + * Otherwise, parameters will be added as a URL encoded {@link UrlEncodedFormEntity entity}. + *

    + * + * @since 4.3 + */ +public class RequestBuilder { + + RequestBuilder(final String method) { + } + + RequestBuilder(final String method, final URI uri) { + } + + RequestBuilder(final String method, final String uri) { + } + + RequestBuilder() { + } + + public static RequestBuilder create(final String method) { + return null; + } + + public static RequestBuilder get() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder get(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder get(final String uri) { + return null; + } + + public static RequestBuilder head() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder head(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder head(final String uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder patch() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder patch(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder patch(final String uri) { + return null; + } + + public static RequestBuilder post() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder post(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder post(final String uri) { + return null; + } + + public static RequestBuilder put() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder put(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder put(final String uri) { + return null; + } + + public static RequestBuilder delete() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder delete(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder delete(final String uri) { + return null; + } + + public static RequestBuilder trace() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder trace(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder trace(final String uri) { + return null; + } + + public static RequestBuilder options() { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder options(final URI uri) { + return null; + } + + /** + * @since 4.4 + */ + public static RequestBuilder options(final String uri) { + return null; + } + + public static RequestBuilder copy(final HttpRequest request) { + return null; + } + + private RequestBuilder doCopy(final HttpRequest request) { + return null; + } + + /** + * @since 4.4 + */ + public RequestBuilder setCharset(final Charset charset) { + return null; + } + + /** + * @since 4.4 + */ + public Charset getCharset() { + return null; + } + + public String getMethod() { + return null; + } + + public ProtocolVersion getVersion() { + return null; + } + + public RequestBuilder setVersion(final ProtocolVersion version) { + return null; + } + + public URI getUri() { + return null; + } + + public RequestBuilder setUri(final URI uri) { + return null; + } + + public RequestBuilder setUri(final String uri) { + return null; + } + + public Header getFirstHeader(final String name) { + return null; + } + + public Header getLastHeader(final String name) { + return null; + } + + public Header[] getHeaders(final String name) { + return null; + } + + public RequestBuilder addHeader(final Header header) { + return null; + } + + public RequestBuilder addHeader(final String name, final String value) { + return null; + } + + public RequestBuilder removeHeader(final Header header) { + return null; + } + + public RequestBuilder removeHeaders(final String name) { + return null; + } + + public RequestBuilder setHeader(final Header header) { + return null; + } + + public RequestBuilder setHeader(final String name, final String value) { + return null; + } + + public HttpEntity getEntity() { + return null; + } + + public RequestBuilder setEntity(final HttpEntity entity) { + return null; + } + + public List getParameters() { + return null; + } + + public RequestBuilder addParameter(final NameValuePair nvp) { + return null; + } + + public RequestBuilder addParameter(final String name, final String value) { + return null; + } + + public RequestBuilder addParameters(final NameValuePair... nvps) { + return null; + } + + public RequestConfig getConfig() { + return null; + } + + public RequestBuilder setConfig(final RequestConfig config) { + return null; + } + + public HttpUriRequest build() { + return null; + } + + static class InternalRequest extends HttpRequestBase { + + InternalRequest(final String method) { + + } + + @Override + public String getMethod() { + return null; + } + + } + + static class InternalEntityEclosingRequest extends HttpEntityEnclosingRequestBase { + + InternalEntityEclosingRequest(final String method) { + + } + + @Override + public String getMethod() { + return null; + } + + } + + @Override + public String toString() { + return null; + } + +} From b66dcbe5b6936ffde254e5c2c42a900183b4d469 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 17:55:34 +0100 Subject: [PATCH 1393/1662] Factor request-forgery config so it can be used in an inline-expectations test --- .../Security/CWE/CWE-918/RequestForgery.ql | 23 +-------------- .../java/security/RequestForgeryConfig.qll | 29 +++++++++++++++++++ .../security/CWE-918/RequestForgery.ql | 18 ++++++++++++ 3 files changed, 48 insertions(+), 22 deletions(-) create mode 100644 java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll create mode 100644 java/ql/test/query-tests/security/CWE-918/RequestForgery.ql diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index 8071202a4b0f..7a1ff4ac9331 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -11,30 +11,9 @@ */ import java -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.security.RequestForgery +import semmle.code.java.security.RequestForgeryConfig import DataFlow::PathGraph -class RequestForgeryConfiguration extends TaintTracking::Configuration { - RequestForgeryConfiguration() { this = "Server-Side Request Forgery" } - - override predicate isSource(DataFlow::Node source) { - source instanceof RemoteFlowSource and - // Exclude results of remote HTTP requests: fetching something else based on that result - // is no worse than following a redirect returned by the remote server, and typically - // we're requesting a resource via https which we trust to only send us to safe URLs. - not source.asExpr().(MethodAccess).getCallee() instanceof URLConnectionGetInputStreamMethod - } - - override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } - - override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - any(RequestForgeryAdditionalTaintStep r).propagatesTaint(pred, succ) - } - - override predicate isSanitizer(DataFlow::Node node) { node instanceof RequestForgerySanitizer } -} - from DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf where conf.hasFlowPath(source, sink) select sink.getNode(), source, sink, "Potential server-side request forgery due to $@.", diff --git a/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll b/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll new file mode 100644 index 000000000000..084f4683de81 --- /dev/null +++ b/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll @@ -0,0 +1,29 @@ +/** + * Provides a taint-tracking configuration characterising request-forgery risks. + */ + +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.security.RequestForgery + +/** + * A taint-tracking configuration characterising request-forgery risks. + */ +class RequestForgeryConfiguration extends TaintTracking::Configuration { + RequestForgeryConfiguration() { this = "Server-Side Request Forgery" } + + override predicate isSource(DataFlow::Node source) { + source instanceof RemoteFlowSource and + // Exclude results of remote HTTP requests: fetching something else based on that result + // is no worse than following a redirect returned by the remote server, and typically + // we're requesting a resource via https which we trust to only send us to safe URLs. + not source.asExpr().(MethodAccess).getCallee() instanceof URLConnectionGetInputStreamMethod + } + + override predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink } + + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { + any(RequestForgeryAdditionalTaintStep r).propagatesTaint(pred, succ) + } + + override predicate isSanitizer(DataFlow::Node node) { node instanceof RequestForgerySanitizer } +} diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql b/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql new file mode 100644 index 000000000000..d7e481ce618d --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql @@ -0,0 +1,18 @@ +import java +import semmle.code.java.security.RequestForgeryConfig +import TestUtilities.InlineExpectationsTest + +class HasFlowTest extends InlineExpectationsTest { + HasFlowTest() { this = "HasFlowTest" } + + override string getARelevantTag() { result = "SSRF" } + + override predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "SSRF" and + exists(RequestForgeryConfiguration conf, DataFlow::Node sink | conf.hasFlowTo(sink) | + sink.getLocation() = location and + element = sink.toString() and + value = "" + ) + } +} From 8b080a94e701884f44d6281fe40a4d9420f27840 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 17:56:38 +0100 Subject: [PATCH 1394/1662] Convert request forgery tests to inline expectations; add missing models revealed by this process. --- .../code/java/dataflow/ExternalFlow.qll | 2 + .../code/java/frameworks/ApacheHttp.qll | 5 +- .../java/frameworks/spring/SpringHttp.qll | 6 +- .../security/CWE-918/JaxWsSSRF.java | 2 +- .../security/CWE-918/RequestForgery.expected | 149 ------------------ .../security/CWE-918/RequestForgery.java | 22 +-- .../security/CWE-918/RequestForgery.qlref | 1 - .../security/CWE-918/RequestForgery2.java | 66 ++++---- .../security/CWE-918/SpringSSRF.java | 52 +++--- .../BasicHttpEntityEnclosingRequest.java | 8 +- 10 files changed, 84 insertions(+), 229 deletions(-) delete mode 100644 java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index d23cfe5b5d4f..535c667698f9 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -252,6 +252,8 @@ private predicate summaryModelCsv(string row) { "javax.xml.transform.stream;StreamSource;false;getInputStream;;;Argument[-1];ReturnValue;taint", "java.nio;ByteBuffer;false;get;;;Argument[-1];ReturnValue;taint", "java.net;URI;false;toURL;;;Argument[-1];ReturnValue;taint", + "java.net;URI;false;toString;;;Argument[-1];ReturnValue;taint", + "java.net;URI;false;toAsciiString;;;Argument[-1];ReturnValue;taint", "java.io;File;false;toURI;;;Argument[-1];ReturnValue;taint", "java.io;File;false;toPath;;;Argument[-1];ReturnValue;taint", "java.nio.file;Path;false;toFile;;;Argument[-1];ReturnValue;taint", diff --git a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll index 28908c2cec1d..952efe9f7dc5 100644 --- a/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll @@ -261,7 +261,10 @@ private class ApacheHttpFlowStep extends SummaryModelCsv { "org.apache.hc.core5.util;CharArrayBuffer;true;toString;();;Argument[-1];ReturnValue;taint", "org.apache.hc.core5.util;CharArrayBuffer;true;substring;(int,int);;Argument[-1];ReturnValue;taint", "org.apache.hc.core5.util;CharArrayBuffer;true;subSequence;(int,int);;Argument[-1];ReturnValue;taint", - "org.apache.hc.core5.util;CharArrayBuffer;true;substringTrimmed;(int,int);;Argument[-1];ReturnValue;taint" + "org.apache.hc.core5.util;CharArrayBuffer;true;substringTrimmed;(int,int);;Argument[-1];ReturnValue;taint", + "org.apache.http.message;BasicRequestLine;false;BasicRequestLine;;;Argument[1];Argument[-1];taint", + "org.apache.http;RequestLine;true;getUri;;;Argument[-1];ReturnValue;taint", + "org.apache.http;RequestLine;true;toString;;;Argument[-1];ReturnValue;taint" ] } } diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll index c56329d3a5ab..8ef4925b1265 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll @@ -53,11 +53,11 @@ private class UrlOpenSink extends SinkModelCsv { "org.springframework.http;RequestEntity;false;put;;;Argument[0];open-url", "org.springframework.http;RequestEntity;false;method;;;Argument[1];open-url", "org.springframework.http;RequestEntity;false;RequestEntity;(HttpMethod,URI);;Argument[1];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(MultiValueMap,HttpMethod,URI);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(MultiValueMap,HttpMethod,URI);;Argument[2];open-url", "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI);;Argument[2];open-url", "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI,Type);;Argument[2];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI);;Argument[3];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI,Type);;Argument[3];open-url" + "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI);;Argument[3];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI,Type);;Argument[3];open-url" ] } } diff --git a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java index cb774b8c44a3..9a6934f2aaa2 100644 --- a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java @@ -19,7 +19,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Client client = ClientBuilder.newClient(); String url = request.getParameter("url"); - client.target(url); + client.target(url); // $ SSRF } } diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index ad5b0625a777..e69de29bb2d1 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -1,149 +0,0 @@ -edges -| JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | JaxWsSSRF.java:22:23:22:25 | url | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:25:31:25:34 | sink : String | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:55:32:55:35 | url1 | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:58:32:58:35 | url1 | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:59:30:59:33 | url1 | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:63:65:63:68 | uri2 | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:64:59:64:61 | uri | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | -| RequestForgery2.java:25:23:25:35 | new URI(...) : URI | RequestForgery2.java:64:59:64:61 | uri | -| RequestForgery2.java:25:23:25:35 | new URI(...) : URI | RequestForgery2.java:67:43:67:45 | uri | -| RequestForgery2.java:25:31:25:34 | sink : String | RequestForgery2.java:25:23:25:35 | new URI(...) : URI | -| RequestForgery.java:19:23:19:58 | new URI(...) : URI | RequestForgery.java:22:52:22:54 | uri | -| RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:19:23:19:58 | new URI(...) : URI | -| RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | -| RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:59:76:77 | new URI(...) | -| RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:67:76:76 | unsafeUri3 : String | -| RequestForgery.java:76:67:76:76 | unsafeUri3 : String | RequestForgery.java:76:59:76:77 | new URI(...) | -| RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:59:80:77 | new URI(...) | -| RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:67:80:76 | unsafeUri4 : String | -| RequestForgery.java:80:67:80:76 | unsafeUri4 : String | RequestForgery.java:80:59:80:77 | new URI(...) | -| RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | -| RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:67:85:87 | toString(...) : String | -| RequestForgery.java:85:67:85:87 | toString(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | -| RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | -| RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:68:90:88 | toString(...) : String | -| RequestForgery.java:90:68:90:88 | toString(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | -| RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | -| RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:68:95:89 | toString(...) : String | -| RequestForgery.java:95:68:95:89 | toString(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | -| RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | -| RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:68:100:89 | toString(...) : String | -| RequestForgery.java:100:68:100:89 | toString(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | -| RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:59:104:77 | new URI(...) | -| RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:67:104:76 | unsafeUri6 : String | -| RequestForgery.java:104:67:104:76 | unsafeUri6 : String | RequestForgery.java:104:59:104:77 | new URI(...) | -| RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:59:108:77 | new URI(...) | -| RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:67:108:76 | unsafeUri7 : String | -| RequestForgery.java:108:67:108:76 | unsafeUri7 : String | RequestForgery.java:108:59:108:77 | new URI(...) | -| RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:59:112:77 | new URI(...) | -| RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:67:112:76 | unsafeUri8 : String | -| RequestForgery.java:112:67:112:76 | unsafeUri8 : String | RequestForgery.java:112:59:112:77 | new URI(...) | -| RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:59:116:77 | new URI(...) | -| RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:67:116:76 | unsafeUri9 : String | -| RequestForgery.java:116:67:116:76 | unsafeUri9 : String | RequestForgery.java:116:59:116:77 | new URI(...) | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:40:50:62 | new URI(...) | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:66:48:66:61 | fooResourceUrl | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:69:30:69:43 | fooResourceUrl | -| SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | SpringSSRF.java:50:40:50:62 | new URI(...) | -| SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | SpringSSRF.java:58:74:58:96 | new URI(...) | -nodes -| JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JaxWsSSRF.java:22:23:22:25 | url | semmle.label | url | -| RequestForgery2.java:23:27:23:53 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery2.java:25:23:25:35 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| RequestForgery2.java:25:31:25:34 | sink : String | semmle.label | sink : String | -| RequestForgery2.java:55:32:55:35 | url1 | semmle.label | url1 | -| RequestForgery2.java:58:32:58:35 | url1 | semmle.label | url1 | -| RequestForgery2.java:59:30:59:33 | url1 | semmle.label | url1 | -| RequestForgery2.java:63:65:63:68 | uri2 | semmle.label | uri2 | -| RequestForgery2.java:64:59:64:61 | uri | semmle.label | uri | -| RequestForgery2.java:67:43:67:45 | uri | semmle.label | uri | -| RequestForgery2.java:69:29:69:32 | uri2 | semmle.label | uri2 | -| RequestForgery.java:19:23:19:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | -| RequestForgery.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:22:52:22:54 | uri | semmle.label | uri | -| RequestForgery.java:75:33:75:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:76:59:76:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:76:67:76:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | -| RequestForgery.java:79:49:79:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:80:59:80:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:80:67:80:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | -| RequestForgery.java:84:31:84:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:85:59:85:88 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:85:67:85:87 | toString(...) : String | semmle.label | toString(...) : String | -| RequestForgery.java:88:58:88:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:90:60:90:89 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:90:68:90:88 | toString(...) : String | semmle.label | toString(...) : String | -| RequestForgery.java:93:60:93:88 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:95:60:95:90 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:95:68:95:89 | toString(...) : String | semmle.label | toString(...) : String | -| RequestForgery.java:98:77:98:105 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:100:60:100:90 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:100:68:100:89 | toString(...) : String | semmle.label | toString(...) : String | -| RequestForgery.java:103:73:103:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:104:59:104:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:104:67:104:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | -| RequestForgery.java:107:56:107:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:108:59:108:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:108:67:108:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | -| RequestForgery.java:111:55:111:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:112:59:112:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:112:67:112:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | -| RequestForgery.java:115:33:115:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| RequestForgery.java:116:59:116:77 | new URI(...) | semmle.label | new URI(...) | -| RequestForgery.java:116:67:116:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | -| SpringSSRF.java:26:33:26:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| SpringSSRF.java:32:47:32:67 | ... + ... | semmle.label | ... + ... | -| SpringSSRF.java:37:43:37:56 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:41:42:41:55 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:45:47:45:60 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:50:40:50:62 | new URI(...) | semmle.label | new URI(...) | -| SpringSSRF.java:50:48:50:61 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | -| SpringSSRF.java:54:59:54:72 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:58:74:58:96 | new URI(...) | semmle.label | new URI(...) | -| SpringSSRF.java:58:82:58:95 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | -| SpringSSRF.java:62:57:62:70 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:66:48:66:61 | fooResourceUrl | semmle.label | fooResourceUrl | -| SpringSSRF.java:69:30:69:43 | fooResourceUrl | semmle.label | fooResourceUrl | -#select -| JaxWsSSRF.java:22:23:22:25 | url | JaxWsSSRF.java:21:22:21:48 | getParameter(...) : String | JaxWsSSRF.java:22:23:22:25 | url | Potential server-side request forgery due to $@. | JaxWsSSRF.java:21:22:21:48 | getParameter(...) | a user-provided value | -| RequestForgery2.java:55:32:55:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:55:32:55:35 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:58:32:58:35 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:58:32:58:35 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:59:30:59:33 | url1 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:59:30:59:33 | url1 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:63:65:63:68 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:63:65:63:68 | uri2 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:64:59:64:61 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:64:59:64:61 | uri | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:67:43:67:45 | uri | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:67:43:67:45 | uri | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery2.java:69:29:69:32 | uri2 | RequestForgery2.java:23:27:23:53 | getParameter(...) : String | RequestForgery2.java:69:29:69:32 | uri2 | Potential server-side request forgery due to $@. | RequestForgery2.java:23:27:23:53 | getParameter(...) | a user-provided value | -| RequestForgery.java:22:52:22:54 | uri | RequestForgery.java:19:31:19:57 | getParameter(...) : String | RequestForgery.java:22:52:22:54 | uri | Potential server-side request forgery due to $@. | RequestForgery.java:19:31:19:57 | getParameter(...) | a user-provided value | -| RequestForgery.java:76:59:76:77 | new URI(...) | RequestForgery.java:75:33:75:63 | getParameter(...) : String | RequestForgery.java:76:59:76:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:75:33:75:63 | getParameter(...) | a user-provided value | -| RequestForgery.java:80:59:80:77 | new URI(...) | RequestForgery.java:79:49:79:79 | getParameter(...) : String | RequestForgery.java:80:59:80:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:79:49:79:79 | getParameter(...) | a user-provided value | -| RequestForgery.java:85:59:85:88 | new URI(...) | RequestForgery.java:84:31:84:61 | getParameter(...) : String | RequestForgery.java:85:59:85:88 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:84:31:84:61 | getParameter(...) | a user-provided value | -| RequestForgery.java:90:60:90:89 | new URI(...) | RequestForgery.java:88:58:88:86 | getParameter(...) : String | RequestForgery.java:90:60:90:89 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:88:58:88:86 | getParameter(...) | a user-provided value | -| RequestForgery.java:95:60:95:90 | new URI(...) | RequestForgery.java:93:60:93:88 | getParameter(...) : String | RequestForgery.java:95:60:95:90 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:93:60:93:88 | getParameter(...) | a user-provided value | -| RequestForgery.java:100:60:100:90 | new URI(...) | RequestForgery.java:98:77:98:105 | getParameter(...) : String | RequestForgery.java:100:60:100:90 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:98:77:98:105 | getParameter(...) | a user-provided value | -| RequestForgery.java:104:59:104:77 | new URI(...) | RequestForgery.java:103:73:103:103 | getParameter(...) : String | RequestForgery.java:104:59:104:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:103:73:103:103 | getParameter(...) | a user-provided value | -| RequestForgery.java:108:59:108:77 | new URI(...) | RequestForgery.java:107:56:107:86 | getParameter(...) : String | RequestForgery.java:108:59:108:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:107:56:107:86 | getParameter(...) | a user-provided value | -| RequestForgery.java:112:59:112:77 | new URI(...) | RequestForgery.java:111:55:111:85 | getParameter(...) : String | RequestForgery.java:112:59:112:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:111:55:111:85 | getParameter(...) | a user-provided value | -| RequestForgery.java:116:59:116:77 | new URI(...) | RequestForgery.java:115:33:115:63 | getParameter(...) : String | RequestForgery.java:116:59:116:77 | new URI(...) | Potential server-side request forgery due to $@. | RequestForgery.java:115:33:115:63 | getParameter(...) | a user-provided value | -| SpringSSRF.java:32:47:32:67 | ... + ... | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:32:47:32:67 | ... + ... | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:37:43:37:56 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:37:43:37:56 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:41:42:41:55 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:41:42:41:55 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:45:47:45:60 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:45:47:45:60 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:50:40:50:62 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:50:40:50:62 | new URI(...) | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:54:59:54:72 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:54:59:54:72 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:58:74:58:96 | new URI(...) | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:58:74:58:96 | new URI(...) | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:62:57:62:70 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:62:57:62:70 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:66:48:66:61 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:66:48:66:61 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | -| SpringSSRF.java:69:30:69:43 | fooResourceUrl | SpringSSRF.java:26:33:26:60 | getParameter(...) : String | SpringSSRF.java:69:30:69:43 | fooResourceUrl | Potential server-side request forgery due to $@. | SpringSSRF.java:26:33:26:60 | getParameter(...) | a user-provided value | diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java index f298ab31d1bb..68118256b9e2 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.java @@ -19,7 +19,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) URI uri = new URI(request.getParameter("uri")); // BAD: a request parameter is incorporated without validation into a Http // request - HttpRequest r = HttpRequest.newBuilder(uri).build(); + HttpRequest r = HttpRequest.newBuilder(uri).build(); // $ SSRF client.send(r, null); // GOOD: sanitisation by concatenation with a prefix that prevents targeting an arbitrary host. @@ -73,47 +73,47 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) // BAD: cases where a string that would sanitise is used, but occurs in the wrong // place to sanitise user input: String unsafeUri3 = request.getParameter("baduri3") + "https://example.com/"; - HttpRequest unsafer3 = HttpRequest.newBuilder(new URI(unsafeUri3)).build(); + HttpRequest unsafer3 = HttpRequest.newBuilder(new URI(unsafeUri3)).build(); // $ SSRF client.send(unsafer3, null); String unsafeUri4 = ("someprefix" + request.getParameter("baduri4")) + "https://example.com/"; - HttpRequest unsafer4 = HttpRequest.newBuilder(new URI(unsafeUri4)).build(); + HttpRequest unsafer4 = HttpRequest.newBuilder(new URI(unsafeUri4)).build(); // $ SSRF client.send(unsafer4, null); StringBuilder unsafeUri5 = new StringBuilder(); unsafeUri5.append(request.getParameter("baduri5")).append("https://example.com/"); - HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); + HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); // $ SSRF client.send(unsafer5, null); StringBuilder unafeUri5a = new StringBuilder(request.getParameter("uri5a")); unafeUri5a.append("https://example.com/"); - HttpRequest unsafer5a = HttpRequest.newBuilder(new URI(unafeUri5a.toString())).build(); + HttpRequest unsafer5a = HttpRequest.newBuilder(new URI(unafeUri5a.toString())).build(); // $ SSRF client.send(unsafer5a, null); StringBuilder unsafeUri5b = (new StringBuilder(request.getParameter("uri5b"))).append("dir/"); unsafeUri5b.append("https://example.com/"); - HttpRequest unsafer5b = HttpRequest.newBuilder(new URI(unsafeUri5b.toString())).build(); + HttpRequest unsafer5b = HttpRequest.newBuilder(new URI(unsafeUri5b.toString())).build(); // $ SSRF client.send(unsafer5b, null); StringBuilder unsafeUri5c = (new StringBuilder("https")).append(request.getParameter("uri5c")); unsafeUri5c.append("://example.com/dir/"); - HttpRequest unsafer5c = HttpRequest.newBuilder(new URI(unsafeUri5c.toString())).build(); + HttpRequest unsafer5c = HttpRequest.newBuilder(new URI(unsafeUri5c.toString())).build(); // $ SSRF client.send(unsafer5c, null); String unsafeUri6 = String.format("%shttps://example.com/", request.getParameter("baduri6")); - HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); + HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); // $ SSRF client.send(unsafer6, null); String unsafeUri7 = String.format("%s/%s", request.getParameter("baduri7"), "https://example.com"); - HttpRequest unsafer7 = HttpRequest.newBuilder(new URI(unsafeUri7)).build(); + HttpRequest unsafer7 = HttpRequest.newBuilder(new URI(unsafeUri7)).build(); // $ SSRF client.send(unsafer7, null); String unsafeUri8 = String.format("%s%s", request.getParameter("baduri8"), "https://example.com/"); - HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); + HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); // $ SSRF client.send(unsafer8, null); String unsafeUri9 = request.getParameter("baduri9") + "/" + String.format("http://%s", "myserver.com"); - HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); + HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); // $ SSRF client.send(unsafer9, null); } catch (Exception e) { diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref b/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref deleted file mode 100644 index 15a8cbb95d34..000000000000 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-918/RequestForgery.ql diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java index 646ae2c3804a..9245016f3e56 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java @@ -63,47 +63,47 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) // URL(URL context, String spec, URLStreamHandler handler) URL url6 = new URL(url3, "spec", new Helper2()); - URLConnection c1 = url1.openConnection(); + URLConnection c1 = url1.openConnection(); // $ SSRF SocketAddress sa = new SocketAddress() { }; - URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); - InputStream c3 = url1.openStream(); + URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); // $ SSRF + InputStream c3 = url1.openStream(); // $ SSRF // java.net.http HttpClient client = HttpClient.newHttpClient(); - HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); - HttpRequest request3 = HttpRequest.newBuilder(uri).build(); + HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); // $ SSRF + HttpRequest request3 = HttpRequest.newBuilder(uri).build(); // $ SSRF // Apache HTTPlib - HttpGet httpGet = new HttpGet(uri); + HttpGet httpGet = new HttpGet(uri); // $ SSRF HttpGet httpGet2 = new HttpGet(); - httpGet2.setURI(uri2); - - new HttpHead(uri); - new HttpPost(uri); - new HttpPut(uri); - new HttpDelete(uri); - new HttpOptions(uri); - new HttpTrace(uri); - new HttpPatch(uri); - - new BasicHttpRequest(new BasicRequestLine("GET", uri2.toString(), null)); - new BasicHttpRequest("GET", uri2.toString()); - new BasicHttpRequest("GET", uri2.toString(), null); - - new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri2.toString(), null)); - new BasicHttpEntityEnclosingRequest("GET", uri2.toString()); - new BasicHttpEntityEnclosingRequest("GET", uri2.toString(), null); - - RequestBuilder.get(uri2); - RequestBuilder.post(uri2); - RequestBuilder.put(uri2); - RequestBuilder.delete(uri2); - RequestBuilder.options(uri2); - RequestBuilder.head(uri2); - RequestBuilder.trace(uri2); - RequestBuilder.patch(uri2); - RequestBuilder.get("").setUri(uri2); + httpGet2.setURI(uri2); // $ SSRF + + new HttpHead(uri); // $ SSRF + new HttpPost(uri); // $ SSRF + new HttpPut(uri); // $ SSRF + new HttpDelete(uri); // $ SSRF + new HttpOptions(uri); // $ SSRF + new HttpTrace(uri); // $ SSRF + new HttpPatch(uri); // $ SSRF + + new BasicHttpRequest(new BasicRequestLine("GET", uri2.toString(), null)); // $ SSRF + new BasicHttpRequest("GET", uri2.toString()); // $ SSRF + new BasicHttpRequest("GET", uri2.toString(), null); // $ SSRF + + new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri2.toString(), null)); // $ SSRF + new BasicHttpEntityEnclosingRequest("GET", uri2.toString()); // $ SSRF + new BasicHttpEntityEnclosingRequest("GET", uri2.toString(), null); // $ SSRF + + RequestBuilder.get(uri2); // $ SSRF + RequestBuilder.post(uri2); // $ SSRF + RequestBuilder.put(uri2); // $ SSRF + RequestBuilder.delete(uri2); // $ SSRF + RequestBuilder.options(uri2); // $ SSRF + RequestBuilder.head(uri2); // $ SSRF + RequestBuilder.trace(uri2); // $ SSRF + RequestBuilder.patch(uri2); // $ SSRF + RequestBuilder.get("").setUri(uri2); // $ SSRF } catch (Exception e) { // TODO: handle exception diff --git a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java index 29b7ad686412..c1123de8d601 100644 --- a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java @@ -30,69 +30,69 @@ protected void doGet(HttpServletRequest request2, HttpServletResponse response2) try { { ResponseEntity response = - restTemplate.getForEntity(fooResourceUrl + "/1", String.class); + restTemplate.getForEntity(fooResourceUrl + "/1", String.class); // $ SSRF } { ResponseEntity response = - restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); + restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); // $ SSRF } { ResponseEntity response = - restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); + restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); // $ SSRF } { String response = - restTemplate.getForObject(fooResourceUrl, String.class, "test"); + restTemplate.getForObject(fooResourceUrl, String.class, "test"); // $ SSRF } { String body = new String("body"); URI uri = new URI(fooResourceUrl); RequestEntity requestEntity = - RequestEntity.post(uri).body(body); + RequestEntity.post(uri).body(body); // $ SSRF ResponseEntity response = restTemplate.exchange(requestEntity, String.class); - RequestEntity.get(uri); - RequestEntity.put(uri); - RequestEntity.delete(uri); - RequestEntity.options(uri); - RequestEntity.patch(uri); - RequestEntity.head(uri); - RequestEntity.method(null, uri); + RequestEntity.get(uri); // $ SSRF + RequestEntity.put(uri); // $ SSRF + RequestEntity.delete(uri); // $ SSRF + RequestEntity.options(uri); // $ SSRF + RequestEntity.patch(uri); // $ SSRF + RequestEntity.head(uri); // $ SSRF + RequestEntity.method(null, uri); // $ SSRF } { - String response = restTemplate.patchForObject(fooResourceUrl, new String("object"), + String response = restTemplate.patchForObject(fooResourceUrl, new String("object"), // $ SSRF String.class, "hi"); } { - ResponseEntity response = restTemplate.postForEntity(new URI(fooResourceUrl), + ResponseEntity response = restTemplate.postForEntity(new URI(fooResourceUrl), // $ SSRF new String("object"), String.class); } { - URI response = restTemplate.postForLocation(fooResourceUrl, new String("object")); + URI response = restTemplate.postForLocation(fooResourceUrl, new String("object")); // $ SSRF } { String response = - restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); + restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); // $ SSRF } { - restTemplate.put(fooResourceUrl, new String("object")); + restTemplate.put(fooResourceUrl, new String("object")); // $ SSRF } { URI uri = new URI(fooResourceUrl); MultiValueMap headers = null; java.lang.reflect.Type type = null; - new RequestEntity(null, uri); - new RequestEntity(headers, null, uri); - new RequestEntity("body", null, uri); - new RequestEntity("body", headers, null, uri); - new RequestEntity("body", null, uri, type); - new RequestEntity("body", headers, null, uri, type); + new RequestEntity(null, uri); // $ SSRF + new RequestEntity(headers, null, uri); // $ SSRF + new RequestEntity("body", null, uri); // $ SSRF + new RequestEntity("body", headers, null, uri); // $ SSRF + new RequestEntity("body", null, uri, type); // $ SSRF + new RequestEntity("body", headers, null, uri, type); // $ SSRF } { URI uri = new URI(fooResourceUrl); - restTemplate.delete(uri); - restTemplate.headForHeaders(uri); - restTemplate.optionsForAllow(uri); + restTemplate.delete(uri); // $ SSRF + restTemplate.headForHeaders(uri); // $ SSRF + restTemplate.optionsForAllow(uri); // $ SSRF } } catch (org.springframework.web.client.RestClientException | java.net.URISyntaxException e) {} } diff --git a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpEntityEnclosingRequest.java b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpEntityEnclosingRequest.java index 108518371a21..b9b0a4fd7777 100644 --- a/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpEntityEnclosingRequest.java +++ b/java/ql/test/stubs/apache-http-4.4.13/org/apache/http/message/BasicHttpEntityEnclosingRequest.java @@ -43,7 +43,7 @@ * @author Oleg Kalnichevski * * @version $Revision: 618017 $ - * + * * @since 4.0 * * @deprecated Please use {@link java.net.URL#openConnection} instead. Please @@ -54,15 +54,15 @@ @Deprecated public class BasicHttpEntityEnclosingRequest extends BasicHttpRequest implements HttpEntityEnclosingRequest { public BasicHttpEntityEnclosingRequest(final String method, final String uri) { - super(method, uri); + super(null); } public BasicHttpEntityEnclosingRequest(final String method, final String uri, final ProtocolVersion ver) { - super(method, uri, ver); + super(null); } public BasicHttpEntityEnclosingRequest(final RequestLine requestline) { - super(requestline); + super(null); } public HttpEntity getEntity() { From 57ca36baad2ad644ddda3892d24cc4c94ee2c9cb Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:02:31 +0100 Subject: [PATCH 1395/1662] Tidy Spring test --- .../security/CWE-918/SpringSSRF.java | 101 +++++++----------- 1 file changed, 36 insertions(+), 65 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java index c1123de8d601..6af4829ba024 100644 --- a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java @@ -28,72 +28,43 @@ protected void doGet(HttpServletRequest request2, HttpServletResponse response2) RestTemplate restTemplate = new RestTemplate(); HttpEntity request = new HttpEntity<>(new String("bar")); try { - { - ResponseEntity response = - restTemplate.getForEntity(fooResourceUrl + "/1", String.class); // $ SSRF - } - - { - ResponseEntity response = - restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); // $ SSRF - } - { - ResponseEntity response = - restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); // $ SSRF - } - { - String response = - restTemplate.getForObject(fooResourceUrl, String.class, "test"); // $ SSRF - } - { - String body = new String("body"); - URI uri = new URI(fooResourceUrl); - RequestEntity requestEntity = - RequestEntity.post(uri).body(body); // $ SSRF - ResponseEntity response = restTemplate.exchange(requestEntity, String.class); - RequestEntity.get(uri); // $ SSRF - RequestEntity.put(uri); // $ SSRF - RequestEntity.delete(uri); // $ SSRF - RequestEntity.options(uri); // $ SSRF - RequestEntity.patch(uri); // $ SSRF - RequestEntity.head(uri); // $ SSRF - RequestEntity.method(null, uri); // $ SSRF - } - { - String response = restTemplate.patchForObject(fooResourceUrl, new String("object"), // $ SSRF - String.class, "hi"); - } - { - ResponseEntity response = restTemplate.postForEntity(new URI(fooResourceUrl), // $ SSRF - new String("object"), String.class); - } - { - URI response = restTemplate.postForLocation(fooResourceUrl, new String("object")); // $ SSRF - } - { - String response = - restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); // $ SSRF - } - { + restTemplate.getForEntity(fooResourceUrl + "/1", String.class); // $ SSRF + restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); // $ SSRF + restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); // $ SSRF + restTemplate.getForObject(fooResourceUrl, String.class, "test"); // $ SSRF + restTemplate.patchForObject(fooResourceUrl, new String("object"), String.class, "hi"); // $ SSRF + restTemplate.postForEntity(new URI(fooResourceUrl), new String("object"), String.class); // $ SSRF + restTemplate.postForLocation(fooResourceUrl, new String("object")); // $ SSRF + restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); // $ SSRF restTemplate.put(fooResourceUrl, new String("object")); // $ SSRF - } - { - URI uri = new URI(fooResourceUrl); - MultiValueMap headers = null; - java.lang.reflect.Type type = null; - new RequestEntity(null, uri); // $ SSRF - new RequestEntity(headers, null, uri); // $ SSRF - new RequestEntity("body", null, uri); // $ SSRF - new RequestEntity("body", headers, null, uri); // $ SSRF - new RequestEntity("body", null, uri, type); // $ SSRF - new RequestEntity("body", headers, null, uri, type); // $ SSRF - } - { - URI uri = new URI(fooResourceUrl); - restTemplate.delete(uri); // $ SSRF - restTemplate.headForHeaders(uri); // $ SSRF - restTemplate.optionsForAllow(uri); // $ SSRF - } + restTemplate.delete(fooResourceUrl); // $ SSRF + restTemplate.headForHeaders(fooResourceUrl); // $ SSRF + restTemplate.optionsForAllow(fooResourceUrl); // $ SSRF + { + String body = new String("body"); + URI uri = new URI(fooResourceUrl); + RequestEntity requestEntity = + RequestEntity.post(uri).body(body); // $ SSRF + ResponseEntity response = restTemplate.exchange(requestEntity, String.class); + RequestEntity.get(uri); // $ SSRF + RequestEntity.put(uri); // $ SSRF + RequestEntity.delete(uri); // $ SSRF + RequestEntity.options(uri); // $ SSRF + RequestEntity.patch(uri); // $ SSRF + RequestEntity.head(uri); // $ SSRF + RequestEntity.method(null, uri); // $ SSRF + } + { + URI uri = new URI(fooResourceUrl); + MultiValueMap headers = null; + java.lang.reflect.Type type = null; + new RequestEntity(null, uri); // $ SSRF + new RequestEntity(headers, null, uri); // $ SSRF + new RequestEntity("body", null, uri); // $ SSRF + new RequestEntity("body", headers, null, uri); // $ SSRF + new RequestEntity("body", null, uri, type); // $ SSRF + new RequestEntity("body", headers, null, uri, type); // $ SSRF + } } catch (org.springframework.web.client.RestClientException | java.net.URISyntaxException e) {} } } From 74569ce3168c1311c6e276a01c76e1af0a6cb934 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:04:14 +0100 Subject: [PATCH 1396/1662] Tidy Jax-RS test --- java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java index 9a6934f2aaa2..da650e2de6cb 100644 --- a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java @@ -1,13 +1,6 @@ import javax.ws.rs.client.*; import java.io.IOException; -import java.net.URI; -import java.net.*; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.Proxy.Type; -import java.io.InputStream; -import org.apache.http.client.methods.HttpGet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; From 08ab5f55469255705aaa21e684c480f9e58263c1 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:04:42 +0100 Subject: [PATCH 1397/1662] Remove redundant test --- .../query-tests/security/CWE-918/Sinks.java | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 java/ql/test/query-tests/security/CWE-918/Sinks.java diff --git a/java/ql/test/query-tests/security/CWE-918/Sinks.java b/java/ql/test/query-tests/security/CWE-918/Sinks.java deleted file mode 100644 index f5d686c9af29..000000000000 --- a/java/ql/test/query-tests/security/CWE-918/Sinks.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.io.IOException; -import java.io.InputStream; -import java.net.Proxy; -import java.net.SocketAddress; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLStreamHandler; -import java.net.Proxy.Type; -import org.apache.http.client.methods.HttpGet; -// import java.net.http.HttpClient; -// import java.net.http.HttpRequest; - -public class Sinks { - public static void main(String[] args) throws Exception { - // URI(String str) - URI uri = new URI("uri1"); - - // URI(String scheme, String ssp, String fragment) - URI uri2 = new URI("http", "ssp", "fragement"); - - // URI(String scheme, String userInfo, String host, int port, String path, - // String query, String fragment) - URI uri3 = new URI("http", "userinfo", "host", 1, "path", "query", "fragment"); - // URI(String scheme, String host, String path, String fragment) - URI uri4 = new URI("http", "host", "path", "fragment"); - // URI(String scheme, String authority, String path, String query, String - // fragment) - URI uri5 = new URI("http", "authority", "path", "query", "fragment"); - URI uri6 = URI.create("http://foo.com/"); - - // URL(String spec) - URL url1 = new URL("spec"); - // URL(String protocol, String host, int port, String file) - URL url2 = new URL("http", "host", 1, "file"); - // URL(String protocol, String host, String file) - URL url3 = new URL("http", "host", "file"); - // URL(URL context, String spec) - URL url4 = new URL(url3, "http"); - // URL(String protocol, String host, int port, String file, URLStreamHandler - // handler) - URL url5 = new URL("http", "host", 1, "file", new Helper()); - - // URL(URL context, String spec, URLStreamHandler handler) - URL url6 = new URL(url3, "spec", new Helper()); - - URLConnection c1 = url1.openConnection(); - SocketAddress sa = new SocketAddress() { - }; - URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); - InputStream c3 = url1.openStream(); - - // java.net.http - // HttpClient client = HttpClient.newHttpClient(); - // HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); - // HttpRequest request3 = HttpRequest.newBuilder(uri).build(); - - // Apache HTTPlib - HttpGet httpGet = new HttpGet(uri); - HttpGet httpGet2 = new HttpGet(); - httpGet2.setURI(uri2); - - } - -} - -class Helper extends URLStreamHandler { - @Override - protected URLConnection openConnection(URL arg0) throws IOException { - return null; - } -} \ No newline at end of file From 6c4a909b86d8ec03f093500ed809185e545e681e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:08:00 +0100 Subject: [PATCH 1398/1662] Remove dead code from test --- .../security/CWE-918/RequestForgery2.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java index 9245016f3e56..626145e7108d 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java @@ -32,36 +32,9 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) try { String sink = request.getParameter("uri"); - // URI(String str) URI uri = new URI(sink); - - // URI(String scheme, String ssp, String fragment) URI uri2 = new URI("http", sink, "fragement"); - - // URI(String scheme, String userInfo, String host, int port, String path, - // String query, String fragment) - URI uri3 = new URI("http", "userinfo", "host", 1, "path", "query", "fragment"); - // URI(String scheme, String host, String path, String fragment) - URI uri4 = new URI("http", "host", "path", "fragment"); - // URI(String scheme, String authority, String path, String query, String - // fragment) - URI uri5 = new URI("http", "authority", "path", "query", "fragment"); - URI uri6 = URI.create("http://foo.com/"); - - // URL(String spec) URL url1 = new URL(sink); - // URL(String protocol, String host, int port, String file) - URL url2 = new URL("http", "host", 1, "file"); - // URL(String protocol, String host, String file) - URL url3 = new URL("http", "host", "file"); - // URL(URL context, String spec) - URL url4 = new URL(url3, "http"); - // URL(String protocol, String host, int port, String file, URLStreamHandler - // handler) - URL url5 = new URL("http", "host", 1, "file", new Helper2()); - - // URL(URL context, String spec, URLStreamHandler handler) - URL url6 = new URL(url3, "spec", new Helper2()); URLConnection c1 = url1.openConnection(); // $ SSRF SocketAddress sa = new SocketAddress() { @@ -110,13 +83,3 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) } } } - - -class Helper2 extends URLStreamHandler { - Helper2() { - } - - protected URLConnection openConnection(URL u) throws IOException { - return null; - } -} From cb99e17f4d157a9c2707ca9d5059d5b83bf24e97 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:17:12 +0100 Subject: [PATCH 1399/1662] Split and rename JavaNetHttp and ApacheHttp tests for consistency --- .../security/CWE-918/ApacheHttpSSRF.java | 64 ++++++++++++++ .../security/CWE-918/JavaNetHttpSSRF.java | 45 ++++++++++ .../security/CWE-918/RequestForgery2.java | 85 ------------------- 3 files changed, 109 insertions(+), 85 deletions(-) create mode 100644 java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java create mode 100644 java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java delete mode 100644 java/ql/test/query-tests/security/CWE-918/RequestForgery2.java diff --git a/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java new file mode 100644 index 000000000000..a3f476ccfec4 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java @@ -0,0 +1,64 @@ +import java.io.IOException; +import java.net.URI; + +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpHead; +import org.apache.http.client.methods.HttpOptions; +import org.apache.http.client.methods.HttpTrace; +import org.apache.http.client.methods.HttpPatch; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.message.BasicHttpRequest; +import org.apache.http.message.BasicHttpEntityEnclosingRequest; +import org.apache.http.message.BasicRequestLine; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class ApacheHttpSSRF extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + + String sink = request.getParameter("uri"); + URI uri = new URI(sink); + + HttpGet httpGet = new HttpGet(uri); // $ SSRF + HttpGet httpGet2 = new HttpGet(); + httpGet2.setURI(uri); // $ SSRF + + new HttpHead(uri); // $ SSRF + new HttpPost(uri); // $ SSRF + new HttpPut(uri); // $ SSRF + new HttpDelete(uri); // $ SSRF + new HttpOptions(uri); // $ SSRF + new HttpTrace(uri); // $ SSRF + new HttpPatch(uri); // $ SSRF + + new BasicHttpRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ SSRF + new BasicHttpRequest("GET", uri.toString()); // $ SSRF + new BasicHttpRequest("GET", uri.toString(), null); // $ SSRF + + new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ SSRF + new BasicHttpEntityEnclosingRequest("GET", uri.toString()); // $ SSRF + new BasicHttpEntityEnclosingRequest("GET", uri.toString(), null); // $ SSRF + + RequestBuilder.get(uri); // $ SSRF + RequestBuilder.post(uri); // $ SSRF + RequestBuilder.put(uri); // $ SSRF + RequestBuilder.delete(uri); // $ SSRF + RequestBuilder.options(uri); // $ SSRF + RequestBuilder.head(uri); // $ SSRF + RequestBuilder.trace(uri); // $ SSRF + RequestBuilder.patch(uri); // $ SSRF + RequestBuilder.get("").setUri(uri); // $ SSRF + + } catch (Exception e) { + // TODO: handle exception + } + } +} diff --git a/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java b/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java new file mode 100644 index 000000000000..7cc5578ebf33 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java @@ -0,0 +1,45 @@ +import java.io.IOException; +import java.net.Proxy; +import java.net.SocketAddress; +import java.net.URI; +import java.net.URL; +import java.net.URLConnection; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.Proxy.Type; +import java.io.InputStream; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JavaNetHttpSSRF extends HttpServlet { + private static final String VALID_URI = "http://lgtm.com"; + private HttpClient client = HttpClient.newHttpClient(); + + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + try { + + String sink = request.getParameter("uri"); + URI uri = new URI(sink); + URI uri2 = new URI("http", sink, "fragement"); + URL url1 = new URL(sink); + + URLConnection c1 = url1.openConnection(); // $ SSRF + SocketAddress sa = new SocketAddress() { + }; + URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); // $ SSRF + InputStream c3 = url1.openStream(); // $ SSRF + + // java.net.http + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); // $ SSRF + HttpRequest request3 = HttpRequest.newBuilder(uri).build(); // $ SSRF + + } catch (Exception e) { + // TODO: handle exception + } + } +} diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java b/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java deleted file mode 100644 index 626145e7108d..000000000000 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery2.java +++ /dev/null @@ -1,85 +0,0 @@ -import java.io.IOException; -import java.net.URI; -import java.net.*; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.Proxy.Type; -import java.io.InputStream; - -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpHead; -import org.apache.http.client.methods.HttpOptions; -import org.apache.http.client.methods.HttpTrace; -import org.apache.http.client.methods.HttpPatch; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.message.BasicHttpRequest; -import org.apache.http.message.BasicHttpEntityEnclosingRequest; -import org.apache.http.message.BasicRequestLine; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RequestForgery2 extends HttpServlet { - private static final String VALID_URI = "http://lgtm.com"; - private HttpClient client = HttpClient.newHttpClient(); - - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - try { - - String sink = request.getParameter("uri"); - URI uri = new URI(sink); - URI uri2 = new URI("http", sink, "fragement"); - URL url1 = new URL(sink); - - URLConnection c1 = url1.openConnection(); // $ SSRF - SocketAddress sa = new SocketAddress() { - }; - URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); // $ SSRF - InputStream c3 = url1.openStream(); // $ SSRF - - // java.net.http - HttpClient client = HttpClient.newHttpClient(); - HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); // $ SSRF - HttpRequest request3 = HttpRequest.newBuilder(uri).build(); // $ SSRF - - // Apache HTTPlib - HttpGet httpGet = new HttpGet(uri); // $ SSRF - HttpGet httpGet2 = new HttpGet(); - httpGet2.setURI(uri2); // $ SSRF - - new HttpHead(uri); // $ SSRF - new HttpPost(uri); // $ SSRF - new HttpPut(uri); // $ SSRF - new HttpDelete(uri); // $ SSRF - new HttpOptions(uri); // $ SSRF - new HttpTrace(uri); // $ SSRF - new HttpPatch(uri); // $ SSRF - - new BasicHttpRequest(new BasicRequestLine("GET", uri2.toString(), null)); // $ SSRF - new BasicHttpRequest("GET", uri2.toString()); // $ SSRF - new BasicHttpRequest("GET", uri2.toString(), null); // $ SSRF - - new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri2.toString(), null)); // $ SSRF - new BasicHttpEntityEnclosingRequest("GET", uri2.toString()); // $ SSRF - new BasicHttpEntityEnclosingRequest("GET", uri2.toString(), null); // $ SSRF - - RequestBuilder.get(uri2); // $ SSRF - RequestBuilder.post(uri2); // $ SSRF - RequestBuilder.put(uri2); // $ SSRF - RequestBuilder.delete(uri2); // $ SSRF - RequestBuilder.options(uri2); // $ SSRF - RequestBuilder.head(uri2); // $ SSRF - RequestBuilder.trace(uri2); // $ SSRF - RequestBuilder.patch(uri2); // $ SSRF - RequestBuilder.get("").setUri(uri2); // $ SSRF - - } catch (Exception e) { - // TODO: handle exception - } - } -} From c531b81ebe77926c559775f1202f74b388c0877f Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 18:18:02 +0100 Subject: [PATCH 1400/1662] Rename RequestForgery.java -> SanitizationTests.java --- .../CWE-918/{RequestForgery.java => SanitizationTests.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename java/ql/test/query-tests/security/CWE-918/{RequestForgery.java => SanitizationTests.java} (99%) diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java similarity index 99% rename from java/ql/test/query-tests/security/CWE-918/RequestForgery.java rename to java/ql/test/query-tests/security/CWE-918/SanitizationTests.java index 68118256b9e2..9a65374024c6 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.java +++ b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java @@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -public class RequestForgery extends HttpServlet { +public class SanitizationTests extends HttpServlet { private static final String VALID_URI = "http://lgtm.com"; private HttpClient client = HttpClient.newHttpClient(); From 7509e36382e7da5332b589ba9eca9643bf911be0 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 19:18:39 +0100 Subject: [PATCH 1401/1662] Remove no-longer-needed BasicRequestLine model from InsecureBasicAuth.ql; adjust test expectations accordingly --- .../Security/CWE/CWE-522/InsecureBasicAuth.ql | 10 ---------- .../security/CWE-522/InsecureBasicAuth.expected | 6 +++++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql index 97d2f6dad332..8945f30fd450 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-522/InsecureBasicAuth.ql @@ -194,15 +194,6 @@ predicate urlOpen(DataFlow::Node node1, DataFlow::Node node2) { ) } -/** Constructor of `BasicRequestLine` */ -predicate basicRequestLine(DataFlow::Node node1, DataFlow::Node node2) { - exists(ConstructorCall mcc | - mcc.getConstructedType().hasQualifiedName("org.apache.http.message", "BasicRequestLine") and - mcc.getArgument(1) = node1.asExpr() and // `BasicRequestLine(String method, String uri, ProtocolVersion version) - node2.asExpr() = mcc - ) -} - class BasicAuthFlowConfig extends TaintTracking::Configuration { BasicAuthFlowConfig() { this = "InsecureBasicAuth::BasicAuthFlowConfig" } @@ -236,7 +227,6 @@ class BasicAuthFlowConfig extends TaintTracking::Configuration { override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { apacheHttpRequest(node1, node2) or createURI(node1, node2) or - basicRequestLine(node1, node2) or createURL(node1, node2) or urlOpen(node1, node2) } diff --git a/java/ql/test/experimental/query-tests/security/CWE-522/InsecureBasicAuth.expected b/java/ql/test/experimental/query-tests/security/CWE-522/InsecureBasicAuth.expected index 6a4ee5fdddd1..e8e308252034 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-522/InsecureBasicAuth.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-522/InsecureBasicAuth.expected @@ -11,7 +11,9 @@ edges | InsecureBasicAuth.java:62:21:62:26 | uriStr : String | InsecureBasicAuth.java:62:13:62:27 | new URI(...) : URI | | InsecureBasicAuth.java:78:47:78:52 | "http" : String | InsecureBasicAuth.java:86:3:86:6 | post | | InsecureBasicAuth.java:93:19:93:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:102:3:102:6 | post | -| InsecureBasicAuth.java:109:19:109:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:119:3:119:6 | post | +| InsecureBasicAuth.java:109:19:109:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:110:58:110:63 | uriStr : String | +| InsecureBasicAuth.java:110:29:110:70 | new BasicRequestLine(...) : BasicRequestLine | InsecureBasicAuth.java:119:3:119:6 | post | +| InsecureBasicAuth.java:110:58:110:63 | uriStr : String | InsecureBasicAuth.java:110:29:110:70 | new BasicRequestLine(...) : BasicRequestLine | | InsecureBasicAuth.java:126:19:126:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuth.java:130:28:130:67 | (...)... : URLConnection | | InsecureBasicAuth.java:130:28:130:67 | (...)... : URLConnection | InsecureBasicAuth.java:133:3:133:6 | conn | | InsecureBasicAuth.java:145:21:145:28 | protocol : String | InsecureBasicAuth.java:146:28:146:67 | (...)... : URLConnection | @@ -34,6 +36,8 @@ nodes | InsecureBasicAuth.java:93:19:93:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | | InsecureBasicAuth.java:102:3:102:6 | post | semmle.label | post | | InsecureBasicAuth.java:109:19:109:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuth.java:110:29:110:70 | new BasicRequestLine(...) : BasicRequestLine | semmle.label | new BasicRequestLine(...) : BasicRequestLine | +| InsecureBasicAuth.java:110:58:110:63 | uriStr : String | semmle.label | uriStr : String | | InsecureBasicAuth.java:119:3:119:6 | post | semmle.label | post | | InsecureBasicAuth.java:126:19:126:68 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | | InsecureBasicAuth.java:130:28:130:67 | (...)... : URLConnection | semmle.label | (...)... : URLConnection | From 09f27554d0a5c5d542a074b15b720740a2bd3bda Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 9 Jun 2021 19:24:28 +0100 Subject: [PATCH 1402/1662] Note incidental extra models in change note --- java/change-notes/2021-04-06-ssrf-query.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/change-notes/2021-04-06-ssrf-query.md b/java/change-notes/2021-04-06-ssrf-query.md index 99b4d77aaadc..96afb56f1f8f 100644 --- a/java/change-notes/2021-04-06-ssrf-query.md +++ b/java/change-notes/2021-04-06-ssrf-query.md @@ -1,2 +1,4 @@ lgtm,codescanning * The query "Server-side request forgery (SSRF)" (`java/ssrf`) has been promoted from experimental to the main query pack. Its results will now appear by default. This query was originally [submitted as an experimental query by @porcupineyhairs](https://github.com/github/codeql/pull/3454). +* Models for `URI` and `HttpRequest` in the `java.net` package have been improved. This may lead to more results from any query where these types' methods are relevant. +* Models for Apache HttpComponents' `RequestLine` and `BasicRequestLine` types. This may lead to more results from any query where these types' methods are relevant. From 1176fec287844b964e3d880d531c0d492c53c13e Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 11:22:41 +0100 Subject: [PATCH 1403/1662] Improve docs Co-authored-by: Anders Schack-Mulligen --- java/ql/src/semmle/code/java/security/RequestForgery.qll | 1 - java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/security/RequestForgery.qll b/java/ql/src/semmle/code/java/security/RequestForgery.qll index 7ee59fec8ddb..4ac9e6232ef7 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgery.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgery.qll @@ -110,7 +110,6 @@ private class StringBuilderVarExt extends StringBuilderVar { * this returns the append of `"3"`. */ private StringBuilderAppend getAFirstAppendAfterAssignment() { - // result = this.getAnAppend() and not result = this.getNextAppend(_) } diff --git a/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll b/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll index 084f4683de81..c93d3089dc9c 100644 --- a/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll +++ b/java/ql/src/semmle/code/java/security/RequestForgeryConfig.qll @@ -1,5 +1,7 @@ /** * Provides a taint-tracking configuration characterising request-forgery risks. + * + * Only import this directly from .ql files, to avoid the possibility of polluting the Configuration hierarchy accidentally. */ import semmle.code.java.dataflow.FlowSources From da1e760269b073c4a2280e584a98a72459c4ff7c Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 11:38:16 +0100 Subject: [PATCH 1404/1662] Adjust Spring models to use erased function signatures --- .../semmle/code/java/frameworks/spring/SpringHttp.qll | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll index 8ef4925b1265..63c58e4f2b5b 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll @@ -53,11 +53,11 @@ private class UrlOpenSink extends SinkModelCsv { "org.springframework.http;RequestEntity;false;put;;;Argument[0];open-url", "org.springframework.http;RequestEntity;false;method;;;Argument[1];open-url", "org.springframework.http;RequestEntity;false;RequestEntity;(HttpMethod,URI);;Argument[1];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(MultiValueMap,HttpMethod,URI);;Argument[2];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI);;Argument[2];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,HttpMethod,URI,Type);;Argument[2];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI);;Argument[3];open-url", - "org.springframework.http;RequestEntity;false;RequestEntity;(T,MultiValueMap,HttpMethod,URI,Type);;Argument[3];open-url" + "org.springframework.http;RequestEntity;false;RequestEntity;(MultiValueMap,HttpMethod,URI);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(Object,HttpMethod,URI);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(Object,HttpMethod,URI,Type);;Argument[2];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(Object,MultiValueMap,HttpMethod,URI);;Argument[3];open-url", + "org.springframework.http;RequestEntity;false;RequestEntity;(Object,MultiValueMap,HttpMethod,URI,Type);;Argument[3];open-url" ] } } From 11b70326fd90844b06813849c7c77c0952b4df36 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 11:58:41 +0100 Subject: [PATCH 1405/1662] Add Jakarta WS url-open sink --- .../src/semmle/code/java/frameworks/JaxWS.qll | 6 +++++- .../security/CWE-918/JakartaWsSSRF.java | 18 ++++++++++++++++++ .../test/query-tests/security/CWE-918/options | 2 +- .../javax/ws/rs/client/Client.java | 14 +++++++------- .../jakarta/ws/rs/client/Client.java | 14 +++++++------- .../jakarta/ws/rs/client/ClientBuilder.java | 19 +++++++++++++++++++ .../jakarta/ws/rs/client/WebTarget.java | 4 ++++ .../jakarta/ws/rs/core/Configuration.java | 3 +++ 8 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java create mode 100644 java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/ClientBuilder.java create mode 100644 java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/WebTarget.java create mode 100644 java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/core/Configuration.java diff --git a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll index 0ca3175b58d6..cd773721dfb8 100644 --- a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll +++ b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll @@ -789,6 +789,10 @@ private class UriBuilderModel extends SummaryModelCsv { private class JaxRsUrlOpenSink extends SinkModelCsv { override predicate row(string row) { - row = ["javax.ws.rs.client;Client;true;target;;;Argument[0];open-url"] + row = + [ + "javax.ws.rs.client;Client;true;target;;;Argument[0];open-url", + "jakarta.ws.rs.client;Client;true;target;;;Argument[0];open-url" + ] } } diff --git a/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java new file mode 100644 index 000000000000..ced253652111 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java @@ -0,0 +1,18 @@ +import jakarta.ws.rs.client.*; +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class JakartaWsSSRF extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + Client client = ClientBuilder.newClient(); + String url = request.getParameter("url"); + client.target(url); // $ SSRF + } + +} diff --git a/java/ql/test/query-tests/security/CWE-918/options b/java/ql/test/query-tests/security/CWE-918/options index a0b82c9046f2..79224345b489 100644 --- a/java/ql/test/query-tests/security/CWE-918/options +++ b/java/ql/test/query-tests/security/CWE-918/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../stubs/springframework-5.2.3:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../stubs/apache-http-4.4.13/:${testdir}/../../../stubs/servlet-api-2.4/ +//semmle-extractor-options: --javac-args -source 11 -target 11 -cp ${testdir}/../../../stubs/springframework-5.2.3:${testdir}/../../../stubs/javax-ws-rs-api-2.1.1:${testdir}/../../../stubs/javax-ws-rs-api-3.0.0:${testdir}/../../../stubs/apache-http-4.4.13/:${testdir}/../../../stubs/servlet-api-2.4/ diff --git a/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java b/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java index e9ff1a33665a..87b2ac266ae3 100644 --- a/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java +++ b/java/ql/test/stubs/javax-ws-rs-api-2.1.1/javax/ws/rs/client/Client.java @@ -15,23 +15,23 @@ */ package javax.ws.rs.client; -// import java.net.URI; +import java.net.URI; import javax.ws.rs.core.Configurable; -// import javax.ws.rs.core.Link; -// import javax.ws.rs.core.UriBuilder; +import javax.ws.rs.core.Link; +import javax.ws.rs.core.UriBuilder; // import javax.net.ssl.HostnameVerifier; // import javax.net.ssl.SSLContext; public interface Client extends Configurable { public void close(); - // public WebTarget target(String uri); + public WebTarget target(String uri); - // public WebTarget target(URI uri); + public WebTarget target(URI uri); - // public WebTarget target(UriBuilder uriBuilder); + public WebTarget target(UriBuilder uriBuilder); - // public WebTarget target(Link link); + public WebTarget target(Link link); // public Invocation.Builder invocation(Link link); diff --git a/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/Client.java b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/Client.java index d12858c331d8..f09cb7606c9a 100644 --- a/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/Client.java +++ b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/Client.java @@ -15,23 +15,23 @@ */ package jakarta.ws.rs.client; -// import java.net.URI; +import java.net.URI; // import javax.net.ssl.HostnameVerifier; // import javax.net.ssl.SSLContext; import jakarta.ws.rs.core.Configurable; -// import jakarta.ws.rs.core.Link; -// import jakarta.ws.rs.core.UriBuilder; +import jakarta.ws.rs.core.Link; +import jakarta.ws.rs.core.UriBuilder; public interface Client extends Configurable { public void close(); - // public WebTarget target(String uri); + public WebTarget target(String uri); - // public WebTarget target(URI uri); + public WebTarget target(URI uri); - // public WebTarget target(UriBuilder uriBuilder); + public WebTarget target(UriBuilder uriBuilder); - // public WebTarget target(Link link); + public WebTarget target(Link link); // public Invocation.Builder invocation(Link link); diff --git a/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/ClientBuilder.java b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/ClientBuilder.java new file mode 100644 index 000000000000..0d775f55738a --- /dev/null +++ b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/ClientBuilder.java @@ -0,0 +1,19 @@ +package jakarta.ws.rs.client; + +public abstract class ClientBuilder implements jakarta.ws.rs.core.Configurable { + + protected ClientBuilder() { + } + + public static jakarta.ws.rs.client.ClientBuilder newBuilder() { + return null; + } + + public static jakarta.ws.rs.client.Client newClient() { + return null; + } + + public static jakarta.ws.rs.client.Client newClient(jakarta.ws.rs.core.Configuration configuration) { + return null; + } +} \ No newline at end of file diff --git a/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/WebTarget.java b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/WebTarget.java new file mode 100644 index 000000000000..9b309cd8e506 --- /dev/null +++ b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/client/WebTarget.java @@ -0,0 +1,4 @@ +package jakarta.ws.rs.client; + +public abstract interface WebTarget extends jakarta.ws.rs.core.Configurable { +} \ No newline at end of file diff --git a/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/core/Configuration.java b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/core/Configuration.java new file mode 100644 index 000000000000..7dfbca11b79c --- /dev/null +++ b/java/ql/test/stubs/javax-ws-rs-api-3.0.0/jakarta/ws/rs/core/Configuration.java @@ -0,0 +1,3 @@ +package jakarta.ws.rs.core; + +public abstract interface Configuration {} \ No newline at end of file From 4abaa7870fd557f45fdee58eb5521a1e85282b66 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 7 Jun 2021 10:27:27 +0200 Subject: [PATCH 1406/1662] Add CSV coverage PR commenter --- .../workflows/csv-coverage-pr-artifacts.yml | 85 ++++++++ .github/workflows/csv-coverage-pr-comment.yml | 66 +++++++ .../compare-files-comment-pr.py | 183 ++++++++++++++++++ .../scripts/library-coverage/compare-files.py | 69 ------- misc/scripts/library-coverage/utils.py | 2 + 5 files changed, 336 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/csv-coverage-pr-artifacts.yml create mode 100644 .github/workflows/csv-coverage-pr-comment.yml create mode 100644 misc/scripts/library-coverage/compare-files-comment-pr.py delete mode 100644 misc/scripts/library-coverage/compare-files.py diff --git a/.github/workflows/csv-coverage-pr-artifacts.yml b/.github/workflows/csv-coverage-pr-artifacts.yml new file mode 100644 index 000000000000..dd5106cf3656 --- /dev/null +++ b/.github/workflows/csv-coverage-pr-artifacts.yml @@ -0,0 +1,85 @@ +name: Check framework coverage changes + +on: + pull_request: + paths: + - '.github/workflows/csv-coverage-pr-comment.yml' + - '*/ql/src/**/*.ql' + - '*/ql/src/**/*.qll' + - 'misc/scripts/library-coverage/*.py' + # input data files + - '*/documentation/library-coverage/cwe-sink.csv' + - '*/documentation/library-coverage/frameworks.csv' + branches: + - main + - 'rc/*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Clone self (github/codeql) head + uses: actions/checkout@v2 + with: + path: head + - name: Clone self (github/codeql) base + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.base.sha }} + path: base + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Download CodeQL CLI + uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c + with: + repo: "github/codeql-cli-binaries" + version: "latest" + file: "codeql-linux64.zip" + token: ${{ secrets.GITHUB_TOKEN }} + - name: Unzip CodeQL CLI + run: unzip -d codeql-cli codeql-linux64.zip + - name: Generate CSV files on head and base of the PR + run: | + echo "Running generator on ${{github.sha}}" + PATH="$PATH:codeql-cli/codeql" python head/misc/scripts/library-coverage/generate-report.py ci head head + mkdir out_head + cp framework-coverage-*.csv out_head/ + cp framework-coverage-*.rst out_head/ + + echo "Running generator on ${{github.event.pull_request.base.sha}}" + PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base + mkdir out_base + cp framework-coverage-*.csv out_base/ + cp framework-coverage-*.rst out_base/ + - name: Upload CSV package list + uses: actions/upload-artifact@v2 + with: + name: csv-framework-coverage-merge + path: | + out_head/framework-coverage-*.csv + out_head/framework-coverage-*.rst + - name: Upload CSV package list + uses: actions/upload-artifact@v2 + with: + name: csv-framework-coverage-base + path: | + out_base/framework-coverage-*.csv + out_base/framework-coverage-*.rst + - name: Save PR number + run: | + mkdir -p pr + echo ${{ github.event.number }} > pr/NR + - name: Upload PR number + uses: actions/upload-artifact@v2 + with: + name: pr + path: pr/ + diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml new file mode 100644 index 000000000000..559fa58ea808 --- /dev/null +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -0,0 +1,66 @@ +name: Comment on PR with framework coverage changes + +on: + workflow_run: + workflows: ["Check framework coverage changes"] + types: + - completed + +jobs: + build: + + runs-on: ubuntu-latest + if: > + ${{ github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' }} + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Clone self (github/codeql) head + uses: actions/checkout@v2 + with: + path: head + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + # download artifacts from the PR job: + - name: Download artifact - HEAD + uses: dawidd6/action-download-artifact@v2.14.0 + with: + workflow: csv-coverage-pr-artifacts.yml + run_id: ${{ github.event.workflow_run.id }} + name: csv-framework-coverage-merge + path: out_head + + - name: Download artifact - BASE + uses: dawidd6/action-download-artifact@v2.14.0 + with: + workflow: csv-coverage-pr-artifacts.yml + run_id: ${{ github.event.workflow_run.id }} + name: csv-framework-coverage-base + path: out_base + + - name: Download artifact - PR + uses: dawidd6/action-download-artifact@v2.14.0 + with: + workflow: csv-coverage-pr-artifacts.yml + run_id: ${{ github.event.workflow_run.id }} + name: pr + path: pr + + - name: Check coverage files + run: | + PR=$(cat "pr/NR") + GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python head/misc/scripts/library-coverage/compare-files-comment-pr.py \ + out_head out_base comparison.md ${{ github.repository }} $PR ${{ github.event.workflow_run.id }} + - name: Upload comparison results + uses: actions/upload-artifact@v2 + with: + name: comparison + path: | + comparison.md diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py new file mode 100644 index 000000000000..130a68109469 --- /dev/null +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -0,0 +1,183 @@ +import sys +import os +import settings +import difflib +import utils + +""" +This script compares the generated CSV coverage files with the ones in the codebase. +""" + + +def check_file_exists(file): + if not os.path.exists(file): + print("Expected file '" + file + "' doesn't exist.", file=sys.stderr) + return False + return True + + +def ignore_line_ending(ch): + return difflib.IS_CHARACTER_JUNK(ch, ws=" \r\n") + + +def compare_files(file1, file2): + messages = compare_files_str(file1, file2) + if messages == "": + return True + + print(messages, end="", file=sys.stderr) + + return False + + +def compare_files_str(file1, file2): + diff = difflib.ndiff(open(file1).readlines(), + open(file2).readlines(), None, ignore_line_ending) + ret = "" + for line in diff: + if line.startswith("+") or line.startswith("-"): + ret += line + + return ret + + +def comment_pr(folder1, folder2, output_file, repo, pr_number, run_id): + compare_folders(folder1, folder2, output_file) + size = os.path.getsize(output_file) + if size == 0: + print("No difference in the coverage reports") + return + + comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ + "The generated reports are available in the [artifacts of this workflow run](https://github.com/" + repo + "/actions/runs/" + run_id + "). " + \ + "The differences will be picked up by the nightly job after the PR gets merged. " + + if size < 2000: + print("There's a small change in the CSV framework coverage reports") + comment += "The following differences were found: \n\n" + with open(output_file, 'r') as file: + comment += file.read() + else: + print("There's a large change in the CSV framework coverage reports") + comment += "The differences can be found in the " + \ + output_file + " artifact of this job." + + post_comment(comment, repo, pr_number) + + +def post_comment(comment, repo, pr_number): + print("Posting comment to PR #" + str(pr_number)) + utils.subprocess_run(["gh", "pr", "comment", pr_number, + "--repo", repo, "--body", comment]) + + +def compare_folders(folder1, folder2, output_file): + languages = ['java'] + + return_md = "" + + for lang in languages: + expected_files = "" + + generated_output_rst = settings.generated_output_rst.format( + language=lang) + generated_output_csv = settings.generated_output_csv.format( + language=lang) + + # check if files exist in both folder1 and folder 2 + if not check_file_exists(folder1 + "/" + generated_output_rst): + expected_files += "- " + generated_output_rst + \ + " doesn't exist in folder " + folder1 + "\n" + if not check_file_exists(folder2 + "/" + generated_output_rst): + expected_files += "- " + generated_output_rst + \ + " doesn't exist in folder " + folder2 + "\n" + if not check_file_exists(folder1 + "/" + generated_output_csv): + expected_files += "- " + generated_output_csv + \ + " doesn't exist in folder " + folder1 + "\n" + if not check_file_exists(folder2 + "/" + generated_output_csv): + expected_files += "- " + generated_output_csv + \ + " doesn't exist in folder " + folder2 + "\n" + + if expected_files != "": + print("Expected files are missing", file=sys.stderr) + return_md += "\n### " + lang + "\n\n#### Expected files are missing for " + \ + lang + "\n" + expected_files + "\n" + continue + + # compare contents of files + cmp1 = compare_files_str( + folder1 + "/" + generated_output_rst, folder2 + "/" + generated_output_rst) + cmp2 = compare_files_str( + folder1 + "/" + generated_output_csv, folder2 + "/" + generated_output_csv) + + if cmp1 != "" or cmp2 != "": + print("Generated file contents are not matching", file=sys.stderr) + return_md += "\n### " + lang + "\n\n#### Generated file changes for " + \ + lang + "\n\n" + if cmp1 != "": + return_md += "- Changes to " + generated_output_rst + \ + ":\n```diff\n" + cmp1 + "```\n\n" + if cmp2 != "": + return_md += "- Changes to " + generated_output_csv + \ + ":\n```diff\n" + cmp2 + "```\n\n" + + with open(output_file, 'w', newline='') as out: + out.write(return_md) + + +comment_pr(sys.argv[1], sys.argv[2], sys.argv[3], + sys.argv[4], sys.argv[5], sys.argv[6]) + + +# def compare_generated_and_repo_files(): +# languages = ['java'] + +# all_ok = True + +# for lang in languages: +# repo_output_rst = settings.repo_output_rst.format(language=lang) +# repo_output_csv = settings.repo_output_csv.format(language=lang) + +# generated_output_rst = settings.generated_output_rst.format( +# language=lang) +# generated_output_csv = settings.generated_output_csv.format( +# language=lang) + +# exists = check_file_exists(repo_output_rst) +# if not exists: +# sys.exit(1) + +# exists = check_file_exists(repo_output_csv) +# if not exists: +# sys.exit(1) + +# exists = check_file_exists(generated_output_rst) +# if not exists: +# sys.exit(1) + +# exists = check_file_exists(generated_output_csv) +# if not exists: +# sys.exit(1) + +# docs_folder = settings.documentation_folder_no_prefix.format( +# language=lang) + +# rst_ok = compare_files(repo_output_rst, generated_output_rst) +# if not rst_ok: +# print("The generated file doesn't match the one in the codebase. Please check and fix file '" + +# docs_folder + settings.output_rst_file_name + "'.", file=sys.stderr) +# csv_ok = compare_files(repo_output_csv, generated_output_csv) +# if not csv_ok: +# print("The generated file doesn't match the one in the codebase. Please check and fix file '" + +# docs_folder + settings.output_csv_file_name + "'.", file=sys.stderr) + +# if not rst_ok or not csv_ok: +# print("The generated CSV coverage report files for '" + lang + "' don't match the ones in the codebase. Please update the files in '" + +# docs_folder + "'. The new files can be downloaded from the artifacts of this job.", file=sys.stderr) +# all_ok = False +# else: +# print("The generated files for '" + lang + +# "' match the ones in the codebase.") + +# if not all_ok: +# sys.exit(1) diff --git a/misc/scripts/library-coverage/compare-files.py b/misc/scripts/library-coverage/compare-files.py deleted file mode 100644 index ae1f2dac42bd..000000000000 --- a/misc/scripts/library-coverage/compare-files.py +++ /dev/null @@ -1,69 +0,0 @@ -import sys -import os -import settings -import difflib - -""" -This script compares the generated CSV coverage files with the ones in the codebase. -""" - - -def check_file_exists(file): - if not os.path.exists(file): - print("Expected file '" + file + "' doesn't exist.", file=sys.stderr) - sys.exit(1) - - -def ignore_line_ending(ch): - return difflib.IS_CHARACTER_JUNK(ch, ws=" \r\n") - - -def compare_files(file1, file2, path_to_report): - has_differences = False - diff = difflib.ndiff(open(file1).readlines(), - open(file2).readlines(), None, ignore_line_ending) - for line in diff: - if line.startswith("+") or line.startswith("-"): - print(line, end="", file=sys.stderr) - has_differences = True - - if has_differences: - print("The generated file doesn't match the one in the codebase. Please check and fix file '" + - path_to_report + "'.", file=sys.stderr) - return False - return True - - -languages = ['java'] - -all_ok = True - -for lang in languages: - repo_output_rst = settings.repo_output_rst.format(language=lang) - repo_output_csv = settings.repo_output_csv.format(language=lang) - - generated_output_rst = settings.generated_output_rst.format(language=lang) - generated_output_csv = settings.generated_output_csv.format(language=lang) - - check_file_exists(repo_output_rst) - check_file_exists(repo_output_csv) - check_file_exists(generated_output_rst) - check_file_exists(generated_output_csv) - - docs_folder = settings.documentation_folder_no_prefix.format(language=lang) - - rst_ok = compare_files(repo_output_rst, generated_output_rst, - docs_folder + settings.output_rst_file_name) - csv_ok = compare_files(repo_output_csv, generated_output_csv, - docs_folder + settings.output_csv_file_name) - - if not rst_ok or not csv_ok: - print("The generated CSV coverage report files for '" + lang + "' don't match the ones in the codebase. Please update the files in '" + - docs_folder + "'. The new files can be downloaded from the artifacts of this job.", file=sys.stderr) - all_ok = False - else: - print("The generated files for '" + lang + - "' match the ones in the codebase.") - -if not all_ok: - sys.exit(1) diff --git a/misc/scripts/library-coverage/utils.py b/misc/scripts/library-coverage/utils.py index e9dc6b124720..857651855577 100644 --- a/misc/scripts/library-coverage/utils.py +++ b/misc/scripts/library-coverage/utils.py @@ -2,10 +2,12 @@ import os import csv import sys +import shlex def subprocess_run(cmd): """Runs a command through subprocess.run, with a few tweaks. Raises an Exception if exit code != 0.""" + print(shlex.join(cmd)) return subprocess.run(cmd, capture_output=True, text=True, env=os.environ.copy(), check=True) From e61f72519603a86907acaebc17227cb8d77b8d8c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 15 Jun 2021 12:00:34 +0200 Subject: [PATCH 1407/1662] Apply code review findings --- .../workflows/csv-coverage-pr-artifacts.yml | 35 ++++++------ .github/workflows/csv-coverage-pr-comment.yml | 53 +++++++++---------- 2 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.github/workflows/csv-coverage-pr-artifacts.yml b/.github/workflows/csv-coverage-pr-artifacts.yml index dd5106cf3656..6ce1f46313e3 100644 --- a/.github/workflows/csv-coverage-pr-artifacts.yml +++ b/.github/workflows/csv-coverage-pr-artifacts.yml @@ -15,20 +15,21 @@ on: - 'rc/*' jobs: - build: + generate: + name: Generate framework coverage artifacts runs-on: ubuntu-latest steps: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github.event) }} run: echo "$GITHUB_CONTEXT" - - name: Clone self (github/codeql) head + - name: Clone self (github/codeql) - MERGE uses: actions/checkout@v2 with: - path: head - - name: Clone self (github/codeql) base + path: merge + - name: Clone self (github/codeql) - BASE uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.base.sha }} @@ -38,21 +39,19 @@ jobs: with: python-version: 3.8 - name: Download CodeQL CLI - uses: dsaltares/fetch-gh-release-asset@aa37ae5c44d3c9820bc12fe675e8670ecd93bd1c - with: - repo: "github/codeql-cli-binaries" - version: "latest" - file: "codeql-linux64.zip" - token: ${{ secrets.GITHUB_TOKEN }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" - name: Unzip CodeQL CLI run: unzip -d codeql-cli codeql-linux64.zip - - name: Generate CSV files on head and base of the PR + - name: Generate CSV files on merge and base of the PR run: | echo "Running generator on ${{github.sha}}" - PATH="$PATH:codeql-cli/codeql" python head/misc/scripts/library-coverage/generate-report.py ci head head - mkdir out_head - cp framework-coverage-*.csv out_head/ - cp framework-coverage-*.rst out_head/ + PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge + mkdir out_merge + cp framework-coverage-*.csv out_merge/ + cp framework-coverage-*.rst out_merge/ echo "Running generator on ${{github.event.pull_request.base.sha}}" PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base @@ -64,8 +63,8 @@ jobs: with: name: csv-framework-coverage-merge path: | - out_head/framework-coverage-*.csv - out_head/framework-coverage-*.rst + out_merge/framework-coverage-*.csv + out_merge/framework-coverage-*.rst - name: Upload CSV package list uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index 559fa58ea808..c821edbb50a6 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -7,8 +7,8 @@ on: - completed jobs: - build: - + check: + name: Check framework coverage differences and comment runs-on: ubuntu-latest if: > ${{ github.event.workflow_run.event == 'pull_request' && @@ -17,47 +17,46 @@ jobs: steps: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github.event) }} run: echo "$GITHUB_CONTEXT" - - name: Clone self (github/codeql) head + - name: Clone self (github/codeql) uses: actions/checkout@v2 - with: - path: head - name: Set up Python 3.8 uses: actions/setup-python@v2 with: python-version: 3.8 # download artifacts from the PR job: - - name: Download artifact - HEAD - uses: dawidd6/action-download-artifact@v2.14.0 - with: - workflow: csv-coverage-pr-artifacts.yml - run_id: ${{ github.event.workflow_run.id }} - name: csv-framework-coverage-merge - path: out_head + + - name: Download artifact - MERGE + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + gh run download --name "csv-framework-coverage-merge" --dir "out_merge" "$RUN_ID" - name: Download artifact - BASE - uses: dawidd6/action-download-artifact@v2.14.0 - with: - workflow: csv-coverage-pr-artifacts.yml - run_id: ${{ github.event.workflow_run.id }} - name: csv-framework-coverage-base - path: out_base + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + gh run download --name "csv-framework-coverage-base" --dir "out_base" "$RUN_ID" - name: Download artifact - PR - uses: dawidd6/action-download-artifact@v2.14.0 - with: - workflow: csv-coverage-pr-artifacts.yml - run_id: ${{ github.event.workflow_run.id }} - name: pr - path: pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + gh run download --name "pr" --dir "pr" "$RUN_ID" - name: Check coverage files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} run: | PR=$(cat "pr/NR") - GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python head/misc/scripts/library-coverage/compare-files-comment-pr.py \ - out_head out_base comparison.md ${{ github.repository }} $PR ${{ github.event.workflow_run.id }} + python misc/scripts/library-coverage/compare-files-comment-pr.py \ + out_merge out_base comparison.md ${{ github.repository }} $PR $RUN_ID - name: Upload comparison results uses: actions/upload-artifact@v2 with: From c532db58fdd0c026e93b39c6435f57eefc1a5f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Vajk?= Date: Wed, 16 Jun 2021 09:22:18 +0200 Subject: [PATCH 1408/1662] Apply suggestions from code review Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com> --- .github/workflows/csv-coverage-pr-artifacts.yml | 3 +-- .github/workflows/csv-coverage-pr-comment.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/csv-coverage-pr-artifacts.yml b/.github/workflows/csv-coverage-pr-artifacts.yml index 6ce1f46313e3..0941adba3c3a 100644 --- a/.github/workflows/csv-coverage-pr-artifacts.yml +++ b/.github/workflows/csv-coverage-pr-artifacts.yml @@ -75,10 +75,9 @@ jobs: - name: Save PR number run: | mkdir -p pr - echo ${{ github.event.number }} > pr/NR + echo ${{ github.event.pull_request.number }} > pr/NR - name: Upload PR number uses: actions/upload-artifact@v2 with: name: pr path: pr/ - diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index c821edbb50a6..3fdb8963d051 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -56,7 +56,7 @@ jobs: run: | PR=$(cat "pr/NR") python misc/scripts/library-coverage/compare-files-comment-pr.py \ - out_merge out_base comparison.md ${{ github.repository }} $PR $RUN_ID + out_merge out_base comparison.md "$GITHUB_REPOSITORY" "$PR" "$RUN_ID" - name: Upload comparison results uses: actions/upload-artifact@v2 with: From 07b83d5dc104fdb243a184ae8830e2a3593af6e7 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 09:26:07 +0200 Subject: [PATCH 1409/1662] Remove commented code --- .../compare-files-comment-pr.py | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index 130a68109469..dec7cd3cf149 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -127,57 +127,3 @@ def compare_folders(folder1, folder2, output_file): comment_pr(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6]) - - -# def compare_generated_and_repo_files(): -# languages = ['java'] - -# all_ok = True - -# for lang in languages: -# repo_output_rst = settings.repo_output_rst.format(language=lang) -# repo_output_csv = settings.repo_output_csv.format(language=lang) - -# generated_output_rst = settings.generated_output_rst.format( -# language=lang) -# generated_output_csv = settings.generated_output_csv.format( -# language=lang) - -# exists = check_file_exists(repo_output_rst) -# if not exists: -# sys.exit(1) - -# exists = check_file_exists(repo_output_csv) -# if not exists: -# sys.exit(1) - -# exists = check_file_exists(generated_output_rst) -# if not exists: -# sys.exit(1) - -# exists = check_file_exists(generated_output_csv) -# if not exists: -# sys.exit(1) - -# docs_folder = settings.documentation_folder_no_prefix.format( -# language=lang) - -# rst_ok = compare_files(repo_output_rst, generated_output_rst) -# if not rst_ok: -# print("The generated file doesn't match the one in the codebase. Please check and fix file '" + -# docs_folder + settings.output_rst_file_name + "'.", file=sys.stderr) -# csv_ok = compare_files(repo_output_csv, generated_output_csv) -# if not csv_ok: -# print("The generated file doesn't match the one in the codebase. Please check and fix file '" + -# docs_folder + settings.output_csv_file_name + "'.", file=sys.stderr) - -# if not rst_ok or not csv_ok: -# print("The generated CSV coverage report files for '" + lang + "' don't match the ones in the codebase. Please update the files in '" + -# docs_folder + "'. The new files can be downloaded from the artifacts of this job.", file=sys.stderr) -# all_ok = False -# else: -# print("The generated files for '" + lang + -# "' match the ones in the codebase.") - -# if not all_ok: -# sys.exit(1) From dca397dfb13c56a2a460eede37586bbd4b0aea1d Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 14:17:42 +0100 Subject: [PATCH 1410/1662] C++: Add a test case with a template class. --- .../CWE-327/BrokenCryptoAlgorithm.expected | 4 ++ .../Security/CWE/CWE-327/test2.cpp | 45 +++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index d27d5c4bbca7..791575bc145d 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -8,6 +8,10 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:185:38:185:44 | USE_DES | access of enum constant USE_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:238:2:238:20 | call to encrypt | call to encrypt | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:245:5:245:11 | call to encrypt | call to encrypt | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:279:9:279:15 | call to desEncryptor | call to desEncryptor | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:300:20:300:37 | call to desEncryptor | call to desEncryptor | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:5:304:19 | call to doDesEncryption | call to doDesEncryption | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:305:9:305:23 | call to doDesEncryption | call to doDesEncryption | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 66d6f283ba30..3264465c87c4 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -260,3 +260,48 @@ void do_fn_ptr(char *data, size_t amount, keytype key) impl = &my_aes_implementation; // GOOD impl(data, amount, key); } + +// --- template classes --- + +class desEncryptor +{ +public: + desEncryptor(); + + void doDesEncryption(char *data); +}; + +template +class container +{ +public: + container() { + obj = new C(); // GOOD [FALSE POSITIVE] + } + + ~container() { + delete obj; + } + + C *obj; +}; + +template +class templateDesEncryptor +{ +public: + templateDesEncryptor(); + + void doDesEncryption(C &data); +}; + +void do_template_classes(char *data) +{ + desEncryptor *p = new desEncryptor(); // BAD + container c; // BAD [NOT DETECTED] + templateDesEncryptor t; // BAD [NOT DETECTED] + + p->doDesEncryption(data); // BAD + c.obj->doDesEncryption(data); // BAD + t.doDesEncryption(data); // BAD [NOT DETECTED] +} From 2e236dd2a905a722b2b7a50ae728e51b6833448a Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 14:48:14 +0100 Subject: [PATCH 1411/1662] C++: Add a test case involving a harmless assert. --- .../CWE/CWE-327/BrokenCryptoAlgorithm.expected | 1 + .../query-tests/Security/CWE/CWE-327/test2.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index 791575bc145d..6876187516b2 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -12,6 +12,7 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:300:20:300:37 | call to desEncryptor | call to desEncryptor | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:5:304:19 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:305:9:305:23 | call to doDesEncryption | call to doDesEncryption | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:321:2:321:57 | ALGO_DES | invocation of macro ALGO_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 3264465c87c4..62da2c967d24 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -305,3 +305,21 @@ void do_template_classes(char *data) c.obj->doDesEncryption(data); // BAD t.doDesEncryption(data); // BAD [NOT DETECTED] } + +// --- assert --- + +int assertFunc(const char *file, int line); +#define assert(_cond) ((_cond) || assertFunc(__FILE__, __LINE__)) + +struct algorithmInfo; + +const algorithmInfo *getEncryptionAlgorithmInfo(int algo); + +void test_assert(int algo, algorithmInfo *algoInfo) +{ + assert(algo != ALGO_DES); // GOOD + assert(algoInfo != getEncryptionAlgorithmInfo(ALGO_DES)); // GOOD [FALSE POSITIVE] + + // ... +} + From 7632c9edb5a741031ca6f358b916b23749b26a3d Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:35:17 +0100 Subject: [PATCH 1412/1662] C++: Add test cases involving strings and comparisons. --- .../CWE-327/BrokenCryptoAlgorithm.expected | 4 ++ .../Security/CWE/CWE-327/test2.cpp | 66 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index 6876187516b2..7ca665c22e5a 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -13,6 +13,10 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:5:304:19 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:305:9:305:23 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:321:2:321:57 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:336:24:336:42 | ENCRYPTION_DES_NAME | invocation of macro ENCRYPTION_DES_NAME | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:358:24:358:43 | call to getEncryptionNameDES | call to getEncryptionNameDES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:373:10:373:29 | call to getEncryptionNameDES | call to getEncryptionNameDES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:383:42:383:49 | ALGO_DES | invocation of macro ALGO_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 62da2c967d24..8c21a2db4f7f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -323,3 +323,69 @@ void test_assert(int algo, algorithmInfo *algoInfo) // ... } +// --- string comparisons --- + +int strcmp(const char *s1, const char *s2); +void abort(void); + +#define ENCRYPTION_DES_NAME "DES" +#define ENCRYPTION_AES_NAME "AES" + +void test_string_comparisons1(const char *algo_name) +{ + if (strcmp(algo_name, ENCRYPTION_DES_NAME) == 0) // GOOD [FALSE POSITIVE] + { + abort(); + } + if (strcmp(algo_name, ENCRYPTION_AES_NAME) == 0) // GOOD + { + // ... + } +} + +const char *getEncryptionNameDES() +{ + return "DES"; +} + +const char *getEncryptionNameAES() +{ + return "AES"; +} + +void test_string_comparisons2(const char *algo_name) +{ + if (strcmp(algo_name, getEncryptionNameDES()) == 0) // GOOD [FALSE POSITIVE] + { + abort(); + } + if (strcmp(algo_name, getEncryptionNameAES()) == 0) // GOOD + { + // ... + } +} + +const char *getEncryptionName(int algo) +{ + switch (algo) + { + case ALGO_DES: + return getEncryptionNameDES(); // GOOD [FALSE POSITIVE] + case ALGO_AES: + return getEncryptionNameAES(); // GOOD + default: + abort(); + } +} + +void test_string_comparisons3(const char *algo_name) +{ + if (strcmp(algo_name, getEncryptionName(ALGO_DES)) == 0) // GOOD [FALSE POSITIVE] + { + abort(); + } + if (strcmp(algo_name, getEncryptionName(ALGO_AES)) == 0) // GOOD + { + // ... + } +} From d590952aaa78f5c123a603e11b7f9949b481f480 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 17 Jun 2021 09:24:47 +0100 Subject: [PATCH 1413/1662] C++: Add a test case involving nested function calls. --- .../CWE/CWE-327/BrokenCryptoAlgorithm.expected | 1 + cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index 7ca665c22e5a..e54c958c68ef 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -17,6 +17,7 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:358:24:358:43 | call to getEncryptionNameDES | call to getEncryptionNameDES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:373:10:373:29 | call to getEncryptionNameDES | call to getEncryptionNameDES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:383:42:383:49 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:399:26:399:45 | call to getEncryptionNameDES | call to getEncryptionNameDES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 8c21a2db4f7f..ac9a7d7e47b4 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -389,3 +389,13 @@ void test_string_comparisons3(const char *algo_name) // ... } } + +// --- function call in a function call --- + +void doEncryption(char *data, size_t len, const char *algorithmName); + +void test_fn_in_fn(char *data, size_t len) +{ + doEncryption(data, len, getEncryptionNameDES()); // BAD + doEncryption(data, len, getEncryptionNameAES()); // GOOD +} From 73fa680224694716dab5cc775a4587979121a384 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 26 Apr 2021 15:38:12 +0100 Subject: [PATCH 1414/1662] Add support for CSV-specified flow to or from fields. --- .../dataflow/internal/FlowSummaryImplSpecific.qll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll index d28dd2206aca..bf6556712da7 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll @@ -70,9 +70,23 @@ predicate summaryElement(DataFlowCallable c, string input, string output, string ) } +bindingset[name] +private FieldContent interpretField(string name) { + exists(string splitRegex, string package, string className, string fieldName | + splitRegex = "^(.*)\\.([^.]+)\\.([^.]+)$" and + package = name.regexpCapture(splitRegex, 1) and + className = name.regexpCapture(splitRegex, 2) and + fieldName = name.regexpCapture(splitRegex, 3) + | + result.getField().hasQualifiedName(package, className, fieldName) + ) +} + /** Gets the summary component for specification component `c`, if any. */ bindingset[c] SummaryComponent interpretComponentSpecific(string c) { + c.matches("Field %") and result = SummaryComponent::content(interpretField(c.splitAt(" ", 1))) + or c = "ArrayElement" and result = SummaryComponent::content(any(ArrayContent c0)) or c = "Element" and result = SummaryComponent::content(any(CollectionContent c0)) From 472a2a64ddda6dd4c59e707297f48d6eb3ffacf4 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 26 Apr 2021 15:39:09 +0100 Subject: [PATCH 1415/1662] Add models for Apache Commons tuples --- .../code/java/frameworks/apache/Lang.qll | 59 +++++ .../apache-commons-lang3/PairTest.java | 112 ++++++++++ .../apache-commons-lang3/TripleTest.java | 130 +++++++++++ .../commons/lang3/tuple/ImmutablePair.java | 195 +++++++++++++++++ .../commons/lang3/tuple/ImmutableTriple.java | 137 ++++++++++++ .../commons/lang3/tuple/MutablePair.java | 158 ++++++++++++++ .../commons/lang3/tuple/MutableTriple.java | 152 +++++++++++++ .../org/apache/commons/lang3/tuple/Pair.java | 204 ++++++++++++++++++ .../apache/commons/lang3/tuple/Triple.java | 164 ++++++++++++++ 9 files changed, 1311 insertions(+) create mode 100644 java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java create mode 100644 java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutablePair.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutableTriple.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutablePair.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutableTriple.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Pair.java create mode 100644 java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Triple.java diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index 38469bf6b766..97f91f20a27e 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -789,3 +789,62 @@ private class ApacheToStringBuilderModel extends SummaryModelCsv { ] } } + +/** + * Value-propagating models for `Pair`, `ImmutablePair` and `MutablePair`. + */ +private class ApachePairModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;left;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;setLeft;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;setRight;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;setValue;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutablePair.right of ReturnValue;value" + ] + } +} + +/** + * Value-propagating models for `Triple`, `ImmutableTriple` and `MutableTriple`. + */ +private class ApacheTripleModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setLeft;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setMiddle;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setRight;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutableTriple.middle of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.MutableTriple.right of ReturnValue;value" + ] + } +} diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java new file mode 100644 index 000000000000..87aeb2b8f8cc --- /dev/null +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java @@ -0,0 +1,112 @@ +import org.apache.commons.lang3.tuple.Pair; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.MutablePair; + +class PairTest { + String taint() { return "tainted"; } + + private static class IntSource { + static int taint() { return 0; } + } + + void sink(Object o) {} + + void test() throws Exception { + + ImmutablePair taintedLeft = ImmutablePair.of(taint(), "clean-right"); + ImmutablePair taintedRight = ImmutablePair.of("clean-left", taint()); + Pair taintedLeft2_ = ImmutablePair.left(taint()); + ImmutablePair taintedLeft2 = (ImmutablePair)taintedLeft2_; + Pair taintedRight2_ = ImmutablePair.right(taint()); + ImmutablePair taintedRight2 = (ImmutablePair)taintedRight2_; + + // Check flow through ImmutablePairs: + sink(taintedLeft.getLeft()); // $hasValueFlow + sink(taintedLeft.getRight()); + sink(taintedLeft.getKey()); // $hasValueFlow + sink(taintedLeft.getValue()); + sink(taintedLeft.left); // $hasValueFlow + sink(taintedLeft.right); + sink(taintedRight.getLeft()); + sink(taintedRight.getRight()); // $hasValueFlow + sink(taintedRight.getKey()); + sink(taintedRight.getValue()); // $hasValueFlow + sink(taintedRight.left); + sink(taintedRight.right); // $hasValueFlow + sink(taintedLeft2.getLeft()); // $hasValueFlow + sink(taintedLeft2.getRight()); + sink(taintedLeft2.getKey()); // $hasValueFlow + sink(taintedLeft2.getValue()); + sink(taintedLeft2.left); // $hasValueFlow + sink(taintedLeft2.right); + sink(taintedRight2.getLeft()); + sink(taintedRight2.getRight()); // $hasValueFlow + sink(taintedRight2.getKey()); + sink(taintedRight2.getValue()); // $hasValueFlow + sink(taintedRight2.left); + sink(taintedRight2.right); // $hasValueFlow + + // Check flow also works via an alias of type Pair: + sink(taintedLeft2_.getLeft()); // $hasValueFlow + sink(taintedLeft2_.getRight()); + sink(taintedLeft2_.getKey()); // $hasValueFlow + sink(taintedLeft2_.getValue()); + sink(taintedRight2_.getLeft()); + sink(taintedRight2_.getRight()); // $hasValueFlow + sink(taintedRight2_.getKey()); + sink(taintedRight2_.getValue()); // $hasValueFlow + + // Check flow through MutablePairs: + MutablePair taintedLeftMutable = MutablePair.of(taint(), "clean-right"); + MutablePair taintedRightMutable = MutablePair.of("clean-left", taint()); + MutablePair setTaintLeft = MutablePair.of("clean-left", "clean-right"); + setTaintLeft.setLeft(taint()); + MutablePair setTaintRight = MutablePair.of("clean-left", "clean-right"); + setTaintRight.setRight(taint()); + MutablePair setTaintValue = MutablePair.of("clean-left", "clean-right"); + setTaintValue.setValue(taint()); + + sink(taintedLeftMutable.getLeft()); // $hasValueFlow + sink(taintedLeftMutable.getRight()); + sink(taintedLeftMutable.getKey()); // $hasValueFlow + sink(taintedLeftMutable.getValue()); + sink(taintedLeftMutable.left); // $hasValueFlow + sink(taintedLeftMutable.right); + sink(taintedRightMutable.getLeft()); + sink(taintedRightMutable.getRight()); // $hasValueFlow + sink(taintedRightMutable.getKey()); + sink(taintedRightMutable.getValue()); // $hasValueFlow + sink(taintedRightMutable.left); + sink(taintedRightMutable.right); // $hasValueFlow + sink(setTaintLeft.getLeft()); // $hasValueFlow + sink(setTaintLeft.getRight()); + sink(setTaintLeft.getKey()); // $hasValueFlow + sink(setTaintLeft.getValue()); + sink(setTaintLeft.left); // $hasValueFlow + sink(setTaintLeft.right); + sink(setTaintRight.getLeft()); + sink(setTaintRight.getRight()); // $hasValueFlow + sink(setTaintRight.getKey()); + sink(setTaintRight.getValue()); // $hasValueFlow + sink(setTaintRight.left); + sink(setTaintRight.right); // $hasValueFlow + sink(setTaintValue.getLeft()); + sink(setTaintValue.getRight()); // $hasValueFlow + sink(setTaintValue.getKey()); + sink(setTaintValue.getValue()); // $hasValueFlow + sink(setTaintValue.left); + sink(setTaintValue.right); // $hasValueFlow + + // Check flow also works via an alias of type Pair: + Pair taintedLeftMutableAlias = taintedLeftMutable; + Pair taintedRightMutableAlias = taintedRightMutable; + sink(taintedLeftMutableAlias.getLeft()); // $hasValueFlow + sink(taintedLeftMutableAlias.getRight()); + sink(taintedLeftMutableAlias.getKey()); // $hasValueFlow + sink(taintedLeftMutableAlias.getValue()); + sink(taintedRightMutableAlias.getLeft()); + sink(taintedRightMutableAlias.getRight()); // $hasValueFlow + sink(taintedRightMutableAlias.getKey()); + sink(taintedRightMutableAlias.getValue()); // $hasValueFlow + } +} \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java new file mode 100644 index 000000000000..a298b63f02cd --- /dev/null +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java @@ -0,0 +1,130 @@ +import org.apache.commons.lang3.tuple.Triple; +import org.apache.commons.lang3.tuple.ImmutableTriple; +import org.apache.commons.lang3.tuple.MutableTriple; + +class TripleTest { + String taint() { return "tainted"; } + + private static class IntSource { + static int taint() { return 0; } + } + + void sink(Object o) {} + + void test() throws Exception { + + ImmutableTriple taintedLeft = ImmutableTriple.of(taint(), "clean-middle", "clean-right"); + ImmutableTriple taintedMiddle = ImmutableTriple.of("clean-left", taint(), "clean-right"); + ImmutableTriple taintedRight = ImmutableTriple.of("clean-left", "clean-middle", taint()); + + // Check flow through ImmutableTriples: + sink(taintedLeft.getLeft()); // $hasValueFlow + sink(taintedLeft.getMiddle()); + sink(taintedLeft.getRight()); + sink(taintedLeft.left); // $hasValueFlow + sink(taintedLeft.middle); + sink(taintedLeft.right); + sink(taintedMiddle.getLeft()); + sink(taintedMiddle.getMiddle()); // $hasValueFlow + sink(taintedMiddle.getRight()); + sink(taintedMiddle.left); + sink(taintedMiddle.middle); // $hasValueFlow + sink(taintedMiddle.right); + sink(taintedRight.getLeft()); + sink(taintedRight.getMiddle()); + sink(taintedRight.getRight()); // $hasValueFlow + sink(taintedRight.left); + sink(taintedRight.middle); + sink(taintedRight.right); // $hasValueFlow + + Triple taintedLeft2 = taintedLeft; + Triple taintedMiddle2 = taintedMiddle; + Triple taintedRight2 = taintedRight; + + // Check flow also works via an alias of type Triple: + sink(taintedLeft2.getLeft()); // $hasValueFlow + sink(taintedLeft2.getMiddle()); + sink(taintedLeft2.getRight()); + sink(taintedMiddle2.getLeft()); + sink(taintedMiddle2.getMiddle()); // $hasValueFlow + sink(taintedMiddle2.getRight()); + sink(taintedRight2.getLeft()); + sink(taintedRight2.getMiddle()); + sink(taintedRight2.getRight()); // $hasValueFlow + + MutableTriple mutableTaintedLeft = MutableTriple.of(taint(), "clean-middle", "clean-right"); + MutableTriple mutableTaintedMiddle = MutableTriple.of("clean-left", taint(), "clean-right"); + MutableTriple mutableTaintedRight = MutableTriple.of("clean-left", "clean-middle", taint()); + MutableTriple setTaintedLeft = MutableTriple.of("clean-left", "clean-middle", "clean-right"); + setTaintedLeft.setLeft(taint()); + MutableTriple setTaintedMiddle = MutableTriple.of("clean-left", "clean-middle", "clean-right"); + setTaintedMiddle.setMiddle(taint()); + MutableTriple setTaintedRight = MutableTriple.of("clean-left", "clean-middle", "clean-right"); + setTaintedRight.setRight(taint()); + + // Check flow through MutableTriples: + sink(mutableTaintedLeft.getLeft()); // $hasValueFlow + sink(mutableTaintedLeft.getMiddle()); + sink(mutableTaintedLeft.getRight()); + sink(mutableTaintedLeft.left); // $hasValueFlow + sink(mutableTaintedLeft.middle); + sink(mutableTaintedLeft.right); + sink(mutableTaintedMiddle.getLeft()); + sink(mutableTaintedMiddle.getMiddle()); // $hasValueFlow + sink(mutableTaintedMiddle.getRight()); + sink(mutableTaintedMiddle.left); + sink(mutableTaintedMiddle.middle); // $hasValueFlow + sink(mutableTaintedMiddle.right); + sink(mutableTaintedRight.getLeft()); + sink(mutableTaintedRight.getMiddle()); + sink(mutableTaintedRight.getRight()); // $hasValueFlow + sink(mutableTaintedRight.left); + sink(mutableTaintedRight.middle); + sink(mutableTaintedRight.right); // $hasValueFlow + sink(setTaintedLeft.getLeft()); // $hasValueFlow + sink(setTaintedLeft.getMiddle()); + sink(setTaintedLeft.getRight()); + sink(setTaintedLeft.left); // $hasValueFlow + sink(setTaintedLeft.middle); + sink(setTaintedLeft.right); + sink(setTaintedMiddle.getLeft()); + sink(setTaintedMiddle.getMiddle()); // $hasValueFlow + sink(setTaintedMiddle.getRight()); + sink(setTaintedMiddle.left); + sink(setTaintedMiddle.middle); // $hasValueFlow + sink(setTaintedMiddle.right); + sink(setTaintedRight.getLeft()); + sink(setTaintedRight.getMiddle()); + sink(setTaintedRight.getRight()); // $hasValueFlow + sink(setTaintedRight.left); + sink(setTaintedRight.middle); + sink(setTaintedRight.right); // $hasValueFlow + + Triple mutableTaintedLeft2 = mutableTaintedLeft; + Triple mutableTaintedMiddle2 = mutableTaintedMiddle; + Triple mutableTaintedRight2 = mutableTaintedRight; + Triple setTaintedLeft2 = setTaintedLeft; + Triple setTaintedMiddle2 = setTaintedMiddle; + Triple setTaintedRight2 = setTaintedRight; + + // Check flow also works via an alias of type Triple: + sink(mutableTaintedLeft2.getLeft()); // $hasValueFlow + sink(mutableTaintedLeft2.getMiddle()); + sink(mutableTaintedLeft2.getRight()); + sink(mutableTaintedMiddle2.getLeft()); + sink(mutableTaintedMiddle2.getMiddle()); // $hasValueFlow + sink(mutableTaintedMiddle2.getRight()); + sink(mutableTaintedRight2.getLeft()); + sink(mutableTaintedRight2.getMiddle()); + sink(mutableTaintedRight2.getRight()); // $hasValueFlow + sink(setTaintedLeft2.getLeft()); // $hasValueFlow + sink(setTaintedLeft2.getMiddle()); + sink(setTaintedLeft2.getRight()); + sink(setTaintedMiddle2.getLeft()); + sink(setTaintedMiddle2.getMiddle()); // $hasValueFlow + sink(setTaintedMiddle2.getRight()); + sink(setTaintedRight2.getLeft()); + sink(setTaintedRight2.getMiddle()); + sink(setTaintedRight2.getRight()); // $hasValueFlow + } +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutablePair.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutablePair.java new file mode 100644 index 000000000000..ee4cacd78a6f --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutablePair.java @@ -0,0 +1,195 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +import java.util.Map; + +/** + *

    An immutable pair consisting of two {@code Object} elements.

    + * + *

    Although the implementation is immutable, there is no restriction on the objects + * that may be stored. If mutable objects are stored in the pair, then the pair + * itself effectively becomes mutable. The class is also {@code final}, so a subclass + * can not add undesirable behavior.

    + * + *

    #ThreadSafe# if both paired objects are thread-safe

    + * + * @param the left element type + * @param the right element type + * + * @since 3.0 + */ +public final class ImmutablePair extends Pair { + + /** + * An empty array. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final ImmutablePair[] EMPTY_ARRAY = null; + + /** + * An immutable pair of nulls. + */ + // This is not defined with generics to avoid warnings in call sites. + @SuppressWarnings("rawtypes") + private static final ImmutablePair NULL = null; + + /** Serialization version */ + private static final long serialVersionUID = 4954918890077093841L; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static ImmutablePair[] emptyArray() { + return null; + } + + /** + *

    Creates an immutable pair of two objects inferring the generic types.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param left the left element, may be null + * @return a pair formed from the two parameters, not null + * @since 3.11 + */ + public static Pair left(final L left) { + return null; + } + + /** + * Returns an immutable pair of nulls. + * + * @param the left element of this pair. Value is {@code null}. + * @param the right element of this pair. Value is {@code null}. + * @return an immutable pair of nulls. + * @since 3.6 + */ + public static ImmutablePair nullPair() { + return null; + } + + /** + *

    Creates an immutable pair of two objects inferring the generic types.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param left the left element, may be null + * @param right the right element, may be null + * @return a pair formed from the two parameters, not null + */ + public static ImmutablePair of(final L left, final R right) { + return null; + } + + /** + *

    Creates an immutable pair from an existing pair.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param pair the existing pair. + * @return a pair formed from the two parameters, not null + * @since 3.10 + */ + public static ImmutablePair of(final Map.Entry pair) { + return null; + } + + /** + *

    Creates an immutable pair of two objects inferring the generic types.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param right the right element, may be null + * @return a pair formed from the two parameters, not null + * @since 3.11 + */ + public static Pair right(final R right) { + return null; + } + + /** Left object */ + public final L left; + + /** Right object */ + public final R right; + + /** + * Create a new pair instance. + * + * @param left the left value, may be null + * @param right the right value, may be null + */ + public ImmutablePair(final L left, final R right) { + this.left = null; + this.right = null; + } + + /** + * {@inheritDoc} + */ + @Override + public L getLeft() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public R getRight() { + return null; + } + + /** + *

    Throws {@code UnsupportedOperationException}.

    + * + *

    This pair is immutable, so this operation is not supported.

    + * + * @param value the value to set + * @return never + * @throws UnsupportedOperationException as this operation is not supported + */ + @Override + public R setValue(final R value) { + return null; + } + +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutableTriple.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutableTriple.java new file mode 100644 index 000000000000..846fcbd90522 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/ImmutableTriple.java @@ -0,0 +1,137 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +/** + *

    An immutable triple consisting of three {@code Object} elements.

    + * + *

    Although the implementation is immutable, there is no restriction on the objects + * that may be stored. If mutable objects are stored in the triple, then the triple + * itself effectively becomes mutable. The class is also {@code final}, so a subclass + * can not add undesirable behavior.

    + * + *

    #ThreadSafe# if all three objects are thread-safe

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * + * @since 3.2 + */ +public final class ImmutableTriple extends Triple { + + /** + * An empty array. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final ImmutableTriple[] EMPTY_ARRAY = null; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static ImmutableTriple[] emptyArray() { + return null; + } + + /** + * Returns an immutable triple of nulls. + * + * @param the left element of this triple. Value is {@code null}. + * @param the middle element of this triple. Value is {@code null}. + * @param the right element of this triple. Value is {@code null}. + * @return an immutable triple of nulls. + * @since 3.6 + */ + public static ImmutableTriple nullTriple() { + return null; + } + + /** + *

    Obtains an immutable triple of three objects inferring the generic types.

    + * + *

    This factory allows the triple to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @param left the left element, may be null + * @param middle the middle element, may be null + * @param right the right element, may be null + * @return a triple formed from the three parameters, not null + */ + public static ImmutableTriple of(final L left, final M middle, final R right) { + return null; + } + /** Left object */ + public final L left; + /** Middle object */ + public final M middle; + + /** Right object */ + public final R right; + + /** + * Create a new triple instance. + * + * @param left the left value, may be null + * @param middle the middle value, may be null + * @param right the right value, may be null + */ + public ImmutableTriple(final L left, final M middle, final R right) { + this.left = null; + this.middle = null; + this.right = null; + } + + //----------------------------------------------------------------------- + /** + * {@inheritDoc} + */ + @Override + public L getLeft() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public M getMiddle() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public R getRight() { + return null; + } +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutablePair.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutablePair.java new file mode 100644 index 000000000000..5826a2145fcb --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutablePair.java @@ -0,0 +1,158 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +import java.util.Map; + +/** + *

    A mutable pair consisting of two {@code Object} elements.

    + * + *

    Not #ThreadSafe#

    + * + * @param the left element type + * @param the right element type + * + * @since 3.0 + */ +public class MutablePair extends Pair { + + /** + * An empty array. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final MutablePair[] EMPTY_ARRAY = null; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static MutablePair[] emptyArray() { + return null; + } + + /** + *

    Creates a mutable pair of two objects inferring the generic types.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param left the left element, may be null + * @param right the right element, may be null + * @return a pair formed from the two parameters, not null + */ + public static MutablePair of(final L left, final R right) { + return null; + } + + /** + *

    Creates a mutable pair from an existing pair.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param pair the existing pair. + * @return a pair formed from the two parameters, not null + */ + public static MutablePair of(final Map.Entry pair) { + return null; + } + + /** Left object */ + public L left; + + /** Right object */ + public R right; + + /** + * Create a new pair instance of two nulls. + */ + public MutablePair() { + } + + /** + * Create a new pair instance. + * + * @param left the left value, may be null + * @param right the right value, may be null + */ + public MutablePair(final L left, final R right) { + this.left = null; + this.right = null; + } + + //----------------------------------------------------------------------- + /** + * {@inheritDoc} + */ + @Override + public L getLeft() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public R getRight() { + return null; + } + + /** + * Sets the left element of the pair. + * + * @param left the new value of the left element, may be null + */ + public void setLeft(final L left) { + + } + + /** + * Sets the right element of the pair. + * + * @param right the new value of the right element, may be null + */ + public void setRight(final R right) { + + } + + /** + * Sets the {@code Map.Entry} value. + * This sets the right element of the pair. + * + * @param value the right value to set, not null + * @return the old value for the right element + */ + @Override + public R setValue(final R value) { + return null; + } + +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutableTriple.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutableTriple.java new file mode 100644 index 000000000000..dc489c442938 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/MutableTriple.java @@ -0,0 +1,152 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +/** + *

    A mutable triple consisting of three {@code Object} elements.

    + * + *

    Not #ThreadSafe#

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * + * @since 3.2 + */ +public class MutableTriple extends Triple { + + /** + * The empty array singleton. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final MutableTriple[] EMPTY_ARRAY = null; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static MutableTriple[] emptyArray() { + return null; + } + + /** + *

    Obtains a mutable triple of three objects inferring the generic types.

    + * + *

    This factory allows the triple to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @param left the left element, may be null + * @param middle the middle element, may be null + * @param right the right element, may be null + * @return a triple formed from the three parameters, not null + */ + public static MutableTriple of(final L left, final M middle, final R right) { + return null; + } + /** Left object */ + public L left; + /** Middle object */ + public M middle; + + /** Right object */ + public R right; + + /** + * Create a new triple instance of three nulls. + */ + public MutableTriple() { + } + + /** + * Create a new triple instance. + * + * @param left the left value, may be null + * @param middle the middle value, may be null + * @param right the right value, may be null + */ + public MutableTriple(final L left, final M middle, final R right) { + this.left = null; + this.middle = null; + this.right = null; + } + + //----------------------------------------------------------------------- + /** + * {@inheritDoc} + */ + @Override + public L getLeft() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public M getMiddle() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public R getRight() { + return null; + } + + /** + * Sets the left element of the triple. + * + * @param left the new value of the left element, may be null + */ + public void setLeft(final L left) { + + } + + /** + * Sets the middle element of the triple. + * + * @param middle the new value of the middle element, may be null + */ + public void setMiddle(final M middle) { + + } + + /** + * Sets the right element of the triple. + * + * @param right the new value of the right element, may be null + */ + public void setRight(final R right) { + + } +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Pair.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Pair.java new file mode 100644 index 000000000000..1f23f886e5b2 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Pair.java @@ -0,0 +1,204 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +import java.io.Serializable; +import java.util.Map; + +/** + *

    A pair consisting of two elements.

    + * + *

    This class is an abstract implementation defining the basic API. + * It refers to the elements as 'left' and 'right'. It also implements the + * {@code Map.Entry} interface where the key is 'left' and the value is 'right'.

    + * + *

    Subclass implementations may be mutable or immutable. + * However, there is no restriction on the type of the stored objects that may be stored. + * If mutable objects are stored in the pair, then the pair itself effectively becomes mutable.

    + * + * @param the left element type + * @param the right element type + * + * @since 3.0 + */ +public abstract class Pair implements Map.Entry, Comparable>, Serializable { + + /** Serialization version */ + private static final long serialVersionUID = 4954918890077093841L; + + /** + * An empty array. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final Pair[] EMPTY_ARRAY = null; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static Pair[] emptyArray() { + return null; + } + + /** + *

    Creates an immutable pair of two objects inferring the generic types.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param left the left element, may be null + * @param right the right element, may be null + * @return a pair formed from the two parameters, not null + */ + public static Pair of(final L left, final R right) { + return null; + } + + /** + *

    Creates an immutable pair from an existing pair.

    + * + *

    This factory allows the pair to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the right element type + * @param pair the existing pair. + * @return a pair formed from the two parameters, not null + * @since 3.10 + */ + public static Pair of(final Map.Entry pair) { + return null; + } + + //----------------------------------------------------------------------- + /** + *

    Compares the pair based on the left element followed by the right element. + * The types must be {@code Comparable}.

    + * + * @param other the other pair, not null + * @return negative if this is less, zero if equal, positive if greater + */ + @Override + public int compareTo(final Pair other) { + return 0; + } + + /** + *

    Compares this pair to another based on the two elements.

    + * + * @param obj the object to compare to, null returns false + * @return true if the elements of the pair are equal + */ + @Override + public boolean equals(final Object obj) { + return false; + } + + /** + *

    Gets the key from this pair.

    + * + *

    This method implements the {@code Map.Entry} interface returning the + * left element as the key.

    + * + * @return the left element as the key, may be null + */ + @Override + public final L getKey() { + return null; + } + + //----------------------------------------------------------------------- + /** + *

    Gets the left element from this pair.

    + * + *

    When treated as a key-value pair, this is the key.

    + * + * @return the left element, may be null + */ + public abstract L getLeft(); + + /** + *

    Gets the right element from this pair.

    + * + *

    When treated as a key-value pair, this is the value.

    + * + * @return the right element, may be null + */ + public abstract R getRight(); + + /** + *

    Gets the value from this pair.

    + * + *

    This method implements the {@code Map.Entry} interface returning the + * right element as the value.

    + * + * @return the right element as the value, may be null + */ + @Override + public R getValue() { + return null; + } + + /** + *

    Returns a suitable hash code. + * The hash code follows the definition in {@code Map.Entry}.

    + * + * @return the hash code + */ + @Override + public int hashCode() { + return 0; + } + + /** + *

    Returns a String representation of this pair using the format {@code ($left,$right)}.

    + * + * @return a string describing this object, not null + */ + @Override + public String toString() { + return ""; + } + + /** + *

    Formats the receiver using the given format.

    + * + *

    This uses {@link java.util.Formattable} to perform the formatting. Two variables may + * be used to embed the left and right elements. Use {@code %1$s} for the left + * element (key) and {@code %2$s} for the right element (value). + * The default format used by {@code toString()} is {@code (%1$s,%2$s)}.

    + * + * @param format the format string, optionally containing {@code %1$s} and {@code %2$s}, not null + * @return the formatted string, not null + */ + public String toString(final String format) { + return ""; + } + +} \ No newline at end of file diff --git a/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Triple.java b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Triple.java new file mode 100644 index 000000000000..d8453f7e3cdd --- /dev/null +++ b/java/ql/test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3/tuple/Triple.java @@ -0,0 +1,164 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.lang3.tuple; + +import java.io.Serializable; + +/** + *

    A triple consisting of three elements.

    + * + *

    This class is an abstract implementation defining the basic API. + * It refers to the elements as 'left', 'middle' and 'right'.

    + * + *

    Subclass implementations may be mutable or immutable. + * However, there is no restriction on the type of the stored objects that may be stored. + * If mutable objects are stored in the triple, then the triple itself effectively becomes mutable.

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * + * @since 3.2 + */ +public abstract class Triple implements Comparable>, Serializable { + + /** + * An empty array. + *

    + * Consider using {@link #emptyArray()} to avoid generics warnings. + *

    + * + * @since 3.10. + */ + public static final Triple[] EMPTY_ARRAY = null; + + /** + * Returns the empty array singleton that can be assigned without compiler warning. + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @return the empty array singleton that can be assigned without compiler warning. + * + * @since 3.10. + */ + @SuppressWarnings("unchecked") + public static Triple[] emptyArray() { + return null; + } + + /** + *

    Obtains an immutable triple of three objects inferring the generic types.

    + * + *

    This factory allows the triple to be created using inference to + * obtain the generic types.

    + * + * @param the left element type + * @param the middle element type + * @param the right element type + * @param left the left element, may be null + * @param middle the middle element, may be null + * @param right the right element, may be null + * @return a triple formed from the three parameters, not null + */ + public static Triple of(final L left, final M middle, final R right) { + return null; + } + + //----------------------------------------------------------------------- + /** + *

    Compares the triple based on the left element, followed by the middle element, + * finally the right element. + * The types must be {@code Comparable}.

    + * + * @param other the other triple, not null + * @return negative if this is less, zero if equal, positive if greater + */ + @Override + public int compareTo(final Triple other) { + return 0; + } + + /** + *

    Compares this triple to another based on the three elements.

    + * + * @param obj the object to compare to, null returns false + * @return true if the elements of the triple are equal + */ + @Override + public boolean equals(final Object obj) { + return false; + } + + //----------------------------------------------------------------------- + /** + *

    Gets the left element from this triple.

    + * + * @return the left element, may be null + */ + public abstract L getLeft(); + + /** + *

    Gets the middle element from this triple.

    + * + * @return the middle element, may be null + */ + public abstract M getMiddle(); + + /** + *

    Gets the right element from this triple.

    + * + * @return the right element, may be null + */ + public abstract R getRight(); + + /** + *

    Returns a suitable hash code.

    + * + * @return the hash code + */ + @Override + public int hashCode() { + return 0; + } + + /** + *

    Returns a String representation of this triple using the format {@code ($left,$middle,$right)}.

    + * + * @return a string describing this object, not null + */ + @Override + public String toString() { + return ""; + } + + /** + *

    Formats the receiver using the given format.

    + * + *

    This uses {@link java.util.Formattable} to perform the formatting. Three variables may + * be used to embed the left and right elements. Use {@code %1$s} for the left + * element, {@code %2$s} for the middle and {@code %3$s} for the right element. + * The default format used by {@code toString()} is {@code (%1$s,%2$s,%3$s)}.

    + * + * @param format the format string, optionally containing {@code %1$s}, {@code %2$s} and {@code %3$s}, not null + * @return the formatted string, not null + */ + public String toString(final String format) { + return ""; + } + +} From 23db21cd90e8fc663fb3b7e5cc8897b2729b8ccb Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:24:37 +0100 Subject: [PATCH 1416/1662] C++: Test spacing. --- .../CWE-327/BrokenCryptoAlgorithm.expected | 38 +++++++++---------- .../Security/CWE/CWE-327/test2.cpp | 4 ++ 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index e54c958c68ef..cd1977176987 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -1,23 +1,23 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:49:4:49:24 | call to my_des_implementation | call to my_des_implementation | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:62:33:62:40 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:124:4:124:24 | call to my_des_implementation | call to my_des_implementation | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:144:27:144:29 | DES | access of enum constant DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:172:28:172:35 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:175:28:175:34 | USE_DES | access of enum constant USE_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:182:38:182:45 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:185:38:185:44 | USE_DES | access of enum constant USE_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:238:2:238:20 | call to encrypt | call to encrypt | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:245:5:245:11 | call to encrypt | call to encrypt | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:279:9:279:15 | call to desEncryptor | call to desEncryptor | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:300:20:300:37 | call to desEncryptor | call to desEncryptor | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:5:304:19 | call to doDesEncryption | call to doDesEncryption | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:305:9:305:23 | call to doDesEncryption | call to doDesEncryption | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:321:2:321:57 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:336:24:336:42 | ENCRYPTION_DES_NAME | invocation of macro ENCRYPTION_DES_NAME | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:358:24:358:43 | call to getEncryptionNameDES | call to getEncryptionNameDES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:373:10:373:29 | call to getEncryptionNameDES | call to getEncryptionNameDES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:383:42:383:49 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:399:26:399:45 | call to getEncryptionNameDES | call to getEncryptionNameDES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:64:33:64:40 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:128:4:128:24 | call to my_des_implementation | call to my_des_implementation | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:148:27:148:29 | DES | access of enum constant DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:176:28:176:35 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:179:28:179:34 | USE_DES | access of enum constant USE_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:186:38:186:45 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:189:38:189:44 | USE_DES | access of enum constant USE_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:242:2:242:20 | call to encrypt | call to encrypt | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:249:5:249:11 | call to encrypt | call to encrypt | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:283:9:283:15 | call to desEncryptor | call to desEncryptor | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:20:304:37 | call to desEncryptor | call to desEncryptor | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:308:5:308:19 | call to doDesEncryption | call to doDesEncryption | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:309:9:309:23 | call to doDesEncryption | call to doDesEncryption | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:325:2:325:57 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:340:24:340:42 | ENCRYPTION_DES_NAME | invocation of macro ENCRYPTION_DES_NAME | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:362:24:362:43 | call to getEncryptionNameDES | call to getEncryptionNameDES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:377:10:377:29 | call to getEncryptionNameDES | call to getEncryptionNameDES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:387:42:387:49 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:403:26:403:45 | call to getEncryptionNameDES | call to getEncryptionNameDES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index ac9a7d7e47b4..46aa901710aa 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -58,8 +58,12 @@ void encrypt_bad(char *data, size_t amount, keytype key, int algo) void do_encrypts(char *data, size_t amount, keytype key) { + + encrypt_good(data, amount, key, ALGO_AES); // GOOD encrypt_bad(data, amount, key, ALGO_DES); // BAD + + } // --- more involved CPP-style example --- From 365aab9bd9fd10035d4f128dc1e3cb053715db1f Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 27 Apr 2021 12:18:20 +0100 Subject: [PATCH 1417/1662] Improve matching of Field specifiers; add Field recognition in tests From eebaab8fe9216c1175bd7dc986e7d04592979e4f Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 11 May 2021 12:05:28 +0100 Subject: [PATCH 1418/1662] Order left and right consistently --- java/ql/src/semmle/code/java/frameworks/apache/Lang.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index 97f91f20a27e..99463a51e6d9 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -805,8 +805,8 @@ private class ApachePairModel extends SummaryModelCsv { "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;left;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", "org.apache.commons.lang3.tuple;MutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", From fbaa3821581dcd37c67380b1fa4575bd6d40774d Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 11 May 2021 12:05:38 +0100 Subject: [PATCH 1419/1662] Add tests for Pair.of and Triple.of --- .../frameworks/apache-commons-lang3/PairTest.java | 10 ++++++++++ .../apache-commons-lang3/TripleTest.java | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java index 87aeb2b8f8cc..e86d0461145f 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java @@ -19,6 +19,8 @@ void test() throws Exception { ImmutablePair taintedLeft2 = (ImmutablePair)taintedLeft2_; Pair taintedRight2_ = ImmutablePair.right(taint()); ImmutablePair taintedRight2 = (ImmutablePair)taintedRight2_; + Pair taintedLeft3 = Pair.of(taint(), "clean-right"); + Pair taintedRight3 = Pair.of("clean-left", taint()); // Check flow through ImmutablePairs: sink(taintedLeft.getLeft()); // $hasValueFlow @@ -45,6 +47,14 @@ void test() throws Exception { sink(taintedRight2.getValue()); // $hasValueFlow sink(taintedRight2.left); sink(taintedRight2.right); // $hasValueFlow + sink(taintedLeft3.getLeft()); // $hasValueFlow + sink(taintedLeft3.getRight()); + sink(taintedLeft3.getKey()); // $hasValueFlow + sink(taintedLeft3.getValue()); + sink(taintedRight3.getLeft()); + sink(taintedRight3.getRight()); // $hasValueFlow + sink(taintedRight3.getKey()); + sink(taintedRight3.getValue()); // $hasValueFlow // Check flow also works via an alias of type Pair: sink(taintedLeft2_.getLeft()); // $hasValueFlow diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java index a298b63f02cd..2057f34ac965 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java @@ -52,6 +52,21 @@ void test() throws Exception { sink(taintedRight2.getMiddle()); sink(taintedRight2.getRight()); // $hasValueFlow + // Check flow via Triple.of: + Triple taintedLeft3 = Triple.of(taint(), "clean-middle", "clean-right"); + Triple taintedMiddle3 = Triple.of("clean-left", taint(), "clean-right"); + Triple taintedRight3 = Triple.of("clean-left", "clean-middle", taint()); + + sink(taintedLeft3.getLeft()); // $hasValueFlow + sink(taintedLeft3.getMiddle()); + sink(taintedLeft3.getRight()); + sink(taintedMiddle3.getLeft()); + sink(taintedMiddle3.getMiddle()); // $hasValueFlow + sink(taintedMiddle3.getRight()); + sink(taintedRight3.getLeft()); + sink(taintedRight3.getMiddle()); + sink(taintedRight3.getRight()); // $hasValueFlow + MutableTriple mutableTaintedLeft = MutableTriple.of(taint(), "clean-middle", "clean-right"); MutableTriple mutableTaintedMiddle = MutableTriple.of("clean-left", taint(), "clean-right"); MutableTriple mutableTaintedRight = MutableTriple.of("clean-left", "clean-middle", taint()); From 2cc1f468711fe5c88c3795f46aa0ef5cea683f44 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 11 May 2021 12:16:44 +0100 Subject: [PATCH 1420/1662] Model constructors for (Imm|M)utable(Pair|Triple) --- .../code/java/frameworks/apache/Lang.qll | 10 ++++++ .../apache-commons-lang3/PairTest.java | 28 +++++++++++++++ .../apache-commons-lang3/TripleTest.java | 36 +++++++++++++++++++ 3 files changed, 74 insertions(+) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index 99463a51e6d9..34ec3dc391ed 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -803,12 +803,16 @@ private class ApachePairModel extends SummaryModelCsv { "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];value", "org.apache.commons.lang3.tuple;ImmutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;left;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", "org.apache.commons.lang3.tuple;MutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;MutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;MutablePair;false;setLeft;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];value", @@ -830,12 +834,18 @@ private class ApacheTripleModel extends SummaryModelCsv { "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of Argument[-1];value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.left of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.right of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];value", "org.apache.commons.lang3.tuple;MutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;MutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];ReturnValue;value", "org.apache.commons.lang3.tuple;MutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];ReturnValue;value", diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java index e86d0461145f..6db15beb1816 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/PairTest.java @@ -21,6 +21,8 @@ void test() throws Exception { ImmutablePair taintedRight2 = (ImmutablePair)taintedRight2_; Pair taintedLeft3 = Pair.of(taint(), "clean-right"); Pair taintedRight3 = Pair.of("clean-left", taint()); + ImmutablePair taintedLeft4 = new ImmutablePair(taint(), "clean-right"); + ImmutablePair taintedRight4 = new ImmutablePair("clean-left", taint()); // Check flow through ImmutablePairs: sink(taintedLeft.getLeft()); // $hasValueFlow @@ -55,6 +57,18 @@ void test() throws Exception { sink(taintedRight3.getRight()); // $hasValueFlow sink(taintedRight3.getKey()); sink(taintedRight3.getValue()); // $hasValueFlow + sink(taintedLeft4.getLeft()); // $hasValueFlow + sink(taintedLeft4.getRight()); + sink(taintedLeft4.getKey()); // $hasValueFlow + sink(taintedLeft4.getValue()); + sink(taintedLeft4.left); // $hasValueFlow + sink(taintedLeft4.right); + sink(taintedRight4.getLeft()); + sink(taintedRight4.getRight()); // $hasValueFlow + sink(taintedRight4.getKey()); + sink(taintedRight4.getValue()); // $hasValueFlow + sink(taintedRight4.left); + sink(taintedRight4.right); // $hasValueFlow // Check flow also works via an alias of type Pair: sink(taintedLeft2_.getLeft()); // $hasValueFlow @@ -75,6 +89,8 @@ void test() throws Exception { setTaintRight.setRight(taint()); MutablePair setTaintValue = MutablePair.of("clean-left", "clean-right"); setTaintValue.setValue(taint()); + MutablePair taintedLeftMutableConstructed = new MutablePair(taint(), "clean-right"); + MutablePair taintedRightMutableConstructed = new MutablePair("clean-left", taint()); sink(taintedLeftMutable.getLeft()); // $hasValueFlow sink(taintedLeftMutable.getRight()); @@ -106,6 +122,18 @@ void test() throws Exception { sink(setTaintValue.getValue()); // $hasValueFlow sink(setTaintValue.left); sink(setTaintValue.right); // $hasValueFlow + sink(taintedLeftMutableConstructed.getLeft()); // $hasValueFlow + sink(taintedLeftMutableConstructed.getRight()); + sink(taintedLeftMutableConstructed.getKey()); // $hasValueFlow + sink(taintedLeftMutableConstructed.getValue()); + sink(taintedLeftMutableConstructed.left); // $hasValueFlow + sink(taintedLeftMutableConstructed.right); + sink(taintedRightMutableConstructed.getLeft()); + sink(taintedRightMutableConstructed.getRight()); // $hasValueFlow + sink(taintedRightMutableConstructed.getKey()); + sink(taintedRightMutableConstructed.getValue()); // $hasValueFlow + sink(taintedRightMutableConstructed.left); + sink(taintedRightMutableConstructed.right); // $hasValueFlow // Check flow also works via an alias of type Pair: Pair taintedLeftMutableAlias = taintedLeftMutable; diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java index 2057f34ac965..b6f9c53cc7ef 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/TripleTest.java @@ -67,6 +67,21 @@ void test() throws Exception { sink(taintedRight3.getMiddle()); sink(taintedRight3.getRight()); // $hasValueFlow + // Check flow via constructor: + ImmutableTriple taintedLeft4 = new ImmutableTriple(taint(), "clean-middle", "clean-right"); + ImmutableTriple taintedMiddle4 = new ImmutableTriple("clean-left", taint(), "clean-right"); + ImmutableTriple taintedRight4 = new ImmutableTriple("clean-left", "clean-middle", taint()); + + sink(taintedLeft4.getLeft()); // $hasValueFlow + sink(taintedLeft4.getMiddle()); + sink(taintedLeft4.getRight()); + sink(taintedMiddle4.getLeft()); + sink(taintedMiddle4.getMiddle()); // $hasValueFlow + sink(taintedMiddle4.getRight()); + sink(taintedRight4.getLeft()); + sink(taintedRight4.getMiddle()); + sink(taintedRight4.getRight()); // $hasValueFlow + MutableTriple mutableTaintedLeft = MutableTriple.of(taint(), "clean-middle", "clean-right"); MutableTriple mutableTaintedMiddle = MutableTriple.of("clean-left", taint(), "clean-right"); MutableTriple mutableTaintedRight = MutableTriple.of("clean-left", "clean-middle", taint()); @@ -76,6 +91,9 @@ void test() throws Exception { setTaintedMiddle.setMiddle(taint()); MutableTriple setTaintedRight = MutableTriple.of("clean-left", "clean-middle", "clean-right"); setTaintedRight.setRight(taint()); + MutableTriple mutableTaintedLeftConstructed = new MutableTriple(taint(), "clean-middle", "clean-right"); + MutableTriple mutableTaintedMiddleConstructed = new MutableTriple("clean-left", taint(), "clean-right"); + MutableTriple mutableTaintedRightConstructed = new MutableTriple("clean-left", "clean-middle", taint()); // Check flow through MutableTriples: sink(mutableTaintedLeft.getLeft()); // $hasValueFlow @@ -114,6 +132,24 @@ void test() throws Exception { sink(setTaintedRight.left); sink(setTaintedRight.middle); sink(setTaintedRight.right); // $hasValueFlow + sink(mutableTaintedLeftConstructed.getLeft()); // $hasValueFlow + sink(mutableTaintedLeftConstructed.getMiddle()); + sink(mutableTaintedLeftConstructed.getRight()); + sink(mutableTaintedLeftConstructed.left); // $hasValueFlow + sink(mutableTaintedLeftConstructed.middle); + sink(mutableTaintedLeftConstructed.right); + sink(mutableTaintedMiddleConstructed.getLeft()); + sink(mutableTaintedMiddleConstructed.getMiddle()); // $hasValueFlow + sink(mutableTaintedMiddleConstructed.getRight()); + sink(mutableTaintedMiddleConstructed.left); + sink(mutableTaintedMiddleConstructed.middle); // $hasValueFlow + sink(mutableTaintedMiddleConstructed.right); + sink(mutableTaintedRightConstructed.getLeft()); + sink(mutableTaintedRightConstructed.getMiddle()); + sink(mutableTaintedRightConstructed.getRight()); // $hasValueFlow + sink(mutableTaintedRightConstructed.left); + sink(mutableTaintedRightConstructed.middle); + sink(mutableTaintedRightConstructed.right); // $hasValueFlow Triple mutableTaintedLeft2 = mutableTaintedLeft; Triple mutableTaintedMiddle2 = mutableTaintedMiddle; From 5cf0243dd09f826bd0f04f06baa63a0144493219 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 11 May 2021 12:19:17 +0100 Subject: [PATCH 1421/1662] Add change note --- java/change-notes/2021-05-11-apache-tuples.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-05-11-apache-tuples.md diff --git a/java/change-notes/2021-05-11-apache-tuples.md b/java/change-notes/2021-05-11-apache-tuples.md new file mode 100644 index 000000000000..2eab20ecd4f7 --- /dev/null +++ b/java/change-notes/2021-05-11-apache-tuples.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Added models for the Apache Commons Lang tuple types (Pair, Triple and their immutable and mutable implementations). This may lead to more results from any query using data-flow analysis where a relevant path uses one of these container types. From 3641cdcc1fccac40bb4764b97878fb91348887b2 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:25:39 +0100 Subject: [PATCH 1422/1662] C++: Add a test case involving an array. --- .../Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected | 1 + cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index cd1977176987..3058add2819f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -1,5 +1,6 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:49:4:49:24 | call to my_des_implementation | call to my_des_implementation | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:64:33:64:40 | ALGO_DES | invocation of macro ALGO_DES | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:66:31:66:38 | ALGO_DES | invocation of macro ALGO_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:128:4:128:24 | call to my_des_implementation | call to my_des_implementation | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:148:27:148:29 | DES | access of enum constant DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:176:28:176:35 | ALGO_DES | invocation of macro ALGO_DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 46aa901710aa..bdf94d594e5b 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -58,12 +58,12 @@ void encrypt_bad(char *data, size_t amount, keytype key, int algo) void do_encrypts(char *data, size_t amount, keytype key) { - + char data2[128]; encrypt_good(data, amount, key, ALGO_AES); // GOOD encrypt_bad(data, amount, key, ALGO_DES); // BAD - - + encrypt_good(data2, 128, key, ALGO_AES); // GOOD + encrypt_bad(data2, 128, key, ALGO_DES); // BAD } // --- more involved CPP-style example --- From 8efdf359dc70228816e1e2cd11afbe0cf86d9ef6 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 17 Jun 2021 12:20:33 +0100 Subject: [PATCH 1423/1662] C++: Fix some incorrect uses of 'const' in the tests. --- cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index bdf94d594e5b..283308ab7613 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -212,32 +212,32 @@ void do_unseen_encrypts(char *data, size_t amount, keytype key) class desEncrypt { public: - static void encrypt(const char *data); + static void encrypt(char *data); static void doSomethingElse(); }; class aes256Encrypt { public: - static void encrypt(const char *data); + static void encrypt(char *data); static void doSomethingElse(); }; class desCipher { public: - void encrypt(const char *data); + void encrypt(char *data); void doSomethingElse(); }; class aesCipher { public: - void encrypt(const char *data); + void encrypt(char *data); void doSomethingElse(); }; -void do_classes(const char *data) +void do_classes(char *data) { desEncrypt::encrypt(data); // BAD aes256Encrypt::encrypt(data); // GOOD From a481e5c29229360cd581c4c6a4448d1dffb6b695 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:59:38 +0100 Subject: [PATCH 1424/1662] C++: Exclude template code. --- cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql | 5 ++++- .../Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected | 1 - cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index 848adfd7adcc..92d8f272b4be 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -107,7 +107,10 @@ predicate getInsecureEncryptionEvidence(FunctionCall fc, Element blame, string d ec = fc.getAnArgument() and ec.getTarget() = getAdditionalEvidenceEnumConst() ) - ) + ) and + // exclude calls from templates as this is rarely the right place to flag an + // issue + not fc.isFromTemplateInstantiation(_) } /** diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index 3058add2819f..ef765fe469b7 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -9,7 +9,6 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:189:38:189:44 | USE_DES | access of enum constant USE_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:242:2:242:20 | call to encrypt | call to encrypt | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:249:5:249:11 | call to encrypt | call to encrypt | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:283:9:283:15 | call to desEncryptor | call to desEncryptor | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:20:304:37 | call to desEncryptor | call to desEncryptor | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:308:5:308:19 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:309:9:309:23 | call to doDesEncryption | call to doDesEncryption | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 283308ab7613..35e38d3b7302 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -280,7 +280,7 @@ class container { public: container() { - obj = new C(); // GOOD [FALSE POSITIVE] + obj = new C(); // GOOD } ~container() { From 74b2a2c7a6fb21ccc56c1958208af0a341d41e74 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 12:45:44 +0100 Subject: [PATCH 1425/1662] Improve style of interpretField --- .../internal/FlowSummaryImplSpecific.qll | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll index bf6556712da7..f2a54793b7ac 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll @@ -70,14 +70,13 @@ predicate summaryElement(DataFlowCallable c, string input, string output, string ) } -bindingset[name] -private FieldContent interpretField(string name) { - exists(string splitRegex, string package, string className, string fieldName | - splitRegex = "^(.*)\\.([^.]+)\\.([^.]+)$" and - package = name.regexpCapture(splitRegex, 1) and - className = name.regexpCapture(splitRegex, 2) and - fieldName = name.regexpCapture(splitRegex, 3) - | +private FieldContent parseField(string c) { + External::specSplit(_, c, _) and + exists(string fieldRegex, string package, string className, string fieldName | + fieldRegex = "^Field (.*)\\.([^.]+)\\.([^.]+)$" and + package = c.regexpCapture(fieldRegex, 1) and + className = c.regexpCapture(fieldRegex, 2) and + fieldName = c.regexpCapture(fieldRegex, 3) and result.getField().hasQualifiedName(package, className, fieldName) ) } @@ -85,7 +84,7 @@ private FieldContent interpretField(string name) { /** Gets the summary component for specification component `c`, if any. */ bindingset[c] SummaryComponent interpretComponentSpecific(string c) { - c.matches("Field %") and result = SummaryComponent::content(interpretField(c.splitAt(" ", 1))) + result = SummaryComponent::content(parseField(c)) or c = "ArrayElement" and result = SummaryComponent::content(any(ArrayContent c0)) or From d28c95d16c4a0cc7d7c48f8e890e94c2e43968e7 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 17 Jun 2021 12:49:25 +0100 Subject: [PATCH 1426/1662] Field foo of -> Field[foo] of --- .../internal/FlowSummaryImplSpecific.qll | 2 +- .../code/java/frameworks/apache/Lang.qll | 94 +++++++++---------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll index f2a54793b7ac..974982a9c297 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/FlowSummaryImplSpecific.qll @@ -73,7 +73,7 @@ predicate summaryElement(DataFlowCallable c, string input, string output, string private FieldContent parseField(string c) { External::specSplit(_, c, _) and exists(string fieldRegex, string package, string className, string fieldName | - fieldRegex = "^Field (.*)\\.([^.]+)\\.([^.]+)$" and + fieldRegex = "^Field\\[(.*)\\.([^.]+)\\.([^.]+)\\]$" and package = c.regexpCapture(fieldRegex, 1) and className = c.regexpCapture(fieldRegex, 2) and fieldName = c.regexpCapture(fieldRegex, 3) and diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index 34ec3dc391ed..bf47d6276869 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -797,29 +797,29 @@ private class ApachePairModel extends SummaryModelCsv { override predicate row(string row) { row = [ - "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutablePair.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutablePair.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;left;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutablePair.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutablePair.right of ReturnValue;value", - "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutablePair;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;MutablePair;false;getRight;;;Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;MutablePair;false;setLeft;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutablePair;false;setRight;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutablePair;false;setValue;;;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutablePair.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutablePair.right of ReturnValue;value" + "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getKey;;;Field[org.apache.commons.lang3.tuple.MutablePair.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;getValue;;;Field[org.apache.commons.lang3.tuple.MutablePair.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;Pair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;ImmutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;getLeft;;;Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;getRight;;;Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;left;;;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;right;;;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutablePair.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutablePair.right] of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.MutablePair.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;MutablePair;(java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.MutablePair.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;getLeft;;;Field[org.apache.commons.lang3.tuple.MutablePair.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;getRight;;;Field[org.apache.commons.lang3.tuple.MutablePair.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;setLeft;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutablePair.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;setRight;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutablePair.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;setValue;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutablePair.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.MutablePair.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutablePair;false;of;(java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.MutablePair.right] of ReturnValue;value" ] } } @@ -831,30 +831,30 @@ private class ApacheTripleModel extends SummaryModelCsv { override predicate row(string row) { row = [ - "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", - "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of Argument[-1];value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.ImmutableTriple.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.ImmutableTriple.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.ImmutableTriple.middle of ReturnValue;value", - "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.ImmutableTriple.right of ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;getLeft;;;Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;getMiddle;;;Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;getRight;;;Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;setLeft;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;setMiddle;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.middle of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;setRight;;;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.right of Argument[-1];value", - "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field org.apache.commons.lang3.tuple.MutableTriple.left of ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field org.apache.commons.lang3.tuple.MutableTriple.middle of ReturnValue;value", - "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field org.apache.commons.lang3.tuple.MutableTriple.right of ReturnValue;value" + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutableTriple.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutableTriple.middle] of ReturnValue;value", + "org.apache.commons.lang3.tuple;Triple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field[org.apache.commons.lang3.tuple.ImmutableTriple.right] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutableTriple.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutableTriple.middle] of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;ImmutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field[org.apache.commons.lang3.tuple.ImmutableTriple.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getLeft;;;Field[org.apache.commons.lang3.tuple.ImmutableTriple.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getMiddle;;;Field[org.apache.commons.lang3.tuple.ImmutableTriple.middle] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;getRight;;;Field[org.apache.commons.lang3.tuple.ImmutableTriple.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.ImmutableTriple.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.ImmutableTriple.middle] of ReturnValue;value", + "org.apache.commons.lang3.tuple;ImmutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field[org.apache.commons.lang3.tuple.ImmutableTriple.right] of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.MutableTriple.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.MutableTriple.middle] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;MutableTriple;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field[org.apache.commons.lang3.tuple.MutableTriple.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getLeft;;;Field[org.apache.commons.lang3.tuple.MutableTriple.left] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getMiddle;;;Field[org.apache.commons.lang3.tuple.MutableTriple.middle] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;getRight;;;Field[org.apache.commons.lang3.tuple.MutableTriple.right] of Argument[-1];ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setLeft;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutableTriple.left] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setMiddle;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutableTriple.middle] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;setRight;;;Argument[0];Field[org.apache.commons.lang3.tuple.MutableTriple.right] of Argument[-1];value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[0];Field[org.apache.commons.lang3.tuple.MutableTriple.left] of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[1];Field[org.apache.commons.lang3.tuple.MutableTriple.middle] of ReturnValue;value", + "org.apache.commons.lang3.tuple;MutableTriple;false;of;(java.lang.Object,java.lang.Object,java.lang.Object);;Argument[2];Field[org.apache.commons.lang3.tuple.MutableTriple.right] of ReturnValue;value" ] } } From eca11f1b40c095bd6102e25e484a02d70c6a3bdc Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 17 Jun 2021 14:46:23 +0200 Subject: [PATCH 1427/1662] C#: Adjust `getQualifiedName` for type parameters --- .../2021-06-16-qualified-names.md | 5 +- csharp/ql/src/semmle/code/csharp/Generics.qll | 4 +- .../dataflow/external-models/ExternalFlow.cs | 2 +- .../external-models/ExternalFlow.expected | 6 +- .../dataflow/external-models/ExternalFlow.ql | 8 +- .../dataflow/external-models/steps.ql | 4 +- .../dispatch/GetADynamicTarget.expected | 103 +++++++----------- .../library-tests/generics/Generics.expected | 10 +- .../overrides/Overrides22.expected | 2 +- 9 files changed, 62 insertions(+), 82 deletions(-) diff --git a/csharp/change-notes/2021-06-16-qualified-names.md b/csharp/change-notes/2021-06-16-qualified-names.md index 738aa76527b9..3ecd089402a6 100644 --- a/csharp/change-notes/2021-06-16-qualified-names.md +++ b/csharp/change-notes/2021-06-16-qualified-names.md @@ -1,8 +1,7 @@ lgtm,codescanning * The following has changed in `Type::getQualifiedName`/`Type::hasQualifiedName`: - - Type parameters now have the qualified name of the declaring generic as - qualifier, and `` as name, where `i` is the index of the type parameter. - Example: in `class C { }`, `T` has qualified name `C.<0>`. + - Type parameters now have the qualified name which is simply the name of the type + parameter itself. Example: in `class C { }`, `T` has qualified name `T`. - Constructed types now use qualified names for type arguments. For example, the qualified name of `C` is `C`. This also includes array types and pointer types. diff --git a/csharp/ql/src/semmle/code/csharp/Generics.qll b/csharp/ql/src/semmle/code/csharp/Generics.qll index 7e0e325a4291..77f5249841fe 100644 --- a/csharp/ql/src/semmle/code/csharp/Generics.qll +++ b/csharp/ql/src/semmle/code/csharp/Generics.qll @@ -186,8 +186,8 @@ class TypeParameter extends DotNet::TypeParameter, Type, @type_parameter { UnboundGeneric getGeneric() { type_parameters(this, _, result, _) } final override predicate hasQualifiedName(string qualifier, string name) { - qualifier = this.getGeneric().getQualifiedName() and - name = "<" + this.getIndex().toString() + ">" + qualifier = "" and + name = this.getName() } override string getAPrimaryQlClass() { result = "TypeParameter" } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs index c156daa0c82b..b446e26f9fc0 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs @@ -111,7 +111,7 @@ void StepQualArg(object @out) { } void StepElementSetter(object value) => throw null; - static T Apply(Func f, T t) => throw null; + static T Apply(Func f, S s) => throw null; static S[] Map(S[] elements, Func f) => throw null; diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected index c69f303b9429..c64c8c8110f6 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected @@ -24,7 +24,7 @@ edges | ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | ExternalFlow.cs:54:13:54:16 | [post] this access [element] : Object | | ExternalFlow.cs:55:18:55:21 | this access [element] : Object | ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | | ExternalFlow.cs:60:35:60:35 | o : Object | ExternalFlow.cs:60:47:60:47 | access to parameter o | -| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:114:46:114:46 | t : Object | +| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:114:46:114:46 | s : Object | | ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | ExternalFlow.cs:66:18:66:18 | access to local variable o | | ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | | ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | @@ -40,7 +40,7 @@ edges | ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | | ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | ExternalFlow.cs:85:18:85:25 | access to array element | -| ExternalFlow.cs:114:46:114:46 | t : Object | ExternalFlow.cs:60:35:60:35 | o : Object | +| ExternalFlow.cs:114:46:114:46 | s : Object | ExternalFlow.cs:60:35:60:35 | o : Object | | ExternalFlow.cs:116:34:116:41 | elements [element] : Object | ExternalFlow.cs:72:23:72:23 | o : Object | nodes | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | @@ -97,7 +97,7 @@ nodes | ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | semmle.label | access to local variable objs [element] : Object | | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | semmle.label | access to local variable objs2 [element] : Object | | ExternalFlow.cs:85:18:85:25 | access to array element | semmle.label | access to array element | -| ExternalFlow.cs:114:46:114:46 | t : Object | semmle.label | t : Object | +| ExternalFlow.cs:114:46:114:46 | s : Object | semmle.label | s : Object | | ExternalFlow.cs:116:34:116:41 | elements [element] : Object | semmle.label | elements [element] : Object | invalidModelRow #select diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql index b2acfbd6b9dc..07de4a28b8c3 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql @@ -21,10 +21,10 @@ class SummaryModelTest extends SummaryModelCsv { "My.Qltest;D;false;StepPropertySetter;(System.Object);;Argument[0];Property[My.Qltest.D.Property] of Argument[-1];value", "My.Qltest;D;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", "My.Qltest;D;false;StepElementSetter;(System.Object);;Argument[0];Element of Argument[-1];value", - "My.Qltest;D;false;Apply;(System.Func,My.Qltest.D.Apply.<1>>,My.Qltest.D.Apply.<1>);;Argument[1];Parameter[0] of Argument[0];value", - "My.Qltest;D;false;Apply;(System.Func,My.Qltest.D.Apply.<1>>,My.Qltest.D.Apply.<1>);;ReturnValue of Argument[0];ReturnValue;value", - "My.Qltest;D;false;Map;(My.Qltest.D.Map.<0>[],System.Func,My.Qltest.D.Map.<1>>);;Element of Argument[0];Parameter[0] of Argument[1];value", - "My.Qltest;D;false;Map;(My.Qltest.D.Map.<0>[],System.Func,My.Qltest.D.Map.<1>>);;ReturnValue of Argument[1];Element of ReturnValue;value" + "My.Qltest;D;false;Apply;(System.Func,S);;Argument[1];Parameter[0] of Argument[0];value", + "My.Qltest;D;false;Apply;(System.Func,S);;ReturnValue of Argument[0];ReturnValue;value", + "My.Qltest;D;false;Map;(S[],System.Func);;Element of Argument[0];Parameter[0] of Argument[1];value", + "My.Qltest;D;false;Map;(S[],System.Func);;ReturnValue of Argument[1];Element of ReturnValue;value" ] } } diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql index 7bb2616b7687..2381191d408d 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql @@ -20,8 +20,8 @@ class SummaryModelTest extends SummaryModelCsv { "My.Qltest;C;false;StepPropertySetter;(System.Int32);;Argument[0];Property[My.Qltest.C.Property] of Argument[-1];value", "My.Qltest;C;false;StepElementGetter;();;Element of Argument[-1];ReturnValue;value", "My.Qltest;C;false;StepElementSetter;(System.Int32);;Argument[0];Element of Argument[-1];value", - "My.Qltest;C+Generic<>;false;StepGeneric;(My.Qltest.C+Generic<>.<0>);;Argument[0];ReturnValue;value", - "My.Qltest;C+Generic<>;false;StepGeneric2;(My.Qltest.C+Generic<>.StepGeneric2.<0>);;Argument[0];ReturnValue;value" + "My.Qltest;C+Generic<>;false;StepGeneric;(T);;Argument[0];ReturnValue;value", + "My.Qltest;C+Generic<>;false;StepGeneric2;(S);;Argument[0];ReturnValue;value" ] } } diff --git a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected index 0945d94b7f9a..794c962f4aa5 100644 --- a/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected +++ b/csharp/ql/test/library-tests/dispatch/GetADynamicTarget.expected @@ -29,8 +29,8 @@ | ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+ImplAlpha.M() | | ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+SecondLevelImpl.M() | | ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests.M() | | ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests.M() | -| ExactCallable.cs:49:17:49:34 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | | ExactCallable.cs:52:17:52:29 | call to method BetaFactory | Test.MainClass.BetaFactory() | | ExactCallable.cs:52:17:52:33 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:55:17:55:34 | call to method InterfaceFactory | Test.MainClass.InterfaceFactory() | @@ -38,8 +38,8 @@ | ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+SecondLevelImpl.M() | | ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests<>.M() | +| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests.M() | | ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests.M() | -| ExactCallable.cs:55:17:55:38 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | | ExactCallable.cs:58:17:58:24 | call to method M | Test.MainClass+ImplAlpha.M() | | ExactCallable.cs:61:17:61:24 | call to method M | Test.MainClass+Tests<>.M() | | ExactCallable.cs:64:17:64:19 | call to method M | Test.MainClass+Tests<>.M() | @@ -53,7 +53,7 @@ | ExactCallable.cs:94:17:94:155 | call to method Invoke | Test.MainClass.UnqualifiedM() | | ExactCallable.cs:98:17:98:120 | call to method InvokeMember | Test.MainClass.MethodWithOut(int, out bool) | | ExactCallable.cs:101:17:101:121 | call to method InvokeMember | Test.MainClass.MethodWithOut2(int, out object) | -| ExactCallable.cs:104:17:104:23 | call to method M | Test.MainClass+Tests.Run.<1>>.M() | +| ExactCallable.cs:104:17:104:23 | call to method M | Test.MainClass+Tests.M() | | ExactCallable.cs:107:17:107:28 | call to method M | Test.MainClass+ImplBeta.M() | | ExactCallable.cs:184:13:184:16 | call to method M2 | Test.MainClass.M2() | | ExactCallable.cs:191:13:191:16 | call to method M1 | Test.MainClass.M1() | @@ -75,14 +75,13 @@ | ViableCallable.cs:12:9:12:28 | call to method M | C4.M(Int32[], T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C5.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6<,>.M(T1, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6.M(bool, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6.M(Int32[], T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6,System.Boolean>.M(T1, T3) | -| ViableCallable.cs:12:9:12:28 | call to method M | C6,System.Byte>.M(T1, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:12:9:12:28 | call to method M | C6.M(T1, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C7<>.M(T1, T3) | | ViableCallable.cs:12:9:12:28 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C2<>.set_Prop(string) | @@ -94,14 +93,13 @@ | ViableCallable.cs:14:9:14:15 | access to property Prop | C4.set_Prop(Int32[]) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C5.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6<,>.set_Prop(T1) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.<0>,System.Byte>.set_Prop(T1) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(bool) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(Int32[]) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(string) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6,System.Boolean>.set_Prop(T1) | -| ViableCallable.cs:14:9:14:15 | access to property Prop | C6,System.Byte>.set_Prop(T1) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(T1) | +| ViableCallable.cs:14:9:14:15 | access to property Prop | C6.set_Prop(T1) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C7<>.set_Prop(T1) | | ViableCallable.cs:14:9:14:15 | access to property Prop | C7.set_Prop(bool) | | ViableCallable.cs:14:19:14:25 | access to property Prop | C2<>.get_Prop() | @@ -113,14 +111,13 @@ | ViableCallable.cs:14:19:14:25 | access to property Prop | C4.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C5.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6<,>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.<0>,System.Byte>.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6,System.Boolean>.get_Prop() | -| ViableCallable.cs:14:19:14:25 | access to property Prop | C6,System.Byte>.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:14:19:14:25 | access to property Prop | C6.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C7<>.get_Prop() | | ViableCallable.cs:14:19:14:25 | access to property Prop | C7.get_Prop() | | ViableCallable.cs:16:9:16:23 | access to indexer | C2<>.set_Item(T, string) | @@ -132,14 +129,13 @@ | ViableCallable.cs:16:9:16:23 | access to indexer | C4.set_Item(bool, Int32[]) | | ViableCallable.cs:16:9:16:23 | access to indexer | C5.set_Item(bool, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6<,>.set_Item(T2, T1) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6.<0>,System.Byte>.set_Item(byte, T1) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(byte, bool) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, Int32[]) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(decimal, string) | | ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(int, string) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6,System.Boolean>.set_Item(bool, T1) | -| ViableCallable.cs:16:9:16:23 | access to indexer | C6,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(bool, T1) | +| ViableCallable.cs:16:9:16:23 | access to indexer | C6.set_Item(byte, T1) | | ViableCallable.cs:16:9:16:23 | access to indexer | C7<>.set_Item(byte, T1) | | ViableCallable.cs:16:9:16:23 | access to indexer | C7.set_Item(byte, bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C2<>.get_Item(T) | @@ -151,14 +147,13 @@ | ViableCallable.cs:16:27:16:41 | access to indexer | C4.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C5.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6<,>.get_Item(T2) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6.<0>,System.Byte>.get_Item(byte) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(byte) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(decimal) | | ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(int) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6,System.Boolean>.get_Item(bool) | -| ViableCallable.cs:16:27:16:41 | access to indexer | C6,System.Byte>.get_Item(byte) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:16:27:16:41 | access to indexer | C6.get_Item(byte) | | ViableCallable.cs:16:27:16:41 | access to indexer | C7<>.get_Item(byte) | | ViableCallable.cs:16:27:16:41 | access to indexer | C7.get_Item(byte) | | ViableCallable.cs:18:9:18:16 | access to event Event | C2<>.add_Event(EventHandler) | @@ -170,14 +165,13 @@ | ViableCallable.cs:18:9:18:16 | access to event Event | C4.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C5.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6<,>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6.<0>,System.Byte>.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6,System.Boolean>.add_Event(EventHandler) | -| ViableCallable.cs:18:9:18:16 | access to event Event | C6,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:18:9:18:16 | access to event Event | C6.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C7<>.add_Event(EventHandler) | | ViableCallable.cs:18:9:18:16 | access to event Event | C7.add_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C2<>.remove_Event(EventHandler) | @@ -189,14 +183,13 @@ | ViableCallable.cs:19:9:19:16 | access to event Event | C4.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C5.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6<,>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6.<0>,System.Byte>.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6,System.Boolean>.remove_Event(EventHandler) | -| ViableCallable.cs:19:9:19:16 | access to event Event | C6,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | +| ViableCallable.cs:19:9:19:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C7<>.remove_Event(EventHandler) | | ViableCallable.cs:19:9:19:16 | access to event Event | C7.remove_Event(EventHandler) | | ViableCallable.cs:22:9:22:30 | call to method M | C4<>.M(T[], T3) | @@ -294,13 +287,13 @@ | ViableCallable.cs:73:9:73:16 | access to event Event | C2.remove_Event(EventHandler) | | ViableCallable.cs:73:9:73:16 | access to event Event | C5.remove_Event(EventHandler) | | ViableCallable.cs:73:9:73:16 | access to event Event | C6.remove_Event(EventHandler) | -| ViableCallable.cs:77:9:77:29 | call to method M | C6,System.Boolean>.M(T1, T3) | -| ViableCallable.cs:79:9:79:15 | access to property Prop | C6,System.Boolean>.set_Prop(T1) | -| ViableCallable.cs:79:19:79:25 | access to property Prop | C6,System.Boolean>.get_Prop() | -| ViableCallable.cs:81:9:81:17 | access to indexer | C6,System.Boolean>.set_Item(bool, T1) | -| ViableCallable.cs:81:21:81:29 | access to indexer | C6,System.Boolean>.get_Item(bool) | -| ViableCallable.cs:83:9:83:16 | access to event Event | C6,System.Boolean>.add_Event(EventHandler) | -| ViableCallable.cs:84:9:84:16 | access to event Event | C6,System.Boolean>.remove_Event(EventHandler) | +| ViableCallable.cs:77:9:77:29 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:79:9:79:15 | access to property Prop | C6.set_Prop(T1) | +| ViableCallable.cs:79:19:79:25 | access to property Prop | C6.get_Prop() | +| ViableCallable.cs:81:9:81:17 | access to indexer | C6.set_Item(bool, T1) | +| ViableCallable.cs:81:21:81:29 | access to indexer | C6.get_Item(bool) | +| ViableCallable.cs:83:9:83:16 | access to event Event | C6.add_Event(EventHandler) | +| ViableCallable.cs:84:9:84:16 | access to event Event | C6.remove_Event(EventHandler) | | ViableCallable.cs:87:21:87:30 | call to method Mock | ViableCallable.Mock() | | ViableCallable.cs:88:9:88:44 | dynamic call to method M | C8.M(IEnumerable>) | | ViableCallable.cs:88:9:88:44 | dynamic call to method M | C9<>.M(IEnumerable>) | @@ -320,25 +313,18 @@ | ViableCallable.cs:106:9:106:17 | access to event Event2 | C5.remove_Event2(EventHandler) | | ViableCallable.cs:120:9:120:25 | dynamic call to method M2 | C8.M2(Decimal[]) | | ViableCallable.cs:124:9:124:24 | dynamic call to method M2 | C8.M2(String[]) | -| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.<0>,System.Byte>.M(T1, T3) | | ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.M(bool, T3) | -| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6,System.Byte>.M(T1, T3) | -| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.<0>,System.Byte>.set_Prop(T1) | +| ViableCallable.cs:132:9:132:28 | dynamic call to method M | C6.M(T1, T3) | | ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.set_Prop(bool) | -| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6,System.Byte>.set_Prop(T1) | -| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.<0>,System.Byte>.get_Prop() | +| ViableCallable.cs:134:9:134:14 | dynamic access to member Prop | C6.set_Prop(T1) | | ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.get_Prop() | -| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6,System.Byte>.get_Prop() | -| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.<0>,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:134:18:134:23 | dynamic access to member Prop | C6.get_Prop() | | ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.set_Item(byte, bool) | -| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6,System.Byte>.set_Item(byte, T1) | -| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.<0>,System.Byte>.get_Item(byte) | +| ViableCallable.cs:136:9:136:18 | dynamic access to element | C6.set_Item(byte, T1) | | ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.get_Item(byte) | -| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6,System.Byte>.get_Item(byte) | -| ViableCallable.cs:138:9:138:52 | ... += ... | C6.<0>,System.Byte>.add_Event(EventHandler) | -| ViableCallable.cs:138:9:138:52 | ... += ... | C6,System.Byte>.add_Event(EventHandler) | -| ViableCallable.cs:139:9:139:52 | ... -= ... | C6.<0>,System.Byte>.remove_Event(EventHandler) | -| ViableCallable.cs:139:9:139:52 | ... -= ... | C6,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:136:22:136:31 | dynamic access to element | C6.get_Item(byte) | +| ViableCallable.cs:138:9:138:52 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:139:9:139:52 | ... -= ... | C6.remove_Event(EventHandler) | | ViableCallable.cs:143:13:143:22 | call to method Mock | ViableCallable.Mock() | | ViableCallable.cs:144:9:144:14 | dynamic call to method M3 | C8.M3(params Double[]) | | ViableCallable.cs:144:9:144:14 | dynamic call to method M3 | C9<>.M3(params T[]) | @@ -368,11 +354,10 @@ | ViableCallable.cs:155:9:155:14 | dynamic access to element | C2.set_Item(int, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C3.set_Item(decimal, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C6<,>.set_Item(T2, T1) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.<0>,System.Byte>.set_Item(byte, T1) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(byte, bool) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(decimal, string) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(int, string) | -| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6,System.Byte>.set_Item(byte, T1) | +| ViableCallable.cs:155:9:155:14 | dynamic access to element | C6.set_Item(byte, T1) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C7<>.set_Item(byte, T1) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C7.set_Item(byte, bool) | | ViableCallable.cs:155:9:155:14 | dynamic access to element | C8.set_Item(int, string) | @@ -383,11 +368,10 @@ | ViableCallable.cs:155:18:155:23 | dynamic access to element | C2.get_Item(int) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C3.get_Item(decimal) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C6<,>.get_Item(T2) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.<0>,System.Byte>.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(decimal) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(int) | -| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6,System.Byte>.get_Item(byte) | +| ViableCallable.cs:155:18:155:23 | dynamic access to element | C6.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C7<>.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C7.get_Item(byte) | | ViableCallable.cs:155:18:155:23 | dynamic access to element | C8.get_Item(int) | @@ -400,12 +384,11 @@ | ViableCallable.cs:157:9:157:54 | ... += ... | C3.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C5.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C6<,>.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6.<0>,System.Byte>.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6,System.Boolean>.add_Event(EventHandler) | -| ViableCallable.cs:157:9:157:54 | ... += ... | C6,System.Byte>.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | +| ViableCallable.cs:157:9:157:54 | ... += ... | C6.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C7<>.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C8.add_Event(EventHandler) | | ViableCallable.cs:157:9:157:54 | ... += ... | C9<>.add_Event(EventHandler) | @@ -416,12 +399,11 @@ | ViableCallable.cs:158:9:158:54 | ... -= ... | C3.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C5.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C6<,>.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.<0>,System.Byte>.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6,System.Boolean>.remove_Event(EventHandler) | -| ViableCallable.cs:158:9:158:54 | ... -= ... | C6,System.Byte>.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | +| ViableCallable.cs:158:9:158:54 | ... -= ... | C6.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C7<>.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C8.remove_Event(EventHandler) | | ViableCallable.cs:158:9:158:54 | ... -= ... | C9<>.remove_Event(EventHandler) | @@ -449,14 +431,13 @@ | ViableCallable.cs:235:9:235:15 | call to method M | C4.M(Int32[], T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C5.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6<,>.M(T1, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6.M(bool, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6.M(Int32[], T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C6.M(string, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6,System.Boolean>.M(T1, T3) | -| ViableCallable.cs:235:9:235:15 | call to method M | C6,System.Byte>.M(T1, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(T1, T3) | +| ViableCallable.cs:235:9:235:15 | call to method M | C6.M(T1, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C7<>.M(T1, T3) | | ViableCallable.cs:235:9:235:15 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:284:9:284:15 | call to method M | C6<,>.M(T1, T3) | @@ -467,7 +448,7 @@ | ViableCallable.cs:287:9:287:20 | call to method M | C7.M(bool, T3) | | ViableCallable.cs:301:9:301:15 | call to method M | C7<>.M(T1, T3) | | ViableCallable.cs:304:9:304:20 | call to method M | C7<>.M(T1, T3) | -| ViableCallable.cs:307:9:307:20 | call to method M | C6.<0>,System.Byte>.M(T1, T3) | +| ViableCallable.cs:307:9:307:20 | call to method M | C6.M(T1, T3) | | ViableCallable.cs:354:9:354:14 | dynamic call to method M | C11.M(dynamic) | | ViableCallable.cs:356:9:356:18 | dynamic object creation of type C11 | C11.C11(C11) | | ViableCallable.cs:379:9:379:13 | call to method M | C12+C13.M() | @@ -484,7 +465,7 @@ | ViableCallable.cs:439:9:439:19 | call to method M1 | C16.M1(string) | | ViableCallable.cs:442:9:442:24 | call to method M2 | C17.M2(Func) | | ViableCallable.cs:450:9:450:21 | call to method M2 | C17.M2(Func) | -| ViableCallable.cs:456:9:456:30 | call to method M2 | C16,System.Int32>.M2(Func) | +| ViableCallable.cs:456:9:456:30 | call to method M2 | C16.M2(Func) | | ViableCallable.cs:456:9:456:30 | call to method M2 | C17.M2(Func) | -| ViableCallable.cs:462:9:462:30 | call to method M2 | C16,System.Int32>.M2(Func) | +| ViableCallable.cs:462:9:462:30 | call to method M2 | C16.M2(Func) | | ViableCallable.cs:462:9:462:30 | call to method M2 | C17.M2(Func) | diff --git a/csharp/ql/test/library-tests/generics/Generics.expected b/csharp/ql/test/library-tests/generics/Generics.expected index d432306ced2b..0bdb6c78995b 100644 --- a/csharp/ql/test/library-tests/generics/Generics.expected +++ b/csharp/ql/test/library-tests/generics/Generics.expected @@ -117,7 +117,7 @@ test28 | generics.cs:45:14:45:17 | f | generics.B<>.f() | | generics.cs:45:14:45:17 | f | generics.B.f() | | generics.cs:45:14:45:17 | f | generics.B.f() | -| generics.cs:45:14:45:17 | f | generics.B.f.<0>>.f() | +| generics.cs:45:14:45:17 | f | generics.B.f() | | generics.cs:51:22:51:29 | Inner<> | generics.Outer<>+Inner | | generics.cs:51:22:51:29 | Inner<> | generics.Outer+Inner | | generics.cs:137:21:137:25 | fs | generics.Subtle.fs(int) | @@ -167,12 +167,12 @@ test30 | Nesting.cs:24:10:24:18 | Construct | A.Construct() | | generics.cs:29:21:29:23 | foo | generics.B.foo() | | generics.cs:29:21:29:23 | foo | generics.B.foo() | -| generics.cs:29:21:29:23 | foo | generics.B.f.<0>>.foo() | +| generics.cs:29:21:29:23 | foo | generics.B.foo() | | generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params Object[]) | | generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params String[]) | -| generics.cs:31:21:31:29 | fooParams | generics.B.f.<0>>.fooParams(params X[]) | +| generics.cs:31:21:31:29 | fooParams | generics.B.fooParams(params X[]) | | generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | | generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | -| generics.cs:33:28:33:36 | staticFoo | generics.B.f.<0>>.staticFoo() | -| generics.cs:175:14:175:16 | set | generics.Interface.<0>>.set(T) | +| generics.cs:33:28:33:36 | staticFoo | generics.B.staticFoo() | +| generics.cs:175:14:175:16 | set | generics.Interface.set(T) | test31 diff --git a/csharp/ql/test/library-tests/overrides/Overrides22.expected b/csharp/ql/test/library-tests/overrides/Overrides22.expected index 364d4554e86e..79bd83c8a9dc 100644 --- a/csharp/ql/test/library-tests/overrides/Overrides22.expected +++ b/csharp/ql/test/library-tests/overrides/Overrides22.expected @@ -46,5 +46,5 @@ | overrides.F.M() | overrides.I.M() | implements | | overrides.G2.M(string, S) | overrides.G.M(string, S) | overrides | | overrides.G.M(string, S) | overrides.I2.M(string, S) | implements | -| overrides.H<>.M(TA, S) | overrides.I2.<0>>.M(TA, S) | implements | +| overrides.H<>.M(TA, S) | overrides.I2.M(TA, S) | implements | | overrides.Outer<>+A10.M(Inner) | overrides.Outer<>+I6.M(Inner) | implements | From e5147c2a1f7c71c7db735722536e4545501241da Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 17:35:00 +0100 Subject: [PATCH 1428/1662] C++: Exclude functions that don't involve buffers. --- .../CWE/CWE-327/BrokenCryptoAlgorithm.ql | 20 ++++++++++++++++++- .../CWE-327/BrokenCryptoAlgorithm.expected | 10 ---------- .../query-tests/Security/CWE/CWE-327/test.cpp | 4 ++-- .../Security/CWE/CWE-327/test2.cpp | 16 +++++++-------- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index 92d8f272b4be..feb6bb28273e 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -110,7 +110,25 @@ predicate getInsecureEncryptionEvidence(FunctionCall fc, Element blame, string d ) and // exclude calls from templates as this is rarely the right place to flag an // issue - not fc.isFromTemplateInstantiation(_) + not fc.isFromTemplateInstantiation(_) and + ( + // the function should have an input that looks like a non-constant buffer + exists(Expr e | + fc.getAnArgument() = e and + ( + e.getUnspecifiedType() instanceof PointerType or + e.getUnspecifiedType() instanceof ReferenceType or + e.getUnspecifiedType() instanceof ArrayType + ) and + not e.getType().isDeeplyConstBelow() and + not e.isConstant() + ) + or + // or be a non-const member function of an object + fc.getTarget() instanceof MemberFunction and + not fc.getTarget() instanceof ConstMemberFunction and + not fc.getTarget().isStatic() + ) } /** diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index ef765fe469b7..c225ba56aa7e 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -3,8 +3,6 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:66:31:66:38 | ALGO_DES | invocation of macro ALGO_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:128:4:128:24 | call to my_des_implementation | call to my_des_implementation | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:148:27:148:29 | DES | access of enum constant DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:176:28:176:35 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:179:28:179:34 | USE_DES | access of enum constant USE_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:186:38:186:45 | ALGO_DES | invocation of macro ALGO_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:189:38:189:44 | USE_DES | access of enum constant USE_DES | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:242:2:242:20 | call to encrypt | call to encrypt | @@ -12,12 +10,6 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:20:304:37 | call to desEncryptor | call to desEncryptor | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:308:5:308:19 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:309:9:309:23 | call to doDesEncryption | call to doDesEncryption | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:325:2:325:57 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:340:24:340:42 | ENCRYPTION_DES_NAME | invocation of macro ENCRYPTION_DES_NAME | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:362:24:362:43 | call to getEncryptionNameDES | call to getEncryptionNameDES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:377:10:377:29 | call to getEncryptionNameDES | call to getEncryptionNameDES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:387:42:387:49 | ALGO_DES | invocation of macro ALGO_DES | -| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:403:26:403:45 | call to getEncryptionNameDES | call to getEncryptionNameDES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | @@ -31,5 +23,3 @@ | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:91:2:91:12 | call to encrypt3DES | call to encrypt3DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:92:2:92:17 | call to encryptTripleDES | call to encryptTripleDES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:101:2:101:15 | call to do_des_encrypt | call to do_des_encrypt | -| test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:102:2:102:12 | call to DES_Set_Key | call to DES_Set_Key | -| test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:121:2:121:24 | INIT_ENCRYPT_WITH_DES() | invocation of macro INIT_ENCRYPT_WITH_DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test.cpp index 8af9868f1eef..91af0f7eede2 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test.cpp @@ -99,7 +99,7 @@ void test_functions(void *data, size_t amount, const char *str) DoDESEncryption(data, amount); // BAD [NOT DETECTED] encryptDes(data, amount); // BAD [NOT DETECTED] do_des_encrypt(data, amount); // BAD - DES_Set_Key(str); // BAD + DES_Set_Key(str); // BAD [NOT DETECTED] DESSetKey(str); // BAD [NOT DETECTED] Des(); // GOOD (probably nothing to do with encryption) @@ -118,7 +118,7 @@ void my_implementation8(); void test_macros2() { - INIT_ENCRYPT_WITH_DES(); // BAD + INIT_ENCRYPT_WITH_DES(); // BAD [NOT DETECTED] INIT_ENCRYPT_WITH_AES(); // GOOD (good algorithm) // ... diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index 35e38d3b7302..dbd2b7b1aa43 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -173,10 +173,10 @@ const char *get_algorithm3(); void do_unseen_encrypts(char *data, size_t amount, keytype key) { - set_encryption_algorithm1(ALGO_DES); // BAD + set_encryption_algorithm1(ALGO_DES); // BAD [NOT DETECTED] set_encryption_algorithm1(ALGO_AES); // GOOD - set_encryption_algorithm2(USE_DES); // BAD + set_encryption_algorithm2(USE_DES); // BAD [NOT DETECTED] set_encryption_algorithm2(USE_AES); // GOOD set_encryption_algorithm3("DES"); // BAD [NOT DETECTED] @@ -322,7 +322,7 @@ const algorithmInfo *getEncryptionAlgorithmInfo(int algo); void test_assert(int algo, algorithmInfo *algoInfo) { assert(algo != ALGO_DES); // GOOD - assert(algoInfo != getEncryptionAlgorithmInfo(ALGO_DES)); // GOOD [FALSE POSITIVE] + assert(algoInfo != getEncryptionAlgorithmInfo(ALGO_DES)); // GOOD // ... } @@ -337,7 +337,7 @@ void abort(void); void test_string_comparisons1(const char *algo_name) { - if (strcmp(algo_name, ENCRYPTION_DES_NAME) == 0) // GOOD [FALSE POSITIVE] + if (strcmp(algo_name, ENCRYPTION_DES_NAME) == 0) // GOOD { abort(); } @@ -359,7 +359,7 @@ const char *getEncryptionNameAES() void test_string_comparisons2(const char *algo_name) { - if (strcmp(algo_name, getEncryptionNameDES()) == 0) // GOOD [FALSE POSITIVE] + if (strcmp(algo_name, getEncryptionNameDES()) == 0) // GOOD { abort(); } @@ -374,7 +374,7 @@ const char *getEncryptionName(int algo) switch (algo) { case ALGO_DES: - return getEncryptionNameDES(); // GOOD [FALSE POSITIVE] + return getEncryptionNameDES(); // GOOD case ALGO_AES: return getEncryptionNameAES(); // GOOD default: @@ -384,7 +384,7 @@ const char *getEncryptionName(int algo) void test_string_comparisons3(const char *algo_name) { - if (strcmp(algo_name, getEncryptionName(ALGO_DES)) == 0) // GOOD [FALSE POSITIVE] + if (strcmp(algo_name, getEncryptionName(ALGO_DES)) == 0) // GOOD { abort(); } @@ -400,6 +400,6 @@ void doEncryption(char *data, size_t len, const char *algorithmName); void test_fn_in_fn(char *data, size_t len) { - doEncryption(data, len, getEncryptionNameDES()); // BAD + doEncryption(data, len, getEncryptionNameDES()); // BAD [NOT DETECTED] doEncryption(data, len, getEncryptionNameAES()); // GOOD } From b5c71fd1d7966c8abf0cd660b69f259decb611a6 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Thu, 17 Jun 2021 09:33:28 +0100 Subject: [PATCH 1429/1662] C++: Repair funcion call in a function call. --- .../Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql | 14 ++++++++++---- .../CWE/CWE-327/BrokenCryptoAlgorithm.expected | 1 + .../query-tests/Security/CWE/CWE-327/test2.cpp | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index feb6bb28273e..b69bb849e40b 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -70,9 +70,12 @@ EnumConstant getAdditionalEvidenceEnumConst() { isEncryptionAdditionalEvidence(r predicate getInsecureEncryptionEvidence(FunctionCall fc, Element blame, string description) { // find use of an insecure algorithm name ( - fc.getTarget() = getAnInsecureEncryptionFunction() and - blame = fc and - description = "call to " + fc.getTarget().getName() + exists(FunctionCall fc2 | + fc.getAChild*() = fc2 and + fc2.getTarget() = getAnInsecureEncryptionFunction() and + blame = fc2 and + description = "call to " + fc.getTarget().getName() + ) or exists(MacroInvocation mi | ( @@ -93,7 +96,10 @@ predicate getInsecureEncryptionEvidence(FunctionCall fc, Element blame, string d ) and // find additional evidence that this function is related to encryption. ( - fc.getTarget() = getAnAdditionalEvidenceFunction() + exists(FunctionCall fc2 | + fc.getAChild*() = fc2 and + fc2.getTarget() = getAnAdditionalEvidenceFunction() + ) or exists(MacroInvocation mi | ( diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected index c225ba56aa7e..4232a08ec0f8 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/BrokenCryptoAlgorithm.expected @@ -10,6 +10,7 @@ | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:304:20:304:37 | call to desEncryptor | call to desEncryptor | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:308:5:308:19 | call to doDesEncryption | call to doDesEncryption | | test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:309:9:309:23 | call to doDesEncryption | call to doDesEncryption | +| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:403:26:403:45 | call to getEncryptionNameDES | call to doEncryption | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | invocation of macro ENCRYPT_WITH_DES | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:39:2:39:31 | ENCRYPT_WITH_RC2(data,amount) | invocation of macro ENCRYPT_WITH_RC2 | | test.cpp:38:2:38:31 | ENCRYPT_WITH_DES(data,amount) | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test.cpp:41:2:41:32 | ENCRYPT_WITH_3DES(data,amount) | invocation of macro ENCRYPT_WITH_3DES | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp index dbd2b7b1aa43..95fc532c842d 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp @@ -400,6 +400,6 @@ void doEncryption(char *data, size_t len, const char *algorithmName); void test_fn_in_fn(char *data, size_t len) { - doEncryption(data, len, getEncryptionNameDES()); // BAD [NOT DETECTED] + doEncryption(data, len, getEncryptionNameDES()); // BAD doEncryption(data, len, getEncryptionNameAES()); // GOOD } From b4cbe6dce88f4e366f5e0522dd117837679cc7a2 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 16 Jun 2021 18:05:27 +0100 Subject: [PATCH 1430/1662] C++: Increase query precision to high. --- cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql index b69bb849e40b..38dd23d1cfce 100644 --- a/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql +++ b/cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.ql @@ -5,7 +5,7 @@ * @kind problem * @problem.severity error * @security-severity 5.2 - * @precision medium + * @precision high * @id cpp/weak-cryptographic-algorithm * @tags security * external/cwe/cwe-327 From d5163ca244bc5f2385af14527b080a84cdf174cb Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 17 Jun 2021 20:47:07 +0200 Subject: [PATCH 1431/1662] C#: Cache `NamedElement::hasQualifiedName/2` --- csharp/ql/src/semmle/code/dotnet/Element.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/ql/src/semmle/code/dotnet/Element.qll b/csharp/ql/src/semmle/code/dotnet/Element.qll index c38b09ce2705..caf03506be1b 100644 --- a/csharp/ql/src/semmle/code/dotnet/Element.qll +++ b/csharp/ql/src/semmle/code/dotnet/Element.qll @@ -87,6 +87,7 @@ class NamedElement extends Element, @dotnet_named_element { final predicate hasQualifiedName(string qualifiedName) { qualifiedName = this.getQualifiedName() } /** Holds if this element has the qualified name `qualifier`.`name`. */ + cached predicate hasQualifiedName(string qualifier, string name) { qualifier = "" and name = this.getName() } From 66e4940ac3100d171f8f42734de29eb5f68cafff Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 17 Jun 2021 20:47:20 +0200 Subject: [PATCH 1432/1662] C#: Remove bad magic --- csharp/ql/src/semmle/code/csharp/Member.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/ql/src/semmle/code/csharp/Member.qll b/csharp/ql/src/semmle/code/csharp/Member.qll index 6c0870bfc390..9f8408621fc2 100644 --- a/csharp/ql/src/semmle/code/csharp/Member.qll +++ b/csharp/ql/src/semmle/code/csharp/Member.qll @@ -331,6 +331,7 @@ class Virtualizable extends Member, @virtualizable { * (An example where `getOverridee*().getImplementee()` would be incorrect.) * - If this member is `D.M` then `I.M = getAnUltimateImplementee()`. */ + pragma[nomagic] Virtualizable getAnUltimateImplementee() { exists(Virtualizable implementation, ValueOrRefType implementationType | implements(implementation, result, implementationType) From 9feda2ddd6ce79b596b8fd6b5390a9a8f1825dc6 Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Fri, 18 Jun 2021 10:46:22 +0300 Subject: [PATCH 1433/1662] Update C/C++ Clang and GCC versions.rst --- docs/codeql/support/reusables/versions-compilers.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index 74b9c196564c..36e35d2040db 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -4,9 +4,9 @@ :stub-columns: 1 Language,Variants,Compilers,Extensions - C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17","Clang (and clang-cl [1]_) extensions (up to Clang 9.0), + C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17","Clang (and clang-cl [1]_) extensions (up to Clang 12.0), - GNU extensions (up to GCC 9.2), + GNU extensions (up to GCC 9.4), Microsoft extensions (up to VS 2019), From 0d18e4ff9ce9bcab0070e27a7514abb8f8f4c1f3 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 26 May 2021 21:04:39 +0800 Subject: [PATCH 1434/1662] BeanShell Injection --- .../CWE/CWE-094/BeanShellInjection.java | 33 +++++ .../CWE/CWE-094/BeanShellInjection.qhelp | 33 +++++ .../CWE/CWE-094/BeanShellInjection.ql | 47 +++++++ .../CWE/CWE-094/BeanShellInjection.qll | 28 ++++ .../CWE-094/BeanShellInjection.expected | 15 +++ .../security/CWE-094/BeanShellInjection.java | 33 +++++ .../security/CWE-094/BeanShellInjection.qlref | 1 + .../stubs/bsh-2.0b5/bsh/ConsoleInterface.java | 18 +++ .../test/stubs/bsh-2.0b5/bsh/EvalError.java | 5 + .../test/stubs/bsh-2.0b5/bsh/Interpreter.java | 125 ++++++++++++++++++ .../test/stubs/bsh-2.0b5/bsh/NameSpace.java | 7 + .../springframework/beans/factory/Aware.java | 4 + .../beans/factory/BeanClassLoaderAware.java | 5 + .../scripting/ScriptEvaluator.java | 12 ++ .../scripting/ScriptSource.java | 13 ++ .../scripting/bsh/BshScriptEvaluator.java | 26 ++++ .../scripting/support/StaticScriptSource.java | 30 +++++ 17 files changed, 435 insertions(+) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qll create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref create mode 100644 java/ql/test/stubs/bsh-2.0b5/bsh/ConsoleInterface.java create mode 100644 java/ql/test/stubs/bsh-2.0b5/bsh/EvalError.java create mode 100644 java/ql/test/stubs/bsh-2.0b5/bsh/Interpreter.java create mode 100644 java/ql/test/stubs/bsh-2.0b5/bsh/NameSpace.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/Aware.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/BeanClassLoaderAware.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptEvaluator.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptSource.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/bsh/BshScriptEvaluator.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/support/StaticScriptSource.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.java b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.java new file mode 100644 index 000000000000..ee98929312b6 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.java @@ -0,0 +1,33 @@ +import bsh.Interpreter; +import javax.servlet.http.HttpServletRequest; +import org.springframework.scripting.bsh.BshScriptEvaluator; +import org.springframework.scripting.support.StaticScriptSource; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class BeanShellInjection { + + @GetMapping(value = "bad1") + public void bad1(HttpServletRequest request) { + String code = request.getParameter("code"); + BshScriptEvaluator evaluator = new BshScriptEvaluator(); + evaluator.evaluate(new StaticScriptSource(code)); //bad + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) throws Exception { + String code = request.getParameter("code"); + Interpreter interpreter = new Interpreter(); + interpreter.eval(code); //bad + } + + @GetMapping(value = "bad3") + public void bad3(HttpServletRequest request) { + String code = request.getParameter("code"); + StaticScriptSource staticScriptSource = new StaticScriptSource("test"); + staticScriptSource.setScript(code); + BshScriptEvaluator evaluator = new BshScriptEvaluator(); + evaluator.evaluate(staticScriptSource); //bad + } +} diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp new file mode 100644 index 000000000000..7839f55ee337 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp @@ -0,0 +1,33 @@ + + + + +

    +BeanShell is a small, free, embeddable Java source interpreter with object scripting language +features, written in Java. BeanShell dynamically executes standard Java syntax and extends it +with common scripting conveniences such as loose types, commands, and method closures like +those in Perl and JavaScript. If a BeanShell expression is built using attacker-controlled data, +and then evaluated, then it may allow the attacker to run arbitrary code. +

    +
    + + +

    +It is generally recommended to avoid using untrusted input in a BeanShell expression. +If it is not possible, BeanShell expressions should be run in a sandbox that allows accessing only +explicitly allowed classes. +

    +
    + + +

    +The following example uses untrusted data to build and run a BeanShell expression. +

    + + + +
  • +CVE-2016-2510:BeanShell Injection. +
  • +
    +
    diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql new file mode 100644 index 000000000000..b8301d4f9776 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.ql @@ -0,0 +1,47 @@ +/** + * @name BeanShell injection + * @description Evaluation of a user-controlled BeanShell expression + * may lead to arbitrary code execution. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/beanshell-injection + * @tags security + * external/cwe/cwe-094 + */ + +import java +import BeanShellInjection +import semmle.code.java.dataflow.FlowSources +import DataFlow::PathGraph + +class BeanShellInjectionConfig extends TaintTracking::Configuration { + BeanShellInjectionConfig() { this = "BeanShellInjectionConfig" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof BeanShellInjectionSink } + + override predicate isAdditionalTaintStep(DataFlow::Node prod, DataFlow::Node succ) { + exists(ClassInstanceExpr cie | + cie.getConstructedType() + .hasQualifiedName("org.springframework.scripting.support", "StaticScriptSource") and + cie.getArgument(0) = prod.asExpr() and + cie = succ.asExpr() + ) + or + exists(MethodAccess ma | + ma.getMethod().hasName("setScript") and + ma.getMethod() + .getDeclaringType() + .hasQualifiedName("org.springframework.scripting.support", "StaticScriptSource") and + ma.getArgument(0) = prod.asExpr() and + ma.getQualifier() = succ.asExpr() + ) + } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, BeanShellInjectionConfig conf +where conf.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "BeanShell injection from $@.", source.getNode(), + "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qll b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qll new file mode 100644 index 000000000000..3d1cc1223397 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qll @@ -0,0 +1,28 @@ +import java +import semmle.code.java.dataflow.FlowSources + +/** A call to `Interpreter.eval`. */ +class InterpreterEvalCall extends MethodAccess { + InterpreterEvalCall() { + this.getMethod().hasName("eval") and + this.getMethod().getDeclaringType().hasQualifiedName("bsh", "Interpreter") + } +} + +/** A call to `BshScriptEvaluator.evaluate`. */ +class BshScriptEvaluatorEvaluateCall extends MethodAccess { + BshScriptEvaluatorEvaluateCall() { + this.getMethod().hasName("evaluate") and + this.getMethod() + .getDeclaringType() + .hasQualifiedName("org.springframework.scripting.bsh", "BshScriptEvaluator") + } +} + +/** A sink for BeanShell expression injection vulnerabilities. */ +class BeanShellInjectionSink extends DataFlow::Node { + BeanShellInjectionSink() { + this.asExpr() = any(InterpreterEvalCall iec).getArgument(0) or + this.asExpr() = any(BshScriptEvaluatorEvaluateCall bseec).getArgument(0) + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.expected new file mode 100644 index 000000000000..9f792d499905 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.expected @@ -0,0 +1,15 @@ +edges +| BeanShellInjection.java:13:17:13:44 | getParameter(...) : String | BeanShellInjection.java:15:22:15:49 | new StaticScriptSource(...) | +| BeanShellInjection.java:20:17:20:44 | getParameter(...) : String | BeanShellInjection.java:22:20:22:23 | code | +| BeanShellInjection.java:27:17:27:44 | getParameter(...) : String | BeanShellInjection.java:31:22:31:39 | staticScriptSource | +nodes +| BeanShellInjection.java:13:17:13:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| BeanShellInjection.java:15:22:15:49 | new StaticScriptSource(...) | semmle.label | new StaticScriptSource(...) | +| BeanShellInjection.java:20:17:20:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| BeanShellInjection.java:22:20:22:23 | code | semmle.label | code | +| BeanShellInjection.java:27:17:27:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| BeanShellInjection.java:31:22:31:39 | staticScriptSource | semmle.label | staticScriptSource | +#select +| BeanShellInjection.java:15:22:15:49 | new StaticScriptSource(...) | BeanShellInjection.java:13:17:13:44 | getParameter(...) : String | BeanShellInjection.java:15:22:15:49 | new StaticScriptSource(...) | BeanShell injection from $@. | BeanShellInjection.java:13:17:13:44 | getParameter(...) | this user input | +| BeanShellInjection.java:22:20:22:23 | code | BeanShellInjection.java:20:17:20:44 | getParameter(...) : String | BeanShellInjection.java:22:20:22:23 | code | BeanShell injection from $@. | BeanShellInjection.java:20:17:20:44 | getParameter(...) | this user input | +| BeanShellInjection.java:31:22:31:39 | staticScriptSource | BeanShellInjection.java:27:17:27:44 | getParameter(...) : String | BeanShellInjection.java:31:22:31:39 | staticScriptSource | BeanShell injection from $@. | BeanShellInjection.java:27:17:27:44 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.java new file mode 100644 index 000000000000..ee98929312b6 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.java @@ -0,0 +1,33 @@ +import bsh.Interpreter; +import javax.servlet.http.HttpServletRequest; +import org.springframework.scripting.bsh.BshScriptEvaluator; +import org.springframework.scripting.support.StaticScriptSource; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class BeanShellInjection { + + @GetMapping(value = "bad1") + public void bad1(HttpServletRequest request) { + String code = request.getParameter("code"); + BshScriptEvaluator evaluator = new BshScriptEvaluator(); + evaluator.evaluate(new StaticScriptSource(code)); //bad + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) throws Exception { + String code = request.getParameter("code"); + Interpreter interpreter = new Interpreter(); + interpreter.eval(code); //bad + } + + @GetMapping(value = "bad3") + public void bad3(HttpServletRequest request) { + String code = request.getParameter("code"); + StaticScriptSource staticScriptSource = new StaticScriptSource("test"); + staticScriptSource.setScript(code); + BshScriptEvaluator evaluator = new BshScriptEvaluator(); + evaluator.evaluate(staticScriptSource); //bad + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref new file mode 100644 index 000000000000..a54b26a62fde --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/BeanShellInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-094/BeanShellInjection.ql \ No newline at end of file diff --git a/java/ql/test/stubs/bsh-2.0b5/bsh/ConsoleInterface.java b/java/ql/test/stubs/bsh-2.0b5/bsh/ConsoleInterface.java new file mode 100644 index 000000000000..e0f7f1db898a --- /dev/null +++ b/java/ql/test/stubs/bsh-2.0b5/bsh/ConsoleInterface.java @@ -0,0 +1,18 @@ +package bsh; + +import java.io.PrintStream; +import java.io.Reader; + +public interface ConsoleInterface { + Reader getIn(); + + PrintStream getOut(); + + PrintStream getErr(); + + void println(Object var1); + + void print(Object var1); + + void error(Object var1); +} diff --git a/java/ql/test/stubs/bsh-2.0b5/bsh/EvalError.java b/java/ql/test/stubs/bsh-2.0b5/bsh/EvalError.java new file mode 100644 index 000000000000..af995eb4c3e4 --- /dev/null +++ b/java/ql/test/stubs/bsh-2.0b5/bsh/EvalError.java @@ -0,0 +1,5 @@ +package bsh; + +public class EvalError extends Exception { + +} diff --git a/java/ql/test/stubs/bsh-2.0b5/bsh/Interpreter.java b/java/ql/test/stubs/bsh-2.0b5/bsh/Interpreter.java new file mode 100644 index 000000000000..47de8ee64028 --- /dev/null +++ b/java/ql/test/stubs/bsh-2.0b5/bsh/Interpreter.java @@ -0,0 +1,125 @@ +package bsh; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.ObjectInputStream; +import java.io.PrintStream; +import java.io.Reader; +import java.io.Serializable; +import java.io.StringReader; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +public class Interpreter implements Runnable, ConsoleInterface, Serializable { + + public Interpreter(Reader in, PrintStream out, PrintStream err, boolean interactive, NameSpace namespace, Interpreter parent, String sourceFileInfo) { } + + public Interpreter(Reader in, PrintStream out, PrintStream err, boolean interactive, NameSpace namespace) { } + + public Interpreter(Reader in, PrintStream out, PrintStream err, boolean interactive) { } + + public Interpreter(ConsoleInterface console, NameSpace globalNameSpace) { } + + public Interpreter(ConsoleInterface console) { } + + public Interpreter() { } + + public void setConsole(ConsoleInterface console) { } + + private void initRootSystemObject() { } + + public void setNameSpace(NameSpace globalNameSpace) { } + + public NameSpace getNameSpace() { + return null; + } + + public static void main(String[] args) { } + + public static void invokeMain(Class clas, String[] args) throws Exception { } + + public void run() { } + + public Object source(String filename, NameSpace nameSpace) throws FileNotFoundException, IOException, EvalError { + return null; + } + + public Object source(String filename) throws FileNotFoundException, IOException, EvalError { + return null; + } + + public Object eval(Reader in, NameSpace nameSpace, String sourceFileInfo) throws EvalError { + return null; + } + + public Object eval(Reader in) throws EvalError { + return null; + } + + public Object eval(String statements) throws EvalError { + return null; + } + + public Object eval(String statements, NameSpace nameSpace) throws EvalError { + return null; + } + + private String showEvalString(String s) { + return null; + } + + public final void error(Object o) { } + + public Reader getIn() { + return null; + } + + public PrintStream getOut() { + return null; + } + + public PrintStream getErr() { + return null; + } + + public final void println(Object o) { } + + public final void print(Object o) { } + + public static final void debug(String s) { } + + public Object get(String name) throws EvalError { + return null; + } + + Object getu(String name) { + return null; + } + + public void set(String name, Object value) throws EvalError { } + + void setu(String name, Object value) { } + + public void set(String name, long value) throws EvalError { } + + public void set(String name, int value) throws EvalError { } + + public void set(String name, double value) throws EvalError { } + + public void set(String name, float value) throws EvalError { } + + public void set(String name, boolean value) throws EvalError { } + + public void unset(String name) throws EvalError { } + + public Object getInterface(Class interf) throws EvalError { + return null; + } +} diff --git a/java/ql/test/stubs/bsh-2.0b5/bsh/NameSpace.java b/java/ql/test/stubs/bsh-2.0b5/bsh/NameSpace.java new file mode 100644 index 000000000000..b803c48d01b7 --- /dev/null +++ b/java/ql/test/stubs/bsh-2.0b5/bsh/NameSpace.java @@ -0,0 +1,7 @@ +package bsh; + +import java.io.Serializable; + +public class NameSpace implements Serializable { + +} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/Aware.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/Aware.java new file mode 100644 index 000000000000..2a632c4b7b3f --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/Aware.java @@ -0,0 +1,4 @@ +package org.springframework.beans.factory; + +public interface Aware { +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/BeanClassLoaderAware.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/BeanClassLoaderAware.java new file mode 100644 index 000000000000..666ca3a0b42e --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/beans/factory/BeanClassLoaderAware.java @@ -0,0 +1,5 @@ +package org.springframework.beans.factory; + +public interface BeanClassLoaderAware extends Aware { + void setBeanClassLoader(ClassLoader var1); +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptEvaluator.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptEvaluator.java new file mode 100644 index 000000000000..0f6c2c381b8b --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptEvaluator.java @@ -0,0 +1,12 @@ +package org.springframework.scripting; + +import java.util.Map; +import org.springframework.lang.Nullable; + +public interface ScriptEvaluator { + @Nullable + Object evaluate(ScriptSource var1) ; + + @Nullable + Object evaluate(ScriptSource var1, @Nullable Map var2) ; +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptSource.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptSource.java new file mode 100644 index 000000000000..0c75507020e4 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/ScriptSource.java @@ -0,0 +1,13 @@ +package org.springframework.scripting; + +import java.io.IOException; +import org.springframework.lang.Nullable; + +public interface ScriptSource { + String getScriptAsString() throws IOException; + + boolean isModified(); + + @Nullable + String suggestedClassName(); +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/bsh/BshScriptEvaluator.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/bsh/BshScriptEvaluator.java new file mode 100644 index 000000000000..c1e076a6c410 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/bsh/BshScriptEvaluator.java @@ -0,0 +1,26 @@ +package org.springframework.scripting.bsh; + +import java.util.Map; +import org.springframework.beans.factory.BeanClassLoaderAware; +import org.springframework.lang.Nullable; +import org.springframework.scripting.ScriptEvaluator; +import org.springframework.scripting.ScriptSource; + +public class BshScriptEvaluator implements ScriptEvaluator, BeanClassLoaderAware { + + public BshScriptEvaluator() { } + + public BshScriptEvaluator(ClassLoader classLoader) { } + + public void setBeanClassLoader(ClassLoader classLoader) { } + + @Nullable + public Object evaluate(ScriptSource script) { + return null; + } + + @Nullable + public Object evaluate(ScriptSource script, @Nullable Map arguments) { + return null; + } +} diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/support/StaticScriptSource.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/support/StaticScriptSource.java new file mode 100644 index 000000000000..5b22cf4b1ab1 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/scripting/support/StaticScriptSource.java @@ -0,0 +1,30 @@ +package org.springframework.scripting.support; + +import org.springframework.lang.Nullable; +import org.springframework.scripting.ScriptSource; + +public class StaticScriptSource implements ScriptSource { + + public StaticScriptSource(String script) { } + + public StaticScriptSource(String script, @Nullable String className) { } + + public synchronized void setScript(String script) { } + + public synchronized String getScriptAsString() { + return null; + } + + public synchronized boolean isModified() { + return true; + } + + @Nullable + public String suggestedClassName() { + return null; + } + + public String toString() { + return null; + } +} From 9c5ba8d4f68fcf9ad6bc4b168fa3558ec18a0916 Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Fri, 18 Jun 2021 10:56:11 +0300 Subject: [PATCH 1435/1662] Adding C++20 Beta support.rst --- .../support/reusables/versions-compilers.rst | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index 74b9c196564c..ab8e26219616 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -4,31 +4,32 @@ :stub-columns: 1 Language,Variants,Compilers,Extensions - C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17","Clang (and clang-cl [1]_) extensions (up to Clang 9.0), + C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17, C++20 [1]_","Clang (and clang-cl [2]_) extensions (up to Clang 9.0), GNU extensions (up to GCC 9.2), Microsoft extensions (up to VS 2019), - Arm Compiler 5 [2]_","``.cpp``, ``.c++``, ``.cxx``, ``.hpp``, ``.hh``, ``.h++``, ``.hxx``, ``.c``, ``.cc``, ``.h``" + Arm Compiler 5 [3]_","``.cpp``, ``.c++``, ``.cxx``, ``.hpp``, ``.hh``, ``.h++``, ``.hxx``, ``.c``, ``.cc``, ``.h``" C#,C# up to 9.0,"Microsoft Visual Studio up to 2019 with .NET up to 4.8, .NET Core up to 3.1 .NET 5","``.sln``, ``.csproj``, ``.cs``, ``.cshtml``, ``.xaml``" Go (aka Golang), "Go up to 1.16", "Go 1.11 or more recent", ``.go`` - Java,"Java 7 to 16 [3]_","javac (OpenJDK and Oracle JDK), + Java,"Java 7 to 16 [4]_","javac (OpenJDK and Oracle JDK), - Eclipse compiler for Java (ECJ) [4]_",``.java`` - JavaScript,ECMAScript 2021 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhm``, ``.xhtml``, ``.vue``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [5]_" + Eclipse compiler for Java (ECJ) [5]_",``.java`` + JavaScript,ECMAScript 2021 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhm``, ``.xhtml``, ``.vue``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [6]_" Python,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9",Not applicable,``.py`` - TypeScript [6]_,"2.6-4.2",Standard TypeScript compiler,"``.ts``, ``.tsx``" + TypeScript [7]_,"2.6-4.2",Standard TypeScript compiler,"``.ts``, ``.tsx``" .. container:: footnote-group - .. [1] Support for the clang-cl compiler is preliminary. - .. [2] Support for the Arm Compiler (armcc) is preliminary. - .. [3] Builds that execute on Java 7 to 16 can be analyzed. The analysis understands Java 15 standard language features. - .. [4] ECJ is supported when the build invokes it via the Maven Compiler plugin or the Takari Lifecycle plugin. - .. [5] JSX and Flow code, YAML, JSON, HTML, and XML files may also be analyzed with JavaScript files. - .. [6] TypeScript analysis is performed by running the JavaScript extractor with TypeScript enabled. This is the default for LGTM. + .. [1] C++20 extractor supports GCC on Linux, modules are *not* supported. + .. [2] Support for the clang-cl compiler is preliminary. + .. [3] Support for the Arm Compiler (armcc) is preliminary. + .. [4] Builds that execute on Java 7 to 16 can be analyzed. The analysis understands Java 15 standard language features. + .. [5] ECJ is supported when the build invokes it via the Maven Compiler plugin or the Takari Lifecycle plugin. + .. [6] JSX and Flow code, YAML, JSON, HTML, and XML files may also be analyzed with JavaScript files. + .. [7] TypeScript analysis is performed by running the JavaScript extractor with TypeScript enabled. This is the default for LGTM. From eb86bceb4d786cc23f86b9755a1c8d56f844b301 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 18 Jun 2021 10:18:47 +0200 Subject: [PATCH 1436/1662] Address review comments --- .../semmle/code/cpp/dataflow/internal/DataFlowImpl.qll | 8 ++++++-- .../semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll | 8 ++++++-- .../semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll | 8 ++++++-- .../semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll | 8 ++++++-- .../code/cpp/dataflow/internal/DataFlowImplLocal.qll | 8 ++++++-- .../semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 8 ++++++-- .../code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 8 ++++++-- .../code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 8 ++++++-- .../code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 8 ++++++-- .../semmle/code/csharp/dataflow/internal/DataFlowImpl.qll | 8 ++++++-- .../code/csharp/dataflow/internal/DataFlowImpl2.qll | 8 ++++++-- .../code/csharp/dataflow/internal/DataFlowImpl3.qll | 8 ++++++-- .../code/csharp/dataflow/internal/DataFlowImpl4.qll | 8 ++++++-- .../code/csharp/dataflow/internal/DataFlowImpl5.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl2.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl3.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl4.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl5.qll | 8 ++++++-- .../semmle/code/java/dataflow/internal/DataFlowImpl6.qll | 8 ++++++-- .../semmle/python/dataflow/new/internal/DataFlowImpl.qll | 8 ++++++-- .../semmle/python/dataflow/new/internal/DataFlowImpl2.qll | 8 ++++++-- .../semmle/python/dataflow/new/internal/DataFlowImpl3.qll | 8 ++++++-- .../semmle/python/dataflow/new/internal/DataFlowImpl4.qll | 8 ++++++-- 24 files changed, 144 insertions(+), 48 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 3721374f320c..4f54d9671c9c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 3721374f320c..4f54d9671c9c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 3721374f320c..4f54d9671c9c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 3721374f320c..4f54d9671c9c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 3721374f320c..4f54d9671c9c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 3721374f320c..4f54d9671c9c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 3721374f320c..4f54d9671c9c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 3721374f320c..4f54d9671c9c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 3721374f320c..4f54d9671c9c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 3721374f320c..4f54d9671c9c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 3721374f320c..4f54d9671c9c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -2220,7 +2220,9 @@ private module Stage4 { bindingset[node, cc, config] private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { localFlowEntry(node, config) and - result = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(node)) + result = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(node)) } private predicate localStep( @@ -3255,7 +3257,9 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and - localCC = getLocalCallContext(pragma[only_bind_into](cc), getNodeEnclosingCallable(midnode)) and + localCC = + getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), + getNodeEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and From a73cb3f04a4f5646a8340d05ebf112bd4eb7dbc4 Mon Sep 17 00:00:00 2001 From: haby0 Date: Fri, 18 Jun 2021 17:22:26 +0800 Subject: [PATCH 1437/1662] Fix error --- .../experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp | 1 + java/ql/test/experimental/query-tests/security/CWE-094/options | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp index 7839f55ee337..f86d77595528 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/BeanShellInjection.qhelp @@ -24,6 +24,7 @@ explicitly allowed classes. The following example uses untrusted data to build and run a BeanShell expression.

    +
  • diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/options b/java/ql/test/experimental/query-tests/security/CWE-094/options index 75905d00a27a..1fc637be50f2 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/options +++ b/java/ql/test/experimental/query-tests/security/CWE-094/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13 \ No newline at end of file +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5 \ No newline at end of file From bd820458f575d9a85a02512f3bb90d0237ec5fe9 Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Fri, 18 Jun 2021 12:24:34 +0300 Subject: [PATCH 1438/1662] Update docs/codeql/support/reusables/versions-compilers.rst Co-authored-by: Jonas Jensen --- docs/codeql/support/reusables/versions-compilers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index 36e35d2040db..52f373d1d2a4 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -6,7 +6,7 @@ Language,Variants,Compilers,Extensions C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17","Clang (and clang-cl [1]_) extensions (up to Clang 12.0), - GNU extensions (up to GCC 9.4), + GNU extensions (up to GCC 11.1), Microsoft extensions (up to VS 2019), From 968a0921d4c130464707ead423d7eb9c38c7c894 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Fri, 18 Jun 2021 12:12:06 +0200 Subject: [PATCH 1439/1662] JS: Fix secure example inclusion in InsecureDownload.qhelp --- javascript/ql/src/Security/CWE-829/InsecureDownload.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ql/src/Security/CWE-829/InsecureDownload.qhelp b/javascript/ql/src/Security/CWE-829/InsecureDownload.qhelp index 2f79bde1a37e..807f6be401e9 100644 --- a/javascript/ql/src/Security/CWE-829/InsecureDownload.qhelp +++ b/javascript/ql/src/Security/CWE-829/InsecureDownload.qhelp @@ -29,7 +29,7 @@

    The issue has been fixed in the example below by replacing the HTTP protocol with the HTTPS protocol.

    - + From 288a3141081bf8988b29adf86b0989094a0aa817 Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Fri, 18 Jun 2021 13:35:11 +0300 Subject: [PATCH 1440/1662] Update versions-compilers.rst --- docs/codeql/support/reusables/versions-compilers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index ab8e26219616..4c7c49c733d0 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -26,7 +26,7 @@ .. container:: footnote-group - .. [1] C++20 extractor supports GCC on Linux, modules are *not* supported. + .. [1] C++20 beta extractor supports GCC on Linux, modules are *not* supported. .. [2] Support for the clang-cl compiler is preliminary. .. [3] Support for the Arm Compiler (armcc) is preliminary. .. [4] Builds that execute on Java 7 to 16 can be analyzed. The analysis understands Java 15 standard language features. From ac35438b5f227daf8c15a2acbe36c802c755819e Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Fri, 18 Jun 2021 15:35:37 +0300 Subject: [PATCH 1441/1662] Update versions-compilers.rst --- docs/codeql/support/reusables/versions-compilers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index 4c7c49c733d0..15381826e927 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -26,7 +26,7 @@ .. container:: footnote-group - .. [1] C++20 beta extractor supports GCC on Linux, modules are *not* supported. + .. [1] C++20 support is currently in beta. Supported for GCC on Linux only. Modules are *not* supported. .. [2] Support for the clang-cl compiler is preliminary. .. [3] Support for the Arm Compiler (armcc) is preliminary. .. [4] Builds that execute on Java 7 to 16 can be analyzed. The analysis understands Java 15 standard language features. From 17df8e44d0ffeb1d9437fb7db4599f9389683fb5 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Fri, 18 Jun 2021 14:41:23 +0200 Subject: [PATCH 1442/1662] C++: Convert 'cpp/tainted-arithmetic' to a 'path-problem' query. --- .../Security/CWE/CWE-190/ArithmeticTainted.ql | 46 +++++++---- .../semmle/tainted/ArithmeticTainted.expected | 77 ++++++++++++++++--- 2 files changed, 97 insertions(+), 26 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index ad4d0389f0c0..88ff77281c11 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -2,7 +2,7 @@ * @name User-controlled data in arithmetic expression * @description Arithmetic operations on user-controlled data that is * not validated can cause overflows. - * @kind problem + * @kind path-problem * @problem.severity warning * @security-severity 5.9 * @precision low @@ -16,22 +16,34 @@ import cpp import semmle.code.cpp.security.Overflow import semmle.code.cpp.security.Security import semmle.code.cpp.security.TaintTracking +import TaintedWithPath -from Expr origin, Operation op, Expr e, string effect +bindingset[op] +predicate missingGuard(Operation op, Expr e, string effect) { + missingGuardAgainstUnderflow(op, e) and effect = "underflow" + or + missingGuardAgainstOverflow(op, e) and effect = "overflow" + or + not e instanceof VariableAccess and effect = "overflow" +} + +class Configuration extends TaintTrackingConfiguration { + override predicate isSink(Element e) { + exists(Operation op | + missingGuard(op, e, _) and + op.getAnOperand() = e + | + op instanceof UnaryArithmeticOperation or + op instanceof BinaryArithmeticOperation + ) + } +} + +from Expr origin, Expr e, string effect, PathNode sourceNode, PathNode sinkNode, Operation op where - isUserInput(origin, _) and - tainted(origin, e) and + taintedWithPath(origin, e, sourceNode, sinkNode) and op.getAnOperand() = e and - ( - missingGuardAgainstUnderflow(op, e) and effect = "underflow" - or - missingGuardAgainstOverflow(op, e) and effect = "overflow" - or - not e instanceof VariableAccess and effect = "overflow" - ) and - ( - op instanceof UnaryArithmeticOperation or - op instanceof BinaryArithmeticOperation - ) -select e, "$@ flows to here and is used in arithmetic, potentially causing an " + effect + ".", - origin, "User-provided value" + missingGuard(op, e, effect) +select e, sourceNode, sinkNode, + "$@ flows to here and is used in arithmetic, potentially causing an " + effect + ".", origin, + "User-provided value" diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected index bdf00e0a5df5..e2fefe4a4422 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/ArithmeticTainted.expected @@ -1,9 +1,68 @@ -| test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | -| test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | -| test5.cpp:17:6:17:18 | call to getTaintedInt | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | -| test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | -| test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test5.cpp:9:7:9:9 | buf | User-provided value | -| test.c:14:15:14:28 | maxConnections | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:11:29:11:32 | argv | User-provided value | -| test.c:14:15:14:28 | maxConnections | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:11:29:11:32 | argv | User-provided value | -| test.c:44:7:44:10 | len2 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:41:17:41:20 | argv | User-provided value | -| test.c:54:7:54:10 | len3 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:51:17:51:20 | argv | User-provided value | +edges +| test2.cpp:12:21:12:21 | v | test2.cpp:14:11:14:11 | v | +| test2.cpp:12:21:12:21 | v | test2.cpp:14:11:14:11 | v | +| test2.cpp:25:22:25:23 | & ... | test2.cpp:27:2:27:11 | v | +| test2.cpp:25:22:25:23 | fscanf output argument | test2.cpp:27:2:27:11 | v | +| test2.cpp:27:2:27:11 | v | test2.cpp:12:21:12:21 | v | +| test5.cpp:9:7:9:9 | buf | test5.cpp:10:9:10:27 | Store | +| test5.cpp:9:7:9:9 | gets output argument | test5.cpp:10:9:10:27 | Store | +| test5.cpp:10:9:10:27 | Store | test5.cpp:17:6:17:18 | call to getTaintedInt | +| test5.cpp:10:9:10:27 | Store | test5.cpp:17:6:17:18 | call to getTaintedInt | +| test5.cpp:10:9:10:27 | Store | test5.cpp:18:6:18:18 | call to getTaintedInt | +| test5.cpp:18:6:18:18 | call to getTaintedInt | test5.cpp:19:6:19:6 | y | +| test5.cpp:18:6:18:18 | call to getTaintedInt | test5.cpp:19:6:19:6 | y | +| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | +| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | +| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | +| test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | +| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | +| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | +| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | +| test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | +| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | +| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | +| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | +| test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | +nodes +| test2.cpp:12:21:12:21 | v | semmle.label | v | +| test2.cpp:14:11:14:11 | v | semmle.label | v | +| test2.cpp:14:11:14:11 | v | semmle.label | v | +| test2.cpp:14:11:14:11 | v | semmle.label | v | +| test2.cpp:25:22:25:23 | & ... | semmle.label | & ... | +| test2.cpp:25:22:25:23 | fscanf output argument | semmle.label | fscanf output argument | +| test2.cpp:27:2:27:11 | v | semmle.label | v | +| test5.cpp:9:7:9:9 | buf | semmle.label | buf | +| test5.cpp:9:7:9:9 | gets output argument | semmle.label | gets output argument | +| test5.cpp:10:9:10:27 | Store | semmle.label | Store | +| test5.cpp:17:6:17:18 | call to getTaintedInt | semmle.label | call to getTaintedInt | +| test5.cpp:17:6:17:18 | call to getTaintedInt | semmle.label | call to getTaintedInt | +| test5.cpp:17:6:17:18 | call to getTaintedInt | semmle.label | call to getTaintedInt | +| test5.cpp:18:6:18:18 | call to getTaintedInt | semmle.label | call to getTaintedInt | +| test5.cpp:19:6:19:6 | y | semmle.label | y | +| test5.cpp:19:6:19:6 | y | semmle.label | y | +| test5.cpp:19:6:19:6 | y | semmle.label | y | +| test.c:11:29:11:32 | argv | semmle.label | argv | +| test.c:11:29:11:32 | argv | semmle.label | argv | +| test.c:14:15:14:28 | maxConnections | semmle.label | maxConnections | +| test.c:14:15:14:28 | maxConnections | semmle.label | maxConnections | +| test.c:14:15:14:28 | maxConnections | semmle.label | maxConnections | +| test.c:41:17:41:20 | argv | semmle.label | argv | +| test.c:41:17:41:20 | argv | semmle.label | argv | +| test.c:44:7:44:10 | len2 | semmle.label | len2 | +| test.c:44:7:44:10 | len2 | semmle.label | len2 | +| test.c:44:7:44:10 | len2 | semmle.label | len2 | +| test.c:51:17:51:20 | argv | semmle.label | argv | +| test.c:51:17:51:20 | argv | semmle.label | argv | +| test.c:54:7:54:10 | len3 | semmle.label | len3 | +| test.c:54:7:54:10 | len3 | semmle.label | len3 | +| test.c:54:7:54:10 | len3 | semmle.label | len3 | +#select +| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | & ... | test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | +| test2.cpp:14:11:14:11 | v | test2.cpp:25:22:25:23 | & ... | test2.cpp:14:11:14:11 | v | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test2.cpp:25:22:25:23 | & ... | User-provided value | +| test5.cpp:17:6:17:18 | call to getTaintedInt | test5.cpp:9:7:9:9 | buf | test5.cpp:17:6:17:18 | call to getTaintedInt | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | +| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | buf | test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test5.cpp:9:7:9:9 | buf | User-provided value | +| test5.cpp:19:6:19:6 | y | test5.cpp:9:7:9:9 | buf | test5.cpp:19:6:19:6 | y | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test5.cpp:9:7:9:9 | buf | User-provided value | +| test.c:14:15:14:28 | maxConnections | test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:11:29:11:32 | argv | User-provided value | +| test.c:14:15:14:28 | maxConnections | test.c:11:29:11:32 | argv | test.c:14:15:14:28 | maxConnections | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:11:29:11:32 | argv | User-provided value | +| test.c:44:7:44:10 | len2 | test.c:41:17:41:20 | argv | test.c:44:7:44:10 | len2 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:41:17:41:20 | argv | User-provided value | +| test.c:54:7:54:10 | len3 | test.c:51:17:51:20 | argv | test.c:54:7:54:10 | len3 | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:51:17:51:20 | argv | User-provided value | From 921b8e80a2d328c34553a082df1008e8729f7144 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 26 May 2021 08:58:29 +0800 Subject: [PATCH 1443/1662] Jshell Injection --- .../Security/CWE/CWE-094/JShellInjection.java | 26 ++++++++++++++++ .../CWE/CWE-094/JShellInjection.qhelp | 31 +++++++++++++++++++ .../Security/CWE/CWE-094/JShellInjection.ql | 29 +++++++++++++++++ .../Security/CWE/CWE-094/JShellInjection.qll | 28 +++++++++++++++++ .../security/CWE-094/JShellInjection.expected | 11 +++++++ .../security/CWE-094/JShellInjection.java | 26 ++++++++++++++++ .../security/CWE-094/JShellInjection.qlref | 1 + 7 files changed, 152 insertions(+) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql create mode 100644 java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java create mode 100644 java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java new file mode 100644 index 000000000000..8d1257697b97 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java @@ -0,0 +1,26 @@ +import javax.servlet.http.HttpServletRequest; +import jdk.jshell.JShell; +import jdk.jshell.SourceCodeAnalysis; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class JShellInjection { + + @GetMapping(value = "bad1") + public void bad1(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + // BAD: allow execution of arbitrary Java code + jShell.eval(input); + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + SourceCodeAnalysis sourceCodeAnalysis = jShell.sourceCodeAnalysis(); + // BAD: allow execution of arbitrary Java code + sourceCodeAnalysis.wrappers(input); + } +} \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp new file mode 100644 index 000000000000..cae528f5ef1a --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp @@ -0,0 +1,31 @@ + + + + +

    The Java Shell tool (JShell) is an interactive tool for learning the Java programming +language and prototyping Java code. JShell is a Read-Evaluate-Print Loop (REPL), which +evaluates declarations, statements, and expressions as they are entered and immediately +shows the results. If an expression is built using attacker-controlled data and then evaluated, +it may allow the attacker to run arbitrary code.

    +
    + + +

    It is generally recommended to avoid using untrusted input in a JShell expression. +If it is not possible,JShell expressions should be run in a sandbox that allows accessing only +explicitly allowed classes.

    +
    + + +

    The following example calls JShell.eval(...) or SourceCodeAnalysis.wrappers(...) +to execute untrusted data.

    + +
    + + +
  • +Java 9 jshell tutorial: JShell introduction +
  • +
    + diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql new file mode 100644 index 000000000000..2f776500a84a --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -0,0 +1,29 @@ +/** + * @name JShell injection + * @description Evaluation of a user-controlled JShell expression + * may lead to arbitrary code execution. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/jshell-injection + * @tags security + * external/cwe-094 + */ + +import java +import JShellInjection +import semmle.code.java.dataflow.FlowSources +import DataFlow::PathGraph + +class JShellInjectionConfiguration extends TaintTracking::Configuration { + JShellInjectionConfiguration() { this = "JShellInjectionConfiguration" } + + override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } + + override predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } +} + +from DataFlow::PathNode source, DataFlow::PathNode sink, JShellInjectionConfiguration conf +where conf.hasFlowPath(source, sink) +select sink.getNode(), source, sink, "JShell injection from $@.", source.getNode(), + "this user input" diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll new file mode 100644 index 000000000000..20c394f6bd8b --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll @@ -0,0 +1,28 @@ +import java +import semmle.code.java.dataflow.FlowSources + +/** A sink for JShell expression injection vulnerabilities. */ +class JShellInjectionSink extends DataFlow::Node { + JShellInjectionSink() { + this.asExpr() = any(JShellEvalCall jsec).getArgument(0) or + this.asExpr() = any(SourceCodeAnalysisWrappersCall scawc).getArgument(0) + } +} + +/** A call to `JShell.eval`. */ +class JShellEvalCall extends MethodAccess { + JShellEvalCall() { + this.getMethod().hasName("eval") and + this.getMethod().getDeclaringType().hasQualifiedName("jdk.jshell", "JShell") and + this.getMethod().getNumberOfParameters() = 1 + } +} + +/** A call to `SourceCodeAnalysis.wrappers`. */ +class SourceCodeAnalysisWrappersCall extends MethodAccess { + SourceCodeAnalysisWrappersCall() { + this.getMethod().hasName("wrappers") and + this.getMethod().getDeclaringType().hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and + this.getMethod().getNumberOfParameters() = 1 + } +} diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected new file mode 100644 index 000000000000..6c7f32fc94db --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected @@ -0,0 +1,11 @@ +edges +| JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | +| JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | +nodes +| JShellInjection.java:12:18:12:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JShellInjection.java:15:15:15:19 | input | semmle.label | input | +| JShellInjection.java:20:18:20:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JShellInjection.java:24:31:24:35 | input | semmle.label | input | +#select +| JShellInjection.java:15:15:15:19 | input | JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | JShell injection from $@. | JShellInjection.java:12:18:12:45 | getParameter(...) | this user input | +| JShellInjection.java:24:31:24:35 | input | JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | JShell injection from $@. | JShellInjection.java:20:18:20:45 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java new file mode 100644 index 000000000000..8d1257697b97 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java @@ -0,0 +1,26 @@ +import javax.servlet.http.HttpServletRequest; +import jdk.jshell.JShell; +import jdk.jshell.SourceCodeAnalysis; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class JShellInjection { + + @GetMapping(value = "bad1") + public void bad1(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + // BAD: allow execution of arbitrary Java code + jShell.eval(input); + } + + @GetMapping(value = "bad2") + public void bad2(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + SourceCodeAnalysis sourceCodeAnalysis = jShell.sourceCodeAnalysis(); + // BAD: allow execution of arbitrary Java code + sourceCodeAnalysis.wrappers(input); + } +} \ No newline at end of file diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref new file mode 100644 index 000000000000..d2128dd2058a --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-094/JShellInjection.ql \ No newline at end of file From ed0aabef46b4b3f44122d6499e64342f4da5030d Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 26 May 2021 17:48:10 +0800 Subject: [PATCH 1444/1662] add isAdditionalTaintStep --- .../Security/CWE/CWE-094/JShellInjection.java | 18 ++++++++++++++++-- .../Security/CWE/CWE-094/JShellInjection.ql | 13 +++++++++++++ .../Security/CWE/CWE-094/JShellInjection.qll | 18 +++++++++++++++++- .../security/CWE-094/JShellInjection.expected | 4 ++++ .../security/CWE-094/JShellInjection.java | 18 ++++++++++++++++-- 5 files changed, 66 insertions(+), 5 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java index 8d1257697b97..115030087fff 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.java @@ -11,7 +11,7 @@ public class JShellInjection { public void bad1(HttpServletRequest request) { String input = request.getParameter("code"); JShell jShell = JShell.builder().build(); - // BAD: allow execution of arbitrary Java code + // BAD: allow execution of arbitrary Java code jShell.eval(input); } @@ -20,7 +20,21 @@ public void bad2(HttpServletRequest request) { String input = request.getParameter("code"); JShell jShell = JShell.builder().build(); SourceCodeAnalysis sourceCodeAnalysis = jShell.sourceCodeAnalysis(); - // BAD: allow execution of arbitrary Java code + // BAD: allow execution of arbitrary Java code sourceCodeAnalysis.wrappers(input); } + + @GetMapping(value = "bad3") + public void bad3(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + SourceCodeAnalysis.CompletionInfo info; + SourceCodeAnalysis sca = jShell.sourceCodeAnalysis(); + for (info = sca.analyzeCompletion(input); + info.completeness().isComplete(); + info = sca.analyzeCompletion(info.remaining())) { + // BAD: allow execution of arbitrary Java code + jShell.eval(info.source()); + } + } } \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql index 2f776500a84a..8fc84ab0d978 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -21,6 +21,19 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration { override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } override predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } + + override predicate isAdditionalTaintStep(DataFlow::Node prod, DataFlow::Node succ) { + exists(MethodAccess ma | + ma.getMethod().hasName("analyzeCompletion") and + ma.getMethod().getNumberOfParameters() = 1 and + ma.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and + ma.getArgument(0) = prod.asExpr() and + ma = succ.asExpr() + ) + } } from DataFlow::PathNode source, DataFlow::PathNode sink, JShellInjectionConfiguration conf diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll index 20c394f6bd8b..410e5acffa80 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll @@ -4,8 +4,24 @@ import semmle.code.java.dataflow.FlowSources /** A sink for JShell expression injection vulnerabilities. */ class JShellInjectionSink extends DataFlow::Node { JShellInjectionSink() { - this.asExpr() = any(JShellEvalCall jsec).getArgument(0) or + this.asExpr() = any(JShellEvalCall jsec).getArgument(0) + or this.asExpr() = any(SourceCodeAnalysisWrappersCall scawc).getArgument(0) + or + exists(MethodAccess ma | + ma.getMethod().hasName("source") and + ma.getMethod().getNumberOfParameters() = 0 and + ma.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis$CompletionInfo") and + ma.getQualifier() = this.asExpr() and + ( + ma = any(JShellEvalCall jsec).getArgument(0) + or + ma = any(SourceCodeAnalysisWrappersCall scawc).getArgument(0) + ) + ) } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected index 6c7f32fc94db..a6b227de39ee 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected @@ -1,11 +1,15 @@ edges | JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | | JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | +| JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:19 | info | nodes | JShellInjection.java:12:18:12:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JShellInjection.java:15:15:15:19 | input | semmle.label | input | | JShellInjection.java:20:18:20:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JShellInjection.java:24:31:24:35 | input | semmle.label | input | +| JShellInjection.java:29:18:29:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JShellInjection.java:37:16:37:19 | info | semmle.label | info | #select | JShellInjection.java:15:15:15:19 | input | JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | JShell injection from $@. | JShellInjection.java:12:18:12:45 | getParameter(...) | this user input | | JShellInjection.java:24:31:24:35 | input | JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | JShell injection from $@. | JShellInjection.java:20:18:20:45 | getParameter(...) | this user input | +| JShellInjection.java:37:16:37:19 | info | JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:19 | info | JShell injection from $@. | JShellInjection.java:29:18:29:45 | getParameter(...) | this user input | diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java index 8d1257697b97..115030087fff 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.java @@ -11,7 +11,7 @@ public class JShellInjection { public void bad1(HttpServletRequest request) { String input = request.getParameter("code"); JShell jShell = JShell.builder().build(); - // BAD: allow execution of arbitrary Java code + // BAD: allow execution of arbitrary Java code jShell.eval(input); } @@ -20,7 +20,21 @@ public void bad2(HttpServletRequest request) { String input = request.getParameter("code"); JShell jShell = JShell.builder().build(); SourceCodeAnalysis sourceCodeAnalysis = jShell.sourceCodeAnalysis(); - // BAD: allow execution of arbitrary Java code + // BAD: allow execution of arbitrary Java code sourceCodeAnalysis.wrappers(input); } + + @GetMapping(value = "bad3") + public void bad3(HttpServletRequest request) { + String input = request.getParameter("code"); + JShell jShell = JShell.builder().build(); + SourceCodeAnalysis.CompletionInfo info; + SourceCodeAnalysis sca = jShell.sourceCodeAnalysis(); + for (info = sca.analyzeCompletion(input); + info.completeness().isComplete(); + info = sca.analyzeCompletion(info.remaining())) { + // BAD: allow execution of arbitrary Java code + jShell.eval(info.source()); + } + } } \ No newline at end of file From 3a2a99e28957d76a4f1969fce50afec3452b6d29 Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 2 Jun 2021 09:18:22 +0800 Subject: [PATCH 1445/1662] Fix 1 --- .../experimental/Security/CWE/CWE-094/JShellInjection.qhelp | 4 ++-- .../src/experimental/Security/CWE/CWE-094/JShellInjection.ql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp index cae528f5ef1a..44a95f9d399c 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp @@ -13,7 +13,7 @@ it may allow the attacker to run arbitrary code.

    It is generally recommended to avoid using untrusted input in a JShell expression. -If it is not possible,JShell expressions should be run in a sandbox that allows accessing only +If it is not possible, JShell expressions should be run in a sandbox that allows accessing only explicitly allowed classes.

    @@ -25,7 +25,7 @@ to execute untrusted data.

  • -Java 9 jshell tutorial: JShell introduction +Introduction to JShell: Java Shell User’s Guide
  • diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql index 8fc84ab0d978..2754d58be54f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -22,7 +22,7 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } - override predicate isAdditionalTaintStep(DataFlow::Node prod, DataFlow::Node succ) { + override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { exists(MethodAccess ma | ma.getMethod().hasName("analyzeCompletion") and ma.getMethod().getNumberOfParameters() = 1 and @@ -30,7 +30,7 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration { .getDeclaringType() .getASupertype*() .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and - ma.getArgument(0) = prod.asExpr() and + ma.getArgument(0) = pred.asExpr() and ma = succ.asExpr() ) } From bfe0d40987954c704f07aa7ff4c4789e538cdd2b Mon Sep 17 00:00:00 2001 From: haby0 Date: Wed, 16 Jun 2021 13:50:53 +0800 Subject: [PATCH 1446/1662] using isAdditionalTaintStep --- .../Security/CWE/CWE-094/JShellInjection.ql | 16 +++---- .../Security/CWE/CWE-094/JShellInjection.qll | 43 +++++++++++-------- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql index 2754d58be54f..9b50d500c58b 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -12,6 +12,7 @@ import java import JShellInjection +import semmle.code.java.dataflow.DataFlow2 import semmle.code.java.dataflow.FlowSources import DataFlow::PathGraph @@ -23,15 +24,12 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - exists(MethodAccess ma | - ma.getMethod().hasName("analyzeCompletion") and - ma.getMethod().getNumberOfParameters() = 1 and - ma.getMethod() - .getDeclaringType() - .getASupertype*() - .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and - ma.getArgument(0) = pred.asExpr() and - ma = succ.asExpr() + exists( + SourceCodeAnalysisAnalyzeCompletionCall scaacc, CompletionInfoSourceOrRemainingCall cisorc + | + scaacc.getArgument(0) = pred.asExpr() and + cisorc = succ.asExpr() and + DataFlow2::localExprFlow(scaacc, cisorc.getQualifier()) ) } } diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll index 410e5acffa80..894cd03ce678 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qll @@ -7,26 +7,11 @@ class JShellInjectionSink extends DataFlow::Node { this.asExpr() = any(JShellEvalCall jsec).getArgument(0) or this.asExpr() = any(SourceCodeAnalysisWrappersCall scawc).getArgument(0) - or - exists(MethodAccess ma | - ma.getMethod().hasName("source") and - ma.getMethod().getNumberOfParameters() = 0 and - ma.getMethod() - .getDeclaringType() - .getASupertype*() - .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis$CompletionInfo") and - ma.getQualifier() = this.asExpr() and - ( - ma = any(JShellEvalCall jsec).getArgument(0) - or - ma = any(SourceCodeAnalysisWrappersCall scawc).getArgument(0) - ) - ) } } /** A call to `JShell.eval`. */ -class JShellEvalCall extends MethodAccess { +private class JShellEvalCall extends MethodAccess { JShellEvalCall() { this.getMethod().hasName("eval") and this.getMethod().getDeclaringType().hasQualifiedName("jdk.jshell", "JShell") and @@ -35,10 +20,34 @@ class JShellEvalCall extends MethodAccess { } /** A call to `SourceCodeAnalysis.wrappers`. */ -class SourceCodeAnalysisWrappersCall extends MethodAccess { +private class SourceCodeAnalysisWrappersCall extends MethodAccess { SourceCodeAnalysisWrappersCall() { this.getMethod().hasName("wrappers") and this.getMethod().getDeclaringType().hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and this.getMethod().getNumberOfParameters() = 1 } } + +/** A call to `SourceCodeAnalysis.analyzeCompletion`. */ +class SourceCodeAnalysisAnalyzeCompletionCall extends MethodAccess { + SourceCodeAnalysisAnalyzeCompletionCall() { + this.getMethod().hasName("analyzeCompletion") and + this.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis") and + this.getMethod().getNumberOfParameters() = 1 + } +} + +/** A call to `CompletionInfo.source` or `CompletionInfo.remaining`. */ +class CompletionInfoSourceOrRemainingCall extends MethodAccess { + CompletionInfoSourceOrRemainingCall() { + this.getMethod().getName() in ["source", "remaining"] and + this.getMethod() + .getDeclaringType() + .getASupertype*() + .hasQualifiedName("jdk.jshell", "SourceCodeAnalysis$CompletionInfo") and + this.getMethod().getNumberOfParameters() = 0 + } +} From a71757f0f4fbf43c3d0c36d54ebe13cd54e54e1d Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 3 Jun 2021 16:04:29 +0800 Subject: [PATCH 1447/1662] Update java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp Co-authored-by: Marcono1234 --- .../src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp index 44a95f9d399c..05457c8fd826 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.qhelp @@ -25,7 +25,7 @@ to execute untrusted data.

  • -Introduction to JShell: Java Shell User’s Guide +Java Shell User’s Guide: Introduction to JShell
  • From 2b77f7d1bc73d7616d507c9348a47a017f667959 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 17 Jun 2021 09:12:06 +0800 Subject: [PATCH 1448/1662] Modify isAdditionalTaintStep --- .../Security/CWE/CWE-094/JShellInjection.ql | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql index 9b50d500c58b..62dbdcba670a 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-094/JShellInjection.ql @@ -12,7 +12,6 @@ import java import JShellInjection -import semmle.code.java.dataflow.DataFlow2 import semmle.code.java.dataflow.FlowSources import DataFlow::PathGraph @@ -24,12 +23,12 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node sink) { sink instanceof JShellInjectionSink } override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) { - exists( - SourceCodeAnalysisAnalyzeCompletionCall scaacc, CompletionInfoSourceOrRemainingCall cisorc - | - scaacc.getArgument(0) = pred.asExpr() and - cisorc = succ.asExpr() and - DataFlow2::localExprFlow(scaacc, cisorc.getQualifier()) + exists(SourceCodeAnalysisAnalyzeCompletionCall scaacc | + scaacc.getArgument(0) = pred.asExpr() and scaacc = succ.asExpr() + ) + or + exists(CompletionInfoSourceOrRemainingCall cisorc | + cisorc.getQualifier() = pred.asExpr() and cisorc = succ.asExpr() ) } } From dca737190b8914846a533d35e7c3d0d4387eb650 Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 17 Jun 2021 17:20:07 +0800 Subject: [PATCH 1449/1662] Modify JShellInjection.expected --- .../query-tests/security/CWE-094/JShellInjection.expected | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected index a6b227de39ee..43f86caaf6d5 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-094/JShellInjection.expected @@ -1,15 +1,15 @@ edges | JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | | JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | -| JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:19 | info | +| JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:28 | source(...) | nodes | JShellInjection.java:12:18:12:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JShellInjection.java:15:15:15:19 | input | semmle.label | input | | JShellInjection.java:20:18:20:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | | JShellInjection.java:24:31:24:35 | input | semmle.label | input | | JShellInjection.java:29:18:29:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | -| JShellInjection.java:37:16:37:19 | info | semmle.label | info | +| JShellInjection.java:37:16:37:28 | source(...) | semmle.label | source(...) | #select | JShellInjection.java:15:15:15:19 | input | JShellInjection.java:12:18:12:45 | getParameter(...) : String | JShellInjection.java:15:15:15:19 | input | JShell injection from $@. | JShellInjection.java:12:18:12:45 | getParameter(...) | this user input | | JShellInjection.java:24:31:24:35 | input | JShellInjection.java:20:18:20:45 | getParameter(...) : String | JShellInjection.java:24:31:24:35 | input | JShell injection from $@. | JShellInjection.java:20:18:20:45 | getParameter(...) | this user input | -| JShellInjection.java:37:16:37:19 | info | JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:19 | info | JShell injection from $@. | JShellInjection.java:29:18:29:45 | getParameter(...) | this user input | +| JShellInjection.java:37:16:37:28 | source(...) | JShellInjection.java:29:18:29:45 | getParameter(...) : String | JShellInjection.java:37:16:37:28 | source(...) | JShell injection from $@. | JShellInjection.java:29:18:29:45 | getParameter(...) | this user input | From 1750efad2a88de88b32789a8a4430e8c352b59f1 Mon Sep 17 00:00:00 2001 From: haby0 Date: Fri, 18 Jun 2021 21:46:48 +0800 Subject: [PATCH 1450/1662] fix --- .../query-tests/security/CWE-094/options | 2 +- .../test/stubs/jshell/jdk/jshell/JShell.java | 37 ++++++ .../test/stubs/jshell/jdk/jshell/Snippet.java | 31 +++++ .../stubs/jshell/jdk/jshell/SnippetEvent.java | 5 + .../jshell/jdk/jshell/SourceCodeAnalysis.java | 111 ++++++++++++++++++ 5 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 java/ql/test/stubs/jshell/jdk/jshell/JShell.java create mode 100644 java/ql/test/stubs/jshell/jdk/jshell/Snippet.java create mode 100644 java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java create mode 100644 java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/options b/java/ql/test/experimental/query-tests/security/CWE-094/options index 1fc637be50f2..22891626ba4c 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/options +++ b/java/ql/test/experimental/query-tests/security/CWE-094/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5 \ No newline at end of file +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5:${testdir}/../../../../stubs/jshell \ No newline at end of file diff --git a/java/ql/test/stubs/jshell/jdk/jshell/JShell.java b/java/ql/test/stubs/jshell/jdk/jshell/JShell.java new file mode 100644 index 000000000000..fe49d13cd6e1 --- /dev/null +++ b/java/ql/test/stubs/jshell/jdk/jshell/JShell.java @@ -0,0 +1,37 @@ +package jdk.jshell; + +import java.util.List; +import java.lang.IllegalStateException; + +public class JShell implements AutoCloseable { + + JShell(Builder b) throws IllegalStateException { } + + public static class Builder { + + Builder() { } + + public JShell build() throws IllegalStateException { + return null; + } + } + + public static JShell create() throws IllegalStateException { + return null; + } + + public static Builder builder() { + return null; + } + + public SourceCodeAnalysis sourceCodeAnalysis() { + return null; + } + + public List eval(String input) throws IllegalStateException { + return null; + } + + @Override + public void close() { } +} diff --git a/java/ql/test/stubs/jshell/jdk/jshell/Snippet.java b/java/ql/test/stubs/jshell/jdk/jshell/Snippet.java new file mode 100644 index 000000000000..38da9b6cc35e --- /dev/null +++ b/java/ql/test/stubs/jshell/jdk/jshell/Snippet.java @@ -0,0 +1,31 @@ +package jdk.jshell; + +public abstract class Snippet { + + public enum Kind { + + IMPORT(true), + + TYPE_DECL(true), + + METHOD(true), + + VAR(true), + + EXPRESSION(false), + + STATEMENT(false), + + ERRONEOUS(false); + + private final boolean isPersistent; + + Kind(boolean isPersistent) { + this.isPersistent = isPersistent; + } + + public boolean isPersistent() { + return false; + } + } +} diff --git a/java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java b/java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java new file mode 100644 index 000000000000..9425a278a6c9 --- /dev/null +++ b/java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java @@ -0,0 +1,5 @@ +package jdk.jshell; + +public class SnippetEvent { + +} diff --git a/java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java b/java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java new file mode 100644 index 000000000000..7f629a46cbdb --- /dev/null +++ b/java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java @@ -0,0 +1,111 @@ +package jdk.jshell; + +import java.util.Collection; +import java.util.List; + +public abstract class SourceCodeAnalysis { + + public abstract CompletionInfo analyzeCompletion(String input); + + public abstract List completionSuggestions(String input, int cursor, int[] anchor); + + public abstract List documentation(String input, int cursor, boolean computeJavadoc); + + public abstract String analyzeType(String code, int cursor); + + public abstract QualifiedNames listQualifiedNames(String code, int cursor); + + public abstract SnippetWrapper wrapper(Snippet snippet); + + public abstract List wrappers(String input); + + public abstract Collection dependents(Snippet snippet); + + SourceCodeAnalysis() {} + + public interface CompletionInfo { + + Completeness completeness(); + + String remaining(); + + String source(); + } + + public enum Completeness { + + COMPLETE(true), + + COMPLETE_WITH_SEMI(true), + + DEFINITELY_INCOMPLETE(false), + + CONSIDERED_INCOMPLETE(false), + + EMPTY(false), + + UNKNOWN(true); + + private final boolean isComplete; + + Completeness(boolean isComplete) { + this.isComplete = isComplete; + } + + public boolean isComplete() { + return isComplete; + } + } + + public interface Suggestion { + + String continuation(); + + boolean matchesType(); + } + + public interface Documentation { + + String signature(); + + String javadoc(); + } + + public static final class QualifiedNames { + + + QualifiedNames(List names, int simpleNameLength, boolean upToDate, boolean resolvable) { } + + public List getNames() { + return null; + } + + public int getSimpleNameLength() { + return 1; + } + + public boolean isUpToDate() { + return false; + } + + public boolean isResolvable() { + return false; + } + + } + + public interface SnippetWrapper { + + String source(); + + String wrapped(); + + String fullClassName(); + + Snippet.Kind kind(); + + int sourceToWrappedPosition(int pos); + + int wrappedToSourcePosition(int pos); + } +} From b3f44f457ad0ab011b37205d01a4a39a0578f320 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 16:33:50 +0200 Subject: [PATCH 1451/1662] Fix diff in the framework coverage PR comment --- .github/workflows/csv-coverage-pr-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index 3fdb8963d051..03655c0ff426 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -56,7 +56,7 @@ jobs: run: | PR=$(cat "pr/NR") python misc/scripts/library-coverage/compare-files-comment-pr.py \ - out_merge out_base comparison.md "$GITHUB_REPOSITORY" "$PR" "$RUN_ID" + out_base out_merge comparison.md "$GITHUB_REPOSITORY" "$PR" "$RUN_ID" - name: Upload comparison results uses: actions/upload-artifact@v2 with: From c78ba476cfab03f87b4aeb719914c7ba2fb0b9a8 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 17 Jun 2021 17:37:01 +0000 Subject: [PATCH 1452/1662] Python: Clean up a few verbose casts --- python/ql/src/semmle/python/Concepts.qll | 6 ++---- python/ql/src/semmle/python/frameworks/Django.qll | 2 +- python/ql/src/semmle/python/frameworks/Stdlib.qll | 2 +- python/ql/src/semmle/python/frameworks/Tornado.qll | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/python/ql/src/semmle/python/Concepts.qll b/python/ql/src/semmle/python/Concepts.qll index a1edb67dc52d..62ee8caab5bd 100644 --- a/python/ql/src/semmle/python/Concepts.qll +++ b/python/ql/src/semmle/python/Concepts.qll @@ -345,7 +345,7 @@ module HTTP { /** Gets the URL pattern for this route, if it can be statically determined. */ string getUrlPattern() { exists(StrConst str | - DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getUrlPatternArg()) and + this.getUrlPatternArg().getALocalSource() = DataFlow::exprNode(str) and result = str.getText() ) } @@ -478,9 +478,7 @@ module HTTP { /** Gets the mimetype of this HTTP response, if it can be statically determined. */ string getMimetype() { exists(StrConst str | - DataFlow::exprNode(str) - .(DataFlow::LocalSourceNode) - .flowsTo(this.getMimetypeOrContentTypeArg()) and + this.getMimetypeOrContentTypeArg().getALocalSource() = DataFlow::exprNode(str) and result = str.getText().splitAt(";", 0) ) or diff --git a/python/ql/src/semmle/python/frameworks/Django.qll b/python/ql/src/semmle/python/frameworks/Django.qll index 33d2bebddfe7..04a28247f7b4 100644 --- a/python/ql/src/semmle/python/frameworks/Django.qll +++ b/python/ql/src/semmle/python/frameworks/Django.qll @@ -1708,7 +1708,7 @@ private module PrivateDjango { DjangoRouteRegex() { this instanceof StrConst and - DataFlow::exprNode(this).(DataFlow::LocalSourceNode).flowsTo(rePathCall.getUrlPatternArg()) + rePathCall.getUrlPatternArg().getALocalSource() = DataFlow::exprNode(this) } DjangoRegexRouteSetup getRouteSetup() { result = rePathCall } diff --git a/python/ql/src/semmle/python/frameworks/Stdlib.qll b/python/ql/src/semmle/python/frameworks/Stdlib.qll index 2df78ad24e90..757889f16dd0 100644 --- a/python/ql/src/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/semmle/python/frameworks/Stdlib.qll @@ -1097,7 +1097,7 @@ private DataFlow::CallCfgNode hashlibNewCall(string algorithmName) { result = API::moduleImport("hashlib").getMember("new").getACall() and nameArg in [result.getArg(0), result.getArgByName("name")] and exists(StrConst str | - DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(nameArg) and + nameArg.getALocalSource() = DataFlow::exprNode(str) and algorithmName = str.getText() ) ) diff --git a/python/ql/src/semmle/python/frameworks/Tornado.qll b/python/ql/src/semmle/python/frameworks/Tornado.qll index f82e093cb94f..ecd488f059e7 100644 --- a/python/ql/src/semmle/python/frameworks/Tornado.qll +++ b/python/ql/src/semmle/python/frameworks/Tornado.qll @@ -349,7 +349,7 @@ private module Tornado { TornadoRouteRegex() { this instanceof StrConst and - DataFlow::exprNode(this).(DataFlow::LocalSourceNode).flowsTo(setup.getUrlPatternArg()) + setup.getUrlPatternArg().getALocalSource() = DataFlow::exprNode(this) } TornadoRouteSetup getRouteSetup() { result = setup } From f24a9a46d9a18f408c2546bd493e6787244e91cb Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 17 Jun 2021 17:40:37 +0000 Subject: [PATCH 1453/1662] Python: add `getAnAttributeWrite` --- .../python/dataflow/new/internal/LocalSources.qll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll b/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll index c3df5b4841ce..883445144952 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/LocalSources.qll @@ -59,6 +59,11 @@ class LocalSourceNode extends Node { */ AttrRead getAnAttributeRead(string attrName) { result = getAnAttributeReference(attrName) } + /** + * Gets a write of attribute `attrName` on this node. + */ + AttrWrite getAnAttributeWrite(string attrName) { result = getAnAttributeReference(attrName) } + /** * Gets a reference (read or write) of any attribute on this node. */ @@ -73,6 +78,11 @@ class LocalSourceNode extends Node { */ AttrRead getAnAttributeRead() { result = getAnAttributeReference() } + /** + * Gets a write of any attribute on this node. + */ + AttrWrite getAnAttributeWrite() { result = getAnAttributeReference() } + /** * Gets a call to this node. */ From c386f4a009a30699668e637d9fab75ce05985455 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 17 Jun 2021 19:28:12 +0000 Subject: [PATCH 1454/1662] Python: Clean up `py/insecure-protocol` Going all the way to the AST layer seemed excessive to me, so I rewrote it to do most of the logic at the data-flow layer. In principle this _could_ result in more names being computed (due to splitting), but in practice I don't expect this make a big difference. --- .../src/Security/CWE-327/InsecureProtocol.ql | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index bb9c2f71ca24..20c361edbca3 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -27,37 +27,34 @@ class ProtocolConfiguration extends DataFlow::Node { unsafe_context_creation(this, _) } - AstNode getNode() { result = this.asCfgNode().(CallNode).getFunction().getNode() } + DataFlow::Node getNode() { result = this.(DataFlow::CallCfgNode).getFunction() } } // Helper for pretty printer `callName`. // This is a consequence of missing pretty priting. // We do not want to evaluate our bespoke pretty printer -// for all `AstNode`s so we define a sub class of interesting ones. -// -// Note that AstNode is abstract and AstNode_ is a library class, so -// we have to extend @py_ast_node. -class Nameable extends @py_ast_node { +// for all `DataFlow::Node`s so we define a sub class of interesting ones. +class Nameable extends DataFlow::Node { Nameable() { this = any(ProtocolConfiguration pc).getNode() or - exists(Nameable attr | this = attr.(Attribute).getObject()) + this = any(Nameable attr).(DataFlow::AttrRef).getObject() } - - string toString() { result = "AstNode" } } string callName(Nameable call) { - result = call.(Name).getId() + result = call.asExpr().(Name).getId() or - exists(Attribute a | a = call | result = callName(a.getObject()) + "." + a.getName()) + exists(DataFlow::AttrRef a | a = call | + result = callName(a.getObject()) + "." + a.getAttributeName() + ) } string configName(ProtocolConfiguration protocolConfiguration) { result = - "call to " + callName(protocolConfiguration.asCfgNode().(CallNode).getFunction().getNode()) + "call to " + callName(protocolConfiguration.(DataFlow::CallCfgNode).getFunction()) or - not protocolConfiguration.asCfgNode() instanceof CallNode and + not protocolConfiguration instanceof DataFlow::CallCfgNode and not protocolConfiguration instanceof ContextCreation and result = "context modification" } From 9351688da86deedc843535252b9ca7de71f6da92 Mon Sep 17 00:00:00 2001 From: Taus Date: Thu, 17 Jun 2021 19:48:26 +0000 Subject: [PATCH 1455/1662] Python: `asCfgNode` cleanup --- python/ql/src/Security/CWE-327/PyOpenSSL.qll | 16 ++--- python/ql/src/Security/CWE-327/Ssl.qll | 9 ++- .../python/frameworks/ClickHouseDriver.qll | 2 +- .../dataflow/new/SensitiveDataSources.qll | 2 +- .../src/semmle/python/frameworks/Django.qll | 69 +++++++++---------- .../src/semmle/python/frameworks/Fabric.qll | 6 +- .../src/semmle/python/frameworks/Invoke.qll | 2 +- .../src/semmle/python/frameworks/PEP249.qll | 2 +- .../src/semmle/python/frameworks/Stdlib.qll | 62 +++++++---------- .../src/semmle/python/frameworks/Tornado.qll | 6 +- .../src/semmle/python/frameworks/Werkzeug.qll | 2 +- 11 files changed, 79 insertions(+), 99 deletions(-) diff --git a/python/ql/src/Security/CWE-327/PyOpenSSL.qll b/python/ql/src/Security/CWE-327/PyOpenSSL.qll index 77dde78a75ad..a0008cdc7c19 100644 --- a/python/ql/src/Security/CWE-327/PyOpenSSL.qll +++ b/python/ql/src/Security/CWE-327/PyOpenSSL.qll @@ -13,12 +13,12 @@ class PyOpenSSLContextCreation extends ContextCreation, DataFlow::CallCfgNode { } override string getProtocol() { - exists(ControlFlowNode protocolArg, PyOpenSSL pyo | - protocolArg in [node.getArg(0), node.getArgByName("method")] + exists(DataFlow::Node protocolArg, PyOpenSSL pyo | + protocolArg in [this.getArg(0), this.getArgByName("method")] | - protocolArg = - [pyo.specific_version(result).getAUse(), pyo.unspecific_version(result).getAUse()] - .asCfgNode() + protocolArg in [ + pyo.specific_version(result).getAUse(), pyo.unspecific_version(result).getAUse() + ] ) } } @@ -29,7 +29,7 @@ class ConnectionCall extends ConnectionCreation, DataFlow::CallCfgNode { } override DataFlow::CfgNode getContext() { - result.getNode() in [node.getArg(0), node.getArgByName("context")] + result in [this.getArg(0), this.getArgByName("context")] } } @@ -43,8 +43,8 @@ class SetOptionsCall extends ProtocolRestriction, DataFlow::CallCfgNode { } override ProtocolVersion getRestriction() { - API::moduleImport("OpenSSL").getMember("SSL").getMember("OP_NO_" + result).getAUse().asCfgNode() in [ - node.getArg(0), node.getArgByName("options") + API::moduleImport("OpenSSL").getMember("SSL").getMember("OP_NO_" + result).getAUse() in [ + this.getArg(0), this.getArgByName("options") ] } } diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 73041e3393f7..8730cbfea0ed 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -11,15 +11,14 @@ class SSLContextCreation extends ContextCreation, DataFlow::CallCfgNode { SSLContextCreation() { this = API::moduleImport("ssl").getMember("SSLContext").getACall() } override string getProtocol() { - exists(ControlFlowNode protocolArg, Ssl ssl | - protocolArg in [node.getArg(0), node.getArgByName("protocol")] + exists(DataFlow::Node protocolArg, Ssl ssl | + protocolArg in [this.getArg(0), this.getArgByName("protocol")] | protocolArg = [ssl.specific_version(result).getAUse(), ssl.unspecific_version(result).getAUse()] - .asCfgNode() ) or - not exists(node.getAnArg()) and + not exists(this.getArg(_)) and result = "TLS" } } @@ -133,7 +132,7 @@ class ContextSetVersion extends ProtocolRestriction, ProtocolUnrestriction, Data ContextSetVersion() { exists(DataFlow::AttrWrite aw | - aw.getObject().asCfgNode() = node and + this = aw.getObject() and aw.getAttributeName() = "minimum_version" and aw.getValue() = API::moduleImport("ssl").getMember("TLSVersion").getMember(restriction).getAUse() diff --git a/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll b/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll index c456b6bdb894..1f3509aee37b 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll @@ -80,6 +80,6 @@ module ClickHouseDriver { private class ExecuteCall extends SqlExecution::Range, DataFlow::CallCfgNode { ExecuteCall() { this.getFunction() = clickhouse_execute() } - override DataFlow::Node getSql() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getSql() { result = this.getArg(0) } } } diff --git a/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll b/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll index de2ccbd5b84a..3e14f60af544 100644 --- a/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll +++ b/python/ql/src/semmle/python/dataflow/new/SensitiveDataSources.qll @@ -243,7 +243,7 @@ private module SensitiveDataModeling { SensitiveDataClassification classification; SensitiveGetCall() { - this.getFunction().asCfgNode().(AttrNode).getName() = "get" and + this.getFunction().(DataFlow::AttrRef).getAttributeName() = "get" and this.getArg(0) = sensitiveLookupStringConst(classification) } diff --git a/python/ql/src/semmle/python/frameworks/Django.qll b/python/ql/src/semmle/python/frameworks/Django.qll index 04a28247f7b4..d9f59b05fa6c 100644 --- a/python/ql/src/semmle/python/frameworks/Django.qll +++ b/python/ql/src/semmle/python/frameworks/Django.qll @@ -401,11 +401,11 @@ private module PrivateDjango { * Gets an instance of the `django.db.models.expressions.RawSQL` class, * that was initiated with the SQL represented by `sql`. */ - private DataFlow::LocalSourceNode instance(DataFlow::TypeTracker t, ControlFlowNode sql) { + private DataFlow::LocalSourceNode instance(DataFlow::TypeTracker t, DataFlow::Node sql) { t.start() and exists(DataFlow::CallCfgNode c | result = c | c = classRef().getACall() and - c.getArg(0).asCfgNode() = sql + c.getArg(0) = sql ) or exists(DataFlow::TypeTracker t2 | result = instance(t2, sql).track(t2, t)) @@ -415,7 +415,7 @@ private module PrivateDjango { * Gets an instance of the `django.db.models.expressions.RawSQL` class, * that was initiated with the SQL represented by `sql`. */ - DataFlow::Node instance(ControlFlowNode sql) { + DataFlow::Node instance(DataFlow::Node sql) { instance(DataFlow::TypeTracker::end(), sql).flowsTo(result) } } @@ -431,7 +431,7 @@ private module PrivateDjango { * See https://docs.djangoproject.com/en/3.1/ref/models/querysets/#annotate */ private class ObjectsAnnotate extends SqlExecution::Range, DataFlow::CallCfgNode { - ControlFlowNode sql; + DataFlow::Node sql; ObjectsAnnotate() { this = django::db::models::querySetReturningMethod("annotate").getACall() and @@ -440,7 +440,7 @@ private module PrivateDjango { ] } - override DataFlow::Node getSql() { result.asCfgNode() = sql } + override DataFlow::Node getSql() { result = sql } } /** @@ -449,7 +449,7 @@ private module PrivateDjango { * See https://docs.djangoproject.com/en/3.2/ref/models/querysets/#alias */ private class ObjectsAlias extends SqlExecution::Range, DataFlow::CallCfgNode { - ControlFlowNode sql; + DataFlow::Node sql; ObjectsAlias() { this = django::db::models::querySetReturningMethod("alias").getACall() and @@ -458,7 +458,7 @@ private module PrivateDjango { ] } - override DataFlow::Node getSql() { result.asCfgNode() = sql } + override DataFlow::Node getSql() { result = sql } } /** @@ -631,12 +631,12 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? override DataFlow::Node getMimetypeOrContentTypeArg() { - result.asCfgNode() in [node.getArg(1), node.getArgByName("content_type")] + result in [this.getArg(1), this.getArgByName("content_type")] } override string getMimetypeDefault() { result = "text/html" } @@ -695,11 +695,11 @@ private module PrivateDjango { // note that even though browsers like Chrome usually doesn't fetch the // content of a redirect, it is possible to observe the body (for example, // with cURL). - result.asCfgNode() in [node.getArg(1), node.getArgByName("content")] + result in [this.getArg(1), this.getArgByName("content")] } override DataFlow::Node getRedirectLocation() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("redirect_to")] + result in [this.getArg(0), this.getArgByName("redirect_to")] } // How to support the `headers` argument here? @@ -757,11 +757,11 @@ private module PrivateDjango { // note that even though browsers like Chrome usually doesn't fetch the // content of a redirect, it is possible to observe the body (for example, // with cURL). - result.asCfgNode() in [node.getArg(1), node.getArgByName("content")] + result in [this.getArg(1), this.getArgByName("content")] } override DataFlow::Node getRedirectLocation() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("redirect_to")] + result in [this.getArg(0), this.getArgByName("redirect_to")] } // How to support the `headers` argument here? @@ -868,7 +868,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -922,7 +922,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -976,7 +976,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -1031,7 +1031,7 @@ private module PrivateDjango { override DataFlow::Node getBody() { // First argument is permitted methods - result.asCfgNode() in [node.getArg(1), node.getArgByName("content")] + result in [this.getArg(1), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -1085,7 +1085,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -1139,7 +1139,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } // How to support the `headers` argument here? @@ -1193,7 +1193,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("data")] + result in [this.getArg(0), this.getArgByName("data")] } // How to support the `headers` argument here? @@ -1250,7 +1250,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("streaming_content")] + result in [this.getArg(0), this.getArgByName("streaming_content")] } // How to support the `headers` argument here? @@ -1304,7 +1304,7 @@ private module PrivateDjango { ClassInstantiation() { this = classRef().getACall() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("streaming_content")] + result in [this.getArg(0), this.getArgByName("streaming_content")] } // How to support the `headers` argument here? @@ -1349,14 +1349,13 @@ private module PrivateDjango { * * See https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpResponse.write */ - class HttpResponseWriteCall extends HTTP::Server::HttpResponse::Range, DataFlow::CfgNode { - override CallNode node; + class HttpResponseWriteCall extends HTTP::Server::HttpResponse::Range, DataFlow::CallCfgNode { HTTP::Server::HttpResponse::Range instance; HttpResponseWriteCall() { node.getFunction() = write(instance).asCfgNode() } override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("content")] + result in [this.getArg(0), this.getArgByName("content")] } override DataFlow::Node getMimetypeOrContentTypeArg() { @@ -1639,12 +1638,10 @@ private module PrivateDjango { DjangoUrlsPathCall() { this = django::urls::path().getACall() } override DataFlow::Node getUrlPatternArg() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("route")] + result in [this.getArg(0), this.getArgByName("route")] } - override DataFlow::Node getViewArg() { - result.asCfgNode() in [node.getArg(1), node.getArgByName("view")] - } + override DataFlow::Node getViewArg() { result in [this.getArg(1), this.getArgByName("view")] } override Parameter getARoutedParameter() { // If we don't know the URL pattern, we simply mark all parameters as a routed @@ -1739,12 +1736,10 @@ private module PrivateDjango { } override DataFlow::Node getUrlPatternArg() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("route")] + result in [this.getArg(0), this.getArgByName("route")] } - override DataFlow::Node getViewArg() { - result.asCfgNode() in [node.getArg(1), node.getArgByName("view")] - } + override DataFlow::Node getViewArg() { result in [this.getArg(1), this.getArgByName("view")] } } /** @@ -1756,12 +1751,10 @@ private module PrivateDjango { DjangoConfUrlsUrlCall() { this = django::conf::conf_urls::url().getACall() } override DataFlow::Node getUrlPatternArg() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("regex")] + result in [this.getArg(0), this.getArgByName("regex")] } - override DataFlow::Node getViewArg() { - result.asCfgNode() in [node.getArg(1), node.getArgByName("view")] - } + override DataFlow::Node getViewArg() { result in [this.getArg(1), this.getArgByName("view")] } } // --------------------------------------------------------------------------- @@ -1872,7 +1865,7 @@ private module PrivateDjango { * a string identifying a view, or a Django model. */ override DataFlow::Node getRedirectLocation() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("to")] + result in [this.getArg(0), this.getArgByName("to")] } override DataFlow::Node getBody() { none() } diff --git a/python/ql/src/semmle/python/frameworks/Fabric.qll b/python/ql/src/semmle/python/frameworks/Fabric.qll index 2319b9e1d709..79cb9a5e295b 100644 --- a/python/ql/src/semmle/python/frameworks/Fabric.qll +++ b/python/ql/src/semmle/python/frameworks/Fabric.qll @@ -48,7 +48,7 @@ private module FabricV1 { FabricApiLocalRunSudoCall() { this = api().getMember(["local", "run", "sudo"]).getACall() } override DataFlow::Node getCommand() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] + result = [this.getArg(0), this.getArgByName("command")] } } } @@ -159,7 +159,7 @@ private module FabricV2 { } override DataFlow::Node getCommand() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] + result = [this.getArg(0), this.getArgByName("command")] } } @@ -239,7 +239,7 @@ private module FabricV2 { FabricGroupRunCall() { this = fabric::group::Group::subclassInstanceRunMethod().getACall() } override DataFlow::Node getCommand() { - result.asCfgNode() = [node.getArg(0), node.getArgByName("command")] + result = [this.getArg(0), this.getArgByName("command")] } } diff --git a/python/ql/src/semmle/python/frameworks/Invoke.qll b/python/ql/src/semmle/python/frameworks/Invoke.qll index 6330d0c631f0..518d98c88540 100644 --- a/python/ql/src/semmle/python/frameworks/Invoke.qll +++ b/python/ql/src/semmle/python/frameworks/Invoke.qll @@ -81,7 +81,7 @@ private module Invoke { } override DataFlow::Node getCommand() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("command")] + result in [this.getArg(0), this.getArgByName("command")] } } } diff --git a/python/ql/src/semmle/python/frameworks/PEP249.qll b/python/ql/src/semmle/python/frameworks/PEP249.qll index 6100076d0ada..6f4613b428ed 100644 --- a/python/ql/src/semmle/python/frameworks/PEP249.qll +++ b/python/ql/src/semmle/python/frameworks/PEP249.qll @@ -123,6 +123,6 @@ private class ExecuteCall extends SqlExecution::Range, DataFlow::CallCfgNode { ExecuteCall() { this.getFunction() = execute() } override DataFlow::Node getSql() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("sql")] + result in [this.getArg(0), this.getArgByName("sql")] } } diff --git a/python/ql/src/semmle/python/frameworks/Stdlib.qll b/python/ql/src/semmle/python/frameworks/Stdlib.qll index 757889f16dd0..66018e45b62c 100644 --- a/python/ql/src/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/semmle/python/frameworks/Stdlib.qll @@ -38,9 +38,7 @@ private module Stdlib { private class OsPathNormpathCall extends Path::PathNormalization::Range, DataFlow::CallCfgNode { OsPathNormpathCall() { this = os::path().getMember("normpath").getACall() } - DataFlow::Node getPathArg() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("path")] - } + DataFlow::Node getPathArg() { result in [this.getArg(0), this.getArgByName("path")] } } /** An additional taint step for calls to `os.path.normpath` */ @@ -60,9 +58,7 @@ private module Stdlib { private class OsPathAbspathCall extends Path::PathNormalization::Range, DataFlow::CallCfgNode { OsPathAbspathCall() { this = os::path().getMember("abspath").getACall() } - DataFlow::Node getPathArg() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("path")] - } + DataFlow::Node getPathArg() { result in [this.getArg(0), this.getArgByName("path")] } } /** An additional taint step for calls to `os.path.abspath` */ @@ -82,9 +78,7 @@ private module Stdlib { private class OsPathRealpathCall extends Path::PathNormalization::Range, DataFlow::CallCfgNode { OsPathRealpathCall() { this = os::path().getMember("realpath").getACall() } - DataFlow::Node getPathArg() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("path")] - } + DataFlow::Node getPathArg() { result in [this.getArg(0), this.getArgByName("path")] } } /** An additional taint step for calls to `os.path.realpath` */ @@ -104,7 +98,7 @@ private module Stdlib { private class OsSystemCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { OsSystemCall() { this = os().getMember("system").getACall() } - override DataFlow::Node getCommand() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getCommand() { result = this.getArg(0) } } /** @@ -124,10 +118,10 @@ private module Stdlib { } override DataFlow::Node getCommand() { - result.asCfgNode() = node.getArg(0) + result = this.getArg(0) or not name = "popen" and - result.asCfgNode() = node.getArgByName("cmd") + result = this.getArgByName("cmd") } } @@ -143,7 +137,7 @@ private module Stdlib { ) } - override DataFlow::Node getCommand() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getCommand() { result = this.getArg(0) } } /** @@ -160,7 +154,7 @@ private module Stdlib { ) } - override DataFlow::Node getCommand() { result.asCfgNode() = node.getArg(1) } + override DataFlow::Node getCommand() { result = this.getArg(1) } } /** @@ -170,7 +164,7 @@ private module Stdlib { private class OsPosixSpawnCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { OsPosixSpawnCall() { this = os().getMember(["posix_spawn", "posix_spawnp"]).getACall() } - override DataFlow::Node getCommand() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getCommand() { result = this.getArg(0) } } /** An additional taint step for calls to `os.path.join` */ @@ -204,22 +198,22 @@ private module Stdlib { } /** Gets the ControlFlowNode for the `args` argument, if any. */ - private ControlFlowNode get_args_arg() { result in [node.getArg(0), node.getArgByName("args")] } + private DataFlow::Node get_args_arg() { result in [this.getArg(0), this.getArgByName("args")] } /** Gets the ControlFlowNode for the `shell` argument, if any. */ - private ControlFlowNode get_shell_arg() { - result in [node.getArg(8), node.getArgByName("shell")] + private DataFlow::Node get_shell_arg() { + result in [this.getArg(8), this.getArgByName("shell")] } private boolean get_shell_arg_value() { not exists(this.get_shell_arg()) and result = false or - exists(ControlFlowNode shell_arg | shell_arg = this.get_shell_arg() | - result = shell_arg.getNode().(ImmutableLiteral).booleanValue() + exists(DataFlow::Node shell_arg | shell_arg = this.get_shell_arg() | + result = shell_arg.asCfgNode().getNode().(ImmutableLiteral).booleanValue() or // TODO: Track the "shell" argument to determine possible values - not shell_arg.getNode() instanceof ImmutableLiteral and + not shell_arg.asCfgNode().getNode() instanceof ImmutableLiteral and ( result = true or @@ -229,16 +223,16 @@ private module Stdlib { } /** Gets the ControlFlowNode for the `executable` argument, if any. */ - private ControlFlowNode get_executable_arg() { - result in [node.getArg(2), node.getArgByName("executable")] + private DataFlow::Node get_executable_arg() { + result in [this.getArg(2), this.getArgByName("executable")] } override DataFlow::Node getCommand() { // TODO: Track arguments ("args" and "shell") // TODO: Handle using `args=["sh", "-c", ]` - result.asCfgNode() = this.get_executable_arg() + result = this.get_executable_arg() or - exists(ControlFlowNode arg_args, boolean shell | + exists(DataFlow::Node arg_args, boolean shell | arg_args = get_args_arg() and shell = get_shell_arg_value() | @@ -254,14 +248,14 @@ private module Stdlib { // run, so if we're able to, we only mark the first element as the command // (and not the arguments to the command). // - result.asCfgNode() = arg_args.(SequenceNode).getElement(0) + result.asCfgNode() = arg_args.asCfgNode().(SequenceNode).getElement(0) or // Either the "args" argument is not a sequence (which is valid) or we where // just not able to figure it out. Simply mark the "args" argument as the // command. // - not arg_args instanceof SequenceNode and - result.asCfgNode() = arg_args + not arg_args.asCfgNode() instanceof SequenceNode and + result = arg_args ) ) } @@ -334,9 +328,7 @@ private module Stdlib { ) } - override DataFlow::Node getCommand() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("cmd")] - } + override DataFlow::Node getCommand() { result in [this.getArg(0), this.getArgByName("cmd")] } } // --------------------------------------------------------------------------- @@ -352,9 +344,7 @@ private module Stdlib { private class PlatformPopenCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode { PlatformPopenCall() { this = platform().getMember("popen").getACall() } - override DataFlow::Node getCommand() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("cmd")] - } + override DataFlow::Node getCommand() { result in [this.getArg(0), this.getArgByName("cmd")] } } // --------------------------------------------------------------------------- @@ -442,7 +432,7 @@ private module Stdlib { this = base64().getMember(name).getACall() } - override DataFlow::Node getAnInput() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getAnInput() { result = this.getArg(0) } override DataFlow::Node getOutput() { result = this } @@ -476,7 +466,7 @@ private module Stdlib { override predicate mayExecuteInput() { none() } - override DataFlow::Node getAnInput() { result.asCfgNode() = node.getArg(0) } + override DataFlow::Node getAnInput() { result = this.getArg(0) } override DataFlow::Node getOutput() { result = this } diff --git a/python/ql/src/semmle/python/frameworks/Tornado.qll b/python/ql/src/semmle/python/frameworks/Tornado.qll index ecd488f059e7..1dbb782c883c 100644 --- a/python/ql/src/semmle/python/frameworks/Tornado.qll +++ b/python/ql/src/semmle/python/frameworks/Tornado.qll @@ -431,7 +431,7 @@ private module Tornado { } override DataFlow::Node getRedirectLocation() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("url")] + result in [this.getArg(0), this.getArgByName("url")] } override DataFlow::Node getBody() { none() } @@ -452,9 +452,7 @@ private module Tornado { this.getFunction() = tornado::web::RequestHandler::writeMethod() } - override DataFlow::Node getBody() { - result.asCfgNode() in [node.getArg(0), node.getArgByName("chunk")] - } + override DataFlow::Node getBody() { result in [this.getArg(0), this.getArgByName("chunk")] } override string getMimetypeDefault() { result = "text/html" } diff --git a/python/ql/src/semmle/python/frameworks/Werkzeug.qll b/python/ql/src/semmle/python/frameworks/Werkzeug.qll index 9fa3461a0488..623a06747a47 100644 --- a/python/ql/src/semmle/python/frameworks/Werkzeug.qll +++ b/python/ql/src/semmle/python/frameworks/Werkzeug.qll @@ -88,7 +88,7 @@ module Werkzeug { or // getlist -> getlist() nodeFrom = werkzeug::datastructures::MultiDict::getlist() and - nodeTo.asCfgNode().(CallNode).getFunction() = nodeFrom.asCfgNode() + nodeTo.(DataFlow::CallCfgNode).getFunction() = nodeFrom } } From aeac03663f0e763eca3898b28a514b52c3d7afe0 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 18 Jun 2021 17:41:09 +0000 Subject: [PATCH 1456/1662] Python: Remove old `ClickHouseDriver.qll` The merge must've gone wrong some way, as this file is not supposed to exist in `experimental` anymore. --- .../python/frameworks/ClickHouseDriver.qll | 85 ------------------- 1 file changed, 85 deletions(-) delete mode 100644 python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll diff --git a/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll b/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll deleted file mode 100644 index 1f3509aee37b..000000000000 --- a/python/ql/src/experimental/semmle/python/frameworks/ClickHouseDriver.qll +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Provides classes modeling security-relevant aspects of `clickhouse-driver` and `aioch` PyPI packages. - * See - * - https://pypi.org/project/clickhouse-driver/ - * - https://pypi.org/project/aioch/ - * - https://clickhouse-driver.readthedocs.io/en/latest/ - */ - -private import python -private import semmle.python.Concepts -private import semmle.python.ApiGraphs -private import semmle.python.frameworks.PEP249 - -/** - * Provides models for `clickhouse-driver` and `aioch` PyPI packages. - * See - * - https://pypi.org/project/clickhouse-driver/ - * - https://pypi.org/project/aioch/ - * - https://clickhouse-driver.readthedocs.io/en/latest/ - */ -module ClickHouseDriver { - /** Gets a reference to the `clickhouse_driver` module. */ - API::Node clickhouse_driver() { result = API::moduleImport("clickhouse_driver") } - - /** Gets a reference to the `aioch` module. This module allows to make async db queries. */ - API::Node aioch() { result = API::moduleImport("aioch") } - - /** - * `clickhouse_driver` implements PEP249, - * providing ways to execute SQL statements against a database. - */ - class ClickHouseDriverPEP249 extends PEP249ModuleApiNode { - ClickHouseDriverPEP249() { this = clickhouse_driver() } - } - - module Client { - /** Gets a reference to a Client call. */ - private DataFlow::Node client_ref() { - result = clickhouse_driver().getMember("Client").getASubclass*().getAUse() - or - result = aioch().getMember("Client").getASubclass*().getAUse() - } - - /** A direct instantiation of `clickhouse_driver.Client`. */ - private class ClientInstantiation extends DataFlow::CallCfgNode { - ClientInstantiation() { this.getFunction() = client_ref() } - } - - /** Gets a reference to an instance of `clickhouse_driver.Client`. */ - private DataFlow::LocalSourceNode instance(DataFlow::TypeTracker t) { - t.start() and - result instanceof ClientInstantiation - or - exists(DataFlow::TypeTracker t2 | result = instance(t2).track(t2, t)) - } - - /** Gets a reference to an instance of `clickhouse_driver.Client`. */ - DataFlow::Node instance() { instance(DataFlow::TypeTracker::end()).flowsTo(result) } - } - - /** clickhouse_driver.Client execute methods */ - private string execute_function() { - result in ["execute_with_progress", "execute", "execute_iter"] - } - - /** Gets a reference to the `clickhouse_driver.Client.execute` method */ - private DataFlow::LocalSourceNode clickhouse_execute(DataFlow::TypeTracker t) { - t.startInAttr(execute_function()) and - result = Client::instance() - or - exists(DataFlow::TypeTracker t2 | result = clickhouse_execute(t2).track(t2, t)) - } - - /** Gets a reference to the `clickhouse_driver.Client.execute` method */ - DataFlow::Node clickhouse_execute() { - clickhouse_execute(DataFlow::TypeTracker::end()).flowsTo(result) - } - - /** A call to the `clickhouse_driver.Client.execute` method */ - private class ExecuteCall extends SqlExecution::Range, DataFlow::CallCfgNode { - ExecuteCall() { this.getFunction() = clickhouse_execute() } - - override DataFlow::Node getSql() { result = this.getArg(0) } - } -} From 3aea270e10460d9ecd3de8dded5140ec82b4c730 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 18 Jun 2021 18:30:27 +0000 Subject: [PATCH 1457/1662] Python: Autoformat --- python/ql/src/Security/CWE-327/InsecureProtocol.ql | 3 +-- python/ql/src/semmle/python/frameworks/PEP249.qll | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python/ql/src/Security/CWE-327/InsecureProtocol.ql b/python/ql/src/Security/CWE-327/InsecureProtocol.ql index 755cf0d43ab6..b4984c8c764f 100644 --- a/python/ql/src/Security/CWE-327/InsecureProtocol.ql +++ b/python/ql/src/Security/CWE-327/InsecureProtocol.ql @@ -51,8 +51,7 @@ string callName(Nameable call) { } string configName(ProtocolConfiguration protocolConfiguration) { - result = - "call to " + callName(protocolConfiguration.(DataFlow::CallCfgNode).getFunction()) + result = "call to " + callName(protocolConfiguration.(DataFlow::CallCfgNode).getFunction()) or not protocolConfiguration instanceof DataFlow::CallCfgNode and not protocolConfiguration instanceof ContextCreation and diff --git a/python/ql/src/semmle/python/frameworks/PEP249.qll b/python/ql/src/semmle/python/frameworks/PEP249.qll index 6f4613b428ed..ef58ef1fbdbb 100644 --- a/python/ql/src/semmle/python/frameworks/PEP249.qll +++ b/python/ql/src/semmle/python/frameworks/PEP249.qll @@ -122,7 +122,5 @@ DataFlow::Node execute() { execute(DataFlow::TypeTracker::end()).flowsTo(result) private class ExecuteCall extends SqlExecution::Range, DataFlow::CallCfgNode { ExecuteCall() { this.getFunction() = execute() } - override DataFlow::Node getSql() { - result in [this.getArg(0), this.getArgByName("sql")] - } + override DataFlow::Node getSql() { result in [this.getArg(0), this.getArgByName("sql")] } } From 8208aebd7e34caca3af5ed012abf3bef4601af3e Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 21 Jun 2021 10:43:25 +0200 Subject: [PATCH 1458/1662] Python: Apply suggestions from code review Co-authored-by: yoff --- python/ql/src/semmle/python/frameworks/Twisted.qll | 2 +- .../ql/test/library-tests/frameworks/twisted/response_test.py | 2 +- python/ql/test/library-tests/frameworks/twisted/taint_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Twisted.qll b/python/ql/src/semmle/python/frameworks/Twisted.qll index 5390513ca3ad..b9b0942bbdc1 100644 --- a/python/ql/src/semmle/python/frameworks/Twisted.qll +++ b/python/ql/src/semmle/python/frameworks/Twisted.qll @@ -79,7 +79,7 @@ private module Twisted { /** * A "render" method on a `twisted.web.resource.Resource` subclass, whose return value - * is written as the body fo the HTTP response. + * is written as the body of the HTTP response. */ class TwistedResourceRenderMethod extends TwistedResourceRequestHandler { TwistedResourceRenderMethod() { diff --git a/python/ql/test/library-tests/frameworks/twisted/response_test.py b/python/ql/test/library-tests/frameworks/twisted/response_test.py index f418330c47a0..f845f7f693a2 100644 --- a/python/ql/test/library-tests/frameworks/twisted/response_test.py +++ b/python/ql/test/library-tests/frameworks/twisted/response_test.py @@ -45,7 +45,7 @@ def render_GET(self, request: Request): # $ requestHandler class NonHttpBodyOutput(Resource): - """Examples of provides values in response that is not in the body + """Examples of providing values in response that is not in the body """ def render_GET(self, request: Request): # $ requestHandler request.responseHeaders.addRawHeader("key", "value") diff --git a/python/ql/test/library-tests/frameworks/twisted/taint_test.py b/python/ql/test/library-tests/frameworks/twisted/taint_test.py index 03353f8cf972..cdc6592f90e4 100644 --- a/python/ql/test/library-tests/frameworks/twisted/taint_test.py +++ b/python/ql/test/library-tests/frameworks/twisted/taint_test.py @@ -57,7 +57,7 @@ def render_GET(self, request: Request): # $ requestHandler request.getRequestHostname(), # $ tainted ) - # technically user-controlled, but unlike to lead to vulnerabilities. + # technically user-controlled, but unlikely to lead to vulnerabilities. ensure_not_tainted( request.method, ) From d6ec4d30fcc41714d51881f83fe7a7055d6b215a Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Mon, 21 Jun 2021 10:54:28 +0200 Subject: [PATCH 1459/1662] Python: Twisted refactor of getRequestParamIndex --- .../src/semmle/python/frameworks/Twisted.qll | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Twisted.qll b/python/ql/src/semmle/python/frameworks/Twisted.qll index b9b0942bbdc1..5b014597157d 100644 --- a/python/ql/src/semmle/python/frameworks/Twisted.qll +++ b/python/ql/src/semmle/python/frameworks/Twisted.qll @@ -41,36 +41,28 @@ private module Twisted { // TODO: This doesn't handle attribute assignment. Should be OK, but analysis is not as complete as with // points-to and `.lookup`, which would handle `post = my_post_handler` inside class def result = this.getAMethod() and - resourceMethodRequestParamIndex(result.getName(), _) + exists(getRequestParamIndex(result.getName())) } } /** - * Holds if the request parameter is supposed to be at index `requestParamIndex` for - * the method named `methodName` in `twisted.web.resource.Resource`. + * Gets the index the request parameter is supposed to be at for the method named + * `methodName` in a `twisted.web.resource.Resource` subclass. */ bindingset[methodName] - private predicate resourceMethodRequestParamIndex(string methodName, int requestParamIndex) { - methodName.matches("render_%") and requestParamIndex = 1 + private int getRequestParamIndex(string methodName) { + methodName.matches("render_%") and result = 1 or - methodName in ["render", "listDynamicEntities", "getChildForRequest"] and requestParamIndex = 1 + methodName in ["render", "listDynamicEntities", "getChildForRequest"] and result = 1 or - methodName = ["getDynamicEntity", "getChild", "getChildWithDefault"] and requestParamIndex = 2 + methodName = ["getDynamicEntity", "getChild", "getChildWithDefault"] and result = 2 } /** A method that handles incoming requests, on a `twisted.web.resource.Resource` subclass. */ class TwistedResourceRequestHandler extends HTTP::Server::RequestHandler::Range { - TwistedResourceRequestHandler() { - any(TwistedResourceSubclass cls).getAMethod() = this and - resourceMethodRequestParamIndex(this.getName(), _) - } + TwistedResourceRequestHandler() { this = any(TwistedResourceSubclass cls).getARequestHandler() } - Parameter getRequestParameter() { - exists(int i | - resourceMethodRequestParamIndex(this.getName(), i) and - result = this.getArg(i) - ) - } + Parameter getRequestParameter() { result = this.getArg(getRequestParamIndex(this.getName())) } override Parameter getARoutedParameter() { none() } From 0754ed2b5c21647d86255ddd5c8e1fe585173105 Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Mon, 21 Jun 2021 11:46:44 +0200 Subject: [PATCH 1460/1662] JS: Change note --- javascript/change-notes/2021-06-21-sharpen-match-calls.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 javascript/change-notes/2021-06-21-sharpen-match-calls.md diff --git a/javascript/change-notes/2021-06-21-sharpen-match-calls.md b/javascript/change-notes/2021-06-21-sharpen-match-calls.md new file mode 100644 index 000000000000..142da01333d8 --- /dev/null +++ b/javascript/change-notes/2021-06-21-sharpen-match-calls.md @@ -0,0 +1,3 @@ +lgtm,codescanning +* The regular expression queries now recognize calls to the String `match` method more precisely, + resulting in fewer false-positive results when a string is passed to a method named `match`. From 90e2a2d222272694b1d76c8dba0952da753015b5 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:30:12 +0100 Subject: [PATCH 1461/1662] C++: Change note. --- cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md diff --git a/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md new file mode 100644 index 000000000000..d1700ba167f1 --- /dev/null +++ b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The "Use of a broken or risky cryptographic algorithm" (`cpp/weak-cryptographic-algorithm`) query has been further improved to reduce false positives. From 6f808c9e4ccf2d1f6cc82319f0cf501ad3e2195f Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 21 Jun 2021 12:32:48 +0100 Subject: [PATCH 1462/1662] C++: Update change note. --- cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md index d1700ba167f1..fb73403fb0d6 100644 --- a/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md +++ b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The "Use of a broken or risky cryptographic algorithm" (`cpp/weak-cryptographic-algorithm`) query has been further improved to reduce false positives. +* The "Use of a broken or risky cryptographic algorithm" (`cpp/weak-cryptographic-algorithm`) query has been further improved to reduce false positives and it's `@precision` increased to `high`. From c5eef7be8cb0390ed218ee8a66b793f4a2efac19 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 21 Jun 2021 12:46:13 +0100 Subject: [PATCH 1463/1662] Increase field flow branch limit in Jax-RS tests This fixes apparently-missing results by allowing the dataflow library to persist even when there are many Map implementations possibly available. --- .../ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java | 4 ++-- java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java | 4 ++-- java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java index f534e59b8542..40b0479ac376 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JakartaRsFlow.java @@ -160,12 +160,12 @@ public MyAbstractMultivaluedMapJak(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMapJak(map1); - sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow + sink(amm1.keySet().iterator().next()); // $ hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMapJak(map2); - sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow + sink(amm2.get("key").get(0)); // $ hasValueFlow } void testMultivaluedHashMap(Map map1, Map map2, diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java index eecc3e444c9d..f9c4f395aca2 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.java @@ -160,12 +160,12 @@ public MyAbstractMultivaluedMap(Map> map) { void testAbstractMultivaluedMap(Map> map1, Map> map2, List list) { map1.put(taint(), list); AbstractMultivaluedMap amm1 = new MyAbstractMultivaluedMap(map1); - sink(amm1.keySet().iterator().next()); // $ MISSING: hasValueFlow + sink(amm1.keySet().iterator().next()); // $ hasValueFlow list.add(taint()); map2.put("key", list); AbstractMultivaluedMap amm2 = new MyAbstractMultivaluedMap(map2); - sink(amm2.get("key").get(0)); // $ MISSING: hasValueFlow SPURIOUS: hasTaintFlow + sink(amm2.get("key").get(0)); // $ hasValueFlow } void testMultivaluedHashMap(Map map1, Map map2, diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql index d3b1db907646..7405395caebf 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql @@ -12,6 +12,8 @@ class TaintFlowConf extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node n) { exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) } + + override int fieldFlowBranchLimit() { result = 3 } } class ValueFlowConf extends DataFlow::Configuration { @@ -24,6 +26,8 @@ class ValueFlowConf extends DataFlow::Configuration { override predicate isSink(DataFlow::Node n) { exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) } + + override int fieldFlowBranchLimit() { result = 3 } } class HasFlowTest extends InlineExpectationsTest { From e2aaae818199f3313c09661c7412f0d875ec8585 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Mon, 21 Jun 2021 12:51:37 +0100 Subject: [PATCH 1464/1662] Increase test fieldFlowBranchLimit to 1000 Might as well head off future failures in this test Co-authored-by: Anders Schack-Mulligen --- java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql index 7405395caebf..9e537f33fd0e 100644 --- a/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql +++ b/java/ql/test/library-tests/frameworks/JaxWs/JaxRsFlow.ql @@ -13,7 +13,7 @@ class TaintFlowConf extends TaintTracking::Configuration { exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) } - override int fieldFlowBranchLimit() { result = 3 } + override int fieldFlowBranchLimit() { result = 1000 } } class ValueFlowConf extends DataFlow::Configuration { @@ -27,7 +27,7 @@ class ValueFlowConf extends DataFlow::Configuration { exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument()) } - override int fieldFlowBranchLimit() { result = 3 } + override int fieldFlowBranchLimit() { result = 1000 } } class HasFlowTest extends InlineExpectationsTest { From 18e5d3cce84ac9da8cccc1beef9dd35b0b4f6a52 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 21 Jun 2021 14:02:06 +0200 Subject: [PATCH 1465/1662] C++: Add false positive with multiplication. --- .../uncontrolled/ArithmeticUncontrolled.expected | 13 +++++++++++++ .../CWE/CWE-190/semmle/uncontrolled/test.c | 14 ++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected index 097efb73b9fb..96200f469f5c 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected @@ -19,6 +19,11 @@ edges | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | +| test.c:104:13:104:16 | call to rand | test.c:106:5:106:11 | r | +| test.c:104:13:104:16 | call to rand | test.c:106:5:106:11 | r | +| test.c:106:5:106:11 | r | test.c:110:18:110:18 | r | +| test.c:110:18:110:18 | r | test.c:111:3:111:3 | r | +| test.c:110:18:110:18 | r | test.c:111:3:111:3 | r | | test.cpp:8:9:8:12 | Store | test.cpp:24:11:24:18 | call to get_rand | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | @@ -62,6 +67,13 @@ nodes | test.c:100:5:100:5 | r | semmle.label | r | | test.c:100:5:100:5 | r | semmle.label | r | | test.c:100:5:100:5 | r | semmle.label | r | +| test.c:104:13:104:16 | call to rand | semmle.label | call to rand | +| test.c:104:13:104:16 | call to rand | semmle.label | call to rand | +| test.c:106:5:106:11 | r | semmle.label | r | +| test.c:110:18:110:18 | r | semmle.label | r | +| test.c:111:3:111:3 | r | semmle.label | r | +| test.c:111:3:111:3 | r | semmle.label | r | +| test.c:111:3:111:3 | r | semmle.label | r | | test.cpp:8:9:8:12 | Store | semmle.label | Store | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | @@ -93,6 +105,7 @@ nodes | test.c:45:5:45:5 | r | test.c:44:13:44:16 | call to rand | test.c:45:5:45:5 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:44:13:44:16 | call to rand | Uncontrolled value | | test.c:77:9:77:9 | r | test.c:75:13:75:19 | ... ^ ... | test.c:77:9:77:9 | r | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:75:13:75:19 | ... ^ ... | Uncontrolled value | | test.c:100:5:100:5 | r | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:99:14:99:19 | call to rand | Uncontrolled value | +| test.c:111:3:111:3 | r | test.c:104:13:104:16 | call to rand | test.c:111:3:111:3 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:104:13:104:16 | call to rand | Uncontrolled value | | test.cpp:25:7:25:7 | r | test.cpp:8:9:8:12 | call to rand | test.cpp:25:7:25:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:8:9:8:12 | call to rand | Uncontrolled value | | test.cpp:31:7:31:7 | r | test.cpp:13:10:13:13 | call to rand | test.cpp:31:7:31:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:13:10:13:13 | call to rand | Uncontrolled value | | test.cpp:37:7:37:7 | r | test.cpp:18:9:18:12 | call to rand | test.cpp:37:7:37:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:18:9:18:12 | call to rand | Uncontrolled value | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c index 61f39a8e8519..eb89dfd42e4a 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c @@ -3,12 +3,12 @@ int rand(void); void trySlice(int start, int end); +void add_100(int); #define RAND() rand() #define RANDN(n) (rand() % n) #define RAND2() (rand() ^ rand()) - - +#define RAND_MAX 32767 @@ -99,4 +99,14 @@ void randomTester() { *ptr_r = RAND(); r -= 100; // BAD } + + { + int r = rand(); + r = ((2.0 / (RAND_MAX + 1)) * r - 1.0); + add_100(r); + } } + +void add_100(int r) { + r += 100; // GOOD [FALSE POSITIVE] +} \ No newline at end of file From 238c483e5b35ca0575e565168c03cb94ccb84841 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 21 Jun 2021 14:05:34 +0200 Subject: [PATCH 1466/1662] C++: Make any non-overflowing arithmetic operation a barrier. --- .../Security/CWE/CWE-190/ArithmeticUncontrolled.ql | 11 ++++++++--- .../uncontrolled/ArithmeticUncontrolled.expected | 13 ------------- .../Security/CWE/CWE-190/semmle/uncontrolled/test.c | 2 +- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index 359ac7a0d1a0..6b9801a5fb22 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -36,7 +36,7 @@ predicate boundedDiv(Expr e, Expr left) { e = left } /** * An operand `e` of a remainder expression `rem` (i.e., `rem` is either a `RemExpr` or - * an `AssignRemExpr`) with left-hand side `left` and right-ahnd side `right` is bounded + * an `AssignRemExpr`) with left-hand side `left` and right-hand side `right` is bounded * when `e` is `left` and `right` is upper bounded by some number that is less than the maximum integer * allowed by the result type of `rem`. */ @@ -59,10 +59,15 @@ predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr operand2) } /** - * Holds if `fc` is a part of the left operand of a binary operation that greatly reduces the range - * of possible values. + * Holds if `e` is an operand of an operation that greatly reduces the range of possible values. */ predicate bounded(Expr e) { + ( + e instanceof UnaryArithmeticOperation or + e instanceof BinaryArithmeticOperation + ) and + not convertedExprMightOverflow(e) + or // For `%` and `&` we require that `e` is bounded by a value that is strictly smaller than the // maximum possible value of the result type of the operation. // For example, the function call `rand()` is considered bounded in the following program: diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected index 96200f469f5c..097efb73b9fb 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected @@ -19,11 +19,6 @@ edges | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | -| test.c:104:13:104:16 | call to rand | test.c:106:5:106:11 | r | -| test.c:104:13:104:16 | call to rand | test.c:106:5:106:11 | r | -| test.c:106:5:106:11 | r | test.c:110:18:110:18 | r | -| test.c:110:18:110:18 | r | test.c:111:3:111:3 | r | -| test.c:110:18:110:18 | r | test.c:111:3:111:3 | r | | test.cpp:8:9:8:12 | Store | test.cpp:24:11:24:18 | call to get_rand | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | @@ -67,13 +62,6 @@ nodes | test.c:100:5:100:5 | r | semmle.label | r | | test.c:100:5:100:5 | r | semmle.label | r | | test.c:100:5:100:5 | r | semmle.label | r | -| test.c:104:13:104:16 | call to rand | semmle.label | call to rand | -| test.c:104:13:104:16 | call to rand | semmle.label | call to rand | -| test.c:106:5:106:11 | r | semmle.label | r | -| test.c:110:18:110:18 | r | semmle.label | r | -| test.c:111:3:111:3 | r | semmle.label | r | -| test.c:111:3:111:3 | r | semmle.label | r | -| test.c:111:3:111:3 | r | semmle.label | r | | test.cpp:8:9:8:12 | Store | semmle.label | Store | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | @@ -105,7 +93,6 @@ nodes | test.c:45:5:45:5 | r | test.c:44:13:44:16 | call to rand | test.c:45:5:45:5 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:44:13:44:16 | call to rand | Uncontrolled value | | test.c:77:9:77:9 | r | test.c:75:13:75:19 | ... ^ ... | test.c:77:9:77:9 | r | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:75:13:75:19 | ... ^ ... | Uncontrolled value | | test.c:100:5:100:5 | r | test.c:99:14:99:19 | call to rand | test.c:100:5:100:5 | r | $@ flows to here and is used in arithmetic, potentially causing an underflow. | test.c:99:14:99:19 | call to rand | Uncontrolled value | -| test.c:111:3:111:3 | r | test.c:104:13:104:16 | call to rand | test.c:111:3:111:3 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:104:13:104:16 | call to rand | Uncontrolled value | | test.cpp:25:7:25:7 | r | test.cpp:8:9:8:12 | call to rand | test.cpp:25:7:25:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:8:9:8:12 | call to rand | Uncontrolled value | | test.cpp:31:7:31:7 | r | test.cpp:13:10:13:13 | call to rand | test.cpp:31:7:31:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:13:10:13:13 | call to rand | Uncontrolled value | | test.cpp:37:7:37:7 | r | test.cpp:18:9:18:12 | call to rand | test.cpp:37:7:37:7 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:18:9:18:12 | call to rand | Uncontrolled value | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c index eb89dfd42e4a..127266f2a6a8 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/test.c @@ -108,5 +108,5 @@ void randomTester() { } void add_100(int r) { - r += 100; // GOOD [FALSE POSITIVE] + r += 100; // GOOD } \ No newline at end of file From b7ac329ba1250c1937c04e12b9dc8bd72fd4a56d Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 4 Jun 2021 10:44:56 +0200 Subject: [PATCH 1467/1662] DataFlow: Add support for configuration-specific implicit reads. --- .../java/dataflow/internal/DataFlowImpl.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImplCommon.qll | 1 - 2 files changed, 656 insertions(+), 478 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll index 462e89ac9edf..eaed77326c71 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll @@ -724,7 +724,6 @@ private module Cached { Node node1, Content c, Node node2, DataFlowType contentType, DataFlowType containerType ) { storeStep(node1, c, node2) and - read(_, c, _) and contentType = getNodeDataFlowType(node1) and containerType = getNodeDataFlowType(node2) or From 80880320d5dd171ccdaa9fd1b515dbda70d21672 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 18 Jun 2021 11:51:44 +0200 Subject: [PATCH 1468/1662] Dataflow: Sync. --- .../cpp/dataflow/internal/DataFlowImpl.qll | 1133 ++++++++++------- .../cpp/dataflow/internal/DataFlowImpl2.qll | 1133 ++++++++++------- .../cpp/dataflow/internal/DataFlowImpl3.qll | 1133 ++++++++++------- .../cpp/dataflow/internal/DataFlowImpl4.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImplCommon.qll | 1 - .../dataflow/internal/DataFlowImplLocal.qll | 1133 ++++++++++------- .../cpp/ir/dataflow/internal/DataFlowImpl.qll | 1133 ++++++++++------- .../ir/dataflow/internal/DataFlowImpl2.qll | 1133 ++++++++++------- .../ir/dataflow/internal/DataFlowImpl3.qll | 1133 ++++++++++------- .../ir/dataflow/internal/DataFlowImpl4.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImplCommon.qll | 1 - .../csharp/dataflow/internal/DataFlowImpl.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImpl2.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImpl3.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImpl4.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImpl5.qll | 1133 ++++++++++------- .../dataflow/internal/DataFlowImplCommon.qll | 1 - .../java/dataflow/internal/DataFlowImpl2.qll | 1133 ++++++++++------- .../java/dataflow/internal/DataFlowImpl3.qll | 1133 ++++++++++------- .../java/dataflow/internal/DataFlowImpl4.qll | 1133 ++++++++++------- .../java/dataflow/internal/DataFlowImpl5.qll | 1133 ++++++++++------- .../java/dataflow/internal/DataFlowImpl6.qll | 1133 ++++++++++------- .../dataflow/new/internal/DataFlowImpl.qll | 1133 ++++++++++------- .../dataflow/new/internal/DataFlowImpl2.qll | 1133 ++++++++++------- .../dataflow/new/internal/DataFlowImpl3.qll | 1133 ++++++++++------- .../dataflow/new/internal/DataFlowImpl4.qll | 1133 ++++++++++------- .../new/internal/DataFlowImplCommon.qll | 1 - 27 files changed, 15088 insertions(+), 10975 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll index 462e89ac9edf..eaed77326c71 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll @@ -724,7 +724,6 @@ private module Cached { Node node1, Content c, Node node2, DataFlowType contentType, DataFlowType containerType ) { storeStep(node1, c, node2) and - read(_, c, _) and contentType = getNodeDataFlowType(node1) and containerType = getNodeDataFlowType(node2) or diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll index 462e89ac9edf..eaed77326c71 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImplCommon.qll @@ -724,7 +724,6 @@ private module Cached { Node node1, Content c, Node node2, DataFlowType contentType, DataFlowType containerType ) { storeStep(node1, c, node2) and - read(_, c, _) and contentType = getNodeDataFlowType(node1) and containerType = getNodeDataFlowType(node2) or diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll index 462e89ac9edf..eaed77326c71 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImplCommon.qll @@ -724,7 +724,6 @@ private module Cached { Node node1, Content c, Node node2, DataFlowType contentType, DataFlowType containerType ) { storeStep(node1, c, node2) and - read(_, c, _) and contentType = getNodeDataFlowType(node1) and containerType = getNodeDataFlowType(node2) or diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 4f54d9671c9c..9cc0e10a6c68 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -81,6 +81,12 @@ abstract class Configuration extends string { */ predicate isAdditionalFlowStep(Node node1, Node node2) { none() } + /** + * Holds if an arbitrary number of implicit read steps of content `c` may be + * taken at `node`. + */ + predicate allowImplicitRead(Node node, Content c) { none() } + /** * Gets the virtual dispatch branching limit when calculating field flow. * This can be overridden to a smaller value to improve performance (a @@ -182,75 +188,208 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { } } -private predicate inBarrier(Node node, Configuration config) { - config.isBarrierIn(node) and - config.isSource(node) +private newtype TNodeEx = + TNodeNormal(Node n) or + TNodeImplicitRead(Node n, boolean b) { + any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + } + +private class NodeEx extends TNodeEx { + string toString() { + result = this.asNode().toString() + or + exists(Node n | this.isImplicitReadNode(n, _) | result = n.toString() + " [Ext]") + } + + Node asNode() { this = TNodeNormal(result) } + + predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + + Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } + + pragma[nomagic] + DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + + predicate hasLocationInfo( + string filepath, int startline, int startcolumn, int endline, int endcolumn + ) { + this.projectToNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + } +} + +private class ArgNodeEx extends NodeEx { + ArgNodeEx() { this.asNode() instanceof ArgNode } } -private predicate outBarrier(Node node, Configuration config) { - config.isBarrierOut(node) and - config.isSink(node) +private class ParamNodeEx extends NodeEx { + ParamNodeEx() { this.asNode() instanceof ParamNode } + + predicate isParameterOf(DataFlowCallable c, int i) { + this.asNode().(ParamNode).isParameterOf(c, i) + } + + int getPosition() { this.isParameterOf(_, result) } } -private predicate fullBarrier(Node node, Configuration config) { - config.isBarrier(node) - or - config.isBarrierIn(node) and - not config.isSource(node) - or - config.isBarrierOut(node) and - not config.isSink(node) - or - exists(BarrierGuard g | - config.isBarrierGuard(g) and - node = g.getAGuardedNode() +private class RetNodeEx extends NodeEx { + RetNodeEx() { this.asNode() instanceof ReturnNodeExt } + + ReturnPosition getReturnPosition() { result = getReturnPosition(this.asNode()) } + + ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } +} + +pragma[inline] +private DataFlowCallable getEnclosingCallable(NodeEx n) { + pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) +} + +pragma[nomagic] +private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } + +pragma[inline] +private DataFlowType getDataFlowType(NodeEx n) { + getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) +} + +private predicate inBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierIn(n) and + config.isSource(n) + ) +} + +private predicate outBarrier(NodeEx node, Configuration config) { + exists(Node n | + node.asNode() = n and + config.isBarrierOut(n) and + config.isSink(n) ) } +private predicate fullBarrier(NodeEx node, Configuration config) { + exists(Node n | node.asNode() = n | + config.isBarrier(n) + or + config.isBarrierIn(n) and + not config.isSource(n) + or + config.isBarrierOut(n) and + not config.isSink(n) + or + exists(BarrierGuard g | + config.isBarrierGuard(g) and + n = g.getAGuardedNode() + ) + ) +} + +pragma[nomagic] +private predicate sourceNode(NodeEx node, Configuration config) { config.isSource(node.asNode()) } + +pragma[nomagic] +private predicate sinkNode(NodeEx node, Configuration config) { config.isSink(node.asNode()) } + /** * Holds if data can flow in one local step from `node1` to `node2`. */ -private predicate localFlowStep(Node node1, Node node2, Configuration config) { - simpleLocalFlowStepExt(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate localFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + simpleLocalFlowStepExt(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.asNode() = n and + node2.isImplicitReadNode(n, false) + ) } /** * Holds if the additional step from `node1` to `node2` does not jump between callables. */ -private predicate additionalLocalFlowStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) = getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalLocalFlowStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) = getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) + or + exists(Node n | + config.allowImplicitRead(n, _) and + node1.isImplicitReadNode(n, true) and + node2.asNode() = n + ) } /** * Holds if data can flow from `node1` to `node2` in a way that discards call contexts. */ -private predicate jumpStep(Node node1, Node node2, Configuration config) { - jumpStepCached(node1, node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate jumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + jumpStepCached(n1, n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) } /** * Holds if the additional step from `node1` to `node2` jumps between callables. */ -private predicate additionalJumpStep(Node node1, Node node2, Configuration config) { - config.isAdditionalFlowStep(node1, node2) and - getNodeEnclosingCallable(node1) != getNodeEnclosingCallable(node2) and - not outBarrier(node1, config) and - not inBarrier(node2, config) and - not fullBarrier(node1, config) and - not fullBarrier(node2, config) +private predicate additionalJumpStep(NodeEx node1, NodeEx node2, Configuration config) { + exists(Node n1, Node n2 | + node1.asNode() = n1 and + node2.asNode() = n2 and + config.isAdditionalFlowStep(n1, n2) and + getNodeEnclosingCallable(n1) != getNodeEnclosingCallable(n2) and + not outBarrier(node1, config) and + not inBarrier(node2, config) and + not fullBarrier(node1, config) and + not fullBarrier(node2, config) + ) +} + +private predicate read(NodeEx node1, Content c, NodeEx node2, Configuration config) { + read(node1.asNode(), c, node2.asNode()) + or + exists(Node n | + node2.isImplicitReadNode(n, true) and + node1.isImplicitReadNode(n, _) and + config.allowImplicitRead(n, c) + ) +} + +private predicate store( + NodeEx node1, TypedContent tc, NodeEx node2, DataFlowType contentType, Configuration config +) { + store(node1.asNode(), tc, node2.asNode(), contentType) and + read(_, tc.getContent(), _, config) +} + +pragma[nomagic] +private predicate viableReturnPosOutEx(DataFlowCall call, ReturnPosition pos, NodeEx out) { + viableReturnPosOut(call, pos, out.asNode()) +} + +pragma[nomagic] +private predicate viableParamArgEx(DataFlowCall call, ParamNodeEx p, ArgNodeEx arg) { + viableParamArg(call, p.asNode(), arg.asNode()) } /** @@ -274,39 +413,39 @@ private module Stage1 { * The Boolean `cc` records whether the node is reached through an * argument in a call. */ - predicate fwdFlow(Node node, Cc cc, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, Configuration config) { not fullBarrier(node, config) and ( - config.isSource(node) and + sourceNode(node, config) and cc = false or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and localFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, cc, config) and additionalLocalFlowStep(mid, node, config) ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and jumpStep(mid, node, config) and cc = false ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, config) and additionalJumpStep(mid, node, config) and cc = false ) or // store - exists(Node mid | + exists(NodeEx mid | useFieldFlow(config) and fwdFlow(mid, cc, config) and - store(mid, _, node, _) and + store(mid, _, node, _, config) and not outBarrier(mid, config) ) or @@ -318,9 +457,9 @@ private module Stage1 { ) or // flow into a callable - exists(Node arg | + exists(NodeEx arg | fwdFlow(arg, _, config) and - viableParamArg(_, node, arg) and + viableParamArgEx(_, node, arg) and cc = true ) or @@ -335,13 +474,13 @@ private module Stage1 { ) } - private predicate fwdFlow(Node node, Configuration config) { fwdFlow(node, _, config) } + private predicate fwdFlow(NodeEx node, Configuration config) { fwdFlow(node, _, config) } pragma[nomagic] - private predicate fwdFlowRead(Content c, Node node, Cc cc, Configuration config) { - exists(Node mid | + private predicate fwdFlowRead(Content c, NodeEx node, Cc cc, Configuration config) { + exists(NodeEx mid | fwdFlow(mid, cc, config) and - read(mid, c, node) + read(mid, c, node, config) ) } @@ -350,33 +489,33 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node, TypedContent tc | + exists(NodeEx mid, NodeEx node, TypedContent tc | not fullBarrier(node, config) and useFieldFlow(config) and fwdFlow(mid, _, config) and - store(mid, tc, node, _) and + store(mid, tc, node, _, config) and c = tc.getContent() ) } pragma[nomagic] private predicate fwdFlowReturnPosition(ReturnPosition pos, Cc cc, Configuration config) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | fwdFlow(ret, cc, config) and - getReturnPosition(ret) = pos + ret.getReturnPosition() = pos ) } pragma[nomagic] - private predicate fwdFlowOut(DataFlowCall call, Node out, Cc cc, Configuration config) { + private predicate fwdFlowOut(DataFlowCall call, NodeEx out, Cc cc, Configuration config) { exists(ReturnPosition pos | fwdFlowReturnPosition(pos, cc, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) ) } pragma[nomagic] - private predicate fwdFlowOutFromArg(DataFlowCall call, Node out, Configuration config) { + private predicate fwdFlowOutFromArg(DataFlowCall call, NodeEx out, Configuration config) { fwdFlowOut(call, out, true, config) } @@ -385,9 +524,9 @@ private module Stage1 { */ pragma[nomagic] private predicate fwdFlowIsEntered(DataFlowCall call, Cc cc, Configuration config) { - exists(ArgNode arg | + exists(ArgNodeEx arg | fwdFlow(arg, cc, config) and - viableParamArg(call, _, arg) + viableParamArgEx(call, _, arg) ) } @@ -399,34 +538,34 @@ private module Stage1 { * the enclosing callable in order to reach a sink. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, Configuration config) { revFlow0(node, toReturn, config) and fwdFlow(node, config) } pragma[nomagic] - private predicate revFlow0(Node node, boolean toReturn, Configuration config) { + private predicate revFlow0(NodeEx node, boolean toReturn, Configuration config) { fwdFlow(node, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false or - exists(Node mid | + exists(NodeEx mid | localFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | additionalLocalFlowStep(node, mid, config) and revFlow(mid, toReturn, config) ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false ) or - exists(Node mid | + exists(NodeEx mid | additionalJumpStep(node, mid, config) and revFlow(mid, _, config) and toReturn = false @@ -439,8 +578,8 @@ private module Stage1 { ) or // read - exists(Node mid, Content c | - read(node, c, mid) and + exists(NodeEx mid, Content c | + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(mid, toReturn, pragma[only_bind_into](config)) ) @@ -457,7 +596,7 @@ private module Stage1 { // flow out of a callable exists(ReturnPosition pos | revFlowOut(pos, config) and - getReturnPosition(node) = pos and + node.(RetNodeEx).getReturnPosition() = pos and toReturn = true ) } @@ -467,20 +606,20 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowConsCand(Content c, Configuration config) { - exists(Node mid, Node node | + exists(NodeEx mid, NodeEx node | fwdFlow(node, pragma[only_bind_into](config)) and - read(node, c, mid) and + read(node, c, mid, config) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and revFlow(pragma[only_bind_into](mid), _, pragma[only_bind_into](config)) ) } pragma[nomagic] - private predicate revFlowStore(Content c, Node node, boolean toReturn, Configuration config) { - exists(Node mid, TypedContent tc | + private predicate revFlowStore(Content c, NodeEx node, boolean toReturn, Configuration config) { + exists(NodeEx mid, TypedContent tc | revFlow(mid, toReturn, pragma[only_bind_into](config)) and fwdFlowConsCand(c, pragma[only_bind_into](config)) and - store(node, tc, mid, _) and + store(node, tc, mid, _, config) and c = tc.getContent() ) } @@ -496,15 +635,15 @@ private module Stage1 { pragma[nomagic] predicate viableReturnPosOutNodeCandFwd1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { fwdFlowReturnPosition(pos, _, config) and - viableReturnPosOut(call, pos, out) + viableReturnPosOutEx(call, pos, out) } pragma[nomagic] private predicate revFlowOut(ReturnPosition pos, Configuration config) { - exists(DataFlowCall call, Node out | + exists(DataFlowCall call, NodeEx out | revFlow(out, _, config) and viableReturnPosOutNodeCandFwd1(call, pos, out, config) ) @@ -512,22 +651,24 @@ private module Stage1 { pragma[nomagic] predicate viableParamArgNodeCandFwd1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { - viableParamArg(call, p, arg) and + viableParamArgEx(call, p, arg) and fwdFlow(arg, config) } pragma[nomagic] - private predicate revFlowIn(DataFlowCall call, ArgNode arg, boolean toReturn, Configuration config) { - exists(ParamNode p | + private predicate revFlowIn( + DataFlowCall call, ArgNodeEx arg, boolean toReturn, Configuration config + ) { + exists(ParamNodeEx p | revFlow(p, toReturn, config) and viableParamArgNodeCandFwd1(call, p, arg, config) ) } pragma[nomagic] - private predicate revFlowInToReturn(DataFlowCall call, ArgNode arg, Configuration config) { + private predicate revFlowInToReturn(DataFlowCall call, ArgNodeEx arg, Configuration config) { revFlowIn(call, arg, true, config) } @@ -538,7 +679,7 @@ private module Stage1 { */ pragma[nomagic] private predicate revFlowIsReturned(DataFlowCall call, boolean toReturn, Configuration config) { - exists(Node out | + exists(NodeEx out | revFlow(out, toReturn, config) and fwdFlowOutFromArg(call, out, config) ) @@ -546,32 +687,33 @@ private module Stage1 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Content c | revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(node2, pragma[only_bind_into](config)) and - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and c = tc.getContent() and exists(ap1) ) } pragma[nomagic] - predicate readStepCand(Node n1, Content c, Node n2, Configuration config) { + predicate readStepCand(NodeEx n1, Content c, NodeEx n2, Configuration config) { revFlowIsReadAndStored(c, pragma[only_bind_into](config)) and revFlow(n2, pragma[only_bind_into](config)) and - read(n1, c, n2) + read(n1, c, n2, pragma[only_bind_into](config)) } pragma[nomagic] - predicate revFlow(Node node, Configuration config) { revFlow(node, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, config) } - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow(node, toReturn, config) and exists(returnAp) and exists(ap) } - private predicate throughFlowNodeCand(Node node, Configuration config) { + private predicate throughFlowNodeCand(NodeEx node, Configuration config) { revFlow(node, true, config) and fwdFlow(node, true, config) and not inBarrier(node, config) and @@ -583,9 +725,9 @@ private module Stage1 { private predicate returnFlowCallableNodeCand( DataFlowCallable callable, ReturnKindExt kind, Configuration config ) { - exists(ReturnNodeExt ret | + exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getNodeEnclosingCallable(ret) and + callable = getEnclosingCallable(ret) and kind = ret.getKind() ) } @@ -594,22 +736,20 @@ private module Stage1 { * Holds if flow may enter through `p` and reach a return node making `p` a * candidate for the origin of a summary. */ - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getNodeEnclosingCallable(p) = c and + getEnclosingCallable(p) = c and exists(ap) and // we don't expect a parameter to return stored in itself - not exists(int pos | - kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos) - ) + not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() ) } pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(ArgNode arg, boolean toReturn | + exists(ArgNodeEx arg, boolean toReturn | revFlow(arg, toReturn, config) and revFlowInToReturn(call, arg, config) and revFlowIsReturned(call, toReturn, config) @@ -618,35 +758,35 @@ private module Stage1 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, config)) and + nodes = count(NodeEx node | fwdFlow(node, config)) and fields = count(Content f0 | fwdFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | fwdFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | fwdFlow(n, b, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, config)) and fields = count(Content f0 | revFlowConsCand(f0, config)) and conscand = -1 and - tuples = count(Node n, boolean b | revFlow(n, b, config)) + tuples = count(NodeEx n, boolean b | revFlow(n, b, config)) } /* End: Stage 1 logic. */ } pragma[noinline] -private predicate localFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate localFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and localFlowStep(node1, node2, config) } pragma[noinline] -private predicate additionalLocalFlowStepNodeCand1(Node node1, Node node2, Configuration config) { +private predicate additionalLocalFlowStepNodeCand1(NodeEx node1, NodeEx node2, Configuration config) { Stage1::revFlow(node2, config) and additionalLocalFlowStep(node1, node2, config) } pragma[nomagic] private predicate viableReturnPosOutNodeCand1( - DataFlowCall call, ReturnPosition pos, Node out, Configuration config + DataFlowCall call, ReturnPosition pos, NodeEx out, Configuration config ) { Stage1::revFlow(out, config) and Stage1::viableReturnPosOutNodeCandFwd1(call, pos, out, config) @@ -659,9 +799,9 @@ private predicate viableReturnPosOutNodeCand1( */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, Configuration config ) { - viableReturnPosOutNodeCand1(call, getReturnPosition(ret), out, config) and + viableReturnPosOutNodeCand1(call, ret.getReturnPosition(), out, config) and Stage1::revFlow(ret, config) and not outBarrier(ret, config) and not inBarrier(out, config) @@ -669,7 +809,7 @@ private predicate flowOutOfCallNodeCand1( pragma[nomagic] private predicate viableParamArgNodeCand1( - DataFlowCall call, ParamNode p, ArgNode arg, Configuration config + DataFlowCall call, ParamNodeEx p, ArgNodeEx arg, Configuration config ) { Stage1::viableParamArgNodeCandFwd1(call, p, arg, config) and Stage1::revFlow(arg, config) @@ -681,7 +821,7 @@ private predicate viableParamArgNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, Configuration config ) { viableParamArgNodeCand1(call, p, arg, config) and Stage1::revFlow(p, config) and @@ -694,9 +834,9 @@ private predicate flowIntoCallNodeCand1( * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int branch(Node n1, Configuration conf) { +private int branch(NodeEx n1, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n1, n, conf) or flowIntoCallNodeCand1(_, n1, n, conf) ) } @@ -706,9 +846,9 @@ private int branch(Node n1, Configuration conf) { * edge in the graph of paths between sources and sinks that ignores call * contexts. */ -private int join(Node n2, Configuration conf) { +private int join(NodeEx n2, Configuration conf) { result = - strictcount(Node n | + strictcount(NodeEx n | flowOutOfCallNodeCand1(_, n, n2, conf) or flowIntoCallNodeCand1(_, n, n2, conf) ) } @@ -722,7 +862,7 @@ private int join(Node n2, Configuration conf) { */ pragma[nomagic] private predicate flowOutOfCallNodeCand1( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, ret, out, config) and exists(int b, int j | @@ -741,7 +881,7 @@ private predicate flowOutOfCallNodeCand1( */ pragma[nomagic] private predicate flowIntoCallNodeCand1( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCallNodeCand1(call, arg, p, config) and exists(int b, int j | @@ -767,7 +907,7 @@ private module Stage2 { bindingset[result, ap] private ApApprox getApprox(Ap ap) { any() } - private ApNil getApNil(Node node) { PrevStage::revFlow(node, _) and exists(result) } + private ApNil getApNil(NodeEx node) { PrevStage::revFlow(node, _) and exists(result) } bindingset[tc, tail] private Ap apCons(TypedContent tc, Ap tail) { result = true and exists(tc) and exists(tail) } @@ -810,10 +950,10 @@ private module Stage2 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { ( preservesValue = true and @@ -834,17 +974,17 @@ private module Stage2 { private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 2 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -857,14 +997,14 @@ private module Stage2 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -875,7 +1015,7 @@ private module Stage2 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -883,7 +1023,7 @@ private module Stage2 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -924,7 +1064,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -948,7 +1088,7 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -957,13 +1097,13 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -971,15 +1111,15 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -989,9 +1129,9 @@ private module Stage2 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1008,7 +1148,7 @@ private module Stage2 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, getApprox(ap), config) ) @@ -1016,21 +1156,23 @@ private module Stage2 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1041,7 +1183,7 @@ private module Stage2 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1058,41 +1200,41 @@ private module Stage2 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1108,7 +1250,7 @@ private module Stage2 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1132,7 +1274,7 @@ private module Stage2 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1146,7 +1288,7 @@ private module Stage2 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1155,10 +1297,10 @@ private module Stage2 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1167,8 +1309,10 @@ private module Stage2 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1178,9 +1322,9 @@ private module Stage2 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1197,7 +1341,7 @@ private module Stage2 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1206,16 +1350,17 @@ private module Stage2 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1224,7 +1369,7 @@ private module Stage2 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1236,20 +1381,20 @@ private module Stage2 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1257,7 +1402,7 @@ private module Stage2 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1266,23 +1411,23 @@ private module Stage2 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 2 logic. */ } pragma[nomagic] private predicate flowOutOfCallNodeCand2( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1291,7 +1436,8 @@ private predicate flowOutOfCallNodeCand2( pragma[nomagic] private predicate flowIntoCallNodeCand2( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand1(call, node1, node2, allowsFieldFlow, config) and Stage2::revFlow(node2, pragma[only_bind_into](config)) and @@ -1303,10 +1449,10 @@ private module LocalFlowBigStep { * A node where some checking is required, and hence the big-step relation * is not allowed to step over. */ - private class FlowCheckNode extends Node { + private class FlowCheckNode extends NodeEx { FlowCheckNode() { - castNode(this) or - clearsContentCached(this, _) + castNode(this.asNode()) or + clearsContentCached(this.asNode(), _) } } @@ -1314,16 +1460,16 @@ private module LocalFlowBigStep { * Holds if `node` can be the first node in a maximal subsequence of local * flow steps in a dataflow path. */ - predicate localFlowEntry(Node node, Configuration config) { + predicate localFlowEntry(NodeEx node, Configuration config) { Stage2::revFlow(node, config) and ( - config.isSource(node) or + sourceNode(node, config) or jumpStep(_, node, config) or additionalJumpStep(_, node, config) or - node instanceof ParamNode or - node instanceof OutNodeExt or - store(_, _, node, _) or - read(_, _, node) or + node instanceof ParamNodeEx or + node.asNode() instanceof OutNodeExt or + store(_, _, node, _, config) or + read(_, _, node, config) or node instanceof FlowCheckNode ) } @@ -1332,23 +1478,25 @@ private module LocalFlowBigStep { * Holds if `node` can be the last node in a maximal subsequence of local * flow steps in a dataflow path. */ - private predicate localFlowExit(Node node, Configuration config) { - exists(Node next | Stage2::revFlow(next, config) | + private predicate localFlowExit(NodeEx node, Configuration config) { + exists(NodeEx next | Stage2::revFlow(next, config) | jumpStep(node, next, config) or additionalJumpStep(node, next, config) or flowIntoCallNodeCand1(_, node, next, config) or flowOutOfCallNodeCand1(_, node, next, config) or - store(node, _, next, _) or - read(node, _, next) + store(node, _, next, _, config) or + read(node, _, next, config) ) or node instanceof FlowCheckNode or - config.isSink(node) + sinkNode(node, config) } pragma[noinline] - private predicate additionalLocalFlowStepNodeCand2(Node node1, Node node2, Configuration config) { + private predicate additionalLocalFlowStepNodeCand2( + NodeEx node1, NodeEx node2, Configuration config + ) { additionalLocalFlowStepNodeCand1(node1, node2, config) and Stage2::revFlow(node1, _, _, false, pragma[only_bind_into](config)) and Stage2::revFlow(node2, _, _, false, pragma[only_bind_into](config)) @@ -1363,39 +1511,39 @@ private module LocalFlowBigStep { */ pragma[nomagic] private predicate localFlowStepPlus( - Node node1, Node node2, boolean preservesValue, DataFlowType t, Configuration config, + NodeEx node1, NodeEx node2, boolean preservesValue, DataFlowType t, Configuration config, LocalCallContext cc ) { - not isUnreachableInCallCached(node2, cc.(LocalCallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node2.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and ( localFlowEntry(node1, pragma[only_bind_into](config)) and ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getNodeDataFlowType(node1) + t = getDataFlowType(node1) // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getNodeDataFlowType(node2) + t = getDataFlowType(node2) ) and node1 != node2 and - cc.relevantFor(getNodeEnclosingCallable(node1)) and - not isUnreachableInCallCached(node1, cc.(LocalCallContextSpecificCall).getCall()) and + cc.relevantFor(getEnclosingCallable(node1)) and + not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, preservesValue, t, pragma[only_bind_into](config), cc) and localFlowStepNodeCand1(mid, node2, config) and not mid instanceof FlowCheckNode and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) or - exists(Node mid | + exists(NodeEx mid | localFlowStepPlus(node1, mid, _, _, pragma[only_bind_into](config), cc) and additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getNodeDataFlowType(node2) and + t = getDataFlowType(node2) and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1407,8 +1555,8 @@ private module LocalFlowBigStep { */ pragma[nomagic] predicate localFlowBigStep( - Node node1, Node node2, boolean preservesValue, AccessPathFrontNil apf, Configuration config, - LocalCallContext callContext + NodeEx node1, NodeEx node2, boolean preservesValue, AccessPathFrontNil apf, + Configuration config, LocalCallContext callContext ) { localFlowStepPlus(node1, node2, preservesValue, apf.getType(), config, callContext) and localFlowExit(node2, config) @@ -1428,8 +1576,8 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -1473,10 +1621,10 @@ private module Stage3 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { any() } + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { any() } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap, config, _) and exists(lcc) } @@ -1485,12 +1633,16 @@ private module Stage3 { private predicate flowIntoCall = flowIntoCallNodeCand2/5; + pragma[nomagic] + private predicate clear(NodeEx node, Ap ap) { ap.isClearedAt(node.asNode()) } + + pragma[nomagic] + private predicate castingNodeEx(NodeEx node) { node.asNode() instanceof CastingNode } + bindingset[node, ap] - private predicate filter(Node node, Ap ap) { - not ap.isClearedAt(node) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) - else any() + private predicate filter(NodeEx node, Ap ap) { + not clear(node, ap) and + if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() } bindingset[ap, contentType] @@ -1501,7 +1653,7 @@ private module Stage3 { } /* Begin: Stage 3 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -1514,11 +1666,11 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -1531,21 +1683,21 @@ private module Stage3 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -1556,7 +1708,7 @@ private module Stage3 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -1564,7 +1716,7 @@ private module Stage3 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -1605,7 +1757,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -1629,7 +1781,7 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -1638,13 +1790,13 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1652,15 +1804,15 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1670,9 +1822,9 @@ private module Stage3 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -1689,7 +1841,7 @@ private module Stage3 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -1697,21 +1849,23 @@ private module Stage3 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -1722,7 +1876,7 @@ private module Stage3 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -1739,41 +1893,41 @@ private module Stage3 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -1789,7 +1943,7 @@ private module Stage3 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -1813,7 +1967,7 @@ private module Stage3 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -1827,7 +1981,7 @@ private module Stage3 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -1836,10 +1990,10 @@ private module Stage3 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -1848,8 +2002,10 @@ private module Stage3 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -1859,9 +2015,9 @@ private module Stage3 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -1878,7 +2034,7 @@ private module Stage3 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -1887,16 +2043,17 @@ private module Stage3 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -1905,7 +2062,7 @@ private module Stage3 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -1917,20 +2074,20 @@ private module Stage3 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -1938,7 +2095,7 @@ private module Stage3 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -1947,16 +2104,16 @@ private module Stage3 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 3 logic. */ } @@ -1965,7 +2122,7 @@ private module Stage3 { * Holds if `argApf` is recorded as the summary context for flow reaching `node` * and remains relevant for the following pruning stage. */ -private predicate flowCandSummaryCtx(Node node, AccessPathFront argApf, Configuration config) { +private predicate flowCandSummaryCtx(NodeEx node, AccessPathFront argApf, Configuration config) { exists(AccessPathFront apf | Stage3::revFlow(node, true, _, apf, config) and Stage3::fwdFlow(node, true, TAccessPathFrontSome(argApf), apf, config) @@ -1980,7 +2137,7 @@ private predicate expensiveLen2unfolding(TypedContent tc, Configuration config) exists(int tails, int nodes, int apLimit, int tupleLimit | tails = strictcount(AccessPathFront apf | Stage3::consCand(tc, apf, config)) and nodes = - strictcount(Node n | + strictcount(NodeEx n | Stage3::revFlow(n, _, _, any(AccessPathFrontHead apf | apf.getHead() = tc), config) or flowCandSummaryCtx(n, any(AccessPathFrontHead apf | apf.getHead() = tc), config) @@ -2175,8 +2332,8 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } - private ApNil getApNil(Node node) { - PrevStage::revFlow(node, _) and result = TNil(getNodeDataFlowType(node)) + private ApNil getApNil(NodeEx node) { + PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) } bindingset[tc, tail] @@ -2218,23 +2375,22 @@ private module Stage4 { } bindingset[node, cc, config] - private LocalCc getLocalCc(Node node, Cc cc, Configuration config) { + private LocalCc getLocalCc(NodeEx node, Cc cc, Configuration config) { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(node)) + getEnclosingCallable(node)) } private predicate localStep( - Node node1, Node node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc + NodeEx node1, NodeEx node2, boolean preservesValue, ApNil ap, Configuration config, LocalCc lcc ) { localFlowBigStep(node1, node2, preservesValue, ap.getFront(), config, lcc) } pragma[nomagic] private predicate flowOutOfCall( - DataFlowCall call, ReturnNodeExt node1, Node node2, boolean allowsFieldFlow, - Configuration config + DataFlowCall call, RetNodeEx node1, NodeEx node2, boolean allowsFieldFlow, Configuration config ) { flowOutOfCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2243,7 +2399,8 @@ private module Stage4 { pragma[nomagic] private predicate flowIntoCall( - DataFlowCall call, ArgNode node1, ParamNode node2, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx node1, ParamNodeEx node2, boolean allowsFieldFlow, + Configuration config ) { flowIntoCallNodeCand2(call, node1, node2, allowsFieldFlow, config) and PrevStage::revFlow(node2, _, _, _, pragma[only_bind_into](config)) and @@ -2251,14 +2408,14 @@ private module Stage4 { } bindingset[node, ap] - private predicate filter(Node node, Ap ap) { any() } + private predicate filter(NodeEx node, Ap ap) { any() } // Type checking is not necessary here as it has already been done in stage 3. bindingset[ap, contentType] private predicate typecheckStore(Ap ap, DataFlowType contentType) { any() } /* Begin: Stage 4 logic. */ - private predicate flowCand(Node node, ApApprox apa, Configuration config) { + private predicate flowCand(NodeEx node, ApApprox apa, Configuration config) { PrevStage::revFlow(node, _, _, apa, config) } @@ -2271,11 +2428,11 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughOutOfCall( - DataFlowCall call, ReturnNodeExt ret, Node out, boolean allowsFieldFlow, Configuration config + DataFlowCall call, RetNodeEx ret, NodeEx out, boolean allowsFieldFlow, Configuration config ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getNodeEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, pragma[only_bind_into](config)) } @@ -2288,21 +2445,21 @@ private module Stage4 { * argument. */ pragma[nomagic] - predicate fwdFlow(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + predicate fwdFlow(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { fwdFlow0(node, cc, argAp, ap, config) and flowCand(node, unbindApa(getApprox(ap)), config) and filter(node, ap) } pragma[nomagic] - private predicate fwdFlow0(Node node, Cc cc, ApOption argAp, Ap ap, Configuration config) { + private predicate fwdFlow0(NodeEx node, Cc cc, ApOption argAp, Ap ap, Configuration config) { flowCand(node, _, config) and - config.isSource(node) and + sourceNode(node, config) and cc = ccNone() and argAp = apNone() and ap = getApNil(node) or - exists(Node mid, Ap ap0, LocalCc localCc | + exists(NodeEx mid, Ap ap0, LocalCc localCc | fwdFlow(mid, cc, argAp, ap0, config) and localCc = getLocalCc(mid, cc, config) | @@ -2313,7 +2470,7 @@ private module Stage4 { ap0 instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | fwdFlow(mid, _, _, ap, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and jumpStep(mid, node, config) and @@ -2321,7 +2478,7 @@ private module Stage4 { argAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(mid, _, _, nil, pragma[only_bind_into](config)) and flowCand(node, _, pragma[only_bind_into](config)) and additionalJumpStep(mid, node, config) and @@ -2362,7 +2519,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowStore( - Node node1, Ap ap1, TypedContent tc, Node node2, Cc cc, ApOption argAp, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { exists(DataFlowType contentType | fwdFlow(node1, cc, argAp, ap1, config) and @@ -2386,7 +2543,7 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowRead( - Ap ap, Content c, Node node1, Node node2, Cc cc, ApOption argAp, Configuration config + Ap ap, Content c, NodeEx node1, NodeEx node2, Cc cc, ApOption argAp, Configuration config ) { fwdFlow(node1, cc, argAp, ap, config) and PrevStage::readStepCand(node1, c, node2, config) and @@ -2395,13 +2552,13 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowIn( - DataFlowCall call, ParamNode p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, + DataFlowCall call, ParamNodeEx p, Cc outercc, Cc innercc, ApOption argAp, Ap ap, Configuration config ) { - exists(ArgNode arg, boolean allowsFieldFlow | + exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getNodeEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2409,15 +2566,15 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutNotFromArg( - Node out, Cc ccOut, ApOption argAp, Ap ap, Configuration config + NodeEx out, Cc ccOut, ApOption argAp, Ap ap, Configuration config ) { exists( - DataFlowCall call, ReturnNodeExt ret, boolean allowsFieldFlow, CcNoCall innercc, + DataFlowCall call, RetNodeEx ret, boolean allowsFieldFlow, CcNoCall innercc, DataFlowCallable inner | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getNodeEnclosingCallable(ret) and + inner = getEnclosingCallable(ret) and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2427,9 +2584,9 @@ private module Stage4 { pragma[nomagic] private predicate fwdFlowOutFromArg( - DataFlowCall call, Node out, Ap argAp, Ap ap, Configuration config + DataFlowCall call, NodeEx out, Ap argAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, boolean allowsFieldFlow, CcCall ccc | + exists(RetNodeEx ret, boolean allowsFieldFlow, CcCall ccc | fwdFlow(ret, ccc, apSome(argAp), ap, config) and flowThroughOutOfCall(call, ret, out, allowsFieldFlow, config) and ccc.matchesCall(call) @@ -2446,7 +2603,7 @@ private module Stage4 { private predicate fwdFlowIsEntered( DataFlowCall call, Cc cc, ApOption argAp, Ap ap, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | fwdFlowIn(call, p, cc, _, argAp, ap, config) and PrevStage::parameterMayFlowThrough(p, _, unbindApa(getApprox(ap)), config) ) @@ -2454,21 +2611,23 @@ private module Stage4 { pragma[nomagic] private predicate storeStepFwd( - Node node1, Ap ap1, TypedContent tc, Node node2, Ap ap2, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, Ap ap2, Configuration config ) { fwdFlowStore(node1, ap1, tc, node2, _, _, config) and ap2 = apCons(tc, ap1) and fwdFlowRead(ap2, tc.getContent(), _, _, _, _, config) } - private predicate readStepFwd(Node n1, Ap ap1, Content c, Node n2, Ap ap2, Configuration config) { + private predicate readStepFwd( + NodeEx n1, Ap ap1, Content c, NodeEx n2, Ap ap2, Configuration config + ) { fwdFlowRead(ap1, c, n1, n2, _, _, config) and fwdFlowConsCand(ap1, c, ap2, config) } pragma[nomagic] private predicate callMayFlowThroughFwd(DataFlowCall call, Configuration config) { - exists(Ap argAp0, Node out, Cc cc, ApOption argAp, Ap ap | + exists(Ap argAp0, NodeEx out, Cc cc, ApOption argAp, Ap ap | fwdFlow(out, pragma[only_bind_into](cc), pragma[only_bind_into](argAp), ap, pragma[only_bind_into](config)) and fwdFlowOutFromArg(call, out, argAp0, ap, config) and @@ -2479,7 +2638,7 @@ private module Stage4 { pragma[nomagic] private predicate flowThroughIntoCall( - DataFlowCall call, ArgNode arg, ParamNode p, boolean allowsFieldFlow, Configuration config + DataFlowCall call, ArgNodeEx arg, ParamNodeEx p, boolean allowsFieldFlow, Configuration config ) { flowIntoCall(call, arg, p, allowsFieldFlow, config) and fwdFlow(arg, _, _, _, pragma[only_bind_into](config)) and @@ -2496,41 +2655,41 @@ private module Stage4 { * the access path of the returned value. */ pragma[nomagic] - predicate revFlow(Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { + predicate revFlow(NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config) { revFlow0(node, toReturn, returnAp, ap, config) and fwdFlow(node, _, _, ap, config) } pragma[nomagic] private predicate revFlow0( - Node node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config + NodeEx node, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { fwdFlow(node, _, _, ap, config) and - config.isSink(node) and + sinkNode(node, config) and toReturn = false and returnAp = apNone() and ap instanceof ApNil or - exists(Node mid | + exists(NodeEx mid | localStep(node, mid, true, _, config, _) and revFlow(mid, toReturn, returnAp, ap, config) ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and localStep(node, mid, false, _, config, _) and revFlow(mid, toReturn, returnAp, nil, pragma[only_bind_into](config)) and ap instanceof ApNil ) or - exists(Node mid | + exists(NodeEx mid | jumpStep(node, mid, config) and revFlow(mid, _, _, ap, config) and toReturn = false and returnAp = apNone() ) or - exists(Node mid, ApNil nil | + exists(NodeEx mid, ApNil nil | fwdFlow(node, _, _, ap, pragma[only_bind_into](config)) and additionalJumpStep(node, mid, config) and revFlow(pragma[only_bind_into](mid), _, _, nil, pragma[only_bind_into](config)) and @@ -2546,7 +2705,7 @@ private module Stage4 { ) or // read - exists(Node mid, Ap ap0 | + exists(NodeEx mid, Ap ap0 | revFlow(mid, toReturn, returnAp, ap0, config) and readStepFwd(node, ap, _, mid, ap0, config) ) @@ -2570,7 +2729,7 @@ private module Stage4 { pragma[nomagic] private predicate revFlowStore( - Ap ap0, Content c, Ap ap, Node node, TypedContent tc, Node mid, boolean toReturn, + Ap ap0, Content c, Ap ap, NodeEx node, TypedContent tc, NodeEx mid, boolean toReturn, ApOption returnAp, Configuration config ) { revFlow(mid, toReturn, returnAp, ap0, config) and @@ -2584,7 +2743,7 @@ private module Stage4 { */ pragma[nomagic] private predicate revFlowConsCand(Ap cons, Content c, Ap tail, Configuration config) { - exists(Node mid, Ap tail0 | + exists(NodeEx mid, Ap tail0 | revFlow(mid, _, _, tail, config) and tail = pragma[only_bind_into](tail0) and readStepFwd(_, cons, c, mid, tail0, config) @@ -2593,10 +2752,10 @@ private module Stage4 { pragma[nomagic] private predicate revFlowOut( - DataFlowCall call, ReturnNodeExt ret, boolean toReturn, ApOption returnAp, Ap ap, + DataFlowCall call, RetNodeEx ret, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(Node out, boolean allowsFieldFlow | + exists(NodeEx out, boolean allowsFieldFlow | revFlow(out, toReturn, returnAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) | @@ -2605,8 +2764,10 @@ private module Stage4 { } pragma[nomagic] - private predicate revFlowInNotToReturn(ArgNode arg, ApOption returnAp, Ap ap, Configuration config) { - exists(ParamNode p, boolean allowsFieldFlow | + private predicate revFlowInNotToReturn( + ArgNodeEx arg, ApOption returnAp, Ap ap, Configuration config + ) { + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, false, returnAp, ap, config) and flowIntoCall(_, arg, p, allowsFieldFlow, config) | @@ -2616,9 +2777,9 @@ private module Stage4 { pragma[nomagic] private predicate revFlowInToReturn( - DataFlowCall call, ArgNode arg, Ap returnAp, Ap ap, Configuration config + DataFlowCall call, ArgNodeEx arg, Ap returnAp, Ap ap, Configuration config ) { - exists(ParamNode p, boolean allowsFieldFlow | + exists(ParamNodeEx p, boolean allowsFieldFlow | revFlow(p, true, apSome(returnAp), ap, config) and flowThroughIntoCall(call, arg, p, allowsFieldFlow, config) | @@ -2635,7 +2796,7 @@ private module Stage4 { private predicate revFlowIsReturned( DataFlowCall call, boolean toReturn, ApOption returnAp, Ap ap, Configuration config ) { - exists(ReturnNodeExt ret, CcCall ccc | + exists(RetNodeEx ret, CcCall ccc | revFlowOut(call, ret, toReturn, returnAp, ap, config) and fwdFlow(ret, ccc, apSome(_), ap, config) and ccc.matchesCall(call) @@ -2644,16 +2805,17 @@ private module Stage4 { pragma[nomagic] predicate storeStepCand( - Node node1, Ap ap1, TypedContent tc, Node node2, DataFlowType contentType, Configuration config + NodeEx node1, Ap ap1, TypedContent tc, NodeEx node2, DataFlowType contentType, + Configuration config ) { exists(Ap ap2, Content c | - store(node1, tc, node2, contentType) and + store(node1, tc, node2, contentType, config) and revFlowStore(ap2, c, ap1, node1, tc, node2, _, _, config) and revFlowConsCand(ap2, c, ap1, config) ) } - predicate readStepCand(Node node1, Content c, Node node2, Configuration config) { + predicate readStepCand(NodeEx node1, Content c, NodeEx node2, Configuration config) { exists(Ap ap1, Ap ap2 | revFlow(node2, _, _, pragma[only_bind_into](ap2), pragma[only_bind_into](config)) and readStepFwd(node1, ap1, c, node2, ap2, config) and @@ -2662,7 +2824,7 @@ private module Stage4 { ) } - predicate revFlow(Node node, Configuration config) { revFlow(node, _, _, _, config) } + predicate revFlow(NodeEx node, Configuration config) { revFlow(node, _, _, _, config) } private predicate fwdConsCand(TypedContent tc, Ap ap, Configuration config) { storeStepFwd(_, ap, tc, _, _, config) @@ -2674,20 +2836,20 @@ private module Stage4 { pragma[noinline] private predicate parameterFlow( - ParamNode p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config + ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getNodeEnclosingCallable(p) + c = getEnclosingCallable(p) } - predicate parameterMayFlowThrough(ParamNode p, DataFlowCallable c, Ap ap, Configuration config) { - exists(ReturnNodeExt ret, Ap ap0, ReturnKindExt kind, int pos | + predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { + exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getNodeEnclosingCallable(ret) and + c = getEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and - p.isParameterOf(_, pos) and + p.getPosition() = pos and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = pos ) @@ -2695,7 +2857,7 @@ private module Stage4 { pragma[nomagic] predicate callMayFlowThroughRev(DataFlowCall call, Configuration config) { - exists(Ap returnAp0, ArgNode arg, boolean toReturn, ApOption returnAp, Ap ap | + exists(Ap returnAp0, ArgNodeEx arg, boolean toReturn, ApOption returnAp, Ap ap | revFlow(arg, toReturn, returnAp, ap, config) and revFlowInToReturn(call, arg, returnAp0, ap, config) and revFlowIsReturned(call, toReturn, returnAp, returnAp0, config) @@ -2704,16 +2866,16 @@ private module Stage4 { predicate stats(boolean fwd, int nodes, int fields, int conscand, int tuples, Configuration config) { fwd = true and - nodes = count(Node node | fwdFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | fwdFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | fwdConsCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | fwdConsCand(f0, ap, config)) and - tuples = count(Node n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) + tuples = count(NodeEx n, Cc cc, ApOption argAp, Ap ap | fwdFlow(n, cc, argAp, ap, config)) or fwd = false and - nodes = count(Node node | revFlow(node, _, _, _, config)) and + nodes = count(NodeEx node | revFlow(node, _, _, _, config)) and fields = count(TypedContent f0 | consCand(f0, _, config)) and conscand = count(TypedContent f0, Ap ap | consCand(f0, ap, config)) and - tuples = count(Node n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) + tuples = count(NodeEx n, boolean b, ApOption retAp, Ap ap | revFlow(n, b, retAp, ap, config)) } /* End: Stage 4 logic. */ } @@ -2723,18 +2885,18 @@ private Configuration unbindConf(Configuration conf) { exists(Configuration c | result = pragma[only_bind_into](c) and conf = pragma[only_bind_into](c)) } -private predicate nodeMayUseSummary(Node n, AccessPathApprox apa, Configuration config) { +private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuration config) { exists(DataFlowCallable c, AccessPathApprox apa0 | Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getNodeEnclosingCallable(n) = c + getEnclosingCallable(n) = c ) } private newtype TSummaryCtx = TSummaryCtxNone() or - TSummaryCtxSome(ParamNode p, AccessPath ap) { + TSummaryCtxSome(ParamNodeEx p, AccessPath ap) { Stage4::parameterMayFlowThrough(p, _, ap.getApprox(), _) } @@ -2755,7 +2917,7 @@ private class SummaryCtxNone extends SummaryCtx, TSummaryCtxNone { /** A summary context from which a flow summary can be generated. */ private class SummaryCtxSome extends SummaryCtx, TSummaryCtxSome { - private ParamNode p; + private ParamNodeEx p; private AccessPath ap; SummaryCtxSome() { this = TSummaryCtxSome(p, ap) } @@ -2788,7 +2950,9 @@ private int count1to2unfold(AccessPathApproxCons1 apa, Configuration config) { private int countNodesUsingAccessPath(AccessPathApprox apa, Configuration config) { result = - strictcount(Node n | Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config)) + strictcount(NodeEx n | + Stage4::revFlow(n, _, _, apa, config) or nodeMayUseSummary(n, apa, config) + ) } /** @@ -2880,13 +3044,13 @@ private newtype TAccessPath = } private newtype TPathNode = - TPathNodeMid(Node node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { + TPathNodeMid(NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap, Configuration config) { // A PathNode is introduced by a source ... Stage4::revFlow(node, config) and - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -2895,12 +3059,12 @@ private newtype TPathNode = Stage4::revFlow(node, _, _, ap.getApprox(), pragma[only_bind_into](config)) ) } or - TPathNodeSink(Node node, Configuration config) { - pragma[only_bind_into](config).isSink(node) and + TPathNodeSink(NodeEx node, Configuration config) { + sinkNode(node, pragma[only_bind_into](config)) and Stage4::revFlow(node, pragma[only_bind_into](config)) and ( // A sink that is also a source ... - config.isSource(node) + sourceNode(node, config) or // ... or a sink that can be reached from a source exists(PathNodeMid mid | @@ -3101,15 +3265,17 @@ class PathNode extends TPathNode { } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.(PathNodeImpl).getNodeEx().projectToNode() = result } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } private predicate isHidden() { - hiddenNode(this.getNode()) and + hiddenNode(this.(PathNodeImpl).getNodeEx().asNode()) and not this.isSource() and not this instanceof PathNodeSink + or + this.(PathNodeImpl).getNodeEx() instanceof TNodeImplicitRead } private PathNode getASuccessorIfHidden() { @@ -3131,6 +3297,8 @@ class PathNode extends TPathNode { abstract private class PathNodeImpl extends PathNode { abstract PathNode getASuccessorImpl(); + abstract NodeEx getNodeEx(); + private string ppAp() { this instanceof PathNodeSink and result = "" or @@ -3145,14 +3313,14 @@ abstract private class PathNodeImpl extends PathNode { result = " <" + this.(PathNodeMid).getCallContext().toString() + ">" } - override string toString() { result = this.getNode().toString() + ppAp() } + override string toString() { result = this.getNodeEx().toString() + ppAp() } - override string toStringWithContext() { result = this.getNode().toString() + ppAp() + ppCtx() } + override string toStringWithContext() { result = this.getNodeEx().toString() + ppAp() + ppCtx() } override predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } } @@ -3182,7 +3350,7 @@ module PathGraph { * a `CallContext`, and a `Configuration`. */ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { - Node node; + NodeEx node; CallContext cc; SummaryCtx sc; AccessPath ap; @@ -3190,7 +3358,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { PathNodeMid() { this = TPathNodeMid(node, cc, sc, ap, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3201,7 +3369,8 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { override Configuration getConfiguration() { result = config } private PathNodeMid getSuccMid() { - pathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx(), result.getAp()) and + pathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx(), + result.getAp()) and result.getConfiguration() = unbindConf(this.getConfiguration()) } @@ -3212,7 +3381,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { // a final step to a sink via zero steps means we merge the last two steps to prevent trivial-looking edges exists(PathNodeMid mid, PathNodeSink sink | mid = getSuccMid() and - mid.getNode() = sink.getNode() and + mid.getNodeEx() = sink.getNodeEx() and mid.getAp() instanceof AccessPathNil and sink.getConfiguration() = unbindConf(mid.getConfiguration()) and result = sink @@ -3220,7 +3389,7 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { } override predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap instanceof AccessPathNil @@ -3233,33 +3402,35 @@ private class PathNodeMid extends PathNodeImpl, TPathNodeMid { * excluding the `CallContext`. */ private class PathNodeSink extends PathNodeImpl, TPathNodeSink { - Node node; + NodeEx node; Configuration config; PathNodeSink() { this = TPathNodeSink(node, config) } - override Node getNode() { result = node } + override NodeEx getNodeEx() { result = node } override Configuration getConfiguration() { result = config } override PathNode getASuccessorImpl() { none() } - override predicate isSource() { config.isSource(node) } + override predicate isSource() { sourceNode(node, config) } } /** * Holds if data may flow from `mid` to `node`. The last step in or out of * a callable is recorded by `cc`. */ -private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) { - exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC | - midnode = mid.getNode() and +private predicate pathStep( + PathNodeMid mid, NodeEx node, CallContext cc, SummaryCtx sc, AccessPath ap +) { + exists(AccessPath ap0, NodeEx midnode, Configuration conf, LocalCallContext localCC | + midnode = mid.getNodeEx() and conf = mid.getConfiguration() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getNodeEnclosingCallable(midnode)) and + getEnclosingCallable(midnode)) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3269,16 +3440,16 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt ap0 instanceof AccessPathNil ) or - jumpStep(mid.getNode(), node, mid.getConfiguration()) and + jumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and ap = mid.getAp() or - additionalJumpStep(mid.getNode(), node, mid.getConfiguration()) and + additionalJumpStep(mid.getNodeEx(), node, mid.getConfiguration()) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getNodeDataFlowType(node)) + ap = TAccessPathNil(getDataFlowType(node)) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3295,20 +3466,20 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt pragma[nomagic] private predicate pathReadStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and tc = ap0.getHead() and - Stage4::readStepCand(mid.getNode(), tc.getContent(), node, mid.getConfiguration()) and + Stage4::readStepCand(mid.getNodeEx(), tc.getContent(), node, mid.getConfiguration()) and cc = mid.getCallContext() } pragma[nomagic] private predicate pathStoreStep( - PathNodeMid mid, Node node, AccessPath ap0, TypedContent tc, CallContext cc + PathNodeMid mid, NodeEx node, AccessPath ap0, TypedContent tc, CallContext cc ) { ap0 = mid.getAp() and - Stage4::storeStepCand(mid.getNode(), _, tc, node, _, mid.getConfiguration()) and + Stage4::storeStepCand(mid.getNodeEx(), _, tc, node, _, mid.getConfiguration()) and cc = mid.getCallContext() } @@ -3316,7 +3487,7 @@ private predicate pathOutOfCallable0( PathNodeMid mid, ReturnPosition pos, CallContext innercc, AccessPathApprox apa, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and apa = mid.getAp().getApprox() and @@ -3339,10 +3510,10 @@ private predicate pathOutOfCallable1( } pragma[noinline] -private Node getAnOutNodeFlow( +private NodeEx getAnOutNodeFlow( ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config ) { - result = kind.getAnOutNode(call) and + result.asNode() = kind.getAnOutNode(call) and Stage4::revFlow(result, _, _, apa, config) } @@ -3351,7 +3522,7 @@ private Node getAnOutNodeFlow( * is a return from a callable and is recorded by `cc`, if needed. */ pragma[noinline] -private predicate pathOutOfCallable(PathNodeMid mid, Node out, CallContext cc) { +private predicate pathOutOfCallable(PathNodeMid mid, NodeEx out, CallContext cc) { exists(ReturnKindExt kind, DataFlowCall call, AccessPathApprox apa, Configuration config | pathOutOfCallable1(mid, call, kind, cc, apa, config) and out = getAnOutNodeFlow(kind, call, apa, config) @@ -3366,7 +3537,7 @@ private predicate pathIntoArg( PathNodeMid mid, int i, CallContext cc, DataFlowCall call, AccessPath ap, AccessPathApprox apa ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -3378,7 +3549,7 @@ pragma[noinline] private predicate parameterCand( DataFlowCallable callable, int i, AccessPathApprox apa, Configuration config ) { - exists(ParamNode p | + exists(ParamNodeEx p | Stage4::revFlow(p, _, _, apa, config) and p.isParameterOf(callable, i) ) @@ -3402,7 +3573,7 @@ private predicate pathIntoCallable0( * respectively. */ private predicate pathIntoCallable( - PathNodeMid mid, ParamNode p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, + PathNodeMid mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, SummaryCtx sc, DataFlowCall call ) { exists(int i, DataFlowCallable callable, AccessPath ap | @@ -3427,8 +3598,8 @@ private predicate paramFlowsThrough( ReturnKindExt kind, CallContextCall cc, SummaryCtxSome sc, AccessPath ap, AccessPathApprox apa, Configuration config ) { - exists(PathNodeMid mid, ReturnNodeExt ret, int pos | - mid.getNode() = ret and + exists(PathNodeMid mid, RetNodeEx ret, int pos | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc = mid.getSummaryCtx() and @@ -3456,7 +3627,7 @@ private predicate pathThroughCallable0( * The context `cc` is restored to its value prior to entering the callable. */ pragma[noinline] -private predicate pathThroughCallable(PathNodeMid mid, Node out, CallContext cc, AccessPath ap) { +private predicate pathThroughCallable(PathNodeMid mid, NodeEx out, CallContext cc, AccessPath ap) { exists(DataFlowCall call, ReturnKindExt kind, AccessPathApprox apa | pathThroughCallable0(call, mid, kind, cc, ap, apa) and out = getAnOutNodeFlow(kind, call, apa, unbindConf(mid.getConfiguration())) @@ -3474,9 +3645,9 @@ private predicate flowsTo( ) { flowsource.isSource() and flowsource.getConfiguration() = configuration and - flowsource.getNode() = source and + flowsource.(PathNodeImpl).getNodeEx().asNode() = source and (flowsource = flowsink or pathSuccPlus(flowsource, flowsink)) and - flowsink.getNode() = sink + flowsink.getNodeEx().asNode() = sink } /** @@ -3491,13 +3662,13 @@ predicate flowsTo(Node source, Node sink, Configuration configuration) { private predicate finalStats(boolean fwd, int nodes, int fields, int conscand, int tuples) { fwd = true and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0)) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0)) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0)) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap)) and tuples = count(PathNode pn) or fwd = false and - nodes = count(Node n0 | exists(PathNode pn | pn.getNode() = n0 and reach(pn))) and + nodes = count(NodeEx n0 | exists(PathNodeImpl pn | pn.getNodeEx() = n0 and reach(pn))) and fields = count(TypedContent f0 | exists(PathNodeMid pn | pn.getAp().getHead() = f0 and reach(pn))) and conscand = count(AccessPath ap | exists(PathNodeMid pn | pn.getAp() = ap and reach(pn))) and tuples = count(PathNode pn | reach(pn)) @@ -3534,19 +3705,19 @@ predicate stageStats( private module FlowExploration { private predicate callableStep(DataFlowCallable c1, DataFlowCallable c2, Configuration config) { - exists(Node node1, Node node2 | + exists(NodeEx node1, NodeEx node2 | jumpStep(node1, node2, config) or additionalJumpStep(node1, node2, config) or // flow into callable - viableParamArg(_, node2, node1) + viableParamArgEx(_, node2, node1) or // flow out of a callable - viableReturnPosOut(_, getReturnPosition(node1), node2) + viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getNodeEnclosingCallable(node1) and - c2 = getNodeEnclosingCallable(node2) and + c1 = getEnclosingCallable(node1) and + c2 = getEnclosingCallable(node2) and c1 != c2 ) } @@ -3698,7 +3869,7 @@ private module FlowExploration { private newtype TSummaryCtx1 = TSummaryCtx1None() or - TSummaryCtx1Param(ParamNode p) + TSummaryCtx1Param(ParamNodeEx p) private newtype TSummaryCtx2 = TSummaryCtx2None() or @@ -3714,25 +3885,25 @@ private module FlowExploration { private newtype TPartialPathNode = TPartialPathNodeFwd( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() } or TPartialPathNodeRev( - Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, + NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() and @@ -3741,23 +3912,23 @@ private module FlowExploration { or exists(PartialPathNodeRev mid | revPartialPathStep(mid, node, sc1, sc2, ap, config) and - not clearsContentCached(node, ap.getHead()) and + not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getNodeEnclosingCallable(node), config) <= config.explorationLimit() + distSink(getEnclosingCallable(node), config) <= config.explorationLimit() ) } pragma[nomagic] private predicate partialPathNodeMk0( - Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, + NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { exists(PartialPathNodeFwd mid | partialPathStep(mid, node, cc, sc1, sc2, ap, config) and not fullBarrier(node, config) and - not clearsContentCached(node, ap.getHead().getContent()) and - if node instanceof CastingNode - then compatibleTypes(getNodeDataFlowType(node), ap.getType()) + not clearsContentCached(node.asNode(), ap.getHead().getContent()) and + if node.asNode() instanceof CastingNode + then compatibleTypes(getDataFlowType(node), ap.getType()) else any() ) } @@ -3767,13 +3938,15 @@ private module FlowExploration { */ class PartialPathNode extends TPartialPathNode { /** Gets a textual representation of this element. */ - string toString() { result = this.getNode().toString() + this.ppAp() } + string toString() { result = this.getNodeEx().toString() + this.ppAp() } /** * Gets a textual representation of this element, including a textual * representation of the call context. */ - string toStringWithContext() { result = this.getNode().toString() + this.ppAp() + this.ppCtx() } + string toStringWithContext() { + result = this.getNodeEx().toString() + this.ppAp() + this.ppCtx() + } /** * Holds if this element is at the specified location. @@ -3785,11 +3958,16 @@ private module FlowExploration { predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn ) { - this.getNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) + this.getNodeEx().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) } /** Gets the underlying `Node`. */ - Node getNode() { none() } + final Node getNode() { this.getNodeEx().projectToNode() = result } + + private NodeEx getNodeEx() { + result = this.(PartialPathNodeFwd).getNodeEx() or + result = this.(PartialPathNodeRev).getNodeEx() + } /** Gets the associated configuration. */ Configuration getConfiguration() { none() } @@ -3802,7 +3980,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } /** @@ -3810,7 +3988,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getNodeEnclosingCallable(this.getNode()), this.getConfiguration()) + result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) } private string ppAp() { @@ -3842,7 +4020,7 @@ private module FlowExploration { } private class PartialPathNodeFwd extends PartialPathNode, TPartialPathNodeFwd { - Node node; + NodeEx node; CallContext cc; TSummaryCtx1 sc1; TSummaryCtx2 sc2; @@ -3851,7 +4029,7 @@ private module FlowExploration { PartialPathNodeFwd() { this = TPartialPathNodeFwd(node, cc, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } CallContext getCallContext() { result = cc } @@ -3864,12 +4042,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeFwd getASuccessor() { - partialPathStep(this, result.getNode(), result.getCallContext(), result.getSummaryCtx1(), + partialPathStep(this, result.getNodeEx(), result.getCallContext(), result.getSummaryCtx1(), result.getSummaryCtx2(), result.getAp(), result.getConfiguration()) } predicate isSource() { - config.isSource(node) and + sourceNode(node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and @@ -3878,7 +4056,7 @@ private module FlowExploration { } private class PartialPathNodeRev extends PartialPathNode, TPartialPathNodeRev { - Node node; + NodeEx node; TRevSummaryCtx1 sc1; TRevSummaryCtx2 sc2; RevPartialAccessPath ap; @@ -3886,7 +4064,7 @@ private module FlowExploration { PartialPathNodeRev() { this = TPartialPathNodeRev(node, sc1, sc2, ap, config) } - override Node getNode() { result = node } + NodeEx getNodeEx() { result = node } TRevSummaryCtx1 getSummaryCtx1() { result = sc1 } @@ -3897,12 +4075,12 @@ private module FlowExploration { override Configuration getConfiguration() { result = config } override PartialPathNodeRev getASuccessor() { - revPartialPathStep(result, this.getNode(), this.getSummaryCtx1(), this.getSummaryCtx2(), + revPartialPathStep(result, this.getNodeEx(), this.getSummaryCtx1(), this.getSummaryCtx2(), this.getAp(), this.getConfiguration()) } predicate isSink() { - config.isSink(node) and + sinkNode(node, config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = TRevPartialNil() @@ -3910,40 +4088,40 @@ private module FlowExploration { } private predicate partialPathStep( - PartialPathNodeFwd mid, Node node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, + PartialPathNodeFwd mid, NodeEx node, CallContext cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - not isUnreachableInCallCached(node, cc.(CallContextSpecificCall).getCall()) and + not isUnreachableInCallCached(node.asNode(), cc.(CallContextSpecificCall).getCall()) and ( - localFlowStep(mid.getNode(), node, config) and + localFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(mid.getNode(), node, config) and + additionalLocalFlowStep(mid.getNodeEx(), node, config) and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() ) or - jumpStep(mid.getNode(), node, config) and + jumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(mid.getNode(), node, config) and + additionalJumpStep(mid.getNodeEx(), node, config) and cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getNodeDataFlowType(node)) and + ap = TPartialNil(getDataFlowType(node)) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and @@ -3956,8 +4134,7 @@ private module FlowExploration { partialPathReadStep(mid, ap0, tc, node, cc, config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and - apConsFwd(ap, tc, ap0, config) and - compatibleTypes(ap.getType(), getNodeDataFlowType(node)) + apConsFwd(ap, tc, ap0, config) ) or partialPathIntoCallable(mid, node, _, cc, sc1, sc2, _, ap, config) @@ -3976,12 +4153,13 @@ private module FlowExploration { pragma[inline] private predicate partialPathStoreStep( - PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, Node node, PartialAccessPath ap2 + PartialPathNodeFwd mid, PartialAccessPath ap1, TypedContent tc, NodeEx node, + PartialAccessPath ap2 ) { - exists(Node midNode, DataFlowType contentType | - midNode = mid.getNode() and + exists(NodeEx midNode, DataFlowType contentType | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - store(midNode, tc, node, contentType) and + store(midNode, tc, node, contentType, mid.getConfiguration()) and ap2.getHead() = tc and ap2.len() = unbindInt(ap1.len() + 1) and compatibleTypes(ap1.getType(), contentType) @@ -4000,15 +4178,15 @@ private module FlowExploration { pragma[nomagic] private predicate partialPathReadStep( - PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, Node node, CallContext cc, + PartialPathNodeFwd mid, PartialAccessPath ap, TypedContent tc, NodeEx node, CallContext cc, Configuration config ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap = mid.getAp() and - read(midNode, tc.getContent(), node) and + read(midNode, tc.getContent(), node, pragma[only_bind_into](config)) and ap.getHead() = tc and - config = mid.getConfiguration() and + pragma[only_bind_into](config) = mid.getConfiguration() and cc = mid.getCallContext() ) } @@ -4017,7 +4195,7 @@ private module FlowExploration { PartialPathNodeFwd mid, ReturnPosition pos, CallContext innercc, PartialAccessPath ap, Configuration config ) { - pos = getReturnPosition(mid.getNode()) and + pos = mid.getNodeEx().(RetNodeEx).getReturnPosition() and innercc = mid.getCallContext() and innercc instanceof CallContextNoCall and ap = mid.getAp() and @@ -4040,12 +4218,12 @@ private module FlowExploration { } private predicate partialPathOutOfCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(ReturnKindExt kind, DataFlowCall call | partialPathOutOfCallable1(mid, call, kind, cc, ap, config) | - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } @@ -4055,7 +4233,7 @@ private module FlowExploration { Configuration config ) { exists(ArgNode arg | - arg = mid.getNode() and + arg = mid.getNodeEx().asNode() and cc = mid.getCallContext() and arg.argumentOf(call, i) and ap = mid.getAp() and @@ -4073,7 +4251,7 @@ private module FlowExploration { } private predicate partialPathIntoCallable( - PartialPathNodeFwd mid, ParamNode p, CallContext outercc, CallContextCall innercc, + PartialPathNodeFwd mid, ParamNodeEx p, CallContext outercc, CallContextCall innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, DataFlowCall call, PartialAccessPath ap, Configuration config ) { @@ -4094,8 +4272,8 @@ private module FlowExploration { ReturnKindExt kind, CallContextCall cc, TSummaryCtx1 sc1, TSummaryCtx2 sc2, PartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeFwd mid, ReturnNodeExt ret | - mid.getNode() = ret and + exists(PartialPathNodeFwd mid, RetNodeEx ret | + mid.getNodeEx() = ret and kind = ret.getKind() and cc = mid.getCallContext() and sc1 = mid.getSummaryCtx1() and @@ -4110,45 +4288,45 @@ private module FlowExploration { DataFlowCall call, PartialPathNodeFwd mid, ReturnKindExt kind, CallContext cc, PartialAccessPath ap, Configuration config ) { - exists(ParamNode p, CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | - partialPathIntoCallable(mid, p, cc, innercc, sc1, sc2, call, _, config) and + exists(CallContext innercc, TSummaryCtx1 sc1, TSummaryCtx2 sc2 | + partialPathIntoCallable(mid, _, cc, innercc, sc1, sc2, call, _, config) and paramFlowsThroughInPartialPath(kind, innercc, sc1, sc2, ap, config) ) } private predicate partialPathThroughCallable( - PartialPathNodeFwd mid, Node out, CallContext cc, PartialAccessPath ap, Configuration config + PartialPathNodeFwd mid, NodeEx out, CallContext cc, PartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, ReturnKindExt kind | partialPathThroughCallable0(call, mid, kind, cc, ap, config) and - out = kind.getAnOutNode(call) + out.asNode() = kind.getAnOutNode(call) ) } private predicate revPartialPathStep( - PartialPathNodeRev mid, Node node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, + PartialPathNodeRev mid, NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, Configuration config ) { - localFlowStep(node, mid.getNode(), config) and + localFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalLocalFlowStep(node, mid.getNode(), config) and + additionalLocalFlowStep(node, mid.getNodeEx(), config) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof RevPartialAccessPathNil and ap = TRevPartialNil() and config = mid.getConfiguration() or - jumpStep(node, mid.getNode(), config) and + jumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and ap = mid.getAp() and config = mid.getConfiguration() or - additionalJumpStep(node, mid.getNode(), config) and + additionalJumpStep(node, mid.getNodeEx(), config) and sc1 = TRevSummaryCtx1None() and sc2 = TRevSummaryCtx2None() and mid.getAp() instanceof RevPartialAccessPathNil and @@ -4167,9 +4345,9 @@ private module FlowExploration { apConsRev(ap, c, ap0, config) ) or - exists(ParamNode p | - mid.getNode() = p and - viableParamArg(_, p, node) and + exists(ParamNodeEx p | + mid.getNodeEx() = p and + viableParamArgEx(_, p, node) and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and sc1 = TRevSummaryCtx1None() and @@ -4180,7 +4358,7 @@ private module FlowExploration { or exists(ReturnPosition pos | revPartialPathIntoReturn(mid, pos, sc1, sc2, _, ap, config) and - pos = getReturnPosition(node) + pos = getReturnPosition(node.asNode()) ) or revPartialPathThroughCallable(mid, node, ap, config) and @@ -4190,12 +4368,13 @@ private module FlowExploration { pragma[inline] private predicate revPartialPathReadStep( - PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, Node node, RevPartialAccessPath ap2 + PartialPathNodeRev mid, RevPartialAccessPath ap1, Content c, NodeEx node, + RevPartialAccessPath ap2 ) { - exists(Node midNode | - midNode = mid.getNode() and + exists(NodeEx midNode | + midNode = mid.getNodeEx() and ap1 = mid.getAp() and - read(node, c, midNode) and + read(node, c, midNode, mid.getConfiguration()) and ap2.getHead() = c and ap2.len() = unbindInt(ap1.len() + 1) ) @@ -4213,12 +4392,12 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathStoreStep( - PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, Node node, Configuration config + PartialPathNodeRev mid, RevPartialAccessPath ap, Content c, NodeEx node, Configuration config ) { - exists(Node midNode, TypedContent tc | - midNode = mid.getNode() and + exists(NodeEx midNode, TypedContent tc | + midNode = mid.getNodeEx() and ap = mid.getAp() and - store(node, tc, midNode, _) and + store(node, tc, midNode, _, config) and ap.getHead() = c and config = mid.getConfiguration() and tc.getContent() = c @@ -4230,9 +4409,9 @@ private module FlowExploration { PartialPathNodeRev mid, ReturnPosition pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, DataFlowCall call, RevPartialAccessPath ap, Configuration config ) { - exists(Node out | - mid.getNode() = out and - viableReturnPosOut(call, pos, out) and + exists(NodeEx out | + mid.getNodeEx() = out and + viableReturnPosOutEx(call, pos, out) and sc1 = TRevSummaryCtx1Some(pos) and sc2 = TRevSummaryCtx2Some(ap) and ap = mid.getAp() and @@ -4245,9 +4424,9 @@ private module FlowExploration { int pos, TRevSummaryCtx1Some sc1, TRevSummaryCtx2Some sc2, RevPartialAccessPath ap, Configuration config ) { - exists(PartialPathNodeRev mid, ParamNode p | - mid.getNode() = p and - p.isParameterOf(_, pos) and + exists(PartialPathNodeRev mid, ParamNodeEx p | + mid.getNodeEx() = p and + p.getPosition() = pos and sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and ap = mid.getAp() and @@ -4268,11 +4447,11 @@ private module FlowExploration { pragma[nomagic] private predicate revPartialPathThroughCallable( - PartialPathNodeRev mid, ArgNode node, RevPartialAccessPath ap, Configuration config + PartialPathNodeRev mid, ArgNodeEx node, RevPartialAccessPath ap, Configuration config ) { exists(DataFlowCall call, int pos | revPartialPathThroughCallable0(call, mid, pos, ap, config) and - node.argumentOf(call, pos) + node.asNode().(ArgNode).argumentOf(call, pos) ) } } diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll index 462e89ac9edf..eaed77326c71 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImplCommon.qll @@ -724,7 +724,6 @@ private module Cached { Node node1, Content c, Node node2, DataFlowType contentType, DataFlowType containerType ) { storeStep(node1, c, node2) and - read(_, c, _) and contentType = getNodeDataFlowType(node1) and containerType = getNodeDataFlowType(node2) or From aa82d0b815a64de2594dfa830383f30eeca57dca Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 18 Jun 2021 13:40:51 +0200 Subject: [PATCH 1469/1662] Java: Make Content public as DataFlow::Content. --- .../semmle/code/java/dataflow/FlowSummary.qll | 2 +- .../dataflow/internal/DataFlowPrivate.qll | 50 ----------------- .../java/dataflow/internal/DataFlowUtil.qll | 56 +++++++++++++++++++ .../dataflow/internal/TaintTrackingUtil.qll | 30 +++++----- 4 files changed, 72 insertions(+), 66 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/FlowSummary.qll b/java/ql/src/semmle/code/java/dataflow/FlowSummary.qll index 0f222d5caa23..c80e026b6c7b 100644 --- a/java/ql/src/semmle/code/java/dataflow/FlowSummary.qll +++ b/java/ql/src/semmle/code/java/dataflow/FlowSummary.qll @@ -5,7 +5,7 @@ import java private import internal.FlowSummaryImpl as Impl private import internal.DataFlowDispatch -private import internal.DataFlowPrivate +private import internal.DataFlowUtil // import all instances of SummarizedCallable below private module Summaries { diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll index 3f1694ae2bc2..4ea6dea266ad 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowPrivate.qll @@ -83,56 +83,6 @@ private predicate instanceFieldAssign(Expr src, FieldAccess fa) { ) } -private newtype TContent = - TFieldContent(InstanceField f) or - TArrayContent() or - TCollectionContent() or - TMapKeyContent() or - TMapValueContent() - -/** - * A reference contained in an object. Examples include instance fields, the - * contents of a collection object, or the contents of an array. - */ -class Content extends TContent { - /** Gets a textual representation of this element. */ - abstract string toString(); - - predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { - path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 - } -} - -class FieldContent extends Content, TFieldContent { - InstanceField f; - - FieldContent() { this = TFieldContent(f) } - - InstanceField getField() { result = f } - - override string toString() { result = f.toString() } - - override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { - f.getLocation().hasLocationInfo(path, sl, sc, el, ec) - } -} - -class ArrayContent extends Content, TArrayContent { - override string toString() { result = "[]" } -} - -class CollectionContent extends Content, TCollectionContent { - override string toString() { result = "" } -} - -class MapKeyContent extends Content, TMapKeyContent { - override string toString() { result = "" } -} - -class MapValueContent extends Content, TMapValueContent { - override string toString() { result = "" } -} - /** * Holds if data can flow from `node1` to `node2` via an assignment to `f`. * Thus, `node2` references an object with a field `f` that contains the diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowUtil.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowUtil.qll index 376823b9895a..52b1f26f0566 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowUtil.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowUtil.qll @@ -157,6 +157,62 @@ predicate simpleLocalFlowStep(Node node1, Node node2) { FlowSummaryImpl::Private::Steps::summaryLocalStep(node1, node2, true) } +private newtype TContent = + TFieldContent(InstanceField f) or + TArrayContent() or + TCollectionContent() or + TMapKeyContent() or + TMapValueContent() + +/** + * A description of the way data may be stored inside an object. Examples + * include instance fields, the contents of a collection object, or the contents + * of an array. + */ +class Content extends TContent { + /** Gets a textual representation of this element. */ + abstract string toString(); + + predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { + path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 + } +} + +/** A reference through an instance field. */ +class FieldContent extends Content, TFieldContent { + InstanceField f; + + FieldContent() { this = TFieldContent(f) } + + InstanceField getField() { result = f } + + override string toString() { result = f.toString() } + + override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { + f.getLocation().hasLocationInfo(path, sl, sc, el, ec) + } +} + +/** A reference through an array. */ +class ArrayContent extends Content, TArrayContent { + override string toString() { result = "[]" } +} + +/** A reference through the contents of some collection-like container. */ +class CollectionContent extends Content, TCollectionContent { + override string toString() { result = "" } +} + +/** A reference through a map key. */ +class MapKeyContent extends Content, TMapKeyContent { + override string toString() { result = "" } +} + +/** A reference through a map value. */ +class MapValueContent extends Content, TMapValueContent { + override string toString() { result = "" } +} + /** * A guard that validates some expression. * diff --git a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll index 966daea783f0..4c8510c0bf3d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll @@ -61,16 +61,16 @@ private module Cached { localAdditionalTaintUpdateStep(src.asExpr(), sink.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr()) or - exists(Content f | + exists(DataFlow::Content f | readStep(src, f, sink) and not sink.getTypeBound() instanceof PrimitiveType and not sink.getTypeBound() instanceof BoxedType and not sink.getTypeBound() instanceof NumberType | - f instanceof ArrayContent or - f instanceof CollectionContent or - f instanceof MapKeyContent or - f instanceof MapValueContent + f instanceof DataFlow::ArrayContent or + f instanceof DataFlow::CollectionContent or + f instanceof DataFlow::MapKeyContent or + f instanceof DataFlow::MapValueContent ) or FlowSummaryImpl::Private::Steps::summaryLocalStep(src, sink, false) @@ -122,7 +122,7 @@ private module StoreTaintSteps { override predicate isSink(DataFlow::Node n) { none() } - private predicate needsTaintStore(RefType container, Type elem, Content f) { + private predicate needsTaintStore(RefType container, Type elem, DataFlow::Content f) { exists(DataFlow::Node arg | (isSink(arg) or isAdditionalTaintStep(arg, _)) and (arg.asExpr() instanceof Argument or arg instanceof ArgumentNode) and @@ -131,18 +131,18 @@ private module StoreTaintSteps { needsTaintStore(_, container, _) | container.(Array).getComponentType() = elem and - f instanceof ArrayContent + f instanceof DataFlow::ArrayContent or container.(CollectionType).getElementType() = elem and - f instanceof CollectionContent + f instanceof DataFlow::CollectionContent or container.(MapType).getValueType() = elem and - f instanceof MapValueContent + f instanceof DataFlow::MapValueContent ) } override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(Content f, Type elem | + exists(DataFlow::Content f, Type elem | storeStep(node1, f, node2) and needsTaintStore(_, elem, f) and not exists(Type srctyp | srctyp = node1.getTypeBound() | not compatibleTypes(srctyp, elem)) @@ -157,7 +157,7 @@ private module StoreTaintSteps { override predicate isSink(DataFlow::Node n) { none() } - private predicate needsTaintStore(RefType container, Type elem, Content f) { + private predicate needsTaintStore(RefType container, Type elem, DataFlow::Content f) { exists(DataFlow::Node arg | (isSink(arg) or isAdditionalTaintStep(arg, _)) and (arg.asExpr() instanceof Argument or arg instanceof ArgumentNode) and @@ -166,18 +166,18 @@ private module StoreTaintSteps { needsTaintStore(_, container, _) | container.(Array).getComponentType() = elem and - f instanceof ArrayContent + f instanceof DataFlow::ArrayContent or container.(CollectionType).getElementType() = elem and - f instanceof CollectionContent + f instanceof DataFlow::CollectionContent or container.(MapType).getValueType() = elem and - f instanceof MapValueContent + f instanceof DataFlow::MapValueContent ) } override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(Content f, Type elem | + exists(DataFlow::Content f, Type elem | storeStep(node1, f, node2) and needsTaintStore(_, elem, f) and not exists(Type srctyp | srctyp = node1.getTypeBound() | not compatibleTypes(srctyp, elem)) From 38319a483212d740c28bbfe6008a89704e9d8d90 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 18 Jun 2021 14:17:07 +0200 Subject: [PATCH 1470/1662] C/C++: Make Content public as DataFlow::Content. --- .../cpp/dataflow/internal/DataFlowPrivate.qll | 40 ----------- .../cpp/dataflow/internal/DataFlowUtil.qll | 44 +++++++++++++ .../ir/dataflow/internal/DataFlowPrivate.qll | 66 ++----------------- .../cpp/ir/dataflow/internal/DataFlowUtil.qll | 60 +++++++++++++++++ 4 files changed, 108 insertions(+), 102 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll index cb0ae4490f87..e64f82775284 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowPrivate.qll @@ -133,46 +133,6 @@ OutNode getAnOutNode(DataFlowCall call, ReturnKind kind) { */ predicate jumpStep(Node n1, Node n2) { none() } -private newtype TContent = - TFieldContent(Field f) or - TCollectionContent() or - TArrayContent() - -/** - * A reference contained in an object. Examples include instance fields, the - * contents of a collection object, or the contents of an array. - */ -class Content extends TContent { - /** Gets a textual representation of this element. */ - abstract string toString(); - - predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { - path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 - } -} - -private class FieldContent extends Content, TFieldContent { - Field f; - - FieldContent() { this = TFieldContent(f) } - - Field getField() { result = f } - - override string toString() { result = f.toString() } - - override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { - f.getLocation().hasLocationInfo(path, sl, sc, el, ec) - } -} - -private class CollectionContent extends Content, TCollectionContent { - override string toString() { result = "collection" } -} - -private class ArrayContent extends Content, TArrayContent { - override string toString() { result = "array" } -} - /** * Holds if data can flow from `node1` to `node2` via an assignment to `f`. * Thus, `node2` references an object with a field `f` that contains the diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll index 5db9a84c80ae..0d723ac05b6b 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll @@ -768,6 +768,50 @@ VariableAccess getAnAccessToAssignedVariable(Expr assign) { ) } +private newtype TContent = + TFieldContent(Field f) or + TCollectionContent() or + TArrayContent() + +/** + * A description of the way data may be stored inside an object. Examples + * include instance fields, the contents of a collection object, or the contents + * of an array. + */ +class Content extends TContent { + /** Gets a textual representation of this element. */ + abstract string toString(); + + predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { + path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 + } +} + +/** A reference through an instance field. */ +class FieldContent extends Content, TFieldContent { + Field f; + + FieldContent() { this = TFieldContent(f) } + + Field getField() { result = f } + + override string toString() { result = f.toString() } + + override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { + f.getLocation().hasLocationInfo(path, sl, sc, el, ec) + } +} + +/** A reference through an array. */ +private class ArrayContent extends Content, TArrayContent { + override string toString() { result = "[]" } +} + +/** A reference through the contents of some collection-like container. */ +private class CollectionContent extends Content, TCollectionContent { + override string toString() { result = "" } +} + /** * A guard that validates some expression. * diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll index 43b82f4d517e..73bf72a36434 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll @@ -184,64 +184,6 @@ OutNode getAnOutNode(DataFlowCall call, ReturnKind kind) { */ predicate jumpStep(Node n1, Node n2) { none() } -/** - * Gets a field corresponding to the bit range `[startBit..endBit)` of class `c`, if any. - */ -private Field getAField(Class c, int startBit, int endBit) { - result.getDeclaringType() = c and - startBit = 8 * result.getByteOffset() and - endBit = 8 * result.getType().getSize() + startBit - or - exists(Field f, Class cInner | - f = c.getAField() and - cInner = f.getUnderlyingType() and - result = getAField(cInner, startBit - 8 * f.getByteOffset(), endBit - 8 * f.getByteOffset()) - ) -} - -private newtype TContent = - TFieldContent(Class c, int startBit, int endBit) { exists(getAField(c, startBit, endBit)) } or - TCollectionContent() or - TArrayContent() - -/** - * A reference contained in an object. Examples include instance fields, the - * contents of a collection object, or the contents of an array. - */ -class Content extends TContent { - /** Gets a textual representation of this element. */ - abstract string toString(); - - predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { - path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 - } -} - -private class FieldContent extends Content, TFieldContent { - Class c; - int startBit; - int endBit; - - FieldContent() { this = TFieldContent(c, startBit, endBit) } - - // Ensure that there's just 1 result for `toString`. - override string toString() { result = min(Field f | f = getAField() | f.toString()) } - - predicate hasOffset(Class cl, int start, int end) { cl = c and start = startBit and end = endBit } - - Field getAField() { result = getAField(c, startBit, endBit) } -} - -private class CollectionContent extends Content, TCollectionContent { - override string toString() { result = "collection" } -} - -private class ArrayContent extends Content, TArrayContent { - ArrayContent() { this = TArrayContent() } - - override string toString() { result = "array content" } -} - private predicate fieldStoreStepNoChi(Node node1, FieldContent f, PostUpdateNode node2) { exists(StoreInstruction store, Class c | store = node2.asInstruction() and @@ -288,7 +230,7 @@ private predicate fieldStoreStepChi(Node node1, FieldContent f, PostUpdateNode n } private predicate arrayStoreStepChi(Node node1, ArrayContent a, PostUpdateNode node2) { - a = TArrayContent() and + exists(a) and exists(ChiPartialOperand operand, ChiInstruction chi, StoreInstruction store | chi.getPartialOperand() = operand and store = operand.getDef() and @@ -383,7 +325,7 @@ private predicate fieldReadStep(Node node1, FieldContent f, Node node2) { * predicate in `storeStep` ensures that we push the right `FieldContent` onto the access path. */ predicate suppressArrayRead(Node node1, ArrayContent a, Node node2) { - a = TArrayContent() and + exists(a) and exists(WriteSideEffectInstruction write, ChiInstruction chi | node1.asInstruction() = write and node2.asInstruction() = chi and @@ -412,7 +354,7 @@ private Instruction skipCopyValueInstructions(Operand op) { } private predicate arrayReadStep(Node node1, ArrayContent a, Node node2) { - a = TArrayContent() and + exists(a) and // Explicit dereferences such as `*p` or `p[i]` where `p` is a pointer or array. exists(LoadOperand operand, Instruction address | operand.isDefinitionInexact() and @@ -443,7 +385,7 @@ private predicate arrayReadStep(Node node1, ArrayContent a, Node node2) { * from the access path. */ private predicate exactReadStep(Node node1, ArrayContent a, Node node2) { - a = TArrayContent() and + exists(a) and exists(WriteSideEffectInstruction write, ChiInstruction chi | not chi.isResultConflated() and chi.getPartial() = write and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll index 915f51b4576c..bf21249d4caa 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll @@ -788,6 +788,66 @@ predicate localInstructionFlow(Instruction e1, Instruction e2) { */ predicate localExprFlow(Expr e1, Expr e2) { localFlow(exprNode(e1), exprNode(e2)) } +/** + * Gets a field corresponding to the bit range `[startBit..endBit)` of class `c`, if any. + */ +private Field getAField(Class c, int startBit, int endBit) { + result.getDeclaringType() = c and + startBit = 8 * result.getByteOffset() and + endBit = 8 * result.getType().getSize() + startBit + or + exists(Field f, Class cInner | + f = c.getAField() and + cInner = f.getUnderlyingType() and + result = getAField(cInner, startBit - 8 * f.getByteOffset(), endBit - 8 * f.getByteOffset()) + ) +} + +private newtype TContent = + TFieldContent(Class c, int startBit, int endBit) { exists(getAField(c, startBit, endBit)) } or + TCollectionContent() or + TArrayContent() + +/** + * A description of the way data may be stored inside an object. Examples + * include instance fields, the contents of a collection object, or the contents + * of an array. + */ +class Content extends TContent { + /** Gets a textual representation of this element. */ + abstract string toString(); + + predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) { + path = "" and sl = 0 and sc = 0 and el = 0 and ec = 0 + } +} + +/** A reference through an instance field. */ +class FieldContent extends Content, TFieldContent { + Class c; + int startBit; + int endBit; + + FieldContent() { this = TFieldContent(c, startBit, endBit) } + + // Ensure that there's just 1 result for `toString`. + override string toString() { result = min(Field f | f = getAField() | f.toString()) } + + predicate hasOffset(Class cl, int start, int end) { cl = c and start = startBit and end = endBit } + + Field getAField() { result = getAField(c, startBit, endBit) } +} + +/** A reference through an array. */ +class ArrayContent extends Content, TArrayContent { + override string toString() { result = "[]" } +} + +/** A reference through the contents of some collection-like container. */ +private class CollectionContent extends Content, TCollectionContent { + override string toString() { result = "" } +} + /** * A guard that validates some instruction. * From 65ac8be5ac090e010624a2ca742c550fef84bdb5 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 18 Jun 2021 14:24:50 +0200 Subject: [PATCH 1471/1662] Java: Add defaultImplicitTaintRead and sync. --- .../dataflow/internal/TaintTrackingUtil.qll | 7 +++++ .../tainttracking1/TaintTrackingImpl.qll | 5 ++++ .../tainttracking2/TaintTrackingImpl.qll | 5 ++++ .../dataflow/internal/TaintTrackingUtil.qll | 7 +++++ .../tainttracking1/TaintTrackingImpl.qll | 5 ++++ .../tainttracking2/TaintTrackingImpl.qll | 5 ++++ .../tainttracking3/TaintTrackingImpl.qll | 5 ++++ .../internal/TaintTrackingPrivate.qll | 7 +++++ .../tainttracking1/TaintTrackingImpl.qll | 5 ++++ .../tainttracking2/TaintTrackingImpl.qll | 5 ++++ .../tainttracking3/TaintTrackingImpl.qll | 5 ++++ .../tainttracking4/TaintTrackingImpl.qll | 5 ++++ .../tainttracking5/TaintTrackingImpl.qll | 5 ++++ .../dataflow/internal/TaintTrackingUtil.qll | 27 +++++++++++++++++++ .../tainttracking1/TaintTrackingImpl.qll | 5 ++++ .../tainttracking2/TaintTrackingImpl.qll | 5 ++++ .../new/internal/TaintTrackingPrivate.qll | 7 +++++ .../tainttracking1/TaintTrackingImpl.qll | 5 ++++ .../tainttracking2/TaintTrackingImpl.qll | 5 ++++ .../tainttracking3/TaintTrackingImpl.qll | 5 ++++ .../tainttracking4/TaintTrackingImpl.qll | 5 ++++ 21 files changed, 135 insertions(+) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll index 6216045db327..eae16081974c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/TaintTrackingUtil.qll @@ -34,6 +34,13 @@ predicate defaultAdditionalTaintStep(DataFlow::Node src, DataFlow::Node sink) { localAdditionalTaintStep(src, sink) } +/** + * Holds if default `TaintTracking::Configuration`s should allow implicit reads + * of `c` at sinks and inputs to additional taint steps. + */ +bindingset[node] +predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { none() } + /** * Holds if `node` should be a sanitizer in all global taint flow configurations * but not in local taint. diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll index ab1177daea99..f563e47db9f9 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/TaintTrackingUtil.qll @@ -151,6 +151,13 @@ predicate defaultAdditionalTaintStep(DataFlow::Node src, DataFlow::Node sink) { localAdditionalTaintStep(src, sink) } +/** + * Holds if default `TaintTracking::Configuration`s should allow implicit reads + * of `c` at sinks and inputs to additional taint steps. + */ +bindingset[node] +predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { none() } + /** * Holds if `node` should be a sanitizer in all global taint flow configurations * but not in local taint. diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking1/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/tainttracking3/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll index 462838abcd12..b304442b21d3 100755 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/TaintTrackingPrivate.qll @@ -18,6 +18,13 @@ private import semmle.code.csharp.frameworks.WCF */ predicate defaultTaintSanitizer(DataFlow::Node node) { none() } +/** + * Holds if default `TaintTracking::Configuration`s should allow implicit reads + * of `c` at sinks and inputs to additional taint steps. + */ +bindingset[node] +predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { none() } + deprecated predicate localAdditionalTaintStep = defaultAdditionalTaintStep/2; private CIL::DataFlowNode asCilDataFlowNode(DataFlow::Node node) { diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking1/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking3/TaintTrackingImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking3/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking3/TaintTrackingImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking3/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking4/TaintTrackingImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking4/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking4/TaintTrackingImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking4/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking5/TaintTrackingImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking5/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking5/TaintTrackingImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/tainttracking5/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll index 4c8510c0bf3d..23d5084babdc 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll @@ -100,6 +100,33 @@ private module Cached { import Cached +private RefType getElementType(RefType container) { + result = container.(Array).getComponentType() or + result = container.(CollectionType).getElementType() or + result = container.(MapType).getValueType() +} + +/** + * Holds if default `TaintTracking::Configuration`s should allow implicit reads + * of `c` at sinks and inputs to additional taint steps. + */ +bindingset[node] +predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { + exists(RefType container | + (node.asExpr() instanceof Argument or node instanceof ArgumentNode) and + getElementType*(node.getType()) = container + | + container instanceof Array and + c instanceof DataFlow::ArrayContent + or + container instanceof CollectionType and + c instanceof DataFlow::CollectionContent + or + container instanceof MapType and + c instanceof DataFlow::MapValueContent + ) +} + /** * These configurations add a number of configuration-dependent additional taint * steps to all taint configurations. For each sink or additional step provided diff --git a/java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/tainttracking2/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/python/ql/src/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll b/python/ql/src/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll index a6e169243db1..a92663c7986d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/TaintTrackingPrivate.qll @@ -9,6 +9,13 @@ private import semmle.python.dataflow.new.internal.TaintTrackingPublic */ predicate defaultTaintSanitizer(DataFlow::Node node) { none() } +/** + * Holds if default `TaintTracking::Configuration`s should allow implicit reads + * of `c` at sinks and inputs to additional taint steps. + */ +bindingset[node] +predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { none() } + private module Cached { /** * Holds if the additional step from `nodeFrom` to `nodeTo` should be included in all diff --git a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking1/TaintTrackingImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking1/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking1/TaintTrackingImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking1/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking2/TaintTrackingImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking2/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking2/TaintTrackingImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking2/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking3/TaintTrackingImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking3/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking3/TaintTrackingImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking3/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ diff --git a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking4/TaintTrackingImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking4/TaintTrackingImpl.qll index b509fad9cd20..f4f73b8247c5 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/tainttracking4/TaintTrackingImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/tainttracking4/TaintTrackingImpl.qll @@ -105,6 +105,11 @@ abstract class Configuration extends DataFlow::Configuration { defaultAdditionalTaintStep(node1, node2) } + override predicate allowImplicitRead(DataFlow::Node node, DataFlow::Content c) { + (this.isSink(node) or this.isAdditionalTaintStep(node, _)) and + defaultImplicitTaintRead(node, c) + } + /** * Holds if taint may flow from `source` to `sink` for this configuration. */ From d383c0f69b1ea7f15186f933e2d0af7321ac4f3f Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 18 Jun 2021 15:31:46 +0200 Subject: [PATCH 1472/1662] Java: Remove temporary store-as-taint. --- .../dataflow/internal/TaintTrackingUtil.qll | 86 ------------------- 1 file changed, 86 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll index 23d5084babdc..948b4afca9e7 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll @@ -127,92 +127,6 @@ predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { ) } -/** - * These configurations add a number of configuration-dependent additional taint - * steps to all taint configurations. For each sink or additional step provided - * by a given configuration the types are inspected to find those implicit - * collection or array read steps that might be required at the sink or step - * input. The corresponding store steps are then added as additional taint steps - * to provide backwards-compatible taint flow to such sinks and steps. - * - * This is a temporary measure until support is added for such sinks that - * require implicit read steps. - */ -private module StoreTaintSteps { - private import semmle.code.java.dataflow.TaintTracking - private import semmle.code.java.dataflow.TaintTracking2 - - private class StoreTaintConfig extends TaintTracking::Configuration { - StoreTaintConfig() { this instanceof TaintTracking::Configuration or none() } - - override predicate isSource(DataFlow::Node n) { none() } - - override predicate isSink(DataFlow::Node n) { none() } - - private predicate needsTaintStore(RefType container, Type elem, DataFlow::Content f) { - exists(DataFlow::Node arg | - (isSink(arg) or isAdditionalTaintStep(arg, _)) and - (arg.asExpr() instanceof Argument or arg instanceof ArgumentNode) and - arg.getType() = container - or - needsTaintStore(_, container, _) - | - container.(Array).getComponentType() = elem and - f instanceof DataFlow::ArrayContent - or - container.(CollectionType).getElementType() = elem and - f instanceof DataFlow::CollectionContent - or - container.(MapType).getValueType() = elem and - f instanceof DataFlow::MapValueContent - ) - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(DataFlow::Content f, Type elem | - storeStep(node1, f, node2) and - needsTaintStore(_, elem, f) and - not exists(Type srctyp | srctyp = node1.getTypeBound() | not compatibleTypes(srctyp, elem)) - ) - } - } - - private class StoreTaintConfig2 extends TaintTracking2::Configuration { - StoreTaintConfig2() { this instanceof TaintTracking2::Configuration or none() } - - override predicate isSource(DataFlow::Node n) { none() } - - override predicate isSink(DataFlow::Node n) { none() } - - private predicate needsTaintStore(RefType container, Type elem, DataFlow::Content f) { - exists(DataFlow::Node arg | - (isSink(arg) or isAdditionalTaintStep(arg, _)) and - (arg.asExpr() instanceof Argument or arg instanceof ArgumentNode) and - arg.getType() = container - or - needsTaintStore(_, container, _) - | - container.(Array).getComponentType() = elem and - f instanceof DataFlow::ArrayContent - or - container.(CollectionType).getElementType() = elem and - f instanceof DataFlow::CollectionContent - or - container.(MapType).getValueType() = elem and - f instanceof DataFlow::MapValueContent - ) - } - - override predicate isAdditionalTaintStep(DataFlow::Node node1, DataFlow::Node node2) { - exists(DataFlow::Content f, Type elem | - storeStep(node1, f, node2) and - needsTaintStore(_, elem, f) and - not exists(Type srctyp | srctyp = node1.getTypeBound() | not compatibleTypes(srctyp, elem)) - ) - } - } -} - /** * Holds if taint can flow in one local step from `src` to `sink` excluding * local data flow steps. That is, `src` and `sink` are likely to represent From 810de73246f22254f530f12093b63d79341cd42c Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 21 Jun 2021 14:47:31 +0200 Subject: [PATCH 1473/1662] C/C++: Update qltest expected output. --- .../dataflow/fields/ir-path-flow.expected | 84 +++++++++---------- .../TaintedAllocationSize.expected | 18 ++-- .../ArithmeticUncontrolled.expected | 24 +++--- 3 files changed, 63 insertions(+), 63 deletions(-) diff --git a/cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected b/cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected index ee6b6a39bde0..2736cdcd9e10 100644 --- a/cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected +++ b/cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected @@ -58,29 +58,29 @@ edges | aliasing.cpp:98:3:98:21 | Chi [m1] | aliasing.cpp:100:14:100:14 | Store [m1] | | aliasing.cpp:98:10:98:19 | call to user_input | aliasing.cpp:98:3:98:21 | Chi [m1] | | aliasing.cpp:100:14:100:14 | Store [m1] | aliasing.cpp:102:8:102:10 | * ... | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:3:106:20 | Chi [array content] | aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [array content] | -| aliasing.cpp:106:9:106:18 | call to user_input | aliasing.cpp:106:3:106:20 | Chi [array content] | -| aliasing.cpp:121:15:121:16 | Chi [array content] | aliasing.cpp:122:8:122:12 | access to array | -| aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [array content] | aliasing.cpp:121:15:121:16 | Chi [array content] | -| aliasing.cpp:131:15:131:16 | Chi [array content] | aliasing.cpp:132:8:132:14 | * ... | -| aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [array content] | aliasing.cpp:131:15:131:16 | Chi [array content] | -| aliasing.cpp:136:15:136:17 | Chi [array content] | aliasing.cpp:137:8:137:11 | * ... | -| aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [array content] | aliasing.cpp:136:15:136:17 | Chi [array content] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [[]] | +| aliasing.cpp:106:9:106:18 | call to user_input | aliasing.cpp:106:3:106:20 | Chi [[]] | +| aliasing.cpp:121:15:121:16 | Chi [[]] | aliasing.cpp:122:8:122:12 | access to array | +| aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [[]] | aliasing.cpp:121:15:121:16 | Chi [[]] | +| aliasing.cpp:131:15:131:16 | Chi [[]] | aliasing.cpp:132:8:132:14 | * ... | +| aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [[]] | aliasing.cpp:131:15:131:16 | Chi [[]] | +| aliasing.cpp:136:15:136:17 | Chi [[]] | aliasing.cpp:137:8:137:11 | * ... | +| aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [[]] | aliasing.cpp:136:15:136:17 | Chi [[]] | | aliasing.cpp:175:15:175:22 | Chi | aliasing.cpp:175:15:175:22 | Chi [m1] | | aliasing.cpp:175:15:175:22 | Chi [m1] | aliasing.cpp:176:13:176:14 | m1 | -| aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [array content] | aliasing.cpp:175:15:175:22 | Chi | +| aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [[]] | aliasing.cpp:175:15:175:22 | Chi | | aliasing.cpp:187:15:187:22 | Chi | aliasing.cpp:187:15:187:22 | Chi [m1] | | aliasing.cpp:187:15:187:22 | Chi [m1] | aliasing.cpp:188:13:188:14 | Store [m1] | -| aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [array content] | aliasing.cpp:187:15:187:22 | Chi | +| aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [[]] | aliasing.cpp:187:15:187:22 | Chi | | aliasing.cpp:188:13:188:14 | Store [m1] | aliasing.cpp:189:15:189:16 | m1 | | aliasing.cpp:200:15:200:24 | Chi | aliasing.cpp:200:15:200:24 | Chi [m1] | | aliasing.cpp:200:15:200:24 | Chi [m1] | aliasing.cpp:201:15:201:16 | m1 | -| aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [array content] | aliasing.cpp:200:15:200:24 | Chi | +| aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [[]] | aliasing.cpp:200:15:200:24 | Chi | | arrays.cpp:6:12:6:21 | call to user_input | arrays.cpp:7:8:7:13 | access to array | | arrays.cpp:6:12:6:21 | call to user_input | arrays.cpp:9:8:9:11 | * ... | | arrays.cpp:6:12:6:21 | call to user_input | arrays.cpp:10:8:10:15 | * ... | @@ -108,32 +108,32 @@ edges | by_reference.cpp:88:3:88:24 | Chi [a] | by_reference.cpp:122:21:122:38 | taint_inner_a_ref output argument [a] | | by_reference.cpp:88:3:88:24 | Chi [a] | by_reference.cpp:126:21:126:40 | taint_inner_a_ref output argument [a] | | by_reference.cpp:88:13:88:22 | call to user_input | by_reference.cpp:88:3:88:24 | Chi [a] | -| by_reference.cpp:92:3:92:20 | Chi [array content] | by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [array content] | -| by_reference.cpp:92:3:92:20 | Chi [array content] | by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [array content] | -| by_reference.cpp:92:9:92:18 | call to user_input | by_reference.cpp:92:3:92:20 | Chi [array content] | -| by_reference.cpp:96:3:96:19 | Chi [array content] | by_reference.cpp:124:15:124:21 | taint_a_ref output argument [array content] | -| by_reference.cpp:96:3:96:19 | Chi [array content] | by_reference.cpp:128:15:128:23 | taint_a_ref output argument [array content] | -| by_reference.cpp:96:8:96:17 | call to user_input | by_reference.cpp:96:3:96:19 | Chi [array content] | +| by_reference.cpp:92:3:92:20 | Chi [[]] | by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [[]] | +| by_reference.cpp:92:3:92:20 | Chi [[]] | by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [[]] | +| by_reference.cpp:92:9:92:18 | call to user_input | by_reference.cpp:92:3:92:20 | Chi [[]] | +| by_reference.cpp:96:3:96:19 | Chi [[]] | by_reference.cpp:124:15:124:21 | taint_a_ref output argument [[]] | +| by_reference.cpp:96:3:96:19 | Chi [[]] | by_reference.cpp:128:15:128:23 | taint_a_ref output argument [[]] | +| by_reference.cpp:96:8:96:17 | call to user_input | by_reference.cpp:96:3:96:19 | Chi [[]] | | by_reference.cpp:102:21:102:39 | Chi [a] | by_reference.cpp:110:27:110:27 | a | | by_reference.cpp:102:21:102:39 | taint_inner_a_ptr output argument [a] | by_reference.cpp:102:21:102:39 | Chi [a] | | by_reference.cpp:104:15:104:22 | Chi | by_reference.cpp:104:15:104:22 | Chi [a] | | by_reference.cpp:104:15:104:22 | Chi [a] | by_reference.cpp:112:14:112:14 | a | -| by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [array content] | by_reference.cpp:104:15:104:22 | Chi | +| by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [[]] | by_reference.cpp:104:15:104:22 | Chi | | by_reference.cpp:106:21:106:41 | Chi [a] | by_reference.cpp:114:29:114:29 | a | | by_reference.cpp:106:21:106:41 | taint_inner_a_ptr output argument [a] | by_reference.cpp:106:21:106:41 | Chi [a] | | by_reference.cpp:108:15:108:24 | Chi | by_reference.cpp:108:15:108:24 | Chi [a] | | by_reference.cpp:108:15:108:24 | Chi [a] | by_reference.cpp:116:16:116:16 | a | -| by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [array content] | by_reference.cpp:108:15:108:24 | Chi | +| by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [[]] | by_reference.cpp:108:15:108:24 | Chi | | by_reference.cpp:122:21:122:38 | Chi [a] | by_reference.cpp:130:27:130:27 | a | | by_reference.cpp:122:21:122:38 | taint_inner_a_ref output argument [a] | by_reference.cpp:122:21:122:38 | Chi [a] | | by_reference.cpp:124:15:124:21 | Chi | by_reference.cpp:124:15:124:21 | Chi [a] | | by_reference.cpp:124:15:124:21 | Chi [a] | by_reference.cpp:132:14:132:14 | a | -| by_reference.cpp:124:15:124:21 | taint_a_ref output argument [array content] | by_reference.cpp:124:15:124:21 | Chi | +| by_reference.cpp:124:15:124:21 | taint_a_ref output argument [[]] | by_reference.cpp:124:15:124:21 | Chi | | by_reference.cpp:126:21:126:40 | Chi [a] | by_reference.cpp:134:29:134:29 | a | | by_reference.cpp:126:21:126:40 | taint_inner_a_ref output argument [a] | by_reference.cpp:126:21:126:40 | Chi [a] | | by_reference.cpp:128:15:128:23 | Chi | by_reference.cpp:128:15:128:23 | Chi [a] | | by_reference.cpp:128:15:128:23 | Chi [a] | by_reference.cpp:136:16:136:16 | a | -| by_reference.cpp:128:15:128:23 | taint_a_ref output argument [array content] | by_reference.cpp:128:15:128:23 | Chi | +| by_reference.cpp:128:15:128:23 | taint_a_ref output argument [[]] | by_reference.cpp:128:15:128:23 | Chi | | complex.cpp:40:17:40:17 | *b [a_] | complex.cpp:42:16:42:16 | f indirection [a_] | | complex.cpp:40:17:40:17 | *b [b_] | complex.cpp:42:16:42:16 | f indirection [b_] | | complex.cpp:40:17:40:17 | *b [b_] | complex.cpp:43:16:43:16 | f indirection [b_] | @@ -304,29 +304,29 @@ nodes | aliasing.cpp:98:10:98:19 | call to user_input | semmle.label | call to user_input | | aliasing.cpp:100:14:100:14 | Store [m1] | semmle.label | Store [m1] | | aliasing.cpp:102:8:102:10 | * ... | semmle.label | * ... | -| aliasing.cpp:106:3:106:20 | Chi [array content] | semmle.label | Chi [array content] | +| aliasing.cpp:106:3:106:20 | Chi [[]] | semmle.label | Chi [[]] | | aliasing.cpp:106:9:106:18 | call to user_input | semmle.label | call to user_input | -| aliasing.cpp:121:15:121:16 | Chi [array content] | semmle.label | Chi [array content] | -| aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:121:15:121:16 | Chi [[]] | semmle.label | Chi [[]] | +| aliasing.cpp:121:15:121:16 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:122:8:122:12 | access to array | semmle.label | access to array | -| aliasing.cpp:131:15:131:16 | Chi [array content] | semmle.label | Chi [array content] | -| aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:131:15:131:16 | Chi [[]] | semmle.label | Chi [[]] | +| aliasing.cpp:131:15:131:16 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:132:8:132:14 | * ... | semmle.label | * ... | -| aliasing.cpp:136:15:136:17 | Chi [array content] | semmle.label | Chi [array content] | -| aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:136:15:136:17 | Chi [[]] | semmle.label | Chi [[]] | +| aliasing.cpp:136:15:136:17 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:137:8:137:11 | * ... | semmle.label | * ... | | aliasing.cpp:175:15:175:22 | Chi | semmle.label | Chi | | aliasing.cpp:175:15:175:22 | Chi [m1] | semmle.label | Chi [m1] | -| aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:175:15:175:22 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:176:13:176:14 | m1 | semmle.label | m1 | | aliasing.cpp:187:15:187:22 | Chi | semmle.label | Chi | | aliasing.cpp:187:15:187:22 | Chi [m1] | semmle.label | Chi [m1] | -| aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:187:15:187:22 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:188:13:188:14 | Store [m1] | semmle.label | Store [m1] | | aliasing.cpp:189:15:189:16 | m1 | semmle.label | m1 | | aliasing.cpp:200:15:200:24 | Chi | semmle.label | Chi | | aliasing.cpp:200:15:200:24 | Chi [m1] | semmle.label | Chi [m1] | -| aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| aliasing.cpp:200:15:200:24 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | aliasing.cpp:201:15:201:16 | m1 | semmle.label | m1 | | arrays.cpp:6:12:6:21 | call to user_input | semmle.label | call to user_input | | arrays.cpp:7:8:7:13 | access to array | semmle.label | access to array | @@ -360,20 +360,20 @@ nodes | by_reference.cpp:84:14:84:23 | call to user_input | semmle.label | call to user_input | | by_reference.cpp:88:3:88:24 | Chi [a] | semmle.label | Chi [a] | | by_reference.cpp:88:13:88:22 | call to user_input | semmle.label | call to user_input | -| by_reference.cpp:92:3:92:20 | Chi [array content] | semmle.label | Chi [array content] | +| by_reference.cpp:92:3:92:20 | Chi [[]] | semmle.label | Chi [[]] | | by_reference.cpp:92:9:92:18 | call to user_input | semmle.label | call to user_input | -| by_reference.cpp:96:3:96:19 | Chi [array content] | semmle.label | Chi [array content] | +| by_reference.cpp:96:3:96:19 | Chi [[]] | semmle.label | Chi [[]] | | by_reference.cpp:96:8:96:17 | call to user_input | semmle.label | call to user_input | | by_reference.cpp:102:21:102:39 | Chi [a] | semmle.label | Chi [a] | | by_reference.cpp:102:21:102:39 | taint_inner_a_ptr output argument [a] | semmle.label | taint_inner_a_ptr output argument [a] | | by_reference.cpp:104:15:104:22 | Chi | semmle.label | Chi | | by_reference.cpp:104:15:104:22 | Chi [a] | semmle.label | Chi [a] | -| by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| by_reference.cpp:104:15:104:22 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | by_reference.cpp:106:21:106:41 | Chi [a] | semmle.label | Chi [a] | | by_reference.cpp:106:21:106:41 | taint_inner_a_ptr output argument [a] | semmle.label | taint_inner_a_ptr output argument [a] | | by_reference.cpp:108:15:108:24 | Chi | semmle.label | Chi | | by_reference.cpp:108:15:108:24 | Chi [a] | semmle.label | Chi [a] | -| by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [array content] | semmle.label | taint_a_ptr output argument [array content] | +| by_reference.cpp:108:15:108:24 | taint_a_ptr output argument [[]] | semmle.label | taint_a_ptr output argument [[]] | | by_reference.cpp:110:27:110:27 | a | semmle.label | a | | by_reference.cpp:112:14:112:14 | a | semmle.label | a | | by_reference.cpp:114:29:114:29 | a | semmle.label | a | @@ -382,12 +382,12 @@ nodes | by_reference.cpp:122:21:122:38 | taint_inner_a_ref output argument [a] | semmle.label | taint_inner_a_ref output argument [a] | | by_reference.cpp:124:15:124:21 | Chi | semmle.label | Chi | | by_reference.cpp:124:15:124:21 | Chi [a] | semmle.label | Chi [a] | -| by_reference.cpp:124:15:124:21 | taint_a_ref output argument [array content] | semmle.label | taint_a_ref output argument [array content] | +| by_reference.cpp:124:15:124:21 | taint_a_ref output argument [[]] | semmle.label | taint_a_ref output argument [[]] | | by_reference.cpp:126:21:126:40 | Chi [a] | semmle.label | Chi [a] | | by_reference.cpp:126:21:126:40 | taint_inner_a_ref output argument [a] | semmle.label | taint_inner_a_ref output argument [a] | | by_reference.cpp:128:15:128:23 | Chi | semmle.label | Chi | | by_reference.cpp:128:15:128:23 | Chi [a] | semmle.label | Chi [a] | -| by_reference.cpp:128:15:128:23 | taint_a_ref output argument [array content] | semmle.label | taint_a_ref output argument [array content] | +| by_reference.cpp:128:15:128:23 | taint_a_ref output argument [[]] | semmle.label | taint_a_ref output argument [[]] | | by_reference.cpp:130:27:130:27 | a | semmle.label | a | | by_reference.cpp:132:14:132:14 | a | semmle.label | a | | by_reference.cpp:134:29:134:29 | a | semmle.label | a | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected index 752e9165c073..694f46e1d26f 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/TaintedAllocationSize.expected @@ -59,20 +59,20 @@ edges | test.cpp:237:24:237:37 | (const char *)... | test.cpp:247:2:247:8 | local_size | | test.cpp:245:2:245:9 | local_size | test.cpp:224:23:224:23 | s | | test.cpp:247:2:247:8 | local_size | test.cpp:230:21:230:21 | s | -| test.cpp:251:2:251:32 | Chi [array content] | test.cpp:289:17:289:20 | get_size output argument [array content] | -| test.cpp:251:2:251:32 | Chi [array content] | test.cpp:305:18:305:21 | get_size output argument [array content] | -| test.cpp:251:18:251:23 | call to getenv | test.cpp:251:2:251:32 | Chi [array content] | -| test.cpp:251:18:251:31 | (const char *)... | test.cpp:251:2:251:32 | Chi [array content] | +| test.cpp:251:2:251:32 | Chi [[]] | test.cpp:289:17:289:20 | get_size output argument [[]] | +| test.cpp:251:2:251:32 | Chi [[]] | test.cpp:305:18:305:21 | get_size output argument [[]] | +| test.cpp:251:18:251:23 | call to getenv | test.cpp:251:2:251:32 | Chi [[]] | +| test.cpp:251:18:251:31 | (const char *)... | test.cpp:251:2:251:32 | Chi [[]] | | test.cpp:259:20:259:25 | call to getenv | test.cpp:263:11:263:29 | ... * ... | | test.cpp:259:20:259:25 | call to getenv | test.cpp:263:11:263:29 | ... * ... | | test.cpp:259:20:259:33 | (const char *)... | test.cpp:263:11:263:29 | ... * ... | | test.cpp:259:20:259:33 | (const char *)... | test.cpp:263:11:263:29 | ... * ... | | test.cpp:289:17:289:20 | Chi | test.cpp:291:11:291:28 | ... * ... | | test.cpp:289:17:289:20 | Chi | test.cpp:291:11:291:28 | ... * ... | -| test.cpp:289:17:289:20 | get_size output argument [array content] | test.cpp:289:17:289:20 | Chi | +| test.cpp:289:17:289:20 | get_size output argument [[]] | test.cpp:289:17:289:20 | Chi | | test.cpp:305:18:305:21 | Chi | test.cpp:308:10:308:27 | ... * ... | | test.cpp:305:18:305:21 | Chi | test.cpp:308:10:308:27 | ... * ... | -| test.cpp:305:18:305:21 | get_size output argument [array content] | test.cpp:305:18:305:21 | Chi | +| test.cpp:305:18:305:21 | get_size output argument [[]] | test.cpp:305:18:305:21 | Chi | nodes | test.cpp:40:21:40:24 | argv | semmle.label | argv | | test.cpp:40:21:40:24 | argv | semmle.label | argv | @@ -136,7 +136,7 @@ nodes | test.cpp:241:9:241:24 | call to get_tainted_size | semmle.label | call to get_tainted_size | | test.cpp:245:2:245:9 | local_size | semmle.label | local_size | | test.cpp:247:2:247:8 | local_size | semmle.label | local_size | -| test.cpp:251:2:251:32 | Chi [array content] | semmle.label | Chi [array content] | +| test.cpp:251:2:251:32 | Chi [[]] | semmle.label | Chi [[]] | | test.cpp:251:2:251:32 | ChiPartial | semmle.label | ChiPartial | | test.cpp:251:18:251:23 | call to getenv | semmle.label | call to getenv | | test.cpp:251:18:251:31 | (const char *)... | semmle.label | (const char *)... | @@ -146,12 +146,12 @@ nodes | test.cpp:263:11:263:29 | ... * ... | semmle.label | ... * ... | | test.cpp:263:11:263:29 | ... * ... | semmle.label | ... * ... | | test.cpp:289:17:289:20 | Chi | semmle.label | Chi | -| test.cpp:289:17:289:20 | get_size output argument [array content] | semmle.label | get_size output argument [array content] | +| test.cpp:289:17:289:20 | get_size output argument [[]] | semmle.label | get_size output argument [[]] | | test.cpp:291:11:291:28 | ... * ... | semmle.label | ... * ... | | test.cpp:291:11:291:28 | ... * ... | semmle.label | ... * ... | | test.cpp:291:11:291:28 | ... * ... | semmle.label | ... * ... | | test.cpp:305:18:305:21 | Chi | semmle.label | Chi | -| test.cpp:305:18:305:21 | get_size output argument [array content] | semmle.label | get_size output argument [array content] | +| test.cpp:305:18:305:21 | get_size output argument [[]] | semmle.label | get_size output argument [[]] | | test.cpp:308:10:308:27 | ... * ... | semmle.label | ... * ... | | test.cpp:308:10:308:27 | ... * ... | semmle.label | ... * ... | | test.cpp:308:10:308:27 | ... * ... | semmle.label | ... * ... | diff --git a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected index 097efb73b9fb..4e57b1e4136b 100644 --- a/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected +++ b/cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/uncontrolled/ArithmeticUncontrolled.expected @@ -22,20 +22,20 @@ edges | test.cpp:8:9:8:12 | Store | test.cpp:24:11:24:18 | call to get_rand | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | | test.cpp:8:9:8:12 | call to rand | test.cpp:8:9:8:12 | Store | -| test.cpp:13:2:13:15 | Chi [array content] | test.cpp:30:13:30:14 | get_rand2 output argument [array content] | -| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [array content] | -| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [array content] | -| test.cpp:18:2:18:14 | Chi [array content] | test.cpp:36:13:36:13 | get_rand3 output argument [array content] | -| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [array content] | -| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [array content] | +| test.cpp:13:2:13:15 | Chi [[]] | test.cpp:30:13:30:14 | get_rand2 output argument [[]] | +| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [[]] | +| test.cpp:13:10:13:13 | call to rand | test.cpp:13:2:13:15 | Chi [[]] | +| test.cpp:18:2:18:14 | Chi [[]] | test.cpp:36:13:36:13 | get_rand3 output argument [[]] | +| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [[]] | +| test.cpp:18:9:18:12 | call to rand | test.cpp:18:2:18:14 | Chi [[]] | | test.cpp:24:11:24:18 | call to get_rand | test.cpp:25:7:25:7 | r | | test.cpp:24:11:24:18 | call to get_rand | test.cpp:25:7:25:7 | r | | test.cpp:30:13:30:14 | Chi | test.cpp:31:7:31:7 | r | | test.cpp:30:13:30:14 | Chi | test.cpp:31:7:31:7 | r | -| test.cpp:30:13:30:14 | get_rand2 output argument [array content] | test.cpp:30:13:30:14 | Chi | +| test.cpp:30:13:30:14 | get_rand2 output argument [[]] | test.cpp:30:13:30:14 | Chi | | test.cpp:36:13:36:13 | Chi | test.cpp:37:7:37:7 | r | | test.cpp:36:13:36:13 | Chi | test.cpp:37:7:37:7 | r | -| test.cpp:36:13:36:13 | get_rand3 output argument [array content] | test.cpp:36:13:36:13 | Chi | +| test.cpp:36:13:36:13 | get_rand3 output argument [[]] | test.cpp:36:13:36:13 | Chi | nodes | test.c:18:13:18:16 | call to rand | semmle.label | call to rand | | test.c:18:13:18:16 | call to rand | semmle.label | call to rand | @@ -65,11 +65,11 @@ nodes | test.cpp:8:9:8:12 | Store | semmle.label | Store | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | | test.cpp:8:9:8:12 | call to rand | semmle.label | call to rand | -| test.cpp:13:2:13:15 | Chi [array content] | semmle.label | Chi [array content] | +| test.cpp:13:2:13:15 | Chi [[]] | semmle.label | Chi [[]] | | test.cpp:13:2:13:15 | ChiPartial | semmle.label | ChiPartial | | test.cpp:13:10:13:13 | call to rand | semmle.label | call to rand | | test.cpp:13:10:13:13 | call to rand | semmle.label | call to rand | -| test.cpp:18:2:18:14 | Chi [array content] | semmle.label | Chi [array content] | +| test.cpp:18:2:18:14 | Chi [[]] | semmle.label | Chi [[]] | | test.cpp:18:2:18:14 | ChiPartial | semmle.label | ChiPartial | | test.cpp:18:9:18:12 | call to rand | semmle.label | call to rand | | test.cpp:18:9:18:12 | call to rand | semmle.label | call to rand | @@ -78,12 +78,12 @@ nodes | test.cpp:25:7:25:7 | r | semmle.label | r | | test.cpp:25:7:25:7 | r | semmle.label | r | | test.cpp:30:13:30:14 | Chi | semmle.label | Chi | -| test.cpp:30:13:30:14 | get_rand2 output argument [array content] | semmle.label | get_rand2 output argument [array content] | +| test.cpp:30:13:30:14 | get_rand2 output argument [[]] | semmle.label | get_rand2 output argument [[]] | | test.cpp:31:7:31:7 | r | semmle.label | r | | test.cpp:31:7:31:7 | r | semmle.label | r | | test.cpp:31:7:31:7 | r | semmle.label | r | | test.cpp:36:13:36:13 | Chi | semmle.label | Chi | -| test.cpp:36:13:36:13 | get_rand3 output argument [array content] | semmle.label | get_rand3 output argument [array content] | +| test.cpp:36:13:36:13 | get_rand3 output argument [[]] | semmle.label | get_rand3 output argument [[]] | | test.cpp:37:7:37:7 | r | semmle.label | r | | test.cpp:37:7:37:7 | r | semmle.label | r | | test.cpp:37:7:37:7 | r | semmle.label | r | From 05ed4ed739eaa5391ff207f43dae21c46fc2c238 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:22:56 +0100 Subject: [PATCH 1474/1662] Update cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md Co-authored-by: Mathias Vorreiter Pedersen --- cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md index fb73403fb0d6..8a4bb065eb5c 100644 --- a/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md +++ b/cpp/change-notes/2021-06-21-weak-cryptographic-algorithm.md @@ -1,2 +1,2 @@ lgtm,codescanning -* The "Use of a broken or risky cryptographic algorithm" (`cpp/weak-cryptographic-algorithm`) query has been further improved to reduce false positives and it's `@precision` increased to `high`. +* The "Use of a broken or risky cryptographic algorithm" (`cpp/weak-cryptographic-algorithm`) query has been further improved to reduce false positives and its `@precision` increased to `high`. From 27c973e15754f6125316135c2c3fd7aac82e65ca Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 21 Jun 2021 15:50:31 +0200 Subject: [PATCH 1475/1662] Java: Fix some qltests. --- .../src/semmle/code/java/frameworks/JaxWS.qll | 4 +- .../code/java/frameworks/apache/Lang.qll | 67 ++++---- .../CWE-327/UnsafeTlsVersion.expected | 158 ++++++++++-------- .../CWE-522/InsecureLdapAuth.expected | 48 +++--- .../CWE-927/SensitiveBroadcast.expected | 6 +- .../apache-commons-lang3/ArrayUtilsTest.java | 8 +- .../frameworks/guava/TestBase.java | 2 +- .../frameworks/guava/TestCollect.java | 6 +- .../CWE-078/ExecTaintedLocal.expected | 18 +- 9 files changed, 169 insertions(+), 148 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll index cd773721dfb8..1d468cb7a527 100644 --- a/java/ql/src/semmle/code/java/frameworks/JaxWS.qll +++ b/java/ql/src/semmle/code/java/frameworks/JaxWS.qll @@ -604,13 +604,13 @@ private class FormModel extends SummaryModelCsv { row = [ "javax.ws.rs.core;Form;false;Form;;;MapKey of Argument[0];Argument[-1];taint", - "javax.ws.rs.core;Form;false;Form;;;MapValue of Argument[0];Argument[-1];taint", + "javax.ws.rs.core;Form;false;Form;;;Element of MapValue of Argument[0];Argument[-1];taint", "javax.ws.rs.core;Form;false;Form;;;Argument[0..1];Argument[-1];taint", "javax.ws.rs.core;Form;true;asMap;;;Argument[-1];ReturnValue;taint", "javax.ws.rs.core;Form;true;param;;;Argument[0..1];Argument[-1];taint", "javax.ws.rs.core;Form;true;param;;;Argument[-1];ReturnValue;value", "jakarta.ws.rs.core;Form;false;Form;;;MapKey of Argument[0];Argument[-1];taint", - "jakarta.ws.rs.core;Form;false;Form;;;MapValue of Argument[0];Argument[-1];taint", + "jakarta.ws.rs.core;Form;false;Form;;;Element of MapValue of Argument[0];Argument[-1];taint", "jakarta.ws.rs.core;Form;false;Form;;;Argument[0..1];Argument[-1];taint", "jakarta.ws.rs.core;Form;true;asMap;;;Argument[-1];ReturnValue;taint", "jakarta.ws.rs.core;Form;true;param;;;Argument[0..1];Argument[-1];taint", diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll index bf47d6276869..bf6063ce5fac 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Lang.qll @@ -34,38 +34,41 @@ private class ApacheArrayUtilsModel extends SummaryModelCsv { override predicate row(string row) { row = [ - "org.apache.commons.lang3;ArrayUtils;false;add;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;;;Argument[2];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(java.lang.Object[],java.lang.Object);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(boolean[],boolean);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(byte[],byte);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(char[],char);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(double[],double);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(float[],float);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(int[],int);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(long[],long);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;add;(short[],short);;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;addAll;;;Argument[0..1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;addFirst;;;Argument[0..1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;clone;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;get;(java.lang.Object[],int,java.lang.Object);;Argument[2];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;get;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;insert;;;Argument[1];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;insert;;;Argument[2];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;insert;;;Argument[3];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;nullToEmpty;(java.lang.Object[],java.lang.Class);;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;nullToEmpty;(java.lang.String[]);;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;remove;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;removeAll;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;removeAllOccurences;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;removeAllOccurrences;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;removeElement;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;removeElements;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;subarray;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;toArray;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;toMap;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;toObject;;;Argument[0];ReturnValue;taint", - "org.apache.commons.lang3;ArrayUtils;false;toPrimitive;;;Argument[0..1];ReturnValue;taint" + "org.apache.commons.lang3;ArrayUtils;false;add;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;;;Argument[2];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(java.lang.Object[],java.lang.Object);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(boolean[],boolean);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(byte[],byte);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(char[],char);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(double[],double);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(float[],float);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(int[],int);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(long[],long);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;add;(short[],short);;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;addAll;;;ArrayElement of Argument[0..1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;addFirst;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;addFirst;;;Argument[1];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;clone;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;get;(java.lang.Object[],int,java.lang.Object);;Argument[2];ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;get;;;ArrayElement of Argument[0];ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;insert;;;ArrayElement of Argument[1..2];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;nullToEmpty;(java.lang.Object[],java.lang.Class);;Argument[0];ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;nullToEmpty;(java.lang.String[]);;Argument[0];ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;remove;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;removeAll;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;removeAllOccurences;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;removeAllOccurrences;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;removeElement;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;removeElements;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;subarray;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toArray;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toMap;;;MapKey of ArrayElement of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toMap;;;MapValue of ArrayElement of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toMap;;;ArrayElement of ArrayElement of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toMap;;;ArrayElement of ArrayElement of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toObject;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toPrimitive;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", + "org.apache.commons.lang3;ArrayUtils;false;toPrimitive;;;Argument[1];ArrayElement of ReturnValue;value" ] } } diff --git a/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.expected b/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.expected index 0dc34cc9e0e7..021de364e5fd 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-327/UnsafeTlsVersion.expected @@ -1,54 +1,59 @@ edges -| UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | -| UnsafeTlsVersion.java:31:39:31:45 | "SSLv3" : String | UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | -| UnsafeTlsVersion.java:32:39:32:43 | "TLS" : String | UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | -| UnsafeTlsVersion.java:33:39:33:45 | "TLSv1" : String | UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | -| UnsafeTlsVersion.java:34:39:34:47 | "TLSv1.1" : String | UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | -| UnsafeTlsVersion.java:35:39:35:45 | "TLSv1" : String | UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:35:48:35:56 | "TLSv1.1" : String | UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | UnsafeTlsVersion.java:44:44:44:52 | protocols | -| UnsafeTlsVersion.java:50:53:50:59 | "SSLv3" : String | UnsafeTlsVersion.java:50:38:50:61 | new String[] | -| UnsafeTlsVersion.java:51:53:51:57 | "TLS" : String | UnsafeTlsVersion.java:51:38:51:59 | new String[] | -| UnsafeTlsVersion.java:52:53:52:59 | "TLSv1" : String | UnsafeTlsVersion.java:52:38:52:61 | new String[] | -| UnsafeTlsVersion.java:53:53:53:61 | "TLSv1.1" : String | UnsafeTlsVersion.java:53:38:53:63 | new String[] | -| UnsafeTlsVersion.java:56:44:56:52 | "TLSv1.1" : String | UnsafeTlsVersion.java:56:29:56:65 | new String[] | -| UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | -| UnsafeTlsVersion.java:68:21:68:27 | "SSLv3" : String | UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | -| UnsafeTlsVersion.java:69:21:69:25 | "TLS" : String | UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | -| UnsafeTlsVersion.java:70:21:70:27 | "TLSv1" : String | UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | -| UnsafeTlsVersion.java:71:21:71:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | -| UnsafeTlsVersion.java:72:21:72:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | UnsafeTlsVersion.java:81:32:81:40 | protocols | -| UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | -| UnsafeTlsVersion.java:88:27:88:33 | "SSLv3" : String | UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | -| UnsafeTlsVersion.java:89:27:89:31 | "TLS" : String | UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | -| UnsafeTlsVersion.java:90:27:90:33 | "TLSv1" : String | UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | -| UnsafeTlsVersion.java:91:27:91:35 | "TLSv1.1" : String | UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | -| UnsafeTlsVersion.java:92:27:92:35 | "TLSv1.1" : String | UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | UnsafeTlsVersion.java:101:32:101:40 | protocols | -| UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | -| UnsafeTlsVersion.java:108:21:108:27 | "SSLv3" : String | UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | -| UnsafeTlsVersion.java:109:21:109:25 | "TLS" : String | UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | -| UnsafeTlsVersion.java:110:21:110:27 | "TLSv1" : String | UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | -| UnsafeTlsVersion.java:111:21:111:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } : String[] | UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | -| UnsafeTlsVersion.java:112:21:112:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } : String[] | -| UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | UnsafeTlsVersion.java:121:32:121:40 | protocols | +| UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | +| UnsafeTlsVersion.java:31:39:31:45 | "SSLv3" : String | UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | +| UnsafeTlsVersion.java:32:39:32:43 | "TLS" : String | UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | +| UnsafeTlsVersion.java:33:39:33:45 | "TLSv1" : String | UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | +| UnsafeTlsVersion.java:34:39:34:47 | "TLSv1.1" : String | UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | +| UnsafeTlsVersion.java:35:39:35:45 | "TLSv1" : String | UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:35:48:35:56 | "TLSv1.1" : String | UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | UnsafeTlsVersion.java:44:44:44:52 | protocols | +| UnsafeTlsVersion.java:50:38:50:61 | {...} [[]] : String | UnsafeTlsVersion.java:50:38:50:61 | new String[] | +| UnsafeTlsVersion.java:50:53:50:59 | "SSLv3" : String | UnsafeTlsVersion.java:50:38:50:61 | {...} [[]] : String | +| UnsafeTlsVersion.java:51:38:51:59 | {...} [[]] : String | UnsafeTlsVersion.java:51:38:51:59 | new String[] | +| UnsafeTlsVersion.java:51:53:51:57 | "TLS" : String | UnsafeTlsVersion.java:51:38:51:59 | {...} [[]] : String | +| UnsafeTlsVersion.java:52:38:52:61 | {...} [[]] : String | UnsafeTlsVersion.java:52:38:52:61 | new String[] | +| UnsafeTlsVersion.java:52:53:52:59 | "TLSv1" : String | UnsafeTlsVersion.java:52:38:52:61 | {...} [[]] : String | +| UnsafeTlsVersion.java:53:38:53:63 | {...} [[]] : String | UnsafeTlsVersion.java:53:38:53:63 | new String[] | +| UnsafeTlsVersion.java:53:53:53:61 | "TLSv1.1" : String | UnsafeTlsVersion.java:53:38:53:63 | {...} [[]] : String | +| UnsafeTlsVersion.java:56:29:56:65 | {...} [[]] : String | UnsafeTlsVersion.java:56:29:56:65 | new String[] | +| UnsafeTlsVersion.java:56:44:56:52 | "TLSv1.1" : String | UnsafeTlsVersion.java:56:29:56:65 | {...} [[]] : String | +| UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:68:21:68:27 | "SSLv3" : String | UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:69:21:69:25 | "TLS" : String | UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:70:21:70:27 | "TLSv1" : String | UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:71:21:71:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:72:21:72:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | UnsafeTlsVersion.java:81:32:81:40 | protocols | +| UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | +| UnsafeTlsVersion.java:88:27:88:33 | "SSLv3" : String | UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | +| UnsafeTlsVersion.java:89:27:89:31 | "TLS" : String | UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | +| UnsafeTlsVersion.java:90:27:90:33 | "TLSv1" : String | UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | +| UnsafeTlsVersion.java:91:27:91:35 | "TLSv1.1" : String | UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | +| UnsafeTlsVersion.java:92:27:92:35 | "TLSv1.1" : String | UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | UnsafeTlsVersion.java:101:32:101:40 | protocols | +| UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:108:21:108:27 | "SSLv3" : String | UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:109:21:109:25 | "TLS" : String | UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:110:21:110:27 | "TLSv1" : String | UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:111:21:111:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } [[]] : String | UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | +| UnsafeTlsVersion.java:112:21:112:29 | "TLSv1.1" : String | UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } [[]] : String | +| UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | UnsafeTlsVersion.java:121:32:121:40 | protocols | nodes | UnsafeTlsVersion.java:16:28:16:32 | "SSL" | semmle.label | "SSL" | | UnsafeTlsVersion.java:17:28:17:34 | "SSLv2" | semmle.label | "SSLv2" | @@ -56,64 +61,69 @@ nodes | UnsafeTlsVersion.java:19:28:19:32 | "TLS" | semmle.label | "TLS" | | UnsafeTlsVersion.java:20:28:20:34 | "TLSv1" | semmle.label | "TLSv1" | | UnsafeTlsVersion.java:21:28:21:36 | "TLSv1.1" | semmle.label | "TLSv1.1" | -| UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:31:5:31:46 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:31:39:31:45 | "SSLv3" : String | semmle.label | "SSLv3" : String | -| UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:32:5:32:44 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:32:39:32:43 | "TLS" : String | semmle.label | "TLS" : String | -| UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:33:5:33:46 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:33:39:33:45 | "TLSv1" : String | semmle.label | "TLSv1" : String | -| UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:34:5:34:48 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:34:39:34:47 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:35:5:35:68 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:35:39:35:45 | "TLSv1" : String | semmle.label | "TLSv1" : String | | UnsafeTlsVersion.java:35:48:35:56 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:43:74:43:92 | protocols : String[] | semmle.label | protocols : String[] | +| UnsafeTlsVersion.java:43:74:43:92 | protocols [[]] : String | semmle.label | protocols [[]] : String | | UnsafeTlsVersion.java:44:44:44:52 | protocols | semmle.label | protocols | | UnsafeTlsVersion.java:50:38:50:61 | new String[] | semmle.label | new String[] | +| UnsafeTlsVersion.java:50:38:50:61 | {...} [[]] : String | semmle.label | {...} [[]] : String | | UnsafeTlsVersion.java:50:53:50:59 | "SSLv3" : String | semmle.label | "SSLv3" : String | | UnsafeTlsVersion.java:51:38:51:59 | new String[] | semmle.label | new String[] | +| UnsafeTlsVersion.java:51:38:51:59 | {...} [[]] : String | semmle.label | {...} [[]] : String | | UnsafeTlsVersion.java:51:53:51:57 | "TLS" : String | semmle.label | "TLS" : String | | UnsafeTlsVersion.java:52:38:52:61 | new String[] | semmle.label | new String[] | +| UnsafeTlsVersion.java:52:38:52:61 | {...} [[]] : String | semmle.label | {...} [[]] : String | | UnsafeTlsVersion.java:52:53:52:59 | "TLSv1" : String | semmle.label | "TLSv1" : String | | UnsafeTlsVersion.java:53:38:53:63 | new String[] | semmle.label | new String[] | +| UnsafeTlsVersion.java:53:38:53:63 | {...} [[]] : String | semmle.label | {...} [[]] : String | | UnsafeTlsVersion.java:53:53:53:61 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | | UnsafeTlsVersion.java:56:29:56:65 | new String[] | semmle.label | new String[] | +| UnsafeTlsVersion.java:56:29:56:65 | {...} [[]] : String | semmle.label | {...} [[]] : String | | UnsafeTlsVersion.java:56:44:56:52 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:68:5:68:28 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:68:21:68:27 | "SSLv3" : String | semmle.label | "SSLv3" : String | -| UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:69:5:69:26 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:69:21:69:25 | "TLS" : String | semmle.label | "TLS" : String | -| UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:70:5:70:28 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:70:21:70:27 | "TLSv1" : String | semmle.label | "TLSv1" : String | -| UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:71:5:71:30 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:71:21:71:29 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:72:5:72:41 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:72:21:72:29 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:79:43:79:61 | protocols : String[] | semmle.label | protocols : String[] | +| UnsafeTlsVersion.java:79:43:79:61 | protocols [[]] : String | semmle.label | protocols [[]] : String | | UnsafeTlsVersion.java:81:32:81:40 | protocols | semmle.label | protocols | -| UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:88:5:88:34 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:88:27:88:33 | "SSLv3" : String | semmle.label | "SSLv3" : String | -| UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:89:5:89:32 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:89:27:89:31 | "TLS" : String | semmle.label | "TLS" : String | -| UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:90:5:90:34 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:90:27:90:33 | "TLSv1" : String | semmle.label | "TLSv1" : String | -| UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:91:5:91:36 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:91:27:91:35 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:92:5:92:47 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:92:27:92:35 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:99:55:99:73 | protocols : String[] | semmle.label | protocols : String[] | +| UnsafeTlsVersion.java:99:55:99:73 | protocols [[]] : String | semmle.label | protocols [[]] : String | | UnsafeTlsVersion.java:101:32:101:40 | protocols | semmle.label | protocols | -| UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:108:5:108:28 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:108:21:108:27 | "SSLv3" : String | semmle.label | "SSLv3" : String | -| UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:109:5:109:26 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:109:21:109:25 | "TLS" : String | semmle.label | "TLS" : String | -| UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:110:5:110:28 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:110:21:110:27 | "TLSv1" : String | semmle.label | "TLSv1" : String | -| UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:111:5:111:30 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:111:21:111:29 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } : String[] | semmle.label | new ..[] { .. } : String[] | +| UnsafeTlsVersion.java:112:5:112:41 | new ..[] { .. } [[]] : String | semmle.label | new ..[] { .. } [[]] : String | | UnsafeTlsVersion.java:112:21:112:29 | "TLSv1.1" : String | semmle.label | "TLSv1.1" : String | -| UnsafeTlsVersion.java:119:43:119:61 | protocols : String[] | semmle.label | protocols : String[] | +| UnsafeTlsVersion.java:119:43:119:61 | protocols [[]] : String | semmle.label | protocols [[]] : String | | UnsafeTlsVersion.java:121:32:121:40 | protocols | semmle.label | protocols | #select | UnsafeTlsVersion.java:16:28:16:32 | "SSL" | UnsafeTlsVersion.java:16:28:16:32 | "SSL" | UnsafeTlsVersion.java:16:28:16:32 | "SSL" | $@ is unsafe | UnsafeTlsVersion.java:16:28:16:32 | "SSL" | SSL | diff --git a/java/ql/test/experimental/query-tests/security/CWE-522/InsecureLdapAuth.expected b/java/ql/test/experimental/query-tests/security/CWE-522/InsecureLdapAuth.expected index a3b125106264..bb9869aed22f 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-522/InsecureLdapAuth.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-522/InsecureLdapAuth.expected @@ -1,35 +1,35 @@ edges | InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | | InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:20:49:20:59 | environment | -| InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:20:49:20:59 | environment | -| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:15:3:15:13 | environment [post update] [] : String | InsecureLdapAuth.java:20:49:20:59 | environment | +| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | InsecureLdapAuth.java:15:3:15:13 | environment [post update] [] : String | | InsecureLdapAuth.java:17:3:17:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:20:49:20:59 | environment | | InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | | InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | InsecureLdapAuth.java:34:49:34:59 | environment | -| InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:34:49:34:59 | environment | -| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:29:3:29:13 | environment [post update] [] : String | InsecureLdapAuth.java:34:49:34:59 | environment | +| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | InsecureLdapAuth.java:29:3:29:13 | environment [post update] [] : String | | InsecureLdapAuth.java:31:3:31:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:34:49:34:59 | environment | | InsecureLdapAuth.java:45:3:45:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:48:49:48:59 | environment | | InsecureLdapAuth.java:53:20:53:50 | "ldap://ad.your-server.com:636" : String | InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | | InsecureLdapAuth.java:53:20:53:50 | "ldap://ad.your-server.com:636" : String | InsecureLdapAuth.java:63:49:63:59 | environment | -| InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:63:49:63:59 | environment | -| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:57:3:57:13 | environment [post update] [] : String | InsecureLdapAuth.java:63:49:63:59 | environment | +| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | InsecureLdapAuth.java:57:3:57:13 | environment [post update] [] : String | | InsecureLdapAuth.java:59:3:59:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:63:49:63:59 | environment | | InsecureLdapAuth.java:62:3:62:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:63:49:63:59 | environment | | InsecureLdapAuth.java:68:20:68:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | | InsecureLdapAuth.java:68:20:68:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:77:49:77:59 | environment | -| InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:77:49:77:59 | environment | -| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:72:3:72:13 | environment [post update] [] : String | InsecureLdapAuth.java:77:49:77:59 | environment | +| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | InsecureLdapAuth.java:72:3:72:13 | environment [post update] [] : String | | InsecureLdapAuth.java:88:3:88:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:91:49:91:59 | environment | | InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | | InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:105:59:105:69 | environment | -| InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:105:59:105:69 | environment | -| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:100:3:100:13 | environment [post update] [] : String | InsecureLdapAuth.java:105:59:105:69 | environment | +| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | InsecureLdapAuth.java:100:3:100:13 | environment [post update] [] : String | | InsecureLdapAuth.java:102:3:102:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:105:59:105:69 | environment | | InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | | InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:120:49:120:59 | environment | -| InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:120:49:120:59 | environment | -| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:115:3:115:13 | environment [post update] [] : String | InsecureLdapAuth.java:120:49:120:59 | environment | +| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | InsecureLdapAuth.java:115:3:115:13 | environment [post update] [] : String | | InsecureLdapAuth.java:117:3:117:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:120:49:120:59 | environment | | InsecureLdapAuth.java:124:3:124:5 | env [post update] : Hashtable | InsecureLdapAuth.java:137:10:137:20 | environment [post update] : Hashtable | | InsecureLdapAuth.java:128:3:128:5 | env [post update] : Hashtable | InsecureLdapAuth.java:141:16:141:26 | environment [post update] : Hashtable | @@ -37,23 +37,23 @@ edges | InsecureLdapAuth.java:135:20:135:39 | ... + ... : String | InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | | InsecureLdapAuth.java:135:20:135:39 | ... + ... : String | InsecureLdapAuth.java:142:50:142:60 | environment | | InsecureLdapAuth.java:137:10:137:20 | environment [post update] : Hashtable | InsecureLdapAuth.java:142:50:142:60 | environment | -| InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:142:50:142:60 | environment | -| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:140:3:140:13 | environment [post update] [] : String | InsecureLdapAuth.java:142:50:142:60 | environment | +| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | InsecureLdapAuth.java:140:3:140:13 | environment [post update] [] : String | | InsecureLdapAuth.java:141:16:141:26 | environment [post update] : Hashtable | InsecureLdapAuth.java:142:50:142:60 | environment | | InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | | InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | InsecureLdapAuth.java:153:50:153:60 | environment | -| InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable | InsecureLdapAuth.java:153:50:153:60 | environment | -| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable | +| InsecureLdapAuth.java:151:3:151:13 | environment [post update] [] : String | InsecureLdapAuth.java:153:50:153:60 | environment | +| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | InsecureLdapAuth.java:151:3:151:13 | environment [post update] [] : String | | InsecureLdapAuth.java:152:16:152:26 | environment [post update] : Hashtable | InsecureLdapAuth.java:153:50:153:60 | environment | nodes | InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | -| InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:15:3:15:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:17:3:17:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:20:49:20:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:20:49:20:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | semmle.label | ... + ... : String | -| InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:29:3:29:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:31:3:31:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:34:49:34:59 | environment | semmle.label | environment | @@ -61,7 +61,7 @@ nodes | InsecureLdapAuth.java:45:3:45:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:48:49:48:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:53:20:53:50 | "ldap://ad.your-server.com:636" : String | semmle.label | "ldap://ad.your-server.com:636" : String | -| InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:57:3:57:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:59:3:59:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:62:3:62:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | @@ -69,19 +69,19 @@ nodes | InsecureLdapAuth.java:63:49:63:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:63:49:63:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:68:20:68:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | -| InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:72:3:72:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:77:49:77:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:88:3:88:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:91:49:91:59 | environment | semmle.label | environment | | InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | -| InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:100:3:100:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:102:3:102:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:105:59:105:69 | environment | semmle.label | environment | | InsecureLdapAuth.java:105:59:105:69 | environment | semmle.label | environment | | InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | -| InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:115:3:115:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:117:3:117:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:120:49:120:59 | environment | semmle.label | environment | @@ -90,14 +90,14 @@ nodes | InsecureLdapAuth.java:128:3:128:5 | env [post update] : Hashtable | semmle.label | env [post update] : Hashtable | | InsecureLdapAuth.java:135:20:135:39 | ... + ... : String | semmle.label | ... + ... : String | | InsecureLdapAuth.java:137:10:137:20 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | -| InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:140:3:140:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:141:16:141:26 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:142:50:142:60 | environment | semmle.label | environment | | InsecureLdapAuth.java:142:50:142:60 | environment | semmle.label | environment | | InsecureLdapAuth.java:142:50:142:60 | environment | semmle.label | environment | | InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | semmle.label | ... + ... : String | -| InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | +| InsecureLdapAuth.java:151:3:151:13 | environment [post update] [] : String | semmle.label | environment [post update] [] : String | | InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | semmle.label | ldapUrl : String | | InsecureLdapAuth.java:152:16:152:26 | environment [post update] : Hashtable | semmle.label | environment [post update] : Hashtable | | InsecureLdapAuth.java:153:50:153:60 | environment | semmle.label | environment | diff --git a/java/ql/test/experimental/query-tests/security/CWE-927/SensitiveBroadcast.expected b/java/ql/test/experimental/query-tests/security/CWE-927/SensitiveBroadcast.expected index 29482ca006d6..20ee9f30b57e 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-927/SensitiveBroadcast.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-927/SensitiveBroadcast.expected @@ -3,8 +3,8 @@ edges | SensitiveBroadcast.java:13:41:13:52 | refreshToken : String | SensitiveBroadcast.java:14:31:14:36 | intent | | SensitiveBroadcast.java:25:32:25:39 | password : String | SensitiveBroadcast.java:26:31:26:36 | intent | | SensitiveBroadcast.java:36:35:36:39 | email : String | SensitiveBroadcast.java:38:31:38:36 | intent | -| SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] : ArrayList | SensitiveBroadcast.java:52:31:52:36 | intent | -| SensitiveBroadcast.java:50:22:50:29 | password : String | SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] : ArrayList | +| SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] [] : String | SensitiveBroadcast.java:52:31:52:36 | intent | +| SensitiveBroadcast.java:50:22:50:29 | password : String | SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] [] : String | | SensitiveBroadcast.java:97:35:97:40 | ticket : String | SensitiveBroadcast.java:98:54:98:59 | intent | | SensitiveBroadcast.java:109:32:109:39 | passcode : String | SensitiveBroadcast.java:111:54:111:59 | intent | | SensitiveBroadcast.java:136:33:136:38 | passwd : String | SensitiveBroadcast.java:140:54:140:59 | intent | @@ -16,7 +16,7 @@ nodes | SensitiveBroadcast.java:26:31:26:36 | intent | semmle.label | intent | | SensitiveBroadcast.java:36:35:36:39 | email : String | semmle.label | email : String | | SensitiveBroadcast.java:38:31:38:36 | intent | semmle.label | intent | -| SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] : ArrayList | semmle.label | userinfo [post update] : ArrayList | +| SensitiveBroadcast.java:50:9:50:16 | userinfo [post update] [] : String | semmle.label | userinfo [post update] [] : String | | SensitiveBroadcast.java:50:22:50:29 | password : String | semmle.label | password : String | | SensitiveBroadcast.java:52:31:52:36 | intent | semmle.label | intent | | SensitiveBroadcast.java:97:35:97:40 | ticket : String | semmle.label | ticket : String | diff --git a/java/ql/test/library-tests/frameworks/apache-commons-lang3/ArrayUtilsTest.java b/java/ql/test/library-tests/frameworks/apache-commons-lang3/ArrayUtilsTest.java index 73773a8d61c6..c37d5844232a 100644 --- a/java/ql/test/library-tests/frameworks/apache-commons-lang3/ArrayUtilsTest.java +++ b/java/ql/test/library-tests/frameworks/apache-commons-lang3/ArrayUtilsTest.java @@ -31,11 +31,11 @@ void test() throws Exception { sink(ArrayUtils.addFirst(clean, taint())); // $hasTaintFlow sink(ArrayUtils.addFirst(alreadyTainted, "clean")); // $hasTaintFlow sink(ArrayUtils.clone(alreadyTainted)); // $hasTaintFlow - sink(ArrayUtils.get(alreadyTainted, 0)); // $hasTaintFlow + sink(ArrayUtils.get(alreadyTainted, 0)); // $hasValueFlow sink(ArrayUtils.get(clean, IntSource.taint())); // Index argument does not contribute taint - sink(ArrayUtils.get(alreadyTainted, 0, "default value")); // $hasTaintFlow + sink(ArrayUtils.get(alreadyTainted, 0, "default value")); // $hasValueFlow sink(ArrayUtils.get(clean, IntSource.taint(), "default value")); // Index argument does not contribute taint - sink(ArrayUtils.get(clean, 0, taint())); // $hasTaintFlow + sink(ArrayUtils.get(clean, 0, taint())); // $hasValueFlow sink(ArrayUtils.insert(IntSource.taint(), clean, "value1", "value2")); // Index argument does not contribute taint sink(ArrayUtils.insert(0, alreadyTainted, "value1", "value2")); // $hasTaintFlow sink(ArrayUtils.insert(0, clean, taint(), "value2")); // $hasTaintFlow @@ -72,4 +72,4 @@ void test() throws Exception { sink(ArrayUtils.toPrimitive(new Integer[] {}, IntSource.taint())); // $hasTaintFlow } - } \ No newline at end of file + } diff --git a/java/ql/test/library-tests/frameworks/guava/TestBase.java b/java/ql/test/library-tests/frameworks/guava/TestBase.java index fb197c959ca6..6fd6e4d910ac 100644 --- a/java/ql/test/library-tests/frameworks/guava/TestBase.java +++ b/java/ql/test/library-tests/frameworks/guava/TestBase.java @@ -94,7 +94,7 @@ void test7() { void test8() { Optional x = Optional.of(taint()); - sink(x); // $numTaintFlow=1 + sink(x); // no flow sink(x.get()); // $numValueFlow=1 sink(x.or("hi")); // $numValueFlow=1 sink(x.orNull()); // $numValueFlow=1 diff --git a/java/ql/test/library-tests/frameworks/guava/TestCollect.java b/java/ql/test/library-tests/frameworks/guava/TestCollect.java index 3b43a73e6c64..0af3a6943722 100644 --- a/java/ql/test/library-tests/frameworks/guava/TestCollect.java +++ b/java/ql/test/library-tests/frameworks/guava/TestCollect.java @@ -105,7 +105,7 @@ void test5(Comparator comp, SortedSet sorS, SortedMap comp, SortedSet sorS, SortedMap] : String | Test.java:18:29:18:31 | cmd | +| Test.java:16:13:16:25 | ... + ... : String | Test.java:16:5:16:7 | cmd [post update] [] : String | +| Test.java:22:5:22:8 | cmd1 [post update] [[]] : String | Test.java:24:29:24:32 | cmd1 | +| Test.java:22:15:22:27 | ... + ... : String | Test.java:22:5:22:8 | cmd1 [post update] [[]] : String | | Test.java:28:38:28:47 | arg : String | Test.java:29:44:29:64 | ... + ... | | Test.java:57:27:57:39 | args : String[] | Test.java:60:20:60:22 | arg : String | | Test.java:57:27:57:39 | args : String[] | Test.java:61:23:61:25 | arg : String | @@ -14,9 +18,13 @@ nodes | Test.java:6:35:6:44 | arg : String | semmle.label | arg : String | | Test.java:7:44:7:69 | ... + ... | semmle.label | ... + ... | | Test.java:10:29:10:74 | new String[] | semmle.label | new String[] | -| Test.java:16:5:16:7 | cmd [post update] : List | semmle.label | cmd [post update] : List | +| Test.java:10:29:10:74 | {...} [[]] : String | semmle.label | {...} [[]] : String | +| Test.java:10:61:10:73 | ... + ... : String | semmle.label | ... + ... : String | +| Test.java:16:5:16:7 | cmd [post update] [] : String | semmle.label | cmd [post update] [] : String | | Test.java:16:13:16:25 | ... + ... : String | semmle.label | ... + ... : String | | Test.java:18:29:18:31 | cmd | semmle.label | cmd | +| Test.java:22:5:22:8 | cmd1 [post update] [[]] : String | semmle.label | cmd1 [post update] [[]] : String | +| Test.java:22:15:22:27 | ... + ... : String | semmle.label | ... + ... : String | | Test.java:24:29:24:32 | cmd1 | semmle.label | cmd1 | | Test.java:28:38:28:47 | arg : String | semmle.label | arg : String | | Test.java:29:44:29:64 | ... + ... | semmle.label | ... + ... | From c06e152e900d9d51db6df0b3a262e7cfdd2f01ab Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Mon, 21 Jun 2021 16:08:59 +0200 Subject: [PATCH 1476/1662] Java: Remove outdated test. --- .../dataflow/collections/ContainterTest.java | 228 ------------------ .../dataflow/collections/flow.expected | 127 ---------- 2 files changed, 355 deletions(-) delete mode 100644 java/ql/test/library-tests/dataflow/collections/ContainterTest.java diff --git a/java/ql/test/library-tests/dataflow/collections/ContainterTest.java b/java/ql/test/library-tests/dataflow/collections/ContainterTest.java deleted file mode 100644 index 9c291a7b2a34..000000000000 --- a/java/ql/test/library-tests/dataflow/collections/ContainterTest.java +++ /dev/null @@ -1,228 +0,0 @@ - -import java.util.Collection; -import java.util.List; -import java.util.Vector; -import java.util.Stack; -import java.util.Queue; -import java.util.Deque; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TransferQueue; -import java.util.concurrent.BlockingDeque; -import java.util.SortedSet; -import java.util.NavigableSet; -import java.util.Map; -import java.util.Map.Entry; -import java.util.SortedMap; -import java.util.NavigableMap; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.Dictionary; -import java.util.Iterator; -import java.util.ListIterator; -import java.util.Enumeration; - -class ContainerTest { - - private static T sink(T object) { return object; } - private static T mkSink(Class cls) { return null; } - private static T source(T object) { return object; } - - public static void taintSteps( - Iterable iterable, - Collection collection, - List list, - Vector vector, - Stack stack, - Queue queue, - Deque deque, - BlockingQueue blockQueue, - BlockingDeque blockDeque, - TransferQueue transferQ, - SortedSet sortedSet, - NavigableSet navSet, - Map map, - Map.Entry entry, - SortedMap sortedMap, - NavigableMap navMap, - ConcurrentHashMap syncHashMap, - Dictionary dict, - Iterator iter, - ListIterator listIter, - Enumeration enumeration - ) throws InterruptedException { - // java.util.Iterable - sink(iterable.iterator()); - sink(iterable.spliterator()); - - // java.util.Collection - sink(collection.parallelStream()); - sink(collection.stream()); - sink(collection.toArray()); - sink(collection.toArray(x -> new String[x])); - sink(collection.toArray(new String[5])); - collection.toArray(mkSink(String[].class)); - mkSink(Collection.class).add(source("value")); - mkSink(Collection.class).addAll(collection); - - // java.util.List - sink(list.get(1)); - sink(list.listIterator()); - sink(list.listIterator(2)); - sink(list.remove(3)); - sink(list.set(4, "value")); - sink(list.subList(5, 6)); - mkSink(List.class).add(7, source("value")); - mkSink(List.class).addAll(8, collection); - mkSink(List.class).set(9, source("value")); - - // java.util.Vector - sink(vector.elementAt(7)); - sink(vector.elements()); - sink(vector.firstElement()); - sink(vector.lastElement()); - mkSink(Vector.class).addElement(source("element")); - mkSink(Vector.class).insertElementAt(source("element"), 1); - mkSink(Vector.class).setElementAt(source("element"), 2); - vector.copyInto(mkSink(String[].class)); - - // java.util.Stack - sink(stack.peek()); - sink(stack.pop()); - sink(stack.push("value")); // not tainted - sink(new Stack().push(source("value"))); // $ hasValueFlow - mkSink(Stack.class).push(source("value")); - - // java.util.Queue - sink(queue.element()); - sink(queue.peek()); - sink(queue.poll()); - sink(queue.remove()); - mkSink(Queue.class).offer(source("element")); - - // java.util.Deque - sink(deque.getFirst()); - sink(deque.getLast()); - sink(deque.peekFirst()); - sink(deque.peekLast()); - sink(deque.pollFirst()); - sink(deque.pollLast()); - sink(deque.removeFirst()); - sink(deque.removeLast()); - mkSink(Deque.class).addFirst(source("value")); - mkSink(Deque.class).addLast(source("value")); - mkSink(Deque.class).offerFirst(source("value")); - mkSink(Deque.class).offerLast(source("value")); - mkSink(Deque.class).push(source("value")); - - // java.util.concurrent.BlockingQueue - sink(blockQueue.poll(10, TimeUnit.SECONDS)); - sink(blockQueue.take()); - blockQueue.drainTo(mkSink(Collection.class)); - blockQueue.drainTo(mkSink(Collection.class), 4); - - // java.util.concurrent.TransferQueue - mkSink(TransferQueue.class).transfer(source("value")); - mkSink(TransferQueue.class).tryTransfer(source("value")); - mkSink(TransferQueue.class).tryTransfer(source("value"), 9, TimeUnit.SECONDS); - - // java.util.concurrent.BlockingDeque - sink(blockDeque.pollFirst(11, TimeUnit.SECONDS)); - sink(blockDeque.pollLast(12, TimeUnit.SECONDS)); - sink(blockDeque.takeFirst()); - sink(blockDeque.takeLast()); - mkSink(BlockingDeque.class).offer(source("value"), 10, TimeUnit.SECONDS); - mkSink(BlockingDeque.class).put(source("value")); - mkSink(BlockingDeque.class).offerFirst(source("value"), 10, TimeUnit.SECONDS); - mkSink(BlockingDeque.class).offerLast(source("value"), 10, TimeUnit.SECONDS); - mkSink(BlockingDeque.class).putFirst(source("value")); - mkSink(BlockingDeque.class).putLast(source("value")); - - // java.util.SortedSet - sink(sortedSet.first()); - sink(sortedSet.headSet("a")); - sink(sortedSet.last()); - sink(sortedSet.subSet("b", "c")); - sink(sortedSet.tailSet("d")); - - // java.util.NavigableSet - sink(navSet.ceiling("e")); - sink(navSet.descendingIterator()); - sink(navSet.descendingSet()); - sink(navSet.floor("f")); - sink(navSet.headSet("g", true)); - sink(navSet.higher("h")); - sink(navSet.lower("i")); - sink(navSet.pollFirst()); - sink(navSet.pollLast()); - sink(navSet.subSet("j", true, "k", false)); - sink(navSet.tailSet("l", true)); - - // java.util.Map - sink(map.computeIfAbsent("key", key -> "result")); - sink(map.entrySet()); - sink(map.get("key")); - sink(map.getOrDefault("key", "default")); - sink(map.merge("key", "value", (x, y) -> x + y)); - sink(map.put("key", "value")); - sink(map.putIfAbsent("key", "value")); - sink(map.remove("object")); - sink(map.replace("key", "value")); - sink(map.values()); - mkSink(Map.class).merge("key", source("v"), (x,y) -> "" + x + y); - mkSink(Map.class).put("key", source("v")); - mkSink(Map.class).putAll(map); - mkSink(Map.class).putIfAbsent("key", source("v")); - mkSink(Map.class).replace("key", source("v")); - mkSink(Map.class).replace("key", "old", source("v")); - mkSink(Map.class).replace("key", source("old"), "v"); // not tainted - - // java.util.Map.Entry - sink(entry.getValue()); - sink(entry.setValue("value")); - mkSink(Map.Entry.class).setValue(source("value")); - // java.util.SortedMap - sink(sortedMap.headMap("key")); - sink(sortedMap.subMap("key1", "key2")); - sink(sortedMap.tailMap("key")); - - // java.util.NavigableMap - sink(navMap.ceilingEntry("key")); - sink(navMap.descendingMap()); - sink(navMap.firstEntry()); - sink(navMap.floorEntry("key")); - sink(navMap.headMap("key", true)); - sink(navMap.higherEntry("key")); - sink(navMap.lastEntry()); - sink(navMap.lowerEntry("key")); - sink(navMap.pollFirstEntry()); - sink(navMap.pollLastEntry()); - sink(navMap.subMap("key1", true, "key2", true)); - sink(navMap.tailMap("key", true)); - - // java.util.concurrent.ConcurrentHashMap - sink(syncHashMap.elements()); - sink(syncHashMap.search(10, (k, v) -> v)); - sink(syncHashMap.searchEntries(11, e -> e.getValue())); - sink(syncHashMap.searchValues(12, v -> v)); - - // java.util.Dictionary - sink(dict.elements()); - sink(dict.get("object")); - sink(dict.put("key", "value")); - sink(dict.remove("object")); - mkSink(Dictionary.class).put("key", source("value")); - - // java.util.Iterator - sink(iter.next()); - - // java.util.ListIterator - sink(listIter.previous()); - mkSink(ListIterator.class).add(source("value")); - mkSink(ListIterator.class).set(source("value")); - - // java.util.Enumeration - sink(enumeration.asIterator()); - sink(enumeration.nextElement()); - } -} - diff --git a/java/ql/test/library-tests/dataflow/collections/flow.expected b/java/ql/test/library-tests/dataflow/collections/flow.expected index 293e82c97590..e2ccd7702b37 100644 --- a/java/ql/test/library-tests/dataflow/collections/flow.expected +++ b/java/ql/test/library-tests/dataflow/collections/flow.expected @@ -1,130 +1,3 @@ -| ContainterTest.java:31:4:31:28 | iterable | ContainterTest.java:54:8:54:26 | iterator(...) | -| ContainterTest.java:31:4:31:28 | iterable | ContainterTest.java:55:8:55:29 | spliterator(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:58:8:58:34 | parallelStream(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:59:8:59:26 | stream(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:60:8:60:27 | toArray(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:61:8:61:45 | toArray(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:62:8:62:40 | toArray(...) | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:63:22:63:43 | mkSink(...) [post update] | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:65:3:65:26 | mkSink(...) [post update] | -| ContainterTest.java:32:4:32:32 | collection | ContainterTest.java:75:3:75:20 | mkSink(...) [post update] | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:68:8:68:18 | get(...) | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:69:8:69:26 | listIterator(...) | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:70:8:70:27 | listIterator(...) | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:71:8:71:21 | remove(...) | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:72:8:72:27 | set(...) | -| ContainterTest.java:33:4:33:20 | list | ContainterTest.java:73:8:73:25 | subList(...) | -| ContainterTest.java:34:4:34:24 | vector | ContainterTest.java:79:8:79:26 | elementAt(...) | -| ContainterTest.java:34:4:34:24 | vector | ContainterTest.java:80:8:80:24 | elements(...) | -| ContainterTest.java:34:4:34:24 | vector | ContainterTest.java:81:8:81:28 | firstElement(...) | -| ContainterTest.java:34:4:34:24 | vector | ContainterTest.java:82:8:82:27 | lastElement(...) | -| ContainterTest.java:34:4:34:24 | vector | ContainterTest.java:86:19:86:40 | mkSink(...) [post update] | -| ContainterTest.java:35:4:35:22 | stack | ContainterTest.java:89:8:89:19 | peek(...) | -| ContainterTest.java:35:4:35:22 | stack | ContainterTest.java:90:8:90:18 | pop(...) | -| ContainterTest.java:36:4:36:22 | queue | ContainterTest.java:96:8:96:22 | element(...) | -| ContainterTest.java:36:4:36:22 | queue | ContainterTest.java:97:8:97:19 | peek(...) | -| ContainterTest.java:36:4:36:22 | queue | ContainterTest.java:98:8:98:19 | poll(...) | -| ContainterTest.java:36:4:36:22 | queue | ContainterTest.java:99:8:99:21 | remove(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:103:8:103:23 | getFirst(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:104:8:104:22 | getLast(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:105:8:105:24 | peekFirst(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:106:8:106:23 | peekLast(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:107:8:107:24 | pollFirst(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:108:8:108:23 | pollLast(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:109:8:109:26 | removeFirst(...) | -| ContainterTest.java:37:4:37:22 | deque | ContainterTest.java:110:8:110:25 | removeLast(...) | -| ContainterTest.java:38:4:38:35 | blockQueue | ContainterTest.java:118:8:118:44 | poll(...) | -| ContainterTest.java:38:4:38:35 | blockQueue | ContainterTest.java:119:8:119:24 | take(...) | -| ContainterTest.java:38:4:38:35 | blockQueue | ContainterTest.java:120:22:120:45 | mkSink(...) [post update] | -| ContainterTest.java:38:4:38:35 | blockQueue | ContainterTest.java:121:22:121:45 | mkSink(...) [post update] | -| ContainterTest.java:39:4:39:35 | blockDeque | ContainterTest.java:129:8:129:49 | pollFirst(...) | -| ContainterTest.java:39:4:39:35 | blockDeque | ContainterTest.java:130:8:130:48 | pollLast(...) | -| ContainterTest.java:39:4:39:35 | blockDeque | ContainterTest.java:131:8:131:29 | takeFirst(...) | -| ContainterTest.java:39:4:39:35 | blockDeque | ContainterTest.java:132:8:132:28 | takeLast(...) | -| ContainterTest.java:41:4:41:30 | sortedSet | ContainterTest.java:141:8:141:24 | first(...) | -| ContainterTest.java:41:4:41:30 | sortedSet | ContainterTest.java:142:8:142:29 | headSet(...) | -| ContainterTest.java:41:4:41:30 | sortedSet | ContainterTest.java:143:8:143:23 | last(...) | -| ContainterTest.java:41:4:41:30 | sortedSet | ContainterTest.java:144:8:144:33 | subSet(...) | -| ContainterTest.java:41:4:41:30 | sortedSet | ContainterTest.java:145:8:145:29 | tailSet(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:148:8:148:26 | ceiling(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:149:8:149:34 | descendingIterator(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:150:8:150:29 | descendingSet(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:151:8:151:24 | floor(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:152:8:152:32 | headSet(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:153:8:153:25 | higher(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:154:8:154:24 | lower(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:155:8:155:25 | pollFirst(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:156:8:156:24 | pollLast(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:157:8:157:43 | subSet(...) | -| ContainterTest.java:42:4:42:30 | navSet | ContainterTest.java:158:8:158:32 | tailSet(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:161:8:161:50 | computeIfAbsent(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:162:8:162:21 | entrySet(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:163:8:163:21 | get(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:164:8:164:41 | getOrDefault(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:166:8:166:30 | put(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:167:8:167:38 | putIfAbsent(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:168:8:168:27 | remove(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:169:8:169:34 | replace(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:170:8:170:19 | values(...) | -| ContainterTest.java:43:4:43:26 | map | ContainterTest.java:173:3:173:19 | mkSink(...) [post update] | -| ContainterTest.java:44:4:44:34 | entry | ContainterTest.java:180:8:180:23 | getValue(...) | -| ContainterTest.java:44:4:44:34 | entry | ContainterTest.java:181:8:181:30 | setValue(...) | -| ContainterTest.java:45:4:45:38 | sortedMap | ContainterTest.java:184:8:184:31 | headMap(...) | -| ContainterTest.java:45:4:45:38 | sortedMap | ContainterTest.java:185:8:185:39 | subMap(...) | -| ContainterTest.java:45:4:45:38 | sortedMap | ContainterTest.java:186:8:186:31 | tailMap(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:189:8:189:33 | ceilingEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:190:8:190:29 | descendingMap(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:191:8:191:26 | firstEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:192:8:192:31 | floorEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:193:8:193:34 | headMap(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:194:8:194:32 | higherEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:195:8:195:25 | lastEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:196:8:196:31 | lowerEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:197:8:197:30 | pollFirstEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:198:8:198:29 | pollLastEntry(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:199:8:199:48 | subMap(...) | -| ContainterTest.java:46:4:46:38 | navMap | ContainterTest.java:200:8:200:34 | tailMap(...) | -| ContainterTest.java:47:4:47:48 | syncHashMap | ContainterTest.java:203:8:203:29 | elements(...) | -| ContainterTest.java:48:4:48:34 | dict | ContainterTest.java:209:8:209:22 | elements(...) | -| ContainterTest.java:48:4:48:34 | dict | ContainterTest.java:210:8:210:25 | get(...) | -| ContainterTest.java:48:4:48:34 | dict | ContainterTest.java:211:8:211:31 | put(...) | -| ContainterTest.java:48:4:48:34 | dict | ContainterTest.java:212:8:212:28 | remove(...) | -| ContainterTest.java:49:4:49:24 | iter | ContainterTest.java:216:8:216:18 | next(...) | -| ContainterTest.java:50:4:50:32 | listIter | ContainterTest.java:219:8:219:26 | previous(...) | -| ContainterTest.java:51:4:51:34 | enumeration | ContainterTest.java:224:8:224:31 | asIterator(...) | -| ContainterTest.java:51:4:51:34 | enumeration | ContainterTest.java:225:8:225:32 | nextElement(...) | -| ContainterTest.java:64:39:64:45 | "value" | ContainterTest.java:64:3:64:26 | mkSink(...) [post update] | -| ContainterTest.java:74:36:74:42 | "value" | ContainterTest.java:74:3:74:20 | mkSink(...) [post update] | -| ContainterTest.java:76:36:76:42 | "value" | ContainterTest.java:76:3:76:20 | mkSink(...) [post update] | -| ContainterTest.java:83:42:83:50 | "element" | ContainterTest.java:83:3:83:22 | mkSink(...) [post update] | -| ContainterTest.java:84:47:84:55 | "element" | ContainterTest.java:84:3:84:22 | mkSink(...) [post update] | -| ContainterTest.java:85:44:85:52 | "element" | ContainterTest.java:85:3:85:22 | mkSink(...) [post update] | -| ContainterTest.java:92:32:92:38 | "value" | ContainterTest.java:92:8:92:40 | push(...) | -| ContainterTest.java:93:35:93:41 | "value" | ContainterTest.java:93:3:93:21 | mkSink(...) [post update] | -| ContainterTest.java:100:36:100:44 | "element" | ContainterTest.java:100:3:100:21 | mkSink(...) [post update] | -| ContainterTest.java:111:39:111:45 | "value" | ContainterTest.java:111:3:111:21 | mkSink(...) [post update] | -| ContainterTest.java:112:38:112:44 | "value" | ContainterTest.java:112:3:112:21 | mkSink(...) [post update] | -| ContainterTest.java:113:41:113:47 | "value" | ContainterTest.java:113:3:113:21 | mkSink(...) [post update] | -| ContainterTest.java:114:40:114:46 | "value" | ContainterTest.java:114:3:114:21 | mkSink(...) [post update] | -| ContainterTest.java:115:35:115:41 | "value" | ContainterTest.java:115:3:115:21 | mkSink(...) [post update] | -| ContainterTest.java:124:47:124:53 | "value" | ContainterTest.java:124:3:124:29 | mkSink(...) [post update] | -| ContainterTest.java:125:50:125:56 | "value" | ContainterTest.java:125:3:125:29 | mkSink(...) [post update] | -| ContainterTest.java:126:50:126:56 | "value" | ContainterTest.java:126:3:126:29 | mkSink(...) [post update] | -| ContainterTest.java:133:44:133:50 | "value" | ContainterTest.java:133:3:133:29 | mkSink(...) [post update] | -| ContainterTest.java:134:42:134:48 | "value" | ContainterTest.java:134:3:134:29 | mkSink(...) [post update] | -| ContainterTest.java:135:49:135:55 | "value" | ContainterTest.java:135:3:135:29 | mkSink(...) [post update] | -| ContainterTest.java:136:48:136:54 | "value" | ContainterTest.java:136:3:136:29 | mkSink(...) [post update] | -| ContainterTest.java:137:47:137:53 | "value" | ContainterTest.java:137:3:137:29 | mkSink(...) [post update] | -| ContainterTest.java:138:46:138:52 | "value" | ContainterTest.java:138:3:138:29 | mkSink(...) [post update] | -| ContainterTest.java:171:41:171:43 | "v" | ContainterTest.java:171:3:171:19 | mkSink(...) [post update] | -| ContainterTest.java:172:39:172:41 | "v" | ContainterTest.java:172:3:172:19 | mkSink(...) [post update] | -| ContainterTest.java:174:47:174:49 | "v" | ContainterTest.java:174:3:174:19 | mkSink(...) [post update] | -| ContainterTest.java:175:43:175:45 | "v" | ContainterTest.java:175:3:175:19 | mkSink(...) [post update] | -| ContainterTest.java:176:50:176:52 | "v" | ContainterTest.java:176:3:176:19 | mkSink(...) [post update] | -| ContainterTest.java:182:43:182:49 | "value" | ContainterTest.java:182:3:182:25 | mkSink(...) [post update] | -| ContainterTest.java:213:46:213:52 | "value" | ContainterTest.java:213:3:213:26 | mkSink(...) [post update] | -| ContainterTest.java:220:41:220:47 | "value" | ContainterTest.java:220:3:220:28 | mkSink(...) [post update] | -| ContainterTest.java:221:41:221:47 | "value" | ContainterTest.java:221:3:221:28 | mkSink(...) [post update] | | Test.java:13:18:13:24 | tainted | Test.java:15:10:15:11 | x2 | | Test.java:13:18:13:24 | tainted | Test.java:18:10:18:11 | x3 | | Test.java:13:18:13:24 | tainted | Test.java:22:12:22:13 | x4 | From 3bc6b11ae5f89dbd4fbef7af1d6a0bdb3f1053ca Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Fri, 18 Jun 2021 14:54:33 +0200 Subject: [PATCH 1477/1662] C++: Share the 'bounded' predicate from 'cpp/uncontrolled-arithmetic' and use it in 'cpp/tainted-arithmetic'. --- .../Security/CWE/CWE-190/ArithmeticTainted.ql | 5 ++ .../CWE/CWE-190/ArithmeticUncontrolled.ql | 70 +---------------- cpp/ql/src/Security/CWE/CWE-190/Bounded.qll | 76 +++++++++++++++++++ 3 files changed, 82 insertions(+), 69 deletions(-) create mode 100644 cpp/ql/src/Security/CWE/CWE-190/Bounded.qll diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql index 88ff77281c11..e6da6df48f6b 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticTainted.ql @@ -17,6 +17,7 @@ import semmle.code.cpp.security.Overflow import semmle.code.cpp.security.Security import semmle.code.cpp.security.TaintTracking import TaintedWithPath +import Bounded bindingset[op] predicate missingGuard(Operation op, Expr e, string effect) { @@ -37,6 +38,10 @@ class Configuration extends TaintTrackingConfiguration { op instanceof BinaryArithmeticOperation ) } + + override predicate isBarrier(Expr e) { + super.isBarrier(e) or bounded(e) or e.getUnspecifiedType().(IntegralType).getSize() <= 1 + } } from Expr origin, Expr e, string effect, PathNode sourceNode, PathNode sinkNode, Operation op diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index 359ac7a0d1a0..c7b844f9c24b 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -16,8 +16,8 @@ import cpp import semmle.code.cpp.security.Overflow import semmle.code.cpp.security.Security import semmle.code.cpp.security.TaintTracking -import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis import TaintedWithPath +import Bounded predicate isUnboundedRandCall(FunctionCall fc) { exists(Function func | func = fc.getTarget() | @@ -27,74 +27,6 @@ predicate isUnboundedRandCall(FunctionCall fc) { ) } -/** - * An operand `e` of a division expression (i.e., `e` is an operand of either a `DivExpr` or - * a `AssignDivExpr`) is bounded when `e` is the left-hand side of the division. - */ -pragma[inline] -predicate boundedDiv(Expr e, Expr left) { e = left } - -/** - * An operand `e` of a remainder expression `rem` (i.e., `rem` is either a `RemExpr` or - * an `AssignRemExpr`) with left-hand side `left` and right-ahnd side `right` is bounded - * when `e` is `left` and `right` is upper bounded by some number that is less than the maximum integer - * allowed by the result type of `rem`. - */ -pragma[inline] -predicate boundedRem(Expr e, Expr rem, Expr left, Expr right) { - e = left and - upperBound(right.getFullyConverted()) < exprMaxVal(rem.getFullyConverted()) -} - -/** - * An operand `e` of a bitwise and expression `andExpr` (i.e., `andExpr` is either an `BitwiseAndExpr` - * or an `AssignAndExpr`) with operands `operand1` and `operand2` is the operand that is not `e` is upper - * bounded by some number that is less than the maximum integer allowed by the result type of `andExpr`. - */ -pragma[inline] -predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr operand2) { - operand1 != operand2 and - e = operand1 and - upperBound(operand2.getFullyConverted()) < exprMaxVal(andExpr.getFullyConverted()) -} - -/** - * Holds if `fc` is a part of the left operand of a binary operation that greatly reduces the range - * of possible values. - */ -predicate bounded(Expr e) { - // For `%` and `&` we require that `e` is bounded by a value that is strictly smaller than the - // maximum possible value of the result type of the operation. - // For example, the function call `rand()` is considered bounded in the following program: - // ``` - // int i = rand() % (UINT8_MAX + 1); - // ``` - // but not in: - // ``` - // unsigned char uc = rand() % (UINT8_MAX + 1); - // ``` - exists(RemExpr rem | boundedRem(e, rem, rem.getLeftOperand(), rem.getRightOperand())) - or - exists(AssignRemExpr rem | boundedRem(e, rem, rem.getLValue(), rem.getRValue())) - or - exists(BitwiseAndExpr andExpr | - boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) - ) - or - exists(AssignAndExpr andExpr | - boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) - ) - or - // Optimitically assume that a division always yields a much smaller value. - boundedDiv(e, any(DivExpr div).getLeftOperand()) - or - boundedDiv(e, any(AssignDivExpr div).getLValue()) - or - boundedDiv(e, any(RShiftExpr shift).getLeftOperand()) - or - boundedDiv(e, any(AssignRShiftExpr div).getLValue()) -} - predicate isUnboundedRandCallOrParent(Expr e) { isUnboundedRandCall(e) or diff --git a/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll new file mode 100644 index 000000000000..f8735c9b6fba --- /dev/null +++ b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll @@ -0,0 +1,76 @@ +/** + * This file provides the `bounded` predicate that is used in both `cpp/uncontrolled-arithmetic` + * and `cpp/tainted-arithmetic`. + */ + +private import cpp +private import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis +private import semmle.code.cpp.rangeanalysis.RangeAnalysisUtils + +/** + * An operand `e` of a division expression (i.e., `e` is an operand of either a `DivExpr` or + * a `AssignDivExpr`) is bounded when `e` is the left-hand side of the division. + */ +pragma[inline] +private predicate boundedDiv(Expr e, Expr left) { e = left } + +/** + * An operand `e` of a remainder expression `rem` (i.e., `rem` is either a `RemExpr` or + * an `AssignRemExpr`) with left-hand side `left` and right-ahnd side `right` is bounded + * when `e` is `left` and `right` is upper bounded by some number that is less than the maximum integer + * allowed by the result type of `rem`. + */ +pragma[inline] +private predicate boundedRem(Expr e, Expr rem, Expr left, Expr right) { + e = left and + upperBound(right.getFullyConverted()) < exprMaxVal(rem.getFullyConverted()) +} + +/** + * An operand `e` of a bitwise and expression `andExpr` (i.e., `andExpr` is either an `BitwiseAndExpr` + * or an `AssignAndExpr`) with operands `operand1` and `operand2` is the operand that is not `e` is upper + * bounded by some number that is less than the maximum integer allowed by the result type of `andExpr`. + */ +pragma[inline] +private predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr operand2) { + operand1 != operand2 and + e = operand1 and + upperBound(operand2.getFullyConverted()) < exprMaxVal(andExpr.getFullyConverted()) +} + +/** + * Holds if `e` is an operand of a binary operation that greatly reduces the range of possible + * output values. For instance, if `e` is the left operand of a remainder expression. + */ +predicate bounded(Expr e) { + // For `%` and `&` we require that `e` is bounded by a value that is strictly smaller than the + // maximum possible value of the result type of the operation. + // For example, the function call `rand()` is considered bounded in the following program: + // ``` + // int i = rand() % (UINT8_MAX + 1); + // ``` + // but not in: + // ``` + // unsigned char uc = rand() % (UINT8_MAX + 1); + // ``` + exists(RemExpr rem | boundedRem(e, rem, rem.getLeftOperand(), rem.getRightOperand())) + or + exists(AssignRemExpr rem | boundedRem(e, rem, rem.getLValue(), rem.getRValue())) + or + exists(BitwiseAndExpr andExpr | + boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) + ) + or + exists(AssignAndExpr andExpr | + boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) + ) + or + // Optimitically assume that a division always yields a much smaller value. + boundedDiv(e, any(DivExpr div).getLeftOperand()) + or + boundedDiv(e, any(AssignDivExpr div).getLValue()) + or + boundedDiv(e, any(RShiftExpr shift).getLeftOperand()) + or + boundedDiv(e, any(AssignRShiftExpr div).getLValue()) +} From 768cab3642d9502d4090f91821ddde87d7accc63 Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 21 Jun 2021 14:57:19 +0000 Subject: [PATCH 1478/1662] Python: Address review comments - changes `getReceiver` to `getObject` - fixes `calls` to avoid unwanted cross-talk - adds some more documentation to highlight the above issue --- python/ql/src/Security/CWE-327/Ssl.qll | 2 +- .../semmle/python/frameworks/Stdlib.qll | 2 +- .../dataflow/new/internal/DataFlowPublic.qll | 33 ++++++++++++++----- .../semmle/python/frameworks/Cryptography.qll | 7 ++-- .../dataflow/method-calls/test.expected | 8 +++++ .../dataflow/method-calls/test.py | 6 ++++ .../dataflow/method-calls/test.ql | 18 ++++++++++ 7 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 python/ql/test/experimental/dataflow/method-calls/test.expected create mode 100644 python/ql/test/experimental/dataflow/method-calls/test.py create mode 100644 python/ql/test/experimental/dataflow/method-calls/test.ql diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 327d68f289c6..8df602a2e216 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -42,7 +42,7 @@ API::Node sslContextInstance() { class WrapSocketCall extends ConnectionCreation, DataFlow::MethodCallNode { WrapSocketCall() { this = sslContextInstance().getMember("wrap_socket").getACall() } - override DataFlow::Node getContext() { result = this.getReceiver() } + override DataFlow::Node getContext() { result = this.getObject() } } class OptionsAugOr extends ProtocolRestriction, DataFlow::CfgNode { diff --git a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll index edf610b26185..b3b70f433940 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Stdlib.qll @@ -70,7 +70,7 @@ private module Re { CompiledRegex() { exists(DataFlow::MethodCallNode patternCall | patternCall = API::moduleImport("re").getMember("compile").getACall() and - patternCall.flowsTo(this.getReceiver()) and + patternCall.flowsTo(this.getObject()) and this.getMethodName() instanceof RegexExecutionMethods and regexNode = patternCall.getArg(0) ) diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll index 0a3e68024df9..928082d7e8aa 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -184,23 +184,38 @@ class CallCfgNode extends CfgNode, LocalSourceNode { * A data-flow node corresponding to a method call, that is `foo.bar(...)`. * * Also covers the case where the method lookup is done separately from the call itself, as in - * `temp = foo.bar; temp(...)`. + * `temp = foo.bar; temp(...)`. Note that this is only tracked through local scope. */ class MethodCallNode extends CallCfgNode { AttrRead method_lookup; MethodCallNode() { method_lookup = this.getFunction().getALocalSource() } - /** Gets the name of the method being invoked (the `bar` in `foo.bar(...)`, if it can be determined. */ + /** + * Gets the name of the method being invoked (the `bar` in `foo.bar(...)`) if it can be determined. + * + * Note that this method may have multiple results if a single call node represents calls to + * multiple different objects and methods. If you want to link up objects and method names + * accurately, use the `calls` method instead. + */ string getMethodName() { result = method_lookup.getAttributeName() } - /** Gets the data-flow node corresponding to the receiver of this call. That is, the `foo` in `foo.bar(...)`. */ - Node getReceiver() { result = method_lookup.getObject() } - - /** Holds if this data-flow node calls method `methodName` on receiver node `receiver`. */ - predicate calls(Node receiver, string methodName) { - receiver = this.getReceiver() and - methodName = this.getMethodName() + /** + * Gets the data-flow node corresponding to the object receiving this call. That is, the `foo` in + * `foo.bar(...)`. + * + * Note that this method may have multiple results if a single call node represents calls to + * multiple different objects and methods. If you want to link up objects and method names + * accurately, use the `calls` method instead. + */ + Node getObject() { result = method_lookup.getObject() } + + /** Holds if this data-flow node calls method `methodName` on the object node `object`. */ + predicate calls(Node object, string methodName) { + // As `getObject` and `getMethodName` may both have multiple results, we must look up the object + // and method name directly on `method_lookup`. + object = method_lookup.getObject() and + methodName = method_lookup.getAttributeName() } } diff --git a/python/ql/src/semmle/python/frameworks/Cryptography.qll b/python/ql/src/semmle/python/frameworks/Cryptography.qll index 70650f4d3304..0dff67127d90 100644 --- a/python/ql/src/semmle/python/frameworks/Cryptography.qll +++ b/python/ql/src/semmle/python/frameworks/Cryptography.qll @@ -267,8 +267,11 @@ private module CryptographyModel { string algorithmName; CryptographyGenericCipherOperation() { - this.getMethodName() in ["update", "update_into"] and - this.getReceiver() in [cipherEncryptor(algorithmName), cipherDecryptor(algorithmName)] + exists(DataFlow::Node object, string method | + object in [cipherEncryptor(algorithmName), cipherDecryptor(algorithmName)] and + method in ["update", "update_into"] and + this.calls(object, method) + ) } override Cryptography::CryptographicAlgorithm getAlgorithm() { diff --git a/python/ql/test/experimental/dataflow/method-calls/test.expected b/python/ql/test/experimental/dataflow/method-calls/test.expected new file mode 100644 index 000000000000..588c934e8597 --- /dev/null +++ b/python/ql/test/experimental/dataflow/method-calls/test.expected @@ -0,0 +1,8 @@ +conjunctive_lookup +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj1 | bar | +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj1 | foo | +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj2 | bar | +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj2 | foo | +calls_lookup +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj1 | foo | +| test.py:6:1:6:6 | ControlFlowNode for meth() | meth() | obj2 | bar | diff --git a/python/ql/test/experimental/dataflow/method-calls/test.py b/python/ql/test/experimental/dataflow/method-calls/test.py new file mode 100644 index 000000000000..4998e5c05bb0 --- /dev/null +++ b/python/ql/test/experimental/dataflow/method-calls/test.py @@ -0,0 +1,6 @@ +if cond: + meth = obj1.foo +else: + meth = obj2.bar + +meth() diff --git a/python/ql/test/experimental/dataflow/method-calls/test.ql b/python/ql/test/experimental/dataflow/method-calls/test.ql new file mode 100644 index 000000000000..f0cde1a10084 --- /dev/null +++ b/python/ql/test/experimental/dataflow/method-calls/test.ql @@ -0,0 +1,18 @@ +import python +import semmle.python.dataflow.new.DataFlow +import experimental.dataflow.TestUtil.PrintNode + +query predicate conjunctive_lookup( + DataFlow::MethodCallNode methCall, string call, string object, string methodName +) { + call = prettyNode(methCall) and + object = prettyNode(methCall.getObject()) and + methodName = methCall.getMethodName() +} + +query predicate calls_lookup( + DataFlow::MethodCallNode methCall, string call, string object, string methodName +) { + call = prettyNode(methCall) and + exists(DataFlow::Node o | methCall.calls(o, methodName) and object = prettyNode(o)) +} From ba6ab8ff3dc9f8dd87b897ff935b614b18e93fbb Mon Sep 17 00:00:00 2001 From: Taus Date: Mon, 21 Jun 2021 18:14:03 +0200 Subject: [PATCH 1479/1662] Python: Expand `__main__.py` comment Co-authored-by: Rasmus Wriedt Larsen --- python/ql/src/semmle/python/Files.qll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/ql/src/semmle/python/Files.qll b/python/ql/src/semmle/python/Files.qll index 885a902f4e7d..4fa94f46ac6e 100644 --- a/python/ql/src/semmle/python/Files.qll +++ b/python/ql/src/semmle/python/Files.qll @@ -92,6 +92,11 @@ class File extends Container { ) and // Exclude files named `__main__.py`. These are often _not_ meant to be run directly, but // contain this construct anyway. + // + // Their presence in a package (say, `foo`) means one can execute the package directly using + // `python -m foo` (which will run the `foo/__main__.py` file). Since being an entry point for + // execution means treating imports as absolute, this causes trouble, since when run with + // `python -m`, the interpreter uses the usual package semantics. not this.getShortName() = "__main__.py" or // The file contains a `#!` line referencing the python interpreter From 2a4570eaaa39acecf3913912e02bca69c914edd8 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 21 Jun 2021 10:25:26 +0200 Subject: [PATCH 1480/1662] add model for the `dayjs` library --- javascript/change-notes/2021-06-21-dates.md | 5 +++++ .../src/semmle/javascript/frameworks/DateFunctions.qll | 3 +++ .../Security/CWE-079/DomBasedXss/Xss.expected | 9 +++++++++ .../DomBasedXss/XssWithAdditionalSources.expected | 8 ++++++++ .../query-tests/Security/CWE-079/DomBasedXss/dates.js | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 javascript/change-notes/2021-06-21-dates.md diff --git a/javascript/change-notes/2021-06-21-dates.md b/javascript/change-notes/2021-06-21-dates.md new file mode 100644 index 000000000000..3753ad3866d2 --- /dev/null +++ b/javascript/change-notes/2021-06-21-dates.md @@ -0,0 +1,5 @@ +lgtm,codescanning +* Improved support for date parsing libraries, resulting in more results in security queries. + Affected packages are + [dayjs](https://npmjs.com/package/dayjs) + diff --git a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll index c04e6c7e8e08..3d110a63c83d 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll @@ -58,6 +58,9 @@ private module Moment { private API::Node moment() { result = API::moduleImport(["moment", "moment-timezone"]) or + // `dayjs` largely has a similar API to `moment` + result = API::moduleImport("dayjs") + or result = moment().getReturn() or result = moment().getAMember() diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected index b47d84aae4d5..07be9fd4f444 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected @@ -126,6 +126,10 @@ nodes | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:42:18:64 | datefor ... taint) | | dates.js:18:59:18:63 | taint | +| dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | +| dates.js:21:61:21:65 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -755,6 +759,7 @@ edges | dates.js:9:9:9:69 | taint | dates.js:13:59:13:63 | taint | | dates.js:9:9:9:69 | taint | dates.js:16:62:16:66 | taint | | dates.js:9:9:9:69 | taint | dates.js:18:59:18:63 | taint | +| dates.js:9:9:9:69 | taint | dates.js:21:61:21:65 | taint | | dates.js:9:17:9:69 | decodeU ... ing(1)) | dates.js:9:9:9:69 | taint | | dates.js:9:36:9:55 | window.location.hash | dates.js:9:36:9:68 | window. ... ring(1) | | dates.js:9:36:9:55 | window.location.hash | dates.js:9:36:9:68 | window. ... ring(1) | @@ -774,6 +779,9 @@ edges | dates.js:18:42:18:64 | datefor ... taint) | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:42:18:64 | datefor ... taint) | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:59:18:63 | taint | dates.js:18:42:18:64 | datefor ... taint) | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:61:21:65 | taint | dates.js:21:42:21:66 | dayjs(t ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | @@ -1285,6 +1293,7 @@ edges | dates.js:13:31:13:72 | `Time i ... time)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:13:31:13:72 | `Time i ... time)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | | dates.js:16:31:16:69 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:16:31:16:69 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | | dates.js:18:31:18:66 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:18:31:18:66 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | +| dates.js:21:31:21:68 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:21:31:21:68 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | | event-handler-receiver.js:2:31:2:83 | '

    ' | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | Cross-site scripting vulnerability due to $@. | event-handler-receiver.js:2:49:2:61 | location.href | user-provided value | | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | Cross-site scripting vulnerability due to $@. | express.js:7:15:7:33 | req.param("wobble") | user-provided value | | jquery.js:7:5:7:34 | "
    " | jquery.js:2:17:2:40 | documen ... .search | jquery.js:7:5:7:34 | "
    " | Cross-site scripting vulnerability due to $@. | jquery.js:2:17:2:40 | documen ... .search | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected index 7c37f45ccf0c..4fef5a297378 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected @@ -126,6 +126,10 @@ nodes | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:42:18:64 | datefor ... taint) | | dates.js:18:59:18:63 | taint | +| dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | +| dates.js:21:61:21:65 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -773,6 +777,7 @@ edges | dates.js:9:9:9:69 | taint | dates.js:13:59:13:63 | taint | | dates.js:9:9:9:69 | taint | dates.js:16:62:16:66 | taint | | dates.js:9:9:9:69 | taint | dates.js:18:59:18:63 | taint | +| dates.js:9:9:9:69 | taint | dates.js:21:61:21:65 | taint | | dates.js:9:17:9:69 | decodeU ... ing(1)) | dates.js:9:9:9:69 | taint | | dates.js:9:36:9:55 | window.location.hash | dates.js:9:36:9:68 | window. ... ring(1) | | dates.js:9:36:9:55 | window.location.hash | dates.js:9:36:9:68 | window. ... ring(1) | @@ -792,6 +797,9 @@ edges | dates.js:18:42:18:64 | datefor ... taint) | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:42:18:64 | datefor ... taint) | dates.js:18:31:18:66 | `Time i ... aint)}` | | dates.js:18:59:18:63 | taint | dates.js:18:42:18:64 | datefor ... taint) | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | +| dates.js:21:61:21:65 | taint | dates.js:21:42:21:66 | dayjs(t ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js index 592dc37c9733..9f3edd8b9afa 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js @@ -16,4 +16,7 @@ function main() { document.body.innerHTML = `Time is ${moment(time).format(taint)}`; // NOT OK document.body.innerHTML = `Time is ${moment(taint).format()}`; // OK document.body.innerHTML = `Time is ${dateformat(time, taint)}`; // NOT OK + + import dayjs from 'dayjs'; + document.body.innerHTML = `Time is ${dayjs(time).format(taint)}`; // NOT OK } From cdf3cdcf713157672a66ac0ba0f7f24527adbbbf Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 21 Jun 2021 11:33:41 +0200 Subject: [PATCH 1481/1662] add model for the `formatByString` and `formatByNumber` functions in `@date-io` --- .../javascript/frameworks/DateFunctions.qll | 22 +++++++++ .../Security/CWE-079/DomBasedXss/Xss.expected | 45 +++++++++++++++++++ .../XssWithAdditionalSources.expected | 41 +++++++++++++++++ .../Security/CWE-079/DomBasedXss/dates.js | 19 ++++++++ 4 files changed, 127 insertions(+) diff --git a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll index 3d110a63c83d..e75ba151177c 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll @@ -53,6 +53,28 @@ private module DateFns { } } +/** + * Provides classes and predicates modelling the `@date-io` libraries. + */ +private module DateIO { + private class FormatStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode formatCall | + formatCall = + API::moduleImport("@date-io/" + + ["date-fns", "moment", "luxon", "dayjs", "date-fns-jalali", "jalaali", "hijri"]) + .getInstance() + // the `format` function only select between a predefined list of formats, but the `formatByString` function formats using any string. + .getMember(["formatByString", "formatNumber"]) + .getACall() + | + pred = formatCall.getArgument(1) and + succ = formatCall + ) + } + } +} + private module Moment { /** Gets a reference to a `moment` object. */ private API::Node moment() { diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected index 07be9fd4f444..3b9ba5833d31 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected @@ -130,6 +130,27 @@ nodes | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:42:21:66 | dayjs(t ... (taint) | | dates.js:21:61:21:65 | taint | +| dates.js:30:9:30:69 | taint | +| dates.js:30:17:30:69 | decodeU ... ing(1)) | +| dates.js:30:36:30:55 | window.location.hash | +| dates.js:30:36:30:55 | window.location.hash | +| dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:42:37:82 | dateFns ... taint) | +| dates.js:37:77:37:81 | taint | +| dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:42:38:82 | luxon.f ... taint) | +| dates.js:38:77:38:81 | taint | +| dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:42:39:84 | moment. ... taint) | +| dates.js:39:79:39:83 | taint | +| dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:42:40:82 | dayjs.f ... taint) | +| dates.js:40:77:40:81 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -782,6 +803,26 @@ edges | dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:61:21:65 | taint | dates.js:21:42:21:66 | dayjs(t ... (taint) | +| dates.js:30:9:30:69 | taint | dates.js:37:77:37:81 | taint | +| dates.js:30:9:30:69 | taint | dates.js:38:77:38:81 | taint | +| dates.js:30:9:30:69 | taint | dates.js:39:79:39:83 | taint | +| dates.js:30:9:30:69 | taint | dates.js:40:77:40:81 | taint | +| dates.js:30:17:30:69 | decodeU ... ing(1)) | dates.js:30:9:30:69 | taint | +| dates.js:30:36:30:55 | window.location.hash | dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:30:36:30:55 | window.location.hash | dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:30:36:30:68 | window. ... ring(1) | dates.js:30:17:30:69 | decodeU ... ing(1)) | +| dates.js:37:42:37:82 | dateFns ... taint) | dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:42:37:82 | dateFns ... taint) | dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:77:37:81 | taint | dates.js:37:42:37:82 | dateFns ... taint) | +| dates.js:38:42:38:82 | luxon.f ... taint) | dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:42:38:82 | luxon.f ... taint) | dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:77:38:81 | taint | dates.js:38:42:38:82 | luxon.f ... taint) | +| dates.js:39:42:39:84 | moment. ... taint) | dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:42:39:84 | moment. ... taint) | dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:79:39:83 | taint | dates.js:39:42:39:84 | moment. ... taint) | +| dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:77:40:81 | taint | dates.js:40:42:40:82 | dayjs.f ... taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | @@ -1294,6 +1335,10 @@ edges | dates.js:16:31:16:69 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:16:31:16:69 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | | dates.js:18:31:18:66 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:18:31:18:66 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | | dates.js:21:31:21:68 | `Time i ... aint)}` | dates.js:9:36:9:55 | window.location.hash | dates.js:21:31:21:68 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:9:36:9:55 | window.location.hash | user-provided value | +| dates.js:37:31:37:84 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:37:31:37:84 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | +| dates.js:38:31:38:84 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:38:31:38:84 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | +| dates.js:39:31:39:86 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:39:31:39:86 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | +| dates.js:40:31:40:84 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:40:31:40:84 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | | event-handler-receiver.js:2:31:2:83 | '

    ' | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | Cross-site scripting vulnerability due to $@. | event-handler-receiver.js:2:49:2:61 | location.href | user-provided value | | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | Cross-site scripting vulnerability due to $@. | express.js:7:15:7:33 | req.param("wobble") | user-provided value | | jquery.js:7:5:7:34 | "
    " | jquery.js:2:17:2:40 | documen ... .search | jquery.js:7:5:7:34 | "
    " | Cross-site scripting vulnerability due to $@. | jquery.js:2:17:2:40 | documen ... .search | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected index 4fef5a297378..d89b1650d56f 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected @@ -130,6 +130,27 @@ nodes | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:42:21:66 | dayjs(t ... (taint) | | dates.js:21:61:21:65 | taint | +| dates.js:30:9:30:69 | taint | +| dates.js:30:17:30:69 | decodeU ... ing(1)) | +| dates.js:30:36:30:55 | window.location.hash | +| dates.js:30:36:30:55 | window.location.hash | +| dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:42:37:82 | dateFns ... taint) | +| dates.js:37:77:37:81 | taint | +| dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:42:38:82 | luxon.f ... taint) | +| dates.js:38:77:38:81 | taint | +| dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:42:39:84 | moment. ... taint) | +| dates.js:39:79:39:83 | taint | +| dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:42:40:82 | dayjs.f ... taint) | +| dates.js:40:77:40:81 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -800,6 +821,26 @@ edges | dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:42:21:66 | dayjs(t ... (taint) | dates.js:21:31:21:68 | `Time i ... aint)}` | | dates.js:21:61:21:65 | taint | dates.js:21:42:21:66 | dayjs(t ... (taint) | +| dates.js:30:9:30:69 | taint | dates.js:37:77:37:81 | taint | +| dates.js:30:9:30:69 | taint | dates.js:38:77:38:81 | taint | +| dates.js:30:9:30:69 | taint | dates.js:39:79:39:83 | taint | +| dates.js:30:9:30:69 | taint | dates.js:40:77:40:81 | taint | +| dates.js:30:17:30:69 | decodeU ... ing(1)) | dates.js:30:9:30:69 | taint | +| dates.js:30:36:30:55 | window.location.hash | dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:30:36:30:55 | window.location.hash | dates.js:30:36:30:68 | window. ... ring(1) | +| dates.js:30:36:30:68 | window. ... ring(1) | dates.js:30:17:30:69 | decodeU ... ing(1)) | +| dates.js:37:42:37:82 | dateFns ... taint) | dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:42:37:82 | dateFns ... taint) | dates.js:37:31:37:84 | `Time i ... aint)}` | +| dates.js:37:77:37:81 | taint | dates.js:37:42:37:82 | dateFns ... taint) | +| dates.js:38:42:38:82 | luxon.f ... taint) | dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:42:38:82 | luxon.f ... taint) | dates.js:38:31:38:84 | `Time i ... aint)}` | +| dates.js:38:77:38:81 | taint | dates.js:38:42:38:82 | luxon.f ... taint) | +| dates.js:39:42:39:84 | moment. ... taint) | dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:42:39:84 | moment. ... taint) | dates.js:39:31:39:86 | `Time i ... aint)}` | +| dates.js:39:79:39:83 | taint | dates.js:39:42:39:84 | moment. ... taint) | +| dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | +| dates.js:40:77:40:81 | taint | dates.js:40:42:40:82 | dayjs.f ... taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js index 9f3edd8b9afa..352e5a0b5921 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js @@ -20,3 +20,22 @@ function main() { import dayjs from 'dayjs'; document.body.innerHTML = `Time is ${dayjs(time).format(taint)}`; // NOT OK } + +import LuxonAdapter from "@date-io/luxon"; +import DateFnsAdapter from "@date-io/date-fns"; +import MomentAdapter from "@date-io/moment"; +import DayJSAdapter from "@date-io/dayjs" + +function dateio() { + let taint = decodeURIComponent(window.location.hash.substring(1)); + + const dateFns = new DateFnsAdapter(); + const luxon = new LuxonAdapter(); + const moment = new MomentAdapter(); + const dayjs = new DayJSAdapter(); + + document.body.innerHTML = `Time is ${dateFns.formatByString(new Date(), taint)}`; // NOT OK + document.body.innerHTML = `Time is ${luxon.formatByString(luxon.date(), taint)}`; // NOT OK + document.body.innerHTML = `Time is ${moment.formatByString(moment.date(), taint)}`; // NOT OK + document.body.innerHTML = `Time is ${dayjs.formatByString(dayjs.date(), taint)}`; // NOT OK +} \ No newline at end of file From 227f61b95404cc56ce863a9c2422148deb98a323 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 21 Jun 2021 22:26:57 +0200 Subject: [PATCH 1482/1662] add model for the `luxon` library --- javascript/change-notes/2021-06-21-dates.md | 3 +- .../javascript/frameworks/DateFunctions.qll | 39 +++++++++++++++++++ .../Security/CWE-079/DomBasedXss/Xss.expected | 36 +++++++++++++++++ .../XssWithAdditionalSources.expected | 33 ++++++++++++++++ .../Security/CWE-079/DomBasedXss/dates.js | 13 ++++++- 5 files changed, 122 insertions(+), 2 deletions(-) diff --git a/javascript/change-notes/2021-06-21-dates.md b/javascript/change-notes/2021-06-21-dates.md index 3753ad3866d2..1f1320b6b8e0 100644 --- a/javascript/change-notes/2021-06-21-dates.md +++ b/javascript/change-notes/2021-06-21-dates.md @@ -1,5 +1,6 @@ lgtm,codescanning * Improved support for date parsing libraries, resulting in more results in security queries. Affected packages are - [dayjs](https://npmjs.com/package/dayjs) + [dayjs](https://npmjs.com/package/dayjs), + [luxon](https://npmjs.com/package/luxon) diff --git a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll index e75ba151177c..bd504f463086 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll @@ -75,6 +75,45 @@ private module DateIO { } } +/** + * Provides classes and predicates modelling the `luxon` library. + */ +private module Luxon { + /** + * Gets a reference to a `DateTime` object from the `luxon` library. + */ + private API::Node luxonDateTime() { + exists(API::Node constructor | constructor = API::moduleImport("luxon").getMember("DateTime") | + result = constructor.getInstance() + or + result = + constructor + .getMember([ + "fromJSDate", "fromJSDate", "fromISO", "now", "fromMillis", "fromHTTP", + "fromObject", "fromRFC2822", "fromSeconds", "fromSQL", "fromFormat", "fromString", + "invalid", "local", "utc" + ]) + .getReturn() + or + // fluent API that return immutable objects + result = luxonDateTime().getAMember() + or + result = luxonDateTime().getReturn() + ) + } + + /** + * A step of the form: `f -> luxonDateTime.toFormat(f)`. + */ + private class ToFormatStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = luxonDateTime().getMember("toFormat").getACall() | + pred = call.getArgument(0) and succ = call + ) + } + } +} + private module Moment { /** Gets a reference to a `moment` object. */ private API::Node moment() { diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected index 3b9ba5833d31..97d75aba80b2 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected @@ -151,6 +151,23 @@ nodes | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:42:40:82 | dayjs.f ... taint) | | dates.js:40:77:40:81 | taint | +| dates.js:46:9:46:69 | taint | +| dates.js:46:17:46:69 | decodeU ... ing(1)) | +| dates.js:46:36:46:55 | window.location.hash | +| dates.js:46:36:46:55 | window.location.hash | +| dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:42:48:88 | DateTim ... (taint) | +| dates.js:48:83:48:87 | taint | +| dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:42:49:87 | new Dat ... (taint) | +| dates.js:49:82:49:86 | taint | +| dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:42:50:102 | DateTim ... (taint) | +| dates.js:50:97:50:101 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -823,6 +840,22 @@ edges | dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:77:40:81 | taint | dates.js:40:42:40:82 | dayjs.f ... taint) | +| dates.js:46:9:46:69 | taint | dates.js:48:83:48:87 | taint | +| dates.js:46:9:46:69 | taint | dates.js:49:82:49:86 | taint | +| dates.js:46:9:46:69 | taint | dates.js:50:97:50:101 | taint | +| dates.js:46:17:46:69 | decodeU ... ing(1)) | dates.js:46:9:46:69 | taint | +| dates.js:46:36:46:55 | window.location.hash | dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:46:36:46:55 | window.location.hash | dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:46:36:46:68 | window. ... ring(1) | dates.js:46:17:46:69 | decodeU ... ing(1)) | +| dates.js:48:42:48:88 | DateTim ... (taint) | dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:42:48:88 | DateTim ... (taint) | dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:83:48:87 | taint | dates.js:48:42:48:88 | DateTim ... (taint) | +| dates.js:49:42:49:87 | new Dat ... (taint) | dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:42:49:87 | new Dat ... (taint) | dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:82:49:86 | taint | dates.js:49:42:49:87 | new Dat ... (taint) | +| dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:97:50:101 | taint | dates.js:50:42:50:102 | DateTim ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | @@ -1339,6 +1372,9 @@ edges | dates.js:38:31:38:84 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:38:31:38:84 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | | dates.js:39:31:39:86 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:39:31:39:86 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | | dates.js:40:31:40:84 | `Time i ... aint)}` | dates.js:30:36:30:55 | window.location.hash | dates.js:40:31:40:84 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:30:36:30:55 | window.location.hash | user-provided value | +| dates.js:48:31:48:90 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:48:31:48:90 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | +| dates.js:49:31:49:89 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:49:31:49:89 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | +| dates.js:50:31:50:104 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:50:31:50:104 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | | event-handler-receiver.js:2:31:2:83 | '

    ' | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | Cross-site scripting vulnerability due to $@. | event-handler-receiver.js:2:49:2:61 | location.href | user-provided value | | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | Cross-site scripting vulnerability due to $@. | express.js:7:15:7:33 | req.param("wobble") | user-provided value | | jquery.js:7:5:7:34 | "
    " | jquery.js:2:17:2:40 | documen ... .search | jquery.js:7:5:7:34 | "
    " | Cross-site scripting vulnerability due to $@. | jquery.js:2:17:2:40 | documen ... .search | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected index d89b1650d56f..ef1d29eeed8e 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected @@ -151,6 +151,23 @@ nodes | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:42:40:82 | dayjs.f ... taint) | | dates.js:40:77:40:81 | taint | +| dates.js:46:9:46:69 | taint | +| dates.js:46:17:46:69 | decodeU ... ing(1)) | +| dates.js:46:36:46:55 | window.location.hash | +| dates.js:46:36:46:55 | window.location.hash | +| dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:42:48:88 | DateTim ... (taint) | +| dates.js:48:83:48:87 | taint | +| dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:42:49:87 | new Dat ... (taint) | +| dates.js:49:82:49:86 | taint | +| dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:42:50:102 | DateTim ... (taint) | +| dates.js:50:97:50:101 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -841,6 +858,22 @@ edges | dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:42:40:82 | dayjs.f ... taint) | dates.js:40:31:40:84 | `Time i ... aint)}` | | dates.js:40:77:40:81 | taint | dates.js:40:42:40:82 | dayjs.f ... taint) | +| dates.js:46:9:46:69 | taint | dates.js:48:83:48:87 | taint | +| dates.js:46:9:46:69 | taint | dates.js:49:82:49:86 | taint | +| dates.js:46:9:46:69 | taint | dates.js:50:97:50:101 | taint | +| dates.js:46:17:46:69 | decodeU ... ing(1)) | dates.js:46:9:46:69 | taint | +| dates.js:46:36:46:55 | window.location.hash | dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:46:36:46:55 | window.location.hash | dates.js:46:36:46:68 | window. ... ring(1) | +| dates.js:46:36:46:68 | window. ... ring(1) | dates.js:46:17:46:69 | decodeU ... ing(1)) | +| dates.js:48:42:48:88 | DateTim ... (taint) | dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:42:48:88 | DateTim ... (taint) | dates.js:48:31:48:90 | `Time i ... aint)}` | +| dates.js:48:83:48:87 | taint | dates.js:48:42:48:88 | DateTim ... (taint) | +| dates.js:49:42:49:87 | new Dat ... (taint) | dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:42:49:87 | new Dat ... (taint) | dates.js:49:31:49:89 | `Time i ... aint)}` | +| dates.js:49:82:49:86 | taint | dates.js:49:42:49:87 | new Dat ... (taint) | +| dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | +| dates.js:50:97:50:101 | taint | dates.js:50:42:50:102 | DateTim ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js index 352e5a0b5921..ee6571257aa5 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js @@ -38,4 +38,15 @@ function dateio() { document.body.innerHTML = `Time is ${luxon.formatByString(luxon.date(), taint)}`; // NOT OK document.body.innerHTML = `Time is ${moment.formatByString(moment.date(), taint)}`; // NOT OK document.body.innerHTML = `Time is ${dayjs.formatByString(dayjs.date(), taint)}`; // NOT OK -} \ No newline at end of file +} + +import { DateTime } from "luxon"; + +function luxon() { + let taint = decodeURIComponent(window.location.hash.substring(1)); + + document.body.innerHTML = `Time is ${DateTime.now().plus({years: 1}).toFormat(taint)}`; // NOT OK + document.body.innerHTML = `Time is ${new DateTime().setLocale('fr').toFormat(taint)}`; // NOT OK + document.body.innerHTML = `Time is ${DateTime.fromISO("2020-01-01").startOf('day').toFormat(taint)}`; // NOT OK +} + From 2a9d0009be51e7ffe3923ddbbbf928d2e3007034 Mon Sep 17 00:00:00 2001 From: AlonaHlobina <54394529+AlonaHlobina@users.noreply.github.com> Date: Tue, 22 Jun 2021 10:36:19 +0300 Subject: [PATCH 1483/1662] Update versions-compilers.rst --- docs/codeql/support/reusables/versions-compilers.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/codeql/support/reusables/versions-compilers.rst b/docs/codeql/support/reusables/versions-compilers.rst index dd1a1a7e10e2..007767335f70 100644 --- a/docs/codeql/support/reusables/versions-compilers.rst +++ b/docs/codeql/support/reusables/versions-compilers.rst @@ -4,8 +4,7 @@ :stub-columns: 1 Language,Variants,Compilers,Extensions - - C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17","Clang (and clang-cl [1]_) extensions (up to Clang 12.0), + C/C++,"C89, C99, C11, C18, C++98, C++03, C++11, C++14, C++17, C++20 [1]_","Clang (and clang-cl [2]_) extensions (up to Clang 12.0), GNU extensions (up to GCC 11.1), From a4303bc81d8f3a86bb08f1455322482d6146b64c Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 10:24:11 +0200 Subject: [PATCH 1484/1662] add CWE-1333 to the JS ReDoS queries --- javascript/ql/src/Performance/PolynomialReDoS.ql | 1 + javascript/ql/src/Performance/ReDoS.ql | 1 + 2 files changed, 2 insertions(+) diff --git a/javascript/ql/src/Performance/PolynomialReDoS.ql b/javascript/ql/src/Performance/PolynomialReDoS.ql index 5f46b36b5e19..f9e8488ae905 100644 --- a/javascript/ql/src/Performance/PolynomialReDoS.ql +++ b/javascript/ql/src/Performance/PolynomialReDoS.ql @@ -8,6 +8,7 @@ * @precision high * @id js/polynomial-redos * @tags security + * external/cwe/cwe-1333 * external/cwe/cwe-730 * external/cwe/cwe-400 */ diff --git a/javascript/ql/src/Performance/ReDoS.ql b/javascript/ql/src/Performance/ReDoS.ql index 804e59fe813a..1f712810a50c 100644 --- a/javascript/ql/src/Performance/ReDoS.ql +++ b/javascript/ql/src/Performance/ReDoS.ql @@ -9,6 +9,7 @@ * @precision high * @id js/redos * @tags security + * external/cwe/cwe-1333 * external/cwe/cwe-730 * external/cwe/cwe-400 */ From 967ccfef0cd5cc3692420ce0ceb3bd006275894b Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Jun 2021 14:56:46 +0200 Subject: [PATCH 1485/1662] add support for `kew` --- javascript/change-notes/2021-06-18-promises.md | 4 ++++ javascript/ql/src/semmle/javascript/Promises.qll | 4 ++-- .../Promises/AdditionalPromises.expected | 1 + .../ql/test/library-tests/Promises/promises.js | 13 ++++++++++++- .../ql/test/library-tests/Promises/tests.expected | 7 +++++++ 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 javascript/change-notes/2021-06-18-promises.md diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md new file mode 100644 index 000000000000..df9c1d806a11 --- /dev/null +++ b/javascript/change-notes/2021-06-18-promises.md @@ -0,0 +1,4 @@ +lgtm,codescanning +* The security queries now track flow through various `Promise` polyfills. + Affected packages are + [kew](https://npmjs.com/package/kew) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 9190473201e8..7d842e0ae2ff 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -562,14 +562,14 @@ module Bluebird { } /** - * Provides classes for working with the `q` library (https://github.com/kriskowal/q). + * Provides classes for working with the `q` library (https://github.com/kriskowal/q) and the compatible `kew` library (https://github.com/Medium/kew). */ module Q { /** * A promise object created by the q `Promise` constructor. */ private class QPromiseDefinition extends PromiseDefinition, DataFlow::CallNode { - QPromiseDefinition() { this = DataFlow::moduleMember("q", "Promise").getACall() } + QPromiseDefinition() { this = DataFlow::moduleMember(["q", "kew"], "Promise").getACall() } override DataFlow::FunctionNode getExecutor() { result = getCallback(0) } } diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index d6845266dccb..f6ee9faab001 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -79,3 +79,4 @@ | promises.js:71:5:71:27 | Promise ... source) | | promises.js:72:5:72:41 | new Pro ... ource)) | | promises.js:79:19:79:41 | Promise ... source) | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 8a3d0cbc5cf1..dfbbbf6f2312 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -80,4 +80,15 @@ promise.then(function (val) { var sink = val; }); -})(); \ No newline at end of file +})(); + + +(function() { + var Q = require("kew"); + var promise = Q.Promise(function (resolve, reject) { + resolve(source); + }); + promise.then(function (val) { + var sink = val; + }); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 00320cc83fcf..14b0a0571679 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -82,6 +82,7 @@ test_PromiseDefinition_getExecutor | promises.js:10:18:17:4 | new Pro ... );\\n }) | promises.js:10:30:17:3 | (res, r ... e);\\n } | | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:31:35:5 | functio ... ;\\n } | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:29:45:5 | functio ... ;\\n } | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:27:90:3 | functio ... e);\\n } | test_PromiseDefinition_getAFinallyHandler | flow.js:105:2:105:48 | new Pro ... "BLA")) | flow.js:105:58:105:76 | x => {throw source} | | flow.js:109:2:109:48 | new Pro ... "BLA")) | flow.js:109:58:109:70 | x => rejected | @@ -117,6 +118,7 @@ test_PromiseDefinition | promises.js:10:18:17:4 | new Pro ... );\\n }) | | promises.js:33:19:35:6 | new Pro ... \\n }) | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -134,6 +136,7 @@ test_PromiseDefinition_getAResolveHandler | promises.js:10:18:17:4 | new Pro ... );\\n }) | promises.js:26:20:28:3 | (v) => ... v;\\n } | | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:36:18:38:5 | functio ... ;\\n } | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:46:18:48:5 | functio ... ;\\n } | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:91:16:93:3 | functio ... al;\\n } | test_PromiseDefinition_getRejectParameter | flow.js:7:11:7:59 | new Pro ... ource)) | flow.js:7:33:7:38 | reject | | flow.js:10:11:10:58 | new Pro ... ource)) | flow.js:10:33:10:38 | reject | @@ -164,6 +167,7 @@ test_PromiseDefinition_getRejectParameter | promises.js:10:18:17:4 | new Pro ... );\\n }) | promises.js:10:36:10:38 | rej | | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:50:33:55 | reject | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:48:43:53 | reject | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:46:88:51 | reject | test_PromiseDefinition_getResolveParameter | flow.js:7:11:7:59 | new Pro ... ource)) | flow.js:7:24:7:30 | resolve | | flow.js:10:11:10:58 | new Pro ... ource)) | flow.js:10:24:10:30 | resolve | @@ -194,6 +198,7 @@ test_PromiseDefinition_getResolveParameter | promises.js:10:18:17:4 | new Pro ... );\\n }) | promises.js:10:31:10:33 | res | | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:41:33:47 | resolve | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:39:43:45 | resolve | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:37:88:43 | resolve | test_PromiseDefinition_getACatchHandler | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | | flow.js:48:2:48:36 | new Pro ... urce }) | flow.js:48:44:48:55 | x => sink(x) | @@ -400,3 +405,5 @@ typetrack | promises.js:71:34:71:36 | val | promises.js:71:5:71:27 | Promise ... source) | load $PromiseResolveField$ | | promises.js:72:48:72:50 | val | promises.js:72:5:72:41 | new Pro ... ource)) | load $PromiseResolveField$ | | promises.js:75:27:75:29 | val | promises.js:75:5:75:20 | resolver.promise | load $PromiseResolveField$ | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:89:15:89:20 | source | copy $PromiseResolveField$ | +| promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:89:15:89:20 | source | store $PromiseResolveField$ | From f095e190a903ebc6e3ae4559087d6313269765bd Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Jun 2021 16:06:39 +0200 Subject: [PATCH 1486/1662] add support for the `promise` polyfill --- .../change-notes/2021-06-18-promises.md | 3 ++- .../ql/src/semmle/javascript/Promises.qll | 25 ++++++++++++++----- .../test/library-tests/Promises/promises.js | 7 ++++++ .../library-tests/Promises/tests.expected | 6 +++++ 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index df9c1d806a11..e170fd7ce24f 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -1,4 +1,5 @@ lgtm,codescanning * The security queries now track flow through various `Promise` polyfills. Affected packages are - [kew](https://npmjs.com/package/kew) + [kew](https://npmjs.com/package/kew), + [promise](https://npmjs.com/package/promise) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 7d842e0ae2ff..328d04c47449 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -58,6 +58,22 @@ private predicate hasHandler(DataFlow::InvokeNode promise, string m, int i) { exists(promise.getAMethodCall(m).getCallback(i)) } +/** + * Gets a reference to the `Promise` object. + * Either from the standard library, a polyfill import, or a polyfill that defines the global `Promise` variable. + */ +private DataFlow::SourceNode getAPromiseObject() { + // Standard library, or polyfills like [es6-shim](https://npmjs.org/package/es6-shim). + result = DataFlow::globalVarRef("Promise") + or + // polyfills from the [`promise`](https://npmjs.org/package/promise) library. + result = + DataFlow::moduleImport([ + "promise", "promise/domains", "promise/setimmediate", "promise/lib/es6-extensions", + "promise/domains/es6-extensions", "promise/setimmediate/es6-extensions" + ]) +} + /** * A call that looks like a Promise. * @@ -75,7 +91,7 @@ class PromiseCandidate extends DataFlow::InvokeNode { * A promise object created by the standard ECMAScript 2015 `Promise` constructor. */ private class ES2015PromiseDefinition extends PromiseDefinition, DataFlow::NewNode { - ES2015PromiseDefinition() { this = DataFlow::globalVarRef("Promise").getAnInstantiation() } + ES2015PromiseDefinition() { this = getAPromiseObject().getAnInstantiation() } override DataFlow::FunctionNode getExecutor() { result = getCallback(0) } } @@ -109,9 +125,7 @@ abstract class PromiseAllCreation extends PromiseCreationCall { * A resolved promise created by the standard ECMAScript 2015 `Promise.resolve` function. */ class ResolvedES2015PromiseDefinition extends ResolvedPromiseDefinition { - ResolvedES2015PromiseDefinition() { - this = DataFlow::globalVarRef("Promise").getAMemberCall("resolve") - } + ResolvedES2015PromiseDefinition() { this = getAPromiseObject().getAMemberCall("resolve") } override DataFlow::Node getValue() { result = getArgument(0) } } @@ -121,8 +135,7 @@ class ResolvedES2015PromiseDefinition extends ResolvedPromiseDefinition { */ class AggregateES2015PromiseDefinition extends PromiseCreationCall { AggregateES2015PromiseDefinition() { - exists(string m | m = "all" or m = "race" or m = "any" | - this = DataFlow::globalVarRef("Promise").getAMemberCall(m) + this = getAPromiseObject().getAMemberCall(m) ) } diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index dfbbbf6f2312..49063fd08fa3 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -92,3 +92,10 @@ var sink = val; }); })(); + +(function() { + var PromiseA = require('promise'); + var PromiseB = require('promise/domains'); + PromiseA.resolve(source); + PromiseB.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 14b0a0571679..a6d2304537f4 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -36,6 +36,8 @@ test_ResolvedPromiseDefinition | promises.js:62:19:62:41 | Promise ... source) | promises.js:62:35:62:40 | source | | promises.js:71:5:71:27 | Promise ... source) | promises.js:71:21:71:26 | source | | promises.js:79:19:79:41 | Promise ... source) | promises.js:79:35:79:40 | source | +| promises.js:99:3:99:26 | Promise ... source) | promises.js:99:20:99:25 | source | +| promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -407,3 +409,7 @@ typetrack | promises.js:75:27:75:29 | val | promises.js:75:5:75:20 | resolver.promise | load $PromiseResolveField$ | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:89:15:89:20 | source | copy $PromiseResolveField$ | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:89:15:89:20 | source | store $PromiseResolveField$ | +| promises.js:99:3:99:26 | Promise ... source) | promises.js:99:20:99:25 | source | copy $PromiseResolveField$ | +| promises.js:99:3:99:26 | Promise ... source) | promises.js:99:20:99:25 | source | store $PromiseResolveField$ | +| promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | copy $PromiseResolveField$ | +| promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | store $PromiseResolveField$ | From d7a47e8fbd164f3ffb789c90f1666281aa31ac6b Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Jun 2021 16:13:28 +0200 Subject: [PATCH 1487/1662] add support for the `promise-polyfill` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 5 +++++ javascript/ql/test/library-tests/Promises/promises.js | 7 +++++++ javascript/ql/test/library-tests/Promises/tests.expected | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index e170fd7ce24f..a3c94d971f14 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -2,4 +2,5 @@ lgtm,codescanning * The security queries now track flow through various `Promise` polyfills. Affected packages are [kew](https://npmjs.com/package/kew), - [promise](https://npmjs.com/package/promise) + [promise](https://npmjs.com/package/promise), + [promise-polyfill](https://npmjs.com/package/promise-polyfill) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 328d04c47449..b7fc6ccd61a6 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -72,6 +72,11 @@ private DataFlow::SourceNode getAPromiseObject() { "promise", "promise/domains", "promise/setimmediate", "promise/lib/es6-extensions", "promise/domains/es6-extensions", "promise/setimmediate/es6-extensions" ]) + or + // polyfill from the [`promise-polyfill`](https://npmjs.org/package/promise-polyfill) library. + result = DataFlow::moduleMember(["promise-polyfill", "promise-polyfill/src/polyfill"], "default") + or + result = DataFlow::moduleImport(["promise-polyfill", "promise-polyfill/src/polyfill"]) } /** diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 49063fd08fa3..811165775a18 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -99,3 +99,10 @@ PromiseA.resolve(source); PromiseB.resolve(source); })(); + +(function() { + var PromiseA = require('promise-polyfill').default; + import PromiseB from 'promise-polyfill'; + PromiseA.resolve(source); + PromiseB.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index a6d2304537f4..ba203e3b4109 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -38,6 +38,8 @@ test_ResolvedPromiseDefinition | promises.js:79:19:79:41 | Promise ... source) | promises.js:79:35:79:40 | source | | promises.js:99:3:99:26 | Promise ... source) | promises.js:99:20:99:25 | source | | promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | +| promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | +| promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -413,3 +415,7 @@ typetrack | promises.js:99:3:99:26 | Promise ... source) | promises.js:99:20:99:25 | source | store $PromiseResolveField$ | | promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | copy $PromiseResolveField$ | | promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | store $PromiseResolveField$ | +| promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | copy $PromiseResolveField$ | +| promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | store $PromiseResolveField$ | +| promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | copy $PromiseResolveField$ | +| promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | store $PromiseResolveField$ | From ebde9015d8d9bf4ea2a42d6a6bc8e93d18cdd43f Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Fri, 18 Jun 2021 16:18:24 +0200 Subject: [PATCH 1488/1662] add support for the `rsvp` and `es6-promise` polyfill --- javascript/change-notes/2021-06-18-promises.md | 4 +++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ .../library-tests/Promises/AdditionalPromises.expected | 1 + javascript/ql/test/library-tests/Promises/promises.js | 7 +++++++ javascript/ql/test/library-tests/Promises/tests.expected | 7 +++++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index a3c94d971f14..f9e88266a05f 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -3,4 +3,6 @@ lgtm,codescanning Affected packages are [kew](https://npmjs.com/package/kew), [promise](https://npmjs.com/package/promise), - [promise-polyfill](https://npmjs.com/package/promise-polyfill) + [promise-polyfill](https://npmjs.com/package/promise-polyfill), + [rsvp](https://npmjs.com/package/rsvp), + [es6-promise](https://npmjs.com/package/es6-promise) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index b7fc6ccd61a6..ac2c8334f68b 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -77,6 +77,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleMember(["promise-polyfill", "promise-polyfill/src/polyfill"], "default") or result = DataFlow::moduleImport(["promise-polyfill", "promise-polyfill/src/polyfill"]) + or + result = DataFlow::moduleMember(["es6-promise", "rsvp"], "Promise") } /** diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index f6ee9faab001..3b2f628ec3d1 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -80,3 +80,4 @@ | promises.js:72:5:72:41 | new Pro ... ource)) | | promises.js:79:19:79:41 | Promise ... source) | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | +| promises.js:112:17:112:62 | new RSV ... ct) {}) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 811165775a18..9af2c123b0a1 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -106,3 +106,10 @@ PromiseA.resolve(source); PromiseB.resolve(source); })(); + +(function() { + var RSVP = require('rsvp'); + var promise = new RSVP.Promise(function(resolve, reject) {}); + var Promise = require('es6-promise').Promise; + Promise.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index ba203e3b4109..5c9a3b95d408 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -40,6 +40,7 @@ test_ResolvedPromiseDefinition | promises.js:100:3:100:26 | Promise ... source) | promises.js:100:20:100:25 | source | | promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | +| promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -87,6 +88,7 @@ test_PromiseDefinition_getExecutor | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:31:35:5 | functio ... ;\\n } | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:29:45:5 | functio ... ;\\n } | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:27:90:3 | functio ... e);\\n } | +| promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:34:112:61 | functio ... ect) {} | test_PromiseDefinition_getAFinallyHandler | flow.js:105:2:105:48 | new Pro ... "BLA")) | flow.js:105:58:105:76 | x => {throw source} | | flow.js:109:2:109:48 | new Pro ... "BLA")) | flow.js:109:58:109:70 | x => rejected | @@ -123,6 +125,7 @@ test_PromiseDefinition | promises.js:33:19:35:6 | new Pro ... \\n }) | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | +| promises.js:112:17:112:62 | new RSV ... ct) {}) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -172,6 +175,7 @@ test_PromiseDefinition_getRejectParameter | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:50:33:55 | reject | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:48:43:53 | reject | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:46:88:51 | reject | +| promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:52:112:57 | reject | test_PromiseDefinition_getResolveParameter | flow.js:7:11:7:59 | new Pro ... ource)) | flow.js:7:24:7:30 | resolve | | flow.js:10:11:10:58 | new Pro ... ource)) | flow.js:10:24:10:30 | resolve | @@ -203,6 +207,7 @@ test_PromiseDefinition_getResolveParameter | promises.js:33:19:35:6 | new Pro ... \\n }) | promises.js:33:41:33:47 | resolve | | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:39:43:45 | resolve | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:37:88:43 | resolve | +| promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:43:112:49 | resolve | test_PromiseDefinition_getACatchHandler | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | | flow.js:48:2:48:36 | new Pro ... urce }) | flow.js:48:44:48:55 | x => sink(x) | @@ -419,3 +424,5 @@ typetrack | promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | store $PromiseResolveField$ | | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | copy $PromiseResolveField$ | | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | store $PromiseResolveField$ | +| promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | copy $PromiseResolveField$ | +| promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | store $PromiseResolveField$ | From e467ea2ea6b9061885c8184a939c2a4148450917 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 18:40:02 +0200 Subject: [PATCH 1489/1662] add support for the `native-promise-only` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ javascript/ql/test/library-tests/Promises/promises.js | 5 +++++ javascript/ql/test/library-tests/Promises/tests.expected | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index f9e88266a05f..0fd98a4b78fa 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -5,4 +5,5 @@ lgtm,codescanning [promise](https://npmjs.com/package/promise), [promise-polyfill](https://npmjs.com/package/promise-polyfill), [rsvp](https://npmjs.com/package/rsvp), - [es6-promise](https://npmjs.com/package/es6-promise) + [es6-promise](https://npmjs.com/package/es6-promise), + [native-promise-only](https://npmjs.com/package/native-promise-only) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index ac2c8334f68b..b4760d12fe8e 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -79,6 +79,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleImport(["promise-polyfill", "promise-polyfill/src/polyfill"]) or result = DataFlow::moduleMember(["es6-promise", "rsvp"], "Promise") + or + result = DataFlow::moduleImport("native-promise-only") } /** diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 9af2c123b0a1..bacdec1f3bc1 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -113,3 +113,8 @@ var Promise = require('es6-promise').Promise; Promise.resolve(source); })(); + +(function() { + var Promise = require('native-promise-only'); + Promise.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 5c9a3b95d408..c682a5236183 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -41,6 +41,7 @@ test_ResolvedPromiseDefinition | promises.js:106:3:106:26 | Promise ... source) | promises.js:106:20:106:25 | source | | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | +| promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -426,3 +427,5 @@ typetrack | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | store $PromiseResolveField$ | | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | copy $PromiseResolveField$ | | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | store $PromiseResolveField$ | +| promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | copy $PromiseResolveField$ | +| promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | store $PromiseResolveField$ | From bb1c971348f34267257a578627b4e8133adf0c17 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 18:49:06 +0200 Subject: [PATCH 1490/1662] add support for the `when` polyfill, and expand the defition of `ES2015PromiseDefinition` --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 9 ++++++--- .../library-tests/Promises/AdditionalPromises.expected | 1 + javascript/ql/test/library-tests/Promises/promises.js | 6 ++++++ javascript/ql/test/library-tests/Promises/tests.expected | 4 ++++ 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index 0fd98a4b78fa..e529c6ca1ace 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -6,4 +6,5 @@ lgtm,codescanning [promise-polyfill](https://npmjs.com/package/promise-polyfill), [rsvp](https://npmjs.com/package/rsvp), [es6-promise](https://npmjs.com/package/es6-promise), - [native-promise-only](https://npmjs.com/package/native-promise-only) + [native-promise-only](https://npmjs.com/package/native-promise-only), + [when](https://npmjs.com/package/when) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index b4760d12fe8e..1f066ac48296 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -81,6 +81,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleMember(["es6-promise", "rsvp"], "Promise") or result = DataFlow::moduleImport("native-promise-only") + or + result = DataFlow::moduleImport("when") } /** @@ -97,10 +99,11 @@ class PromiseCandidate extends DataFlow::InvokeNode { } /** - * A promise object created by the standard ECMAScript 2015 `Promise` constructor. + * A promise object created by the standard ECMAScript 2015 `Promise` constructor, + * or a polyfill implementing a superset of the ECMAScript 2015 `Promise` API. */ -private class ES2015PromiseDefinition extends PromiseDefinition, DataFlow::NewNode { - ES2015PromiseDefinition() { this = getAPromiseObject().getAnInstantiation() } +private class ES2015PromiseDefinition extends PromiseDefinition, DataFlow::InvokeNode { + ES2015PromiseDefinition() { this = getAPromiseObject().getAnInvocation() } override DataFlow::FunctionNode getExecutor() { result = getCallback(0) } } diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index 3b2f628ec3d1..a093621ca753 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -81,3 +81,4 @@ | promises.js:79:19:79:41 | Promise ... source) | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | | promises.js:112:17:112:62 | new RSV ... ct) {}) | +| promises.js:124:19:124:30 | when(source) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index bacdec1f3bc1..0d5524d7567a 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -118,3 +118,9 @@ var Promise = require('native-promise-only'); Promise.resolve(source); })(); + +(function() { + const when = require('when'); + const promise = when(source); + const promise2 = when.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index c682a5236183..797e370a949d 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -42,6 +42,7 @@ test_ResolvedPromiseDefinition | promises.js:107:3:107:26 | Promise ... source) | promises.js:107:20:107:25 | source | | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | +| promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -127,6 +128,7 @@ test_PromiseDefinition | promises.js:43:19:45:6 | Q.Promi ... \\n }) | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | | promises.js:112:17:112:62 | new RSV ... ct) {}) | +| promises.js:124:19:124:30 | when(source) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -429,3 +431,5 @@ typetrack | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | store $PromiseResolveField$ | | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | copy $PromiseResolveField$ | | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | store $PromiseResolveField$ | +| promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | copy $PromiseResolveField$ | +| promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | store $PromiseResolveField$ | From b574292dab3e2f895359fad695295e1173744005 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:16:14 +0200 Subject: [PATCH 1491/1662] add support for the `pinkie-promise` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ .../test/library-tests/Promises/AdditionalPromises.expected | 1 + javascript/ql/test/library-tests/Promises/promises.js | 5 +++++ javascript/ql/test/library-tests/Promises/tests.expected | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index e529c6ca1ace..a76a81efb838 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -7,4 +7,5 @@ lgtm,codescanning [rsvp](https://npmjs.com/package/rsvp), [es6-promise](https://npmjs.com/package/es6-promise), [native-promise-only](https://npmjs.com/package/native-promise-only), - [when](https://npmjs.com/package/when) + [when](https://npmjs.com/package/when), + [pinkie-promise](https://npmjs.com/package/pinkie-promise) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 1f066ac48296..420f8707e244 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -83,6 +83,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleImport("native-promise-only") or result = DataFlow::moduleImport("when") + or + result = DataFlow::moduleImport("pinkie-promise") } /** diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index a093621ca753..56bb2cebd132 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -82,3 +82,4 @@ | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | | promises.js:112:17:112:62 | new RSV ... ct) {}) | | promises.js:124:19:124:30 | when(source) | +| promises.js:130:14:130:69 | new Pro ... s'); }) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 0d5524d7567a..72046d337118 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -124,3 +124,8 @@ const promise = when(source); const promise2 = when.resolve(source); })(); + +(function() { + var Promise = require('pinkie-promise'); + var prom = new Promise(function (resolve) { resolve('unicorns'); }); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 797e370a949d..1a77336cb17a 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -91,6 +91,7 @@ test_PromiseDefinition_getExecutor | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:29:45:5 | functio ... ;\\n } | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:27:90:3 | functio ... e);\\n } | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:34:112:61 | functio ... ect) {} | +| promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:26:130:68 | functio ... ns'); } | test_PromiseDefinition_getAFinallyHandler | flow.js:105:2:105:48 | new Pro ... "BLA")) | flow.js:105:58:105:76 | x => {throw source} | | flow.js:109:2:109:48 | new Pro ... "BLA")) | flow.js:109:58:109:70 | x => rejected | @@ -129,6 +130,7 @@ test_PromiseDefinition | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | | promises.js:112:17:112:62 | new RSV ... ct) {}) | | promises.js:124:19:124:30 | when(source) | +| promises.js:130:14:130:69 | new Pro ... s'); }) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -211,6 +213,7 @@ test_PromiseDefinition_getResolveParameter | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:39:43:45 | resolve | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:37:88:43 | resolve | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:43:112:49 | resolve | +| promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:36:130:42 | resolve | test_PromiseDefinition_getACatchHandler | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | | flow.js:48:2:48:36 | new Pro ... urce }) | flow.js:48:44:48:55 | x => sink(x) | From 5cb3c2c650e8917348969911e8ced6715b86e499 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:20:50 +0200 Subject: [PATCH 1492/1662] add support for the `pinkie` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ .../library-tests/Promises/AdditionalPromises.expected | 1 + javascript/ql/test/library-tests/Promises/promises.js | 7 +++++++ javascript/ql/test/library-tests/Promises/tests.expected | 6 ++++++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index a76a81efb838..fc932db3e2d6 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -8,4 +8,5 @@ lgtm,codescanning [es6-promise](https://npmjs.com/package/es6-promise), [native-promise-only](https://npmjs.com/package/native-promise-only), [when](https://npmjs.com/package/when), - [pinkie-promise](https://npmjs.com/package/pinkie-promise) + [pinkie-promise](https://npmjs.com/package/pinkie-promise), + [pinkie](https://npmjs.com/package/pinkie) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 420f8707e244..a9c181b553d7 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -85,6 +85,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleImport("when") or result = DataFlow::moduleImport("pinkie-promise") + or + result = DataFlow::moduleImport("pinkie") } /** diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index 56bb2cebd132..e95c5e29ab8f 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -83,3 +83,4 @@ | promises.js:112:17:112:62 | new RSV ... ct) {}) | | promises.js:124:19:124:30 | when(source) | | promises.js:130:14:130:69 | new Pro ... s'); }) | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 72046d337118..262aaae7028b 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -129,3 +129,10 @@ var Promise = require('pinkie-promise'); var prom = new Promise(function (resolve) { resolve('unicorns'); }); })(); + +(function() { + var Promise = require('pinkie'); + new Promise(function (resolve, reject) { + resolve(data); + }); +})(); \ No newline at end of file diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 1a77336cb17a..e779d8306376 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -92,6 +92,7 @@ test_PromiseDefinition_getExecutor | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:27:90:3 | functio ... e);\\n } | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:34:112:61 | functio ... ect) {} | | promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:26:130:68 | functio ... ns'); } | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:15:137:3 | functio ... a);\\n } | test_PromiseDefinition_getAFinallyHandler | flow.js:105:2:105:48 | new Pro ... "BLA")) | flow.js:105:58:105:76 | x => {throw source} | | flow.js:109:2:109:48 | new Pro ... "BLA")) | flow.js:109:58:109:70 | x => rejected | @@ -131,6 +132,7 @@ test_PromiseDefinition | promises.js:112:17:112:62 | new RSV ... ct) {}) | | promises.js:124:19:124:30 | when(source) | | promises.js:130:14:130:69 | new Pro ... s'); }) | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -181,6 +183,7 @@ test_PromiseDefinition_getRejectParameter | promises.js:43:19:45:6 | Q.Promi ... \\n }) | promises.js:43:48:43:53 | reject | | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:46:88:51 | reject | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:52:112:57 | reject | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:34:135:39 | reject | test_PromiseDefinition_getResolveParameter | flow.js:7:11:7:59 | new Pro ... ource)) | flow.js:7:24:7:30 | resolve | | flow.js:10:11:10:58 | new Pro ... ource)) | flow.js:10:24:10:30 | resolve | @@ -214,6 +217,7 @@ test_PromiseDefinition_getResolveParameter | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:37:88:43 | resolve | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:43:112:49 | resolve | | promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:36:130:42 | resolve | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:25:135:31 | resolve | test_PromiseDefinition_getACatchHandler | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | | flow.js:48:2:48:36 | new Pro ... urce }) | flow.js:48:44:48:55 | x => sink(x) | @@ -436,3 +440,5 @@ typetrack | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | store $PromiseResolveField$ | | promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | copy $PromiseResolveField$ | | promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | store $PromiseResolveField$ | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | copy $PromiseResolveField$ | +| promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | store $PromiseResolveField$ | From cb82cdf6e90b6179efacf736bd09181b58c501ac Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:37:02 +0200 Subject: [PATCH 1493/1662] add support for the `synchronous-promise` library --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ javascript/ql/test/library-tests/Promises/promises.js | 8 +++++++- javascript/ql/test/library-tests/Promises/tests.expected | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index fc932db3e2d6..5ece14609dae 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -9,4 +9,5 @@ lgtm,codescanning [native-promise-only](https://npmjs.com/package/native-promise-only), [when](https://npmjs.com/package/when), [pinkie-promise](https://npmjs.com/package/pinkie-promise), - [pinkie](https://npmjs.com/package/pinkie) + [pinkie](https://npmjs.com/package/pinkie), + [synchronous-promise](https://npmjs.com/package/synchronous-promise) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index a9c181b553d7..2bbc8deab35c 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -87,6 +87,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleImport("pinkie-promise") or result = DataFlow::moduleImport("pinkie") + or + result = DataFlow::moduleMember("synchronous-promise", "SynchronousPromise") } /** diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 262aaae7028b..4cdb6c51b89a 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -135,4 +135,10 @@ new Promise(function (resolve, reject) { resolve(data); }); -})(); \ No newline at end of file +})(); + +(function() { + import { SynchronousPromise } from 'synchronous-promise'; + // is technically not a promise, but behaves like one. + var promise = SynchronousPromise.resolve(source); +})(); diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index e779d8306376..4a28d9c02c68 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -43,6 +43,7 @@ test_ResolvedPromiseDefinition | promises.js:114:3:114:25 | Promise ... source) | promises.js:114:19:114:24 | source | | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | | promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | +| promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -442,3 +443,5 @@ typetrack | promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | store $PromiseResolveField$ | | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | copy $PromiseResolveField$ | | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | store $PromiseResolveField$ | +| promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | copy $PromiseResolveField$ | +| promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | store $PromiseResolveField$ | From 085efe5d204511d345f8b62eddb2d5440c55b3da Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:42:33 +0200 Subject: [PATCH 1494/1662] add support for the `any-promise` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ .../test/library-tests/Promises/AdditionalPromises.expected | 1 + javascript/ql/test/library-tests/Promises/promises.js | 5 +++++ javascript/ql/test/library-tests/Promises/tests.expected | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index 5ece14609dae..7037e351c046 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -10,4 +10,5 @@ lgtm,codescanning [when](https://npmjs.com/package/when), [pinkie-promise](https://npmjs.com/package/pinkie-promise), [pinkie](https://npmjs.com/package/pinkie), - [synchronous-promise](https://npmjs.com/package/synchronous-promise) + [synchronous-promise](https://npmjs.com/package/synchronous-promise), + [any-promise](https://npmjs.com/package/any-promise) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 2bbc8deab35c..2e7bb1c93bc6 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -89,6 +89,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleImport("pinkie") or result = DataFlow::moduleMember("synchronous-promise", "SynchronousPromise") + or + result = DataFlow::moduleImport("any-promise") } /** diff --git a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected index e95c5e29ab8f..e42037e1f077 100644 --- a/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected +++ b/javascript/ql/test/library-tests/Promises/AdditionalPromises.expected @@ -84,3 +84,4 @@ | promises.js:124:19:124:30 | when(source) | | promises.js:130:14:130:69 | new Pro ... s'); }) | | promises.js:135:3:137:4 | new Pro ... );\\n }) | +| promises.js:148:10:148:49 | new Pro ... ect){}) | diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 4cdb6c51b89a..3676c5537ae4 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -142,3 +142,8 @@ // is technically not a promise, but behaves like one. var promise = SynchronousPromise.resolve(source); })(); + +(function() { + var Promise = require('any-promise'); + return new Promise(function(resolve, reject){}) +})(); \ No newline at end of file diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index 4a28d9c02c68..ac86ab5c46d4 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -94,6 +94,7 @@ test_PromiseDefinition_getExecutor | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:34:112:61 | functio ... ect) {} | | promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:26:130:68 | functio ... ns'); } | | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:15:137:3 | functio ... a);\\n } | +| promises.js:148:10:148:49 | new Pro ... ect){}) | promises.js:148:22:148:48 | functio ... ject){} | test_PromiseDefinition_getAFinallyHandler | flow.js:105:2:105:48 | new Pro ... "BLA")) | flow.js:105:58:105:76 | x => {throw source} | | flow.js:109:2:109:48 | new Pro ... "BLA")) | flow.js:109:58:109:70 | x => rejected | @@ -134,6 +135,7 @@ test_PromiseDefinition | promises.js:124:19:124:30 | when(source) | | promises.js:130:14:130:69 | new Pro ... s'); }) | | promises.js:135:3:137:4 | new Pro ... );\\n }) | +| promises.js:148:10:148:49 | new Pro ... ect){}) | test_PromiseDefinition_getAResolveHandler | flow.js:24:2:24:49 | new Pro ... ource)) | flow.js:24:56:24:67 | x => sink(x) | | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:56:26:66 | x => foo(x) | @@ -185,6 +187,7 @@ test_PromiseDefinition_getRejectParameter | promises.js:88:17:90:4 | Q.Promi ... );\\n }) | promises.js:88:46:88:51 | reject | | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:52:112:57 | reject | | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:34:135:39 | reject | +| promises.js:148:10:148:49 | new Pro ... ect){}) | promises.js:148:40:148:45 | reject | test_PromiseDefinition_getResolveParameter | flow.js:7:11:7:59 | new Pro ... ource)) | flow.js:7:24:7:30 | resolve | | flow.js:10:11:10:58 | new Pro ... ource)) | flow.js:10:24:10:30 | resolve | @@ -219,6 +222,7 @@ test_PromiseDefinition_getResolveParameter | promises.js:112:17:112:62 | new RSV ... ct) {}) | promises.js:112:43:112:49 | resolve | | promises.js:130:14:130:69 | new Pro ... s'); }) | promises.js:130:36:130:42 | resolve | | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:135:25:135:31 | resolve | +| promises.js:148:10:148:49 | new Pro ... ect){}) | promises.js:148:31:148:37 | resolve | test_PromiseDefinition_getACatchHandler | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | | flow.js:48:2:48:36 | new Pro ... urce }) | flow.js:48:44:48:55 | x => sink(x) | From 95a7b1631507a0435c11aa2d8e921d3cd81244a2 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:49:20 +0200 Subject: [PATCH 1495/1662] add support for the `lie` polyfill --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 2 ++ javascript/ql/test/library-tests/Promises/promises.js | 5 +++++ javascript/ql/test/library-tests/Promises/tests.expected | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index 7037e351c046..67d71aab7cce 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -11,4 +11,5 @@ lgtm,codescanning [pinkie-promise](https://npmjs.com/package/pinkie-promise), [pinkie](https://npmjs.com/package/pinkie), [synchronous-promise](https://npmjs.com/package/synchronous-promise), - [any-promise](https://npmjs.com/package/any-promise) + [any-promise](https://npmjs.com/package/any-promise), + [lie](https://npmjs.com/package/lie) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 2e7bb1c93bc6..72a2e42bac5f 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -91,6 +91,8 @@ private DataFlow::SourceNode getAPromiseObject() { result = DataFlow::moduleMember("synchronous-promise", "SynchronousPromise") or result = DataFlow::moduleImport("any-promise") + or + result = DataFlow::moduleImport("lie") } /** diff --git a/javascript/ql/test/library-tests/Promises/promises.js b/javascript/ql/test/library-tests/Promises/promises.js index 3676c5537ae4..2d91d132033b 100644 --- a/javascript/ql/test/library-tests/Promises/promises.js +++ b/javascript/ql/test/library-tests/Promises/promises.js @@ -146,4 +146,9 @@ (function() { var Promise = require('any-promise'); return new Promise(function(resolve, reject){}) +})(); + +(function() { + var Promise = require('lie'); + var promise = Promise.resolve(source); })(); \ No newline at end of file diff --git a/javascript/ql/test/library-tests/Promises/tests.expected b/javascript/ql/test/library-tests/Promises/tests.expected index ac86ab5c46d4..1f07154ce48b 100644 --- a/javascript/ql/test/library-tests/Promises/tests.expected +++ b/javascript/ql/test/library-tests/Promises/tests.expected @@ -44,6 +44,7 @@ test_ResolvedPromiseDefinition | promises.js:119:3:119:25 | Promise ... source) | promises.js:119:19:119:24 | source | | promises.js:125:20:125:39 | when.resolve(source) | promises.js:125:33:125:38 | source | | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | +| promises.js:153:17:153:39 | Promise ... source) | promises.js:153:33:153:38 | source | test_PromiseDefinition_getARejectHandler | flow.js:26:2:26:49 | new Pro ... ource)) | flow.js:26:69:26:80 | y => sink(y) | | flow.js:32:2:32:49 | new Pro ... ource)) | flow.js:32:57:32:68 | x => sink(x) | @@ -449,3 +450,5 @@ typetrack | promises.js:135:3:137:4 | new Pro ... );\\n }) | promises.js:136:13:136:16 | data | store $PromiseResolveField$ | | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | copy $PromiseResolveField$ | | promises.js:143:17:143:50 | Synchro ... source) | promises.js:143:44:143:49 | source | store $PromiseResolveField$ | +| promises.js:153:17:153:39 | Promise ... source) | promises.js:153:33:153:38 | source | copy $PromiseResolveField$ | +| promises.js:153:17:153:39 | Promise ... source) | promises.js:153:33:153:38 | source | store $PromiseResolveField$ | From f53955fb5e0de37f91c0bdbeee8f448c6cc054e8 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 19:52:34 +0200 Subject: [PATCH 1496/1662] add support for the `promise.allsettled` library --- javascript/change-notes/2021-06-18-promises.md | 3 ++- javascript/ql/src/semmle/javascript/Promises.qll | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-18-promises.md b/javascript/change-notes/2021-06-18-promises.md index 67d71aab7cce..b887666dbeb4 100644 --- a/javascript/change-notes/2021-06-18-promises.md +++ b/javascript/change-notes/2021-06-18-promises.md @@ -12,4 +12,5 @@ lgtm,codescanning [pinkie](https://npmjs.com/package/pinkie), [synchronous-promise](https://npmjs.com/package/synchronous-promise), [any-promise](https://npmjs.com/package/any-promise), - [lie](https://npmjs.com/package/lie) + [lie](https://npmjs.com/package/lie), + [promise.allsettled](https://npmjs.com/package/promise.allsettled) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 72a2e42bac5f..262f35081d16 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -157,8 +157,11 @@ class ResolvedES2015PromiseDefinition extends ResolvedPromiseDefinition { */ class AggregateES2015PromiseDefinition extends PromiseCreationCall { AggregateES2015PromiseDefinition() { + exists(string m | m = "all" or m = "race" or m = "any" or m = "allSettled" | this = getAPromiseObject().getAMemberCall(m) ) + or + this = DataFlow::moduleImport("promise.allsettled").getACall() } override DataFlow::Node getValue() { From f2ca2134d167cbefc0edeb331e5c43cabec0620f Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 22:12:18 +0200 Subject: [PATCH 1497/1662] refactor `promisify` models into a module --- .../ql/src/semmle/javascript/ApiGraphs.qll | 4 +-- .../ql/src/semmle/javascript/Promises.qll | 30 +++++++++++++++++++ .../javascript/frameworks/NodeJSLib.qll | 13 ++------ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/javascript/ql/src/semmle/javascript/ApiGraphs.qll b/javascript/ql/src/semmle/javascript/ApiGraphs.qll index 590142590a48..bf8ff610dc77 100644 --- a/javascript/ql/src/semmle/javascript/ApiGraphs.qll +++ b/javascript/ql/src/semmle/javascript/ApiGraphs.qll @@ -686,9 +686,7 @@ module API { promisified = false and boundArgs = 0 or - exists(DataFlow::CallNode promisify | - promisify = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify") - | + exists(Promisify::PromisifyCall promisify | trackUseNode(nd, false, boundArgs, t.continue()).flowsTo(promisify.getArgument(0)) and promisified = true and result = promisify diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 9190473201e8..8139f10e0f4c 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -659,3 +659,33 @@ private module DynamicImportSteps { } } } + +/** + * Provides classes modeling libraries implementing `promisify` functions. + * That is, functions that convert callback style functions to functions that return a promise. + */ +module Promisify { + /** + * Gets a call to a `promisifyAll` function. + * E.g. `require("bluebird").promisifyAll(...)`. + */ + class PromisifyAllCall extends DataFlow::CallNode { + PromisifyAllCall() { + this = + [ + DataFlow::moduleMember("bluebird", "promisifyAll"), + DataFlow::moduleImport("util-promisifyall") + ].getACall() + } + } + + /** + * Gets a call to a `promisify` function. + * E.g. `require("util").promisify(...)`. + */ + class PromisifyCall extends DataFlow::CallNode { + PromisifyCall() { + this = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify") + } + } +} diff --git a/javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll b/javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll index 840e9ea9b785..a7ceb09a5466 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll @@ -472,14 +472,9 @@ module NodeJSLib { result = pred.track(t2, t) or t.continue() = t2 and - exists(DataFlow::CallNode promisifyAllCall | + exists(Promisify::PromisifyAllCall promisifyAllCall | result = promisifyAllCall and - pred.flowsTo(promisifyAllCall.getArgument(0)) and - promisifyAllCall = - [ - DataFlow::moduleMember("bluebird", "promisifyAll"), - DataFlow::moduleImport("util-promisifyall") - ].getACall() + pred.flowsTo(promisifyAllCall.getArgument(0)) ) or // const fs = require('fs'); @@ -648,9 +643,7 @@ module NodeJSLib { private DataFlow::SourceNode maybePromisified(DataFlow::SourceNode callback) { result = callback or - exists(DataFlow::CallNode promisify | - promisify = DataFlow::moduleMember(["util", "bluebird"], "promisify").getACall() - | + exists(Promisify::PromisifyCall promisify | result = promisify and promisify.getArgument(0).getALocalSource() = callback ) } From c73660669552a4c3f648fe6ba19b19c2a37cab8e Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 21 Jun 2021 23:28:31 +0200 Subject: [PATCH 1498/1662] add support for moment/dayjs/luxon instances returned by `@date-io` adapters --- javascript/change-notes/2021-06-21-dates.md | 5 ++- .../javascript/frameworks/DateFunctions.qll | 33 +++++++++++++++++ .../Security/CWE-079/DomBasedXss/Xss.expected | 36 +++++++++++++++++++ .../XssWithAdditionalSources.expected | 33 +++++++++++++++++ .../Security/CWE-079/DomBasedXss/dates.js | 10 ++++++ 5 files changed, 116 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-21-dates.md b/javascript/change-notes/2021-06-21-dates.md index 1f1320b6b8e0..82f5b47567a5 100644 --- a/javascript/change-notes/2021-06-21-dates.md +++ b/javascript/change-notes/2021-06-21-dates.md @@ -2,5 +2,8 @@ lgtm,codescanning * Improved support for date parsing libraries, resulting in more results in security queries. Affected packages are [dayjs](https://npmjs.com/package/dayjs), - [luxon](https://npmjs.com/package/luxon) + [luxon](https://npmjs.com/package/luxon), + [@date-io/moment](https://npmjs.com/package/@date-io/moment), + [@date-io/luxon](https://npmjs.com/package/@date-io/luxon), + [@date-io/dayjs](https://npmjs.com/package/@date-io/dayjs) diff --git a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll index bd504f463086..af3329aa9e92 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/DateFunctions.qll @@ -73,6 +73,35 @@ private module DateIO { ) } } + + /** Gets a method name from an `@date-io` adapter that returns an instance of the adapted library. */ + private string getAnAdapterMethodName() { + result = + [ + "addSeconds", "addMinutes", "addHours", "addDays", "addWeeks", "addMonths", "endOfDay", + "setHours", "setMinutes", "setSeconds", "startOfMonth", "endOfMonth", "startOfWeek", + "endOfWeek", "setYear", "date", "parse", "setMonth", "getNextMonth", "getPreviousMonth" + ] + } + + /** + * Gets an instance of `library` that has been created by an `@date-io` adapter. + * Library is one of: "moment", "luxon", or "dayjs". + */ + API::Node getAnAdaptedInstance(string library) { + exists(API::Node adapter | + library = "moment" and + adapter = API::moduleImport("@date-io/moment") + or + library = "luxon" and + adapter = API::moduleImport("@date-io/luxon") + or + library = "dayjs" and + adapter = API::moduleImport("@date-io/dayjs") + | + result = adapter.getInstance().getMember(getAnAdapterMethodName()).getReturn() + ) + } } /** @@ -99,6 +128,8 @@ private module Luxon { result = luxonDateTime().getAMember() or result = luxonDateTime().getReturn() + or + result = DateIO::getAnAdaptedInstance("luxon") ) } @@ -125,6 +156,8 @@ private module Moment { result = moment().getReturn() or result = moment().getAMember() + or + result = DateIO::getAnAdaptedInstance(["moment", "dayjs"]) } /** diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected index 97d75aba80b2..80f41c9e96d9 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/Xss.expected @@ -168,6 +168,23 @@ nodes | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:42:50:102 | DateTim ... (taint) | | dates.js:50:97:50:101 | taint | +| dates.js:54:9:54:69 | taint | +| dates.js:54:17:54:69 | decodeU ... ing(1)) | +| dates.js:54:36:54:55 | window.location.hash | +| dates.js:54:36:54:55 | window.location.hash | +| dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:42:57:99 | moment. ... (taint) | +| dates.js:57:94:57:98 | taint | +| dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:42:59:85 | luxon.e ... (taint) | +| dates.js:59:80:59:84 | taint | +| dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | +| dates.js:61:81:61:85 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -856,6 +873,22 @@ edges | dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:97:50:101 | taint | dates.js:50:42:50:102 | DateTim ... (taint) | +| dates.js:54:9:54:69 | taint | dates.js:57:94:57:98 | taint | +| dates.js:54:9:54:69 | taint | dates.js:59:80:59:84 | taint | +| dates.js:54:9:54:69 | taint | dates.js:61:81:61:85 | taint | +| dates.js:54:17:54:69 | decodeU ... ing(1)) | dates.js:54:9:54:69 | taint | +| dates.js:54:36:54:55 | window.location.hash | dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:54:36:54:55 | window.location.hash | dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:54:36:54:68 | window. ... ring(1) | dates.js:54:17:54:69 | decodeU ... ing(1)) | +| dates.js:57:42:57:99 | moment. ... (taint) | dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:42:57:99 | moment. ... (taint) | dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:94:57:98 | taint | dates.js:57:42:57:99 | moment. ... (taint) | +| dates.js:59:42:59:85 | luxon.e ... (taint) | dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:42:59:85 | luxon.e ... (taint) | dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:80:59:84 | taint | dates.js:59:42:59:85 | luxon.e ... (taint) | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:81:61:85 | taint | dates.js:61:42:61:86 | dayjs.s ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | @@ -1375,6 +1408,9 @@ edges | dates.js:48:31:48:90 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:48:31:48:90 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | | dates.js:49:31:49:89 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:49:31:49:89 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | | dates.js:50:31:50:104 | `Time i ... aint)}` | dates.js:46:36:46:55 | window.location.hash | dates.js:50:31:50:104 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:46:36:46:55 | window.location.hash | user-provided value | +| dates.js:57:31:57:101 | `Time i ... aint)}` | dates.js:54:36:54:55 | window.location.hash | dates.js:57:31:57:101 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:54:36:54:55 | window.location.hash | user-provided value | +| dates.js:59:31:59:87 | `Time i ... aint)}` | dates.js:54:36:54:55 | window.location.hash | dates.js:59:31:59:87 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:54:36:54:55 | window.location.hash | user-provided value | +| dates.js:61:31:61:88 | `Time i ... aint)}` | dates.js:54:36:54:55 | window.location.hash | dates.js:61:31:61:88 | `Time i ... aint)}` | Cross-site scripting vulnerability due to $@. | dates.js:54:36:54:55 | window.location.hash | user-provided value | | event-handler-receiver.js:2:31:2:83 | '

    ' | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | Cross-site scripting vulnerability due to $@. | event-handler-receiver.js:2:49:2:61 | location.href | user-provided value | | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | express.js:7:15:7:33 | req.param("wobble") | Cross-site scripting vulnerability due to $@. | express.js:7:15:7:33 | req.param("wobble") | user-provided value | | jquery.js:7:5:7:34 | "
    " | jquery.js:2:17:2:40 | documen ... .search | jquery.js:7:5:7:34 | "
    " | Cross-site scripting vulnerability due to $@. | jquery.js:2:17:2:40 | documen ... .search | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected index ef1d29eeed8e..97af392b2ec8 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/XssWithAdditionalSources.expected @@ -168,6 +168,23 @@ nodes | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:42:50:102 | DateTim ... (taint) | | dates.js:50:97:50:101 | taint | +| dates.js:54:9:54:69 | taint | +| dates.js:54:17:54:69 | decodeU ... ing(1)) | +| dates.js:54:36:54:55 | window.location.hash | +| dates.js:54:36:54:55 | window.location.hash | +| dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:42:57:99 | moment. ... (taint) | +| dates.js:57:94:57:98 | taint | +| dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:42:59:85 | luxon.e ... (taint) | +| dates.js:59:80:59:84 | taint | +| dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | +| dates.js:61:81:61:85 | taint | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | @@ -874,6 +891,22 @@ edges | dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:42:50:102 | DateTim ... (taint) | dates.js:50:31:50:104 | `Time i ... aint)}` | | dates.js:50:97:50:101 | taint | dates.js:50:42:50:102 | DateTim ... (taint) | +| dates.js:54:9:54:69 | taint | dates.js:57:94:57:98 | taint | +| dates.js:54:9:54:69 | taint | dates.js:59:80:59:84 | taint | +| dates.js:54:9:54:69 | taint | dates.js:61:81:61:85 | taint | +| dates.js:54:17:54:69 | decodeU ... ing(1)) | dates.js:54:9:54:69 | taint | +| dates.js:54:36:54:55 | window.location.hash | dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:54:36:54:55 | window.location.hash | dates.js:54:36:54:68 | window. ... ring(1) | +| dates.js:54:36:54:68 | window. ... ring(1) | dates.js:54:17:54:69 | decodeU ... ing(1)) | +| dates.js:57:42:57:99 | moment. ... (taint) | dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:42:57:99 | moment. ... (taint) | dates.js:57:31:57:101 | `Time i ... aint)}` | +| dates.js:57:94:57:98 | taint | dates.js:57:42:57:99 | moment. ... (taint) | +| dates.js:59:42:59:85 | luxon.e ... (taint) | dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:42:59:85 | luxon.e ... (taint) | dates.js:59:31:59:87 | `Time i ... aint)}` | +| dates.js:59:80:59:84 | taint | dates.js:59:42:59:85 | luxon.e ... (taint) | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:42:61:86 | dayjs.s ... (taint) | dates.js:61:31:61:88 | `Time i ... aint)}` | +| dates.js:61:81:61:85 | taint | dates.js:61:42:61:86 | dayjs.s ... (taint) | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | | event-handler-receiver.js:2:49:2:61 | location.href | event-handler-receiver.js:2:31:2:83 | '

    ' | diff --git a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js index ee6571257aa5..47513c796d96 100644 --- a/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js +++ b/javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/dates.js @@ -50,3 +50,13 @@ function luxon() { document.body.innerHTML = `Time is ${DateTime.fromISO("2020-01-01").startOf('day').toFormat(taint)}`; // NOT OK } +function dateio2() { + let taint = decodeURIComponent(window.location.hash.substring(1)); + + const moment = new MomentAdapter(); + document.body.innerHTML = `Time is ${moment.addDays(moment.date("2020-06-21"), 1).format(taint)}`; // NOT OK + const luxon = new LuxonAdapter(); + document.body.innerHTML = `Time is ${luxon.endOfDay(luxon.date()).toFormat(taint)}`; // NOT OK + const dayjs = new DayJSAdapter(); + document.body.innerHTML = `Time is ${dayjs.setHours(dayjs.date(), 4).format(taint)}`; // NOT OK +} \ No newline at end of file From 38fc8a750c232683e8500fff750dd1a991fbac0d Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Tue, 22 Jun 2021 11:16:02 +0200 Subject: [PATCH 1499/1662] Java: Improve test and fix a few missing cases. --- .../java/dataflow/internal/ContainerFlow.qll | 2 + .../library-tests/dataflow/collections/B.java | 705 +++++++++--------- .../dataflow/collections/containerflow.ql | 10 +- 3 files changed, 374 insertions(+), 343 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll index d57c68bf007e..04f72fa454e6 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll @@ -95,6 +95,7 @@ private class ContainerFlowSummaries extends SummaryModelCsv { override predicate row(string row) { row = [ + "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", @@ -193,6 +194,7 @@ private class ContainerFlowSummaries extends SummaryModelCsv { "java.util.concurrent;ConcurrentHashMap;true;elements;();;MapValue of Argument[-1];Element of ReturnValue;value", "java.util;Dictionary;true;elements;();;MapValue of Argument[-1];Element of ReturnValue;value", "java.util;Dictionary;true;get;(Object);;MapValue of Argument[-1];ReturnValue;value", + "java.util;Dictionary;true;keys;();;MapKey of Argument[-1];Element of ReturnValue;value", "java.util;Dictionary;true;put;(Object,Object);;MapValue of Argument[-1];ReturnValue;value", "java.util;Dictionary;true;put;(Object,Object);;Argument[0];MapKey of Argument[-1];value", "java.util;Dictionary;true;put;(Object,Object);;Argument[1];MapValue of Argument[-1];value", diff --git a/java/ql/test/library-tests/dataflow/collections/B.java b/java/ql/test/library-tests/dataflow/collections/B.java index 1c0384a71c60..3cafd3ecbb9d 100644 --- a/java/ql/test/library-tests/dataflow/collections/B.java +++ b/java/ql/test/library-tests/dataflow/collections/B.java @@ -1,32 +1,67 @@ import java.util.*; import java.util.concurrent.*; import java.util.regex.*; +import java.util.stream.*; public class B { static Object source() { return null; } static void sink(Object obj) { } - static Object[] storeArrayElement(Object obj) { return null; } - static Object storeElement(Object obj) { return null; } - static Object storeMapKey(Object obj) { return null; } - static Object storeMapValue(Object obj) { return null; } + static Object[] storeArrayElement(Object obj) { return new Object[] {obj}; } - static Object readArrayElement(Object obj) { return null; } - static Object readElement(Object obj) { return null; } - static Object readMapKey(Object obj) { return null; } - static Object readMapValue(Object obj) { return null; } + static Object readArrayElement(Object[] obj) { return obj[0]; } + static boolean readArrayElement(boolean[] obj) { return obj[0]; } + static byte readArrayElement(byte[] obj) { return obj[0]; } + static char readArrayElement(char[] obj) { return obj[0]; } + static short readArrayElement(short[] obj) { return obj[0]; } + static int readArrayElement(int[] obj) { return obj[0]; } + static long readArrayElement(long[] obj) { return obj[0]; } + static float readArrayElement(float[] obj) { return obj[0]; } + static double readArrayElement(double[] obj) { return obj[0]; } + + static List storeElementList(T obj) { return List.of(obj); } + static Enumeration storeElementEnumeration(T obj) { Vector v = new Vector<>(); v.add(obj); return v.elements(); } + static NavigableSet storeElementNavSet(T obj) { TreeSet s = new TreeSet<>(); s.add(obj); return s; } + static Stack storeElementStack(T obj) { Stack s = new Stack<>(); s.push(obj); return s; } + static BlockingDeque storeElementBlockingDeque(T obj) { LinkedBlockingDeque q = new LinkedBlockingDeque<>(); q.add(obj); return q; } + static ListIterator storeElementListIterator(T obj) { return List.of(obj).listIterator(); } + + static T readElement(Iterable obj) { return obj.iterator().next(); } + static T readElement(Iterator obj) { return obj.next(); } + static T readElement(Spliterator obj) { return null; } + static T readElement(Stream obj) { return null; } + static T readElement(Enumeration obj) { return obj.nextElement(); } + + static Map.Entry storeMapKeyEntry(K obj) { return Map.entry(obj,null); } + static Map storeMapKey(K obj) { Map m = new TreeMap(); m.put(obj,null); return m; } + + static Map.Entry storeMapValueEntry(V obj) { return Map.entry(null,obj); } + static Map storeMapValue(V obj) { Map m = 1==1?new TreeMap():new ConcurrentHashMap(); m.put(null,obj); return m; } + + static K readMapKey(Map.Entry obj) { return obj.getKey(); } + static K readMapKey(Map obj) { return obj.keySet().iterator().next(); } + static K readMapKey(Dictionary obj) { return obj.keys().nextElement(); } + + static V readMapValue(Map.Entry obj) { return obj.getValue(); } + static V readMapValue(Map obj) { return obj.get(null); } + static V readMapValue(Dictionary obj) { return obj.get(null); } void foo() throws InterruptedException { + { + // "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + Object out = null; + Object in = storeMapKeyEntry(source()); out = ((Map.Entry)in).getKey(); sink(out); // $ hasValueFlow + } { // "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeMapValue(source()); out = ((Map.Entry)in).getValue(); sink(out); // $ hasValueFlow + Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).getValue(); sink(out); // $ hasValueFlow } { // "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeMapValue(source()); out = ((Map.Entry)in).setValue(null); sink(out); // $ hasValueFlow + Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).setValue(null); sink(out); // $ hasValueFlow } { // "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", @@ -35,23 +70,23 @@ void foo() throws InterruptedException { } { // "java.lang;Iterable;true;iterator;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Iterable)in).iterator(); sink(readElement(out)); // $ hasValueFlow + Iterator out = null; + Iterable in = storeElementList(source()); out = in.iterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.lang;Iterable;true;spliterator;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Iterable)in).spliterator(); sink(readElement(out)); // $ hasValueFlow + Spliterator out = null; + Iterable in = storeElementList(source()); out = in.spliterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Iterator;true;next;;;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Iterator)in).next(); sink(out); // $ hasValueFlow + Iterator in = storeElementListIterator(source()); out = in.next(); sink(out); // $ hasValueFlow } { // "java.util;ListIterator;true;previous;;;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((ListIterator)in).previous(); sink(out); // $ hasValueFlow + ListIterator in = storeElementListIterator(source()); out = in.previous(); sink(out); // $ hasValueFlow } { // "java.util;ListIterator;true;add;(Object);;Argument[0];Element of Argument[-1];value", @@ -65,13 +100,13 @@ void foo() throws InterruptedException { } { // "java.util;Enumeration;true;asIterator;;;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Enumeration)in).asIterator(); sink(readElement(out)); // $ hasValueFlow + Iterator out = null; + Enumeration in = storeElementEnumeration(source()); out = in.asIterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Enumeration;true;nextElement;;;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Enumeration)in).nextElement(); sink(out); // $ hasValueFlow + Enumeration in = storeElementEnumeration(source()); out = in.nextElement(); sink(out); // $ hasValueFlow } { // "java.util;Map;true;computeIfAbsent;;;MapValue of Argument[-1];ReturnValue;value", @@ -84,17 +119,17 @@ void foo() throws InterruptedException { } { // "java.util;Map;true;computeIfAbsent;;;ReturnValue of Argument[1];MapValue of Argument[-1];value", - Object out = null; - ((Map)out).computeIfAbsent(null,k -> source()); sink(readMapValue(out)); + Map out = null; + out.computeIfAbsent(null,k -> source()); sink(readMapValue(out)); } { // "java.util;Map;true;entrySet;;;MapValue of Argument[-1];MapValue of Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = storeMapValue(source()); out = ((Map)in).entrySet(); sink(readMapValue(readElement(out))); // $ hasValueFlow } { // "java.util;Map;true;entrySet;;;MapKey of Argument[-1];MapKey of Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = storeMapKey(source()); out = ((Map)in).entrySet(); sink(readMapKey(readElement(out))); // $ hasValueFlow } { @@ -174,12 +209,12 @@ void foo() throws InterruptedException { } { // "java.util;Map;true;keySet;();;MapKey of Argument[-1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = storeMapKey(source()); out = ((Map)in).keySet(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Map;true;values;();;MapValue of Argument[-1];Element of ReturnValue;value", - Object out = null; + Iterable out = null; Object in = storeMapValue(source()); out = ((Map)in).values(); sink(readElement(out)); // $ hasValueFlow } { @@ -199,23 +234,23 @@ void foo() throws InterruptedException { } { // "java.util;Collection;true;parallelStream;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collection)in).parallelStream(); sink(readElement(out)); // $ hasValueFlow + Stream out = null; + Collection in = storeElementList(source()); out = in.parallelStream(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collection;true;stream;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collection)in).stream(); sink(readElement(out)); // $ hasValueFlow + Stream out = null; + Collection in = storeElementList(source()); out = in.stream(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collection;true;toArray;;;Element of Argument[-1];ArrayElement of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collection)in).toArray(); sink(readArrayElement(out)); // $ hasValueFlow + Object[] out = null; + Collection in = storeElementList(source()); out = in.toArray(); sink(readArrayElement(out)); // $ hasValueFlow } { // "java.util;Collection;true;toArray;;;Element of Argument[-1];ArrayElement of Argument[0];value", Object[] out = null; - Object in = storeElement(source()); ((Collection)in).toArray(out); sink(readArrayElement(out)); // $ hasValueFlow + Collection in = storeElementList(source()); in.toArray(out); sink(readArrayElement(out)); // $ hasValueFlow } { // "java.util;Collection;true;add;;;Argument[0];Element of Argument[-1];value", @@ -225,27 +260,27 @@ void foo() throws InterruptedException { { // "java.util;Collection;true;addAll;;;Element of Argument[0];Element of Argument[-1];value", Collection out = null; - Object in = storeElement(source()); out.addAll((Collection)in); sink(readElement(out)); // $ hasValueFlow + Collection in = storeElementList(source()); out.addAll(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;true;get;(int);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((List)in).get(0); sink(out); // $ hasValueFlow + List in = storeElementList(source()); out = in.get(0); sink(out); // $ hasValueFlow } { // "java.util;List;true;listIterator;;;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((List)in).listIterator(); sink(readElement(out)); // $ hasValueFlow + ListIterator out = null; + List in = storeElementList(source()); out = in.listIterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;true;remove;(int);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((List)in).remove(0); sink(out); // $ hasValueFlow + List in = storeElementList(source()); out = in.remove(0); sink(out); // $ hasValueFlow } { // "java.util;List;true;set;(int,Object);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((List)in).set(0,null); sink(out); // $ hasValueFlow + List in = storeElementList(source()); out = in.set(0,null); sink(out); // $ hasValueFlow } { // "java.util;List;true;set;(int,Object);;Argument[1];Element of Argument[-1];value", @@ -254,8 +289,8 @@ void foo() throws InterruptedException { } { // "java.util;List;true;subList;;;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((List)in).subList(0,0); sink(readElement(out)); // $ hasValueFlow + List out = null; + List in = storeElementList(source()); out = in.subList(0,0); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;true;add;(int,Object);;Argument[1];Element of Argument[-1];value", @@ -265,27 +300,27 @@ void foo() throws InterruptedException { { // "java.util;List;true;addAll;(int,Collection);;Element of Argument[1];Element of Argument[-1];value", List out = null; - Object in = storeElement(source()); out.addAll(0,(Collection)in); sink(readElement(out)); // $ hasValueFlow + Collection in = storeElementList(source()); out.addAll(0,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Vector;true;elementAt;(int);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Vector)in).elementAt(0); sink(out); // $ hasValueFlow + Vector in = storeElementStack(source()); out = in.elementAt(0); sink(out); // $ hasValueFlow } { // "java.util;Vector;true;elements;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Vector)in).elements(); sink(readElement(out)); // $ hasValueFlow + Enumeration out = null; + Vector in = storeElementStack(source()); out = in.elements(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Vector;true;firstElement;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Vector)in).firstElement(); sink(out); // $ hasValueFlow + Vector in = storeElementStack(source()); out = in.firstElement(); sink(out); // $ hasValueFlow } { // "java.util;Vector;true;lastElement;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Vector)in).lastElement(); sink(out); // $ hasValueFlow + Vector in = storeElementStack(source()); out = in.lastElement(); sink(out); // $ hasValueFlow } { // "java.util;Vector;true;addElement;(Object);;Argument[0];Element of Argument[-1];value", @@ -305,17 +340,17 @@ void foo() throws InterruptedException { { // "java.util;Vector;true;copyInto;(Object[]);;Element of Argument[-1];ArrayElement of Argument[0];value", Object[] out = null; - Object in = storeElement(source()); ((Vector)in).copyInto(out); sink(readArrayElement(out)); // $ hasValueFlow + Vector in = storeElementStack(source()); in.copyInto(out); sink(readArrayElement(out)); // $ hasValueFlow } { // "java.util;Stack;true;peek;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Stack)in).peek(); sink(out); // $ hasValueFlow + Stack in = storeElementStack(source()); out = in.peek(); sink(out); // $ hasValueFlow } { // "java.util;Stack;true;pop;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Stack)in).pop(); sink(out); // $ hasValueFlow + Stack in = storeElementStack(source()); out = in.pop(); sink(out); // $ hasValueFlow } { // "java.util;Stack;true;push;(Object);;Argument[0];Element of Argument[-1];value", @@ -325,22 +360,22 @@ void foo() throws InterruptedException { { // "java.util;Queue;true;element;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Queue)in).element(); sink(out); // $ hasValueFlow + Queue in = storeElementBlockingDeque(source()); out = in.element(); sink(out); // $ hasValueFlow } { // "java.util;Queue;true;peek;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Queue)in).peek(); sink(out); // $ hasValueFlow + Queue in = storeElementBlockingDeque(source()); out = in.peek(); sink(out); // $ hasValueFlow } { // "java.util;Queue;true;poll;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Queue)in).poll(); sink(out); // $ hasValueFlow + Queue in = storeElementBlockingDeque(source()); out = in.poll(); sink(out); // $ hasValueFlow } { // "java.util;Queue;true;remove;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Queue)in).remove(); sink(out); // $ hasValueFlow + Queue in = storeElementBlockingDeque(source()); out = in.remove(); sink(out); // $ hasValueFlow } { // "java.util;Queue;true;offer;(Object);;Argument[0];Element of Argument[-1];value", @@ -349,53 +384,53 @@ void foo() throws InterruptedException { } { // "java.util;Deque;true;descendingIterator;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Deque)in).descendingIterator(); sink(readElement(out)); // $ hasValueFlow + Iterator out = null; + Deque in = storeElementBlockingDeque(source()); out = in.descendingIterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Deque;true;getFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).getFirst(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.getFirst(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;getLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).getLast(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.getLast(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;peekFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).peekFirst(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.peekFirst(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;peekLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).peekLast(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.peekLast(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;pollFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).pollFirst(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.pollFirst(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;pollLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).pollLast(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.pollLast(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;pop;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).pop(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.pop(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;removeFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).removeFirst(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.removeFirst(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;removeLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Deque)in).removeLast(); sink(out); // $ hasValueFlow + Deque in = storeElementBlockingDeque(source()); out = in.removeLast(); sink(out); // $ hasValueFlow } { // "java.util;Deque;true;push;(Object);;Argument[0];Element of Argument[-1];value", @@ -425,32 +460,32 @@ void foo() throws InterruptedException { { // "java.util.concurrent;BlockingDeque;true;pollFirst;(long,TimeUnit);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingDeque)in).pollFirst(0,null); sink(out); // $ hasValueFlow + BlockingDeque in = storeElementBlockingDeque(source()); out = in.pollFirst(0,null); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingDeque;true;pollLast;(long,TimeUnit);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingDeque)in).pollLast(0,null); sink(out); // $ hasValueFlow + BlockingDeque in = storeElementBlockingDeque(source()); out = in.pollLast(0,null); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingDeque;true;takeFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingDeque)in).takeFirst(); sink(out); // $ hasValueFlow + BlockingDeque in = storeElementBlockingDeque(source()); out = in.takeFirst(); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingDeque;true;takeLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingDeque)in).takeLast(); sink(out); // $ hasValueFlow + BlockingDeque in = storeElementBlockingDeque(source()); out = in.takeLast(); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingQueue;true;poll;(long,TimeUnit);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingQueue)in).poll(0,null); sink(out); // $ hasValueFlow + BlockingQueue in = storeElementBlockingDeque(source()); out = in.poll(0,null); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingQueue;true;take;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((BlockingQueue)in).take(); sink(out); // $ hasValueFlow + BlockingQueue in = storeElementBlockingDeque(source()); out = in.take(); sink(out); // $ hasValueFlow } { // "java.util.concurrent;BlockingQueue;true;offer;(Object,long,TimeUnit);;Argument[0];Element of Argument[-1];value", @@ -485,21 +520,21 @@ void foo() throws InterruptedException { { // "java.util.concurrent;BlockingQueue;true;drainTo;(Collection,int);;Element of Argument[-1];Element of Argument[0];value", Collection out = null; - Object in = storeElement(source()); ((BlockingQueue)in).drainTo(out,0); sink(readElement(out)); // $ hasValueFlow + BlockingQueue in = storeElementBlockingDeque(source()); in.drainTo(out,0); sink(readElement(out)); // $ hasValueFlow } { // "java.util.concurrent;BlockingQueue;true;drainTo;(Collection);;Element of Argument[-1];Element of Argument[0];value", Collection out = null; - Object in = storeElement(source()); ((BlockingQueue)in).drainTo(out); sink(readElement(out)); // $ hasValueFlow + BlockingQueue in = storeElementBlockingDeque(source()); in.drainTo(out); sink(readElement(out)); // $ hasValueFlow } { // "java.util.concurrent;ConcurrentHashMap;true;elements;();;MapValue of Argument[-1];Element of ReturnValue;value", - Object out = null; + Enumeration out = null; Object in = storeMapValue(source()); out = ((ConcurrentHashMap)in).elements(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Dictionary;true;elements;();;MapValue of Argument[-1];Element of ReturnValue;value", - Object out = null; + Enumeration out = null; Object in = storeMapValue(source()); out = ((Dictionary)in).elements(); sink(readElement(out)); // $ hasValueFlow } { @@ -529,233 +564,233 @@ void foo() throws InterruptedException { } { // "java.util;NavigableMap;true;ceilingEntry;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).ceilingEntry(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;ceilingEntry;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).ceilingEntry(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;descendingMap;();;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).descendingMap(); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;descendingMap;();;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).descendingMap(); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;firstEntry;();;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).firstEntry(); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;firstEntry;();;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).firstEntry(); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;floorEntry;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).floorEntry(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;floorEntry;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).floorEntry(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;headMap;(Object,boolean);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).headMap(null,true); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;headMap;(Object,boolean);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).headMap(null,true); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;higherEntry;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).higherEntry(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;higherEntry;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).higherEntry(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;lastEntry;();;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).lastEntry(); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;lastEntry;();;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).lastEntry(); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;lowerEntry;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).lowerEntry(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;lowerEntry;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).lowerEntry(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;pollFirstEntry;();;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).pollFirstEntry(); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;pollFirstEntry;();;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).pollFirstEntry(); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;pollLastEntry;();;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).pollLastEntry(); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;pollLastEntry;();;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).pollLastEntry(); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;subMap;(Object,boolean,Object,boolean);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).subMap(null,true,null,true); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;subMap;(Object,boolean,Object,boolean);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).subMap(null,true,null,true); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;tailMap;(Object,boolean);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((NavigableMap)in).tailMap(null,true); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;NavigableMap;true;tailMap;(Object,boolean);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((NavigableMap)in).tailMap(null,true); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;NavigableSet;true;ceiling;(Object);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).ceiling(null); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.ceiling(null); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;descendingIterator;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).descendingIterator(); sink(readElement(out)); // $ hasValueFlow + Iterator out = null; + NavigableSet in = storeElementNavSet(source()); out = in.descendingIterator(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;NavigableSet;true;descendingSet;();;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).descendingSet(); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = in.descendingSet(); sink(readElement(out)); // $ hasValueFlow } { // "java.util;NavigableSet;true;floor;(Object);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).floor(null); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.floor(null); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;headSet;(Object,boolean);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).headSet(null,true); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = in.headSet(null,true); sink(readElement(out)); // $ hasValueFlow } { // "java.util;NavigableSet;true;higher;(Object);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).higher(null); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.higher(null); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;lower;(Object);;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).lower(null); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.lower(null); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;pollFirst;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).pollFirst(); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.pollFirst(); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;pollLast;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).pollLast(); sink(out); // $ hasValueFlow + NavigableSet in = storeElementNavSet(source()); out = in.pollLast(); sink(out); // $ hasValueFlow } { // "java.util;NavigableSet;true;subSet;(Object,boolean,Object,boolean);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).subSet(null,true,null,true); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = in.subSet(null,true,null,true); sink(readElement(out)); // $ hasValueFlow } { // "java.util;NavigableSet;true;tailSet;(Object,boolean);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((NavigableSet)in).tailSet(null,true); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = in.tailSet(null,true); sink(readElement(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;headMap;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((SortedMap)in).headMap(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;headMap;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((SortedMap)in).headMap(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;subMap;(Object,Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((SortedMap)in).subMap(null,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;subMap;(Object,Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((SortedMap)in).subMap(null,null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;tailMap;(Object);;MapKey of Argument[-1];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((SortedMap)in).tailMap(null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;SortedMap;true;tailMap;(Object);;MapValue of Argument[-1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((SortedMap)in).tailMap(null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;SortedSet;true;first;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((SortedSet)in).first(); sink(out); // $ hasValueFlow + SortedSet in = storeElementNavSet(source()); out = in.first(); sink(out); // $ hasValueFlow } { // "java.util;SortedSet;true;headSet;(Object);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((SortedSet)in).headSet(null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = in.headSet(null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;SortedSet;true;last;();;Element of Argument[-1];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((SortedSet)in).last(); sink(out); // $ hasValueFlow + SortedSet in = storeElementNavSet(source()); out = in.last(); sink(out); // $ hasValueFlow } { // "java.util;SortedSet;true;subSet;(Object,Object);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((SortedSet)in).subSet(null,null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = in.subSet(null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;SortedSet;true;tailSet;(Object);;Element of Argument[-1];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((SortedSet)in).tailSet(null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = in.tailSet(null); sink(readElement(out)); // $ hasValueFlow } { // "java.util.concurrent;TransferQueue;true;tryTransfer;(Object,long,TimeUnit);;Argument[0];Element of Argument[-1];value", @@ -774,933 +809,933 @@ void foo() throws InterruptedException { } { // "java.util;List;false;copyOf;(Collection);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = List.copyOf((Collection)in); sink(readElement(out)); // $ hasValueFlow + List out = null; + Collection in = storeElementList(source()); out = List.copyOf(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object[]);;ArrayElement of Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object[] in = storeArrayElement(source()); out = List.of(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[8];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(in,null,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,in,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[8];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;List;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[9];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = List.of(null,null,null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Map;false;copyOf;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = Map.copyOf((Map)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;copyOf;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = Map.copyOf((Map)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;entry;(Object,Object);;Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = source(); out = Map.entry(in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;entry;(Object,Object);;Argument[1];MapValue of ReturnValue;value", - Object out = null; + Map.Entry out = null; Object in = source(); out = Map.entry(null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[2];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[3];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[4];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[5];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[6];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[7];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[8];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[9];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[10];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[11];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[12];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[13];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[14];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[15];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[16];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[17];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[18];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;of;;;Argument[19];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = Map.of(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Map;false;ofEntries;;;MapKey of ArrayElement of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object[] in = storeArrayElement(storeMapKey(source())); out = Map.ofEntries((Map.Entry[])in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Map;false;ofEntries;;;MapValue of ArrayElement of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object[] in = storeArrayElement(storeMapValue(source())); out = Map.ofEntries((Map.Entry[])in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Set;false;copyOf;(Collection);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = Set.copyOf((Collection)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + Collection in = storeElementList(source()); out = Set.copyOf(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object[]);;ArrayElement of Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object[] in = storeArrayElement(source()); out = Set.of(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[8];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(in,null,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,in,null,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[2];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,in,null,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[3];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,in,null,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[4];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,in,null,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[5];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,in,null,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[6];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,in,null,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[7];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,in,null,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[8];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,null,in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Set;false;of;(Object,Object,Object,Object,Object,Object,Object,Object,Object,Object);;Argument[9];Element of ReturnValue;value", - Object out = null; + Set out = null; Object in = source(); out = Set.of(null,null,null,null,null,null,null,null,null,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Arrays;false;stream;;;ArrayElement of Argument[0];Element of ReturnValue;value", - Object out = null; + Stream out = null; Object[] in = storeArrayElement(source()); out = ((Arrays)null).stream(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Arrays;false;spliterator;;;ArrayElement of Argument[0];Element of ReturnValue;value", - Object out = null; + Spliterator out = null; Object[] in = storeArrayElement(source()); out = ((Arrays)null).spliterator(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Arrays;false;copyOfRange;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", - Object out = null; + Object[] out = null; Object[] in = storeArrayElement(source()); out = ((Arrays)null).copyOfRange(in,0,0); sink(readArrayElement(out)); // $ hasValueFlow } { // "java.util;Arrays;false;copyOf;;;ArrayElement of Argument[0];ArrayElement of ReturnValue;value", - Object out = null; + Object[] out = null; Object[] in = storeArrayElement(source()); out = ((Arrays)null).copyOf(in,0); sink(readArrayElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;list;(Enumeration);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).list((Enumeration)in); sink(readElement(out)); // $ hasValueFlow + List out = null; + Enumeration in = storeElementEnumeration(source()); out = ((Collections)null).list(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;enumeration;(Collection);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).enumeration((Collection)in); sink(readElement(out)); // $ hasValueFlow + Enumeration out = null; + Collection in = storeElementList(source()); out = ((Collections)null).enumeration(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;nCopies;(int,Object);;Argument[1];Element of ReturnValue;value", - Object out = null; + Collection out = null; Object in = source(); out = ((Collections)null).nCopies(0,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;singletonMap;(Object,Object);;Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = ((Collections)null).singletonMap(in,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;singletonMap;(Object,Object);;Argument[1];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = source(); out = ((Collections)null).singletonMap(null,in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;singletonList;(Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object in = source(); out = ((Collections)null).singletonList(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;singleton;(Object);;Argument[0];Element of ReturnValue;value", - Object out = null; + Collection out = null; Object in = source(); out = ((Collections)null).singleton(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedNavigableMap;(NavigableMap,Class,Class);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).checkedNavigableMap((NavigableMap)in,null,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedNavigableMap;(NavigableMap,Class,Class);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).checkedNavigableMap((NavigableMap)in,null,null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedSortedMap;(SortedMap,Class,Class);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).checkedSortedMap((SortedMap)in,null,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedSortedMap;(SortedMap,Class,Class);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).checkedSortedMap((SortedMap)in,null,null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedMap;(Map,Class,Class);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).checkedMap((Map)in,null,null); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedMap;(Map,Class,Class);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).checkedMap((Map)in,null,null); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedList;(List,Class);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).checkedList((List)in,null); sink(readElement(out)); // $ hasValueFlow + List out = null; + List in = storeElementList(source()); out = ((Collections)null).checkedList(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedNavigableSet;(NavigableSet,Class);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).checkedNavigableSet((NavigableSet)in,null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = ((Collections)null).checkedNavigableSet(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedSortedSet;(SortedSet,Class);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).checkedSortedSet((SortedSet)in,null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = ((Collections)null).checkedSortedSet(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedSet;(Set,Class);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).checkedSet((Set)in,null); sink(readElement(out)); // $ hasValueFlow + Set out = null; + Set in = storeElementNavSet(source()); out = ((Collections)null).checkedSet(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;checkedCollection;(Collection,Class);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).checkedCollection((Collection)in,null); sink(readElement(out)); // $ hasValueFlow + Collection out = null; + Collection in = storeElementList(source()); out = ((Collections)null).checkedCollection(in,null); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedNavigableMap;(NavigableMap);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).synchronizedNavigableMap((NavigableMap)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedNavigableMap;(NavigableMap);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).synchronizedNavigableMap((NavigableMap)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedSortedMap;(SortedMap);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).synchronizedSortedMap((SortedMap)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedSortedMap;(SortedMap);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).synchronizedSortedMap((SortedMap)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedMap;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).synchronizedMap((Map)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedMap;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).synchronizedMap((Map)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedList;(List);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).synchronizedList((List)in); sink(readElement(out)); // $ hasValueFlow + List out = null; + List in = storeElementList(source()); out = ((Collections)null).synchronizedList(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedNavigableSet;(NavigableSet);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).synchronizedNavigableSet((NavigableSet)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = ((Collections)null).synchronizedNavigableSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedSortedSet;(SortedSet);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).synchronizedSortedSet((SortedSet)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = ((Collections)null).synchronizedSortedSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedSet;(Set);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).synchronizedSet((Set)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + Set in = storeElementNavSet(source()); out = ((Collections)null).synchronizedSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;synchronizedCollection;(Collection);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).synchronizedCollection((Collection)in); sink(readElement(out)); // $ hasValueFlow + Collection out = null; + Collection in = storeElementList(source()); out = ((Collections)null).synchronizedCollection(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableNavigableMap;(NavigableMap);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).unmodifiableNavigableMap((NavigableMap)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableNavigableMap;(NavigableMap);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).unmodifiableNavigableMap((NavigableMap)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableSortedMap;(SortedMap);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).unmodifiableSortedMap((SortedMap)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableSortedMap;(SortedMap);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).unmodifiableSortedMap((SortedMap)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableMap;(Map);;MapKey of Argument[0];MapKey of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapKey(source()); out = ((Collections)null).unmodifiableMap((Map)in); sink(readMapKey(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableMap;(Map);;MapValue of Argument[0];MapValue of ReturnValue;value", - Object out = null; + Map out = null; Object in = storeMapValue(source()); out = ((Collections)null).unmodifiableMap((Map)in); sink(readMapValue(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableList;(List);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).unmodifiableList((List)in); sink(readElement(out)); // $ hasValueFlow + List out = null; + List in = storeElementList(source()); out = ((Collections)null).unmodifiableList(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableNavigableSet;(NavigableSet);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).unmodifiableNavigableSet((NavigableSet)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + NavigableSet in = storeElementNavSet(source()); out = ((Collections)null).unmodifiableNavigableSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableSortedSet;(SortedSet);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).unmodifiableSortedSet((SortedSet)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + SortedSet in = storeElementNavSet(source()); out = ((Collections)null).unmodifiableSortedSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableSet;(Set);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).unmodifiableSet((Set)in); sink(readElement(out)); // $ hasValueFlow + Set out = null; + Set in = storeElementNavSet(source()); out = ((Collections)null).unmodifiableSet(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;unmodifiableCollection;(Collection);;Element of Argument[0];Element of ReturnValue;value", - Object out = null; - Object in = storeElement(source()); out = ((Collections)null).unmodifiableCollection((Collection)in); sink(readElement(out)); // $ hasValueFlow + Collection out = null; + Collection in = storeElementList(source()); out = ((Collections)null).unmodifiableCollection(in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;max;;;Element of Argument[0];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Collections)null).max((Collection)in); sink(out); // $ hasValueFlow + Collection in = storeElementList(source()); out = ((Collections)null).max(in); sink(out); // $ hasValueFlow } { // "java.util;Collections;false;min;;;Element of Argument[0];ReturnValue;value", Object out = null; - Object in = storeElement(source()); out = ((Collections)null).min((Collection)in); sink(out); // $ hasValueFlow + Collection in = storeElementList(source()); out = ((Collections)null).min(in); sink(out); // $ hasValueFlow } { // "java.util;Arrays;false;fill;(Object[],int,int,Object);;Argument[3];ArrayElement of Argument[0];value", @@ -1800,7 +1835,7 @@ void foo() throws InterruptedException { { // "java.util;Collections;false;copy;(List,List);;Element of Argument[1];Element of Argument[0];value", List out = null; - Object in = storeElement(source()); ((Collections)null).copy(out,(List)in); sink(readElement(out)); // $ hasValueFlow + List in = storeElementList(source()); ((Collections)null).copy(out,in); sink(readElement(out)); // $ hasValueFlow } { // "java.util;Collections;false;fill;(List,Object);;Argument[1];Element of Argument[0];value", @@ -1809,7 +1844,7 @@ void foo() throws InterruptedException { } { // "java.util;Arrays;false;asList;;;ArrayElement of Argument[0];Element of ReturnValue;value", - Object out = null; + List out = null; Object[] in = storeArrayElement(source()); out = ((Arrays)null).asList(in); sink(readElement(out)); // $ hasValueFlow } { diff --git a/java/ql/test/library-tests/dataflow/collections/containerflow.ql b/java/ql/test/library-tests/dataflow/collections/containerflow.ql index 409ff5c01070..c3819782b2eb 100644 --- a/java/ql/test/library-tests/dataflow/collections/containerflow.ql +++ b/java/ql/test/library-tests/dataflow/collections/containerflow.ql @@ -9,14 +9,8 @@ class SummaryModelTest extends SummaryModelCsv { row = [ //"package;type;overrides;name;signature;ext;inputspec;outputspec;kind", - ";B;false;storeArrayElement;(Object);;Argument[0];ArrayElement of ReturnValue;value", - ";B;false;storeElement;(Object);;Argument[0];Element of ReturnValue;value", - ";B;false;storeMapKey;(Object);;Argument[0];MapKey of ReturnValue;value", - ";B;false;storeMapValue;(Object);;Argument[0];MapValue of ReturnValue;value", - ";B;false;readArrayElement;(Object);;ArrayElement of Argument[0];ReturnValue;value", - ";B;false;readElement;(Object);;Element of Argument[0];ReturnValue;value", - ";B;false;readMapKey;(Object);;MapKey of Argument[0];ReturnValue;value", - ";B;false;readMapValue;(Object);;MapValue of Argument[0];ReturnValue;value" + ";B;false;readElement;(Spliterator);;Element of Argument[0];ReturnValue;value", + ";B;false;readElement;(Stream);;Element of Argument[0];ReturnValue;value" ] } } From 2f3ea4412f7103f2fe1b3e6f1321bcf8fa2a07f9 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 22:37:16 +0200 Subject: [PATCH 1500/1662] add model of the `pify` library --- .../change-notes/2021-06-21-promisify.md | 4 + .../ql/src/semmle/javascript/Promises.qll | 8 +- .../CWE-022/TaintedPath/TaintedPath.expected | 100 ++++++++++++++++++ .../CWE-022/TaintedPath/other-fs-libraries.js | 3 + 4 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 javascript/change-notes/2021-06-21-promisify.md diff --git a/javascript/change-notes/2021-06-21-promisify.md b/javascript/change-notes/2021-06-21-promisify.md new file mode 100644 index 000000000000..87a026a7f03c --- /dev/null +++ b/javascript/change-notes/2021-06-21-promisify.md @@ -0,0 +1,4 @@ +lgtm,codescanning +* Support for libraries modeling `promisify` and `promisifyAll` functions have been improved. + Affected packages are + [pify](https://www.npmjs.com/package/pify) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 8139f10e0f4c..41e7423ea009 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -672,10 +672,8 @@ module Promisify { class PromisifyAllCall extends DataFlow::CallNode { PromisifyAllCall() { this = - [ - DataFlow::moduleMember("bluebird", "promisifyAll"), - DataFlow::moduleImport("util-promisifyall") - ].getACall() + [DataFlow::moduleMember("bluebird", "promisifyAll"), DataFlow::moduleImport("pify")] + .getACall() } } @@ -686,6 +684,8 @@ module Promisify { class PromisifyCall extends DataFlow::CallNode { PromisifyCall() { this = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify") + or + this = DataFlow::moduleImport("pify").getACall() } } } diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected index 2a2ad5566330..6524cfc91df7 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected @@ -2271,6 +2271,40 @@ nodes | other-fs-libraries.js:52:24:52:27 | path | | other-fs-libraries.js:52:24:52:27 | path | | other-fs-libraries.js:52:24:52:27 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:55:36:55:39 | path | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | @@ -6619,6 +6653,70 @@ edges | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:52:24:52:27 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:54:36:54:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | @@ -8352,6 +8450,8 @@ edges | other-fs-libraries.js:42:53:42:56 | path | other-fs-libraries.js:38:24:38:30 | req.url | other-fs-libraries.js:42:53:42:56 | path | This path depends on $@. | other-fs-libraries.js:38:24:38:30 | req.url | a user-provided value | | other-fs-libraries.js:51:19:51:22 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:51:19:51:22 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | other-fs-libraries.js:52:24:52:27 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:52:24:52:27 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | +| other-fs-libraries.js:54:36:54:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:54:36:54:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | +| other-fs-libraries.js:55:36:55:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:55:36:55:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | prettier.js:7:28:7:28 | p | prettier.js:6:13:6:13 | p | prettier.js:7:28:7:28 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | prettier.js:11:44:11:44 | p | prettier.js:6:13:6:13 | p | prettier.js:11:44:11:44 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | pupeteer.js:9:28:9:34 | tainted | pupeteer.js:5:28:5:53 | parseTo ... t).name | pupeteer.js:9:28:9:34 | tainted | This path depends on $@. | pupeteer.js:5:28:5:53 | parseTo ... t).name | a user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js index 14c9e357492c..6c4c611388a5 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js @@ -50,4 +50,7 @@ http.createServer(function(req, res) { fs.readFileSync(path); // NOT OK asyncFS.readFileSync(path); // NOT OK + + require("pify")(fs.readFileSync)(path); // NOT OK + require("pify")(fs).readFileSync(path); // NOT OK }); From 61cc415a32b0071afef2a84669b6d349b05fd075 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 22:40:55 +0200 Subject: [PATCH 1501/1662] add model of the `util.promisify` library --- .../change-notes/2021-06-21-promisify.md | 3 +- .../ql/src/semmle/javascript/Promises.qll | 2 +- .../CWE-022/TaintedPath/TaintedPath.expected | 50 +++++++++++++++++++ .../CWE-022/TaintedPath/other-fs-libraries.js | 2 + 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/javascript/change-notes/2021-06-21-promisify.md b/javascript/change-notes/2021-06-21-promisify.md index 87a026a7f03c..1442a9ddcfa9 100644 --- a/javascript/change-notes/2021-06-21-promisify.md +++ b/javascript/change-notes/2021-06-21-promisify.md @@ -1,4 +1,5 @@ lgtm,codescanning * Support for libraries modeling `promisify` and `promisifyAll` functions have been improved. Affected packages are - [pify](https://www.npmjs.com/package/pify) + [pify](https://www.npmjs.com/package/pify), + [util.promisify](https://www.npmjs.com/package/util.promisify) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index 41e7423ea009..d86859d12913 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -685,7 +685,7 @@ module Promisify { PromisifyCall() { this = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify") or - this = DataFlow::moduleImport("pify").getACall() + this = DataFlow::moduleImport(["pify", "util.promisify"]).getACall() } } } diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected index 6524cfc91df7..cb04f5229873 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected @@ -2305,6 +2305,23 @@ nodes | other-fs-libraries.js:55:36:55:39 | path | | other-fs-libraries.js:55:36:55:39 | path | | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:57:46:57:49 | path | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | @@ -6717,6 +6734,38 @@ edges | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:55:36:55:39 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | @@ -8452,6 +8501,7 @@ edges | other-fs-libraries.js:52:24:52:27 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:52:24:52:27 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | other-fs-libraries.js:54:36:54:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:54:36:54:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | other-fs-libraries.js:55:36:55:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:55:36:55:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | +| other-fs-libraries.js:57:46:57:49 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:57:46:57:49 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | prettier.js:7:28:7:28 | p | prettier.js:6:13:6:13 | p | prettier.js:7:28:7:28 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | prettier.js:11:44:11:44 | p | prettier.js:6:13:6:13 | p | prettier.js:11:44:11:44 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | pupeteer.js:9:28:9:34 | tainted | pupeteer.js:5:28:5:53 | parseTo ... t).name | pupeteer.js:9:28:9:34 | tainted | This path depends on $@. | pupeteer.js:5:28:5:53 | parseTo ... t).name | a user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js index 6c4c611388a5..f48c7198d940 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js @@ -53,4 +53,6 @@ http.createServer(function(req, res) { require("pify")(fs.readFileSync)(path); // NOT OK require("pify")(fs).readFileSync(path); // NOT OK + + require('util.promisify')(fs.readFileSync)(path); // NOT OK }); From 4360e5dcbc73314eae80c9404a75eb4622098028 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Sun, 20 Jun 2021 22:49:19 +0200 Subject: [PATCH 1502/1662] add model of the `thenify` library --- .../change-notes/2021-06-21-promisify.md | 3 +- .../ql/src/semmle/javascript/Promises.qll | 4 ++ .../CWE-022/TaintedPath/TaintedPath.expected | 50 +++++++++++++++++++ .../CWE-022/TaintedPath/other-fs-libraries.js | 2 + 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-21-promisify.md b/javascript/change-notes/2021-06-21-promisify.md index 1442a9ddcfa9..889fefa72a01 100644 --- a/javascript/change-notes/2021-06-21-promisify.md +++ b/javascript/change-notes/2021-06-21-promisify.md @@ -2,4 +2,5 @@ lgtm,codescanning * Support for libraries modeling `promisify` and `promisifyAll` functions have been improved. Affected packages are [pify](https://www.npmjs.com/package/pify), - [util.promisify](https://www.npmjs.com/package/util.promisify) + [util.promisify](https://www.npmjs.com/package/util.promisify), + [thenify](https://www.npmjs.com/package/thenify) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index d86859d12913..ae644806d3eb 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -686,6 +686,10 @@ module Promisify { this = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify") or this = DataFlow::moduleImport(["pify", "util.promisify"]).getACall() + or + this = DataFlow::moduleImport("thenify").getACall() + or + this = DataFlow::moduleMember("thenify", "withCallback").getACall() } } } diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected index cb04f5229873..18e1204db01e 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected @@ -2322,6 +2322,23 @@ nodes | other-fs-libraries.js:57:46:57:49 | path | | other-fs-libraries.js:57:46:57:49 | path | | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:59:39:59:42 | path | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | | prettier.js:6:11:6:28 | p | @@ -6766,6 +6783,38 @@ edges | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | | other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:57:46:57:49 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | +| other-fs-libraries.js:49:7:49:48 | path | other-fs-libraries.js:59:39:59:42 | path | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | | other-fs-libraries.js:49:14:49:37 | url.par ... , true) | other-fs-libraries.js:49:14:49:43 | url.par ... ).query | @@ -8502,6 +8551,7 @@ edges | other-fs-libraries.js:54:36:54:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:54:36:54:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | other-fs-libraries.js:55:36:55:39 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:55:36:55:39 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | other-fs-libraries.js:57:46:57:49 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:57:46:57:49 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | +| other-fs-libraries.js:59:39:59:42 | path | other-fs-libraries.js:49:24:49:30 | req.url | other-fs-libraries.js:59:39:59:42 | path | This path depends on $@. | other-fs-libraries.js:49:24:49:30 | req.url | a user-provided value | | prettier.js:7:28:7:28 | p | prettier.js:6:13:6:13 | p | prettier.js:7:28:7:28 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | prettier.js:11:44:11:44 | p | prettier.js:6:13:6:13 | p | prettier.js:11:44:11:44 | p | This path depends on $@. | prettier.js:6:13:6:13 | p | a user-provided value | | pupeteer.js:9:28:9:34 | tainted | pupeteer.js:5:28:5:53 | parseTo ... t).name | pupeteer.js:9:28:9:34 | tainted | This path depends on $@. | pupeteer.js:5:28:5:53 | parseTo ... t).name | a user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js index f48c7198d940..f52b19f141d3 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/other-fs-libraries.js @@ -55,4 +55,6 @@ http.createServer(function(req, res) { require("pify")(fs).readFileSync(path); // NOT OK require('util.promisify')(fs.readFileSync)(path); // NOT OK + + require("thenify")(fs.readFileSync)(path); // NOT OK }); From 16e3681fd3fa79cf40fb8d265f5df69e8b7448da Mon Sep 17 00:00:00 2001 From: Asger Feldthaus Date: Tue, 22 Jun 2021 12:00:04 +0200 Subject: [PATCH 1503/1662] JS: Update RegExpInjection test case --- .../Security/CWE-730/RegExpInjection.expected | 30 +++++++++---------- .../Security/CWE-730/RegExpInjection.js | 8 ++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.expected b/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.expected index 1e0d857fbfbd..7d24e94a590d 100644 --- a/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.expected @@ -25,12 +25,12 @@ nodes | RegExpInjection.js:31:23:31:23 | s | | RegExpInjection.js:33:12:33:14 | key | | RegExpInjection.js:34:12:34:19 | getKey() | -| RegExpInjection.js:40:19:40:23 | input | -| RegExpInjection.js:40:19:40:23 | input | -| RegExpInjection.js:41:22:41:26 | input | -| RegExpInjection.js:41:22:41:26 | input | -| RegExpInjection.js:42:21:42:25 | input | -| RegExpInjection.js:42:21:42:25 | input | +| RegExpInjection.js:40:23:40:27 | input | +| RegExpInjection.js:40:23:40:27 | input | +| RegExpInjection.js:41:26:41:30 | input | +| RegExpInjection.js:41:26:41:30 | input | +| RegExpInjection.js:42:25:42:29 | input | +| RegExpInjection.js:42:25:42:29 | input | | RegExpInjection.js:45:20:45:24 | input | | RegExpInjection.js:45:20:45:24 | input | | RegExpInjection.js:46:23:46:27 | input | @@ -73,12 +73,12 @@ edges | RegExpInjection.js:5:7:5:28 | key | RegExpInjection.js:54:14:54:16 | key | | RegExpInjection.js:5:13:5:28 | req.param("key") | RegExpInjection.js:5:7:5:28 | key | | RegExpInjection.js:5:13:5:28 | req.param("key") | RegExpInjection.js:5:7:5:28 | key | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:40:19:40:23 | input | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:40:19:40:23 | input | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:41:22:41:26 | input | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:41:22:41:26 | input | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:42:21:42:25 | input | -| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:42:21:42:25 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:40:23:40:27 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:40:23:40:27 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:41:26:41:30 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:41:26:41:30 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:42:25:42:29 | input | +| RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:42:25:42:29 | input | | RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:45:20:45:24 | input | | RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:45:20:45:24 | input | | RegExpInjection.js:5:31:5:56 | input | RegExpInjection.js:46:23:46:27 | input | @@ -136,9 +136,9 @@ edges | RegExpInjection.js:27:14:27:21 | getKey() | RegExpInjection.js:24:12:24:27 | req.param("key") | RegExpInjection.js:27:14:27:21 | getKey() | This regular expression is constructed from a $@. | RegExpInjection.js:24:12:24:27 | req.param("key") | user-provided value | | RegExpInjection.js:31:23:31:23 | s | RegExpInjection.js:5:13:5:28 | req.param("key") | RegExpInjection.js:31:23:31:23 | s | This regular expression is constructed from a $@. | RegExpInjection.js:5:13:5:28 | req.param("key") | user-provided value | | RegExpInjection.js:31:23:31:23 | s | RegExpInjection.js:24:12:24:27 | req.param("key") | RegExpInjection.js:31:23:31:23 | s | This regular expression is constructed from a $@. | RegExpInjection.js:24:12:24:27 | req.param("key") | user-provided value | -| RegExpInjection.js:40:19:40:23 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:40:19:40:23 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | -| RegExpInjection.js:41:22:41:26 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:41:22:41:26 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | -| RegExpInjection.js:42:21:42:25 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:42:21:42:25 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | +| RegExpInjection.js:40:23:40:27 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:40:23:40:27 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | +| RegExpInjection.js:41:26:41:30 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:41:26:41:30 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | +| RegExpInjection.js:42:25:42:29 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:42:25:42:29 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | | RegExpInjection.js:45:20:45:24 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:45:20:45:24 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | | RegExpInjection.js:46:23:46:27 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:46:23:46:27 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | | RegExpInjection.js:47:22:47:26 | input | RegExpInjection.js:5:39:5:56 | req.param("input") | RegExpInjection.js:47:22:47:26 | input | This regular expression is constructed from a $@. | RegExpInjection.js:5:39:5:56 | req.param("input") | user-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.js b/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.js index e22ec9c6a178..3551a1ff72a1 100644 --- a/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.js +++ b/javascript/ql/test/query-tests/Security/CWE-730/RegExpInjection.js @@ -37,10 +37,10 @@ app.get('/findKey', function(req, res) { var likelyString = x? defString: 42; var notString = {}; - defString.match(input); // NOT OK - likelyString.match(input); // NOT OK - maybeString.match(input); // NOT OK - notString.match(input); // OK + if (defString.match(input)) {} // NOT OK + if (likelyString.match(input)) {} // NOT OK + if (maybeString.match(input)) {} // NOT OK + if (notString.match(input)) {} // OK defString.search(input); // NOT OK likelyString.search(input); // NOT OK From 3bdd9f7a304e97a371d7f0c1d725dddc86fb1e9b Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 13:08:19 +0200 Subject: [PATCH 1504/1662] mention the new toUnicode method in the QL language specification --- docs/codeql/ql-language-reference/ql-language-specification.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/codeql/ql-language-reference/ql-language-specification.rst b/docs/codeql/ql-language-reference/ql-language-specification.rst index bd305bdbadc5..c1b2f830dba5 100644 --- a/docs/codeql/ql-language-reference/ql-language-specification.rst +++ b/docs/codeql/ql-language-reference/ql-language-specification.rst @@ -1774,6 +1774,8 @@ The following built-in predicates are members of type ``int``: +-------------------------+-------------+----------------+----------------------------------------------------------------------------------------------------------------+ | ``toString`` | string | | The result is the decimal representation of the number as a string. | +-------------------------+-------------+----------------+----------------------------------------------------------------------------------------------------------------+ +| ``toUnicode`` | string | | The result is the unicode character for the receiver seen as a unicode code point. | ++-------------------------+-------------+----------------+----------------------------------------------------------------------------------------------------------------+ The leftmost bit after ``bitShiftRightSigned`` depends on sign extension, whereas after ``bitShiftRight`` it is zero. From 870e4125dc8043411fc14bccbae13197173af43d Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 13:14:43 +0200 Subject: [PATCH 1505/1662] Fix framework coverage commenter to use merge commit parent instead of (old) base repo SHA --- .github/workflows/csv-coverage-pr-artifacts.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/csv-coverage-pr-artifacts.yml b/.github/workflows/csv-coverage-pr-artifacts.yml index 0941adba3c3a..b2f9b7b467d1 100644 --- a/.github/workflows/csv-coverage-pr-artifacts.yml +++ b/.github/workflows/csv-coverage-pr-artifacts.yml @@ -32,8 +32,12 @@ jobs: - name: Clone self (github/codeql) - BASE uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.base.sha }} + fetch-depth: 2 path: base + - run: | + git checkout HEAD^1 + git log -1 --format='%H' + working-directory: base - name: Set up Python 3.8 uses: actions/setup-python@v2 with: @@ -47,13 +51,13 @@ jobs: run: unzip -d codeql-cli codeql-linux64.zip - name: Generate CSV files on merge and base of the PR run: | - echo "Running generator on ${{github.sha}}" + echo "Running generator on merge" PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge mkdir out_merge cp framework-coverage-*.csv out_merge/ cp framework-coverage-*.rst out_merge/ - echo "Running generator on ${{github.event.pull_request.base.sha}}" + echo "Running generator on base" PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base mkdir out_base cp framework-coverage-*.csv out_base/ From 062502fecc9ae416919f579986b747b506da5aea Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 15:34:51 +0200 Subject: [PATCH 1506/1662] add back support for `util-promisifyall` --- javascript/ql/src/semmle/javascript/Promises.qll | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/javascript/ql/src/semmle/javascript/Promises.qll b/javascript/ql/src/semmle/javascript/Promises.qll index ae644806d3eb..1a963e3a129b 100644 --- a/javascript/ql/src/semmle/javascript/Promises.qll +++ b/javascript/ql/src/semmle/javascript/Promises.qll @@ -672,8 +672,10 @@ module Promisify { class PromisifyAllCall extends DataFlow::CallNode { PromisifyAllCall() { this = - [DataFlow::moduleMember("bluebird", "promisifyAll"), DataFlow::moduleImport("pify")] - .getACall() + [ + DataFlow::moduleMember("bluebird", "promisifyAll"), + DataFlow::moduleImport(["util-promisifyall", "pify"]) + ].getACall() } } From 317c6867aac5c7fa1f9587ed87e64a690c55b658 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 22 Jun 2021 16:46:54 +0200 Subject: [PATCH 1507/1662] Python: Fix sneaky semantic change Co-authored-by: Rasmus Wriedt Larsen --- python/ql/src/Security/CWE-327/Ssl.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/python/ql/src/Security/CWE-327/Ssl.qll b/python/ql/src/Security/CWE-327/Ssl.qll index 8730cbfea0ed..8def40e1275f 100644 --- a/python/ql/src/Security/CWE-327/Ssl.qll +++ b/python/ql/src/Security/CWE-327/Ssl.qll @@ -19,6 +19,7 @@ class SSLContextCreation extends ContextCreation, DataFlow::CallCfgNode { ) or not exists(this.getArg(_)) and + not exists(this.getArgByName(_)) and result = "TLS" } } From 2ba2642c7ab29b9eedef33bcc2b8cd1d203d0c10 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 20:24:42 +0200 Subject: [PATCH 1508/1662] add more template sinks for the `js/code-injection` query --- .../change-notes/2021-06-22-templates.md | 10 ++ .../dataflow/CodeInjectionCustomizations.qll | 56 +++++++- .../CodeInjection/CodeInjection.expected | 120 +++++++++++------- .../HeuristicSourceCodeInjection.expected | 98 ++++++++------ .../CWE-094/CodeInjection/template-sinks.js | 11 ++ 5 files changed, 211 insertions(+), 84 deletions(-) create mode 100644 javascript/change-notes/2021-06-22-templates.md diff --git a/javascript/change-notes/2021-06-22-templates.md b/javascript/change-notes/2021-06-22-templates.md new file mode 100644 index 000000000000..57947529dcb4 --- /dev/null +++ b/javascript/change-notes/2021-06-22-templates.md @@ -0,0 +1,10 @@ +lgtm,codescanning +* More template engines are recognized as sinks for the `js/code-injection` query. + Affected packages are + [mustache](https://npmjs.com/package/mustache), + [handlebars](https://npmjs.com/package/handlebars), + [dot](https://npmjs.com/package/dot), + [hogan.js](https://npmjs.com/package/hogan.js) + [eta](https://npmjs.com/package/eta), + [squirrelly](https://npmjs.com/package/squirrelly), + [whiskers](https://npmjs.com/package/whiskers) \ No newline at end of file diff --git a/javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll b/javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll index c0dfa933f89a..5316bae327a9 100644 --- a/javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll +++ b/javascript/ql/src/semmle/javascript/security/dataflow/CodeInjectionCustomizations.qll @@ -197,11 +197,63 @@ module CodeInjection { } /** - * A value interpreted as a tempalte by the `dot` library. + * A value interpreted as a template by the `handlebars` library. + */ + class HandlebarsTemplateSink extends TemplateSink { + HandlebarsTemplateSink() { + this = any(Handlebars::Handlebars h).getAMemberCall("compile").getArgument(0) + } + } + + /** + * A value interpreted as a template by the `mustache` library. + */ + class MustacheTemplateSink extends TemplateSink { + MustacheTemplateSink() { + this = DataFlow::moduleMember("mustache", "render").getACall().getArgument(0) + } + } + + /** + * A value interpreted as a template by the `hogan.js` library. + */ + class HoganTemplateSink extends TemplateSink { + HoganTemplateSink() { + this = DataFlow::moduleMember("hogan.js", "compile").getACall().getArgument(0) + } + } + + /** + * A value interpreted as a template by the `eta` library. + */ + class EtaTemplateSink extends TemplateSink { + EtaTemplateSink() { this = DataFlow::moduleMember("eta", "render").getACall().getArgument(0) } + } + + /** + * A value interpreted as a template by the `squirrelly` library. + */ + class SquirrelTemplateSink extends TemplateSink { + SquirrelTemplateSink() { + this = DataFlow::moduleMember("squirrelly", "render").getACall().getArgument(0) + } + } + + /** + * A value interpreted as a template by the `whiskers` library. + */ + class WhiskersTemplateSink extends TemplateSink { + WhiskersTemplateSink() { + this = DataFlow::moduleMember("whiskers", "render").getACall().getArgument(0) + } + } + + /** + * A value interpreted as a template by the `dot` library. */ class DotTemplateSink extends TemplateSink { DotTemplateSink() { - this = DataFlow::moduleImport("dot").getAMemberCall("template").getArgument(0) + this = DataFlow::moduleImport("dot").getAMemberCall(["template", "compile"]).getArgument(0) } } diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected index 34049c0ae1e9..15d8cc5748bc 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected @@ -107,25 +107,37 @@ nodes | react.js:10:56:10:77 | documen ... on.hash | | react.js:10:56:10:77 | documen ... on.hash | | react.js:10:56:10:77 | documen ... on.hash | -| template-sinks.js:12:9:12:31 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | -| template-sinks.js:12:19:12:31 | req.query.foo | -| template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:21:21:21:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | +| template-sinks.js:17:19:17:31 | req.query.foo | +| template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:32:17:32:23 | tainted | | tst.js:2:6:2:27 | documen ... on.href | | tst.js:2:6:2:27 | documen ... on.href | | tst.js:2:6:2:83 | documen ... t=")+8) | @@ -216,24 +228,36 @@ edges | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | | react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:12:9:12:31 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:12:9:12:31 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:17:9:17:31 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:17:9:17:31 | tainted | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | @@ -284,14 +308,20 @@ edges | react-native.js:8:32:8:38 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:8:32:8:38 | tainted | $@ flows to here and is interpreted as code. | react-native.js:7:17:7:33 | req.param("code") | User-provided value | | react-native.js:10:23:10:29 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:10:23:10:29 | tainted | $@ flows to here and is interpreted as code. | react-native.js:7:17:7:33 | req.param("code") | User-provided value | | react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | $@ flows to here and is interpreted as code. | react.js:10:56:10:77 | documen ... on.hash | User-provided value | -| template-sinks.js:14:17:14:23 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:14:17:14:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:15:16:15:22 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:15:16:15:22 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:16:18:16:24 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:16:18:16:24 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:17:17:17:23 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:17:17:17:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:18:18:18:24 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:18:18:18:24 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:19:16:19:22 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:19:16:19:22 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:20:27:20:33 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:20:27:20:33 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | -| template-sinks.js:21:21:21:27 | tainted | template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:21:21:21:27 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:12:19:12:31 | req.query.foo | User-provided value | +| template-sinks.js:19:17:19:23 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:19:17:19:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:20:16:20:22 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:20:16:20:22 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:21:18:21:24 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:21:18:21:24 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:22:17:22:23 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:22:17:22:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:23:18:23:24 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:23:18:23:24 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:24:16:24:22 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:24:16:24:22 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:25:27:25:33 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:25:27:25:33 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:26:21:26:27 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:26:21:26:27 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:27:17:27:23 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:27:17:27:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:28:24:28:30 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:28:24:28:30 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:29:21:29:27 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:29:21:29:27 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:30:19:30:25 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:30:19:30:25 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:31:16:31:22 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:31:16:31:22 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | +| template-sinks.js:32:17:32:23 | tainted | template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:32:17:32:23 | tainted | $@ flows to here and is interpreted as a template, which may contain code. | template-sinks.js:17:19:17:31 | req.query.foo | User-provided value | | tst.js:2:6:2:83 | documen ... t=")+8) | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | $@ flows to here and is interpreted as code. | tst.js:2:6:2:27 | documen ... on.href | User-provided value | | tst.js:5:12:5:33 | documen ... on.hash | tst.js:5:12:5:33 | documen ... on.hash | tst.js:5:12:5:33 | documen ... on.hash | $@ flows to here and is interpreted as code. | tst.js:5:12:5:33 | documen ... on.hash | User-provided value | | tst.js:14:10:14:74 | documen ... , "$1") | tst.js:14:10:14:33 | documen ... .search | tst.js:14:10:14:74 | documen ... , "$1") | $@ flows to here and is interpreted as code. | tst.js:14:10:14:33 | documen ... .search | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected index 12672467df3b..bd5e5a860885 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected @@ -111,25 +111,37 @@ nodes | react.js:10:56:10:77 | documen ... on.hash | | react.js:10:56:10:77 | documen ... on.hash | | react.js:10:56:10:77 | documen ... on.hash | -| template-sinks.js:12:9:12:31 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | -| template-sinks.js:12:19:12:31 | req.query.foo | -| template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:21:21:21:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | +| template-sinks.js:17:19:17:31 | req.query.foo | +| template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:32:17:32:23 | tainted | | tst.js:2:6:2:27 | documen ... on.href | | tst.js:2:6:2:27 | documen ... on.href | | tst.js:2:6:2:83 | documen ... t=")+8) | @@ -224,24 +236,36 @@ edges | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | | react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:14:17:14:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:15:16:15:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:16:18:16:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:17:17:17:23 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:18:18:18:24 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:19:16:19:22 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:20:27:20:33 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:12:9:12:31 | tainted | template-sinks.js:21:21:21:27 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:12:9:12:31 | tainted | -| template-sinks.js:12:19:12:31 | req.query.foo | template-sinks.js:12:9:12:31 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:19:17:19:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:20:16:20:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:21:18:21:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:22:17:22:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:23:18:23:24 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:24:16:24:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:25:27:25:33 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:26:21:26:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:27:17:27:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:28:24:28:30 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:29:21:29:27 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:30:19:30:25 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:31:16:31:22 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:17:9:17:31 | tainted | template-sinks.js:32:17:32:23 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:17:9:17:31 | tainted | +| template-sinks.js:17:19:17:31 | req.query.foo | template-sinks.js:17:9:17:31 | tainted | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | | tst.js:2:6:2:27 | documen ... on.href | tst.js:2:6:2:83 | documen ... t=")+8) | diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/template-sinks.js b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/template-sinks.js index 9959228b0be5..f2cc7a400f63 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/template-sinks.js +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/template-sinks.js @@ -5,6 +5,11 @@ import * as dot from 'dot'; import * as ejs from 'ejs'; import * as nunjucks from 'nunjucks'; import * as lodash from 'lodash'; +import * as handlebars from 'handlebars'; +import * as mustache from 'mustache'; +const Hogan = require("hogan.js"); +import * as Eta from 'eta'; +import * as Sqrl from 'squirrelly' var app = express(); @@ -19,4 +24,10 @@ app.get('/some/path', function(req, res) { ejs.render(tainted); // NOT OK nunjucks.renderString(tainted); // NOT OK lodash.template(tainted); // NOT OK + dot.compile(tainted); // NOT OK + handlebars.compile(tainted); // NOT OK + mustache.render(tainted); // NOT OK + Hogan.compile(tainted); // NOT OK + Eta.render(tainted); // NOT OK + Sqrl.render(tainted); // NOT OK }); From 9fd1606238e86ef7b212cc58b79f5805357dcde9 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 22 Jun 2021 20:27:55 +0100 Subject: [PATCH 1509/1662] Model java.util.Optional --- .../code/java/dataflow/ExternalFlow.qll | 1 + .../semmle/code/java/frameworks/Optional.qll | 21 ++++ java/ql/test/library-tests/optional/Test.java | 98 +++++++++++++++++++ .../test/library-tests/optional/test.expected | 0 java/ql/test/library-tests/optional/test.ql | 63 ++++++++++++ 5 files changed, 183 insertions(+) create mode 100644 java/ql/src/semmle/code/java/frameworks/Optional.qll create mode 100644 java/ql/test/library-tests/optional/Test.java create mode 100644 java/ql/test/library-tests/optional/test.expected create mode 100644 java/ql/test/library-tests/optional/test.ql diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 535c667698f9..e1d92779bbed 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -82,6 +82,7 @@ private module Frameworks { private import semmle.code.java.frameworks.guava.Guava private import semmle.code.java.frameworks.jackson.JacksonSerializability private import semmle.code.java.frameworks.JaxWS + private import semmle.code.java.frameworks.Optional private import semmle.code.java.frameworks.spring.SpringHttp private import semmle.code.java.frameworks.spring.SpringWebClient private import semmle.code.java.security.ResponseSplitting diff --git a/java/ql/src/semmle/code/java/frameworks/Optional.qll b/java/ql/src/semmle/code/java/frameworks/Optional.qll new file mode 100644 index 000000000000..9747de229ea8 --- /dev/null +++ b/java/ql/src/semmle/code/java/frameworks/Optional.qll @@ -0,0 +1,21 @@ +/** Definitions related to `java.util.Optional`. */ + +import semmle.code.java.dataflow.ExternalFlow + +private class OptionalModel extends SummaryModelCsv { + override predicate row(string s) { + s = + [ + "java.util;Optional;false;filter;;;Element of Argument[-1];Element of ReturnValue;value", + "java.util;Optional;false;get;;;Element of Argument[-1];ReturnValue;value", + "java.util;Optional;false;of;;;Argument[0];Element of ReturnValue;value", + "java.util;Optional;false;ofNullable;;;Argument[0];Element of ReturnValue;value", + "java.util;Optional;false;or;;;Element of Argument[-1];Element of ReturnValue;value", + "java.util;Optional;false;orElse;;;Element of Argument[-1];ReturnValue;value", + "java.util;Optional;false;orElse;;;Argument[0];ReturnValue;value", + "java.util;Optional;false;orElseGet;;;Element of Argument[-1];ReturnValue;value", + "java.util;Optional;false;orElseThrow;;;Element of Argument[-1];ReturnValue;value", + "java.util;Optional;false;stream;;;Element of Argument[-1];Element of ReturnValue;value" + ] + } +} diff --git a/java/ql/test/library-tests/optional/Test.java b/java/ql/test/library-tests/optional/Test.java new file mode 100644 index 000000000000..b7aa992124dd --- /dev/null +++ b/java/ql/test/library-tests/optional/Test.java @@ -0,0 +1,98 @@ +package generatedtest; + +import java.util.Optional; +import java.util.stream.Stream; + +// Test case generated by GenerateFlowTestCase.ql +public class Test { + + Object getElement(Optional container) { return container.get(); } + Object getStreamElement(Stream container) { return null; /* Modelled in .ql file */ } + Optional newWithElement(Object element) { return Optional.of(element); } + Object source() { return null; } + void sink(Object o) { } + + public void test() { + + { + // "java.util;Optional;false;filter;;;Element of Argument[-1];Element of ReturnValue;value" + Optional out = null; + Optional in = newWithElement(source()); + out = in.filter(null); + sink(getElement(out)); // $hasValueFlow + } + { + // "java.util;Optional;false;get;;;Element of Argument[-1];ReturnValue;value" + Object out = null; + Optional in = newWithElement(source()); + out = in.get(); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;of;;;Argument[0];Element of ReturnValue;value" + Optional out = null; + Object in = (Object)source(); + out = Optional.of(in); + sink(getElement(out)); // $hasValueFlow + } + { + // "java.util;Optional;false;ofNullable;;;Argument[0];Element of ReturnValue;value" + Optional out = null; + Object in = (Object)source(); + out = Optional.ofNullable(in); + sink(getElement(out)); // $hasValueFlow + } + { + // "java.util;Optional;false;or;;;Element of Argument[-1];Element of ReturnValue;value" + Optional out = null; + Optional in = newWithElement(source()); + out = in.or(null); + sink(getElement(out)); // $hasValueFlow + } + { + // "java.util;Optional;false;orElse;;;Argument[0];ReturnValue;value" + Object out = null; + Object in = (Object)source(); + Optional instance = null; + out = instance.orElse(in); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;orElse;;;Element of Argument[-1];ReturnValue;value" + Object out = null; + Optional in = newWithElement(source()); + out = in.orElse(null); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;orElseGet;;;Element of Argument[-1];ReturnValue;value" + Object out = null; + Optional in = newWithElement(source()); + out = in.orElseGet(null); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;orElseThrow;;;Element of Argument[-1];ReturnValue;value" + Object out = null; + Optional in = newWithElement(source()); + out = in.orElseThrow(null); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;orElseThrow;;;Element of Argument[-1];ReturnValue;value" + Object out = null; + Optional in = newWithElement(source()); + out = in.orElseThrow(); + sink(out); // $hasValueFlow + } + { + // "java.util;Optional;false;stream;;;Element of Argument[-1];Element of ReturnValue;value" + Stream out = null; + Optional in = newWithElement(source()); + out = in.stream(); + sink(getStreamElement(out)); // $hasValueFlow + } + + } + +} \ No newline at end of file diff --git a/java/ql/test/library-tests/optional/test.expected b/java/ql/test/library-tests/optional/test.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/ql/test/library-tests/optional/test.ql b/java/ql/test/library-tests/optional/test.ql new file mode 100644 index 000000000000..7beccd686cda --- /dev/null +++ b/java/ql/test/library-tests/optional/test.ql @@ -0,0 +1,63 @@ +import java +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.ExternalFlow +import semmle.code.java.dataflow.TaintTracking +import TestUtilities.InlineExpectationsTest + +class SummaryModelTest extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + //"package;type;overrides;name;signature;ext;inputspec;outputspec;kind", + "generatedtest;Test;false;getStreamElement;;;Element of Argument[0];ReturnValue;value" + ] + } +} + +class ValueFlowConf extends DataFlow::Configuration { + ValueFlowConf() { this = "qltest:valueFlowConf" } + + override predicate isSource(DataFlow::Node n) { + n.asExpr().(MethodAccess).getMethod().hasName("source") + } + + override predicate isSink(DataFlow::Node n) { + n.asExpr().(Argument).getCall().getCallee().hasName("sink") + } +} + +class TaintFlowConf extends TaintTracking::Configuration { + TaintFlowConf() { this = "qltest:taintFlowConf" } + + override predicate isSource(DataFlow::Node n) { + n.asExpr().(MethodAccess).getMethod().hasName("source") + } + + override predicate isSink(DataFlow::Node n) { + n.asExpr().(Argument).getCall().getCallee().hasName("sink") + } +} + +class HasFlowTest extends InlineExpectationsTest { + HasFlowTest() { this = "HasFlowTest" } + + override string getARelevantTag() { result = ["hasValueFlow", "hasTaintFlow"] } + + override predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "hasValueFlow" and + exists(DataFlow::Node src, DataFlow::Node sink, ValueFlowConf conf | conf.hasFlow(src, sink) | + sink.getLocation() = location and + element = sink.toString() and + value = "" + ) + or + tag = "hasTaintFlow" and + exists(DataFlow::Node src, DataFlow::Node sink, TaintFlowConf conf | + conf.hasFlow(src, sink) and not any(ValueFlowConf c).hasFlow(src, sink) + | + sink.getLocation() = location and + element = sink.toString() and + value = "" + ) + } +} From a21ebbbe8fc33f321e2d389a0c0c52b066d5e513 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 22:47:58 +0200 Subject: [PATCH 1510/1662] add taint step through the `ansi-colors` library --- javascript/change-notes/2021-06-22-colors.md | 4 ++++ .../semmle/javascript/frameworks/Logging.qll | 12 ++++++++++ .../Security/CWE-117/LogInjection.expected | 22 +++++++++++++++++++ .../Security/CWE-117/logInjectionBad.js | 9 ++++++++ 4 files changed, 47 insertions(+) create mode 100644 javascript/change-notes/2021-06-22-colors.md diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md new file mode 100644 index 000000000000..49010ea04de9 --- /dev/null +++ b/javascript/change-notes/2021-06-22-colors.md @@ -0,0 +1,4 @@ +lgtm,codescanning +* The dataflow libraries now model dataflow through console styling libraries. + Affected packages are + [ansi-colors](https://npmjs.com/package/ansi-colors) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index f6c02a54e8c6..3d86e6254c1b 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -201,3 +201,15 @@ private class DebugLoggerCall extends LoggerCall, API::CallNode { override DataFlow::Node getAMessageComponent() { result = getAnArgument() } } + +/** + * A step through the [`ansi-colors`](https://https://npmjs.org/package/ansi-colors) library. + */ +class AnsiColorsStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("ansi-colors").getAMember*().getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 57e56c2cee02..02fceb7ce0f0 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,6 +22,17 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | +| logInjectionBad.js:37:9:37:36 | q | +| logInjectionBad.js:37:13:37:36 | url.par ... , true) | +| logInjectionBad.js:37:23:37:29 | req.url | +| logInjectionBad.js:37:23:37:29 | req.url | +| logInjectionBad.js:38:9:38:35 | username | +| logInjectionBad.js:38:20:38:20 | q | +| logInjectionBad.js:38:20:38:26 | q.query | +| logInjectionBad.js:38:20:38:35 | q.query.username | +| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | +| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | +| logInjectionBad.js:40:46:40:53 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -45,9 +56,20 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | +| logInjectionBad.js:37:9:37:36 | q | logInjectionBad.js:38:20:38:20 | q | +| logInjectionBad.js:37:13:37:36 | url.par ... , true) | logInjectionBad.js:37:9:37:36 | q | +| logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:37:13:37:36 | url.par ... , true) | +| logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:37:13:37:36 | url.par ... , true) | +| logInjectionBad.js:38:9:38:35 | username | logInjectionBad.js:40:46:40:53 | username | +| logInjectionBad.js:38:20:38:20 | q | logInjectionBad.js:38:20:38:26 | q.query | +| logInjectionBad.js:38:20:38:26 | q.query | logInjectionBad.js:38:20:38:35 | q.query.username | +| logInjectionBad.js:38:20:38:35 | q.query.username | logInjectionBad.js:38:9:38:35 | username | +| logInjectionBad.js:40:46:40:53 | username | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | +| logInjectionBad.js:40:46:40:53 | username | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | +| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:37:23:37:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index a82fdfc52efe..9dc394930485 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -29,4 +29,13 @@ const server = http.createServer((req, res) => { } catch (error) { console.error(`[ERROR] Error: "${error}"`); // NOT OK } +}); + +const ansiColors = require('ansi-colors'); + +const server2 = http.createServer((req, res) => { + let q = url.parse(req.url, true); + let username = q.query.username; + + console.info(ansiColors.yellow.underline(username)); // NOT OK }); \ No newline at end of file From 626a653401d3362c2251656cc2f94a28212f27b4 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 22:55:15 +0200 Subject: [PATCH 1511/1662] add taint step through the `colors` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 15 ++++++ .../Security/CWE-117/LogInjection.expected | 51 +++++++++++-------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 48 insertions(+), 23 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 49010ea04de9..300edaf515bb 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -1,4 +1,5 @@ lgtm,codescanning * The dataflow libraries now model dataflow through console styling libraries. Affected packages are - [ansi-colors](https://npmjs.com/package/ansi-colors) + [ansi-colors](https://npmjs.com/package/ansi-colors), + [colors](https://npmjs.com/package/colors) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 3d86e6254c1b..767c1c6265c2 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -213,3 +213,18 @@ class AnsiColorsStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`colors`](https://npmjs.org/package/colors) library. + * This step ignores the `String.prototype` modifying part of the `colors` library. + */ +class ColorsStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | + call = API::moduleImport(["colors", "colors/safe"]).getAMember*().getACall() + | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 02fceb7ce0f0..20305b51f821 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,17 +22,20 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:37:9:37:36 | q | -| logInjectionBad.js:37:13:37:36 | url.par ... , true) | -| logInjectionBad.js:37:23:37:29 | req.url | -| logInjectionBad.js:37:23:37:29 | req.url | -| logInjectionBad.js:38:9:38:35 | username | -| logInjectionBad.js:38:20:38:20 | q | -| logInjectionBad.js:38:20:38:26 | q.query | -| logInjectionBad.js:38:20:38:35 | q.query.username | -| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | -| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | -| logInjectionBad.js:40:46:40:53 | username | +| logInjectionBad.js:38:9:38:36 | q | +| logInjectionBad.js:38:13:38:36 | url.par ... , true) | +| logInjectionBad.js:38:23:38:29 | req.url | +| logInjectionBad.js:38:23:38:29 | req.url | +| logInjectionBad.js:39:9:39:35 | username | +| logInjectionBad.js:39:20:39:20 | q | +| logInjectionBad.js:39:20:39:26 | q.query | +| logInjectionBad.js:39:20:39:35 | q.query.username | +| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | +| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | +| logInjectionBad.js:41:46:41:53 | username | +| logInjectionBad.js:42:18:42:47 | colors. ... ername) | +| logInjectionBad.js:42:18:42:47 | colors. ... ername) | +| logInjectionBad.js:42:39:42:46 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -56,20 +59,24 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:37:9:37:36 | q | logInjectionBad.js:38:20:38:20 | q | -| logInjectionBad.js:37:13:37:36 | url.par ... , true) | logInjectionBad.js:37:9:37:36 | q | -| logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:37:13:37:36 | url.par ... , true) | -| logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:37:13:37:36 | url.par ... , true) | -| logInjectionBad.js:38:9:38:35 | username | logInjectionBad.js:40:46:40:53 | username | -| logInjectionBad.js:38:20:38:20 | q | logInjectionBad.js:38:20:38:26 | q.query | -| logInjectionBad.js:38:20:38:26 | q.query | logInjectionBad.js:38:20:38:35 | q.query.username | -| logInjectionBad.js:38:20:38:35 | q.query.username | logInjectionBad.js:38:9:38:35 | username | -| logInjectionBad.js:40:46:40:53 | username | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | -| logInjectionBad.js:40:46:40:53 | username | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | +| logInjectionBad.js:38:9:38:36 | q | logInjectionBad.js:39:20:39:20 | q | +| logInjectionBad.js:38:13:38:36 | url.par ... , true) | logInjectionBad.js:38:9:38:36 | q | +| logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:38:13:38:36 | url.par ... , true) | +| logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:38:13:38:36 | url.par ... , true) | +| logInjectionBad.js:39:9:39:35 | username | logInjectionBad.js:41:46:41:53 | username | +| logInjectionBad.js:39:9:39:35 | username | logInjectionBad.js:42:39:42:46 | username | +| logInjectionBad.js:39:20:39:20 | q | logInjectionBad.js:39:20:39:26 | q.query | +| logInjectionBad.js:39:20:39:26 | q.query | logInjectionBad.js:39:20:39:35 | q.query.username | +| logInjectionBad.js:39:20:39:35 | q.query.username | logInjectionBad.js:39:9:39:35 | username | +| logInjectionBad.js:41:46:41:53 | username | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | +| logInjectionBad.js:41:46:41:53 | username | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | +| logInjectionBad.js:42:39:42:46 | username | logInjectionBad.js:42:18:42:47 | colors. ... ername) | +| logInjectionBad.js:42:39:42:46 | username | logInjectionBad.js:42:18:42:47 | colors. ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | logInjectionBad.js:37:23:37:29 | req.url | logInjectionBad.js:40:18:40:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:37:23:37:29 | req.url | User-provided value | +| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:38:23:38:29 | req.url | User-provided value | +| logInjectionBad.js:42:18:42:47 | colors. ... ername) | logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:42:18:42:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:38:23:38:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 9dc394930485..838a3d46918a 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -32,10 +32,12 @@ const server = http.createServer((req, res) => { }); const ansiColors = require('ansi-colors'); +const colors = require('colors'); const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); let username = q.query.username; console.info(ansiColors.yellow.underline(username)); // NOT OK + console.info(colors.red.underline(username)); // NOT OK }); \ No newline at end of file From e4427bb34a9f52f56c293907836a4254910010b6 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 22:59:03 +0200 Subject: [PATCH 1512/1662] add taint step through the `wrap-ansi` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 ++++ .../Security/CWE-117/LogInjection.expected | 67 +++++++++++-------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 54 insertions(+), 30 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 300edaf515bb..96402163e27d 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -2,4 +2,5 @@ lgtm,codescanning * The dataflow libraries now model dataflow through console styling libraries. Affected packages are [ansi-colors](https://npmjs.com/package/ansi-colors), - [colors](https://npmjs.com/package/colors) + [colors](https://npmjs.com/package/colors), + [wrap-ansi](https://npmjs.com/package/wrap-ansi) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 767c1c6265c2..b4ca05ed2873 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -228,3 +228,15 @@ class ColorsStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`wrap-ansi`](https://npmjs.org/package/wrap-ansi) library. + */ +class WrapAnsiStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("wrap-ansi").getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 20305b51f821..e5432fb6fa90 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,20 +22,24 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:38:9:38:36 | q | -| logInjectionBad.js:38:13:38:36 | url.par ... , true) | -| logInjectionBad.js:38:23:38:29 | req.url | -| logInjectionBad.js:38:23:38:29 | req.url | -| logInjectionBad.js:39:9:39:35 | username | -| logInjectionBad.js:39:20:39:20 | q | -| logInjectionBad.js:39:20:39:26 | q.query | -| logInjectionBad.js:39:20:39:35 | q.query.username | -| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | -| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | -| logInjectionBad.js:41:46:41:53 | username | -| logInjectionBad.js:42:18:42:47 | colors. ... ername) | -| logInjectionBad.js:42:18:42:47 | colors. ... ername) | -| logInjectionBad.js:42:39:42:46 | username | +| logInjectionBad.js:39:9:39:36 | q | +| logInjectionBad.js:39:13:39:36 | url.par ... , true) | +| logInjectionBad.js:39:23:39:29 | req.url | +| logInjectionBad.js:39:23:39:29 | req.url | +| logInjectionBad.js:40:9:40:35 | username | +| logInjectionBad.js:40:20:40:20 | q | +| logInjectionBad.js:40:20:40:26 | q.query | +| logInjectionBad.js:40:20:40:35 | q.query.username | +| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | +| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | +| logInjectionBad.js:42:46:42:53 | username | +| logInjectionBad.js:43:18:43:47 | colors. ... ername) | +| logInjectionBad.js:43:18:43:47 | colors. ... ername) | +| logInjectionBad.js:43:39:43:46 | username | +| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | +| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | +| logInjectionBad.js:44:27:44:56 | colors. ... ername) | +| logInjectionBad.js:44:48:44:55 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -59,24 +63,29 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:38:9:38:36 | q | logInjectionBad.js:39:20:39:20 | q | -| logInjectionBad.js:38:13:38:36 | url.par ... , true) | logInjectionBad.js:38:9:38:36 | q | -| logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:38:13:38:36 | url.par ... , true) | -| logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:38:13:38:36 | url.par ... , true) | -| logInjectionBad.js:39:9:39:35 | username | logInjectionBad.js:41:46:41:53 | username | -| logInjectionBad.js:39:9:39:35 | username | logInjectionBad.js:42:39:42:46 | username | -| logInjectionBad.js:39:20:39:20 | q | logInjectionBad.js:39:20:39:26 | q.query | -| logInjectionBad.js:39:20:39:26 | q.query | logInjectionBad.js:39:20:39:35 | q.query.username | -| logInjectionBad.js:39:20:39:35 | q.query.username | logInjectionBad.js:39:9:39:35 | username | -| logInjectionBad.js:41:46:41:53 | username | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | -| logInjectionBad.js:41:46:41:53 | username | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | -| logInjectionBad.js:42:39:42:46 | username | logInjectionBad.js:42:18:42:47 | colors. ... ername) | -| logInjectionBad.js:42:39:42:46 | username | logInjectionBad.js:42:18:42:47 | colors. ... ername) | +| logInjectionBad.js:39:9:39:36 | q | logInjectionBad.js:40:20:40:20 | q | +| logInjectionBad.js:39:13:39:36 | url.par ... , true) | logInjectionBad.js:39:9:39:36 | q | +| logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:39:13:39:36 | url.par ... , true) | +| logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:39:13:39:36 | url.par ... , true) | +| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:42:46:42:53 | username | +| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:43:39:43:46 | username | +| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:44:48:44:55 | username | +| logInjectionBad.js:40:20:40:20 | q | logInjectionBad.js:40:20:40:26 | q.query | +| logInjectionBad.js:40:20:40:26 | q.query | logInjectionBad.js:40:20:40:35 | q.query.username | +| logInjectionBad.js:40:20:40:35 | q.query.username | logInjectionBad.js:40:9:40:35 | username | +| logInjectionBad.js:42:46:42:53 | username | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | +| logInjectionBad.js:42:46:42:53 | username | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | +| logInjectionBad.js:43:39:43:46 | username | logInjectionBad.js:43:18:43:47 | colors. ... ername) | +| logInjectionBad.js:43:39:43:46 | username | logInjectionBad.js:43:18:43:47 | colors. ... ername) | +| logInjectionBad.js:44:27:44:56 | colors. ... ername) | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | +| logInjectionBad.js:44:27:44:56 | colors. ... ername) | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | +| logInjectionBad.js:44:48:44:55 | username | logInjectionBad.js:44:27:44:56 | colors. ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:41:18:41:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:38:23:38:29 | req.url | User-provided value | -| logInjectionBad.js:42:18:42:47 | colors. ... ername) | logInjectionBad.js:38:23:38:29 | req.url | logInjectionBad.js:42:18:42:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:38:23:38:29 | req.url | User-provided value | +| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | +| logInjectionBad.js:43:18:43:47 | colors. ... ername) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:43:18:43:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | +| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 838a3d46918a..203206d70ae5 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -33,6 +33,7 @@ const server = http.createServer((req, res) => { const ansiColors = require('ansi-colors'); const colors = require('colors'); +import wrapAnsi from 'wrap-ansi'; const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -40,4 +41,5 @@ const server2 = http.createServer((req, res) => { console.info(ansiColors.yellow.underline(username)); // NOT OK console.info(colors.red.underline(username)); // NOT OK + console.info(wrapAnsi(colors.red.underline(username), 20)); // NOT OK }); \ No newline at end of file From d114cdc6e5ff57d664811f5e8838f62ac4a7522e Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:02:01 +0200 Subject: [PATCH 1513/1662] add taint step through the `colorette` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 +++ .../Security/CWE-117/LogInjection.expected | 87 +++++++++++-------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 65 insertions(+), 39 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 96402163e27d..20d827b3b231 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -3,4 +3,5 @@ lgtm,codescanning Affected packages are [ansi-colors](https://npmjs.com/package/ansi-colors), [colors](https://npmjs.com/package/colors), - [wrap-ansi](https://npmjs.com/package/wrap-ansi) + [wrap-ansi](https://npmjs.com/package/wrap-ansi), + [colorette](https://npmjs.com/package/colorette) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index b4ca05ed2873..f956e0f46355 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -240,3 +240,15 @@ class WrapAnsiStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`colorette`](https://npmjs.org/package/colorette) library. + */ +class ColoretteStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("colorette").getAMember().getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index e5432fb6fa90..47886c614fa3 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,24 +22,29 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:39:9:39:36 | q | -| logInjectionBad.js:39:13:39:36 | url.par ... , true) | -| logInjectionBad.js:39:23:39:29 | req.url | -| logInjectionBad.js:39:23:39:29 | req.url | -| logInjectionBad.js:40:9:40:35 | username | -| logInjectionBad.js:40:20:40:20 | q | -| logInjectionBad.js:40:20:40:26 | q.query | -| logInjectionBad.js:40:20:40:35 | q.query.username | -| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | -| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | -| logInjectionBad.js:42:46:42:53 | username | -| logInjectionBad.js:43:18:43:47 | colors. ... ername) | -| logInjectionBad.js:43:18:43:47 | colors. ... ername) | -| logInjectionBad.js:43:39:43:46 | username | -| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | -| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | -| logInjectionBad.js:44:27:44:56 | colors. ... ername) | -| logInjectionBad.js:44:48:44:55 | username | +| logInjectionBad.js:40:9:40:36 | q | +| logInjectionBad.js:40:13:40:36 | url.par ... , true) | +| logInjectionBad.js:40:23:40:29 | req.url | +| logInjectionBad.js:40:23:40:29 | req.url | +| logInjectionBad.js:41:9:41:35 | username | +| logInjectionBad.js:41:20:41:20 | q | +| logInjectionBad.js:41:20:41:26 | q.query | +| logInjectionBad.js:41:20:41:35 | q.query.username | +| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | +| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | +| logInjectionBad.js:43:46:43:53 | username | +| logInjectionBad.js:44:18:44:47 | colors. ... ername) | +| logInjectionBad.js:44:18:44:47 | colors. ... ername) | +| logInjectionBad.js:44:39:44:46 | username | +| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | +| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | +| logInjectionBad.js:45:27:45:56 | colors. ... ername) | +| logInjectionBad.js:45:48:45:55 | username | +| logInjectionBad.js:46:17:46:47 | underli ... name))) | +| logInjectionBad.js:46:17:46:47 | underli ... name))) | +| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | +| logInjectionBad.js:46:32:46:45 | blue(username) | +| logInjectionBad.js:46:37:46:44 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -63,29 +68,35 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:39:9:39:36 | q | logInjectionBad.js:40:20:40:20 | q | -| logInjectionBad.js:39:13:39:36 | url.par ... , true) | logInjectionBad.js:39:9:39:36 | q | -| logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:39:13:39:36 | url.par ... , true) | -| logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:39:13:39:36 | url.par ... , true) | -| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:42:46:42:53 | username | -| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:43:39:43:46 | username | -| logInjectionBad.js:40:9:40:35 | username | logInjectionBad.js:44:48:44:55 | username | -| logInjectionBad.js:40:20:40:20 | q | logInjectionBad.js:40:20:40:26 | q.query | -| logInjectionBad.js:40:20:40:26 | q.query | logInjectionBad.js:40:20:40:35 | q.query.username | -| logInjectionBad.js:40:20:40:35 | q.query.username | logInjectionBad.js:40:9:40:35 | username | -| logInjectionBad.js:42:46:42:53 | username | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | -| logInjectionBad.js:42:46:42:53 | username | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | -| logInjectionBad.js:43:39:43:46 | username | logInjectionBad.js:43:18:43:47 | colors. ... ername) | -| logInjectionBad.js:43:39:43:46 | username | logInjectionBad.js:43:18:43:47 | colors. ... ername) | -| logInjectionBad.js:44:27:44:56 | colors. ... ername) | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | -| logInjectionBad.js:44:27:44:56 | colors. ... ername) | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | -| logInjectionBad.js:44:48:44:55 | username | logInjectionBad.js:44:27:44:56 | colors. ... ername) | +| logInjectionBad.js:40:9:40:36 | q | logInjectionBad.js:41:20:41:20 | q | +| logInjectionBad.js:40:13:40:36 | url.par ... , true) | logInjectionBad.js:40:9:40:36 | q | +| logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:40:13:40:36 | url.par ... , true) | +| logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:40:13:40:36 | url.par ... , true) | +| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:43:46:43:53 | username | +| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:44:39:44:46 | username | +| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:45:48:45:55 | username | +| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:46:37:46:44 | username | +| logInjectionBad.js:41:20:41:20 | q | logInjectionBad.js:41:20:41:26 | q.query | +| logInjectionBad.js:41:20:41:26 | q.query | logInjectionBad.js:41:20:41:35 | q.query.username | +| logInjectionBad.js:41:20:41:35 | q.query.username | logInjectionBad.js:41:9:41:35 | username | +| logInjectionBad.js:43:46:43:53 | username | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | +| logInjectionBad.js:43:46:43:53 | username | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | +| logInjectionBad.js:44:39:44:46 | username | logInjectionBad.js:44:18:44:47 | colors. ... ername) | +| logInjectionBad.js:44:39:44:46 | username | logInjectionBad.js:44:18:44:47 | colors. ... ername) | +| logInjectionBad.js:45:27:45:56 | colors. ... ername) | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | +| logInjectionBad.js:45:27:45:56 | colors. ... ername) | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | +| logInjectionBad.js:45:48:45:55 | username | logInjectionBad.js:45:27:45:56 | colors. ... ername) | +| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | logInjectionBad.js:46:17:46:47 | underli ... name))) | +| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | logInjectionBad.js:46:17:46:47 | underli ... name))) | +| logInjectionBad.js:46:32:46:45 | blue(username) | logInjectionBad.js:46:27:46:46 | bold(blue(username)) | +| logInjectionBad.js:46:37:46:44 | username | logInjectionBad.js:46:32:46:45 | blue(username) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:42:18:42:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | -| logInjectionBad.js:43:18:43:47 | colors. ... ername) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:43:18:43:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | -| logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | logInjectionBad.js:39:23:39:29 | req.url | logInjectionBad.js:44:18:44:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:39:23:39:29 | req.url | User-provided value | +| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | +| logInjectionBad.js:44:18:44:47 | colors. ... ername) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:44:18:44:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | +| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | +| logInjectionBad.js:46:17:46:47 | underli ... name))) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:46:17:46:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 203206d70ae5..ea2732b268b7 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -34,6 +34,7 @@ const server = http.createServer((req, res) => { const ansiColors = require('ansi-colors'); const colors = require('colors'); import wrapAnsi from 'wrap-ansi'; +import { blue, bold, underline } from "colorette" const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -42,4 +43,5 @@ const server2 = http.createServer((req, res) => { console.info(ansiColors.yellow.underline(username)); // NOT OK console.info(colors.red.underline(username)); // NOT OK console.info(wrapAnsi(colors.red.underline(username), 20)); // NOT OK + console.log(underline(bold(blue(username)))); // NOT OK }); \ No newline at end of file From ec9c885908fadcd7647fa99eb6aa9c8fbf7cd1ef Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:06:50 +0200 Subject: [PATCH 1514/1662] add taint step through the `cli-highlight` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 14 +++ .../Security/CWE-117/LogInjection.expected | 105 ++++++++++-------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 74 insertions(+), 50 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 20d827b3b231..8f5b0e163aef 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -4,4 +4,5 @@ lgtm,codescanning [ansi-colors](https://npmjs.com/package/ansi-colors), [colors](https://npmjs.com/package/colors), [wrap-ansi](https://npmjs.com/package/wrap-ansi), - [colorette](https://npmjs.com/package/colorette) + [colorette](https://npmjs.com/package/colorette), + [cli-highlight](https://npmjs.com/package/cli-highlight) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index f956e0f46355..dd6ade1854f8 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -252,3 +252,17 @@ class ColoretteStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`cli-highlight`](https://npmjs.org/package/cli-highlight) library. + */ +class CliHighlightStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | + call = API::moduleImport("cli-highlight").getMember("highlight").getACall() + | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 47886c614fa3..02fbec6b8124 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,29 +22,32 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:40:9:40:36 | q | -| logInjectionBad.js:40:13:40:36 | url.par ... , true) | -| logInjectionBad.js:40:23:40:29 | req.url | -| logInjectionBad.js:40:23:40:29 | req.url | -| logInjectionBad.js:41:9:41:35 | username | -| logInjectionBad.js:41:20:41:20 | q | -| logInjectionBad.js:41:20:41:26 | q.query | -| logInjectionBad.js:41:20:41:35 | q.query.username | -| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | -| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | -| logInjectionBad.js:43:46:43:53 | username | -| logInjectionBad.js:44:18:44:47 | colors. ... ername) | -| logInjectionBad.js:44:18:44:47 | colors. ... ername) | -| logInjectionBad.js:44:39:44:46 | username | -| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | -| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | -| logInjectionBad.js:45:27:45:56 | colors. ... ername) | -| logInjectionBad.js:45:48:45:55 | username | -| logInjectionBad.js:46:17:46:47 | underli ... name))) | -| logInjectionBad.js:46:17:46:47 | underli ... name))) | -| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | -| logInjectionBad.js:46:32:46:45 | blue(username) | -| logInjectionBad.js:46:37:46:44 | username | +| logInjectionBad.js:41:9:41:36 | q | +| logInjectionBad.js:41:13:41:36 | url.par ... , true) | +| logInjectionBad.js:41:23:41:29 | req.url | +| logInjectionBad.js:41:23:41:29 | req.url | +| logInjectionBad.js:42:9:42:35 | username | +| logInjectionBad.js:42:20:42:20 | q | +| logInjectionBad.js:42:20:42:26 | q.query | +| logInjectionBad.js:42:20:42:35 | q.query.username | +| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | +| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | +| logInjectionBad.js:44:46:44:53 | username | +| logInjectionBad.js:45:18:45:47 | colors. ... ername) | +| logInjectionBad.js:45:18:45:47 | colors. ... ername) | +| logInjectionBad.js:45:39:45:46 | username | +| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | +| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | +| logInjectionBad.js:46:27:46:56 | colors. ... ername) | +| logInjectionBad.js:46:48:46:55 | username | +| logInjectionBad.js:47:17:47:47 | underli ... name))) | +| logInjectionBad.js:47:17:47:47 | underli ... name))) | +| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | +| logInjectionBad.js:47:32:47:45 | blue(username) | +| logInjectionBad.js:47:37:47:44 | username | +| logInjectionBad.js:48:17:48:76 | highlig ... true}) | +| logInjectionBad.js:48:17:48:76 | highlig ... true}) | +| logInjectionBad.js:48:27:48:34 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -68,35 +71,39 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:40:9:40:36 | q | logInjectionBad.js:41:20:41:20 | q | -| logInjectionBad.js:40:13:40:36 | url.par ... , true) | logInjectionBad.js:40:9:40:36 | q | -| logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:40:13:40:36 | url.par ... , true) | -| logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:40:13:40:36 | url.par ... , true) | -| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:43:46:43:53 | username | -| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:44:39:44:46 | username | -| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:45:48:45:55 | username | -| logInjectionBad.js:41:9:41:35 | username | logInjectionBad.js:46:37:46:44 | username | -| logInjectionBad.js:41:20:41:20 | q | logInjectionBad.js:41:20:41:26 | q.query | -| logInjectionBad.js:41:20:41:26 | q.query | logInjectionBad.js:41:20:41:35 | q.query.username | -| logInjectionBad.js:41:20:41:35 | q.query.username | logInjectionBad.js:41:9:41:35 | username | -| logInjectionBad.js:43:46:43:53 | username | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | -| logInjectionBad.js:43:46:43:53 | username | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | -| logInjectionBad.js:44:39:44:46 | username | logInjectionBad.js:44:18:44:47 | colors. ... ername) | -| logInjectionBad.js:44:39:44:46 | username | logInjectionBad.js:44:18:44:47 | colors. ... ername) | -| logInjectionBad.js:45:27:45:56 | colors. ... ername) | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | -| logInjectionBad.js:45:27:45:56 | colors. ... ername) | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | -| logInjectionBad.js:45:48:45:55 | username | logInjectionBad.js:45:27:45:56 | colors. ... ername) | -| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | logInjectionBad.js:46:17:46:47 | underli ... name))) | -| logInjectionBad.js:46:27:46:46 | bold(blue(username)) | logInjectionBad.js:46:17:46:47 | underli ... name))) | -| logInjectionBad.js:46:32:46:45 | blue(username) | logInjectionBad.js:46:27:46:46 | bold(blue(username)) | -| logInjectionBad.js:46:37:46:44 | username | logInjectionBad.js:46:32:46:45 | blue(username) | +| logInjectionBad.js:41:9:41:36 | q | logInjectionBad.js:42:20:42:20 | q | +| logInjectionBad.js:41:13:41:36 | url.par ... , true) | logInjectionBad.js:41:9:41:36 | q | +| logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:41:13:41:36 | url.par ... , true) | +| logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:41:13:41:36 | url.par ... , true) | +| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:44:46:44:53 | username | +| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:45:39:45:46 | username | +| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:46:48:46:55 | username | +| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:47:37:47:44 | username | +| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:48:27:48:34 | username | +| logInjectionBad.js:42:20:42:20 | q | logInjectionBad.js:42:20:42:26 | q.query | +| logInjectionBad.js:42:20:42:26 | q.query | logInjectionBad.js:42:20:42:35 | q.query.username | +| logInjectionBad.js:42:20:42:35 | q.query.username | logInjectionBad.js:42:9:42:35 | username | +| logInjectionBad.js:44:46:44:53 | username | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | +| logInjectionBad.js:44:46:44:53 | username | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | +| logInjectionBad.js:45:39:45:46 | username | logInjectionBad.js:45:18:45:47 | colors. ... ername) | +| logInjectionBad.js:45:39:45:46 | username | logInjectionBad.js:45:18:45:47 | colors. ... ername) | +| logInjectionBad.js:46:27:46:56 | colors. ... ername) | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | +| logInjectionBad.js:46:27:46:56 | colors. ... ername) | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | +| logInjectionBad.js:46:48:46:55 | username | logInjectionBad.js:46:27:46:56 | colors. ... ername) | +| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | logInjectionBad.js:47:17:47:47 | underli ... name))) | +| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | logInjectionBad.js:47:17:47:47 | underli ... name))) | +| logInjectionBad.js:47:32:47:45 | blue(username) | logInjectionBad.js:47:27:47:46 | bold(blue(username)) | +| logInjectionBad.js:47:37:47:44 | username | logInjectionBad.js:47:32:47:45 | blue(username) | +| logInjectionBad.js:48:27:48:34 | username | logInjectionBad.js:48:17:48:76 | highlig ... true}) | +| logInjectionBad.js:48:27:48:34 | username | logInjectionBad.js:48:17:48:76 | highlig ... true}) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:43:18:43:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | -| logInjectionBad.js:44:18:44:47 | colors. ... ername) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:44:18:44:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | -| logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:45:18:45:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | -| logInjectionBad.js:46:17:46:47 | underli ... name))) | logInjectionBad.js:40:23:40:29 | req.url | logInjectionBad.js:46:17:46:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:40:23:40:29 | req.url | User-provided value | +| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | +| logInjectionBad.js:45:18:45:47 | colors. ... ername) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:45:18:45:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | +| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | +| logInjectionBad.js:47:17:47:47 | underli ... name))) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:47:17:47:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | +| logInjectionBad.js:48:17:48:76 | highlig ... true}) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:48:17:48:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index ea2732b268b7..16e04186a253 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -35,6 +35,7 @@ const ansiColors = require('ansi-colors'); const colors = require('colors'); import wrapAnsi from 'wrap-ansi'; import { blue, bold, underline } from "colorette" +const highlight = require('cli-highlight').highlight; const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -44,4 +45,5 @@ const server2 = http.createServer((req, res) => { console.info(colors.red.underline(username)); // NOT OK console.info(wrapAnsi(colors.red.underline(username), 20)); // NOT OK console.log(underline(bold(blue(username)))); // NOT OK + console.log(highlight(username, {language: 'sql', ignoreIllegals: true})); // NOT OK }); \ No newline at end of file From 35c513d38a63fd730d7046ccb5b0f80d8c3072e2 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:10:40 +0200 Subject: [PATCH 1515/1662] add taint step through the `cli-color` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 ++ .../Security/CWE-117/LogInjection.expected | 119 +++++++++--------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 79 insertions(+), 57 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 8f5b0e163aef..9ce662d0388d 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -5,4 +5,5 @@ lgtm,codescanning [colors](https://npmjs.com/package/colors), [wrap-ansi](https://npmjs.com/package/wrap-ansi), [colorette](https://npmjs.com/package/colorette), - [cli-highlight](https://npmjs.com/package/cli-highlight) + [cli-highlight](https://npmjs.com/package/cli-highlight), + [cli-color](https://npmjs.com/package/cli-color) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index dd6ade1854f8..51d7170ae552 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -266,3 +266,15 @@ class CliHighlightStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`cli-color`](https://npmjs.org/package/cli-color) library. + */ +class CliColorStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("cli-color").getAMember*().getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 02fbec6b8124..52cb134650ee 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,32 +22,35 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:41:9:41:36 | q | -| logInjectionBad.js:41:13:41:36 | url.par ... , true) | -| logInjectionBad.js:41:23:41:29 | req.url | -| logInjectionBad.js:41:23:41:29 | req.url | -| logInjectionBad.js:42:9:42:35 | username | -| logInjectionBad.js:42:20:42:20 | q | -| logInjectionBad.js:42:20:42:26 | q.query | -| logInjectionBad.js:42:20:42:35 | q.query.username | -| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | -| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | -| logInjectionBad.js:44:46:44:53 | username | -| logInjectionBad.js:45:18:45:47 | colors. ... ername) | -| logInjectionBad.js:45:18:45:47 | colors. ... ername) | -| logInjectionBad.js:45:39:45:46 | username | -| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | -| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | -| logInjectionBad.js:46:27:46:56 | colors. ... ername) | -| logInjectionBad.js:46:48:46:55 | username | -| logInjectionBad.js:47:17:47:47 | underli ... name))) | -| logInjectionBad.js:47:17:47:47 | underli ... name))) | -| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | -| logInjectionBad.js:47:32:47:45 | blue(username) | -| logInjectionBad.js:47:37:47:44 | username | -| logInjectionBad.js:48:17:48:76 | highlig ... true}) | -| logInjectionBad.js:48:17:48:76 | highlig ... true}) | -| logInjectionBad.js:48:27:48:34 | username | +| logInjectionBad.js:42:9:42:36 | q | +| logInjectionBad.js:42:13:42:36 | url.par ... , true) | +| logInjectionBad.js:42:23:42:29 | req.url | +| logInjectionBad.js:42:23:42:29 | req.url | +| logInjectionBad.js:43:9:43:35 | username | +| logInjectionBad.js:43:20:43:20 | q | +| logInjectionBad.js:43:20:43:26 | q.query | +| logInjectionBad.js:43:20:43:35 | q.query.username | +| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | +| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | +| logInjectionBad.js:45:46:45:53 | username | +| logInjectionBad.js:46:18:46:47 | colors. ... ername) | +| logInjectionBad.js:46:18:46:47 | colors. ... ername) | +| logInjectionBad.js:46:39:46:46 | username | +| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | +| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | +| logInjectionBad.js:47:27:47:56 | colors. ... ername) | +| logInjectionBad.js:47:48:47:55 | username | +| logInjectionBad.js:48:17:48:47 | underli ... name))) | +| logInjectionBad.js:48:17:48:47 | underli ... name))) | +| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | +| logInjectionBad.js:48:32:48:45 | blue(username) | +| logInjectionBad.js:48:37:48:44 | username | +| logInjectionBad.js:49:17:49:76 | highlig ... true}) | +| logInjectionBad.js:49:17:49:76 | highlig ... true}) | +| logInjectionBad.js:49:27:49:34 | username | +| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | +| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | +| logInjectionBad.js:50:43:50:50 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -71,39 +74,43 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:41:9:41:36 | q | logInjectionBad.js:42:20:42:20 | q | -| logInjectionBad.js:41:13:41:36 | url.par ... , true) | logInjectionBad.js:41:9:41:36 | q | -| logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:41:13:41:36 | url.par ... , true) | -| logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:41:13:41:36 | url.par ... , true) | -| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:44:46:44:53 | username | -| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:45:39:45:46 | username | -| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:46:48:46:55 | username | -| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:47:37:47:44 | username | -| logInjectionBad.js:42:9:42:35 | username | logInjectionBad.js:48:27:48:34 | username | -| logInjectionBad.js:42:20:42:20 | q | logInjectionBad.js:42:20:42:26 | q.query | -| logInjectionBad.js:42:20:42:26 | q.query | logInjectionBad.js:42:20:42:35 | q.query.username | -| logInjectionBad.js:42:20:42:35 | q.query.username | logInjectionBad.js:42:9:42:35 | username | -| logInjectionBad.js:44:46:44:53 | username | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | -| logInjectionBad.js:44:46:44:53 | username | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | -| logInjectionBad.js:45:39:45:46 | username | logInjectionBad.js:45:18:45:47 | colors. ... ername) | -| logInjectionBad.js:45:39:45:46 | username | logInjectionBad.js:45:18:45:47 | colors. ... ername) | -| logInjectionBad.js:46:27:46:56 | colors. ... ername) | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | -| logInjectionBad.js:46:27:46:56 | colors. ... ername) | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | -| logInjectionBad.js:46:48:46:55 | username | logInjectionBad.js:46:27:46:56 | colors. ... ername) | -| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | logInjectionBad.js:47:17:47:47 | underli ... name))) | -| logInjectionBad.js:47:27:47:46 | bold(blue(username)) | logInjectionBad.js:47:17:47:47 | underli ... name))) | -| logInjectionBad.js:47:32:47:45 | blue(username) | logInjectionBad.js:47:27:47:46 | bold(blue(username)) | -| logInjectionBad.js:47:37:47:44 | username | logInjectionBad.js:47:32:47:45 | blue(username) | -| logInjectionBad.js:48:27:48:34 | username | logInjectionBad.js:48:17:48:76 | highlig ... true}) | -| logInjectionBad.js:48:27:48:34 | username | logInjectionBad.js:48:17:48:76 | highlig ... true}) | +| logInjectionBad.js:42:9:42:36 | q | logInjectionBad.js:43:20:43:20 | q | +| logInjectionBad.js:42:13:42:36 | url.par ... , true) | logInjectionBad.js:42:9:42:36 | q | +| logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:42:13:42:36 | url.par ... , true) | +| logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:42:13:42:36 | url.par ... , true) | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:45:46:45:53 | username | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:46:39:46:46 | username | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:47:48:47:55 | username | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:48:37:48:44 | username | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:49:27:49:34 | username | +| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:50:43:50:50 | username | +| logInjectionBad.js:43:20:43:20 | q | logInjectionBad.js:43:20:43:26 | q.query | +| logInjectionBad.js:43:20:43:26 | q.query | logInjectionBad.js:43:20:43:35 | q.query.username | +| logInjectionBad.js:43:20:43:35 | q.query.username | logInjectionBad.js:43:9:43:35 | username | +| logInjectionBad.js:45:46:45:53 | username | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | +| logInjectionBad.js:45:46:45:53 | username | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | +| logInjectionBad.js:46:39:46:46 | username | logInjectionBad.js:46:18:46:47 | colors. ... ername) | +| logInjectionBad.js:46:39:46:46 | username | logInjectionBad.js:46:18:46:47 | colors. ... ername) | +| logInjectionBad.js:47:27:47:56 | colors. ... ername) | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | +| logInjectionBad.js:47:27:47:56 | colors. ... ername) | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | +| logInjectionBad.js:47:48:47:55 | username | logInjectionBad.js:47:27:47:56 | colors. ... ername) | +| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | logInjectionBad.js:48:17:48:47 | underli ... name))) | +| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | logInjectionBad.js:48:17:48:47 | underli ... name))) | +| logInjectionBad.js:48:32:48:45 | blue(username) | logInjectionBad.js:48:27:48:46 | bold(blue(username)) | +| logInjectionBad.js:48:37:48:44 | username | logInjectionBad.js:48:32:48:45 | blue(username) | +| logInjectionBad.js:49:27:49:34 | username | logInjectionBad.js:49:17:49:76 | highlig ... true}) | +| logInjectionBad.js:49:27:49:34 | username | logInjectionBad.js:49:17:49:76 | highlig ... true}) | +| logInjectionBad.js:50:43:50:50 | username | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | +| logInjectionBad.js:50:43:50:50 | username | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:44:18:44:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | -| logInjectionBad.js:45:18:45:47 | colors. ... ername) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:45:18:45:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | -| logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:46:18:46:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | -| logInjectionBad.js:47:17:47:47 | underli ... name))) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:47:17:47:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | -| logInjectionBad.js:48:17:48:76 | highlig ... true}) | logInjectionBad.js:41:23:41:29 | req.url | logInjectionBad.js:48:17:48:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:41:23:41:29 | req.url | User-provided value | +| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:46:18:46:47 | colors. ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:46:18:46:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:48:17:48:47 | underli ... name))) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:48:17:48:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:49:17:49:76 | highlig ... true}) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:49:17:49:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 16e04186a253..d76e412d2d85 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -36,6 +36,7 @@ const colors = require('colors'); import wrapAnsi from 'wrap-ansi'; import { blue, bold, underline } from "colorette" const highlight = require('cli-highlight').highlight; +var clc = require("cli-color"); const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -46,4 +47,5 @@ const server2 = http.createServer((req, res) => { console.info(wrapAnsi(colors.red.underline(username), 20)); // NOT OK console.log(underline(bold(blue(username)))); // NOT OK console.log(highlight(username, {language: 'sql', ignoreIllegals: true})); // NOT OK + console.log(clc.red.bgWhite.underline(username)); // NOT OK }); \ No newline at end of file From 6e2b92468fdd669293300d6db860aa01c3768a36 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:14:14 +0200 Subject: [PATCH 1516/1662] add taint step through the `slice-ansi` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 ++ .../Security/CWE-117/LogInjection.expected | 135 ++++++++++-------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 88 insertions(+), 64 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 9ce662d0388d..fc3c62887aa0 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -6,4 +6,5 @@ lgtm,codescanning [wrap-ansi](https://npmjs.com/package/wrap-ansi), [colorette](https://npmjs.com/package/colorette), [cli-highlight](https://npmjs.com/package/cli-highlight), - [cli-color](https://npmjs.com/package/cli-color) + [cli-color](https://npmjs.com/package/cli-color), + [slice-ansi](https://npmjs.com/package/slice-ansi) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 51d7170ae552..678d16b95ad4 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -278,3 +278,15 @@ class CliColorStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`slice-ansi`](https://npmjs.org/package/slice-ansi) library. + */ +class SliceAnsiStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("slice-ansi").getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 52cb134650ee..3c563e8eae0d 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,35 +22,39 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:42:9:42:36 | q | -| logInjectionBad.js:42:13:42:36 | url.par ... , true) | -| logInjectionBad.js:42:23:42:29 | req.url | -| logInjectionBad.js:42:23:42:29 | req.url | -| logInjectionBad.js:43:9:43:35 | username | -| logInjectionBad.js:43:20:43:20 | q | -| logInjectionBad.js:43:20:43:26 | q.query | -| logInjectionBad.js:43:20:43:35 | q.query.username | -| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | -| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | -| logInjectionBad.js:45:46:45:53 | username | -| logInjectionBad.js:46:18:46:47 | colors. ... ername) | -| logInjectionBad.js:46:18:46:47 | colors. ... ername) | -| logInjectionBad.js:46:39:46:46 | username | -| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | -| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | -| logInjectionBad.js:47:27:47:56 | colors. ... ername) | -| logInjectionBad.js:47:48:47:55 | username | -| logInjectionBad.js:48:17:48:47 | underli ... name))) | -| logInjectionBad.js:48:17:48:47 | underli ... name))) | -| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | -| logInjectionBad.js:48:32:48:45 | blue(username) | -| logInjectionBad.js:48:37:48:44 | username | -| logInjectionBad.js:49:17:49:76 | highlig ... true}) | -| logInjectionBad.js:49:17:49:76 | highlig ... true}) | -| logInjectionBad.js:49:27:49:34 | username | -| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | -| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | -| logInjectionBad.js:50:43:50:50 | username | +| logInjectionBad.js:43:9:43:36 | q | +| logInjectionBad.js:43:13:43:36 | url.par ... , true) | +| logInjectionBad.js:43:23:43:29 | req.url | +| logInjectionBad.js:43:23:43:29 | req.url | +| logInjectionBad.js:44:9:44:35 | username | +| logInjectionBad.js:44:20:44:20 | q | +| logInjectionBad.js:44:20:44:26 | q.query | +| logInjectionBad.js:44:20:44:35 | q.query.username | +| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | +| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | +| logInjectionBad.js:46:46:46:53 | username | +| logInjectionBad.js:47:18:47:47 | colors. ... ername) | +| logInjectionBad.js:47:18:47:47 | colors. ... ername) | +| logInjectionBad.js:47:39:47:46 | username | +| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | +| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | +| logInjectionBad.js:48:27:48:56 | colors. ... ername) | +| logInjectionBad.js:48:48:48:55 | username | +| logInjectionBad.js:49:17:49:47 | underli ... name))) | +| logInjectionBad.js:49:17:49:47 | underli ... name))) | +| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | +| logInjectionBad.js:49:32:49:45 | blue(username) | +| logInjectionBad.js:49:37:49:44 | username | +| logInjectionBad.js:50:17:50:76 | highlig ... true}) | +| logInjectionBad.js:50:17:50:76 | highlig ... true}) | +| logInjectionBad.js:50:27:50:34 | username | +| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | +| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | +| logInjectionBad.js:51:43:51:50 | username | +| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:52:27:52:56 | colors. ... ername) | +| logInjectionBad.js:52:48:52:55 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -74,43 +78,48 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:42:9:42:36 | q | logInjectionBad.js:43:20:43:20 | q | -| logInjectionBad.js:42:13:42:36 | url.par ... , true) | logInjectionBad.js:42:9:42:36 | q | -| logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:42:13:42:36 | url.par ... , true) | -| logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:42:13:42:36 | url.par ... , true) | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:45:46:45:53 | username | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:46:39:46:46 | username | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:47:48:47:55 | username | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:48:37:48:44 | username | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:49:27:49:34 | username | -| logInjectionBad.js:43:9:43:35 | username | logInjectionBad.js:50:43:50:50 | username | -| logInjectionBad.js:43:20:43:20 | q | logInjectionBad.js:43:20:43:26 | q.query | -| logInjectionBad.js:43:20:43:26 | q.query | logInjectionBad.js:43:20:43:35 | q.query.username | -| logInjectionBad.js:43:20:43:35 | q.query.username | logInjectionBad.js:43:9:43:35 | username | -| logInjectionBad.js:45:46:45:53 | username | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | -| logInjectionBad.js:45:46:45:53 | username | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | -| logInjectionBad.js:46:39:46:46 | username | logInjectionBad.js:46:18:46:47 | colors. ... ername) | -| logInjectionBad.js:46:39:46:46 | username | logInjectionBad.js:46:18:46:47 | colors. ... ername) | -| logInjectionBad.js:47:27:47:56 | colors. ... ername) | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | -| logInjectionBad.js:47:27:47:56 | colors. ... ername) | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | -| logInjectionBad.js:47:48:47:55 | username | logInjectionBad.js:47:27:47:56 | colors. ... ername) | -| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | logInjectionBad.js:48:17:48:47 | underli ... name))) | -| logInjectionBad.js:48:27:48:46 | bold(blue(username)) | logInjectionBad.js:48:17:48:47 | underli ... name))) | -| logInjectionBad.js:48:32:48:45 | blue(username) | logInjectionBad.js:48:27:48:46 | bold(blue(username)) | -| logInjectionBad.js:48:37:48:44 | username | logInjectionBad.js:48:32:48:45 | blue(username) | -| logInjectionBad.js:49:27:49:34 | username | logInjectionBad.js:49:17:49:76 | highlig ... true}) | -| logInjectionBad.js:49:27:49:34 | username | logInjectionBad.js:49:17:49:76 | highlig ... true}) | -| logInjectionBad.js:50:43:50:50 | username | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | -| logInjectionBad.js:50:43:50:50 | username | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | +| logInjectionBad.js:43:9:43:36 | q | logInjectionBad.js:44:20:44:20 | q | +| logInjectionBad.js:43:13:43:36 | url.par ... , true) | logInjectionBad.js:43:9:43:36 | q | +| logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:43:13:43:36 | url.par ... , true) | +| logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:43:13:43:36 | url.par ... , true) | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:46:46:46:53 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:47:39:47:46 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:48:48:48:55 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:49:37:49:44 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:50:27:50:34 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:51:43:51:50 | username | +| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:52:48:52:55 | username | +| logInjectionBad.js:44:20:44:20 | q | logInjectionBad.js:44:20:44:26 | q.query | +| logInjectionBad.js:44:20:44:26 | q.query | logInjectionBad.js:44:20:44:35 | q.query.username | +| logInjectionBad.js:44:20:44:35 | q.query.username | logInjectionBad.js:44:9:44:35 | username | +| logInjectionBad.js:46:46:46:53 | username | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | +| logInjectionBad.js:46:46:46:53 | username | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | +| logInjectionBad.js:47:39:47:46 | username | logInjectionBad.js:47:18:47:47 | colors. ... ername) | +| logInjectionBad.js:47:39:47:46 | username | logInjectionBad.js:47:18:47:47 | colors. ... ername) | +| logInjectionBad.js:48:27:48:56 | colors. ... ername) | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | +| logInjectionBad.js:48:27:48:56 | colors. ... ername) | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | +| logInjectionBad.js:48:48:48:55 | username | logInjectionBad.js:48:27:48:56 | colors. ... ername) | +| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | logInjectionBad.js:49:17:49:47 | underli ... name))) | +| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | logInjectionBad.js:49:17:49:47 | underli ... name))) | +| logInjectionBad.js:49:32:49:45 | blue(username) | logInjectionBad.js:49:27:49:46 | bold(blue(username)) | +| logInjectionBad.js:49:37:49:44 | username | logInjectionBad.js:49:32:49:45 | blue(username) | +| logInjectionBad.js:50:27:50:34 | username | logInjectionBad.js:50:17:50:76 | highlig ... true}) | +| logInjectionBad.js:50:27:50:34 | username | logInjectionBad.js:50:17:50:76 | highlig ... true}) | +| logInjectionBad.js:51:43:51:50 | username | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | +| logInjectionBad.js:51:43:51:50 | username | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | +| logInjectionBad.js:52:27:52:56 | colors. ... ername) | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:52:27:52:56 | colors. ... ername) | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:52:48:52:55 | username | logInjectionBad.js:52:27:52:56 | colors. ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:45:18:45:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | -| logInjectionBad.js:46:18:46:47 | colors. ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:46:18:46:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | -| logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:47:18:47:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | -| logInjectionBad.js:48:17:48:47 | underli ... name))) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:48:17:48:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | -| logInjectionBad.js:49:17:49:76 | highlig ... true}) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:49:17:49:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | -| logInjectionBad.js:50:17:50:51 | clc.red ... ername) | logInjectionBad.js:42:23:42:29 | req.url | logInjectionBad.js:50:17:50:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:42:23:42:29 | req.url | User-provided value | +| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:47:18:47:47 | colors. ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:47:18:47:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:49:17:49:47 | underli ... name))) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:49:17:49:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:50:17:50:76 | highlig ... true}) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:50:17:50:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index d76e412d2d85..033ba73a0d5a 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -37,6 +37,7 @@ import wrapAnsi from 'wrap-ansi'; import { blue, bold, underline } from "colorette" const highlight = require('cli-highlight').highlight; var clc = require("cli-color"); +import sliceAnsi from 'slice-ansi'; const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -48,4 +49,5 @@ const server2 = http.createServer((req, res) => { console.log(underline(bold(blue(username)))); // NOT OK console.log(highlight(username, {language: 'sql', ignoreIllegals: true})); // NOT OK console.log(clc.red.bgWhite.underline(username)); // NOT OK + console.log(sliceAnsi(colors.red.underline(username), 20, 30)); // NOT OK }); \ No newline at end of file From 0e91269a238e7dd324c1d14baef24856db0cc26f Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Sun, 20 Jun 2021 21:50:06 +0200 Subject: [PATCH 1517/1662] Refactor framework coverage job to download artifacts from python --- .github/workflows/csv-coverage-pr-comment.yml | 26 +------------------ .../compare-files-comment-pr.py | 22 ++++++++++++---- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index 03655c0ff426..c04a810602d3 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -26,37 +26,13 @@ jobs: with: python-version: 3.8 - # download artifacts from the PR job: - - - name: Download artifact - MERGE - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUN_ID: ${{ github.event.workflow_run.id }} - run: | - gh run download --name "csv-framework-coverage-merge" --dir "out_merge" "$RUN_ID" - - - name: Download artifact - BASE - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUN_ID: ${{ github.event.workflow_run.id }} - run: | - gh run download --name "csv-framework-coverage-base" --dir "out_base" "$RUN_ID" - - - name: Download artifact - PR - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RUN_ID: ${{ github.event.workflow_run.id }} - run: | - gh run download --name "pr" --dir "pr" "$RUN_ID" - - name: Check coverage files env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RUN_ID: ${{ github.event.workflow_run.id }} run: | - PR=$(cat "pr/NR") python misc/scripts/library-coverage/compare-files-comment-pr.py \ - out_base out_merge comparison.md "$GITHUB_REPOSITORY" "$PR" "$RUN_ID" + comparison.md "$GITHUB_REPOSITORY" "$RUN_ID" - name: Upload comparison results uses: actions/upload-artifact@v2 with: diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index dec7cd3cf149..c53edc432d42 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -41,7 +41,19 @@ def compare_files_str(file1, file2): return ret -def comment_pr(folder1, folder2, output_file, repo, pr_number, run_id): +def comment_pr(output_file, repo, run_id): + folder1 = "out_base" + folder2 = "out_merge" + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "csv-framework-coverage-base", "--dir", folder1, str(run_id)]) + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "csv-framework-coverage-merge", "--dir", folder2, str(run_id)]) + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "pr", "--dir", "pr", str(run_id)]) + + with open("pr/NR") as file: + pr_number = int(file.read()) + compare_folders(folder1, folder2, output_file) size = os.path.getsize(output_file) if size == 0: @@ -49,7 +61,7 @@ def comment_pr(folder1, folder2, output_file, repo, pr_number, run_id): return comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ - "The generated reports are available in the [artifacts of this workflow run](https://github.com/" + repo + "/actions/runs/" + run_id + "). " + \ + "The generated reports are available in the [artifacts of this workflow run](https://github.com/" + repo + "/actions/runs/" + str(run_id) + "). " + \ "The differences will be picked up by the nightly job after the PR gets merged. " if size < 2000: @@ -62,7 +74,7 @@ def comment_pr(folder1, folder2, output_file, repo, pr_number, run_id): comment += "The differences can be found in the " + \ output_file + " artifact of this job." - post_comment(comment, repo, pr_number) + # post_comment(comment, repo, pr_number) def post_comment(comment, repo, pr_number): @@ -125,5 +137,5 @@ def compare_folders(folder1, folder2, output_file): out.write(return_md) -comment_pr(sys.argv[1], sys.argv[2], sys.argv[3], - sys.argv[4], sys.argv[5], sys.argv[6]) +# comment_pr(sys.argv[1], sys.argv[2], sys.argv[3]) +comment_pr("x.md", "dsp-testing/codeql-csv-coverage-pr-commenter", 938931471) From 801007357f4d03bca3a4429fa55b137b9b3dbb1e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Sun, 20 Jun 2021 23:43:15 +0200 Subject: [PATCH 1518/1662] Only post comment with framework coverage change if it changed or wasn't done before --- .../compare-files-comment-pr.py | 128 ++++++++++++++++-- .../library-coverage/generate-timeseries.py | 3 +- misc/scripts/library-coverage/utils.py | 7 +- 3 files changed, 121 insertions(+), 17 deletions(-) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index c53edc432d42..176d5efd19cc 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -3,11 +3,16 @@ import settings import difflib import utils +import shutil +import json +import filecmp """ This script compares the generated CSV coverage files with the ones in the codebase. """ +artifacts_worflow_name = "Check framework coverage changes" + def check_file_exists(file): if not os.path.exists(file): @@ -41,20 +46,27 @@ def compare_files_str(file1, file2): return ret -def comment_pr(output_file, repo, run_id): +def write_diff_for_run(output_file, repo, run_id): folder1 = "out_base" folder2 = "out_merge" - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "csv-framework-coverage-base", "--dir", folder1, str(run_id)]) - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "csv-framework-coverage-merge", "--dir", folder2, str(run_id)]) - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "pr", "--dir", "pr", str(run_id)]) + try: + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "csv-framework-coverage-base", "--dir", folder1, str(run_id)]) + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "csv-framework-coverage-merge", "--dir", folder2, str(run_id)]) + utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", + "pr", "--dir", "pr", str(run_id)]) + + compare_folders(folder1, folder2, output_file) + finally: + if os.path.isdir(folder1): + shutil.rmtree(folder1) - with open("pr/NR") as file: - pr_number = int(file.read()) + if os.path.isdir(folder2): + shutil.rmtree(folder2) - compare_folders(folder1, folder2, output_file) + +def get_comment_text(output_file, repo, run_id): size = os.path.getsize(output_file) if size == 0: print("No difference in the coverage reports") @@ -74,16 +86,60 @@ def comment_pr(output_file, repo, run_id): comment += "The differences can be found in the " + \ output_file + " artifact of this job." - # post_comment(comment, repo, pr_number) + return comment + + +def comment_pr(output_file, repo, run_id): + """ + Generates coverage diff produced by the changes in the current PR. If the diff is not empty, then post it as a comment. + If a workflow run produces the same diff as the directly preceeding one, then don't post a comment. + """ + + # Store diff for current run + write_diff_for_run(output_file, repo, run_id) + + try: + with open("pr/NR") as file: + pr_number = int(file.read()) + finally: + if os.path.isdir("pr"): + shutil.rmtree("pr") + + # Try storing diff for previous run: + prev_output_file = "prev_" + output_file + try: + prev_run_id = get_previous_run_id(repo, run_id, pr_number) + write_diff_for_run(prev_output_file, repo, prev_run_id) + + if filecmp.cmp(output_file, prev_output_file, shallow=False): + print("Previous run " + str(prev_run_id) + + " resulted in the same diff, so not commenting again.") + return + else: + print("Diff of previous run " + + str(prev_run_id) + " differs, commenting.") + except Exception: + # this is not mecessarily a failure, it can also mean that there was no previous run yet. + print("Couldn't generate diff for previous run:", sys.exc_info()[1]) + finally: + if os.path.isfile(prev_output_file): + os.remove(prev_output_file) + + comment = get_comment_text(output_file, repo, run_id) + post_comment(comment, repo, pr_number) def post_comment(comment, repo, pr_number): print("Posting comment to PR #" + str(pr_number)) - utils.subprocess_run(["gh", "pr", "comment", pr_number, + utils.subprocess_run(["gh", "pr", "comment", str(pr_number), "--repo", repo, "--body", comment]) def compare_folders(folder1, folder2, output_file): + """ + Compares the contents of two folders and writes the differences to the output file. + """ + languages = ['java'] return_md = "" @@ -137,5 +193,49 @@ def compare_folders(folder1, folder2, output_file): out.write(return_md) -# comment_pr(sys.argv[1], sys.argv[2], sys.argv[3]) -comment_pr("x.md", "dsp-testing/codeql-csv-coverage-pr-commenter", 938931471) +def get_previous_run_id(repo, run_id, pr_number): + """ + Gets the previous run id for a given workflow run, considering that the previous workflow run needs to come from the same PR. + """ + + # Get branch and repo from run: + this_run = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs/" + str( + run_id), "--jq", "{ head_branch: .head_branch, head_repository: .head_repository.full_name }"]) + + this_run = json.loads(this_run) + pr_branch = this_run["head_branch"] + pr_repo = this_run["head_repository"] + + # Get all previous runs that match branch, repo and workflow name: + ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_worflow_name + "\"", "--jq", + "[.workflow_runs.[] | select(.head_branch==\"" + pr_branch + "\" and .head_repository.full_name==\"" + pr_repo + "\") | { created_at: .created_at, run_id: .id}] | sort_by(.created_at) | reverse | [.[].run_id]"]) + + ids = json.loads(ids) + if ids[0] != run_id: + raise Exception("Expected to find " + str(run_id) + + " in the list of matching runs.") + + for previous_run_id in ids[1:]: + utils.subprocess_run(["gh", "run", "download", "--repo", repo, + "--name", "pr", "--dir", "prev_run_pr", str(previous_run_id)]) + + try: + with open("prev_run_pr/NR") as file: + prev_pr_number = int(file.read()) + print("PR number: " + str(prev_pr_number)) + finally: + if os.path.isdir("prev_run_pr"): + shutil.rmtree("prev_run_pr") + + # the previous run needs to be coming from the same PR: + if pr_number == prev_pr_number: + return previous_run_id + + raise Exception("Couldn't find previous run.") + + +output_file = sys.argv[1] +repo = sys.argv[2] +run_id = sys.argv[3] + +comment_pr(output_file, repo, run_id) diff --git a/misc/scripts/library-coverage/generate-timeseries.py b/misc/scripts/library-coverage/generate-timeseries.py index a05b0ae298c5..02f0f838b505 100644 --- a/misc/scripts/library-coverage/generate-timeseries.py +++ b/misc/scripts/library-coverage/generate-timeseries.py @@ -1,4 +1,3 @@ -import subprocess import csv import sys import os @@ -20,7 +19,7 @@ class Git: def get_output(arr): - r = subprocess.check_output(arr, text=True, env=os.environ.copy()) + r = utils.subprocess_check_output(arr) return r.strip("\n'") def get_date(sha): diff --git a/misc/scripts/library-coverage/utils.py b/misc/scripts/library-coverage/utils.py index 857651855577..b2e4c5a366ff 100644 --- a/misc/scripts/library-coverage/utils.py +++ b/misc/scripts/library-coverage/utils.py @@ -1,7 +1,6 @@ import subprocess import os import csv -import sys import shlex @@ -11,6 +10,12 @@ def subprocess_run(cmd): return subprocess.run(cmd, capture_output=True, text=True, env=os.environ.copy(), check=True) +def subprocess_check_output(cmd): + """Runs a command through subprocess.check_output and returns its output""" + print(shlex.join(cmd)) + return subprocess.check_output(cmd, text=True, env=os.environ.copy()) + + def create_empty_database(lang, extension, database): """Creates an empty database for the given language.""" subprocess_run(["codeql", "database", "init", "--language=" + lang, From d28fd363f934ac7dbba810a5cb0a08e69c8f39f5 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 21 Jun 2021 09:14:59 +0200 Subject: [PATCH 1519/1662] Fix string vs int ID comparison --- misc/scripts/library-coverage/compare-files-comment-pr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index 176d5efd19cc..720eae279d26 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -211,7 +211,7 @@ def get_previous_run_id(repo, run_id, pr_number): "[.workflow_runs.[] | select(.head_branch==\"" + pr_branch + "\" and .head_repository.full_name==\"" + pr_repo + "\") | { created_at: .created_at, run_id: .id}] | sort_by(.created_at) | reverse | [.[].run_id]"]) ids = json.loads(ids) - if ids[0] != run_id: + if ids[0] != int(run_id): raise Exception("Expected to find " + str(run_id) + " in the list of matching runs.") From 12e4ad2640fe3b7525a1519500118d4e3e298b30 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 09:33:20 +0200 Subject: [PATCH 1520/1662] Fix code quality issues --- .../compare-files-comment-pr.py | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index 720eae279d26..924477b413d8 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -11,7 +11,7 @@ This script compares the generated CSV coverage files with the ones in the codebase. """ -artifacts_worflow_name = "Check framework coverage changes" +artifacts_workflow_name = "Check framework coverage changes" def check_file_exists(file): @@ -46,24 +46,24 @@ def compare_files_str(file1, file2): return ret +def download_artifact(repo, name, dir, run_id): + utils.subprocess_run(["gh", "run", "download", "--repo", + repo, "--name", name, "--dir", dir, str(run_id)]) + + def write_diff_for_run(output_file, repo, run_id): folder1 = "out_base" folder2 = "out_merge" try: - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "csv-framework-coverage-base", "--dir", folder1, str(run_id)]) - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "csv-framework-coverage-merge", "--dir", folder2, str(run_id)]) - utils.subprocess_run(["gh", "run", "download", "--repo", repo, "--name", - "pr", "--dir", "pr", str(run_id)]) + download_artifact(repo, "csv-framework-coverage-base", folder1, run_id) + download_artifact( + repo, "csv-framework-coverage-merge", folder2, run_id) compare_folders(folder1, folder2, output_file) finally: - if os.path.isdir(folder1): - shutil.rmtree(folder1) - - if os.path.isdir(folder2): - shutil.rmtree(folder2) + for folder in [folder1, folder2]: + if os.path.isdir(folder): + shutil.rmtree(folder) def get_comment_text(output_file, repo, run_id): @@ -98,6 +98,8 @@ def comment_pr(output_file, repo, run_id): # Store diff for current run write_diff_for_run(output_file, repo, run_id) + download_artifact(repo, "pr", "pr", run_id) + try: with open("pr/NR") as file: pr_number = int(file.read()) @@ -207,7 +209,7 @@ def get_previous_run_id(repo, run_id, pr_number): pr_repo = this_run["head_repository"] # Get all previous runs that match branch, repo and workflow name: - ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_worflow_name + "\"", "--jq", + ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_workflow_name + "\"", "--jq", "[.workflow_runs.[] | select(.head_branch==\"" + pr_branch + "\" and .head_repository.full_name==\"" + pr_repo + "\") | { created_at: .created_at, run_id: .id}] | sort_by(.created_at) | reverse | [.[].run_id]"]) ids = json.loads(ids) @@ -216,8 +218,7 @@ def get_previous_run_id(repo, run_id, pr_number): " in the list of matching runs.") for previous_run_id in ids[1:]: - utils.subprocess_run(["gh", "run", "download", "--repo", repo, - "--name", "pr", "--dir", "prev_run_pr", str(previous_run_id)]) + download_artifact(repo, "pr", "prev_run_pr", previous_run_id) try: with open("prev_run_pr/NR") as file: From d6361d8500afa9d0cc999b55120f705f27f416a8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 10:01:15 +0200 Subject: [PATCH 1521/1662] Use string interpolation --- .../compare-files-comment-pr.py | 66 ++++++++----------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py index 924477b413d8..f56ffbfeeb81 100644 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ b/misc/scripts/library-coverage/compare-files-comment-pr.py @@ -16,7 +16,7 @@ def check_file_exists(file): if not os.path.exists(file): - print("Expected file '" + file + "' doesn't exist.", file=sys.stderr) + print(f"Expected file '{file}' doesn't exist.", file=sys.stderr) return False return True @@ -73,7 +73,7 @@ def get_comment_text(output_file, repo, run_id): return comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ - "The generated reports are available in the [artifacts of this workflow run](https://github.com/" + repo + "/actions/runs/" + str(run_id) + "). " + \ + f"The generated reports are available in the [artifacts of this workflow run](https://github.com/{repo}/actions/runs/{run_id}). " + \ "The differences will be picked up by the nightly job after the PR gets merged. " if size < 2000: @@ -83,8 +83,7 @@ def get_comment_text(output_file, repo, run_id): comment += file.read() else: print("There's a large change in the CSV framework coverage reports") - comment += "The differences can be found in the " + \ - output_file + " artifact of this job." + comment += f"The differences can be found in the {output_file} artifact of this job." return comment @@ -114,12 +113,11 @@ def comment_pr(output_file, repo, run_id): write_diff_for_run(prev_output_file, repo, prev_run_id) if filecmp.cmp(output_file, prev_output_file, shallow=False): - print("Previous run " + str(prev_run_id) + - " resulted in the same diff, so not commenting again.") + print( + f"Previous run {prev_run_id} resulted in the same diff, so not commenting again.") return else: - print("Diff of previous run " + - str(prev_run_id) + " differs, commenting.") + print(f"Diff of previous run {prev_run_id} differs, commenting.") except Exception: # this is not mecessarily a failure, it can also mean that there was no previous run yet. print("Couldn't generate diff for previous run:", sys.exc_info()[1]) @@ -132,7 +130,7 @@ def comment_pr(output_file, repo, run_id): def post_comment(comment, repo, pr_number): - print("Posting comment to PR #" + str(pr_number)) + print(f"Posting comment to PR #{pr_number}") utils.subprocess_run(["gh", "pr", "comment", str(pr_number), "--repo", repo, "--body", comment]) @@ -155,41 +153,33 @@ def compare_folders(folder1, folder2, output_file): language=lang) # check if files exist in both folder1 and folder 2 - if not check_file_exists(folder1 + "/" + generated_output_rst): - expected_files += "- " + generated_output_rst + \ - " doesn't exist in folder " + folder1 + "\n" - if not check_file_exists(folder2 + "/" + generated_output_rst): - expected_files += "- " + generated_output_rst + \ - " doesn't exist in folder " + folder2 + "\n" - if not check_file_exists(folder1 + "/" + generated_output_csv): - expected_files += "- " + generated_output_csv + \ - " doesn't exist in folder " + folder1 + "\n" - if not check_file_exists(folder2 + "/" + generated_output_csv): - expected_files += "- " + generated_output_csv + \ - " doesn't exist in folder " + folder2 + "\n" + if not check_file_exists(f"{folder1}/{generated_output_rst}"): + expected_files += f"- {generated_output_rst} doesn't exist in folder {folder1}\n" + if not check_file_exists(f"{folder2}/{generated_output_rst}"): + expected_files += f"- {generated_output_rst} doesn't exist in folder {folder2}\n" + if not check_file_exists(f"{folder1}/{generated_output_csv}"): + expected_files += f"- {generated_output_csv} doesn't exist in folder {folder1}\n" + if not check_file_exists(f"{folder2}/{generated_output_csv}"): + expected_files += f"- {generated_output_csv} doesn't exist in folder {folder2}\n" if expected_files != "": print("Expected files are missing", file=sys.stderr) - return_md += "\n### " + lang + "\n\n#### Expected files are missing for " + \ - lang + "\n" + expected_files + "\n" + return_md += f"\n### {lang}\n\n#### Expected files are missing for {lang}\n{expected_files}\n" continue # compare contents of files cmp1 = compare_files_str( - folder1 + "/" + generated_output_rst, folder2 + "/" + generated_output_rst) + f"{folder1}/{generated_output_rst}", f"{folder2}/{generated_output_rst}") cmp2 = compare_files_str( - folder1 + "/" + generated_output_csv, folder2 + "/" + generated_output_csv) + f"{folder1}/{generated_output_csv}", f"{folder2}/{generated_output_csv}") if cmp1 != "" or cmp2 != "": print("Generated file contents are not matching", file=sys.stderr) - return_md += "\n### " + lang + "\n\n#### Generated file changes for " + \ - lang + "\n\n" + return_md += f"\n### {lang}\n\n#### Generated file changes for {lang}\n\n" if cmp1 != "": - return_md += "- Changes to " + generated_output_rst + \ - ":\n```diff\n" + cmp1 + "```\n\n" + return_md += f"- Changes to {generated_output_rst}:\n```diff\n{cmp1}```\n\n" if cmp2 != "": - return_md += "- Changes to " + generated_output_csv + \ - ":\n```diff\n" + cmp2 + "```\n\n" + return_md += f"- Changes to {generated_output_csv}:\n```diff\n{cmp2}```\n\n" with open(output_file, 'w', newline='') as out: out.write(return_md) @@ -201,21 +191,21 @@ def get_previous_run_id(repo, run_id, pr_number): """ # Get branch and repo from run: - this_run = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs/" + str( - run_id), "--jq", "{ head_branch: .head_branch, head_repository: .head_repository.full_name }"]) + this_run = utils.subprocess_check_output( + ["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs/{run_id}", "--jq", "{ head_branch: .head_branch, head_repository: .head_repository.full_name }"]) this_run = json.loads(this_run) pr_branch = this_run["head_branch"] pr_repo = this_run["head_repository"] # Get all previous runs that match branch, repo and workflow name: - ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", "repos/" + repo + "/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_workflow_name + "\"", "--jq", - "[.workflow_runs.[] | select(.head_branch==\"" + pr_branch + "\" and .head_repository.full_name==\"" + pr_repo + "\") | { created_at: .created_at, run_id: .id}] | sort_by(.created_at) | reverse | [.[].run_id]"]) + ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_workflow_name + "\"", "--jq", + f"[.workflow_runs.[] | select(.head_branch==\"{pr_branch}\" and .head_repository.full_name==\"{pr_repo}\") | {{ created_at: .created_at, run_id: .id}}] | sort_by(.created_at) | reverse | [.[].run_id]"]) ids = json.loads(ids) if ids[0] != int(run_id): - raise Exception("Expected to find " + str(run_id) + - " in the list of matching runs.") + raise Exception( + f"Expected to find {run_id} in the list of matching runs.") for previous_run_id in ids[1:]: download_artifact(repo, "pr", "prev_run_pr", previous_run_id) @@ -223,7 +213,7 @@ def get_previous_run_id(repo, run_id, pr_number): try: with open("prev_run_pr/NR") as file: prev_pr_number = int(file.read()) - print("PR number: " + str(prev_pr_number)) + print(f"PR number: {prev_pr_number}") finally: if os.path.isdir("prev_run_pr"): shutil.rmtree("prev_run_pr") From a165cde8088787a24c7667dd1ad76d8476c9b418 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 10:45:49 +0200 Subject: [PATCH 1522/1662] Compute framework coverage diff in artifacts job --- .../workflows/csv-coverage-pr-artifacts.yml | 14 +- .github/workflows/csv-coverage-pr-comment.yml | 9 +- misc/scripts/library-coverage/comment-pr.py | 130 ++++++++++ .../compare-files-comment-pr.py | 232 ------------------ .../library-coverage/compare-folders.py | 9 + misc/scripts/library-coverage/compare.py | 69 ++++++ misc/scripts/library-coverage/utils.py | 13 + 7 files changed, 234 insertions(+), 242 deletions(-) create mode 100644 misc/scripts/library-coverage/comment-pr.py delete mode 100644 misc/scripts/library-coverage/compare-files-comment-pr.py create mode 100644 misc/scripts/library-coverage/compare-folders.py create mode 100644 misc/scripts/library-coverage/compare.py diff --git a/.github/workflows/csv-coverage-pr-artifacts.yml b/.github/workflows/csv-coverage-pr-artifacts.yml index b2f9b7b467d1..201eea5c0734 100644 --- a/.github/workflows/csv-coverage-pr-artifacts.yml +++ b/.github/workflows/csv-coverage-pr-artifacts.yml @@ -49,19 +49,23 @@ jobs: gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" - name: Unzip CodeQL CLI run: unzip -d codeql-cli codeql-linux64.zip - - name: Generate CSV files on merge and base of the PR + - name: Generate CSV files on merge commit of the PR run: | echo "Running generator on merge" PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge mkdir out_merge cp framework-coverage-*.csv out_merge/ cp framework-coverage-*.rst out_merge/ - + - name: Generate CSV files on base commit of the PR + run: | echo "Running generator on base" PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base mkdir out_base cp framework-coverage-*.csv out_base/ cp framework-coverage-*.rst out_base/ + - name: Generate diff of coverage reports + run: | + python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md - name: Upload CSV package list uses: actions/upload-artifact@v2 with: @@ -76,6 +80,12 @@ jobs: path: | out_base/framework-coverage-*.csv out_base/framework-coverage-*.rst + - name: Upload comparison results + uses: actions/upload-artifact@v2 + with: + name: comparison + path: | + comparison.md - name: Save PR number run: | mkdir -p pr diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index c04a810602d3..a93603ae58c4 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -31,11 +31,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RUN_ID: ${{ github.event.workflow_run.id }} run: | - python misc/scripts/library-coverage/compare-files-comment-pr.py \ - comparison.md "$GITHUB_REPOSITORY" "$RUN_ID" - - name: Upload comparison results - uses: actions/upload-artifact@v2 - with: - name: comparison - path: | - comparison.md + python misc/scripts/library-coverage/comment-pr.py "$GITHUB_REPOSITORY" "$RUN_ID" diff --git a/misc/scripts/library-coverage/comment-pr.py b/misc/scripts/library-coverage/comment-pr.py new file mode 100644 index 000000000000..612ff8b9fe5c --- /dev/null +++ b/misc/scripts/library-coverage/comment-pr.py @@ -0,0 +1,130 @@ +import sys +import os +import utils +import shutil +import json +import filecmp + +""" +This script compares the generated CSV coverage files with the ones in the codebase. +""" + +artifacts_workflow_name = "Check framework coverage changes" +comparison_artifact_name = "comparison" +comparison_artifact_file_name = "comparison.md" + + +def get_comment_text(output_file, repo, run_id): + size = os.path.getsize(output_file) + if size == 0: + print("No difference in the coverage reports") + return + + comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ + f"The generated reports are available in the [artifacts of this workflow run](https://github.com/{repo}/actions/runs/{run_id}). " + \ + "The differences will be picked up by the nightly job after the PR gets merged. " + + if size < 2000: + print("There's a small change in the CSV framework coverage reports") + comment += "The following differences were found: \n\n" + with open(output_file, 'r') as file: + comment += file.read() + else: + print("There's a large change in the CSV framework coverage reports") + comment += f"The differences can be found in the {comparison_artifact_name} artifact of this workflow run](https://github.com/{repo}/actions/runs/{run_id})." + + return comment + + +def comment_pr(repo, run_id): + """ + Generates coverage diff produced by the changes in the current PR. If the diff is not empty, then post it as a comment. + If a workflow run produces the same diff as the directly preceeding one, then don't post a comment. + """ + + # Store diff for current run + current_diff_folder = "current_diff" + utils.download_artifact(repo, comparison_artifact_name, + current_diff_folder, run_id) + + utils.download_artifact(repo, "pr", "pr", run_id) + + try: + with open("pr/NR") as file: + pr_number = int(file.read()) + finally: + if os.path.isdir("pr"): + shutil.rmtree("pr") + + # Try storing diff for previous run: + try: + prev_run_id = get_previous_run_id(repo, run_id, pr_number) + prev_diff_folder = "prev_diff" + utils.download_artifact(repo, comparison_artifact_name, + prev_diff_folder, prev_run_id) + + if filecmp.cmp(f"{current_diff_folder}/{comparison_artifact_file_name}", f"{prev_diff_folder}/{comparison_artifact_file_name}", shallow=False): + print( + f"Previous run {prev_run_id} resulted in the same diff, so not commenting again.") + return + else: + print(f"Diff of previous run {prev_run_id} differs, commenting.") + except Exception: + # this is not mecessarily a failure, it can also mean that there was no previous run yet. + print("Couldn't generate diff for previous run:", sys.exc_info()[1]) + + comment = get_comment_text( + f"{current_diff_folder}/{comparison_artifact_file_name}", repo, run_id) + post_comment(comment, repo, pr_number) + + +def post_comment(comment, repo, pr_number): + print(f"Posting comment to PR #{pr_number}") + utils.subprocess_run(["gh", "pr", "comment", str(pr_number), + "--repo", repo, "--body", comment]) + + +def get_previous_run_id(repo, run_id, pr_number): + """ + Gets the previous run id for a given workflow run, considering that the previous workflow run needs to come from the same PR. + """ + + # Get branch and repo from run: + this_run = utils.subprocess_check_output( + ["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs/{run_id}", "--jq", "{ head_branch: .head_branch, head_repository: .head_repository.full_name }"]) + + this_run = json.loads(this_run) + pr_branch = this_run["head_branch"] + pr_repo = this_run["head_repository"] + + # Get all previous runs that match branch, repo and workflow name: + ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_workflow_name + "\"", "--jq", + f"[.workflow_runs.[] | select(.head_branch==\"{pr_branch}\" and .head_repository.full_name==\"{pr_repo}\") | {{ created_at: .created_at, run_id: .id}}] | sort_by(.created_at) | reverse | [.[].run_id]"]) + + ids = json.loads(ids) + if ids[0] != int(run_id): + raise Exception( + f"Expected to find {run_id} in the list of matching runs.") + + for previous_run_id in ids[1:]: + utils.download_artifact(repo, "pr", "prev_run_pr", previous_run_id) + + try: + with open("prev_run_pr/NR") as file: + prev_pr_number = int(file.read()) + print(f"PR number: {prev_pr_number}") + finally: + if os.path.isdir("prev_run_pr"): + shutil.rmtree("prev_run_pr") + + # the previous run needs to be coming from the same PR: + if pr_number == prev_pr_number: + return previous_run_id + + raise Exception("Couldn't find previous run.") + + +repo = sys.argv[1] +run_id = sys.argv[2] + +comment_pr(repo, run_id) diff --git a/misc/scripts/library-coverage/compare-files-comment-pr.py b/misc/scripts/library-coverage/compare-files-comment-pr.py deleted file mode 100644 index f56ffbfeeb81..000000000000 --- a/misc/scripts/library-coverage/compare-files-comment-pr.py +++ /dev/null @@ -1,232 +0,0 @@ -import sys -import os -import settings -import difflib -import utils -import shutil -import json -import filecmp - -""" -This script compares the generated CSV coverage files with the ones in the codebase. -""" - -artifacts_workflow_name = "Check framework coverage changes" - - -def check_file_exists(file): - if not os.path.exists(file): - print(f"Expected file '{file}' doesn't exist.", file=sys.stderr) - return False - return True - - -def ignore_line_ending(ch): - return difflib.IS_CHARACTER_JUNK(ch, ws=" \r\n") - - -def compare_files(file1, file2): - messages = compare_files_str(file1, file2) - if messages == "": - return True - - print(messages, end="", file=sys.stderr) - - return False - - -def compare_files_str(file1, file2): - diff = difflib.ndiff(open(file1).readlines(), - open(file2).readlines(), None, ignore_line_ending) - ret = "" - for line in diff: - if line.startswith("+") or line.startswith("-"): - ret += line - - return ret - - -def download_artifact(repo, name, dir, run_id): - utils.subprocess_run(["gh", "run", "download", "--repo", - repo, "--name", name, "--dir", dir, str(run_id)]) - - -def write_diff_for_run(output_file, repo, run_id): - folder1 = "out_base" - folder2 = "out_merge" - try: - download_artifact(repo, "csv-framework-coverage-base", folder1, run_id) - download_artifact( - repo, "csv-framework-coverage-merge", folder2, run_id) - - compare_folders(folder1, folder2, output_file) - finally: - for folder in [folder1, folder2]: - if os.path.isdir(folder): - shutil.rmtree(folder) - - -def get_comment_text(output_file, repo, run_id): - size = os.path.getsize(output_file) - if size == 0: - print("No difference in the coverage reports") - return - - comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ - f"The generated reports are available in the [artifacts of this workflow run](https://github.com/{repo}/actions/runs/{run_id}). " + \ - "The differences will be picked up by the nightly job after the PR gets merged. " - - if size < 2000: - print("There's a small change in the CSV framework coverage reports") - comment += "The following differences were found: \n\n" - with open(output_file, 'r') as file: - comment += file.read() - else: - print("There's a large change in the CSV framework coverage reports") - comment += f"The differences can be found in the {output_file} artifact of this job." - - return comment - - -def comment_pr(output_file, repo, run_id): - """ - Generates coverage diff produced by the changes in the current PR. If the diff is not empty, then post it as a comment. - If a workflow run produces the same diff as the directly preceeding one, then don't post a comment. - """ - - # Store diff for current run - write_diff_for_run(output_file, repo, run_id) - - download_artifact(repo, "pr", "pr", run_id) - - try: - with open("pr/NR") as file: - pr_number = int(file.read()) - finally: - if os.path.isdir("pr"): - shutil.rmtree("pr") - - # Try storing diff for previous run: - prev_output_file = "prev_" + output_file - try: - prev_run_id = get_previous_run_id(repo, run_id, pr_number) - write_diff_for_run(prev_output_file, repo, prev_run_id) - - if filecmp.cmp(output_file, prev_output_file, shallow=False): - print( - f"Previous run {prev_run_id} resulted in the same diff, so not commenting again.") - return - else: - print(f"Diff of previous run {prev_run_id} differs, commenting.") - except Exception: - # this is not mecessarily a failure, it can also mean that there was no previous run yet. - print("Couldn't generate diff for previous run:", sys.exc_info()[1]) - finally: - if os.path.isfile(prev_output_file): - os.remove(prev_output_file) - - comment = get_comment_text(output_file, repo, run_id) - post_comment(comment, repo, pr_number) - - -def post_comment(comment, repo, pr_number): - print(f"Posting comment to PR #{pr_number}") - utils.subprocess_run(["gh", "pr", "comment", str(pr_number), - "--repo", repo, "--body", comment]) - - -def compare_folders(folder1, folder2, output_file): - """ - Compares the contents of two folders and writes the differences to the output file. - """ - - languages = ['java'] - - return_md = "" - - for lang in languages: - expected_files = "" - - generated_output_rst = settings.generated_output_rst.format( - language=lang) - generated_output_csv = settings.generated_output_csv.format( - language=lang) - - # check if files exist in both folder1 and folder 2 - if not check_file_exists(f"{folder1}/{generated_output_rst}"): - expected_files += f"- {generated_output_rst} doesn't exist in folder {folder1}\n" - if not check_file_exists(f"{folder2}/{generated_output_rst}"): - expected_files += f"- {generated_output_rst} doesn't exist in folder {folder2}\n" - if not check_file_exists(f"{folder1}/{generated_output_csv}"): - expected_files += f"- {generated_output_csv} doesn't exist in folder {folder1}\n" - if not check_file_exists(f"{folder2}/{generated_output_csv}"): - expected_files += f"- {generated_output_csv} doesn't exist in folder {folder2}\n" - - if expected_files != "": - print("Expected files are missing", file=sys.stderr) - return_md += f"\n### {lang}\n\n#### Expected files are missing for {lang}\n{expected_files}\n" - continue - - # compare contents of files - cmp1 = compare_files_str( - f"{folder1}/{generated_output_rst}", f"{folder2}/{generated_output_rst}") - cmp2 = compare_files_str( - f"{folder1}/{generated_output_csv}", f"{folder2}/{generated_output_csv}") - - if cmp1 != "" or cmp2 != "": - print("Generated file contents are not matching", file=sys.stderr) - return_md += f"\n### {lang}\n\n#### Generated file changes for {lang}\n\n" - if cmp1 != "": - return_md += f"- Changes to {generated_output_rst}:\n```diff\n{cmp1}```\n\n" - if cmp2 != "": - return_md += f"- Changes to {generated_output_csv}:\n```diff\n{cmp2}```\n\n" - - with open(output_file, 'w', newline='') as out: - out.write(return_md) - - -def get_previous_run_id(repo, run_id, pr_number): - """ - Gets the previous run id for a given workflow run, considering that the previous workflow run needs to come from the same PR. - """ - - # Get branch and repo from run: - this_run = utils.subprocess_check_output( - ["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs/{run_id}", "--jq", "{ head_branch: .head_branch, head_repository: .head_repository.full_name }"]) - - this_run = json.loads(this_run) - pr_branch = this_run["head_branch"] - pr_repo = this_run["head_repository"] - - # Get all previous runs that match branch, repo and workflow name: - ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", f"repos/{repo}/actions/runs", "-f", "event=pull_request", "-f", "status=success", "-f", "name=\"" + artifacts_workflow_name + "\"", "--jq", - f"[.workflow_runs.[] | select(.head_branch==\"{pr_branch}\" and .head_repository.full_name==\"{pr_repo}\") | {{ created_at: .created_at, run_id: .id}}] | sort_by(.created_at) | reverse | [.[].run_id]"]) - - ids = json.loads(ids) - if ids[0] != int(run_id): - raise Exception( - f"Expected to find {run_id} in the list of matching runs.") - - for previous_run_id in ids[1:]: - download_artifact(repo, "pr", "prev_run_pr", previous_run_id) - - try: - with open("prev_run_pr/NR") as file: - prev_pr_number = int(file.read()) - print(f"PR number: {prev_pr_number}") - finally: - if os.path.isdir("prev_run_pr"): - shutil.rmtree("prev_run_pr") - - # the previous run needs to be coming from the same PR: - if pr_number == prev_pr_number: - return previous_run_id - - raise Exception("Couldn't find previous run.") - - -output_file = sys.argv[1] -repo = sys.argv[2] -run_id = sys.argv[3] - -comment_pr(output_file, repo, run_id) diff --git a/misc/scripts/library-coverage/compare-folders.py b/misc/scripts/library-coverage/compare-folders.py new file mode 100644 index 000000000000..ac5b272cd761 --- /dev/null +++ b/misc/scripts/library-coverage/compare-folders.py @@ -0,0 +1,9 @@ +import sys +import compare + + +folder1 = sys.argv[1] +folder2 = sys.argv[2] +diff_file = sys.argv[3] + +compare.compare_folders(folder1, folder2, diff_file) diff --git a/misc/scripts/library-coverage/compare.py b/misc/scripts/library-coverage/compare.py new file mode 100644 index 000000000000..f8bb7e9fbd6b --- /dev/null +++ b/misc/scripts/library-coverage/compare.py @@ -0,0 +1,69 @@ +import sys +import settings +import utils +import difflib + + +def ignore_line_ending(ch): + return difflib.IS_CHARACTER_JUNK(ch, ws=" \r\n") + + +def compare_files(file1, file2): + diff = difflib.ndiff(open(file1).readlines(), + open(file2).readlines(), None, ignore_line_ending) + ret = "" + for line in diff: + if line.startswith("+") or line.startswith("-"): + ret += line + + return ret + + +def compare_folders(folder1, folder2, output_file): + """ + Compares the contents of two folders and writes the differences to the output file. + """ + + languages = ['java'] + + return_md = "" + + for lang in languages: + expected_files = "" + + generated_output_rst = settings.generated_output_rst.format( + language=lang) + generated_output_csv = settings.generated_output_csv.format( + language=lang) + + # check if files exist in both folder1 and folder 2 + if not utils.check_file_exists(f"{folder1}/{generated_output_rst}"): + expected_files += f"- {generated_output_rst} doesn't exist in folder {folder1}\n" + if not utils.check_file_exists(f"{folder2}/{generated_output_rst}"): + expected_files += f"- {generated_output_rst} doesn't exist in folder {folder2}\n" + if not utils.check_file_exists(f"{folder1}/{generated_output_csv}"): + expected_files += f"- {generated_output_csv} doesn't exist in folder {folder1}\n" + if not utils.check_file_exists(f"{folder2}/{generated_output_csv}"): + expected_files += f"- {generated_output_csv} doesn't exist in folder {folder2}\n" + + if expected_files != "": + print("Expected files are missing", file=sys.stderr) + return_md += f"\n### {lang}\n\n#### Expected files are missing for {lang}\n{expected_files}\n" + continue + + # compare contents of files + cmp1 = compare_files( + f"{folder1}/{generated_output_rst}", f"{folder2}/{generated_output_rst}") + cmp2 = compare_files( + f"{folder1}/{generated_output_csv}", f"{folder2}/{generated_output_csv}") + + if cmp1 != "" or cmp2 != "": + print("Generated file contents are not matching", file=sys.stderr) + return_md += f"\n### {lang}\n\n#### Generated file changes for {lang}\n\n" + if cmp1 != "": + return_md += f"- Changes to {generated_output_rst}:\n```diff\n{cmp1}```\n\n" + if cmp2 != "": + return_md += f"- Changes to {generated_output_csv}:\n```diff\n{cmp2}```\n\n" + + with open(output_file, 'w', newline='') as out: + out.write(return_md) diff --git a/misc/scripts/library-coverage/utils.py b/misc/scripts/library-coverage/utils.py index b2e4c5a366ff..428995008ede 100644 --- a/misc/scripts/library-coverage/utils.py +++ b/misc/scripts/library-coverage/utils.py @@ -2,6 +2,7 @@ import os import csv import shlex +import sys def subprocess_run(cmd): @@ -57,3 +58,15 @@ def read_cwes(path): "label": row[2] } return cwes + + +def check_file_exists(file): + if not os.path.exists(file): + print(f"Expected file '{file}' doesn't exist.", file=sys.stderr) + return False + return True + + +def download_artifact(repo, name, dir, run_id): + subprocess_run(["gh", "run", "download", "--repo", + repo, "--name", name, "--dir", dir, str(run_id)]) From 5657c215e91a85974e1f81b8de5efa8d8444bc21 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 10:54:22 +0200 Subject: [PATCH 1523/1662] Change workflow step name --- .github/workflows/csv-coverage-pr-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/csv-coverage-pr-comment.yml b/.github/workflows/csv-coverage-pr-comment.yml index a93603ae58c4..399fee33e5e1 100644 --- a/.github/workflows/csv-coverage-pr-comment.yml +++ b/.github/workflows/csv-coverage-pr-comment.yml @@ -26,7 +26,7 @@ jobs: with: python-version: 3.8 - - name: Check coverage files + - name: Check coverage difference file and comment env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} RUN_ID: ${{ github.event.workflow_run.id }} From 9d004ec2d595391548793d3b004831269a260f68 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 20:28:41 +0200 Subject: [PATCH 1524/1662] Handle case when changes had been reported, and then removed --- misc/scripts/library-coverage/comment-pr.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/misc/scripts/library-coverage/comment-pr.py b/misc/scripts/library-coverage/comment-pr.py index 612ff8b9fe5c..cfeb1317f8b0 100644 --- a/misc/scripts/library-coverage/comment-pr.py +++ b/misc/scripts/library-coverage/comment-pr.py @@ -14,13 +14,16 @@ comparison_artifact_file_name = "comparison.md" +comment_first_line = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + + def get_comment_text(output_file, repo, run_id): size = os.path.getsize(output_file) if size == 0: print("No difference in the coverage reports") return - comment = ":warning: The head of this PR and the base branch were compared for differences in the framework coverage reports. " + \ + comment = comment_first_line + \ f"The generated reports are available in the [artifacts of this workflow run](https://github.com/{repo}/actions/runs/{run_id}). " + \ "The differences will be picked up by the nightly job after the PR gets merged. " @@ -57,6 +60,7 @@ def comment_pr(repo, run_id): shutil.rmtree("pr") # Try storing diff for previous run: + prev_run_id = 0 try: prev_run_id = get_previous_run_id(repo, run_id, pr_number) prev_diff_folder = "prev_diff" @@ -75,6 +79,14 @@ def comment_pr(repo, run_id): comment = get_comment_text( f"{current_diff_folder}/{comparison_artifact_file_name}", repo, run_id) + + if comment == None: + if prev_run_id == 0: + print("Nothing to comment.") + return + print("Previous run found, and current run removes coverage change.") + comment = comment_first_line + \ + "A recent commit removed the previously reported differences." post_comment(comment, repo, pr_number) @@ -119,7 +131,7 @@ def get_previous_run_id(repo, run_id, pr_number): # the previous run needs to be coming from the same PR: if pr_number == prev_pr_number: - return previous_run_id + return int(previous_run_id) raise Exception("Couldn't find previous run.") From 053d9b556465231c91f4806400b5074bbb346b6e Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:24:24 +0200 Subject: [PATCH 1525/1662] add taint step through the `kleur` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 18 +++ .../Security/CWE-117/LogInjection.expected | 151 +++++++++--------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index fc3c62887aa0..c39a6a36cdff 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -7,4 +7,5 @@ lgtm,codescanning [colorette](https://npmjs.com/package/colorette), [cli-highlight](https://npmjs.com/package/cli-highlight), [cli-color](https://npmjs.com/package/cli-color), - [slice-ansi](https://npmjs.com/package/slice-ansi) + [slice-ansi](https://npmjs.com/package/slice-ansi), + [kleur](https://npmjs.com/package/kleur) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 678d16b95ad4..6ac7a8833811 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -290,3 +290,21 @@ class SliceAnsiStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`kleur`](https://npmjs.org/package/kleur) library. + */ +class KleurStep extends TaintTracking::SharedTaintStep { + private API::Node kleurInstance() { + result = API::moduleImport("kleur") + or + result = kleurInstance().getAMember().getReturn() + } + + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = kleurInstance().getAMember().getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index 3c563e8eae0d..ca1edfac8888 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,39 +22,42 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:43:9:43:36 | q | -| logInjectionBad.js:43:13:43:36 | url.par ... , true) | -| logInjectionBad.js:43:23:43:29 | req.url | -| logInjectionBad.js:43:23:43:29 | req.url | -| logInjectionBad.js:44:9:44:35 | username | -| logInjectionBad.js:44:20:44:20 | q | -| logInjectionBad.js:44:20:44:26 | q.query | -| logInjectionBad.js:44:20:44:35 | q.query.username | -| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | -| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | -| logInjectionBad.js:46:46:46:53 | username | -| logInjectionBad.js:47:18:47:47 | colors. ... ername) | -| logInjectionBad.js:47:18:47:47 | colors. ... ername) | -| logInjectionBad.js:47:39:47:46 | username | -| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | -| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | -| logInjectionBad.js:48:27:48:56 | colors. ... ername) | -| logInjectionBad.js:48:48:48:55 | username | -| logInjectionBad.js:49:17:49:47 | underli ... name))) | -| logInjectionBad.js:49:17:49:47 | underli ... name))) | -| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | -| logInjectionBad.js:49:32:49:45 | blue(username) | -| logInjectionBad.js:49:37:49:44 | username | -| logInjectionBad.js:50:17:50:76 | highlig ... true}) | -| logInjectionBad.js:50:17:50:76 | highlig ... true}) | -| logInjectionBad.js:50:27:50:34 | username | -| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | -| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | -| logInjectionBad.js:51:43:51:50 | username | -| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:52:27:52:56 | colors. ... ername) | -| logInjectionBad.js:52:48:52:55 | username | +| logInjectionBad.js:44:9:44:36 | q | +| logInjectionBad.js:44:13:44:36 | url.par ... , true) | +| logInjectionBad.js:44:23:44:29 | req.url | +| logInjectionBad.js:44:23:44:29 | req.url | +| logInjectionBad.js:45:9:45:35 | username | +| logInjectionBad.js:45:20:45:20 | q | +| logInjectionBad.js:45:20:45:26 | q.query | +| logInjectionBad.js:45:20:45:35 | q.query.username | +| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | +| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | +| logInjectionBad.js:47:46:47:53 | username | +| logInjectionBad.js:48:18:48:47 | colors. ... ername) | +| logInjectionBad.js:48:18:48:47 | colors. ... ername) | +| logInjectionBad.js:48:39:48:46 | username | +| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | +| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | +| logInjectionBad.js:49:27:49:56 | colors. ... ername) | +| logInjectionBad.js:49:48:49:55 | username | +| logInjectionBad.js:50:17:50:47 | underli ... name))) | +| logInjectionBad.js:50:17:50:47 | underli ... name))) | +| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | +| logInjectionBad.js:50:32:50:45 | blue(username) | +| logInjectionBad.js:50:37:50:44 | username | +| logInjectionBad.js:51:17:51:76 | highlig ... true}) | +| logInjectionBad.js:51:17:51:76 | highlig ... true}) | +| logInjectionBad.js:51:27:51:34 | username | +| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | +| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | +| logInjectionBad.js:52:43:52:50 | username | +| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:53:27:53:56 | colors. ... ername) | +| logInjectionBad.js:53:48:53:55 | username | +| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | +| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | +| logInjectionBad.js:54:47:54:54 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -78,48 +81,52 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:43:9:43:36 | q | logInjectionBad.js:44:20:44:20 | q | -| logInjectionBad.js:43:13:43:36 | url.par ... , true) | logInjectionBad.js:43:9:43:36 | q | -| logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:43:13:43:36 | url.par ... , true) | -| logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:43:13:43:36 | url.par ... , true) | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:46:46:46:53 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:47:39:47:46 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:48:48:48:55 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:49:37:49:44 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:50:27:50:34 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:51:43:51:50 | username | -| logInjectionBad.js:44:9:44:35 | username | logInjectionBad.js:52:48:52:55 | username | -| logInjectionBad.js:44:20:44:20 | q | logInjectionBad.js:44:20:44:26 | q.query | -| logInjectionBad.js:44:20:44:26 | q.query | logInjectionBad.js:44:20:44:35 | q.query.username | -| logInjectionBad.js:44:20:44:35 | q.query.username | logInjectionBad.js:44:9:44:35 | username | -| logInjectionBad.js:46:46:46:53 | username | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | -| logInjectionBad.js:46:46:46:53 | username | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | -| logInjectionBad.js:47:39:47:46 | username | logInjectionBad.js:47:18:47:47 | colors. ... ername) | -| logInjectionBad.js:47:39:47:46 | username | logInjectionBad.js:47:18:47:47 | colors. ... ername) | -| logInjectionBad.js:48:27:48:56 | colors. ... ername) | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | -| logInjectionBad.js:48:27:48:56 | colors. ... ername) | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | -| logInjectionBad.js:48:48:48:55 | username | logInjectionBad.js:48:27:48:56 | colors. ... ername) | -| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | logInjectionBad.js:49:17:49:47 | underli ... name))) | -| logInjectionBad.js:49:27:49:46 | bold(blue(username)) | logInjectionBad.js:49:17:49:47 | underli ... name))) | -| logInjectionBad.js:49:32:49:45 | blue(username) | logInjectionBad.js:49:27:49:46 | bold(blue(username)) | -| logInjectionBad.js:49:37:49:44 | username | logInjectionBad.js:49:32:49:45 | blue(username) | -| logInjectionBad.js:50:27:50:34 | username | logInjectionBad.js:50:17:50:76 | highlig ... true}) | -| logInjectionBad.js:50:27:50:34 | username | logInjectionBad.js:50:17:50:76 | highlig ... true}) | -| logInjectionBad.js:51:43:51:50 | username | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | -| logInjectionBad.js:51:43:51:50 | username | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | -| logInjectionBad.js:52:27:52:56 | colors. ... ername) | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:52:27:52:56 | colors. ... ername) | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:52:48:52:55 | username | logInjectionBad.js:52:27:52:56 | colors. ... ername) | +| logInjectionBad.js:44:9:44:36 | q | logInjectionBad.js:45:20:45:20 | q | +| logInjectionBad.js:44:13:44:36 | url.par ... , true) | logInjectionBad.js:44:9:44:36 | q | +| logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:44:13:44:36 | url.par ... , true) | +| logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:44:13:44:36 | url.par ... , true) | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:47:46:47:53 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:48:39:48:46 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:49:48:49:55 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:50:37:50:44 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:51:27:51:34 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:52:43:52:50 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:53:48:53:55 | username | +| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:54:47:54:54 | username | +| logInjectionBad.js:45:20:45:20 | q | logInjectionBad.js:45:20:45:26 | q.query | +| logInjectionBad.js:45:20:45:26 | q.query | logInjectionBad.js:45:20:45:35 | q.query.username | +| logInjectionBad.js:45:20:45:35 | q.query.username | logInjectionBad.js:45:9:45:35 | username | +| logInjectionBad.js:47:46:47:53 | username | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | +| logInjectionBad.js:47:46:47:53 | username | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | +| logInjectionBad.js:48:39:48:46 | username | logInjectionBad.js:48:18:48:47 | colors. ... ername) | +| logInjectionBad.js:48:39:48:46 | username | logInjectionBad.js:48:18:48:47 | colors. ... ername) | +| logInjectionBad.js:49:27:49:56 | colors. ... ername) | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | +| logInjectionBad.js:49:27:49:56 | colors. ... ername) | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | +| logInjectionBad.js:49:48:49:55 | username | logInjectionBad.js:49:27:49:56 | colors. ... ername) | +| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | logInjectionBad.js:50:17:50:47 | underli ... name))) | +| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | logInjectionBad.js:50:17:50:47 | underli ... name))) | +| logInjectionBad.js:50:32:50:45 | blue(username) | logInjectionBad.js:50:27:50:46 | bold(blue(username)) | +| logInjectionBad.js:50:37:50:44 | username | logInjectionBad.js:50:32:50:45 | blue(username) | +| logInjectionBad.js:51:27:51:34 | username | logInjectionBad.js:51:17:51:76 | highlig ... true}) | +| logInjectionBad.js:51:27:51:34 | username | logInjectionBad.js:51:17:51:76 | highlig ... true}) | +| logInjectionBad.js:52:43:52:50 | username | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | +| logInjectionBad.js:52:43:52:50 | username | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | +| logInjectionBad.js:53:27:53:56 | colors. ... ername) | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:53:27:53:56 | colors. ... ername) | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:53:48:53:55 | username | logInjectionBad.js:53:27:53:56 | colors. ... ername) | +| logInjectionBad.js:54:47:54:54 | username | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | +| logInjectionBad.js:54:47:54:54 | username | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:46:18:46:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:47:18:47:47 | colors. ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:47:18:47:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:48:18:48:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:49:17:49:47 | underli ... name))) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:49:17:49:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:50:17:50:76 | highlig ... true}) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:50:17:50:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:51:17:51:51 | clc.red ... ername) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:51:17:51:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | -| logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | logInjectionBad.js:43:23:43:29 | req.url | logInjectionBad.js:52:17:52:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:43:23:43:29 | req.url | User-provided value | +| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:48:18:48:47 | colors. ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:48:18:48:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:50:17:50:47 | underli ... name))) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:50:17:50:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:51:17:51:76 | highlig ... true}) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:51:17:51:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 033ba73a0d5a..26474fec0c88 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -38,6 +38,7 @@ import { blue, bold, underline } from "colorette" const highlight = require('cli-highlight').highlight; var clc = require("cli-color"); import sliceAnsi from 'slice-ansi'; +import kleur from 'kleur'; const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -50,4 +51,5 @@ const server2 = http.createServer((req, res) => { console.log(highlight(username, {language: 'sql', ignoreIllegals: true})); // NOT OK console.log(clc.red.bgWhite.underline(username)); // NOT OK console.log(sliceAnsi(colors.red.underline(username), 20, 30)); // NOT OK + console.log(kleur.blue().bold().underline(username)); // NOT OK }); \ No newline at end of file From fe76341820f386034b74f8d471f87fadd72d2208 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:28:17 +0200 Subject: [PATCH 1526/1662] add taint step through the `chalk` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 ++ .../Security/CWE-117/LogInjection.expected | 165 +++++++++--------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 102 insertions(+), 80 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index c39a6a36cdff..1529eda3eda5 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -8,4 +8,5 @@ lgtm,codescanning [cli-highlight](https://npmjs.com/package/cli-highlight), [cli-color](https://npmjs.com/package/cli-color), [slice-ansi](https://npmjs.com/package/slice-ansi), - [kleur](https://npmjs.com/package/kleur) + [kleur](https://npmjs.com/package/kleur), + [chalk](https://npmjs.com/package/chalk) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 6ac7a8833811..487d9e8f6bc7 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -308,3 +308,15 @@ class KleurStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`chalk`](https://npmjs.org/package/chalk) library. + */ +class ChalkStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("chalk").getAMember*().getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index ca1edfac8888..d48989590f00 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,42 +22,45 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:44:9:44:36 | q | -| logInjectionBad.js:44:13:44:36 | url.par ... , true) | -| logInjectionBad.js:44:23:44:29 | req.url | -| logInjectionBad.js:44:23:44:29 | req.url | -| logInjectionBad.js:45:9:45:35 | username | -| logInjectionBad.js:45:20:45:20 | q | -| logInjectionBad.js:45:20:45:26 | q.query | -| logInjectionBad.js:45:20:45:35 | q.query.username | -| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | -| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | -| logInjectionBad.js:47:46:47:53 | username | -| logInjectionBad.js:48:18:48:47 | colors. ... ername) | -| logInjectionBad.js:48:18:48:47 | colors. ... ername) | -| logInjectionBad.js:48:39:48:46 | username | -| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | -| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | -| logInjectionBad.js:49:27:49:56 | colors. ... ername) | -| logInjectionBad.js:49:48:49:55 | username | -| logInjectionBad.js:50:17:50:47 | underli ... name))) | -| logInjectionBad.js:50:17:50:47 | underli ... name))) | -| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | -| logInjectionBad.js:50:32:50:45 | blue(username) | -| logInjectionBad.js:50:37:50:44 | username | -| logInjectionBad.js:51:17:51:76 | highlig ... true}) | -| logInjectionBad.js:51:17:51:76 | highlig ... true}) | -| logInjectionBad.js:51:27:51:34 | username | -| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | -| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | -| logInjectionBad.js:52:43:52:50 | username | -| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:53:27:53:56 | colors. ... ername) | -| logInjectionBad.js:53:48:53:55 | username | -| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | -| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | -| logInjectionBad.js:54:47:54:54 | username | +| logInjectionBad.js:45:9:45:36 | q | +| logInjectionBad.js:45:13:45:36 | url.par ... , true) | +| logInjectionBad.js:45:23:45:29 | req.url | +| logInjectionBad.js:45:23:45:29 | req.url | +| logInjectionBad.js:46:9:46:35 | username | +| logInjectionBad.js:46:20:46:20 | q | +| logInjectionBad.js:46:20:46:26 | q.query | +| logInjectionBad.js:46:20:46:35 | q.query.username | +| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | +| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | +| logInjectionBad.js:48:46:48:53 | username | +| logInjectionBad.js:49:18:49:47 | colors. ... ername) | +| logInjectionBad.js:49:18:49:47 | colors. ... ername) | +| logInjectionBad.js:49:39:49:46 | username | +| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | +| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | +| logInjectionBad.js:50:27:50:56 | colors. ... ername) | +| logInjectionBad.js:50:48:50:55 | username | +| logInjectionBad.js:51:17:51:47 | underli ... name))) | +| logInjectionBad.js:51:17:51:47 | underli ... name))) | +| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | +| logInjectionBad.js:51:32:51:45 | blue(username) | +| logInjectionBad.js:51:37:51:44 | username | +| logInjectionBad.js:52:17:52:76 | highlig ... true}) | +| logInjectionBad.js:52:17:52:76 | highlig ... true}) | +| logInjectionBad.js:52:27:52:34 | username | +| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | +| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | +| logInjectionBad.js:53:43:53:50 | username | +| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:54:27:54:56 | colors. ... ername) | +| logInjectionBad.js:54:48:54:55 | username | +| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | +| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | +| logInjectionBad.js:55:47:55:54 | username | +| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | +| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | +| logInjectionBad.js:56:40:56:47 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -81,52 +84,56 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:44:9:44:36 | q | logInjectionBad.js:45:20:45:20 | q | -| logInjectionBad.js:44:13:44:36 | url.par ... , true) | logInjectionBad.js:44:9:44:36 | q | -| logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:44:13:44:36 | url.par ... , true) | -| logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:44:13:44:36 | url.par ... , true) | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:47:46:47:53 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:48:39:48:46 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:49:48:49:55 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:50:37:50:44 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:51:27:51:34 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:52:43:52:50 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:53:48:53:55 | username | -| logInjectionBad.js:45:9:45:35 | username | logInjectionBad.js:54:47:54:54 | username | -| logInjectionBad.js:45:20:45:20 | q | logInjectionBad.js:45:20:45:26 | q.query | -| logInjectionBad.js:45:20:45:26 | q.query | logInjectionBad.js:45:20:45:35 | q.query.username | -| logInjectionBad.js:45:20:45:35 | q.query.username | logInjectionBad.js:45:9:45:35 | username | -| logInjectionBad.js:47:46:47:53 | username | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | -| logInjectionBad.js:47:46:47:53 | username | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | -| logInjectionBad.js:48:39:48:46 | username | logInjectionBad.js:48:18:48:47 | colors. ... ername) | -| logInjectionBad.js:48:39:48:46 | username | logInjectionBad.js:48:18:48:47 | colors. ... ername) | -| logInjectionBad.js:49:27:49:56 | colors. ... ername) | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | -| logInjectionBad.js:49:27:49:56 | colors. ... ername) | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | -| logInjectionBad.js:49:48:49:55 | username | logInjectionBad.js:49:27:49:56 | colors. ... ername) | -| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | logInjectionBad.js:50:17:50:47 | underli ... name))) | -| logInjectionBad.js:50:27:50:46 | bold(blue(username)) | logInjectionBad.js:50:17:50:47 | underli ... name))) | -| logInjectionBad.js:50:32:50:45 | blue(username) | logInjectionBad.js:50:27:50:46 | bold(blue(username)) | -| logInjectionBad.js:50:37:50:44 | username | logInjectionBad.js:50:32:50:45 | blue(username) | -| logInjectionBad.js:51:27:51:34 | username | logInjectionBad.js:51:17:51:76 | highlig ... true}) | -| logInjectionBad.js:51:27:51:34 | username | logInjectionBad.js:51:17:51:76 | highlig ... true}) | -| logInjectionBad.js:52:43:52:50 | username | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | -| logInjectionBad.js:52:43:52:50 | username | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | -| logInjectionBad.js:53:27:53:56 | colors. ... ername) | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:53:27:53:56 | colors. ... ername) | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:53:48:53:55 | username | logInjectionBad.js:53:27:53:56 | colors. ... ername) | -| logInjectionBad.js:54:47:54:54 | username | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | -| logInjectionBad.js:54:47:54:54 | username | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | +| logInjectionBad.js:45:9:45:36 | q | logInjectionBad.js:46:20:46:20 | q | +| logInjectionBad.js:45:13:45:36 | url.par ... , true) | logInjectionBad.js:45:9:45:36 | q | +| logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:45:13:45:36 | url.par ... , true) | +| logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:45:13:45:36 | url.par ... , true) | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:48:46:48:53 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:49:39:49:46 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:50:48:50:55 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:51:37:51:44 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:52:27:52:34 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:53:43:53:50 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:54:48:54:55 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:55:47:55:54 | username | +| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:56:40:56:47 | username | +| logInjectionBad.js:46:20:46:20 | q | logInjectionBad.js:46:20:46:26 | q.query | +| logInjectionBad.js:46:20:46:26 | q.query | logInjectionBad.js:46:20:46:35 | q.query.username | +| logInjectionBad.js:46:20:46:35 | q.query.username | logInjectionBad.js:46:9:46:35 | username | +| logInjectionBad.js:48:46:48:53 | username | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | +| logInjectionBad.js:48:46:48:53 | username | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | +| logInjectionBad.js:49:39:49:46 | username | logInjectionBad.js:49:18:49:47 | colors. ... ername) | +| logInjectionBad.js:49:39:49:46 | username | logInjectionBad.js:49:18:49:47 | colors. ... ername) | +| logInjectionBad.js:50:27:50:56 | colors. ... ername) | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | +| logInjectionBad.js:50:27:50:56 | colors. ... ername) | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | +| logInjectionBad.js:50:48:50:55 | username | logInjectionBad.js:50:27:50:56 | colors. ... ername) | +| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | logInjectionBad.js:51:17:51:47 | underli ... name))) | +| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | logInjectionBad.js:51:17:51:47 | underli ... name))) | +| logInjectionBad.js:51:32:51:45 | blue(username) | logInjectionBad.js:51:27:51:46 | bold(blue(username)) | +| logInjectionBad.js:51:37:51:44 | username | logInjectionBad.js:51:32:51:45 | blue(username) | +| logInjectionBad.js:52:27:52:34 | username | logInjectionBad.js:52:17:52:76 | highlig ... true}) | +| logInjectionBad.js:52:27:52:34 | username | logInjectionBad.js:52:17:52:76 | highlig ... true}) | +| logInjectionBad.js:53:43:53:50 | username | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | +| logInjectionBad.js:53:43:53:50 | username | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | +| logInjectionBad.js:54:27:54:56 | colors. ... ername) | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:54:27:54:56 | colors. ... ername) | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:54:48:54:55 | username | logInjectionBad.js:54:27:54:56 | colors. ... ername) | +| logInjectionBad.js:55:47:55:54 | username | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | +| logInjectionBad.js:55:47:55:54 | username | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | +| logInjectionBad.js:56:40:56:47 | username | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | +| logInjectionBad.js:56:40:56:47 | username | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:47:18:47:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:48:18:48:47 | colors. ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:48:18:48:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:49:18:49:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:50:17:50:47 | underli ... name))) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:50:17:50:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:51:17:51:76 | highlig ... true}) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:51:17:51:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:52:17:52:51 | clc.red ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:52:17:52:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:53:17:53:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | -| logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | logInjectionBad.js:44:23:44:29 | req.url | logInjectionBad.js:54:17:54:55 | kleur.b ... ername) | $@ flows to log entry. | logInjectionBad.js:44:23:44:29 | req.url | User-provided value | +| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:49:18:49:47 | colors. ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:49:18:49:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:51:17:51:47 | underli ... name))) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:51:17:51:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:52:17:52:76 | highlig ... true}) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:52:17:52:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 26474fec0c88..570b6a7ad1e9 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -39,6 +39,7 @@ const highlight = require('cli-highlight').highlight; var clc = require("cli-color"); import sliceAnsi from 'slice-ansi'; import kleur from 'kleur'; +const chalk = require('chalk'); const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -52,4 +53,5 @@ const server2 = http.createServer((req, res) => { console.log(clc.red.bgWhite.underline(username)); // NOT OK console.log(sliceAnsi(colors.red.underline(username), 20, 30)); // NOT OK console.log(kleur.blue().bold().underline(username)); // NOT OK + console.log(chalk.underline.bgBlue(username)); // NOT OK }); \ No newline at end of file From fa02651542afec964b82704a0a445046a6cad6e6 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 23:32:30 +0200 Subject: [PATCH 1527/1662] add taint step through the `strip-ansi` library --- javascript/change-notes/2021-06-22-colors.md | 3 +- .../semmle/javascript/frameworks/Logging.qll | 12 ++ .../Security/CWE-117/LogInjection.expected | 181 +++++++++--------- .../Security/CWE-117/logInjectionBad.js | 2 + 4 files changed, 111 insertions(+), 87 deletions(-) diff --git a/javascript/change-notes/2021-06-22-colors.md b/javascript/change-notes/2021-06-22-colors.md index 1529eda3eda5..a940e714fb98 100644 --- a/javascript/change-notes/2021-06-22-colors.md +++ b/javascript/change-notes/2021-06-22-colors.md @@ -9,4 +9,5 @@ lgtm,codescanning [cli-color](https://npmjs.com/package/cli-color), [slice-ansi](https://npmjs.com/package/slice-ansi), [kleur](https://npmjs.com/package/kleur), - [chalk](https://npmjs.com/package/chalk) + [chalk](https://npmjs.com/package/chalk), + [strip-ansi](https://npmjs.com/package/strip-ansi) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 487d9e8f6bc7..d8c34c4ca2ca 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -320,3 +320,15 @@ class ChalkStep extends TaintTracking::SharedTaintStep { ) } } + +/** + * A step through the [`strip-ansi`](https://npmjs.org/package/strip-ansi) library. + */ +class StripAnsiStep extends TaintTracking::SharedTaintStep { + override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { + exists(API::CallNode call | call = API::moduleImport("strip-ansi").getACall() | + pred = call.getArgument(0) and + succ = call + ) + } +} diff --git a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected index d48989590f00..8c5e1f424df2 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-117/LogInjection.expected @@ -22,45 +22,49 @@ nodes | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | -| logInjectionBad.js:45:9:45:36 | q | -| logInjectionBad.js:45:13:45:36 | url.par ... , true) | -| logInjectionBad.js:45:23:45:29 | req.url | -| logInjectionBad.js:45:23:45:29 | req.url | -| logInjectionBad.js:46:9:46:35 | username | -| logInjectionBad.js:46:20:46:20 | q | -| logInjectionBad.js:46:20:46:26 | q.query | -| logInjectionBad.js:46:20:46:35 | q.query.username | -| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | -| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | -| logInjectionBad.js:48:46:48:53 | username | -| logInjectionBad.js:49:18:49:47 | colors. ... ername) | -| logInjectionBad.js:49:18:49:47 | colors. ... ername) | -| logInjectionBad.js:49:39:49:46 | username | -| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | -| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | -| logInjectionBad.js:50:27:50:56 | colors. ... ername) | -| logInjectionBad.js:50:48:50:55 | username | -| logInjectionBad.js:51:17:51:47 | underli ... name))) | -| logInjectionBad.js:51:17:51:47 | underli ... name))) | -| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | -| logInjectionBad.js:51:32:51:45 | blue(username) | -| logInjectionBad.js:51:37:51:44 | username | -| logInjectionBad.js:52:17:52:76 | highlig ... true}) | -| logInjectionBad.js:52:17:52:76 | highlig ... true}) | -| logInjectionBad.js:52:27:52:34 | username | -| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | -| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | -| logInjectionBad.js:53:43:53:50 | username | -| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:54:27:54:56 | colors. ... ername) | -| logInjectionBad.js:54:48:54:55 | username | -| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | -| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | -| logInjectionBad.js:55:47:55:54 | username | -| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | -| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | -| logInjectionBad.js:56:40:56:47 | username | +| logInjectionBad.js:46:9:46:36 | q | +| logInjectionBad.js:46:13:46:36 | url.par ... , true) | +| logInjectionBad.js:46:23:46:29 | req.url | +| logInjectionBad.js:46:23:46:29 | req.url | +| logInjectionBad.js:47:9:47:35 | username | +| logInjectionBad.js:47:20:47:20 | q | +| logInjectionBad.js:47:20:47:26 | q.query | +| logInjectionBad.js:47:20:47:35 | q.query.username | +| logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | +| logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | +| logInjectionBad.js:49:46:49:53 | username | +| logInjectionBad.js:50:18:50:47 | colors. ... ername) | +| logInjectionBad.js:50:18:50:47 | colors. ... ername) | +| logInjectionBad.js:50:39:50:46 | username | +| logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | +| logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | +| logInjectionBad.js:51:27:51:56 | colors. ... ername) | +| logInjectionBad.js:51:48:51:55 | username | +| logInjectionBad.js:52:17:52:47 | underli ... name))) | +| logInjectionBad.js:52:17:52:47 | underli ... name))) | +| logInjectionBad.js:52:27:52:46 | bold(blue(username)) | +| logInjectionBad.js:52:32:52:45 | blue(username) | +| logInjectionBad.js:52:37:52:44 | username | +| logInjectionBad.js:53:17:53:76 | highlig ... true}) | +| logInjectionBad.js:53:17:53:76 | highlig ... true}) | +| logInjectionBad.js:53:27:53:34 | username | +| logInjectionBad.js:54:17:54:51 | clc.red ... ername) | +| logInjectionBad.js:54:17:54:51 | clc.red ... ername) | +| logInjectionBad.js:54:43:54:50 | username | +| logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:55:27:55:56 | colors. ... ername) | +| logInjectionBad.js:55:48:55:55 | username | +| logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | +| logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | +| logInjectionBad.js:56:47:56:54 | username | +| logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | +| logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | +| logInjectionBad.js:57:40:57:47 | username | +| logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | +| logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | +| logInjectionBad.js:58:27:58:58 | chalk.u ... ername) | +| logInjectionBad.js:58:50:58:57 | username | edges | logInjectionBad.js:19:9:19:36 | q | logInjectionBad.js:20:20:20:20 | q | | logInjectionBad.js:19:13:19:36 | url.par ... , true) | logInjectionBad.js:19:9:19:36 | q | @@ -84,56 +88,61 @@ edges | logInjectionBad.js:29:14:29:18 | error | logInjectionBad.js:30:42:30:46 | error | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | | logInjectionBad.js:30:42:30:46 | error | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | -| logInjectionBad.js:45:9:45:36 | q | logInjectionBad.js:46:20:46:20 | q | -| logInjectionBad.js:45:13:45:36 | url.par ... , true) | logInjectionBad.js:45:9:45:36 | q | -| logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:45:13:45:36 | url.par ... , true) | -| logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:45:13:45:36 | url.par ... , true) | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:48:46:48:53 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:49:39:49:46 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:50:48:50:55 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:51:37:51:44 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:52:27:52:34 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:53:43:53:50 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:54:48:54:55 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:55:47:55:54 | username | -| logInjectionBad.js:46:9:46:35 | username | logInjectionBad.js:56:40:56:47 | username | -| logInjectionBad.js:46:20:46:20 | q | logInjectionBad.js:46:20:46:26 | q.query | -| logInjectionBad.js:46:20:46:26 | q.query | logInjectionBad.js:46:20:46:35 | q.query.username | -| logInjectionBad.js:46:20:46:35 | q.query.username | logInjectionBad.js:46:9:46:35 | username | -| logInjectionBad.js:48:46:48:53 | username | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | -| logInjectionBad.js:48:46:48:53 | username | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | -| logInjectionBad.js:49:39:49:46 | username | logInjectionBad.js:49:18:49:47 | colors. ... ername) | -| logInjectionBad.js:49:39:49:46 | username | logInjectionBad.js:49:18:49:47 | colors. ... ername) | -| logInjectionBad.js:50:27:50:56 | colors. ... ername) | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | -| logInjectionBad.js:50:27:50:56 | colors. ... ername) | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | -| logInjectionBad.js:50:48:50:55 | username | logInjectionBad.js:50:27:50:56 | colors. ... ername) | -| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | logInjectionBad.js:51:17:51:47 | underli ... name))) | -| logInjectionBad.js:51:27:51:46 | bold(blue(username)) | logInjectionBad.js:51:17:51:47 | underli ... name))) | -| logInjectionBad.js:51:32:51:45 | blue(username) | logInjectionBad.js:51:27:51:46 | bold(blue(username)) | -| logInjectionBad.js:51:37:51:44 | username | logInjectionBad.js:51:32:51:45 | blue(username) | -| logInjectionBad.js:52:27:52:34 | username | logInjectionBad.js:52:17:52:76 | highlig ... true}) | -| logInjectionBad.js:52:27:52:34 | username | logInjectionBad.js:52:17:52:76 | highlig ... true}) | -| logInjectionBad.js:53:43:53:50 | username | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | -| logInjectionBad.js:53:43:53:50 | username | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | -| logInjectionBad.js:54:27:54:56 | colors. ... ername) | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:54:27:54:56 | colors. ... ername) | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | -| logInjectionBad.js:54:48:54:55 | username | logInjectionBad.js:54:27:54:56 | colors. ... ername) | -| logInjectionBad.js:55:47:55:54 | username | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | -| logInjectionBad.js:55:47:55:54 | username | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | -| logInjectionBad.js:56:40:56:47 | username | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | -| logInjectionBad.js:56:40:56:47 | username | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | +| logInjectionBad.js:46:9:46:36 | q | logInjectionBad.js:47:20:47:20 | q | +| logInjectionBad.js:46:13:46:36 | url.par ... , true) | logInjectionBad.js:46:9:46:36 | q | +| logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:46:13:46:36 | url.par ... , true) | +| logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:46:13:46:36 | url.par ... , true) | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:49:46:49:53 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:50:39:50:46 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:51:48:51:55 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:52:37:52:44 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:53:27:53:34 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:54:43:54:50 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:55:48:55:55 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:56:47:56:54 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:57:40:57:47 | username | +| logInjectionBad.js:47:9:47:35 | username | logInjectionBad.js:58:50:58:57 | username | +| logInjectionBad.js:47:20:47:20 | q | logInjectionBad.js:47:20:47:26 | q.query | +| logInjectionBad.js:47:20:47:26 | q.query | logInjectionBad.js:47:20:47:35 | q.query.username | +| logInjectionBad.js:47:20:47:35 | q.query.username | logInjectionBad.js:47:9:47:35 | username | +| logInjectionBad.js:49:46:49:53 | username | logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | +| logInjectionBad.js:49:46:49:53 | username | logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | +| logInjectionBad.js:50:39:50:46 | username | logInjectionBad.js:50:18:50:47 | colors. ... ername) | +| logInjectionBad.js:50:39:50:46 | username | logInjectionBad.js:50:18:50:47 | colors. ... ername) | +| logInjectionBad.js:51:27:51:56 | colors. ... ername) | logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | +| logInjectionBad.js:51:27:51:56 | colors. ... ername) | logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | +| logInjectionBad.js:51:48:51:55 | username | logInjectionBad.js:51:27:51:56 | colors. ... ername) | +| logInjectionBad.js:52:27:52:46 | bold(blue(username)) | logInjectionBad.js:52:17:52:47 | underli ... name))) | +| logInjectionBad.js:52:27:52:46 | bold(blue(username)) | logInjectionBad.js:52:17:52:47 | underli ... name))) | +| logInjectionBad.js:52:32:52:45 | blue(username) | logInjectionBad.js:52:27:52:46 | bold(blue(username)) | +| logInjectionBad.js:52:37:52:44 | username | logInjectionBad.js:52:32:52:45 | blue(username) | +| logInjectionBad.js:53:27:53:34 | username | logInjectionBad.js:53:17:53:76 | highlig ... true}) | +| logInjectionBad.js:53:27:53:34 | username | logInjectionBad.js:53:17:53:76 | highlig ... true}) | +| logInjectionBad.js:54:43:54:50 | username | logInjectionBad.js:54:17:54:51 | clc.red ... ername) | +| logInjectionBad.js:54:43:54:50 | username | logInjectionBad.js:54:17:54:51 | clc.red ... ername) | +| logInjectionBad.js:55:27:55:56 | colors. ... ername) | logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:55:27:55:56 | colors. ... ername) | logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | +| logInjectionBad.js:55:48:55:55 | username | logInjectionBad.js:55:27:55:56 | colors. ... ername) | +| logInjectionBad.js:56:47:56:54 | username | logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | +| logInjectionBad.js:56:47:56:54 | username | logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | +| logInjectionBad.js:57:40:57:47 | username | logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | +| logInjectionBad.js:57:40:57:47 | username | logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | +| logInjectionBad.js:58:27:58:58 | chalk.u ... ername) | logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | +| logInjectionBad.js:58:27:58:58 | chalk.u ... ername) | logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | +| logInjectionBad.js:58:50:58:57 | username | logInjectionBad.js:58:27:58:58 | chalk.u ... ername) | #select | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:22:18:22:43 | `[INFO] ... rname}` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:23:37:23:44 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:23:37:23:44 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:24:35:24:42 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:24:35:24:42 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:25:36:25:43 | username | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:25:36:25:43 | username | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | logInjectionBad.js:19:23:19:29 | req.url | logInjectionBad.js:30:23:30:49 | `[ERROR ... rror}"` | $@ flows to log entry. | logInjectionBad.js:19:23:19:29 | req.url | User-provided value | -| logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:48:18:48:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:49:18:49:47 | colors. ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:49:18:49:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:50:18:50:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:51:17:51:47 | underli ... name))) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:51:17:51:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:52:17:52:76 | highlig ... true}) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:52:17:52:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:53:17:53:51 | clc.red ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:53:17:53:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:54:17:54:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:55:17:55:55 | kleur.b ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | -| logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | logInjectionBad.js:45:23:45:29 | req.url | logInjectionBad.js:56:17:56:48 | chalk.u ... ername) | $@ flows to log entry. | logInjectionBad.js:45:23:45:29 | req.url | User-provided value | +| logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:49:18:49:54 | ansiCol ... ername) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:50:18:50:47 | colors. ... ername) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:50:18:50:47 | colors. ... ername) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:51:18:51:61 | wrapAns ... e), 20) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:52:17:52:47 | underli ... name))) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:52:17:52:47 | underli ... name))) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:53:17:53:76 | highlig ... true}) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:53:17:53:76 | highlig ... true}) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:54:17:54:51 | clc.red ... ername) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:54:17:54:51 | clc.red ... ername) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:55:17:55:65 | sliceAn ... 20, 30) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:56:17:56:55 | kleur.b ... ername) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:57:17:57:48 | chalk.u ... ername) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | +| logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | logInjectionBad.js:46:23:46:29 | req.url | logInjectionBad.js:58:17:58:59 | stripAn ... rname)) | $@ flows to log entry. | logInjectionBad.js:46:23:46:29 | req.url | User-provided value | diff --git a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js index 570b6a7ad1e9..1e4473c263e1 100644 --- a/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js +++ b/javascript/ql/test/query-tests/Security/CWE-117/logInjectionBad.js @@ -40,6 +40,7 @@ var clc = require("cli-color"); import sliceAnsi from 'slice-ansi'; import kleur from 'kleur'; const chalk = require('chalk'); +import stripAnsi from 'strip-ansi'; const server2 = http.createServer((req, res) => { let q = url.parse(req.url, true); @@ -54,4 +55,5 @@ const server2 = http.createServer((req, res) => { console.log(sliceAnsi(colors.red.underline(username), 20, 30)); // NOT OK console.log(kleur.blue().bold().underline(username)); // NOT OK console.log(chalk.underline.bgBlue(username)); // NOT OK + console.log(stripAnsi(chalk.underline.bgBlue(username))); // NOT OK }); \ No newline at end of file From bfa9bf33c059075b470f683f8000bdb5b742e133 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 13 Apr 2021 12:43:33 +0200 Subject: [PATCH 1528/1662] C#: Add nuget based stubbing script --- csharp/ql/src/Stubs/helpers.py | 37 ++++++++++++++++ csharp/ql/src/Stubs/make_stubs.py | 59 ++++++------------------- csharp/ql/src/Stubs/make_stubs_nuget.py | 57 ++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 45 deletions(-) create mode 100644 csharp/ql/src/Stubs/helpers.py create mode 100644 csharp/ql/src/Stubs/make_stubs_nuget.py diff --git a/csharp/ql/src/Stubs/helpers.py b/csharp/ql/src/Stubs/helpers.py new file mode 100644 index 000000000000..e4fe3d278a85 --- /dev/null +++ b/csharp/ql/src/Stubs/helpers.py @@ -0,0 +1,37 @@ +import sys +import os +import subprocess + + +def run_cmd(cmd, msg="Failed to run command"): + print('Running ' + ' '.join(cmd)) + if subprocess.check_call(cmd): + print(msg) + exit(1) + + +def get_argv(index, default): + if len(sys.argv) > index: + return sys.argv[index] + return default + + +def trim_output_file(file): + # Remove the leading and trailing bytes from the file + length = os.stat(file).st_size + if length < 20: + contents = b'' + else: + f = open(file, "rb") + try: + pre = f.read(2) + print("Start characters in file skipped.", pre) + contents = f.read(length - 5) + post = f.read(3) + print("End characters in file skipped.", post) + finally: + f.close() + + f = open(file, "wb") + f.write(contents) + f.close() diff --git a/csharp/ql/src/Stubs/make_stubs.py b/csharp/ql/src/Stubs/make_stubs.py index 7d2ce9f7ed74..e66371f2b957 100644 --- a/csharp/ql/src/Stubs/make_stubs.py +++ b/csharp/ql/src/Stubs/make_stubs.py @@ -11,6 +11,7 @@ import sys import os import subprocess +import helpers print('Script to generate stub.cs files for C# qltest projects') @@ -45,6 +46,7 @@ csharpQueries = os.path.abspath(os.path.dirname(sys.argv[0])) outputFile = os.path.join(testDir, 'stubs.cs') +bqrsFile = os.path.join(testDir, 'stubs.bqrs') print("Stubbing qltest in", testDir) @@ -52,11 +54,8 @@ os.remove(outputFile) # It would interfere with the test. print("Removed previous", outputFile) -cmd = ['codeql', 'test', 'run', '--keep-databases', testDir] -print('Running ' + ' '.join(cmd)) -if subprocess.check_call(cmd): - print("codeql test failed. Please fix up the test before proceeding.") - exit(1) +helpers.run_cmd(['codeql', 'test', 'run', '--keep-databases', testDir], + "codeql test failed. Please fix up the test before proceeding.") dbDir = os.path.join(testDir, os.path.basename(testDir) + ".testproj") @@ -64,47 +63,17 @@ print("Expected database directory " + dbDir + " not found.") exit(1) -cmd = ['codeql', 'query', 'run', os.path.join( - csharpQueries, 'MinimalStubsFromSource.ql'), '--database', dbDir, '--output', outputFile] -print('Running ' + ' '.join(cmd)) -if subprocess.check_call(cmd): - print('Failed to run the query to generate output file.') - exit(1) +helpers.run_cmd(['codeql', 'query', 'run', os.path.join( + csharpQueries, 'MinimalStubsFromSource.ql'), '--database', dbDir, '--output', bqrsFile], 'Failed to run the query to generate output file.') + +helpers.run_cmd(['codeql', 'bqrs', 'decode', bqrsFile, '--output', + outputFile, '--format=text', '--no-titles'], 'Failed to run the query to generate output file.') + +helpers.trim_output_file(outputFile) -# Remove the leading and trailing bytes from the file -length = os.stat(outputFile).st_size -if length < 20: - contents = b'' -else: - f = open(outputFile, "rb") - try: - countTillSlash = 0 - foundSlash = False - slash = f.read(1) - while slash != b'': - if slash == b'/': - foundSlash = True - break - countTillSlash += 1 - slash = f.read(1) - - if not foundSlash: - countTillSlash = 0 - - f.seek(0) - quote = f.read(countTillSlash) - print("Start characters in file skipped.", quote) - post = b'\x0e\x01\x08#select\x01\x01\x00s\x00' - contents = f.read(length - len(post) - countTillSlash) - quote = f.read(len(post)) - if quote != post: - print("Unexpected end character in file.", quote) - finally: - f.close() - -f = open(outputFile, "wb") -f.write(contents) -f.close() +if os.path.isfile(bqrsFile): + os.remove(bqrsFile) # Cleanup + print("Removed temp BQRS file", bqrsFile) cmd = ['codeql', 'test', 'run', testDir] print('Running ' + ' '.join(cmd)) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py new file mode 100644 index 000000000000..aa48cbfde9a4 --- /dev/null +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -0,0 +1,57 @@ +import sys +import os +import helpers + + +print('Script to generate stub.cs file from a nuget package') +print('Usage: python ' + sys.argv[0] + + ' NUGET_PACKAGE_NAME [VERSION=latest] [WORK_DIR=tempDir] [OUTPUT_NAME=stub]') + +if len(sys.argv) < 2: + print("\nPlease supply a nuget package name.") + exit(1) + +thisScript = sys.argv[0] +thisDir = os.path.abspath(os.path.dirname(thisScript)) +nuget = sys.argv[1] + +workDir = os.path.abspath(helpers.get_argv(3, "tempDir")) +projectName = "proj" +projectDir = os.path.join(workDir, projectName) +dbName = 'db' +dbDir = os.path.join(workDir, dbName) +outputName = helpers.get_argv(4, "stub") +outputFile = os.path.join(workDir, outputName + '.cs') +bqrsFile = os.path.join(workDir, outputName + '.bqrs') +version = helpers.get_argv(2, "latest") + +print("\nCreating new project") +helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", '--name', + projectName, '--output', projectDir]) + +print("\nAdding reference") +cmd = ['dotnet', 'add', projectDir, 'package', nuget] +if (version != "latest"): + cmd.append('--version') + cmd.append(version) +helpers.run_cmd(cmd) + +print("\nCreating DB") +helpers.run_cmd(['codeql', 'database', 'create', dbDir, '--language=csharp', + '--command', 'dotnet build /t:rebuild ' + projectDir]) + +if not os.path.isdir(dbDir): + print("Expected database directory " + dbDir + " not found.") + exit(1) + +print("\nRunning query") +helpers.run_cmd(['codeql', 'query', 'run', os.path.join( + thisDir, 'MinimalStubsFromSource.ql'), '--database', dbDir, '--output', bqrsFile]) + +helpers.run_cmd(['codeql', 'bqrs', 'decode', bqrsFile, '--output', + outputFile, '--format=text', '--no-titles']) + +helpers.trim_output_file(outputFile) + +print("\nOutput: " + outputFile) +exit(0) From 3f0a158b3c38081308d31179401975f63592cbc8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 13 Apr 2021 17:15:16 +0200 Subject: [PATCH 1529/1662] Add query to select all public declarations from target assemblies --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 23 ++++++++++++++++++++ csharp/ql/src/Stubs/make_stubs_nuget.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 csharp/ql/src/Stubs/AllStubsFromReference.ql diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql new file mode 100644 index 000000000000..ad99f96e0439 --- /dev/null +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -0,0 +1,23 @@ +/** + * Tool to generate C# stubs from a qltest snapshot. + */ + +import csharp +import Stubs + +/** All public declarations from assemblies. */ +class AllExternalPublicDeclarations extends GeneratedDeclaration { + AllExternalPublicDeclarations() { + this.fromLibrary() and + this.(Modifiable).isEffectivelyPublic() + } +} + +/** All framework assemblies. */ +class NonTargetAssembly extends ExcludedAssembly { + NonTargetAssembly() { + exists(this.getFile().getAbsolutePath().indexOf("Microsoft.NETCore.App.Ref")) + } +} + +select generatedCode() diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index aa48cbfde9a4..d5e7bf41031b 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -46,7 +46,7 @@ print("\nRunning query") helpers.run_cmd(['codeql', 'query', 'run', os.path.join( - thisDir, 'MinimalStubsFromSource.ql'), '--database', dbDir, '--output', bqrsFile]) + thisDir, 'AllStubsFromReference.ql'), '--database', dbDir, '--output', bqrsFile]) helpers.run_cmd(['codeql', 'bqrs', 'decode', bqrsFile, '--output', outputFile, '--format=text', '--no-titles']) From 481ae0ff190c88d9f87c94b717063888b83c2c20 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 09:41:35 +0200 Subject: [PATCH 1530/1662] Exclude default struct constructors from stubs --- csharp/ql/src/Stubs/Stubs.qll | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 82bf327215a6..6dbe723811ed 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -593,7 +593,11 @@ private string stubMember(Member m) { p.getName() + " { " + stubGetter(p) + stubSetter(p) + "}\n" ) or - exists(Constructor c | m = c and not c.getDeclaringType() instanceof Enum | + exists(Constructor c | + m = c and + not c.getDeclaringType() instanceof Enum and + (not c.getDeclaringType() instanceof Struct or c.getNumberOfParameters() > 0) + | result = " " + stubModifiers(m) + c.getName() + "(" + stubParameters(c) + ") => throw null;\n" ) From a273f88a517653fdb96f9b2965317d450561371c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 09:44:06 +0200 Subject: [PATCH 1531/1662] Add support for explicitly implemented indexers --- csharp/ql/src/Stubs/Stubs.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 6dbe723811ed..14f0adfe61db 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -604,8 +604,8 @@ private string stubMember(Member m) { or exists(Indexer i | m = i | result = - " " + stubModifiers(m) + stubClassName(i.getType()) + " this[" + stubParameters(i) + "] { " - + stubGetter(i) + stubSetter(i) + "}\n" + " " + stubModifiers(m) + stubClassName(i.getType()) + " " + stubExplicitImplementation(i) + + "this[" + stubParameters(i) + "] { " + stubGetter(i) + stubSetter(i) + "}\n" ) or exists(Field f, string impl | f = m and not f instanceof EnumConstant | From 7bf1794310fde45883edd39cbd74b4c3e0267aca Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 10:18:15 +0200 Subject: [PATCH 1532/1662] Add support for delegate stubbing --- csharp/ql/src/Stubs/Stubs.qll | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 14f0adfe61db..69dd3670f33f 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -57,6 +57,8 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { this instanceof Class and result = "class" or this instanceof Enum and result = "enum" + or + this instanceof DelegateType and result = "delegate" } private string stubAbstractModifier() { @@ -87,12 +89,20 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { final string getStub() { if this.isDuplicate() then result = "" - else + else ( + not this instanceof DelegateType and result = this.stubComment() + this.stubAttributes() + this.stubAbstractModifier() + this.stubStaticModifier() + this.stubAccessibilityModifier() + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + stubMembers() + "}\n\n" + or + result = + this.stubComment() + this.stubAttributes() + this.stubAccessibilityModifier() + + this.stubKeyword() + " " + stubClassName(this.(DelegateType).getReturnType()) + " " + + this.getUndecoratedName() + stubGenericArguments(this) + "(" + stubParameters(this) + + ");\n\n" + ) } private ValueOrRefType getAnInterestingBaseType() { From 85b3ec609689a45473062f792eeecf9b92323bcc Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 11:48:31 +0200 Subject: [PATCH 1533/1662] Add support for base ctor calls in stubbing --- csharp/ql/src/Stubs/Stubs.qll | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 69dd3670f33f..9fa4afb5e46a 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -543,6 +543,15 @@ private string stubParameters(Parameterizable p) { ) } +private string stubDefaultArguments(Parameterizable p) { + result = + concat(int i, Parameter param | + param = p.getParameter(i) and not param.getType() instanceof ArglistType + | + "default(" + stubClassName(param.getType()) + ")", ", " order by i + ) +} + private string stubParameterModifiers(Parameter p) { if p.isOut() then result = "out " @@ -609,7 +618,8 @@ private string stubMember(Member m) { (not c.getDeclaringType() instanceof Struct or c.getNumberOfParameters() > 0) | result = - " " + stubModifiers(m) + c.getName() + "(" + stubParameters(c) + ") => throw null;\n" + " " + stubModifiers(m) + c.getName() + "(" + stubParameters(c) + ")" + + stubConstructorInitializer(c) + " => throw null;\n" ) or exists(Indexer i | m = i | @@ -625,6 +635,24 @@ private string stubMember(Member m) { ) } +private string stubConstructorInitializer(Constructor c) { + exists(Constructor baseCtor | + baseCtor = + min(Constructor bc | + c.getDeclaringType().getBaseClass().getAMember() = bc + | + bc order by bc.getNumberOfParameters(), stubParameters(bc) + ) and + if baseCtor.getNumberOfParameters() = 0 + then result = "" + else result = " : base(" + stubDefaultArguments(baseCtor) + ")" + ) + or + // abstract base class might not have a constructor + not exists(Constructor baseCtor | c.getDeclaringType().getBaseClass().getAMember() = baseCtor) and + result = "" +} + private string stubExplicit(ConversionOperator op) { op instanceof ImplicitConversionOperator and result = "implicit " or From 27608b3b385959ee8e289625244c6ad810070cf9 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 14 Apr 2021 12:02:26 +0200 Subject: [PATCH 1534/1662] Add support for event stubbing --- csharp/ql/src/Stubs/Stubs.qll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 9fa4afb5e46a..171b2c3fb4cd 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -633,6 +633,12 @@ private string stubMember(Member m) { result = " " + stubModifiers(m) + stubClassName(f.getType()) + " " + f.getName() + impl + ";\n" ) + or + exists(Event e | m = e | + result = + " " + stubModifiers(m) + "event " + stubClassName(e.getType()) + " " + + stubExplicitImplementation(e) + e.getName() + ";\n" + ) } private string stubConstructorInitializer(Constructor c) { From 264d216a335414a305df8b26ed04d34ca7a85069 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 15 Apr 2021 09:40:41 +0200 Subject: [PATCH 1535/1662] Generate stub for nested classes --- csharp/ql/src/Stubs/Stubs.qll | 144 ++++++++++++++++++++-------------- 1 file changed, 85 insertions(+), 59 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 171b2c3fb4cd..24c8d3352cab 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -128,7 +128,10 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { else result = "" } - private string stubMembers() { result = concat(stubMember(this.getAGeneratedMember())) } + language[monotonicAggregates] + private string stubMembers() { + result = concat(Member m | m = this.getAGeneratedMember() | stubMember(m) order by m.getName()) + } private GeneratedMember getAGeneratedMember() { result.getDeclaringType() = this } @@ -313,8 +316,8 @@ private string stubQualifiedNamePrefix(ValueOrRefType t) { then result = "" else if t.getParent() instanceof Namespace - then result = t.getParent().(Namespace).getQualifiedName() + "." - else result = stubQualifiedNamePrefix(t.getParent()) + "." + then result = t.getDeclaringNamespace().getQualifiedName() + "." + else result = t.getDeclaringType().getQualifiedName() + "." } language[monotonicAggregates] @@ -583,62 +586,85 @@ private string stubExplicitImplementation(Member c) { } private string stubMember(Member m) { - exists(Method c | m = c and not m.getDeclaringType() instanceof Enum | - result = - " " + stubModifiers(c) + stubClassName(c.getReturnType()) + " " + - stubExplicitImplementation(c) + c.getName() + stubGenericMethodParams(c) + "(" + - stubParameters(c) + ")" + stubTypeParametersConstraints(c) + stubImplementation(c) + ";\n" - ) - or - exists(Operator op | - m = op and not m.getDeclaringType() instanceof Enum and not op instanceof ConversionOperator - | - result = - " " + stubModifiers(op) + stubClassName(op.getReturnType()) + " operator " + op.getName() + - "(" + stubParameters(op) + ") => throw null;\n" - ) - or - exists(ConversionOperator op | m = op | - result = - " " + stubModifiers(op) + stubExplicit(op) + "operator " + - stubClassName(op.getReturnType()) + "(" + stubParameters(op) + ") => throw null;\n" - ) - or - result = " " + m.(EnumConstant).getName() + ",\n" - or - exists(Property p | m = p | - result = - " " + stubModifiers(m) + stubClassName(p.getType()) + " " + stubExplicitImplementation(p) + - p.getName() + " { " + stubGetter(p) + stubSetter(p) + "}\n" - ) - or - exists(Constructor c | - m = c and - not c.getDeclaringType() instanceof Enum and - (not c.getDeclaringType() instanceof Struct or c.getNumberOfParameters() > 0) - | - result = - " " + stubModifiers(m) + c.getName() + "(" + stubParameters(c) + ")" + - stubConstructorInitializer(c) + " => throw null;\n" - ) - or - exists(Indexer i | m = i | - result = - " " + stubModifiers(m) + stubClassName(i.getType()) + " " + stubExplicitImplementation(i) + - "this[" + stubParameters(i) + "] { " + stubGetter(i) + stubSetter(i) + "}\n" - ) - or - exists(Field f, string impl | f = m and not f instanceof EnumConstant | - (if f.isConst() then impl = " = throw null" else impl = "") and - result = - " " + stubModifiers(m) + stubClassName(f.getType()) + " " + f.getName() + impl + ";\n" - ) - or - exists(Event e | m = e | - result = - " " + stubModifiers(m) + "event " + stubClassName(e.getType()) + " " + - stubExplicitImplementation(e) + e.getName() + ";\n" - ) + if m instanceof Method + then + if not m.getDeclaringType() instanceof Enum + then + result = + " " + stubModifiers(m) + stubClassName(m.(Method).getReturnType()) + " " + + stubExplicitImplementation(m) + m.getName() + stubGenericMethodParams(m) + "(" + + stubParameters(m) + ")" + stubTypeParametersConstraints(m) + stubImplementation(m) + ";\n" + else result = " // Stub generator skipped method: " + m.getName() + "\n" + else + if m instanceof Operator + then + if + not m.getDeclaringType() instanceof Enum and + not m instanceof ConversionOperator + then + result = + " " + stubModifiers(m) + stubClassName(m.(Operator).getReturnType()) + " operator " + + m.getName() + "(" + stubParameters(m) + ") => throw null;\n" + else result = " // Stub generator skipped operator: " + m.getName() + "\n" + else + if m instanceof ConversionOperator + then + result = + " " + stubModifiers(m) + stubExplicit(m) + "operator " + + stubClassName(m.(ConversionOperator).getReturnType()) + "(" + stubParameters(m) + + ") => throw null;\n" + else + if m instanceof EnumConstant + then result = " " + m.(EnumConstant).getName() + ",\n" + else + if m instanceof Property + then + result = + " " + stubModifiers(m) + stubClassName(m.(Property).getType()) + " " + + stubExplicitImplementation(m) + m.getName() + " { " + stubGetter(m) + stubSetter(m) + + "}\n" + else + if m instanceof Constructor + then + if + not m.getDeclaringType() instanceof Enum and + ( + not m.getDeclaringType() instanceof Struct or + m.(Constructor).getNumberOfParameters() > 0 + ) + then + result = + " " + stubModifiers(m) + m.getName() + "(" + stubParameters(m) + ")" + + stubConstructorInitializer(m) + " => throw null;\n" + else result = " // Stub generator skipped constructor \n" + else + if m instanceof Indexer + then + result = + " " + stubModifiers(m) + stubClassName(m.(Indexer).getType()) + " " + + stubExplicitImplementation(m) + "this[" + stubParameters(m) + "] { " + + stubGetter(m) + stubSetter(m) + "}\n" + else + if m instanceof Field // EnumConstants are already stubbed + then + exists(string impl | + (if m.(Field).isConst() then impl = " = throw null" else impl = "") and + result = + " " + stubModifiers(m) + stubClassName(m.(Field).getType()) + " " + + m.(Field).getName() + impl + ";\n" + ) + else + if m instanceof Event + then + result = + " " + stubModifiers(m) + "event " + stubClassName(m.(Event).getType()) + + " " + stubExplicitImplementation(m) + m.getName() + ";\n" + else + if m instanceof GeneratedType + then result = m.(GeneratedType).getStub() + "\n" + else + result = + " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" } private string stubConstructorInitializer(Constructor c) { From 1aadd3f3d6f1e240b9350a362f3b9d65abd8486e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 15 Apr 2021 13:05:37 +0200 Subject: [PATCH 1536/1662] Fix constant value stubbing --- csharp/ql/src/Stubs/Stubs.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 24c8d3352cab..ca653026a390 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -648,7 +648,7 @@ private string stubMember(Member m) { if m instanceof Field // EnumConstants are already stubbed then exists(string impl | - (if m.(Field).isConst() then impl = " = throw null" else impl = "") and + (if m.(Field).isConst() then impl = " = default" else impl = "") and result = " " + stubModifiers(m) + stubClassName(m.(Field).getType()) + " " + m.(Field).getName() + impl + ";\n" From 66eca53b00c9831dd10d9f13e79683215acdb3fd Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 15 Apr 2021 16:31:47 +0200 Subject: [PATCH 1537/1662] Fix accessibility modifier stubbing --- csharp/ql/src/Stubs/Stubs.qll | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index ca653026a390..ae44dd14c41f 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -81,10 +81,6 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { min(this.getLocation().toString()) + "`\n" } - private string stubAccessibilityModifier() { - if this.isPublic() then result = "public " else result = "" - } - /** Gets the entire C# stub code for this type. */ final string getStub() { if this.isDuplicate() @@ -93,15 +89,14 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { not this instanceof DelegateType and result = this.stubComment() + this.stubAttributes() + this.stubAbstractModifier() + - this.stubStaticModifier() + this.stubAccessibilityModifier() + this.stubKeyword() + " " + + this.stubStaticModifier() + stubAccessibility(this) + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + stubMembers() + "}\n\n" or result = - this.stubComment() + this.stubAttributes() + this.stubAccessibilityModifier() + - this.stubKeyword() + " " + stubClassName(this.(DelegateType).getReturnType()) + " " + - this.getUndecoratedName() + stubGenericArguments(this) + "(" + stubParameters(this) + - ");\n\n" + this.stubComment() + this.stubAttributes() + stubAccessibility(this) + this.stubKeyword() + + " " + stubClassName(this.(DelegateType).getReturnType()) + " " + this.getUndecoratedName() + + stubGenericArguments(this) + "(" + stubParameters(this) + ");\n\n" ) } @@ -273,7 +268,13 @@ private string stubAccessibility(Member m) { then result = "public " else if m.isProtected() - then result = "protected " + then + if m.isPrivate() + then result = "protected private " + else + if m.isInternal() + then result = "protected internal " + else result = "protected " else if m.isPrivate() then result = "private " From eabf6b0be8f90dd0e91d7a4661a436cd4006afc8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 09:56:52 +0200 Subject: [PATCH 1538/1662] Only stub effectively public declarations --- csharp/ql/src/Stubs/MinimalStubsFromSource.ql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql index c4311b40ac2e..90b83e1f1855 100644 --- a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql +++ b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql @@ -25,7 +25,8 @@ class UsedInSource extends GeneratedDeclaration { or this = any(Attribute a).getType().getAConstructor() ) and - this.fromLibrary() + this.fromLibrary() and + this.(Modifiable).isEffectivelyPublic() } } From 53655d4ae4475239181c7673d27f5c9db215abb9 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 11:25:56 +0200 Subject: [PATCH 1539/1662] Only stub declarations from libraries --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 5 +---- csharp/ql/src/Stubs/MinimalStubsFromSource.ql | 3 +-- csharp/ql/src/Stubs/Stubs.qll | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql index ad99f96e0439..ecb1ea8bdc3a 100644 --- a/csharp/ql/src/Stubs/AllStubsFromReference.ql +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -7,10 +7,7 @@ import Stubs /** All public declarations from assemblies. */ class AllExternalPublicDeclarations extends GeneratedDeclaration { - AllExternalPublicDeclarations() { - this.fromLibrary() and - this.(Modifiable).isEffectivelyPublic() - } + AllExternalPublicDeclarations() { this.fromLibrary() } } /** All framework assemblies. */ diff --git a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql index 90b83e1f1855..c4311b40ac2e 100644 --- a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql +++ b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql @@ -25,8 +25,7 @@ class UsedInSource extends GeneratedDeclaration { or this = any(Attribute a).getType().getAConstructor() ) and - this.fromLibrary() and - this.(Modifiable).isEffectivelyPublic() + this.fromLibrary() } } diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index ae44dd14c41f..14af2f354bcb 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -148,7 +148,9 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { * This is extended in client code to identify the actual * declarations that should be generated. */ -abstract class GeneratedDeclaration extends Declaration { } +abstract class GeneratedDeclaration extends Declaration { + GeneratedDeclaration() { this.(Modifiable).isEffectivelyPublic() } +} private class IndirectType extends GeneratedType { IndirectType() { From cda285de18fbb5d6e270e01d98e54d3f9e877dff Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 11:44:42 +0200 Subject: [PATCH 1540/1662] Use dotnet format to format the output stub file --- csharp/ql/src/Stubs/make_stubs_nuget.py | 47 +++++++++++++++++-------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index d5e7bf41031b..236aa1cf6233 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -2,10 +2,10 @@ import os import helpers - -print('Script to generate stub.cs file from a nuget package') -print('Usage: python ' + sys.argv[0] + +print('Script to generate stub file from a nuget package') +print(' Usage: python ' + sys.argv[0] + ' NUGET_PACKAGE_NAME [VERSION=latest] [WORK_DIR=tempDir] [OUTPUT_NAME=stub]') +print(' The script uses the dotnet cli, codeql cli, and dotnet format global tool') if len(sys.argv) < 2: print("\nPlease supply a nuget package name.") @@ -16,35 +16,42 @@ nuget = sys.argv[1] workDir = os.path.abspath(helpers.get_argv(3, "tempDir")) -projectName = "proj" -projectDir = os.path.join(workDir, projectName) +projectNameIn = "input" +projectDirIn = os.path.join(workDir, projectNameIn) + +projectNameOut = "output" +projectDirOut = os.path.join(workDir, projectNameOut) dbName = 'db' dbDir = os.path.join(workDir, dbName) outputName = helpers.get_argv(4, "stub") -outputFile = os.path.join(workDir, outputName + '.cs') -bqrsFile = os.path.join(workDir, outputName + '.bqrs') +outputFile = os.path.join(projectDirOut, outputName + '.cs') +bqrsFile = os.path.join(projectDirOut, outputName + '.bqrs') version = helpers.get_argv(2, "latest") -print("\nCreating new project") +print("\n* Creating new input project") helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", '--name', - projectName, '--output', projectDir]) + projectNameIn, '--output', projectDirIn]) -print("\nAdding reference") -cmd = ['dotnet', 'add', projectDir, 'package', nuget] +print("\n* Adding reference to package: " + nuget) +cmd = ['dotnet', 'add', projectDirIn, 'package', nuget] if (version != "latest"): cmd.append('--version') cmd.append(version) helpers.run_cmd(cmd) -print("\nCreating DB") +print("\n* Creating DB") helpers.run_cmd(['codeql', 'database', 'create', dbDir, '--language=csharp', - '--command', 'dotnet build /t:rebuild ' + projectDir]) + '--command', 'dotnet build /t:rebuild ' + projectDirIn]) if not os.path.isdir(dbDir): print("Expected database directory " + dbDir + " not found.") exit(1) -print("\nRunning query") +print("\n* Creating new output project") +helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", '--name', + projectNameOut, '--output', projectDirOut]) + +print("\n* Running stubbing CodeQL query") helpers.run_cmd(['codeql', 'query', 'run', os.path.join( thisDir, 'AllStubsFromReference.ql'), '--database', dbDir, '--output', bqrsFile]) @@ -53,5 +60,15 @@ helpers.trim_output_file(outputFile) -print("\nOutput: " + outputFile) +print("\n --> Generated output file: " + outputFile) + +print("\n* Formatting file") +helpers.run_cmd(['dotnet', 'format', projectDirOut, + '--include', outputName + '.cs']) + +print("\n* Building output project") +helpers.run_cmd(['dotnet', 'build', '/t:rebuild', projectDirOut], + 'ERR: Build failed. Script failed to generate a stub that builds') + +print("\n --> Generated output file: " + outputFile) exit(0) From ff4db5b8d27c35f7184bdb85d56f92b8b58640f5 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 13:51:17 +0200 Subject: [PATCH 1541/1662] Fix abstract override member generation --- csharp/ql/src/Stubs/Stubs.qll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 14af2f354bcb..c55abbfa3cd5 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -307,7 +307,10 @@ private string stubOverride(Member m) { then result = "virtual " else if m.(Virtualizable).isAbstract() - then result = "abstract " + then + if m.(Virtualizable).isOverride() + then result = "abstract override " + else result = "abstract " else if m.(Virtualizable).isOverride() then result = "override " From 8cbdd30e1e9bc252531ec4d6e25f0996d652dcf3 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 14:05:39 +0200 Subject: [PATCH 1542/1662] Fix generic type constraint stubbing on overrides --- csharp/ql/src/Stubs/Stubs.qll | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index c55abbfa3cd5..6a7eb2bc4196 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -433,10 +433,22 @@ private string stubConstraints(TypeParameterConstraints tpc) { } private string stubTypeParameterConstraints(TypeParameter tp) { - exists(TypeParameterConstraints tpc | tpc = tp.getConstraints() | - result = - " where " + tp.getName() + ": " + strictconcat(string s | s = stubConstraints(tpc) | s, ", ") - ) + if + tp.getDeclaringGeneric().(Virtualizable).isOverride() or + tp.getDeclaringGeneric().(Virtualizable).implementsExplicitInterface() + then + if tp.getConstraints().hasValueTypeConstraint() + then result = " where " + tp.getName() + ": struct" + else + if tp.getConstraints().hasRefTypeConstraint() + then result = " where " + tp.getName() + ": class" + else result = "" + else + exists(TypeParameterConstraints tpc | tpc = tp.getConstraints() | + result = + " where " + tp.getName() + ": " + + strictconcat(string s | s = stubConstraints(tpc) | s, ", ") + ) } private string stubTypeParametersConstraints(Declaration d) { From e6bfb0d1d2d649036033f4bee4b6eaa94da85e7d Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 14:11:35 +0200 Subject: [PATCH 1543/1662] Fix qualified name stubbing for nested types --- csharp/ql/src/Stubs/Stubs.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 6a7eb2bc4196..e65bb8fffc3e 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -323,7 +323,7 @@ private string stubQualifiedNamePrefix(ValueOrRefType t) { else if t.getParent() instanceof Namespace then result = t.getDeclaringNamespace().getQualifiedName() + "." - else result = t.getDeclaringType().getQualifiedName() + "." + else result = stubClassName(t.getDeclaringType()) + "." } language[monotonicAggregates] From 3c3ddcc8fb42c561deacfc73b274ca0bccf44ac1 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 15:36:54 +0200 Subject: [PATCH 1544/1662] Fix protected internal on override in the same assembly --- csharp/ql/src/Stubs/Stubs.qll | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index e65bb8fffc3e..f2b2992be4a6 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -260,6 +260,15 @@ private class DefaultLibs extends ExcludedAssembly { } } +private Virtualizable getAccessibilityDeclaringVirtualizable(Virtualizable v) { + if not v.isOverride() + then result = v + else + if not v.getOverridee().getLocation() instanceof ExcludedAssembly + then result = getAccessibilityDeclaringVirtualizable(v.getOverridee()) + else result = v +} + private string stubAccessibility(Member m) { if m.getDeclaringType() instanceof Interface or @@ -271,10 +280,10 @@ private string stubAccessibility(Member m) { else if m.isProtected() then - if m.isPrivate() + if m.isPrivate() or getAccessibilityDeclaringVirtualizable(m).isPrivate() then result = "protected private " else - if m.isInternal() + if m.isInternal() or getAccessibilityDeclaringVirtualizable(m).isInternal() then result = "protected internal " else result = "protected " else From 9b6e9ab1482365048b8cd292ad0483da840d7b1a Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 15:37:11 +0200 Subject: [PATCH 1545/1662] Escape field names --- csharp/ql/src/Stubs/Stubs.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index f2b2992be4a6..dc220e9a1a52 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -678,7 +678,7 @@ private string stubMember(Member m) { (if m.(Field).isConst() then impl = " = default" else impl = "") and result = " " + stubModifiers(m) + stubClassName(m.(Field).getType()) + " " + - m.(Field).getName() + impl + ";\n" + escapeIfKeyword(m.(Field).getName()) + impl + ";\n" ) else if m instanceof Event From bd83f74dca46f9ed40722394d81724364221318f Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 17:13:24 +0200 Subject: [PATCH 1546/1662] Fix generic type constraint order --- csharp/ql/src/Stubs/Stubs.qll | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index dc220e9a1a52..85c3fdd20279 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -425,20 +425,20 @@ private string stubGenericMethodParams(Method m) { else result = "" } -private string stubConstraints(TypeParameterConstraints tpc) { - tpc.hasConstructorConstraint() and result = "new()" +private string stubConstraints(TypeParameterConstraints tpc, int i) { + tpc.hasConstructorConstraint() and result = "new()" and i = 2 or - tpc.hasUnmanagedTypeConstraint() and result = "unmanaged" + tpc.hasUnmanagedTypeConstraint() and result = "unmanaged" and i = 0 or - tpc.hasValueTypeConstraint() and result = "struct" + tpc.hasValueTypeConstraint() and result = "struct" and i = 0 or - tpc.hasRefTypeConstraint() and result = "class" + tpc.hasRefTypeConstraint() and result = "class" and i = 0 or - result = tpc.getATypeConstraint().(TypeParameter).getName() + result = tpc.getATypeConstraint().(TypeParameter).getName() and i = 1 or - result = stubClassName(tpc.getATypeConstraint().(Interface)) + result = stubClassName(tpc.getATypeConstraint().(Interface)) and i = 1 or - result = stubClassName(tpc.getATypeConstraint().(Class)) + result = stubClassName(tpc.getATypeConstraint().(Class)) and i = 1 } private string stubTypeParameterConstraints(TypeParameter tp) { @@ -456,7 +456,7 @@ private string stubTypeParameterConstraints(TypeParameter tp) { exists(TypeParameterConstraints tpc | tpc = tp.getConstraints() | result = " where " + tp.getName() + ": " + - strictconcat(string s | s = stubConstraints(tpc) | s, ", ") + strictconcat(string s, int i | s = stubConstraints(tpc, i) | s, ", " order by i) ) } From 3e92be5324005d170048f5813bb7412c7d838607 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 21:57:56 +0200 Subject: [PATCH 1547/1662] Extract private/internal members from referenced assemblies + stub required non public constructors --- csharp/ql/src/Stubs/Stubs.qll | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 85c3fdd20279..b14873821229 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -202,6 +202,25 @@ private class InheritedMember extends GeneratedMember, Virtualizable { } } +private class ExtraGeneratedConstructor extends GeneratedMember, Constructor { + ExtraGeneratedConstructor() { + not this.isEffectivelyPublic() and + this.getDeclaringType() instanceof GeneratedType and + ( + // if the base class has no 0 parameter constructor + not exists(Constructor c | + c = this.getDeclaringType().getBaseClass().getAMember() and c.getNumberOfParameters() = 0 + ) + or + // if this constructor might be called from a derived class + exists(Class c | + c.getBaseClass() = this.getDeclaringType() and + this = getBaseConstructor(c) + ) + ) + } +} + /** A namespace that contains at least one generated type. */ private class GeneratedNamespace extends Namespace, GeneratedElement { GeneratedNamespace() { @@ -694,14 +713,18 @@ private string stubMember(Member m) { " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" } +private Constructor getBaseConstructor(ValueOrRefType type) { + result = + min(Constructor bc | + type.getBaseClass().getAMember() = bc + | + bc order by bc.getNumberOfParameters(), stubParameters(bc) + ) +} + private string stubConstructorInitializer(Constructor c) { exists(Constructor baseCtor | - baseCtor = - min(Constructor bc | - c.getDeclaringType().getBaseClass().getAMember() = bc - | - bc order by bc.getNumberOfParameters(), stubParameters(bc) - ) and + baseCtor = getBaseConstructor(c.getDeclaringType()) and if baseCtor.getNumberOfParameters() = 0 then result = "" else result = " : base(" + stubDefaultArguments(baseCtor) + ")" From e96754c2d5fd9224d5b4cb52d52b79e850f552b6 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 23:29:02 +0200 Subject: [PATCH 1548/1662] Fix all remaining issues to stub entity framework core --- csharp/ql/src/Stubs/Stubs.qll | 37 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index b14873821229..1adbb63dcfb7 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -290,8 +290,11 @@ private Virtualizable getAccessibilityDeclaringVirtualizable(Virtualizable v) { private string stubAccessibility(Member m) { if - m.getDeclaringType() instanceof Interface or + m.getDeclaringType() instanceof Interface + or exists(m.(Virtualizable).getExplicitlyImplementedInterface()) + or + m instanceof Constructor and m.isStatic() then result = "" else if m.isPublic() @@ -445,7 +448,7 @@ private string stubGenericMethodParams(Method m) { } private string stubConstraints(TypeParameterConstraints tpc, int i) { - tpc.hasConstructorConstraint() and result = "new()" and i = 2 + tpc.hasConstructorConstraint() and result = "new()" and i = 4 or tpc.hasUnmanagedTypeConstraint() and result = "unmanaged" and i = 0 or @@ -453,9 +456,9 @@ private string stubConstraints(TypeParameterConstraints tpc, int i) { or tpc.hasRefTypeConstraint() and result = "class" and i = 0 or - result = tpc.getATypeConstraint().(TypeParameter).getName() and i = 1 + result = tpc.getATypeConstraint().(TypeParameter).getName() and i = 3 or - result = stubClassName(tpc.getATypeConstraint().(Interface)) and i = 1 + result = stubClassName(tpc.getATypeConstraint().(Interface)) and i = 2 or result = stubClassName(tpc.getATypeConstraint().(Class)) and i = 1 } @@ -492,9 +495,7 @@ private string stubTypeParametersConstraints(Declaration d) { } private string stubImplementation(Virtualizable c) { - if c.isAbstract() or c.getDeclaringType() instanceof Interface - then result = "" - else result = " => throw null" + if c.isAbstract() then result = "" else result = " => throw null" } private predicate isKeyword(string s) { @@ -716,7 +717,11 @@ private string stubMember(Member m) { private Constructor getBaseConstructor(ValueOrRefType type) { result = min(Constructor bc | - type.getBaseClass().getAMember() = bc + type.getBaseClass().getAMember() = bc and + // not the `static` constructor + not bc.isStatic() and + // not a `private` constructor, unless it's `private protected`, or if the derived class is nested + (not bc.isPrivate() or bc.isProtected() or bc.getDeclaringType() = type.getDeclaringType+()) | bc order by bc.getNumberOfParameters(), stubParameters(bc) ) @@ -725,13 +730,15 @@ private Constructor getBaseConstructor(ValueOrRefType type) { private string stubConstructorInitializer(Constructor c) { exists(Constructor baseCtor | baseCtor = getBaseConstructor(c.getDeclaringType()) and - if baseCtor.getNumberOfParameters() = 0 + if baseCtor.getNumberOfParameters() = 0 or c.isStatic() then result = "" else result = " : base(" + stubDefaultArguments(baseCtor) + ")" ) or // abstract base class might not have a constructor - not exists(Constructor baseCtor | c.getDeclaringType().getBaseClass().getAMember() = baseCtor) and + not exists(Constructor baseCtor | + c.getDeclaringType().getBaseClass().getAMember() = baseCtor and not baseCtor.isStatic() + ) and result = "" } @@ -743,19 +750,13 @@ private string stubExplicit(ConversionOperator op) { private string stubGetter(DeclarationWithGetSetAccessors p) { if exists(p.getGetter()) - then - if p.isAbstract() or p.getDeclaringType() instanceof Interface - then result = "get; " - else result = "get => throw null; " + then if p.isAbstract() then result = "get; " else result = "get => throw null; " else result = "" } private string stubSetter(DeclarationWithGetSetAccessors p) { if exists(p.getSetter()) - then - if p.isAbstract() or p.getDeclaringType() instanceof Interface - then result = "set; " - else result = "set => throw null; " + then if p.isAbstract() then result = "set; " else result = "set => throw null; " else result = "" } From 4e0bbffac43b2a9515710915320e318695b4c47e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 22 Apr 2021 15:45:59 +0200 Subject: [PATCH 1549/1662] Fix ExtraGeneratedConstructor to exclude static constructors and take into account generic derived classes --- csharp/ql/src/Stubs/Stubs.qll | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 1adbb63dcfb7..b013a3acfccd 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -204,6 +204,7 @@ private class InheritedMember extends GeneratedMember, Virtualizable { private class ExtraGeneratedConstructor extends GeneratedMember, Constructor { ExtraGeneratedConstructor() { + not this.isStatic() and not this.isEffectivelyPublic() and this.getDeclaringType() instanceof GeneratedType and ( @@ -212,10 +213,10 @@ private class ExtraGeneratedConstructor extends GeneratedMember, Constructor { c = this.getDeclaringType().getBaseClass().getAMember() and c.getNumberOfParameters() = 0 ) or - // if this constructor might be called from a derived class + // if this constructor might be called from a (generic) derived class exists(Class c | - c.getBaseClass() = this.getDeclaringType() and - this = getBaseConstructor(c) + this.getDeclaringType() = c.getBaseClass().getUnboundDeclaration() and + this = getBaseConstructor(c).getUnboundDeclaration() ) ) } From 5e07d82b424c87f0d786ec5aebbea603d57150dc Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 22 Apr 2021 16:06:04 +0200 Subject: [PATCH 1550/1662] Stub unsafe modifier --- csharp/ql/src/Stubs/Stubs.qll | 6 +++++- csharp/ql/src/Stubs/make_stubs_nuget.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index b013a3acfccd..17736d33bcfd 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -319,7 +319,11 @@ private string stubAccessibility(Member m) { } private string stubModifiers(Member m) { - result = stubAccessibility(m) + stubStaticOrConst(m) + stubOverride(m) + result = stubUnsafe(m) + stubAccessibility(m) + stubStaticOrConst(m) + stubOverride(m) +} + +private string stubUnsafe(Member m) { + if m.(Modifiable).isUnsafe() then result = "unsafe " else result = "" } private string stubStaticOrConst(Member m) { diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index 236aa1cf6233..4f7da9491b7b 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -67,7 +67,7 @@ '--include', outputName + '.cs']) print("\n* Building output project") -helpers.run_cmd(['dotnet', 'build', '/t:rebuild', projectDirOut], +helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', projectDirOut], 'ERR: Build failed. Script failed to generate a stub that builds') print("\n --> Generated output file: " + outputFile) From 7e7a52de3cffa4b1afc52a992da7dcaa02c64ea0 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 23 Apr 2021 11:10:28 +0200 Subject: [PATCH 1551/1662] Stub IndexerName attribute --- csharp/ql/src/Stubs/Stubs.qll | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 17736d33bcfd..f84200327a5e 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -693,9 +693,9 @@ private string stubMember(Member m) { if m instanceof Indexer then result = - " " + stubModifiers(m) + stubClassName(m.(Indexer).getType()) + " " + - stubExplicitImplementation(m) + "this[" + stubParameters(m) + "] { " + - stubGetter(m) + stubSetter(m) + "}\n" + " " + stubIndexerNameAttribute(m) + stubModifiers(m) + + stubClassName(m.(Indexer).getType()) + " " + stubExplicitImplementation(m) + + "this[" + stubParameters(m) + "] { " + stubGetter(m) + stubSetter(m) + "}\n" else if m instanceof Field // EnumConstants are already stubbed then @@ -719,6 +719,12 @@ private string stubMember(Member m) { " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" } +private string stubIndexerNameAttribute(Indexer i) { + if i.getName() != "Item" + then result = "[System.Runtime.CompilerServices.IndexerName(\"" + i.getName() + "\")]\n " + else result = "" +} + private Constructor getBaseConstructor(ValueOrRefType type) { result = min(Constructor bc | From ba238578d13ef6f0bc0c455e31e0ca4a1ed6be35 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 16 Apr 2021 12:58:04 +0200 Subject: [PATCH 1552/1662] Add stubbing tests --- csharp/ql/src/Stubs/AllStubsFromSource.ql | 13 ++ csharp/ql/src/Stubs/Stubs.qll | 6 +- .../query-tests/Stubs/All/AllStubs.expected | 1 + .../test/query-tests/Stubs/All/AllStubs.qlref | 1 + csharp/ql/test/query-tests/Stubs/All/Test.cs | 132 ++++++++++++++++++ .../Minimal/MinimalStubsFromSource.expected | 1 + .../MinimalStubsFromSource.qlref | 0 .../query-tests/Stubs/{ => Minimal}/Test.cs | 2 +- .../Stubs/MinimalStubsFromSource.expected | 1 - 9 files changed, 152 insertions(+), 5 deletions(-) create mode 100644 csharp/ql/src/Stubs/AllStubsFromSource.ql create mode 100644 csharp/ql/test/query-tests/Stubs/All/AllStubs.expected create mode 100644 csharp/ql/test/query-tests/Stubs/All/AllStubs.qlref create mode 100644 csharp/ql/test/query-tests/Stubs/All/Test.cs create mode 100644 csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected rename csharp/ql/test/query-tests/Stubs/{ => Minimal}/MinimalStubsFromSource.qlref (100%) rename csharp/ql/test/query-tests/Stubs/{ => Minimal}/Test.cs (97%) delete mode 100644 csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.expected diff --git a/csharp/ql/src/Stubs/AllStubsFromSource.ql b/csharp/ql/src/Stubs/AllStubsFromSource.ql new file mode 100644 index 000000000000..e8d30c1e1f57 --- /dev/null +++ b/csharp/ql/src/Stubs/AllStubsFromSource.ql @@ -0,0 +1,13 @@ +/** + * Tool to generate C# stubs from a qltest snapshot. + */ + +import csharp +import Stubs + +/** All public declarations from source. */ +class AllDeclarations extends GeneratedDeclaration { + AllDeclarations() { not this.fromLibrary() } +} + +select generatedCode() diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index f84200327a5e..c3c21de2b903 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -34,8 +34,7 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { this instanceof DelegateType ) and not this instanceof ConstructedType and - not this.getALocation() instanceof ExcludedAssembly and - this.fromLibrary() + not this.getALocation() instanceof ExcludedAssembly } /** @@ -103,7 +102,8 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { private ValueOrRefType getAnInterestingBaseType() { result = this.getABaseType() and not result instanceof ObjectType and - not result.getQualifiedName() = "System.ValueType" + not result.getQualifiedName() = "System.ValueType" and + (not result instanceof Interface or result.(Interface).isEffectivelyPublic()) } private string stubBaseTypesString() { diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected new file mode 100644 index 000000000000..35d05f712912 --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected @@ -0,0 +1 @@ +| // This file contains auto-generated code.\n\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23`\npublic class Class1\n{\n public Class1() => throw null;\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n public Class11(int i) => throw null;\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28`\npublic class Class12 : Test.Class1.Class11\n{\n public Class12(int i, float j) : base(default(int)) => throw null;\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37`\nabstract public class Class13\n{\n protected Class13() => throw null;\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37`\nabstract public class Class14 : Test.Class1.Class13\n{\n protected Class14() => throw null;\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35`\npublic class GenericType\n{\n public GenericType() => throw null;\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26`\npublic class X\n{\n public X() => throw null;\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n // Stub generator skipped constructor \n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23`\npublic class Class3\n{\n public Class3() => throw null;\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23`\npublic class Class4\n{\n public Class4() => throw null;\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23`\npublic class Class5 : Test.IInterface1\n{\n public Class5() => throw null;\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26`\npublic class Class6 where T: class, Test.IInterface1\n{\n public Class6(int i) => throw null;\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23`\npublic class Class7 : Test.Class6\n{\n public Class7(int i) : base(default(int)) => throw null;\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23`\npublic class Class8\n{\n public Class8() => throw null;\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23`\npublic class Class9\n{\n private Class9(int i) => throw null;\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27`\npublic class Nested : Test.Class9\n{\n internal Nested(int i) : base(default(int)) => throw null;\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n | diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.qlref b/csharp/ql/test/query-tests/Stubs/All/AllStubs.qlref new file mode 100644 index 000000000000..0f7425d26b5b --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.qlref @@ -0,0 +1 @@ +Stubs/AllStubsFromSource.ql diff --git a/csharp/ql/test/query-tests/Stubs/All/Test.cs b/csharp/ql/test/query-tests/Stubs/All/Test.cs new file mode 100644 index 000000000000..bbb7f0684aee --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/All/Test.cs @@ -0,0 +1,132 @@ +namespace Test +{ + public class Class1 + { + public struct Struct1 + { + public int i; + public const int j = 42; + + public void Method(Struct1 s = new Struct1()) => throw null; + } + + public interface Interface1 + { + void Method1(); + } + + internal protected interface Interface2 + { + void Method2(); + int this[int i] { get; } + } + + private protected interface Interface3 + { + void Method3(); + } + + public class Class11 : Interface1, Interface2, Interface3 + { + public Class11(int i) => throw null; + + public void Method1() => throw null; + + void Interface2.Method2() => throw null; + + int Interface2.this[int i] => throw null; + + void Interface3.Method3() => throw null; + } + + public delegate void Delegate1(T i, int j); + + public event Delegate1 Event1 { add { } remove { } } + + public class Class12 : Class11 + { + public Class12(int i, float j) : base(1) => throw null; + } + + public class GenericType + { + public class X { } + } + + public GenericType.X Prop { get; } + + public abstract class Class13 + { + protected internal virtual void M() => throw null; + public virtual void M1() where T : Class13 => throw null; + public abstract void M2(); + } + + public abstract class Class14 : Class13 + { + protected internal override void M() => throw null; + public override void M1() => throw null; + public abstract override void M2(); + } + + } + + internal class Class2 + { + public void M() => throw null; + } + + public class Class3 + { + public object Item { get; set; } + [System.Runtime.CompilerServices.IndexerName("MyItem")] + public object this[string index] { get { return null; } set { } } + } + + public class Class4 + { + unsafe public void M(int* p) => throw null; + } + + public interface IInterface1 + { + void M1() => throw null; + void M2(); + } + + public class Class5 : IInterface1 + { + public void M2() => throw null; + } + + public class Class6 where T : class, IInterface1 + { + public Class6(int i) => throw null; + + public virtual void M1() where T : class, IInterface1, new() => throw null; + } + + public class Class7 : Class6 + { + public Class7(int i) : base(i) => throw null; + + public override void M1() where T : class => throw null; + } + + public class Class8 + { + public const int @this = 10; + } + + public class Class9 + { + private Class9(int i) => throw null; + + public class Nested : Class9 + { + internal Nested(int i) : base(i) => throw null; + } + + public Class9.Nested NestedInstance { get; } = new Class9.Nested(1); + } +} \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected b/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected new file mode 100644 index 000000000000..f889f24cf80b --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected @@ -0,0 +1 @@ +| // This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\n// Generated from `System.Uri` in `System.Private.Uri, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Uri : System.Runtime.Serialization.ISerializable\n{\n public override bool Equals(object comparand) => throw null;\n public override int GetHashCode() => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null;\n public override string ToString() => throw null;\n}\n\nnamespace Collections\n{\n// Generated from `System.Collections.SortedList` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SortedList : System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection\n{\n public virtual void Add(object key, object value) => throw null;\n public virtual void Clear() => throw null;\n public virtual object Clone() => throw null;\n public virtual bool Contains(object key) => throw null;\n public virtual void CopyTo(System.Array array, int arrayIndex) => throw null;\n public virtual int Count { get => throw null; }\n public virtual object GetByIndex(int index) => throw null;\n public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public virtual bool IsFixedSize { get => throw null; }\n public virtual bool IsReadOnly { get => throw null; }\n public virtual bool IsSynchronized { get => throw null; }\n public virtual object this[object key] { get => throw null; set => throw null; }\n public virtual System.Collections.ICollection Keys { get => throw null; }\n public virtual void Remove(object key) => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual System.Collections.ICollection Values { get => throw null; }\n}\n\nnamespace Generic\n{\n// Generated from `System.Collections.Generic.Stack<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Stack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null;\n public int Count { get => throw null; }\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public T Peek() => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n}\nnamespace Specialized\n{\n// Generated from `System.Collections.Specialized.NameObjectCollectionBase` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class NameObjectCollectionBase : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n public virtual int Count { get => throw null; }\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public virtual void OnDeserialization(object sender) => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n// Generated from `System.Collections.Specialized.NameValueCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NameValueCollection : System.Collections.Specialized.NameObjectCollectionBase\n{\n public string this[string name] { get => throw null; set => throw null; }\n}\n\n}\n}\nnamespace ComponentModel\n{\n// Generated from `System.ComponentModel.ComponentConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ComponentConverter : System.ComponentModel.ReferenceConverter\n{\n}\n\n// Generated from `System.ComponentModel.DefaultEventAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultEventAttribute : System.Attribute\n{\n public DefaultEventAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.DefaultPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultPropertyAttribute : System.Attribute\n{\n public DefaultPropertyAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.ReferenceConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ReferenceConverter : System.ComponentModel.TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeConverterAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverterAttribute : System.Attribute\n{\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n public TypeConverterAttribute(string typeName) => throw null;\n public TypeConverterAttribute(System.Type type) => throw null;\n public TypeConverterAttribute() => throw null;\n}\n\n// Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeDescriptionProviderAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeDescriptionProviderAttribute : System.Attribute\n{\n public TypeDescriptionProviderAttribute(string typeName) => throw null;\n public TypeDescriptionProviderAttribute(System.Type type) => throw null;\n}\n\n}\nnamespace Linq\n{\n// Generated from `System.Linq.Enumerable` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Enumerable\n{\n public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null;\n}\n\n// Generated from `System.Linq.IQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IQueryable : System.Collections.IEnumerable\n{\n}\n\n// Generated from `System.Linq.ParallelEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class ParallelEnumerable\n{\n public static System.Linq.ParallelQuery AsParallel(this System.Collections.IEnumerable source) => throw null;\n}\n\n// Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParallelQuery : System.Collections.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n internal ParallelQuery(System.Linq.Parallel.QuerySettings specifiedSettings) => throw null;\n}\n\n// Generated from `System.Linq.Queryable` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Queryable\n{\n public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) => throw null;\n}\n\nnamespace Parallel\n{\n// Generated from `System.Linq.Parallel.QuerySettings` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\ninternal struct QuerySettings\n{\n}\n\n}\n}\nnamespace Runtime\n{\nnamespace Serialization\n{\n// Generated from `System.Runtime.Serialization.DataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataContractAttribute : System.Attribute\n{\n public DataContractAttribute() => throw null;\n}\n\n// Generated from `System.Runtime.Serialization.DataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataMemberAttribute : System.Attribute\n{\n public DataMemberAttribute() => throw null;\n}\n\n}\n}\nnamespace Text\n{\nnamespace RegularExpressions\n{\n// Generated from `System.Text.RegularExpressions.Capture` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Capture\n{\n internal Capture(string text, int index, int length) => throw null;\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Group` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Group : System.Text.RegularExpressions.Capture\n{\n internal Group(string text, int[] caps, int capcount, string name) : base(default(string), default(int), default(int)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Match` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Match : System.Text.RegularExpressions.Group\n{\n internal Match(System.Text.RegularExpressions.Regex regex, int capcount, string text, int begpos, int len, int startpos) : base(default(string), default(int[]), default(int), default(string)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.RegexOptions` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\n[System.Flags]\npublic enum RegexOptions\n{\n IgnoreCase,\n}\n\n// Generated from `System.Text.RegularExpressions.Regex` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Regex : System.Runtime.Serialization.ISerializable\n{\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern) => throw null;\n public System.Text.RegularExpressions.Match Match(string input) => throw null;\n public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public Regex(string pattern) => throw null;\n public string Replace(string input, string replacement) => throw null;\n public override string ToString() => throw null;\n}\n\n}\n}\nnamespace Timers\n{\n// Generated from `System.Timers.TimersDescriptionAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TimersDescriptionAttribute\n{\n public TimersDescriptionAttribute(string description) => throw null;\n internal TimersDescriptionAttribute(string description, string defaultValue) => throw null;\n}\n\n}\nnamespace Windows\n{\nnamespace Markup\n{\n// Generated from `System.Windows.Markup.ValueSerializerAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ValueSerializerAttribute : System.Attribute\n{\n public ValueSerializerAttribute(string valueSerializerTypeName) => throw null;\n public ValueSerializerAttribute(System.Type valueSerializerType) => throw null;\n}\n\n}\n}\n}\n | diff --git a/csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.qlref b/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.qlref similarity index 100% rename from csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.qlref rename to csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.qlref diff --git a/csharp/ql/test/query-tests/Stubs/Test.cs b/csharp/ql/test/query-tests/Stubs/Minimal/Test.cs similarity index 97% rename from csharp/ql/test/query-tests/Stubs/Test.cs rename to csharp/ql/test/query-tests/Stubs/Minimal/Test.cs index a81faedcb1b5..4cc0606e69cd 100644 --- a/csharp/ql/test/query-tests/Stubs/Test.cs +++ b/csharp/ql/test/query-tests/Stubs/Minimal/Test.cs @@ -1,4 +1,4 @@ -// semmle-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll +// semmle-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll using System; using System.IO; diff --git a/csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.expected b/csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.expected deleted file mode 100644 index 8159a38c3485..000000000000 --- a/csharp/ql/test/query-tests/Stubs/MinimalStubsFromSource.expected +++ /dev/null @@ -1 +0,0 @@ -| // This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\n// Generated from `System.Uri` in `System.Private.Uri, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Uri : System.Runtime.Serialization.ISerializable\n{\n public override bool Equals(object comparand) => throw null;\n public override int GetHashCode() => throw null;\n public override string ToString() => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null;\n}\n\nnamespace Collections\n{\n// Generated from `System.Collections.Queue` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Queue : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection\n{\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual bool IsSynchronized { get => throw null; }\n public virtual int Count { get => throw null; }\n public virtual object Clone() => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual void CopyTo(System.Array array, int index) => throw null;\n}\n\n// Generated from `System.Collections.SortedList` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SortedList : System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public virtual System.Collections.ICollection Keys { get => throw null; }\n public virtual System.Collections.ICollection Values { get => throw null; }\n public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null;\n public virtual bool Contains(object key) => throw null;\n public virtual bool IsFixedSize { get => throw null; }\n public virtual bool IsReadOnly { get => throw null; }\n public virtual bool IsSynchronized { get => throw null; }\n public virtual int Count { get => throw null; }\n public virtual object Clone() => throw null;\n public virtual object GetByIndex(int index) => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual object this[object key] { get => throw null; set => throw null; }\n public virtual void Add(object key, object value) => throw null;\n public virtual void Clear() => throw null;\n public virtual void CopyTo(System.Array array, int arrayIndex) => throw null;\n public virtual void Remove(object key) => throw null;\n}\n\n// Generated from `System.Collections.Stack` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Stack : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection\n{\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual bool IsSynchronized { get => throw null; }\n public virtual int Count { get => throw null; }\n public virtual object Clone() => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual void CopyTo(System.Array array, int index) => throw null;\n}\n\nnamespace Concurrent\n{\n// Generated from `System.Collections.Concurrent.BlockingCollection<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class BlockingCollection : System.IDisposable, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n public int Count { get => throw null; }\n public void Dispose() => throw null;\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n}\n\n// Generated from `System.Collections.Concurrent.BlockingCollectionDebugView<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass BlockingCollectionDebugView\n{\n}\n\n// Generated from `System.Collections.Concurrent.ConcurrentStack<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ConcurrentStack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Concurrent.IProducerConsumerCollection\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.Concurrent.IProducerConsumerCollection.TryAdd(T item) => throw null;\n bool System.Collections.Concurrent.IProducerConsumerCollection.TryTake(out T item) => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n public T[] ToArray() => throw null;\n public int Count { get => throw null; }\n public void CopyTo(T[] array, int index) => throw null;\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n}\n\n// Generated from `System.Collections.Concurrent.IDictionaryDebugView<,>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass IDictionaryDebugView\n{\n}\n\n// Generated from `System.Collections.Concurrent.Partitioner` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Partitioner\n{\n}\n\n}\nnamespace Generic\n{\n// Generated from `System.Collections.Generic.CollectionDebugView<>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass CollectionDebugView\n{\n}\n\n// Generated from `System.Collections.Generic.DictionaryDebugView<,>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass DictionaryDebugView\n{\n}\n\n// Generated from `System.Collections.Generic.QueueDebugView<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass QueueDebugView\n{\n}\n\n// Generated from `System.Collections.Generic.SortedSet<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SortedSet : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection\n{\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; }\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n public bool Add(T item) => throw null;\n public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null;\n public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null;\n public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null;\n public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null;\n public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null;\n public bool Remove(T item) => throw null;\n public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null;\n public int Count { get => throw null; }\n public virtual bool Contains(T item) => throw null;\n public virtual void Clear() => throw null;\n public virtual void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null;\n public void CopyTo(T[] array, int index) => throw null;\n public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null;\n public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null;\n public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null;\n void System.Collections.Generic.ICollection.Add(T item) => throw null;\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;\n}\n\n// Generated from `System.Collections.Generic.Stack<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Stack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n public T Peek() => throw null;\n public int Count { get => throw null; }\n void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null;\n}\n\n// Generated from `System.Collections.Generic.StackDebugView<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass StackDebugView\n{\n}\n\n}\nnamespace Specialized\n{\n// Generated from `System.Collections.Specialized.NameObjectCollectionBase` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class NameObjectCollectionBase : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection\n{\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual int Count { get => throw null; }\n public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;\n public virtual void OnDeserialization(object sender) => throw null;\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n}\n\n// Generated from `System.Collections.Specialized.NameValueCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NameValueCollection : System.Collections.Specialized.NameObjectCollectionBase\n{\n public string this[string name] { get => throw null; set => throw null; }\n}\n\n}\n}\nnamespace ComponentModel\n{\n// Generated from `System.ComponentModel.ComponentConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ComponentConverter : System.ComponentModel.ReferenceConverter\n{\n}\n\n// Generated from `System.ComponentModel.DefaultEventAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultEventAttribute : System.Attribute\n{\n private static DefaultEventAttribute() => throw null;\n public DefaultEventAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.DefaultPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultPropertyAttribute : System.Attribute\n{\n private static DefaultPropertyAttribute() => throw null;\n public DefaultPropertyAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.INotifyPropertyChanged` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface INotifyPropertyChanged\n{\n}\n\n// Generated from `System.ComponentModel.ReferenceConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ReferenceConverter : System.ComponentModel.TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeConverterAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverterAttribute : System.Attribute\n{\n private static TypeConverterAttribute() => throw null;\n public TypeConverterAttribute() => throw null;\n public TypeConverterAttribute(System.Type type) => throw null;\n public TypeConverterAttribute(string typeName) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeDescriptionProviderAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeDescriptionProviderAttribute : System.Attribute\n{\n public TypeDescriptionProviderAttribute(System.Type type) => throw null;\n public TypeDescriptionProviderAttribute(string typeName) => throw null;\n}\n\n// Generated from `System.ComponentModel.TypeDescriptionProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class TypeDescriptionProvider\n{\n}\n\n// Generated from `System.ComponentModel.TypeDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeDescriptor\n{\n}\n\nnamespace Design\n{\n// Generated from `System.ComponentModel.Design.DesignerOptionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class DesignerOptionService : System.ComponentModel.Design.IDesignerOptionService\n{\n}\n\n// Generated from `System.ComponentModel.Design.IDesignerOptionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IDesignerOptionService\n{\n}\n\n}\n}\nnamespace Dynamic\n{\n// Generated from `System.Dynamic.BindingRestrictions` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class BindingRestrictions\n{\n}\n\n// Generated from `System.Dynamic.DynamicMetaObject` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DynamicMetaObject\n{\n}\n\n// Generated from `System.Dynamic.ExpandoObject` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ExpandoObject : System.Dynamic.IDynamicMetaObjectProvider, System.ComponentModel.INotifyPropertyChanged, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection>\n{\n System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; }\n System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; }\n System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null;\n bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; }\n bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null;\n bool System.Collections.Generic.IDictionary.ContainsKey(string key) => throw null;\n bool System.Collections.Generic.IDictionary.Remove(string key) => throw null;\n bool System.Collections.Generic.IDictionary.TryGetValue(string key, out object value) => throw null;\n int System.Collections.Generic.ICollection>.Count { get => throw null; }\n object this[string key] { get => throw null; set => throw null; }\n void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null;\n void System.Collections.Generic.ICollection>.Clear() => throw null;\n void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null;\n void System.Collections.Generic.IDictionary.Add(string key, object value) => throw null;\n}\n\n// Generated from `System.Dynamic.IDynamicMetaObjectProvider` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IDynamicMetaObjectProvider\n{\n}\n\n// Generated from `System.Dynamic.UpdateDelegates` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic class UpdateDelegates\n{\n}\n\nnamespace Utils\n{\n// Generated from `System.Dynamic.Utils.ListProvider<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract class ListProvider : System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection where T: class\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n public T this[int index] { get => throw null; set => throw null; }\n public bool Contains(T item) => throw null;\n public bool IsReadOnly { get => throw null; }\n public bool Remove(T item) => throw null;\n public int Count { get => throw null; }\n public int IndexOf(T item) => throw null;\n public void Add(T item) => throw null;\n public void Clear() => throw null;\n public void CopyTo(T[] array, int index) => throw null;\n public void Insert(int index, T item) => throw null;\n public void RemoveAt(int index) => throw null;\n}\n\n}\n}\nnamespace IO\n{\nnamespace Compression\n{\n// Generated from `System.IO.Compression.DeflateManagedStream` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`\nclass DeflateManagedStream : System.IO.Stream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] array, int offset, int count) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] array, int offset, int count) => throw null;\n}\n\n// Generated from `System.IO.Compression.DeflateStream` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`\npublic class DeflateStream : System.IO.Stream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task WriteAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null;\n public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] array, int offset, int count) => throw null;\n public override int Read(System.Span buffer) => throw null;\n public override int ReadByte() => throw null;\n public override void CopyTo(System.IO.Stream destination, int bufferSize) => throw null;\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] array, int offset, int count) => throw null;\n public override void Write(System.ReadOnlySpan buffer) => throw null;\n}\n\n}\nnamespace Pipes\n{\n// Generated from `System.IO.Pipes.NamedPipeServerStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NamedPipeServerStream : System.IO.Pipes.PipeStream\n{\n}\n\n// Generated from `System.IO.Pipes.PipeStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class PipeStream : System.IO.Stream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] buffer, int offset, int count) => throw null;\n public override int Read(System.Span buffer) => throw null;\n public override int ReadByte() => throw null;\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] buffer, int offset, int count) => throw null;\n public override void Write(System.ReadOnlySpan buffer) => throw null;\n public override void WriteByte(System.Byte value) => throw null;\n}\n\n}\n}\nnamespace Linq\n{\n// Generated from `System.Linq.Enumerable` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Enumerable\n{\n public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null;\n}\n\n// Generated from `System.Linq.Grouping<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Grouping : System.Linq.IGrouping, System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n TElement this[int index] { get => throw null; set => throw null; }\n bool System.Collections.Generic.ICollection.Contains(TElement item) => throw null;\n bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; }\n bool System.Collections.Generic.ICollection.Remove(TElement item) => throw null;\n int System.Collections.Generic.ICollection.Count { get => throw null; }\n int System.Collections.Generic.IList.IndexOf(TElement item) => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n void System.Collections.Generic.ICollection.Add(TElement item) => throw null;\n void System.Collections.Generic.ICollection.Clear() => throw null;\n void System.Collections.Generic.ICollection.CopyTo(TElement[] array, int arrayIndex) => throw null;\n void System.Collections.Generic.IList.Insert(int index, TElement item) => throw null;\n void System.Collections.Generic.IList.RemoveAt(int index) => throw null;\n}\n\n// Generated from `System.Linq.IGrouping<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IGrouping : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n}\n\n// Generated from `System.Linq.IIListProvider<>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\ninterface IIListProvider : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n}\n\n// Generated from `System.Linq.ILookup<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface ILookup : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>\n{\n}\n\n// Generated from `System.Linq.IOrderedEnumerable<>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IOrderedEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n}\n\n// Generated from `System.Linq.IPartition<>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\ninterface IPartition : System.Linq.IIListProvider, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n}\n\n// Generated from `System.Linq.IQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IQueryable : System.Collections.IEnumerable\n{\n}\n\n// Generated from `System.Linq.Lookup<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Lookup : System.Linq.ILookup, System.Linq.IIListProvider>, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.OrderedEnumerable<>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract class OrderedEnumerable : System.Linq.IPartition, System.Linq.IOrderedEnumerable, System.Linq.IIListProvider, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.ParallelEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class ParallelEnumerable\n{\n public static System.Linq.ParallelQuery AsParallel(this System.Collections.IEnumerable source) => throw null;\n}\n\n// Generated from `System.Linq.ParallelQuery<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParallelQuery : System.Linq.ParallelQuery, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParallelQuery : System.Collections.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.Queryable` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Queryable\n{\n public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) => throw null;\n}\n\n// Generated from `System.Linq.SystemLinq_GroupingDebugView<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass SystemLinq_GroupingDebugView\n{\n}\n\n// Generated from `System.Linq.SystemLinq_LookupDebugView<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass SystemLinq_LookupDebugView\n{\n}\n\nnamespace Expressions\n{\n// Generated from `System.Linq.Expressions.BlockExpressionList` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass BlockExpressionList : System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n public System.Linq.Expressions.Expression this[int index] { get => throw null; set => throw null; }\n public bool Contains(System.Linq.Expressions.Expression item) => throw null;\n public bool IsReadOnly { get => throw null; }\n public bool Remove(System.Linq.Expressions.Expression item) => throw null;\n public int Count { get => throw null; }\n public int IndexOf(System.Linq.Expressions.Expression item) => throw null;\n public void Add(System.Linq.Expressions.Expression item) => throw null;\n public void Clear() => throw null;\n public void CopyTo(System.Linq.Expressions.Expression[] array, int index) => throw null;\n public void Insert(int index, System.Linq.Expressions.Expression item) => throw null;\n public void RemoveAt(int index) => throw null;\n}\n\n// Generated from `System.Linq.Expressions.Expression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class Expression\n{\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Linq.Expressions.ParameterExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParameterExpression : System.Linq.Expressions.Expression\n{\n}\n\nnamespace Compiler\n{\n// Generated from `System.Linq.Expressions.Compiler.CompilerScope` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass CompilerScope\n{\n}\n\n// Generated from `System.Linq.Expressions.Compiler.ParameterList` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass ParameterList : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n public System.Linq.Expressions.ParameterExpression this[int index] { get => throw null; }\n public int Count { get => throw null; }\n}\n\n}\nnamespace Interpreter\n{\n// Generated from `System.Linq.Expressions.Interpreter.HybridReferenceDictionary<,>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass HybridReferenceDictionary where TKey: class\n{\n}\n\n// Generated from `System.Linq.Expressions.Interpreter.InstructionArray` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstruct InstructionArray\n{\n}\n\n// Generated from `System.Linq.Expressions.Interpreter.InstructionList` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass InstructionList\n{\n}\n\n// Generated from `System.Linq.Expressions.Interpreter.InterpretedFrameInfo` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstruct InterpretedFrameInfo\n{\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Linq.Expressions.Interpreter.InterpretedFrame` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass InterpretedFrame\n{\n}\n\n}\n}\nnamespace Parallel\n{\n// Generated from `System.Linq.Parallel.CancellableEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic class CancellableEnumerable\n{\n}\n\n// Generated from `System.Linq.Parallel.ExceptionAggregator` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic class ExceptionAggregator\n{\n}\n\n// Generated from `System.Linq.Parallel.ListChunk<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass ListChunk : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.Parallel.Lookup<,>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass Lookup : System.Linq.ILookup, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.Parallel.PartitionerQueryOperator<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass PartitionerQueryOperator : System.Linq.Parallel.QueryOperator\n{\n}\n\n// Generated from `System.Linq.Parallel.QueryOperator<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract class QueryOperator : System.Linq.ParallelQuery\n{\n public override System.Collections.Generic.IEnumerator GetEnumerator() => throw null;\n}\n\n// Generated from `System.Linq.Parallel.QueryResults<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract class QueryResults : System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection\n{\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.Generic.ICollection.Contains(T item) => throw null;\n bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; }\n bool System.Collections.Generic.ICollection.Remove(T item) => throw null;\n int System.Collections.Generic.IList.IndexOf(T item) => throw null;\n public T this[int index] { get => throw null; set => throw null; }\n public int Count { get => throw null; }\n void System.Collections.Generic.ICollection.Add(T item) => throw null;\n void System.Collections.Generic.ICollection.Clear() => throw null;\n void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null;\n void System.Collections.Generic.IList.Insert(int index, T item) => throw null;\n void System.Collections.Generic.IList.RemoveAt(int index) => throw null;\n}\n\n// Generated from `System.Linq.Parallel.ZipQueryOperator<,,>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass ZipQueryOperator : System.Linq.Parallel.QueryOperator\n{\n}\n\n}\n}\nnamespace Net\n{\n// Generated from `System.Net.CookieCollection` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class CookieCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection\n{\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n public System.Collections.IEnumerator GetEnumerator() => throw null;\n public bool Contains(System.Net.Cookie cookie) => throw null;\n public bool IsReadOnly { get => throw null; }\n public bool IsSynchronized { get => throw null; }\n public bool Remove(System.Net.Cookie cookie) => throw null;\n public int Count { get => throw null; }\n public object SyncRoot { get => throw null; }\n public void Add(System.Net.Cookie cookie) => throw null;\n public void Clear() => throw null;\n public void CopyTo(System.Array array, int index) => throw null;\n public void CopyTo(System.Net.Cookie[] array, int index) => throw null;\n}\n\n// Generated from `System.Net.Cookie` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Cookie\n{\n public override bool Equals(object comparand) => throw null;\n public override int GetHashCode() => throw null;\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Net.HttpResponseStream` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51`\nclass HttpResponseStream : System.IO.Stream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int size, System.AsyncCallback callback, object state) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int size, System.AsyncCallback callback, object state) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] buffer, int offset, int size) => throw null;\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] buffer, int offset, int size) => throw null;\n}\n\n// Generated from `System.Net.StreamFramer` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass StreamFramer\n{\n}\n\nnamespace Security\n{\n// Generated from `System.Net.Security.AuthenticatedStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class AuthenticatedStream : System.IO.Stream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null;\n}\n\n// Generated from `System.Net.Security.CipherSuitesPolicy` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class CipherSuitesPolicy\n{\n}\n\n// Generated from `System.Net.Security.NegotiateStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NegotiateStream : System.Net.Security.AuthenticatedStream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null;\n public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanTimeout { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] buffer, int offset, int count) => throw null;\n public override int ReadTimeout { get => throw null; set => throw null; }\n public override int WriteTimeout { get => throw null; set => throw null; }\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] buffer, int offset, int count) => throw null;\n}\n\n// Generated from `System.Net.Security.SslStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SslStream : System.Net.Security.AuthenticatedStream\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null;\n public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanTimeout { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] buffer, int offset, int count) => throw null;\n public override int ReadByte() => throw null;\n public override int ReadTimeout { get => throw null; set => throw null; }\n public override int WriteTimeout { get => throw null; set => throw null; }\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] buffer, int offset, int count) => throw null;\n}\n\n// Generated from `System.Net.Security.TlsCipherSuite` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic enum TlsCipherSuite\n{\n}\n\n// Generated from `System.Net.Security.TlsFrameHelper` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass TlsFrameHelper\n{\n}\n\n}\nnamespace WebSockets\n{\n// Generated from `System.Net.WebSockets.HttpWebSocket` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51`\nstatic class HttpWebSocket\n{\n}\n\n}\n}\nnamespace Runtime\n{\nnamespace Serialization\n{\n// Generated from `System.Runtime.Serialization.DataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataContractAttribute : System.Attribute\n{\n public DataContractAttribute() => throw null;\n}\n\n// Generated from `System.Runtime.Serialization.DataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataMemberAttribute : System.Attribute\n{\n public DataMemberAttribute() => throw null;\n}\n\n}\n}\nnamespace Security\n{\nnamespace Cryptography\n{\n// Generated from `System.Security.Cryptography.CryptoStream` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class CryptoStream : System.IO.Stream, System.IDisposable\n{\n protected override void Dispose(bool disposing) => throw null;\n public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null;\n public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null;\n public override System.Int64 Length { get => throw null; }\n public override System.Int64 Position { get => throw null; set => throw null; }\n public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null;\n public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null;\n public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null;\n public override bool CanRead { get => throw null; }\n public override bool CanSeek { get => throw null; }\n public override bool CanWrite { get => throw null; }\n public override int EndRead(System.IAsyncResult asyncResult) => throw null;\n public override int Read(System.Byte[] buffer, int offset, int count) => throw null;\n public override int ReadByte() => throw null;\n public override void EndWrite(System.IAsyncResult asyncResult) => throw null;\n public override void Flush() => throw null;\n public override void SetLength(System.Int64 value) => throw null;\n public override void Write(System.Byte[] buffer, int offset, int count) => throw null;\n public override void WriteByte(System.Byte value) => throw null;\n}\n\n// Generated from `System.Security.Cryptography.HashAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class HashAlgorithm : System.Security.Cryptography.ICryptoTransform, System.IDisposable\n{\n public void Dispose() => throw null;\n}\n\n// Generated from `System.Security.Cryptography.ICryptoTransform` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface ICryptoTransform : System.IDisposable\n{\n}\n\n}\n}\nnamespace Text\n{\nnamespace RegularExpressions\n{\n// Generated from `System.Text.RegularExpressions.Capture` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Capture\n{\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.CollectionDebuggerProxy<>` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nclass CollectionDebuggerProxy\n{\n}\n\n// Generated from `System.Text.RegularExpressions.GroupCollection` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class GroupCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.ICollection\n{\n System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null;\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n System.Text.RegularExpressions.Group this[int index] { get => throw null; set => throw null; }\n bool System.Collections.Generic.ICollection.Contains(System.Text.RegularExpressions.Group item) => throw null;\n bool System.Collections.Generic.ICollection.Remove(System.Text.RegularExpressions.Group item) => throw null;\n bool System.Collections.IList.Contains(object value) => throw null;\n bool System.Collections.IList.IsFixedSize { get => throw null; }\n int System.Collections.Generic.IList.IndexOf(System.Text.RegularExpressions.Group item) => throw null;\n int System.Collections.IList.Add(object value) => throw null;\n int System.Collections.IList.IndexOf(object value) => throw null;\n object this[int index] { get => throw null; set => throw null; }\n public System.Collections.Generic.IEnumerable Values { get => throw null; }\n public System.Collections.Generic.IEnumerable Keys { get => throw null; }\n public System.Collections.IEnumerator GetEnumerator() => throw null;\n public System.Text.RegularExpressions.Group this[string groupname] { get => throw null; }\n public bool ContainsKey(string key) => throw null;\n public bool IsReadOnly { get => throw null; }\n public bool IsSynchronized { get => throw null; }\n public bool TryGetValue(string key, out System.Text.RegularExpressions.Group value) => throw null;\n public int Count { get => throw null; }\n public object SyncRoot { get => throw null; }\n public void CopyTo(System.Array array, int arrayIndex) => throw null;\n public void CopyTo(System.Text.RegularExpressions.Group[] array, int arrayIndex) => throw null;\n void System.Collections.Generic.ICollection.Add(System.Text.RegularExpressions.Group item) => throw null;\n void System.Collections.Generic.ICollection.Clear() => throw null;\n void System.Collections.Generic.IList.Insert(int index, System.Text.RegularExpressions.Group item) => throw null;\n void System.Collections.Generic.IList.RemoveAt(int index) => throw null;\n void System.Collections.IList.Clear() => throw null;\n void System.Collections.IList.Insert(int index, object value) => throw null;\n void System.Collections.IList.Remove(object value) => throw null;\n void System.Collections.IList.RemoveAt(int index) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Group` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Group : System.Text.RegularExpressions.Capture\n{\n}\n\n// Generated from `System.Text.RegularExpressions.Match` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Match : System.Text.RegularExpressions.Group\n{\n}\n\n// Generated from `System.Text.RegularExpressions.RegexOptions` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\n[System.Flags]\npublic enum RegexOptions\n{\n IgnoreCase,\n}\n\n// Generated from `System.Text.RegularExpressions.Regex` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Regex : System.Runtime.Serialization.ISerializable\n{\n public Regex(string pattern) => throw null;\n public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public System.Text.RegularExpressions.Match Match(string input) => throw null;\n public override string ToString() => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public string Replace(string input, string replacement) => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null;\n}\n\n}\n}\nnamespace Timers\n{\n// Generated from `System.Timers.TimersDescriptionAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TimersDescriptionAttribute\n{\n internal TimersDescriptionAttribute(string description, string defaultValue) => throw null;\n public TimersDescriptionAttribute(string description) => throw null;\n}\n\n}\nnamespace Windows\n{\nnamespace Markup\n{\n// Generated from `System.Windows.Markup.ValueSerializerAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ValueSerializerAttribute : System.Attribute\n{\n public ValueSerializerAttribute(System.Type valueSerializerType) => throw null;\n public ValueSerializerAttribute(string valueSerializerTypeName) => throw null;\n}\n\n}\n}\n}\n | From 88c97bd34ee9bff307054cc1cb50b98e521f8e16 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 28 Apr 2021 16:56:19 +0200 Subject: [PATCH 1553/1662] Generate stubs per assembly --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 3 +- csharp/ql/src/Stubs/AllStubsFromSource.ql | 2 +- csharp/ql/src/Stubs/MinimalStubsFromSource.ql | 2 +- csharp/ql/src/Stubs/Stubs.qll | 40 ++++++++++++++----- .../query-tests/Stubs/All/AllStubs.expected | 2 +- csharp/ql/test/query-tests/Stubs/All/Test.cs | 33 +++++++++++++++ .../Minimal/MinimalStubsFromSource.expected | 2 +- 7 files changed, 69 insertions(+), 15 deletions(-) diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql index ecb1ea8bdc3a..fe656f424971 100644 --- a/csharp/ql/src/Stubs/AllStubsFromReference.ql +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -17,4 +17,5 @@ class NonTargetAssembly extends ExcludedAssembly { } } -select generatedCode() +from Assembly a +select a, generatedCode(a) diff --git a/csharp/ql/src/Stubs/AllStubsFromSource.ql b/csharp/ql/src/Stubs/AllStubsFromSource.ql index e8d30c1e1f57..3be2b9d17139 100644 --- a/csharp/ql/src/Stubs/AllStubsFromSource.ql +++ b/csharp/ql/src/Stubs/AllStubsFromSource.ql @@ -10,4 +10,4 @@ class AllDeclarations extends GeneratedDeclaration { AllDeclarations() { not this.fromLibrary() } } -select generatedCode() +select concat(generatedCode(_) + "\n\n") diff --git a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql index c4311b40ac2e..03e1db88925b 100644 --- a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql +++ b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql @@ -29,4 +29,4 @@ class UsedInSource extends GeneratedDeclaration { } } -select generatedCode() +select concat(generatedCode(_) + "\n\n") diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index c3c21de2b903..8918935022be 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -48,6 +48,8 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { ) } + predicate isInAssembly(Assembly assembly) { this.getALocation() = assembly } + private string stubKeyword() { this instanceof Interface and result = "interface" or @@ -87,8 +89,8 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { else ( not this instanceof DelegateType and result = - this.stubComment() + this.stubAttributes() + this.stubAbstractModifier() + - this.stubStaticModifier() + stubAccessibility(this) + this.stubKeyword() + " " + + this.stubComment() + this.stubAttributes() + stubAccessibility(this) + + this.stubAbstractModifier() + this.stubStaticModifier() + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + stubMembers() + "}\n\n" or @@ -238,8 +240,9 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { private string getPostAmble() { if this.isGlobalNamespace() then result = "" else result = "}\n" } - final string getStubs() { - result = getPreamble() + getTypeStubs() + getSubNamespaces() + getPostAmble() + final string getStubs(Assembly assembly) { + result = + getPreamble() + getTypeStubs(assembly) + getSubNamespaceStubs(assembly) + getPostAmble() } /** Gets the `n`th generated child namespace, indexed from 0. */ @@ -254,14 +257,31 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { result = count(GeneratedNamespace g | g.getParentNamespace() = this) } + private predicate isInAssembly(Assembly assembly) { + any(GeneratedType gt | gt.getDeclaringNamespace() = this).isInAssembly(assembly) + or + this.getChildNamespace(_).isInAssembly(assembly) + } + language[monotonicAggregates] - private string getSubNamespaces() { - result = concat(int i | exists(getChildNamespace(i)) | getChildNamespace(i).getStubs()) + string getSubNamespaceStubs(Assembly assembly) { + this.isInAssembly(assembly) and + result = + concat(GeneratedNamespace child, int i | + child = getChildNamespace(i) and child.isInAssembly(assembly) + | + child.getStubs(assembly) order by i + ) } - private string getTypeStubs() { + string getTypeStubs(Assembly assembly) { + this.isInAssembly(assembly) and result = - concat(string s | s = any(GeneratedType gt | gt.getDeclaringNamespace() = this).getStub()) + concat(GeneratedType gt | + gt.getDeclaringNamespace() = this and gt.isInAssembly(assembly) + | + gt.getStub() order by gt.getName() + ) } } @@ -783,8 +803,8 @@ private string stubSemmleExtractorOptions() { } /** Gets the generated C# code. */ -string generatedCode() { +string generatedCode(Assembly assembly) { result = "// This file contains auto-generated code.\n" + stubSemmleExtractorOptions() + "\n" + - any(GeneratedNamespace ns | ns.isGlobalNamespace()).getStubs() + any(GeneratedNamespace ns | ns.isGlobalNamespace()).getStubs(assembly) } diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected index 35d05f712912..3ad11482125b 100644 --- a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected @@ -1 +1 @@ -| // This file contains auto-generated code.\n\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23`\npublic class Class1\n{\n public Class1() => throw null;\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n public Class11(int i) => throw null;\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28`\npublic class Class12 : Test.Class1.Class11\n{\n public Class12(int i, float j) : base(default(int)) => throw null;\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37`\nabstract public class Class13\n{\n protected Class13() => throw null;\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37`\nabstract public class Class14 : Test.Class1.Class13\n{\n protected Class14() => throw null;\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35`\npublic class GenericType\n{\n public GenericType() => throw null;\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26`\npublic class X\n{\n public X() => throw null;\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n // Stub generator skipped constructor \n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23`\npublic class Class3\n{\n public Class3() => throw null;\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23`\npublic class Class4\n{\n public Class4() => throw null;\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23`\npublic class Class5 : Test.IInterface1\n{\n public Class5() => throw null;\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26`\npublic class Class6 where T: class, Test.IInterface1\n{\n public Class6(int i) => throw null;\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23`\npublic class Class7 : Test.Class6\n{\n public Class7(int i) : base(default(int)) => throw null;\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23`\npublic class Class8\n{\n public Class8() => throw null;\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23`\npublic class Class9\n{\n private Class9(int i) => throw null;\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27`\npublic class Nested : Test.Class9\n{\n internal Nested(int i) : base(default(int)) => throw null;\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n | +| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:141:18:141:19`\npublic class C1\n{\n public C1() => throw null;\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:148:22:148:23`\npublic class C2\n{\n public C2() => throw null;\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:154:18:154:19`\npublic class C3\n{\n public C3() => throw null;\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:164:18:164:19`\npublic class C4\n{\n public C4() => throw null;\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:161:22:161:23`\npublic class D4\n{\n public D4() => throw null;\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23`\npublic class Class1\n{\n public Class1() => throw null;\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n public Class11(int i) => throw null;\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28`\npublic class Class12 : Test.Class1.Class11\n{\n public Class12(int i, float j) : base(default(int)) => throw null;\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37`\npublic abstract class Class13\n{\n protected Class13() => throw null;\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected Class14() => throw null;\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35`\npublic class GenericType\n{\n public GenericType() => throw null;\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26`\npublic class X\n{\n public X() => throw null;\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n // Stub generator skipped constructor \n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23`\npublic class Class3\n{\n public Class3() => throw null;\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23`\npublic class Class4\n{\n public Class4() => throw null;\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23`\npublic class Class5 : Test.IInterface1\n{\n public Class5() => throw null;\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26`\npublic class Class6 where T: class, Test.IInterface1\n{\n public Class6(int i) => throw null;\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23`\npublic class Class7 : Test.Class6\n{\n public Class7(int i) : base(default(int)) => throw null;\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23`\npublic class Class8\n{\n public Class8() => throw null;\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23`\npublic class Class9\n{\n private Class9(int i) => throw null;\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27`\npublic class Nested : Test.Class9\n{\n internal Nested(int i) : base(default(int)) => throw null;\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | diff --git a/csharp/ql/test/query-tests/Stubs/All/Test.cs b/csharp/ql/test/query-tests/Stubs/All/Test.cs index bbb7f0684aee..7a312ec44567 100644 --- a/csharp/ql/test/query-tests/Stubs/All/Test.cs +++ b/csharp/ql/test/query-tests/Stubs/All/Test.cs @@ -129,4 +129,37 @@ public class Nested : Class9 public Class9.Nested NestedInstance { get; } = new Class9.Nested(1); } +} + +namespace A1 +{ + namespace B1 + { + + } + + public class C1 { } +} + +namespace A2 +{ + namespace B2 + { + public class C2 { } + } +} + +namespace A3 +{ + public class C3 { } +} + +namespace A4 +{ + namespace B4 + { + public class D4 { } + } + + public class C4 { } } \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected b/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected index f889f24cf80b..22dabdc793ea 100644 --- a/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected +++ b/csharp/ql/test/query-tests/Stubs/Minimal/MinimalStubsFromSource.expected @@ -1 +1 @@ -| // This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\n// Generated from `System.Uri` in `System.Private.Uri, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Uri : System.Runtime.Serialization.ISerializable\n{\n public override bool Equals(object comparand) => throw null;\n public override int GetHashCode() => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null;\n public override string ToString() => throw null;\n}\n\nnamespace Collections\n{\n// Generated from `System.Collections.SortedList` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SortedList : System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection\n{\n public virtual void Add(object key, object value) => throw null;\n public virtual void Clear() => throw null;\n public virtual object Clone() => throw null;\n public virtual bool Contains(object key) => throw null;\n public virtual void CopyTo(System.Array array, int arrayIndex) => throw null;\n public virtual int Count { get => throw null; }\n public virtual object GetByIndex(int index) => throw null;\n public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public virtual bool IsFixedSize { get => throw null; }\n public virtual bool IsReadOnly { get => throw null; }\n public virtual bool IsSynchronized { get => throw null; }\n public virtual object this[object key] { get => throw null; set => throw null; }\n public virtual System.Collections.ICollection Keys { get => throw null; }\n public virtual void Remove(object key) => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual System.Collections.ICollection Values { get => throw null; }\n}\n\nnamespace Generic\n{\n// Generated from `System.Collections.Generic.Stack<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Stack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null;\n public int Count { get => throw null; }\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public T Peek() => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n}\nnamespace Specialized\n{\n// Generated from `System.Collections.Specialized.NameObjectCollectionBase` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nabstract public class NameObjectCollectionBase : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n public virtual int Count { get => throw null; }\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public virtual void OnDeserialization(object sender) => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n// Generated from `System.Collections.Specialized.NameValueCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NameValueCollection : System.Collections.Specialized.NameObjectCollectionBase\n{\n public string this[string name] { get => throw null; set => throw null; }\n}\n\n}\n}\nnamespace ComponentModel\n{\n// Generated from `System.ComponentModel.ComponentConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ComponentConverter : System.ComponentModel.ReferenceConverter\n{\n}\n\n// Generated from `System.ComponentModel.DefaultEventAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultEventAttribute : System.Attribute\n{\n public DefaultEventAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.DefaultPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultPropertyAttribute : System.Attribute\n{\n public DefaultPropertyAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.ReferenceConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ReferenceConverter : System.ComponentModel.TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeConverterAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverterAttribute : System.Attribute\n{\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n public TypeConverterAttribute(string typeName) => throw null;\n public TypeConverterAttribute(System.Type type) => throw null;\n public TypeConverterAttribute() => throw null;\n}\n\n// Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeDescriptionProviderAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeDescriptionProviderAttribute : System.Attribute\n{\n public TypeDescriptionProviderAttribute(string typeName) => throw null;\n public TypeDescriptionProviderAttribute(System.Type type) => throw null;\n}\n\n}\nnamespace Linq\n{\n// Generated from `System.Linq.Enumerable` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Enumerable\n{\n public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null;\n}\n\n// Generated from `System.Linq.IQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IQueryable : System.Collections.IEnumerable\n{\n}\n\n// Generated from `System.Linq.ParallelEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class ParallelEnumerable\n{\n public static System.Linq.ParallelQuery AsParallel(this System.Collections.IEnumerable source) => throw null;\n}\n\n// Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParallelQuery : System.Collections.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n internal ParallelQuery(System.Linq.Parallel.QuerySettings specifiedSettings) => throw null;\n}\n\n// Generated from `System.Linq.Queryable` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\nstatic public class Queryable\n{\n public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) => throw null;\n}\n\nnamespace Parallel\n{\n// Generated from `System.Linq.Parallel.QuerySettings` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\ninternal struct QuerySettings\n{\n}\n\n}\n}\nnamespace Runtime\n{\nnamespace Serialization\n{\n// Generated from `System.Runtime.Serialization.DataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataContractAttribute : System.Attribute\n{\n public DataContractAttribute() => throw null;\n}\n\n// Generated from `System.Runtime.Serialization.DataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataMemberAttribute : System.Attribute\n{\n public DataMemberAttribute() => throw null;\n}\n\n}\n}\nnamespace Text\n{\nnamespace RegularExpressions\n{\n// Generated from `System.Text.RegularExpressions.Capture` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Capture\n{\n internal Capture(string text, int index, int length) => throw null;\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Group` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Group : System.Text.RegularExpressions.Capture\n{\n internal Group(string text, int[] caps, int capcount, string name) : base(default(string), default(int), default(int)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Match` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Match : System.Text.RegularExpressions.Group\n{\n internal Match(System.Text.RegularExpressions.Regex regex, int capcount, string text, int begpos, int len, int startpos) : base(default(string), default(int[]), default(int), default(string)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.RegexOptions` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\n[System.Flags]\npublic enum RegexOptions\n{\n IgnoreCase,\n}\n\n// Generated from `System.Text.RegularExpressions.Regex` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Regex : System.Runtime.Serialization.ISerializable\n{\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern) => throw null;\n public System.Text.RegularExpressions.Match Match(string input) => throw null;\n public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public Regex(string pattern) => throw null;\n public string Replace(string input, string replacement) => throw null;\n public override string ToString() => throw null;\n}\n\n}\n}\nnamespace Timers\n{\n// Generated from `System.Timers.TimersDescriptionAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TimersDescriptionAttribute\n{\n public TimersDescriptionAttribute(string description) => throw null;\n internal TimersDescriptionAttribute(string description, string defaultValue) => throw null;\n}\n\n}\nnamespace Windows\n{\nnamespace Markup\n{\n// Generated from `System.Windows.Markup.ValueSerializerAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ValueSerializerAttribute : System.Attribute\n{\n public ValueSerializerAttribute(string valueSerializerTypeName) => throw null;\n public ValueSerializerAttribute(System.Type valueSerializerType) => throw null;\n}\n\n}\n}\n}\n | +| // This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\n// Generated from `System.Uri` in `System.Private.Uri, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Uri : System.Runtime.Serialization.ISerializable\n{\n public override bool Equals(object comparand) => throw null;\n public override int GetHashCode() => throw null;\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null;\n public override string ToString() => throw null;\n}\n\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Collections\n{\n// Generated from `System.Collections.SortedList` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class SortedList : System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection\n{\n public virtual void Add(object key, object value) => throw null;\n public virtual void Clear() => throw null;\n public virtual object Clone() => throw null;\n public virtual bool Contains(object key) => throw null;\n public virtual void CopyTo(System.Array array, int arrayIndex) => throw null;\n public virtual int Count { get => throw null; }\n public virtual object GetByIndex(int index) => throw null;\n public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null;\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n public virtual bool IsFixedSize { get => throw null; }\n public virtual bool IsReadOnly { get => throw null; }\n public virtual bool IsSynchronized { get => throw null; }\n public virtual object this[object key] { get => throw null; set => throw null; }\n public virtual System.Collections.ICollection Keys { get => throw null; }\n public virtual void Remove(object key) => throw null;\n public virtual object SyncRoot { get => throw null; }\n public virtual System.Collections.ICollection Values { get => throw null; }\n}\n\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Collections\n{\nnamespace Generic\n{\n// Generated from `System.Collections.Generic.Stack<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Stack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null;\n public int Count { get => throw null; }\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public T Peek() => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n}\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Collections\n{\nnamespace Specialized\n{\n// Generated from `System.Collections.Specialized.NameObjectCollectionBase` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic abstract class NameObjectCollectionBase : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection\n{\n void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;\n public virtual int Count { get => throw null; }\n public virtual System.Collections.IEnumerator GetEnumerator() => throw null;\n public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null;\n bool System.Collections.ICollection.IsSynchronized { get => throw null; }\n public virtual void OnDeserialization(object sender) => throw null;\n object System.Collections.ICollection.SyncRoot { get => throw null; }\n}\n\n// Generated from `System.Collections.Specialized.NameValueCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class NameValueCollection : System.Collections.Specialized.NameObjectCollectionBase\n{\n public string this[string name] { get => throw null; set => throw null; }\n}\n\n}\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace ComponentModel\n{\n// Generated from `System.ComponentModel.ComponentConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ComponentConverter : System.ComponentModel.ReferenceConverter\n{\n}\n\n// Generated from `System.ComponentModel.DefaultEventAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultEventAttribute : System.Attribute\n{\n public DefaultEventAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.DefaultPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DefaultPropertyAttribute : System.Attribute\n{\n public DefaultPropertyAttribute(string name) => throw null;\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n}\n\n// Generated from `System.ComponentModel.ReferenceConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ReferenceConverter : System.ComponentModel.TypeConverter\n{\n}\n\n// Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverter\n{\n}\n\n}\nnamespace Timers\n{\n// Generated from `System.Timers.TimersDescriptionAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TimersDescriptionAttribute\n{\n public TimersDescriptionAttribute(string description) => throw null;\n internal TimersDescriptionAttribute(string description, string defaultValue) => throw null;\n}\n\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace ComponentModel\n{\n// Generated from `System.ComponentModel.TypeConverterAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeConverterAttribute : System.Attribute\n{\n public override bool Equals(object obj) => throw null;\n public override int GetHashCode() => throw null;\n public TypeConverterAttribute(string typeName) => throw null;\n public TypeConverterAttribute(System.Type type) => throw null;\n public TypeConverterAttribute() => throw null;\n}\n\n// Generated from `System.ComponentModel.TypeDescriptionProviderAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class TypeDescriptionProviderAttribute : System.Attribute\n{\n public TypeDescriptionProviderAttribute(string typeName) => throw null;\n public TypeDescriptionProviderAttribute(System.Type type) => throw null;\n}\n\n}\nnamespace Windows\n{\nnamespace Markup\n{\n// Generated from `System.Windows.Markup.ValueSerializerAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ValueSerializerAttribute : System.Attribute\n{\n public ValueSerializerAttribute(string valueSerializerTypeName) => throw null;\n public ValueSerializerAttribute(System.Type valueSerializerType) => throw null;\n}\n\n}\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Linq\n{\n// Generated from `System.Linq.Enumerable` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic static class Enumerable\n{\n public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null;\n}\n\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Linq\n{\n// Generated from `System.Linq.IQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic interface IQueryable : System.Collections.IEnumerable\n{\n}\n\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Linq\n{\n// Generated from `System.Linq.ParallelEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic static class ParallelEnumerable\n{\n public static System.Linq.ParallelQuery AsParallel(this System.Collections.IEnumerable source) => throw null;\n}\n\n// Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class ParallelQuery : System.Collections.IEnumerable\n{\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;\n internal ParallelQuery(System.Linq.Parallel.QuerySettings specifiedSettings) => throw null;\n}\n\nnamespace Parallel\n{\n// Generated from `System.Linq.Parallel.QuerySettings` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\ninternal struct QuerySettings\n{\n}\n\n}\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Linq\n{\n// Generated from `System.Linq.Queryable` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic static class Queryable\n{\n public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) => throw null;\n}\n\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Runtime\n{\nnamespace Serialization\n{\n// Generated from `System.Runtime.Serialization.DataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataContractAttribute : System.Attribute\n{\n public DataContractAttribute() => throw null;\n}\n\n// Generated from `System.Runtime.Serialization.DataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class DataMemberAttribute : System.Attribute\n{\n public DataMemberAttribute() => throw null;\n}\n\n}\n}\n}\n\n\n// This file contains auto-generated code.\n// original-extractor-options: /r:System.Text.RegularExpressions.dll /r:System.Collections.Specialized.dll /r:System.Net.dll /r:System.Web.dll /r:System.Net.HttpListener.dll /r:System.Collections.Specialized.dll /r:System.Private.Uri.dll /r:System.Runtime.Extensions.dll /r:System.Linq.Parallel.dll /r:System.Collections.Concurrent.dll /r:System.Linq.Expressions.dll /r:System.Collections.dll /r:System.Linq.Queryable.dll /r:System.Linq.dll /r:System.Collections.NonGeneric.dll /r:System.ObjectModel.dll /r:System.ComponentModel.TypeConverter.dll /r:System.IO.Compression.dll /r:System.IO.Pipes.dll /r:System.Net.Primitives.dll /r:System.Net.Security.dll /r:System.Security.Cryptography.Primitives.dll /r:System.Text.RegularExpressions.dll ${testdir}/../../../resources/stubs/System.Web.cs /r:System.Runtime.Serialization.Primitives.dll\n\nnamespace System\n{\nnamespace Text\n{\nnamespace RegularExpressions\n{\n// Generated from `System.Text.RegularExpressions.Capture` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Capture\n{\n internal Capture(string text, int index, int length) => throw null;\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Group` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Group : System.Text.RegularExpressions.Capture\n{\n internal Group(string text, int[] caps, int capcount, string name) : base(default(string), default(int), default(int)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Match` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Match : System.Text.RegularExpressions.Group\n{\n internal Match(System.Text.RegularExpressions.Regex regex, int capcount, string text, int begpos, int len, int startpos) : base(default(string), default(int[]), default(int), default(string)) => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.Regex` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\npublic class Regex : System.Runtime.Serialization.ISerializable\n{\n void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public static System.Text.RegularExpressions.Match Match(string input, string pattern) => throw null;\n public System.Text.RegularExpressions.Match Match(string input) => throw null;\n public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null;\n public Regex(string pattern) => throw null;\n public string Replace(string input, string replacement) => throw null;\n public override string ToString() => throw null;\n}\n\n// Generated from `System.Text.RegularExpressions.RegexOptions` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a`\n[System.Flags]\npublic enum RegexOptions\n{\n IgnoreCase,\n}\n\n}\n}\n}\n\n\n | From ce214cfbf8a37726ee2287b2d69f3da7526c61a8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 29 Apr 2021 13:28:19 +0200 Subject: [PATCH 1554/1662] Split generated stubs to separate files --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 3 +- csharp/ql/src/Stubs/helpers.py | 7 + csharp/ql/src/Stubs/make_stubs_nuget.py | 161 ++++++++++++++++--- 3 files changed, 148 insertions(+), 23 deletions(-) diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql index fe656f424971..3f10ffdb19a0 100644 --- a/csharp/ql/src/Stubs/AllStubsFromReference.ql +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -18,4 +18,5 @@ class NonTargetAssembly extends ExcludedAssembly { } from Assembly a -select a, generatedCode(a) +select a.getFullName(), a.getName(), a.getVersion().toString(), a.getFile().getAbsolutePath(), + generatedCode(a) diff --git a/csharp/ql/src/Stubs/helpers.py b/csharp/ql/src/Stubs/helpers.py index e4fe3d278a85..d48bc3082d99 100644 --- a/csharp/ql/src/Stubs/helpers.py +++ b/csharp/ql/src/Stubs/helpers.py @@ -35,3 +35,10 @@ def trim_output_file(file): f = open(file, "wb") f.write(contents) f.close() + + +# remove all files with extension +def remove_files(path, ext): + for file in os.listdir(path): + if file.endswith(ext): + os.remove(os.path.join(path, file)) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index 4f7da9491b7b..567c86d3b33a 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -1,10 +1,12 @@ import sys import os import helpers +import json +import shutil print('Script to generate stub file from a nuget package') print(' Usage: python ' + sys.argv[0] + - ' NUGET_PACKAGE_NAME [VERSION=latest] [WORK_DIR=tempDir] [OUTPUT_NAME=stub]') + ' NUGET_PACKAGE_NAME [VERSION=latest] [WORK_DIR=tempDir]') print(' The script uses the dotnet cli, codeql cli, and dotnet format global tool') if len(sys.argv) < 2: @@ -15,22 +17,37 @@ thisDir = os.path.abspath(os.path.dirname(thisScript)) nuget = sys.argv[1] +# /input contains a dotnet project that's being extracted workDir = os.path.abspath(helpers.get_argv(3, "tempDir")) projectNameIn = "input" projectDirIn = os.path.join(workDir, projectNameIn) +# /output contains the output of the stub generation +outputDirName = "output" +outputDir = os.path.join(workDir, outputDirName) + +# /output/raw contains the bqrs result from the query, the json equivalent +rawOutputDirName = "raw" +rawOutputDir = os.path.join(outputDir, rawOutputDirName) +os.makedirs(rawOutputDir) + +# /output/output contains a dotnet project with the generated stubs projectNameOut = "output" -projectDirOut = os.path.join(workDir, projectNameOut) +projectDirOut = os.path.join(outputDir, projectNameOut) + +# /db contains the extracted QL DB dbName = 'db' dbDir = os.path.join(workDir, dbName) -outputName = helpers.get_argv(4, "stub") +outputName = "stub" outputFile = os.path.join(projectDirOut, outputName + '.cs') -bqrsFile = os.path.join(projectDirOut, outputName + '.bqrs') +bqrsFile = os.path.join(rawOutputDir, outputName + '.bqrs') +jsonFile = os.path.join(rawOutputDir, outputName + '.json') version = helpers.get_argv(2, "latest") print("\n* Creating new input project") helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", '--name', projectNameIn, '--output', projectDirIn]) +helpers.remove_files(projectDirIn, '.cs') print("\n* Adding reference to package: " + nuget) cmd = ['dotnet', 'add', projectDirIn, 'package', nuget] @@ -47,28 +64,128 @@ print("Expected database directory " + dbDir + " not found.") exit(1) -print("\n* Creating new output project") -helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", '--name', - projectNameOut, '--output', projectDirOut]) - print("\n* Running stubbing CodeQL query") helpers.run_cmd(['codeql', 'query', 'run', os.path.join( thisDir, 'AllStubsFromReference.ql'), '--database', dbDir, '--output', bqrsFile]) helpers.run_cmd(['codeql', 'bqrs', 'decode', bqrsFile, '--output', - outputFile, '--format=text', '--no-titles']) - -helpers.trim_output_file(outputFile) - -print("\n --> Generated output file: " + outputFile) - -print("\n* Formatting file") -helpers.run_cmd(['dotnet', 'format', projectDirOut, - '--include', outputName + '.cs']) - -print("\n* Building output project") -helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', projectDirOut], - 'ERR: Build failed. Script failed to generate a stub that builds') + jsonFile, '--format=json']) + +print("\n* Creating new raw output project") +rawSrcOutputDirName = 'src' +rawSrcOutputDir = os.path.join(rawOutputDir, rawSrcOutputDirName) +helpers.run_cmd(['dotnet', 'new', 'classlib', "--language", "C#", + '--name', rawSrcOutputDirName, '--output', rawSrcOutputDir]) +helpers.remove_files(rawSrcOutputDir, '.cs') + +# load json from file +pathInfos = {} +with open(jsonFile) as json_data: + data = json.load(json_data) + for row in data['#select']['tuples']: + pathInfos[row[3]] = os.path.join(rawSrcOutputDir, row[1] + '.cs') + with open(pathInfos[row[3]], 'a') as f: + f.write(row[4]) + +print("\n --> Generated stub files: " + rawSrcOutputDir) + +print("\n* Formatting files") +helpers.run_cmd(['dotnet', 'format', rawSrcOutputDir]) + +print("\n --> Generated (formatted) stub files: " + rawSrcOutputDir) + + +print("\n* Processing project.assets.json to generate folder structure") +stubsDirName = 'stubs' +stubsDir = os.path.join(outputDir, stubsDirName) +os.makedirs(stubsDir) + +stubFileName = '_stub.cs' + +frameworksDirName = 'frameworks' +frameworksDir = os.path.join(stubsDir, frameworksDirName) + +frameworks = set() +copiedFiles = set() + +assetsJsonFile = os.path.join(projectDirIn, 'obj', 'project.assets.json') +with open(assetsJsonFile) as json_data: + data = json.load(json_data) + if len(data['targets']) > 1: + print("ERROR: More than one target found in " + assetsJsonFile) + exit(1) + target = list(data['targets'].keys())[0] + print("Found target: " + target) + for package in data['targets'][target].keys(): + parts = package.split('/') + name = parts[0] + version = parts[1] + packageDir = os.path.join(stubsDir, name, version) + if not os.path.exists(packageDir): + os.makedirs(packageDir) + print(' * Processing package: ' + name + '/' + version) + with open(os.path.join(packageDir, stubFileName), 'a') as f: + f.write('// Stub for ' + name + ' version ' + version + '\n\n') + + dlls = set() + if 'compile' in data['targets'][target][package]: + for dll in data['targets'][target][package]['compile']: + dlls.add((name + '/' + version + '/' + dll).lower()) + if 'runtime' in data['targets'][target][package]: + for dll in data['targets'][target][package]['runtime']: + dlls.add((name + '/' + version + '/' + dll).lower()) + + for pathInfo in pathInfos: + for dll in dlls: + if pathInfo.lower().endswith(dll): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], packageDir) + f.write('// semmle-extractor-options: ' + + os.path.basename(pathInfos[pathInfo]) + '\n') + + if 'dependencies' in data['targets'][target][package]: + for dependency in data['targets'][target][package]['dependencies'].keys(): + depVersion = data['targets'][target][package]['dependencies'][dependency] + f.write('// semmle-extractor-options: ../../' + + dependency + '/' + depVersion + '/' + stubFileName + '\n') + + if 'frameworkReferences' in data['targets'][target][package]: + if not os.path.exists(frameworksDir): + os.makedirs(frameworksDir) + for framework in data['targets'][target][package]['frameworkReferences']: + frameworks.add(framework) + frameworkDir = os.path.join(frameworksDir, framework) + if not os.path.exists(frameworkDir): + os.makedirs(frameworkDir) + f.write('// semmle-extractor-options: ../../' + frameworksDirName + '/' + + framework + '/' + stubFileName + '\n') + +for framework in frameworks: + with open(os.path.join(frameworksDir, framework, stubFileName), 'a') as f: + f.write('// Stub for ' + framework + '\n\n') + for pathInfo in pathInfos: + if 'packs/' + framework.lower() in pathInfo.lower(): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], os.path.join( + frameworksDir, framework)) + f.write('// semmle-extractor-options: ' + + os.path.basename(pathInfos[pathInfo]) + '\n') + +# todo: write not copied files to others folder +for pathInfo in pathInfos: + if pathInfo not in copiedFiles: + print('Not copied to nuget or framework folder: ' + pathInfo) + othersDir = os.path.join(stubsDir, 'others') + if not os.path.exists(othersDir): + os.makedirs(othersDir) + shutil.copy2(pathInfos[pathInfo], othersDir) + +print("\n --> Generated structured stub files: " + stubsDir) + +print("\n* Building raw output project") +helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', '/p:WarningLevel=0', + rawSrcOutputDir], 'ERR: Build failed. Script failed to generate a stub that builds') + +print("\n --> Generated structured stub files: " + stubsDir) -print("\n --> Generated output file: " + outputFile) exit(0) From b725f6e547802e356008d0db9a9677863d2fc851 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 29 Apr 2021 14:02:38 +0200 Subject: [PATCH 1555/1662] Handle types that are defined in multiple assemblies --- csharp/ql/src/Stubs/Stubs.qll | 30 ++++++++++++------- .../query-tests/Stubs/All/AllStubs.expected | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 8918935022be..f1efa3193ed1 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -70,6 +70,10 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { if this.isStatic() then result = "static " else result = "" } + private string stubPartialModifier() { + if count(Assembly a | this.getALocation() = a) > 1 then result = "partial " else result = "" + } + private string stubAttributes() { if this.getAnAttribute().getType().getQualifiedName() = "System.FlagsAttribute" then result = "[System.Flags]\n" @@ -79,20 +83,21 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { private string stubComment() { result = "// Generated from `" + this.getQualifiedName() + "` in `" + - min(this.getLocation().toString()) + "`\n" + concat(this.getALocation().toString(), "; ") + "`\n" } /** Gets the entire C# stub code for this type. */ - final string getStub() { + final string getStub(Assembly assembly) { if this.isDuplicate() then result = "" else ( not this instanceof DelegateType and result = this.stubComment() + this.stubAttributes() + stubAccessibility(this) + - this.stubAbstractModifier() + this.stubStaticModifier() + this.stubKeyword() + " " + - this.getUndecoratedName() + stubGenericArguments(this) + stubBaseTypesString() + - stubTypeParametersConstraints(this) + "\n{\n" + stubMembers() + "}\n\n" + this.stubAbstractModifier() + this.stubStaticModifier() + this.stubPartialModifier() + + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + + stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + + stubMembers(assembly) + "}\n\n" or result = this.stubComment() + this.stubAttributes() + stubAccessibility(this) + this.stubKeyword() + @@ -126,8 +131,13 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { } language[monotonicAggregates] - private string stubMembers() { - result = concat(Member m | m = this.getAGeneratedMember() | stubMember(m) order by m.getName()) + private string stubMembers(Assembly assembly) { + result = + concat(Member m | + m = this.getAGeneratedMember() and m.getALocation() = assembly + | + stubMember(m, assembly) order by m.getName() + ) } private GeneratedMember getAGeneratedMember() { result.getDeclaringType() = this } @@ -280,7 +290,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { concat(GeneratedType gt | gt.getDeclaringNamespace() = this and gt.isInAssembly(assembly) | - gt.getStub() order by gt.getName() + gt.getStub(assembly) order by gt.getName() ) } } @@ -657,7 +667,7 @@ private string stubExplicitImplementation(Member c) { else result = "" } -private string stubMember(Member m) { +private string stubMember(Member m, Assembly assembly) { if m instanceof Method then if not m.getDeclaringType() instanceof Enum @@ -733,7 +743,7 @@ private string stubMember(Member m) { " " + stubExplicitImplementation(m) + m.getName() + ";\n" else if m instanceof GeneratedType - then result = m.(GeneratedType).getStub() + "\n" + then result = m.(GeneratedType).getStub(assembly) + "\n" else result = " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected index 3ad11482125b..c68f8dce3bb7 100644 --- a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected @@ -1 +1 @@ -| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:141:18:141:19`\npublic class C1\n{\n public C1() => throw null;\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:148:22:148:23`\npublic class C2\n{\n public C2() => throw null;\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:154:18:154:19`\npublic class C3\n{\n public C3() => throw null;\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:164:18:164:19`\npublic class C4\n{\n public C4() => throw null;\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:161:22:161:23`\npublic class D4\n{\n public D4() => throw null;\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23`\npublic class Class1\n{\n public Class1() => throw null;\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n public Class11(int i) => throw null;\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28`\npublic class Class12 : Test.Class1.Class11\n{\n public Class12(int i, float j) : base(default(int)) => throw null;\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37`\npublic abstract class Class13\n{\n protected Class13() => throw null;\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected Class14() => throw null;\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35`\npublic class GenericType\n{\n public GenericType() => throw null;\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26`\npublic class X\n{\n public X() => throw null;\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n // Stub generator skipped constructor \n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23`\npublic class Class3\n{\n public Class3() => throw null;\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23`\npublic class Class4\n{\n public Class4() => throw null;\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23`\npublic class Class5 : Test.IInterface1\n{\n public Class5() => throw null;\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26`\npublic class Class6 where T: class, Test.IInterface1\n{\n public Class6(int i) => throw null;\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23`\npublic class Class7 : Test.Class6\n{\n public Class7(int i) : base(default(int)) => throw null;\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23`\npublic class Class8\n{\n public Class8() => throw null;\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23`\npublic class Class9\n{\n private Class9(int i) => throw null;\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27`\npublic class Nested : Test.Class9\n{\n internal Nested(int i) : base(default(int)) => throw null;\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | +| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:141:18:141:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C1\n{\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:148:22:148:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C2\n{\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:154:18:154:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C3\n{\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:164:18:164:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C4\n{\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:161:22:161:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class D4\n{\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class1\n{\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class12 : Test.Class1.Class11\n{\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class13\n{\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class GenericType\n{\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class X\n{\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class3\n{\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class4\n{\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class5 : Test.IInterface1\n{\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class6 where T: class, Test.IInterface1\n{\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class7 : Test.Class6\n{\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class8\n{\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class9\n{\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Nested : Test.Class9\n{\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | From cce74044708cd26584de46cf1b1fb63421039f61 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 30 Apr 2021 17:51:44 +0200 Subject: [PATCH 1556/1662] Add csproj generation --- csharp/ql/src/Stubs/make_stubs_nuget.py | 123 +++++++++++++++--------- 1 file changed, 78 insertions(+), 45 deletions(-) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index 567c86d3b33a..39fdecf4407d 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -125,53 +125,86 @@ os.makedirs(packageDir) print(' * Processing package: ' + name + '/' + version) with open(os.path.join(packageDir, stubFileName), 'a') as f: - f.write('// Stub for ' + name + ' version ' + version + '\n\n') + with open(os.path.join(packageDir, name + '.csproj'), 'a') as pf: + + pf.write('\n') + pf.write(' \n') + pf.write(' net5.0\n') + pf.write(' true\n') + pf.write(' bin\\n') + pf.write( + ' false\n') + pf.write(' \n\n') + pf.write(' \n') + + f.write('// Stub for ' + name + ' version ' + version + '\n\n') + + dlls = set() + if 'compile' in data['targets'][target][package]: + for dll in data['targets'][target][package]['compile']: + dlls.add( + (name + '/' + version + '/' + dll).lower()) + if 'runtime' in data['targets'][target][package]: + for dll in data['targets'][target][package]['runtime']: + dlls.add((name + '/' + version + '/' + dll).lower()) + + for pathInfo in pathInfos: + for dll in dlls: + if pathInfo.lower().endswith(dll): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], packageDir) + f.write('// semmle-extractor-options: ' + + os.path.basename(pathInfos[pathInfo]) + '\n') + + if 'dependencies' in data['targets'][target][package]: + for dependency in data['targets'][target][package]['dependencies'].keys(): + depVersion = data['targets'][target][package]['dependencies'][dependency] + f.write('// semmle-extractor-options: ../../' + + dependency + '/' + depVersion + '/' + stubFileName + '\n') + pf.write(' \n') + + if 'frameworkReferences' in data['targets'][target][package]: + if not os.path.exists(frameworksDir): + os.makedirs(frameworksDir) + for framework in data['targets'][target][package]['frameworkReferences']: + frameworks.add(framework) + frameworkDir = os.path.join( + frameworksDir, framework) + if not os.path.exists(frameworkDir): + os.makedirs(frameworkDir) + f.write('// semmle-extractor-options: ../../' + frameworksDirName + '/' + + framework + '/' + stubFileName + '\n') + pf.write(' \n') + + pf.write(' \n') + pf.write('\n') - dlls = set() - if 'compile' in data['targets'][target][package]: - for dll in data['targets'][target][package]['compile']: - dlls.add((name + '/' + version + '/' + dll).lower()) - if 'runtime' in data['targets'][target][package]: - for dll in data['targets'][target][package]['runtime']: - dlls.add((name + '/' + version + '/' + dll).lower()) +for framework in frameworks: + with open(os.path.join(frameworksDir, framework, stubFileName), 'a') as f: + with open(os.path.join(frameworksDir, framework, framework + '.csproj'), 'a') as pf: + + pf.write('\n') + pf.write(' \n') + pf.write(' net5.0\n') + pf.write(' true\n') + pf.write(' bin\\n') + pf.write( + ' false\n') + pf.write(' \n') + pf.write('\n') + + f.write('// Stub for ' + framework + '\n\n') for pathInfo in pathInfos: - for dll in dlls: - if pathInfo.lower().endswith(dll): - copiedFiles.add(pathInfo) - shutil.copy2(pathInfos[pathInfo], packageDir) - f.write('// semmle-extractor-options: ' + - os.path.basename(pathInfos[pathInfo]) + '\n') - - if 'dependencies' in data['targets'][target][package]: - for dependency in data['targets'][target][package]['dependencies'].keys(): - depVersion = data['targets'][target][package]['dependencies'][dependency] - f.write('// semmle-extractor-options: ../../' + - dependency + '/' + depVersion + '/' + stubFileName + '\n') - - if 'frameworkReferences' in data['targets'][target][package]: - if not os.path.exists(frameworksDir): - os.makedirs(frameworksDir) - for framework in data['targets'][target][package]['frameworkReferences']: - frameworks.add(framework) - frameworkDir = os.path.join(frameworksDir, framework) - if not os.path.exists(frameworkDir): - os.makedirs(frameworkDir) - f.write('// semmle-extractor-options: ../../' + frameworksDirName + '/' + - framework + '/' + stubFileName + '\n') + if 'packs/' + framework.lower() in pathInfo.lower(): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], os.path.join( + frameworksDir, framework)) + f.write('// semmle-extractor-options: ' + + os.path.basename(pathInfos[pathInfo]) + '\n') -for framework in frameworks: - with open(os.path.join(frameworksDir, framework, stubFileName), 'a') as f: - f.write('// Stub for ' + framework + '\n\n') - for pathInfo in pathInfos: - if 'packs/' + framework.lower() in pathInfo.lower(): - copiedFiles.add(pathInfo) - shutil.copy2(pathInfos[pathInfo], os.path.join( - frameworksDir, framework)) - f.write('// semmle-extractor-options: ' + - os.path.basename(pathInfos[pathInfo]) + '\n') - -# todo: write not copied files to others folder for pathInfo in pathInfos: if pathInfo not in copiedFiles: print('Not copied to nuget or framework folder: ' + pathInfo) @@ -183,8 +216,8 @@ print("\n --> Generated structured stub files: " + stubsDir) print("\n* Building raw output project") -helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', '/p:WarningLevel=0', - rawSrcOutputDir], 'ERR: Build failed. Script failed to generate a stub that builds') +helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', '/p:WarningLevel=0', rawSrcOutputDir], + 'ERR: Build failed. Script failed to generate a stub that builds. Please touch up manually the stubs.') print("\n --> Generated structured stub files: " + stubsDir) From 31795c3e6bf40e6302f937bb565ab76034a1c0b0 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 13:58:24 +0200 Subject: [PATCH 1557/1662] Introduce test option to include files from projects --- .../BuildAnalysis.cs | 2 +- .../Extractor}/CsProjFile.cs | 37 ++++++++++++----- .../Extractor/Extractor.cs | 40 +++++++++++++++++++ .../Extractor/Options.cs | 9 +++++ .../Semmle.Extraction.CSharp.csproj | 1 + 5 files changed, 79 insertions(+), 10 deletions(-) rename csharp/extractor/{Semmle.Extraction.CSharp.Standalone => Semmle.Extraction.CSharp/Extractor}/CsProjFile.cs (79%) diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/BuildAnalysis.cs b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/BuildAnalysis.cs index f7752f6d60d0..285bf7d652c2 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/BuildAnalysis.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.Standalone/BuildAnalysis.cs @@ -289,7 +289,7 @@ private void AnalyseProject(FileInfo project) try { - var csProj = new CsProjFile(project); + var csProj = new Extraction.CSharp.CsProjFile(project); foreach (var @ref in csProj.References) { diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/CsProjFile.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/CsProjFile.cs similarity index 79% rename from csharp/extractor/Semmle.Extraction.CSharp.Standalone/CsProjFile.cs rename to csharp/extractor/Semmle.Extraction.CSharp/Extractor/CsProjFile.cs index dc775835e700..385f1cc87c0a 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Standalone/CsProjFile.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/CsProjFile.cs @@ -4,12 +4,12 @@ using System.Linq; using System.Xml; -namespace Semmle.BuildAnalyser +namespace Semmle.Extraction.CSharp { /// /// Represents a .csproj file and reads information from it. /// - internal class CsProjFile + public class CsProjFile { private string Filename { get; } @@ -38,14 +38,14 @@ public CsProjFile(FileInfo filename) // unrecognised content or is the wrong version. // This currently always fails on Linux because // Microsoft.Build is not cross platform. - (csFiles, references) = ReadMsBuildProject(filename); + (csFiles, references, projectReferences) = ReadMsBuildProject(filename); } catch // lgtm[cs/catch-of-all-exceptions] { // There was some reason why the project couldn't be loaded. // Fall back to reading the Xml document directly. // This method however doesn't handle variable expansion. - (csFiles, references) = ReadProjectFileAsXml(filename, Directory); + (csFiles, references, projectReferences) = ReadProjectFileAsXml(filename, Directory); } } @@ -55,7 +55,7 @@ public CsProjFile(FileInfo filename) /// and there seems to be no way to make it succeed. Fails on Linux. /// /// The file to read. - private static (string[] csFiles, string[] references) ReadMsBuildProject(FileInfo filename) + private static (string[] csFiles, string[] references, string[] projectReferences) ReadMsBuildProject(FileInfo filename) { var msbuildProject = new Microsoft.Build.Execution.ProjectInstance(filename.FullName); @@ -64,13 +64,18 @@ private static (string[] csFiles, string[] references) ReadMsBuildProject(FileIn .Select(item => item.EvaluatedInclude) .ToArray(); + var projectReferences = msbuildProject.Items + .Where(item => item.ItemType == "ProjectReference") + .Select(item => item.EvaluatedInclude) + .ToArray(); + var csFiles = msbuildProject.Items .Where(item => item.ItemType == "Compile") .Select(item => item.GetMetadataValue("FullPath")) .Where(fn => fn.EndsWith(".cs")) .ToArray(); - return (csFiles, references); + return (csFiles, references, projectReferences); } /// @@ -79,7 +84,7 @@ private static (string[] csFiles, string[] references) ReadMsBuildProject(FileIn /// fallback if ReadMsBuildProject() fails. /// /// The .csproj file. - private static (string[] csFiles, string[] references) ReadProjectFileAsXml(FileInfo fileName, string directoryName) + private static (string[] csFiles, string[] references, string[] projectReferences) ReadProjectFileAsXml(FileInfo fileName, string directoryName) { var projFile = new XmlDocument(); var mgr = new XmlNamespaceManager(projFile.NameTable); @@ -109,8 +114,16 @@ private static (string[] csFiles, string[] references) ReadProjectFileAsXml(File var additionalCsFiles = System.IO.Directory.GetFiles(directoryName, "*.cs", SearchOption.AllDirectories); + var projectReferences = root + .SelectNodes("/Project/ItemGroup/ProjectReference/@Include", mgr) + ?.NodeList() + .Select(node => node.Value) + .Select(csproj => GetFullPath(csproj, projDir)) + .Where(s => s is not null) + ?? Enumerable.Empty(); + #nullable disable warnings - return (explicitCsFiles.Concat(additionalCsFiles).ToArray(), Array.Empty()); + return (explicitCsFiles.Concat(additionalCsFiles).ToArray(), Array.Empty(), projectReferences.ToArray()); #nullable restore warnings } @@ -135,7 +148,7 @@ private static (string[] csFiles, string[] references) ReadProjectFileAsXml(File .ToArray(); #nullable disable warnings - return (csFiles, references); + return (csFiles, references, Array.Empty()); #nullable restore warnings } @@ -150,6 +163,7 @@ private static (string[] csFiles, string[] references) ReadProjectFileAsXml(File } private readonly string[] references; + private readonly string[] projectReferences; private readonly string[] csFiles; /// @@ -157,6 +171,11 @@ private static (string[] csFiles, string[] references) ReadProjectFileAsXml(File /// public IEnumerable References => references; + /// + /// The list of project references in full path format. + /// + public IEnumerable ProjectReferences => projectReferences; + /// /// The list of C# source files in full path format. /// diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index 1dd6d817b010..d01a3f37ac85 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -107,6 +107,11 @@ public static ExitCode Run(string[] args) try { + if (options.ProjectsToLoad.Any()) + { + AddSourceFilesFromProjects(options.ProjectsToLoad, options.CompilerArguments, logger); + } + var compilerVersion = new CompilerVersion(options); if (compilerVersion.SkipExtraction) @@ -146,6 +151,41 @@ public static ExitCode Run(string[] args) } } + private static void AddSourceFilesFromProjects(IEnumerable projectsToLoad, IList compilerArguments, ILogger logger) + { + logger.Log(Severity.Info, " Loading referenced projects."); + var projects = new Queue(projectsToLoad); + var processed = new HashSet(); + while (projects.Count > 0) + { + var project = projects.Dequeue(); + var fi = new FileInfo(project); + if (processed.Contains(fi.FullName)) + { + continue; + } + + processed.Add(fi.FullName); + logger.Log(Severity.Info, " Processing referenced project: " + fi.FullName); + + var csProj = new CsProjFile(fi); + + foreach (var cs in csProj.Sources) + { + if (cs.Contains("/obj/")) + { + continue; + } + compilerArguments.Add(cs); + } + + foreach (var pr in csProj.ProjectReferences) + { + projects.Enqueue(pr); + } + } + } + /// /// Gets the complete list of locations to locate references. /// diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs index 981f3d321495..0e27799efd1f 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Options.cs @@ -16,6 +16,12 @@ public sealed class Options : CommonOptions /// public string? Framework { get; set; } + /// + /// Project files whose source files should be added to the compilation. + /// Only used in tests. + /// + public IList ProjectsToLoad { get; } = new List(); + /// /// All other arguments passed to the compilation. /// @@ -68,6 +74,9 @@ public override bool HandleOption(string key, string value) case "framework": Framework = value; return true; + case "load-sources-from-project": + ProjectsToLoad.Add(value); + return true; default: return base.HandleOption(key, value); } diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj b/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj index f07ec48d80a7..a18d3df87c23 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj +++ b/csharp/extractor/Semmle.Extraction.CSharp/Semmle.Extraction.CSharp.csproj @@ -23,6 +23,7 @@ + From a00c2ccf31790fa8b907ae45072c2dd7664159f8 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 19 May 2021 11:07:52 +0200 Subject: [PATCH 1558/1662] Remove _stub.cs file generation --- csharp/ql/src/Stubs/make_stubs_nuget.py | 128 +++++++++++------------- 1 file changed, 56 insertions(+), 72 deletions(-) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index 39fdecf4407d..c4dc7d8492b9 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -100,8 +100,6 @@ stubsDir = os.path.join(outputDir, stubsDirName) os.makedirs(stubsDir) -stubFileName = '_stub.cs' - frameworksDirName = 'frameworks' frameworksDir = os.path.join(stubsDir, frameworksDirName) @@ -124,66 +122,7 @@ if not os.path.exists(packageDir): os.makedirs(packageDir) print(' * Processing package: ' + name + '/' + version) - with open(os.path.join(packageDir, stubFileName), 'a') as f: - with open(os.path.join(packageDir, name + '.csproj'), 'a') as pf: - - pf.write('\n') - pf.write(' \n') - pf.write(' net5.0\n') - pf.write(' true\n') - pf.write(' bin\\n') - pf.write( - ' false\n') - pf.write(' \n\n') - pf.write(' \n') - - f.write('// Stub for ' + name + ' version ' + version + '\n\n') - - dlls = set() - if 'compile' in data['targets'][target][package]: - for dll in data['targets'][target][package]['compile']: - dlls.add( - (name + '/' + version + '/' + dll).lower()) - if 'runtime' in data['targets'][target][package]: - for dll in data['targets'][target][package]['runtime']: - dlls.add((name + '/' + version + '/' + dll).lower()) - - for pathInfo in pathInfos: - for dll in dlls: - if pathInfo.lower().endswith(dll): - copiedFiles.add(pathInfo) - shutil.copy2(pathInfos[pathInfo], packageDir) - f.write('// semmle-extractor-options: ' + - os.path.basename(pathInfos[pathInfo]) + '\n') - - if 'dependencies' in data['targets'][target][package]: - for dependency in data['targets'][target][package]['dependencies'].keys(): - depVersion = data['targets'][target][package]['dependencies'][dependency] - f.write('// semmle-extractor-options: ../../' + - dependency + '/' + depVersion + '/' + stubFileName + '\n') - pf.write(' \n') - - if 'frameworkReferences' in data['targets'][target][package]: - if not os.path.exists(frameworksDir): - os.makedirs(frameworksDir) - for framework in data['targets'][target][package]['frameworkReferences']: - frameworks.add(framework) - frameworkDir = os.path.join( - frameworksDir, framework) - if not os.path.exists(frameworkDir): - os.makedirs(frameworkDir) - f.write('// semmle-extractor-options: ../../' + frameworksDirName + '/' + - framework + '/' + stubFileName + '\n') - pf.write(' \n') - - pf.write(' \n') - pf.write('\n') - -for framework in frameworks: - with open(os.path.join(frameworksDir, framework, stubFileName), 'a') as f: - with open(os.path.join(frameworksDir, framework, framework + '.csproj'), 'a') as pf: + with open(os.path.join(packageDir, name + '.csproj'), 'a') as pf: pf.write('\n') pf.write(' \n') @@ -192,18 +131,63 @@ pf.write(' bin\\n') pf.write( ' false\n') - pf.write(' \n') - pf.write('\n') - - f.write('// Stub for ' + framework + '\n\n') + pf.write(' \n\n') + pf.write(' \n') + + dlls = set() + if 'compile' in data['targets'][target][package]: + for dll in data['targets'][target][package]['compile']: + dlls.add( + (name + '/' + version + '/' + dll).lower()) + if 'runtime' in data['targets'][target][package]: + for dll in data['targets'][target][package]['runtime']: + dlls.add((name + '/' + version + '/' + dll).lower()) for pathInfo in pathInfos: - if 'packs/' + framework.lower() in pathInfo.lower(): - copiedFiles.add(pathInfo) - shutil.copy2(pathInfos[pathInfo], os.path.join( - frameworksDir, framework)) - f.write('// semmle-extractor-options: ' + - os.path.basename(pathInfos[pathInfo]) + '\n') + for dll in dlls: + if pathInfo.lower().endswith(dll): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], packageDir) + + if 'dependencies' in data['targets'][target][package]: + for dependency in data['targets'][target][package]['dependencies'].keys(): + depVersion = data['targets'][target][package]['dependencies'][dependency] + pf.write(' \n') + + if 'frameworkReferences' in data['targets'][target][package]: + if not os.path.exists(frameworksDir): + os.makedirs(frameworksDir) + for framework in data['targets'][target][package]['frameworkReferences']: + frameworks.add(framework) + frameworkDir = os.path.join( + frameworksDir, framework) + if not os.path.exists(frameworkDir): + os.makedirs(frameworkDir) + pf.write(' \n') + + pf.write(' \n') + pf.write('\n') + +for framework in frameworks: + with open(os.path.join(frameworksDir, framework, framework + '.csproj'), 'a') as pf: + + pf.write('\n') + pf.write(' \n') + pf.write(' net5.0\n') + pf.write(' true\n') + pf.write(' bin\\n') + pf.write( + ' false\n') + pf.write(' \n') + pf.write('\n') + + for pathInfo in pathInfos: + if 'packs/' + framework.lower() in pathInfo.lower(): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], os.path.join( + frameworksDir, framework)) for pathInfo in pathInfos: if pathInfo not in copiedFiles: From 53054290d1f2096006147d0ab6c9fd7309214a78 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 19 May 2021 11:14:37 +0200 Subject: [PATCH 1559/1662] Improve QL check for path match on netcore.app.ref in exluded assemblies --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql index 3f10ffdb19a0..e048f8d87290 100644 --- a/csharp/ql/src/Stubs/AllStubsFromReference.ql +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -12,9 +12,7 @@ class AllExternalPublicDeclarations extends GeneratedDeclaration { /** All framework assemblies. */ class NonTargetAssembly extends ExcludedAssembly { - NonTargetAssembly() { - exists(this.getFile().getAbsolutePath().indexOf("Microsoft.NETCore.App.Ref")) - } + NonTargetAssembly() { this.getFile().getAbsolutePath().matches("%Microsoft.NETCore.App.Ref%") } } from Assembly a From e93736f5830b37fd978515b94aa99e722f1e1688 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 19 May 2021 11:23:32 +0200 Subject: [PATCH 1560/1662] Change base class of GeneratedDeclaration to Modifiable --- csharp/ql/src/Stubs/Stubs.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index f1efa3193ed1..f1ee63c759f5 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -160,8 +160,8 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { * This is extended in client code to identify the actual * declarations that should be generated. */ -abstract class GeneratedDeclaration extends Declaration { - GeneratedDeclaration() { this.(Modifiable).isEffectivelyPublic() } +abstract class GeneratedDeclaration extends Modifiable { + GeneratedDeclaration() { this.isEffectivelyPublic() } } private class IndirectType extends GeneratedType { From 2edfa154720ea0a6de2f7963edef7277323d0b0d Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 19 May 2021 11:32:44 +0200 Subject: [PATCH 1561/1662] Reduce size of stubDefaultArguments predicate --- csharp/ql/src/Stubs/Stubs.qll | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index f1ee63c759f5..1936bb255aca 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -628,13 +628,18 @@ private string stubParameters(Parameterizable p) { ) } -private string stubDefaultArguments(Parameterizable p) { - result = - concat(int i, Parameter param | - param = p.getParameter(i) and not param.getType() instanceof ArglistType - | - "default(" + stubClassName(param.getType()) + ")", ", " order by i - ) +private string stubDefaultArguments(Constructor baseCtor) { + exists(Constructor c | + baseCtor = getBaseConstructor(c.getDeclaringType()) and + baseCtor.getNumberOfParameters() > 0 and + not c.isStatic() and + result = + concat(int i, Parameter param | + param = baseCtor.getParameter(i) and not param.getType() instanceof ArglistType + | + "default(" + stubClassName(param.getType()) + ")", ", " order by i + ) + ) } private string stubParameterModifiers(Parameter p) { From d7d653b9d292ca9b789b1c4684bbac0e35880177 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 14:01:33 +0200 Subject: [PATCH 1562/1662] Fix tuple stubbing with arity < 2 --- csharp/ql/src/Stubs/Stubs.qll | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 1936bb255aca..6a8d969b741f 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -429,13 +429,16 @@ private string stubClassName(Type t) { else if t instanceof TupleType then - result = - "(" + - concat(int i, Type element | - element = t.(TupleType).getElementType(i) - | - stubClassName(element), "," order by i - ) + ")" + if t.(TupleType).getArity() < 2 + then result = stubClassName(t.(TupleType).getUnderlyingType()) + else + result = + "(" + + concat(int i, Type element | + element = t.(TupleType).getElementType(i) + | + stubClassName(element), "," order by i + ) + ")" else if t instanceof ValueOrRefType then From fec0ddd2d2cdfa05c7a67ee946c52d98081b4cad Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 14:01:00 +0200 Subject: [PATCH 1563/1662] Add test for tuples with arity < 2 --- csharp/ql/test/query-tests/Stubs/All/AllStubs.expected | 2 +- csharp/ql/test/query-tests/Stubs/All/Test.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected index c68f8dce3bb7..4c6f0df14138 100644 --- a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected @@ -1 +1 @@ -| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:141:18:141:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C1\n{\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:148:22:148:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C2\n{\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:154:18:154:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C3\n{\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:164:18:164:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C4\n{\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:161:22:161:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class D4\n{\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:3:18:3:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class1\n{\n// Generated from `Test.Class1.Class11` in `Test.cs:29:22:29:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:46:22:46:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class12 : Test.Class1.Class11\n{\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:58:31:58:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class13\n{\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:65:31:65:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:42:30:42:41; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:51:22:51:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class GenericType\n{\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:53:26:53:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class X\n{\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:13:26:13:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:18:38:18:47; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:5:23:5:29; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n public int i;\n public static int j = default;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:79:18:79:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class3\n{\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:86:18:86:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class4\n{\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:97:18:97:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class5 : Test.IInterface1\n{\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:102:18:102:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class6 where T: class, Test.IInterface1\n{\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:109:18:109:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class7 : Test.Class6\n{\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:116:18:116:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class8\n{\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:121:18:121:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class9\n{\n// Generated from `Test.Class9.Nested` in `Test.cs:125:22:125:27; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Nested : Test.Class9\n{\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:91:22:91:32; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | +| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:146:18:146:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C1\n{\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:153:22:153:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C2\n{\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:159:18:159:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C3\n{\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:169:18:169:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C4\n{\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:166:22:166:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class D4\n{\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:5:18:5:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class1\n{\n// Generated from `Test.Class1.Class11` in `Test.cs:34:22:34:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:51:22:51:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class12 : Test.Class1.Class11\n{\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:63:31:63:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class13\n{\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:70:31:70:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:47:30:47:41; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:56:22:56:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class GenericType\n{\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:58:26:58:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class X\n{\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:18:26:18:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:23:38:23:47; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:7:23:7:29; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n public int i;\n public static int j = default;\n public System.ValueTuple t1;\n public (int,int) t2;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:84:18:84:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class3\n{\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:91:18:91:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class4\n{\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:102:18:102:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class5 : Test.IInterface1\n{\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:107:18:107:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class6 where T: class, Test.IInterface1\n{\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:114:18:114:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class7 : Test.Class6\n{\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:121:18:121:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class8\n{\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:126:18:126:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class9\n{\n// Generated from `Test.Class9.Nested` in `Test.cs:130:22:130:27; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Nested : Test.Class9\n{\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:96:22:96:32; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | diff --git a/csharp/ql/test/query-tests/Stubs/All/Test.cs b/csharp/ql/test/query-tests/Stubs/All/Test.cs index 7a312ec44567..da498a8cbff0 100644 --- a/csharp/ql/test/query-tests/Stubs/All/Test.cs +++ b/csharp/ql/test/query-tests/Stubs/All/Test.cs @@ -1,9 +1,14 @@ +using System; + namespace Test { public class Class1 { public struct Struct1 { + public ValueTuple t1; + public (int, int) t2; + public int i; public const int j = 42; From 914da6bdd24f94114cd8075a1af812b3bce1dfdc Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 19 May 2021 17:49:44 +0200 Subject: [PATCH 1564/1662] Fix various stubbing issues --- csharp/ql/src/Stubs/Stubs.qll | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 6a8d969b741f..19b605835be1 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -71,7 +71,11 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { } private string stubPartialModifier() { - if count(Assembly a | this.getALocation() = a) > 1 then result = "partial " else result = "" + if + count(Assembly a | this.getALocation() = a) <= 1 or + this instanceof Enum + then result = "" + else result = "partial " } private string stubAttributes() { @@ -100,9 +104,10 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { stubMembers(assembly) + "}\n\n" or result = - this.stubComment() + this.stubAttributes() + stubAccessibility(this) + this.stubKeyword() + - " " + stubClassName(this.(DelegateType).getReturnType()) + " " + this.getUndecoratedName() - + stubGenericArguments(this) + "(" + stubParameters(this) + ");\n\n" + this.stubComment() + this.stubAttributes() + stubUnsafe(this) + stubAccessibility(this) + + this.stubKeyword() + " " + stubClassName(this.(DelegateType).getReturnType()) + " " + + this.getUndecoratedName() + stubGenericArguments(this) + "(" + stubParameters(this) + + ");\n\n" ) } @@ -669,6 +674,12 @@ private string stubDefaultValue(Parameter p) { else result = "" } +private string stubEventAccessors(Event e) { + if exists(e.(Virtualizable).getExplicitlyImplementedInterface()) + then result = " { add => throw null; remove => throw null; }" + else result = ";" +} + private string stubExplicitImplementation(Member c) { if exists(c.(Virtualizable).getExplicitlyImplementedInterface()) then result = stubClassName(c.(Virtualizable).getExplicitlyImplementedInterface()) + "." @@ -748,7 +759,8 @@ private string stubMember(Member m, Assembly assembly) { then result = " " + stubModifiers(m) + "event " + stubClassName(m.(Event).getType()) + - " " + stubExplicitImplementation(m) + m.getName() + ";\n" + " " + stubExplicitImplementation(m) + m.getName() + stubEventAccessors(m) + + "\n" else if m instanceof GeneratedType then result = m.(GeneratedType).getStub(assembly) + "\n" From 22f3b05170614b478f676f39f54167c20787a060 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 21 May 2021 08:57:03 +0200 Subject: [PATCH 1565/1662] Handle all structs (simple types, intptr, system.void) --- csharp/ql/src/Stubs/Stubs.qll | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 19b605835be1..7109451dc61f 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -12,6 +12,8 @@ */ import csharp +private import semmle.code.csharp.frameworks.System +private import semmle.code.dotnet.DotNet as DotNet /** An element that should be in the generated code. */ abstract class GeneratedElement extends Element { } @@ -19,15 +21,25 @@ abstract class GeneratedElement extends Element { } /** A member that should be in the generated code. */ abstract class GeneratedMember extends Member, GeneratedElement { } +/** Class representing all `struct`s, such as user defined ones and built-in ones, like `int`. */ +private class StructEx extends Type { + StructEx() { + this instanceof Struct or + this instanceof SimpleType or + this instanceof VoidType or + this instanceof SystemIntPtrType + } +} + /** A type that should be in the generated code. */ -abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { +abstract private class GeneratedType extends Type, GeneratedElement { GeneratedType() { ( this instanceof Interface or this instanceof Class or - this instanceof Struct + this instanceof StructEx or this instanceof Enum or @@ -53,7 +65,7 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { private string stubKeyword() { this instanceof Interface and result = "interface" or - this instanceof Struct and result = "struct" + this instanceof StructEx and result = "struct" or this instanceof Class and result = "class" or @@ -79,7 +91,7 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { } private string stubAttributes() { - if this.getAnAttribute().getType().getQualifiedName() = "System.FlagsAttribute" + if this.(ValueOrRefType).getAnAttribute().getType().getQualifiedName() = "System.FlagsAttribute" then result = "[System.Flags]\n" else result = "" } @@ -112,7 +124,7 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement { } private ValueOrRefType getAnInterestingBaseType() { - result = this.getABaseType() and + result = this.(ValueOrRefType).getABaseType() and not result instanceof ObjectType and not result.getQualifiedName() = "System.ValueType" and (not result instanceof Interface or result.(Interface).isEffectivelyPublic()) @@ -171,9 +183,9 @@ abstract class GeneratedDeclaration extends Modifiable { private class IndirectType extends GeneratedType { IndirectType() { - this.getASubType() instanceof GeneratedType + this.(ValueOrRefType).getASubType() instanceof GeneratedType or - this.getAChildType() instanceof GeneratedType + this.(ValueOrRefType).getAChildType() instanceof GeneratedType or this.(UnboundGenericType).getAConstructedGeneric().getASubType() instanceof GeneratedType or @@ -273,7 +285,8 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { } private predicate isInAssembly(Assembly assembly) { - any(GeneratedType gt | gt.getDeclaringNamespace() = this).isInAssembly(assembly) + any(GeneratedType gt | gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this) + .isInAssembly(assembly) or this.getChildNamespace(_).isInAssembly(assembly) } @@ -293,7 +306,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { this.isInAssembly(assembly) and result = concat(GeneratedType gt | - gt.getDeclaringNamespace() = this and gt.isInAssembly(assembly) + gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly) | gt.getStub(assembly) order by gt.getName() ) @@ -454,7 +467,7 @@ private string stubClassName(Type t) { } language[monotonicAggregates] -private string stubGenericArguments(ValueOrRefType t) { +private string stubGenericArguments(Type t) { if t instanceof UnboundGenericType then result = @@ -730,7 +743,7 @@ private string stubMember(Member m, Assembly assembly) { if not m.getDeclaringType() instanceof Enum and ( - not m.getDeclaringType() instanceof Struct or + not m.getDeclaringType() instanceof StructEx or m.(Constructor).getNumberOfParameters() > 0 ) then From 42fcfad0d8d9ff71726c5dda365a8f8819b0df48 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 21 May 2021 10:30:35 +0200 Subject: [PATCH 1566/1662] Handle types defined in multiple assemblies --- csharp/ql/src/Stubs/Stubs.qll | 42 ++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 7109451dc61f..eb1c790aace5 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -50,13 +50,36 @@ abstract private class GeneratedType extends Type, GeneratedElement { } /** - * Holds if this type is duplicated in another assembly. - * In this case, we use the assembly with the highest string. + * Holds if this type is defined in multiple assemblies, and at least one of + * them is in the `Microsoft.NETCore.App.Ref` folder. In this case, we only stub + * the type in the assembly in `Microsoft.NETCore.App.Ref`. In case there are + * multiple assemblies in this folder, then we prefer `System.Runtime`. */ - private predicate isDuplicate() { - exists(GeneratedType dup | - dup.getQualifiedName() = this.getQualifiedName() and - this.getLocation().(Assembly).toString() < dup.getLocation().(Assembly).toString() + private predicate isDuplicate(Assembly assembly) { + // type exists in multiple assemblies + count(this.getALocation().(Assembly)) > 1 and + // at least one of them is in the `Microsoft.NETCore.App.Ref` folder + this.getALocation() + .(Assembly) + .getFile() + .getAbsolutePath() + .matches("%Microsoft.NETCore.App.Ref%") and + exists(int i | + i = + count(Assembly a | + this.getALocation() = a and + a.getFile().getAbsolutePath().matches("%Microsoft.NETCore.App.Ref%") + ) + | + i = 1 and + // assemblies not in `Microsoft.NETCore.App.Ref` folder are considered duplicates + not assembly.getFile().getAbsolutePath().matches("%Microsoft.NETCore.App.Ref%") + or + i > 1 and + // one of the assemblies is named `System.Runtime` + this.getALocation().(Assembly).getName() = "System.Runtime" and + // all others are considered duplicates + assembly.getName() != "System.Runtime" ) } @@ -104,8 +127,11 @@ abstract private class GeneratedType extends Type, GeneratedElement { /** Gets the entire C# stub code for this type. */ final string getStub(Assembly assembly) { - if this.isDuplicate() - then result = "" + if this.isDuplicate(assembly) + then + result = + "/* Duplicate type '" + this.getName() + "' is not stubbed in this assembly '" + + assembly.toString() + "'. */\n\n" else ( not this instanceof DelegateType and result = From f597c9a7ed4a71d0e415fb7e972fd7b82e4485ba Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 21 May 2021 14:03:28 +0200 Subject: [PATCH 1567/1662] Handle special case of duplicate type constraints --- csharp/ql/src/Stubs/Stubs.qll | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index eb1c790aace5..665dc8bf2762 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -534,7 +534,11 @@ private string stubConstraints(TypeParameterConstraints tpc, int i) { or tpc.hasUnmanagedTypeConstraint() and result = "unmanaged" and i = 0 or - tpc.hasValueTypeConstraint() and result = "struct" and i = 0 + tpc.hasValueTypeConstraint() and + result = "struct" and + i = 0 and + not tpc.hasUnmanagedTypeConstraint() and + not stubClassName(tpc.getATypeConstraint().(Class)) = "System.Enum" or tpc.hasRefTypeConstraint() and result = "class" and i = 0 or From d7a93a5367325554e6d49445986e004d496efc75 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 21 May 2021 14:08:32 +0200 Subject: [PATCH 1568/1662] Move default excluded assembly definition --- csharp/ql/src/Stubs/AllStubsFromReference.ql | 5 ----- csharp/ql/src/Stubs/AllStubsFromSource.ql | 9 +++++++++ csharp/ql/src/Stubs/MinimalStubsFromSource.ql | 9 +++++++++ csharp/ql/src/Stubs/Stubs.qll | 9 --------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/csharp/ql/src/Stubs/AllStubsFromReference.ql b/csharp/ql/src/Stubs/AllStubsFromReference.ql index e048f8d87290..e8d0debb3169 100644 --- a/csharp/ql/src/Stubs/AllStubsFromReference.ql +++ b/csharp/ql/src/Stubs/AllStubsFromReference.ql @@ -10,11 +10,6 @@ class AllExternalPublicDeclarations extends GeneratedDeclaration { AllExternalPublicDeclarations() { this.fromLibrary() } } -/** All framework assemblies. */ -class NonTargetAssembly extends ExcludedAssembly { - NonTargetAssembly() { this.getFile().getAbsolutePath().matches("%Microsoft.NETCore.App.Ref%") } -} - from Assembly a select a.getFullName(), a.getName(), a.getVersion().toString(), a.getFile().getAbsolutePath(), generatedCode(a) diff --git a/csharp/ql/src/Stubs/AllStubsFromSource.ql b/csharp/ql/src/Stubs/AllStubsFromSource.ql index 3be2b9d17139..1a8a816b72ff 100644 --- a/csharp/ql/src/Stubs/AllStubsFromSource.ql +++ b/csharp/ql/src/Stubs/AllStubsFromSource.ql @@ -10,4 +10,13 @@ class AllDeclarations extends GeneratedDeclaration { AllDeclarations() { not this.fromLibrary() } } +/** Exclude types from these standard assemblies. */ +private class DefaultLibs extends ExcludedAssembly { + DefaultLibs() { + this.getName() = "System.Private.CoreLib" or + this.getName() = "mscorlib" or + this.getName() = "System.Runtime" + } +} + select concat(generatedCode(_) + "\n\n") diff --git a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql index 03e1db88925b..14df8576caa5 100644 --- a/csharp/ql/src/Stubs/MinimalStubsFromSource.ql +++ b/csharp/ql/src/Stubs/MinimalStubsFromSource.ql @@ -29,4 +29,13 @@ class UsedInSource extends GeneratedDeclaration { } } +/** Exclude types from these standard assemblies. */ +private class DefaultLibs extends ExcludedAssembly { + DefaultLibs() { + this.getName() = "System.Private.CoreLib" or + this.getName() = "mscorlib" or + this.getName() = "System.Runtime" + } +} + select concat(generatedCode(_) + "\n\n") diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 665dc8bf2762..39ffd94c85c0 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -345,15 +345,6 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { */ abstract class ExcludedAssembly extends Assembly { } -/** Exclude types from these standard assemblies. */ -private class DefaultLibs extends ExcludedAssembly { - DefaultLibs() { - this.getName() = "System.Private.CoreLib" or - this.getName() = "mscorlib" or - this.getName() = "System.Runtime" - } -} - private Virtualizable getAccessibilityDeclaringVirtualizable(Virtualizable v) { if not v.isOverride() then result = v From 97cd006b2c75a26a706350b8b2dadef6e92534e7 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 21 May 2021 15:16:52 +0200 Subject: [PATCH 1569/1662] Add missing required private constructors --- csharp/ql/src/Stubs/Stubs.qll | 43 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 39ffd94c85c0..3c6036d6c3f6 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -138,8 +138,8 @@ abstract private class GeneratedType extends Type, GeneratedElement { this.stubComment() + this.stubAttributes() + stubAccessibility(this) + this.stubAbstractModifier() + this.stubStaticModifier() + this.stubPartialModifier() + this.stubKeyword() + " " + this.getUndecoratedName() + stubGenericArguments(this) + - stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + - stubMembers(assembly) + "}\n\n" + this.stubBaseTypesString() + stubTypeParametersConstraints(this) + "\n{\n" + + this.stubPrivateConstructor() + this.stubMembers(assembly) + "}\n\n" or result = this.stubComment() + this.stubAttributes() + stubUnsafe(this) + stubAccessibility(this) + @@ -183,6 +183,22 @@ abstract private class GeneratedType extends Type, GeneratedElement { ) } + string stubPrivateConstructor() { + if + this instanceof Interface or + this.isStatic() or + this.isAbstract() or + exists(this.(ValueOrRefType).getAConstructor()) or + not exists(this.getAnInterestingBaseType()) or + not exists(this.getAnInterestingBaseType().getAConstructor()) or + this.getAnInterestingBaseType().getAConstructor().getNumberOfParameters() = 0 + then result = "" + else + result = + " private " + this.getUndecoratedName() + "() : base(" + + stubDefaultArguments(getBaseConstructor(this), this) + ")" + " => throw null;\n" + } + private GeneratedMember getAGeneratedMember() { result.getDeclaringType() = this } final Type getAGeneratedType() { @@ -670,18 +686,15 @@ private string stubParameters(Parameterizable p) { ) } -private string stubDefaultArguments(Constructor baseCtor) { - exists(Constructor c | - baseCtor = getBaseConstructor(c.getDeclaringType()) and - baseCtor.getNumberOfParameters() > 0 and - not c.isStatic() and - result = - concat(int i, Parameter param | - param = baseCtor.getParameter(i) and not param.getType() instanceof ArglistType - | - "default(" + stubClassName(param.getType()) + ")", ", " order by i - ) - ) +private string stubDefaultArguments(Constructor baseCtor, ValueOrRefType callingType) { + baseCtor = getBaseConstructor(callingType) and + baseCtor.getNumberOfParameters() > 0 and + result = + concat(int i, Parameter param | + param = baseCtor.getParameter(i) and not param.getType() instanceof ArglistType + | + "default(" + stubClassName(param.getType()) + ")", ", " order by i + ) } private string stubParameterModifiers(Parameter p) { @@ -827,7 +840,7 @@ private string stubConstructorInitializer(Constructor c) { baseCtor = getBaseConstructor(c.getDeclaringType()) and if baseCtor.getNumberOfParameters() = 0 or c.isStatic() then result = "" - else result = " : base(" + stubDefaultArguments(baseCtor) + ")" + else result = " : base(" + stubDefaultArguments(baseCtor, c.getDeclaringType()) + ")" ) or // abstract base class might not have a constructor From 4eee6ef1d9b153354f99003a1d0d950cdb402ad7 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 31 May 2021 11:33:59 +0200 Subject: [PATCH 1570/1662] Handle system.object missing base type --- .../Semmle.Extraction.CSharp/Entities/Constructor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs index e3f77d9407e5..525ba96164ac 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs @@ -47,7 +47,10 @@ protected override void ExtractInitializers(TextWriter trapFile) var baseType = Symbol.ContainingType.BaseType; if (baseType is null) { - Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer"); + if (Symbol.ContainingType.SpecialType != SpecialType.System_Object) + { + Context.ModelError(Symbol, "Unable to resolve base type in implicit constructor initializer"); + } return; } From 0f18fd6892d136b1ab46a12bd193e1ca11a9d1e4 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 13:44:56 +0200 Subject: [PATCH 1571/1662] Adjust script to handle .net core framework reference --- csharp/ql/src/Stubs/make_stubs_nuget.py | 58 +++++++++++++++---------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index c4dc7d8492b9..7497d79f4234 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -4,6 +4,18 @@ import json import shutil + +def write_csproj_prefix(ioWrapper): + ioWrapper.write('\n') + ioWrapper.write(' \n') + ioWrapper.write(' net5.0\n') + ioWrapper.write(' true\n') + ioWrapper.write(' bin\\n') + ioWrapper.write( + ' false\n') + ioWrapper.write(' \n\n') + + print('Script to generate stub file from a nuget package') print(' Usage: python ' + sys.argv[0] + ' NUGET_PACKAGE_NAME [VERSION=latest] [WORK_DIR=tempDir]') @@ -78,7 +90,7 @@ '--name', rawSrcOutputDirName, '--output', rawSrcOutputDir]) helpers.remove_files(rawSrcOutputDir, '.cs') -# load json from file +# load json from query result file and split it into separate .cs files pathInfos = {} with open(jsonFile) as json_data: data = json.load(json_data) @@ -94,7 +106,6 @@ print("\n --> Generated (formatted) stub files: " + rawSrcOutputDir) - print("\n* Processing project.assets.json to generate folder structure") stubsDirName = 'stubs' stubsDir = os.path.join(outputDir, stubsDirName) @@ -124,14 +135,7 @@ print(' * Processing package: ' + name + '/' + version) with open(os.path.join(packageDir, name + '.csproj'), 'a') as pf: - pf.write('\n') - pf.write(' \n') - pf.write(' net5.0\n') - pf.write(' true\n') - pf.write(' bin\\n') - pf.write( - ' false\n') - pf.write(' \n\n') + write_csproj_prefix(pf) pf.write(' \n') dlls = set() @@ -167,20 +171,21 @@ pf.write(' \n') + pf.write(' \n') + pf.write(' \n') pf.write('\n') +# Processing references frameworks for framework in frameworks: with open(os.path.join(frameworksDir, framework, framework + '.csproj'), 'a') as pf: - pf.write('\n') - pf.write(' \n') - pf.write(' net5.0\n') - pf.write(' true\n') - pf.write(' bin\\n') + write_csproj_prefix(pf) + pf.write(' \n') pf.write( - ' false\n') - pf.write(' \n') + ' \n') + pf.write(' \n') pf.write('\n') for pathInfo in pathInfos: @@ -189,6 +194,19 @@ shutil.copy2(pathInfos[pathInfo], os.path.join( frameworksDir, framework)) +# Processing assemblies in Microsoft.NETCore.App.Ref +frameworkDir = os.path.join(frameworksDir, 'Microsoft.NETCore.App') +if not os.path.exists(frameworkDir): + os.makedirs(frameworkDir) +with open(os.path.join(frameworksDir, 'Microsoft.NETCore.App', 'Microsoft.NETCore.App.csproj'), 'a') as pf: + write_csproj_prefix(pf) + pf.write('\n') + + for pathInfo in pathInfos: + if 'packs/microsoft.netcore.app.ref/' in pathInfo.lower(): + copiedFiles.add(pathInfo) + shutil.copy2(pathInfos[pathInfo], frameworkDir) + for pathInfo in pathInfos: if pathInfo not in copiedFiles: print('Not copied to nuget or framework folder: ' + pathInfo) @@ -199,10 +217,4 @@ print("\n --> Generated structured stub files: " + stubsDir) -print("\n* Building raw output project") -helpers.run_cmd(['dotnet', 'build', '/t:rebuild', '/p:AllowUnsafeBlocks=true', '/p:WarningLevel=0', rawSrcOutputDir], - 'ERR: Build failed. Script failed to generate a stub that builds. Please touch up manually the stubs.') - -print("\n --> Generated structured stub files: " + stubsDir) - exit(0) From e4b02e377cfe54add0b797ff988af3739fe2363a Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 16 Jun 2021 13:58:40 +0200 Subject: [PATCH 1572/1662] Add .net core and asp.net core stubs --- .../test/query-tests/Stubs/References/Test.cs | 10 + .../Stubs/References/files.expected | 233 + .../query-tests/Stubs/References/files.ql | 5 + csharp/ql/test/resources/stubs/.gitignore | 2 + .../Microsoft.AspNetCore.Antiforgery.cs | 69 + .../Microsoft.AspNetCore.App.csproj | 12 + ....AspNetCore.Authentication.Abstractions.cs | 217 + ...osoft.AspNetCore.Authentication.Cookies.cs | 161 + ...icrosoft.AspNetCore.Authentication.Core.cs | 80 + ...crosoft.AspNetCore.Authentication.OAuth.cs | 220 + .../Microsoft.AspNetCore.Authentication.cs | 391 + ...crosoft.AspNetCore.Authorization.Policy.cs | 94 + .../Microsoft.AspNetCore.Authorization.cs | 289 + ...oft.AspNetCore.Components.Authorization.cs | 82 + .../Microsoft.AspNetCore.Components.Forms.cs | 108 + .../Microsoft.AspNetCore.Components.Server.cs | 150 + .../Microsoft.AspNetCore.Components.Web.cs | 528 + .../Microsoft.AspNetCore.Components.cs | 691 + ...oft.AspNetCore.Connections.Abstractions.cs | 308 + .../Microsoft.AspNetCore.CookiePolicy.cs | 89 + .../Microsoft.AspNetCore.Cors.cs | 204 + ...t.AspNetCore.Cryptography.KeyDerivation.cs | 29 + ....AspNetCore.DataProtection.Abstractions.cs | 45 + ...ft.AspNetCore.DataProtection.Extensions.cs | 40 + .../Microsoft.AspNetCore.DataProtection.cs | 572 + ...oft.AspNetCore.Diagnostics.Abstractions.cs | 82 + ...oft.AspNetCore.Diagnostics.HealthChecks.cs | 52 + .../Microsoft.AspNetCore.Diagnostics.cs | 156 + .../Microsoft.AspNetCore.HostFiltering.cs | 42 + ...crosoft.AspNetCore.Hosting.Abstractions.cs | 159 + ....AspNetCore.Hosting.Server.Abstractions.cs | 64 + .../Microsoft.AspNetCore.Hosting.cs | 150 + .../Microsoft.AspNetCore.Html.Abstractions.cs | 82 + .../Microsoft.AspNetCore.Http.Abstractions.cs | 640 + ...soft.AspNetCore.Http.Connections.Common.cs | 60 + .../Microsoft.AspNetCore.Http.Connections.cs | 126 + .../Microsoft.AspNetCore.Http.Extensions.cs | 187 + .../Microsoft.AspNetCore.Http.Features.cs | 406 + .../Microsoft.AspNetCore.Http.cs | 438 + .../Microsoft.AspNetCore.HttpOverrides.cs | 133 + .../Microsoft.AspNetCore.HttpsPolicy.cs | 72 + .../Microsoft.AspNetCore.Identity.cs | 208 + ...crosoft.AspNetCore.Localization.Routing.cs | 23 + .../Microsoft.AspNetCore.Localization.cs | 152 + .../Microsoft.AspNetCore.Metadata.cs | 24 + .../Microsoft.AspNetCore.Mvc.Abstractions.cs | 1332 ++ .../Microsoft.AspNetCore.Mvc.ApiExplorer.cs | 71 + .../Microsoft.AspNetCore.Mvc.Core.cs | 3965 +++++ .../Microsoft.AspNetCore.Mvc.Cors.cs | 43 + ...icrosoft.AspNetCore.Mvc.DataAnnotations.cs | 102 + ...Microsoft.AspNetCore.Mvc.Formatters.Xml.cs | 255 + .../Microsoft.AspNetCore.Mvc.Localization.cs | 145 + .../Microsoft.AspNetCore.Mvc.Razor.cs | 469 + .../Microsoft.AspNetCore.Mvc.RazorPages.cs | 912 ++ .../Microsoft.AspNetCore.Mvc.TagHelpers.cs | 428 + .../Microsoft.AspNetCore.Mvc.ViewFeatures.cs | 1692 +++ .../Microsoft.AspNetCore.Mvc.cs | 24 + .../Microsoft.AspNetCore.Razor.Runtime.cs | 134 + .../Microsoft.AspNetCore.Razor.cs | 261 + ...AspNetCore.ResponseCaching.Abstractions.cs | 17 + .../Microsoft.AspNetCore.ResponseCaching.cs | 56 + ...icrosoft.AspNetCore.ResponseCompression.cs | 118 + .../Microsoft.AspNetCore.Rewrite.cs | 101 + ...crosoft.AspNetCore.Routing.Abstractions.cs | 132 + .../Microsoft.AspNetCore.Routing.cs | 1111 ++ .../Microsoft.AspNetCore.Server.HttpSys.cs | 176 + .../Microsoft.AspNetCore.Server.IIS.cs | 101 + ...rosoft.AspNetCore.Server.IISIntegration.cs | 59 + ...icrosoft.AspNetCore.Server.Kestrel.Core.cs | 386 + ...etCore.Server.Kestrel.Transport.Sockets.cs | 50 + .../Microsoft.AspNetCore.Server.Kestrel.cs | 21 + .../Microsoft.AspNetCore.Session.cs | 92 + .../Microsoft.AspNetCore.SignalR.Common.cs | 193 + .../Microsoft.AspNetCore.SignalR.Core.cs | 444 + ...osoft.AspNetCore.SignalR.Protocols.Json.cs | 48 + .../Microsoft.AspNetCore.SignalR.cs | 53 + .../Microsoft.AspNetCore.StaticFiles.cs | 188 + .../Microsoft.AspNetCore.WebSockets.cs | 52 + .../Microsoft.AspNetCore.WebUtilities.cs | 281 + .../Microsoft.AspNetCore.cs | 34 + ...crosoft.Extensions.Caching.Abstractions.cs | 187 + .../Microsoft.Extensions.Caching.Memory.cs | 76 + ...t.Extensions.Configuration.Abstractions.cs | 86 + ...crosoft.Extensions.Configuration.Binder.cs | 34 + ...ft.Extensions.Configuration.CommandLine.cs | 39 + ...ions.Configuration.EnvironmentVariables.cs | 38 + ...Extensions.Configuration.FileExtensions.cs | 57 + .../Microsoft.Extensions.Configuration.Ini.cs | 54 + ...Microsoft.Extensions.Configuration.Json.cs | 53 + ...oft.Extensions.Configuration.KeyPerFile.cs | 45 + ...ft.Extensions.Configuration.UserSecrets.cs | 41 + .../Microsoft.Extensions.Configuration.Xml.cs | 63 + .../Microsoft.Extensions.Configuration.cs | 151 + ...nsions.DependencyInjection.Abstractions.cs | 212 + ...icrosoft.Extensions.DependencyInjection.cs | 63 + ...s.Diagnostics.HealthChecks.Abstractions.cs | 94 + ...oft.Extensions.Diagnostics.HealthChecks.cs | 81 + ...t.Extensions.FileProviders.Abstractions.cs | 78 + ...soft.Extensions.FileProviders.Composite.cs | 34 + ...osoft.Extensions.FileProviders.Embedded.cs | 50 + ...osoft.Extensions.FileProviders.Physical.cs | 111 + ...Microsoft.Extensions.FileSystemGlobbing.cs | 347 + ...crosoft.Extensions.Hosting.Abstractions.cs | 184 + .../Microsoft.Extensions.Hosting.cs | 99 + .../Microsoft.Extensions.Http.cs | 164 + .../Microsoft.Extensions.Identity.Core.cs | 774 + .../Microsoft.Extensions.Identity.Stores.cs | 225 + ...ft.Extensions.Localization.Abstractions.cs | 62 + .../Microsoft.Extensions.Localization.cs | 81 + ...crosoft.Extensions.Logging.Abstractions.cs | 220 + ...rosoft.Extensions.Logging.Configuration.cs | 50 + .../Microsoft.Extensions.Logging.Console.cs | 130 + .../Microsoft.Extensions.Logging.Debug.cs | 28 + .../Microsoft.Extensions.Logging.EventLog.cs | 43 + ...icrosoft.Extensions.Logging.EventSource.cs | 44 + ...icrosoft.Extensions.Logging.TraceSource.cs | 32 + .../Microsoft.Extensions.Logging.cs | 121 + .../Microsoft.Extensions.ObjectPool.cs | 105 + ...ensions.Options.ConfigurationExtensions.cs | 53 + ...soft.Extensions.Options.DataAnnotations.cs | 28 + .../Microsoft.Extensions.Options.cs | 456 + .../Microsoft.Extensions.Primitives.cs | 205 + .../Microsoft.Extensions.WebEncoders.cs | 70 + .../Microsoft.JSInterop.cs | 205 + .../Microsoft.Net.Http.Headers.cs | 423 + .../Microsoft.Win32.Registry.cs | 254 + .../System.Diagnostics.EventLog.cs | 620 + .../System.IO.Pipelines.cs | 167 + .../System.Security.AccessControl.cs | 681 + .../System.Security.Cryptography.Cng.cs | 474 + .../System.Security.Cryptography.Xml.cs | 639 + .../System.Security.Permissions.cs | 2353 +++ .../System.Security.Principal.Windows.cs | 329 + .../System.Windows.Extensions.cs | 109 + .../Microsoft.NETCore.App/Microsoft.CSharp.cs | 82 + .../Microsoft.NETCore.App.csproj | 9 + .../Microsoft.VisualBasic.Core.cs | 1293 ++ .../Microsoft.Win32.Primitives.cs | 22 + .../System.Collections.Concurrent.cs | 236 + .../System.Collections.Immutable.cs | 1141 ++ .../System.Collections.NonGeneric.cs | 204 + .../System.Collections.Specialized.cs | 268 + .../System.Collections.cs | 732 + .../System.ComponentModel.Annotations.cs | 449 + .../System.ComponentModel.EventBasedAsync.cs | 94 + .../System.ComponentModel.Primitives.cs | 374 + .../System.ComponentModel.TypeConverter.cs | 2607 ++++ .../System.ComponentModel.cs | 43 + .../Microsoft.NETCore.App/System.Console.cs | 312 + .../System.Data.Common.cs | 3548 +++++ .../System.Diagnostics.Contracts.cs | 153 + .../System.Diagnostics.DiagnosticSource.cs | 322 + .../System.Diagnostics.FileVersionInfo.cs | 42 + .../System.Diagnostics.Process.cs | 290 + .../System.Diagnostics.StackTrace.cs | 243 + ...tem.Diagnostics.TextWriterTraceListener.cs | 71 + .../System.Diagnostics.TraceSource.cs | 319 + .../System.Diagnostics.Tracing.cs | 390 + .../System.Drawing.Primitives.cs | 610 + .../System.Formats.Asn1.cs | 299 + .../System.IO.Compression.Brotli.cs | 66 + .../System.IO.Compression.ZipFile.cs | 37 + .../System.IO.Compression.cs | 141 + .../System.IO.FileSystem.DriveInfo.cs | 48 + .../System.IO.FileSystem.Watcher.cs | 119 + .../System.IO.FileSystem.cs | 330 + .../System.IO.IsolatedStorage.cs | 153 + .../System.IO.MemoryMappedFiles.cs | 124 + .../Microsoft.NETCore.App/System.IO.Pipes.cs | 175 + .../System.Linq.Expressions.cs | 1321 ++ .../System.Linq.Parallel.cs | 254 + .../System.Linq.Queryable.cs | 176 + .../Microsoft.NETCore.App/System.Linq.cs | 226 + .../Microsoft.NETCore.App/System.Memory.cs | 534 + .../System.Net.Http.Json.cs | 55 + .../Microsoft.NETCore.App/System.Net.Http.cs | 894 ++ .../System.Net.HttpListener.cs | 183 + .../Microsoft.NETCore.App/System.Net.Mail.cs | 403 + .../System.Net.NameResolution.cs | 42 + .../System.Net.NetworkInformation.cs | 558 + .../Microsoft.NETCore.App/System.Net.Ping.cs | 112 + .../System.Net.Primitives.cs | 603 + .../System.Net.Requests.cs | 504 + .../System.Net.Security.cs | 689 + .../System.Net.ServicePoint.cs | 69 + .../System.Net.Sockets.cs | 755 + .../System.Net.WebClient.cs | 247 + .../System.Net.WebHeaderCollection.cs | 128 + .../System.Net.WebProxy.cs | 43 + .../System.Net.WebSockets.Client.cs | 47 + .../System.Net.WebSockets.cs | 154 + .../System.Numerics.Vectors.cs | 530 + .../System.ObjectModel.cs | 290 + .../System.Reflection.DispatchProxy.cs | 16 + .../System.Reflection.Emit.ILGeneration.cs | 119 + .../System.Reflection.Emit.Lightweight.cs | 72 + .../System.Reflection.Emit.cs | 503 + .../System.Reflection.Metadata.cs | 4037 +++++ .../System.Reflection.Primitives.cs | 364 + .../System.Reflection.TypeExtensions.cs | 96 + .../System.Resources.Writer.cs | 35 + .../System.Runtime.CompilerServices.Unsafe.cs | 54 + ...System.Runtime.CompilerServices.VisualC.cs | 97 + ...time.InteropServices.RuntimeInformation.cs | 50 + .../System.Runtime.InteropServices.cs | 1872 +++ .../System.Runtime.Intrinsics.cs | 4217 ++++++ .../System.Runtime.Loader.cs | 73 + .../System.Runtime.Numerics.cs | 229 + ...System.Runtime.Serialization.Formatters.cs | 213 + .../System.Runtime.Serialization.Json.cs | 110 + ...System.Runtime.Serialization.Primitives.cs | 100 + .../System.Runtime.Serialization.Xml.cs | 482 + .../Microsoft.NETCore.App/System.Runtime.cs | 12203 ++++++++++++++++ .../System.Security.Claims.cs | 231 + ...System.Security.Cryptography.Algorithms.cs | 955 ++ .../System.Security.Cryptography.Csp.cs | 310 + .../System.Security.Cryptography.Encoding.cs | 170 + ...System.Security.Cryptography.Primitives.cs | 281 + ....Security.Cryptography.X509Certificates.cs | 730 + .../System.Text.Encoding.CodePages.cs | 17 + .../System.Text.Encoding.Extensions.cs | 144 + .../System.Text.Encodings.Web.cs | 256 + .../Microsoft.NETCore.App/System.Text.Json.cs | 611 + .../System.Text.RegularExpressions.cs | 357 + .../System.Threading.Channels.cs | 103 + .../System.Threading.Overlapped.cs | 61 + .../System.Threading.Tasks.Dataflow.cs | 398 + .../System.Threading.Tasks.Parallel.cs | 78 + .../System.Threading.Thread.cs | 191 + .../System.Threading.ThreadPool.cs | 56 + .../Microsoft.NETCore.App/System.Threading.cs | 535 + .../System.Transactions.Local.cs | 327 + .../System.Web.HttpUtility.cs | 44 + .../System.Xml.ReaderWriter.cs | 2938 ++++ .../System.Xml.XDocument.cs | 499 + .../System.Xml.XPath.XDocument.cs | 30 + .../Microsoft.NETCore.App/System.Xml.XPath.cs | 34 + .../System.Xml.XmlSerializer.cs | 823 ++ 238 files changed, 92137 insertions(+) create mode 100644 csharp/ql/test/query-tests/Stubs/References/Test.cs create mode 100644 csharp/ql/test/query-tests/Stubs/References/files.expected create mode 100644 csharp/ql/test/query-tests/Stubs/References/files.ql create mode 100644 csharp/ql/test/resources/stubs/.gitignore create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs create mode 100644 csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs diff --git a/csharp/ql/test/query-tests/Stubs/References/Test.cs b/csharp/ql/test/query-tests/Stubs/References/Test.cs new file mode 100644 index 000000000000..5a1a4b548fa9 --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/References/Test.cs @@ -0,0 +1,10 @@ +// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj +// semmle-extractor-options: /nostdlib +// semmle-extractor-options: /noconfig + +namespace Test +{ + public class Class1 + { + } +} \ No newline at end of file diff --git a/csharp/ql/test/query-tests/Stubs/References/files.expected b/csharp/ql/test/query-tests/Stubs/References/files.expected new file mode 100644 index 000000000000..af75fc41f1e9 --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/References/files.expected @@ -0,0 +1,233 @@ +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs | +| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs | +| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs | +| Test.cs:0:0:0:0 | Test.cs | diff --git a/csharp/ql/test/query-tests/Stubs/References/files.ql b/csharp/ql/test/query-tests/Stubs/References/files.ql new file mode 100644 index 000000000000..bea5557a25f1 --- /dev/null +++ b/csharp/ql/test/query-tests/Stubs/References/files.ql @@ -0,0 +1,5 @@ +import csharp + +from File f +where f.fromSource() +select f diff --git a/csharp/ql/test/resources/stubs/.gitignore b/csharp/ql/test/resources/stubs/.gitignore new file mode 100644 index 000000000000..c6e49efc9762 --- /dev/null +++ b/csharp/ql/test/resources/stubs/.gitignore @@ -0,0 +1,2 @@ +obj/ +bin/ diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs new file mode 100644 index 000000000000..bb992f2caba5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs @@ -0,0 +1,69 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Antiforgery + { + // Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AntiforgeryOptions + { + public AntiforgeryOptions() => throw null; + public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set => throw null; } + public static string DefaultCookiePrefix; + public string FormFieldName { get => throw null; set => throw null; } + public string HeaderName { get => throw null; set => throw null; } + public bool SuppressXFrameOptionsHeader { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AntiforgeryTokenSet + { + public AntiforgeryTokenSet(string requestToken, string cookieToken, string formFieldName, string headerName) => throw null; + public string CookieToken { get => throw null; } + public string FormFieldName { get => throw null; } + public string HeaderName { get => throw null; } + public string RequestToken { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AntiforgeryValidationException : System.Exception + { + public AntiforgeryValidationException(string message, System.Exception innerException) => throw null; + public AntiforgeryValidationException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Antiforgery.IAntiforgery` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAntiforgery + { + Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetAndStoreTokens(Microsoft.AspNetCore.Http.HttpContext httpContext); + Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetTokens(Microsoft.AspNetCore.Http.HttpContext httpContext); + System.Threading.Tasks.Task IsRequestValidAsync(Microsoft.AspNetCore.Http.HttpContext httpContext); + void SetCookieTokenAndHeader(Microsoft.AspNetCore.Http.HttpContext httpContext); + System.Threading.Tasks.Task ValidateRequestAsync(Microsoft.AspNetCore.Http.HttpContext httpContext); + } + + // Generated from `Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAntiforgeryAdditionalDataProvider + { + string GetAdditionalData(Microsoft.AspNetCore.Http.HttpContext context); + bool ValidateAdditionalData(Microsoft.AspNetCore.Http.HttpContext context, string additionalData); + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.AntiforgeryServiceCollectionExtensions` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AntiforgeryServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj new file mode 100644 index 000000000000..01f1dc2068d4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs new file mode 100644 index 000000000000..959d62a8ab7a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs @@ -0,0 +1,217 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticateResult` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticateResult + { + protected AuthenticateResult() => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticateResult Clone() => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticateResult Fail(string failureMessage, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticateResult Fail(string failureMessage) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticateResult Fail(System.Exception failure, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticateResult Fail(System.Exception failure) => throw null; + public System.Exception Failure { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Authentication.AuthenticateResult NoResult() => throw null; + public bool None { get => throw null; set => throw null; } + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public bool Succeeded { get => throw null; } + public static Microsoft.AspNetCore.Authentication.AuthenticateResult Success(Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationTicket Ticket { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthenticationHttpContextExtensions + { + public static System.Threading.Tasks.Task AuthenticateAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme) => throw null; + public static System.Threading.Tasks.Task AuthenticateAsync(this Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public static System.Threading.Tasks.Task ChallengeAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task ChallengeAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme) => throw null; + public static System.Threading.Tasks.Task ChallengeAsync(this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task ChallengeAsync(this Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public static System.Threading.Tasks.Task ForbidAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task ForbidAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme) => throw null; + public static System.Threading.Tasks.Task ForbidAsync(this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task ForbidAsync(this Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public static System.Threading.Tasks.Task GetTokenAsync(this Microsoft.AspNetCore.Http.HttpContext context, string tokenName) => throw null; + public static System.Threading.Tasks.Task GetTokenAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, string tokenName) => throw null; + public static System.Threading.Tasks.Task SignInAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task SignInAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal) => throw null; + public static System.Threading.Tasks.Task SignInAsync(this Microsoft.AspNetCore.Http.HttpContext context, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task SignInAsync(this Microsoft.AspNetCore.Http.HttpContext context, System.Security.Claims.ClaimsPrincipal principal) => throw null; + public static System.Threading.Tasks.Task SignOutAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task SignOutAsync(this Microsoft.AspNetCore.Http.HttpContext context, string scheme) => throw null; + public static System.Threading.Tasks.Task SignOutAsync(this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static System.Threading.Tasks.Task SignOutAsync(this Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationOptions` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationOptions + { + public void AddScheme(string name, string displayName) where THandler : Microsoft.AspNetCore.Authentication.IAuthenticationHandler => throw null; + public void AddScheme(string name, System.Action configureBuilder) => throw null; + public AuthenticationOptions() => throw null; + public string DefaultAuthenticateScheme { get => throw null; set => throw null; } + public string DefaultChallengeScheme { get => throw null; set => throw null; } + public string DefaultForbidScheme { get => throw null; set => throw null; } + public string DefaultScheme { get => throw null; set => throw null; } + public string DefaultSignInScheme { get => throw null; set => throw null; } + public string DefaultSignOutScheme { get => throw null; set => throw null; } + public bool RequireAuthenticatedSignIn { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary SchemeMap { get => throw null; } + public System.Collections.Generic.IEnumerable Schemes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationProperties` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationProperties + { + public bool? AllowRefresh { get => throw null; set => throw null; } + public AuthenticationProperties(System.Collections.Generic.IDictionary items, System.Collections.Generic.IDictionary parameters) => throw null; + public AuthenticationProperties(System.Collections.Generic.IDictionary items) => throw null; + public AuthenticationProperties() => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Clone() => throw null; + public System.DateTimeOffset? ExpiresUtc { get => throw null; set => throw null; } + protected bool? GetBool(string key) => throw null; + protected System.DateTimeOffset? GetDateTimeOffset(string key) => throw null; + public T GetParameter(string key) => throw null; + public string GetString(string key) => throw null; + public bool IsPersistent { get => throw null; set => throw null; } + public System.DateTimeOffset? IssuedUtc { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Items { get => throw null; } + public System.Collections.Generic.IDictionary Parameters { get => throw null; } + public string RedirectUri { get => throw null; set => throw null; } + protected void SetBool(string key, bool? value) => throw null; + protected void SetDateTimeOffset(string key, System.DateTimeOffset? value) => throw null; + public void SetParameter(string key, T value) => throw null; + public void SetString(string key, string value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationScheme` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationScheme + { + public AuthenticationScheme(string name, string displayName, System.Type handlerType) => throw null; + public string DisplayName { get => throw null; } + public System.Type HandlerType { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationSchemeBuilder` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationSchemeBuilder + { + public AuthenticationSchemeBuilder(string name) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationScheme Build() => throw null; + public string DisplayName { get => throw null; set => throw null; } + public System.Type HandlerType { get => throw null; set => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationTicket` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationTicket + { + public string AuthenticationScheme { get => throw null; } + public AuthenticationTicket(System.Security.Claims.ClaimsPrincipal principal, string authenticationScheme) => throw null; + public AuthenticationTicket(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string authenticationScheme) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationTicket Clone() => throw null; + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationToken` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationToken + { + public AuthenticationToken() => throw null; + public string Name { get => throw null; set => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationTokenExtensions` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthenticationTokenExtensions + { + public static System.Threading.Tasks.Task GetTokenAsync(this Microsoft.AspNetCore.Authentication.IAuthenticationService auth, Microsoft.AspNetCore.Http.HttpContext context, string tokenName) => throw null; + public static System.Threading.Tasks.Task GetTokenAsync(this Microsoft.AspNetCore.Authentication.IAuthenticationService auth, Microsoft.AspNetCore.Http.HttpContext context, string scheme, string tokenName) => throw null; + public static string GetTokenValue(this Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string tokenName) => throw null; + public static System.Collections.Generic.IEnumerable GetTokens(this Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static void StoreTokens(this Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, System.Collections.Generic.IEnumerable tokens) => throw null; + public static bool UpdateTokenValue(this Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string tokenName, string tokenValue) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationFeature` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationFeature + { + Microsoft.AspNetCore.Http.PathString OriginalPath { get; set; } + Microsoft.AspNetCore.Http.PathString OriginalPathBase { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationHandler` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationHandler + { + System.Threading.Tasks.Task AuthenticateAsync(); + System.Threading.Tasks.Task ChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + System.Threading.Tasks.Task ForbidAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + System.Threading.Tasks.Task InitializeAsync(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Http.HttpContext context); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationHandlerProvider` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationHandlerProvider + { + System.Threading.Tasks.Task GetHandlerAsync(Microsoft.AspNetCore.Http.HttpContext context, string authenticationScheme); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationRequestHandler` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationRequestHandler : Microsoft.AspNetCore.Authentication.IAuthenticationHandler + { + System.Threading.Tasks.Task HandleRequestAsync(); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationSchemeProvider + { + void AddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme); + System.Threading.Tasks.Task> GetAllSchemesAsync(); + System.Threading.Tasks.Task GetDefaultAuthenticateSchemeAsync(); + System.Threading.Tasks.Task GetDefaultChallengeSchemeAsync(); + System.Threading.Tasks.Task GetDefaultForbidSchemeAsync(); + System.Threading.Tasks.Task GetDefaultSignInSchemeAsync(); + System.Threading.Tasks.Task GetDefaultSignOutSchemeAsync(); + System.Threading.Tasks.Task> GetRequestHandlerSchemesAsync(); + System.Threading.Tasks.Task GetSchemeAsync(string name); + void RemoveScheme(string name); + bool TryAddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationService` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationService + { + System.Threading.Tasks.Task AuthenticateAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme); + System.Threading.Tasks.Task ChallengeAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + System.Threading.Tasks.Task ForbidAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + System.Threading.Tasks.Task SignInAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + System.Threading.Tasks.Task SignOutAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationSignInHandler` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationSignInHandler : Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler, Microsoft.AspNetCore.Authentication.IAuthenticationHandler + { + System.Threading.Tasks.Task SignInAsync(System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticationSignOutHandler : Microsoft.AspNetCore.Authentication.IAuthenticationHandler + { + System.Threading.Tasks.Task SignOutAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + } + + // Generated from `Microsoft.AspNetCore.Authentication.IClaimsTransformation` in `Microsoft.AspNetCore.Authentication.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClaimsTransformation + { + System.Threading.Tasks.Task TransformAsync(System.Security.Claims.ClaimsPrincipal principal); + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs new file mode 100644 index 000000000000..e42d5333747b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs @@ -0,0 +1,161 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authentication + { + namespace Cookies + { + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ChunkingCookieManager : Microsoft.AspNetCore.Authentication.Cookies.ICookieManager + { + public void AppendResponseCookie(Microsoft.AspNetCore.Http.HttpContext context, string key, string value, Microsoft.AspNetCore.Http.CookieOptions options) => throw null; + public int? ChunkSize { get => throw null; set => throw null; } + public ChunkingCookieManager() => throw null; + public const int DefaultChunkSize = default; + public void DeleteCookie(Microsoft.AspNetCore.Http.HttpContext context, string key, Microsoft.AspNetCore.Http.CookieOptions options) => throw null; + public string GetRequestCookie(Microsoft.AspNetCore.Http.HttpContext context, string key) => throw null; + public bool ThrowForPartialCookies { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CookieAuthenticationDefaults + { + public static Microsoft.AspNetCore.Http.PathString AccessDeniedPath; + public const string AuthenticationScheme = default; + public static string CookiePrefix; + public static Microsoft.AspNetCore.Http.PathString LoginPath; + public static Microsoft.AspNetCore.Http.PathString LogoutPath; + public static string ReturnUrlParameter; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieAuthenticationEvents + { + public CookieAuthenticationEvents() => throw null; + public System.Func, System.Threading.Tasks.Task> OnRedirectToAccessDenied { get => throw null; set => throw null; } + public System.Func, System.Threading.Tasks.Task> OnRedirectToLogin { get => throw null; set => throw null; } + public System.Func, System.Threading.Tasks.Task> OnRedirectToLogout { get => throw null; set => throw null; } + public System.Func, System.Threading.Tasks.Task> OnRedirectToReturnUrl { get => throw null; set => throw null; } + public System.Func OnSignedIn { get => throw null; set => throw null; } + public System.Func OnSigningIn { get => throw null; set => throw null; } + public System.Func OnSigningOut { get => throw null; set => throw null; } + public System.Func OnValidatePrincipal { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task RedirectToAccessDenied(Microsoft.AspNetCore.Authentication.RedirectContext context) => throw null; + public virtual System.Threading.Tasks.Task RedirectToLogin(Microsoft.AspNetCore.Authentication.RedirectContext context) => throw null; + public virtual System.Threading.Tasks.Task RedirectToLogout(Microsoft.AspNetCore.Authentication.RedirectContext context) => throw null; + public virtual System.Threading.Tasks.Task RedirectToReturnUrl(Microsoft.AspNetCore.Authentication.RedirectContext context) => throw null; + public virtual System.Threading.Tasks.Task SignedIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext context) => throw null; + public virtual System.Threading.Tasks.Task SigningIn(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext context) => throw null; + public virtual System.Threading.Tasks.Task SigningOut(Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext context) => throw null; + public virtual System.Threading.Tasks.Task ValidatePrincipal(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieAuthenticationHandler : Microsoft.AspNetCore.Authentication.SignInAuthenticationHandler + { + public CookieAuthenticationHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + protected override System.Threading.Tasks.Task CreateEventsAsync() => throw null; + protected Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents Events { get => throw null; set => throw null; } + protected virtual System.Threading.Tasks.Task FinishResponseAsync() => throw null; + protected override System.Threading.Tasks.Task HandleAuthenticateAsync() => throw null; + protected override System.Threading.Tasks.Task HandleChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleForbiddenAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleSignInAsync(System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleSignOutAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task InitializeHandlerAsync() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieAuthenticationOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public Microsoft.AspNetCore.Http.PathString AccessDeniedPath { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set => throw null; } + public CookieAuthenticationOptions() => throw null; + public Microsoft.AspNetCore.Authentication.Cookies.ICookieManager CookieManager { get => throw null; set => throw null; } + public Microsoft.AspNetCore.DataProtection.IDataProtectionProvider DataProtectionProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationEvents Events { get => throw null; set => throw null; } + public System.TimeSpan ExpireTimeSpan { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString LoginPath { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString LogoutPath { get => throw null; set => throw null; } + public string ReturnUrlParameter { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.Cookies.ITicketStore SessionStore { get => throw null; set => throw null; } + public bool SlidingExpiration { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.ISecureDataFormat TicketDataFormat { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieSignedInContext` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieSignedInContext : Microsoft.AspNetCore.Authentication.PrincipalContext + { + public CookieSignedInContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieSigningInContext` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieSigningInContext : Microsoft.AspNetCore.Authentication.PrincipalContext + { + public Microsoft.AspNetCore.Http.CookieOptions CookieOptions { get => throw null; set => throw null; } + public CookieSigningInContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, Microsoft.AspNetCore.Http.CookieOptions cookieOptions) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieSigningOutContext` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieSigningOutContext : Microsoft.AspNetCore.Authentication.PropertiesContext + { + public Microsoft.AspNetCore.Http.CookieOptions CookieOptions { get => throw null; set => throw null; } + public CookieSigningOutContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, Microsoft.AspNetCore.Http.CookieOptions cookieOptions) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieValidatePrincipalContext : Microsoft.AspNetCore.Authentication.PrincipalContext + { + public CookieValidatePrincipalContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options, Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + public void RejectPrincipal() => throw null; + public void ReplacePrincipal(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public bool ShouldRenew { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.ICookieManager` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICookieManager + { + void AppendResponseCookie(Microsoft.AspNetCore.Http.HttpContext context, string key, string value, Microsoft.AspNetCore.Http.CookieOptions options); + void DeleteCookie(Microsoft.AspNetCore.Http.HttpContext context, string key, Microsoft.AspNetCore.Http.CookieOptions options); + string GetRequestCookie(Microsoft.AspNetCore.Http.HttpContext context, string key); + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.ITicketStore` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITicketStore + { + System.Threading.Tasks.Task RemoveAsync(string key); + System.Threading.Tasks.Task RenewAsync(string key, Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket); + System.Threading.Tasks.Task RetrieveAsync(string key); + System.Threading.Tasks.Task StoreAsync(Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket); + } + + // Generated from `Microsoft.AspNetCore.Authentication.Cookies.PostConfigureCookieAuthenticationOptions` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureCookieAuthenticationOptions : Microsoft.Extensions.Options.IPostConfigureOptions + { + public void PostConfigure(string name, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options) => throw null; + public PostConfigureCookieAuthenticationOptions(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtection) => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.CookieExtensions` in `Microsoft.AspNetCore.Authentication.Cookies, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CookieExtensions + { + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs new file mode 100644 index 000000000000..b547115d3526 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs @@ -0,0 +1,80 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationFeature` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationFeature : Microsoft.AspNetCore.Authentication.IAuthenticationFeature + { + public AuthenticationFeature() => throw null; + public Microsoft.AspNetCore.Http.PathString OriginalPath { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString OriginalPathBase { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationHandlerProvider : Microsoft.AspNetCore.Authentication.IAuthenticationHandlerProvider + { + public AuthenticationHandlerProvider(Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes) => throw null; + public System.Threading.Tasks.Task GetHandlerAsync(Microsoft.AspNetCore.Http.HttpContext context, string authenticationScheme) => throw null; + public Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider Schemes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationSchemeProvider` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationSchemeProvider : Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider + { + public virtual void AddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) => throw null; + public AuthenticationSchemeProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + protected AuthenticationSchemeProvider(Microsoft.Extensions.Options.IOptions options, System.Collections.Generic.IDictionary schemes) => throw null; + public virtual System.Threading.Tasks.Task> GetAllSchemesAsync() => throw null; + public virtual System.Threading.Tasks.Task GetDefaultAuthenticateSchemeAsync() => throw null; + public virtual System.Threading.Tasks.Task GetDefaultChallengeSchemeAsync() => throw null; + public virtual System.Threading.Tasks.Task GetDefaultForbidSchemeAsync() => throw null; + public virtual System.Threading.Tasks.Task GetDefaultSignInSchemeAsync() => throw null; + public virtual System.Threading.Tasks.Task GetDefaultSignOutSchemeAsync() => throw null; + public virtual System.Threading.Tasks.Task> GetRequestHandlerSchemesAsync() => throw null; + public virtual System.Threading.Tasks.Task GetSchemeAsync(string name) => throw null; + public virtual void RemoveScheme(string name) => throw null; + public virtual bool TryAddScheme(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationService` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationService : Microsoft.AspNetCore.Authentication.IAuthenticationService + { + public virtual System.Threading.Tasks.Task AuthenticateAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme) => throw null; + public AuthenticationService(Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes, Microsoft.AspNetCore.Authentication.IAuthenticationHandlerProvider handlers, Microsoft.AspNetCore.Authentication.IClaimsTransformation transform, Microsoft.Extensions.Options.IOptions options) => throw null; + public virtual System.Threading.Tasks.Task ChallengeAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual System.Threading.Tasks.Task ForbidAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public Microsoft.AspNetCore.Authentication.IAuthenticationHandlerProvider Handlers { get => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationOptions Options { get => throw null; } + public Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider Schemes { get => throw null; } + public virtual System.Threading.Tasks.Task SignInAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual System.Threading.Tasks.Task SignOutAsync(Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public Microsoft.AspNetCore.Authentication.IClaimsTransformation Transform { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.NoopClaimsTransformation` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NoopClaimsTransformation : Microsoft.AspNetCore.Authentication.IClaimsTransformation + { + public NoopClaimsTransformation() => throw null; + public virtual System.Threading.Tasks.Task TransformAsync(System.Security.Claims.ClaimsPrincipal principal) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.AuthenticationCoreServiceCollectionExtensions` in `Microsoft.AspNetCore.Authentication.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthenticationCoreServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthenticationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthenticationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs new file mode 100644 index 000000000000..71b74f7c04a4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs @@ -0,0 +1,220 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Authentication.ClaimActionCollectionMapExtensions` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ClaimActionCollectionMapExtensions + { + public static void DeleteClaim(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType) => throw null; + public static void DeleteClaims(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, params string[] claimTypes) => throw null; + public static void MapAll(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection) => throw null; + public static void MapAllExcept(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, params string[] exclusions) => throw null; + public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string valueType, System.Func resolver) => throw null; + public static void MapCustomJson(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, System.Func resolver) => throw null; + public static void MapJsonKey(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string valueType) => throw null; + public static void MapJsonKey(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey) => throw null; + public static void MapJsonSubKey(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string subKey, string valueType) => throw null; + public static void MapJsonSubKey(this Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection collection, string claimType, string jsonKey, string subKey) => throw null; + } + + namespace OAuth + { + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthChallengeProperties` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthChallengeProperties : Microsoft.AspNetCore.Authentication.AuthenticationProperties + { + public OAuthChallengeProperties(System.Collections.Generic.IDictionary items, System.Collections.Generic.IDictionary parameters) => throw null; + public OAuthChallengeProperties(System.Collections.Generic.IDictionary items) => throw null; + public OAuthChallengeProperties() => throw null; + public System.Collections.Generic.ICollection Scope { get => throw null; set => throw null; } + public static string ScopeKey; + public virtual void SetScope(params string[] scopes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthCodeExchangeContext` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthCodeExchangeContext + { + public string Code { get => throw null; } + public OAuthCodeExchangeContext(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string code, string redirectUri) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; } + public string RedirectUri { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthConstants` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OAuthConstants + { + public static string CodeChallengeKey; + public static string CodeChallengeMethodKey; + public static string CodeChallengeMethodS256; + public static string CodeVerifierKey; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthCreatingTicketContext : Microsoft.AspNetCore.Authentication.ResultContext + { + public string AccessToken { get => throw null; } + public System.Net.Http.HttpClient Backchannel { get => throw null; } + public System.TimeSpan? ExpiresIn { get => throw null; } + public System.Security.Claims.ClaimsIdentity Identity { get => throw null; } + public OAuthCreatingTicketContext(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions options, System.Net.Http.HttpClient backchannel, Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse tokens, System.Text.Json.JsonElement user) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions)) => throw null; + public string RefreshToken { get => throw null; } + public void RunClaimActions(System.Text.Json.JsonElement userData) => throw null; + public void RunClaimActions() => throw null; + public Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse TokenResponse { get => throw null; } + public string TokenType { get => throw null; } + public System.Text.Json.JsonElement User { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthDefaults` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OAuthDefaults + { + public static string DisplayName; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthEvents : Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents + { + public virtual System.Threading.Tasks.Task CreatingTicket(Microsoft.AspNetCore.Authentication.OAuth.OAuthCreatingTicketContext context) => throw null; + public OAuthEvents() => throw null; + public System.Func OnCreatingTicket { get => throw null; set => throw null; } + public System.Func, System.Threading.Tasks.Task> OnRedirectToAuthorizationEndpoint { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task RedirectToAuthorizationEndpoint(Microsoft.AspNetCore.Authentication.RedirectContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler<>` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthHandler : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() + { + protected System.Net.Http.HttpClient Backchannel { get => throw null; } + protected virtual string BuildChallengeUrl(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string redirectUri) => throw null; + protected override System.Threading.Tasks.Task CreateEventsAsync() => throw null; + protected virtual System.Threading.Tasks.Task CreateTicketAsync(System.Security.Claims.ClaimsIdentity identity, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse tokens) => throw null; + protected Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents Events { get => throw null; set => throw null; } + protected virtual System.Threading.Tasks.Task ExchangeCodeAsync(Microsoft.AspNetCore.Authentication.OAuth.OAuthCodeExchangeContext context) => throw null; + protected virtual string FormatScope(System.Collections.Generic.IEnumerable scopes) => throw null; + protected virtual string FormatScope() => throw null; + protected override System.Threading.Tasks.Task HandleChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleRemoteAuthenticateAsync() => throw null; + public OAuthHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthOptions : Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions + { + public string AuthorizationEndpoint { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection ClaimActions { get => throw null; } + public string ClientId { get => throw null; set => throw null; } + public string ClientSecret { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.OAuth.OAuthEvents Events { get => throw null; set => throw null; } + public OAuthOptions() => throw null; + public System.Collections.Generic.ICollection Scope { get => throw null; } + public Microsoft.AspNetCore.Authentication.ISecureDataFormat StateDataFormat { get => throw null; set => throw null; } + public string TokenEndpoint { get => throw null; set => throw null; } + public bool UsePkce { get => throw null; set => throw null; } + public string UserInformationEndpoint { get => throw null; set => throw null; } + public override void Validate() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthTokenResponse : System.IDisposable + { + public string AccessToken { get => throw null; set => throw null; } + public void Dispose() => throw null; + public System.Exception Error { get => throw null; set => throw null; } + public string ExpiresIn { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse Failed(System.Exception error) => throw null; + public string RefreshToken { get => throw null; set => throw null; } + public System.Text.Json.JsonDocument Response { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Authentication.OAuth.OAuthTokenResponse Success(System.Text.Json.JsonDocument response) => throw null; + public string TokenType { get => throw null; set => throw null; } + } + + namespace Claims + { + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ClaimAction + { + public ClaimAction(string claimType, string valueType) => throw null; + public string ClaimType { get => throw null; } + public abstract void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer); + public string ValueType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimActionCollection` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClaimActionCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public void Add(Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction action) => throw null; + public ClaimActionCollection() => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public void Remove(string claimType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.CustomJsonClaimAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CustomJsonClaimAction : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction + { + public CustomJsonClaimAction(string claimType, string valueType, System.Func resolver) : base(default(string), default(string)) => throw null; + public System.Func Resolver { get => throw null; } + public override void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.DeleteClaimAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DeleteClaimAction : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction + { + public DeleteClaimAction(string claimType) : base(default(string), default(string)) => throw null; + public override void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.JsonKeyClaimAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonKeyClaimAction : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction + { + public string JsonKey { get => throw null; } + public JsonKeyClaimAction(string claimType, string valueType, string jsonKey) : base(default(string), default(string)) => throw null; + public override void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.JsonSubKeyClaimAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonSubKeyClaimAction : Microsoft.AspNetCore.Authentication.OAuth.Claims.JsonKeyClaimAction + { + public JsonSubKeyClaimAction(string claimType, string valueType, string jsonKey, string subKey) : base(default(string), default(string), default(string)) => throw null; + public override void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer) => throw null; + public string SubKey { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.OAuth.Claims.MapAllClaimsAction` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MapAllClaimsAction : Microsoft.AspNetCore.Authentication.OAuth.Claims.ClaimAction + { + public MapAllClaimsAction() : base(default(string), default(string)) => throw null; + public override void Run(System.Text.Json.JsonElement userData, System.Security.Claims.ClaimsIdentity identity, string issuer) => throw null; + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.OAuthExtensions` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OAuthExtensions + { + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, System.Action configureOptions) where THandler : Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, System.Action configureOptions) where THandler : Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, string displayName, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddOAuth(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, System.Action configureOptions) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.OAuthPostConfigureOptions<,>` in `Microsoft.AspNetCore.Authentication.OAuth, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OAuthPostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where THandler : Microsoft.AspNetCore.Authentication.OAuth.OAuthHandler where TOptions : Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions, new() + { + public OAuthPostConfigureOptions(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtection) => throw null; + public void PostConfigure(string name, TOptions options) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs new file mode 100644 index 000000000000..4355f36aac73 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs @@ -0,0 +1,391 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Authentication.AccessDeniedContext` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AccessDeniedContext : Microsoft.AspNetCore.Authentication.HandleRequestContext + { + public AccessDeniedContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions options) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions)) => throw null; + public Microsoft.AspNetCore.Http.PathString AccessDeniedPath { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public string ReturnUrl { get => throw null; set => throw null; } + public string ReturnUrlParameter { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationBuilder` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationBuilder + { + public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddPolicyScheme(string authenticationScheme, string displayName, System.Action configureOptions) => throw null; + public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddRemoteScheme(string authenticationScheme, string displayName, System.Action configureOptions) where THandler : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions, new() => throw null; + public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddScheme(string authenticationScheme, string displayName, System.Action configureOptions) where THandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions, new() => throw null; + public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddScheme(string authenticationScheme, System.Action configureOptions) where THandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions, new() => throw null; + public AuthenticationBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public virtual Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationHandler<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AuthenticationHandler : Microsoft.AspNetCore.Authentication.IAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions, new() + { + public System.Threading.Tasks.Task AuthenticateAsync() => throw null; + protected AuthenticationHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) => throw null; + protected string BuildRedirectUri(string targetPath) => throw null; + public System.Threading.Tasks.Task ChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected virtual string ClaimsIssuer { get => throw null; } + protected Microsoft.AspNetCore.Authentication.ISystemClock Clock { get => throw null; } + protected Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; } + protected virtual System.Threading.Tasks.Task CreateEventsAsync() => throw null; + protected string CurrentUri { get => throw null; } + protected virtual object Events { get => throw null; set => throw null; } + public System.Threading.Tasks.Task ForbidAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected abstract System.Threading.Tasks.Task HandleAuthenticateAsync(); + protected System.Threading.Tasks.Task HandleAuthenticateOnceAsync() => throw null; + protected System.Threading.Tasks.Task HandleAuthenticateOnceSafeAsync() => throw null; + protected virtual System.Threading.Tasks.Task HandleChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected virtual System.Threading.Tasks.Task HandleForbiddenAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public System.Threading.Tasks.Task InitializeAsync(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Http.HttpContext context) => throw null; + protected virtual System.Threading.Tasks.Task InitializeEventsAsync() => throw null; + protected virtual System.Threading.Tasks.Task InitializeHandlerAsync() => throw null; + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + public TOptions Options { get => throw null; } + protected Microsoft.Extensions.Options.IOptionsMonitor OptionsMonitor { get => throw null; } + protected Microsoft.AspNetCore.Http.PathString OriginalPath { get => throw null; } + protected Microsoft.AspNetCore.Http.PathString OriginalPathBase { get => throw null; } + protected Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + protected virtual string ResolveTarget(string scheme) => throw null; + protected Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationScheme Scheme { get => throw null; } + protected System.Text.Encodings.Web.UrlEncoder UrlEncoder { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationMiddleware` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationMiddleware + { + public AuthenticationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider Schemes { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationSchemeOptions + { + public AuthenticationSchemeOptions() => throw null; + public string ClaimsIssuer { get => throw null; set => throw null; } + public object Events { get => throw null; set => throw null; } + public System.Type EventsType { get => throw null; set => throw null; } + public string ForwardAuthenticate { get => throw null; set => throw null; } + public string ForwardChallenge { get => throw null; set => throw null; } + public string ForwardDefault { get => throw null; set => throw null; } + public System.Func ForwardDefaultSelector { get => throw null; set => throw null; } + public string ForwardForbid { get => throw null; set => throw null; } + public string ForwardSignIn { get => throw null; set => throw null; } + public string ForwardSignOut { get => throw null; set => throw null; } + public virtual void Validate(string scheme) => throw null; + public virtual void Validate() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.Base64UrlTextEncoder` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Base64UrlTextEncoder + { + public static System.Byte[] Decode(string text) => throw null; + public static string Encode(System.Byte[] data) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.BaseContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class BaseContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + protected BaseContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options) => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public TOptions Options { get => throw null; } + public Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationScheme Scheme { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.HandleRequestContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandleRequestContext : Microsoft.AspNetCore.Authentication.BaseContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + protected HandleRequestContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions)) => throw null; + public void HandleResponse() => throw null; + public Microsoft.AspNetCore.Authentication.HandleRequestResult Result { get => throw null; set => throw null; } + public void SkipHandler() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.HandleRequestResult` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandleRequestResult : Microsoft.AspNetCore.Authentication.AuthenticateResult + { + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Fail(string failureMessage, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Fail(string failureMessage) => throw null; + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Fail(System.Exception failure, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Fail(System.Exception failure) => throw null; + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Handle() => throw null; + public HandleRequestResult() => throw null; + public bool Handled { get => throw null; } + public static Microsoft.AspNetCore.Authentication.HandleRequestResult NoResult() => throw null; + public static Microsoft.AspNetCore.Authentication.HandleRequestResult SkipHandler() => throw null; + public bool Skipped { get => throw null; } + public static Microsoft.AspNetCore.Authentication.HandleRequestResult Success(Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.IDataSerializer<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDataSerializer + { + TModel Deserialize(System.Byte[] data); + System.Byte[] Serialize(TModel model); + } + + // Generated from `Microsoft.AspNetCore.Authentication.ISecureDataFormat<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISecureDataFormat + { + string Protect(TData data, string purpose); + string Protect(TData data); + TData Unprotect(string protectedText, string purpose); + TData Unprotect(string protectedText); + } + + // Generated from `Microsoft.AspNetCore.Authentication.ISystemClock` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISystemClock + { + System.DateTimeOffset UtcNow { get; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.JsonDocumentAuthExtensions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JsonDocumentAuthExtensions + { + public static string GetString(this System.Text.Json.JsonElement element, string key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PolicySchemeHandler` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PolicySchemeHandler : Microsoft.AspNetCore.Authentication.SignInAuthenticationHandler + { + protected override System.Threading.Tasks.Task HandleAuthenticateAsync() => throw null; + protected override System.Threading.Tasks.Task HandleChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleForbiddenAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleSignInAsync(System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleSignOutAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public PolicySchemeHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PolicySchemeOptions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PolicySchemeOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public PolicySchemeOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PrincipalContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PrincipalContext : Microsoft.AspNetCore.Authentication.PropertiesContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public virtual System.Security.Claims.ClaimsPrincipal Principal { get => throw null; set => throw null; } + protected PrincipalContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PropertiesContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PropertiesContext : Microsoft.AspNetCore.Authentication.BaseContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public virtual Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + protected PropertiesContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PropertiesDataFormat` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PropertiesDataFormat : Microsoft.AspNetCore.Authentication.SecureDataFormat + { + public PropertiesDataFormat(Microsoft.AspNetCore.DataProtection.IDataProtector protector) : base(default(Microsoft.AspNetCore.Authentication.IDataSerializer), default(Microsoft.AspNetCore.DataProtection.IDataProtector)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.PropertiesSerializer` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PropertiesSerializer : Microsoft.AspNetCore.Authentication.IDataSerializer + { + public static Microsoft.AspNetCore.Authentication.PropertiesSerializer Default { get => throw null; } + public virtual Microsoft.AspNetCore.Authentication.AuthenticationProperties Deserialize(System.Byte[] data) => throw null; + public PropertiesSerializer() => throw null; + public virtual Microsoft.AspNetCore.Authentication.AuthenticationProperties Read(System.IO.BinaryReader reader) => throw null; + public virtual System.Byte[] Serialize(Microsoft.AspNetCore.Authentication.AuthenticationProperties model) => throw null; + public virtual void Write(System.IO.BinaryWriter writer, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RedirectContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectContext : Microsoft.AspNetCore.Authentication.PropertiesContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public RedirectContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string redirectUri) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + public string RedirectUri { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.RemoteAuthenticationContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RemoteAuthenticationContext : Microsoft.AspNetCore.Authentication.HandleRequestContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public void Fail(string failureMessage) => throw null; + public void Fail(System.Exception failure) => throw null; + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + protected RemoteAuthenticationContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions)) => throw null; + public void Success() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RemoteAuthenticationEvents + { + public virtual System.Threading.Tasks.Task AccessDenied(Microsoft.AspNetCore.Authentication.AccessDeniedContext context) => throw null; + public System.Func OnAccessDenied { get => throw null; set => throw null; } + public System.Func OnRemoteFailure { get => throw null; set => throw null; } + public System.Func OnTicketReceived { get => throw null; set => throw null; } + public RemoteAuthenticationEvents() => throw null; + public virtual System.Threading.Tasks.Task RemoteFailure(Microsoft.AspNetCore.Authentication.RemoteFailureContext context) => throw null; + public virtual System.Threading.Tasks.Task TicketReceived(Microsoft.AspNetCore.Authentication.TicketReceivedContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RemoteAuthenticationHandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler, Microsoft.AspNetCore.Authentication.IAuthenticationRequestHandler, Microsoft.AspNetCore.Authentication.IAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions, new() + { + protected override System.Threading.Tasks.Task CreateEventsAsync() => throw null; + protected Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents Events { get => throw null; set => throw null; } + protected virtual void GenerateCorrelationId(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected virtual System.Threading.Tasks.Task HandleAccessDeniedErrorAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected override System.Threading.Tasks.Task HandleAuthenticateAsync() => throw null; + protected override System.Threading.Tasks.Task HandleForbiddenAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + protected abstract System.Threading.Tasks.Task HandleRemoteAuthenticateAsync(); + public virtual System.Threading.Tasks.Task HandleRequestAsync() => throw null; + protected RemoteAuthenticationHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + public virtual System.Threading.Tasks.Task ShouldHandleRequestAsync() => throw null; + protected string SignInScheme { get => throw null; } + protected virtual bool ValidateCorrelationId(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RemoteAuthenticationOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public Microsoft.AspNetCore.Http.PathString AccessDeniedPath { get => throw null; set => throw null; } + public System.Net.Http.HttpClient Backchannel { get => throw null; set => throw null; } + public System.Net.Http.HttpMessageHandler BackchannelHttpHandler { get => throw null; set => throw null; } + public System.TimeSpan BackchannelTimeout { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString CallbackPath { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieBuilder CorrelationCookie { get => throw null; set => throw null; } + public Microsoft.AspNetCore.DataProtection.IDataProtectionProvider DataProtectionProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents Events { get => throw null; set => throw null; } + public RemoteAuthenticationOptions() => throw null; + public System.TimeSpan RemoteAuthenticationTimeout { get => throw null; set => throw null; } + public string ReturnUrlParameter { get => throw null; set => throw null; } + public bool SaveTokens { get => throw null; set => throw null; } + public string SignInScheme { get => throw null; set => throw null; } + public override void Validate(string scheme) => throw null; + public override void Validate() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RemoteFailureContext` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RemoteFailureContext : Microsoft.AspNetCore.Authentication.HandleRequestContext + { + public System.Exception Failure { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public RemoteFailureContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions options, System.Exception failure) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.RequestPathBaseCookieBuilder` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestPathBaseCookieBuilder : Microsoft.AspNetCore.Http.CookieBuilder + { + protected virtual string AdditionalPath { get => throw null; } + public override Microsoft.AspNetCore.Http.CookieOptions Build(Microsoft.AspNetCore.Http.HttpContext context, System.DateTimeOffset expiresFrom) => throw null; + public RequestPathBaseCookieBuilder() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.ResultContext<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ResultContext : Microsoft.AspNetCore.Authentication.BaseContext where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions + { + public void Fail(string failureMessage) => throw null; + public void Fail(System.Exception failure) => throw null; + public void NoResult() => throw null; + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticateResult Result { get => throw null; } + protected ResultContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, TOptions options) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(TOptions)) => throw null; + public void Success() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.SecureDataFormat<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SecureDataFormat : Microsoft.AspNetCore.Authentication.ISecureDataFormat + { + public string Protect(TData data, string purpose) => throw null; + public string Protect(TData data) => throw null; + public SecureDataFormat(Microsoft.AspNetCore.Authentication.IDataSerializer serializer, Microsoft.AspNetCore.DataProtection.IDataProtector protector) => throw null; + public TData Unprotect(string protectedText, string purpose) => throw null; + public TData Unprotect(string protectedText) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.SignInAuthenticationHandler<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class SignInAuthenticationHandler : Microsoft.AspNetCore.Authentication.SignOutAuthenticationHandler, Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler, Microsoft.AspNetCore.Authentication.IAuthenticationSignInHandler, Microsoft.AspNetCore.Authentication.IAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions, new() + { + protected abstract System.Threading.Tasks.Task HandleSignInAsync(System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + public virtual System.Threading.Tasks.Task SignInAsync(System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignInAuthenticationHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.SignOutAuthenticationHandler<>` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class SignOutAuthenticationHandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler, Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler, Microsoft.AspNetCore.Authentication.IAuthenticationHandler where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions, new() + { + protected abstract System.Threading.Tasks.Task HandleSignOutAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties); + public virtual System.Threading.Tasks.Task SignOutAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignOutAuthenticationHandler(Microsoft.Extensions.Options.IOptionsMonitor options, Microsoft.Extensions.Logging.ILoggerFactory logger, System.Text.Encodings.Web.UrlEncoder encoder, Microsoft.AspNetCore.Authentication.ISystemClock clock) : base(default(Microsoft.Extensions.Options.IOptionsMonitor), default(Microsoft.Extensions.Logging.ILoggerFactory), default(System.Text.Encodings.Web.UrlEncoder), default(Microsoft.AspNetCore.Authentication.ISystemClock)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.SystemClock` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SystemClock : Microsoft.AspNetCore.Authentication.ISystemClock + { + public SystemClock() => throw null; + public System.DateTimeOffset UtcNow { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authentication.TicketDataFormat` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TicketDataFormat : Microsoft.AspNetCore.Authentication.SecureDataFormat + { + public TicketDataFormat(Microsoft.AspNetCore.DataProtection.IDataProtector protector) : base(default(Microsoft.AspNetCore.Authentication.IDataSerializer), default(Microsoft.AspNetCore.DataProtection.IDataProtector)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.TicketReceivedContext` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TicketReceivedContext : Microsoft.AspNetCore.Authentication.RemoteAuthenticationContext + { + public string ReturnUri { get => throw null; set => throw null; } + public TicketReceivedContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions options, Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.RemoteAuthenticationOptions), default(Microsoft.AspNetCore.Authentication.AuthenticationProperties)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authentication.TicketSerializer` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TicketSerializer : Microsoft.AspNetCore.Authentication.IDataSerializer + { + public static Microsoft.AspNetCore.Authentication.TicketSerializer Default { get => throw null; } + public virtual Microsoft.AspNetCore.Authentication.AuthenticationTicket Deserialize(System.Byte[] data) => throw null; + public virtual Microsoft.AspNetCore.Authentication.AuthenticationTicket Read(System.IO.BinaryReader reader) => throw null; + protected virtual System.Security.Claims.Claim ReadClaim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity identity) => throw null; + protected virtual System.Security.Claims.ClaimsIdentity ReadIdentity(System.IO.BinaryReader reader) => throw null; + public virtual System.Byte[] Serialize(Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) => throw null; + public TicketSerializer() => throw null; + public virtual void Write(System.IO.BinaryWriter writer, Microsoft.AspNetCore.Authentication.AuthenticationTicket ticket) => throw null; + protected virtual void WriteClaim(System.IO.BinaryWriter writer, System.Security.Claims.Claim claim) => throw null; + protected virtual void WriteIdentity(System.IO.BinaryWriter writer, System.Security.Claims.ClaimsIdentity identity) => throw null; + } + + } + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.AuthAppBuilderExtensions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthAppBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseAuthentication(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions` in `Microsoft.AspNetCore.Authentication, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthenticationServiceCollectionExtensions + { + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string defaultScheme) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs new file mode 100644 index 000000000000..145ae1120f03 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs @@ -0,0 +1,94 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationMiddleware` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationMiddleware + { + public AuthorizationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationMiddlewareResultHandler` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationMiddlewareResultHandler + { + System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult authorizeResult); + } + + namespace Policy + { + // Generated from `Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationMiddlewareResultHandler : Microsoft.AspNetCore.Authorization.IAuthorizationMiddlewareResultHandler + { + public AuthorizationMiddlewareResultHandler() => throw null; + public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult authorizeResult) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Policy.IPolicyEvaluator` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPolicyEvaluator + { + System.Threading.Tasks.Task AuthenticateAsync(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Http.HttpContext context); + System.Threading.Tasks.Task AuthorizeAsync(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authentication.AuthenticateResult authenticationResult, Microsoft.AspNetCore.Http.HttpContext context, object resource); + } + + // Generated from `Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PolicyAuthorizationResult + { + public Microsoft.AspNetCore.Authorization.AuthorizationFailure AuthorizationFailure { get => throw null; } + public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Challenge() => throw null; + public bool Challenged { get => throw null; } + public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid(Microsoft.AspNetCore.Authorization.AuthorizationFailure authorizationFailure) => throw null; + public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid() => throw null; + public bool Forbidden { get => throw null; } + public bool Succeeded { get => throw null; } + public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Success() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Policy.PolicyEvaluator` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PolicyEvaluator : Microsoft.AspNetCore.Authorization.Policy.IPolicyEvaluator + { + public virtual System.Threading.Tasks.Task AuthenticateAsync(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public virtual System.Threading.Tasks.Task AuthorizeAsync(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authentication.AuthenticateResult authenticationResult, Microsoft.AspNetCore.Http.HttpContext context, object resource) => throw null; + public PolicyEvaluator(Microsoft.AspNetCore.Authorization.IAuthorizationService authorization) => throw null; + } + + } + } + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.AuthorizationAppBuilderExtensions` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthorizationAppBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseAuthorization(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.AuthorizationEndpointConventionBuilderExtensions` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthorizationEndpointConventionBuilderExtensions + { + public static TBuilder AllowAnonymous(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder RequireAuthorization(this TBuilder builder, params string[] policyNames) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder RequireAuthorization(this TBuilder builder, params Microsoft.AspNetCore.Authorization.IAuthorizeData[] authorizeData) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder RequireAuthorization(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.PolicyServiceCollectionExtensions` in `Microsoft.AspNetCore.Authorization.Policy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class PolicyServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorizationPolicyEvaluator(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs new file mode 100644 index 000000000000..927b2657064e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs @@ -0,0 +1,289 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AllowAnonymousAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAllowAnonymous + { + public AllowAnonymousAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationFailure` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationFailure + { + public static Microsoft.AspNetCore.Authorization.AuthorizationFailure ExplicitFail() => throw null; + public bool FailCalled { get => throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationFailure Failed(System.Collections.Generic.IEnumerable failed) => throw null; + public System.Collections.Generic.IEnumerable FailedRequirements { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationHandler<,>` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler where TRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + protected AuthorizationHandler() => throw null; + public virtual System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + protected abstract System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, TRequirement requirement, TResource resource); + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationHandler<>` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler where TRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + protected AuthorizationHandler() => throw null; + public virtual System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + protected abstract System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, TRequirement requirement); + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationHandlerContext + { + public AuthorizationHandlerContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource) => throw null; + public virtual void Fail() => throw null; + public virtual bool HasFailed { get => throw null; } + public virtual bool HasSucceeded { get => throw null; } + public virtual System.Collections.Generic.IEnumerable PendingRequirements { get => throw null; } + public virtual System.Collections.Generic.IEnumerable Requirements { get => throw null; } + public virtual object Resource { get => throw null; } + public virtual void Succeed(Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement) => throw null; + public virtual System.Security.Claims.ClaimsPrincipal User { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationOptions` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationOptions + { + public void AddPolicy(string name, System.Action configurePolicy) => throw null; + public void AddPolicy(string name, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + public AuthorizationOptions() => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy DefaultPolicy { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy FallbackPolicy { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy GetPolicy(string name) => throw null; + public bool InvokeHandlersAfterFailure { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationPolicy` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationPolicy + { + public System.Collections.Generic.IReadOnlyList AuthenticationSchemes { get => throw null; } + public AuthorizationPolicy(System.Collections.Generic.IEnumerable requirements, System.Collections.Generic.IEnumerable authenticationSchemes) => throw null; + public static Microsoft.AspNetCore.Authorization.AuthorizationPolicy Combine(params Microsoft.AspNetCore.Authorization.AuthorizationPolicy[] policies) => throw null; + public static Microsoft.AspNetCore.Authorization.AuthorizationPolicy Combine(System.Collections.Generic.IEnumerable policies) => throw null; + public static System.Threading.Tasks.Task CombineAsync(Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, System.Collections.Generic.IEnumerable authorizeData) => throw null; + public System.Collections.Generic.IReadOnlyList Requirements { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationPolicyBuilder + { + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder AddAuthenticationSchemes(params string[] schemes) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder AddRequirements(params Microsoft.AspNetCore.Authorization.IAuthorizationRequirement[] requirements) => throw null; + public System.Collections.Generic.IList AuthenticationSchemes { get => throw null; set => throw null; } + public AuthorizationPolicyBuilder(params string[] authenticationSchemes) => throw null; + public AuthorizationPolicyBuilder(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy Build() => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder Combine(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion(System.Func handler) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion(System.Func> handler) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAuthenticatedUser() => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType, params string[] allowedValues) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType, System.Collections.Generic.IEnumerable allowedValues) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireClaim(string claimType) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireRole(params string[] roles) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireRole(System.Collections.Generic.IEnumerable roles) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireUserName(string userName) => throw null; + public System.Collections.Generic.IList Requirements { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationResult` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationResult + { + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Failed(Microsoft.AspNetCore.Authorization.AuthorizationFailure failure) => throw null; + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Failed() => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationFailure Failure { get => throw null; } + public bool Succeeded { get => throw null; } + public static Microsoft.AspNetCore.Authorization.AuthorizationResult Success() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizationServiceExtensions` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthorizationServiceExtensions + { + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, string policyName) => throw null; + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement) => throw null; + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.AuthorizeAttribute` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizeAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAuthorizeData + { + public string AuthenticationSchemes { get => throw null; set => throw null; } + public AuthorizeAttribute(string policy) => throw null; + public AuthorizeAttribute() => throw null; + public string Policy { get => throw null; set => throw null; } + public string Roles { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Authorization.DefaultAuthorizationEvaluator` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultAuthorizationEvaluator : Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator + { + public DefaultAuthorizationEvaluator() => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationResult Evaluate(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.DefaultAuthorizationHandlerContextFactory` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultAuthorizationHandlerContextFactory : Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory + { + public virtual Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext CreateContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource) => throw null; + public DefaultAuthorizationHandlerContextFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.DefaultAuthorizationHandlerProvider` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultAuthorizationHandlerProvider : Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider + { + public DefaultAuthorizationHandlerProvider(System.Collections.Generic.IEnumerable handlers) => throw null; + public System.Threading.Tasks.Task> GetHandlersAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.DefaultAuthorizationPolicyProvider` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultAuthorizationPolicyProvider : Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider + { + public DefaultAuthorizationPolicyProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task GetDefaultPolicyAsync() => throw null; + public System.Threading.Tasks.Task GetFallbackPolicyAsync() => throw null; + public virtual System.Threading.Tasks.Task GetPolicyAsync(string policyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.DefaultAuthorizationService` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultAuthorizationService : Microsoft.AspNetCore.Authorization.IAuthorizationService + { + public virtual System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, string policyName) => throw null; + public virtual System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable requirements) => throw null; + public DefaultAuthorizationService(Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider handlers, Microsoft.Extensions.Logging.ILogger logger, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory contextFactory, Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator evaluator, Microsoft.Extensions.Options.IOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationEvaluator + { + Microsoft.AspNetCore.Authorization.AuthorizationResult Evaluate(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationHandler` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationHandler + { + System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationHandlerContextFactory + { + Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext CreateContext(System.Collections.Generic.IEnumerable requirements, System.Security.Claims.ClaimsPrincipal user, object resource); + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationHandlerProvider + { + System.Threading.Tasks.Task> GetHandlersAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context); + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationPolicyProvider + { + System.Threading.Tasks.Task GetDefaultPolicyAsync(); + System.Threading.Tasks.Task GetFallbackPolicyAsync(); + System.Threading.Tasks.Task GetPolicyAsync(string policyName); + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationRequirement + { + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizationService` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationService + { + System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, string policyName); + System.Threading.Tasks.Task AuthorizeAsync(System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable requirements); + } + + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.AssertionRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AssertionRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement, Microsoft.AspNetCore.Authorization.IAuthorizationHandler + { + public AssertionRequirement(System.Func handler) => throw null; + public AssertionRequirement(System.Func> handler) => throw null; + public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + public System.Func> Handler { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.ClaimsAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClaimsAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public System.Collections.Generic.IEnumerable AllowedValues { get => throw null; } + public string ClaimType { get => throw null; } + public ClaimsAuthorizationRequirement(string claimType, System.Collections.Generic.IEnumerable allowedValues) => throw null; + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.ClaimsAuthorizationRequirement requirement) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.DenyAnonymousAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DenyAnonymousAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public DenyAnonymousAuthorizationRequirement() => throw null; + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.DenyAnonymousAuthorizationRequirement requirement) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NameAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.NameAuthorizationRequirement requirement) => throw null; + public NameAuthorizationRequirement(string requiredName) => throw null; + public string RequiredName { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.OperationAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OperationAuthorizationRequirement : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public string Name { get => throw null; set => throw null; } + public OperationAuthorizationRequirement() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.PassThroughAuthorizationHandler` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PassThroughAuthorizationHandler : Microsoft.AspNetCore.Authorization.IAuthorizationHandler + { + public System.Threading.Tasks.Task HandleAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context) => throw null; + public PassThroughAuthorizationHandler() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RolesAuthorizationRequirement : Microsoft.AspNetCore.Authorization.AuthorizationHandler, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement + { + public System.Collections.Generic.IEnumerable AllowedRoles { get => throw null; } + protected override System.Threading.Tasks.Task HandleRequirementAsync(Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext context, Microsoft.AspNetCore.Authorization.Infrastructure.RolesAuthorizationRequirement requirement) => throw null; + public RolesAuthorizationRequirement(System.Collections.Generic.IEnumerable allowedRoles) => throw null; + public override string ToString() => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.AuthorizationServiceCollectionExtensions` in `Microsoft.AspNetCore.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AuthorizationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorizationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthorizationCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs new file mode 100644 index 000000000000..dc923f4b660e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs @@ -0,0 +1,82 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Components + { + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthenticationState` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationState + { + public AuthenticationState(System.Security.Claims.ClaimsPrincipal user) => throw null; + public System.Security.Claims.ClaimsPrincipal User { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate void AuthenticationStateChangedHandler(System.Threading.Tasks.Task task); + + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AuthenticationStateProvider + { + public event Microsoft.AspNetCore.Components.Authorization.AuthenticationStateChangedHandler AuthenticationStateChanged; + protected AuthenticationStateProvider() => throw null; + public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync(); + protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthorizeRouteView` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizeRouteView : Microsoft.AspNetCore.Components.RouteView + { + public AuthorizeRouteView() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { get => throw null; set => throw null; } + protected override void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public object Resource { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthorizeView` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizeView : Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore + { + public AuthorizeView() => throw null; + protected override Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData() => throw null; + public string Policy { get => throw null; set => throw null; } + public string Roles { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AuthorizeViewCore : Microsoft.AspNetCore.Components.ComponentBase + { + protected AuthorizeViewCore() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment Authorized { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderFragment Authorizing { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + protected abstract Microsoft.AspNetCore.Authorization.IAuthorizeData[] GetAuthorizeData(); + public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { get => throw null; set => throw null; } + protected override System.Threading.Tasks.Task OnParametersSetAsync() => throw null; + public object Resource { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.CascadingAuthenticationState` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder) => throw null; + public CascadingAuthenticationState() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + void System.IDisposable.Dispose() => throw null; + protected override void OnInitialized() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider` in `Microsoft.AspNetCore.Components.Authorization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostEnvironmentAuthenticationStateProvider + { + void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask); + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs new file mode 100644 index 000000000000..aa24db2ad766 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs @@ -0,0 +1,108 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Components + { + namespace Forms + { + // Generated from `Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataAnnotationsValidator : Microsoft.AspNetCore.Components.ComponentBase + { + public DataAnnotationsValidator() => throw null; + protected override void OnInitialized() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.EditContext` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EditContext + { + public EditContext(object model) => throw null; + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier Field(string fieldName) => throw null; + public System.Collections.Generic.IEnumerable GetValidationMessages(System.Linq.Expressions.Expression> accessor) => throw null; + public System.Collections.Generic.IEnumerable GetValidationMessages(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public System.Collections.Generic.IEnumerable GetValidationMessages() => throw null; + public bool IsModified(System.Linq.Expressions.Expression> accessor) => throw null; + public bool IsModified(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public bool IsModified() => throw null; + public void MarkAsUnmodified(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public void MarkAsUnmodified() => throw null; + public object Model { get => throw null; } + public void NotifyFieldChanged(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public void NotifyValidationStateChanged() => throw null; + public event System.EventHandler OnFieldChanged; + public event System.EventHandler OnValidationRequested; + public event System.EventHandler OnValidationStateChanged; + public Microsoft.AspNetCore.Components.Forms.EditContextProperties Properties { get => throw null; } + public bool Validate() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.EditContextDataAnnotationsExtensions` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EditContextDataAnnotationsExtensions + { + public static Microsoft.AspNetCore.Components.Forms.EditContext AddDataAnnotationsValidation(this Microsoft.AspNetCore.Components.Forms.EditContext editContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.EditContextProperties` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EditContextProperties + { + public EditContextProperties() => throw null; + public object this[object key] { get => throw null; set => throw null; } + public bool Remove(object key) => throw null; + public bool TryGetValue(object key, out object value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.FieldChangedEventArgs` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FieldChangedEventArgs : System.EventArgs + { + public FieldChangedEventArgs(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.FieldIdentifier` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FieldIdentifier : System.IEquatable + { + public static Microsoft.AspNetCore.Components.Forms.FieldIdentifier Create(System.Linq.Expressions.Expression> accessor) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Components.Forms.FieldIdentifier otherIdentifier) => throw null; + public FieldIdentifier(object model, string fieldName) => throw null; + // Stub generator skipped constructor + public string FieldName { get => throw null; } + public override int GetHashCode() => throw null; + public object Model { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.ValidationMessageStore` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationMessageStore + { + public void Add(System.Linq.Expressions.Expression> accessor, string message) => throw null; + public void Add(System.Linq.Expressions.Expression> accessor, System.Collections.Generic.IEnumerable messages) => throw null; + public void Add(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, string message) => throw null; + public void Add(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier, System.Collections.Generic.IEnumerable messages) => throw null; + public void Clear(System.Linq.Expressions.Expression> accessor) => throw null; + public void Clear(Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IEnumerable this[System.Linq.Expressions.Expression> accessor] { get => throw null; } + public System.Collections.Generic.IEnumerable this[Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier] { get => throw null; } + public ValidationMessageStore(Microsoft.AspNetCore.Components.Forms.EditContext editContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationRequestedEventArgs : System.EventArgs + { + public static Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty; + public ValidationRequestedEventArgs() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs` in `Microsoft.AspNetCore.Components.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationStateChangedEventArgs : System.EventArgs + { + public static Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty; + public ValidationStateChangedEventArgs() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs new file mode 100644 index 000000000000..c4efaa097809 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs @@ -0,0 +1,150 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComponentEndpointConventionBuilder : Microsoft.AspNetCore.Builder.IHubEndpointConventionBuilder, Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + public void Add(System.Action convention) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ComponentEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path) => throw null; + public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) => throw null; + } + + } + namespace Components + { + namespace Server + { + // Generated from `Microsoft.AspNetCore.Components.Server.CircuitOptions` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CircuitOptions + { + public CircuitOptions() => throw null; + public bool DetailedErrors { get => throw null; set => throw null; } + public int DisconnectedCircuitMaxRetained { get => throw null; set => throw null; } + public System.TimeSpan DisconnectedCircuitRetentionPeriod { get => throw null; set => throw null; } + public System.TimeSpan JSInteropDefaultCallTimeout { get => throw null; set => throw null; } + public int MaxBufferedUnacknowledgedRenderBatches { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Server.RevalidatingServerAuthenticationStateProvider` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RevalidatingServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider, System.IDisposable + { + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public RevalidatingServerAuthenticationStateProvider(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + protected abstract System.TimeSpan RevalidationInterval { get; } + protected abstract System.Threading.Tasks.Task ValidateAuthenticationStateAsync(Microsoft.AspNetCore.Components.Authorization.AuthenticationState authenticationState, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Components.Server.ServerAuthenticationStateProvider` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider, Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider + { + public override System.Threading.Tasks.Task GetAuthenticationStateAsync() => throw null; + public ServerAuthenticationStateProvider() => throw null; + public void SetAuthenticationState(System.Threading.Tasks.Task authenticationStateTask) => throw null; + } + + namespace Circuits + { + // Generated from `Microsoft.AspNetCore.Components.Server.Circuits.Circuit` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Circuit + { + public string Id { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Server.Circuits.CircuitHandler` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class CircuitHandler + { + protected CircuitHandler() => throw null; + public virtual System.Threading.Tasks.Task OnCircuitClosedAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnCircuitOpenedAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnConnectionDownAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnConnectionUpAsync(Microsoft.AspNetCore.Components.Server.Circuits.Circuit circuit, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual int Order { get => throw null; } + } + + } + namespace ProtectedBrowserStorage + { + // Generated from `Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ProtectedBrowserStorage + { + public System.Threading.Tasks.ValueTask DeleteAsync(string key) => throw null; + public System.Threading.Tasks.ValueTask> GetAsync(string purpose, string key) => throw null; + public System.Threading.Tasks.ValueTask> GetAsync(string key) => throw null; + protected private ProtectedBrowserStorage(string storeName, Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) => throw null; + public System.Threading.Tasks.ValueTask SetAsync(string purpose, string key, object value) => throw null; + public System.Threading.Tasks.ValueTask SetAsync(string key, object value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorageResult<>` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ProtectedBrowserStorageResult + { + // Stub generator skipped constructor + public bool Success { get => throw null; } + public TValue Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedLocalStorage` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProtectedLocalStorage : Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage + { + public ProtectedLocalStorage(Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) : base(default(string), default(Microsoft.JSInterop.IJSRuntime), default(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedSessionStorage` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProtectedSessionStorage : Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorage + { + public ProtectedSessionStorage(Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider) : base(default(string), default(Microsoft.JSInterop.IJSRuntime), default(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider)) => throw null; + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ComponentServiceCollectionExtensions` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ComponentServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder AddServerSideBlazor(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure = default(System.Action)) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServerSideBlazorBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServerSideBlazorBuilderExtensions` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServerSideBlazorBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder AddCircuitOptions(this Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder AddHubOptions(this Microsoft.Extensions.DependencyInjection.IServerSideBlazorBuilder builder, System.Action configure) => throw null; + } + + } + } +} +namespace System +{ + namespace Buffers + { + /* Duplicate type 'SequenceReader<>' is not stubbed in this assembly 'Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'SequenceReaderExtensions' is not stubbed in this assembly 'Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs new file mode 100644 index 000000000000..b7c27b517c04 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs @@ -0,0 +1,528 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Components + { + // Generated from `Microsoft.AspNetCore.Components.BindInputElementAttribute` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindInputElementAttribute : System.Attribute + { + public BindInputElementAttribute(string type, string suffix, string valueAttribute, string changeAttribute, bool isInvariantCulture, string format) => throw null; + public string ChangeAttribute { get => throw null; } + public string Format { get => throw null; } + public bool IsInvariantCulture { get => throw null; } + public string Suffix { get => throw null; } + public string Type { get => throw null; } + public string ValueAttribute { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ElementReferenceExtensions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ElementReferenceExtensions + { + public static System.Threading.Tasks.ValueTask FocusAsync(this Microsoft.AspNetCore.Components.ElementReference elementReference) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.WebElementReferenceContext` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebElementReferenceContext : Microsoft.AspNetCore.Components.ElementReferenceContext + { + public WebElementReferenceContext(Microsoft.JSInterop.IJSRuntime jsRuntime) => throw null; + } + + namespace Forms + { + // Generated from `Microsoft.AspNetCore.Components.Forms.BrowserFileExtensions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class BrowserFileExtensions + { + public static System.Threading.Tasks.ValueTask RequestImageFileAsync(this Microsoft.AspNetCore.Components.Forms.IBrowserFile browserFile, string format, int maxWith, int maxHeight) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.EditContextFieldClassExtensions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EditContextFieldClassExtensions + { + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Linq.Expressions.Expression> accessor) => throw null; + public static string FieldCssClass(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + public static void SetFieldCssClassProvider(this Microsoft.AspNetCore.Components.Forms.EditContext editContext, Microsoft.AspNetCore.Components.Forms.FieldCssClassProvider fieldCssClassProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.EditForm` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EditForm : Microsoft.AspNetCore.Components.ComponentBase + { + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.Forms.EditContext EditContext { get => throw null; set => throw null; } + public EditForm() => throw null; + public object Model { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.EventCallback OnInvalidSubmit { get => throw null; set => throw null; } + protected override void OnParametersSet() => throw null; + public Microsoft.AspNetCore.Components.EventCallback OnSubmit { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.EventCallback OnValidSubmit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.FieldCssClassProvider` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FieldCssClassProvider + { + public FieldCssClassProvider() => throw null; + public virtual string GetFieldCssClass(Microsoft.AspNetCore.Components.Forms.EditContext editContext, Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.IBrowserFile` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBrowserFile + { + string ContentType { get; } + System.DateTimeOffset LastModified { get; } + string Name { get; } + System.IO.Stream OpenReadStream(System.Int64 maxAllowedSize = default(System.Int64), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Int64 Size { get; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.IInputFileJsCallbacks` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IInputFileJsCallbacks + { + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputBase<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class InputBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected string CssClass { get => throw null; } + protected TValue CurrentValue { get => throw null; set => throw null; } + protected string CurrentValueAsString { get => throw null; set => throw null; } + public string DisplayName { get => throw null; set => throw null; } + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected Microsoft.AspNetCore.Components.Forms.EditContext EditContext { get => throw null; set => throw null; } + protected internal Microsoft.AspNetCore.Components.Forms.FieldIdentifier FieldIdentifier { get => throw null; set => throw null; } + protected virtual string FormatValueAsString(TValue value) => throw null; + protected InputBase() => throw null; + public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + protected abstract bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage); + public TValue Value { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.EventCallback ValueChanged { get => throw null; set => throw null; } + public System.Linq.Expressions.Expression> ValueExpression { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputCheckbox` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputCheckbox : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public InputCheckbox() => throw null; + protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputDate<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputDate : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + protected override string FormatValueAsString(TValue value) => throw null; + public InputDate() => throw null; + public string ParsingErrorMessage { get => throw null; set => throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputFile` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputFile : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public System.Collections.Generic.IDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + void System.IDisposable.Dispose() => throw null; + public InputFile() => throw null; + protected override System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) => throw null; + public Microsoft.AspNetCore.Components.EventCallback OnChange { get => throw null; set => throw null; } + protected override void OnInitialized() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputFileChangeEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputFileChangeEventArgs : System.EventArgs + { + public Microsoft.AspNetCore.Components.Forms.IBrowserFile File { get => throw null; } + public int FileCount { get => throw null; } + public System.Collections.Generic.IReadOnlyList GetMultipleFiles(int maximumFileCount = default(int)) => throw null; + public InputFileChangeEventArgs(System.Collections.Generic.IReadOnlyList files) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputNumber<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputNumber : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + protected override string FormatValueAsString(TValue value) => throw null; + public InputNumber() => throw null; + public string ParsingErrorMessage { get => throw null; set => throw null; } + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputRadio<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputRadio : Microsoft.AspNetCore.Components.ComponentBase + { + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public InputRadio() => throw null; + public string Name { get => throw null; set => throw null; } + protected override void OnParametersSet() => throw null; + public TValue Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputRadioGroup<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputRadioGroup : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public InputRadioGroup() => throw null; + public string Name { get => throw null; set => throw null; } + protected override void OnParametersSet() => throw null; + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputSelect<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputSelect : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public InputSelect() => throw null; + protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputText` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputText : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public InputText() => throw null; + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.InputTextArea` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputTextArea : Microsoft.AspNetCore.Components.Forms.InputBase + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public InputTextArea() => throw null; + protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.RemoteBrowserFileStreamOptions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RemoteBrowserFileStreamOptions + { + public int MaxBufferSize { get => throw null; set => throw null; } + public int MaxSegmentSize { get => throw null; set => throw null; } + public RemoteBrowserFileStreamOptions() => throw null; + public System.TimeSpan SegmentFetchTimeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.ValidationMessage<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationMessage : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Linq.Expressions.Expression> For { get => throw null; set => throw null; } + protected override void OnParametersSet() => throw null; + public ValidationMessage() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Forms.ValidationSummary` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationSummary : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public object Model { get => throw null; set => throw null; } + protected override void OnParametersSet() => throw null; + public ValidationSummary() => throw null; + } + + } + namespace RenderTree + { + // Generated from `Microsoft.AspNetCore.Components.RenderTree.WebEventDescriptor` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebEventDescriptor + { + public int BrowserRendererId { get => throw null; set => throw null; } + public string EventArgsType { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo EventFieldInfo { get => throw null; set => throw null; } + public System.UInt64 EventHandlerId { get => throw null; set => throw null; } + public WebEventDescriptor() => throw null; + } + + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Components.Routing.NavLink` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NavLink : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + public string ActiveClass { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyDictionary AdditionalAttributes { get => throw null; set => throw null; } + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + protected string CssClass { get => throw null; set => throw null; } + public void Dispose() => throw null; + public Microsoft.AspNetCore.Components.Routing.NavLinkMatch Match { get => throw null; set => throw null; } + public NavLink() => throw null; + protected override void OnInitialized() => throw null; + protected override void OnParametersSet() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Routing.NavLinkMatch` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum NavLinkMatch + { + All, + // Stub generator skipped constructor + Prefix, + } + + } + namespace Web + { + // Generated from `Microsoft.AspNetCore.Components.Web.BindAttributes` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class BindAttributes + { + } + + // Generated from `Microsoft.AspNetCore.Components.Web.ClipboardEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClipboardEventArgs : System.EventArgs + { + public ClipboardEventArgs() => throw null; + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.DataTransfer` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataTransfer + { + public DataTransfer() => throw null; + public string DropEffect { get => throw null; set => throw null; } + public string EffectAllowed { get => throw null; set => throw null; } + public string[] Files { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.Web.DataTransferItem[] Items { get => throw null; set => throw null; } + public string[] Types { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.DataTransferItem` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataTransferItem + { + public DataTransferItem() => throw null; + public string Kind { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.DragEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DragEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public Microsoft.AspNetCore.Components.Web.DataTransfer DataTransfer { get => throw null; set => throw null; } + public DragEventArgs() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Web.ErrorEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ErrorEventArgs : System.EventArgs + { + public int Colno { get => throw null; set => throw null; } + public ErrorEventArgs() => throw null; + public string Filename { get => throw null; set => throw null; } + public int Lineno { get => throw null; set => throw null; } + public string Message { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.EventHandlers` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EventHandlers + { + } + + // Generated from `Microsoft.AspNetCore.Components.Web.FocusEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FocusEventArgs : System.EventArgs + { + public FocusEventArgs() => throw null; + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.KeyboardEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyboardEventArgs : System.EventArgs + { + public bool AltKey { get => throw null; set => throw null; } + public string Code { get => throw null; set => throw null; } + public bool CtrlKey { get => throw null; set => throw null; } + public string Key { get => throw null; set => throw null; } + public KeyboardEventArgs() => throw null; + public float Location { get => throw null; set => throw null; } + public bool MetaKey { get => throw null; set => throw null; } + public bool Repeat { get => throw null; set => throw null; } + public bool ShiftKey { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.MouseEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MouseEventArgs : System.EventArgs + { + public bool AltKey { get => throw null; set => throw null; } + public System.Int64 Button { get => throw null; set => throw null; } + public System.Int64 Buttons { get => throw null; set => throw null; } + public double ClientX { get => throw null; set => throw null; } + public double ClientY { get => throw null; set => throw null; } + public bool CtrlKey { get => throw null; set => throw null; } + public System.Int64 Detail { get => throw null; set => throw null; } + public bool MetaKey { get => throw null; set => throw null; } + public MouseEventArgs() => throw null; + public double OffsetX { get => throw null; set => throw null; } + public double OffsetY { get => throw null; set => throw null; } + public double ScreenX { get => throw null; set => throw null; } + public double ScreenY { get => throw null; set => throw null; } + public bool ShiftKey { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.PointerEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PointerEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public float Height { get => throw null; set => throw null; } + public bool IsPrimary { get => throw null; set => throw null; } + public PointerEventArgs() => throw null; + public System.Int64 PointerId { get => throw null; set => throw null; } + public string PointerType { get => throw null; set => throw null; } + public float Pressure { get => throw null; set => throw null; } + public float TiltX { get => throw null; set => throw null; } + public float TiltY { get => throw null; set => throw null; } + public float Width { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.ProgressEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProgressEventArgs : System.EventArgs + { + public bool LengthComputable { get => throw null; set => throw null; } + public System.Int64 Loaded { get => throw null; set => throw null; } + public ProgressEventArgs() => throw null; + public System.Int64 Total { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.TouchEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TouchEventArgs : System.EventArgs + { + public bool AltKey { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.Web.TouchPoint[] ChangedTouches { get => throw null; set => throw null; } + public bool CtrlKey { get => throw null; set => throw null; } + public System.Int64 Detail { get => throw null; set => throw null; } + public bool MetaKey { get => throw null; set => throw null; } + public bool ShiftKey { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.Web.TouchPoint[] TargetTouches { get => throw null; set => throw null; } + public TouchEventArgs() => throw null; + public Microsoft.AspNetCore.Components.Web.TouchPoint[] Touches { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.TouchPoint` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TouchPoint + { + public double ClientX { get => throw null; set => throw null; } + public double ClientY { get => throw null; set => throw null; } + public System.Int64 Identifier { get => throw null; set => throw null; } + public double PageX { get => throw null; set => throw null; } + public double PageY { get => throw null; set => throw null; } + public double ScreenX { get => throw null; set => throw null; } + public double ScreenY { get => throw null; set => throw null; } + public TouchPoint() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Web.WebEventCallbackFactoryEventArgsExtensions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebEventCallbackFactoryEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Web.WebRenderTreeBuilderExtensions` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebRenderTreeBuilderExtensions + { + public static void AddEventPreventDefaultAttribute(this Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder, int sequence, string eventName, bool value) => throw null; + public static void AddEventStopPropagationAttribute(this Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder, int sequence, string eventName, bool value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Web.WheelEventArgs` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WheelEventArgs : Microsoft.AspNetCore.Components.Web.MouseEventArgs + { + public System.Int64 DeltaMode { get => throw null; set => throw null; } + public double DeltaX { get => throw null; set => throw null; } + public double DeltaY { get => throw null; set => throw null; } + public double DeltaZ { get => throw null; set => throw null; } + public WheelEventArgs() => throw null; + } + + namespace Virtualization + { + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.IVirtualizeJsCallbacks` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IVirtualizeJsCallbacks + { + } + + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderDelegate<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.ValueTask> ItemsProviderDelegate(Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderRequest request); + + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderRequest` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ItemsProviderRequest + { + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public int Count { get => throw null; } + public ItemsProviderRequest(int startIndex, int count, System.Threading.CancellationToken cancellationToken) => throw null; + // Stub generator skipped constructor + public int StartIndex { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderResult<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ItemsProviderResult + { + public System.Collections.Generic.IEnumerable Items { get => throw null; } + public ItemsProviderResult(System.Collections.Generic.IEnumerable items, int totalItemCount) => throw null; + // Stub generator skipped constructor + public int TotalItemCount { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.PlaceholderContext` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PlaceholderContext + { + public int Index { get => throw null; } + public PlaceholderContext(int index, float size = default(float)) => throw null; + // Stub generator skipped constructor + public float Size { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Web.Virtualization.Virtualize<>` in `Microsoft.AspNetCore.Components.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Virtualize : Microsoft.AspNetCore.Components.ComponentBase, System.IAsyncDisposable + { + protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ItemContent { get => throw null; set => throw null; } + public float ItemSize { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Items { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.Web.Virtualization.ItemsProviderDelegate ItemsProvider { get => throw null; set => throw null; } + protected override System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) => throw null; + protected override void OnParametersSet() => throw null; + public int OverscanCount { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderFragment Placeholder { get => throw null; set => throw null; } + public System.Threading.Tasks.Task RefreshDataAsync() => throw null; + public Virtualize() => throw null; + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs new file mode 100644 index 000000000000..3423139a4e89 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs @@ -0,0 +1,691 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Components + { + // Generated from `Microsoft.AspNetCore.Components.BindConverter` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class BindConverter + { + public static string FormatValue(string value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(int? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(int value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(float? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(float value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(double? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(double value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Int64? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Int64 value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Int16? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Int16 value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Decimal? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.Decimal value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTimeOffset? value, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTimeOffset? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTimeOffset value, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTimeOffset value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTime? value, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTime? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTime value, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static string FormatValue(System.DateTime value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static object FormatValue(T value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static bool? FormatValue(bool? value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static bool FormatValue(bool value, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static bool TryConvertTo(object obj, System.Globalization.CultureInfo culture, out T value) => throw null; + public static bool TryConvertToBool(object obj, System.Globalization.CultureInfo culture, out bool value) => throw null; + public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime value) => throw null; + public static bool TryConvertToDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime value) => throw null; + public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset value) => throw null; + public static bool TryConvertToDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset value) => throw null; + public static bool TryConvertToDecimal(object obj, System.Globalization.CultureInfo culture, out System.Decimal value) => throw null; + public static bool TryConvertToDouble(object obj, System.Globalization.CultureInfo culture, out double value) => throw null; + public static bool TryConvertToFloat(object obj, System.Globalization.CultureInfo culture, out float value) => throw null; + public static bool TryConvertToInt(object obj, System.Globalization.CultureInfo culture, out int value) => throw null; + public static bool TryConvertToLong(object obj, System.Globalization.CultureInfo culture, out System.Int64 value) => throw null; + public static bool TryConvertToNullableBool(object obj, System.Globalization.CultureInfo culture, out bool? value) => throw null; + public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTime? value) => throw null; + public static bool TryConvertToNullableDateTime(object obj, System.Globalization.CultureInfo culture, out System.DateTime? value) => throw null; + public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, string format, out System.DateTimeOffset? value) => throw null; + public static bool TryConvertToNullableDateTimeOffset(object obj, System.Globalization.CultureInfo culture, out System.DateTimeOffset? value) => throw null; + public static bool TryConvertToNullableDecimal(object obj, System.Globalization.CultureInfo culture, out System.Decimal? value) => throw null; + public static bool TryConvertToNullableDouble(object obj, System.Globalization.CultureInfo culture, out double? value) => throw null; + public static bool TryConvertToNullableFloat(object obj, System.Globalization.CultureInfo culture, out float? value) => throw null; + public static bool TryConvertToNullableInt(object obj, System.Globalization.CultureInfo culture, out int? value) => throw null; + public static bool TryConvertToNullableLong(object obj, System.Globalization.CultureInfo culture, out System.Int64? value) => throw null; + public static bool TryConvertToNullableShort(object obj, System.Globalization.CultureInfo culture, out System.Int16? value) => throw null; + public static bool TryConvertToShort(object obj, System.Globalization.CultureInfo culture, out System.Int16 value) => throw null; + public static bool TryConvertToString(object obj, System.Globalization.CultureInfo culture, out string value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.BindElementAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindElementAttribute : System.Attribute + { + public BindElementAttribute(string element, string suffix, string valueAttribute, string changeAttribute) => throw null; + public string ChangeAttribute { get => throw null; } + public string Element { get => throw null; } + public string Suffix { get => throw null; } + public string ValueAttribute { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.CascadingParameterAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CascadingParameterAttribute : System.Attribute + { + public CascadingParameterAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.CascadingValue<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CascadingValue : Microsoft.AspNetCore.Components.IComponent + { + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) => throw null; + public CascadingValue() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public bool IsFixed { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + public TValue Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ChangeEventArgs` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ChangeEventArgs : System.EventArgs + { + public ChangeEventArgs() => throw null; + public object Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ComponentBase` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ComponentBase : Microsoft.AspNetCore.Components.IHandleEvent, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IComponent + { + void Microsoft.AspNetCore.Components.IComponent.Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) => throw null; + protected virtual void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public ComponentBase() => throw null; + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleEvent.HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem callback, object arg) => throw null; + protected System.Threading.Tasks.Task InvokeAsync(System.Func workItem) => throw null; + protected System.Threading.Tasks.Task InvokeAsync(System.Action workItem) => throw null; + protected virtual void OnAfterRender(bool firstRender) => throw null; + protected virtual System.Threading.Tasks.Task OnAfterRenderAsync(bool firstRender) => throw null; + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() => throw null; + protected virtual void OnInitialized() => throw null; + protected virtual System.Threading.Tasks.Task OnInitializedAsync() => throw null; + protected virtual void OnParametersSet() => throw null; + protected virtual System.Threading.Tasks.Task OnParametersSetAsync() => throw null; + public virtual System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + protected virtual bool ShouldRender() => throw null; + protected void StateHasChanged() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Dispatcher` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Dispatcher + { + public void AssertAccess() => throw null; + public abstract bool CheckAccess(); + public static Microsoft.AspNetCore.Components.Dispatcher CreateDefault() => throw null; + protected Dispatcher() => throw null; + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func> workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Func workItem); + public abstract System.Threading.Tasks.Task InvokeAsync(System.Action workItem); + protected void OnUnhandledException(System.UnhandledExceptionEventArgs e) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.ElementReference` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ElementReference + { + public Microsoft.AspNetCore.Components.ElementReferenceContext Context { get => throw null; } + public ElementReference(string id, Microsoft.AspNetCore.Components.ElementReferenceContext context) => throw null; + public ElementReference(string id) => throw null; + // Stub generator skipped constructor + public string Id { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ElementReferenceContext` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ElementReferenceContext + { + protected ElementReferenceContext() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallback` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct EventCallback + { + public static Microsoft.AspNetCore.Components.EventCallback Empty; + public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) => throw null; + // Stub generator skipped constructor + public static Microsoft.AspNetCore.Components.EventCallbackFactory Factory; + public bool HasDelegate { get => throw null; } + public System.Threading.Tasks.Task InvokeAsync(object arg) => throw null; + public System.Threading.Tasks.Task InvokeAsync() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallback<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct EventCallback + { + public static Microsoft.AspNetCore.Components.EventCallback Empty; + public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) => throw null; + // Stub generator skipped constructor + public bool HasDelegate { get => throw null; } + public System.Threading.Tasks.Task InvokeAsync(TValue arg) => throw null; + public System.Threading.Tasks.Task InvokeAsync() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallbackFactory` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventCallbackFactory + { + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Func callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, System.Action callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback Create(object receiver, Microsoft.AspNetCore.Components.EventCallback callback) => throw null; + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Func callback, TValue value) => throw null; + public Microsoft.AspNetCore.Components.EventCallback CreateInferred(object receiver, System.Action callback, TValue value) => throw null; + public EventCallbackFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallbackFactoryBinderExtensions` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EventCallbackFactoryBinderExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, T existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, string existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, int existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, float existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, double existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, bool existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Int64? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Int64 existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Int16? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Int16 existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Decimal? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.Decimal existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTimeOffset existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime? existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, string format, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateBinder(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action setter, System.DateTime existingValue, System.Globalization.CultureInfo culture = default(System.Globalization.CultureInfo)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallbackFactoryEventArgsExtensions` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EventCallbackFactoryEventArgsExtensions + { + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Func callback) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback Create(this Microsoft.AspNetCore.Components.EventCallbackFactory factory, object receiver, System.Action callback) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventCallbackWorkItem` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct EventCallbackWorkItem + { + public static Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty; + public EventCallbackWorkItem(System.MulticastDelegate @delegate) => throw null; + // Stub generator skipped constructor + public System.Threading.Tasks.Task InvokeAsync(object arg) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.EventHandlerAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventHandlerAttribute : System.Attribute + { + public string AttributeName { get => throw null; } + public bool EnablePreventDefault { get => throw null; } + public bool EnableStopPropagation { get => throw null; } + public System.Type EventArgsType { get => throw null; } + public EventHandlerAttribute(string attributeName, System.Type eventArgsType, bool enableStopPropagation, bool enablePreventDefault) => throw null; + public EventHandlerAttribute(string attributeName, System.Type eventArgsType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.ICascadingValueComponent` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface ICascadingValueComponent + { + } + + // Generated from `Microsoft.AspNetCore.Components.IComponent` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IComponent + { + void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle); + System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters); + } + + // Generated from `Microsoft.AspNetCore.Components.IComponentActivator` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IComponentActivator + { + Microsoft.AspNetCore.Components.IComponent CreateInstance(System.Type componentType); + } + + // Generated from `Microsoft.AspNetCore.Components.IEventCallback` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IEventCallback + { + bool HasDelegate { get; } + } + + // Generated from `Microsoft.AspNetCore.Components.IHandleAfterRender` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHandleAfterRender + { + System.Threading.Tasks.Task OnAfterRenderAsync(); + } + + // Generated from `Microsoft.AspNetCore.Components.IHandleEvent` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHandleEvent + { + System.Threading.Tasks.Task HandleEventAsync(Microsoft.AspNetCore.Components.EventCallbackWorkItem item, object arg); + } + + // Generated from `Microsoft.AspNetCore.Components.InjectAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InjectAttribute : System.Attribute + { + public InjectAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.LayoutAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LayoutAttribute : System.Attribute + { + public LayoutAttribute(System.Type layoutType) => throw null; + public System.Type LayoutType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.LayoutComponentBase` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class LayoutComponentBase : Microsoft.AspNetCore.Components.ComponentBase + { + public Microsoft.AspNetCore.Components.RenderFragment Body { get => throw null; set => throw null; } + protected LayoutComponentBase() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.LayoutView` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LayoutView : Microsoft.AspNetCore.Components.IComponent + { + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) => throw null; + public Microsoft.AspNetCore.Components.RenderFragment ChildContent { get => throw null; set => throw null; } + public System.Type Layout { get => throw null; set => throw null; } + public LayoutView() => throw null; + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.LocationChangeException` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocationChangeException : System.Exception + { + public LocationChangeException(string message, System.Exception innerException) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.MarkupString` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct MarkupString + { + public MarkupString(string value) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + public string Value { get => throw null; } + // Stub generator skipped operator: explicit conversion + } + + // Generated from `Microsoft.AspNetCore.Components.NavigationException` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NavigationException : System.Exception + { + public string Location { get => throw null; } + public NavigationException(string uri) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.NavigationManager` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class NavigationManager + { + public string BaseUri { get => throw null; set => throw null; } + protected virtual void EnsureInitialized() => throw null; + protected void Initialize(string baseUri, string uri) => throw null; + public event System.EventHandler LocationChanged; + public void NavigateTo(string uri, bool forceLoad = default(bool)) => throw null; + protected abstract void NavigateToCore(string uri, bool forceLoad); + protected NavigationManager() => throw null; + protected void NotifyLocationChanged(bool isInterceptedLink) => throw null; + public System.Uri ToAbsoluteUri(string relativeUri) => throw null; + public string ToBaseRelativePath(string uri) => throw null; + public string Uri { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.OwningComponentBase` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class OwningComponentBase : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable + { + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected bool IsDisposed { get => throw null; } + protected OwningComponentBase() => throw null; + protected System.IServiceProvider ScopedServices { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.OwningComponentBase<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class OwningComponentBase : Microsoft.AspNetCore.Components.OwningComponentBase, System.IDisposable + { + protected OwningComponentBase() => throw null; + protected TService Service { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ParameterAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ParameterAttribute : System.Attribute + { + public bool CaptureUnmatchedValues { get => throw null; set => throw null; } + public ParameterAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.ParameterValue` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ParameterValue + { + public bool Cascading { get => throw null; } + public string Name { get => throw null; } + // Stub generator skipped constructor + public object Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.ParameterView` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ParameterView + { + public static Microsoft.AspNetCore.Components.ParameterView Empty { get => throw null; } + // Generated from `Microsoft.AspNetCore.Components.ParameterView.Enumerator` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator + { + public Microsoft.AspNetCore.Components.ParameterValue Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public static Microsoft.AspNetCore.Components.ParameterView FromDictionary(System.Collections.Generic.IDictionary parameters) => throw null; + public Microsoft.AspNetCore.Components.ParameterView.Enumerator GetEnumerator() => throw null; + public TValue GetValueOrDefault(string parameterName, TValue defaultValue) => throw null; + public TValue GetValueOrDefault(string parameterName) => throw null; + // Stub generator skipped constructor + public void SetParameterProperties(object target) => throw null; + public System.Collections.Generic.IReadOnlyDictionary ToDictionary() => throw null; + public bool TryGetValue(string parameterName, out TValue result) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.RenderFragment` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate void RenderFragment(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder); + + // Generated from `Microsoft.AspNetCore.Components.RenderFragment<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate Microsoft.AspNetCore.Components.RenderFragment RenderFragment(TValue value); + + // Generated from `Microsoft.AspNetCore.Components.RenderHandle` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RenderHandle + { + public Microsoft.AspNetCore.Components.Dispatcher Dispatcher { get => throw null; } + public bool IsInitialized { get => throw null; } + public void Render(Microsoft.AspNetCore.Components.RenderFragment renderFragment) => throw null; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Components.RouteAttribute` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteAttribute : System.Attribute + { + public RouteAttribute(string template) => throw null; + public string Template { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.RouteData` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteData + { + public System.Type PageType { get => throw null; } + public RouteData(System.Type pageType, System.Collections.Generic.IReadOnlyDictionary routeValues) => throw null; + public System.Collections.Generic.IReadOnlyDictionary RouteValues { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.RouteView` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteView : Microsoft.AspNetCore.Components.IComponent + { + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) => throw null; + public System.Type DefaultLayout { get => throw null; set => throw null; } + protected virtual void Render(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder builder) => throw null; + public Microsoft.AspNetCore.Components.RouteData RouteData { get => throw null; set => throw null; } + public RouteView() => throw null; + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + } + + namespace CompilerServices + { + // Generated from `Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RuntimeHelpers + { + public static Microsoft.AspNetCore.Components.EventCallback CreateInferredEventCallback(object receiver, System.Func callback, T value) => throw null; + public static Microsoft.AspNetCore.Components.EventCallback CreateInferredEventCallback(object receiver, System.Action callback, T value) => throw null; + public static T TypeCheck(T value) => throw null; + } + + } + namespace RenderTree + { + // Generated from `Microsoft.AspNetCore.Components.RenderTree.ArrayBuilderSegment<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ArrayBuilderSegment : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public T[] Array { get => throw null; } + // Stub generator skipped constructor + public int Count { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public T this[int index] { get => throw null; } + public int Offset { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.ArrayRange<>` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ArrayRange + { + public T[] Array; + public ArrayRange(T[] array, int count) => throw null; + // Stub generator skipped constructor + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange Clone() => throw null; + public int Count; + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventFieldInfo + { + public int ComponentId { get => throw null; set => throw null; } + public EventFieldInfo() => throw null; + public object FieldValue { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderBatch` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RenderBatch + { + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedComponentIDs { get => throw null; } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange DisposedEventHandlerIDs { get => throw null; } + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange ReferenceFrames { get => throw null; } + // Stub generator skipped constructor + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange UpdatedComponents { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiff` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RenderTreeDiff + { + public int ComponentId; + public Microsoft.AspNetCore.Components.RenderTree.ArrayBuilderSegment Edits; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderTreeEdit` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RenderTreeEdit + { + public int MoveToSiblingIndex; + public int ReferenceFrameIndex; + public string RemovedAttributeName; + // Stub generator skipped constructor + public int SiblingIndex; + public Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType Type; + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RenderTreeEditType + { + PermutationListEnd, + PermutationListEntry, + PrependFrame, + RemoveAttribute, + RemoveFrame, + // Stub generator skipped constructor + SetAttribute, + StepIn, + StepOut, + UpdateMarkup, + UpdateText, + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RenderTreeFrame + { + public System.UInt64 AttributeEventHandlerId { get => throw null; } + public string AttributeEventUpdatesAttributeName { get => throw null; } + public string AttributeName { get => throw null; } + public object AttributeValue { get => throw null; } + public Microsoft.AspNetCore.Components.IComponent Component { get => throw null; } + public int ComponentId { get => throw null; } + public object ComponentKey { get => throw null; } + public System.Action ComponentReferenceCaptureAction { get => throw null; } + public int ComponentReferenceCaptureParentFrameIndex { get => throw null; } + public int ComponentSubtreeLength { get => throw null; } + public System.Type ComponentType { get => throw null; } + public object ElementKey { get => throw null; } + public string ElementName { get => throw null; } + public System.Action ElementReferenceCaptureAction { get => throw null; } + public string ElementReferenceCaptureId { get => throw null; } + public int ElementSubtreeLength { get => throw null; } + public Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType FrameType { get => throw null; } + public string MarkupContent { get => throw null; } + public int RegionSubtreeLength { get => throw null; } + // Stub generator skipped constructor + public int Sequence { get => throw null; } + public string TextContent { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RenderTreeFrameType + { + Attribute, + Component, + ComponentReferenceCapture, + Element, + ElementReferenceCapture, + Markup, + None, + Region, + // Stub generator skipped constructor + Text, + } + + // Generated from `Microsoft.AspNetCore.Components.RenderTree.Renderer` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Renderer : System.IDisposable, System.IAsyncDisposable + { + protected internal int AssignRootComponentId(Microsoft.AspNetCore.Components.IComponent component) => throw null; + public virtual System.Threading.Tasks.Task DispatchEventAsync(System.UInt64 eventHandlerId, Microsoft.AspNetCore.Components.RenderTree.EventFieldInfo fieldInfo, System.EventArgs eventArgs) => throw null; + public abstract Microsoft.AspNetCore.Components.Dispatcher Dispatcher { get; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + protected internal Microsoft.AspNetCore.Components.ElementReferenceContext ElementReferenceContext { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetCurrentRenderTreeFrames(int componentId) => throw null; + protected abstract void HandleException(System.Exception exception); + protected Microsoft.AspNetCore.Components.IComponent InstantiateComponent(System.Type componentType) => throw null; + protected virtual void ProcessPendingRender() => throw null; + protected System.Threading.Tasks.Task RenderRootComponentAsync(int componentId, Microsoft.AspNetCore.Components.ParameterView initialParameters) => throw null; + protected System.Threading.Tasks.Task RenderRootComponentAsync(int componentId) => throw null; + public Renderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Components.IComponentActivator componentActivator) => throw null; + public Renderer(System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public event System.UnhandledExceptionEventHandler UnhandledSynchronizationException; + protected abstract System.Threading.Tasks.Task UpdateDisplayAsync(Microsoft.AspNetCore.Components.RenderTree.RenderBatch renderBatch); + } + + } + namespace Rendering + { + // Generated from `Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RenderTreeBuilder : System.IDisposable + { + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) => throw null; + public void AddAttribute(int sequence, string name, string value) => throw null; + public void AddAttribute(int sequence, string name, object value) => throw null; + public void AddAttribute(int sequence, string name, bool value) => throw null; + public void AddAttribute(int sequence, string name, System.MulticastDelegate value) => throw null; + public void AddAttribute(int sequence, string name, Microsoft.AspNetCore.Components.EventCallback value) => throw null; + public void AddAttribute(int sequence, string name) => throw null; + public void AddAttribute(int sequence, Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame frame) => throw null; + public void AddComponentReferenceCapture(int sequence, System.Action componentReferenceCaptureAction) => throw null; + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment, TValue value) => throw null; + public void AddContent(int sequence, string textContent) => throw null; + public void AddContent(int sequence, object textContent) => throw null; + public void AddContent(int sequence, Microsoft.AspNetCore.Components.RenderFragment fragment) => throw null; + public void AddContent(int sequence, Microsoft.AspNetCore.Components.MarkupString markupContent) => throw null; + public void AddElementReferenceCapture(int sequence, System.Action elementReferenceCaptureAction) => throw null; + public void AddMarkupContent(int sequence, string markupContent) => throw null; + public void AddMultipleAttributes(int sequence, System.Collections.Generic.IEnumerable> attributes) => throw null; + public void Clear() => throw null; + public void CloseComponent() => throw null; + public void CloseElement() => throw null; + public void CloseRegion() => throw null; + void System.IDisposable.Dispose() => throw null; + public Microsoft.AspNetCore.Components.RenderTree.ArrayRange GetFrames() => throw null; + public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent => throw null; + public void OpenComponent(int sequence, System.Type componentType) => throw null; + public void OpenElement(int sequence, string elementName) => throw null; + public void OpenRegion(int sequence) => throw null; + public RenderTreeBuilder() => throw null; + public void SetKey(object value) => throw null; + public void SetUpdatesAttributeName(string updatesAttributeName) => throw null; + } + + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Components.Routing.IHostEnvironmentNavigationManager` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostEnvironmentNavigationManager + { + void Initialize(string baseUri, string uri); + } + + // Generated from `Microsoft.AspNetCore.Components.Routing.INavigationInterception` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface INavigationInterception + { + System.Threading.Tasks.Task EnableNavigationInterceptionAsync(); + } + + // Generated from `Microsoft.AspNetCore.Components.Routing.LocationChangedEventArgs` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocationChangedEventArgs : System.EventArgs + { + public bool IsNavigationIntercepted { get => throw null; } + public string Location { get => throw null; } + public LocationChangedEventArgs(string location, bool isNavigationIntercepted) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Components.Routing.NavigationContext` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NavigationContext + { + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Components.Routing.Router` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Router : System.IDisposable, Microsoft.AspNetCore.Components.IHandleAfterRender, Microsoft.AspNetCore.Components.IComponent + { + public System.Collections.Generic.IEnumerable AdditionalAssemblies { get => throw null; set => throw null; } + public System.Reflection.Assembly AppAssembly { get => throw null; set => throw null; } + public void Attach(Microsoft.AspNetCore.Components.RenderHandle renderHandle) => throw null; + public void Dispose() => throw null; + public Microsoft.AspNetCore.Components.RenderFragment Found { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderFragment Navigating { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Components.RenderFragment NotFound { get => throw null; set => throw null; } + System.Threading.Tasks.Task Microsoft.AspNetCore.Components.IHandleAfterRender.OnAfterRenderAsync() => throw null; + public Microsoft.AspNetCore.Components.EventCallback OnNavigateAsync { get => throw null; set => throw null; } + public Router() => throw null; + public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs new file mode 100644 index 000000000000..fb80daef77ed --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs @@ -0,0 +1,308 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Connections + { + // Generated from `Microsoft.AspNetCore.Connections.AddressInUseException` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AddressInUseException : System.InvalidOperationException + { + public AddressInUseException(string message, System.Exception inner) => throw null; + public AddressInUseException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Connections.BaseConnectionContext` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class BaseConnectionContext : System.IAsyncDisposable + { + public abstract void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason); + public abstract void Abort(); + protected BaseConnectionContext() => throw null; + public virtual System.Threading.CancellationToken ConnectionClosed { get => throw null; set => throw null; } + public abstract string ConnectionId { get; set; } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; } + public abstract System.Collections.Generic.IDictionary Items { get; set; } + public virtual System.Net.EndPoint LocalEndPoint { get => throw null; set => throw null; } + public virtual System.Net.EndPoint RemoteEndPoint { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionAbortedException` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionAbortedException : System.OperationCanceledException + { + public ConnectionAbortedException(string message, System.Exception inner) => throw null; + public ConnectionAbortedException(string message) => throw null; + public ConnectionAbortedException() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionBuilder` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionBuilder : Microsoft.AspNetCore.Connections.IConnectionBuilder + { + public System.IServiceProvider ApplicationServices { get => throw null; } + public Microsoft.AspNetCore.Connections.ConnectionDelegate Build() => throw null; + public ConnectionBuilder(System.IServiceProvider applicationServices) => throw null; + public Microsoft.AspNetCore.Connections.IConnectionBuilder Use(System.Func middleware) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionBuilderExtensions` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConnectionBuilderExtensions + { + public static Microsoft.AspNetCore.Connections.IConnectionBuilder Run(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func middleware) => throw null; + public static Microsoft.AspNetCore.Connections.IConnectionBuilder Use(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder, System.Func, System.Threading.Tasks.Task> middleware) => throw null; + public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseConnectionHandler(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler => throw null; + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionContext` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConnectionContext : Microsoft.AspNetCore.Connections.BaseConnectionContext, System.IAsyncDisposable + { + public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) => throw null; + public override void Abort() => throw null; + protected ConnectionContext() => throw null; + public abstract System.IO.Pipelines.IDuplexPipe Transport { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionDelegate` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task ConnectionDelegate(Microsoft.AspNetCore.Connections.ConnectionContext connection); + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionHandler` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConnectionHandler + { + protected ConnectionHandler() => throw null; + public abstract System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection); + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionItems` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionItems : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.Generic.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + public ConnectionItems(System.Collections.Generic.IDictionary items) => throw null; + public ConnectionItems() => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.ContainsKey(object key) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + int System.Collections.Generic.ICollection>.Count { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + object System.Collections.Generic.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Items { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + bool System.Collections.Generic.IDictionary.Remove(object key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.TryGetValue(object key, out object value) => throw null; + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Connections.ConnectionResetException` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionResetException : System.IO.IOException + { + public ConnectionResetException(string message, System.Exception inner) => throw null; + public ConnectionResetException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Connections.DefaultConnectionContext` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionEndPointFeature + { + public override void Abort(Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) => throw null; + public System.IO.Pipelines.IDuplexPipe Application { get => throw null; set => throw null; } + public override System.Threading.CancellationToken ConnectionClosed { get => throw null; set => throw null; } + public override string ConnectionId { get => throw null; set => throw null; } + public DefaultConnectionContext(string id, System.IO.Pipelines.IDuplexPipe transport, System.IO.Pipelines.IDuplexPipe application) => throw null; + public DefaultConnectionContext(string id) => throw null; + public DefaultConnectionContext() => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get => throw null; } + public override System.Collections.Generic.IDictionary Items { get => throw null; set => throw null; } + public override System.Net.EndPoint LocalEndPoint { get => throw null; set => throw null; } + public override System.Net.EndPoint RemoteEndPoint { get => throw null; set => throw null; } + public override System.IO.Pipelines.IDuplexPipe Transport { get => throw null; set => throw null; } + public System.Security.Claims.ClaimsPrincipal User { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Connections.FileHandleEndPoint` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileHandleEndPoint : System.Net.EndPoint + { + public System.UInt64 FileHandle { get => throw null; } + public FileHandleEndPoint(System.UInt64 fileHandle, Microsoft.AspNetCore.Connections.FileHandleType fileHandleType) => throw null; + public Microsoft.AspNetCore.Connections.FileHandleType FileHandleType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Connections.FileHandleType` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum FileHandleType + { + Auto, + // Stub generator skipped constructor + Pipe, + Tcp, + } + + // Generated from `Microsoft.AspNetCore.Connections.IConnectionBuilder` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionBuilder + { + System.IServiceProvider ApplicationServices { get; } + Microsoft.AspNetCore.Connections.ConnectionDelegate Build(); + Microsoft.AspNetCore.Connections.IConnectionBuilder Use(System.Func middleware); + } + + // Generated from `Microsoft.AspNetCore.Connections.IConnectionFactory` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionFactory + { + System.Threading.Tasks.ValueTask ConnectAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Connections.IConnectionListener` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionListener : System.IAsyncDisposable + { + System.Threading.Tasks.ValueTask AcceptAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Net.EndPoint EndPoint { get; } + System.Threading.Tasks.ValueTask UnbindAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Connections.IConnectionListenerFactory` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionListenerFactory + { + System.Threading.Tasks.ValueTask BindAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Connections.TransferFormat` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum TransferFormat + { + Binary, + Text, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Connections.UriEndPoint` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UriEndPoint : System.Net.EndPoint + { + public override string ToString() => throw null; + public System.Uri Uri { get => throw null; } + public UriEndPoint(System.Uri uri) => throw null; + } + + namespace Experimental + { + // Generated from `Microsoft.AspNetCore.Connections.Experimental.IMultiplexedConnectionBuilder` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IMultiplexedConnectionBuilder + { + System.IServiceProvider ApplicationServices { get; } + } + + } + namespace Features + { + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionCompleteFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionCompleteFeature + { + void OnCompleted(System.Func callback, object state); + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionEndPointFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionEndPointFeature + { + System.Net.EndPoint LocalEndPoint { get; set; } + System.Net.EndPoint RemoteEndPoint { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionHeartbeatFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionHeartbeatFeature + { + void OnHeartbeat(System.Action action, object state); + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionIdFeature + { + string ConnectionId { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionInherentKeepAliveFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionInherentKeepAliveFeature + { + bool HasInherentKeepAlive { get; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionItemsFeature + { + System.Collections.Generic.IDictionary Items { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionLifetimeFeature + { + void Abort(); + System.Threading.CancellationToken ConnectionClosed { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeNotificationFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionLifetimeNotificationFeature + { + System.Threading.CancellationToken ConnectionClosedRequested { get; set; } + void RequestClose(); + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionTransportFeature + { + System.IO.Pipelines.IDuplexPipe Transport { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionUserFeature + { + System.Security.Claims.ClaimsPrincipal User { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IMemoryPoolFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMemoryPoolFeature + { + System.Buffers.MemoryPool MemoryPool { get; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IProtocolErrorCodeFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IProtocolErrorCodeFeature + { + System.Int64 Error { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IStreamDirectionFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStreamDirectionFeature + { + bool CanRead { get; } + bool CanWrite { get; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.IStreamIdFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStreamIdFeature + { + System.Int64 StreamId { get; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.ITlsHandshakeFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITlsHandshakeFeature + { + System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get; } + int CipherStrength { get; } + System.Security.Authentication.HashAlgorithmType HashAlgorithm { get; } + int HashStrength { get; } + System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get; } + int KeyExchangeStrength { get; } + System.Security.Authentication.SslProtocols Protocol { get; } + } + + // Generated from `Microsoft.AspNetCore.Connections.Features.ITransferFormatFeature` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITransferFormatFeature + { + Microsoft.AspNetCore.Connections.TransferFormat ActiveFormat { get; set; } + Microsoft.AspNetCore.Connections.TransferFormat SupportedFormats { get; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs new file mode 100644 index 000000000000..b8c919788926 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs @@ -0,0 +1,89 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.CookiePolicyAppBuilderExtensions` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CookiePolicyAppBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookiePolicy(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.CookiePolicyOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookiePolicy(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.CookiePolicyOptions` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookiePolicyOptions + { + public System.Func CheckConsentNeeded { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieBuilder ConsentCookie { get => throw null; set => throw null; } + public CookiePolicyOptions() => throw null; + public Microsoft.AspNetCore.CookiePolicy.HttpOnlyPolicy HttpOnly { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.SameSiteMode MinimumSameSitePolicy { get => throw null; set => throw null; } + public System.Action OnAppendCookie { get => throw null; set => throw null; } + public System.Action OnDeleteCookie { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieSecurePolicy Secure { get => throw null; set => throw null; } + } + + } + namespace CookiePolicy + { + // Generated from `Microsoft.AspNetCore.CookiePolicy.AppendCookieContext` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AppendCookieContext + { + public AppendCookieContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.CookieOptions options, string name, string value) => throw null; + public Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; } + public string CookieName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieOptions CookieOptions { get => throw null; } + public string CookieValue { get => throw null; set => throw null; } + public bool HasConsent { get => throw null; } + public bool IsConsentNeeded { get => throw null; } + public bool IssueCookie { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookiePolicyMiddleware + { + public CookiePolicyMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory factory) => throw null; + public CookiePolicyMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public Microsoft.AspNetCore.Builder.CookiePolicyOptions Options { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.CookiePolicy.DeleteCookieContext` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DeleteCookieContext + { + public Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; } + public string CookieName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.CookieOptions CookieOptions { get => throw null; } + public DeleteCookieContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.CookieOptions options, string name) => throw null; + public bool HasConsent { get => throw null; } + public bool IsConsentNeeded { get => throw null; } + public bool IssueCookie { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.CookiePolicy.HttpOnlyPolicy` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HttpOnlyPolicy + { + Always, + // Stub generator skipped constructor + None, + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.CookiePolicyServiceCollectionExtensions` in `Microsoft.AspNetCore.CookiePolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CookiePolicyServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCookiePolicy(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCookiePolicy(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs new file mode 100644 index 000000000000..cc9188bb3d1e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs @@ -0,0 +1,204 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.CorsEndpointConventionBuilderExtensions` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CorsEndpointConventionBuilderExtensions + { + public static TBuilder RequireCors(this TBuilder builder, string policyName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder RequireCors(this TBuilder builder, System.Action configurePolicy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.CorsMiddlewareExtensions` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CorsMiddlewareExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string policyName) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action configurePolicy) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCors(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + } + namespace Cors + { + // Generated from `Microsoft.AspNetCore.Cors.CorsPolicyMetadata` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsPolicyMetadata : Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyMetadata, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + public CorsPolicyMetadata(Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy Policy { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Cors.DisableCorsAttribute` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DisableCorsAttribute : System.Attribute, Microsoft.AspNetCore.Cors.Infrastructure.IDisableCorsAttribute, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + public DisableCorsAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.EnableCorsAttribute` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnableCorsAttribute : System.Attribute, Microsoft.AspNetCore.Cors.Infrastructure.IEnableCorsAttribute, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + public EnableCorsAttribute(string policyName) => throw null; + public EnableCorsAttribute() => throw null; + public string PolicyName { get => throw null; set => throw null; } + } + + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsConstants` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CorsConstants + { + public static string AccessControlAllowCredentials; + public static string AccessControlAllowHeaders; + public static string AccessControlAllowMethods; + public static string AccessControlAllowOrigin; + public static string AccessControlExposeHeaders; + public static string AccessControlMaxAge; + public static string AccessControlRequestHeaders; + public static string AccessControlRequestMethod; + public static string AnyOrigin; + public static string Origin; + public static string PreflightHttpMethod; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsMiddleware + { + public CorsMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, string policyName) => throw null; + public CorsMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public CorsMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider corsPolicyProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsOptions + { + public void AddDefaultPolicy(System.Action configurePolicy) => throw null; + public void AddDefaultPolicy(Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; + public void AddPolicy(string name, System.Action configurePolicy) => throw null; + public void AddPolicy(string name, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; + public CorsOptions() => throw null; + public string DefaultPolicyName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy GetPolicy(string name) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsPolicy + { + public bool AllowAnyHeader { get => throw null; } + public bool AllowAnyMethod { get => throw null; } + public bool AllowAnyOrigin { get => throw null; } + public CorsPolicy() => throw null; + public System.Collections.Generic.IList ExposedHeaders { get => throw null; } + public System.Collections.Generic.IList Headers { get => throw null; } + public System.Func IsOriginAllowed { get => throw null; set => throw null; } + public System.Collections.Generic.IList Methods { get => throw null; } + public System.Collections.Generic.IList Origins { get => throw null; } + public System.TimeSpan? PreflightMaxAge { get => throw null; set => throw null; } + public bool SupportsCredentials { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsPolicyBuilder + { + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder AllowAnyHeader() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder AllowAnyMethod() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder AllowAnyOrigin() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder AllowCredentials() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy Build() => throw null; + public CorsPolicyBuilder(params string[] origins) => throw null; + public CorsPolicyBuilder(Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder DisallowCredentials() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder SetIsOriginAllowed(System.Func isOriginAllowed) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder SetIsOriginAllowedToAllowWildcardSubdomains() => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder SetPreflightMaxAge(System.TimeSpan preflightMaxAge) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithExposedHeaders(params string[] exposedHeaders) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithHeaders(params string[] headers) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithMethods(params string[] methods) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithOrigins(params string[] origins) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsResult` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsResult + { + public System.Collections.Generic.IList AllowedExposedHeaders { get => throw null; } + public System.Collections.Generic.IList AllowedHeaders { get => throw null; } + public System.Collections.Generic.IList AllowedMethods { get => throw null; } + public string AllowedOrigin { get => throw null; set => throw null; } + public CorsResult() => throw null; + public bool IsOriginAllowed { get => throw null; set => throw null; } + public bool IsPreflightRequest { get => throw null; set => throw null; } + public System.TimeSpan? PreflightMaxAge { get => throw null; set => throw null; } + public bool SupportsCredentials { get => throw null; set => throw null; } + public override string ToString() => throw null; + public bool VaryByOrigin { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.CorsService` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsService : Microsoft.AspNetCore.Cors.Infrastructure.ICorsService + { + public virtual void ApplyResult(Microsoft.AspNetCore.Cors.Infrastructure.CorsResult result, Microsoft.AspNetCore.Http.HttpResponse response) => throw null; + public CorsService(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsResult EvaluatePolicy(Microsoft.AspNetCore.Http.HttpContext context, string policyName) => throw null; + public Microsoft.AspNetCore.Cors.Infrastructure.CorsResult EvaluatePolicy(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; + public virtual void EvaluatePreflightRequest(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy, Microsoft.AspNetCore.Cors.Infrastructure.CorsResult result) => throw null; + public virtual void EvaluateRequest(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy, Microsoft.AspNetCore.Cors.Infrastructure.CorsResult result) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.DefaultCorsPolicyProvider` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultCorsPolicyProvider : Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider + { + public DefaultCorsPolicyProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task GetPolicyAsync(Microsoft.AspNetCore.Http.HttpContext context, string policyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyMetadata` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICorsPolicyMetadata : Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy Policy { get; } + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICorsPolicyProvider + { + System.Threading.Tasks.Task GetPolicyAsync(Microsoft.AspNetCore.Http.HttpContext context, string policyName); + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.ICorsService` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICorsService + { + void ApplyResult(Microsoft.AspNetCore.Cors.Infrastructure.CorsResult result, Microsoft.AspNetCore.Http.HttpResponse response); + Microsoft.AspNetCore.Cors.Infrastructure.CorsResult EvaluatePolicy(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy); + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.IDisableCorsAttribute` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDisableCorsAttribute : Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.IEnableCorsAttribute` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEnableCorsAttribute : Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata + { + string PolicyName { get; set; } + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.CorsServiceCollectionExtensions` in `Microsoft.AspNetCore.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CorsServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCors(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCors(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs new file mode 100644 index 000000000000..2922e1c65be6 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs @@ -0,0 +1,29 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Cryptography + { + namespace KeyDerivation + { + // Generated from `Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivation` in `Microsoft.AspNetCore.Cryptography.KeyDerivation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class KeyDerivation + { + public static System.Byte[] Pbkdf2(string password, System.Byte[] salt, Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf prf, int iterationCount, int numBytesRequested) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf` in `Microsoft.AspNetCore.Cryptography.KeyDerivation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum KeyDerivationPrf + { + HMACSHA1, + HMACSHA256, + HMACSHA512, + // Stub generator skipped constructor + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs new file mode 100644 index 000000000000..8fb9813a64c3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs @@ -0,0 +1,45 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace DataProtection + { + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionCommonExtensions` in `Microsoft.AspNetCore.DataProtection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionCommonExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, string purpose, params string[] subPurposes) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(this Microsoft.AspNetCore.DataProtection.IDataProtectionProvider provider, System.Collections.Generic.IEnumerable purposes) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider GetDataProtectionProvider(this System.IServiceProvider services) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtector GetDataProtector(this System.IServiceProvider services, string purpose, params string[] subPurposes) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtector GetDataProtector(this System.IServiceProvider services, System.Collections.Generic.IEnumerable purposes) => throw null; + public static string Protect(this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string plaintext) => throw null; + public static string Unprotect(this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string protectedData) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.IDataProtectionProvider` in `Microsoft.AspNetCore.DataProtection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDataProtectionProvider + { + Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(string purpose); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.IDataProtector` in `Microsoft.AspNetCore.DataProtection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + System.Byte[] Protect(System.Byte[] plaintext); + System.Byte[] Unprotect(System.Byte[] protectedData); + } + + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator` in `Microsoft.AspNetCore.DataProtection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationDiscriminator + { + string Discriminator { get; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs new file mode 100644 index 000000000000..d58c26b7626a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs @@ -0,0 +1,40 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace DataProtection + { + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionAdvancedExtensions` in `Microsoft.AspNetCore.DataProtection.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionAdvancedExtensions + { + public static string Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, System.TimeSpan lifetime) => throw null; + public static string Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string plaintext, System.DateTimeOffset expiration) => throw null; + public static System.Byte[] Protect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, System.Byte[] plaintext, System.TimeSpan lifetime) => throw null; + public static Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector ToTimeLimitedDataProtector(this Microsoft.AspNetCore.DataProtection.IDataProtector protector) => throw null; + public static string Unprotect(this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string protectedData, out System.DateTimeOffset expiration) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionProvider` in `Microsoft.AspNetCore.DataProtection.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionProvider + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(string applicationName, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(string applicationName) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Action setupAction, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory, System.Action setupAction) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionProvider Create(System.IO.DirectoryInfo keyDirectory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector` in `Microsoft.AspNetCore.DataProtection.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITimeLimitedDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtector, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector CreateProtector(string purpose); + System.Byte[] Protect(System.Byte[] plaintext, System.DateTimeOffset expiration); + System.Byte[] Unprotect(System.Byte[] protectedData, out System.DateTimeOffset expiration); + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs new file mode 100644 index 000000000000..842803c672fe --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs @@ -0,0 +1,572 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace DataProtection + { + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionBuilderExtensions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionBuilderExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) where TImplementation : class, Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyEscrowSink => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func factory) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyEscrowSink(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyEscrowSink sink) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddKeyManagementOptions(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder DisableAutomaticKeyGeneration(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToFileSystem(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.IO.DirectoryInfo directory) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToRegistry(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.Win32.RegistryKey registryKey) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string thumbprint) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapi(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, bool protectToLocalMachine) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapi(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string protectionDescriptorRule, Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags flags) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithDpapiNG(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetApplicationName(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string applicationName) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetDefaultKeyLifetime(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.TimeSpan lifetime) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UnprotectKeysWithAnyCertificate(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, params System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorConfiguration configuration) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorConfiguration configuration) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorConfiguration configuration) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseCustomCryptographicAlgorithms(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorConfiguration configuration) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder UseEphemeralDataProtectionProvider(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionOptions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataProtectionOptions + { + public string ApplicationDiscriminator { get => throw null; set => throw null; } + public DataProtectionOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.DataProtectionUtilityExtensions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionUtilityExtensions + { + public static string GetApplicationUniqueIdentifier(this System.IServiceProvider services) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.EphemeralDataProtectionProvider` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EphemeralDataProtectionProvider : Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + public Microsoft.AspNetCore.DataProtection.IDataProtector CreateProtector(string purpose) => throw null; + public EphemeralDataProtectionProvider(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public EphemeralDataProtectionProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDataProtectionBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.IPersistedDataProtector` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPersistedDataProtector : Microsoft.AspNetCore.DataProtection.IDataProtector, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider + { + System.Byte[] DangerousUnprotect(System.Byte[] protectedData, bool ignoreRevocationErrors, out bool requiresMigration, out bool wasRevoked); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.ISecret` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISecret : System.IDisposable + { + int Length { get; } + void WriteSecretIntoBuffer(System.ArraySegment buffer); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.Secret` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Secret : System.IDisposable, Microsoft.AspNetCore.DataProtection.ISecret + { + public void Dispose() => throw null; + public int Length { get => throw null; } + public static Microsoft.AspNetCore.DataProtection.Secret Random(int numBytes) => throw null; + unsafe public Secret(System.Byte* secret, int secretLength) => throw null; + public Secret(System.Byte[] value) => throw null; + public Secret(System.ArraySegment value) => throw null; + public Secret(Microsoft.AspNetCore.DataProtection.ISecret secret) => throw null; + unsafe public void WriteSecretIntoBuffer(System.Byte* buffer, int bufferLength) => throw null; + public void WriteSecretIntoBuffer(System.ArraySegment buffer) => throw null; + } + + namespace AuthenticatedEncryption + { + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.AuthenticatedEncryptorFactory` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public AuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngCbcAuthenticatedEncryptorFactory` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngCbcAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public CngCbcAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.CngGcmAuthenticatedEncryptorFactory` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngGcmAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public CngGcmAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.EncryptionAlgorithm` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum EncryptionAlgorithm + { + AES_128_CBC, + AES_128_GCM, + AES_192_CBC, + AES_192_GCM, + AES_256_CBC, + AES_256_GCM, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticatedEncryptor + { + System.Byte[] Decrypt(System.ArraySegment ciphertext, System.ArraySegment additionalAuthenticatedData); + System.Byte[] Encrypt(System.ArraySegment plaintext, System.ArraySegment additionalAuthenticatedData); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticatedEncryptorFactory + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ManagedAuthenticatedEncryptorFactory : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptorFactory + { + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptorInstance(Microsoft.AspNetCore.DataProtection.KeyManagement.IKey key) => throw null; + public ManagedAuthenticatedEncryptorFactory(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ValidationAlgorithm` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ValidationAlgorithm + { + HMACSHA256, + HMACSHA512, + // Stub generator skipped constructor + } + + namespace ConfigurationModel + { + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AlgorithmConfiguration + { + protected AlgorithmConfiguration() => throw null; + public abstract Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor(); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public AuthenticatedEncryptorConfiguration() => throw null; + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.EncryptionAlgorithm EncryptionAlgorithm { get => throw null; set => throw null; } + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ValidationAlgorithm ValidationAlgorithm { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public AuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public AuthenticatedEncryptorDescriptorDeserializer() => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngCbcAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public CngCbcAuthenticatedEncryptorConfiguration() => throw null; + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() => throw null; + public string EncryptionAlgorithm { get => throw null; set => throw null; } + public int EncryptionAlgorithmKeySize { get => throw null; set => throw null; } + public string EncryptionAlgorithmProvider { get => throw null; set => throw null; } + public string HashAlgorithm { get => throw null; set => throw null; } + public string HashAlgorithmProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorDescriptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngCbcAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public CngCbcAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngCbcAuthenticatedEncryptorDescriptorDeserializer` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngCbcAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public CngCbcAuthenticatedEncryptorDescriptorDeserializer() => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngGcmAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public CngGcmAuthenticatedEncryptorConfiguration() => throw null; + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() => throw null; + public string EncryptionAlgorithm { get => throw null; set => throw null; } + public int EncryptionAlgorithmKeySize { get => throw null; set => throw null; } + public string EncryptionAlgorithmProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorDescriptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngGcmAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public CngGcmAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.CngGcmAuthenticatedEncryptorDescriptorDeserializer` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CngGcmAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public CngGcmAuthenticatedEncryptorDescriptorDeserializer() => throw null; + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticatedEncryptorDescriptor + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml(); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthenticatedEncryptorDescriptorDeserializer + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IInternalAlgorithmConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IInternalAlgorithmConfiguration + { + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorConfiguration` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ManagedAuthenticatedEncryptorConfiguration : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration + { + public override Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor CreateNewDescriptor() => throw null; + public int EncryptionAlgorithmKeySize { get => throw null; set => throw null; } + public System.Type EncryptionAlgorithmType { get => throw null; set => throw null; } + public ManagedAuthenticatedEncryptorConfiguration() => throw null; + public System.Type ValidationAlgorithmType { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorDescriptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ManagedAuthenticatedEncryptorDescriptor : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor + { + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo ExportToXml() => throw null; + public ManagedAuthenticatedEncryptorDescriptor(Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorConfiguration configuration, Microsoft.AspNetCore.DataProtection.ISecret masterKey) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.ManagedAuthenticatedEncryptorDescriptorDeserializer` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ManagedAuthenticatedEncryptorDescriptorDeserializer : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptorDeserializer + { + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor ImportFromXml(System.Xml.Linq.XElement element) => throw null; + public ManagedAuthenticatedEncryptorDescriptorDeserializer() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlExtensions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class XmlExtensions + { + public static void MarkAsRequiresEncryption(this System.Xml.Linq.XElement element) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.XmlSerializedDescriptorInfo` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlSerializedDescriptorInfo + { + public System.Type DeserializerType { get => throw null; } + public System.Xml.Linq.XElement SerializedDescriptorElement { get => throw null; } + public XmlSerializedDescriptorInfo(System.Xml.Linq.XElement serializedDescriptorElement, System.Type deserializerType) => throw null; + } + + } + } + namespace Internal + { + // Generated from `Microsoft.AspNetCore.DataProtection.Internal.IActivator` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActivator + { + object CreateInstance(System.Type expectedBaseType, string implementationTypeName); + } + + } + namespace KeyManagement + { + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.IKey` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKey + { + System.DateTimeOffset ActivationDate { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor CreateEncryptor(); + System.DateTimeOffset CreationDate { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor Descriptor { get; } + System.DateTimeOffset ExpirationDate { get; } + bool IsRevoked { get; } + System.Guid KeyId { get; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyEscrowSink` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeyEscrowSink + { + void Store(System.Guid keyId, System.Xml.Linq.XElement element); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyManager` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeyManager + { + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate); + System.Collections.Generic.IReadOnlyCollection GetAllKeys(); + System.Threading.CancellationToken GetCacheExpirationToken(); + void RevokeAllKeys(System.DateTimeOffset revocationDate, string reason = default(string)); + void RevokeKey(System.Guid keyId, string reason = default(string)); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.KeyManagementOptions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyManagementOptions + { + public Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AlgorithmConfiguration AuthenticatedEncryptorConfiguration { get => throw null; set => throw null; } + public System.Collections.Generic.IList AuthenticatedEncryptorFactories { get => throw null; } + public bool AutoGenerateKeys { get => throw null; set => throw null; } + public System.Collections.Generic.IList KeyEscrowSinks { get => throw null; } + public KeyManagementOptions() => throw null; + public System.TimeSpan NewKeyLifetime { get => throw null; set => throw null; } + public Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor XmlEncryptor { get => throw null; set => throw null; } + public Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository XmlRepository { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlKeyManager : Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager, Microsoft.AspNetCore.DataProtection.KeyManagement.IKeyManager + { + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate) => throw null; + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.CreateNewKey(System.Guid keyId, System.DateTimeOffset creationDate, System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate) => throw null; + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.DeserializeDescriptorFromKeyElement(System.Xml.Linq.XElement keyElement) => throw null; + public System.Collections.Generic.IReadOnlyCollection GetAllKeys() => throw null; + public System.Threading.CancellationToken GetCacheExpirationToken() => throw null; + public void RevokeAllKeys(System.DateTimeOffset revocationDate, string reason = default(string)) => throw null; + public void RevokeKey(System.Guid keyId, string reason = default(string)) => throw null; + void Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager.RevokeSingleKey(System.Guid keyId, System.DateTimeOffset revocationDate, string reason) => throw null; + public XmlKeyManager(Microsoft.Extensions.Options.IOptions keyManagementOptions, Microsoft.AspNetCore.DataProtection.Internal.IActivator activator, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public XmlKeyManager(Microsoft.Extensions.Options.IOptions keyManagementOptions, Microsoft.AspNetCore.DataProtection.Internal.IActivator activator) => throw null; + } + + namespace Internal + { + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.CacheableKeyRing` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheableKeyRing + { + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.DefaultKeyResolution` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct DefaultKeyResolution + { + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey DefaultKey; + // Stub generator skipped constructor + public Microsoft.AspNetCore.DataProtection.KeyManagement.IKey FallbackKey; + public bool ShouldGenerateNewKey; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICacheableKeyRingProvider + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.CacheableKeyRing GetCacheableKeyRing(System.DateTimeOffset now); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IDefaultKeyResolver` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDefaultKeyResolver + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.DefaultKeyResolution ResolveDefaultKeyPolicy(System.DateTimeOffset now, System.Collections.Generic.IEnumerable allKeys); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IInternalXmlKeyManager` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IInternalXmlKeyManager + { + Microsoft.AspNetCore.DataProtection.KeyManagement.IKey CreateNewKey(System.Guid keyId, System.DateTimeOffset creationDate, System.DateTimeOffset activationDate, System.DateTimeOffset expirationDate); + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.IAuthenticatedEncryptorDescriptor DeserializeDescriptorFromKeyElement(System.Xml.Linq.XElement keyElement); + void RevokeSingleKey(System.Guid keyId, System.DateTimeOffset revocationDate, string reason); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IKeyRing` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeyRing + { + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor DefaultAuthenticatedEncryptor { get; } + System.Guid DefaultKeyId { get; } + Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor GetAuthenticatedEncryptorByKeyId(System.Guid keyId, out bool isRevoked); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IKeyRingProvider` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeyRingProvider + { + Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.IKeyRing GetCurrentKeyRing(); + } + + } + } + namespace Repositories + { + // Generated from `Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileSystemXmlRepository : Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository + { + public static System.IO.DirectoryInfo DefaultKeyStorageDirectory { get => throw null; } + public System.IO.DirectoryInfo Directory { get => throw null; } + public FileSystemXmlRepository(System.IO.DirectoryInfo directory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public virtual System.Collections.Generic.IReadOnlyCollection GetAllElements() => throw null; + public virtual void StoreElement(System.Xml.Linq.XElement element, string friendlyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IXmlRepository + { + System.Collections.Generic.IReadOnlyCollection GetAllElements(); + void StoreElement(System.Xml.Linq.XElement element, string friendlyName); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RegistryXmlRepository : Microsoft.AspNetCore.DataProtection.Repositories.IXmlRepository + { + public static Microsoft.Win32.RegistryKey DefaultRegistryKey { get => throw null; } + public virtual System.Collections.Generic.IReadOnlyCollection GetAllElements() => throw null; + public Microsoft.Win32.RegistryKey RegistryKey { get => throw null; } + public RegistryXmlRepository(Microsoft.Win32.RegistryKey registryKey, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public virtual void StoreElement(System.Xml.Linq.XElement element, string friendlyName) => throw null; + } + + } + namespace XmlEncryption + { + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.CertificateResolver` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CertificateResolver : Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver + { + public CertificateResolver() => throw null; + public virtual System.Security.Cryptography.X509Certificates.X509Certificate2 ResolveCertificate(string thumbprint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.CertificateXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CertificateXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public CertificateXmlEncryptor(string thumbprint, Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver certificateResolver, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public CertificateXmlEncryptor(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum DpapiNGProtectionDescriptorFlags + { + // Stub generator skipped constructor + MachineKey, + NamedDescriptor, + None, + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DpapiNGXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) => throw null; + public DpapiNGXmlDecryptor(System.IServiceProvider services) => throw null; + public DpapiNGXmlDecryptor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DpapiNGXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public DpapiNGXmlEncryptor(string protectionDescriptorRule, Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiNGProtectionDescriptorFlags flags, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DpapiXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) => throw null; + public DpapiXmlDecryptor(System.IServiceProvider services) => throw null; + public DpapiXmlDecryptor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.DpapiXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DpapiXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public DpapiXmlEncryptor(bool protectToLocalMachine, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EncryptedXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) => throw null; + public EncryptedXmlDecryptor(System.IServiceProvider services) => throw null; + public EncryptedXmlDecryptor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EncryptedXmlInfo + { + public System.Type DecryptorType { get => throw null; } + public System.Xml.Linq.XElement EncryptedElement { get => throw null; } + public EncryptedXmlInfo(System.Xml.Linq.XElement encryptedElement, System.Type decryptorType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.ICertificateResolver` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICertificateResolver + { + System.Security.Cryptography.X509Certificates.X509Certificate2 ResolveCertificate(string thumbprint); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.IInternalCertificateXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IInternalCertificateXmlEncryptor + { + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.IInternalEncryptedXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IInternalEncryptedXmlDecryptor + { + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IXmlDecryptor + { + System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IXmlEncryptor + { + Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement); + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.NullXmlDecryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullXmlDecryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlDecryptor + { + public System.Xml.Linq.XElement Decrypt(System.Xml.Linq.XElement encryptedElement) => throw null; + public NullXmlDecryptor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.DataProtection.XmlEncryption.NullXmlEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEncryption.IXmlEncryptor + { + public Microsoft.AspNetCore.DataProtection.XmlEncryption.EncryptedXmlInfo Encrypt(System.Xml.Linq.XElement plaintextElement) => throw null; + public NullXmlEncryptor(System.IServiceProvider services) => throw null; + public NullXmlEncryptor() => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionExtensions` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DataProtectionServiceCollectionExtensions + { + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder AddDataProtection(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs new file mode 100644 index 000000000000..16fd7b61d484 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs @@ -0,0 +1,82 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Diagnostics.CompilationFailure` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompilationFailure + { + public CompilationFailure(string sourceFilePath, string sourceFileContent, string compiledContent, System.Collections.Generic.IEnumerable messages, string failureSummary) => throw null; + public CompilationFailure(string sourceFilePath, string sourceFileContent, string compiledContent, System.Collections.Generic.IEnumerable messages) => throw null; + public string CompiledContent { get => throw null; } + public string FailureSummary { get => throw null; } + public System.Collections.Generic.IEnumerable Messages { get => throw null; } + public string SourceFileContent { get => throw null; } + public string SourceFilePath { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.DiagnosticMessage` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DiagnosticMessage + { + public DiagnosticMessage(string message, string formattedMessage, string filePath, int startLine, int startColumn, int endLine, int endColumn) => throw null; + public int EndColumn { get => throw null; } + public int EndLine { get => throw null; } + public string FormattedMessage { get => throw null; } + public string Message { get => throw null; } + public string SourceFilePath { get => throw null; } + public int StartColumn { get => throw null; } + public int StartLine { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.ErrorContext` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ErrorContext + { + public ErrorContext(Microsoft.AspNetCore.Http.HttpContext httpContext, System.Exception exception) => throw null; + public System.Exception Exception { get => throw null; } + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.ICompilationException` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompilationException + { + System.Collections.Generic.IEnumerable CompilationFailures { get; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.IDeveloperPageExceptionFilter` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDeveloperPageExceptionFilter + { + System.Threading.Tasks.Task HandleExceptionAsync(Microsoft.AspNetCore.Diagnostics.ErrorContext errorContext, System.Func next); + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.IExceptionHandlerFeature` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IExceptionHandlerFeature + { + System.Exception Error { get; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.IExceptionHandlerPathFeature` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IExceptionHandlerPathFeature : Microsoft.AspNetCore.Diagnostics.IExceptionHandlerFeature + { + string Path { get; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.IStatusCodePagesFeature` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStatusCodePagesFeature + { + bool Enabled { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.IStatusCodeReExecuteFeature` in `Microsoft.AspNetCore.Diagnostics.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStatusCodeReExecuteFeature + { + string OriginalPath { get; set; } + string OriginalPathBase { get; set; } + string OriginalQueryString { get; set; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs new file mode 100644 index 000000000000..23dff6e85c8f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs @@ -0,0 +1,52 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.HealthCheckApplicationBuilderExtensions` in `Microsoft.AspNetCore.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HealthCheckApplicationBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, string port, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, string port) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, int port, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, int port) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHealthChecks(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HealthCheckEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HealthCheckEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapHealthChecks(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) => throw null; + } + + } + namespace Diagnostics + { + namespace HealthChecks + { + // Generated from `Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckMiddleware` in `Microsoft.AspNetCore.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckMiddleware + { + public HealthCheckMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions healthCheckOptions, Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckService healthCheckService) => throw null; + public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.HealthChecks.HealthCheckOptions` in `Microsoft.AspNetCore.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckOptions + { + public bool AllowCachingResponses { get => throw null; set => throw null; } + public HealthCheckOptions() => throw null; + public System.Func Predicate { get => throw null; set => throw null; } + public System.Func ResponseWriter { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary ResultStatusCodes { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs new file mode 100644 index 000000000000..e9ea9c48be3c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs @@ -0,0 +1,156 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.DeveloperExceptionPageExtensions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DeveloperExceptionPageExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDeveloperExceptionPage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DeveloperExceptionPageOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDeveloperExceptionPage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.DeveloperExceptionPageOptions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DeveloperExceptionPageOptions + { + public DeveloperExceptionPageOptions() => throw null; + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public int SourceCodeLineCount { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.ExceptionHandlerExtensions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ExceptionHandlerExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string errorHandlingPath) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.ExceptionHandlerOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseExceptionHandler(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ExceptionHandlerOptions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExceptionHandlerOptions + { + public bool AllowStatusCode404Response { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.RequestDelegate ExceptionHandler { get => throw null; set => throw null; } + public ExceptionHandlerOptions() => throw null; + public Microsoft.AspNetCore.Http.PathString ExceptionHandlingPath { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.StatusCodePagesExtensions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StatusCodePagesExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string contentType, string bodyFormat) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action configuration) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.StatusCodePagesOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePages(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePagesWithReExecute(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string pathFormat, string queryFormat = default(string)) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStatusCodePagesWithRedirects(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string locationFormat) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.StatusCodePagesOptions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodePagesOptions + { + public System.Func HandleAsync { get => throw null; set => throw null; } + public StatusCodePagesOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.WelcomePageExtensions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WelcomePageExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWelcomePage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string path) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWelcomePage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString path) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWelcomePage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.WelcomePageOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWelcomePage(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.WelcomePageOptions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WelcomePageOptions + { + public Microsoft.AspNetCore.Http.PathString Path { get => throw null; set => throw null; } + public WelcomePageOptions() => throw null; + } + + } + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DeveloperExceptionPageMiddleware + { + public DeveloperExceptionPageMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, System.Diagnostics.DiagnosticSource diagnosticSource, System.Collections.Generic.IEnumerable filters) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.ExceptionHandlerFeature` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExceptionHandlerFeature : Microsoft.AspNetCore.Diagnostics.IExceptionHandlerPathFeature, Microsoft.AspNetCore.Diagnostics.IExceptionHandlerFeature + { + public System.Exception Error { get => throw null; set => throw null; } + public ExceptionHandlerFeature() => throw null; + public string Path { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExceptionHandlerMiddleware + { + public ExceptionHandlerMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options, System.Diagnostics.DiagnosticListener diagnosticListener) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.StatusCodeContext` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodeContext + { + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public Microsoft.AspNetCore.Http.RequestDelegate Next { get => throw null; } + public Microsoft.AspNetCore.Builder.StatusCodePagesOptions Options { get => throw null; } + public StatusCodeContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Builder.StatusCodePagesOptions options, Microsoft.AspNetCore.Http.RequestDelegate next) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.StatusCodePagesFeature` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodePagesFeature : Microsoft.AspNetCore.Diagnostics.IStatusCodePagesFeature + { + public bool Enabled { get => throw null; set => throw null; } + public StatusCodePagesFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodePagesMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public StatusCodePagesMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.StatusCodeReExecuteFeature` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodeReExecuteFeature : Microsoft.AspNetCore.Diagnostics.IStatusCodeReExecuteFeature + { + public string OriginalPath { get => throw null; set => throw null; } + public string OriginalPathBase { get => throw null; set => throw null; } + public string OriginalQueryString { get => throw null; set => throw null; } + public StatusCodeReExecuteFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Diagnostics.WelcomePageMiddleware` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WelcomePageMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public WelcomePageMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ExceptionHandlerServiceCollectionExtensions` in `Microsoft.AspNetCore.Diagnostics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ExceptionHandlerServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExceptionHandler(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddExceptionHandler(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs new file mode 100644 index 000000000000..8621938fbee4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs @@ -0,0 +1,42 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.HostFilteringBuilderExtensions` in `Microsoft.AspNetCore.HostFiltering, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostFilteringBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHostFiltering(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HostFilteringServicesExtensions` in `Microsoft.AspNetCore.HostFiltering, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostFilteringServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHostFiltering(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + } + namespace HostFiltering + { + // Generated from `Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware` in `Microsoft.AspNetCore.HostFiltering, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostFilteringMiddleware + { + public HostFilteringMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Options.IOptionsMonitor optionsMonitor) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HostFiltering.HostFilteringOptions` in `Microsoft.AspNetCore.HostFiltering, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostFilteringOptions + { + public bool AllowEmptyHosts { get => throw null; set => throw null; } + public System.Collections.Generic.IList AllowedHosts { get => throw null; set => throw null; } + public HostFilteringOptions() => throw null; + public bool IncludeFailureMessage { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs new file mode 100644 index 000000000000..c3836e6ef6a7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs @@ -0,0 +1,159 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.EnvironmentName` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EnvironmentName + { + public static string Development; + public static string Production; + public static string Staging; + } + + // Generated from `Microsoft.AspNetCore.Hosting.HostingAbstractionsWebHostBuilderExtensions` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostingAbstractionsWebHostBuilderExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder CaptureStartupErrors(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool captureStartupErrors) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder PreferHostingUrls(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool preferHostingUrls) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost Start(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, params string[] urls) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder SuppressStatusMessages(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, bool suppressStatusMessages) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseConfiguration(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Microsoft.Extensions.Configuration.IConfiguration configuration) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseContentRoot(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string contentRoot) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseEnvironment(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string environment) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseServer(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Microsoft.AspNetCore.Hosting.Server.IServer server) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseShutdownTimeout(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.TimeSpan timeout) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string startupAssemblyName) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseUrls(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, params string[] urls) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseWebRoot(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, string webRoot) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.HostingEnvironmentExtensions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class HostingEnvironmentExtensions + { + public static bool IsDevelopment(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + public static bool IsEnvironment(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment, string environmentName) => throw null; + public static bool IsProduction(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + public static bool IsStaging(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.HostingStartupAttribute` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostingStartupAttribute : System.Attribute + { + public HostingStartupAttribute(System.Type hostingStartupType) => throw null; + public System.Type HostingStartupType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Hosting.IApplicationLifetime` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationLifetime + { + System.Threading.CancellationToken ApplicationStarted { get; } + System.Threading.CancellationToken ApplicationStopped { get; } + System.Threading.CancellationToken ApplicationStopping { get; } + void StopApplication(); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IHostingEnvironment` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostingEnvironment + { + string ApplicationName { get; set; } + Microsoft.Extensions.FileProviders.IFileProvider ContentRootFileProvider { get; set; } + string ContentRootPath { get; set; } + string EnvironmentName { get; set; } + Microsoft.Extensions.FileProviders.IFileProvider WebRootFileProvider { get; set; } + string WebRootPath { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Hosting.IHostingStartup` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostingStartup + { + void Configure(Microsoft.AspNetCore.Hosting.IWebHostBuilder builder); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IStartup` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStartup + { + void Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder app); + System.IServiceProvider ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IStartupConfigureContainerFilter<>` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStartupConfigureContainerFilter + { + System.Action ConfigureContainer(System.Action container); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IStartupConfigureServicesFilter` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStartupConfigureServicesFilter + { + System.Action ConfigureServices(System.Action next); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IStartupFilter` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStartupFilter + { + System.Action Configure(System.Action next); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IWebHost` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IWebHost : System.IDisposable + { + Microsoft.AspNetCore.Http.Features.IFeatureCollection ServerFeatures { get; } + System.IServiceProvider Services { get; } + void Start(); + System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IWebHostBuilder` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IWebHostBuilder + { + Microsoft.AspNetCore.Hosting.IWebHost Build(); + Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration(System.Action configureDelegate); + Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices(System.Action configureServices); + Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices(System.Action configureServices); + string GetSetting(string key); + Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSetting(string key, string value); + } + + // Generated from `Microsoft.AspNetCore.Hosting.IWebHostEnvironment` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IWebHostEnvironment : Microsoft.Extensions.Hosting.IHostEnvironment + { + Microsoft.Extensions.FileProviders.IFileProvider WebRootFileProvider { get; set; } + string WebRootPath { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderContext` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebHostBuilderContext + { + public Microsoft.Extensions.Configuration.IConfiguration Configuration { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment { get => throw null; set => throw null; } + public WebHostBuilderContext() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.WebHostDefaults` in `Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostDefaults + { + public static string ApplicationKey; + public static string CaptureStartupErrorsKey; + public static string ContentRootKey; + public static string DetailedErrorsKey; + public static string EnvironmentKey; + public static string HostingStartupAssembliesKey; + public static string HostingStartupExcludeAssembliesKey; + public static string PreferHostingUrlsKey; + public static string PreventHostingStartupKey; + public static string ServerUrlsKey; + public static string ShutdownTimeoutKey; + public static string StartupAssemblyKey; + public static string StaticWebAssetsKey; + public static string SuppressStatusMessagesKey; + public static string WebRootKey; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs new file mode 100644 index 000000000000..e7b798434e5e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs @@ -0,0 +1,64 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + namespace Server + { + // Generated from `Microsoft.AspNetCore.Hosting.Server.IHttpApplication<>` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpApplication + { + TContext CreateContext(Microsoft.AspNetCore.Http.Features.IFeatureCollection contextFeatures); + void DisposeContext(TContext context, System.Exception exception); + System.Threading.Tasks.Task ProcessRequestAsync(TContext context); + } + + // Generated from `Microsoft.AspNetCore.Hosting.Server.IServer` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServer : System.IDisposable + { + Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; } + System.Threading.Tasks.Task StartAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Hosting.Server.IServerIntegratedAuth` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServerIntegratedAuth + { + string AuthenticationScheme { get; } + bool IsEnabled { get; } + } + + // Generated from `Microsoft.AspNetCore.Hosting.Server.ServerIntegratedAuth` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServerIntegratedAuth : Microsoft.AspNetCore.Hosting.Server.IServerIntegratedAuth + { + public string AuthenticationScheme { get => throw null; set => throw null; } + public bool IsEnabled { get => throw null; set => throw null; } + public ServerIntegratedAuth() => throw null; + } + + namespace Abstractions + { + // Generated from `Microsoft.AspNetCore.Hosting.Server.Abstractions.IHostContextContainer<>` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostContextContainer + { + TContext HostContext { get; set; } + } + + } + namespace Features + { + // Generated from `Microsoft.AspNetCore.Hosting.Server.Features.IServerAddressesFeature` in `Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServerAddressesFeature + { + System.Collections.Generic.ICollection Addresses { get; } + bool PreferHostingUrls { get; set; } + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs new file mode 100644 index 000000000000..497e6e8fbee1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs @@ -0,0 +1,150 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.DelegateStartup` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DelegateStartup : Microsoft.AspNetCore.Hosting.StartupBase + { + public override void Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + public DelegateStartup(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory, System.Action configureApp) : base(default(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.HostingEnvironmentExtensions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class HostingEnvironmentExtensions + { + } + + // Generated from `Microsoft.AspNetCore.Hosting.StartupBase` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class StartupBase : Microsoft.AspNetCore.Hosting.IStartup + { + public abstract void Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder app); + public virtual void ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + System.IServiceProvider Microsoft.AspNetCore.Hosting.IStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public virtual System.IServiceProvider CreateServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + protected StartupBase() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.StartupBase<>` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class StartupBase : Microsoft.AspNetCore.Hosting.StartupBase + { + public virtual void ConfigureContainer(TBuilder builder) => throw null; + public override System.IServiceProvider CreateServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public StartupBase(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilder` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebHostBuilder : Microsoft.AspNetCore.Hosting.IWebHostBuilder + { + public Microsoft.AspNetCore.Hosting.IWebHost Build() => throw null; + public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration(System.Action configureDelegate) => throw null; + public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices(System.Action configureServices) => throw null; + public Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureServices(System.Action configureServices) => throw null; + public string GetSetting(string key) => throw null; + public Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSetting(string key, string value) => throw null; + public WebHostBuilder() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostBuilderExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder Configure(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureApp) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder Configure(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureApp) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureAppConfiguration(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureDelegate) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureLogging(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureLogging) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureLogging(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureLogging) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseDefaultServiceProvider(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Func startupFactory) where TStartup : class => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) where TStartup : class => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStartup(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Type startupType) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseStaticWebAssets(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.WebHostExtensions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostExtensions + { + public static void Run(this Microsoft.AspNetCore.Hosting.IWebHost host) => throw null; + public static System.Threading.Tasks.Task RunAsync(this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task StopAsync(this Microsoft.AspNetCore.Hosting.IWebHost host, System.TimeSpan timeout) => throw null; + public static void WaitForShutdown(this Microsoft.AspNetCore.Hosting.IWebHost host) => throw null; + public static System.Threading.Tasks.Task WaitForShutdownAsync(this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + } + + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Hosting.Builder.ApplicationBuilderFactory` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationBuilderFactory : Microsoft.AspNetCore.Hosting.Builder.IApplicationBuilderFactory + { + public ApplicationBuilderFactory(System.IServiceProvider serviceProvider) => throw null; + public Microsoft.AspNetCore.Builder.IApplicationBuilder CreateBuilder(Microsoft.AspNetCore.Http.Features.IFeatureCollection serverFeatures) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.Builder.IApplicationBuilderFactory` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationBuilderFactory + { + Microsoft.AspNetCore.Builder.IApplicationBuilder CreateBuilder(Microsoft.AspNetCore.Http.Features.IFeatureCollection serverFeatures); + } + + } + namespace Server + { + namespace Features + { + // Generated from `Microsoft.AspNetCore.Hosting.Server.Features.ServerAddressesFeature` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServerAddressesFeature : Microsoft.AspNetCore.Hosting.Server.Features.IServerAddressesFeature + { + public System.Collections.Generic.ICollection Addresses { get => throw null; } + public bool PreferHostingUrls { get => throw null; set => throw null; } + public ServerAddressesFeature() => throw null; + } + + } + } + namespace StaticWebAssets + { + // Generated from `Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StaticWebAssetsLoader + { + public StaticWebAssetsLoader() => throw null; + public static void UseStaticWebAssets(Microsoft.AspNetCore.Hosting.IWebHostEnvironment environment, Microsoft.Extensions.Configuration.IConfiguration configuration) => throw null; + } + + } + } + namespace Http + { + // Generated from `Microsoft.AspNetCore.Http.DefaultHttpContextFactory` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultHttpContextFactory : Microsoft.AspNetCore.Http.IHttpContextFactory + { + public Microsoft.AspNetCore.Http.HttpContext Create(Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection) => throw null; + public DefaultHttpContextFactory(System.IServiceProvider serviceProvider) => throw null; + public void Dispose(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + } + } + namespace Extensions + { + namespace Hosting + { + // Generated from `Microsoft.Extensions.Hosting.GenericHostWebHostBuilderExtensions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class GenericHostWebHostBuilderExtensions + { + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost(this Microsoft.Extensions.Hosting.IHostBuilder builder, System.Action configure, System.Action configureWebHostBuilder) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost(this Microsoft.Extensions.Hosting.IHostBuilder builder, System.Action configure) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.WebHostBuilderOptions` in `Microsoft.AspNetCore.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebHostBuilderOptions + { + public bool SuppressEnvironmentConfiguration { get => throw null; set => throw null; } + public WebHostBuilderOptions() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs new file mode 100644 index 000000000000..aa30031e9ed0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs @@ -0,0 +1,82 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Html + { + // Generated from `Microsoft.AspNetCore.Html.HtmlContentBuilder` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlContentBuilder : Microsoft.AspNetCore.Html.IHtmlContentContainer, Microsoft.AspNetCore.Html.IHtmlContentBuilder, Microsoft.AspNetCore.Html.IHtmlContent + { + public Microsoft.AspNetCore.Html.IHtmlContentBuilder Append(string unencoded) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(string encoded) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent htmlContent) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContentBuilder Clear() => throw null; + public void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public int Count { get => throw null; } + public HtmlContentBuilder(int capacity) => throw null; + public HtmlContentBuilder(System.Collections.Generic.IList entries) => throw null; + public HtmlContentBuilder() => throw null; + public void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Html.HtmlContentBuilderExtensions` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlContentBuilderExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendFormat(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string format, params object[] args) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendFormat(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, System.IFormatProvider formatProvider, string format, params object[] args) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtmlLine(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string encoded) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendLine(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string unencoded) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendLine(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, Microsoft.AspNetCore.Html.IHtmlContent content) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendLine(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder SetContent(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string unencoded) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder SetHtmlContent(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string encoded) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContentBuilder SetHtmlContent(this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, Microsoft.AspNetCore.Html.IHtmlContent content) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Html.HtmlFormattableString` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlFormattableString : Microsoft.AspNetCore.Html.IHtmlContent + { + public HtmlFormattableString(string format, params object[] args) => throw null; + public HtmlFormattableString(System.IFormatProvider formatProvider, string format, params object[] args) => throw null; + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Html.HtmlString` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlString : Microsoft.AspNetCore.Html.IHtmlContent + { + public static Microsoft.AspNetCore.Html.HtmlString Empty; + public HtmlString(string value) => throw null; + public static Microsoft.AspNetCore.Html.HtmlString NewLine; + public override string ToString() => throw null; + public string Value { get => throw null; } + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Html.IHtmlContent` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlContent + { + void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder); + } + + // Generated from `Microsoft.AspNetCore.Html.IHtmlContentBuilder` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlContentBuilder : Microsoft.AspNetCore.Html.IHtmlContentContainer, Microsoft.AspNetCore.Html.IHtmlContent + { + Microsoft.AspNetCore.Html.IHtmlContentBuilder Append(string unencoded); + Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(string encoded); + Microsoft.AspNetCore.Html.IHtmlContentBuilder AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent content); + Microsoft.AspNetCore.Html.IHtmlContentBuilder Clear(); + } + + // Generated from `Microsoft.AspNetCore.Html.IHtmlContentContainer` in `Microsoft.AspNetCore.Html.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlContentContainer : Microsoft.AspNetCore.Html.IHtmlContent + { + void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder builder); + void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder builder); + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs new file mode 100644 index 000000000000..3d65ff497596 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs @@ -0,0 +1,640 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.EndpointBuilder` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class EndpointBuilder + { + public abstract Microsoft.AspNetCore.Http.Endpoint Build(); + public string DisplayName { get => throw null; set => throw null; } + protected EndpointBuilder() => throw null; + public System.Collections.Generic.IList Metadata { get => throw null; } + public Microsoft.AspNetCore.Http.RequestDelegate RequestDelegate { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.IApplicationBuilder` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationBuilder + { + System.IServiceProvider ApplicationServices { get; set; } + Microsoft.AspNetCore.Http.RequestDelegate Build(); + Microsoft.AspNetCore.Builder.IApplicationBuilder New(); + System.Collections.Generic.IDictionary Properties { get; } + Microsoft.AspNetCore.Http.Features.IFeatureCollection ServerFeatures { get; } + Microsoft.AspNetCore.Builder.IApplicationBuilder Use(System.Func middleware); + } + + // Generated from `Microsoft.AspNetCore.Builder.IEndpointConventionBuilder` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointConventionBuilder + { + void Add(System.Action convention); + } + + // Generated from `Microsoft.AspNetCore.Builder.MapExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MapExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder Map(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString pathMatch, bool preserveMatchedPathSegment, System.Action configuration) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder Map(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString pathMatch, System.Action configuration) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.MapWhenExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MapWhenExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder MapWhen(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Func predicate, System.Action configuration) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RunExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RunExtensions + { + public static void Run(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.UseExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UseExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder Use(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Func, System.Threading.Tasks.Task> middleware) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.UseMiddlewareExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UseMiddlewareExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, params object[] args) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Type middleware, params object[] args) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.UsePathBaseExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UsePathBaseExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UsePathBase(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Http.PathString pathBase) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.UseWhenExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UseWhenExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWhen(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Func predicate, System.Action configuration) => throw null; + } + + namespace Extensions + { + // Generated from `Microsoft.AspNetCore.Builder.Extensions.MapMiddleware` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MapMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public MapMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Builder.Extensions.MapOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.Extensions.MapOptions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MapOptions + { + public Microsoft.AspNetCore.Http.RequestDelegate Branch { get => throw null; set => throw null; } + public MapOptions() => throw null; + public Microsoft.AspNetCore.Http.PathString PathMatch { get => throw null; set => throw null; } + public bool PreserveMatchedPathSegment { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MapWhenMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public MapWhenMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Builder.Extensions.MapWhenOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.Extensions.MapWhenOptions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MapWhenOptions + { + public Microsoft.AspNetCore.Http.RequestDelegate Branch { get => throw null; set => throw null; } + public MapWhenOptions() => throw null; + public System.Func Predicate { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UsePathBaseMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public UsePathBaseMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.PathString pathBase) => throw null; + } + + } + } + namespace Cors + { + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICorsMetadata + { + } + + } + } + namespace Http + { + // Generated from `Microsoft.AspNetCore.Http.BadHttpRequestException` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BadHttpRequestException : System.IO.IOException + { + public BadHttpRequestException(string message, int statusCode, System.Exception innerException) => throw null; + public BadHttpRequestException(string message, int statusCode) => throw null; + public BadHttpRequestException(string message, System.Exception innerException) => throw null; + public BadHttpRequestException(string message) => throw null; + public int StatusCode { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.ConnectionInfo` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConnectionInfo + { + public abstract System.Security.Cryptography.X509Certificates.X509Certificate2 ClientCertificate { get; set; } + protected ConnectionInfo() => throw null; + public abstract System.Threading.Tasks.Task GetClientCertificateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract string Id { get; set; } + public abstract System.Net.IPAddress LocalIpAddress { get; set; } + public abstract int LocalPort { get; set; } + public abstract System.Net.IPAddress RemoteIpAddress { get; set; } + public abstract int RemotePort { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.CookieBuilder` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieBuilder + { + public virtual Microsoft.AspNetCore.Http.CookieOptions Build(Microsoft.AspNetCore.Http.HttpContext context, System.DateTimeOffset expiresFrom) => throw null; + public Microsoft.AspNetCore.Http.CookieOptions Build(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public CookieBuilder() => throw null; + public virtual string Domain { get => throw null; set => throw null; } + public virtual System.TimeSpan? Expiration { get => throw null; set => throw null; } + public virtual bool HttpOnly { get => throw null; set => throw null; } + public virtual bool IsEssential { get => throw null; set => throw null; } + public virtual System.TimeSpan? MaxAge { get => throw null; set => throw null; } + public virtual string Name { get => throw null; set => throw null; } + public virtual string Path { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Http.SameSiteMode SameSite { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Http.CookieSecurePolicy SecurePolicy { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.CookieSecurePolicy` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum CookieSecurePolicy + { + Always, + // Stub generator skipped constructor + None, + SameAsRequest, + } + + // Generated from `Microsoft.AspNetCore.Http.Endpoint` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Endpoint + { + public string DisplayName { get => throw null; } + public Endpoint(Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, Microsoft.AspNetCore.Http.EndpointMetadataCollection metadata, string displayName) => throw null; + public Microsoft.AspNetCore.Http.EndpointMetadataCollection Metadata { get => throw null; } + public Microsoft.AspNetCore.Http.RequestDelegate RequestDelegate { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.EndpointHttpContextExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EndpointHttpContextExtensions + { + public static Microsoft.AspNetCore.Http.Endpoint GetEndpoint(this Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public static void SetEndpoint(this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.Endpoint endpoint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.EndpointMetadataCollection` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EndpointMetadataCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + public static Microsoft.AspNetCore.Http.EndpointMetadataCollection Empty; + public EndpointMetadataCollection(params object[] items) => throw null; + public EndpointMetadataCollection(System.Collections.Generic.IEnumerable items) => throw null; + // Generated from `Microsoft.AspNetCore.Http.EndpointMetadataCollection.Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public object Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public Microsoft.AspNetCore.Http.EndpointMetadataCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public T GetMetadata() where T : class => throw null; + public System.Collections.Generic.IReadOnlyList GetOrderedMetadata() where T : class => throw null; + public object this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.FragmentString` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FragmentString : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Http.FragmentString left, Microsoft.AspNetCore.Http.FragmentString right) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Http.FragmentString left, Microsoft.AspNetCore.Http.FragmentString right) => throw null; + public static Microsoft.AspNetCore.Http.FragmentString Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Http.FragmentString other) => throw null; + public FragmentString(string value) => throw null; + // Stub generator skipped constructor + public static Microsoft.AspNetCore.Http.FragmentString FromUriComponent(string uriComponent) => throw null; + public static Microsoft.AspNetCore.Http.FragmentString FromUriComponent(System.Uri uri) => throw null; + public override int GetHashCode() => throw null; + public bool HasValue { get => throw null; } + public override string ToString() => throw null; + public string ToUriComponent() => throw null; + public string Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.HeaderDictionaryExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HeaderDictionaryExtensions + { + public static void Append(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, string key, Microsoft.Extensions.Primitives.StringValues value) => throw null; + public static void AppendCommaSeparatedValues(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, string key, params string[] values) => throw null; + public static string[] GetCommaSeparatedValues(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, string key) => throw null; + public static void SetCommaSeparatedValues(this Microsoft.AspNetCore.Http.IHeaderDictionary headers, string key, params string[] values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HostString` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct HostString : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Http.HostString left, Microsoft.AspNetCore.Http.HostString right) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Http.HostString left, Microsoft.AspNetCore.Http.HostString right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Http.HostString other) => throw null; + public static Microsoft.AspNetCore.Http.HostString FromUriComponent(string uriComponent) => throw null; + public static Microsoft.AspNetCore.Http.HostString FromUriComponent(System.Uri uri) => throw null; + public override int GetHashCode() => throw null; + public bool HasValue { get => throw null; } + public string Host { get => throw null; } + public HostString(string value) => throw null; + public HostString(string host, int port) => throw null; + // Stub generator skipped constructor + public static bool MatchesAny(Microsoft.Extensions.Primitives.StringSegment value, System.Collections.Generic.IList patterns) => throw null; + public int? Port { get => throw null; } + public override string ToString() => throw null; + public string ToUriComponent() => throw null; + public string Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.HttpContext` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HttpContext + { + public abstract void Abort(); + public abstract Microsoft.AspNetCore.Http.ConnectionInfo Connection { get; } + public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; } + protected HttpContext() => throw null; + public abstract System.Collections.Generic.IDictionary Items { get; set; } + public abstract Microsoft.AspNetCore.Http.HttpRequest Request { get; } + public abstract System.Threading.CancellationToken RequestAborted { get; set; } + public abstract System.IServiceProvider RequestServices { get; set; } + public abstract Microsoft.AspNetCore.Http.HttpResponse Response { get; } + public abstract Microsoft.AspNetCore.Http.ISession Session { get; set; } + public abstract string TraceIdentifier { get; set; } + public abstract System.Security.Claims.ClaimsPrincipal User { get; set; } + public abstract Microsoft.AspNetCore.Http.WebSocketManager WebSockets { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.HttpMethods` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpMethods + { + public static string Connect; + public static string Delete; + public static bool Equals(string methodA, string methodB) => throw null; + public static string Get; + public static string GetCanonicalizedValue(string method) => throw null; + public static string Head; + public static bool IsConnect(string method) => throw null; + public static bool IsDelete(string method) => throw null; + public static bool IsGet(string method) => throw null; + public static bool IsHead(string method) => throw null; + public static bool IsOptions(string method) => throw null; + public static bool IsPatch(string method) => throw null; + public static bool IsPost(string method) => throw null; + public static bool IsPut(string method) => throw null; + public static bool IsTrace(string method) => throw null; + public static string Options; + public static string Patch; + public static string Post; + public static string Put; + public static string Trace; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpProtocol` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpProtocol + { + public static string GetHttpProtocol(System.Version version) => throw null; + public static string Http10; + public static string Http11; + public static string Http2; + public static string Http3; + public static bool IsHttp10(string protocol) => throw null; + public static bool IsHttp11(string protocol) => throw null; + public static bool IsHttp2(string protocol) => throw null; + public static bool IsHttp3(string protocol) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpRequest` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HttpRequest + { + public abstract System.IO.Stream Body { get; set; } + public virtual System.IO.Pipelines.PipeReader BodyReader { get => throw null; } + public abstract System.Int64? ContentLength { get; set; } + public abstract string ContentType { get; set; } + public abstract Microsoft.AspNetCore.Http.IRequestCookieCollection Cookies { get; set; } + public abstract Microsoft.AspNetCore.Http.IFormCollection Form { get; set; } + public abstract bool HasFormContentType { get; } + public abstract Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; } + public abstract Microsoft.AspNetCore.Http.HostString Host { get; set; } + public abstract Microsoft.AspNetCore.Http.HttpContext HttpContext { get; } + protected HttpRequest() => throw null; + public abstract bool IsHttps { get; set; } + public abstract string Method { get; set; } + public abstract Microsoft.AspNetCore.Http.PathString Path { get; set; } + public abstract Microsoft.AspNetCore.Http.PathString PathBase { get; set; } + public abstract string Protocol { get; set; } + public abstract Microsoft.AspNetCore.Http.IQueryCollection Query { get; set; } + public abstract Microsoft.AspNetCore.Http.QueryString QueryString { get; set; } + public abstract System.Threading.Tasks.Task ReadFormAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public abstract string Scheme { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.HttpResponse` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HttpResponse + { + public abstract System.IO.Stream Body { get; set; } + public virtual System.IO.Pipelines.PipeWriter BodyWriter { get => throw null; } + public virtual System.Threading.Tasks.Task CompleteAsync() => throw null; + public abstract System.Int64? ContentLength { get; set; } + public abstract string ContentType { get; set; } + public abstract Microsoft.AspNetCore.Http.IResponseCookies Cookies { get; } + public abstract bool HasStarted { get; } + public abstract Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; } + public abstract Microsoft.AspNetCore.Http.HttpContext HttpContext { get; } + protected HttpResponse() => throw null; + public virtual void OnCompleted(System.Func callback) => throw null; + public abstract void OnCompleted(System.Func callback, object state); + public virtual void OnStarting(System.Func callback) => throw null; + public abstract void OnStarting(System.Func callback, object state); + public virtual void Redirect(string location) => throw null; + public abstract void Redirect(string location, bool permanent); + public virtual void RegisterForDispose(System.IDisposable disposable) => throw null; + public virtual void RegisterForDisposeAsync(System.IAsyncDisposable disposable) => throw null; + public virtual System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract int StatusCode { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.HttpResponseWritingExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpResponseWritingExtensions + { + public static System.Threading.Tasks.Task WriteAsync(this Microsoft.AspNetCore.Http.HttpResponse response, string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsync(this Microsoft.AspNetCore.Http.HttpResponse response, string text, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.IHttpContextAccessor` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpContextAccessor + { + Microsoft.AspNetCore.Http.HttpContext HttpContext { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.IHttpContextFactory` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpContextFactory + { + Microsoft.AspNetCore.Http.HttpContext Create(Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection); + void Dispose(Microsoft.AspNetCore.Http.HttpContext httpContext); + } + + // Generated from `Microsoft.AspNetCore.Http.IMiddleware` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMiddleware + { + System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next); + } + + // Generated from `Microsoft.AspNetCore.Http.IMiddlewareFactory` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMiddlewareFactory + { + Microsoft.AspNetCore.Http.IMiddleware Create(System.Type middlewareType); + void Release(Microsoft.AspNetCore.Http.IMiddleware middleware); + } + + // Generated from `Microsoft.AspNetCore.Http.PathString` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PathString : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Http.PathString left, Microsoft.AspNetCore.Http.PathString right) => throw null; + public static string operator +(string left, Microsoft.AspNetCore.Http.PathString right) => throw null; + public static string operator +(Microsoft.AspNetCore.Http.PathString left, string right) => throw null; + public static string operator +(Microsoft.AspNetCore.Http.PathString left, Microsoft.AspNetCore.Http.QueryString right) => throw null; + public static Microsoft.AspNetCore.Http.PathString operator +(Microsoft.AspNetCore.Http.PathString left, Microsoft.AspNetCore.Http.PathString right) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Http.PathString left, Microsoft.AspNetCore.Http.PathString right) => throw null; + public string Add(Microsoft.AspNetCore.Http.QueryString other) => throw null; + public Microsoft.AspNetCore.Http.PathString Add(Microsoft.AspNetCore.Http.PathString other) => throw null; + public static Microsoft.AspNetCore.Http.PathString Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Http.PathString other, System.StringComparison comparisonType) => throw null; + public bool Equals(Microsoft.AspNetCore.Http.PathString other) => throw null; + public static Microsoft.AspNetCore.Http.PathString FromUriComponent(string uriComponent) => throw null; + public static Microsoft.AspNetCore.Http.PathString FromUriComponent(System.Uri uri) => throw null; + public override int GetHashCode() => throw null; + public bool HasValue { get => throw null; } + public PathString(string value) => throw null; + // Stub generator skipped constructor + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other, out Microsoft.AspNetCore.Http.PathString remaining) => throw null; + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other, out Microsoft.AspNetCore.Http.PathString matched, out Microsoft.AspNetCore.Http.PathString remaining) => throw null; + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other, System.StringComparison comparisonType, out Microsoft.AspNetCore.Http.PathString remaining) => throw null; + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other, System.StringComparison comparisonType, out Microsoft.AspNetCore.Http.PathString matched, out Microsoft.AspNetCore.Http.PathString remaining) => throw null; + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other, System.StringComparison comparisonType) => throw null; + public bool StartsWithSegments(Microsoft.AspNetCore.Http.PathString other) => throw null; + public override string ToString() => throw null; + public string ToUriComponent() => throw null; + public string Value { get => throw null; } + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `Microsoft.AspNetCore.Http.QueryString` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct QueryString : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Http.QueryString left, Microsoft.AspNetCore.Http.QueryString right) => throw null; + public static Microsoft.AspNetCore.Http.QueryString operator +(Microsoft.AspNetCore.Http.QueryString left, Microsoft.AspNetCore.Http.QueryString right) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Http.QueryString left, Microsoft.AspNetCore.Http.QueryString right) => throw null; + public Microsoft.AspNetCore.Http.QueryString Add(string name, string value) => throw null; + public Microsoft.AspNetCore.Http.QueryString Add(Microsoft.AspNetCore.Http.QueryString other) => throw null; + public static Microsoft.AspNetCore.Http.QueryString Create(string name, string value) => throw null; + public static Microsoft.AspNetCore.Http.QueryString Create(System.Collections.Generic.IEnumerable> parameters) => throw null; + public static Microsoft.AspNetCore.Http.QueryString Create(System.Collections.Generic.IEnumerable> parameters) => throw null; + public static Microsoft.AspNetCore.Http.QueryString Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Http.QueryString other) => throw null; + public static Microsoft.AspNetCore.Http.QueryString FromUriComponent(string uriComponent) => throw null; + public static Microsoft.AspNetCore.Http.QueryString FromUriComponent(System.Uri uri) => throw null; + public override int GetHashCode() => throw null; + public bool HasValue { get => throw null; } + public QueryString(string value) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + public string ToUriComponent() => throw null; + public string Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.RequestDelegate` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task RequestDelegate(Microsoft.AspNetCore.Http.HttpContext context); + + // Generated from `Microsoft.AspNetCore.Http.RequestTrailerExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RequestTrailerExtensions + { + public static bool CheckTrailersAvailable(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public static Microsoft.Extensions.Primitives.StringValues GetDeclaredTrailers(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public static Microsoft.Extensions.Primitives.StringValues GetTrailer(this Microsoft.AspNetCore.Http.HttpRequest request, string trailerName) => throw null; + public static bool SupportsTrailers(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.ResponseTrailerExtensions` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseTrailerExtensions + { + public static void AppendTrailer(this Microsoft.AspNetCore.Http.HttpResponse response, string trailerName, Microsoft.Extensions.Primitives.StringValues trailerValues) => throw null; + public static void DeclareTrailer(this Microsoft.AspNetCore.Http.HttpResponse response, string trailerName) => throw null; + public static bool SupportsTrailers(this Microsoft.AspNetCore.Http.HttpResponse response) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.StatusCodes` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StatusCodes + { + public const int Status100Continue = default; + public const int Status101SwitchingProtocols = default; + public const int Status102Processing = default; + public const int Status200OK = default; + public const int Status201Created = default; + public const int Status202Accepted = default; + public const int Status203NonAuthoritative = default; + public const int Status204NoContent = default; + public const int Status205ResetContent = default; + public const int Status206PartialContent = default; + public const int Status207MultiStatus = default; + public const int Status208AlreadyReported = default; + public const int Status226IMUsed = default; + public const int Status300MultipleChoices = default; + public const int Status301MovedPermanently = default; + public const int Status302Found = default; + public const int Status303SeeOther = default; + public const int Status304NotModified = default; + public const int Status305UseProxy = default; + public const int Status306SwitchProxy = default; + public const int Status307TemporaryRedirect = default; + public const int Status308PermanentRedirect = default; + public const int Status400BadRequest = default; + public const int Status401Unauthorized = default; + public const int Status402PaymentRequired = default; + public const int Status403Forbidden = default; + public const int Status404NotFound = default; + public const int Status405MethodNotAllowed = default; + public const int Status406NotAcceptable = default; + public const int Status407ProxyAuthenticationRequired = default; + public const int Status408RequestTimeout = default; + public const int Status409Conflict = default; + public const int Status410Gone = default; + public const int Status411LengthRequired = default; + public const int Status412PreconditionFailed = default; + public const int Status413PayloadTooLarge = default; + public const int Status413RequestEntityTooLarge = default; + public const int Status414RequestUriTooLong = default; + public const int Status414UriTooLong = default; + public const int Status415UnsupportedMediaType = default; + public const int Status416RangeNotSatisfiable = default; + public const int Status416RequestedRangeNotSatisfiable = default; + public const int Status417ExpectationFailed = default; + public const int Status418ImATeapot = default; + public const int Status419AuthenticationTimeout = default; + public const int Status421MisdirectedRequest = default; + public const int Status422UnprocessableEntity = default; + public const int Status423Locked = default; + public const int Status424FailedDependency = default; + public const int Status426UpgradeRequired = default; + public const int Status428PreconditionRequired = default; + public const int Status429TooManyRequests = default; + public const int Status431RequestHeaderFieldsTooLarge = default; + public const int Status451UnavailableForLegalReasons = default; + public const int Status500InternalServerError = default; + public const int Status501NotImplemented = default; + public const int Status502BadGateway = default; + public const int Status503ServiceUnavailable = default; + public const int Status504GatewayTimeout = default; + public const int Status505HttpVersionNotsupported = default; + public const int Status506VariantAlsoNegotiates = default; + public const int Status507InsufficientStorage = default; + public const int Status508LoopDetected = default; + public const int Status510NotExtended = default; + public const int Status511NetworkAuthenticationRequired = default; + } + + // Generated from `Microsoft.AspNetCore.Http.WebSocketManager` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class WebSocketManager + { + public virtual System.Threading.Tasks.Task AcceptWebSocketAsync() => throw null; + public abstract System.Threading.Tasks.Task AcceptWebSocketAsync(string subProtocol); + public abstract bool IsWebSocketRequest { get; } + protected WebSocketManager() => throw null; + public abstract System.Collections.Generic.IList WebSocketRequestedProtocols { get; } + } + + namespace Features + { + // Generated from `Microsoft.AspNetCore.Http.Features.IEndpointFeature` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointFeature + { + Microsoft.AspNetCore.Http.Endpoint Endpoint { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IRouteValuesFeature` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteValuesFeature + { + Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get; set; } + } + + } + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Routing.RouteValueDictionary` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValueDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Add(string key, object value) => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IEqualityComparer Comparer { get => throw null; } + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string key) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + // Generated from `Microsoft.AspNetCore.Routing.RouteValueDictionary.Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(Microsoft.AspNetCore.Routing.RouteValueDictionary dictionary) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public static Microsoft.AspNetCore.Routing.RouteValueDictionary FromArray(System.Collections.Generic.KeyValuePair[] items) => throw null; + public Microsoft.AspNetCore.Routing.RouteValueDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + public object this[string key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + public bool Remove(string key, out object value) => throw null; + public bool Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public RouteValueDictionary(object values) => throw null; + public RouteValueDictionary() => throw null; + public bool TryAdd(string key, object value) => throw null; + public bool TryGetValue(string key, out object value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs new file mode 100644 index 000000000000..2d0d0b1821ae --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs @@ -0,0 +1,60 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Http + { + namespace Connections + { + // Generated from `Microsoft.AspNetCore.Http.Connections.AvailableTransport` in `Microsoft.AspNetCore.Http.Connections.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AvailableTransport + { + public AvailableTransport() => throw null; + public System.Collections.Generic.IList TransferFormats { get => throw null; set => throw null; } + public string Transport { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.HttpTransportType` in `Microsoft.AspNetCore.Http.Connections.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum HttpTransportType + { + // Stub generator skipped constructor + LongPolling, + None, + ServerSentEvents, + WebSockets, + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.HttpTransports` in `Microsoft.AspNetCore.Http.Connections.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpTransports + { + public static Microsoft.AspNetCore.Http.Connections.HttpTransportType All; + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.NegotiateProtocol` in `Microsoft.AspNetCore.Http.Connections.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class NegotiateProtocol + { + public static Microsoft.AspNetCore.Http.Connections.NegotiationResponse ParseResponse(System.ReadOnlySpan content) => throw null; + public static Microsoft.AspNetCore.Http.Connections.NegotiationResponse ParseResponse(System.IO.Stream content) => throw null; + public static void WriteResponse(Microsoft.AspNetCore.Http.Connections.NegotiationResponse response, System.Buffers.IBufferWriter output) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.NegotiationResponse` in `Microsoft.AspNetCore.Http.Connections.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NegotiationResponse + { + public string AccessToken { get => throw null; set => throw null; } + public System.Collections.Generic.IList AvailableTransports { get => throw null; set => throw null; } + public string ConnectionId { get => throw null; set => throw null; } + public string ConnectionToken { get => throw null; set => throw null; } + public string Error { get => throw null; set => throw null; } + public NegotiationResponse() => throw null; + public string Url { get => throw null; set => throw null; } + public int Version { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs new file mode 100644 index 000000000000..2ccdae419369 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs @@ -0,0 +1,126 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilder` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionEndpointRouteBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + public void Add(System.Action convention) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConnectionEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Action configureOptions) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler => throw null; + public static Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilder MapConnectionHandler(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) where TConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler => throw null; + public static Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Builder.ConnectionEndpointRouteBuilder MapConnections(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions options, System.Action configure) => throw null; + } + + } + namespace Http + { + namespace Connections + { + // Generated from `Microsoft.AspNetCore.Http.Connections.ConnectionOptions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionOptions + { + public ConnectionOptions() => throw null; + public System.TimeSpan? DisconnectTimeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.ConnectionOptionsSetup` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConnectionOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions + { + public void Configure(Microsoft.AspNetCore.Http.Connections.ConnectionOptions options) => throw null; + public ConnectionOptionsSetup() => throw null; + public static System.TimeSpan DefaultDisconectTimeout; + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.HttpConnectionContextExtensions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpConnectionContextExtensions + { + public static Microsoft.AspNetCore.Http.HttpContext GetHttpContext(this Microsoft.AspNetCore.Connections.ConnectionContext connection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpConnectionDispatcherOptions + { + public System.Int64 ApplicationMaxBufferSize { get => throw null; set => throw null; } + public System.Collections.Generic.IList AuthorizationData { get => throw null; } + public HttpConnectionDispatcherOptions() => throw null; + public Microsoft.AspNetCore.Http.Connections.LongPollingOptions LongPolling { get => throw null; } + public int MinimumProtocolVersion { get => throw null; set => throw null; } + public System.Int64 TransportMaxBufferSize { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.Connections.HttpTransportType Transports { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.Connections.WebSocketOptions WebSockets { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.LongPollingOptions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LongPollingOptions + { + public LongPollingOptions() => throw null; + public System.TimeSpan PollTimeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.NegotiateMetadata` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NegotiateMetadata + { + public NegotiateMetadata() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.WebSocketOptions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebSocketOptions + { + public System.TimeSpan CloseTimeout { get => throw null; set => throw null; } + public System.Func, string> SubProtocolSelector { get => throw null; set => throw null; } + public WebSocketOptions() => throw null; + } + + namespace Features + { + // Generated from `Microsoft.AspNetCore.Http.Connections.Features.IHttpContextFeature` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpContextFeature + { + Microsoft.AspNetCore.Http.HttpContext HttpContext { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Connections.Features.IHttpTransportFeature` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpTransportFeature + { + Microsoft.AspNetCore.Http.Connections.HttpTransportType TransportType { get; } + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ConnectionsDependencyInjectionExtensions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConnectionsDependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddConnections(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action options) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddConnections(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} +namespace System +{ + namespace Threading + { + namespace Tasks + { + /* Duplicate type 'TaskExtensions' is not stubbed in this assembly 'Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs new file mode 100644 index 000000000000..2618a8b55df8 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs @@ -0,0 +1,187 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Http + { + // Generated from `Microsoft.AspNetCore.Http.HeaderDictionaryTypeExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HeaderDictionaryTypeExtensions + { + public static void AppendList(this Microsoft.AspNetCore.Http.IHeaderDictionary Headers, string name, System.Collections.Generic.IList values) => throw null; + public static Microsoft.AspNetCore.Http.Headers.ResponseHeaders GetTypedHeaders(this Microsoft.AspNetCore.Http.HttpResponse response) => throw null; + public static Microsoft.AspNetCore.Http.Headers.RequestHeaders GetTypedHeaders(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpContextServerVariableExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpContextServerVariableExtensions + { + public static string GetServerVariable(this Microsoft.AspNetCore.Http.HttpContext context, string variableName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpRequestJsonExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpRequestJsonExtensions + { + public static bool HasJsonContentType(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public static System.Threading.Tasks.ValueTask ReadFromJsonAsync(this Microsoft.AspNetCore.Http.HttpRequest request, System.Type type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.ValueTask ReadFromJsonAsync(this Microsoft.AspNetCore.Http.HttpRequest request, System.Type type, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.ValueTask ReadFromJsonAsync(this Microsoft.AspNetCore.Http.HttpRequest request, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.ValueTask ReadFromJsonAsync(this Microsoft.AspNetCore.Http.HttpRequest request, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpResponseJsonExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpResponseJsonExtensions + { + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Text.Json.JsonSerializerOptions options, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, TValue value, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, object value, System.Type type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, object value, System.Type type, System.Text.Json.JsonSerializerOptions options, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAsJsonAsync(this Microsoft.AspNetCore.Http.HttpResponse response, object value, System.Type type, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.ResponseExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseExtensions + { + public static void Clear(this Microsoft.AspNetCore.Http.HttpResponse response) => throw null; + public static void Redirect(this Microsoft.AspNetCore.Http.HttpResponse response, string location, bool permanent, bool preserveMethod) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.SendFileResponseExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SendFileResponseExtensions + { + public static System.Threading.Tasks.Task SendFileAsync(this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendFileAsync(this Microsoft.AspNetCore.Http.HttpResponse response, string fileName, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendFileAsync(this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendFileAsync(this Microsoft.AspNetCore.Http.HttpResponse response, Microsoft.Extensions.FileProviders.IFileInfo file, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.SessionExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SessionExtensions + { + public static System.Byte[] Get(this Microsoft.AspNetCore.Http.ISession session, string key) => throw null; + public static int? GetInt32(this Microsoft.AspNetCore.Http.ISession session, string key) => throw null; + public static string GetString(this Microsoft.AspNetCore.Http.ISession session, string key) => throw null; + public static void SetInt32(this Microsoft.AspNetCore.Http.ISession session, string key, int value) => throw null; + public static void SetString(this Microsoft.AspNetCore.Http.ISession session, string key, string value) => throw null; + } + + namespace Extensions + { + // Generated from `Microsoft.AspNetCore.Http.Extensions.HttpRequestMultipartExtensions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpRequestMultipartExtensions + { + public static string GetMultipartBoundary(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Extensions.QueryBuilder` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryBuilder : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + public void Add(string key, string value) => throw null; + public void Add(string key, System.Collections.Generic.IEnumerable values) => throw null; + public override bool Equals(object obj) => throw null; + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public QueryBuilder(System.Collections.Generic.IEnumerable> parameters) => throw null; + public QueryBuilder(System.Collections.Generic.IEnumerable> parameters) => throw null; + public QueryBuilder() => throw null; + public Microsoft.AspNetCore.Http.QueryString ToQueryString() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Extensions.StreamCopyOperation` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StreamCopyOperation + { + public static System.Threading.Tasks.Task CopyToAsync(System.IO.Stream source, System.IO.Stream destination, System.Int64? count, int bufferSize, System.Threading.CancellationToken cancel) => throw null; + public static System.Threading.Tasks.Task CopyToAsync(System.IO.Stream source, System.IO.Stream destination, System.Int64? count, System.Threading.CancellationToken cancel) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Extensions.UriHelper` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UriHelper + { + public static string BuildAbsolute(string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.PathString path = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.QueryString query = default(Microsoft.AspNetCore.Http.QueryString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString)) => throw null; + public static string BuildRelative(Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.PathString path = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.QueryString query = default(Microsoft.AspNetCore.Http.QueryString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString)) => throw null; + public static string Encode(System.Uri uri) => throw null; + public static void FromAbsolute(string uri, out string scheme, out Microsoft.AspNetCore.Http.HostString host, out Microsoft.AspNetCore.Http.PathString path, out Microsoft.AspNetCore.Http.QueryString query, out Microsoft.AspNetCore.Http.FragmentString fragment) => throw null; + public static string GetDisplayUrl(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public static string GetEncodedPathAndQuery(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public static string GetEncodedUrl(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + } + + } + namespace Headers + { + // Generated from `Microsoft.AspNetCore.Http.Headers.RequestHeaders` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestHeaders + { + public System.Collections.Generic.IList Accept { get => throw null; set => throw null; } + public System.Collections.Generic.IList AcceptCharset { get => throw null; set => throw null; } + public System.Collections.Generic.IList AcceptEncoding { get => throw null; set => throw null; } + public System.Collections.Generic.IList AcceptLanguage { get => throw null; set => throw null; } + public void Append(string name, object value) => throw null; + public void AppendList(string name, System.Collections.Generic.IList values) => throw null; + public Microsoft.Net.Http.Headers.CacheControlHeaderValue CacheControl { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.ContentDispositionHeaderValue ContentDisposition { get => throw null; set => throw null; } + public System.Int64? ContentLength { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.ContentRangeHeaderValue ContentRange { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.MediaTypeHeaderValue ContentType { get => throw null; set => throw null; } + public System.Collections.Generic.IList Cookie { get => throw null; set => throw null; } + public System.DateTimeOffset? Date { get => throw null; set => throw null; } + public System.DateTimeOffset? Expires { get => throw null; set => throw null; } + public T Get(string name) => throw null; + public System.Collections.Generic.IList GetList(string name) => throw null; + public Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get => throw null; } + public Microsoft.AspNetCore.Http.HostString Host { get => throw null; set => throw null; } + public System.Collections.Generic.IList IfMatch { get => throw null; set => throw null; } + public System.DateTimeOffset? IfModifiedSince { get => throw null; set => throw null; } + public System.Collections.Generic.IList IfNoneMatch { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.RangeConditionHeaderValue IfRange { get => throw null; set => throw null; } + public System.DateTimeOffset? IfUnmodifiedSince { get => throw null; set => throw null; } + public System.DateTimeOffset? LastModified { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.RangeHeaderValue Range { get => throw null; set => throw null; } + public System.Uri Referer { get => throw null; set => throw null; } + public RequestHeaders(Microsoft.AspNetCore.Http.IHeaderDictionary headers) => throw null; + public void Set(string name, object value) => throw null; + public void SetList(string name, System.Collections.Generic.IList values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Headers.ResponseHeaders` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseHeaders + { + public void Append(string name, object value) => throw null; + public void AppendList(string name, System.Collections.Generic.IList values) => throw null; + public Microsoft.Net.Http.Headers.CacheControlHeaderValue CacheControl { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.ContentDispositionHeaderValue ContentDisposition { get => throw null; set => throw null; } + public System.Int64? ContentLength { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.ContentRangeHeaderValue ContentRange { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.MediaTypeHeaderValue ContentType { get => throw null; set => throw null; } + public System.DateTimeOffset? Date { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.EntityTagHeaderValue ETag { get => throw null; set => throw null; } + public System.DateTimeOffset? Expires { get => throw null; set => throw null; } + public T Get(string name) => throw null; + public System.Collections.Generic.IList GetList(string name) => throw null; + public Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get => throw null; } + public System.DateTimeOffset? LastModified { get => throw null; set => throw null; } + public System.Uri Location { get => throw null; set => throw null; } + public ResponseHeaders(Microsoft.AspNetCore.Http.IHeaderDictionary headers) => throw null; + public void Set(string name, object value) => throw null; + public System.Collections.Generic.IList SetCookie { get => throw null; set => throw null; } + public void SetList(string name, System.Collections.Generic.IList values) => throw null; + } + + } + namespace Json + { + // Generated from `Microsoft.AspNetCore.Http.Json.JsonOptions` in `Microsoft.AspNetCore.Http.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonOptions + { + public JsonOptions() => throw null; + public System.Text.Json.JsonSerializerOptions SerializerOptions { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs new file mode 100644 index 000000000000..35413e0766d5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs @@ -0,0 +1,406 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Http + { + // Generated from `Microsoft.AspNetCore.Http.CookieOptions` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieOptions + { + public CookieOptions() => throw null; + public string Domain { get => throw null; set => throw null; } + public System.DateTimeOffset? Expires { get => throw null; set => throw null; } + public bool HttpOnly { get => throw null; set => throw null; } + public bool IsEssential { get => throw null; set => throw null; } + public System.TimeSpan? MaxAge { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.SameSiteMode SameSite { get => throw null; set => throw null; } + public bool Secure { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.IFormCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFormCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + bool ContainsKey(string key); + int Count { get; } + Microsoft.AspNetCore.Http.IFormFileCollection Files { get; } + Microsoft.Extensions.Primitives.StringValues this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value); + } + + // Generated from `Microsoft.AspNetCore.Http.IFormFile` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFormFile + { + string ContentDisposition { get; } + string ContentType { get; } + void CopyTo(System.IO.Stream target); + System.Threading.Tasks.Task CopyToAsync(System.IO.Stream target, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + string FileName { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; } + System.Int64 Length { get; } + string Name { get; } + System.IO.Stream OpenReadStream(); + } + + // Generated from `Microsoft.AspNetCore.Http.IFormFileCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFormFileCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + Microsoft.AspNetCore.Http.IFormFile GetFile(string name); + System.Collections.Generic.IReadOnlyList GetFiles(string name); + Microsoft.AspNetCore.Http.IFormFile this[string name] { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.IHeaderDictionary` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHeaderDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + System.Int64? ContentLength { get; set; } + Microsoft.Extensions.Primitives.StringValues this[string key] { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.IQueryCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IQueryCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + bool ContainsKey(string key); + int Count { get; } + Microsoft.Extensions.Primitives.StringValues this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value); + } + + // Generated from `Microsoft.AspNetCore.Http.IRequestCookieCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestCookieCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + bool ContainsKey(string key); + int Count { get; } + string this[string key] { get; } + System.Collections.Generic.ICollection Keys { get; } + bool TryGetValue(string key, out string value); + } + + // Generated from `Microsoft.AspNetCore.Http.IResponseCookies` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResponseCookies + { + void Append(string key, string value, Microsoft.AspNetCore.Http.CookieOptions options); + void Append(string key, string value); + void Delete(string key, Microsoft.AspNetCore.Http.CookieOptions options); + void Delete(string key); + } + + // Generated from `Microsoft.AspNetCore.Http.ISession` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISession + { + void Clear(); + System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + string Id { get; } + bool IsAvailable { get; } + System.Collections.Generic.IEnumerable Keys { get; } + System.Threading.Tasks.Task LoadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Remove(string key); + void Set(string key, System.Byte[] value); + bool TryGetValue(string key, out System.Byte[] value); + } + + // Generated from `Microsoft.AspNetCore.Http.SameSiteMode` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum SameSiteMode + { + Lax, + None, + // Stub generator skipped constructor + Strict, + Unspecified, + } + + // Generated from `Microsoft.AspNetCore.Http.WebSocketAcceptContext` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebSocketAcceptContext + { + public virtual string SubProtocol { get => throw null; set => throw null; } + public WebSocketAcceptContext() => throw null; + } + + namespace Features + { + // Generated from `Microsoft.AspNetCore.Http.Features.FeatureCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FeatureCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, Microsoft.AspNetCore.Http.Features.IFeatureCollection + { + public FeatureCollection(Microsoft.AspNetCore.Http.Features.IFeatureCollection defaults) => throw null; + public FeatureCollection() => throw null; + public TFeature Get() => throw null; + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public object this[System.Type key] { get => throw null; set => throw null; } + public virtual int Revision { get => throw null; } + public void Set(TFeature instance) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.FeatureReference<>` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FeatureReference + { + public static Microsoft.AspNetCore.Http.Features.FeatureReference Default; + // Stub generator skipped constructor + public T Fetch(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + public T Update(Microsoft.AspNetCore.Http.Features.IFeatureCollection features, T feature) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.FeatureReferences<>` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FeatureReferences + { + public TCache Cache; + public Microsoft.AspNetCore.Http.Features.IFeatureCollection Collection { get => throw null; } + public FeatureReferences(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection) => throw null; + // Stub generator skipped constructor + public TFeature Fetch(ref TFeature cached, System.Func factory) where TFeature : class => throw null; + public TFeature Fetch(ref TFeature cached, TState state, System.Func factory) where TFeature : class => throw null; + public void Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection, int revision) => throw null; + public void Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection collection) => throw null; + public int Revision { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpsCompressionMode` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HttpsCompressionMode + { + Compress, + Default, + DoNotCompress, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IFeatureCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFeatureCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + TFeature Get(); + bool IsReadOnly { get; } + object this[System.Type key] { get; set; } + int Revision { get; } + void Set(TFeature instance); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IFormFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFormFeature + { + Microsoft.AspNetCore.Http.IFormCollection Form { get; set; } + bool HasFormContentType { get; } + Microsoft.AspNetCore.Http.IFormCollection ReadForm(); + System.Threading.Tasks.Task ReadFormAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpBodyControlFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpBodyControlFeature + { + bool AllowSynchronousIO { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpBufferingFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpBufferingFeature + { + void DisableRequestBuffering(); + void DisableResponseBuffering(); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpConnectionFeature + { + string ConnectionId { get; set; } + System.Net.IPAddress LocalIpAddress { get; set; } + int LocalPort { get; set; } + System.Net.IPAddress RemoteIpAddress { get; set; } + int RemotePort { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpMaxRequestBodySizeFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMaxRequestBodySizeFeature + { + bool IsReadOnly { get; } + System.Int64? MaxRequestBodySize { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpRequestBodyDetectionFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestBodyDetectionFeature + { + bool CanHaveBody { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpRequestFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestFeature + { + System.IO.Stream Body { get; set; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; set; } + string Method { get; set; } + string Path { get; set; } + string PathBase { get; set; } + string Protocol { get; set; } + string QueryString { get; set; } + string RawTarget { get; set; } + string Scheme { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpRequestIdentifierFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestIdentifierFeature + { + string TraceIdentifier { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestLifetimeFeature + { + void Abort(); + System.Threading.CancellationToken RequestAborted { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpRequestTrailersFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestTrailersFeature + { + bool Available { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Trailers { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpResetFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpResetFeature + { + void Reset(int errorCode); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpResponseBodyFeature + { + System.Threading.Tasks.Task CompleteAsync(); + void DisableBuffering(); + System.Threading.Tasks.Task SendFileAsync(string path, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.IO.Stream Stream { get; } + System.IO.Pipelines.PipeWriter Writer { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpResponseFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpResponseFeature + { + System.IO.Stream Body { get; set; } + bool HasStarted { get; } + Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get; set; } + void OnCompleted(System.Func callback, object state); + void OnStarting(System.Func callback, object state); + string ReasonPhrase { get; set; } + int StatusCode { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpResponseTrailersFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpResponseTrailersFeature + { + Microsoft.AspNetCore.Http.IHeaderDictionary Trailers { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpSendFileFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpSendFileFeature + { + System.Threading.Tasks.Task SendFileAsync(string path, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellation); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpUpgradeFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpUpgradeFeature + { + bool IsUpgradableRequest { get; } + System.Threading.Tasks.Task UpgradeAsync(); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpWebSocketFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpWebSocketFeature + { + System.Threading.Tasks.Task AcceptAsync(Microsoft.AspNetCore.Http.WebSocketAcceptContext context); + bool IsWebSocketRequest { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IHttpsCompressionFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpsCompressionFeature + { + Microsoft.AspNetCore.Http.Features.HttpsCompressionMode Mode { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IItemsFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IItemsFeature + { + System.Collections.Generic.IDictionary Items { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IQueryFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IQueryFeature + { + Microsoft.AspNetCore.Http.IQueryCollection Query { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IRequestBodyPipeFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestBodyPipeFeature + { + System.IO.Pipelines.PipeReader Reader { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IRequestCookiesFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestCookiesFeature + { + Microsoft.AspNetCore.Http.IRequestCookieCollection Cookies { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IResponseCookiesFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResponseCookiesFeature + { + Microsoft.AspNetCore.Http.IResponseCookies Cookies { get; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IServerVariablesFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServerVariablesFeature + { + string this[string variableName] { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.IServiceProvidersFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServiceProvidersFeature + { + System.IServiceProvider RequestServices { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ISessionFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISessionFeature + { + Microsoft.AspNetCore.Http.ISession Session { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ITlsConnectionFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITlsConnectionFeature + { + System.Security.Cryptography.X509Certificates.X509Certificate2 ClientCertificate { get; set; } + System.Threading.Tasks.Task GetClientCertificateAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ITlsTokenBindingFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITlsTokenBindingFeature + { + System.Byte[] GetProvidedTokenBindingId(); + System.Byte[] GetReferredTokenBindingId(); + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ITrackingConsentFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITrackingConsentFeature + { + bool CanTrack { get; } + string CreateConsentCookie(); + void GrantConsent(); + bool HasConsent { get; } + bool IsConsentNeeded { get; } + void WithdrawConsent(); + } + + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpAuthenticationFeature + { + System.Security.Claims.ClaimsPrincipal User { get; set; } + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs new file mode 100644 index 000000000000..b07116c946ec --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs @@ -0,0 +1,438 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ApplicationBuilder` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationBuilder : Microsoft.AspNetCore.Builder.IApplicationBuilder + { + public ApplicationBuilder(System.IServiceProvider serviceProvider, object server) => throw null; + public ApplicationBuilder(System.IServiceProvider serviceProvider) => throw null; + public System.IServiceProvider ApplicationServices { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.RequestDelegate Build() => throw null; + public Microsoft.AspNetCore.Builder.IApplicationBuilder New() => throw null; + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public Microsoft.AspNetCore.Http.Features.IFeatureCollection ServerFeatures { get => throw null; } + public Microsoft.AspNetCore.Builder.IApplicationBuilder Use(System.Func middleware) => throw null; + } + + } + namespace Http + { + // Generated from `Microsoft.AspNetCore.Http.BindingAddress` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingAddress + { + public BindingAddress() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Host { get => throw null; } + public bool IsUnixPipe { get => throw null; } + public static Microsoft.AspNetCore.Http.BindingAddress Parse(string address) => throw null; + public string PathBase { get => throw null; } + public int Port { get => throw null; set => throw null; } + public string Scheme { get => throw null; } + public override string ToString() => throw null; + public string UnixPipePath { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.DefaultHttpContext` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultHttpContext : Microsoft.AspNetCore.Http.HttpContext + { + public override void Abort() => throw null; + public override Microsoft.AspNetCore.Http.ConnectionInfo Connection { get => throw null; } + public DefaultHttpContext(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + public DefaultHttpContext() => throw null; + public override Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get => throw null; } + public Microsoft.AspNetCore.Http.Features.FormOptions FormOptions { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public void Initialize(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + public override System.Collections.Generic.IDictionary Items { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public override System.Threading.CancellationToken RequestAborted { get => throw null; set => throw null; } + public override System.IServiceProvider RequestServices { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.Extensions.DependencyInjection.IServiceScopeFactory ServiceScopeFactory { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Http.ISession Session { get => throw null; set => throw null; } + public override string TraceIdentifier { get => throw null; set => throw null; } + public void Uninitialize() => throw null; + public override System.Security.Claims.ClaimsPrincipal User { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Http.WebSocketManager WebSockets { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.FormCollection` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, Microsoft.AspNetCore.Http.IFormCollection + { + public bool ContainsKey(string key) => throw null; + public int Count { get => throw null; } + public static Microsoft.AspNetCore.Http.FormCollection Empty; + // Generated from `Microsoft.AspNetCore.Http.FormCollection.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public Microsoft.AspNetCore.Http.IFormFileCollection Files { get => throw null; } + public FormCollection(System.Collections.Generic.Dictionary fields, Microsoft.AspNetCore.Http.IFormFileCollection files = default(Microsoft.AspNetCore.Http.IFormFileCollection)) => throw null; + public Microsoft.AspNetCore.Http.FormCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public Microsoft.Extensions.Primitives.StringValues this[string key] { get => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.FormFile` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFile : Microsoft.AspNetCore.Http.IFormFile + { + public string ContentDisposition { get => throw null; set => throw null; } + public string ContentType { get => throw null; set => throw null; } + public void CopyTo(System.IO.Stream target) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream target, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public string FileName { get => throw null; } + public FormFile(System.IO.Stream baseStream, System.Int64 baseStreamOffset, System.Int64 length, string name, string fileName) => throw null; + public Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public System.IO.Stream OpenReadStream() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.FormFileCollection` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFileCollection : System.Collections.Generic.List, System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, Microsoft.AspNetCore.Http.IFormFileCollection + { + public FormFileCollection() => throw null; + public Microsoft.AspNetCore.Http.IFormFile GetFile(string name) => throw null; + public System.Collections.Generic.IReadOnlyList GetFiles(string name) => throw null; + public Microsoft.AspNetCore.Http.IFormFile this[string name] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.HeaderDictionary` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HeaderDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection>, Microsoft.AspNetCore.Http.IHeaderDictionary + { + public void Add(string key, Microsoft.Extensions.Primitives.StringValues value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string key) => throw null; + public System.Int64? ContentLength { get => throw null; set => throw null; } + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + // Generated from `Microsoft.AspNetCore.Http.HeaderDictionary.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public Microsoft.AspNetCore.Http.HeaderDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public HeaderDictionary(int capacity) => throw null; + public HeaderDictionary(System.Collections.Generic.Dictionary store) => throw null; + public HeaderDictionary() => throw null; + public bool IsReadOnly { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringValues this[string key] { get => throw null; set => throw null; } + Microsoft.Extensions.Primitives.StringValues System.Collections.Generic.IDictionary.this[string key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public bool Remove(string key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.HttpContextAccessor` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpContextAccessor : Microsoft.AspNetCore.Http.IHttpContextAccessor + { + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; set => throw null; } + public HttpContextAccessor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpContextFactory` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpContextFactory : Microsoft.AspNetCore.Http.IHttpContextFactory + { + public Microsoft.AspNetCore.Http.HttpContext Create(Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection) => throw null; + public void Dispose(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public HttpContextFactory(Microsoft.Extensions.Options.IOptions formOptions, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) => throw null; + public HttpContextFactory(Microsoft.Extensions.Options.IOptions formOptions, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory) => throw null; + public HttpContextFactory(Microsoft.Extensions.Options.IOptions formOptions, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) => throw null; + public HttpContextFactory(Microsoft.Extensions.Options.IOptions formOptions) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.HttpRequestRewindExtensions` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpRequestRewindExtensions + { + public static void EnableBuffering(this Microsoft.AspNetCore.Http.HttpRequest request, int bufferThreshold, System.Int64 bufferLimit) => throw null; + public static void EnableBuffering(this Microsoft.AspNetCore.Http.HttpRequest request, int bufferThreshold) => throw null; + public static void EnableBuffering(this Microsoft.AspNetCore.Http.HttpRequest request, System.Int64 bufferLimit) => throw null; + public static void EnableBuffering(this Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.MiddlewareFactory` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MiddlewareFactory : Microsoft.AspNetCore.Http.IMiddlewareFactory + { + public Microsoft.AspNetCore.Http.IMiddleware Create(System.Type middlewareType) => throw null; + public MiddlewareFactory(System.IServiceProvider serviceProvider) => throw null; + public void Release(Microsoft.AspNetCore.Http.IMiddleware middleware) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.QueryCollection` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, Microsoft.AspNetCore.Http.IQueryCollection + { + public bool ContainsKey(string key) => throw null; + public int Count { get => throw null; } + public static Microsoft.AspNetCore.Http.QueryCollection Empty; + // Generated from `Microsoft.AspNetCore.Http.QueryCollection.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public Microsoft.AspNetCore.Http.QueryCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public Microsoft.Extensions.Primitives.StringValues this[string key] { get => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public QueryCollection(int capacity) => throw null; + public QueryCollection(System.Collections.Generic.Dictionary store) => throw null; + public QueryCollection(Microsoft.AspNetCore.Http.QueryCollection store) => throw null; + public QueryCollection() => throw null; + public bool TryGetValue(string key, out Microsoft.Extensions.Primitives.StringValues value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.RequestFormReaderExtensions` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RequestFormReaderExtensions + { + public static System.Threading.Tasks.Task ReadFormAsync(this Microsoft.AspNetCore.Http.HttpRequest request, Microsoft.AspNetCore.Http.Features.FormOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.SendFileFallback` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SendFileFallback + { + public static System.Threading.Tasks.Task SendFileAsync(System.IO.Stream destination, string filePath, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.StreamResponseBodyFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StreamResponseBodyFeature : Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature + { + public virtual System.Threading.Tasks.Task CompleteAsync() => throw null; + public virtual void DisableBuffering() => throw null; + public void Dispose() => throw null; + public Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature PriorFeature { get => throw null; } + public virtual System.Threading.Tasks.Task SendFileAsync(string path, System.Int64 offset, System.Int64? count, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.IO.Stream Stream { get => throw null; } + public StreamResponseBodyFeature(System.IO.Stream stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature priorFeature) => throw null; + public StreamResponseBodyFeature(System.IO.Stream stream) => throw null; + public System.IO.Pipelines.PipeWriter Writer { get => throw null; } + } + + namespace Features + { + // Generated from `Microsoft.AspNetCore.Http.Features.DefaultSessionFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultSessionFeature : Microsoft.AspNetCore.Http.Features.ISessionFeature + { + public DefaultSessionFeature() => throw null; + public Microsoft.AspNetCore.Http.ISession Session { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.FormFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFeature : Microsoft.AspNetCore.Http.Features.IFormFeature + { + public Microsoft.AspNetCore.Http.IFormCollection Form { get => throw null; set => throw null; } + public FormFeature(Microsoft.AspNetCore.Http.IFormCollection form) => throw null; + public FormFeature(Microsoft.AspNetCore.Http.HttpRequest request, Microsoft.AspNetCore.Http.Features.FormOptions options) => throw null; + public FormFeature(Microsoft.AspNetCore.Http.HttpRequest request) => throw null; + public bool HasFormContentType { get => throw null; } + public Microsoft.AspNetCore.Http.IFormCollection ReadForm() => throw null; + public System.Threading.Tasks.Task ReadFormAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadFormAsync() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.FormOptions` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormOptions + { + public bool BufferBody { get => throw null; set => throw null; } + public System.Int64 BufferBodyLengthLimit { get => throw null; set => throw null; } + public const int DefaultBufferBodyLengthLimit = default; + public const int DefaultMemoryBufferThreshold = default; + public const System.Int64 DefaultMultipartBodyLengthLimit = default; + public const int DefaultMultipartBoundaryLengthLimit = default; + public FormOptions() => throw null; + public int KeyLengthLimit { get => throw null; set => throw null; } + public int MemoryBufferThreshold { get => throw null; set => throw null; } + public System.Int64 MultipartBodyLengthLimit { get => throw null; set => throw null; } + public int MultipartBoundaryLengthLimit { get => throw null; set => throw null; } + public int MultipartHeadersCountLimit { get => throw null; set => throw null; } + public int MultipartHeadersLengthLimit { get => throw null; set => throw null; } + public int ValueCountLimit { get => throw null; set => throw null; } + public int ValueLengthLimit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpConnectionFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpConnectionFeature : Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature + { + public string ConnectionId { get => throw null; set => throw null; } + public HttpConnectionFeature() => throw null; + public System.Net.IPAddress LocalIpAddress { get => throw null; set => throw null; } + public int LocalPort { get => throw null; set => throw null; } + public System.Net.IPAddress RemoteIpAddress { get => throw null; set => throw null; } + public int RemotePort { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpRequestFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpRequestFeature : Microsoft.AspNetCore.Http.Features.IHttpRequestFeature + { + public System.IO.Stream Body { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get => throw null; set => throw null; } + public HttpRequestFeature() => throw null; + public string Method { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public string PathBase { get => throw null; set => throw null; } + public string Protocol { get => throw null; set => throw null; } + public string QueryString { get => throw null; set => throw null; } + public string RawTarget { get => throw null; set => throw null; } + public string Scheme { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpRequestIdentifierFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpRequestIdentifierFeature : Microsoft.AspNetCore.Http.Features.IHttpRequestIdentifierFeature + { + public HttpRequestIdentifierFeature() => throw null; + public string TraceIdentifier { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpRequestLifetimeFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpRequestLifetimeFeature : Microsoft.AspNetCore.Http.Features.IHttpRequestLifetimeFeature + { + public void Abort() => throw null; + public HttpRequestLifetimeFeature() => throw null; + public System.Threading.CancellationToken RequestAborted { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.HttpResponseFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpResponseFeature : Microsoft.AspNetCore.Http.Features.IHttpResponseFeature + { + public System.IO.Stream Body { get => throw null; set => throw null; } + public virtual bool HasStarted { get => throw null; } + public Microsoft.AspNetCore.Http.IHeaderDictionary Headers { get => throw null; set => throw null; } + public HttpResponseFeature() => throw null; + public virtual void OnCompleted(System.Func callback, object state) => throw null; + public virtual void OnStarting(System.Func callback, object state) => throw null; + public string ReasonPhrase { get => throw null; set => throw null; } + public int StatusCode { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ItemsFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ItemsFeature : Microsoft.AspNetCore.Http.Features.IItemsFeature + { + public System.Collections.Generic.IDictionary Items { get => throw null; set => throw null; } + public ItemsFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.QueryFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryFeature : Microsoft.AspNetCore.Http.Features.IQueryFeature + { + public Microsoft.AspNetCore.Http.IQueryCollection Query { get => throw null; set => throw null; } + public QueryFeature(Microsoft.AspNetCore.Http.IQueryCollection query) => throw null; + public QueryFeature(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.RequestBodyPipeFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestBodyPipeFeature : Microsoft.AspNetCore.Http.Features.IRequestBodyPipeFeature + { + public System.IO.Pipelines.PipeReader Reader { get => throw null; } + public RequestBodyPipeFeature(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.RequestCookiesFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestCookiesFeature : Microsoft.AspNetCore.Http.Features.IRequestCookiesFeature + { + public Microsoft.AspNetCore.Http.IRequestCookieCollection Cookies { get => throw null; set => throw null; } + public RequestCookiesFeature(Microsoft.AspNetCore.Http.IRequestCookieCollection cookies) => throw null; + public RequestCookiesFeature(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.RequestServicesFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestServicesFeature : System.IDisposable, System.IAsyncDisposable, Microsoft.AspNetCore.Http.Features.IServiceProvidersFeature + { + public void Dispose() => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public System.IServiceProvider RequestServices { get => throw null; set => throw null; } + public RequestServicesFeature(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory scopeFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ResponseCookiesFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCookiesFeature : Microsoft.AspNetCore.Http.Features.IResponseCookiesFeature + { + public Microsoft.AspNetCore.Http.IResponseCookies Cookies { get => throw null; } + public ResponseCookiesFeature(Microsoft.AspNetCore.Http.Features.IFeatureCollection features, Microsoft.Extensions.ObjectPool.ObjectPool builderPool) => throw null; + public ResponseCookiesFeature(Microsoft.AspNetCore.Http.Features.IFeatureCollection features) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.RouteValuesFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValuesFeature : Microsoft.AspNetCore.Http.Features.IRouteValuesFeature + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public RouteValuesFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.ServiceProvidersFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceProvidersFeature : Microsoft.AspNetCore.Http.Features.IServiceProvidersFeature + { + public System.IServiceProvider RequestServices { get => throw null; set => throw null; } + public ServiceProvidersFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Http.Features.TlsConnectionFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TlsConnectionFeature : Microsoft.AspNetCore.Http.Features.ITlsConnectionFeature + { + public System.Security.Cryptography.X509Certificates.X509Certificate2 ClientCertificate { get => throw null; set => throw null; } + public System.Threading.Tasks.Task GetClientCertificateAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public TlsConnectionFeature() => throw null; + } + + namespace Authentication + { + // Generated from `Microsoft.AspNetCore.Http.Features.Authentication.HttpAuthenticationFeature` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpAuthenticationFeature : Microsoft.AspNetCore.Http.Features.Authentication.IHttpAuthenticationFeature + { + public HttpAuthenticationFeature() => throw null; + public System.Security.Claims.ClaimsPrincipal User { get => throw null; set => throw null; } + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.HttpServiceCollectionExtensions` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpContextAccessor(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs new file mode 100644 index 000000000000..ef3eee26e56b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs @@ -0,0 +1,133 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.CertificateForwardingBuilderExtensions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CertificateForwardingBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCertificateForwarding(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ForwardedHeadersExtensions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ForwardedHeadersExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseForwardedHeaders(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Microsoft.AspNetCore.Builder.ForwardedHeadersOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseForwardedHeaders(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ForwardedHeadersOptions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ForwardedHeadersOptions + { + public System.Collections.Generic.IList AllowedHosts { get => throw null; set => throw null; } + public int? ForwardLimit { get => throw null; set => throw null; } + public string ForwardedForHeaderName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.HttpOverrides.ForwardedHeaders ForwardedHeaders { get => throw null; set => throw null; } + public ForwardedHeadersOptions() => throw null; + public string ForwardedHostHeaderName { get => throw null; set => throw null; } + public string ForwardedProtoHeaderName { get => throw null; set => throw null; } + public System.Collections.Generic.IList KnownNetworks { get => throw null; } + public System.Collections.Generic.IList KnownProxies { get => throw null; } + public string OriginalForHeaderName { get => throw null; set => throw null; } + public string OriginalHostHeaderName { get => throw null; set => throw null; } + public string OriginalProtoHeaderName { get => throw null; set => throw null; } + public bool RequireHeaderSymmetry { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.HttpMethodOverrideExtensions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpMethodOverrideExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHttpMethodOverride(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Microsoft.AspNetCore.Builder.HttpMethodOverrideOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHttpMethodOverride(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HttpMethodOverrideOptions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodOverrideOptions + { + public string FormFieldName { get => throw null; set => throw null; } + public HttpMethodOverrideOptions() => throw null; + } + + } + namespace HttpOverrides + { + // Generated from `Microsoft.AspNetCore.HttpOverrides.CertificateForwardingMiddleware` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CertificateForwardingMiddleware + { + public CertificateForwardingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.CertificateForwardingOptions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CertificateForwardingOptions + { + public CertificateForwardingOptions() => throw null; + public string CertificateHeader { get => throw null; set => throw null; } + public System.Func HeaderConverter; + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.ForwardedHeaders` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum ForwardedHeaders + { + All, + // Stub generator skipped constructor + None, + XForwardedFor, + XForwardedHost, + XForwardedProto, + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.ForwardedHeadersDefaults` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ForwardedHeadersDefaults + { + public static string XForwardedForHeaderName { get => throw null; } + public static string XForwardedHostHeaderName { get => throw null; } + public static string XForwardedProtoHeaderName { get => throw null; } + public static string XOriginalForHeaderName { get => throw null; } + public static string XOriginalHostHeaderName { get => throw null; } + public static string XOriginalProtoHeaderName { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.ForwardedHeadersMiddleware` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ForwardedHeadersMiddleware + { + public void ApplyForwarders(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public ForwardedHeadersMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.HttpMethodOverrideMiddleware` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodOverrideMiddleware + { + public HttpMethodOverrideMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HttpOverrides.IPNetwork` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IPNetwork + { + public bool Contains(System.Net.IPAddress address) => throw null; + public IPNetwork(System.Net.IPAddress prefix, int prefixLength) => throw null; + public System.Net.IPAddress Prefix { get => throw null; } + public int PrefixLength { get => throw null; } + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.CertificateForwardingServiceExtensions` in `Microsoft.AspNetCore.HttpOverrides, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CertificateForwardingServiceExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddCertificateForwarding(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs new file mode 100644 index 000000000000..ba8a90943474 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs @@ -0,0 +1,72 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.HstsBuilderExtensions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HstsBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHsts(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HstsServicesExtensions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HstsServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHsts(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HttpsPolicyBuilderExtensions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpsPolicyBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseHttpsRedirection(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HttpsRedirectionServicesExtensions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpsRedirectionServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpsRedirection(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + } + namespace HttpsPolicy + { + // Generated from `Microsoft.AspNetCore.HttpsPolicy.HstsMiddleware` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HstsMiddleware + { + public HstsMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public HstsMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HttpsPolicy.HstsOptions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HstsOptions + { + public System.Collections.Generic.IList ExcludedHosts { get => throw null; } + public HstsOptions() => throw null; + public bool IncludeSubDomains { get => throw null; set => throw null; } + public System.TimeSpan MaxAge { get => throw null; set => throw null; } + public bool Preload { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpsRedirectionMiddleware + { + public HttpsRedirectionMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Configuration.IConfiguration config, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Hosting.Server.Features.IServerAddressesFeature serverAddressesFeature) => throw null; + public HttpsRedirectionMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Configuration.IConfiguration config, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionOptions` in `Microsoft.AspNetCore.HttpsPolicy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpsRedirectionOptions + { + public int? HttpsPort { get => throw null; set => throw null; } + public HttpsRedirectionOptions() => throw null; + public int RedirectStatusCode { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs new file mode 100644 index 000000000000..cfeb51d55b2f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs @@ -0,0 +1,208 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Identity + { + // Generated from `Microsoft.AspNetCore.Identity.AspNetRoleManager<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AspNetRoleManager : Microsoft.AspNetCore.Identity.RoleManager, System.IDisposable where TRole : class + { + public AspNetRoleManager(Microsoft.AspNetCore.Identity.IRoleStore store, System.Collections.Generic.IEnumerable> roleValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, Microsoft.Extensions.Logging.ILogger> logger, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor) : base(default(Microsoft.AspNetCore.Identity.IRoleStore), default(System.Collections.Generic.IEnumerable>), default(Microsoft.AspNetCore.Identity.ILookupNormalizer), default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber), default(Microsoft.Extensions.Logging.ILogger>)) => throw null; + protected override System.Threading.CancellationToken CancellationToken { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.AspNetUserManager<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AspNetUserManager : Microsoft.AspNetCore.Identity.UserManager, System.IDisposable where TUser : class + { + public AspNetUserManager(Microsoft.AspNetCore.Identity.IUserStore store, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Identity.IPasswordHasher passwordHasher, System.Collections.Generic.IEnumerable> userValidators, System.Collections.Generic.IEnumerable> passwordValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, System.IServiceProvider services, Microsoft.Extensions.Logging.ILogger> logger) : base(default(Microsoft.AspNetCore.Identity.IUserStore), default(Microsoft.Extensions.Options.IOptions), default(Microsoft.AspNetCore.Identity.IPasswordHasher), default(System.Collections.Generic.IEnumerable>), default(System.Collections.Generic.IEnumerable>), default(Microsoft.AspNetCore.Identity.ILookupNormalizer), default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber), default(System.IServiceProvider), default(Microsoft.Extensions.Logging.ILogger>)) => throw null; + protected override System.Threading.CancellationToken CancellationToken { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataProtectionTokenProviderOptions + { + public DataProtectionTokenProviderOptions() => throw null; + public string Name { get => throw null; set => throw null; } + public System.TimeSpan TokenLifespan { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataProtectorTokenProvider : Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider where TUser : class + { + public virtual System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public DataProtectorTokenProvider(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILogger> logger) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public Microsoft.Extensions.Logging.ILogger> Logger { get => throw null; } + public string Name { get => throw null; } + protected Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions Options { get => throw null; } + protected Microsoft.AspNetCore.DataProtection.IDataProtector Protector { get => throw null; } + public virtual System.Threading.Tasks.Task ValidateAsync(string purpose, string token, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.ExternalLoginInfo` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExternalLoginInfo : Microsoft.AspNetCore.Identity.UserLoginInfo + { + public Microsoft.AspNetCore.Authentication.AuthenticationProperties AuthenticationProperties { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable AuthenticationTokens { get => throw null; set => throw null; } + public ExternalLoginInfo(System.Security.Claims.ClaimsPrincipal principal, string loginProvider, string providerKey, string displayName) : base(default(string), default(string), default(string)) => throw null; + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.ISecurityStampValidator` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISecurityStampValidator + { + System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context); + } + + // Generated from `Microsoft.AspNetCore.Identity.ITwoFactorSecurityStampValidator` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITwoFactorSecurityStampValidator : Microsoft.AspNetCore.Identity.ISecurityStampValidator + { + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityBuilderExtensions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class IdentityBuilderExtensions + { + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddDefaultTokenProviders(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) => throw null; + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddSignInManager(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) where TSignInManager : class => throw null; + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddSignInManager(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityConstants` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityConstants + { + public static string ApplicationScheme; + public static string ExternalScheme; + public IdentityConstants() => throw null; + public static string TwoFactorRememberMeScheme; + public static string TwoFactorUserIdScheme; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class IdentityCookieAuthenticationBuilderExtensions + { + public static Microsoft.Extensions.Options.OptionsBuilder AddApplicationCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder AddExternalCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + public static Microsoft.AspNetCore.Identity.IdentityCookiesBuilder AddIdentityCookies(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, System.Action configureCookies) => throw null; + public static Microsoft.AspNetCore.Identity.IdentityCookiesBuilder AddIdentityCookies(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder AddTwoFactorRememberMeCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder AddTwoFactorUserIdCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityCookiesBuilder` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityCookiesBuilder + { + public Microsoft.Extensions.Options.OptionsBuilder ApplicationCookie { get => throw null; set => throw null; } + public Microsoft.Extensions.Options.OptionsBuilder ExternalCookie { get => throw null; set => throw null; } + public IdentityCookiesBuilder() => throw null; + public Microsoft.Extensions.Options.OptionsBuilder TwoFactorRememberMeCookie { get => throw null; set => throw null; } + public Microsoft.Extensions.Options.OptionsBuilder TwoFactorUserIdCookie { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.SecurityStampRefreshingPrincipalContext` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SecurityStampRefreshingPrincipalContext + { + public System.Security.Claims.ClaimsPrincipal CurrentPrincipal { get => throw null; set => throw null; } + public System.Security.Claims.ClaimsPrincipal NewPrincipal { get => throw null; set => throw null; } + public SecurityStampRefreshingPrincipalContext() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.SecurityStampValidator` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SecurityStampValidator + { + public static System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) where TValidator : Microsoft.AspNetCore.Identity.ISecurityStampValidator => throw null; + public static System.Threading.Tasks.Task ValidatePrincipalAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.SecurityStampValidator<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SecurityStampValidator : Microsoft.AspNetCore.Identity.ISecurityStampValidator where TUser : class + { + public Microsoft.AspNetCore.Authentication.ISystemClock Clock { get => throw null; } + public Microsoft.Extensions.Logging.ILogger Logger { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions Options { get => throw null; } + public SecurityStampValidator(Microsoft.Extensions.Options.IOptions options, Microsoft.AspNetCore.Identity.SignInManager signInManager, Microsoft.AspNetCore.Authentication.ISystemClock clock, Microsoft.Extensions.Logging.ILoggerFactory logger) => throw null; + protected virtual System.Threading.Tasks.Task SecurityStampVerified(TUser user, Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) => throw null; + public Microsoft.AspNetCore.Identity.SignInManager SignInManager { get => throw null; } + public virtual System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) => throw null; + protected virtual System.Threading.Tasks.Task VerifySecurityStamp(System.Security.Claims.ClaimsPrincipal principal) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SecurityStampValidatorOptions + { + public System.Func OnRefreshingPrincipal { get => throw null; set => throw null; } + public SecurityStampValidatorOptions() => throw null; + public System.TimeSpan ValidationInterval { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.SignInManager<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SignInManager where TUser : class + { + public virtual System.Threading.Tasks.Task CanSignInAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) => throw null; + public Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory ClaimsFactory { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Authentication.AuthenticationProperties ConfigureExternalAuthenticationProperties(string provider, string redirectUrl, string userId = default(string)) => throw null; + public Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task CreateUserPrincipalAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) => throw null; + public virtual System.Threading.Tasks.Task ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) => throw null; + public virtual System.Threading.Tasks.Task ForgetTwoFactorClientAsync() => throw null; + public virtual System.Threading.Tasks.Task> GetExternalAuthenticationSchemesAsync() => throw null; + public virtual System.Threading.Tasks.Task GetExternalLoginInfoAsync(string expectedXsrf = default(string)) => throw null; + public virtual System.Threading.Tasks.Task GetTwoFactorAuthenticationUserAsync() => throw null; + protected virtual System.Threading.Tasks.Task IsLockedOut(TUser user) => throw null; + public virtual bool IsSignedIn(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual System.Threading.Tasks.Task IsTwoFactorClientRememberedAsync(TUser user) => throw null; + protected virtual System.Threading.Tasks.Task LockedOut(TUser user) => throw null; + public virtual Microsoft.Extensions.Logging.ILogger Logger { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.IdentityOptions Options { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task PasswordSignInAsync(string userName, string password, bool isPersistent, bool lockoutOnFailure) => throw null; + public virtual System.Threading.Tasks.Task PasswordSignInAsync(TUser user, string password, bool isPersistent, bool lockoutOnFailure) => throw null; + protected virtual System.Threading.Tasks.Task PreSignInCheck(TUser user) => throw null; + public virtual System.Threading.Tasks.Task RefreshSignInAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task RememberTwoFactorClientAsync(TUser user) => throw null; + protected virtual System.Threading.Tasks.Task ResetLockout(TUser user) => throw null; + public virtual System.Threading.Tasks.Task SignInAsync(TUser user, bool isPersistent, string authenticationMethod = default(string)) => throw null; + public virtual System.Threading.Tasks.Task SignInAsync(TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, string authenticationMethod = default(string)) => throw null; + public SignInManager(Microsoft.AspNetCore.Identity.UserManager userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory claimsFactory, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.Extensions.Logging.ILogger> logger, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes, Microsoft.AspNetCore.Identity.IUserConfirmation confirmation) => throw null; + protected virtual System.Threading.Tasks.Task SignInOrTwoFactorAsync(TUser user, bool isPersistent, string loginProvider = default(string), bool bypassTwoFactor = default(bool)) => throw null; + public virtual System.Threading.Tasks.Task SignInWithClaimsAsync(TUser user, bool isPersistent, System.Collections.Generic.IEnumerable additionalClaims) => throw null; + public virtual System.Threading.Tasks.Task SignInWithClaimsAsync(TUser user, Microsoft.AspNetCore.Authentication.AuthenticationProperties authenticationProperties, System.Collections.Generic.IEnumerable additionalClaims) => throw null; + public virtual System.Threading.Tasks.Task SignOutAsync() => throw null; + public virtual System.Threading.Tasks.Task TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) => throw null; + public virtual System.Threading.Tasks.Task TwoFactorRecoveryCodeSignInAsync(string recoveryCode) => throw null; + public virtual System.Threading.Tasks.Task TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) => throw null; + public virtual System.Threading.Tasks.Task UpdateExternalAuthenticationTokensAsync(Microsoft.AspNetCore.Identity.ExternalLoginInfo externalLogin) => throw null; + public Microsoft.AspNetCore.Identity.UserManager UserManager { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task ValidateSecurityStampAsync(TUser user, string securityStamp) => throw null; + public virtual System.Threading.Tasks.Task ValidateSecurityStampAsync(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual System.Threading.Tasks.Task ValidateTwoFactorSecurityStampAsync(System.Security.Claims.ClaimsPrincipal principal) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<>` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TwoFactorSecurityStampValidator : Microsoft.AspNetCore.Identity.SecurityStampValidator, Microsoft.AspNetCore.Identity.ITwoFactorSecurityStampValidator, Microsoft.AspNetCore.Identity.ISecurityStampValidator where TUser : class + { + protected override System.Threading.Tasks.Task SecurityStampVerified(TUser user, Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) => throw null; + public TwoFactorSecurityStampValidator(Microsoft.Extensions.Options.IOptions options, Microsoft.AspNetCore.Identity.SignInManager signInManager, Microsoft.AspNetCore.Authentication.ISystemClock clock, Microsoft.Extensions.Logging.ILoggerFactory logger) : base(default(Microsoft.Extensions.Options.IOptions), default(Microsoft.AspNetCore.Identity.SignInManager), default(Microsoft.AspNetCore.Authentication.ISystemClock), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + protected override System.Threading.Tasks.Task VerifySecurityStamp(System.Security.Claims.ClaimsPrincipal principal) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class IdentityServiceCollectionExtensions + { + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentity(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) where TRole : class where TUser : class => throw null; + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentity(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TRole : class where TUser : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureApplicationCookie(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureExternalCookie(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs new file mode 100644 index 000000000000..3a52160587aa --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs @@ -0,0 +1,23 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Localization + { + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Localization.Routing.RouteDataRequestCultureProvider` in `Microsoft.AspNetCore.Localization.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteDataRequestCultureProvider : Microsoft.AspNetCore.Localization.RequestCultureProvider + { + public override System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public RouteDataRequestCultureProvider() => throw null; + public string RouteDataStringKey { get => throw null; set => throw null; } + public string UIRouteDataStringKey { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs new file mode 100644 index 000000000000..0dca161a1cdf --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs @@ -0,0 +1,152 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ApplicationBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, params string[] cultures) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action optionsAction) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.RequestLocalizationOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRequestLocalization(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RequestLocalizationOptions` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestLocalizationOptions + { + public Microsoft.AspNetCore.Builder.RequestLocalizationOptions AddSupportedCultures(params string[] cultures) => throw null; + public Microsoft.AspNetCore.Builder.RequestLocalizationOptions AddSupportedUICultures(params string[] uiCultures) => throw null; + public bool ApplyCurrentCultureToResponseHeaders { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Localization.RequestCulture DefaultRequestCulture { get => throw null; set => throw null; } + public bool FallBackToParentCultures { get => throw null; set => throw null; } + public bool FallBackToParentUICultures { get => throw null; set => throw null; } + public System.Collections.Generic.IList RequestCultureProviders { get => throw null; set => throw null; } + public RequestLocalizationOptions() => throw null; + public Microsoft.AspNetCore.Builder.RequestLocalizationOptions SetDefaultCulture(string defaultCulture) => throw null; + public System.Collections.Generic.IList SupportedCultures { get => throw null; set => throw null; } + public System.Collections.Generic.IList SupportedUICultures { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.RequestLocalizationOptionsExtensions` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RequestLocalizationOptionsExtensions + { + public static Microsoft.AspNetCore.Builder.RequestLocalizationOptions AddInitialRequestCultureProvider(this Microsoft.AspNetCore.Builder.RequestLocalizationOptions requestLocalizationOptions, Microsoft.AspNetCore.Localization.RequestCultureProvider requestCultureProvider) => throw null; + } + + } + namespace Localization + { + // Generated from `Microsoft.AspNetCore.Localization.AcceptLanguageHeaderRequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AcceptLanguageHeaderRequestCultureProvider : Microsoft.AspNetCore.Localization.RequestCultureProvider + { + public AcceptLanguageHeaderRequestCultureProvider() => throw null; + public override System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public int MaximumAcceptLanguageHeaderValuesToTry { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Localization.CookieRequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieRequestCultureProvider : Microsoft.AspNetCore.Localization.RequestCultureProvider + { + public string CookieName { get => throw null; set => throw null; } + public CookieRequestCultureProvider() => throw null; + public static string DefaultCookieName; + public override System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public static string MakeCookieValue(Microsoft.AspNetCore.Localization.RequestCulture requestCulture) => throw null; + public static Microsoft.AspNetCore.Localization.ProviderCultureResult ParseCookieValue(string value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Localization.CustomRequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CustomRequestCultureProvider : Microsoft.AspNetCore.Localization.RequestCultureProvider + { + public CustomRequestCultureProvider(System.Func> provider) => throw null; + public override System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Localization.IRequestCultureFeature` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestCultureFeature + { + Microsoft.AspNetCore.Localization.IRequestCultureProvider Provider { get; } + Microsoft.AspNetCore.Localization.RequestCulture RequestCulture { get; } + } + + // Generated from `Microsoft.AspNetCore.Localization.IRequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestCultureProvider + { + System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext); + } + + // Generated from `Microsoft.AspNetCore.Localization.ProviderCultureResult` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProviderCultureResult + { + public System.Collections.Generic.IList Cultures { get => throw null; } + public ProviderCultureResult(System.Collections.Generic.IList cultures, System.Collections.Generic.IList uiCultures) => throw null; + public ProviderCultureResult(System.Collections.Generic.IList cultures) => throw null; + public ProviderCultureResult(Microsoft.Extensions.Primitives.StringSegment culture, Microsoft.Extensions.Primitives.StringSegment uiCulture) => throw null; + public ProviderCultureResult(Microsoft.Extensions.Primitives.StringSegment culture) => throw null; + public System.Collections.Generic.IList UICultures { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Localization.QueryStringRequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryStringRequestCultureProvider : Microsoft.AspNetCore.Localization.RequestCultureProvider + { + public override System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public string QueryStringKey { get => throw null; set => throw null; } + public QueryStringRequestCultureProvider() => throw null; + public string UIQueryStringKey { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Localization.RequestCulture` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestCulture + { + public System.Globalization.CultureInfo Culture { get => throw null; } + public RequestCulture(string culture, string uiCulture) => throw null; + public RequestCulture(string culture) => throw null; + public RequestCulture(System.Globalization.CultureInfo culture, System.Globalization.CultureInfo uiCulture) => throw null; + public RequestCulture(System.Globalization.CultureInfo culture) => throw null; + public System.Globalization.CultureInfo UICulture { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Localization.RequestCultureFeature` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestCultureFeature : Microsoft.AspNetCore.Localization.IRequestCultureFeature + { + public Microsoft.AspNetCore.Localization.IRequestCultureProvider Provider { get => throw null; } + public Microsoft.AspNetCore.Localization.RequestCulture RequestCulture { get => throw null; } + public RequestCultureFeature(Microsoft.AspNetCore.Localization.RequestCulture requestCulture, Microsoft.AspNetCore.Localization.IRequestCultureProvider provider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Localization.RequestCultureProvider` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RequestCultureProvider : Microsoft.AspNetCore.Localization.IRequestCultureProvider + { + public abstract System.Threading.Tasks.Task DetermineProviderCultureResult(Microsoft.AspNetCore.Http.HttpContext httpContext); + protected static System.Threading.Tasks.Task NullProviderCultureResult; + public Microsoft.AspNetCore.Builder.RequestLocalizationOptions Options { get => throw null; set => throw null; } + protected RequestCultureProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestLocalizationMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public RequestLocalizationMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.RequestLocalizationServiceCollectionExtensions` in `Microsoft.AspNetCore.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RequestLocalizationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRequestLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs new file mode 100644 index 000000000000..503b3491cf49 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs @@ -0,0 +1,24 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Authorization.IAllowAnonymous` in `Microsoft.AspNetCore.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAllowAnonymous + { + } + + // Generated from `Microsoft.AspNetCore.Authorization.IAuthorizeData` in `Microsoft.AspNetCore.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizeData + { + string AuthenticationSchemes { get; set; } + string Policy { get; set; } + string Roles { get; set; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs new file mode 100644 index 000000000000..f95d7845da55 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs @@ -0,0 +1,1332 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + // Generated from `Microsoft.AspNetCore.Mvc.ActionContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionContext + { + public ActionContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext) => throw null; + public ActionContext(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public ActionContext(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor) => throw null; + public ActionContext() => throw null; + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.IActionResult` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionResult + { + System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.IUrlHelper` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUrlHelper + { + string Action(Microsoft.AspNetCore.Mvc.Routing.UrlActionContext actionContext); + Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get; } + string Content(string contentPath); + bool IsLocalUrl(string url); + string Link(string routeName, object values); + string RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext); + } + + namespace Abstractions + { + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionDescriptor + { + public System.Collections.Generic.IList ActionConstraints { get => throw null; set => throw null; } + public ActionDescriptor() => throw null; + public Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo AttributeRouteInfo { get => throw null; set => throw null; } + public System.Collections.Generic.IList BoundProperties { get => throw null; set => throw null; } + public virtual string DisplayName { get => throw null; set => throw null; } + public System.Collections.Generic.IList EndpointMetadata { get => throw null; set => throw null; } + public System.Collections.Generic.IList FilterDescriptors { get => throw null; set => throw null; } + public string Id { get => throw null; } + public System.Collections.Generic.IList Parameters { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorExtensions` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ActionDescriptorExtensions + { + public static T GetProperty(this Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor) => throw null; + public static void SetProperty(this Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, T value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionDescriptorProviderContext + { + public ActionDescriptorProviderContext() => throw null; + public System.Collections.Generic.IList Results { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.ActionInvokerProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionInvokerProviderContext + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public ActionInvokerProviderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext) => throw null; + public Microsoft.AspNetCore.Mvc.Abstractions.IActionInvoker Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionDescriptorProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.IActionInvoker` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionInvoker + { + System.Threading.Tasks.Task InvokeAsync(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.IActionInvokerProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionInvokerProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.Abstractions.ActionInvokerProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.Abstractions.ActionInvokerProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ParameterDescriptor + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public ParameterDescriptor() => throw null; + public System.Type ParameterType { get => throw null; set => throw null; } + } + + } + namespace ActionConstraints + { + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionConstraintContext + { + public ActionConstraintContext() => throw null; + public System.Collections.Generic.IReadOnlyList Candidates { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ActionConstraints.ActionSelectorCandidate CurrentCandidate { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteContext RouteContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintItem` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionConstraintItem + { + public ActionConstraintItem(Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata metadata) => throw null; + public Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint Constraint { get => throw null; set => throw null; } + public bool IsReusable { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata Metadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionConstraintProviderContext + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor Action { get => throw null; } + public ActionConstraintProviderContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor action, System.Collections.Generic.IList items) => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public System.Collections.Generic.IList Results { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.ActionSelectorCandidate` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ActionSelectorCandidate + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor Action { get => throw null; } + public ActionSelectorCandidate(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor action, System.Collections.Generic.IReadOnlyList constraints) => throw null; + // Stub generator skipped constructor + public System.Collections.Generic.IReadOnlyList Constraints { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata + { + bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintFactory` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionConstraintFactory : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata + { + Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint CreateInstance(System.IServiceProvider services); + bool IsReusable { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionConstraintMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionConstraintProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintProviderContext context); + int Order { get; } + } + + } + namespace ApiExplorer + { + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescription + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; set => throw null; } + public ApiDescription() => throw null; + public string GroupName { get => throw null; set => throw null; } + public string HttpMethod { get => throw null; set => throw null; } + public System.Collections.Generic.IList ParameterDescriptions { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public string RelativePath { get => throw null; set => throw null; } + public System.Collections.Generic.IList SupportedRequestFormats { get => throw null; } + public System.Collections.Generic.IList SupportedResponseTypes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescriptionProviderContext + { + public System.Collections.Generic.IReadOnlyList Actions { get => throw null; } + public ApiDescriptionProviderContext(System.Collections.Generic.IReadOnlyList actions) => throw null; + public System.Collections.Generic.IList Results { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiParameterDescription + { + public ApiParameterDescription() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get => throw null; set => throw null; } + public object DefaultValue { get => throw null; set => throw null; } + public bool IsRequired { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor ParameterDescriptor { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterRouteInfo RouteInfo { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Source { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterRouteInfo` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiParameterRouteInfo + { + public ApiParameterRouteInfo() => throw null; + public System.Collections.Generic.IEnumerable Constraints { get => throw null; set => throw null; } + public object DefaultValue { get => throw null; set => throw null; } + public bool IsOptional { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiRequestFormat` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiRequestFormat + { + public ApiRequestFormat() => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter Formatter { get => throw null; set => throw null; } + public string MediaType { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseFormat` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiResponseFormat + { + public ApiResponseFormat() => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter Formatter { get => throw null; set => throw null; } + public string MediaType { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiResponseType` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiResponseType + { + public System.Collections.Generic.IList ApiResponseFormats { get => throw null; set => throw null; } + public ApiResponseType() => throw null; + public bool IsDefaultResponse { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; set => throw null; } + public int StatusCode { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiDescriptionProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext context); + int Order { get; } + } + + } + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Mvc.Authorization.IAllowAnonymousFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAllowAnonymousFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + } + namespace Filters + { + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionExecutedContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public ActionExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters, object controller) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual bool Canceled { get => throw null; set => throw null; } + public virtual object Controller { get => throw null; } + public virtual System.Exception Exception { get => throw null; set => throw null; } + public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get => throw null; set => throw null; } + public virtual bool ExceptionHandled { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual System.Collections.Generic.IDictionary ActionArguments { get => throw null; } + public ActionExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters, System.Collections.Generic.IDictionary actionArguments, object controller) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual object Controller { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task ActionExecutionDelegate(); + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizationFilterContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public AuthorizationFilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ExceptionContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExceptionContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual System.Exception Exception { get => throw null; set => throw null; } + public ExceptionContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get => throw null; set => throw null; } + public virtual bool ExceptionHandled { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FilterContext : Microsoft.AspNetCore.Mvc.ActionContext + { + public FilterContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters) => throw null; + public virtual System.Collections.Generic.IList Filters { get => throw null; } + public TMetadata FindEffectivePolicy() where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + public bool IsEffectivePolicy(TMetadata policy) where TMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FilterDescriptor + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + public FilterDescriptor(Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter, int filterScope) => throw null; + public int Order { get => throw null; set => throw null; } + public int Scope { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterItem` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FilterItem + { + public Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor Descriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; set => throw null; } + public FilterItem(Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor descriptor, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + public FilterItem(Microsoft.AspNetCore.Mvc.Filters.FilterDescriptor descriptor) => throw null; + public bool IsReusable { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FilterProviderContext + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; set => throw null; } + public FilterProviderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList items) => throw null; + public System.Collections.Generic.IList Results { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IActionFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context); + void OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAlwaysRunResultFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAlwaysRunResultFilter : Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncActionFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate next); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncAlwaysRunResultFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncAlwaysRunResultFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncAuthorizationFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnAuthorizationAsync(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncExceptionFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnExceptionAsync(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncResourceFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncResourceFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnResourceExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutionDelegate next); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncResultFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate next); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAuthorizationFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnAuthorization(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IExceptionFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IFilterContainer` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFilterContainer + { + Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata FilterDefinition { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IFilterFactory` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFilterFactory : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider); + bool IsReusable { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IFilterProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFilterProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.Filters.FilterProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.Filters.FilterProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOrderedFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IResourceFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResourceFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext context); + void OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IResultFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResultFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext context); + void OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceExecutedContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual bool Canceled { get => throw null; set => throw null; } + public virtual System.Exception Exception { get => throw null; set => throw null; } + public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get => throw null; set => throw null; } + public virtual bool ExceptionHandled { get => throw null; set => throw null; } + public ResourceExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public ResourceExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters, System.Collections.Generic.IList valueProviderFactories) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + public System.Collections.Generic.IList ValueProviderFactories { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResourceExecutionDelegate` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task ResourceExecutionDelegate(); + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResultExecutedContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual bool Canceled { get => throw null; set => throw null; } + public virtual object Controller { get => throw null; } + public virtual System.Exception Exception { get => throw null; set => throw null; } + public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get => throw null; set => throw null; } + public virtual bool ExceptionHandled { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; } + public ResultExecutedContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters, Microsoft.AspNetCore.Mvc.IActionResult result, object controller) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResultExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual bool Cancel { get => throw null; set => throw null; } + public virtual object Controller { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + public ResultExecutingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList filters, Microsoft.AspNetCore.Mvc.IActionResult result, object controller) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task ResultExecutionDelegate(); + + } + namespace Formatters + { + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection<>` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormatterCollection : System.Collections.ObjectModel.Collection + { + public FormatterCollection(System.Collections.Generic.IList list) => throw null; + public FormatterCollection() => throw null; + public void RemoveType() where T : TFormatter => throw null; + public void RemoveType(System.Type formatterType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IInputFormatter + { + bool CanRead(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context); + System.Threading.Tasks.Task ReadAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IInputFormatterExceptionPolicy + { + Microsoft.AspNetCore.Mvc.Formatters.InputFormatterExceptionPolicy ExceptionPolicy { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOutputFormatter + { + bool CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context); + System.Threading.Tasks.Task WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputFormatterContext + { + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public InputFormatterContext(Microsoft.AspNetCore.Http.HttpContext httpContext, string modelName, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, System.Func readerFactory, bool treatEmptyInputAsDefaultValue) => throw null; + public InputFormatterContext(Microsoft.AspNetCore.Http.HttpContext httpContext, string modelName, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, System.Func readerFactory) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; } + public string ModelName { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public System.Type ModelType { get => throw null; } + public System.Func ReaderFactory { get => throw null; } + public bool TreatEmptyInputAsDefaultValue { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.InputFormatterException` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputFormatterException : System.Exception + { + public InputFormatterException(string message, System.Exception innerException) => throw null; + public InputFormatterException(string message) => throw null; + public InputFormatterException() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.InputFormatterExceptionPolicy` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum InputFormatterExceptionPolicy + { + AllExceptions, + // Stub generator skipped constructor + MalformedInputExceptions, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputFormatterResult + { + public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult Failure() => throw null; + public static System.Threading.Tasks.Task FailureAsync() => throw null; + public bool HasError { get => throw null; } + public bool IsModelSet { get => throw null; } + public object Model { get => throw null; } + public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult NoValue() => throw null; + public static System.Threading.Tasks.Task NoValueAsync() => throw null; + public static Microsoft.AspNetCore.Mvc.Formatters.InputFormatterResult Success(object model) => throw null; + public static System.Threading.Tasks.Task SuccessAsync(object model) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class OutputFormatterCanWriteContext + { + public virtual Microsoft.Extensions.Primitives.StringSegment ContentType { get => throw null; set => throw null; } + public virtual bool ContentTypeIsServerDefined { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; set => throw null; } + public virtual object Object { get => throw null; set => throw null; } + public virtual System.Type ObjectType { get => throw null; set => throw null; } + protected OutputFormatterCanWriteContext(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OutputFormatterWriteContext : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext + { + public OutputFormatterWriteContext(Microsoft.AspNetCore.Http.HttpContext httpContext, System.Func writerFactory, System.Type objectType, object @object) : base(default(Microsoft.AspNetCore.Http.HttpContext)) => throw null; + public virtual System.Func WriterFactory { get => throw null; set => throw null; } + } + + } + namespace ModelBinding + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingInfo + { + public string BinderModelName { get => throw null; set => throw null; } + public System.Type BinderType { get => throw null; set => throw null; } + public BindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo other) => throw null; + public BindingInfo() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo GetBindingInfo(System.Collections.Generic.IEnumerable attributes, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo GetBindingInfo(System.Collections.Generic.IEnumerable attributes) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get => throw null; set => throw null; } + public System.Func RequestPredicate { get => throw null; set => throw null; } + public bool TryApplyBindingInfo(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingSource : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s2) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s1, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource s2) => throw null; + public BindingSource(string id, string displayName, bool isGreedy, bool isFromRequest) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Body; + public virtual bool CanAcceptDataFrom(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Custom; + public string DisplayName { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource other) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Form; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource FormFile; + public override int GetHashCode() => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Header; + public string Id { get => throw null; } + public bool IsFromRequest { get => throw null; } + public bool IsGreedy { get => throw null; } + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource ModelBinding; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Path; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Query; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Services; + public static Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource Special; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.CompositeBindingSource` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeBindingSource : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource + { + private CompositeBindingSource() : base(default(string), default(string), default(bool), default(bool)) => throw null; + public System.Collections.Generic.IEnumerable BindingSources { get => throw null; } + public override bool CanAcceptDataFrom(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.CompositeBindingSource Create(System.Collections.Generic.IEnumerable bindingSources, string displayName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum EmptyBodyBehavior + { + Allow, + Default, + Disallow, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.EnumGroupAndName` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct EnumGroupAndName + { + public EnumGroupAndName(string group, string name) => throw null; + public EnumGroupAndName(string group, System.Func name) => throw null; + // Stub generator skipped constructor + public string Group { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBinderTypeProviderMetadata : Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + System.Type BinderType { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBindingSourceMetadata + { + Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IConfigureEmptyBodyBehavior` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IConfigureEmptyBodyBehavior + { + Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelBinder + { + System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelBinderProvider + { + Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelMetadataProvider + { + System.Collections.Generic.IEnumerable GetMetadataForProperties(System.Type modelType); + Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForType(System.Type modelType); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelNameProvider + { + string Name { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPropertyFilterProvider + { + System.Func PropertyFilter { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestPredicateProvider + { + System.Func RequestPredicate { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValueProvider + { + bool ContainsPrefix(string prefix); + Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValueProviderFactory + { + System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelBinderProviderContext + { + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder CreateBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo bindingInfo) => throw null; + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder CreateBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata); + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get; } + protected ModelBinderProviderContext() => throw null; + public virtual System.IServiceProvider Services { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelBindingContext + { + public abstract Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get; set; } + public abstract string BinderModelName { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope EnterNestedScope(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, string fieldName, string modelName, object model); + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope EnterNestedScope(); + protected abstract void ExitNestedScope(); + public abstract string FieldName { get; set; } + public virtual Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public abstract bool IsTopLevelObject { get; set; } + public abstract object Model { get; set; } + protected ModelBindingContext() => throw null; + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get; set; } + public abstract string ModelName { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get; set; } + public virtual System.Type ModelType { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct NestedScope : System.IDisposable + { + public void Dispose() => throw null; + public NestedScope(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext context) => throw null; + // Stub generator skipped constructor + } + + + public string OriginalModelName { get => throw null; set => throw null; } + public abstract System.Func PropertyFilter { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Result { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary ValidationState { get; set; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider ValueProvider { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ModelBindingResult : System.IEquatable + { + public static bool operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult y) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult other) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Failed() => throw null; + public override int GetHashCode() => throw null; + public bool IsModelSet { get => throw null; } + public object Model { get => throw null; } + // Stub generator skipped constructor + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Success(object model) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelError` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelError + { + public string ErrorMessage { get => throw null; } + public System.Exception Exception { get => throw null; } + public ModelError(string errorMessage) => throw null; + public ModelError(System.Exception exception, string errorMessage) => throw null; + public ModelError(System.Exception exception) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelErrorCollection` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelErrorCollection : System.Collections.ObjectModel.Collection + { + public void Add(string errorMessage) => throw null; + public void Add(System.Exception exception) => throw null; + public ModelErrorCollection() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelMetadata : System.IEquatable, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider + { + public abstract System.Collections.Generic.IReadOnlyDictionary AdditionalValues { get; } + public abstract string BinderModelName { get; } + public abstract System.Type BinderType { get; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata BoundConstructor { get => throw null; } + public virtual System.Func BoundConstructorInvoker { get => throw null; } + public virtual System.Collections.Generic.IReadOnlyList BoundConstructorParameters { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ContainerMetadata { get => throw null; } + public System.Type ContainerType { get => throw null; } + public abstract bool ConvertEmptyStringToNull { get; } + public abstract string DataTypeName { get; } + public static int DefaultOrder; + public abstract string Description { get; } + public abstract string DisplayFormatString { get; } + public abstract string DisplayName { get; } + public abstract string EditFormatString { get; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ElementMetadata { get; } + public System.Type ElementType { get => throw null; } + public abstract System.Collections.Generic.IEnumerable> EnumGroupedDisplayNamesAndValues { get; } + public abstract System.Collections.Generic.IReadOnlyDictionary EnumNamesAndValues { get; } + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata other) => throw null; + public string GetDisplayName() => throw null; + public override int GetHashCode() => throw null; + public virtual System.Collections.Generic.IEnumerable GetMetadataForProperties(System.Type modelType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForType(System.Type modelType) => throw null; + public abstract bool HasNonDefaultEditFormat { get; } + public virtual bool? HasValidators { get => throw null; } + public abstract bool HideSurroundingHtml { get; } + public abstract bool HtmlEncode { get; } + protected internal Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity Identity { get => throw null; } + public abstract bool IsBindingAllowed { get; } + public abstract bool IsBindingRequired { get; } + public bool IsCollectionType { get => throw null; } + public bool IsComplexType { get => throw null; } + public abstract bool IsEnum { get; } + public bool IsEnumerableType { get => throw null; } + public abstract bool IsFlagsEnum { get; } + public bool IsNullableValueType { get => throw null; } + public abstract bool IsReadOnly { get; } + public bool IsReferenceOrNullableType { get => throw null; } + public abstract bool IsRequired { get; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get => throw null; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider ModelBindingMessageProvider { get; } + protected ModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity identity) => throw null; + public System.Type ModelType { get => throw null; } + public string Name { get => throw null; } + public abstract string NullDisplayText { get; } + public abstract int Order { get; } + public string ParameterName { get => throw null; } + public abstract string Placeholder { get; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelPropertyCollection Properties { get; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get; } + public abstract System.Func PropertyGetter { get; } + public string PropertyName { get => throw null; } + public abstract System.Action PropertySetter { get; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter PropertyValidationFilter { get => throw null; } + public abstract bool ShowForDisplay { get; } + public abstract bool ShowForEdit { get; } + public abstract string SimpleDisplayProperty { get; } + public abstract string TemplateHint { get; } + public System.Type UnderlyingOrModelType { get => throw null; } + public abstract bool ValidateChildren { get; } + public abstract System.Collections.Generic.IReadOnlyList ValidatorMetadata { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadataProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider + { + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForConstructor(System.Reflection.ConstructorInfo constructor, System.Type modelType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter(System.Reflection.ParameterInfo parameter, System.Type modelType) => throw null; + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter(System.Reflection.ParameterInfo parameter); + public abstract System.Collections.Generic.IEnumerable GetMetadataForProperties(System.Type modelType); + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForProperty(System.Reflection.PropertyInfo propertyInfo, System.Type modelType) => throw null; + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForType(System.Type modelType); + protected ModelMetadataProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelPropertyCollection` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelPropertyCollection : System.Collections.ObjectModel.ReadOnlyCollection + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata this[string propertyName] { get => throw null; } + public ModelPropertyCollection(System.Collections.Generic.IEnumerable properties) : base(default(System.Collections.Generic.IList)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelStateDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable> + { + public void AddModelError(string key, string errorMessage) => throw null; + public void AddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) => throw null; + public void Clear() => throw null; + public void ClearValidationState(string key) => throw null; + public bool ContainsKey(string key) => throw null; + public int Count { get => throw null; } + public static int DefaultMaxAllowedErrors; + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public int ErrorCount { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.PrefixEnumerable FindKeysWithPrefix(string prefix) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState GetFieldValidationState(string key) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState GetValidationState(string key) => throw null; + public bool HasReachedMaxErrors { get => throw null; } + public bool IsValid { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry this[string key] { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct KeyEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public KeyEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) => throw null; + // Stub generator skipped constructor + } + + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct KeyEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public string Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public KeyEnumerator(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerable Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + public void MarkFieldSkipped(string key) => throw null; + public void MarkFieldValid(string key) => throw null; + public int MaxAllowedErrors { get => throw null; set => throw null; } + public void Merge(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) => throw null; + public ModelStateDictionary(int maxAllowedErrors) => throw null; + public ModelStateDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) => throw null; + public ModelStateDictionary() => throw null; + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.PrefixEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PrefixEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public PrefixEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) => throw null; + // Stub generator skipped constructor + } + + + public bool Remove(string key) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry Root { get => throw null; } + public void SetModelValue(string key, object rawValue, string attemptedValue) => throw null; + public void SetModelValue(string key, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult) => throw null; + public static bool StartsWithPrefix(string prefix, string key) => throw null; + public bool TryAddModelError(string key, string errorMessage) => throw null; + public bool TryAddModelError(string key, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) => throw null; + public bool TryAddModelException(string key, System.Exception exception) => throw null; + public bool TryGetValue(string key, out Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry value) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ValueEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public ValueEnumerable(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) => throw null; + // Stub generator skipped constructor + } + + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ValueEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + public ValueEnumerator(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary, string prefix) => throw null; + // Stub generator skipped constructor + } + + + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerable Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelStateEntry + { + public string AttemptedValue { get => throw null; set => throw null; } + public abstract System.Collections.Generic.IReadOnlyList Children { get; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelErrorCollection Errors { get => throw null; } + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry GetModelStateForProperty(string propertyName); + public abstract bool IsContainerNode { get; } + protected ModelStateEntry() => throw null; + public object RawValue { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ModelValidationState + { + Invalid, + // Stub generator skipped constructor + Skipped, + Unvalidated, + Valid, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.TooManyModelErrorsException` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TooManyModelErrorsException : System.Exception + { + public TooManyModelErrorsException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderException` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValueProviderException : System.Exception + { + public ValueProviderException(string message, System.Exception innerException) => throw null; + public ValueProviderException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValueProviderFactoryContext + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public ValueProviderFactoryContext(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public System.Collections.Generic.IList ValueProviders { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ValueProviderResult : System.IEquatable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public static bool operator !=(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult y) => throw null; + public static bool operator ==(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult x, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult y) => throw null; + public System.Globalization.CultureInfo Culture { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult other) => throw null; + public string FirstValue { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public int Length { get => throw null; } + public static Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult None; + public override string ToString() => throw null; + public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values, System.Globalization.CultureInfo culture) => throw null; + public ValueProviderResult(Microsoft.Extensions.Primitives.StringValues values) => throw null; + // Stub generator skipped constructor + public Microsoft.Extensions.Primitives.StringValues Values { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + namespace Metadata + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ModelBindingMessageProvider + { + public virtual System.Func AttemptedValueIsInvalidAccessor { get => throw null; } + public virtual System.Func MissingBindRequiredValueAccessor { get => throw null; } + public virtual System.Func MissingKeyOrValueAccessor { get => throw null; } + public virtual System.Func MissingRequestBodyRequiredValueAccessor { get => throw null; } + protected ModelBindingMessageProvider() => throw null; + public virtual System.Func NonPropertyAttemptedValueIsInvalidAccessor { get => throw null; } + public virtual System.Func NonPropertyUnknownValueIsInvalidAccessor { get => throw null; } + public virtual System.Func NonPropertyValueMustBeANumberAccessor { get => throw null; } + public virtual System.Func UnknownValueIsInvalidAccessor { get => throw null; } + public virtual System.Func ValueIsInvalidAccessor { get => throw null; } + public virtual System.Func ValueMustBeANumberAccessor { get => throw null; } + public virtual System.Func ValueMustNotBeNullAccessor { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ModelMetadataIdentity : System.IEquatable + { + public System.Reflection.ConstructorInfo ConstructorInfo { get => throw null; } + public System.Type ContainerType { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity other) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForConstructor(System.Reflection.ConstructorInfo constructor, System.Type modelType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter, System.Type modelType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForParameter(System.Reflection.ParameterInfo parameter) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty(System.Type modelType, string name, System.Type containerType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty(System.Reflection.PropertyInfo propertyInfo, System.Type modelType, System.Type containerType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForType(System.Type modelType) => throw null; + public override int GetHashCode() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind MetadataKind { get => throw null; } + // Stub generator skipped constructor + public System.Type ModelType { get => throw null; } + public string Name { get => throw null; } + public System.Reflection.ParameterInfo ParameterInfo { get => throw null; } + public System.Reflection.PropertyInfo PropertyInfo { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataKind` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ModelMetadataKind + { + Constructor, + // Stub generator skipped constructor + Parameter, + Property, + Type, + } + + } + namespace Validation + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientModelValidationContext : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase + { + public System.Collections.Generic.IDictionary Attributes { get => throw null; } + public ClientModelValidationContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, System.Collections.Generic.IDictionary attributes) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata), default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorItem` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientValidatorItem + { + public ClientValidatorItem(object validatorMetadata) => throw null; + public ClientValidatorItem() => throw null; + public bool IsReusable { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator Validator { get => throw null; set => throw null; } + public object ValidatorMetadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientValidatorProviderContext + { + public ClientValidatorProviderContext(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, System.Collections.Generic.IList items) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; } + public System.Collections.Generic.IList Results { get => throw null; } + public System.Collections.Generic.IReadOnlyList ValidatorMetadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClientModelValidator + { + void AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidatorProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClientModelValidatorProvider + { + void CreateValidators(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelValidator + { + System.Collections.Generic.IEnumerable Validate(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelValidatorProvider + { + void CreateValidators(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidatorProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPropertyValidationFilter + { + bool ShouldValidateEntry(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry entry, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry parentEntry); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValidationStrategy + { + System.Collections.Generic.IEnumerator GetChildren(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelValidationContext : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase + { + public object Container { get => throw null; } + public object Model { get => throw null; } + public ModelValidationContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, object container, object model) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata), default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelValidationContextBase + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; } + public ModelValidationContextBase(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationResult` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelValidationResult + { + public string MemberName { get => throw null; } + public string Message { get => throw null; } + public ModelValidationResult(string memberName, string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidatorProviderContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelValidatorProviderContext + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; set => throw null; } + public ModelValidatorProviderContext(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, System.Collections.Generic.IList items) => throw null; + public System.Collections.Generic.IList Results { get => throw null; } + public System.Collections.Generic.IReadOnlyList ValidatorMetadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ValidationEntry + { + public string Key { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; } + public object Model { get => throw null; } + public ValidationEntry(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) => throw null; + public ValidationEntry(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, System.Func modelAccessor) => throw null; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationStateDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(object key, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(object key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry this[object key] { get => throw null; set => throw null; } + Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry System.Collections.Generic.IReadOnlyDictionary.this[object key] { get => throw null; } + Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry System.Collections.Generic.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + public bool Remove(object key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(object key, out Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry value) => throw null; + public ValidationStateDictionary() => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationStateEntry + { + public string Key { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy Strategy { get => throw null; set => throw null; } + public bool SuppressValidation { get => throw null; set => throw null; } + public ValidationStateEntry() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorItem` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidatorItem + { + public bool IsReusable { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator Validator { get => throw null; set => throw null; } + public ValidatorItem(object validatorMetadata) => throw null; + public ValidatorItem() => throw null; + public object ValidatorMetadata { get => throw null; } + } + + } + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AttributeRouteInfo + { + public AttributeRouteInfo() => throw null; + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public bool SuppressLinkGeneration { get => throw null; set => throw null; } + public bool SuppressPathMatching { get => throw null; set => throw null; } + public string Template { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.UrlActionContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlActionContext + { + public string Action { get => throw null; set => throw null; } + public string Controller { get => throw null; set => throw null; } + public string Fragment { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + public string Protocol { get => throw null; set => throw null; } + public UrlActionContext() => throw null; + public object Values { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlRouteContext + { + public string Fragment { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + public string Protocol { get => throw null; set => throw null; } + public string RouteName { get => throw null; set => throw null; } + public UrlRouteContext() => throw null; + public object Values { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs new file mode 100644 index 000000000000..0125ade3468f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs @@ -0,0 +1,71 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace ApiExplorer + { + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionExtensions` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ApiDescriptionExtensions + { + public static T GetProperty(this Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription apiDescription) => throw null; + public static void SetProperty(this Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescription apiDescription, T value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroup` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescriptionGroup + { + public ApiDescriptionGroup(string groupName, System.Collections.Generic.IReadOnlyList items) => throw null; + public string GroupName { get => throw null; } + public System.Collections.Generic.IReadOnlyList Items { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollection` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescriptionGroupCollection + { + public ApiDescriptionGroupCollection(System.Collections.Generic.IReadOnlyList items, int version) => throw null; + public System.Collections.Generic.IReadOnlyList Items { get => throw null; } + public int Version { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescriptionGroupCollectionProvider : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupCollectionProvider + { + public ApiDescriptionGroupCollectionProvider(Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider actionDescriptorCollectionProvider, System.Collections.Generic.IEnumerable apiDescriptionProviders) => throw null; + public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollection ApiDescriptionGroups { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.DefaultApiDescriptionProvider` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultApiDescriptionProvider : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider + { + public DefaultApiDescriptionProvider(Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Routing.IInlineConstraintResolver constraintResolver, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultTypeMapper mapper, Microsoft.Extensions.Options.IOptions routeOptions) => throw null; + public void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext context) => throw null; + public void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionProviderContext context) => throw null; + public int Order { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupCollectionProvider` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiDescriptionGroupCollectionProvider + { + Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollection ApiDescriptionGroups { get; } + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcApiExplorerMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.ApiExplorer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcApiExplorerMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddApiExplorer(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs new file mode 100644 index 000000000000..0e09f4810fbe --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs @@ -0,0 +1,3965 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerActionEndpointConventionBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + public void Add(System.Action convention) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ControllerEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapAreaControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string name, string areaName, string pattern, object defaults = default(object), object constraints = default(object), object dataTokens = default(object)) => throw null; + public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string name, string pattern, object defaults = default(object), object constraints = default(object), object dataTokens = default(object)) => throw null; + public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapControllers(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) => throw null; + public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapDefaultControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) => throw null; + public static void MapDynamicControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state, int order) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static void MapDynamicControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static void MapDynamicControllerRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string action, string controller, string area) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string action, string controller, string area) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string action, string controller) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string action, string controller) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcApplicationBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvc(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, System.Action configureRoutes) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvc(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvcWithDefaultRoute(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.MvcAreaRouteBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcAreaRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints, object dataTokens) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template) => throw null; + } + + } + namespace Mvc + { + // Generated from `Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AcceptVerbsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider + { + public AcceptVerbsAttribute(string method) => throw null; + public AcceptVerbsAttribute(params string[] methods) => throw null; + public System.Collections.Generic.IEnumerable HttpMethods { get => throw null; } + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + int? Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider.Order { get => throw null; } + public string Route { get => throw null; set => throw null; } + string Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider.Template { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.AcceptedAtActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AcceptedAtActionResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public AcceptedAtActionResult(string actionName, string controllerName, object routeValues, object value) : base(default(object)) => throw null; + public string ActionName { get => throw null; set => throw null; } + public string ControllerName { get => throw null; set => throw null; } + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AcceptedAtRouteResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public AcceptedAtRouteResult(string routeName, object routeValues, object value) : base(default(object)) => throw null; + public AcceptedAtRouteResult(object routeValues, object value) : base(default(object)) => throw null; + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string RouteName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.AcceptedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AcceptedResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public AcceptedResult(string location, object value) : base(default(object)) => throw null; + public AcceptedResult(System.Uri locationUri, object value) : base(default(object)) => throw null; + public AcceptedResult() : base(default(object)) => throw null; + public string Location { get => throw null; set => throw null; } + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionContextAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionContextAttribute : System.Attribute + { + public ActionContextAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionNameAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionNameAttribute : System.Attribute + { + public ActionNameAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ActionResult : Microsoft.AspNetCore.Mvc.IActionResult + { + protected ActionResult() => throw null; + public virtual void ExecuteResult(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public virtual System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionResult<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionResult : Microsoft.AspNetCore.Mvc.Infrastructure.IConvertToActionResult + { + public ActionResult(TValue value) => throw null; + public ActionResult(Microsoft.AspNetCore.Mvc.ActionResult result) => throw null; + Microsoft.AspNetCore.Mvc.IActionResult Microsoft.AspNetCore.Mvc.Infrastructure.IConvertToActionResult.Convert() => throw null; + public Microsoft.AspNetCore.Mvc.ActionResult Result { get => throw null; } + public TValue Value { get => throw null; } + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `Microsoft.AspNetCore.Mvc.AntiforgeryValidationFailedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AntiforgeryValidationFailedResult : Microsoft.AspNetCore.Mvc.BadRequestResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Core.Infrastructure.IAntiforgeryValidationFailedResult + { + public AntiforgeryValidationFailedResult() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiBehaviorOptions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiBehaviorOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public ApiBehaviorOptions() => throw null; + public System.Collections.Generic.IDictionary ClientErrorMapping { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Func InvalidModelStateResponseFactory { get => throw null; set => throw null; } + public bool SuppressConsumesConstraintForFormFileParameters { get => throw null; set => throw null; } + public bool SuppressInferBindingSourcesForParameters { get => throw null; set => throw null; } + public bool SuppressMapClientErrors { get => throw null; set => throw null; } + public bool SuppressModelStateInvalidFilter { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiControllerAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Infrastructure.IApiBehaviorMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + public ApiControllerAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiConventionMethodAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionMethodAttribute : System.Attribute + { + public ApiConventionMethodAttribute(System.Type conventionType, string methodName) => throw null; + public System.Type ConventionType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiConventionTypeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionTypeAttribute : System.Attribute + { + public ApiConventionTypeAttribute(System.Type conventionType) => throw null; + public System.Type ConventionType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiDescriptionActionData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiDescriptionActionData + { + public ApiDescriptionActionData() => throw null; + public string GroupName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorerSettingsAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiExplorerSettingsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionVisibilityProvider, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupNameProvider + { + public ApiExplorerSettingsAttribute() => throw null; + public string GroupName { get => throw null; set => throw null; } + public bool IgnoreApi { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.AreaAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AreaAttribute : Microsoft.AspNetCore.Mvc.Routing.RouteValueAttribute + { + public AreaAttribute(string areaName) : base(default(string), default(string)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.BadRequestObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BadRequestObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public BadRequestObjectResult(object error) : base(default(object)) => throw null; + public BadRequestObjectResult(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.BadRequestResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BadRequestResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public BadRequestResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.BindAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider + { + public BindAttribute(params string[] include) => throw null; + public string[] Include { get => throw null; } + string Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider.Name { get => throw null; } + public string Prefix { get => throw null; set => throw null; } + public System.Func PropertyFilter { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.BindPropertiesAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindPropertiesAttribute : System.Attribute + { + public BindPropertiesAttribute() => throw null; + public bool SupportsGet { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.BindPropertyAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindPropertyAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata + { + public BindPropertyAttribute() => throw null; + public System.Type BinderType { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + System.Func Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider.RequestPredicate { get => throw null; } + public bool SupportsGet { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.CacheProfile` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheProfile + { + public CacheProfile() => throw null; + public int? Duration { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ResponseCacheLocation? Location { get => throw null; set => throw null; } + public bool? NoStore { get => throw null; set => throw null; } + public string VaryByHeader { get => throw null; set => throw null; } + public string[] VaryByQueryKeys { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ChallengeResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ChallengeResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public System.Collections.Generic.IList AuthenticationSchemes { get => throw null; set => throw null; } + public ChallengeResult(string authenticationScheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ChallengeResult(string authenticationScheme) => throw null; + public ChallengeResult(System.Collections.Generic.IList authenticationSchemes, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ChallengeResult(System.Collections.Generic.IList authenticationSchemes) => throw null; + public ChallengeResult(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ChallengeResult() => throw null; + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ClientErrorData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientErrorData + { + public ClientErrorData() => throw null; + public string Link { get => throw null; set => throw null; } + public string Title { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.CompatibilityVersion` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum CompatibilityVersion + { + // Stub generator skipped constructor + Latest, + Version_2_0, + Version_2_1, + Version_2_2, + Version_3_0, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ConflictObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConflictObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public ConflictObjectResult(object error) : base(default(object)) => throw null; + public ConflictObjectResult(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ConflictResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConflictResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public ConflictResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ConsumesAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsumesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint + { + public bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context) => throw null; + public static int ConsumesActionConstraintOrder; + public ConsumesAttribute(string contentType, params string[] otherContentTypes) => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection ContentTypes { get => throw null; set => throw null; } + public void OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext context) => throw null; + public void OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context) => throw null; + int Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint.Order { get => throw null; } + public void SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ContentResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ContentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public string Content { get => throw null; set => throw null; } + public ContentResult() => throw null; + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public int? StatusCode { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ControllerAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerAttribute : System.Attribute + { + public ControllerAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ControllerBase` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ControllerBase + { + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted(string uri, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted(string uri) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted(object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted(System.Uri uri, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted(System.Uri uri) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedResult Accepted() => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName, string controllerName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtActionResult AcceptedAtAction(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult AcceptedAtRoute(string routeName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult AcceptedAtRoute(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult AcceptedAtRoute(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult AcceptedAtRoute(object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult AcceptedAtRoute(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest() => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(object error) => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge() => throw null; + public virtual Microsoft.AspNetCore.Mvc.ConflictResult Conflict() => throw null; + public virtual Microsoft.AspNetCore.Mvc.ConflictObjectResult Conflict(object error) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ConflictObjectResult Conflict(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType, System.Text.Encoding contentEncoding) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content) => throw null; + protected ControllerBase() => throw null; + public Microsoft.AspNetCore.Mvc.ControllerContext ControllerContext { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created(string uri, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created(System.Uri uri, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction(string actionName, string controllerName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction(string actionName, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtActionResult CreatedAtAction(string actionName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute(string routeName, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute(string routeName, object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.CreatedAtRouteResult CreatedAtRoute(object routeValues, object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid() => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirect(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanent(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanentPreserveMethod(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPreserveMethod(string localUrl) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory ModelBinderFactory { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.NoContentResult NoContent() => throw null; + public virtual Microsoft.AspNetCore.Mvc.NotFoundResult NotFound() => throw null; + public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound(object value) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator ObjectValidator { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.OkResult Ok() => throw null; + public virtual Microsoft.AspNetCore.Mvc.OkObjectResult Ok(object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag, bool enableRangeProcessing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, System.DateTimeOffset? lastModified, Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ObjectResult Problem(string detail = default(string), string instance = default(string), int? statusCode = default(int?), string title = default(string), string type = default(string)) => throw null; + public Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory ProblemDetailsFactory { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.RedirectResult Redirect(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanent(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanentPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction() => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanentPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanentPreserveMethod(string pageName, string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePreserveMethod(string pageName, string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanentPreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut() => throw null; + public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode(int statusCode) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode(int statusCode, object value) => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string prefix) => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, System.Func propertyFilter) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) => throw null; + public virtual bool TryValidateModel(object model, string prefix) => throw null; + public virtual bool TryValidateModel(object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnauthorizedResult Unauthorized() => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult Unauthorized(object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityResult UnprocessableEntity() => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult UnprocessableEntity(object error) => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult UnprocessableEntity(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public Microsoft.AspNetCore.Mvc.IUrlHelper Url { get => throw null; set => throw null; } + public System.Security.Claims.ClaimsPrincipal User { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem(string detail = default(string), string instance = default(string), int? statusCode = default(int?), string title = default(string), string type = default(string), Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary = default(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem(Microsoft.AspNetCore.Mvc.ValidationProblemDetails descriptor) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ActionResult ValidationProblem() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ControllerContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerContext : Microsoft.AspNetCore.Mvc.ActionContext + { + public Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor ActionDescriptor { get => throw null; set => throw null; } + public ControllerContext(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public ControllerContext() => throw null; + public virtual System.Collections.Generic.IList ValueProviderFactories { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ControllerContextAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerContextAttribute : System.Attribute + { + public ControllerContextAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.CreatedAtActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CreatedAtActionResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public string ActionName { get => throw null; set => throw null; } + public string ControllerName { get => throw null; set => throw null; } + public CreatedAtActionResult(string actionName, string controllerName, object routeValues, object value) : base(default(object)) => throw null; + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.CreatedAtRouteResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CreatedAtRouteResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public CreatedAtRouteResult(string routeName, object routeValues, object value) : base(default(object)) => throw null; + public CreatedAtRouteResult(object routeValues, object value) : base(default(object)) => throw null; + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string RouteName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.CreatedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CreatedResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public CreatedResult(string location, object value) : base(default(object)) => throw null; + public CreatedResult(System.Uri location, object value) : base(default(object)) => throw null; + public string Location { get => throw null; set => throw null; } + public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DefaultApiConventions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DefaultApiConventions + { + public static void Create(object model) => throw null; + public static void Delete(object id) => throw null; + public static void Edit(object id, object model) => throw null; + public static void Find(object id) => throw null; + public static void Get(object id) => throw null; + public static void Post(object model) => throw null; + public static void Put(object id, object model) => throw null; + public static void Update(object id, object model) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DisableRequestSizeLimitAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DisableRequestSizeLimitAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public DisableRequestSizeLimitAttribute() => throw null; + public bool IsReusable { get => throw null; } + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.EmptyResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EmptyResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public EmptyResult() => throw null; + public override void ExecuteResult(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.FileContentResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileContentResult : Microsoft.AspNetCore.Mvc.FileResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public FileContentResult(System.Byte[] fileContents, string contentType) : base(default(string)) => throw null; + public FileContentResult(System.Byte[] fileContents, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) : base(default(string)) => throw null; + public System.Byte[] FileContents { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FileResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FileResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public string ContentType { get => throw null; } + public bool EnableRangeProcessing { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.EntityTagHeaderValue EntityTag { get => throw null; set => throw null; } + public string FileDownloadName { get => throw null; set => throw null; } + protected FileResult(string contentType) => throw null; + public System.DateTimeOffset? LastModified { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FileStreamResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileStreamResult : Microsoft.AspNetCore.Mvc.FileResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public System.IO.Stream FileStream { get => throw null; set => throw null; } + public FileStreamResult(System.IO.Stream fileStream, string contentType) : base(default(string)) => throw null; + public FileStreamResult(System.IO.Stream fileStream, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) : base(default(string)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ForbidResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ForbidResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public System.Collections.Generic.IList AuthenticationSchemes { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public ForbidResult(string authenticationScheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ForbidResult(string authenticationScheme) => throw null; + public ForbidResult(System.Collections.Generic.IList authenticationSchemes, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ForbidResult(System.Collections.Generic.IList authenticationSchemes) => throw null; + public ForbidResult(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public ForbidResult() => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FormatFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormatFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public FormatFilterAttribute() => throw null; + public bool IsReusable { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromBodyAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromBodyAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { get => throw null; set => throw null; } + public FromBodyAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromFormAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromFormAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public FromFormAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromHeaderAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromHeaderAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public FromHeaderAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromQueryAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromQueryAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public FromQueryAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromRouteAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromRouteAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public FromRouteAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.FromServicesAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FromServicesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public FromServicesAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpDeleteAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpDeleteAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpDeleteAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpDeleteAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpGetAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpGetAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpGetAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpGetAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpHeadAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpHeadAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpHeadAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpHeadAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpOptionsAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpOptionsAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpOptionsAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpOptionsAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpPatchAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpPatchAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpPatchAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpPatchAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpPostAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpPostAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpPostAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpPostAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.HttpPutAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpPutAttribute : Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute + { + public HttpPutAttribute(string template) : base(default(System.Collections.Generic.IEnumerable)) => throw null; + public HttpPutAttribute() : base(default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.IDesignTimeMvcBuilderConfiguration` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDesignTimeMvcBuilderConfiguration + { + void ConfigureMvc(Microsoft.Extensions.DependencyInjection.IMvcBuilder builder); + } + + // Generated from `Microsoft.AspNetCore.Mvc.IRequestFormLimitsPolicy` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestFormLimitsPolicy : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.IRequestSizePolicy` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRequestSizePolicy : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.JsonOptions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonOptions + { + public JsonOptions() => throw null; + public System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.JsonResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public JsonResult(object value, object serializerSettings) => throw null; + public JsonResult(object value) => throw null; + public object SerializerSettings { get => throw null; set => throw null; } + public int? StatusCode { get => throw null; set => throw null; } + public object Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.LocalRedirectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocalRedirectResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public LocalRedirectResult(string localUrl, bool permanent, bool preserveMethod) => throw null; + public LocalRedirectResult(string localUrl, bool permanent) => throw null; + public LocalRedirectResult(string localUrl) => throw null; + public bool Permanent { get => throw null; set => throw null; } + public bool PreserveMethod { get => throw null; set => throw null; } + public string Url { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.MiddlewareFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MiddlewareFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public System.Type ConfigurationType { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public MiddlewareFilterAttribute(System.Type configurationType) => throw null; + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinderAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelBinderAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata + { + public System.Type BinderType { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; set => throw null; } + public ModelBinderAttribute(System.Type binderType) => throw null; + public ModelBinderAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelMetadataTypeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelMetadataTypeAttribute : System.Attribute + { + public System.Type MetadataType { get => throw null; } + public ModelMetadataTypeAttribute(System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.MvcOptions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public bool AllowEmptyInputInBodyModelBinding { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary CacheProfiles { get => throw null; } + public System.Collections.Generic.IList Conventions { get => throw null; } + public bool EnableEndpointRouting { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.FilterCollection Filters { get => throw null; } + public Microsoft.AspNetCore.Mvc.Formatters.FormatterMappings FormatterMappings { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection InputFormatters { get => throw null; } + public int MaxIAsyncEnumerableBufferLimit { get => throw null; set => throw null; } + public int MaxModelBindingCollectionSize { get => throw null; set => throw null; } + public int MaxModelBindingRecursionDepth { get => throw null; set => throw null; } + public int MaxModelValidationErrors { get => throw null; set => throw null; } + public int? MaxValidationDepth { get => throw null; set => throw null; } + public System.Collections.Generic.IList ModelBinderProviders { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider ModelBindingMessageProvider { get => throw null; } + public System.Collections.Generic.IList ModelMetadataDetailsProviders { get => throw null; } + public System.Collections.Generic.IList ModelValidatorProviders { get => throw null; } + public MvcOptions() => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection OutputFormatters { get => throw null; } + public bool RequireHttpsPermanent { get => throw null; set => throw null; } + public bool RespectBrowserAcceptHeader { get => throw null; set => throw null; } + public bool ReturnHttpNotAcceptable { get => throw null; set => throw null; } + public int? SslPort { get => throw null; set => throw null; } + public bool SuppressAsyncSuffixInActionNames { get => throw null; set => throw null; } + public bool SuppressImplicitRequiredAttributeForNonNullableReferenceTypes { get => throw null; set => throw null; } + public bool SuppressInputFormatterBuffering { get => throw null; set => throw null; } + public bool SuppressOutputFormatterBuffering { get => throw null; set => throw null; } + public bool ValidateComplexTypesIfChildValidationFails { get => throw null; set => throw null; } + public System.Collections.Generic.IList ValueProviderFactories { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.NoContentResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NoContentResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public NoContentResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.NonActionAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NonActionAttribute : System.Attribute + { + public NonActionAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.NonControllerAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NonControllerAttribute : System.Attribute + { + public NonControllerAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.NonViewComponentAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NonViewComponentAttribute : System.Attribute + { + public NonViewComponentAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.NotFoundObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NotFoundObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public NotFoundObjectResult(object value) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.NotFoundResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NotFoundResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public NotFoundResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ObjectResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection ContentTypes { get => throw null; set => throw null; } + public System.Type DeclaredType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.FormatterCollection Formatters { get => throw null; set => throw null; } + public ObjectResult(object value) => throw null; + public virtual void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public int? StatusCode { get => throw null; set => throw null; } + public object Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.OkObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OkObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public OkObjectResult(object value) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.OkResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OkResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public OkResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.PhysicalFileResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalFileResult : Microsoft.AspNetCore.Mvc.FileResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string FileName { get => throw null; set => throw null; } + public PhysicalFileResult(string fileName, string contentType) : base(default(string)) => throw null; + public PhysicalFileResult(string fileName, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) : base(default(string)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ProblemDetails` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProblemDetails + { + public string Detail { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Extensions { get => throw null; } + public string Instance { get => throw null; set => throw null; } + public ProblemDetails() => throw null; + public int? Status { get => throw null; set => throw null; } + public string Title { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ProducesAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProducesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider + { + public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection ContentTypes { get => throw null; set => throw null; } + public virtual void OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext context) => throw null; + public virtual void OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context) => throw null; + public int Order { get => throw null; set => throw null; } + public ProducesAttribute(string contentType, params string[] additionalContentTypes) => throw null; + public ProducesAttribute(System.Type type) => throw null; + public void SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; + public int StatusCode { get => throw null; } + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ProducesDefaultResponseTypeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProducesDefaultResponseTypeAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider + { + public ProducesDefaultResponseTypeAttribute(System.Type type) => throw null; + public ProducesDefaultResponseTypeAttribute() => throw null; + void Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider.SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; + public int StatusCode { get => throw null; } + public System.Type Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProducesErrorResponseTypeAttribute : System.Attribute + { + public ProducesErrorResponseTypeAttribute(System.Type type) => throw null; + public System.Type Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProducesResponseTypeAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider + { + public ProducesResponseTypeAttribute(int statusCode) => throw null; + public ProducesResponseTypeAttribute(System.Type type, int statusCode) => throw null; + void Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider.SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; + public int StatusCode { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RedirectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public bool Permanent { get => throw null; set => throw null; } + public bool PreserveMethod { get => throw null; set => throw null; } + public RedirectResult(string url, bool permanent, bool preserveMethod) => throw null; + public RedirectResult(string url, bool permanent) => throw null; + public RedirectResult(string url) => throw null; + public string Url { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RedirectToActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToActionResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public string ActionName { get => throw null; set => throw null; } + public string ControllerName { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string Fragment { get => throw null; set => throw null; } + public bool Permanent { get => throw null; set => throw null; } + public bool PreserveMethod { get => throw null; set => throw null; } + public RedirectToActionResult(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public RedirectToActionResult(string actionName, string controllerName, object routeValues, bool permanent, string fragment) => throw null; + public RedirectToActionResult(string actionName, string controllerName, object routeValues, bool permanent, bool preserveMethod, string fragment) => throw null; + public RedirectToActionResult(string actionName, string controllerName, object routeValues, bool permanent, bool preserveMethod) => throw null; + public RedirectToActionResult(string actionName, string controllerName, object routeValues, bool permanent) => throw null; + public RedirectToActionResult(string actionName, string controllerName, object routeValues) => throw null; + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RedirectToPageResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToPageResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string Fragment { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + public string PageHandler { get => throw null; set => throw null; } + public string PageName { get => throw null; set => throw null; } + public bool Permanent { get => throw null; set => throw null; } + public bool PreserveMethod { get => throw null; set => throw null; } + public string Protocol { get => throw null; set => throw null; } + public RedirectToPageResult(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public RedirectToPageResult(string pageName, string pageHandler, object routeValues, bool permanent, string fragment) => throw null; + public RedirectToPageResult(string pageName, string pageHandler, object routeValues, bool permanent, bool preserveMethod, string fragment) => throw null; + public RedirectToPageResult(string pageName, string pageHandler, object routeValues, bool permanent, bool preserveMethod) => throw null; + public RedirectToPageResult(string pageName, string pageHandler, object routeValues, bool permanent) => throw null; + public RedirectToPageResult(string pageName, string pageHandler, object routeValues) => throw null; + public RedirectToPageResult(string pageName, string pageHandler) => throw null; + public RedirectToPageResult(string pageName, object routeValues) => throw null; + public RedirectToPageResult(string pageName) => throw null; + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RedirectToRouteResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToRouteResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string Fragment { get => throw null; set => throw null; } + public bool Permanent { get => throw null; set => throw null; } + public bool PreserveMethod { get => throw null; set => throw null; } + public RedirectToRouteResult(string routeName, object routeValues, string fragment) => throw null; + public RedirectToRouteResult(string routeName, object routeValues, bool permanent, string fragment) => throw null; + public RedirectToRouteResult(string routeName, object routeValues, bool permanent, bool preserveMethod, string fragment) => throw null; + public RedirectToRouteResult(string routeName, object routeValues, bool permanent, bool preserveMethod) => throw null; + public RedirectToRouteResult(string routeName, object routeValues, bool permanent) => throw null; + public RedirectToRouteResult(string routeName, object routeValues) => throw null; + public RedirectToRouteResult(object routeValues) => throw null; + public string RouteName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RequestFormLimitsAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestFormLimitsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public bool BufferBody { get => throw null; set => throw null; } + public System.Int64 BufferBodyLengthLimit { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public int KeyLengthLimit { get => throw null; set => throw null; } + public int MemoryBufferThreshold { get => throw null; set => throw null; } + public System.Int64 MultipartBodyLengthLimit { get => throw null; set => throw null; } + public int MultipartBoundaryLengthLimit { get => throw null; set => throw null; } + public int MultipartHeadersCountLimit { get => throw null; set => throw null; } + public int MultipartHeadersLengthLimit { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public RequestFormLimitsAttribute() => throw null; + public int ValueCountLimit { get => throw null; set => throw null; } + public int ValueLengthLimit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RequestSizeLimitAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequestSizeLimitAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public int Order { get => throw null; set => throw null; } + public RequestSizeLimitAttribute(System.Int64 bytes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RequireHttpsAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequireHttpsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter + { + protected virtual void HandleNonHttpsRequest(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext filterContext) => throw null; + public virtual void OnAuthorization(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext filterContext) => throw null; + public int Order { get => throw null; set => throw null; } + public bool Permanent { get => throw null; set => throw null; } + public RequireHttpsAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ResponseCacheAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCacheAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public string CacheProfileName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public int Duration { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.CacheProfile GetCacheProfile(Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + public bool IsReusable { get => throw null; } + public Microsoft.AspNetCore.Mvc.ResponseCacheLocation Location { get => throw null; set => throw null; } + public bool NoStore { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public ResponseCacheAttribute() => throw null; + public string VaryByHeader { get => throw null; set => throw null; } + public string[] VaryByQueryKeys { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ResponseCacheLocation` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ResponseCacheLocation + { + Any, + Client, + None, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Mvc.RouteAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider + { + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + int? Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider.Order { get => throw null; } + public RouteAttribute(string template) => throw null; + public string Template { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.SerializableError` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SerializableError : System.Collections.Generic.Dictionary + { + public SerializableError(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public SerializableError() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ServiceFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public ServiceFilterAttribute(System.Type type) => throw null; + public System.Type ServiceType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.SignInResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SignInResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public string AuthenticationScheme { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public System.Security.Claims.ClaimsPrincipal Principal { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public SignInResult(string authenticationScheme, System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignInResult(string authenticationScheme, System.Security.Claims.ClaimsPrincipal principal) => throw null; + public SignInResult(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignInResult(System.Security.Claims.ClaimsPrincipal principal) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.SignOutResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SignOutResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public System.Collections.Generic.IList AuthenticationSchemes { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set => throw null; } + public SignOutResult(string authenticationScheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignOutResult(string authenticationScheme) => throw null; + public SignOutResult(System.Collections.Generic.IList authenticationSchemes, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignOutResult(System.Collections.Generic.IList authenticationSchemes) => throw null; + public SignOutResult(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public SignOutResult() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.StatusCodeResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StatusCodeResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public override void ExecuteResult(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public int StatusCode { get => throw null; } + int? Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult.StatusCode { get => throw null; } + public StatusCodeResult(int statusCode) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TypeFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TypeFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public object[] Arguments { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public System.Type ImplementationType { get => throw null; } + public bool IsReusable { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public TypeFilterAttribute(System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnauthorizedObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public UnauthorizedObjectResult(object value) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UnauthorizedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnauthorizedResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public UnauthorizedResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UnprocessableEntityObjectResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnprocessableEntityObjectResult : Microsoft.AspNetCore.Mvc.ObjectResult + { + public UnprocessableEntityObjectResult(object error) : base(default(object)) => throw null; + public UnprocessableEntityObjectResult(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) : base(default(object)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UnprocessableEntityResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnprocessableEntityResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public UnprocessableEntityResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UnsupportedMediaTypeResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnsupportedMediaTypeResult : Microsoft.AspNetCore.Mvc.StatusCodeResult + { + public UnsupportedMediaTypeResult() : base(default(int)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.UrlHelperExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UrlHelperExtensions + { + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, string controller, object values, string protocol, string host, string fragment) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, string controller, object values, string protocol, string host) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, string controller, object values, string protocol) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, string controller, object values) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, string controller) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action, object values) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action) => throw null; + public static string Action(this Microsoft.AspNetCore.Mvc.IUrlHelper helper) => throw null; + public static string ActionLink(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string action = default(string), string controller = default(string), object values = default(object), string protocol = default(string), string host = default(string), string fragment = default(string)) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, string pageHandler, object values, string protocol, string host, string fragment) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, string pageHandler, object values, string protocol, string host) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, string pageHandler, object values, string protocol) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, string pageHandler, object values) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, string pageHandler) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName, object values) => throw null; + public static string Page(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName) => throw null; + public static string PageLink(this Microsoft.AspNetCore.Mvc.IUrlHelper urlHelper, string pageName = default(string), string pageHandler = default(string), object values = default(object), string protocol = default(string), string host = default(string), string fragment = default(string)) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string routeName, object values, string protocol, string host, string fragment) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string routeName, object values, string protocol, string host) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string routeName, object values, string protocol) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string routeName, object values) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, string routeName) => throw null; + public static string RouteUrl(this Microsoft.AspNetCore.Mvc.IUrlHelper helper, object values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ValidationProblemDetails` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationProblemDetails : Microsoft.AspNetCore.Mvc.ProblemDetails + { + public System.Collections.Generic.IDictionary Errors { get => throw null; } + public ValidationProblemDetails(System.Collections.Generic.IDictionary errors) => throw null; + public ValidationProblemDetails(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public ValidationProblemDetails() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.VirtualFileResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class VirtualFileResult : Microsoft.AspNetCore.Mvc.FileResult + { + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public string FileName { get => throw null; set => throw null; } + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public VirtualFileResult(string fileName, string contentType) : base(default(string)) => throw null; + public VirtualFileResult(string fileName, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) : base(default(string)) => throw null; + } + + namespace ActionConstraints + { + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.ActionMethodSelectorAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ActionMethodSelectorAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint + { + public bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context) => throw null; + protected ActionMethodSelectorAttribute() => throw null; + public abstract bool IsValidForRequest(Microsoft.AspNetCore.Routing.RouteContext routeContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor action); + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.HttpMethodActionConstraint` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint + { + public virtual bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context) => throw null; + public HttpMethodActionConstraint(System.Collections.Generic.IEnumerable httpMethods) => throw null; + public static int HttpMethodConstraintOrder; + public System.Collections.Generic.IEnumerable HttpMethods { get => throw null; } + public int Order { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ActionConstraints.IConsumesActionConstraint` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IConsumesActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint + { + } + + } + namespace ApiExplorer + { + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionNameMatchAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionNameMatchAttribute : System.Attribute + { + public ApiConventionNameMatchAttribute(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionNameMatchBehavior matchBehavior) => throw null; + public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionNameMatchBehavior MatchBehavior { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionNameMatchBehavior` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ApiConventionNameMatchBehavior + { + Any, + // Stub generator skipped constructor + Exact, + Prefix, + Suffix, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionResult + { + public ApiConventionResult(System.Collections.Generic.IReadOnlyList responseMetadataProviders) => throw null; + public System.Collections.Generic.IReadOnlyList ResponseMetadataProviders { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionTypeMatchAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionTypeMatchAttribute : System.Attribute + { + public ApiConventionTypeMatchAttribute(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionTypeMatchBehavior matchBehavior) => throw null; + public Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionTypeMatchBehavior MatchBehavior { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionTypeMatchBehavior` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ApiConventionTypeMatchBehavior + { + Any, + // Stub generator skipped constructor + AssignableFrom, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiDefaultResponseMetadataProvider : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupNameProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiDescriptionGroupNameProvider + { + string GroupName { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionVisibilityProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiDescriptionVisibilityProvider + { + bool IgnoreApi { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiRequestFormatMetadataProvider + { + System.Collections.Generic.IReadOnlyList GetSupportedContentTypes(string contentType, System.Type objectType); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiRequestMetadataProvider : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiResponseMetadataProvider : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void SetContentTypes(Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes); + int StatusCode { get; } + System.Type Type { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiResponseTypeMetadataProvider + { + System.Collections.Generic.IReadOnlyList GetSupportedContentTypes(string contentType, System.Type objectType); + } + + } + namespace ApplicationModels + { + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionModel : Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IApiExplorerModel + { + public System.Reflection.MethodInfo ActionMethod { get => throw null; } + public ActionModel(System.Reflection.MethodInfo actionMethod, System.Collections.Generic.IReadOnlyList attributes) => throw null; + public ActionModel(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel other) => throw null; + public string ActionName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel ApiExplorer { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerModel Controller { get => throw null; set => throw null; } + public string DisplayName { get => throw null; } + public System.Collections.Generic.IList Filters { get => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + string Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.Name { get => throw null; } + public System.Collections.Generic.IList Parameters { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public Microsoft.AspNetCore.Routing.IOutboundParameterTransformer RouteParameterTransformer { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; } + public System.Collections.Generic.IList Selectors { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ApiConventionApplicationModelConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiConventionApplicationModelConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public ApiConventionApplicationModelConvention(Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute defaultErrorResponseType) => throw null; + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute DefaultErrorResponseType { get => throw null; } + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiExplorerModel + { + public ApiExplorerModel(Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel other) => throw null; + public ApiExplorerModel() => throw null; + public string GroupName { get => throw null; set => throw null; } + public bool? IsVisible { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ApiVisibilityConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApiVisibilityConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public ApiVisibilityConvention() => throw null; + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationModel : Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IApiExplorerModel + { + public Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel ApiExplorer { get => throw null; set => throw null; } + public ApplicationModel() => throw null; + public System.Collections.Generic.IList Controllers { get => throw null; } + public System.Collections.Generic.IList Filters { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelProviderContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationModelProviderContext + { + public ApplicationModelProviderContext(System.Collections.Generic.IEnumerable controllerTypes) => throw null; + public System.Collections.Generic.IEnumerable ControllerTypes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModel Result { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AttributeRouteModel + { + public Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider Attribute { get => throw null; } + public AttributeRouteModel(Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider templateProvider) => throw null; + public AttributeRouteModel(Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel other) => throw null; + public AttributeRouteModel() => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel CombineAttributeRouteModel(Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel left, Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel right) => throw null; + public static string CombineTemplates(string prefix, string template) => throw null; + public bool IsAbsoluteTemplate { get => throw null; } + public static bool IsOverridePattern(string template) => throw null; + public string Name { get => throw null; set => throw null; } + public int? Order { get => throw null; set => throw null; } + public static string ReplaceTokens(string template, System.Collections.Generic.IDictionary values, Microsoft.AspNetCore.Routing.IOutboundParameterTransformer routeTokenTransformer) => throw null; + public static string ReplaceTokens(string template, System.Collections.Generic.IDictionary values) => throw null; + public bool SuppressLinkGeneration { get => throw null; set => throw null; } + public bool SuppressPathMatching { get => throw null; set => throw null; } + public string Template { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ClientErrorResultFilterConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientErrorResultFilterConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public ClientErrorResultFilterConvention() => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ConsumesConstraintForFormFileParameterConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsumesConstraintForFormFileParameterConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public ConsumesConstraintForFormFileParameterConvention() => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerModel : Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IApiExplorerModel + { + public System.Collections.Generic.IList Actions { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel ApiExplorer { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModel Application { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public ControllerModel(System.Reflection.TypeInfo controllerType, System.Collections.Generic.IReadOnlyList attributes) => throw null; + public ControllerModel(Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerModel other) => throw null; + public string ControllerName { get => throw null; set => throw null; } + public System.Collections.Generic.IList ControllerProperties { get => throw null; } + public System.Reflection.TypeInfo ControllerType { get => throw null; } + public string DisplayName { get => throw null; } + public System.Collections.Generic.IList Filters { get => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + string Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.Name { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; } + public System.Collections.Generic.IList Selectors { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionModelConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IApiExplorerModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiExplorerModel + { + Microsoft.AspNetCore.Mvc.ApplicationModels.ApiExplorerModel ApiExplorer { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationModelConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModel application); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationModelProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IBindingModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBindingModel + { + Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICommonModel : Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel + { + System.Collections.Generic.IReadOnlyList Attributes { get; } + System.Reflection.MemberInfo MemberInfo { get; } + string Name { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IControllerModelConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IControllerModelConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerModel controller); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IFilterModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFilterModel + { + System.Collections.Generic.IList Filters { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IParameterModelBaseConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IParameterModelBaseConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase parameter); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IParameterModelConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IParameterModelConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModel parameter); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPropertyModel + { + System.Collections.Generic.IDictionary Properties { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.InferParameterBindingInfoConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InferParameterBindingInfoConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public InferParameterBindingInfoConvention(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.InvalidModelStateFilterConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InvalidModelStateFilterConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public InvalidModelStateFilterConvention() => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ParameterModel : Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase, Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel + { + public Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel Action { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public string DisplayName { get => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + public System.Reflection.ParameterInfo ParameterInfo { get => throw null; } + public ParameterModel(System.Reflection.ParameterInfo parameterInfo, System.Collections.Generic.IReadOnlyList attributes) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public ParameterModel(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModel other) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public string ParameterName { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ParameterModelBase : Microsoft.AspNetCore.Mvc.ApplicationModels.IBindingModel + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + protected ParameterModelBase(System.Type parameterType, System.Collections.Generic.IReadOnlyList attributes) => throw null; + protected ParameterModelBase(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase other) => throw null; + public System.Type ParameterType { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PropertyModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PropertyModel : Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase, Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IBindingModel + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerModel Controller { get => throw null; set => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Reflection.PropertyInfo PropertyInfo { get => throw null; } + public PropertyModel(System.Reflection.PropertyInfo propertyInfo, System.Collections.Generic.IReadOnlyList attributes) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public PropertyModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PropertyModel other) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public string PropertyName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.RouteTokenTransformerConvention` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteTokenTransformerConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + public RouteTokenTransformerConvention(Microsoft.AspNetCore.Routing.IOutboundParameterTransformer parameterTransformer) => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.ActionModel action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.SelectorModel` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SelectorModel + { + public System.Collections.Generic.IList ActionConstraints { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.AttributeRouteModel AttributeRouteModel { get => throw null; set => throw null; } + public System.Collections.Generic.IList EndpointMetadata { get => throw null; } + public SelectorModel(Microsoft.AspNetCore.Mvc.ApplicationModels.SelectorModel other) => throw null; + public SelectorModel() => throw null; + } + + } + namespace ApplicationParts + { + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ApplicationPart + { + protected ApplicationPart() => throw null; + public abstract string Name { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationPartAttribute : System.Attribute + { + public ApplicationPartAttribute(string assemblyName) => throw null; + public string AssemblyName { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ApplicationPartFactory + { + protected ApplicationPartFactory() => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory GetApplicationPartFactory(System.Reflection.Assembly assembly) => throw null; + public abstract System.Collections.Generic.IEnumerable GetApplicationParts(System.Reflection.Assembly assembly); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationPartManager + { + public ApplicationPartManager() => throw null; + public System.Collections.Generic.IList ApplicationParts { get => throw null; } + public System.Collections.Generic.IList FeatureProviders { get => throw null; } + public void PopulateFeature(TFeature feature) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.AssemblyPart` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AssemblyPart : Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart, Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationPartTypeProvider + { + public System.Reflection.Assembly Assembly { get => throw null; } + public AssemblyPart(System.Reflection.Assembly assembly) => throw null; + public override string Name { get => throw null; } + public System.Collections.Generic.IEnumerable Types { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.DefaultApplicationPartFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultApplicationPartFactory : Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory + { + public DefaultApplicationPartFactory() => throw null; + public override System.Collections.Generic.IEnumerable GetApplicationParts(System.Reflection.Assembly assembly) => throw null; + public static System.Collections.Generic.IEnumerable GetDefaultApplicationParts(System.Reflection.Assembly assembly) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationParts.DefaultApplicationPartFactory Instance { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationFeatureProvider + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationFeatureProvider : Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider + { + void PopulateFeature(System.Collections.Generic.IEnumerable parts, TFeature feature); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationPartTypeProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationPartTypeProvider + { + System.Collections.Generic.IEnumerable Types { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ICompilationReferencesProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompilationReferencesProvider + { + System.Collections.Generic.IEnumerable GetReferencePaths(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullApplicationPartFactory : Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory + { + public override System.Collections.Generic.IEnumerable GetApplicationParts(System.Reflection.Assembly assembly) => throw null; + public NullApplicationPartFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.ProvideApplicationPartFactoryAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProvideApplicationPartFactoryAttribute : System.Attribute + { + public System.Type GetFactoryType() => throw null; + public ProvideApplicationPartFactoryAttribute(string factoryTypeName) => throw null; + public ProvideApplicationPartFactoryAttribute(System.Type factoryType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RelatedAssemblyAttribute : System.Attribute + { + public string AssemblyFileName { get => throw null; } + public static System.Collections.Generic.IReadOnlyList GetRelatedAssemblies(System.Reflection.Assembly assembly, bool throwOnError) => throw null; + public RelatedAssemblyAttribute(string assemblyFileName) => throw null; + } + + } + namespace Authorization + { + // Generated from `Microsoft.AspNetCore.Mvc.Authorization.AllowAnonymousFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AllowAnonymousFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Authorization.IAllowAnonymousFilter + { + public AllowAnonymousFilter() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthorizeFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter + { + public System.Collections.Generic.IEnumerable AuthorizeData { get => throw null; } + public AuthorizeFilter(string policy) => throw null; + public AuthorizeFilter(System.Collections.Generic.IEnumerable authorizeData) => throw null; + public AuthorizeFilter(Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, System.Collections.Generic.IEnumerable authorizeData) => throw null; + public AuthorizeFilter(Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; + public AuthorizeFilter() => throw null; + Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Microsoft.AspNetCore.Mvc.Filters.IFilterFactory.CreateInstance(System.IServiceProvider serviceProvider) => throw null; + bool Microsoft.AspNetCore.Mvc.Filters.IFilterFactory.IsReusable { get => throw null; } + public virtual System.Threading.Tasks.Task OnAuthorizationAsync(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext context) => throw null; + public Microsoft.AspNetCore.Authorization.AuthorizationPolicy Policy { get => throw null; } + public Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider PolicyProvider { get => throw null; } + } + + } + namespace Controllers + { + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerActionDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor + { + public virtual string ActionName { get => throw null; set => throw null; } + public ControllerActionDescriptor() => throw null; + public string ControllerName { get => throw null; set => throw null; } + public System.Reflection.TypeInfo ControllerTypeInfo { get => throw null; set => throw null; } + public override string DisplayName { get => throw null; set => throw null; } + public System.Reflection.MethodInfo MethodInfo { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerActivatorProvider : Microsoft.AspNetCore.Mvc.Controllers.IControllerActivatorProvider + { + public ControllerActivatorProvider(Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator controllerActivator) => throw null; + public System.Func CreateActivator(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor) => throw null; + public System.Action CreateReleaser(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerBoundPropertyDescriptor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerBoundPropertyDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor, Microsoft.AspNetCore.Mvc.Infrastructure.IPropertyInfoParameterDescriptor + { + public ControllerBoundPropertyDescriptor() => throw null; + public System.Reflection.PropertyInfo PropertyInfo { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerFeature` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerFeature + { + public ControllerFeature() => throw null; + public System.Collections.Generic.IList Controllers { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerFeatureProvider : Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider, Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider + { + public ControllerFeatureProvider() => throw null; + protected virtual bool IsController(System.Reflection.TypeInfo typeInfo) => throw null; + public void PopulateFeature(System.Collections.Generic.IEnumerable parts, Microsoft.AspNetCore.Mvc.Controllers.ControllerFeature feature) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ControllerParameterDescriptor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ControllerParameterDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor, Microsoft.AspNetCore.Mvc.Infrastructure.IParameterInfoParameterDescriptor + { + public ControllerParameterDescriptor() => throw null; + public System.Reflection.ParameterInfo ParameterInfo { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IControllerActivator + { + object Create(Microsoft.AspNetCore.Mvc.ControllerContext context); + void Release(Microsoft.AspNetCore.Mvc.ControllerContext context, object controller); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.IControllerActivatorProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IControllerActivatorProvider + { + System.Func CreateActivator(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor); + System.Action CreateReleaser(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.IControllerFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IControllerFactory + { + object CreateController(Microsoft.AspNetCore.Mvc.ControllerContext context); + void ReleaseController(Microsoft.AspNetCore.Mvc.ControllerContext context, object controller); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.IControllerFactoryProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IControllerFactoryProvider + { + System.Func CreateControllerFactory(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor); + System.Action CreateControllerReleaser(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.IControllerPropertyActivator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IControllerPropertyActivator + { + void Activate(Microsoft.AspNetCore.Mvc.ControllerContext context, object controller); + System.Action GetActivatorDelegate(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor actionDescriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceBasedControllerActivator : Microsoft.AspNetCore.Mvc.Controllers.IControllerActivator + { + public object Create(Microsoft.AspNetCore.Mvc.ControllerContext actionContext) => throw null; + public virtual void Release(Microsoft.AspNetCore.Mvc.ControllerContext context, object controller) => throw null; + public ServiceBasedControllerActivator() => throw null; + } + + } + namespace Core + { + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Mvc.Core.Infrastructure.IAntiforgeryValidationFailedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAntiforgeryValidationFailedResult : Microsoft.AspNetCore.Mvc.IActionResult + { + } + + } + } + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterActionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterActionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterActionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterActionFilterOnActionExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterActionFilterOnActionExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext ActionExecutedContext { get => throw null; } + public AfterActionFilterOnActionExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext actionExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterActionFilterOnActionExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterActionFilterOnActionExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext ActionExecutingContext { get => throw null; } + public AfterActionFilterOnActionExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext actionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterActionFilterOnActionExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterActionFilterOnActionExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext ActionExecutedContext { get => throw null; } + public AfterActionFilterOnActionExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext actionExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterActionResultEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterActionResultEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public AfterActionResultEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.IActionResult result) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterAuthorizationFilterOnAuthorizationEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterAuthorizationFilterOnAuthorizationEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterAuthorizationFilterOnAuthorizationEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext authorizationContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + public Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext AuthorizationContext { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterControllerActionMethodEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterControllerActionMethodEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public AfterControllerActionMethodEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IReadOnlyDictionary arguments, object controller, Microsoft.AspNetCore.Mvc.IActionResult result) => throw null; + public System.Collections.Generic.IReadOnlyDictionary Arguments { get => throw null; } + public object Controller { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterExceptionFilterOnExceptionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterExceptionFilterOnExceptionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterExceptionFilterOnExceptionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ExceptionContext exceptionContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.ExceptionContext ExceptionContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResourceFilterOnResourceExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResourceFilterOnResourceExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResourceFilterOnResourceExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext resourceExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext ResourceExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResourceFilterOnResourceExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResourceFilterOnResourceExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResourceFilterOnResourceExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext resourceExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext ResourceExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResourceFilterOnResourceExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResourceFilterOnResourceExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResourceFilterOnResourceExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext resourceExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext ResourceExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResultFilterOnResultExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResultFilterOnResultExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResultFilterOnResultExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext resultExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext ResultExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResultFilterOnResultExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResultFilterOnResultExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResultFilterOnResultExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext resultExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext ResultExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterResultFilterOnResultExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterResultFilterOnResultExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterResultFilterOnResultExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext resultExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext ResultExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeActionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeActionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeActionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeActionFilterOnActionExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeActionFilterOnActionExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext ActionExecutedContext { get => throw null; } + public BeforeActionFilterOnActionExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext actionExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeActionFilterOnActionExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeActionFilterOnActionExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext ActionExecutingContext { get => throw null; } + public BeforeActionFilterOnActionExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext actionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeActionFilterOnActionExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeActionFilterOnActionExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext ActionExecutingContext { get => throw null; } + public BeforeActionFilterOnActionExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext actionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeActionResultEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeActionResultEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public BeforeActionResultEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.IActionResult result) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeAuthorizationFilterOnAuthorizationEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeAuthorizationFilterOnAuthorizationEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext AuthorizationContext { get => throw null; } + public BeforeAuthorizationFilterOnAuthorizationEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext authorizationContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeControllerActionMethodEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeControllerActionMethodEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public System.Collections.Generic.IReadOnlyDictionary ActionArguments { get => throw null; } + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public BeforeControllerActionMethodEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IReadOnlyDictionary actionArguments, object controller) => throw null; + public object Controller { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeExceptionFilterOnException` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeExceptionFilterOnException : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeExceptionFilterOnException(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ExceptionContext exceptionContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.ExceptionContext ExceptionContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResourceFilterOnResourceExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResourceFilterOnResourceExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResourceFilterOnResourceExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext resourceExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext ResourceExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResourceFilterOnResourceExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResourceFilterOnResourceExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResourceFilterOnResourceExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext resourceExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext ResourceExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResourceFilterOnResourceExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResourceFilterOnResourceExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResourceFilterOnResourceExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext resourceExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext ResourceExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResultFilterOnResultExecutedEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResultFilterOnResultExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResultFilterOnResultExecutedEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext resultExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext ResultExecutedContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResultFilterOnResultExecutingEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResultFilterOnResultExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResultFilterOnResultExecutingEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext resultExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext ResultExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeResultFilterOnResultExecutionEventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeResultFilterOnResultExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeResultFilterOnResultExecutionEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext resultExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Filter { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext ResultExecutingContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.EventData` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class EventData : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable> + { + protected abstract int Count { get; } + int System.Collections.Generic.IReadOnlyCollection>.Count { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.EventData.Enumerator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + protected EventData() => throw null; + protected const string EventNamespace = default; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + protected abstract System.Collections.Generic.KeyValuePair this[int index] { get; } + System.Collections.Generic.KeyValuePair System.Collections.Generic.IReadOnlyList>.this[int index] { get => throw null; } + } + + } + namespace Filters + { + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ActionFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter, Microsoft.AspNetCore.Mvc.Filters.IActionFilter + { + protected ActionFilterAttribute() => throw null; + public virtual void OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context) => throw null; + public virtual void OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context) => throw null; + public virtual System.Threading.Tasks.Task OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate next) => throw null; + public virtual void OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext context) => throw null; + public virtual void OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context) => throw null; + public virtual System.Threading.Tasks.Task OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate next) => throw null; + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ExceptionFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter + { + protected ExceptionFilterAttribute() => throw null; + public virtual void OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext context) => throw null; + public virtual System.Threading.Tasks.Task OnExceptionAsync(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext context) => throw null; + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterCollection` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FilterCollection : System.Collections.ObjectModel.Collection + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add(int order) where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add() where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add(System.Type filterType, int order) => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata Add(System.Type filterType) => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata AddService(int order) where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata AddService() where TFilterType : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata AddService(System.Type filterType, int order) => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata AddService(System.Type filterType) => throw null; + public FilterCollection() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.FilterScope` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class FilterScope + { + public static int Action; + public static int Controller; + public static int First; + public static int Global; + public static int Last; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.ResultFilterAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ResultFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter + { + public virtual void OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext context) => throw null; + public virtual void OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context) => throw null; + public virtual System.Threading.Tasks.Task OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate next) => throw null; + public int Order { get => throw null; set => throw null; } + protected ResultFilterAttribute() => throw null; + } + + } + namespace Formatters + { + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.FormatFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormatFilter : Microsoft.AspNetCore.Mvc.Filters.IResultFilter, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + public FormatFilter(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public virtual string GetFormat(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public void OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext context) => throw null; + public void OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context) => throw null; + public void OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext context) => throw null; + public void OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.FormatterMappings` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormatterMappings + { + public bool ClearMediaTypeMappingForFormat(string format) => throw null; + public FormatterMappings() => throw null; + public string GetMediaTypeMappingForFormat(string format) => throw null; + public void SetMediaTypeMappingForFormat(string format, string contentType) => throw null; + public void SetMediaTypeMappingForFormat(string format, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpNoContentOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter + { + public bool CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context) => throw null; + public HttpNoContentOutputFormatter() => throw null; + public bool TreatNullValueAsNoContent { get => throw null; set => throw null; } + public System.Threading.Tasks.Task WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.IFormatFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IFormatFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + string GetFormat(Microsoft.AspNetCore.Mvc.ActionContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.InputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class InputFormatter : Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider + { + public virtual bool CanRead(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) => throw null; + protected virtual bool CanReadType(System.Type type) => throw null; + protected virtual object GetDefaultValueForType(System.Type modelType) => throw null; + public virtual System.Collections.Generic.IReadOnlyList GetSupportedContentTypes(string contentType, System.Type objectType) => throw null; + protected InputFormatter() => throw null; + public virtual System.Threading.Tasks.Task ReadAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) => throw null; + public abstract System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context); + public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection SupportedMediaTypes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.MediaType` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct MediaType + { + public Microsoft.Extensions.Primitives.StringSegment Charset { get => throw null; } + public static Microsoft.AspNetCore.Mvc.Formatters.MediaTypeSegmentWithQuality CreateMediaTypeSegmentWithQuality(string mediaType, int start) => throw null; + public System.Text.Encoding Encoding { get => throw null; } + public static System.Text.Encoding GetEncoding(string mediaType) => throw null; + public static System.Text.Encoding GetEncoding(Microsoft.Extensions.Primitives.StringSegment mediaType) => throw null; + public Microsoft.Extensions.Primitives.StringSegment GetParameter(string parameterName) => throw null; + public Microsoft.Extensions.Primitives.StringSegment GetParameter(Microsoft.Extensions.Primitives.StringSegment parameterName) => throw null; + public bool HasWildcard { get => throw null; } + public bool IsSubsetOf(Microsoft.AspNetCore.Mvc.Formatters.MediaType set) => throw null; + public bool MatchesAllSubTypes { get => throw null; } + public bool MatchesAllSubTypesWithoutSuffix { get => throw null; } + public bool MatchesAllTypes { get => throw null; } + public MediaType(string mediaType, int offset, int? length) => throw null; + public MediaType(string mediaType) => throw null; + public MediaType(Microsoft.Extensions.Primitives.StringSegment mediaType) => throw null; + // Stub generator skipped constructor + public static string ReplaceEncoding(string mediaType, System.Text.Encoding encoding) => throw null; + public static string ReplaceEncoding(Microsoft.Extensions.Primitives.StringSegment mediaType, System.Text.Encoding encoding) => throw null; + public Microsoft.Extensions.Primitives.StringSegment SubType { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment SubTypeSuffix { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment SubTypeWithoutSuffix { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MediaTypeCollection : System.Collections.ObjectModel.Collection + { + public void Add(Microsoft.Net.Http.Headers.MediaTypeHeaderValue item) => throw null; + public void Insert(int index, Microsoft.Net.Http.Headers.MediaTypeHeaderValue item) => throw null; + public MediaTypeCollection() => throw null; + public bool Remove(Microsoft.Net.Http.Headers.MediaTypeHeaderValue item) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.MediaTypeSegmentWithQuality` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct MediaTypeSegmentWithQuality + { + public Microsoft.Extensions.Primitives.StringSegment MediaType { get => throw null; } + public MediaTypeSegmentWithQuality(Microsoft.Extensions.Primitives.StringSegment mediaType, double quality) => throw null; + // Stub generator skipped constructor + public double Quality { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class OutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseTypeMetadataProvider + { + public virtual bool CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context) => throw null; + protected virtual bool CanWriteType(System.Type type) => throw null; + public virtual System.Collections.Generic.IReadOnlyList GetSupportedContentTypes(string contentType, System.Type objectType) => throw null; + protected OutputFormatter() => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection SupportedMediaTypes { get => throw null; } + public virtual System.Threading.Tasks.Task WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + public abstract System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context); + public virtual void WriteResponseHeaders(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StreamOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter + { + public bool CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context) => throw null; + public StreamOutputFormatter() => throw null; + public System.Threading.Tasks.Task WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter + { + public override bool CanWriteResult(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context) => throw null; + public StringOutputFormatter() => throw null; + public override System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding encoding) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonInputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SystemTextJsonInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy + { + Microsoft.AspNetCore.Mvc.Formatters.InputFormatterExceptionPolicy Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy.ExceptionPolicy { get => throw null; } + public override System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding) => throw null; + public System.Text.Json.JsonSerializerOptions SerializerOptions { get => throw null; } + public SystemTextJsonInputFormatter(Microsoft.AspNetCore.Mvc.JsonOptions options, Microsoft.Extensions.Logging.ILogger logger) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SystemTextJsonOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter + { + public System.Text.Json.JsonSerializerOptions SerializerOptions { get => throw null; } + public SystemTextJsonOutputFormatter(System.Text.Json.JsonSerializerOptions jsonSerializerOptions) => throw null; + public override System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TextInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.InputFormatter + { + public override System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) => throw null; + public abstract System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding); + protected System.Text.Encoding SelectCharacterEncoding(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context) => throw null; + public System.Collections.Generic.IList SupportedEncodings { get => throw null; } + protected TextInputFormatter() => throw null; + protected static System.Text.Encoding UTF16EncodingLittleEndian; + protected static System.Text.Encoding UTF8EncodingWithoutBOM; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TextOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatter + { + public virtual System.Text.Encoding SelectCharacterEncoding(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + public System.Collections.Generic.IList SupportedEncodings { get => throw null; } + protected TextOutputFormatter() => throw null; + public override System.Threading.Tasks.Task WriteAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + public override System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context) => throw null; + public abstract System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding); + } + + } + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ActionContextAccessor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionContextAccessor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; set => throw null; } + public ActionContextAccessor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ActionDescriptorCollection` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionDescriptorCollection + { + public ActionDescriptorCollection(System.Collections.Generic.IReadOnlyList items, int version) => throw null; + public System.Collections.Generic.IReadOnlyList Items { get => throw null; } + public int Version { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ActionDescriptorCollectionProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ActionDescriptorCollectionProvider : Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider + { + protected ActionDescriptorCollectionProvider() => throw null; + public abstract Microsoft.AspNetCore.Mvc.Infrastructure.ActionDescriptorCollection ActionDescriptors { get; } + public abstract Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ActionResultObjectValueAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionResultObjectValueAttribute : System.Attribute + { + public ActionResultObjectValueAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ActionResultStatusCodeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActionResultStatusCodeAttribute : System.Attribute + { + public ActionResultStatusCodeAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.AmbiguousActionException` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AmbiguousActionException : System.InvalidOperationException + { + public AmbiguousActionException(string message) => throw null; + protected AmbiguousActionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.CompatibilitySwitch<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompatibilitySwitch : Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch where TValue : struct + { + public CompatibilitySwitch(string name, TValue initialValue) => throw null; + public CompatibilitySwitch(string name) => throw null; + public bool IsValueSet { get => throw null; } + public string Name { get => throw null; } + public TValue Value { get => throw null; set => throw null; } + object Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch.Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ConfigureCompatibilityOptions<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConfigureCompatibilityOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TOptions : class, System.Collections.Generic.IEnumerable + { + protected ConfigureCompatibilityOptions(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions compatibilityOptions) => throw null; + protected abstract System.Collections.Generic.IReadOnlyDictionary DefaultValues { get; } + public virtual void PostConfigure(string name, TOptions options) => throw null; + protected Microsoft.AspNetCore.Mvc.CompatibilityVersion Version { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ContentResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public ContentResultExecutor(Microsoft.Extensions.Logging.ILogger logger, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory httpResponseStreamWriterFactory) => throw null; + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ContentResult result) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultOutputFormatterSelector : Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector + { + public DefaultOutputFormatterSelector(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public override Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter SelectFormatter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context, System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.DefaultStatusCodeAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultStatusCodeAttribute : System.Attribute + { + public DefaultStatusCodeAttribute(int statusCode) => throw null; + public int StatusCode { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.FileContentResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileContentResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileContentResult result) => throw null; + public FileContentResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.Extensions.Logging.ILogger)) => throw null; + protected virtual System.Threading.Tasks.Task WriteFileAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileContentResult result, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, System.Int64 rangeLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileResultExecutorBase + { + protected const int BufferSize = default; + protected static Microsoft.Extensions.Logging.ILogger CreateLogger(Microsoft.Extensions.Logging.ILoggerFactory factory) => throw null; + public FileResultExecutorBase(Microsoft.Extensions.Logging.ILogger logger) => throw null; + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + protected virtual (Microsoft.Net.Http.Headers.RangeItemHeaderValue, System.Int64, bool) SetHeadersAndLog(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileResult result, System.Int64? fileLength, bool enableRangeProcessing, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), Microsoft.Net.Http.Headers.EntityTagHeaderValue etag = default(Microsoft.Net.Http.Headers.EntityTagHeaderValue)) => throw null; + protected static System.Threading.Tasks.Task WriteFileAsync(Microsoft.AspNetCore.Http.HttpContext context, System.IO.Stream fileStream, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, System.Int64 rangeLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.FileStreamResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileStreamResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileStreamResult result) => throw null; + public FileStreamResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.Extensions.Logging.ILogger)) => throw null; + protected virtual System.Threading.Tasks.Task WriteFileAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileStreamResult result, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, System.Int64 rangeLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionContextAccessor + { + Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorChangeProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionDescriptorChangeProvider + { + Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionDescriptorCollectionProvider + { + Microsoft.AspNetCore.Mvc.Infrastructure.ActionDescriptorCollection ActionDescriptors { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionInvokerFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionInvokerFactory + { + Microsoft.AspNetCore.Mvc.Abstractions.IActionInvoker CreateInvoker(Microsoft.AspNetCore.Mvc.ActionContext actionContext); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionResultExecutor where TResult : Microsoft.AspNetCore.Mvc.IActionResult + { + System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, TResult result); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultTypeMapper` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionResultTypeMapper + { + Microsoft.AspNetCore.Mvc.IActionResult Convert(object value, System.Type returnType); + System.Type GetResultDataType(System.Type returnType); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IActionSelector` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionSelector + { + Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor SelectBestCandidate(Microsoft.AspNetCore.Routing.RouteContext context, System.Collections.Generic.IReadOnlyList candidates); + System.Collections.Generic.IReadOnlyList SelectCandidates(Microsoft.AspNetCore.Routing.RouteContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IApiBehaviorMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApiBehaviorMetadata : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClientErrorActionResult : Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClientErrorFactory + { + Microsoft.AspNetCore.Mvc.IActionResult GetClientError(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.Infrastructure.IClientErrorActionResult clientError); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ICompatibilitySwitch` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompatibilitySwitch + { + bool IsValueSet { get; } + string Name { get; } + object Value { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IConvertToActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConvertToActionResult + { + Microsoft.AspNetCore.Mvc.IActionResult Convert(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestStreamReaderFactory + { + System.IO.TextReader CreateReader(System.IO.Stream stream, System.Text.Encoding encoding); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpResponseStreamWriterFactory + { + System.IO.TextWriter CreateWriter(System.IO.Stream stream, System.Text.Encoding encoding); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IParameterInfoParameterDescriptor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IParameterInfoParameterDescriptor + { + System.Reflection.ParameterInfo ParameterInfo { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IPropertyInfoParameterDescriptor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPropertyInfoParameterDescriptor + { + System.Reflection.PropertyInfo PropertyInfo { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStatusCodeActionResult : Microsoft.AspNetCore.Mvc.IActionResult + { + int? StatusCode { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.LocalRedirectResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocalRedirectResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.LocalRedirectResult result) => throw null; + public LocalRedirectResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelStateInvalidFilter : Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IActionFilter + { + public bool IsReusable { get => throw null; } + public ModelStateInvalidFilter(Microsoft.AspNetCore.Mvc.ApiBehaviorOptions apiBehaviorOptions, Microsoft.Extensions.Logging.ILogger logger) => throw null; + public void OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context) => throw null; + public void OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context) => throw null; + public int Order { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.MvcCompatibilityOptions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcCompatibilityOptions + { + public Microsoft.AspNetCore.Mvc.CompatibilityVersion CompatibilityVersion { get => throw null; set => throw null; } + public MvcCompatibilityOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ObjectResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ObjectResult result) => throw null; + protected Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector FormatterSelector { get => throw null; } + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + public ObjectResultExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector formatterSelector, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions mvcOptions) => throw null; + public ObjectResultExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector formatterSelector, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + protected System.Func WriterFactory { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.OutputFormatterSelector` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class OutputFormatterSelector + { + protected OutputFormatterSelector() => throw null; + public abstract Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter SelectFormatter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context, System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection mediaTypes); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalFileResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.PhysicalFileResult result) => throw null; + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor.FileMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + protected class FileMetadata + { + public bool Exists { get => throw null; set => throw null; } + public FileMetadata() => throw null; + public System.DateTimeOffset LastModified { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; set => throw null; } + } + + + protected virtual Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor.FileMetadata GetFileInfo(string path) => throw null; + protected virtual System.IO.Stream GetFileStream(string path) => throw null; + public PhysicalFileResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.Extensions.Logging.ILogger)) => throw null; + protected virtual System.Threading.Tasks.Task WriteFileAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.PhysicalFileResult result, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, System.Int64 rangeLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.ProblemDetailsFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ProblemDetailsFactory + { + public abstract Microsoft.AspNetCore.Mvc.ProblemDetails CreateProblemDetails(Microsoft.AspNetCore.Http.HttpContext httpContext, int? statusCode = default(int?), string title = default(string), string type = default(string), string detail = default(string), string instance = default(string)); + public abstract Microsoft.AspNetCore.Mvc.ValidationProblemDetails CreateValidationProblemDetails(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelStateDictionary, int? statusCode = default(int?), string title = default(string), string type = default(string), string detail = default(string), string instance = default(string)); + protected ProblemDetailsFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.RedirectResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.RedirectResult result) => throw null; + public RedirectResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToActionResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToActionResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.RedirectToActionResult result) => throw null; + public RedirectToActionResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToPageResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToPageResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.RedirectToPageResult result) => throw null; + public RedirectToPageResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.RedirectToRouteResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RedirectToRouteResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.RedirectToRouteResult result) => throw null; + public RedirectToRouteResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.VirtualFileResultExecutor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class VirtualFileResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.VirtualFileResult result) => throw null; + protected virtual System.IO.Stream GetFileStream(Microsoft.Extensions.FileProviders.IFileInfo fileInfo) => throw null; + public VirtualFileResultExecutor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) : base(default(Microsoft.Extensions.Logging.ILogger)) => throw null; + protected virtual System.Threading.Tasks.Task WriteFileAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.VirtualFileResult result, Microsoft.Extensions.FileProviders.IFileInfo fileInfo, Microsoft.Net.Http.Headers.RangeItemHeaderValue range, System.Int64 rangeLength) => throw null; + } + + } + namespace ModelBinding + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindNeverAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindNeverAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute + { + public BindNeverAttribute() : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindRequiredAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindRequiredAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute + { + public BindRequiredAttribute() : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum BindingBehavior + { + // Stub generator skipped constructor + Never, + Optional, + Required, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingBehaviorAttribute : System.Attribute + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior Behavior { get => throw null; } + public BindingBehaviorAttribute(Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior behavior) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class BindingSourceValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceValueProvider + { + protected Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public BindingSourceValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public abstract bool ContainsPrefix(string prefix); + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.CompositeValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeValueProvider : System.Collections.ObjectModel.Collection, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IKeyRewriterValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceValueProvider + { + public CompositeValueProvider(System.Collections.Generic.IList valueProviders) => throw null; + public CompositeValueProvider() => throw null; + public virtual bool ContainsPrefix(string prefix) => throw null; + public static System.Threading.Tasks.Task CreateAsync(Microsoft.AspNetCore.Mvc.ControllerContext controllerContext) => throw null; + public static System.Threading.Tasks.Task CreateAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IList factories) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter() => throw null; + public virtual System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + protected override void InsertItem(int index, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider item) => throw null; + protected override void SetItem(int index, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider item) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.DefaultModelBindingContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultModelBindingContext : Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext + { + public override Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; set => throw null; } + public override string BinderModelName { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext CreateBindingContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo bindingInfo, string modelName) => throw null; + public DefaultModelBindingContext() => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope EnterNestedScope(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, string fieldName, string modelName, object model) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope EnterNestedScope() => throw null; + protected override void ExitNestedScope() => throw null; + public override string FieldName { get => throw null; set => throw null; } + public override bool IsTopLevelObject { get => throw null; set => throw null; } + public override object Model { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; set => throw null; } + public override string ModelName { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider OriginalValueProvider { get => throw null; set => throw null; } + public override System.Func PropertyFilter { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult Result { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary ValidationState { get => throw null; set => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider ValueProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.DefaultPropertyFilterProvider<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultPropertyFilterProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider where TModel : class + { + public DefaultPropertyFilterProvider() => throw null; + public virtual string Prefix { get => throw null; } + public virtual System.Func PropertyFilter { get => throw null; } + public virtual System.Collections.Generic.IEnumerable>> PropertyIncludeExpressions { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.EmptyModelMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EmptyModelMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelMetadataProvider + { + public EmptyModelMetadataProvider() : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.FormFileValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFileValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider + { + public bool ContainsPrefix(string prefix) => throw null; + public FormFileValueProvider(Microsoft.AspNetCore.Http.IFormFileCollection files) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.FormFileValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFileValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public FormFileValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider + { + public override bool ContainsPrefix(string prefix) => throw null; + public System.Globalization.CultureInfo Culture { get => throw null; } + public FormValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, Microsoft.AspNetCore.Http.IFormCollection values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource)) => throw null; + public virtual System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.PrefixContainer PrefixContainer { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.FormValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public FormValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBindingSourceValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider + { + Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICollectionModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + bool CanCreateInstance(System.Type targetType); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEnumerableValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider + { + System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IKeyRewriterValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeyRewriterValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider + { + Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelBinderFactory + { + Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder CreateBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactoryContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.JQueryFormValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JQueryFormValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.JQueryValueProvider + { + public JQueryFormValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, System.Collections.Generic.IDictionary values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource), default(System.Collections.Generic.IDictionary), default(System.Globalization.CultureInfo)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.JQueryFormValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JQueryFormValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public JQueryFormValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.JQueryQueryStringValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JQueryQueryStringValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.JQueryValueProvider + { + public JQueryQueryStringValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, System.Collections.Generic.IDictionary values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource), default(System.Collections.Generic.IDictionary), default(System.Globalization.CultureInfo)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.JQueryQueryStringValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JQueryQueryStringValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public JQueryQueryStringValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.JQueryValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class JQueryValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IKeyRewriterValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider + { + public override bool ContainsPrefix(string prefix) => throw null; + public System.Globalization.CultureInfo Culture { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter() => throw null; + public System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + protected JQueryValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, System.Collections.Generic.IDictionary values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource)) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.PrefixContainer PrefixContainer { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelAttributes + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForParameter(System.Reflection.ParameterInfo parameterInfo, System.Type modelType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForParameter(System.Reflection.ParameterInfo parameterInfo) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForProperty(System.Type type, System.Reflection.PropertyInfo property) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForProperty(System.Type containerType, System.Reflection.PropertyInfo property, System.Type modelType) => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForType(System.Type type) => throw null; + public System.Collections.Generic.IReadOnlyList ParameterAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList PropertyAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList TypeAttributes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelBinderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory + { + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder CreateBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactoryContext context) => throw null; + public ModelBinderFactory(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.Extensions.Options.IOptions options, System.IServiceProvider serviceProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactoryContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelBinderFactoryContext + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo BindingInfo { get => throw null; set => throw null; } + public object CacheToken { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; set => throw null; } + public ModelBinderFactoryContext() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelBinderProviderExtensions + { + public static void RemoveType(this System.Collections.Generic.IList list) where TModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider => throw null; + public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadataProviderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelMetadataProviderExtensions + { + public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForProperty(this Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, System.Type containerType, string propertyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelNames` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelNames + { + public static string CreateIndexModelName(string parentName, string index) => throw null; + public static string CreateIndexModelName(string parentName, int index) => throw null; + public static string CreatePropertyModelName(string prefix, string propertyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ObjectModelValidator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ObjectModelValidator : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator + { + public abstract Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor GetValidationVisitor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState); + public ObjectModelValidator(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, System.Collections.Generic.IList validatorProviders) => throw null; + public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object container) => throw null; + public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) => throw null; + public virtual void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ParameterBinder + { + public virtual System.Threading.Tasks.ValueTask BindModelAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value, object container) => throw null; + public virtual System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value) => throw null; + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + public ParameterBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderFactory modelBinderFactory, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator validator, Microsoft.Extensions.Options.IOptions mvcOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.PrefixContainer` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PrefixContainer + { + public bool ContainsPrefix(string prefix) => throw null; + public System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix) => throw null; + public PrefixContainer(System.Collections.Generic.ICollection values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.QueryStringValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryStringValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IEnumerableValueProvider + { + public override bool ContainsPrefix(string prefix) => throw null; + public System.Globalization.CultureInfo Culture { get => throw null; } + public virtual System.Collections.Generic.IDictionary GetKeysFromPrefix(string prefix) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.PrefixContainer PrefixContainer { get => throw null; } + public QueryStringValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, Microsoft.AspNetCore.Http.IQueryCollection values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.QueryStringValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class QueryStringValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public QueryStringValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.RouteValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValueProvider : Microsoft.AspNetCore.Mvc.ModelBinding.BindingSourceValueProvider + { + public override bool ContainsPrefix(string key) => throw null; + protected System.Globalization.CultureInfo Culture { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.PrefixContainer PrefixContainer { get => throw null; } + public RouteValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, Microsoft.AspNetCore.Routing.RouteValueDictionary values, System.Globalization.CultureInfo culture) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource)) => throw null; + public RouteValueProvider(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource, Microsoft.AspNetCore.Routing.RouteValueDictionary values) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.RouteValueProviderFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory + { + public System.Threading.Tasks.Task CreateValueProviderAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryContext context) => throw null; + public RouteValueProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.SuppressChildValidationMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SuppressChildValidationMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IValidationMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider + { + public void CreateValidationMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadataProviderContext context) => throw null; + public string FullTypeName { get => throw null; } + public SuppressChildValidationMetadataProvider(string fullTypeName) => throw null; + public SuppressChildValidationMetadataProvider(System.Type type) => throw null; + public System.Type Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeException` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnsupportedContentTypeException : System.Exception + { + public UnsupportedContentTypeException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UnsupportedContentTypeFilter : Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IActionFilter + { + public void OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context) => throw null; + public void OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context) => throw null; + public int Order { get => throw null; set => throw null; } + public UnsupportedContentTypeFilter() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderFactoryExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ValueProviderFactoryExtensions + { + public static void RemoveType(this System.Collections.Generic.IList list) where TValueProviderFactory : Microsoft.AspNetCore.Mvc.ModelBinding.IValueProviderFactory => throw null; + public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; + } + + namespace Binders + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinder<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ArrayModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder + { + public ArrayModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + public ArrayModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + public ArrayModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + public override bool CanCreateInstance(System.Type targetType) => throw null; + protected override object ConvertToCollectionType(System.Type targetType, System.Collections.Generic.IEnumerable collection) => throw null; + protected override void CopyToModel(object target, System.Collections.Generic.IEnumerable sourceCollection) => throw null; + protected override object CreateEmptyCollection(System.Type targetType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ArrayModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public ArrayModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BinderTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public BinderTypeModelBinder(System.Type binderType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BinderTypeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public BinderTypeModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BodyModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public BodyModelBinder(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + public BodyModelBinder(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public BodyModelBinder(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BodyModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public BodyModelBinderProvider(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + public BodyModelBinderProvider(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public BodyModelBinderProvider(System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpRequestStreamReaderFactory readerFactory) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ByteArrayModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public ByteArrayModelBinder(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ByteArrayModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public ByteArrayModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CancellationTokenModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public CancellationTokenModelBinder() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CancellationTokenModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public CancellationTokenModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CollectionModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder + { + protected void AddErrorIfBindingRequired(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public virtual System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public virtual bool CanCreateInstance(System.Type targetType) => throw null; + public CollectionModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions) => throw null; + public CollectionModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes) => throw null; + public CollectionModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + protected virtual object ConvertToCollectionType(System.Type targetType, System.Collections.Generic.IEnumerable collection) => throw null; + protected virtual void CopyToModel(object target, System.Collections.Generic.IEnumerable sourceCollection) => throw null; + protected virtual object CreateEmptyCollection(System.Type targetType) => throw null; + protected object CreateInstance(System.Type targetType) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder ElementBinder { get => throw null; } + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CollectionModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public CollectionModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComplexObjectModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComplexObjectModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public ComplexObjectModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComplexTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + protected virtual System.Threading.Tasks.Task BindProperty(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + protected virtual bool CanBindProperty(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata propertyMetadata) => throw null; + public ComplexTypeModelBinder(System.Collections.Generic.IDictionary propertyBinders, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes) => throw null; + public ComplexTypeModelBinder(System.Collections.Generic.IDictionary propertyBinders, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + protected virtual object CreateModel(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + protected virtual void SetProperty(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext, string modelName, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata propertyMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult result) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComplexTypeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public ComplexTypeModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DateTimeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public DateTimeModelBinder(System.Globalization.DateTimeStyles supportedStyles, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DateTimeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public DateTimeModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DecimalModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DecimalModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public DecimalModelBinder(System.Globalization.NumberStyles supportedStyles, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<,>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DictionaryModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder> + { + public override System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public override bool CanCreateInstance(System.Type targetType) => throw null; + protected override object ConvertToCollectionType(System.Type targetType, System.Collections.Generic.IEnumerable> collection) => throw null; + protected override object CreateEmptyCollection(System.Type targetType) => throw null; + public DictionaryModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + public DictionaryModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + public DictionaryModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DictionaryModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public DictionaryModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DoubleModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DoubleModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public DoubleModelBinder(System.Globalization.NumberStyles supportedStyles, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnumTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder + { + protected override void CheckModel(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult, object model) => throw null; + public EnumTypeModelBinder(bool suppressBindingUndefinedValueToEnumType, System.Type modelType, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(System.Type), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnumTypeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public EnumTypeModelBinderProvider(Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FloatModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public FloatModelBinder(System.Globalization.NumberStyles supportedStyles, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FloatingPointTypeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public FloatingPointTypeModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormCollectionModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public FormCollectionModelBinder(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormCollectionModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public FormCollectionModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFileModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public FormFileModelBinder(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormFileModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public FormFileModelBinderProvider() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HeaderModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public HeaderModelBinder(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder innerModelBinder) => throw null; + public HeaderModelBinder(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HeaderModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + public HeaderModelBinderProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinder<,>` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyValuePairModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public KeyValuePairModelBinder(Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyValuePairModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + public KeyValuePairModelBinderProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServicesModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + public ServicesModelBinder() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServicesModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + public ServicesModelBinderProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SimpleTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder + { + public System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext) => throw null; + protected virtual void CheckModel(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult, object model) => throw null; + public SimpleTypeModelBinder(System.Type type, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SimpleTypeModelBinderProvider : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider + { + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder GetBinder(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderProviderContext context) => throw null; + public SimpleTypeModelBinderProvider() => throw null; + } + + } + namespace Metadata + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingMetadata + { + public string BinderModelName { get => throw null; set => throw null; } + public System.Type BinderType { get => throw null; set => throw null; } + public BindingMetadata() => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; set => throw null; } + public System.Reflection.ConstructorInfo BoundConstructor { get => throw null; set => throw null; } + public bool IsBindingAllowed { get => throw null; set => throw null; } + public bool IsBindingRequired { get => throw null; set => throw null; } + public bool? IsReadOnly { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider ModelBindingMessageProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadataProviderContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingMetadataProviderContext + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadata BindingMetadata { get => throw null; } + public BindingMetadataProviderContext(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key, Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes attributes) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity Key { get => throw null; } + public System.Collections.Generic.IReadOnlyList ParameterAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList PropertyAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList TypeAttributes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingSourceMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BindingSourceMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IBindingMetadataProvider + { + public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public BindingSourceMetadataProvider(System.Type type, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; + public void CreateBindingMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadataProviderContext context) => throw null; + public System.Type Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultMetadataDetails + { + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadata BindingMetadata { get => throw null; set => throw null; } + public System.Func BoundConstructorInvoker { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata[] BoundConstructorParameters { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ContainerMetadata { get => throw null; set => throw null; } + public DefaultMetadataDetails(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key, Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes attributes) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadata DisplayMetadata { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity Key { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes ModelAttributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata[] Properties { get => throw null; set => throw null; } + public System.Func PropertyGetter { get => throw null; set => throw null; } + public System.Action PropertySetter { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadata ValidationMetadata { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultModelBindingMessageProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider + { + public override System.Func AttemptedValueIsInvalidAccessor { get => throw null; } + public DefaultModelBindingMessageProvider(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider originalProvider) => throw null; + public DefaultModelBindingMessageProvider() => throw null; + public override System.Func MissingBindRequiredValueAccessor { get => throw null; } + public override System.Func MissingKeyOrValueAccessor { get => throw null; } + public override System.Func MissingRequestBodyRequiredValueAccessor { get => throw null; } + public override System.Func NonPropertyAttemptedValueIsInvalidAccessor { get => throw null; } + public override System.Func NonPropertyUnknownValueIsInvalidAccessor { get => throw null; } + public override System.Func NonPropertyValueMustBeANumberAccessor { get => throw null; } + public void SetAttemptedValueIsInvalidAccessor(System.Func attemptedValueIsInvalidAccessor) => throw null; + public void SetMissingBindRequiredValueAccessor(System.Func missingBindRequiredValueAccessor) => throw null; + public void SetMissingKeyOrValueAccessor(System.Func missingKeyOrValueAccessor) => throw null; + public void SetMissingRequestBodyRequiredValueAccessor(System.Func missingRequestBodyRequiredValueAccessor) => throw null; + public void SetNonPropertyAttemptedValueIsInvalidAccessor(System.Func nonPropertyAttemptedValueIsInvalidAccessor) => throw null; + public void SetNonPropertyUnknownValueIsInvalidAccessor(System.Func nonPropertyUnknownValueIsInvalidAccessor) => throw null; + public void SetNonPropertyValueMustBeANumberAccessor(System.Func nonPropertyValueMustBeANumberAccessor) => throw null; + public void SetUnknownValueIsInvalidAccessor(System.Func unknownValueIsInvalidAccessor) => throw null; + public void SetValueIsInvalidAccessor(System.Func valueIsInvalidAccessor) => throw null; + public void SetValueMustBeANumberAccessor(System.Func valueMustBeANumberAccessor) => throw null; + public void SetValueMustNotBeNullAccessor(System.Func valueMustNotBeNullAccessor) => throw null; + public override System.Func UnknownValueIsInvalidAccessor { get => throw null; } + public override System.Func ValueIsInvalidAccessor { get => throw null; } + public override System.Func ValueMustBeANumberAccessor { get => throw null; } + public override System.Func ValueMustNotBeNullAccessor { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultModelMetadata : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata + { + public override System.Collections.Generic.IReadOnlyDictionary AdditionalValues { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes Attributes { get => throw null; } + public override string BinderModelName { get => throw null; } + public override System.Type BinderType { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadata BindingMetadata { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata BoundConstructor { get => throw null; } + public override System.Func BoundConstructorInvoker { get => throw null; } + public override System.Collections.Generic.IReadOnlyList BoundConstructorParameters { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ContainerMetadata { get => throw null; } + public override bool ConvertEmptyStringToNull { get => throw null; } + public override string DataTypeName { get => throw null; } + public DefaultModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider detailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails details, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider modelBindingMessageProvider) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity)) => throw null; + public DefaultModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider detailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails details) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity)) => throw null; + public override string Description { get => throw null; } + public override string DisplayFormatString { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadata DisplayMetadata { get => throw null; } + public override string DisplayName { get => throw null; } + public override string EditFormatString { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ElementMetadata { get => throw null; } + public override System.Collections.Generic.IEnumerable> EnumGroupedDisplayNamesAndValues { get => throw null; } + public override System.Collections.Generic.IReadOnlyDictionary EnumNamesAndValues { get => throw null; } + public override System.Collections.Generic.IEnumerable GetMetadataForProperties(System.Type modelType) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForType(System.Type modelType) => throw null; + public override bool HasNonDefaultEditFormat { get => throw null; } + public override bool? HasValidators { get => throw null; } + public override bool HideSurroundingHtml { get => throw null; } + public override bool HtmlEncode { get => throw null; } + public override bool IsBindingAllowed { get => throw null; } + public override bool IsBindingRequired { get => throw null; } + public override bool IsEnum { get => throw null; } + public override bool IsFlagsEnum { get => throw null; } + public override bool IsReadOnly { get => throw null; } + public override bool IsRequired { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider ModelBindingMessageProvider { get => throw null; } + public override string NullDisplayText { get => throw null; } + public override int Order { get => throw null; } + public override string Placeholder { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelPropertyCollection Properties { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider PropertyFilterProvider { get => throw null; } + public override System.Func PropertyGetter { get => throw null; } + public override System.Action PropertySetter { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter PropertyValidationFilter { get => throw null; } + public override bool ShowForDisplay { get => throw null; } + public override bool ShowForEdit { get => throw null; } + public override string SimpleDisplayProperty { get => throw null; } + public override string TemplateHint { get => throw null; } + public override bool ValidateChildren { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadata ValidationMetadata { get => throw null; } + public override System.Collections.Generic.IReadOnlyList ValidatorMetadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultModelMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadataProvider + { + protected virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata CreateModelMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails entry) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails CreateParameterDetails(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails[] CreatePropertyDetails(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultMetadataDetails CreateTypeDetails(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key) => throw null; + public DefaultModelMetadataProvider(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider detailsProvider, Microsoft.Extensions.Options.IOptions optionsAccessor) => throw null; + public DefaultModelMetadataProvider(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider detailsProvider) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider DetailsProvider { get => throw null; } + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForConstructor(System.Reflection.ConstructorInfo constructorInfo, System.Type modelType) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter(System.Reflection.ParameterInfo parameter, System.Type modelType) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter(System.Reflection.ParameterInfo parameter) => throw null; + public override System.Collections.Generic.IEnumerable GetMetadataForProperties(System.Type modelType) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForProperty(System.Reflection.PropertyInfo propertyInfo, System.Type modelType) => throw null; + public override Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForType(System.Type modelType) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelBindingMessageProvider ModelBindingMessageProvider { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DisplayMetadata + { + public System.Collections.Generic.IDictionary AdditionalValues { get => throw null; } + public bool ConvertEmptyStringToNull { get => throw null; set => throw null; } + public string DataTypeName { get => throw null; set => throw null; } + public System.Func Description { get => throw null; set => throw null; } + public string DisplayFormatString { get => throw null; set => throw null; } + public System.Func DisplayFormatStringProvider { get => throw null; set => throw null; } + public DisplayMetadata() => throw null; + public System.Func DisplayName { get => throw null; set => throw null; } + public string EditFormatString { get => throw null; set => throw null; } + public System.Func EditFormatStringProvider { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable> EnumGroupedDisplayNamesAndValues { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyDictionary EnumNamesAndValues { get => throw null; set => throw null; } + public bool HasNonDefaultEditFormat { get => throw null; set => throw null; } + public bool HideSurroundingHtml { get => throw null; set => throw null; } + public bool HtmlEncode { get => throw null; set => throw null; } + public bool IsEnum { get => throw null; set => throw null; } + public bool IsFlagsEnum { get => throw null; set => throw null; } + public string NullDisplayText { get => throw null; set => throw null; } + public System.Func NullDisplayTextProvider { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public System.Func Placeholder { get => throw null; set => throw null; } + public bool ShowForDisplay { get => throw null; set => throw null; } + public bool ShowForEdit { get => throw null; set => throw null; } + public string SimpleDisplayProperty { get => throw null; set => throw null; } + public string TemplateHint { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadataProviderContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DisplayMetadataProviderContext + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadata DisplayMetadata { get => throw null; } + public DisplayMetadataProviderContext(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key, Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes attributes) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity Key { get => throw null; } + public System.Collections.Generic.IReadOnlyList PropertyAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList TypeAttributes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ExcludeBindingMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExcludeBindingMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IBindingMetadataProvider + { + public void CreateBindingMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadataProviderContext context) => throw null; + public ExcludeBindingMetadataProvider(System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IBindingMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IBindingMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider + { + void CreateBindingMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadataProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ICompositeMetadataDetailsProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompositeMetadataDetailsProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IValidationMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IDisplayMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IBindingMetadataProvider + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IDisplayMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDisplayMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider + { + void CreateDisplayMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DisplayMetadataProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMetadataDetailsProvider + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IValidationMetadataProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValidationMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider + { + void CreateValidationMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadataProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.MetadataDetailsProviderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MetadataDetailsProviderExtensions + { + public static void RemoveType(this System.Collections.Generic.IList list) where TMetadataDetailsProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider => throw null; + public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationMetadata + { + public bool? HasValidators { get => throw null; set => throw null; } + public bool? IsRequired { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter PropertyValidationFilter { get => throw null; set => throw null; } + public bool? ValidateChildren { get => throw null; set => throw null; } + public ValidationMetadata() => throw null; + public System.Collections.Generic.IList ValidatorMetadata { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadataProviderContext` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationMetadataProviderContext + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity Key { get => throw null; } + public System.Collections.Generic.IReadOnlyList ParameterAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList PropertyAttributes { get => throw null; } + public System.Collections.Generic.IReadOnlyList TypeAttributes { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ValidationMetadata ValidationMetadata { get => throw null; } + public ValidationMetadataProviderContext(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity key, Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes attributes) => throw null; + } + + } + namespace Validation + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorCache` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClientValidatorCache + { + public ClientValidatorCache() => throw null; + public System.Collections.Generic.IReadOnlyList GetValidators(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidatorProvider validatorProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.CompositeClientModelValidatorProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeClientModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidatorProvider + { + public CompositeClientModelValidatorProvider(System.Collections.Generic.IEnumerable providers) => throw null; + public void CreateValidators(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorProviderContext context) => throw null; + public System.Collections.Generic.IReadOnlyList ValidatorProviders { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.CompositeModelValidatorProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider + { + public CompositeModelValidatorProvider(System.Collections.Generic.IList providers) => throw null; + public void CreateValidators(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidatorProviderContext context) => throw null; + public System.Collections.Generic.IList ValidatorProviders { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IMetadataBasedModelValidatorProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMetadataBasedModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider + { + bool HasValidators(System.Type modelType, System.Collections.Generic.IList validatorMetadata); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IObjectModelValidator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IObjectModelValidator + { + void Validate(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState, string prefix, object model); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidatorProviderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelValidatorProviderExtensions + { + public static void RemoveType(this System.Collections.Generic.IList list) where TModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider => throw null; + public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidateNeverAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateNeverAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter + { + public bool ShouldValidateEntry(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry entry, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry parentEntry) => throw null; + public ValidateNeverAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationVisitor + { + public bool AllowShortCircuitingValidationWhenNoValidatorsArePresent { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache Cache { get => throw null; } + protected object Container { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ActionContext Context { get => throw null; } + protected virtual Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry GetValidationEntry(object model) => throw null; + protected string Key { get => throw null; set => throw null; } + public int? MaxValidationDepth { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; } + protected object Model { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.StateManager` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + protected struct StateManager : System.IDisposable + { + public void Dispose() => throw null; + public static Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.StateManager Recurse(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor visitor, string key, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object model, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy strategy) => throw null; + public StateManager(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor visitor, object newModel) => throw null; + // Stub generator skipped constructor + } + + + protected Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy Strategy { get => throw null; set => throw null; } + protected virtual void SuppressValidation(string key) => throw null; + public virtual bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel, object container) => throw null; + public virtual bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model, bool alwaysValidateAtTopLevel) => throw null; + public bool Validate(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) => throw null; + public bool ValidateComplexTypesIfChildValidationFails { get => throw null; set => throw null; } + protected virtual bool ValidateNode() => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary ValidationState { get => throw null; } + public ValidationVisitor(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache validatorCache, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateDictionary validationState) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider ValidatorProvider { get => throw null; } + protected virtual bool Visit(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model) => throw null; + protected virtual bool VisitChildren(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy strategy) => throw null; + protected virtual bool VisitComplexType(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy defaultStrategy) => throw null; + protected virtual bool VisitSimpleType() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidatorCache` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidatorCache + { + public System.Collections.Generic.IReadOnlyList GetValidators(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider validatorProvider) => throw null; + public ValidatorCache() => throw null; + } + + } + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class DynamicRouteValueTransformer + { + protected DynamicRouteValueTransformer() => throw null; + public virtual System.Threading.Tasks.ValueTask> FilterAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values, System.Collections.Generic.IReadOnlyList endpoints) => throw null; + public object State { get => throw null; set => throw null; } + public abstract System.Threading.Tasks.ValueTask TransformAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.HttpMethodAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HttpMethodAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider + { + public HttpMethodAttribute(System.Collections.Generic.IEnumerable httpMethods, string template) => throw null; + public HttpMethodAttribute(System.Collections.Generic.IEnumerable httpMethods) => throw null; + public System.Collections.Generic.IEnumerable HttpMethods { get => throw null; } + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + int? Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider.Order { get => throw null; } + public string Template { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IActionHttpMethodProvider + { + System.Collections.Generic.IEnumerable HttpMethods { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteTemplateProvider + { + string Name { get; } + int? Order { get; } + string Template { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteValueProvider + { + string RouteKey { get; } + string RouteValue { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUrlHelperFactory + { + Microsoft.AspNetCore.Mvc.IUrlHelper GetUrlHelper(Microsoft.AspNetCore.Mvc.ActionContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.KnownRouteValueConstraint` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KnownRouteValueConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public KnownRouteValueConstraint(Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider actionDescriptorCollectionProvider) => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.RouteValueAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RouteValueAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider + { + public string RouteKey { get => throw null; } + public string RouteValue { get => throw null; } + protected RouteValueAttribute(string routeKey, string routeValue) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.UrlHelper` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlHelper : Microsoft.AspNetCore.Mvc.Routing.UrlHelperBase + { + public override string Action(Microsoft.AspNetCore.Mvc.Routing.UrlActionContext actionContext) => throw null; + protected virtual string GenerateUrl(string protocol, string host, Microsoft.AspNetCore.Routing.VirtualPathData pathData, string fragment) => throw null; + protected virtual Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPathData(string routeName, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + protected Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public override string RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext) => throw null; + protected Microsoft.AspNetCore.Routing.IRouter Router { get => throw null; } + public UrlHelper(Microsoft.AspNetCore.Mvc.ActionContext actionContext) : base(default(Microsoft.AspNetCore.Mvc.ActionContext)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.UrlHelperBase` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class UrlHelperBase : Microsoft.AspNetCore.Mvc.IUrlHelper + { + public abstract string Action(Microsoft.AspNetCore.Mvc.Routing.UrlActionContext actionContext); + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + protected Microsoft.AspNetCore.Routing.RouteValueDictionary AmbientValues { get => throw null; } + public virtual string Content(string contentPath) => throw null; + protected string GenerateUrl(string protocol, string host, string virtualPath, string fragment) => throw null; + protected string GenerateUrl(string protocol, string host, string path) => throw null; + protected Microsoft.AspNetCore.Routing.RouteValueDictionary GetValuesDictionary(object values) => throw null; + public virtual bool IsLocalUrl(string url) => throw null; + public virtual string Link(string routeName, object values) => throw null; + public abstract string RouteUrl(Microsoft.AspNetCore.Mvc.Routing.UrlRouteContext routeContext); + protected UrlHelperBase(Microsoft.AspNetCore.Mvc.ActionContext actionContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Routing.UrlHelperFactory` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlHelperFactory : Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory + { + public Microsoft.AspNetCore.Mvc.IUrlHelper GetUrlHelper(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public UrlHelperFactory() => throw null; + } + + } + namespace ViewFeatures + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IKeepTempDataResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IKeepTempDataResult : Microsoft.AspNetCore.Mvc.IActionResult + { + } + + } + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Routing.ControllerLinkGeneratorExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ControllerLinkGeneratorExtensions + { + public static string GetPathByAction(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string action, string controller, object values = default(object), Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetPathByAction(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string action = default(string), string controller = default(string), object values = default(object), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByAction(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string action, string controller, object values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByAction(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string action = default(string), string controller = default(string), object values = default(object), string scheme = default(string), Microsoft.AspNetCore.Http.HostString? host = default(Microsoft.AspNetCore.Http.HostString?), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.PageLinkGeneratorExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class PageLinkGeneratorExtensions + { + public static string GetPathByPage(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string page, string handler = default(string), object values = default(object), Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetPathByPage(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string page = default(string), string handler = default(string), object values = default(object), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByPage(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string page, string handler, object values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByPage(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string page = default(string), string handler = default(string), object values = default(object), string scheme = default(string), Microsoft.AspNetCore.Http.HostString? host = default(Microsoft.AspNetCore.Http.HostString?), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ApplicationModelConventionExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ApplicationModelConventionExtensions + { + public static void Add(this System.Collections.Generic.IList conventions, Microsoft.AspNetCore.Mvc.ApplicationModels.IParameterModelConvention parameterModelConvention) => throw null; + public static void Add(this System.Collections.Generic.IList conventions, Microsoft.AspNetCore.Mvc.ApplicationModels.IParameterModelBaseConvention parameterModelConvention) => throw null; + public static void Add(this System.Collections.Generic.IList conventions, Microsoft.AspNetCore.Mvc.ApplicationModels.IControllerModelConvention controllerModelConvention) => throw null; + public static void Add(this System.Collections.Generic.IList conventions, Microsoft.AspNetCore.Mvc.ApplicationModels.IActionModelConvention actionModelConvention) => throw null; + public static void RemoveType(this System.Collections.Generic.IList list) where TApplicationModelConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IApplicationModelConvention => throw null; + public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IMvcBuilder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMvcBuilder + { + Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager PartManager { get; } + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMvcCoreBuilder + { + Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager PartManager { get; } + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcCoreMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcCoreMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddApplicationPart(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Reflection.Assembly assembly) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddFormatterMappings(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddJsonOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder ConfigureApiBehaviorOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder ConfigureApplicationPartManager(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder SetCompatibilityVersion(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.CompatibilityVersion version) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcCoreMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcCoreMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddApplicationPart(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Reflection.Assembly assembly) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddAuthorization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddAuthorization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddControllersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddFormatterMappings(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddFormatterMappings(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddJsonOptions(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcOptions(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder ConfigureApiBehaviorOptions(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder ConfigureApplicationPartManager(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder SetCompatibilityVersion(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.CompatibilityVersion version) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcCoreServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs new file mode 100644 index 000000000000..4ce06860555a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs @@ -0,0 +1,43 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace Cors + { + // Generated from `Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter` in `Microsoft.AspNetCore.Mvc.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CorsAuthorizationFilter : Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter + { + public CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public CorsAuthorizationFilter(Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider) => throw null; + public System.Threading.Tasks.Task OnAuthorizationAsync(Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext context) => throw null; + public int Order { get => throw null; } + public string PolicyName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Cors.ICorsAuthorizationFilter` in `Microsoft.AspNetCore.Mvc.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface ICorsAuthorizationFilter : Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter + { + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcCorsMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Cors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcCorsMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder ConfigureCors(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs new file mode 100644 index 000000000000..8f51348c6bce --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs @@ -0,0 +1,102 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + // Generated from `Microsoft.AspNetCore.Mvc.HiddenInputAttribute` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HiddenInputAttribute : System.Attribute + { + public bool DisplayValue { get => throw null; set => throw null; } + public HiddenInputAttribute() => throw null; + } + + namespace DataAnnotations + { + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase<>` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class AttributeAdapterBase : Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator, Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter where TAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public AttributeAdapterBase(TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) : base(default(TAttribute), default(Microsoft.Extensions.Localization.IStringLocalizer)) => throw null; + public abstract string GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext); + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAttributeAdapter : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator + { + string GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext); + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.IValidationAttributeAdapterProvider` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValidationAttributeAdapterProvider + { + Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer); + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcDataAnnotationsLocalizationOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Func DataAnnotationLocalizerProvider; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public MvcDataAnnotationsLocalizationOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.RequiredAttributeAdapter` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequiredAttributeAdapter : Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase + { + public override void AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) => throw null; + public override string GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase validationContext) => throw null; + public RequiredAttributeAdapter(System.ComponentModel.DataAnnotations.RequiredAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) : base(default(System.ComponentModel.DataAnnotations.RequiredAttribute), default(Microsoft.Extensions.Localization.IStringLocalizer)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapter<>` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ValidationAttributeAdapter : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator where TAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public abstract void AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context); + public TAttribute Attribute { get => throw null; } + protected virtual string GetErrorMessage(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, params object[] arguments) => throw null; + protected static bool MergeAttribute(System.Collections.Generic.IDictionary attributes, string key, string value) => throw null; + public ValidationAttributeAdapter(TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationAttributeAdapterProvider` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationAttributeAdapterProvider : Microsoft.AspNetCore.Mvc.DataAnnotations.IValidationAttributeAdapterProvider + { + public Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter GetAttributeAdapter(System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) => throw null; + public ValidationAttributeAdapterProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.DataAnnotations.ValidationProviderAttribute` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ValidationProviderAttribute : System.Attribute + { + public abstract System.Collections.Generic.IEnumerable GetValidationAttributes(); + protected ValidationProviderAttribute() => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcDataAnnotationsMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcDataAnnotationsMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcDataAnnotationsMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotations(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotationsLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs new file mode 100644 index 000000000000..10a8e4980d6a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs @@ -0,0 +1,255 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace Formatters + { + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerInputFormatter` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlDataContractSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy + { + protected override bool CanReadType(System.Type type) => throw null; + protected virtual System.Runtime.Serialization.DataContractSerializer CreateSerializer(System.Type type) => throw null; + protected virtual System.Xml.XmlReader CreateXmlReader(System.IO.Stream readStream, System.Text.Encoding encoding) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatterExceptionPolicy ExceptionPolicy { get => throw null; } + protected virtual System.Runtime.Serialization.DataContractSerializer GetCachedSerializer(System.Type type) => throw null; + protected virtual System.Type GetSerializableType(System.Type declaredType) => throw null; + public int MaxDepth { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding) => throw null; + public System.Runtime.Serialization.DataContractSerializerSettings SerializerSettings { get => throw null; set => throw null; } + public System.Collections.Generic.IList WrapperProviderFactories { get => throw null; } + public XmlDataContractSerializerInputFormatter(Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + public System.Xml.XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlDataContractSerializerOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter + { + protected override bool CanWriteType(System.Type type) => throw null; + protected virtual System.Runtime.Serialization.DataContractSerializer CreateSerializer(System.Type type) => throw null; + public virtual System.Xml.XmlWriter CreateXmlWriter(System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings) => throw null; + public virtual System.Xml.XmlWriter CreateXmlWriter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings) => throw null; + protected virtual System.Runtime.Serialization.DataContractSerializer GetCachedSerializer(System.Type type) => throw null; + protected virtual System.Type GetSerializableType(System.Type type) => throw null; + public System.Runtime.Serialization.DataContractSerializerSettings SerializerSettings { get => throw null; set => throw null; } + public System.Collections.Generic.IList WrapperProviderFactories { get => throw null; } + public override System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding) => throw null; + public System.Xml.XmlWriterSettings WriterSettings { get => throw null; } + public XmlDataContractSerializerOutputFormatter(System.Xml.XmlWriterSettings writerSettings, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public XmlDataContractSerializerOutputFormatter(System.Xml.XmlWriterSettings writerSettings) => throw null; + public XmlDataContractSerializerOutputFormatter(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public XmlDataContractSerializerOutputFormatter() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.XmlSerializerInputFormatter` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy + { + protected override bool CanReadType(System.Type type) => throw null; + protected virtual System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type) => throw null; + protected virtual System.Xml.XmlReader CreateXmlReader(System.IO.Stream readStream, System.Text.Encoding encoding, System.Type type) => throw null; + protected virtual System.Xml.XmlReader CreateXmlReader(System.IO.Stream readStream, System.Text.Encoding encoding) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Formatters.InputFormatterExceptionPolicy ExceptionPolicy { get => throw null; } + protected virtual System.Xml.Serialization.XmlSerializer GetCachedSerializer(System.Type type) => throw null; + protected virtual System.Type GetSerializableType(System.Type declaredType) => throw null; + public int MaxDepth { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ReadRequestBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.InputFormatterContext context, System.Text.Encoding encoding) => throw null; + public System.Collections.Generic.IList WrapperProviderFactories { get => throw null; } + public System.Xml.XmlDictionaryReaderQuotas XmlDictionaryReaderQuotas { get => throw null; } + public XmlSerializerInputFormatter(Microsoft.AspNetCore.Mvc.MvcOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.XmlSerializerOutputFormatter` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlSerializerOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter + { + protected override bool CanWriteType(System.Type type) => throw null; + protected virtual System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type) => throw null; + public virtual System.Xml.XmlWriter CreateXmlWriter(System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings) => throw null; + public virtual System.Xml.XmlWriter CreateXmlWriter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings) => throw null; + protected virtual System.Xml.Serialization.XmlSerializer GetCachedSerializer(System.Type type) => throw null; + protected virtual System.Type GetSerializableType(System.Type type) => throw null; + protected virtual void Serialize(System.Xml.Serialization.XmlSerializer xmlSerializer, System.Xml.XmlWriter xmlWriter, object value) => throw null; + public System.Collections.Generic.IList WrapperProviderFactories { get => throw null; } + public override System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding) => throw null; + public System.Xml.XmlWriterSettings WriterSettings { get => throw null; } + public XmlSerializerOutputFormatter(System.Xml.XmlWriterSettings writerSettings, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public XmlSerializerOutputFormatter(System.Xml.XmlWriterSettings writerSettings) => throw null; + public XmlSerializerOutputFormatter(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public XmlSerializerOutputFormatter() => throw null; + } + + namespace Xml + { + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.DelegatingEnumerable<,>` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DelegatingEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public void Add(object item) => throw null; + public DelegatingEnumerable(System.Collections.Generic.IEnumerable source, Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider elementWrapperProvider) => throw null; + public DelegatingEnumerable() => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.DelegatingEnumerator<,>` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DelegatingEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public TWrapped Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public DelegatingEnumerator(System.Collections.Generic.IEnumerator inner, Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider wrapperProvider) => throw null; + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.EnumerableWrapperProvider` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnumerableWrapperProvider : Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider + { + public EnumerableWrapperProvider(System.Type sourceEnumerableOfT, Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider elementWrapperProvider) => throw null; + public object Wrap(object original) => throw null; + public System.Type WrappingType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.EnumerableWrapperProviderFactory` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnumerableWrapperProviderFactory : Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProviderFactory + { + public EnumerableWrapperProviderFactory(System.Collections.Generic.IEnumerable wrapperProviderFactories) => throw null; + public Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider GetProvider(Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUnwrappable + { + object Unwrap(System.Type declaredType); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IWrapperProvider + { + object Wrap(object original); + System.Type WrappingType { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProviderFactory` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IWrapperProviderFactory + { + Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider GetProvider(Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.MvcXmlOptions` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcXmlOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public MvcXmlOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.ProblemDetailsWrapper` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProblemDetailsWrapper : System.Xml.Serialization.IXmlSerializable, Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable + { + protected static string EmptyKey; + public System.Xml.Schema.XmlSchema GetSchema() => throw null; + public ProblemDetailsWrapper(Microsoft.AspNetCore.Mvc.ProblemDetails problemDetails) => throw null; + public ProblemDetailsWrapper() => throw null; + protected virtual void ReadValue(System.Xml.XmlReader reader, string name) => throw null; + public virtual void ReadXml(System.Xml.XmlReader reader) => throw null; + object Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable.Unwrap(System.Type declaredType) => throw null; + public virtual void WriteXml(System.Xml.XmlWriter writer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapper` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SerializableErrorWrapper : System.Xml.Serialization.IXmlSerializable, Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable + { + public System.Xml.Schema.XmlSchema GetSchema() => throw null; + public void ReadXml(System.Xml.XmlReader reader) => throw null; + public Microsoft.AspNetCore.Mvc.SerializableError SerializableError { get => throw null; } + public SerializableErrorWrapper(Microsoft.AspNetCore.Mvc.SerializableError error) => throw null; + public SerializableErrorWrapper() => throw null; + public object Unwrap(System.Type declaredType) => throw null; + public void WriteXml(System.Xml.XmlWriter writer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapperProvider` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SerializableErrorWrapperProvider : Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider + { + public SerializableErrorWrapperProvider() => throw null; + public object Wrap(object original) => throw null; + public System.Type WrappingType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.SerializableErrorWrapperProviderFactory` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SerializableErrorWrapperProviderFactory : Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProviderFactory + { + public Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider GetProvider(Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderContext context) => throw null; + public SerializableErrorWrapperProviderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.ValidationProblemDetailsWrapper` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationProblemDetailsWrapper : Microsoft.AspNetCore.Mvc.Formatters.Xml.ProblemDetailsWrapper, Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable + { + protected override void ReadValue(System.Xml.XmlReader reader, string name) => throw null; + object Microsoft.AspNetCore.Mvc.Formatters.Xml.IUnwrappable.Unwrap(System.Type declaredType) => throw null; + public ValidationProblemDetailsWrapper(Microsoft.AspNetCore.Mvc.ValidationProblemDetails problemDetails) => throw null; + public ValidationProblemDetailsWrapper() => throw null; + public override void WriteXml(System.Xml.XmlWriter writer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderContext` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WrapperProviderContext + { + public System.Type DeclaredType { get => throw null; } + public bool IsSerialization { get => throw null; } + public WrapperProviderContext(System.Type declaredType, bool isSerialization) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderFactoriesExtensions` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WrapperProviderFactoriesExtensions + { + public static Microsoft.AspNetCore.Mvc.Formatters.Xml.IWrapperProvider GetWrapperProvider(this System.Collections.Generic.IEnumerable wrapperProviderFactories, Microsoft.AspNetCore.Mvc.Formatters.Xml.WrapperProviderContext wrapperProviderContext) => throw null; + } + + } + } + namespace ModelBinding + { + namespace Metadata + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DataMemberRequiredBindingMetadataProvider` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataMemberRequiredBindingMetadataProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IMetadataDetailsProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.IBindingMetadataProvider + { + public void CreateBindingMetadata(Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.BindingMetadataProviderContext context) => throw null; + public DataMemberRequiredBindingMetadataProvider() => throw null; + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcXmlMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcXmlMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddXmlDataContractSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddXmlDataContractSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddXmlOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddXmlSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddXmlSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcXmlMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Formatters.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcXmlMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddXmlDataContractSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddXmlDataContractSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddXmlOptions(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddXmlSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddXmlSerializerFormatters(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs new file mode 100644 index 000000000000..7e0aba7126e0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs @@ -0,0 +1,145 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace Localization + { + // Generated from `Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlLocalizer : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer + { + public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString GetString(string name, params object[] arguments) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString GetString(string name) => throw null; + public HtmlLocalizer(Microsoft.Extensions.Localization.IStringLocalizer localizer) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name] { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name, params object[] arguments] { get => throw null; } + protected virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString ToHtmlString(Microsoft.Extensions.Localization.LocalizedString result, object[] arguments) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString ToHtmlString(Microsoft.Extensions.Localization.LocalizedString result) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer<>` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlLocalizer : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer, Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer + { + public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString GetString(string name, params object[] arguments) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString GetString(string name) => throw null; + public HtmlLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory factory) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name] { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name, params object[] arguments] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlLocalizerExtensions + { + public static System.Collections.Generic.IEnumerable GetAllStrings(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer) => throw null; + public static Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer, string name, params object[] arguments) => throw null; + public static Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString GetHtml(this Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer htmlLocalizer, string name) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerFactory` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlLocalizerFactory : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory + { + public virtual Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer Create(string baseName, string location) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer Create(System.Type resourceSource) => throw null; + public HtmlLocalizerFactory(Microsoft.Extensions.Localization.IStringLocalizerFactory localizerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlLocalizer + { + System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures); + Microsoft.Extensions.Localization.LocalizedString GetString(string name, params object[] arguments); + Microsoft.Extensions.Localization.LocalizedString GetString(string name); + Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name] { get; } + Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string name, params object[] arguments] { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<>` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlLocalizer : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlLocalizerFactory + { + Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer Create(string baseName, string location); + Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer Create(System.Type resourceSource); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewLocalizer : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocalizedHtmlString : Microsoft.AspNetCore.Html.IHtmlContent + { + public bool IsResourceNotFound { get => throw null; } + public LocalizedHtmlString(string name, string value, bool isResourceNotFound, params object[] arguments) => throw null; + public LocalizedHtmlString(string name, string value, bool isResourceNotFound) => throw null; + public LocalizedHtmlString(string name, string value) => throw null; + public string Name { get => throw null; } + public string Value { get => throw null; } + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Localization.ViewLocalizer` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewLocalizer : Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware, Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer, Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer + { + public void Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + public System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) => throw null; + public Microsoft.Extensions.Localization.LocalizedString GetString(string name, params object[] values) => throw null; + public Microsoft.Extensions.Localization.LocalizedString GetString(string name) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string key] { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString this[string key, params object[] arguments] { get => throw null; } + public ViewLocalizer(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory localizerFactory, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcLocalizationMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action localizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcLocalizationMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcLocalizationMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action localizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action dataAnnotationsLocalizationOptionsSetupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddMvcLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViewLocalization(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs new file mode 100644 index 000000000000..1a25df2f720d --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs @@ -0,0 +1,469 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace ApplicationParts + { + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompiledRazorAssemblyApplicationPartFactory : Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartFactory + { + public CompiledRazorAssemblyApplicationPartFactory() => throw null; + public override System.Collections.Generic.IEnumerable GetApplicationParts(System.Reflection.Assembly assembly) => throw null; + public static System.Collections.Generic.IEnumerable GetDefaultApplicationParts(System.Reflection.Assembly assembly) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyPart` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompiledRazorAssemblyPart : Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart, Microsoft.AspNetCore.Mvc.ApplicationParts.IRazorCompiledItemProvider + { + public System.Reflection.Assembly Assembly { get => throw null; } + System.Collections.Generic.IEnumerable Microsoft.AspNetCore.Mvc.ApplicationParts.IRazorCompiledItemProvider.CompiledItems { get => throw null; } + public CompiledRazorAssemblyPart(System.Reflection.Assembly assembly) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationParts.IRazorCompiledItemProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorCompiledItemProvider + { + System.Collections.Generic.IEnumerable CompiledItems { get; } + } + + } + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewPageEventData` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterViewPageEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.IRazorPage Page { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewPageEventData` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeViewPageEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeViewPageEventData(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.IRazorPage Page { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + } + + } + namespace Razor + { + // Generated from `Microsoft.AspNetCore.Mvc.Razor.HelperResult` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HelperResult : Microsoft.AspNetCore.Html.IHtmlContent + { + public HelperResult(System.Func asyncAction) => throw null; + public System.Func WriteAction { get => throw null; } + public virtual void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IModelTypeProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IModelTypeProvider + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IRazorPage` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorPage + { + Microsoft.AspNetCore.Html.IHtmlContent BodyContent { get; set; } + void EnsureRenderedBodyOrSections(); + System.Threading.Tasks.Task ExecuteAsync(); + bool IsLayoutBeingRendered { get; set; } + string Layout { get; set; } + string Path { get; set; } + System.Collections.Generic.IDictionary PreviousSectionWriters { get; set; } + System.Collections.Generic.IDictionary SectionWriters { get; } + Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorPageActivator + { + void Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorPageFactoryProvider + { + Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult CreateFactory(string relativePath); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorViewEngine : Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine + { + Microsoft.AspNetCore.Mvc.Razor.RazorPageResult FindPage(Microsoft.AspNetCore.Mvc.ActionContext context, string pageName); + string GetAbsolutePath(string executingFilePath, string pagePath); + Microsoft.AspNetCore.Mvc.Razor.RazorPageResult GetPage(string executingFilePath, string pagePath); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.ITagHelperActivator` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperActivator + { + TTagHelper Create(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.ITagHelperFactory` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperFactory + { + TTagHelper CreateTagHelper(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer<>` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperInitializer where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper + { + void Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewLocationExpander + { + System.Collections.Generic.IEnumerable ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable viewLocations); + void PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpander` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LanguageViewLocationExpander : Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander + { + public virtual System.Collections.Generic.IEnumerable ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable viewLocations) => throw null; + public LanguageViewLocationExpander(Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat format) => throw null; + public LanguageViewLocationExpander() => throw null; + public void PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum LanguageViewLocationExpanderFormat + { + // Stub generator skipped constructor + SubFolder, + Suffix, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPage` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RazorPage : Microsoft.AspNetCore.Mvc.Razor.RazorPageBase + { + public override void BeginContext(int position, int length, bool isLiteral) => throw null; + public Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; } + public override void DefineSection(string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section) => throw null; + public override void EndContext() => throw null; + public override void EnsureRenderedBodyOrSections() => throw null; + public void IgnoreBody() => throw null; + public void IgnoreSection(string sectionName) => throw null; + public bool IsSectionDefined(string name) => throw null; + protected RazorPage() => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent RenderBody() => throw null; + public Microsoft.AspNetCore.Html.HtmlString RenderSection(string name, bool required) => throw null; + public Microsoft.AspNetCore.Html.HtmlString RenderSection(string name) => throw null; + public System.Threading.Tasks.Task RenderSectionAsync(string name, bool required) => throw null; + public System.Threading.Tasks.Task RenderSectionAsync(string name) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPage<>` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RazorPage : Microsoft.AspNetCore.Mvc.Razor.RazorPage + { + public TModel Model { get => throw null; } + protected RazorPage() => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorPageActivator : Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator + { + public void Activate(Microsoft.AspNetCore.Mvc.Razor.IRazorPage page, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) => throw null; + public RazorPageActivator(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper jsonHelper, System.Diagnostics.DiagnosticSource diagnosticSource, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider modelExpressionProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPageBase` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RazorPageBase : Microsoft.AspNetCore.Mvc.Razor.IRazorPage + { + public void AddHtmlAttributeValue(string prefix, int prefixOffset, object value, int valueOffset, int valueLength, bool isLiteral) => throw null; + public void BeginAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext executionContext, string attributeName, int attributeValuesCount, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle attributeValueStyle) => throw null; + public abstract void BeginContext(int position, int length, bool isLiteral); + public virtual void BeginWriteAttribute(string name, string prefix, int prefixOffset, string suffix, int suffixOffset, int attributeValuesCount) => throw null; + public void BeginWriteTagHelperAttribute() => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent BodyContent { get => throw null; set => throw null; } + public TTagHelper CreateTagHelper() where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper => throw null; + public virtual void DefineSection(string name, Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate section) => throw null; + protected void DefineSection(string name, System.Func section) => throw null; + public System.Diagnostics.DiagnosticSource DiagnosticSource { get => throw null; set => throw null; } + public void EndAddHtmlAttributeValues(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext executionContext) => throw null; + public abstract void EndContext(); + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent EndTagHelperWritingScope() => throw null; + public virtual void EndWriteAttribute() => throw null; + public string EndWriteTagHelperAttribute() => throw null; + public abstract void EnsureRenderedBodyOrSections(); + public abstract System.Threading.Tasks.Task ExecuteAsync(); + public virtual System.Threading.Tasks.Task FlushAsync() => throw null; + public virtual string Href(string contentPath) => throw null; + public System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { get => throw null; set => throw null; } + public string InvalidTagHelperIndexerAssignment(string attributeName, string tagHelperTypeName, string propertyName) => throw null; + public bool IsLayoutBeingRendered { get => throw null; set => throw null; } + public string Layout { get => throw null; set => throw null; } + public virtual System.IO.TextWriter Output { get => throw null; } + public string Path { get => throw null; set => throw null; } + protected internal virtual System.IO.TextWriter PopWriter() => throw null; + public System.Collections.Generic.IDictionary PreviousSectionWriters { get => throw null; set => throw null; } + protected internal virtual void PushWriter(System.IO.TextWriter writer) => throw null; + protected RazorPageBase() => throw null; + public System.Collections.Generic.IDictionary SectionWriters { get => throw null; } + public virtual Microsoft.AspNetCore.Html.HtmlString SetAntiforgeryCookieAndHeader() => throw null; + public void StartTagHelperWritingScope(System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; } + public virtual System.Security.Claims.ClaimsPrincipal User { get => throw null; } + public dynamic ViewBag { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + public virtual void Write(string value) => throw null; + public virtual void Write(object value) => throw null; + public void WriteAttributeValue(string prefix, int prefixOffset, object value, int valueOffset, int valueLength, bool isLiteral) => throw null; + public virtual void WriteLiteral(string value) => throw null; + public virtual void WriteLiteral(object value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPageFactoryResult` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RazorPageFactoryResult + { + public System.Func RazorPageFactory { get => throw null; } + public RazorPageFactoryResult(Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor viewDescriptor, System.Func razorPageFactory) => throw null; + // Stub generator skipped constructor + public bool Success { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor ViewDescriptor { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorPageResult` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RazorPageResult + { + public string Name { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.IRazorPage Page { get => throw null; } + public RazorPageResult(string name, System.Collections.Generic.IEnumerable searchedLocations) => throw null; + public RazorPageResult(string name, Microsoft.AspNetCore.Mvc.Razor.IRazorPage page) => throw null; + // Stub generator skipped constructor + public System.Collections.Generic.IEnumerable SearchedLocations { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorView` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorView : Microsoft.AspNetCore.Mvc.ViewEngines.IView + { + public string Path { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.IRazorPage RazorPage { get => throw null; } + public RazorView(Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine viewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Collections.Generic.IReadOnlyList viewStartPages, Microsoft.AspNetCore.Mvc.Razor.IRazorPage razorPage, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Diagnostics.DiagnosticListener diagnosticListener) => throw null; + public virtual System.Threading.Tasks.Task RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) => throw null; + public System.Collections.Generic.IReadOnlyList ViewStartPages { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorViewEngine : Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine + { + public Microsoft.AspNetCore.Mvc.Razor.RazorPageResult FindPage(Microsoft.AspNetCore.Mvc.ActionContext context, string pageName) => throw null; + public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage) => throw null; + public string GetAbsolutePath(string executingFilePath, string pagePath) => throw null; + public static string GetNormalizedRouteValue(Microsoft.AspNetCore.Mvc.ActionContext context, string key) => throw null; + public Microsoft.AspNetCore.Mvc.Razor.RazorPageResult GetPage(string executingFilePath, string pagePath) => throw null; + public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage) => throw null; + public RazorViewEngine(Microsoft.AspNetCore.Mvc.Razor.IRazorPageFactoryProvider pageFactory, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator pageActivator, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Diagnostics.DiagnosticListener diagnosticListener) => throw null; + public static string ViewExtension; + protected Microsoft.Extensions.Caching.Memory.IMemoryCache ViewLookupCache { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RazorViewEngineOptions` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorViewEngineOptions + { + public System.Collections.Generic.IList AreaPageViewLocationFormats { get => throw null; } + public System.Collections.Generic.IList AreaViewLocationFormats { get => throw null; } + public System.Collections.Generic.IList PageViewLocationFormats { get => throw null; } + public RazorViewEngineOptions() => throw null; + public System.Collections.Generic.IList ViewLocationExpanders { get => throw null; } + public System.Collections.Generic.IList ViewLocationFormats { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.RenderAsyncDelegate` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task RenderAsyncDelegate(); + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelperInitializer<>` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperInitializer : Microsoft.AspNetCore.Mvc.Razor.ITagHelperInitializer where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper + { + public void Initialize(TTagHelper helper, Microsoft.AspNetCore.Mvc.Rendering.ViewContext context) => throw null; + public TagHelperInitializer(System.Action action) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewLocationExpanderContext + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public string AreaName { get => throw null; } + public string ControllerName { get => throw null; } + public bool IsMainPage { get => throw null; } + public string PageName { get => throw null; } + public System.Collections.Generic.IDictionary Values { get => throw null; set => throw null; } + public ViewLocationExpanderContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, string viewName, string controllerName, string areaName, string pageName, bool isMainPage) => throw null; + public string ViewName { get => throw null; } + } + + namespace Compilation + { + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Compilation.CompiledViewDescriptor` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompiledViewDescriptor + { + public CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem item, Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute attribute) => throw null; + public CompiledViewDescriptor(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem item) => throw null; + public CompiledViewDescriptor() => throw null; + public System.Collections.Generic.IList ExpirationTokens { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem Item { get => throw null; set => throw null; } + public string RelativePath { get => throw null; set => throw null; } + public System.Type Type { get => throw null; } + public Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute ViewAttribute { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewCompiler + { + System.Threading.Tasks.Task CompileAsync(string relativePath); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompilerProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewCompilerProvider + { + Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler GetCompiler(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorViewAttribute : System.Attribute + { + public string Path { get => throw null; } + public RazorViewAttribute(string path, System.Type viewType) => throw null; + public System.Type ViewType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Compilation.ViewsFeature` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewsFeature + { + public System.Collections.Generic.IList ViewDescriptors { get => throw null; } + public ViewsFeature() => throw null; + } + + } + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperMemoryCacheProvider + { + public Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; set => throw null; } + public TagHelperMemoryCacheProvider() => throw null; + } + + } + namespace Internal + { + // Generated from `Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorInjectAttribute : System.Attribute + { + public RazorInjectAttribute() => throw null; + } + + } + namespace TagHelpers + { + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BodyTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper + { + public BodyTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HeadTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper + { + public HeadTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) : base(default(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager), default(Microsoft.Extensions.Logging.ILoggerFactory)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperComponentManager + { + System.Collections.Generic.ICollection Components { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperComponentPropertyActivator + { + void Activate(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context, Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent tagHelperComponent); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperComponentTagHelper` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TagHelperComponentTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public override void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentPropertyActivator PropertyActivator { get => throw null; set => throw null; } + public TagHelperComponentTagHelper(Microsoft.AspNetCore.Mvc.Razor.TagHelpers.ITagHelperComponentManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperFeature + { + public TagHelperFeature() => throw null; + public System.Collections.Generic.IList TagHelpers { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeatureProvider` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperFeatureProvider : Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider, Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider + { + protected virtual bool IncludePart(Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPart part) => throw null; + protected virtual bool IncludeType(System.Reflection.TypeInfo type) => throw null; + public void PopulateFeature(System.Collections.Generic.IEnumerable parts, Microsoft.AspNetCore.Mvc.Razor.TagHelpers.TagHelperFeature feature) => throw null; + public TagHelperFeatureProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlResolutionTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + protected System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { get => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + protected void ProcessUrlAttribute(string attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + protected bool TryResolveUrl(string url, out string resolvedUrl) => throw null; + protected bool TryResolveUrl(string url, out Microsoft.AspNetCore.Html.IHtmlContent resolvedUrl) => throw null; + protected Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory UrlHelperFactory { get => throw null; } + public UrlResolutionTagHelper(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcRazorMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcRazorMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddRazorOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action initialize) where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcRazorMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcRazorMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddRazorViewEngine(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddTagHelpersAsServices(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder InitializeTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action initialize) where TTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs new file mode 100644 index 000000000000..fa23971878ce --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs @@ -0,0 +1,912 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageActionEndpointConventionBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + public void Add(System.Action convention) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RazorPagesEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RazorPagesEndpointRouteBuilderExtensions + { + public static void MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state, int order) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static void MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, object state) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static void MapDynamicPageRoute(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) where TTransformer : Microsoft.AspNetCore.Mvc.Routing.DynamicRouteValueTransformer => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaPage(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string page, string area) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaPage(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string page, string area) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToPage(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string page) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToPage(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string page) => throw null; + public static Microsoft.AspNetCore.Builder.PageActionEndpointConventionBuilder MapRazorPages(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) => throw null; + } + + } + namespace Mvc + { + namespace ApplicationModels + { + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageApplicationModelConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel model); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelPartsProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageApplicationModelPartsProvider + { + Microsoft.AspNetCore.Mvc.ApplicationModels.PageHandlerModel CreateHandlerModel(System.Reflection.MethodInfo method); + Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel CreateParameterModel(System.Reflection.ParameterInfo parameter); + Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel CreatePropertyModel(System.Reflection.PropertyInfo property); + bool IsHandler(System.Reflection.MethodInfo methodInfo); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageApplicationModelProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModelProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModelProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageConvention + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageHandlerModelConvention` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageHandlerModelConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageHandlerModel model); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageRouteModelConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention + { + void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel model); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageRouteModelProvider + { + void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModelProviderContext context); + void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModelProviderContext context); + int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageApplicationModel + { + public Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor ActionDescriptor { get => throw null; } + public string AreaName { get => throw null; } + public System.Reflection.TypeInfo DeclaredModelType { get => throw null; } + public System.Collections.Generic.IList EndpointMetadata { get => throw null; } + public System.Collections.Generic.IList Filters { get => throw null; } + public System.Collections.Generic.IList HandlerMethods { get => throw null; } + public System.Collections.Generic.IList HandlerProperties { get => throw null; } + public System.Reflection.TypeInfo HandlerType { get => throw null; } + public System.Collections.Generic.IReadOnlyList HandlerTypeAttributes { get => throw null; } + public System.Reflection.TypeInfo ModelType { get => throw null; set => throw null; } + public PageApplicationModel(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor, System.Reflection.TypeInfo handlerType, System.Collections.Generic.IReadOnlyList handlerAttributes) => throw null; + public PageApplicationModel(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor, System.Reflection.TypeInfo declaredModelType, System.Reflection.TypeInfo handlerType, System.Collections.Generic.IReadOnlyList handlerAttributes) => throw null; + public PageApplicationModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel other) => throw null; + public System.Reflection.TypeInfo PageType { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public string RelativePath { get => throw null; } + public string RouteTemplate { get => throw null; } + public string ViewEnginePath { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModelProviderContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageApplicationModelProviderContext + { + public Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor ActionDescriptor { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel PageApplicationModel { get => throw null; set => throw null; } + public PageApplicationModelProviderContext(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor descriptor, System.Reflection.TypeInfo pageTypeInfo) => throw null; + public System.Reflection.TypeInfo PageType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageConventionCollection : System.Collections.ObjectModel.Collection + { + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddAreaFolderApplicationModelConvention(string areaName, string folderPath, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddAreaFolderRouteModelConvention(string areaName, string folderPath, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddAreaPageApplicationModelConvention(string areaName, string pageName, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddAreaPageRouteModelConvention(string areaName, string pageName, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddFolderApplicationModelConvention(string folderPath, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddFolderRouteModelConvention(string folderPath, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddPageApplicationModelConvention(string pageName, System.Action action) => throw null; + public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddPageRouteModelConvention(string pageName, System.Action action) => throw null; + public PageConventionCollection(System.Collections.Generic.IList conventions) => throw null; + public PageConventionCollection() => throw null; + public void RemoveType() where TPageConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention => throw null; + public void RemoveType(System.Type pageConventionType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageHandlerModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageHandlerModel : Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel + { + public System.Collections.Generic.IReadOnlyList Attributes { get => throw null; } + public string HandlerName { get => throw null; set => throw null; } + public string HttpMethod { get => throw null; set => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + public System.Reflection.MethodInfo MethodInfo { get => throw null; } + public string Name { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel Page { get => throw null; set => throw null; } + public PageHandlerModel(System.Reflection.MethodInfo handlerMethod, System.Collections.Generic.IReadOnlyList attributes) => throw null; + public PageHandlerModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PageHandlerModel other) => throw null; + public System.Collections.Generic.IList Parameters { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageParameterModel : Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase, Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel, Microsoft.AspNetCore.Mvc.ApplicationModels.IBindingModel + { + public Microsoft.AspNetCore.Mvc.ApplicationModels.PageHandlerModel Handler { get => throw null; set => throw null; } + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + public PageParameterModel(System.Reflection.ParameterInfo parameterInfo, System.Collections.Generic.IReadOnlyList attributes) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public PageParameterModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel other) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public System.Reflection.ParameterInfo ParameterInfo { get => throw null; } + public string ParameterName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PagePropertyModel : Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase, Microsoft.AspNetCore.Mvc.ApplicationModels.IPropertyModel, Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel + { + System.Reflection.MemberInfo Microsoft.AspNetCore.Mvc.ApplicationModels.ICommonModel.MemberInfo { get => throw null; } + public Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel Page { get => throw null; set => throw null; } + public PagePropertyModel(System.Reflection.PropertyInfo propertyInfo, System.Collections.Generic.IReadOnlyList attributes) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public PagePropertyModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel other) : base(default(Microsoft.AspNetCore.Mvc.ApplicationModels.ParameterModelBase)) => throw null; + public System.Reflection.PropertyInfo PropertyInfo { get => throw null; } + public string PropertyName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteMetadata` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageRouteMetadata + { + public string PageRoute { get => throw null; } + public PageRouteMetadata(string pageRoute, string routeTemplate) => throw null; + public string RouteTemplate { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageRouteModel + { + public string AreaName { get => throw null; } + public PageRouteModel(string relativePath, string viewEnginePath, string areaName) => throw null; + public PageRouteModel(string relativePath, string viewEnginePath) => throw null; + public PageRouteModel(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel other) => throw null; + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public string RelativePath { get => throw null; } + public Microsoft.AspNetCore.Routing.IOutboundParameterTransformer RouteParameterTransformer { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; } + public System.Collections.Generic.IList Selectors { get => throw null; } + public string ViewEnginePath { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModelProviderContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageRouteModelProviderContext + { + public PageRouteModelProviderContext() => throw null; + public System.Collections.Generic.IList RouteModels { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteTransformerConvention` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageRouteTransformerConvention : Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention, Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention + { + public void Apply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel model) => throw null; + public PageRouteTransformerConvention(Microsoft.AspNetCore.Routing.IOutboundParameterTransformer parameterTransformer) => throw null; + protected virtual bool ShouldApply(Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel action) => throw null; + } + + } + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterHandlerMethodEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterHandlerMethodEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public AfterHandlerMethodEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IReadOnlyDictionary arguments, Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor handlerMethodDescriptor, object instance, Microsoft.AspNetCore.Mvc.IActionResult result) => throw null; + public System.Collections.Generic.IReadOnlyDictionary Arguments { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor HandlerMethodDescriptor { get => throw null; } + public object Instance { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterPageFilterOnPageHandlerExecutedEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterPageFilterOnPageHandlerExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public AfterPageFilterOnPageHandlerExecutedEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext handlerExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext HandlerExecutedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterPageFilterOnPageHandlerExecutingEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterPageFilterOnPageHandlerExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public AfterPageFilterOnPageHandlerExecutingEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext handlerExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext HandlerExecutingContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterPageFilterOnPageHandlerExecutionEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterPageFilterOnPageHandlerExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public AfterPageFilterOnPageHandlerExecutionEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext handlerExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext HandlerExecutedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterPageFilterOnPageHandlerSelectedEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterPageFilterOnPageHandlerSelectedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public AfterPageFilterOnPageHandlerSelectedEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext handlerSelectedContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext HandlerSelectedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterPageFilterOnPageHandlerSelectionEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterPageFilterOnPageHandlerSelectionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public AfterPageFilterOnPageHandlerSelectionEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext handlerSelectedContext, Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext HandlerSelectedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeHandlerMethodEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeHandlerMethodEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + public System.Collections.Generic.IReadOnlyDictionary Arguments { get => throw null; } + public BeforeHandlerMethodEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, System.Collections.Generic.IReadOnlyDictionary arguments, Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor handlerMethodDescriptor, object instance) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor HandlerMethodDescriptor { get => throw null; } + public object Instance { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerExecutedEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforePageFilterOnPageHandlerExecutedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public BeforePageFilterOnPageHandlerExecutedEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext handlerExecutedContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext HandlerExecutedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerExecutingEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforePageFilterOnPageHandlerExecutingEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public BeforePageFilterOnPageHandlerExecutingEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext handlerExecutingContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext HandlerExecutingContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerExecutionEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforePageFilterOnPageHandlerExecutionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public BeforePageFilterOnPageHandlerExecutionEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext handlerExecutionContext, Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext HandlerExecutionContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerSelectedEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforePageFilterOnPageHandlerSelectedEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public BeforePageFilterOnPageHandlerSelectedEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext handlerSelectedContext, Microsoft.AspNetCore.Mvc.Filters.IPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext HandlerSelectedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforePageFilterOnPageHandlerSelectionEventData` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforePageFilterOnPageHandlerSelectionEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public BeforePageFilterOnPageHandlerSelectionEventData(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext handlerSelectedContext, Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter filter) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + public Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter Filter { get => throw null; } + public Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext HandlerSelectedContext { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + } + + } + namespace Filters + { + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAsyncPageFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + System.Threading.Tasks.Task OnPageHandlerExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutionDelegate next); + System.Threading.Tasks.Task OnPageHandlerSelectionAsync(Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.IPageFilter` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + void OnPageHandlerExecuted(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext context); + void OnPageHandlerExecuting(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context); + void OnPageHandlerSelected(Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageHandlerExecutedContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public virtual bool Canceled { get => throw null; set => throw null; } + public virtual System.Exception Exception { get => throw null; set => throw null; } + public virtual System.Runtime.ExceptionServices.ExceptionDispatchInfo ExceptionDispatchInfo { get => throw null; set => throw null; } + public virtual bool ExceptionHandled { get => throw null; set => throw null; } + public virtual object HandlerInstance { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor HandlerMethod { get => throw null; } + public PageHandlerExecutedContext(Microsoft.AspNetCore.Mvc.RazorPages.PageContext pageContext, System.Collections.Generic.IList filters, Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor handlerMethod, object handlerInstance) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageHandlerExecutingContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public virtual System.Collections.Generic.IDictionary HandlerArguments { get => throw null; } + public virtual object HandlerInstance { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor HandlerMethod { get => throw null; } + public PageHandlerExecutingContext(Microsoft.AspNetCore.Mvc.RazorPages.PageContext pageContext, System.Collections.Generic.IList filters, Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor handlerMethod, System.Collections.Generic.IDictionary handlerArguments, object handlerInstance) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.IActionResult Result { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutionDelegate` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate System.Threading.Tasks.Task PageHandlerExecutionDelegate(); + + // Generated from `Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageHandlerSelectedContext : Microsoft.AspNetCore.Mvc.Filters.FilterContext + { + public virtual Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; } + public virtual object HandlerInstance { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor HandlerMethod { get => throw null; set => throw null; } + public PageHandlerSelectedContext(Microsoft.AspNetCore.Mvc.RazorPages.PageContext pageContext, System.Collections.Generic.IList filters, object handlerInstance) : base(default(Microsoft.AspNetCore.Mvc.ActionContext), default(System.Collections.Generic.IList)) => throw null; + } + + } + namespace RazorPages + { + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompiledPageActionDescriptor : Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor + { + public CompiledPageActionDescriptor(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor) => throw null; + public CompiledPageActionDescriptor() => throw null; + public System.Reflection.TypeInfo DeclaredModelTypeInfo { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.Endpoint Endpoint { get => throw null; set => throw null; } + public System.Collections.Generic.IList HandlerMethods { get => throw null; set => throw null; } + public System.Reflection.TypeInfo HandlerTypeInfo { get => throw null; set => throw null; } + public System.Reflection.TypeInfo ModelTypeInfo { get => throw null; set => throw null; } + public System.Reflection.TypeInfo PageTypeInfo { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.IPageActivatorProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageActivatorProvider + { + System.Func CreateActivator(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + System.Action CreateReleaser(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.IPageFactoryProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageFactoryProvider + { + System.Action CreatePageDisposer(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + System.Func CreatePageFactory(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.IPageModelActivatorProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageModelActivatorProvider + { + System.Func CreateActivator(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + System.Action CreateReleaser(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.IPageModelFactoryProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageModelFactoryProvider + { + System.Action CreateModelDisposer(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + System.Func CreateModelFactory(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.NonHandlerAttribute` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NonHandlerAttribute : System.Attribute + { + public NonHandlerAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Page` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Page : Microsoft.AspNetCore.Mvc.RazorPages.PageBase + { + protected Page() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageActionDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor + { + public string AreaName { get => throw null; set => throw null; } + public override string DisplayName { get => throw null; set => throw null; } + public PageActionDescriptor(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor other) => throw null; + public PageActionDescriptor() => throw null; + public string RelativePath { get => throw null; set => throw null; } + public string ViewEnginePath { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageBase` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PageBase : Microsoft.AspNetCore.Mvc.Razor.RazorPageBase + { + public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest() => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(object error) => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public override void BeginContext(int position, int length, bool isLiteral) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge() => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType, System.Text.Encoding contentEncoding) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content) => throw null; + public override void EndContext() => throw null; + public override void EnsureRenderedBodyOrSections() => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid() => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirect(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanent(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanentPreserveMethod(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPreserveMethod(string localUrl) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.NotFoundResult NotFound() => throw null; + public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound(object value) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RazorPages.PageResult Page() => throw null; + protected PageBase() => throw null; + public Microsoft.AspNetCore.Mvc.RazorPages.PageContext PageContext { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult Partial(string viewName, object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult Partial(string viewName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult Redirect(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanent(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanentPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanentPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage() => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanentPreserveMethod(string pageName = default(string), string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePreserveMethod(string pageName = default(string), string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanentPreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode(int statusCode) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode(int statusCode, object value) => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(TModel model) where TModel : class => throw null; + public virtual System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string prefix) => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, System.Func propertyFilter) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) where TModel : class => throw null; + public System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string prefix, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) => throw null; + public virtual bool TryValidateModel(object model, string prefix) => throw null; + public virtual bool TryValidateModel(object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnauthorizedResult Unauthorized() => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType) => throw null; + public override Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageContext` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageContext : Microsoft.AspNetCore.Mvc.ActionContext + { + public virtual Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor ActionDescriptor { get => throw null; set => throw null; } + public PageContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext) => throw null; + public PageContext() => throw null; + public virtual System.Collections.Generic.IList ValueProviderFactories { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IList> ViewStartFactories { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageContextAttribute` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageContextAttribute : System.Attribute + { + public PageContextAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageModel` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PageModel : Microsoft.AspNetCore.Mvc.Filters.IPageFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter + { + public virtual Microsoft.AspNetCore.Mvc.BadRequestResult BadRequest() => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(object error) => throw null; + public virtual Microsoft.AspNetCore.Mvc.BadRequestObjectResult BadRequest(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge() => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType, System.Text.Encoding contentEncoding) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ContentResult Content(string content) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.VirtualFileResult File(string virtualPath, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileStreamResult File(System.IO.Stream fileStream, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.FileContentResult File(System.Byte[] fileContents, string contentType) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid() => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirect(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanent(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPermanentPreserveMethod(string localUrl) => throw null; + public virtual Microsoft.AspNetCore.Mvc.LocalRedirectResult LocalRedirectPreserveMethod(string localUrl) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.NotFoundResult NotFound() => throw null; + public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound(object value) => throw null; + public virtual void OnPageHandlerExecuted(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext context) => throw null; + public virtual void OnPageHandlerExecuting(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context) => throw null; + public virtual System.Threading.Tasks.Task OnPageHandlerExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutionDelegate next) => throw null; + public virtual void OnPageHandlerSelected(Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext context) => throw null; + public virtual System.Threading.Tasks.Task OnPageHandlerSelectionAsync(Microsoft.AspNetCore.Mvc.Filters.PageHandlerSelectedContext context) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RazorPages.PageResult Page() => throw null; + public Microsoft.AspNetCore.Mvc.RazorPages.PageContext PageContext { get => throw null; set => throw null; } + protected PageModel() => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult Partial(string viewName, object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult Partial(string viewName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType, string fileDownloadName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PhysicalFileResult PhysicalFile(string physicalPath, string contentType) => throw null; + protected internal Microsoft.AspNetCore.Mvc.RedirectResult Redirect(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanent(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPermanentPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectResult RedirectPreserveMethod(string url) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToAction(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, string controllerName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanent(string actionName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPermanentPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToActionResult RedirectToActionPreserveMethod(string actionName = default(string), string controllerName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPage() => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, string pageHandler) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanent(string pageName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePermanentPreserveMethod(string pageName = default(string), string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToPageResult RedirectToPagePreserveMethod(string pageName = default(string), string pageHandler = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoute(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues, string fragment) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName, object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(string routeName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanent(object routeValues) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePermanentPreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public virtual Microsoft.AspNetCore.Mvc.RedirectToRouteResult RedirectToRoutePreserveMethod(string routeName = default(string), object routeValues = default(object), string fragment = default(string)) => throw null; + public Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public Microsoft.AspNetCore.Http.HttpResponse Response { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignInResult SignIn(System.Security.Claims.ClaimsPrincipal principal, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, string authenticationScheme) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.SignOutResult SignOut(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode(int statusCode) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode(int statusCode, object value) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name, System.Func propertyFilter) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, params System.Linq.Expressions.Expression>[] includeExpressions) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model, string name) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(TModel model) where TModel : class => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string name, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, System.Func propertyFilter) => throw null; + protected internal System.Threading.Tasks.Task TryUpdateModelAsync(object model, System.Type modelType, string name) => throw null; + public virtual bool TryValidateModel(object model, string name) => throw null; + public virtual bool TryValidateModel(object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.UnauthorizedResult Unauthorized() => throw null; + public Microsoft.AspNetCore.Mvc.IUrlHelper Url { get => throw null; set => throw null; } + public System.Security.Claims.ClaimsPrincipal User { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.PageResult` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageResult : Microsoft.AspNetCore.Mvc.ActionResult + { + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public object Model { get => throw null; } + public Microsoft.AspNetCore.Mvc.RazorPages.PageBase Page { get => throw null; set => throw null; } + public PageResult() => throw null; + public int? StatusCode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorPagesOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection Conventions { get => throw null; set => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public RazorPagesOptions() => throw null; + public string RootDirectory { get => throw null; set => throw null; } + } + + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandlerMethodDescriptor + { + public HandlerMethodDescriptor() => throw null; + public string HttpMethod { get => throw null; set => throw null; } + public System.Reflection.MethodInfo MethodInfo { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Collections.Generic.IList Parameters { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerParameterDescriptor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandlerParameterDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor, Microsoft.AspNetCore.Mvc.Infrastructure.IParameterInfoParameterDescriptor + { + public HandlerParameterDescriptor() => throw null; + public System.Reflection.ParameterInfo ParameterInfo { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageHandlerMethodSelector` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageHandlerMethodSelector + { + Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.HandlerMethodDescriptor Select(Microsoft.AspNetCore.Mvc.RazorPages.PageContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageLoader` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPageLoader + { + Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor Load(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor); + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageActionDescriptorProvider : Microsoft.AspNetCore.Mvc.Abstractions.IActionDescriptorProvider + { + protected System.Collections.Generic.IList BuildModel() => throw null; + public void OnProvidersExecuted(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorProviderContext context) => throw null; + public void OnProvidersExecuting(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorProviderContext context) => throw null; + public int Order { get => throw null; set => throw null; } + public PageActionDescriptorProvider(System.Collections.Generic.IEnumerable pageRouteModelProviders, Microsoft.Extensions.Options.IOptions mvcOptionsAccessor, Microsoft.Extensions.Options.IOptions pagesOptionsAccessor) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageBoundPropertyDescriptor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageBoundPropertyDescriptor : Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor, Microsoft.AspNetCore.Mvc.Infrastructure.IPropertyInfoParameterDescriptor + { + public PageBoundPropertyDescriptor() => throw null; + public System.Reflection.PropertyInfo Property { get => throw null; set => throw null; } + System.Reflection.PropertyInfo Microsoft.AspNetCore.Mvc.Infrastructure.IPropertyInfoParameterDescriptor.PropertyInfo { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageLoader` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PageLoader : Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageLoader + { + Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.IPageLoader.Load(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor) => throw null; + public abstract System.Threading.Tasks.Task LoadAsync(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor); + protected PageLoader() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageModelAttribute` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageModelAttribute : System.Attribute + { + public PageModelAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageResultExecutor` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageResultExecutor : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.RazorPages.PageContext pageContext, Microsoft.AspNetCore.Mvc.RazorPages.PageResult result) => throw null; + public PageResultExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine compositeViewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine razorViewEngine, Microsoft.AspNetCore.Mvc.Razor.IRazorPageActivator razorPageActivator, System.Diagnostics.DiagnosticListener diagnosticListener, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) : base(default(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory), default(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine), default(System.Diagnostics.DiagnosticListener)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageViewLocationExpander` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageViewLocationExpander : Microsoft.AspNetCore.Mvc.Razor.IViewLocationExpander + { + public System.Collections.Generic.IEnumerable ExpandViewLocations(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context, System.Collections.Generic.IEnumerable viewLocations) => throw null; + public PageViewLocationExpander() => throw null; + public void PopulateValues(Microsoft.AspNetCore.Mvc.Razor.ViewLocationExpanderContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAdapter` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorPageAdapter : Microsoft.AspNetCore.Mvc.Razor.IRazorPage + { + public Microsoft.AspNetCore.Html.IHtmlContent BodyContent { get => throw null; set => throw null; } + public void EnsureRenderedBodyOrSections() => throw null; + public System.Threading.Tasks.Task ExecuteAsync() => throw null; + public bool IsLayoutBeingRendered { get => throw null; set => throw null; } + public string Layout { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary PreviousSectionWriters { get => throw null; set => throw null; } + public RazorPageAdapter(Microsoft.AspNetCore.Mvc.Razor.RazorPageBase page, System.Type modelType) => throw null; + public System.Collections.Generic.IDictionary SectionWriters { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorPageAttribute : Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute + { + public RazorPageAttribute(string path, System.Type viewType, string routeTemplate) : base(default(string), default(System.Type)) => throw null; + public string RouteTemplate { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ServiceBasedPageModelActivatorProvider` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceBasedPageModelActivatorProvider : Microsoft.AspNetCore.Mvc.RazorPages.IPageModelActivatorProvider + { + public System.Func CreateActivator(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor) => throw null; + public System.Action CreateReleaser(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor) => throw null; + public ServiceBasedPageModelActivatorProvider() => throw null; + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcRazorPagesMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcRazorPagesMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddRazorPagesOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder WithRazorPagesAtContentRoot(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder WithRazorPagesRoot(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, string rootDirectory) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcRazorPagesMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcRazorPagesMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddRazorPages(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddRazorPages(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder WithRazorPagesRoot(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, string rootDirectory) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.PageConventionCollectionExtensions` in `Microsoft.AspNetCore.Mvc.RazorPages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class PageConventionCollectionExtensions + { + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection Add(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, Microsoft.AspNetCore.Mvc.ApplicationModels.IParameterModelBaseConvention convention) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AddAreaPageRoute(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName, string route) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AddPageRoute(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName, string route) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AllowAnonymousToAreaFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AllowAnonymousToAreaPage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AllowAnonymousToFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string folderPath) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AllowAnonymousToPage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath, string policy) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaPage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName, string policy) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaPage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string folderPath, string policy) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeFolder(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string folderPath) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizePage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName, string policy) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizePage(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection ConfigureFilter(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata filter) => throw null; + public static Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention ConfigureFilter(this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, System.Func factory) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs new file mode 100644 index 000000000000..224e240c4f96 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs @@ -0,0 +1,428 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + namespace Rendering + { + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ValidationSummary + { + All, + ModelOnly, + None, + // Stub generator skipped constructor + } + + } + namespace TagHelpers + { + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AnchorTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public string Action { get => throw null; set => throw null; } + public AnchorTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public string Area { get => throw null; set => throw null; } + public string Controller { get => throw null; set => throw null; } + public string Fragment { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public string Host { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public string Page { get => throw null; set => throw null; } + public string PageHandler { get => throw null; set => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Protocol { get => throw null; set => throw null; } + public string Route { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheTagHelper : Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase + { + public static string CacheKeyPrefix; + public CacheTagHelper(Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperMemoryCacheFactory factory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) : base(default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + protected Microsoft.Extensions.Caching.Memory.IMemoryCache MemoryCache { get => throw null; } + public Microsoft.Extensions.Caching.Memory.CacheItemPriority? Priority { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class CacheTagHelperBase : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public CacheTagHelperBase(System.Text.Encodings.Web.HtmlEncoder htmlEncoder) => throw null; + public static System.TimeSpan DefaultExpiration; + public bool Enabled { get => throw null; set => throw null; } + public System.TimeSpan? ExpiresAfter { get => throw null; set => throw null; } + public System.DateTimeOffset? ExpiresOn { get => throw null; set => throw null; } + public System.TimeSpan? ExpiresSliding { get => throw null; set => throw null; } + protected System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { get => throw null; } + public override int Order { get => throw null; } + public string VaryBy { get => throw null; set => throw null; } + public string VaryByCookie { get => throw null; set => throw null; } + public bool VaryByCulture { get => throw null; set => throw null; } + public string VaryByHeader { get => throw null; set => throw null; } + public string VaryByQuery { get => throw null; set => throw null; } + public string VaryByRoute { get => throw null; set => throw null; } + public bool VaryByUser { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperMemoryCacheFactory` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheTagHelperMemoryCacheFactory + { + public Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; } + public CacheTagHelperMemoryCacheFactory(Microsoft.Extensions.Options.IOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperOptions` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheTagHelperOptions + { + public CacheTagHelperOptions() => throw null; + public System.Int64 SizeLimit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ComponentTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public ComponentTagHelper() => throw null; + public System.Type ComponentType { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Parameters { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.RenderMode RenderMode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.DistributedCacheTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheTagHelper : Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelperBase + { + public static string CacheKeyPrefix; + public DistributedCacheTagHelper(Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperService distributedCacheService, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) : base(default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + protected Microsoft.Extensions.Caching.Memory.IMemoryCache MemoryCache { get => throw null; } + public string Name { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.EnvironmentTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnvironmentTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public EnvironmentTagHelper(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) => throw null; + public string Exclude { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment { get => throw null; } + public string Include { get => throw null; set => throw null; } + public string Names { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.FormActionTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormActionTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public string Action { get => throw null; set => throw null; } + public string Area { get => throw null; set => throw null; } + public string Controller { get => throw null; set => throw null; } + public FormActionTagHelper(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) => throw null; + public string Fragment { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public string Page { get => throw null; set => throw null; } + public string PageHandler { get => throw null; set => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Route { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory UrlHelperFactory { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public string Action { get => throw null; set => throw null; } + public bool? Antiforgery { get => throw null; set => throw null; } + public string Area { get => throw null; set => throw null; } + public string Controller { get => throw null; set => throw null; } + public FormTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public string Fragment { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public string Method { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public string Page { get => throw null; set => throw null; } + public string PageHandler { get => throw null; set => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Route { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary RouteValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class GlobbingUrlBuilder + { + public virtual System.Collections.Generic.IReadOnlyList BuildUrlList(string staticUrl, string includePattern, string excludePattern) => throw null; + public Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; } + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; } + public GlobbingUrlBuilder(Microsoft.Extensions.FileProviders.IFileProvider fileProvider, Microsoft.Extensions.Caching.Memory.IMemoryCache cache, Microsoft.AspNetCore.Http.PathString requestPathBase) => throw null; + public Microsoft.AspNetCore.Http.PathString RequestPathBase { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.ImageTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ImageTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper + { + public bool AppendVersion { get => throw null; set => throw null; } + protected internal Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; } + protected internal Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment { get => throw null; } + public ImageTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider fileVersionProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) : base(default(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory), default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + public ImageTagHelper(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider cacheProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider fileVersionProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) : base(default(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory), default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Src { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InputTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + public string Format { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + protected string GetInputType(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, out string inputTypeHint) => throw null; + public InputTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public string InputTypeName { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Value { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.LabelTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LabelTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public LabelTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public override int Order { get => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.LinkTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LinkTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper + { + public bool? AppendVersion { get => throw null; set => throw null; } + protected internal Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; } + public string FallbackHref { get => throw null; set => throw null; } + public string FallbackHrefExclude { get => throw null; set => throw null; } + public string FallbackHrefInclude { get => throw null; set => throw null; } + public string FallbackTestClass { get => throw null; set => throw null; } + public string FallbackTestProperty { get => throw null; set => throw null; } + public string FallbackTestValue { get => throw null; set => throw null; } + protected internal Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder GlobbingUrlBuilder { get => throw null; set => throw null; } + protected internal Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment { get => throw null; } + public string Href { get => throw null; set => throw null; } + public string HrefExclude { get => throw null; set => throw null; } + public string HrefInclude { get => throw null; set => throw null; } + protected System.Text.Encodings.Web.JavaScriptEncoder JavaScriptEncoder { get => throw null; } + public LinkTagHelper(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider cacheProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider fileVersionProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.JavaScriptEncoder javaScriptEncoder, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) : base(default(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory), default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public bool SuppressFallbackIntegrity { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public OptionTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public override int Order { get => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public string Value { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PartialTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public string FallbackName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + public object Model { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public bool Optional { get => throw null; set => throw null; } + public PartialTagHelper(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope viewBufferScope) => throw null; + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RenderAtEndOfFormTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public override void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public override int Order { get => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public RenderAtEndOfFormTagHelper() => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ScriptTagHelper : Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper + { + public bool? AppendVersion { get => throw null; set => throw null; } + protected internal Microsoft.Extensions.Caching.Memory.IMemoryCache Cache { get => throw null; } + public string FallbackSrc { get => throw null; set => throw null; } + public string FallbackSrcExclude { get => throw null; set => throw null; } + public string FallbackSrcInclude { get => throw null; set => throw null; } + public string FallbackTestExpression { get => throw null; set => throw null; } + protected internal Microsoft.AspNetCore.Mvc.TagHelpers.GlobbingUrlBuilder GlobbingUrlBuilder { get => throw null; set => throw null; } + protected internal Microsoft.AspNetCore.Hosting.IWebHostEnvironment HostingEnvironment { get => throw null; } + protected System.Text.Encodings.Web.JavaScriptEncoder JavaScriptEncoder { get => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public ScriptTagHelper(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, Microsoft.AspNetCore.Mvc.Razor.Infrastructure.TagHelperMemoryCacheProvider cacheProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider fileVersionProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.JavaScriptEncoder javaScriptEncoder, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory) : base(default(Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory), default(System.Text.Encodings.Web.HtmlEncoder)) => throw null; + public string Src { get => throw null; set => throw null; } + public string SrcExclude { get => throw null; set => throw null; } + public string SrcInclude { get => throw null; set => throw null; } + public bool SuppressFallbackIntegrity { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SelectTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public override void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public System.Collections.Generic.IEnumerable Items { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public SelectTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.TagHelperOutputExtensions` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class TagHelperOutputExtensions + { + public static void AddClass(this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, string classValue, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) => throw null; + public static void CopyHtmlAttribute(this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, string attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public static void MergeAttributes(this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder) => throw null; + public static void RemoveClass(this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, string classValue, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) => throw null; + public static void RemoveRange(this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, System.Collections.Generic.IEnumerable attributes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.TextAreaTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TextAreaTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public string Name { get => throw null; set => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public TextAreaTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationMessageTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression For { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public override int Order { get => throw null; } + public override System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public ValidationMessageTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidationSummaryTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper + { + protected Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator Generator { get => throw null; } + public override int Order { get => throw null; } + public override void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary ValidationSummary { get => throw null; set => throw null; } + public ValidationSummaryTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + } + + namespace Cache + { + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.CacheTagKey` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheTagKey : System.IEquatable + { + public CacheTagKey(Microsoft.AspNetCore.Mvc.TagHelpers.DistributedCacheTagHelper tagHelper) => throw null; + public CacheTagKey(Microsoft.AspNetCore.Mvc.TagHelpers.CacheTagHelper tagHelper, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Mvc.TagHelpers.Cache.CacheTagKey other) => throw null; + public string GenerateHashedKey() => throw null; + public string GenerateKey() => throw null; + public override int GetHashCode() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperFormatter` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheTagHelperFormatter : Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperFormatter + { + public System.Threading.Tasks.Task DeserializeAsync(System.Byte[] value) => throw null; + public DistributedCacheTagHelperFormatter() => throw null; + public System.Threading.Tasks.Task SerializeAsync(Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperFormattingContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperFormattingContext` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheTagHelperFormattingContext + { + public DistributedCacheTagHelperFormattingContext() => throw null; + public Microsoft.AspNetCore.Html.HtmlString Html { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperService` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheTagHelperService : Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperService + { + public DistributedCacheTagHelperService(Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperStorage storage, Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperFormatter formatter, System.Text.Encodings.Web.HtmlEncoder HtmlEncoder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public System.Threading.Tasks.Task ProcessContentAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output, Microsoft.AspNetCore.Mvc.TagHelpers.Cache.CacheTagKey key, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperStorage` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheTagHelperStorage : Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperStorage + { + public DistributedCacheTagHelperStorage(Microsoft.Extensions.Caching.Distributed.IDistributedCache distributedCache) => throw null; + public System.Threading.Tasks.Task GetAsync(string key) => throw null; + public System.Threading.Tasks.Task SetAsync(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperFormatter` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDistributedCacheTagHelperFormatter + { + System.Threading.Tasks.Task DeserializeAsync(System.Byte[] value); + System.Threading.Tasks.Task SerializeAsync(Microsoft.AspNetCore.Mvc.TagHelpers.Cache.DistributedCacheTagHelperFormattingContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperService` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDistributedCacheTagHelperService + { + System.Threading.Tasks.Task ProcessContentAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output, Microsoft.AspNetCore.Mvc.TagHelpers.Cache.CacheTagKey key, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options); + } + + // Generated from `Microsoft.AspNetCore.Mvc.TagHelpers.Cache.IDistributedCacheTagHelperStorage` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDistributedCacheTagHelperStorage + { + System.Threading.Tasks.Task GetAsync(string key); + System.Threading.Tasks.Task SetAsync(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options); + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.TagHelperServicesExtensions` in `Microsoft.AspNetCore.Mvc.TagHelpers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class TagHelperServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCacheTagHelper(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCacheTagHelperLimits(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddCacheTagHelperLimits(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action configure) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs new file mode 100644 index 000000000000..bc8ba05326d1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs @@ -0,0 +1,1692 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Mvc + { + // Generated from `Microsoft.AspNetCore.Mvc.AutoValidateAntiforgeryTokenAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AutoValidateAntiforgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public AutoValidateAntiforgeryTokenAttribute() => throw null; + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Controller` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Controller : Microsoft.AspNetCore.Mvc.ControllerBase, System.IDisposable, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter, Microsoft.AspNetCore.Mvc.Filters.IActionFilter + { + protected Controller() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual Microsoft.AspNetCore.Mvc.JsonResult Json(object data, object serializerSettings) => throw null; + public virtual Microsoft.AspNetCore.Mvc.JsonResult Json(object data) => throw null; + public virtual void OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext context) => throw null; + public virtual void OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context) => throw null; + public virtual System.Threading.Tasks.Task OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate next) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView(string viewName, object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView(string viewName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView(object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.PartialViewResult PartialView() => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ViewResult View(string viewName, object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewResult View(string viewName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewResult View(object model) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewResult View() => throw null; + public dynamic ViewBag { get => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(string componentName) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType, object arguments) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent(System.Type componentType) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.CookieTempDataProviderOptions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieTempDataProviderOptions + { + public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set => throw null; } + public CookieTempDataProviderOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.IViewComponentHelper` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentHelper + { + System.Threading.Tasks.Task InvokeAsync(string name, object arguments); + System.Threading.Tasks.Task InvokeAsync(System.Type componentType, object arguments); + } + + // Generated from `Microsoft.AspNetCore.Mvc.IViewComponentResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentResult + { + void Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.IgnoreAntiforgeryTokenAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IgnoreAntiforgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + public IgnoreAntiforgeryTokenAttribute() => throw null; + public int Order { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.MvcViewOptions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcViewOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IList ClientModelValidatorProviders { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions HtmlHelperOptions { get => throw null; set => throw null; } + public MvcViewOptions() => throw null; + public System.Collections.Generic.IList ViewEngines { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.PageRemoteAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PageRemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase + { + protected override string GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) => throw null; + public string PageHandler { get => throw null; set => throw null; } + public string PageName { get => throw null; set => throw null; } + public PageRemoteAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.PartialViewResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PartialViewResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public object Model { get => throw null; } + public PartialViewResult() => throw null; + public int? StatusCode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine ViewEngine { get => throw null; set => throw null; } + public string ViewName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RemoteAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase + { + protected override string GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) => throw null; + public RemoteAttribute(string routeName) => throw null; + public RemoteAttribute(string action, string controller, string areaName) => throw null; + public RemoteAttribute(string action, string controller) => throw null; + protected RemoteAttribute() => throw null; + protected string RouteName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.RemoteAttributeBase` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RemoteAttributeBase : System.ComponentModel.DataAnnotations.ValidationAttribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator + { + public virtual void AddValidation(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) => throw null; + public string AdditionalFields { get => throw null; set => throw null; } + public string FormatAdditionalFieldsForClientValidation(string property) => throw null; + public override string FormatErrorMessage(string name) => throw null; + public static string FormatPropertyForClientValidation(string property) => throw null; + protected abstract string GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context); + public string HttpMethod { get => throw null; set => throw null; } + public override bool IsValid(object value) => throw null; + protected RemoteAttributeBase() => throw null; + protected Microsoft.AspNetCore.Routing.RouteValueDictionary RouteData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.SkipStatusCodePagesAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SkipStatusCodePagesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + public void OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext context) => throw null; + public void OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context) => throw null; + public SkipStatusCodePagesAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.TempDataAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TempDataAttribute : System.Attribute + { + public string Key { get => throw null; set => throw null; } + public TempDataAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateAntiForgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public int Order { get => throw null; set => throw null; } + public ValidateAntiForgeryTokenAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponent` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ViewComponent + { + public Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult Content(string content) => throw null; + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public Microsoft.AspNetCore.Http.HttpRequest Request { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; } + public Microsoft.AspNetCore.Mvc.IUrlHelper Url { get => throw null; set => throw null; } + public System.Security.Principal.IPrincipal User { get => throw null; } + public System.Security.Claims.ClaimsPrincipal UserClaimsPrincipal { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult View(string viewName, TModel model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult View(TModel model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult View(string viewName) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult View() => throw null; + public dynamic ViewBag { get => throw null; } + protected ViewComponent() => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext ViewComponentContext { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine ViewEngine { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponentAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentAttribute : System.Attribute + { + public string Name { get => throw null; set => throw null; } + public ViewComponentAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponentResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public object Arguments { get => throw null; set => throw null; } + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public object Model { get => throw null; } + public int? StatusCode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public string ViewComponentName { get => throw null; set => throw null; } + public ViewComponentResult() => throw null; + public System.Type ViewComponentType { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewDataAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataAttribute : System.Attribute + { + public string Key { get => throw null; set => throw null; } + public ViewDataAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult, Microsoft.AspNetCore.Mvc.IActionResult + { + public string ContentType { get => throw null; set => throw null; } + public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; + public object Model { get => throw null; } + public int? StatusCode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine ViewEngine { get => throw null; set => throw null; } + public string ViewName { get => throw null; set => throw null; } + public ViewResult() => throw null; + } + + namespace Diagnostics + { + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewComponentEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterViewComponentEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public AfterViewComponentEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext viewComponentContext, Microsoft.AspNetCore.Mvc.IViewComponentResult viewComponentResult, object viewComponent) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public object ViewComponent { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext ViewComponentContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.IViewComponentResult ViewComponentResult { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.AfterViewEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AfterViewEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public AfterViewEventData(Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewComponentEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeViewComponentEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + public BeforeViewComponentEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext viewComponentContext, object viewComponent) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public object ViewComponent { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext ViewComponentContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.BeforeViewEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BeforeViewEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public BeforeViewEventData(Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.ViewComponentAfterViewExecuteEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentAfterViewExecuteEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public ViewComponentAfterViewExecuteEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext viewComponentContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext ViewComponentContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.ViewComponentBeforeViewExecuteEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentBeforeViewExecuteEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor ActionDescriptor { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public ViewComponentBeforeViewExecuteEventData(Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor actionDescriptor, Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext viewComponentContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext ViewComponentContext { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.ViewFoundEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewFoundEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + public bool IsMainPage { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ActionResult Result { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public ViewFoundEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, bool isMainPage, Microsoft.AspNetCore.Mvc.ActionResult result, string viewName, Microsoft.AspNetCore.Mvc.ViewEngines.IView view) => throw null; + public string ViewName { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.ViewNotFoundEventData` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewNotFoundEventData : Microsoft.AspNetCore.Mvc.Diagnostics.EventData + { + public Microsoft.AspNetCore.Mvc.ActionContext ActionContext { get => throw null; } + protected override int Count { get => throw null; } + public const string EventName = default; + public bool IsMainPage { get => throw null; } + protected override System.Collections.Generic.KeyValuePair this[int index] { get => throw null; } + public Microsoft.AspNetCore.Mvc.ActionResult Result { get => throw null; } + public System.Collections.Generic.IEnumerable SearchedLocations { get => throw null; } + public string ViewName { get => throw null; } + public ViewNotFoundEventData(Microsoft.AspNetCore.Mvc.ActionContext actionContext, bool isMainPage, Microsoft.AspNetCore.Mvc.ActionResult result, string viewName, System.Collections.Generic.IEnumerable searchedLocations) => throw null; + } + + } + namespace ModelBinding + { + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionaryExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelStateDictionaryExtensions + { + public static void AddModelError(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression, string errorMessage) => throw null; + public static void AddModelError(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression, System.Exception exception, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) => throw null; + public static bool Remove(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression) => throw null; + public static void RemoveAll(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression) => throw null; + public static void TryAddModelException(this Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Linq.Expressions.Expression> expression, System.Exception exception) => throw null; + } + + } + namespace Rendering + { + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum CheckBoxHiddenInputRenderMode + { + // Stub generator skipped constructor + EndOfForm, + Inline, + None, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.FormMethod` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum FormMethod + { + // Stub generator skipped constructor + Get, + Post, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum Html5DateRenderingMode + { + CurrentCulture, + // Stub generator skipped constructor + Rfc3339, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperComponentExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperComponentExtensions + { + public static System.Threading.Tasks.Task RenderComponentAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.RenderMode renderMode, object parameters) where TComponent : Microsoft.AspNetCore.Components.IComponent => throw null; + public static System.Threading.Tasks.Task RenderComponentAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.RenderMode renderMode) where TComponent : Microsoft.AspNetCore.Components.IComponent => throw null; + public static System.Threading.Tasks.Task RenderComponentAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Type componentType, Microsoft.AspNetCore.Mvc.Rendering.RenderMode renderMode, object parameters) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperDisplayExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperDisplayExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent Display(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Display(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Display(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Display(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Display(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, string htmlFieldName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DisplayForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperDisplayNameExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperDisplayNameExtensions + { + public static string DisplayNameFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper> htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static string DisplayNameForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperEditorExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperEditorExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent Editor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Editor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Editor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Editor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Editor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, string htmlFieldName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, string htmlFieldName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string templateName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object additionalViewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent EditorForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperFormExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperFormExtensions + { + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, object routeValues) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string actionName, string controllerName) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object routeValues) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool? antiforgery) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName, object routeValues) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName, bool? antiforgery) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string routeName) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object routeValues, bool? antiforgery) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object routeValues) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperInputExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperInputExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent CheckBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent CheckBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, bool isChecked) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent CheckBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent CheckBoxFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Hidden(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Hidden(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent HiddenFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Password(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Password(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent PasswordFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RadioButton(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RadioButton(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value, bool isChecked) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RadioButton(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RadioButtonFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextArea(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string value, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextArea(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextArea(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextArea(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextAreaFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextAreaFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value, string format) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object value) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBoxFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string format) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBoxFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent TextBoxFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperLabelExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperLabelExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent Label(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string labelText) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Label(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string labelText) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string labelText, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string labelText) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent LabelForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperLinkExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperLinkExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName, object routeValues, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName, object routeValues) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, string controllerName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, object routeValues, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName, object routeValues) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ActionLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper, string linkText, string actionName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RouteLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string linkText, string routeName, object routeValues, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RouteLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string linkText, string routeName, object routeValues) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RouteLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string linkText, string routeName) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RouteLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string linkText, object routeValues, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent RouteLink(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string linkText, object routeValues) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperNameExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperNameExtensions + { + public static string IdForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + public static string NameForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperPartialExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperPartialExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent Partial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Partial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Partial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent Partial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName) => throw null; + public static System.Threading.Tasks.Task PartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model) => throw null; + public static System.Threading.Tasks.Task PartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static System.Threading.Tasks.Task PartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName) => throw null; + public static void RenderPartial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static void RenderPartial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model) => throw null; + public static void RenderPartial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static void RenderPartial(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName) => throw null; + public static System.Threading.Tasks.Task RenderPartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, object model) => throw null; + public static System.Threading.Tasks.Task RenderPartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public static System.Threading.Tasks.Task RenderPartialAsync(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string partialViewName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperSelectExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperSelectExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string optionLabel) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, System.Collections.Generic.IEnumerable selectList, string optionLabel) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, System.Collections.Generic.IEnumerable selectList) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownList(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownListFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, string optionLabel) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownListFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent DropDownListFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ListBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, System.Collections.Generic.IEnumerable selectList) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ListBox(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ListBoxFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperValidationExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperValidationExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string message, string tag) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string message, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, string message) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string message, string tag) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string message, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression, string message) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, string tag) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, object htmlAttributes, string tag) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string message) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message, string tag) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors, string message) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, bool excludePropertyErrors) => throw null; + public static Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperValueExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HtmlHelperValueExtensions + { + public static string Value(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string expression) => throw null; + public static string ValueFor(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, System.Linq.Expressions.Expression> expression) => throw null; + public static string ValueForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper, string format) => throw null; + public static string ValueForModel(this Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper htmlHelper) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlHelper + { + Microsoft.AspNetCore.Html.IHtmlContent ActionLink(string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent AntiForgeryToken(); + Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(string actionName, string controllerName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(string routeName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent CheckBox(string expression, bool? isChecked, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent Display(string expression, string templateName, string htmlFieldName, object additionalViewData); + string DisplayName(string expression); + string DisplayText(string expression); + Microsoft.AspNetCore.Html.IHtmlContent DropDownList(string expression, System.Collections.Generic.IEnumerable selectList, string optionLabel, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent Editor(string expression, string templateName, string htmlFieldName, object additionalViewData); + string Encode(string value); + string Encode(object value); + void EndForm(); + string FormatValue(object value, string format); + string GenerateIdFromName(string fullName); + System.Collections.Generic.IEnumerable GetEnumSelectList() where TEnum : struct; + System.Collections.Generic.IEnumerable GetEnumSelectList(System.Type enumType); + Microsoft.AspNetCore.Html.IHtmlContent Hidden(string expression, object value, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode Html5DateRenderingMode { get; set; } + string Id(string expression); + string IdAttributeDotReplacement { get; } + Microsoft.AspNetCore.Html.IHtmlContent Label(string expression, string labelText, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent ListBox(string expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes); + Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get; } + string Name(string expression); + System.Threading.Tasks.Task PartialAsync(string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData); + Microsoft.AspNetCore.Html.IHtmlContent Password(string expression, object value, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent RadioButton(string expression, object value, bool? isChecked, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent Raw(string value); + Microsoft.AspNetCore.Html.IHtmlContent Raw(object value); + System.Threading.Tasks.Task RenderPartialAsync(string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData); + Microsoft.AspNetCore.Html.IHtmlContent RouteLink(string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes); + Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get; } + Microsoft.AspNetCore.Html.IHtmlContent TextArea(string expression, string value, int rows, int columns, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent TextBox(string expression, object value, string format, object htmlAttributes); + System.Text.Encodings.Web.UrlEncoder UrlEncoder { get; } + Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(string expression, string message, object htmlAttributes, string tag); + Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(bool excludePropertyErrors, string message, object htmlAttributes, string tag); + string Value(string expression, string format); + dynamic ViewBag { get; } + Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get; } + Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<>` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlHelper : Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper + { + Microsoft.AspNetCore.Html.IHtmlContent CheckBoxFor(System.Linq.Expressions.Expression> expression, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName, object additionalViewData); + string DisplayNameFor(System.Linq.Expressions.Expression> expression); + string DisplayNameForInnerType(System.Linq.Expressions.Expression> expression); + string DisplayTextFor(System.Linq.Expressions.Expression> expression); + Microsoft.AspNetCore.Html.IHtmlContent DropDownListFor(System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, string optionLabel, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent EditorFor(System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName, object additionalViewData); + string Encode(string value); + string Encode(object value); + Microsoft.AspNetCore.Html.IHtmlContent HiddenFor(System.Linq.Expressions.Expression> expression, object htmlAttributes); + string IdFor(System.Linq.Expressions.Expression> expression); + Microsoft.AspNetCore.Html.IHtmlContent LabelFor(System.Linq.Expressions.Expression> expression, string labelText, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent ListBoxFor(System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes); + string NameFor(System.Linq.Expressions.Expression> expression); + Microsoft.AspNetCore.Html.IHtmlContent PasswordFor(System.Linq.Expressions.Expression> expression, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent RadioButtonFor(System.Linq.Expressions.Expression> expression, object value, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent Raw(string value); + Microsoft.AspNetCore.Html.IHtmlContent Raw(object value); + Microsoft.AspNetCore.Html.IHtmlContent TextAreaFor(System.Linq.Expressions.Expression> expression, int rows, int columns, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent TextBoxFor(System.Linq.Expressions.Expression> expression, string format, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(System.Linq.Expressions.Expression> expression, string message, object htmlAttributes, string tag); + string ValueFor(System.Linq.Expressions.Expression> expression, string format); + Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJsonHelper + { + Microsoft.AspNetCore.Html.IHtmlContent Serialize(object value); + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MultiSelectList : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public string DataGroupField { get => throw null; } + public string DataTextField { get => throw null; } + public string DataValueField { get => throw null; } + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Collections.IEnumerable Items { get => throw null; } + public MultiSelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField, System.Collections.IEnumerable selectedValues, string dataGroupField) => throw null; + public MultiSelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField, System.Collections.IEnumerable selectedValues) => throw null; + public MultiSelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField) => throw null; + public MultiSelectList(System.Collections.IEnumerable items, System.Collections.IEnumerable selectedValues) => throw null; + public MultiSelectList(System.Collections.IEnumerable items) => throw null; + public System.Collections.IEnumerable SelectedValues { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.MvcForm` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MvcForm : System.IDisposable + { + public void Dispose() => throw null; + public void EndForm() => throw null; + protected virtual void GenerateEndForm() => throw null; + public MvcForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, System.Text.Encodings.Web.HtmlEncoder htmlEncoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.RenderMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RenderMode + { + // Stub generator skipped constructor + Server, + ServerPrerendered, + Static, + WebAssembly, + WebAssemblyPrerendered, + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.SelectList` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SelectList : Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList + { + public SelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField, object selectedValue, string dataGroupField) : base(default(System.Collections.IEnumerable)) => throw null; + public SelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField, object selectedValue) : base(default(System.Collections.IEnumerable)) => throw null; + public SelectList(System.Collections.IEnumerable items, string dataValueField, string dataTextField) : base(default(System.Collections.IEnumerable)) => throw null; + public SelectList(System.Collections.IEnumerable items, object selectedValue) : base(default(System.Collections.IEnumerable)) => throw null; + public SelectList(System.Collections.IEnumerable items) : base(default(System.Collections.IEnumerable)) => throw null; + public object SelectedValue { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.SelectListGroup` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SelectListGroup + { + public bool Disabled { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public SelectListGroup() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.SelectListItem` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SelectListItem + { + public bool Disabled { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.SelectListGroup Group { get => throw null; set => throw null; } + public SelectListItem(string text, string value, bool selected, bool disabled) => throw null; + public SelectListItem(string text, string value, bool selected) => throw null; + public SelectListItem(string text, string value) => throw null; + public SelectListItem() => throw null; + public bool Selected { get => throw null; set => throw null; } + public string Text { get => throw null; set => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.TagBuilder` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagBuilder : Microsoft.AspNetCore.Html.IHtmlContent + { + public void AddCssClass(string value) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary Attributes { get => throw null; } + public static string CreateSanitizedId(string name, string invalidCharReplacement) => throw null; + public void GenerateId(string name, string invalidCharReplacement) => throw null; + public bool HasInnerHtml { get => throw null; } + public Microsoft.AspNetCore.Html.IHtmlContentBuilder InnerHtml { get => throw null; } + public void MergeAttribute(string key, string value, bool replaceExisting) => throw null; + public void MergeAttribute(string key, string value) => throw null; + public void MergeAttributes(System.Collections.Generic.IDictionary attributes, bool replaceExisting) => throw null; + public void MergeAttributes(System.Collections.Generic.IDictionary attributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RenderBody() => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RenderEndTag() => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RenderSelfClosingTag() => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RenderStartTag() => throw null; + public TagBuilder(string tagName) => throw null; + public TagBuilder(Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder) => throw null; + public string TagName { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.TagRenderMode TagRenderMode { get => throw null; set => throw null; } + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.TagRenderMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum TagRenderMode + { + EndTag, + Normal, + SelfClosing, + StartTag, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ViewComponentHelperExtensions + { + public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, object arguments) => throw null; + public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper) => throw null; + public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, string name) => throw null; + public static System.Threading.Tasks.Task InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, System.Type componentType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.Rendering.ViewContext` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewContext : Microsoft.AspNetCore.Mvc.ActionContext + { + public Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { get => throw null; set => throw null; } + public bool ClientValidationEnabled { get => throw null; set => throw null; } + public string ExecutingFilePath { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext FormContext { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext GetFormContextForClientValidation() => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode Html5DateRenderingMode { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public string ValidationMessageElement { get => throw null; set => throw null; } + public string ValidationSummaryMessageElement { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; set => throw null; } + public dynamic ViewBag { get => throw null; } + public ViewContext(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.IO.TextWriter writer) => throw null; + public ViewContext(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, System.IO.TextWriter writer, Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions htmlHelperOptions) => throw null; + public ViewContext() => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + public System.IO.TextWriter Writer { get => throw null; set => throw null; } + } + + } + namespace ViewComponents + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ContentViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentResult + { + public string Content { get => throw null; } + public ContentViewComponentResult(string content) => throw null; + public void Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentDescriptorCollectionProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultViewComponentDescriptorCollectionProvider : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider + { + public DefaultViewComponentDescriptorCollectionProvider(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorProvider descriptorProvider) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptorCollection ViewComponents { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentDescriptorProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultViewComponentDescriptorProvider : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorProvider + { + public DefaultViewComponentDescriptorProvider(Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager partManager) => throw null; + protected virtual System.Collections.Generic.IEnumerable GetCandidateTypes() => throw null; + public virtual System.Collections.Generic.IEnumerable GetViewComponents() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentFactory` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultViewComponentFactory : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentFactory + { + public object CreateViewComponent(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public DefaultViewComponentFactory(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator activator) => throw null; + public void ReleaseViewComponent(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object component) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultViewComponentHelper : Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware, Microsoft.AspNetCore.Mvc.IViewComponentHelper + { + public void Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + public DefaultViewComponentHelper(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider descriptorProvider, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector selector, Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory invokerFactory, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope viewBufferScope) => throw null; + public System.Threading.Tasks.Task InvokeAsync(string name, object arguments) => throw null; + public System.Threading.Tasks.Task InvokeAsync(System.Type componentType, object arguments) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentSelector` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultViewComponentSelector : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector + { + public DefaultViewComponentSelector(Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider descriptorProvider) => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor SelectComponent(string componentName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.HtmlContentViewComponentResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlContentViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentResult + { + public Microsoft.AspNetCore.Html.IHtmlContent EncodedContent { get => throw null; } + public void Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public HtmlContentViewComponentResult(Microsoft.AspNetCore.Html.IHtmlContent encodedContent) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentActivator + { + object Create(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + void Release(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object viewComponent); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorCollectionProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentDescriptorCollectionProvider + { + Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptorCollection ViewComponents { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentDescriptorProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentDescriptorProvider + { + System.Collections.Generic.IEnumerable GetViewComponents(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentFactory` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentFactory + { + object CreateViewComponent(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + void ReleaseViewComponent(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object component); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvoker` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentInvoker + { + System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentInvokerFactory + { + Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvoker CreateInstance(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentSelector` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewComponentSelector + { + Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor SelectComponent(string componentName); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ServiceBasedViewComponentActivator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceBasedViewComponentActivator : Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentActivator + { + public object Create(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public virtual void Release(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context, object viewComponent) => throw null; + public ServiceBasedViewComponentActivator() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentContext + { + public System.Collections.Generic.IDictionary Arguments { get => throw null; set => throw null; } + public System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; } + public ViewComponentContext(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor viewComponentDescriptor, System.Collections.Generic.IDictionary arguments, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, System.IO.TextWriter writer) => throw null; + public ViewComponentContext() => throw null; + public Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor ViewComponentDescriptor { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } + public System.IO.TextWriter Writer { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContextAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentContextAttribute : System.Attribute + { + public ViewComponentContextAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentConventions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ViewComponentConventions + { + public static string GetComponentFullName(System.Reflection.TypeInfo componentType) => throw null; + public static string GetComponentName(System.Reflection.TypeInfo componentType) => throw null; + public static bool IsComponent(System.Reflection.TypeInfo typeInfo) => throw null; + public static string ViewComponentSuffix; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentDescriptor + { + public string DisplayName { get => throw null; set => throw null; } + public string FullName { get => throw null; set => throw null; } + public string Id { get => throw null; set => throw null; } + public System.Reflection.MethodInfo MethodInfo { get => throw null; set => throw null; } + public System.Collections.Generic.IReadOnlyList Parameters { get => throw null; set => throw null; } + public string ShortName { get => throw null; set => throw null; } + public System.Reflection.TypeInfo TypeInfo { get => throw null; set => throw null; } + public ViewComponentDescriptor() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptorCollection` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentDescriptorCollection + { + public System.Collections.Generic.IReadOnlyList Items { get => throw null; } + public int Version { get => throw null; } + public ViewComponentDescriptorCollection(System.Collections.Generic.IEnumerable items, int version) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentFeature` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentFeature + { + public ViewComponentFeature() => throw null; + public System.Collections.Generic.IList ViewComponents { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentFeatureProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentFeatureProvider : Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider, Microsoft.AspNetCore.Mvc.ApplicationParts.IApplicationFeatureProvider + { + public void PopulateFeature(System.Collections.Generic.IEnumerable parts, Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentFeature feature) => throw null; + public ViewComponentFeatureProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentResult + { + public void Execute(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext context) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine ViewEngine { get => throw null; set => throw null; } + public string ViewName { get => throw null; set => throw null; } + public ViewViewComponentResult() => throw null; + } + + } + namespace ViewEngines + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeViewEngine : Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine + { + public CompositeViewEngine(Microsoft.Extensions.Options.IOptions optionsAccessor) => throw null; + public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage) => throw null; + public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage) => throw null; + public System.Collections.Generic.IReadOnlyList ViewEngines { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompositeViewEngine : Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine + { + System.Collections.Generic.IReadOnlyList ViewEngines { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewEngines.IView` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IView + { + string Path { get; } + System.Threading.Tasks.Task RenderAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewEngine + { + Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext context, string viewName, bool isMainPage); + Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult GetView(string executingFilePath, string viewPath, bool isMainPage); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewEngineResult + { + public Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult EnsureSuccessful(System.Collections.Generic.IEnumerable originalLocations) => throw null; + public static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult Found(string viewName, Microsoft.AspNetCore.Mvc.ViewEngines.IView view) => throw null; + public static Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult NotFound(string viewName, System.Collections.Generic.IEnumerable searchedLocations) => throw null; + public System.Collections.Generic.IEnumerable SearchedLocations { get => throw null; } + public bool Success { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewEngines.IView View { get => throw null; } + public string ViewName { get => throw null; } + } + + } + namespace ViewFeatures + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class AntiforgeryExtensions + { + public static Microsoft.AspNetCore.Html.IHtmlContent GetHtml(this Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AttributeDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(string key, string value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public AttributeDictionary() => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary attributes) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public string this[string key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + public bool Remove(string key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(string key, out string value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.CookieTempDataProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieTempDataProvider : Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider + { + public static string CookieName; + public CookieTempDataProvider(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options, Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.TempDataSerializer tempDataSerializer) => throw null; + public System.Collections.Generic.IDictionary LoadTempData(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public void SaveTempData(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IDictionary values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultHtmlGenerator : Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator + { + protected virtual void AddMaxLengthAttribute(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression) => throw null; + protected virtual void AddPlaceholderAttribute(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression) => throw null; + protected virtual void AddValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.Rendering.TagBuilder tagBuilder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression) => throw null; + protected bool AllowRenderingMaxLengthAttribute { get => throw null; } + public DefaultHtmlGenerator(Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider validationAttributeProvider) => throw null; + public string Encode(string value) => throw null; + public string Encode(object value) => throw null; + public string FormatValue(object value, string format) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateActionLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateAntiforgery(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateCheckBox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool? isChecked, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string actionName, string controllerName, object routeValues, string method, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateFormCore(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string action, string method, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent GenerateGroupsAndOptions(string optionLabel, System.Collections.Generic.IEnumerable selectList) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateHidden(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool useViewData, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateHiddenForCheckbox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateInput(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.InputType inputType, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool useViewData, bool isChecked, bool setId, bool isExplicitValue, string format, System.Collections.Generic.IDictionary htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateLabel(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string labelText, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateLink(string linkText, string url, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePageForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string pageName, string pageHandler, object routeValues, string fragment, string method, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePageLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string pageName, string pageHandler, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePassword(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRadioButton(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool? isChecked, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string routeName, object routeValues, string method, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateSelect(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string optionLabel, string expression, System.Collections.Generic.IEnumerable selectList, System.Collections.Generic.ICollection currentValues, bool allowMultiple, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateSelect(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string optionLabel, string expression, System.Collections.Generic.IEnumerable selectList, bool allowMultiple, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateTextArea(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, int rows, int columns, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateTextBox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, string format, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateValidationMessage(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string message, string tag, object htmlAttributes) => throw null; + public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateValidationSummary(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, bool excludePropertyErrors, string message, string headerTag, object htmlAttributes) => throw null; + public virtual System.Collections.Generic.ICollection GetCurrentValues(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool allowMultiple) => throw null; + public string IdAttributeDotReplacement { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGeneratorExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DefaultHtmlGeneratorExtensions + { + public static Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateForm(this Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string actionName, string controllerName, string fragment, object routeValues, string method, object htmlAttributes) => throw null; + public static Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteForm(this Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator generator, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string routeName, object routeValues, string fragment, string method, object htmlAttributes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultValidationHtmlAttributeProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultValidationHtmlAttributeProvider : Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider + { + public override void AddValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, System.Collections.Generic.IDictionary attributes) => throw null; + public DefaultValidationHtmlAttributeProvider(Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientValidatorCache clientValidatorCache) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.FormContext` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormContext + { + public bool CanRenderAtEndOfForm { get => throw null; set => throw null; } + public System.Collections.Generic.IList EndOfFormContent { get => throw null; } + public FormContext() => throw null; + public System.Collections.Generic.IDictionary FormData { get => throw null; } + public bool HasAntiforgeryToken { get => throw null; set => throw null; } + public bool HasEndOfFormContent { get => throw null; } + public bool HasFormData { get => throw null; } + public void RenderedField(string fieldName, bool value) => throw null; + public bool RenderedField(string fieldName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlHelper : Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware, Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper + { + public Microsoft.AspNetCore.Html.IHtmlContent ActionLink(string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes) => throw null; + public static System.Collections.Generic.IDictionary AnonymousObjectToHtmlAttributes(object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent AntiForgeryToken() => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginForm(string actionName, string controllerName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.MvcForm BeginRouteForm(string routeName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent CheckBox(string expression, bool? isChecked, object htmlAttributes) => throw null; + public virtual void Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.MvcForm CreateForm() => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Display(string expression, string templateName, string htmlFieldName, object additionalViewData) => throw null; + public string DisplayName(string expression) => throw null; + public string DisplayText(string expression) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent DropDownList(string expression, System.Collections.Generic.IEnumerable selectList, string optionLabel, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Editor(string expression, string templateName, string htmlFieldName, object additionalViewData) => throw null; + public string Encode(string value) => throw null; + public string Encode(object value) => throw null; + public void EndForm() => throw null; + public string FormatValue(object value, string format) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateCheckBox(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool? isChecked, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateDisplay(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string htmlFieldName, string templateName, object additionalViewData) => throw null; + protected virtual string GenerateDisplayName(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression) => throw null; + protected virtual string GenerateDisplayText(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer) => throw null; + protected Microsoft.AspNetCore.Html.IHtmlContent GenerateDropDown(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IEnumerable selectList, string optionLabel, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateEditor(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string htmlFieldName, string templateName, object additionalViewData) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.MvcForm GenerateForm(string actionName, string controllerName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateHidden(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool useViewData, object htmlAttributes) => throw null; + protected virtual string GenerateId(string expression) => throw null; + public string GenerateIdFromName(string fullName) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateLabel(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string labelText, object htmlAttributes) => throw null; + protected Microsoft.AspNetCore.Html.IHtmlContent GenerateListBox(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes) => throw null; + protected virtual string GenerateName(string expression) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GeneratePassword(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateRadioButton(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool? isChecked, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Mvc.Rendering.MvcForm GenerateRouteForm(string routeName, object routeValues, Microsoft.AspNetCore.Mvc.Rendering.FormMethod method, bool? antiforgery, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateTextArea(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, int rows, int columns, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateTextBox(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, string format, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateValidationMessage(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string message, string tag, object htmlAttributes) => throw null; + protected virtual Microsoft.AspNetCore.Html.IHtmlContent GenerateValidationSummary(bool excludePropertyErrors, string message, object htmlAttributes, string tag) => throw null; + protected virtual string GenerateValue(string expression, object value, string format, bool useViewData) => throw null; + public System.Collections.Generic.IEnumerable GetEnumSelectList() where TEnum : struct => throw null; + public System.Collections.Generic.IEnumerable GetEnumSelectList(System.Type enumType) => throw null; + protected virtual System.Collections.Generic.IEnumerable GetEnumSelectList(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata) => throw null; + public static string GetFormMethodString(Microsoft.AspNetCore.Mvc.Rendering.FormMethod method) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Hidden(string expression, object value, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode Html5DateRenderingMode { get => throw null; set => throw null; } + public HtmlHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator htmlGenerator, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope bufferScope, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.UrlEncoder urlEncoder) => throw null; + public string Id(string expression) => throw null; + public string IdAttributeDotReplacement { get => throw null; } + public Microsoft.AspNetCore.Html.IHtmlContent Label(string expression, string labelText, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent ListBox(string expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; } + public string Name(string expression) => throw null; + public static System.Collections.Generic.IDictionary ObjectToDictionary(object value) => throw null; + public System.Threading.Tasks.Task PartialAsync(string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Password(string expression, object value, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RadioButton(string expression, object value, bool? isChecked, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Raw(string value) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent Raw(object value) => throw null; + public System.Threading.Tasks.Task RenderPartialAsync(string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData) => throw null; + protected virtual System.Threading.Tasks.Task RenderPartialCoreAsync(string partialViewName, object model, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.IO.TextWriter writer) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RouteLink(string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary TempData { get => throw null; } + public Microsoft.AspNetCore.Html.IHtmlContent TextArea(string expression, string value, int rows, int columns, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent TextBox(string expression, object value, string format, object htmlAttributes) => throw null; + public System.Text.Encodings.Web.UrlEncoder UrlEncoder { get => throw null; } + public static string ValidationInputCssClassName; + public static string ValidationInputValidCssClassName; + public Microsoft.AspNetCore.Html.IHtmlContent ValidationMessage(string expression, string message, object htmlAttributes, string tag) => throw null; + public static string ValidationMessageCssClassName; + public static string ValidationMessageValidCssClassName; + public Microsoft.AspNetCore.Html.IHtmlContent ValidationSummary(bool excludePropertyErrors, string message, object htmlAttributes, string tag) => throw null; + public static string ValidationSummaryCssClassName; + public static string ValidationSummaryValidCssClassName; + public string Value(string expression, string format) => throw null; + public dynamic ViewBag { get => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.ViewContext ViewContext { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper<>` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlHelper : Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelper, Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper, Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper + { + public Microsoft.AspNetCore.Html.IHtmlContent CheckBoxFor(System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public override void Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent DisplayFor(System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName, object additionalViewData) => throw null; + public string DisplayNameFor(System.Linq.Expressions.Expression> expression) => throw null; + public string DisplayNameForInnerType(System.Linq.Expressions.Expression> expression) => throw null; + public string DisplayTextFor(System.Linq.Expressions.Expression> expression) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent DropDownListFor(System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, string optionLabel, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent EditorFor(System.Linq.Expressions.Expression> expression, string templateName, string htmlFieldName, object additionalViewData) => throw null; + protected string GetExpressionName(System.Linq.Expressions.Expression> expression) => throw null; + protected Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetModelExplorer(System.Linq.Expressions.Expression> expression) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent HiddenFor(System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public HtmlHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator htmlGenerator, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope bufferScope, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, System.Text.Encodings.Web.UrlEncoder urlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpressionProvider modelExpressionProvider) : base(default(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator), default(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine), default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider), default(Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope), default(System.Text.Encodings.Web.HtmlEncoder), default(System.Text.Encodings.Web.UrlEncoder)) => throw null; + public string IdFor(System.Linq.Expressions.Expression> expression) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent LabelFor(System.Linq.Expressions.Expression> expression, string labelText, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent ListBoxFor(System.Linq.Expressions.Expression> expression, System.Collections.Generic.IEnumerable selectList, object htmlAttributes) => throw null; + public string NameFor(System.Linq.Expressions.Expression> expression) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent PasswordFor(System.Linq.Expressions.Expression> expression, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent RadioButtonFor(System.Linq.Expressions.Expression> expression, object value, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent TextAreaFor(System.Linq.Expressions.Expression> expression, int rows, int columns, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent TextBoxFor(System.Linq.Expressions.Expression> expression, string format, object htmlAttributes) => throw null; + public Microsoft.AspNetCore.Html.IHtmlContent ValidationMessageFor(System.Linq.Expressions.Expression> expression, string message, object htmlAttributes, string tag) => throw null; + public string ValueFor(System.Linq.Expressions.Expression> expression, string format) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlHelperOptions + { + public Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode CheckBoxHiddenInputRenderMode { get => throw null; set => throw null; } + public bool ClientValidationEnabled { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.Rendering.Html5DateRenderingMode Html5DateRenderingMode { get => throw null; set => throw null; } + public HtmlHelperOptions() => throw null; + public string IdAttributeDotReplacement { get => throw null; set => throw null; } + public string ValidationMessageElement { get => throw null; set => throw null; } + public string ValidationSummaryMessageElement { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IAntiforgeryPolicy : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata + { + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IFileVersionProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFileVersionProvider + { + string AddFileVersionToPath(Microsoft.AspNetCore.Http.PathString requestPathBase, string path); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHtmlGenerator + { + string Encode(string value); + string Encode(object value); + string FormatValue(object value, string format); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateActionLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string actionName, string controllerName, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent GenerateAntiforgery(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateCheckBox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool? isChecked, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string actionName, string controllerName, object routeValues, string method, object htmlAttributes); + Microsoft.AspNetCore.Html.IHtmlContent GenerateGroupsAndOptions(string optionLabel, System.Collections.Generic.IEnumerable selectList); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateHidden(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool useViewData, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateHiddenForCheckbox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateLabel(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string labelText, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePageForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string pageName, string pageHandler, object routeValues, string fragment, string method, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePageLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string pageName, string pageHandler, string protocol, string hostname, string fragment, object routeValues, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GeneratePassword(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRadioButton(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, bool? isChecked, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteForm(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string routeName, object routeValues, string method, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateSelect(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string optionLabel, string expression, System.Collections.Generic.IEnumerable selectList, bool allowMultiple, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateSelect(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string optionLabel, string expression, System.Collections.Generic.IEnumerable selectList, System.Collections.Generic.ICollection currentValues, bool allowMultiple, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateTextArea(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, int rows, int columns, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateTextBox(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, object value, string format, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateValidationMessage(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string message, string tag, object htmlAttributes); + Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateValidationSummary(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, bool excludePropertyErrors, string message, string headerTag, object htmlAttributes); + System.Collections.Generic.ICollection GetCurrentValues(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, bool allowMultiple); + string IdAttributeDotReplacement { get; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IModelExpressionProvider + { + Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression CreateModelExpression(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.Linq.Expressions.Expression> expression); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITempDataDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void Keep(string key); + void Keep(); + void Load(); + object Peek(string key); + void Save(); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITempDataDictionaryFactory + { + Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary GetTempData(Microsoft.AspNetCore.Http.HttpContext context); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITempDataProvider + { + System.Collections.Generic.IDictionary LoadTempData(Microsoft.AspNetCore.Http.HttpContext context); + void SaveTempData(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IDictionary values); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewContextAware + { + void Contextualize(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.InputType` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum InputType + { + CheckBox, + Hidden, + // Stub generator skipped constructor + Password, + Radio, + Text, + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelExplorer + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer Container { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForExpression(System.Type modelType, object model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForExpression(System.Type modelType, System.Func modelAccessor) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForExpression(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForExpression(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, System.Func modelAccessor) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForModel(object model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty(string name, object model) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty(string name, System.Func modelAccessor) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty(string name) => throw null; + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; } + public object Model { get => throw null; } + public ModelExplorer(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer container, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object model) => throw null; + public ModelExplorer(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer container, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, System.Func modelAccessor) => throw null; + public ModelExplorer(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object model) => throw null; + public System.Type ModelType { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorerExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelExplorerExtensions + { + public static string GetSimpleDisplayText(this Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelExpression + { + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata Metadata { get => throw null; } + public object Model { get => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer ModelExplorer { get => throw null; } + public ModelExpression(string name, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer) => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpressionProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ModelExpressionProvider : Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression CreateModelExpression(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, string expression) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression CreateModelExpression(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.Linq.Expressions.Expression> expression) => throw null; + public string GetExpressionText(System.Linq.Expressions.Expression> expression) => throw null; + public ModelExpressionProvider(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelMetadataProviderExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ModelMetadataProviderExtensions + { + public static Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetModelExplorerForType(this Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, System.Type modelType, object model) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PartialViewResultExecutor : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.PartialViewResult result) => throw null; + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.PartialViewResult viewResult) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.PartialViewResult viewResult) => throw null; + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + public PartialViewResultExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) : base(default(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory), default(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine), default(System.Diagnostics.DiagnosticListener)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.SaveTempDataAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SaveTempDataAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory + { + public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; + public bool IsReusable { get => throw null; } + public int Order { get => throw null; set => throw null; } + public SaveTempDataAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.SessionStateTempDataProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SessionStateTempDataProvider : Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider + { + public virtual System.Collections.Generic.IDictionary LoadTempData(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public virtual void SaveTempData(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IDictionary values) => throw null; + public SessionStateTempDataProvider(Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.TempDataSerializer tempDataSerializer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringHtmlContent : Microsoft.AspNetCore.Html.IHtmlContent + { + public StringHtmlContent(string input) => throw null; + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionary` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TempDataDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection>, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary + { + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void Add(string key, object value) => throw null; + public void Clear() => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public bool ContainsKey(string key) => throw null; + public bool ContainsValue(object value) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + public object this[string key] { get => throw null; set => throw null; } + public void Keep(string key) => throw null; + public void Keep() => throw null; + public System.Collections.Generic.ICollection Keys { get => throw null; } + public void Load() => throw null; + public object Peek(string key) => throw null; + public bool Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void Save() => throw null; + public TempDataDictionary(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider provider) => throw null; + public bool TryGetValue(string key, out object value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.TempDataDictionaryFactory` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TempDataDictionaryFactory : Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory + { + public Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary GetTempData(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public TempDataDictionaryFactory(Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataProvider provider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.TemplateInfo` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplateInfo + { + public bool AddVisited(object value) => throw null; + public object FormattedModelValue { get => throw null; set => throw null; } + public string GetFullHtmlFieldName(string partialFieldName) => throw null; + public string HtmlFieldPrefix { get => throw null; set => throw null; } + public int TemplateDepth { get => throw null; } + public TemplateInfo(Microsoft.AspNetCore.Mvc.ViewFeatures.TemplateInfo original) => throw null; + public TemplateInfo() => throw null; + public bool Visited(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.TryGetValueDelegate` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate bool TryGetValueDelegate(object dictionary, string key, out object value); + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.TryGetValueProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class TryGetValueProvider + { + public static Microsoft.AspNetCore.Mvc.ViewFeatures.TryGetValueDelegate CreateInstance(System.Type targetType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ValidationHtmlAttributeProvider + { + public virtual void AddAndTrackValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IDictionary attributes) => throw null; + public abstract void AddValidationAttributes(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, System.Collections.Generic.IDictionary attributes); + protected ValidationHtmlAttributeProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewComponentResultExecutor` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewComponentResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ViewComponentResult result) => throw null; + public ViewComponentResultExecutor(Microsoft.Extensions.Options.IOptions mvcHelperOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataDictionaryFactory, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory) => throw null; + public ViewComponentResultExecutor(Microsoft.Extensions.Options.IOptions mvcHelperOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataDictionaryFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewContextAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewContextAttribute : System.Attribute + { + public ViewContextAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(string key, object value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public string Eval(string expression, string format) => throw null; + public object Eval(string expression) => throw null; + public static string FormatValue(object value, string format) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo GetViewDataInfo(string expression) => throw null; + public bool IsReadOnly { get => throw null; } + public object this[string index] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public object Model { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer ModelExplorer { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata ModelMetadata { get => throw null; } + public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } + public bool Remove(string key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + protected virtual void SetModel(object value) => throw null; + public Microsoft.AspNetCore.Mvc.ViewFeatures.TemplateInfo TemplateInfo { get => throw null; } + public bool TryGetValue(string key, out object value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source) => throw null; + public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; + protected ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model, System.Type declaredModelType) => throw null; + protected ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, System.Type declaredModelType) => throw null; + protected ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, System.Type declaredModelType) => throw null; + protected ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState, System.Type declaredModelType) => throw null; + internal ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<>` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataDictionary : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary + { + public TModel Model { get => throw null; set => throw null; } + public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + internal ViewDataDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider) : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionaryAttribute` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataDictionaryAttribute : System.Attribute + { + public ViewDataDictionaryAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionaryControllerPropertyActivator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataDictionaryControllerPropertyActivator + { + public void Activate(Microsoft.AspNetCore.Mvc.ControllerContext actionContext, object controller) => throw null; + public System.Action GetActivatorDelegate(Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor actionDescriptor) => throw null; + public ViewDataDictionaryControllerPropertyActivator(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataEvaluator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ViewDataEvaluator + { + public static Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo Eval(object indexableObject, string expression) => throw null; + public static Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo Eval(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, string expression) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataInfo` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewDataInfo + { + public object Container { get => throw null; } + public System.Reflection.PropertyInfo PropertyInfo { get => throw null; } + public object Value { get => throw null; set => throw null; } + public ViewDataInfo(object container, object value) => throw null; + public ViewDataInfo(object container, System.Reflection.PropertyInfo propertyInfo, System.Func valueAccessor) => throw null; + public ViewDataInfo(object container, System.Reflection.PropertyInfo propertyInfo) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewExecutor + { + public static string DefaultContentType; + protected System.Diagnostics.DiagnosticListener DiagnosticListener { get => throw null; } + public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string contentType, int? statusCode) => throw null; + protected System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string contentType, int? statusCode) => throw null; + protected Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider ModelMetadataProvider { get => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory TempDataFactory { get => throw null; } + protected Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine ViewEngine { get => throw null; } + public ViewExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) => throw null; + protected ViewExecutor(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, System.Diagnostics.DiagnosticListener diagnosticListener) => throw null; + protected Microsoft.AspNetCore.Mvc.MvcViewOptions ViewOptions { get => throw null; } + protected Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory WriterFactory { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ViewResultExecutor : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor + { + public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ViewResult result) => throw null; + public virtual Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewResult viewResult) => throw null; + protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } + public ViewResultExecutor(Microsoft.Extensions.Options.IOptions viewOptions, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory, Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataFactory, System.Diagnostics.DiagnosticListener diagnosticListener, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider) : base(default(Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory), default(Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine), default(System.Diagnostics.DiagnosticListener)) => throw null; + } + + namespace Buffers + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.IViewBufferScope` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IViewBufferScope + { + System.IO.TextWriter CreateWriter(System.IO.TextWriter writer); + Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.ViewBufferValue[] GetPage(int pageSize); + void ReturnSegment(Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.ViewBufferValue[] segment); + } + + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.Buffers.ViewBufferValue` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct ViewBufferValue + { + public object Value { get => throw null; } + public ViewBufferValue(string value) => throw null; + public ViewBufferValue(Microsoft.AspNetCore.Html.IHtmlContent content) => throw null; + // Stub generator skipped constructor + } + + } + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.TempDataSerializer` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TempDataSerializer + { + public virtual bool CanSerializeType(System.Type type) => throw null; + public abstract System.Collections.Generic.IDictionary Deserialize(System.Byte[] unprotectedData); + public abstract System.Byte[] Serialize(System.Collections.Generic.IDictionary values); + protected TempDataSerializer() => throw null; + } + + } + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcViewFeaturesMvcBuilderExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcViewFeaturesMvcBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddCookieTempDataProvider(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddCookieTempDataProvider(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddSessionStateTempDataProvider(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewComponentsAsServices(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddViewOptions(this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, System.Action setupAction) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.MvcViewFeaturesMvcCoreBuilderExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcViewFeaturesMvcCoreBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCookieTempDataProvider(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddCookieTempDataProvider(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViews(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddViews(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder ConfigureViews(this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, System.Action setupAction) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs new file mode 100644 index 000000000000..737d5255b104 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs @@ -0,0 +1,24 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions` in `Microsoft.AspNetCore.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MvcServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllers(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllers(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllersWithViews(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddControllersWithViews(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvc(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddMvc(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddRazorPages(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddRazorPages(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs new file mode 100644 index 000000000000..d4ac0f0661d8 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs @@ -0,0 +1,134 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Razor + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Razor.Hosting.IRazorSourceChecksumMetadata` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRazorSourceChecksumMetadata + { + string Checksum { get; } + string ChecksumAlgorithm { get; } + string Identifier { get; } + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RazorCompiledItem + { + public abstract string Identifier { get; } + public abstract string Kind { get; } + public abstract System.Collections.Generic.IReadOnlyList Metadata { get; } + protected RazorCompiledItem() => throw null; + public abstract System.Type Type { get; } + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorCompiledItemAttribute : System.Attribute + { + public string Identifier { get => throw null; } + public string Kind { get => throw null; } + public RazorCompiledItemAttribute(System.Type type, string kind, string identifier) => throw null; + public System.Type Type { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemExtensions` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RazorCompiledItemExtensions + { + public static System.Collections.Generic.IReadOnlyList GetChecksumMetadata(this Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem item) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemLoader` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorCompiledItemLoader + { + protected virtual Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItem CreateItem(Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute attribute) => throw null; + protected System.Collections.Generic.IEnumerable LoadAttributes(System.Reflection.Assembly assembly) => throw null; + public virtual System.Collections.Generic.IReadOnlyList LoadItems(System.Reflection.Assembly assembly) => throw null; + public RazorCompiledItemLoader() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorCompiledItemMetadataAttribute : System.Attribute + { + public string Key { get => throw null; } + public RazorCompiledItemMetadataAttribute(string key, string value) => throw null; + public string Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorConfigurationNameAttribute : System.Attribute + { + public string ConfigurationName { get => throw null; } + public RazorConfigurationNameAttribute(string configurationName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorExtensionAssemblyNameAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorExtensionAssemblyNameAttribute : System.Attribute + { + public string AssemblyName { get => throw null; } + public string ExtensionName { get => throw null; } + public RazorExtensionAssemblyNameAttribute(string extensionName, string assemblyName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorLanguageVersionAttribute : System.Attribute + { + public string LanguageVersion { get => throw null; } + public RazorLanguageVersionAttribute(string languageVersion) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RazorSourceChecksumAttribute : System.Attribute, Microsoft.AspNetCore.Razor.Hosting.IRazorSourceChecksumMetadata + { + public string Checksum { get => throw null; } + public string ChecksumAlgorithm { get => throw null; } + public string Identifier { get => throw null; } + public RazorSourceChecksumAttribute(string checksumAlgorithm, string checksum, string identifier) => throw null; + } + + } + namespace Runtime + { + namespace TagHelpers + { + // Generated from `Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperExecutionContext + { + public void Add(Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper tagHelper) => throw null; + public void AddHtmlAttribute(string name, object value, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle valueStyle) => throw null; + public void AddHtmlAttribute(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public void AddTagHelperAttribute(string name, object value, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle valueStyle) => throw null; + public void AddTagHelperAttribute(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public bool ChildContentRetrieved { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext Context { get => throw null; } + public System.Collections.Generic.IDictionary Items { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput Output { get => throw null; set => throw null; } + public void Reinitialize(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagMode tagMode, System.Collections.Generic.IDictionary items, string uniqueId, System.Func executeChildContentAsync) => throw null; + public System.Threading.Tasks.Task SetOutputContentAsync() => throw null; + public TagHelperExecutionContext(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagMode tagMode, System.Collections.Generic.IDictionary items, string uniqueId, System.Func executeChildContentAsync, System.Action startTagHelperWritingScope, System.Func endTagHelperWritingScope) => throw null; + public System.Collections.Generic.IList TagHelpers { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperRunner + { + public System.Threading.Tasks.Task RunAsync(Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext executionContext) => throw null; + public TagHelperRunner() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager` in `Microsoft.AspNetCore.Razor.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperScopeManager + { + public Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext Begin(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagMode tagMode, string uniqueId, System.Func executeChildContentAsync) => throw null; + public Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext End() => throw null; + public TagHelperScopeManager(System.Action startTagHelperWritingScope, System.Func endTagHelperWritingScope) => throw null; + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs new file mode 100644 index 000000000000..08c4bca21382 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs @@ -0,0 +1,261 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Razor + { + namespace TagHelpers + { + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.DefaultTagHelperContent` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultTagHelperContent : Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent + { + public override Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent Append(string unencoded) => throw null; + public override Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendHtml(string encoded) => throw null; + public override Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent htmlContent) => throw null; + public override Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent Clear() => throw null; + public override void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public DefaultTagHelperContent() => throw null; + public override string GetContent(System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + public override string GetContent() => throw null; + public override bool IsEmptyOrWhiteSpace { get => throw null; } + public override bool IsModified { get => throw null; } + public override void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public override void Reinitialize() => throw null; + public override void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlAttributeNameAttribute : System.Attribute + { + public string DictionaryAttributePrefix { get => throw null; set => throw null; } + public bool DictionaryAttributePrefixSet { get => throw null; } + public HtmlAttributeNameAttribute(string name) => throw null; + public HtmlAttributeNameAttribute() => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNotBoundAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlAttributeNotBoundAttribute : System.Attribute + { + public HtmlAttributeNotBoundAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HtmlAttributeValueStyle + { + DoubleQuotes, + // Stub generator skipped constructor + Minimized, + NoQuotes, + SingleQuotes, + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlTargetElementAttribute : System.Attribute + { + public string Attributes { get => throw null; set => throw null; } + public const string ElementCatchAllTarget = default; + public HtmlTargetElementAttribute(string tag) => throw null; + public HtmlTargetElementAttribute() => throw null; + public string ParentTag { get => throw null; set => throw null; } + public string Tag { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagStructure TagStructure { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent + { + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITagHelperComponent + { + void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context); + int Order { get; } + System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output); + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.NullHtmlEncoder` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullHtmlEncoder : System.Text.Encodings.Web.HtmlEncoder + { + public static Microsoft.AspNetCore.Razor.TagHelpers.NullHtmlEncoder Default { get => throw null; } + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) => throw null; + public override void Encode(System.IO.TextWriter output, System.Char[] value, int startIndex, int characterCount) => throw null; + public override string Encode(string value) => throw null; + unsafe public override int FindFirstCharacterToEncode(System.Char* text, int textLength) => throw null; + public override int MaxOutputCharactersPerInputCharacter { get => throw null; } + unsafe public override bool TryEncodeUnicodeScalar(int unicodeScalar, System.Char* buffer, int bufferLength, out int numberOfCharactersWritten) => throw null; + public override bool WillEncode(int unicodeScalar) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.OutputElementHintAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OutputElementHintAttribute : System.Attribute + { + public string OutputElement { get => throw null; } + public OutputElementHintAttribute(string outputElement) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.ReadOnlyTagHelperAttributeList` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ReadOnlyTagHelperAttributeList : System.Collections.ObjectModel.ReadOnlyCollection + { + public bool ContainsName(string name) => throw null; + public int IndexOfName(string name) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute this[string name] { get => throw null; } + protected static bool NameEquals(string name, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public ReadOnlyTagHelperAttributeList(System.Collections.Generic.IList attributes) : base(default(System.Collections.Generic.IList)) => throw null; + protected ReadOnlyTagHelperAttributeList() : base(default(System.Collections.Generic.IList)) => throw null; + public bool TryGetAttribute(string name, out Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public bool TryGetAttributes(string name, out System.Collections.Generic.IReadOnlyList attributes) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.RestrictChildrenAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RestrictChildrenAttribute : System.Attribute + { + public System.Collections.Generic.IEnumerable ChildTags { get => throw null; } + public RestrictChildrenAttribute(string childTag, params string[] childTags) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelper` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TagHelper : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent, Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper + { + public virtual void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public virtual int Order { get => throw null; } + public virtual void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public virtual System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + protected TagHelper() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperAttribute : Microsoft.AspNetCore.Html.IHtmlContentContainer, Microsoft.AspNetCore.Html.IHtmlContent + { + public void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute other) => throw null; + public override int GetHashCode() => throw null; + public void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public string Name { get => throw null; } + public TagHelperAttribute(string name, object value, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle valueStyle) => throw null; + public TagHelperAttribute(string name, object value) => throw null; + public TagHelperAttribute(string name) => throw null; + public object Value { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle ValueStyle { get => throw null; } + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttributeList` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperAttributeList : Microsoft.AspNetCore.Razor.TagHelpers.ReadOnlyTagHelperAttributeList, System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(string name, object value) => throw null; + public void Add(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public void Clear() => throw null; + public void Insert(int index, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute this[int index] { get => throw null; set => throw null; } + public bool Remove(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public bool RemoveAll(string name) => throw null; + public void RemoveAt(int index) => throw null; + public void SetAttribute(string name, object value) => throw null; + public void SetAttribute(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; + public TagHelperAttributeList(System.Collections.Generic.List attributes) => throw null; + public TagHelperAttributeList(System.Collections.Generic.IEnumerable attributes) => throw null; + public TagHelperAttributeList() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperComponent` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TagHelperComponent : Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent + { + public virtual void Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context) => throw null; + public virtual int Order { get => throw null; } + public virtual void Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + public virtual System.Threading.Tasks.Task ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output) => throw null; + protected TagHelperComponent() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TagHelperContent : Microsoft.AspNetCore.Html.IHtmlContentContainer, Microsoft.AspNetCore.Html.IHtmlContentBuilder, Microsoft.AspNetCore.Html.IHtmlContent + { + public abstract Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent Append(string unencoded); + Microsoft.AspNetCore.Html.IHtmlContentBuilder Microsoft.AspNetCore.Html.IHtmlContentBuilder.Append(string unencoded) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendFormat(string format, params object[] args) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendFormat(System.IFormatProvider provider, string format, params object[] args) => throw null; + public abstract Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendHtml(string encoded); + public abstract Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent htmlContent); + Microsoft.AspNetCore.Html.IHtmlContentBuilder Microsoft.AspNetCore.Html.IHtmlContentBuilder.AppendHtml(string encoded) => throw null; + Microsoft.AspNetCore.Html.IHtmlContentBuilder Microsoft.AspNetCore.Html.IHtmlContentBuilder.AppendHtml(Microsoft.AspNetCore.Html.IHtmlContent content) => throw null; + public abstract Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent Clear(); + Microsoft.AspNetCore.Html.IHtmlContentBuilder Microsoft.AspNetCore.Html.IHtmlContentBuilder.Clear() => throw null; + public abstract void CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination); + public abstract string GetContent(System.Text.Encodings.Web.HtmlEncoder encoder); + public abstract string GetContent(); + public abstract bool IsEmptyOrWhiteSpace { get; } + public abstract bool IsModified { get; } + public abstract void MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination); + public abstract void Reinitialize(); + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent SetContent(string unencoded) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent SetHtmlContent(string encoded) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent SetHtmlContent(Microsoft.AspNetCore.Html.IHtmlContent htmlContent) => throw null; + protected TagHelperContent() => throw null; + public abstract void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder); + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperContext + { + public Microsoft.AspNetCore.Razor.TagHelpers.ReadOnlyTagHelperAttributeList AllAttributes { get => throw null; } + public System.Collections.Generic.IDictionary Items { get => throw null; } + public void Reinitialize(string tagName, System.Collections.Generic.IDictionary items, string uniqueId) => throw null; + public void Reinitialize(System.Collections.Generic.IDictionary items, string uniqueId) => throw null; + public TagHelperContext(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttributeList allAttributes, System.Collections.Generic.IDictionary items, string uniqueId) => throw null; + public TagHelperContext(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttributeList allAttributes, System.Collections.Generic.IDictionary items, string uniqueId) => throw null; + public string TagName { get => throw null; } + public string UniqueId { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TagHelperOutput : Microsoft.AspNetCore.Html.IHtmlContentContainer, Microsoft.AspNetCore.Html.IHtmlContent + { + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttributeList Attributes { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent Content { get => throw null; set => throw null; } + void Microsoft.AspNetCore.Html.IHtmlContentContainer.CopyTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public System.Threading.Tasks.Task GetChildContentAsync(bool useCachedResult, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + public System.Threading.Tasks.Task GetChildContentAsync(bool useCachedResult) => throw null; + public System.Threading.Tasks.Task GetChildContentAsync(System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + public System.Threading.Tasks.Task GetChildContentAsync() => throw null; + public bool IsContentModified { get => throw null; } + void Microsoft.AspNetCore.Html.IHtmlContentContainer.MoveTo(Microsoft.AspNetCore.Html.IHtmlContentBuilder destination) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent PostContent { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent PostElement { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent PreContent { get => throw null; } + public Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContent PreElement { get => throw null; } + public void Reinitialize(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagMode tagMode) => throw null; + public void SuppressOutput() => throw null; + public TagHelperOutput(string tagName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttributeList attributes, System.Func> getChildContentAsync) => throw null; + public Microsoft.AspNetCore.Razor.TagHelpers.TagMode TagMode { get => throw null; set => throw null; } + public string TagName { get => throw null; set => throw null; } + public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagMode` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum TagMode + { + SelfClosing, + StartTagAndEndTag, + StartTagOnly, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagStructure` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum TagStructure + { + NormalOrSelfClosing, + // Stub generator skipped constructor + Unspecified, + WithoutEndTag, + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs new file mode 100644 index 000000000000..83d74dff2dba --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs @@ -0,0 +1,17 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace ResponseCaching + { + // Generated from `Microsoft.AspNetCore.ResponseCaching.IResponseCachingFeature` in `Microsoft.AspNetCore.ResponseCaching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResponseCachingFeature + { + string[] VaryByQueryKeys { get; set; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs new file mode 100644 index 000000000000..b3d91677326f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs @@ -0,0 +1,56 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ResponseCachingExtensions` in `Microsoft.AspNetCore.ResponseCaching, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseCachingExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseResponseCaching(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + } + namespace ResponseCaching + { + // Generated from `Microsoft.AspNetCore.ResponseCaching.ResponseCachingFeature` in `Microsoft.AspNetCore.ResponseCaching, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCachingFeature : Microsoft.AspNetCore.ResponseCaching.IResponseCachingFeature + { + public ResponseCachingFeature() => throw null; + public string[] VaryByQueryKeys { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCaching.ResponseCachingMiddleware` in `Microsoft.AspNetCore.ResponseCaching, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCachingMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public ResponseCachingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.ObjectPool.ObjectPoolProvider poolProvider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.ResponseCaching.ResponseCachingOptions` in `Microsoft.AspNetCore.ResponseCaching, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCachingOptions + { + public System.Int64 MaximumBodySize { get => throw null; set => throw null; } + public ResponseCachingOptions() => throw null; + public System.Int64 SizeLimit { get => throw null; set => throw null; } + public bool UseCaseSensitivePaths { get => throw null; set => throw null; } + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ResponseCachingServicesExtensions` in `Microsoft.AspNetCore.ResponseCaching, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseCachingServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCaching(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCaching(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs new file mode 100644 index 000000000000..620e2bce97f1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs @@ -0,0 +1,118 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.ResponseCompressionBuilderExtensions` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseCompressionBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseResponseCompression(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.ResponseCompressionServicesExtensions` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ResponseCompressionServicesExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCompression(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddResponseCompression(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + namespace ResponseCompression + { + // Generated from `Microsoft.AspNetCore.ResponseCompression.BrotliCompressionProvider` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BrotliCompressionProvider : Microsoft.AspNetCore.ResponseCompression.ICompressionProvider + { + public BrotliCompressionProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + public System.IO.Stream CreateStream(System.IO.Stream outputStream) => throw null; + public string EncodingName { get => throw null; } + public bool SupportsFlush { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.BrotliCompressionProviderOptions` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BrotliCompressionProviderOptions : Microsoft.Extensions.Options.IOptions + { + public BrotliCompressionProviderOptions() => throw null; + public System.IO.Compression.CompressionLevel Level { get => throw null; set => throw null; } + Microsoft.AspNetCore.ResponseCompression.BrotliCompressionProviderOptions Microsoft.Extensions.Options.IOptions.Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.CompressionProviderCollection` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompressionProviderCollection : System.Collections.ObjectModel.Collection + { + public void Add() where TCompressionProvider : Microsoft.AspNetCore.ResponseCompression.ICompressionProvider => throw null; + public void Add(System.Type providerType) => throw null; + public CompressionProviderCollection() => throw null; + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.GzipCompressionProvider` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class GzipCompressionProvider : Microsoft.AspNetCore.ResponseCompression.ICompressionProvider + { + public System.IO.Stream CreateStream(System.IO.Stream outputStream) => throw null; + public string EncodingName { get => throw null; } + public GzipCompressionProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + public bool SupportsFlush { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.GzipCompressionProviderOptions` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class GzipCompressionProviderOptions : Microsoft.Extensions.Options.IOptions + { + public GzipCompressionProviderOptions() => throw null; + public System.IO.Compression.CompressionLevel Level { get => throw null; set => throw null; } + Microsoft.AspNetCore.ResponseCompression.GzipCompressionProviderOptions Microsoft.Extensions.Options.IOptions.Value { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.ICompressionProvider` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICompressionProvider + { + System.IO.Stream CreateStream(System.IO.Stream outputStream); + string EncodingName { get; } + bool SupportsFlush { get; } + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.IResponseCompressionProvider` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResponseCompressionProvider + { + bool CheckRequestAcceptsCompression(Microsoft.AspNetCore.Http.HttpContext context); + Microsoft.AspNetCore.ResponseCompression.ICompressionProvider GetCompressionProvider(Microsoft.AspNetCore.Http.HttpContext context); + bool ShouldCompressResponse(Microsoft.AspNetCore.Http.HttpContext context); + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.ResponseCompressionDefaults` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCompressionDefaults + { + public static System.Collections.Generic.IEnumerable MimeTypes; + public ResponseCompressionDefaults() => throw null; + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCompressionMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public ResponseCompressionMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.ResponseCompression.IResponseCompressionProvider provider) => throw null; + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.ResponseCompressionOptions` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCompressionOptions + { + public bool EnableForHttps { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable ExcludedMimeTypes { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable MimeTypes { get => throw null; set => throw null; } + public Microsoft.AspNetCore.ResponseCompression.CompressionProviderCollection Providers { get => throw null; } + public ResponseCompressionOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.ResponseCompression.ResponseCompressionProvider` in `Microsoft.AspNetCore.ResponseCompression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResponseCompressionProvider : Microsoft.AspNetCore.ResponseCompression.IResponseCompressionProvider + { + public bool CheckRequestAcceptsCompression(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public virtual Microsoft.AspNetCore.ResponseCompression.ICompressionProvider GetCompressionProvider(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public ResponseCompressionProvider(System.IServiceProvider services, Microsoft.Extensions.Options.IOptions options) => throw null; + public virtual bool ShouldCompressResponse(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs new file mode 100644 index 000000000000..14e774ca4950 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs @@ -0,0 +1,101 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.RewriteBuilderExtensions` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RewriteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRewriter(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRewriter(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + } + namespace Rewrite + { + // Generated from `Microsoft.AspNetCore.Rewrite.ApacheModRewriteOptionsExtensions` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ApacheModRewriteOptionsExtensions + { + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddApacheModRewrite(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, System.IO.TextReader reader) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddApacheModRewrite(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, Microsoft.Extensions.FileProviders.IFileProvider fileProvider, string filePath) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Rewrite.IISUrlRewriteOptionsExtensions` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class IISUrlRewriteOptionsExtensions + { + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddIISUrlRewrite(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, System.IO.TextReader reader, bool alwaysUseManagedServerVariables = default(bool)) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddIISUrlRewrite(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, Microsoft.Extensions.FileProviders.IFileProvider fileProvider, string filePath, bool alwaysUseManagedServerVariables = default(bool)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Rewrite.IRule` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRule + { + void ApplyRule(Microsoft.AspNetCore.Rewrite.RewriteContext context); + } + + // Generated from `Microsoft.AspNetCore.Rewrite.RewriteContext` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RewriteContext + { + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; set => throw null; } + public Microsoft.Extensions.Logging.ILogger Logger { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Rewrite.RuleResult Result { get => throw null; set => throw null; } + public RewriteContext() => throw null; + public Microsoft.Extensions.FileProviders.IFileProvider StaticFileProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Rewrite.RewriteMiddleware` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RewriteMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public RewriteMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Rewrite.RewriteOptions` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RewriteOptions + { + public RewriteOptions() => throw null; + public System.Collections.Generic.IList Rules { get => throw null; } + public Microsoft.Extensions.FileProviders.IFileProvider StaticFileProvider { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Rewrite.RewriteOptionsExtensions` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RewriteOptionsExtensions + { + public static Microsoft.AspNetCore.Rewrite.RewriteOptions Add(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, System.Action applyRule) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions Add(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, Microsoft.AspNetCore.Rewrite.IRule rule) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirect(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement, int statusCode) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirect(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode, int? sslPort) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttps(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToHttpsPermanent(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWwwPermanent(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToNonWwwPermanent(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, int statusCode) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWww(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWwwPermanent(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, params string[] domains) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRedirectToWwwPermanent(this Microsoft.AspNetCore.Rewrite.RewriteOptions options) => throw null; + public static Microsoft.AspNetCore.Rewrite.RewriteOptions AddRewrite(this Microsoft.AspNetCore.Rewrite.RewriteOptions options, string regex, string replacement, bool skipRemainingRules) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Rewrite.RuleResult` in `Microsoft.AspNetCore.Rewrite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RuleResult + { + ContinueRules, + EndResponse, + // Stub generator skipped constructor + SkipRemainingRules, + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs new file mode 100644 index 000000000000..f2a826065453 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs @@ -0,0 +1,132 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Routing.IOutboundParameterTransformer` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOutboundParameterTransformer : Microsoft.AspNetCore.Routing.IParameterPolicy + { + string TransformOutbound(object value); + } + + // Generated from `Microsoft.AspNetCore.Routing.IParameterPolicy` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IParameterPolicy + { + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouteConstraint` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteConstraint : Microsoft.AspNetCore.Routing.IParameterPolicy + { + bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection); + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouteHandler` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteHandler + { + Microsoft.AspNetCore.Http.RequestDelegate GetRequestHandler(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData); + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouter` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouter + { + Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext context); + System.Threading.Tasks.Task RouteAsync(Microsoft.AspNetCore.Routing.RouteContext context); + } + + // Generated from `Microsoft.AspNetCore.Routing.IRoutingFeature` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRoutingFeature + { + Microsoft.AspNetCore.Routing.RouteData RouteData { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkGenerator` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class LinkGenerator + { + public abstract string GetPathByAddress(TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)); + public abstract string GetPathByAddress(Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues = default(Microsoft.AspNetCore.Routing.RouteValueDictionary), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)); + public abstract string GetUriByAddress(TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)); + public abstract string GetUriByAddress(Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues = default(Microsoft.AspNetCore.Routing.RouteValueDictionary), string scheme = default(string), Microsoft.AspNetCore.Http.HostString? host = default(Microsoft.AspNetCore.Http.HostString?), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)); + protected LinkGenerator() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkOptions` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LinkOptions + { + public bool? AppendTrailingSlash { get => throw null; set => throw null; } + public LinkOptions() => throw null; + public bool? LowercaseQueryStrings { get => throw null; set => throw null; } + public bool? LowercaseUrls { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteContext` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteContext + { + public Microsoft.AspNetCore.Http.RequestDelegate Handler { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public RouteContext(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteData` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteData + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary DataTokens { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState(Microsoft.AspNetCore.Routing.IRouter router, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens) => throw null; + public RouteData(Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + public RouteData(Microsoft.AspNetCore.Routing.RouteData other) => throw null; + public RouteData() => throw null; + // Generated from `Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct RouteDataSnapshot + { + public void Restore() => throw null; + public RouteDataSnapshot(Microsoft.AspNetCore.Routing.RouteData routeData, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens, System.Collections.Generic.IList routers, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + // Stub generator skipped constructor + } + + + public System.Collections.Generic.IList Routers { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary Values { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteDirection` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RouteDirection + { + IncomingRequest, + // Stub generator skipped constructor + UrlGeneration, + } + + // Generated from `Microsoft.AspNetCore.Routing.RoutingHttpContextExtensions` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutingHttpContextExtensions + { + public static Microsoft.AspNetCore.Routing.RouteData GetRouteData(this Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public static object GetRouteValue(this Microsoft.AspNetCore.Http.HttpContext httpContext, string key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.VirtualPathContext` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class VirtualPathContext + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary AmbientValues { get => throw null; } + public Microsoft.AspNetCore.Http.HttpContext HttpContext { get => throw null; } + public string RouteName { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary Values { get => throw null; set => throw null; } + public VirtualPathContext(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues, Microsoft.AspNetCore.Routing.RouteValueDictionary values, string routeName) => throw null; + public VirtualPathContext(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.VirtualPathData` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class VirtualPathData + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary DataTokens { get => throw null; } + public Microsoft.AspNetCore.Routing.IRouter Router { get => throw null; set => throw null; } + public string VirtualPath { get => throw null; set => throw null; } + public VirtualPathData(Microsoft.AspNetCore.Routing.IRouter router, string virtualPath, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens) => throw null; + public VirtualPathData(Microsoft.AspNetCore.Routing.IRouter router, string virtualPath) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs new file mode 100644 index 000000000000..6334032f5314 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs @@ -0,0 +1,1111 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder Map(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapDelete(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapMethods(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Collections.Generic.IEnumerable httpMethods, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPost(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapPut(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EndpointRoutingApplicationBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseEndpoints(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRouting(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.FallbackEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class FallbackEndpointRouteBuilderExtensions + { + public static string DefaultPattern; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallback(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.MapRouteRouteBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MapRouteRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults, object constraints, object dataTokens) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults, object constraints) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RouterMiddleware` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouterMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + public RouterMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.Routing.IRouter router) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RoutingBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutingBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRouter(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, System.Action action) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseRouter(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, Microsoft.AspNetCore.Routing.IRouter router) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.RoutingEndpointConventionBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutingEndpointConventionBuilderExtensions + { + public static TBuilder RequireHost(this TBuilder builder, params string[] hosts) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder WithDisplayName(this TBuilder builder, string displayName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder WithDisplayName(this TBuilder builder, System.Func func) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + public static TBuilder WithMetadata(this TBuilder builder, params object[] items) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder => throw null; + } + + } + namespace Routing + { + // Generated from `Microsoft.AspNetCore.Routing.CompositeEndpointDataSource` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeEndpointDataSource : Microsoft.AspNetCore.Routing.EndpointDataSource + { + public CompositeEndpointDataSource(System.Collections.Generic.IEnumerable endpointDataSources) => throw null; + public System.Collections.Generic.IEnumerable DataSources { get => throw null; } + public override System.Collections.Generic.IReadOnlyList Endpoints { get => throw null; } + public override Microsoft.Extensions.Primitives.IChangeToken GetChangeToken() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.DataTokensMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataTokensMetadata : Microsoft.AspNetCore.Routing.IDataTokensMetadata + { + public System.Collections.Generic.IReadOnlyDictionary DataTokens { get => throw null; } + public DataTokensMetadata(System.Collections.Generic.IReadOnlyDictionary dataTokens) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.DefaultEndpointDataSource` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultEndpointDataSource : Microsoft.AspNetCore.Routing.EndpointDataSource + { + public DefaultEndpointDataSource(params Microsoft.AspNetCore.Http.Endpoint[] endpoints) => throw null; + public DefaultEndpointDataSource(System.Collections.Generic.IEnumerable endpoints) => throw null; + public override System.Collections.Generic.IReadOnlyList Endpoints { get => throw null; } + public override Microsoft.Extensions.Primitives.IChangeToken GetChangeToken() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.DefaultInlineConstraintResolver` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultInlineConstraintResolver : Microsoft.AspNetCore.Routing.IInlineConstraintResolver + { + public DefaultInlineConstraintResolver(Microsoft.Extensions.Options.IOptions routeOptions, System.IServiceProvider serviceProvider) => throw null; + public virtual Microsoft.AspNetCore.Routing.IRouteConstraint ResolveConstraint(string inlineConstraint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.EndpointDataSource` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class EndpointDataSource + { + protected EndpointDataSource() => throw null; + public abstract System.Collections.Generic.IReadOnlyList Endpoints { get; } + public abstract Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); + } + + // Generated from `Microsoft.AspNetCore.Routing.EndpointNameMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EndpointNameMetadata : Microsoft.AspNetCore.Routing.IEndpointNameMetadata + { + public string EndpointName { get => throw null; } + public EndpointNameMetadata(string endpointName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.HostAttribute` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostAttribute : System.Attribute, Microsoft.AspNetCore.Routing.IHostMetadata + { + public HostAttribute(string host) => throw null; + public HostAttribute(params string[] hosts) => throw null; + public System.Collections.Generic.IReadOnlyList Hosts { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.HttpMethodMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodMetadata : Microsoft.AspNetCore.Routing.IHttpMethodMetadata + { + public bool AcceptCorsPreflight { get => throw null; } + public HttpMethodMetadata(System.Collections.Generic.IEnumerable httpMethods, bool acceptCorsPreflight) => throw null; + public HttpMethodMetadata(System.Collections.Generic.IEnumerable httpMethods) => throw null; + public System.Collections.Generic.IReadOnlyList HttpMethods { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IDataTokensMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDataTokensMetadata + { + System.Collections.Generic.IReadOnlyDictionary DataTokens { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IDynamicEndpointMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDynamicEndpointMetadata + { + bool IsDynamic { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IEndpointAddressScheme<>` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointAddressScheme + { + System.Collections.Generic.IEnumerable FindEndpoints(TAddress address); + } + + // Generated from `Microsoft.AspNetCore.Routing.IEndpointNameMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointNameMetadata + { + string EndpointName { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IEndpointRouteBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointRouteBuilder + { + Microsoft.AspNetCore.Builder.IApplicationBuilder CreateApplicationBuilder(); + System.Collections.Generic.ICollection DataSources { get; } + System.IServiceProvider ServiceProvider { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IHostMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostMetadata + { + System.Collections.Generic.IReadOnlyList Hosts { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IHttpMethodMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMethodMetadata + { + bool AcceptCorsPreflight { get; } + System.Collections.Generic.IReadOnlyList HttpMethods { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IInlineConstraintResolver` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IInlineConstraintResolver + { + Microsoft.AspNetCore.Routing.IRouteConstraint ResolveConstraint(string inlineConstraint); + } + + // Generated from `Microsoft.AspNetCore.Routing.INamedRouter` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface INamedRouter : Microsoft.AspNetCore.Routing.IRouter + { + string Name { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouteBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteBuilder + { + Microsoft.AspNetCore.Builder.IApplicationBuilder ApplicationBuilder { get; } + Microsoft.AspNetCore.Routing.IRouter Build(); + Microsoft.AspNetCore.Routing.IRouter DefaultHandler { get; set; } + System.Collections.Generic.IList Routes { get; } + System.IServiceProvider ServiceProvider { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouteCollection` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteCollection : Microsoft.AspNetCore.Routing.IRouter + { + void Add(Microsoft.AspNetCore.Routing.IRouter router); + } + + // Generated from `Microsoft.AspNetCore.Routing.IRouteNameMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRouteNameMetadata + { + string RouteName { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.ISuppressLinkGenerationMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISuppressLinkGenerationMetadata + { + bool SuppressLinkGeneration { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.ISuppressMatchingMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISuppressMatchingMetadata + { + bool SuppressMatching { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.InlineRouteParameterParser` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class InlineRouteParameterParser + { + public static Microsoft.AspNetCore.Routing.Template.TemplatePart ParseRouteParameter(string routeParameter) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkGeneratorEndpointNameAddressExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LinkGeneratorEndpointNameAddressExtensions + { + public static string GetPathByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, object values, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetPathByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object values, Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, object values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object values, string scheme = default(string), Microsoft.AspNetCore.Http.HostString? host = default(Microsoft.AspNetCore.Http.HostString?), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkGeneratorRouteValuesAddressExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LinkGeneratorRouteValuesAddressExtensions + { + public static string GetPathByRouteValues(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string routeName, object values, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetPathByRouteValues(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string routeName, object values, Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByRouteValues(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string routeName, object values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = default(Microsoft.AspNetCore.Http.PathString), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + public static string GetUriByRouteValues(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string routeName, object values, string scheme = default(string), Microsoft.AspNetCore.Http.HostString? host = default(Microsoft.AspNetCore.Http.HostString?), Microsoft.AspNetCore.Http.PathString? pathBase = default(Microsoft.AspNetCore.Http.PathString?), Microsoft.AspNetCore.Http.FragmentString fragment = default(Microsoft.AspNetCore.Http.FragmentString), Microsoft.AspNetCore.Routing.LinkOptions options = default(Microsoft.AspNetCore.Routing.LinkOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkParser` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class LinkParser + { + protected LinkParser() => throw null; + public abstract Microsoft.AspNetCore.Routing.RouteValueDictionary ParsePathByAddress(TAddress address, Microsoft.AspNetCore.Http.PathString path); + } + + // Generated from `Microsoft.AspNetCore.Routing.LinkParserEndpointNameAddressExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LinkParserEndpointNameAddressExtensions + { + public static Microsoft.AspNetCore.Routing.RouteValueDictionary ParsePathByEndpointName(this Microsoft.AspNetCore.Routing.LinkParser parser, string endpointName, Microsoft.AspNetCore.Http.PathString path) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.MatcherPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class MatcherPolicy + { + protected static bool ContainsDynamicEndpoints(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + protected MatcherPolicy() => throw null; + public abstract int Order { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.ParameterPolicyFactory` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ParameterPolicyFactory + { + public abstract Microsoft.AspNetCore.Routing.IParameterPolicy Create(Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart parameter, string inlineText); + public abstract Microsoft.AspNetCore.Routing.IParameterPolicy Create(Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart parameter, Microsoft.AspNetCore.Routing.IParameterPolicy parameterPolicy); + public Microsoft.AspNetCore.Routing.IParameterPolicy Create(Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart parameter, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference reference) => throw null; + protected ParameterPolicyFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RequestDelegateRouteBuilderExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RequestDelegateRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapDelete(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapDelete(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapGet(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapGet(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareDelete(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareGet(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewarePost(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewarePut(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareVerb(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, System.Action action) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapPost(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapPost(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapPut(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapPut(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapVerb(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, System.Func handler) => throw null; + public static Microsoft.AspNetCore.Routing.IRouteBuilder MapVerb(this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string verb, string template, Microsoft.AspNetCore.Http.RequestDelegate handler) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Route` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Route : Microsoft.AspNetCore.Routing.RouteBase + { + protected override System.Threading.Tasks.Task OnRouteMatched(Microsoft.AspNetCore.Routing.RouteContext context) => throw null; + protected override Microsoft.AspNetCore.Routing.VirtualPathData OnVirtualPathGenerated(Microsoft.AspNetCore.Routing.VirtualPathContext context) => throw null; + public Route(Microsoft.AspNetCore.Routing.IRouter target, string routeTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults, System.Collections.Generic.IDictionary constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens, Microsoft.AspNetCore.Routing.IInlineConstraintResolver inlineConstraintResolver) : base(default(string), default(string), default(Microsoft.AspNetCore.Routing.IInlineConstraintResolver), default(Microsoft.AspNetCore.Routing.RouteValueDictionary), default(System.Collections.Generic.IDictionary), default(Microsoft.AspNetCore.Routing.RouteValueDictionary)) => throw null; + public Route(Microsoft.AspNetCore.Routing.IRouter target, string routeTemplate, Microsoft.AspNetCore.Routing.IInlineConstraintResolver inlineConstraintResolver) : base(default(string), default(string), default(Microsoft.AspNetCore.Routing.IInlineConstraintResolver), default(Microsoft.AspNetCore.Routing.RouteValueDictionary), default(System.Collections.Generic.IDictionary), default(Microsoft.AspNetCore.Routing.RouteValueDictionary)) => throw null; + public Route(Microsoft.AspNetCore.Routing.IRouter target, string routeName, string routeTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults, System.Collections.Generic.IDictionary constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens, Microsoft.AspNetCore.Routing.IInlineConstraintResolver inlineConstraintResolver) : base(default(string), default(string), default(Microsoft.AspNetCore.Routing.IInlineConstraintResolver), default(Microsoft.AspNetCore.Routing.RouteValueDictionary), default(System.Collections.Generic.IDictionary), default(Microsoft.AspNetCore.Routing.RouteValueDictionary)) => throw null; + public string RouteTemplate { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteBase` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RouteBase : Microsoft.AspNetCore.Routing.IRouter, Microsoft.AspNetCore.Routing.INamedRouter + { + protected virtual Microsoft.AspNetCore.Routing.IInlineConstraintResolver ConstraintResolver { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IDictionary Constraints { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Routing.RouteValueDictionary DataTokens { get => throw null; set => throw null; } + public virtual Microsoft.AspNetCore.Routing.RouteValueDictionary Defaults { get => throw null; set => throw null; } + protected static System.Collections.Generic.IDictionary GetConstraints(Microsoft.AspNetCore.Routing.IInlineConstraintResolver inlineConstraintResolver, Microsoft.AspNetCore.Routing.Template.RouteTemplate parsedTemplate, System.Collections.Generic.IDictionary constraints) => throw null; + protected static Microsoft.AspNetCore.Routing.RouteValueDictionary GetDefaults(Microsoft.AspNetCore.Routing.Template.RouteTemplate parsedTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults) => throw null; + public virtual Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext context) => throw null; + public virtual string Name { get => throw null; set => throw null; } + protected abstract System.Threading.Tasks.Task OnRouteMatched(Microsoft.AspNetCore.Routing.RouteContext context); + protected abstract Microsoft.AspNetCore.Routing.VirtualPathData OnVirtualPathGenerated(Microsoft.AspNetCore.Routing.VirtualPathContext context); + public virtual Microsoft.AspNetCore.Routing.Template.RouteTemplate ParsedTemplate { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task RouteAsync(Microsoft.AspNetCore.Routing.RouteContext context) => throw null; + public RouteBase(string template, string name, Microsoft.AspNetCore.Routing.IInlineConstraintResolver constraintResolver, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults, System.Collections.Generic.IDictionary constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteBuilder : Microsoft.AspNetCore.Routing.IRouteBuilder + { + public Microsoft.AspNetCore.Builder.IApplicationBuilder ApplicationBuilder { get => throw null; } + public Microsoft.AspNetCore.Routing.IRouter Build() => throw null; + public Microsoft.AspNetCore.Routing.IRouter DefaultHandler { get => throw null; set => throw null; } + public RouteBuilder(Microsoft.AspNetCore.Builder.IApplicationBuilder applicationBuilder, Microsoft.AspNetCore.Routing.IRouter defaultHandler) => throw null; + public RouteBuilder(Microsoft.AspNetCore.Builder.IApplicationBuilder applicationBuilder) => throw null; + public System.Collections.Generic.IList Routes { get => throw null; } + public System.IServiceProvider ServiceProvider { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteCollection` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteCollection : Microsoft.AspNetCore.Routing.IRouter, Microsoft.AspNetCore.Routing.IRouteCollection + { + public void Add(Microsoft.AspNetCore.Routing.IRouter router) => throw null; + public int Count { get => throw null; } + public virtual Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext context) => throw null; + public Microsoft.AspNetCore.Routing.IRouter this[int index] { get => throw null; } + public virtual System.Threading.Tasks.Task RouteAsync(Microsoft.AspNetCore.Routing.RouteContext context) => throw null; + public RouteCollection() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteConstraintBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteConstraintBuilder + { + public void AddConstraint(string key, object value) => throw null; + public void AddResolvedConstraint(string key, string constraintText) => throw null; + public System.Collections.Generic.IDictionary Build() => throw null; + public RouteConstraintBuilder(Microsoft.AspNetCore.Routing.IInlineConstraintResolver inlineConstraintResolver, string displayName) => throw null; + public void SetOptional(string key) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteConstraintMatcher` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RouteConstraintMatcher + { + public static bool Match(System.Collections.Generic.IDictionary constraints, Microsoft.AspNetCore.Routing.RouteValueDictionary routeValues, Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, Microsoft.AspNetCore.Routing.RouteDirection routeDirection, Microsoft.Extensions.Logging.ILogger logger) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteCreationException` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteCreationException : System.Exception + { + public RouteCreationException(string message, System.Exception innerException) => throw null; + public RouteCreationException(string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteEndpoint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteEndpoint : Microsoft.AspNetCore.Http.Endpoint + { + public int Order { get => throw null; } + public RouteEndpoint(Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, Microsoft.AspNetCore.Routing.Patterns.RoutePattern routePattern, int order, Microsoft.AspNetCore.Http.EndpointMetadataCollection metadata, string displayName) : base(default(Microsoft.AspNetCore.Http.RequestDelegate), default(Microsoft.AspNetCore.Http.EndpointMetadataCollection), default(string)) => throw null; + public Microsoft.AspNetCore.Routing.Patterns.RoutePattern RoutePattern { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteEndpointBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteEndpointBuilder : Microsoft.AspNetCore.Builder.EndpointBuilder + { + public override Microsoft.AspNetCore.Http.Endpoint Build() => throw null; + public int Order { get => throw null; set => throw null; } + public RouteEndpointBuilder(Microsoft.AspNetCore.Http.RequestDelegate requestDelegate, Microsoft.AspNetCore.Routing.Patterns.RoutePattern routePattern, int order) => throw null; + public Microsoft.AspNetCore.Routing.Patterns.RoutePattern RoutePattern { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteHandler` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteHandler : Microsoft.AspNetCore.Routing.IRouter, Microsoft.AspNetCore.Routing.IRouteHandler + { + public Microsoft.AspNetCore.Http.RequestDelegate GetRequestHandler(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteData routeData) => throw null; + public Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext context) => throw null; + public System.Threading.Tasks.Task RouteAsync(Microsoft.AspNetCore.Routing.RouteContext context) => throw null; + public RouteHandler(Microsoft.AspNetCore.Http.RequestDelegate requestDelegate) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteNameMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteNameMetadata : Microsoft.AspNetCore.Routing.IRouteNameMetadata + { + public string RouteName { get => throw null; } + public RouteNameMetadata(string routeName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteOptions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteOptions + { + public bool AppendTrailingSlash { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary ConstraintMap { get => throw null; set => throw null; } + public bool LowercaseQueryStrings { get => throw null; set => throw null; } + public bool LowercaseUrls { get => throw null; set => throw null; } + public RouteOptions() => throw null; + public bool SuppressCheckForUnhandledSecurityMetadata { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteValueEqualityComparer` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValueEqualityComparer : System.Collections.Generic.IEqualityComparer + { + public static Microsoft.AspNetCore.Routing.RouteValueEqualityComparer Default; + public bool Equals(object x, object y) => throw null; + public int GetHashCode(object obj) => throw null; + public RouteValueEqualityComparer() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RouteValuesAddress` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteValuesAddress + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary AmbientValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary ExplicitValues { get => throw null; set => throw null; } + public string RouteName { get => throw null; set => throw null; } + public RouteValuesAddress() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.RoutingFeature` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutingFeature : Microsoft.AspNetCore.Routing.IRoutingFeature + { + public Microsoft.AspNetCore.Routing.RouteData RouteData { get => throw null; set => throw null; } + public RoutingFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.SuppressLinkGenerationMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SuppressLinkGenerationMetadata : Microsoft.AspNetCore.Routing.ISuppressLinkGenerationMetadata + { + public bool SuppressLinkGeneration { get => throw null; } + public SuppressLinkGenerationMetadata() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.SuppressMatchingMetadata` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SuppressMatchingMetadata : Microsoft.AspNetCore.Routing.ISuppressMatchingMetadata + { + public bool SuppressMatching { get => throw null; } + public SuppressMatchingMetadata() => throw null; + } + + namespace Constraints + { + // Generated from `Microsoft.AspNetCore.Routing.Constraints.AlphaRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AlphaRouteConstraint : Microsoft.AspNetCore.Routing.Constraints.RegexRouteConstraint + { + public AlphaRouteConstraint() : base(default(System.Text.RegularExpressions.Regex)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.BoolRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BoolRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public BoolRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.CompositeRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public CompositeRouteConstraint(System.Collections.Generic.IEnumerable constraints) => throw null; + public System.Collections.Generic.IEnumerable Constraints { get => throw null; } + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.DateTimeRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DateTimeRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public DateTimeRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.DecimalRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DecimalRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public DecimalRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.DoubleRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DoubleRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public DoubleRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.FileNameRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileNameRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public FileNameRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.FloatRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FloatRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public FloatRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.GuidRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class GuidRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public GuidRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.HttpMethodRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public System.Collections.Generic.IList AllowedMethods { get => throw null; } + public HttpMethodRouteConstraint(params string[] allowedMethods) => throw null; + public virtual bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.IntRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IntRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public IntRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.LengthRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public LengthRouteConstraint(int minLength, int maxLength) => throw null; + public LengthRouteConstraint(int length) => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public int MaxLength { get => throw null; } + public int MinLength { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.LongRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LongRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public LongRouteConstraint() => throw null; + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.MaxLengthRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MaxLengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public int MaxLength { get => throw null; } + public MaxLengthRouteConstraint(int maxLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.MaxRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MaxRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public System.Int64 Max { get => throw null; } + public MaxRouteConstraint(System.Int64 max) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.MinLengthRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MinLengthRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public int MinLength { get => throw null; } + public MinLengthRouteConstraint(int minLength) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.MinRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MinRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public System.Int64 Min { get => throw null; } + public MinRouteConstraint(System.Int64 min) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.NonFileNameRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NonFileNameRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public NonFileNameRouteConstraint() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.OptionalRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionalRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public Microsoft.AspNetCore.Routing.IRouteConstraint InnerConstraint { get => throw null; } + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public OptionalRouteConstraint(Microsoft.AspNetCore.Routing.IRouteConstraint innerConstraint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.RangeRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RangeRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public System.Int64 Max { get => throw null; } + public System.Int64 Min { get => throw null; } + public RangeRouteConstraint(System.Int64 min, System.Int64 max) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.RegexInlineRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RegexInlineRouteConstraint : Microsoft.AspNetCore.Routing.Constraints.RegexRouteConstraint + { + public RegexInlineRouteConstraint(string regexPattern) : base(default(System.Text.RegularExpressions.Regex)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.RegexRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RegexRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public System.Text.RegularExpressions.Regex Constraint { get => throw null; } + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public RegexRouteConstraint(string regexPattern) => throw null; + public RegexRouteConstraint(System.Text.RegularExpressions.Regex regex) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.RequiredRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RequiredRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public RequiredRouteConstraint() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Constraints.StringRouteConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.IParameterPolicy + { + public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; + public StringRouteConstraint(string value) => throw null; + } + + } + namespace Internal + { + // Generated from `Microsoft.AspNetCore.Routing.Internal.DfaGraphWriter` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DfaGraphWriter + { + public DfaGraphWriter(System.IServiceProvider services) => throw null; + public void Write(Microsoft.AspNetCore.Routing.EndpointDataSource dataSource, System.IO.TextWriter writer) => throw null; + } + + } + namespace Matching + { + // Generated from `Microsoft.AspNetCore.Routing.Matching.CandidateSet` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CandidateSet + { + public CandidateSet(Microsoft.AspNetCore.Http.Endpoint[] endpoints, Microsoft.AspNetCore.Routing.RouteValueDictionary[] values, int[] scores) => throw null; + public int Count { get => throw null; } + public void ExpandEndpoint(int index, System.Collections.Generic.IReadOnlyList endpoints, System.Collections.Generic.IComparer comparer) => throw null; + public bool IsValidCandidate(int index) => throw null; + public Microsoft.AspNetCore.Routing.Matching.CandidateState this[int index] { get => throw null; } + public void ReplaceEndpoint(int index, Microsoft.AspNetCore.Http.Endpoint endpoint, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + public void SetValidity(int index, bool value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.CandidateState` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct CandidateState + { + // Stub generator skipped constructor + public Microsoft.AspNetCore.Http.Endpoint Endpoint { get => throw null; } + public int Score { get => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary Values { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.EndpointMetadataComparer` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EndpointMetadataComparer : System.Collections.Generic.IComparer + { + int System.Collections.Generic.IComparer.Compare(Microsoft.AspNetCore.Http.Endpoint x, Microsoft.AspNetCore.Http.Endpoint y) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.EndpointMetadataComparer<>` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class EndpointMetadataComparer : System.Collections.Generic.IComparer where TMetadata : class + { + public int Compare(Microsoft.AspNetCore.Http.Endpoint x, Microsoft.AspNetCore.Http.Endpoint y) => throw null; + protected virtual int CompareMetadata(TMetadata x, TMetadata y) => throw null; + public static Microsoft.AspNetCore.Routing.Matching.EndpointMetadataComparer Default; + protected EndpointMetadataComparer() => throw null; + protected virtual TMetadata GetMetadata(Microsoft.AspNetCore.Http.Endpoint endpoint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.EndpointSelector` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class EndpointSelector + { + protected EndpointSelector() => throw null; + public abstract System.Threading.Tasks.Task SelectAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates); + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.HostMatcherPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostMatcherPolicy : Microsoft.AspNetCore.Routing.MatcherPolicy, Microsoft.AspNetCore.Routing.Matching.INodeBuilderPolicy, Microsoft.AspNetCore.Routing.Matching.IEndpointSelectorPolicy, Microsoft.AspNetCore.Routing.Matching.IEndpointComparerPolicy + { + bool Microsoft.AspNetCore.Routing.Matching.INodeBuilderPolicy.AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + bool Microsoft.AspNetCore.Routing.Matching.IEndpointSelectorPolicy.AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + public System.Threading.Tasks.Task ApplyAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates) => throw null; + public Microsoft.AspNetCore.Routing.Matching.PolicyJumpTable BuildJumpTable(int exitDestination, System.Collections.Generic.IReadOnlyList edges) => throw null; + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public System.Collections.Generic.IReadOnlyList GetEdges(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + public HostMatcherPolicy() => throw null; + public override int Order { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.HttpMethodMatcherPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpMethodMatcherPolicy : Microsoft.AspNetCore.Routing.MatcherPolicy, Microsoft.AspNetCore.Routing.Matching.INodeBuilderPolicy, Microsoft.AspNetCore.Routing.Matching.IEndpointSelectorPolicy, Microsoft.AspNetCore.Routing.Matching.IEndpointComparerPolicy + { + bool Microsoft.AspNetCore.Routing.Matching.INodeBuilderPolicy.AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + bool Microsoft.AspNetCore.Routing.Matching.IEndpointSelectorPolicy.AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + public System.Threading.Tasks.Task ApplyAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates) => throw null; + public Microsoft.AspNetCore.Routing.Matching.PolicyJumpTable BuildJumpTable(int exitDestination, System.Collections.Generic.IReadOnlyList edges) => throw null; + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public System.Collections.Generic.IReadOnlyList GetEdges(System.Collections.Generic.IReadOnlyList endpoints) => throw null; + public HttpMethodMatcherPolicy() => throw null; + public override int Order { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.IEndpointComparerPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointComparerPolicy + { + System.Collections.Generic.IComparer Comparer { get; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.IEndpointSelectorPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IEndpointSelectorPolicy + { + bool AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints); + System.Threading.Tasks.Task ApplyAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.Matching.CandidateSet candidates); + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.INodeBuilderPolicy` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface INodeBuilderPolicy + { + bool AppliesToEndpoints(System.Collections.Generic.IReadOnlyList endpoints); + Microsoft.AspNetCore.Routing.Matching.PolicyJumpTable BuildJumpTable(int exitDestination, System.Collections.Generic.IReadOnlyList edges); + System.Collections.Generic.IReadOnlyList GetEdges(System.Collections.Generic.IReadOnlyList endpoints); + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.PolicyJumpTable` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PolicyJumpTable + { + public abstract int GetDestination(Microsoft.AspNetCore.Http.HttpContext httpContext); + protected PolicyJumpTable() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.PolicyJumpTableEdge` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PolicyJumpTableEdge + { + public int Destination { get => throw null; } + public PolicyJumpTableEdge(object state, int destination) => throw null; + // Stub generator skipped constructor + public object State { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Matching.PolicyNodeEdge` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PolicyNodeEdge + { + public System.Collections.Generic.IReadOnlyList Endpoints { get => throw null; } + public PolicyNodeEdge(object state, System.Collections.Generic.IReadOnlyList endpoints) => throw null; + // Stub generator skipped constructor + public object State { get => throw null; } + } + + } + namespace Patterns + { + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePattern` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePattern + { + public System.Collections.Generic.IReadOnlyDictionary Defaults { get => throw null; } + public Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart GetParameter(string name) => throw null; + public System.Decimal InboundPrecedence { get => throw null; } + public System.Decimal OutboundPrecedence { get => throw null; } + public System.Collections.Generic.IReadOnlyDictionary> ParameterPolicies { get => throw null; } + public System.Collections.Generic.IReadOnlyList Parameters { get => throw null; } + public System.Collections.Generic.IReadOnlyList PathSegments { get => throw null; } + public string RawText { get => throw null; } + public static object RequiredValueAny; + public System.Collections.Generic.IReadOnlyDictionary RequiredValues { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternException` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternException : System.Exception + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string Pattern { get => throw null; } + public RoutePatternException(string pattern, string message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternFactory` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutePatternFactory + { + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint(string constraint) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint(object constraint) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference Constraint(Microsoft.AspNetCore.Routing.IRouteConstraint constraint) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternLiteralPart LiteralPart(string content) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart ParameterPart(string parameterName, object @default, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind parameterKind, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference[] parameterPolicies) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart ParameterPart(string parameterName, object @default, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind parameterKind, System.Collections.Generic.IEnumerable parameterPolicies) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart ParameterPart(string parameterName, object @default, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind parameterKind) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart ParameterPart(string parameterName, object @default) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart ParameterPart(string parameterName) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference ParameterPolicy(string parameterPolicy) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference ParameterPolicy(Microsoft.AspNetCore.Routing.IParameterPolicy parameterPolicy) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Parse(string pattern, object defaults, object parameterPolicies, object requiredValues) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Parse(string pattern, object defaults, object parameterPolicies) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Parse(string pattern) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(string rawText, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment[] segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(string rawText, object defaults, object parameterPolicies, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment[] segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(string rawText, object defaults, object parameterPolicies, System.Collections.Generic.IEnumerable segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(string rawText, System.Collections.Generic.IEnumerable segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment[] segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(object defaults, object parameterPolicies, params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment[] segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(object defaults, object parameterPolicies, System.Collections.Generic.IEnumerable segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePattern Pattern(System.Collections.Generic.IEnumerable segments) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment Segment(params Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart[] parts) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment Segment(System.Collections.Generic.IEnumerable parts) => throw null; + public static Microsoft.AspNetCore.Routing.Patterns.RoutePatternSeparatorPart SeparatorPart(string content) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternLiteralPart` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternLiteralPart : Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart + { + public string Content { get => throw null; } + internal RoutePatternLiteralPart(string content) : base(default(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RoutePatternParameterKind + { + CatchAll, + Optional, + // Stub generator skipped constructor + Standard, + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPart` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternParameterPart : Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart + { + public object Default { get => throw null; } + public bool EncodeSlashes { get => throw null; } + public bool IsCatchAll { get => throw null; } + public bool IsOptional { get => throw null; } + public string Name { get => throw null; } + public Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind ParameterKind { get => throw null; } + public System.Collections.Generic.IReadOnlyList ParameterPolicies { get => throw null; } + internal RoutePatternParameterPart(string parameterName, object @default, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind parameterKind, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference[] parameterPolicies, bool encodeSlashes) : base(default(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind)) => throw null; + internal RoutePatternParameterPart(string parameterName, object @default, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterKind parameterKind, Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference[] parameterPolicies) : base(default(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternParameterPolicyReference + { + public string Content { get => throw null; } + public Microsoft.AspNetCore.Routing.IParameterPolicy ParameterPolicy { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RoutePatternPart + { + public bool IsLiteral { get => throw null; } + public bool IsParameter { get => throw null; } + public bool IsSeparator { get => throw null; } + public Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind PartKind { get => throw null; } + protected private RoutePatternPart(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind partKind) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RoutePatternPartKind + { + Literal, + Parameter, + // Stub generator skipped constructor + Separator, + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternPathSegment + { + public bool IsSimple { get => throw null; } + public System.Collections.Generic.IReadOnlyList Parts { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternSeparatorPart` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoutePatternSeparatorPart : Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart + { + public string Content { get => throw null; } + internal RoutePatternSeparatorPart(string content) : base(default(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPartKind)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Patterns.RoutePatternTransformer` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RoutePatternTransformer + { + protected RoutePatternTransformer() => throw null; + public abstract Microsoft.AspNetCore.Routing.Patterns.RoutePattern SubstituteRequiredValues(Microsoft.AspNetCore.Routing.Patterns.RoutePattern original, object requiredValues); + } + + } + namespace Template + { + // Generated from `Microsoft.AspNetCore.Routing.Template.InlineConstraint` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InlineConstraint + { + public string Constraint { get => throw null; } + public InlineConstraint(string constraint) => throw null; + public InlineConstraint(Microsoft.AspNetCore.Routing.Patterns.RoutePatternParameterPolicyReference other) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.RoutePrecedence` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutePrecedence + { + public static System.Decimal ComputeInbound(Microsoft.AspNetCore.Routing.Template.RouteTemplate template) => throw null; + public static System.Decimal ComputeOutbound(Microsoft.AspNetCore.Routing.Template.RouteTemplate template) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.RouteTemplate` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RouteTemplate + { + public Microsoft.AspNetCore.Routing.Template.TemplatePart GetParameter(string name) => throw null; + public Microsoft.AspNetCore.Routing.Template.TemplateSegment GetSegment(int index) => throw null; + public System.Collections.Generic.IList Parameters { get => throw null; } + public RouteTemplate(string template, System.Collections.Generic.List segments) => throw null; + public RouteTemplate(Microsoft.AspNetCore.Routing.Patterns.RoutePattern other) => throw null; + public System.Collections.Generic.IList Segments { get => throw null; } + public string TemplateText { get => throw null; } + public Microsoft.AspNetCore.Routing.Patterns.RoutePattern ToRoutePattern() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateBinder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplateBinder + { + public string BindValues(Microsoft.AspNetCore.Routing.RouteValueDictionary acceptedValues) => throw null; + public Microsoft.AspNetCore.Routing.Template.TemplateValuesResult GetValues(Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + public static bool RoutePartsEqual(object a, object b) => throw null; + public bool TryProcessConstraints(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary combinedValues, out string parameterName, out Microsoft.AspNetCore.Routing.IRouteConstraint constraint) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateBinderFactory` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TemplateBinderFactory + { + public abstract Microsoft.AspNetCore.Routing.Template.TemplateBinder Create(Microsoft.AspNetCore.Routing.Template.RouteTemplate template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults); + public abstract Microsoft.AspNetCore.Routing.Template.TemplateBinder Create(Microsoft.AspNetCore.Routing.Patterns.RoutePattern pattern); + protected TemplateBinderFactory() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateMatcher` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplateMatcher + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary Defaults { get => throw null; } + public Microsoft.AspNetCore.Routing.Template.RouteTemplate Template { get => throw null; } + public TemplateMatcher(Microsoft.AspNetCore.Routing.Template.RouteTemplate template, Microsoft.AspNetCore.Routing.RouteValueDictionary defaults) => throw null; + public bool TryMatch(Microsoft.AspNetCore.Http.PathString path, Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateParser` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class TemplateParser + { + public static Microsoft.AspNetCore.Routing.Template.RouteTemplate Parse(string routeTemplate) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplatePart` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplatePart + { + public static Microsoft.AspNetCore.Routing.Template.TemplatePart CreateLiteral(string text) => throw null; + public static Microsoft.AspNetCore.Routing.Template.TemplatePart CreateParameter(string name, bool isCatchAll, bool isOptional, object defaultValue, System.Collections.Generic.IEnumerable inlineConstraints) => throw null; + public object DefaultValue { get => throw null; } + public System.Collections.Generic.IEnumerable InlineConstraints { get => throw null; } + public bool IsCatchAll { get => throw null; } + public bool IsLiteral { get => throw null; } + public bool IsOptional { get => throw null; } + public bool IsOptionalSeperator { get => throw null; set => throw null; } + public bool IsParameter { get => throw null; } + public string Name { get => throw null; } + public TemplatePart(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart other) => throw null; + public TemplatePart() => throw null; + public string Text { get => throw null; } + public Microsoft.AspNetCore.Routing.Patterns.RoutePatternPart ToRoutePatternPart() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateSegment` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplateSegment + { + public bool IsSimple { get => throw null; } + public System.Collections.Generic.List Parts { get => throw null; } + public TemplateSegment(Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment other) => throw null; + public TemplateSegment() => throw null; + public Microsoft.AspNetCore.Routing.Patterns.RoutePatternPathSegment ToRoutePatternPathSegment() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Template.TemplateValuesResult` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TemplateValuesResult + { + public Microsoft.AspNetCore.Routing.RouteValueDictionary AcceptedValues { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary CombinedValues { get => throw null; set => throw null; } + public TemplateValuesResult() => throw null; + } + + } + namespace Tree + { + // Generated from `Microsoft.AspNetCore.Routing.Tree.InboundMatch` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InboundMatch + { + public Microsoft.AspNetCore.Routing.Tree.InboundRouteEntry Entry { get => throw null; set => throw null; } + public InboundMatch() => throw null; + public Microsoft.AspNetCore.Routing.Template.TemplateMatcher TemplateMatcher { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.InboundRouteEntry` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InboundRouteEntry + { + public System.Collections.Generic.IDictionary Constraints { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary Defaults { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.IRouter Handler { get => throw null; set => throw null; } + public InboundRouteEntry() => throw null; + public int Order { get => throw null; set => throw null; } + public System.Decimal Precedence { get => throw null; set => throw null; } + public string RouteName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.Template.RouteTemplate RouteTemplate { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.OutboundMatch` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OutboundMatch + { + public Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry Entry { get => throw null; set => throw null; } + public OutboundMatch() => throw null; + public Microsoft.AspNetCore.Routing.Template.TemplateBinder TemplateBinder { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OutboundRouteEntry + { + public System.Collections.Generic.IDictionary Constraints { get => throw null; set => throw null; } + public object Data { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary Defaults { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.IRouter Handler { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public OutboundRouteEntry() => throw null; + public System.Decimal Precedence { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.RouteValueDictionary RequiredLinkValues { get => throw null; set => throw null; } + public string RouteName { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.Template.RouteTemplate RouteTemplate { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.TreeRouteBuilder` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TreeRouteBuilder + { + public Microsoft.AspNetCore.Routing.Tree.TreeRouter Build(int version) => throw null; + public Microsoft.AspNetCore.Routing.Tree.TreeRouter Build() => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IList InboundEntries { get => throw null; } + public Microsoft.AspNetCore.Routing.Tree.InboundRouteEntry MapInbound(Microsoft.AspNetCore.Routing.IRouter handler, Microsoft.AspNetCore.Routing.Template.RouteTemplate routeTemplate, string routeName, int order) => throw null; + public Microsoft.AspNetCore.Routing.Tree.OutboundRouteEntry MapOutbound(Microsoft.AspNetCore.Routing.IRouter handler, Microsoft.AspNetCore.Routing.Template.RouteTemplate routeTemplate, Microsoft.AspNetCore.Routing.RouteValueDictionary requiredLinkValues, string routeName, int order) => throw null; + public System.Collections.Generic.IList OutboundEntries { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.TreeRouter` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TreeRouter : Microsoft.AspNetCore.Routing.IRouter + { + public Microsoft.AspNetCore.Routing.VirtualPathData GetVirtualPath(Microsoft.AspNetCore.Routing.VirtualPathContext context) => throw null; + public System.Threading.Tasks.Task RouteAsync(Microsoft.AspNetCore.Routing.RouteContext context) => throw null; + public static string RouteGroupKey; + public int Version { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlMatchingNode + { + public Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode CatchAlls { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode ConstrainedCatchAlls { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode ConstrainedParameters { get => throw null; set => throw null; } + public int Depth { get => throw null; } + public bool IsCatchAll { get => throw null; set => throw null; } + public System.Collections.Generic.Dictionary Literals { get => throw null; } + public System.Collections.Generic.List Matches { get => throw null; } + public Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode Parameters { get => throw null; set => throw null; } + public UrlMatchingNode(int length) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Routing.Tree.UrlMatchingTree` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlMatchingTree + { + public int Order { get => throw null; } + public Microsoft.AspNetCore.Routing.Tree.UrlMatchingNode Root { get => throw null; } + public UrlMatchingTree(int order) => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.RoutingServiceCollectionExtensions` in `Microsoft.AspNetCore.Routing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class RoutingServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRouting(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRouting(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs new file mode 100644 index 000000000000..bd29b98713e1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs @@ -0,0 +1,176 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderHttpSysExtensions` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostBuilderHttpSysExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseHttpSys(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action options) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseHttpSys(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) => throw null; + } + + } + namespace Server + { + namespace HttpSys + { + // Generated from `Microsoft.AspNetCore.Server.HttpSys.AuthenticationManager` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticationManager + { + public bool AllowAnonymous { get => throw null; set => throw null; } + public string AuthenticationDisplayName { get => throw null; set => throw null; } + public bool AutomaticAuthentication { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.AuthenticationSchemes Schemes { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.AuthenticationSchemes` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum AuthenticationSchemes + { + // Stub generator skipped constructor + Basic, + Kerberos, + NTLM, + Negotiate, + None, + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.ClientCertificateMethod` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ClientCertificateMethod + { + AllowCertificate, + AllowRenegotation, + // Stub generator skipped constructor + NoCertificate, + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.DelegationRule` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DelegationRule : System.IDisposable + { + public void Dispose() => throw null; + public string QueueName { get => throw null; } + public string UrlPrefix { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.Http503VerbosityLevel` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum Http503VerbosityLevel + { + Basic, + Full, + // Stub generator skipped constructor + Limited, + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.HttpSysDefaults` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpSysDefaults + { + public const string AuthenticationScheme = default; + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.HttpSysException` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpSysException : System.ComponentModel.Win32Exception + { + public override int ErrorCode { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.HttpSysOptions` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpSysOptions + { + public bool AllowSynchronousIO { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.AuthenticationManager Authentication { get => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.ClientCertificateMethod ClientCertificateMethod { get => throw null; set => throw null; } + public bool EnableResponseCaching { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.Http503VerbosityLevel Http503Verbosity { get => throw null; set => throw null; } + public HttpSysOptions() => throw null; + public int MaxAccepts { get => throw null; set => throw null; } + public System.Int64? MaxConnections { get => throw null; set => throw null; } + public System.Int64? MaxRequestBodySize { get => throw null; set => throw null; } + public System.Int64 RequestQueueLimit { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.RequestQueueMode RequestQueueMode { get => throw null; set => throw null; } + public string RequestQueueName { get => throw null; set => throw null; } + public bool ThrowWriteExceptions { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.TimeoutManager Timeouts { get => throw null; } + public Microsoft.AspNetCore.Server.HttpSys.UrlPrefixCollection UrlPrefixes { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.IHttpSysRequestDelegationFeature` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpSysRequestDelegationFeature + { + bool CanDelegate { get; } + void DelegateRequest(Microsoft.AspNetCore.Server.HttpSys.DelegationRule destination); + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.IHttpSysRequestInfoFeature` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpSysRequestInfoFeature + { + System.Collections.Generic.IReadOnlyDictionary> RequestInfo { get; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.IServerDelegationFeature` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServerDelegationFeature + { + Microsoft.AspNetCore.Server.HttpSys.DelegationRule CreateDelegationRule(string queueName, string urlPrefix); + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.RequestQueueMode` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum RequestQueueMode + { + Attach, + Create, + CreateOrAttach, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.TimeoutManager` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TimeoutManager + { + public System.TimeSpan DrainEntityBody { get => throw null; set => throw null; } + public System.TimeSpan EntityBody { get => throw null; set => throw null; } + public System.TimeSpan HeaderWait { get => throw null; set => throw null; } + public System.TimeSpan IdleConnection { get => throw null; set => throw null; } + public System.Int64 MinSendBytesPerSecond { get => throw null; set => throw null; } + public System.TimeSpan RequestQueue { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.UrlPrefix` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlPrefix + { + public static Microsoft.AspNetCore.Server.HttpSys.UrlPrefix Create(string scheme, string host, string port, string path) => throw null; + public static Microsoft.AspNetCore.Server.HttpSys.UrlPrefix Create(string scheme, string host, int? portValue, string path) => throw null; + public static Microsoft.AspNetCore.Server.HttpSys.UrlPrefix Create(string prefix) => throw null; + public override bool Equals(object obj) => throw null; + public string FullPrefix { get => throw null; } + public override int GetHashCode() => throw null; + public string Host { get => throw null; } + public bool IsHttps { get => throw null; } + public string Path { get => throw null; } + public string Port { get => throw null; } + public int PortValue { get => throw null; } + public string Scheme { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.HttpSys.UrlPrefixCollection` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlPrefixCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(string prefix) => throw null; + public void Add(Microsoft.AspNetCore.Server.HttpSys.UrlPrefix item) => throw null; + public void Clear() => throw null; + public bool Contains(Microsoft.AspNetCore.Server.HttpSys.UrlPrefix item) => throw null; + public void CopyTo(Microsoft.AspNetCore.Server.HttpSys.UrlPrefix[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public bool Remove(string prefix) => throw null; + public bool Remove(Microsoft.AspNetCore.Server.HttpSys.UrlPrefix item) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs new file mode 100644 index 000000000000..99bdfe26543f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs @@ -0,0 +1,101 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.IISServerOptions` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISServerOptions + { + public bool AllowSynchronousIO { get => throw null; set => throw null; } + public string AuthenticationDisplayName { get => throw null; set => throw null; } + public bool AutomaticAuthentication { get => throw null; set => throw null; } + public IISServerOptions() => throw null; + public System.Int64? MaxRequestBodySize { get => throw null; set => throw null; } + } + + } + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderIISExtensions` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class WebHostBuilderIISExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseIIS(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) => throw null; + } + + } + namespace Server + { + namespace IIS + { + // Generated from `Microsoft.AspNetCore.Server.IIS.BadHttpRequestException` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BadHttpRequestException : Microsoft.AspNetCore.Http.BadHttpRequestException + { + internal BadHttpRequestException(string message, int statusCode, Microsoft.AspNetCore.Server.IIS.RequestRejectionReason reason) : base(default(string)) => throw null; + public int StatusCode { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.IIS.HttpContextExtensions` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpContextExtensions + { + public static string GetIISServerVariable(this Microsoft.AspNetCore.Http.HttpContext context, string variableName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.IIS.IISServerDefaults` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISServerDefaults + { + public const string AuthenticationScheme = default; + public IISServerDefaults() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.IIS.RequestRejectionReason` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal enum RequestRejectionReason + { + } + + namespace Core + { + // Generated from `Microsoft.AspNetCore.Server.IIS.Core.IISServerAuthenticationHandler` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISServerAuthenticationHandler : Microsoft.AspNetCore.Authentication.IAuthenticationHandler + { + public System.Threading.Tasks.Task AuthenticateAsync() => throw null; + public System.Threading.Tasks.Task ChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public System.Threading.Tasks.Task ForbidAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties) => throw null; + public IISServerAuthenticationHandler() => throw null; + public System.Threading.Tasks.Task InitializeAsync(Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.IIS.Core.ThrowingWasUpgradedWriteOnlyStream` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ThrowingWasUpgradedWriteOnlyStream : Microsoft.AspNetCore.Server.IIS.Core.WriteOnlyStream + { + public override void Flush() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public ThrowingWasUpgradedWriteOnlyStream() => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.IIS.Core.WriteOnlyStream` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class WriteOnlyStream : System.IO.Stream + { + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadTimeout { get => throw null; set => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + protected WriteOnlyStream() => throw null; + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs new file mode 100644 index 000000000000..af4a4f5dde29 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs @@ -0,0 +1,59 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.IISOptions` in `Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISOptions + { + public string AuthenticationDisplayName { get => throw null; set => throw null; } + public bool AutomaticAuthentication { get => throw null; set => throw null; } + public bool ForwardClientCertificate { get => throw null; set => throw null; } + public IISOptions() => throw null; + } + + } + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderIISExtensions` in `Microsoft.AspNetCore.Server.IIS, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class WebHostBuilderIISExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseIISIntegration(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) => throw null; + } + + } + namespace Server + { + namespace IISIntegration + { + // Generated from `Microsoft.AspNetCore.Server.IISIntegration.IISDefaults` in `Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISDefaults + { + public const string AuthenticationScheme = default; + public IISDefaults() => throw null; + public const string Negotiate = default; + public const string Ntlm = default; + } + + // Generated from `Microsoft.AspNetCore.Server.IISIntegration.IISHostingStartup` in `Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISHostingStartup : Microsoft.AspNetCore.Hosting.IHostingStartup + { + public void Configure(Microsoft.AspNetCore.Hosting.IWebHostBuilder builder) => throw null; + public IISHostingStartup() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware` in `Microsoft.AspNetCore.Server.IISIntegration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IISMiddleware + { + public IISMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options, string pairingToken, bool isWebsocketsSupported, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider authentication, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime) => throw null; + public IISMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions options, string pairingToken, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider authentication, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs new file mode 100644 index 000000000000..874d89cb6ff9 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs @@ -0,0 +1,386 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.KestrelServerOptionsSystemdExtensions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class KestrelServerOptionsSystemdExtensions + { + public static Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions UseSystemd(this Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions options, System.Action configure) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions UseSystemd(this Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.ListenOptionsConnectionLoggingExtensions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ListenOptionsConnectionLoggingExtensions + { + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseConnectionLogging(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string loggerName) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseConnectionLogging(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ListenOptionsHttpsExtensions + { + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string fileName, string password, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string fileName, string password) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, string fileName) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.X509Certificate2 serverCertificate) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid, System.Security.Cryptography.X509Certificates.StoreLocation location, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid, System.Security.Cryptography.X509Certificates.StoreLocation location) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject, bool allowInvalid) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Security.Cryptography.X509Certificates.StoreName storeName, string subject) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Net.Security.ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state, System.TimeSpan handshakeTimeout) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Net.Security.ServerOptionsSelectionCallback serverOptionsSelectionCallback, object state) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions, Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions httpsOptions) => throw null; + public static Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions UseHttps(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions listenOptions) => throw null; + } + + } + namespace Server + { + namespace Kestrel + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.EndpointConfiguration` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EndpointConfiguration + { + public Microsoft.Extensions.Configuration.IConfigurationSection ConfigSection { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions HttpsOptions { get => throw null; } + public bool IsHttps { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions ListenOptions { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KestrelConfigurationLoader + { + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader AnyIPEndpoint(int port, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader AnyIPEndpoint(int port) => throw null; + public Microsoft.Extensions.Configuration.IConfiguration Configuration { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Endpoint(string name, System.Action configureOptions) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Endpoint(System.Net.IPEndPoint endPoint, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Endpoint(System.Net.IPEndPoint endPoint) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Endpoint(System.Net.IPAddress address, int port, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Endpoint(System.Net.IPAddress address, int port) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader HandleEndpoint(System.UInt64 handle, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader HandleEndpoint(System.UInt64 handle) => throw null; + public void Load() => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader LocalhostEndpoint(int port, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader LocalhostEndpoint(int port) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions Options { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader UnixSocketEndpoint(string socketPath, System.Action configure) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader UnixSocketEndpoint(string socketPath) => throw null; + } + + namespace Core + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BadHttpRequestException : Microsoft.AspNetCore.Http.BadHttpRequestException + { + internal BadHttpRequestException(string message, int statusCode, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod? requiredMethod) : base(default(string)) => throw null; + internal BadHttpRequestException(string message, int statusCode, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason reason) : base(default(string)) => throw null; + public int StatusCode { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Http2Limits` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Http2Limits + { + public int HeaderTableSize { get => throw null; set => throw null; } + public Http2Limits() => throw null; + public int InitialConnectionWindowSize { get => throw null; set => throw null; } + public int InitialStreamWindowSize { get => throw null; set => throw null; } + public System.TimeSpan KeepAlivePingDelay { get => throw null; set => throw null; } + public System.TimeSpan KeepAlivePingTimeout { get => throw null; set => throw null; } + public int MaxFrameSize { get => throw null; set => throw null; } + public int MaxRequestHeaderFieldSize { get => throw null; set => throw null; } + public int MaxStreamsPerConnection { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Http3Limits` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Http3Limits + { + public int HeaderTableSize { get => throw null; set => throw null; } + public Http3Limits() => throw null; + public int MaxRequestHeaderFieldSize { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum HttpProtocols + { + Http1, + Http1AndHttp2, + Http1AndHttp2AndHttp3, + Http2, + Http3, + // Stub generator skipped constructor + None, + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KestrelServer : System.IDisposable, Microsoft.AspNetCore.Hosting.Server.IServer + { + public void Dispose() => throw null; + public Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get => throw null; } + public KestrelServer(Microsoft.Extensions.Options.IOptions options, Microsoft.AspNetCore.Connections.IConnectionListenerFactory transportFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions Options { get => throw null; } + public System.Threading.Tasks.Task StartAsync(Microsoft.AspNetCore.Hosting.Server.IHttpApplication application, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KestrelServerLimits + { + public Microsoft.AspNetCore.Server.Kestrel.Core.Http2Limits Http2 { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.Http3Limits Http3 { get => throw null; } + public System.TimeSpan KeepAliveTimeout { get => throw null; set => throw null; } + public KestrelServerLimits() => throw null; + public System.Int64? MaxConcurrentConnections { get => throw null; set => throw null; } + public System.Int64? MaxConcurrentUpgradedConnections { get => throw null; set => throw null; } + public System.Int64? MaxRequestBodySize { get => throw null; set => throw null; } + public System.Int64? MaxRequestBufferSize { get => throw null; set => throw null; } + public int MaxRequestHeaderCount { get => throw null; set => throw null; } + public int MaxRequestHeadersTotalSize { get => throw null; set => throw null; } + public int MaxRequestLineSize { get => throw null; set => throw null; } + public System.Int64? MaxResponseBufferSize { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinRequestBodyDataRate { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinResponseDataRate { get => throw null; set => throw null; } + public System.TimeSpan RequestHeadersTimeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KestrelServerOptions + { + public bool AddServerHeader { get => throw null; set => throw null; } + public bool AllowResponseHeaderCompression { get => throw null; set => throw null; } + public bool AllowSynchronousIO { get => throw null; set => throw null; } + public System.IServiceProvider ApplicationServices { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader ConfigurationLoader { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure(Microsoft.Extensions.Configuration.IConfiguration config, bool reloadOnChange) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure(Microsoft.Extensions.Configuration.IConfiguration config) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.KestrelConfigurationLoader Configure() => throw null; + public void ConfigureEndpointDefaults(System.Action configureOptions) => throw null; + public void ConfigureHttpsDefaults(System.Action configureOptions) => throw null; + public bool DisableStringReuse { get => throw null; set => throw null; } + public bool EnableAltSvc { get => throw null; set => throw null; } + public KestrelServerOptions() => throw null; + public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerLimits Limits { get => throw null; } + public void Listen(System.Net.IPEndPoint endPoint, System.Action configure) => throw null; + public void Listen(System.Net.IPEndPoint endPoint) => throw null; + public void Listen(System.Net.IPAddress address, int port, System.Action configure) => throw null; + public void Listen(System.Net.IPAddress address, int port) => throw null; + public void Listen(System.Net.EndPoint endPoint, System.Action configure) => throw null; + public void Listen(System.Net.EndPoint endPoint) => throw null; + public void ListenAnyIP(int port, System.Action configure) => throw null; + public void ListenAnyIP(int port) => throw null; + public void ListenHandle(System.UInt64 handle, System.Action configure) => throw null; + public void ListenHandle(System.UInt64 handle) => throw null; + public void ListenLocalhost(int port, System.Action configure) => throw null; + public void ListenLocalhost(int port) => throw null; + public void ListenUnixSocket(string socketPath, System.Action configure) => throw null; + public void ListenUnixSocket(string socketPath) => throw null; + public System.Func RequestHeaderEncodingSelector { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder + { + public System.IServiceProvider ApplicationServices { get => throw null; } + public Microsoft.AspNetCore.Connections.ConnectionDelegate Build() => throw null; + public System.Net.EndPoint EndPoint { get => throw null; set => throw null; } + public System.UInt64 FileHandle { get => throw null; } + public System.Net.IPEndPoint IPEndPoint { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions KestrelServerOptions { get => throw null; set => throw null; } + internal ListenOptions(System.Net.EndPoint endPoint) => throw null; + public Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols Protocols { get => throw null; set => throw null; } + public string SocketPath { get => throw null; } + public override string ToString() => throw null; + public Microsoft.AspNetCore.Connections.IConnectionBuilder Use(System.Func middleware) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MinDataRate + { + public double BytesPerSecond { get => throw null; } + public System.TimeSpan GracePeriod { get => throw null; } + public MinDataRate(double bytesPerSecond, System.TimeSpan gracePeriod) => throw null; + } + + namespace Features + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.IConnectionTimeoutFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConnectionTimeoutFeature + { + void CancelTimeout(); + void ResetTimeout(System.TimeSpan timeSpan); + void SetTimeout(System.TimeSpan timeSpan); + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.IDecrementConcurrentConnectionCountFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDecrementConcurrentConnectionCountFeature + { + void ReleaseConnection(); + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttp2StreamIdFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttp2StreamIdFeature + { + int StreamId { get; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinRequestBodyDataRateFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMinRequestBodyDataRateFeature + { + Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinDataRate { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.IHttpMinResponseDataRateFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMinResponseDataRateFeature + { + Microsoft.AspNetCore.Server.Kestrel.Core.MinDataRate MinDataRate { get; set; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Features.ITlsApplicationProtocolFeature` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITlsApplicationProtocolFeature + { + System.ReadOnlyMemory ApplicationProtocol { get; } + } + + } + namespace Internal + { + namespace Http + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HttpMethod + { + Connect, + Custom, + Delete, + Get, + Head, + // Stub generator skipped constructor + None, + Options, + Patch, + Post, + Put, + Trace, + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser<>` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpParser where TRequestHandler : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler + { + public HttpParser(bool showErrorDetails) => throw null; + public HttpParser() => throw null; + public bool ParseHeaders(TRequestHandler handler, ref System.Buffers.SequenceReader reader) => throw null; + public bool ParseRequestLine(TRequestHandler handler, ref System.Buffers.SequenceReader reader) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpScheme` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HttpScheme + { + Http, + // Stub generator skipped constructor + Https, + Unknown, + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HttpVersion + { + Http10, + Http11, + Http2, + Http3, + // Stub generator skipped constructor + Unknown, + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersionAndMethod` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct HttpVersionAndMethod + { + public HttpVersionAndMethod(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod method, int methodEnd) => throw null; + // Stub generator skipped constructor + public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpMethod Method { get => throw null; } + public int MethodEnd { get => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersion Version { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpHeadersHandler + { + void OnHeader(System.ReadOnlySpan name, System.ReadOnlySpan value); + void OnHeadersComplete(bool endStream); + void OnStaticIndexedHeader(int index, System.ReadOnlySpan value); + void OnStaticIndexedHeader(int index); + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser<>` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IHttpParser where TRequestHandler : Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpHeadersHandler + { + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpRequestLineHandler` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpRequestLineHandler + { + void OnStartLine(Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpVersionAndMethod versionAndMethod, Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.TargetOffsetPathLength targetPath, System.Span startLine); + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.RequestRejectionReason` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal enum RequestRejectionReason + { + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.TargetOffsetPathLength` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct TargetOffsetPathLength + { + public bool IsEncoded { get => throw null; } + public int Length { get => throw null; } + public int Offset { get => throw null; } + public TargetOffsetPathLength(int offset, int length, bool isEncoded) => throw null; + // Stub generator skipped constructor + } + + } + } + } + namespace Https + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Https.CertificateLoader` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CertificateLoader + { + public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadFromStoreCert(string subject, string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, bool allowInvalid) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Https.ClientCertificateMode` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ClientCertificateMode + { + AllowCertificate, + // Stub generator skipped constructor + NoCertificate, + RequireCertificate, + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions` in `Microsoft.AspNetCore.Server.Kestrel.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpsConnectionAdapterOptions + { + public void AllowAnyClientCertificate() => throw null; + public bool CheckCertificateRevocation { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Server.Kestrel.Https.ClientCertificateMode ClientCertificateMode { get => throw null; set => throw null; } + public System.Func ClientCertificateValidation { get => throw null; set => throw null; } + public System.TimeSpan HandshakeTimeout { get => throw null; set => throw null; } + public HttpsConnectionAdapterOptions() => throw null; + public System.Action OnAuthenticate { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate2 ServerCertificate { get => throw null; set => throw null; } + public System.Func ServerCertificateSelector { get => throw null; set => throw null; } + public System.Security.Authentication.SslProtocols SslProtocols { get => throw null; set => throw null; } + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs new file mode 100644 index 000000000000..18a8daecf9e5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs @@ -0,0 +1,50 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderSocketExtensions` in `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostBuilderSocketExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSockets(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSockets(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) => throw null; + } + + } + namespace Server + { + namespace Kestrel + { + namespace Transport + { + namespace Sockets + { + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory` in `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SocketTransportFactory : Microsoft.AspNetCore.Connections.IConnectionListenerFactory + { + public System.Threading.Tasks.ValueTask BindAsync(System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public SocketTransportFactory(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions` in `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SocketTransportOptions + { + public int Backlog { get => throw null; set => throw null; } + public int IOQueueCount { get => throw null; set => throw null; } + public System.Int64? MaxReadBufferSize { get => throw null; set => throw null; } + public System.Int64? MaxWriteBufferSize { get => throw null; set => throw null; } + public bool NoDelay { get => throw null; set => throw null; } + public SocketTransportOptions() => throw null; + public bool UnsafePreferInlineScheduling { get => throw null; set => throw null; } + public bool WaitForDataBeforeAllocatingBuffer { get => throw null; set => throw null; } + } + + } + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs new file mode 100644 index 000000000000..b1fde7a08e7d --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs @@ -0,0 +1,21 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Hosting + { + // Generated from `Microsoft.AspNetCore.Hosting.WebHostBuilderKestrelExtensions` in `Microsoft.AspNetCore.Server.Kestrel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHostBuilderKestrelExtensions + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action options) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action options) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, System.Action configureOptions) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel(this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs new file mode 100644 index 000000000000..94dc082fa4c2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs @@ -0,0 +1,92 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.SessionMiddlewareExtensions` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SessionMiddlewareExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseSession(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.SessionOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseSession(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.SessionOptions` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SessionOptions + { + public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set => throw null; } + public System.TimeSpan IOTimeout { get => throw null; set => throw null; } + public System.TimeSpan IdleTimeout { get => throw null; set => throw null; } + public SessionOptions() => throw null; + } + + } + namespace Session + { + // Generated from `Microsoft.AspNetCore.Session.DistributedSession` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedSession : Microsoft.AspNetCore.Http.ISession + { + public void Clear() => throw null; + public System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public DistributedSession(Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string sessionKey, System.TimeSpan idleTimeout, System.TimeSpan ioTimeout, System.Func tryEstablishSession, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool isNewSessionKey) => throw null; + public string Id { get => throw null; } + public bool IsAvailable { get => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + public System.Threading.Tasks.Task LoadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Remove(string key) => throw null; + public void Set(string key, System.Byte[] value) => throw null; + public bool TryGetValue(string key, out System.Byte[] value) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Session.DistributedSessionStore` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedSessionStore : Microsoft.AspNetCore.Session.ISessionStore + { + public Microsoft.AspNetCore.Http.ISession Create(string sessionKey, System.TimeSpan idleTimeout, System.TimeSpan ioTimeout, System.Func tryEstablishSession, bool isNewSessionKey) => throw null; + public DistributedSessionStore(Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Session.ISessionStore` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISessionStore + { + Microsoft.AspNetCore.Http.ISession Create(string sessionKey, System.TimeSpan idleTimeout, System.TimeSpan ioTimeout, System.Func tryEstablishSession, bool isNewSessionKey); + } + + // Generated from `Microsoft.AspNetCore.Session.SessionDefaults` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SessionDefaults + { + public static string CookieName; + public static string CookiePath; + } + + // Generated from `Microsoft.AspNetCore.Session.SessionFeature` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SessionFeature : Microsoft.AspNetCore.Http.Features.ISessionFeature + { + public Microsoft.AspNetCore.Http.ISession Session { get => throw null; set => throw null; } + public SessionFeature() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Session.SessionMiddleware` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SessionMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public SessionMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider, Microsoft.AspNetCore.Session.ISessionStore sessionStore, Microsoft.Extensions.Options.IOptions options) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.SessionServiceCollectionExtensions` in `Microsoft.AspNetCore.Session, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SessionServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSession(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs new file mode 100644 index 000000000000..ed6c71b061a5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs @@ -0,0 +1,193 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace SignalR + { + // Generated from `Microsoft.AspNetCore.SignalR.HubException` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubException : System.Exception + { + public HubException(string message, System.Exception innerException) => throw null; + public HubException(string message) => throw null; + public HubException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public HubException() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.IInvocationBinder` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IInvocationBinder + { + System.Collections.Generic.IReadOnlyList GetParameterTypes(string methodName); + System.Type GetReturnType(string invocationId); + System.Type GetStreamItemType(string streamId); + } + + // Generated from `Microsoft.AspNetCore.SignalR.ISignalRBuilder` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISignalRBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + namespace Protocol + { + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.CancelInvocationMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CancelInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage + { + public CancelInvocationMessage(string invocationId) : base(default(string)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.CloseMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CloseMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public bool AllowReconnect { get => throw null; } + public CloseMessage(string error, bool allowReconnect) => throw null; + public CloseMessage(string error) => throw null; + public static Microsoft.AspNetCore.SignalR.Protocol.CloseMessage Empty; + public string Error { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.CompletionMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompletionMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage + { + public CompletionMessage(string invocationId, string error, object result, bool hasResult) : base(default(string)) => throw null; + public static Microsoft.AspNetCore.SignalR.Protocol.CompletionMessage Empty(string invocationId) => throw null; + public string Error { get => throw null; } + public bool HasResult { get => throw null; } + public object Result { get => throw null; } + public override string ToString() => throw null; + public static Microsoft.AspNetCore.SignalR.Protocol.CompletionMessage WithError(string invocationId, string error) => throw null; + public static Microsoft.AspNetCore.SignalR.Protocol.CompletionMessage WithResult(string invocationId, object payload) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HandshakeProtocol` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HandshakeProtocol + { + public static System.ReadOnlySpan GetSuccessfulHandshake(Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol) => throw null; + public static bool TryParseRequestMessage(ref System.Buffers.ReadOnlySequence buffer, out Microsoft.AspNetCore.SignalR.Protocol.HandshakeRequestMessage requestMessage) => throw null; + public static bool TryParseResponseMessage(ref System.Buffers.ReadOnlySequence buffer, out Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage responseMessage) => throw null; + public static void WriteRequestMessage(Microsoft.AspNetCore.SignalR.Protocol.HandshakeRequestMessage requestMessage, System.Buffers.IBufferWriter output) => throw null; + public static void WriteResponseMessage(Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage responseMessage, System.Buffers.IBufferWriter output) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HandshakeRequestMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandshakeRequestMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public HandshakeRequestMessage(string protocol, int version) => throw null; + public string Protocol { get => throw null; } + public int Version { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HandshakeResponseMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public static Microsoft.AspNetCore.SignalR.Protocol.HandshakeResponseMessage Empty; + public string Error { get => throw null; } + public HandshakeResponseMessage(string error) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HubInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public System.Collections.Generic.IDictionary Headers { get => throw null; set => throw null; } + protected HubInvocationMessage(string invocationId) => throw null; + public string InvocationId { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HubMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HubMessage + { + protected HubMessage() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HubMethodInvocationMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HubMethodInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage + { + public object[] Arguments { get => throw null; } + protected HubMethodInvocationMessage(string invocationId, string target, object[] arguments, string[] streamIds) : base(default(string)) => throw null; + protected HubMethodInvocationMessage(string invocationId, string target, object[] arguments) : base(default(string)) => throw null; + public string[] StreamIds { get => throw null; } + public string Target { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HubProtocolConstants` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HubProtocolConstants + { + public const int CancelInvocationMessageType = default; + public const int CloseMessageType = default; + public const int CompletionMessageType = default; + public const int InvocationMessageType = default; + public const int PingMessageType = default; + public const int StreamInvocationMessageType = default; + public const int StreamItemMessageType = default; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.HubProtocolExtensions` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HubProtocolExtensions + { + public static System.Byte[] GetMessageBytes(this Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol hubProtocol, Microsoft.AspNetCore.SignalR.Protocol.HubMessage message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubProtocol + { + System.ReadOnlyMemory GetMessageBytes(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message); + bool IsVersionSupported(int version); + string Name { get; } + Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get; } + bool TryParseMessage(ref System.Buffers.ReadOnlySequence input, Microsoft.AspNetCore.SignalR.IInvocationBinder binder, out Microsoft.AspNetCore.SignalR.Protocol.HubMessage message); + int Version { get; } + void WriteMessage(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message, System.Buffers.IBufferWriter output); + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.InvocationBindingFailureMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InvocationBindingFailureMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage + { + public System.Runtime.ExceptionServices.ExceptionDispatchInfo BindingFailure { get => throw null; } + public InvocationBindingFailureMessage(string invocationId, string target, System.Runtime.ExceptionServices.ExceptionDispatchInfo bindingFailure) : base(default(string)) => throw null; + public string Target { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.InvocationMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMethodInvocationMessage + { + public InvocationMessage(string target, object[] arguments) : base(default(string), default(string), default(object[])) => throw null; + public InvocationMessage(string invocationId, string target, object[] arguments, string[] streamIds) : base(default(string), default(string), default(object[])) => throw null; + public InvocationMessage(string invocationId, string target, object[] arguments) : base(default(string), default(string), default(object[])) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.PingMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PingMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public static Microsoft.AspNetCore.SignalR.Protocol.PingMessage Instance; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.StreamBindingFailureMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StreamBindingFailureMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMessage + { + public System.Runtime.ExceptionServices.ExceptionDispatchInfo BindingFailure { get => throw null; } + public string Id { get => throw null; } + public StreamBindingFailureMessage(string id, System.Runtime.ExceptionServices.ExceptionDispatchInfo bindingFailure) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.StreamInvocationMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StreamInvocationMessage : Microsoft.AspNetCore.SignalR.Protocol.HubMethodInvocationMessage + { + public StreamInvocationMessage(string invocationId, string target, object[] arguments, string[] streamIds) : base(default(string), default(string), default(object[])) => throw null; + public StreamInvocationMessage(string invocationId, string target, object[] arguments) : base(default(string), default(string), default(object[])) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.StreamItemMessage` in `Microsoft.AspNetCore.SignalR.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StreamItemMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage + { + public object Item { get => throw null; } + public StreamItemMessage(string invocationId, object item) : base(default(string)) => throw null; + public override string ToString() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs new file mode 100644 index 000000000000..d2803a95fe8a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs @@ -0,0 +1,444 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace SignalR + { + // Generated from `Microsoft.AspNetCore.SignalR.ClientProxyExtensions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ClientProxyExtensions + { + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, object arg10, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, object arg9, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, object arg8, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, object arg5, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, object arg4, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, object arg3, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, object arg2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, object arg1, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this Microsoft.AspNetCore.SignalR.IClientProxy clientProxy, string method, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.DefaultHubLifetimeManager<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultHubLifetimeManager : Microsoft.AspNetCore.SignalR.HubLifetimeManager where THub : Microsoft.AspNetCore.SignalR.Hub + { + public override System.Threading.Tasks.Task AddToGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public DefaultHubLifetimeManager(Microsoft.Extensions.Logging.ILogger> logger) => throw null; + public override System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + public override System.Threading.Tasks.Task OnDisconnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + public override System.Threading.Tasks.Task RemoveFromGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendAllAsync(string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendAllExceptAsync(string methodName, object[] args, System.Collections.Generic.IReadOnlyList excludedConnectionIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendConnectionAsync(string connectionId, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendConnectionsAsync(System.Collections.Generic.IReadOnlyList connectionIds, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendGroupAsync(string groupName, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendGroupExceptAsync(string groupName, string methodName, object[] args, System.Collections.Generic.IReadOnlyList excludedConnectionIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendGroupsAsync(System.Collections.Generic.IReadOnlyList groupNames, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendUserAsync(string userId, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task SendUsersAsync(System.Collections.Generic.IReadOnlyList userIds, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.DefaultUserIdProvider` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultUserIdProvider : Microsoft.AspNetCore.SignalR.IUserIdProvider + { + public DefaultUserIdProvider() => throw null; + public virtual string GetUserId(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.DynamicHub` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class DynamicHub : Microsoft.AspNetCore.SignalR.Hub + { + public Microsoft.AspNetCore.SignalR.DynamicHubClients Clients { get => throw null; set => throw null; } + protected DynamicHub() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.DynamicHubClients` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DynamicHubClients + { + public dynamic All { get => throw null; } + public dynamic AllExcept(System.Collections.Generic.IReadOnlyList excludedConnectionIds) => throw null; + public dynamic Caller { get => throw null; } + public dynamic Client(string connectionId) => throw null; + public dynamic Clients(System.Collections.Generic.IReadOnlyList connectionIds) => throw null; + public DynamicHubClients(Microsoft.AspNetCore.SignalR.IHubCallerClients clients) => throw null; + public dynamic Group(string groupName) => throw null; + public dynamic GroupExcept(string groupName, System.Collections.Generic.IReadOnlyList excludedConnectionIds) => throw null; + public dynamic Groups(System.Collections.Generic.IReadOnlyList groupNames) => throw null; + public dynamic Others { get => throw null; } + public dynamic OthersInGroup(string groupName) => throw null; + public dynamic User(string userId) => throw null; + public dynamic Users(System.Collections.Generic.IReadOnlyList userIds) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Hub` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Hub : System.IDisposable + { + public Microsoft.AspNetCore.SignalR.IHubCallerClients Clients { get => throw null; set => throw null; } + public Microsoft.AspNetCore.SignalR.HubCallerContext Context { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Microsoft.AspNetCore.SignalR.IGroupManager Groups { get => throw null; set => throw null; } + protected Hub() => throw null; + public virtual System.Threading.Tasks.Task OnConnectedAsync() => throw null; + public virtual System.Threading.Tasks.Task OnDisconnectedAsync(System.Exception exception) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.Hub<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class Hub : Microsoft.AspNetCore.SignalR.Hub where T : class + { + public Microsoft.AspNetCore.SignalR.IHubCallerClients Clients { get => throw null; set => throw null; } + protected Hub() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubCallerContext` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HubCallerContext + { + public abstract void Abort(); + public abstract System.Threading.CancellationToken ConnectionAborted { get; } + public abstract string ConnectionId { get; } + public abstract Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get; } + protected HubCallerContext() => throw null; + public abstract System.Collections.Generic.IDictionary Items { get; } + public abstract System.Security.Claims.ClaimsPrincipal User { get; } + public abstract string UserIdentifier { get; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubClientsExtensions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HubClientsExtensions + { + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7, string excludedConnectionId8) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1, string excludedConnectionId2) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string excludedConnectionId1) => throw null; + public static T AllExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, System.Collections.Generic.IEnumerable excludedConnectionIds) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6, string connection7, string connection8) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6, string connection7) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3, string connection4, string connection5, string connection6) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3, string connection4, string connection5) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3, string connection4) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2, string connection3) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1, string connection2) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connection1) => throw null; + public static T Clients(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, System.Collections.Generic.IEnumerable connectionIds) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7, string excludedConnectionId8) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6, string excludedConnectionId7) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5, string excludedConnectionId6) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4, string excludedConnectionId5) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3, string excludedConnectionId4) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2, string excludedConnectionId3) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1, string excludedConnectionId2) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, string excludedConnectionId1) => throw null; + public static T GroupExcept(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string groupName, System.Collections.Generic.IEnumerable excludedConnectionIds) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3, string group4, string group5, string group6, string group7, string group8) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3, string group4, string group5, string group6, string group7) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3, string group4, string group5, string group6) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3, string group4, string group5) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3, string group4) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2, string group3) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1, string group2) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string group1) => throw null; + public static T Groups(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, System.Collections.Generic.IEnumerable groupNames) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3, string user4, string user5, string user6, string user7, string user8) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3, string user4, string user5, string user6, string user7) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3, string user4, string user5, string user6) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3, string user4, string user5) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3, string user4) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2, string user3) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1, string user2) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, string user1) => throw null; + public static T Users(this Microsoft.AspNetCore.SignalR.IHubClients hubClients, System.Collections.Generic.IEnumerable userIds) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionContext` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubConnectionContext + { + public virtual void Abort() => throw null; + public virtual System.Threading.CancellationToken ConnectionAborted { get => throw null; } + public virtual string ConnectionId { get => throw null; } + public virtual Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get => throw null; } + public HubConnectionContext(Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, Microsoft.AspNetCore.SignalR.HubConnectionContextOptions contextOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public virtual System.Collections.Generic.IDictionary Items { get => throw null; } + public virtual Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol Protocol { get => throw null; set => throw null; } + public virtual System.Security.Claims.ClaimsPrincipal User { get => throw null; } + public string UserIdentifier { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.ValueTask WriteAsync(Microsoft.AspNetCore.SignalR.SerializedHubMessage message, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.ValueTask WriteAsync(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionContextOptions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubConnectionContextOptions + { + public System.TimeSpan ClientTimeoutInterval { get => throw null; set => throw null; } + public HubConnectionContextOptions() => throw null; + public System.TimeSpan KeepAliveInterval { get => throw null; set => throw null; } + public int MaximumParallelInvocations { get => throw null; set => throw null; } + public System.Int64? MaximumReceiveMessageSize { get => throw null; set => throw null; } + public int StreamBufferCapacity { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionHandler<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler where THub : Microsoft.AspNetCore.SignalR.Hub + { + public HubConnectionHandler(Microsoft.AspNetCore.SignalR.HubLifetimeManager lifetimeManager, Microsoft.AspNetCore.SignalR.IHubProtocolResolver protocolResolver, Microsoft.Extensions.Options.IOptions globalHubOptions, Microsoft.Extensions.Options.IOptions> hubOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.SignalR.IUserIdProvider userIdProvider, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory) => throw null; + public override System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionStore` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubConnectionStore + { + public void Add(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + public int Count { get => throw null; } + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionStore.Enumerator` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public Microsoft.AspNetCore.SignalR.HubConnectionContext Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(Microsoft.AspNetCore.SignalR.HubConnectionStore hubConnectionList) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public Microsoft.AspNetCore.SignalR.HubConnectionStore.Enumerator GetEnumerator() => throw null; + public HubConnectionStore() => throw null; + public Microsoft.AspNetCore.SignalR.HubConnectionContext this[string connectionId] { get => throw null; } + public void Remove(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubInvocationContext` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubInvocationContext + { + public Microsoft.AspNetCore.SignalR.HubCallerContext Context { get => throw null; } + public Microsoft.AspNetCore.SignalR.Hub Hub { get => throw null; } + public HubInvocationContext(Microsoft.AspNetCore.SignalR.HubCallerContext context, string hubMethodName, object[] hubMethodArguments) => throw null; + public HubInvocationContext(Microsoft.AspNetCore.SignalR.HubCallerContext context, System.IServiceProvider serviceProvider, Microsoft.AspNetCore.SignalR.Hub hub, System.Reflection.MethodInfo hubMethod, System.Collections.Generic.IReadOnlyList hubMethodArguments) => throw null; + public System.Reflection.MethodInfo HubMethod { get => throw null; } + public System.Collections.Generic.IReadOnlyList HubMethodArguments { get => throw null; } + public string HubMethodName { get => throw null; } + public System.IServiceProvider ServiceProvider { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubLifetimeContext` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubLifetimeContext + { + public Microsoft.AspNetCore.SignalR.HubCallerContext Context { get => throw null; } + public Microsoft.AspNetCore.SignalR.Hub Hub { get => throw null; } + public HubLifetimeContext(Microsoft.AspNetCore.SignalR.HubCallerContext context, System.IServiceProvider serviceProvider, Microsoft.AspNetCore.SignalR.Hub hub) => throw null; + public System.IServiceProvider ServiceProvider { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubLifetimeManager<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HubLifetimeManager where THub : Microsoft.AspNetCore.SignalR.Hub + { + public abstract System.Threading.Tasks.Task AddToGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected HubLifetimeManager() => throw null; + public abstract System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection); + public abstract System.Threading.Tasks.Task OnDisconnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection); + public abstract System.Threading.Tasks.Task RemoveFromGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendAllAsync(string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendAllExceptAsync(string methodName, object[] args, System.Collections.Generic.IReadOnlyList excludedConnectionIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendConnectionAsync(string connectionId, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendConnectionsAsync(System.Collections.Generic.IReadOnlyList connectionIds, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendGroupAsync(string groupName, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendGroupExceptAsync(string groupName, string methodName, object[] args, System.Collections.Generic.IReadOnlyList excludedConnectionIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendGroupsAsync(System.Collections.Generic.IReadOnlyList groupNames, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendUserAsync(string userId, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task SendUsersAsync(System.Collections.Generic.IReadOnlyList userIds, string methodName, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubMetadata` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubMetadata + { + public HubMetadata(System.Type hubType) => throw null; + public System.Type HubType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubMethodNameAttribute` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubMethodNameAttribute : System.Attribute + { + public HubMethodNameAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubOptions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubOptions + { + public System.TimeSpan? ClientTimeoutInterval { get => throw null; set => throw null; } + public bool? EnableDetailedErrors { get => throw null; set => throw null; } + public System.TimeSpan? HandshakeTimeout { get => throw null; set => throw null; } + public HubOptions() => throw null; + public System.TimeSpan? KeepAliveInterval { get => throw null; set => throw null; } + public int MaximumParallelInvocationsPerClient { get => throw null; set => throw null; } + public System.Int64? MaximumReceiveMessageSize { get => throw null; set => throw null; } + public int? StreamBufferCapacity { get => throw null; set => throw null; } + public System.Collections.Generic.IList SupportedProtocols { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubOptions<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubOptions : Microsoft.AspNetCore.SignalR.HubOptions where THub : Microsoft.AspNetCore.SignalR.Hub + { + public HubOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubOptionsExtensions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HubOptionsExtensions + { + public static void AddFilter(this Microsoft.AspNetCore.SignalR.HubOptions options) where TFilter : Microsoft.AspNetCore.SignalR.IHubFilter => throw null; + public static void AddFilter(this Microsoft.AspNetCore.SignalR.HubOptions options, System.Type filterType) => throw null; + public static void AddFilter(this Microsoft.AspNetCore.SignalR.HubOptions options, Microsoft.AspNetCore.SignalR.IHubFilter hubFilter) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubOptionsSetup` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions + { + public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) => throw null; + public HubOptionsSetup(System.Collections.Generic.IEnumerable protocols) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.HubOptionsSetup<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions> where THub : Microsoft.AspNetCore.SignalR.Hub + { + public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) => throw null; + public HubOptionsSetup(Microsoft.Extensions.Options.IOptions options) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.IClientProxy` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IClientProxy + { + System.Threading.Tasks.Task SendCoreAsync(string method, object[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.SignalR.IGroupManager` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IGroupManager + { + System.Threading.Tasks.Task AddToGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RemoveFromGroupAsync(string connectionId, string groupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubActivator<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubActivator where THub : Microsoft.AspNetCore.SignalR.Hub + { + THub Create(); + void Release(THub hub); + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubCallerClients` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubCallerClients : Microsoft.AspNetCore.SignalR.IHubClients, Microsoft.AspNetCore.SignalR.IHubCallerClients + { + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubCallerClients<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubCallerClients : Microsoft.AspNetCore.SignalR.IHubClients + { + T Caller { get; } + T Others { get; } + T OthersInGroup(string groupName); + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubClients` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubClients : Microsoft.AspNetCore.SignalR.IHubClients + { + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubClients<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubClients + { + T All { get; } + T AllExcept(System.Collections.Generic.IReadOnlyList excludedConnectionIds); + T Client(string connectionId); + T Clients(System.Collections.Generic.IReadOnlyList connectionIds); + T Group(string groupName); + T GroupExcept(string groupName, System.Collections.Generic.IReadOnlyList excludedConnectionIds); + T Groups(System.Collections.Generic.IReadOnlyList groupNames); + T User(string userId); + T Users(System.Collections.Generic.IReadOnlyList userIds); + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubContext<,>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubContext where T : class where THub : Microsoft.AspNetCore.SignalR.Hub + { + Microsoft.AspNetCore.SignalR.IHubClients Clients { get; } + Microsoft.AspNetCore.SignalR.IGroupManager Groups { get; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubContext<>` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubContext where THub : Microsoft.AspNetCore.SignalR.Hub + { + Microsoft.AspNetCore.SignalR.IHubClients Clients { get; } + Microsoft.AspNetCore.SignalR.IGroupManager Groups { get; } + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubFilter` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubFilter + { + System.Threading.Tasks.ValueTask InvokeMethodAsync(Microsoft.AspNetCore.SignalR.HubInvocationContext invocationContext, System.Func> next) => throw null; + System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.SignalR.HubLifetimeContext context, System.Func next) => throw null; + System.Threading.Tasks.Task OnDisconnectedAsync(Microsoft.AspNetCore.SignalR.HubLifetimeContext context, System.Exception exception, System.Func next) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.IHubProtocolResolver` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubProtocolResolver + { + System.Collections.Generic.IReadOnlyList AllProtocols { get; } + Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol GetProtocol(string protocolName, System.Collections.Generic.IReadOnlyList supportedProtocols); + } + + // Generated from `Microsoft.AspNetCore.SignalR.ISignalRServerBuilder` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISignalRServerBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder + { + } + + // Generated from `Microsoft.AspNetCore.SignalR.IUserIdProvider` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserIdProvider + { + string GetUserId(Microsoft.AspNetCore.SignalR.HubConnectionContext connection); + } + + // Generated from `Microsoft.AspNetCore.SignalR.SerializedHubMessage` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SerializedHubMessage + { + public System.ReadOnlyMemory GetSerializedMessage(Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol) => throw null; + public Microsoft.AspNetCore.SignalR.Protocol.HubMessage Message { get => throw null; } + public SerializedHubMessage(System.Collections.Generic.IReadOnlyList messages) => throw null; + public SerializedHubMessage(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message) => throw null; + } + + // Generated from `Microsoft.AspNetCore.SignalR.SerializedMessage` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct SerializedMessage + { + public string ProtocolName { get => throw null; } + public System.ReadOnlyMemory Serialized { get => throw null; } + public SerializedMessage(string protocolName, System.ReadOnlyMemory serialized) => throw null; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.SignalR.SignalRConnectionBuilderExtensions` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class SignalRConnectionBuilderExtensions + { + public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHub(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where THub : Microsoft.AspNetCore.SignalR.Hub => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.SignalRDependencyInjectionExtensions` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class SignalRDependencyInjectionExtensions + { + public static Microsoft.AspNetCore.SignalR.ISignalRServerBuilder AddSignalRCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs new file mode 100644 index 000000000000..5960cbf8742f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs @@ -0,0 +1,48 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace SignalR + { + // Generated from `Microsoft.AspNetCore.SignalR.JsonHubProtocolOptions` in `Microsoft.AspNetCore.SignalR.Protocols.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonHubProtocolOptions + { + public JsonHubProtocolOptions() => throw null; + public System.Text.Json.JsonSerializerOptions PayloadSerializerOptions { get => throw null; set => throw null; } + } + + namespace Protocol + { + // Generated from `Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol` in `Microsoft.AspNetCore.SignalR.Protocols.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonHubProtocol : Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol + { + public System.ReadOnlyMemory GetMessageBytes(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message) => throw null; + public bool IsVersionSupported(int version) => throw null; + public JsonHubProtocol(Microsoft.Extensions.Options.IOptions options) => throw null; + public JsonHubProtocol() => throw null; + public string Name { get => throw null; } + public Microsoft.AspNetCore.Connections.TransferFormat TransferFormat { get => throw null; } + public bool TryParseMessage(ref System.Buffers.ReadOnlySequence input, Microsoft.AspNetCore.SignalR.IInvocationBinder binder, out Microsoft.AspNetCore.SignalR.Protocol.HubMessage message) => throw null; + public int Version { get => throw null; } + public void WriteMessage(Microsoft.AspNetCore.SignalR.Protocol.HubMessage message, System.Buffers.IBufferWriter output) => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.JsonProtocolDependencyInjectionExtensions` in `Microsoft.AspNetCore.SignalR.Protocols.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JsonProtocolDependencyInjectionExtensions + { + public static TBuilder AddJsonProtocol(this TBuilder builder, System.Action configure) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder => throw null; + public static TBuilder AddJsonProtocol(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs new file mode 100644 index 000000000000..e6f4630be206 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs @@ -0,0 +1,53 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.HubEndpointConventionBuilder` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HubEndpointConventionBuilder : Microsoft.AspNetCore.Builder.IHubEndpointConventionBuilder, Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + public void Add(System.Action convention) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.HubEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HubEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.HubEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, System.Action configureOptions) where THub : Microsoft.AspNetCore.SignalR.Hub => throw null; + public static Microsoft.AspNetCore.Builder.HubEndpointConventionBuilder MapHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern) where THub : Microsoft.AspNetCore.SignalR.Hub => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.IHubEndpointConventionBuilder` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHubEndpointConventionBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder + { + } + + } + namespace SignalR + { + // Generated from `Microsoft.AspNetCore.SignalR.GetHttpContextExtensions` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class GetHttpContextExtensions + { + public static Microsoft.AspNetCore.Http.HttpContext GetHttpContext(this Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; + public static Microsoft.AspNetCore.Http.HttpContext GetHttpContext(this Microsoft.AspNetCore.SignalR.HubCallerContext connection) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.SignalRDependencyInjectionExtensions` in `Microsoft.AspNetCore.SignalR, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class SignalRDependencyInjectionExtensions + { + public static Microsoft.AspNetCore.SignalR.ISignalRServerBuilder AddHubOptions(this Microsoft.AspNetCore.SignalR.ISignalRServerBuilder signalrBuilder, System.Action> configure) where THub : Microsoft.AspNetCore.SignalR.Hub => throw null; + public static Microsoft.AspNetCore.SignalR.ISignalRServerBuilder AddSignalR(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.AspNetCore.SignalR.ISignalRServerBuilder AddSignalR(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs new file mode 100644 index 000000000000..0aea51b394d4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs @@ -0,0 +1,188 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.DefaultFilesExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DefaultFilesExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DefaultFilesOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.DefaultFilesOptions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultFilesOptions : Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase + { + public System.Collections.Generic.IList DefaultFileNames { get => throw null; set => throw null; } + public DefaultFilesOptions(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions sharedOptions) : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + public DefaultFilesOptions() : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.DirectoryBrowserExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DirectoryBrowserExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDirectoryBrowser(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDirectoryBrowser(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DirectoryBrowserOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDirectoryBrowser(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.DirectoryBrowserOptions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DirectoryBrowserOptions : Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase + { + public DirectoryBrowserOptions(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions sharedOptions) : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + public DirectoryBrowserOptions() : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + public Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter Formatter { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.FileServerExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class FileServerExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseFileServer(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseFileServer(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, bool enableDirectoryBrowsing) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseFileServer(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.FileServerOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseFileServer(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.FileServerOptions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileServerOptions : Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase + { + public Microsoft.AspNetCore.Builder.DefaultFilesOptions DefaultFilesOptions { get => throw null; } + public Microsoft.AspNetCore.Builder.DirectoryBrowserOptions DirectoryBrowserOptions { get => throw null; } + public bool EnableDefaultFiles { get => throw null; set => throw null; } + public bool EnableDirectoryBrowsing { get => throw null; set => throw null; } + public FileServerOptions() : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + public Microsoft.AspNetCore.Builder.StaticFileOptions StaticFileOptions { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Builder.StaticFileExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StaticFileExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.StaticFileOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.StaticFileOptions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StaticFileOptions : Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase + { + public Microsoft.AspNetCore.StaticFiles.IContentTypeProvider ContentTypeProvider { get => throw null; set => throw null; } + public string DefaultContentType { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.Features.HttpsCompressionMode HttpsCompression { get => throw null; set => throw null; } + public System.Action OnPrepareResponse { get => throw null; set => throw null; } + public bool ServeUnknownFileTypes { get => throw null; set => throw null; } + public StaticFileOptions(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions sharedOptions) : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + public StaticFileOptions() : base(default(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.StaticFilesEndpointRouteBuilderExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StaticFilesEndpointRouteBuilderExtensions + { + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string filePath) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string filePath, Microsoft.AspNetCore.Builder.StaticFileOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToFile(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string filePath) => throw null; + } + + } + namespace StaticFiles + { + // Generated from `Microsoft.AspNetCore.StaticFiles.DefaultFilesMiddleware` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultFilesMiddleware + { + public DefaultFilesMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.DirectoryBrowserMiddleware` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DirectoryBrowserMiddleware + { + public DirectoryBrowserMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, System.Text.Encodings.Web.HtmlEncoder encoder, Microsoft.Extensions.Options.IOptions options) => throw null; + public DirectoryBrowserMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions options) => throw null; + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.FileExtensionContentTypeProvider` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileExtensionContentTypeProvider : Microsoft.AspNetCore.StaticFiles.IContentTypeProvider + { + public FileExtensionContentTypeProvider(System.Collections.Generic.IDictionary mapping) => throw null; + public FileExtensionContentTypeProvider() => throw null; + public System.Collections.Generic.IDictionary Mappings { get => throw null; } + public bool TryGetContentType(string subpath, out string contentType) => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.HtmlDirectoryFormatter` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlDirectoryFormatter : Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter + { + public virtual System.Threading.Tasks.Task GenerateContentAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IEnumerable contents) => throw null; + public HtmlDirectoryFormatter(System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.IContentTypeProvider` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IContentTypeProvider + { + bool TryGetContentType(string subpath, out string contentType); + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.IDirectoryFormatter` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDirectoryFormatter + { + System.Threading.Tasks.Task GenerateContentAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Collections.Generic.IEnumerable contents); + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StaticFileMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public StaticFileMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StaticFileResponseContext + { + public Microsoft.AspNetCore.Http.HttpContext Context { get => throw null; } + public Microsoft.Extensions.FileProviders.IFileInfo File { get => throw null; } + public StaticFileResponseContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.Extensions.FileProviders.IFileInfo file) => throw null; + public StaticFileResponseContext() => throw null; + } + + namespace Infrastructure + { + // Generated from `Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SharedOptions + { + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public bool RedirectToAppendTrailingSlash { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString RequestPath { get => throw null; set => throw null; } + public SharedOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptionsBase` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class SharedOptionsBase + { + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public bool RedirectToAppendTrailingSlash { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Http.PathString RequestPath { get => throw null; set => throw null; } + protected Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions SharedOptions { get => throw null; } + protected SharedOptionsBase(Microsoft.AspNetCore.StaticFiles.Infrastructure.SharedOptions sharedOptions) => throw null; + } + + } + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.DirectoryBrowserServiceExtensions` in `Microsoft.AspNetCore.StaticFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DirectoryBrowserServiceExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDirectoryBrowser(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs new file mode 100644 index 000000000000..227429209ab3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs @@ -0,0 +1,52 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Builder + { + // Generated from `Microsoft.AspNetCore.Builder.WebSocketMiddlewareExtensions` in `Microsoft.AspNetCore.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebSocketMiddlewareExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWebSockets(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.WebSocketOptions options) => throw null; + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseWebSockets(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Builder.WebSocketOptions` in `Microsoft.AspNetCore.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebSocketOptions + { + public System.Collections.Generic.IList AllowedOrigins { get => throw null; } + public System.TimeSpan KeepAliveInterval { get => throw null; set => throw null; } + public int ReceiveBufferSize { get => throw null; set => throw null; } + public WebSocketOptions() => throw null; + } + + } + namespace WebSockets + { + // Generated from `Microsoft.AspNetCore.WebSockets.ExtendedWebSocketAcceptContext` in `Microsoft.AspNetCore.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ExtendedWebSocketAcceptContext : Microsoft.AspNetCore.Http.WebSocketAcceptContext + { + public ExtendedWebSocketAcceptContext() => throw null; + public System.TimeSpan? KeepAliveInterval { get => throw null; set => throw null; } + public int? ReceiveBufferSize { get => throw null; set => throw null; } + public override string SubProtocol { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebSockets.WebSocketMiddleware` in `Microsoft.AspNetCore.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebSocketMiddleware + { + public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) => throw null; + public WebSocketMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebSockets.WebSocketsDependencyInjectionExtensions` in `Microsoft.AspNetCore.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebSocketsDependencyInjectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebSockets(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs new file mode 100644 index 000000000000..ed62ebb803fd --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs @@ -0,0 +1,281 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace WebUtilities + { + // Generated from `Microsoft.AspNetCore.WebUtilities.Base64UrlTextEncoder` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Base64UrlTextEncoder + { + public static System.Byte[] Decode(string text) => throw null; + public static string Encode(System.Byte[] data) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.BufferedReadStream` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BufferedReadStream : System.IO.Stream + { + public System.ArraySegment BufferedData { get => throw null; } + public BufferedReadStream(System.IO.Stream inner, int bufferSize, System.Buffers.ArrayPool bytePool) => throw null; + public BufferedReadStream(System.IO.Stream inner, int bufferSize) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanTimeout { get => throw null; } + public override bool CanWrite { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public bool EnsureBuffered(int minCount) => throw null; + public bool EnsureBuffered() => throw null; + public System.Threading.Tasks.Task EnsureBufferedAsync(int minCount, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task EnsureBufferedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public string ReadLine(int lengthLimit) => throw null; + public System.Threading.Tasks.Task ReadLineAsync(int lengthLimit, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileBufferingReadStream : System.IO.Stream + { + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public FileBufferingReadStream(System.IO.Stream inner, int memoryThreshold, System.Int64? bufferLimit, string tempFileDirectory, System.Buffers.ArrayPool bytePool) => throw null; + public FileBufferingReadStream(System.IO.Stream inner, int memoryThreshold, System.Int64? bufferLimit, string tempFileDirectory) => throw null; + public FileBufferingReadStream(System.IO.Stream inner, int memoryThreshold, System.Int64? bufferLimit, System.Func tempFileDirectoryAccessor, System.Buffers.ArrayPool bytePool) => throw null; + public FileBufferingReadStream(System.IO.Stream inner, int memoryThreshold, System.Int64? bufferLimit, System.Func tempFileDirectoryAccessor) => throw null; + public FileBufferingReadStream(System.IO.Stream inner, int memoryThreshold) => throw null; + public override void Flush() => throw null; + public bool InMemory { get => throw null; } + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public string TempFileName { get => throw null; } + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FileBufferingWriteStream` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileBufferingWriteStream : System.IO.Stream + { + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public System.Threading.Tasks.Task DrainBufferAsync(System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DrainBufferAsync(System.IO.Pipelines.PipeWriter destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public FileBufferingWriteStream(int memoryThreshold = default(int), System.Int64? bufferLimit = default(System.Int64?), System.Func tempFileDirectoryAccessor = default(System.Func)) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FileMultipartSection` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileMultipartSection + { + public FileMultipartSection(Microsoft.AspNetCore.WebUtilities.MultipartSection section, Microsoft.Net.Http.Headers.ContentDispositionHeaderValue header) => throw null; + public FileMultipartSection(Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + public string FileName { get => throw null; } + public System.IO.Stream FileStream { get => throw null; } + public string Name { get => throw null; } + public Microsoft.AspNetCore.WebUtilities.MultipartSection Section { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FormMultipartSection` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormMultipartSection + { + public FormMultipartSection(Microsoft.AspNetCore.WebUtilities.MultipartSection section, Microsoft.Net.Http.Headers.ContentDispositionHeaderValue header) => throw null; + public FormMultipartSection(Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + public System.Threading.Tasks.Task GetValueAsync() => throw null; + public string Name { get => throw null; } + public Microsoft.AspNetCore.WebUtilities.MultipartSection Section { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FormPipeReader` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormPipeReader + { + public FormPipeReader(System.IO.Pipelines.PipeReader pipeReader, System.Text.Encoding encoding) => throw null; + public FormPipeReader(System.IO.Pipelines.PipeReader pipeReader) => throw null; + public int KeyLengthLimit { get => throw null; set => throw null; } + public System.Threading.Tasks.Task> ReadFormAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public int ValueCountLimit { get => throw null; set => throw null; } + public int ValueLengthLimit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.FormReader` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FormReader : System.IDisposable + { + public const int DefaultKeyLengthLimit = default; + public const int DefaultValueCountLimit = default; + public const int DefaultValueLengthLimit = default; + public void Dispose() => throw null; + public FormReader(string data, System.Buffers.ArrayPool charPool) => throw null; + public FormReader(string data) => throw null; + public FormReader(System.IO.Stream stream, System.Text.Encoding encoding, System.Buffers.ArrayPool charPool) => throw null; + public FormReader(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public FormReader(System.IO.Stream stream) => throw null; + public int KeyLengthLimit { get => throw null; set => throw null; } + public System.Collections.Generic.Dictionary ReadForm() => throw null; + public System.Threading.Tasks.Task> ReadFormAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Collections.Generic.KeyValuePair? ReadNextPair() => throw null; + public System.Threading.Tasks.Task?> ReadNextPairAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public int ValueCountLimit { get => throw null; set => throw null; } + public int ValueLengthLimit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpRequestStreamReader : System.IO.TextReader + { + protected override void Dispose(bool disposing) => throw null; + public HttpRequestStreamReader(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize, System.Buffers.ArrayPool bytePool, System.Buffers.ArrayPool charPool) => throw null; + public HttpRequestStreamReader(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize) => throw null; + public HttpRequestStreamReader(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public override int Peek() => throw null; + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Char[] buffer, int index, int count) => throw null; + public override int Read() => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Char[] buffer, int index, int count) => throw null; + public override string ReadLine() => throw null; + public override System.Threading.Tasks.Task ReadLineAsync() => throw null; + public override System.Threading.Tasks.Task ReadToEndAsync() => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.HttpResponseStreamWriter` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpResponseStreamWriter : System.IO.TextWriter + { + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override System.Text.Encoding Encoding { get => throw null; } + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync() => throw null; + public HttpResponseStreamWriter(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize, System.Buffers.ArrayPool bytePool, System.Buffers.ArrayPool charPool) => throw null; + public HttpResponseStreamWriter(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize) => throw null; + public HttpResponseStreamWriter(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public override void Write(string value) => throw null; + public override void Write(System.ReadOnlySpan value) => throw null; + public override void Write(System.Char[] values, int index, int count) => throw null; + public override void Write(System.Char value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(string value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char[] values, int index, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char value) => throw null; + public override void WriteLine(System.ReadOnlySpan value) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.ReadOnlyMemory value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.KeyValueAccumulator` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct KeyValueAccumulator + { + public void Append(string key, string value) => throw null; + public System.Collections.Generic.Dictionary GetResults() => throw null; + public bool HasValues { get => throw null; } + public int KeyCount { get => throw null; } + // Stub generator skipped constructor + public int ValueCount { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.MultipartReader` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MultipartReader + { + public System.Int64? BodyLengthLimit { get => throw null; set => throw null; } + public const int DefaultHeadersCountLimit = default; + public const int DefaultHeadersLengthLimit = default; + public int HeadersCountLimit { get => throw null; set => throw null; } + public int HeadersLengthLimit { get => throw null; set => throw null; } + public MultipartReader(string boundary, System.IO.Stream stream, int bufferSize) => throw null; + public MultipartReader(string boundary, System.IO.Stream stream) => throw null; + public System.Threading.Tasks.Task ReadNextSectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.MultipartSection` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MultipartSection + { + public System.Int64? BaseStreamOffset { get => throw null; set => throw null; } + public System.IO.Stream Body { get => throw null; set => throw null; } + public string ContentDisposition { get => throw null; } + public string ContentType { get => throw null; } + public System.Collections.Generic.Dictionary Headers { get => throw null; set => throw null; } + public MultipartSection() => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.MultipartSectionConverterExtensions` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MultipartSectionConverterExtensions + { + public static Microsoft.AspNetCore.WebUtilities.FileMultipartSection AsFileSection(this Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + public static Microsoft.AspNetCore.WebUtilities.FormMultipartSection AsFormDataSection(this Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + public static Microsoft.Net.Http.Headers.ContentDispositionHeaderValue GetContentDispositionHeader(this Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.MultipartSectionStreamExtensions` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MultipartSectionStreamExtensions + { + public static System.Threading.Tasks.Task ReadAsStringAsync(this Microsoft.AspNetCore.WebUtilities.MultipartSection section) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.QueryHelpers` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class QueryHelpers + { + public static string AddQueryString(string uri, string name, string value) => throw null; + public static string AddQueryString(string uri, System.Collections.Generic.IEnumerable> queryString) => throw null; + public static string AddQueryString(string uri, System.Collections.Generic.IEnumerable> queryString) => throw null; + public static string AddQueryString(string uri, System.Collections.Generic.IDictionary queryString) => throw null; + public static System.Collections.Generic.Dictionary ParseNullableQuery(string queryString) => throw null; + public static System.Collections.Generic.Dictionary ParseQuery(string queryString) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.ReasonPhrases` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ReasonPhrases + { + public static string GetReasonPhrase(int statusCode) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StreamHelperExtensions + { + public static System.Threading.Tasks.Task DrainAsync(this System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task DrainAsync(this System.IO.Stream stream, System.Int64? limit, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task DrainAsync(this System.IO.Stream stream, System.Buffers.ArrayPool bytePool, System.Int64? limit, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.AspNetCore.WebUtilities.WebEncoders` in `Microsoft.AspNetCore.WebUtilities, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebEncoders + { + public static System.Byte[] Base64UrlDecode(string input, int offset, int count) => throw null; + public static System.Byte[] Base64UrlDecode(string input, int offset, System.Char[] buffer, int bufferOffset, int count) => throw null; + public static System.Byte[] Base64UrlDecode(string input) => throw null; + public static string Base64UrlEncode(System.ReadOnlySpan input) => throw null; + public static string Base64UrlEncode(System.Byte[] input, int offset, int count) => throw null; + public static string Base64UrlEncode(System.Byte[] input) => throw null; + public static int Base64UrlEncode(System.Byte[] input, int offset, System.Char[] output, int outputOffset, int count) => throw null; + public static int GetArraySizeRequiredToDecode(int count) => throw null; + public static int GetArraySizeRequiredToEncode(int count) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs new file mode 100644 index 000000000000..4b284708216c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs @@ -0,0 +1,34 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + // Generated from `Microsoft.AspNetCore.WebHost` in `Microsoft.AspNetCore, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class WebHost + { + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder CreateDefaultBuilder(string[] args) where TStartup : class => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder CreateDefaultBuilder(string[] args) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder CreateDefaultBuilder() => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost Start(string url, System.Action routeBuilder) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost Start(string url, Microsoft.AspNetCore.Http.RequestDelegate app) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost Start(System.Action routeBuilder) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost Start(Microsoft.AspNetCore.Http.RequestDelegate app) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost StartWith(string url, System.Action app) => throw null; + public static Microsoft.AspNetCore.Hosting.IWebHost StartWith(System.Action app) => throw null; + } + + } + namespace Extensions + { + namespace Hosting + { + // Generated from `Microsoft.Extensions.Hosting.GenericHostBuilderExtensions` in `Microsoft.AspNetCore, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class GenericHostBuilderExtensions + { + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHostDefaults(this Microsoft.Extensions.Hosting.IHostBuilder builder, System.Action configure) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs new file mode 100644 index 000000000000..4ff388f2cf5f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs @@ -0,0 +1,187 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Caching + { + namespace Distributed + { + // Generated from `Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryExtensions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DistributedCacheEntryExtensions + { + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.TimeSpan relative) => throw null; + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.DateTimeOffset absolute) => throw null; + public static Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions SetSlidingExpiration(this Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.TimeSpan offset) => throw null; + } + + // Generated from `Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DistributedCacheEntryOptions + { + public System.DateTimeOffset? AbsoluteExpiration { get => throw null; set => throw null; } + public System.TimeSpan? AbsoluteExpirationRelativeToNow { get => throw null; set => throw null; } + public DistributedCacheEntryOptions() => throw null; + public System.TimeSpan? SlidingExpiration { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DistributedCacheExtensions + { + public static string GetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key) => throw null; + public static System.Threading.Tasks.Task GetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public static void Set(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Byte[] value) => throw null; + public static System.Threading.Tasks.Task SetAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, System.Byte[] value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options) => throw null; + public static void SetString(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value) => throw null; + public static System.Threading.Tasks.Task SetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SetStringAsync(this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.Extensions.Caching.Distributed.IDistributedCache` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDistributedCache + { + System.Byte[] Get(string key); + System.Threading.Tasks.Task GetAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); + void Refresh(string key); + System.Threading.Tasks.Task RefreshAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); + void Remove(string key); + System.Threading.Tasks.Task RemoveAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); + void Set(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options); + System.Threading.Tasks.Task SetAsync(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); + } + + } + namespace Memory + { + // Generated from `Microsoft.Extensions.Caching.Memory.CacheEntryExtensions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CacheEntryExtensions + { + public static Microsoft.Extensions.Caching.Memory.ICacheEntry AddExpirationToken(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Primitives.IChangeToken expirationToken) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback, object state) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.TimeSpan relative) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.DateTimeOffset absolute) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetOptions(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetPriority(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetSize(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.Int64 size) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetSlidingExpiration(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, System.TimeSpan offset) => throw null; + public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetValue(this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, object value) => throw null; + } + + // Generated from `Microsoft.Extensions.Caching.Memory.CacheExtensions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CacheExtensions + { + public static object Get(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) => throw null; + public static TItem Get(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key) => throw null; + public static TItem GetOrCreate(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func factory) => throw null; + public static System.Threading.Tasks.Task GetOrCreateAsync(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, System.Func> factory) => throw null; + public static TItem Set(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, System.TimeSpan absoluteExpirationRelativeToNow) => throw null; + public static TItem Set(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, System.DateTimeOffset absoluteExpiration) => throw null; + public static TItem Set(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, Microsoft.Extensions.Primitives.IChangeToken expirationToken) => throw null; + public static TItem Set(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options) => throw null; + public static TItem Set(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, TItem value) => throw null; + public static bool TryGetValue(this Microsoft.Extensions.Caching.Memory.IMemoryCache cache, object key, out TItem value) => throw null; + } + + // Generated from `Microsoft.Extensions.Caching.Memory.CacheItemPriority` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum CacheItemPriority + { + // Stub generator skipped constructor + High, + Low, + NeverRemove, + Normal, + } + + // Generated from `Microsoft.Extensions.Caching.Memory.EvictionReason` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum EvictionReason + { + Capacity, + // Stub generator skipped constructor + Expired, + None, + Removed, + Replaced, + TokenExpired, + } + + // Generated from `Microsoft.Extensions.Caching.Memory.ICacheEntry` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ICacheEntry : System.IDisposable + { + System.DateTimeOffset? AbsoluteExpiration { get; set; } + System.TimeSpan? AbsoluteExpirationRelativeToNow { get; set; } + System.Collections.Generic.IList ExpirationTokens { get; } + object Key { get; } + System.Collections.Generic.IList PostEvictionCallbacks { get; } + Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { get; set; } + System.Int64? Size { get; set; } + System.TimeSpan? SlidingExpiration { get; set; } + object Value { get; set; } + } + + // Generated from `Microsoft.Extensions.Caching.Memory.IMemoryCache` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IMemoryCache : System.IDisposable + { + Microsoft.Extensions.Caching.Memory.ICacheEntry CreateEntry(object key); + void Remove(object key); + bool TryGetValue(object key, out object value); + } + + // Generated from `Microsoft.Extensions.Caching.Memory.MemoryCacheEntryExtensions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MemoryCacheEntryExtensions + { + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions AddExpirationToken(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Primitives.IChangeToken expirationToken) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback, object state) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions RegisterPostEvictionCallback(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.PostEvictionDelegate callback) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.TimeSpan relative) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetAbsoluteExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.DateTimeOffset absolute) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetPriority(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSize(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.Int64 size) => throw null; + public static Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions SetSlidingExpiration(this Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions options, System.TimeSpan offset) => throw null; + } + + // Generated from `Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryCacheEntryOptions + { + public System.DateTimeOffset? AbsoluteExpiration { get => throw null; set => throw null; } + public System.TimeSpan? AbsoluteExpirationRelativeToNow { get => throw null; set => throw null; } + public System.Collections.Generic.IList ExpirationTokens { get => throw null; } + public MemoryCacheEntryOptions() => throw null; + public System.Collections.Generic.IList PostEvictionCallbacks { get => throw null; } + public Microsoft.Extensions.Caching.Memory.CacheItemPriority Priority { get => throw null; set => throw null; } + public System.Int64? Size { get => throw null; set => throw null; } + public System.TimeSpan? SlidingExpiration { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Caching.Memory.PostEvictionCallbackRegistration` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostEvictionCallbackRegistration + { + public Microsoft.Extensions.Caching.Memory.PostEvictionDelegate EvictionCallback { get => throw null; set => throw null; } + public PostEvictionCallbackRegistration() => throw null; + public object State { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Caching.Memory.PostEvictionDelegate` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate void PostEvictionDelegate(object key, object value, Microsoft.Extensions.Caching.Memory.EvictionReason reason, object state); + + } + } + namespace Internal + { + // Generated from `Microsoft.Extensions.Internal.ISystemClock` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISystemClock + { + System.DateTimeOffset UtcNow { get; } + } + + // Generated from `Microsoft.Extensions.Internal.SystemClock` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SystemClock : Microsoft.Extensions.Internal.ISystemClock + { + public SystemClock() => throw null; + public System.DateTimeOffset UtcNow { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs new file mode 100644 index 000000000000..d7c91d4f3029 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs @@ -0,0 +1,76 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Caching + { + namespace Distributed + { + // Generated from `Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache` in `Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryDistributedCache : Microsoft.Extensions.Caching.Distributed.IDistributedCache + { + public System.Byte[] Get(string key) => throw null; + public System.Threading.Tasks.Task GetAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public MemoryDistributedCache(Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public MemoryDistributedCache(Microsoft.Extensions.Options.IOptions optionsAccessor) => throw null; + public void Refresh(string key) => throw null; + public System.Threading.Tasks.Task RefreshAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public void Remove(string key) => throw null; + public System.Threading.Tasks.Task RemoveAsync(string key, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public void Set(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options) => throw null; + public System.Threading.Tasks.Task SetAsync(string key, System.Byte[] value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + } + + } + namespace Memory + { + // Generated from `Microsoft.Extensions.Caching.Memory.MemoryCache` in `Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryCache : System.IDisposable, Microsoft.Extensions.Caching.Memory.IMemoryCache + { + public void Compact(double percentage) => throw null; + public int Count { get => throw null; } + public Microsoft.Extensions.Caching.Memory.ICacheEntry CreateEntry(object key) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public MemoryCache(Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public MemoryCache(Microsoft.Extensions.Options.IOptions optionsAccessor) => throw null; + public void Remove(object key) => throw null; + public bool TryGetValue(object key, out object result) => throw null; + // ERR: Stub generator didn't handle member: ~MemoryCache + } + + // Generated from `Microsoft.Extensions.Caching.Memory.MemoryCacheOptions` in `Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryCacheOptions : Microsoft.Extensions.Options.IOptions + { + public Microsoft.Extensions.Internal.ISystemClock Clock { get => throw null; set => throw null; } + public double CompactionPercentage { get => throw null; set => throw null; } + public System.TimeSpan ExpirationScanFrequency { get => throw null; set => throw null; } + public MemoryCacheOptions() => throw null; + public System.Int64? SizeLimit { get => throw null; set => throw null; } + Microsoft.Extensions.Caching.Memory.MemoryCacheOptions Microsoft.Extensions.Options.IOptions.Value { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Caching.Memory.MemoryDistributedCacheOptions` in `Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryDistributedCacheOptions : Microsoft.Extensions.Caching.Memory.MemoryCacheOptions + { + public MemoryDistributedCacheOptions() => throw null; + } + + } + } + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.MemoryCacheServiceCollectionExtensions` in `Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MemoryCacheServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDistributedMemoryCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDistributedMemoryCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMemoryCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMemoryCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs new file mode 100644 index 000000000000..050e22acb3be --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs @@ -0,0 +1,86 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.ConfigurationExtensions` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder Add(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) where TSource : Microsoft.Extensions.Configuration.IConfigurationSource, new() => throw null; + public static System.Collections.Generic.IEnumerable> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration, bool makePathsRelative) => throw null; + public static System.Collections.Generic.IEnumerable> AsEnumerable(this Microsoft.Extensions.Configuration.IConfiguration configuration) => throw null; + public static bool Exists(this Microsoft.Extensions.Configuration.IConfigurationSection section) => throw null; + public static string GetConnectionString(this Microsoft.Extensions.Configuration.IConfiguration configuration, string name) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationPath` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConfigurationPath + { + public static string Combine(params string[] pathSegments) => throw null; + public static string Combine(System.Collections.Generic.IEnumerable pathSegments) => throw null; + public static string GetParentPath(string path) => throw null; + public static string GetSectionKey(string path) => throw null; + public static string KeyDelimiter; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationRootExtensions` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConfigurationRootExtensions + { + public static string GetDebugView(this Microsoft.Extensions.Configuration.IConfigurationRoot root) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.IConfiguration` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfiguration + { + System.Collections.Generic.IEnumerable GetChildren(); + Microsoft.Extensions.Primitives.IChangeToken GetReloadToken(); + Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key); + string this[string key] { get; set; } + } + + // Generated from `Microsoft.Extensions.Configuration.IConfigurationBuilder` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigurationBuilder + { + Microsoft.Extensions.Configuration.IConfigurationBuilder Add(Microsoft.Extensions.Configuration.IConfigurationSource source); + Microsoft.Extensions.Configuration.IConfigurationRoot Build(); + System.Collections.Generic.IDictionary Properties { get; } + System.Collections.Generic.IList Sources { get; } + } + + // Generated from `Microsoft.Extensions.Configuration.IConfigurationProvider` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigurationProvider + { + System.Collections.Generic.IEnumerable GetChildKeys(System.Collections.Generic.IEnumerable earlierKeys, string parentPath); + Microsoft.Extensions.Primitives.IChangeToken GetReloadToken(); + void Load(); + void Set(string key, string value); + bool TryGet(string key, out string value); + } + + // Generated from `Microsoft.Extensions.Configuration.IConfigurationRoot` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigurationRoot : Microsoft.Extensions.Configuration.IConfiguration + { + System.Collections.Generic.IEnumerable Providers { get; } + void Reload(); + } + + // Generated from `Microsoft.Extensions.Configuration.IConfigurationSection` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigurationSection : Microsoft.Extensions.Configuration.IConfiguration + { + string Key { get; } + string Path { get; } + string Value { get; set; } + } + + // Generated from `Microsoft.Extensions.Configuration.IConfigurationSource` in `Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigurationSource + { + Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder); + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs new file mode 100644 index 000000000000..aeaae3d3b6fa --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs @@ -0,0 +1,34 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.BinderOptions` in `Microsoft.Extensions.Configuration.Binder, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class BinderOptions + { + public bool BindNonPublicProperties { get => throw null; set => throw null; } + public BinderOptions() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationBinder` in `Microsoft.Extensions.Configuration.Binder, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConfigurationBinder + { + public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, object instance) => throw null; + public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, object instance, System.Action configureOptions) => throw null; + public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, object instance) => throw null; + public static object Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Type type, System.Action configureOptions) => throw null; + public static object Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Type type) => throw null; + public static T Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Action configureOptions) => throw null; + public static T Get(this Microsoft.Extensions.Configuration.IConfiguration configuration) => throw null; + public static object GetValue(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Type type, string key, object defaultValue) => throw null; + public static object GetValue(this Microsoft.Extensions.Configuration.IConfiguration configuration, System.Type type, string key) => throw null; + public static T GetValue(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, T defaultValue) => throw null; + public static T GetValue(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs new file mode 100644 index 000000000000..c40d785d463c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs @@ -0,0 +1,39 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.CommandLineConfigurationExtensions` in `Microsoft.Extensions.Configuration.CommandLine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class CommandLineConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLine(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, string[] args, System.Collections.Generic.IDictionary switchMappings) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLine(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, string[] args) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddCommandLine(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + } + + namespace CommandLine + { + // Generated from `Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationProvider` in `Microsoft.Extensions.Configuration.CommandLine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CommandLineConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider + { + protected System.Collections.Generic.IEnumerable Args { get => throw null; } + public CommandLineConfigurationProvider(System.Collections.Generic.IEnumerable args, System.Collections.Generic.IDictionary switchMappings = default(System.Collections.Generic.IDictionary)) => throw null; + public override void Load() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.CommandLine.CommandLineConfigurationSource` in `Microsoft.Extensions.Configuration.CommandLine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CommandLineConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public System.Collections.Generic.IEnumerable Args { get => throw null; set => throw null; } + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public CommandLineConfigurationSource() => throw null; + public System.Collections.Generic.IDictionary SwitchMappings { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs new file mode 100644 index 000000000000..1dc9bc72c932 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs @@ -0,0 +1,38 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.EnvironmentVariablesExtensions` in `Microsoft.Extensions.Configuration.EnvironmentVariables, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EnvironmentVariablesExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, string prefix) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddEnvironmentVariables(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + } + + namespace EnvironmentVariables + { + // Generated from `Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationProvider` in `Microsoft.Extensions.Configuration.EnvironmentVariables, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnvironmentVariablesConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider + { + public EnvironmentVariablesConfigurationProvider(string prefix) => throw null; + public EnvironmentVariablesConfigurationProvider() => throw null; + public override void Load() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.EnvironmentVariables.EnvironmentVariablesConfigurationSource` in `Microsoft.Extensions.Configuration.EnvironmentVariables, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EnvironmentVariablesConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public EnvironmentVariablesConfigurationSource() => throw null; + public string Prefix { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs new file mode 100644 index 000000000000..9ab249e6c748 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs @@ -0,0 +1,57 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.FileConfigurationExtensions` in `Microsoft.Extensions.Configuration.FileExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class FileConfigurationExtensions + { + public static System.Action GetFileLoadExceptionHandler(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public static Microsoft.Extensions.FileProviders.IFileProvider GetFileProvider(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetBasePath(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string basePath) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileLoadExceptionHandler(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action handler) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileProvider(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider fileProvider) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.FileConfigurationProvider` in `Microsoft.Extensions.Configuration.FileExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FileConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider, System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public FileConfigurationProvider(Microsoft.Extensions.Configuration.FileConfigurationSource source) => throw null; + public override void Load() => throw null; + public abstract void Load(System.IO.Stream stream); + public Microsoft.Extensions.Configuration.FileConfigurationSource Source { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.FileConfigurationSource` in `Microsoft.Extensions.Configuration.FileExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public abstract Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder); + public void EnsureDefaults(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + protected FileConfigurationSource() => throw null; + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public System.Action OnLoadException { get => throw null; set => throw null; } + public bool Optional { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public int ReloadDelay { get => throw null; set => throw null; } + public bool ReloadOnChange { get => throw null; set => throw null; } + public void ResolveFileProvider() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.FileLoadExceptionContext` in `Microsoft.Extensions.Configuration.FileExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileLoadExceptionContext + { + public System.Exception Exception { get => throw null; set => throw null; } + public FileLoadExceptionContext() => throw null; + public bool Ignore { get => throw null; set => throw null; } + public Microsoft.Extensions.Configuration.FileConfigurationProvider Provider { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs new file mode 100644 index 000000000000..30646542d313 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs @@ -0,0 +1,54 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.IniConfigurationExtensions` in `Microsoft.Extensions.Configuration.Ini, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class IniConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider provider, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddIniStream(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.IO.Stream stream) => throw null; + } + + namespace Ini + { + // Generated from `Microsoft.Extensions.Configuration.Ini.IniConfigurationProvider` in `Microsoft.Extensions.Configuration.Ini, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IniConfigurationProvider : Microsoft.Extensions.Configuration.FileConfigurationProvider + { + public IniConfigurationProvider(Microsoft.Extensions.Configuration.Ini.IniConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.FileConfigurationSource)) => throw null; + public override void Load(System.IO.Stream stream) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Ini.IniConfigurationSource` in `Microsoft.Extensions.Configuration.Ini, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IniConfigurationSource : Microsoft.Extensions.Configuration.FileConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public IniConfigurationSource() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Ini.IniStreamConfigurationProvider` in `Microsoft.Extensions.Configuration.Ini, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IniStreamConfigurationProvider : Microsoft.Extensions.Configuration.StreamConfigurationProvider + { + public IniStreamConfigurationProvider(Microsoft.Extensions.Configuration.Ini.IniStreamConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.StreamConfigurationSource)) => throw null; + public override void Load(System.IO.Stream stream) => throw null; + public static System.Collections.Generic.IDictionary Read(System.IO.Stream stream) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Ini.IniStreamConfigurationSource` in `Microsoft.Extensions.Configuration.Ini, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IniStreamConfigurationSource : Microsoft.Extensions.Configuration.StreamConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public IniStreamConfigurationSource() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs new file mode 100644 index 000000000000..7d6c71f1a770 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs @@ -0,0 +1,53 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.JsonConfigurationExtensions` in `Microsoft.Extensions.Configuration.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JsonConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider provider, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddJsonStream(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.IO.Stream stream) => throw null; + } + + namespace Json + { + // Generated from `Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider` in `Microsoft.Extensions.Configuration.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonConfigurationProvider : Microsoft.Extensions.Configuration.FileConfigurationProvider + { + public JsonConfigurationProvider(Microsoft.Extensions.Configuration.Json.JsonConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.FileConfigurationSource)) => throw null; + public override void Load(System.IO.Stream stream) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Json.JsonConfigurationSource` in `Microsoft.Extensions.Configuration.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonConfigurationSource : Microsoft.Extensions.Configuration.FileConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public JsonConfigurationSource() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Json.JsonStreamConfigurationProvider` in `Microsoft.Extensions.Configuration.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonStreamConfigurationProvider : Microsoft.Extensions.Configuration.StreamConfigurationProvider + { + public JsonStreamConfigurationProvider(Microsoft.Extensions.Configuration.Json.JsonStreamConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.StreamConfigurationSource)) => throw null; + public override void Load(System.IO.Stream stream) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Json.JsonStreamConfigurationSource` in `Microsoft.Extensions.Configuration.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonStreamConfigurationSource : Microsoft.Extensions.Configuration.StreamConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public JsonStreamConfigurationSource() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs new file mode 100644 index 000000000000..214859267730 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs @@ -0,0 +1,45 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.KeyPerFileConfigurationBuilderExtensions` in `Microsoft.Extensions.Configuration.KeyPerFile, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class KeyPerFileConfigurationBuilderExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath, bool optional) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string directoryPath) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddKeyPerFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + } + + namespace KeyPerFile + { + // Generated from `Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationProvider` in `Microsoft.Extensions.Configuration.KeyPerFile, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyPerFileConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider, System.IDisposable + { + public void Dispose() => throw null; + public KeyPerFileConfigurationProvider(Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationSource source) => throw null; + public override void Load() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationSource` in `Microsoft.Extensions.Configuration.KeyPerFile, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class KeyPerFileConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public Microsoft.Extensions.FileProviders.IFileProvider FileProvider { get => throw null; set => throw null; } + public System.Func IgnoreCondition { get => throw null; set => throw null; } + public string IgnorePrefix { get => throw null; set => throw null; } + public KeyPerFileConfigurationSource() => throw null; + public bool Optional { get => throw null; set => throw null; } + public int ReloadDelay { get => throw null; set => throw null; } + public bool ReloadOnChange { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs new file mode 100644 index 000000000000..067488007a89 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs @@ -0,0 +1,41 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.UserSecretsConfigurationExtensions` in `Microsoft.Extensions.Configuration.UserSecrets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class UserSecretsConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, bool optional, bool reloadOnChange) where T : class => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, bool optional) where T : class => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration) where T : class => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, string userSecretsId, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, string userSecretsId) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, System.Reflection.Assembly assembly, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, System.Reflection.Assembly assembly, bool optional) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddUserSecrets(this Microsoft.Extensions.Configuration.IConfigurationBuilder configuration, System.Reflection.Assembly assembly) => throw null; + } + + namespace UserSecrets + { + // Generated from `Microsoft.Extensions.Configuration.UserSecrets.PathHelper` in `Microsoft.Extensions.Configuration.UserSecrets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PathHelper + { + public static string GetSecretsPathFromSecretsId(string userSecretsId) => throw null; + public PathHelper() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute` in `Microsoft.Extensions.Configuration.UserSecrets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserSecretsIdAttribute : System.Attribute + { + public string UserSecretsId { get => throw null; } + public UserSecretsIdAttribute(string userSecretId) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs new file mode 100644 index 000000000000..b0db5c9b87a2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs @@ -0,0 +1,63 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.XmlConfigurationExtensions` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class XmlConfigurationExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path, bool optional) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, string path) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.Action configureSource) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlFile(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Microsoft.Extensions.FileProviders.IFileProvider provider, string path, bool optional, bool reloadOnChange) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddXmlStream(this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, System.IO.Stream stream) => throw null; + } + + namespace Xml + { + // Generated from `Microsoft.Extensions.Configuration.Xml.XmlConfigurationProvider` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlConfigurationProvider : Microsoft.Extensions.Configuration.FileConfigurationProvider + { + public override void Load(System.IO.Stream stream) => throw null; + public XmlConfigurationProvider(Microsoft.Extensions.Configuration.Xml.XmlConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.FileConfigurationSource)) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Xml.XmlConfigurationSource` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlConfigurationSource : Microsoft.Extensions.Configuration.FileConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public XmlConfigurationSource() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Xml.XmlDocumentDecryptor` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlDocumentDecryptor + { + public System.Xml.XmlReader CreateDecryptingXmlReader(System.IO.Stream input, System.Xml.XmlReaderSettings settings) => throw null; + protected virtual System.Xml.XmlReader DecryptDocumentAndCreateXmlReader(System.Xml.XmlDocument document) => throw null; + public static Microsoft.Extensions.Configuration.Xml.XmlDocumentDecryptor Instance; + protected XmlDocumentDecryptor() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Xml.XmlStreamConfigurationProvider` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlStreamConfigurationProvider : Microsoft.Extensions.Configuration.StreamConfigurationProvider + { + public override void Load(System.IO.Stream stream) => throw null; + public static System.Collections.Generic.IDictionary Read(System.IO.Stream stream, Microsoft.Extensions.Configuration.Xml.XmlDocumentDecryptor decryptor) => throw null; + public XmlStreamConfigurationProvider(Microsoft.Extensions.Configuration.Xml.XmlStreamConfigurationSource source) : base(default(Microsoft.Extensions.Configuration.StreamConfigurationSource)) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Xml.XmlStreamConfigurationSource` in `Microsoft.Extensions.Configuration.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class XmlStreamConfigurationSource : Microsoft.Extensions.Configuration.StreamConfigurationSource + { + public override Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public XmlStreamConfigurationSource() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs new file mode 100644 index 000000000000..5312dd998f6a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs @@ -0,0 +1,151 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Configuration + { + // Generated from `Microsoft.Extensions.Configuration.ChainedBuilderExtensions` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ChainedBuilderExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, Microsoft.Extensions.Configuration.IConfiguration config, bool shouldDisposeConfiguration) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, Microsoft.Extensions.Configuration.IConfiguration config) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ChainedConfigurationProvider` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ChainedConfigurationProvider : System.IDisposable, Microsoft.Extensions.Configuration.IConfigurationProvider + { + public ChainedConfigurationProvider(Microsoft.Extensions.Configuration.ChainedConfigurationSource source) => throw null; + public void Dispose() => throw null; + public System.Collections.Generic.IEnumerable GetChildKeys(System.Collections.Generic.IEnumerable earlierKeys, string parentPath) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken GetReloadToken() => throw null; + public void Load() => throw null; + public void Set(string key, string value) => throw null; + public bool TryGet(string key, out string value) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ChainedConfigurationSource` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ChainedConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public ChainedConfigurationSource() => throw null; + public Microsoft.Extensions.Configuration.IConfiguration Configuration { get => throw null; set => throw null; } + public bool ShouldDisposeConfiguration { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationBuilder` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationBuilder : Microsoft.Extensions.Configuration.IConfigurationBuilder + { + public Microsoft.Extensions.Configuration.IConfigurationBuilder Add(Microsoft.Extensions.Configuration.IConfigurationSource source) => throw null; + public Microsoft.Extensions.Configuration.IConfigurationRoot Build() => throw null; + public ConfigurationBuilder() => throw null; + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Collections.Generic.IList Sources { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationKeyComparer` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationKeyComparer : System.Collections.Generic.IComparer + { + public int Compare(string x, string y) => throw null; + public ConfigurationKeyComparer() => throw null; + public static Microsoft.Extensions.Configuration.ConfigurationKeyComparer Instance { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationProvider` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConfigurationProvider : Microsoft.Extensions.Configuration.IConfigurationProvider + { + protected ConfigurationProvider() => throw null; + protected System.Collections.Generic.IDictionary Data { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IEnumerable GetChildKeys(System.Collections.Generic.IEnumerable earlierKeys, string parentPath) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken GetReloadToken() => throw null; + public virtual void Load() => throw null; + protected void OnReload() => throw null; + public virtual void Set(string key, string value) => throw null; + public override string ToString() => throw null; + public virtual bool TryGet(string key, out string value) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationReloadToken` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationReloadToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + public ConfigurationReloadToken() => throw null; + public bool HasChanged { get => throw null; } + public void OnReload() => throw null; + public System.IDisposable RegisterChangeCallback(System.Action callback, object state) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationRoot` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationRoot : System.IDisposable, Microsoft.Extensions.Configuration.IConfigurationRoot, Microsoft.Extensions.Configuration.IConfiguration + { + public ConfigurationRoot(System.Collections.Generic.IList providers) => throw null; + public void Dispose() => throw null; + public System.Collections.Generic.IEnumerable GetChildren() => throw null; + public Microsoft.Extensions.Primitives.IChangeToken GetReloadToken() => throw null; + public Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key) => throw null; + public string this[string key] { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Providers { get => throw null; } + public void Reload() => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.ConfigurationSection` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationSection : Microsoft.Extensions.Configuration.IConfigurationSection, Microsoft.Extensions.Configuration.IConfiguration + { + public ConfigurationSection(Microsoft.Extensions.Configuration.IConfigurationRoot root, string path) => throw null; + public System.Collections.Generic.IEnumerable GetChildren() => throw null; + public Microsoft.Extensions.Primitives.IChangeToken GetReloadToken() => throw null; + public Microsoft.Extensions.Configuration.IConfigurationSection GetSection(string key) => throw null; + public string this[string key] { get => throw null; set => throw null; } + public string Key { get => throw null; } + public string Path { get => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Configuration.MemoryConfigurationBuilderExtensions` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MemoryConfigurationBuilderExtensions + { + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddInMemoryCollection(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, System.Collections.Generic.IEnumerable> initialData) => throw null; + public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddInMemoryCollection(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.StreamConfigurationProvider` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class StreamConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider + { + public override void Load() => throw null; + public abstract void Load(System.IO.Stream stream); + public Microsoft.Extensions.Configuration.StreamConfigurationSource Source { get => throw null; } + public StreamConfigurationProvider(Microsoft.Extensions.Configuration.StreamConfigurationSource source) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.StreamConfigurationSource` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class StreamConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public abstract Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder); + public System.IO.Stream Stream { get => throw null; set => throw null; } + protected StreamConfigurationSource() => throw null; + } + + namespace Memory + { + // Generated from `Microsoft.Extensions.Configuration.Memory.MemoryConfigurationProvider` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryConfigurationProvider : Microsoft.Extensions.Configuration.ConfigurationProvider, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + public void Add(string key, string value) => throw null; + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public MemoryConfigurationProvider(Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource source) => throw null; + } + + // Generated from `Microsoft.Extensions.Configuration.Memory.MemoryConfigurationSource` in `Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MemoryConfigurationSource : Microsoft.Extensions.Configuration.IConfigurationSource + { + public Microsoft.Extensions.Configuration.IConfigurationProvider Build(Microsoft.Extensions.Configuration.IConfigurationBuilder builder) => throw null; + public System.Collections.Generic.IEnumerable> InitialData { get => throw null; set => throw null; } + public MemoryConfigurationSource() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs new file mode 100644 index 000000000000..bb5ab498a83e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs @@ -0,0 +1,212 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ActivatorUtilities` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ActivatorUtilities + { + public static Microsoft.Extensions.DependencyInjection.ObjectFactory CreateFactory(System.Type instanceType, System.Type[] argumentTypes) => throw null; + public static object CreateInstance(System.IServiceProvider provider, System.Type instanceType, params object[] parameters) => throw null; + public static T CreateInstance(System.IServiceProvider provider, params object[] parameters) => throw null; + public static object GetServiceOrCreateInstance(System.IServiceProvider provider, System.Type type) => throw null; + public static T GetServiceOrCreateInstance(System.IServiceProvider provider) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesConstructorAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ActivatorUtilitiesConstructorAttribute : System.Attribute + { + public ActivatorUtilitiesConstructorAttribute() => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IServiceCollection` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServiceCollection : System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<>` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServiceProviderFactory + { + TContainerBuilder CreateBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services); + System.IServiceProvider CreateServiceProvider(TContainerBuilder containerBuilder); + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IServiceScope` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServiceScope : System.IDisposable + { + System.IServiceProvider ServiceProvider { get; } + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IServiceScopeFactory` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IServiceScopeFactory + { + Microsoft.Extensions.DependencyInjection.IServiceScope CreateScope(); + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ISupportRequiredService` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISupportRequiredService + { + object GetRequiredService(System.Type serviceType); + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ObjectFactory` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public delegate object ObjectFactory(System.IServiceProvider serviceProvider, object[] arguments); + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServiceCollectionServiceExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Type implementationType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Func implementationFactory) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, TService implementationInstance) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, object implementationInstance) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Type implementationType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Func implementationFactory) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Type implementationType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType, System.Func implementationFactory) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type serviceType) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceDescriptor` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceDescriptor + { + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Describe(System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Describe(System.Type serviceType, System.Func implementationFactory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime) => throw null; + public System.Func ImplementationFactory { get => throw null; } + public object ImplementationInstance { get => throw null; } + public System.Type ImplementationType { get => throw null; } + public Microsoft.Extensions.DependencyInjection.ServiceLifetime Lifetime { get => throw null; } + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped() where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(System.Type service, System.Type implementationType) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped(System.Type service, System.Func implementationFactory) => throw null; + public ServiceDescriptor(System.Type serviceType, object instance) => throw null; + public ServiceDescriptor(System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime) => throw null; + public ServiceDescriptor(System.Type serviceType, System.Func factory, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime) => throw null; + public System.Type ServiceType { get => throw null; } + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(TService implementationInstance) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton() where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(System.Type serviceType, object implementationInstance) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(System.Type serviceType, System.Func implementationFactory) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Singleton(System.Type service, System.Type implementationType) => throw null; + public override string ToString() => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Transient(System.Func implementationFactory) where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Transient(System.Func implementationFactory) where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Transient() where TImplementation : class, TService where TService : class => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Transient(System.Type service, System.Type implementationType) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Transient(System.Type service, System.Func implementationFactory) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceLifetime` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ServiceLifetime + { + Scoped, + // Stub generator skipped constructor + Singleton, + Transient, + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServiceProviderServiceExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceScope CreateScope(this System.IServiceProvider provider) => throw null; + public static object GetRequiredService(this System.IServiceProvider provider, System.Type serviceType) => throw null; + public static T GetRequiredService(this System.IServiceProvider provider) => throw null; + public static T GetService(this System.IServiceProvider provider) => throw null; + public static System.Collections.Generic.IEnumerable GetServices(this System.IServiceProvider provider, System.Type serviceType) => throw null; + public static System.Collections.Generic.IEnumerable GetServices(this System.IServiceProvider provider) => throw null; + } + + namespace Extensions + { + // Generated from `Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionDescriptorExtensions` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServiceCollectionDescriptorExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Add(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Collections.Generic.IEnumerable descriptors) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Add(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAll(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection RemoveAll(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type serviceType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Replace(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null; + public static void TryAdd(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Collections.Generic.IEnumerable descriptors) => throw null; + public static void TryAdd(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null; + public static void TryAddEnumerable(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IEnumerable descriptors) => throw null; + public static void TryAddEnumerable(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TService : class => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TImplementation : class, TService where TService : class => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Type implementationType) => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Func implementationFactory) => throw null; + public static void TryAddScoped(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service) => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, TService instance) where TService : class => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TService : class => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TImplementation : class, TService where TService : class => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Type implementationType) => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Func implementationFactory) => throw null; + public static void TryAddSingleton(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service) => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where TService : class => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TService : class => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection) where TImplementation : class, TService where TService : class => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Type implementationType) => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service, System.Func implementationFactory) => throw null; + public static void TryAddTransient(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, System.Type service) => throw null; + } + + } + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMemberTypes' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMembersAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs new file mode 100644 index 000000000000..852d38a78181 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs @@ -0,0 +1,63 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory` in `Microsoft.Extensions.DependencyInjection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultServiceProviderFactory : Microsoft.Extensions.DependencyInjection.IServiceProviderFactory + { + public Microsoft.Extensions.DependencyInjection.IServiceCollection CreateBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public System.IServiceProvider CreateServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection containerBuilder) => throw null; + public DefaultServiceProviderFactory(Microsoft.Extensions.DependencyInjection.ServiceProviderOptions options) => throw null; + public DefaultServiceProviderFactory() => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceCollection` in `Microsoft.Extensions.DependencyInjection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceCollection : System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection, Microsoft.Extensions.DependencyInjection.IServiceCollection + { + void System.Collections.Generic.ICollection.Add(Microsoft.Extensions.DependencyInjection.ServiceDescriptor item) => throw null; + public void Clear() => throw null; + public bool Contains(Microsoft.Extensions.DependencyInjection.ServiceDescriptor item) => throw null; + public void CopyTo(Microsoft.Extensions.DependencyInjection.ServiceDescriptor[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(Microsoft.Extensions.DependencyInjection.ServiceDescriptor item) => throw null; + public void Insert(int index, Microsoft.Extensions.DependencyInjection.ServiceDescriptor item) => throw null; + public bool IsReadOnly { get => throw null; } + public Microsoft.Extensions.DependencyInjection.ServiceDescriptor this[int index] { get => throw null; set => throw null; } + public bool Remove(Microsoft.Extensions.DependencyInjection.ServiceDescriptor item) => throw null; + public void RemoveAt(int index) => throw null; + public ServiceCollection() => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions` in `Microsoft.Extensions.DependencyInjection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServiceCollectionContainerBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, bool validateScopes) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.DependencyInjection.ServiceProviderOptions options) => throw null; + public static Microsoft.Extensions.DependencyInjection.ServiceProvider BuildServiceProvider(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceProvider` in `Microsoft.Extensions.DependencyInjection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceProvider : System.IServiceProvider, System.IDisposable, System.IAsyncDisposable + { + public void Dispose() => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public object GetService(System.Type serviceType) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceProviderOptions` in `Microsoft.Extensions.DependencyInjection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ServiceProviderOptions + { + public ServiceProviderOptions() => throw null; + public bool ValidateOnBuild { get => throw null; set => throw null; } + public bool ValidateScopes { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs new file mode 100644 index 000000000000..e0589af0aafc --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs @@ -0,0 +1,94 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Diagnostics + { + namespace HealthChecks + { + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckContext + { + public HealthCheckContext() => throw null; + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration Registration { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckRegistration + { + public System.Func Factory { get => throw null; set => throw null; } + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus FailureStatus { get => throw null; set => throw null; } + public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) => throw null; + public HealthCheckRegistration(string name, System.Func factory, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) => throw null; + public HealthCheckRegistration(string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan? timeout) => throw null; + public HealthCheckRegistration(string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) => throw null; + public string Name { get => throw null; set => throw null; } + public System.Collections.Generic.ISet Tags { get => throw null; } + public System.TimeSpan Timeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct HealthCheckResult + { + public System.Collections.Generic.IReadOnlyDictionary Data { get => throw null; } + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Degraded(string description = default(string), System.Exception exception = default(System.Exception), System.Collections.Generic.IReadOnlyDictionary data = default(System.Collections.Generic.IReadOnlyDictionary)) => throw null; + public string Description { get => throw null; } + public System.Exception Exception { get => throw null; } + public HealthCheckResult(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description = default(string), System.Exception exception = default(System.Exception), System.Collections.Generic.IReadOnlyDictionary data = default(System.Collections.Generic.IReadOnlyDictionary)) => throw null; + // Stub generator skipped constructor + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Healthy(string description = default(string), System.Collections.Generic.IReadOnlyDictionary data = default(System.Collections.Generic.IReadOnlyDictionary)) => throw null; + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { get => throw null; } + public static Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult Unhealthy(string description = default(string), System.Exception exception = default(System.Exception), System.Collections.Generic.IReadOnlyDictionary data = default(System.Collections.Generic.IReadOnlyDictionary)) => throw null; + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthReport` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthReport + { + public System.Collections.Generic.IReadOnlyDictionary Entries { get => throw null; } + public HealthReport(System.Collections.Generic.IReadOnlyDictionary entries, System.TimeSpan totalDuration) => throw null; + public HealthReport(System.Collections.Generic.IReadOnlyDictionary entries, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, System.TimeSpan totalDuration) => throw null; + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { get => throw null; } + public System.TimeSpan TotalDuration { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthReportEntry` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct HealthReportEntry + { + public System.Collections.Generic.IReadOnlyDictionary Data { get => throw null; } + public string Description { get => throw null; } + public System.TimeSpan Duration { get => throw null; } + public System.Exception Exception { get => throw null; } + public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data, System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable)) => throw null; + public HealthReportEntry(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus status, string description, System.TimeSpan duration, System.Exception exception, System.Collections.Generic.IReadOnlyDictionary data) => throw null; + // Stub generator skipped constructor + public Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus Status { get => throw null; } + public System.Collections.Generic.IEnumerable Tags { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum HealthStatus + { + Degraded, + // Stub generator skipped constructor + Healthy, + Unhealthy, + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHealthCheck + { + System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheckPublisher` in `Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHealthCheckPublisher + { + System.Threading.Tasks.Task PublishAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthReport report, System.Threading.CancellationToken cancellationToken); + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs new file mode 100644 index 000000000000..a135a164c4dc --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs @@ -0,0 +1,81 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.HealthCheckServiceCollectionExtensions` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HealthCheckServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddHealthChecks(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.HealthChecksBuilderAddCheckExtensions` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HealthChecksBuilderAddCheckExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus?), System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck instance, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default(Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus?), System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddTypeActivatedCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus, System.Collections.Generic.IEnumerable tags, System.TimeSpan timeout, params object[] args) where T : class, Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.HealthChecksBuilderDelegateExtensions` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HealthChecksBuilderDelegateExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAsyncCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func> check, System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string name, System.Func check, System.Collections.Generic.IEnumerable tags = default(System.Collections.Generic.IEnumerable), System.TimeSpan? timeout = default(System.TimeSpan?)) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHealthChecksBuilder + { + Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder Add(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckRegistration registration); + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + } + namespace Diagnostics + { + namespace HealthChecks + { + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckPublisherOptions` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckPublisherOptions + { + public System.TimeSpan Delay { get => throw null; set => throw null; } + public HealthCheckPublisherOptions() => throw null; + public System.TimeSpan Period { get => throw null; set => throw null; } + public System.Func Predicate { get => throw null; set => throw null; } + public System.TimeSpan Timeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckService` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HealthCheckService + { + public abstract System.Threading.Tasks.Task CheckHealthAsync(System.Func predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public System.Threading.Tasks.Task CheckHealthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected HealthCheckService() => throw null; + } + + // Generated from `Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckServiceOptions` in `Microsoft.Extensions.Diagnostics.HealthChecks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HealthCheckServiceOptions + { + public HealthCheckServiceOptions() => throw null; + public System.Collections.Generic.ICollection Registrations { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs new file mode 100644 index 000000000000..4e667633a761 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs @@ -0,0 +1,78 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace FileProviders + { + // Generated from `Microsoft.Extensions.FileProviders.IDirectoryContents` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IDirectoryContents : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + bool Exists { get; } + } + + // Generated from `Microsoft.Extensions.FileProviders.IFileInfo` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFileInfo + { + System.IO.Stream CreateReadStream(); + bool Exists { get; } + bool IsDirectory { get; } + System.DateTimeOffset LastModified { get; } + System.Int64 Length { get; } + string Name { get; } + string PhysicalPath { get; } + } + + // Generated from `Microsoft.Extensions.FileProviders.IFileProvider` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IFileProvider + { + Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath); + Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath); + Microsoft.Extensions.Primitives.IChangeToken Watch(string filter); + } + + // Generated from `Microsoft.Extensions.FileProviders.NotFoundDirectoryContents` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NotFoundDirectoryContents : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, Microsoft.Extensions.FileProviders.IDirectoryContents + { + public bool Exists { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public NotFoundDirectoryContents() => throw null; + public static Microsoft.Extensions.FileProviders.NotFoundDirectoryContents Singleton { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileProviders.NotFoundFileInfo` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NotFoundFileInfo : Microsoft.Extensions.FileProviders.IFileInfo + { + public System.IO.Stream CreateReadStream() => throw null; + public bool Exists { get => throw null; } + public bool IsDirectory { get => throw null; } + public System.DateTimeOffset LastModified { get => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public NotFoundFileInfo(string name) => throw null; + public string PhysicalPath { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileProviders.NullChangeToken` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullChangeToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + public bool HasChanged { get => throw null; } + public System.IDisposable RegisterChangeCallback(System.Action callback, object state) => throw null; + public static Microsoft.Extensions.FileProviders.NullChangeToken Singleton { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileProviders.NullFileProvider` in `Microsoft.Extensions.FileProviders.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) => throw null; + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) => throw null; + public NullFileProvider() => throw null; + public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs new file mode 100644 index 000000000000..255d61edb6f1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs @@ -0,0 +1,34 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace FileProviders + { + // Generated from `Microsoft.Extensions.FileProviders.CompositeFileProvider` in `Microsoft.Extensions.FileProviders.Composite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public CompositeFileProvider(params Microsoft.Extensions.FileProviders.IFileProvider[] fileProviders) => throw null; + public CompositeFileProvider(System.Collections.Generic.IEnumerable fileProviders) => throw null; + public System.Collections.Generic.IEnumerable FileProviders { get => throw null; } + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) => throw null; + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken Watch(string pattern) => throw null; + } + + namespace Composite + { + // Generated from `Microsoft.Extensions.FileProviders.Composite.CompositeDirectoryContents` in `Microsoft.Extensions.FileProviders.Composite, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeDirectoryContents : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, Microsoft.Extensions.FileProviders.IDirectoryContents + { + public CompositeDirectoryContents(System.Collections.Generic.IList fileProviders, string subpath) => throw null; + public bool Exists { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs new file mode 100644 index 000000000000..207078505e89 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs @@ -0,0 +1,50 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace FileProviders + { + // Generated from `Microsoft.Extensions.FileProviders.EmbeddedFileProvider` in `Microsoft.Extensions.FileProviders.Embedded, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EmbeddedFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public EmbeddedFileProvider(System.Reflection.Assembly assembly, string baseNamespace) => throw null; + public EmbeddedFileProvider(System.Reflection.Assembly assembly) => throw null; + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) => throw null; + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken Watch(string pattern) => throw null; + } + + // Generated from `Microsoft.Extensions.FileProviders.ManifestEmbeddedFileProvider` in `Microsoft.Extensions.FileProviders.Embedded, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ManifestEmbeddedFileProvider : Microsoft.Extensions.FileProviders.IFileProvider + { + public System.Reflection.Assembly Assembly { get => throw null; } + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) => throw null; + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) => throw null; + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, string manifestName, System.DateTimeOffset lastModified) => throw null; + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root, System.DateTimeOffset lastModified) => throw null; + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly, string root) => throw null; + public ManifestEmbeddedFileProvider(System.Reflection.Assembly assembly) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) => throw null; + } + + namespace Embedded + { + // Generated from `Microsoft.Extensions.FileProviders.Embedded.EmbeddedResourceFileInfo` in `Microsoft.Extensions.FileProviders.Embedded, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EmbeddedResourceFileInfo : Microsoft.Extensions.FileProviders.IFileInfo + { + public System.IO.Stream CreateReadStream() => throw null; + public EmbeddedResourceFileInfo(System.Reflection.Assembly assembly, string resourcePath, string name, System.DateTimeOffset lastModified) => throw null; + public bool Exists { get => throw null; } + public bool IsDirectory { get => throw null; } + public System.DateTimeOffset LastModified { get => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public string PhysicalPath { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs new file mode 100644 index 000000000000..b7d265c87dec --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs @@ -0,0 +1,111 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace FileProviders + { + // Generated from `Microsoft.Extensions.FileProviders.PhysicalFileProvider` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalFileProvider : System.IDisposable, Microsoft.Extensions.FileProviders.IFileProvider + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Microsoft.Extensions.FileProviders.IDirectoryContents GetDirectoryContents(string subpath) => throw null; + public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo(string subpath) => throw null; + public PhysicalFileProvider(string root, Microsoft.Extensions.FileProviders.Physical.ExclusionFilters filters) => throw null; + public PhysicalFileProvider(string root) => throw null; + public string Root { get => throw null; } + public bool UseActivePolling { get => throw null; set => throw null; } + public bool UsePollingFileWatcher { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.IChangeToken Watch(string filter) => throw null; + // ERR: Stub generator didn't handle member: ~PhysicalFileProvider + } + + namespace Internal + { + // Generated from `Microsoft.Extensions.FileProviders.Internal.PhysicalDirectoryContents` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalDirectoryContents : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, Microsoft.Extensions.FileProviders.IDirectoryContents + { + public bool Exists { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public PhysicalDirectoryContents(string directory, Microsoft.Extensions.FileProviders.Physical.ExclusionFilters filters) => throw null; + public PhysicalDirectoryContents(string directory) => throw null; + } + + } + namespace Physical + { + // Generated from `Microsoft.Extensions.FileProviders.Physical.ExclusionFilters` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum ExclusionFilters + { + DotPrefixed, + // Stub generator skipped constructor + Hidden, + None, + Sensitive, + System, + } + + // Generated from `Microsoft.Extensions.FileProviders.Physical.PhysicalDirectoryInfo` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalDirectoryInfo : Microsoft.Extensions.FileProviders.IFileInfo + { + public System.IO.Stream CreateReadStream() => throw null; + public bool Exists { get => throw null; } + public bool IsDirectory { get => throw null; } + public System.DateTimeOffset LastModified { get => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public PhysicalDirectoryInfo(System.IO.DirectoryInfo info) => throw null; + public string PhysicalPath { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileProviders.Physical.PhysicalFileInfo` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalFileInfo : Microsoft.Extensions.FileProviders.IFileInfo + { + public System.IO.Stream CreateReadStream() => throw null; + public bool Exists { get => throw null; } + public bool IsDirectory { get => throw null; } + public System.DateTimeOffset LastModified { get => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public PhysicalFileInfo(System.IO.FileInfo info) => throw null; + public string PhysicalPath { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhysicalFilesWatcher : System.IDisposable + { + public Microsoft.Extensions.Primitives.IChangeToken CreateFileChangeToken(string filter) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public PhysicalFilesWatcher(string root, System.IO.FileSystemWatcher fileSystemWatcher, bool pollForChanges, Microsoft.Extensions.FileProviders.Physical.ExclusionFilters filters) => throw null; + public PhysicalFilesWatcher(string root, System.IO.FileSystemWatcher fileSystemWatcher, bool pollForChanges) => throw null; + // ERR: Stub generator didn't handle member: ~PhysicalFilesWatcher + } + + // Generated from `Microsoft.Extensions.FileProviders.Physical.PollingFileChangeToken` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PollingFileChangeToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + public bool HasChanged { get => throw null; } + public PollingFileChangeToken(System.IO.FileInfo fileInfo) => throw null; + public System.IDisposable RegisterChangeCallback(System.Action callback, object state) => throw null; + } + + // Generated from `Microsoft.Extensions.FileProviders.Physical.PollingWildCardChangeToken` in `Microsoft.Extensions.FileProviders.Physical, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PollingWildCardChangeToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + protected virtual System.DateTime GetLastWriteUtc(string path) => throw null; + public bool HasChanged { get => throw null; } + public PollingWildCardChangeToken(string root, string pattern) => throw null; + System.IDisposable Microsoft.Extensions.Primitives.IChangeToken.RegisterChangeCallback(System.Action callback, object state) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs new file mode 100644 index 000000000000..735adebf356b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs @@ -0,0 +1,347 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace FileSystemGlobbing + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.FilePatternMatch` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FilePatternMatch : System.IEquatable + { + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.Extensions.FileSystemGlobbing.FilePatternMatch other) => throw null; + public FilePatternMatch(string path, string stem) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public string Path { get => throw null; } + public string Stem { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.InMemoryDirectoryInfo` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class InMemoryDirectoryInfo : Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase + { + public override System.Collections.Generic.IEnumerable EnumerateFileSystemInfos() => throw null; + public override string FullName { get => throw null; } + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase GetDirectory(string path) => throw null; + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase GetFile(string path) => throw null; + public InMemoryDirectoryInfo(string rootDir, System.Collections.Generic.IEnumerable files) => throw null; + public override string Name { get => throw null; } + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase ParentDirectory { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Matcher` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Matcher + { + public virtual Microsoft.Extensions.FileSystemGlobbing.Matcher AddExclude(string pattern) => throw null; + public virtual Microsoft.Extensions.FileSystemGlobbing.Matcher AddInclude(string pattern) => throw null; + public virtual Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Execute(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directoryInfo) => throw null; + public Matcher(System.StringComparison comparisonType) => throw null; + public Matcher() => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.MatcherExtensions` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class MatcherExtensions + { + public static void AddExcludePatterns(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, params System.Collections.Generic.IEnumerable[] excludePatternsGroups) => throw null; + public static void AddIncludePatterns(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, params System.Collections.Generic.IEnumerable[] includePatternsGroups) => throw null; + public static System.Collections.Generic.IEnumerable GetResultsInFullPath(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string directoryPath) => throw null; + public static Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Match(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string rootDir, string file) => throw null; + public static Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Match(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string rootDir, System.Collections.Generic.IEnumerable files) => throw null; + public static Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Match(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, string file) => throw null; + public static Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Match(this Microsoft.Extensions.FileSystemGlobbing.Matcher matcher, System.Collections.Generic.IEnumerable files) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternMatchingResult + { + public System.Collections.Generic.IEnumerable Files { get => throw null; set => throw null; } + public bool HasMatches { get => throw null; } + public PatternMatchingResult(System.Collections.Generic.IEnumerable files, bool hasMatches) => throw null; + public PatternMatchingResult(System.Collections.Generic.IEnumerable files) => throw null; + } + + namespace Abstractions + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class DirectoryInfoBase : Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase + { + protected DirectoryInfoBase() => throw null; + public abstract System.Collections.Generic.IEnumerable EnumerateFileSystemInfos(); + public abstract Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase GetDirectory(string path); + public abstract Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase GetFile(string path); + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DirectoryInfoWrapper : Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase + { + public DirectoryInfoWrapper(System.IO.DirectoryInfo directoryInfo) => throw null; + public override System.Collections.Generic.IEnumerable EnumerateFileSystemInfos() => throw null; + public override string FullName { get => throw null; } + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase GetDirectory(string name) => throw null; + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase GetFile(string name) => throw null; + public override string Name { get => throw null; } + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase ParentDirectory { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FileInfoBase : Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase + { + protected FileInfoBase() => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoWrapper` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class FileInfoWrapper : Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase + { + public FileInfoWrapper(System.IO.FileInfo fileInfo) => throw null; + public override string FullName { get => throw null; } + public override string Name { get => throw null; } + public override Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase ParentDirectory { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class FileSystemInfoBase + { + protected FileSystemInfoBase() => throw null; + public abstract string FullName { get; } + public abstract string Name { get; } + public abstract Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase ParentDirectory { get; } + } + + } + namespace Internal + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILinearPattern : Microsoft.Extensions.FileSystemGlobbing.Internal.IPattern + { + System.Collections.Generic.IList Segments { get; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPathSegment + { + bool CanProduceStem { get; } + bool Match(string value); + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.IPattern` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPattern + { + Microsoft.Extensions.FileSystemGlobbing.Internal.IPatternContext CreatePatternContextForExclude(); + Microsoft.Extensions.FileSystemGlobbing.Internal.IPatternContext CreatePatternContextForInclude(); + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.IPatternContext` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPatternContext + { + void Declare(System.Action onDeclare); + void PopDirectory(); + void PushDirectory(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory); + bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory); + Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase file); + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRaggedPattern : Microsoft.Extensions.FileSystemGlobbing.Internal.IPattern + { + System.Collections.Generic.IList> Contains { get; } + System.Collections.Generic.IList EndsWith { get; } + System.Collections.Generic.IList Segments { get; } + System.Collections.Generic.IList StartsWith { get; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MatcherContext + { + public Microsoft.Extensions.FileSystemGlobbing.PatternMatchingResult Execute() => throw null; + public MatcherContext(System.Collections.Generic.IEnumerable includePatterns, System.Collections.Generic.IEnumerable excludePatterns, Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directoryInfo, System.StringComparison comparison) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct PatternTestResult + { + public static Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Failed; + public bool IsSuccessful { get => throw null; } + // Stub generator skipped constructor + public string Stem { get => throw null; } + public static Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Success(string stem) => throw null; + } + + namespace PathSegments + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.CurrentPathSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CurrentPathSegment : Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment + { + public bool CanProduceStem { get => throw null; } + public CurrentPathSegment() => throw null; + public bool Match(string value) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.LiteralPathSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LiteralPathSegment : Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment + { + public bool CanProduceStem { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public LiteralPathSegment(string value, System.StringComparison comparisonType) => throw null; + public bool Match(string value) => throw null; + public string Value { get => throw null; } + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.ParentPathSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ParentPathSegment : Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment + { + public bool CanProduceStem { get => throw null; } + public bool Match(string value) => throw null; + public ParentPathSegment() => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.RecursiveWildcardSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RecursiveWildcardSegment : Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment + { + public bool CanProduceStem { get => throw null; } + public bool Match(string value) => throw null; + public RecursiveWildcardSegment() => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.WildcardPathSegment` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WildcardPathSegment : Microsoft.Extensions.FileSystemGlobbing.Internal.IPathSegment + { + public string BeginsWith { get => throw null; } + public bool CanProduceStem { get => throw null; } + public System.Collections.Generic.List Contains { get => throw null; } + public string EndsWith { get => throw null; } + public bool Match(string value) => throw null; + public static Microsoft.Extensions.FileSystemGlobbing.Internal.PathSegments.WildcardPathSegment MatchAll; + public WildcardPathSegment(string beginsWith, System.Collections.Generic.List contains, string endsWith, System.StringComparison comparisonType) => throw null; + } + + } + namespace PatternContexts + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContext<>` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PatternContext : Microsoft.Extensions.FileSystemGlobbing.Internal.IPatternContext + { + public virtual void Declare(System.Action declare) => throw null; + protected TFrame Frame; + protected bool IsStackEmpty() => throw null; + protected PatternContext() => throw null; + public virtual void PopDirectory() => throw null; + protected void PushDataFrame(TFrame frame) => throw null; + public abstract void PushDirectory(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory); + public abstract bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory); + public abstract Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase file); + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PatternContextLinear : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContext + { + protected string CalculateStem(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase matchedFile) => throw null; + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear.FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FrameData + { + // Stub generator skipped constructor + public bool InStem; + public bool IsNotApplicable; + public int SegmentIndex; + public string Stem { get => throw null; } + public System.Collections.Generic.IList StemItems { get => throw null; } + } + + + protected bool IsLastSegment() => throw null; + protected Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern Pattern { get => throw null; } + public PatternContextLinear(Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern pattern) => throw null; + public override void PushDirectory(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + public override Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase file) => throw null; + protected bool TestMatchingSegment(string value) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinearExclude` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternContextLinearExclude : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear + { + public PatternContextLinearExclude(Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern pattern) : base(default(Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern)) => throw null; + public override bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinearInclude` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternContextLinearInclude : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear + { + public override void Declare(System.Action onDeclare) => throw null; + public PatternContextLinearInclude(Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern pattern) : base(default(Microsoft.Extensions.FileSystemGlobbing.Internal.ILinearPattern)) => throw null; + public override bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PatternContextRagged : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContext + { + protected string CalculateStem(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase matchedFile) => throw null; + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged.FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct FrameData + { + public int BacktrackAvailable; + // Stub generator skipped constructor + public bool InStem; + public bool IsNotApplicable; + public System.Collections.Generic.IList SegmentGroup; + public int SegmentGroupIndex; + public int SegmentIndex; + public string Stem { get => throw null; } + public System.Collections.Generic.IList StemItems { get => throw null; } + } + + + protected bool IsEndingGroup() => throw null; + protected bool IsStartingGroup() => throw null; + protected Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern Pattern { get => throw null; } + public PatternContextRagged(Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern pattern) => throw null; + public override void PopDirectory() => throw null; + public override void PushDirectory(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + public override Microsoft.Extensions.FileSystemGlobbing.Internal.PatternTestResult Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase file) => throw null; + protected bool TestMatchingGroup(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileSystemInfoBase value) => throw null; + protected bool TestMatchingSegment(string value) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRaggedExclude` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternContextRaggedExclude : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged + { + public PatternContextRaggedExclude(Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern pattern) : base(default(Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern)) => throw null; + public override bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + } + + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRaggedInclude` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternContextRaggedInclude : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged + { + public override void Declare(System.Action onDeclare) => throw null; + public PatternContextRaggedInclude(Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern pattern) : base(default(Microsoft.Extensions.FileSystemGlobbing.Internal.IRaggedPattern)) => throw null; + public override bool Test(Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoBase directory) => throw null; + } + + } + namespace Patterns + { + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.Patterns.PatternBuilder` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PatternBuilder + { + public Microsoft.Extensions.FileSystemGlobbing.Internal.IPattern Build(string pattern) => throw null; + public System.StringComparison ComparisonType { get => throw null; } + public PatternBuilder(System.StringComparison comparisonType) => throw null; + public PatternBuilder() => throw null; + } + + } + } + } + } +} +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs new file mode 100644 index 000000000000..c3cf9ec4770e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs @@ -0,0 +1,184 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.ServiceCollectionHostedServiceExtensions` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ServiceCollectionHostedServiceExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHostedService(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func implementationFactory) where THostedService : class, Microsoft.Extensions.Hosting.IHostedService => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHostedService(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where THostedService : class, Microsoft.Extensions.Hosting.IHostedService => throw null; + } + + } + namespace Hosting + { + // Generated from `Microsoft.Extensions.Hosting.BackgroundService` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class BackgroundService : System.IDisposable, Microsoft.Extensions.Hosting.IHostedService + { + protected BackgroundService() => throw null; + public virtual void Dispose() => throw null; + protected abstract System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken stoppingToken); + public virtual System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.EnvironmentName` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EnvironmentName + { + public static string Development; + public static string Production; + public static string Staging; + } + + // Generated from `Microsoft.Extensions.Hosting.Environments` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Environments + { + public static string Development; + public static string Production; + public static string Staging; + } + + // Generated from `Microsoft.Extensions.Hosting.HostBuilderContext` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostBuilderContext + { + public Microsoft.Extensions.Configuration.IConfiguration Configuration { get => throw null; set => throw null; } + public HostBuilderContext(System.Collections.Generic.IDictionary properties) => throw null; + public Microsoft.Extensions.Hosting.IHostEnvironment HostingEnvironment { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Hosting.HostDefaults` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostDefaults + { + public static string ApplicationKey; + public static string ContentRootKey; + public static string EnvironmentKey; + } + + // Generated from `Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostEnvironmentEnvExtensions + { + public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment) => throw null; + public static bool IsEnvironment(this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment, string environmentName) => throw null; + public static bool IsProduction(this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment) => throw null; + public static bool IsStaging(this Microsoft.Extensions.Hosting.IHostEnvironment hostEnvironment) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.HostingAbstractionsHostBuilderExtensions` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostingAbstractionsHostBuilderExtensions + { + public static Microsoft.Extensions.Hosting.IHost Start(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder) => throw null; + public static System.Threading.Tasks.Task StartAsync(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostingAbstractionsHostExtensions + { + public static void Run(this Microsoft.Extensions.Hosting.IHost host) => throw null; + public static System.Threading.Tasks.Task RunAsync(this Microsoft.Extensions.Hosting.IHost host, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + public static void Start(this Microsoft.Extensions.Hosting.IHost host) => throw null; + public static System.Threading.Tasks.Task StopAsync(this Microsoft.Extensions.Hosting.IHost host, System.TimeSpan timeout) => throw null; + public static void WaitForShutdown(this Microsoft.Extensions.Hosting.IHost host) => throw null; + public static System.Threading.Tasks.Task WaitForShutdownAsync(this Microsoft.Extensions.Hosting.IHost host, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.HostingEnvironmentExtensions` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostingEnvironmentExtensions + { + public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + public static bool IsEnvironment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment, string environmentName) => throw null; + public static bool IsProduction(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + public static bool IsStaging(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.IApplicationLifetime` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IApplicationLifetime + { + System.Threading.CancellationToken ApplicationStarted { get; } + System.Threading.CancellationToken ApplicationStopped { get; } + System.Threading.CancellationToken ApplicationStopping { get; } + void StopApplication(); + } + + // Generated from `Microsoft.Extensions.Hosting.IHost` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHost : System.IDisposable + { + System.IServiceProvider Services { get; } + System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.Extensions.Hosting.IHostApplicationLifetime` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostApplicationLifetime + { + System.Threading.CancellationToken ApplicationStarted { get; } + System.Threading.CancellationToken ApplicationStopped { get; } + System.Threading.CancellationToken ApplicationStopping { get; } + void StopApplication(); + } + + // Generated from `Microsoft.Extensions.Hosting.IHostBuilder` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostBuilder + { + Microsoft.Extensions.Hosting.IHost Build(); + Microsoft.Extensions.Hosting.IHostBuilder ConfigureAppConfiguration(System.Action configureDelegate); + Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer(System.Action configureDelegate); + Microsoft.Extensions.Hosting.IHostBuilder ConfigureHostConfiguration(System.Action configureDelegate); + Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices(System.Action configureDelegate); + System.Collections.Generic.IDictionary Properties { get; } + Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory(System.Func> factory); + Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory); + } + + // Generated from `Microsoft.Extensions.Hosting.IHostEnvironment` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostEnvironment + { + string ApplicationName { get; set; } + Microsoft.Extensions.FileProviders.IFileProvider ContentRootFileProvider { get; set; } + string ContentRootPath { get; set; } + string EnvironmentName { get; set; } + } + + // Generated from `Microsoft.Extensions.Hosting.IHostLifetime` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostLifetime + { + System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task WaitForStartAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.Extensions.Hosting.IHostedService` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostedService + { + System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.Extensions.Hosting.IHostingEnvironment` in `Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHostingEnvironment + { + string ApplicationName { get; set; } + Microsoft.Extensions.FileProviders.IFileProvider ContentRootFileProvider { get; set; } + string ContentRootPath { get; set; } + string EnvironmentName { get; set; } + } + + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'DynamicallyAccessedMemberTypes' is not stubbed in this assembly 'Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMembersAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs new file mode 100644 index 000000000000..b22998950d0d --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs @@ -0,0 +1,99 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Hosting + { + // Generated from `Microsoft.Extensions.Hosting.ConsoleLifetimeOptions` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsoleLifetimeOptions + { + public ConsoleLifetimeOptions() => throw null; + public bool SuppressStatusMessages { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Hosting.Host` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Host + { + public static Microsoft.Extensions.Hosting.IHostBuilder CreateDefaultBuilder(string[] args) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder CreateDefaultBuilder() => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.HostBuilder` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostBuilder : Microsoft.Extensions.Hosting.IHostBuilder + { + public Microsoft.Extensions.Hosting.IHost Build() => throw null; + public Microsoft.Extensions.Hosting.IHostBuilder ConfigureAppConfiguration(System.Action configureDelegate) => throw null; + public Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer(System.Action configureDelegate) => throw null; + public Microsoft.Extensions.Hosting.IHostBuilder ConfigureHostConfiguration(System.Action configureDelegate) => throw null; + public Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices(System.Action configureDelegate) => throw null; + public HostBuilder() => throw null; + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory(System.Func> factory) => throw null; + public Microsoft.Extensions.Hosting.IHostBuilder UseServiceProviderFactory(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory factory) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.HostOptions` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostOptions + { + public HostOptions() => throw null; + public System.TimeSpan ShutdownTimeout { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Hosting.HostingHostBuilderExtensions` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HostingHostBuilderExtensions + { + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureAppConfiguration(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureDelegate) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureContainer(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureDelegate) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureLogging(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureLogging) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureLogging(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureLogging) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureDelegate) => throw null; + public static System.Threading.Tasks.Task RunConsoleAsync(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task RunConsoleAsync(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configureOptions) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseContentRoot(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, string contentRoot) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseDefaultServiceProvider(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configure) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseDefaultServiceProvider(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Action configure) => throw null; + public static Microsoft.Extensions.Hosting.IHostBuilder UseEnvironment(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, string environment) => throw null; + } + + namespace Internal + { + // Generated from `Microsoft.Extensions.Hosting.Internal.ApplicationLifetime` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ApplicationLifetime : Microsoft.Extensions.Hosting.IHostApplicationLifetime, Microsoft.Extensions.Hosting.IApplicationLifetime + { + public ApplicationLifetime(Microsoft.Extensions.Logging.ILogger logger) => throw null; + public System.Threading.CancellationToken ApplicationStarted { get => throw null; } + public System.Threading.CancellationToken ApplicationStopped { get => throw null; } + public System.Threading.CancellationToken ApplicationStopping { get => throw null; } + public void NotifyStarted() => throw null; + public void NotifyStopped() => throw null; + public void StopApplication() => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.Internal.ConsoleLifetime` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsoleLifetime : System.IDisposable, Microsoft.Extensions.Hosting.IHostLifetime + { + public ConsoleLifetime(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Options.IOptions hostOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + public ConsoleLifetime(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Options.IOptions hostOptions) => throw null; + public void Dispose() => throw null; + public System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WaitForStartAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.Extensions.Hosting.Internal.HostingEnvironment` in `Microsoft.Extensions.Hosting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HostingEnvironment : Microsoft.Extensions.Hosting.IHostingEnvironment, Microsoft.Extensions.Hosting.IHostEnvironment + { + public string ApplicationName { get => throw null; set => throw null; } + public Microsoft.Extensions.FileProviders.IFileProvider ContentRootFileProvider { get => throw null; set => throw null; } + public string ContentRootPath { get => throw null; set => throw null; } + public string EnvironmentName { get => throw null; set => throw null; } + public HostingEnvironment() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs new file mode 100644 index 000000000000..67269c5397b7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs @@ -0,0 +1,164 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.HttpClientBuilderExtensions` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpClientBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder) where THandler : System.Net.Http.DelegatingHandler => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func configureHandler) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func configureHandler) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddTypedClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func factory) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddTypedClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func factory) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddTypedClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddTypedClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Action configureClient) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpClient(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Action configureClient) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigureHttpMessageHandlerBuilder(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Action configureBuilder) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder) where THandler : System.Net.Http.HttpMessageHandler => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func configureHandler) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func configureHandler) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RedactLoggedHeaders(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Func shouldRedactHeaderValue) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder RedactLoggedHeaders(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.Collections.Generic.IEnumerable redactedLoggedHeaderNames) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder SetHandlerLifetime(this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, System.TimeSpan handlerLifetime) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.HttpClientFactoryServiceCollectionExtensions` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpClientFactoryServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureClient) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureClient) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TClient : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Func factory) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Func factory) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func factory) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Func factory) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureClient) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureClient) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TClient : class where TImplementation : class, TClient => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureClient) => throw null; + public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.IHttpClientBuilder` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpClientBuilder + { + string Name { get; } + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + } + namespace Http + { + // Generated from `Microsoft.Extensions.Http.HttpClientFactoryOptions` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HttpClientFactoryOptions + { + public System.TimeSpan HandlerLifetime { get => throw null; set => throw null; } + public System.Collections.Generic.IList> HttpClientActions { get => throw null; } + public HttpClientFactoryOptions() => throw null; + public System.Collections.Generic.IList> HttpMessageHandlerBuilderActions { get => throw null; } + public System.Func ShouldRedactHeaderValue { get => throw null; set => throw null; } + public bool SuppressHandlerScope { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Http.HttpMessageHandlerBuilder` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class HttpMessageHandlerBuilder + { + public abstract System.Collections.Generic.IList AdditionalHandlers { get; } + public abstract System.Net.Http.HttpMessageHandler Build(); + protected internal static System.Net.Http.HttpMessageHandler CreateHandlerPipeline(System.Net.Http.HttpMessageHandler primaryHandler, System.Collections.Generic.IEnumerable additionalHandlers) => throw null; + protected HttpMessageHandlerBuilder() => throw null; + public abstract string Name { get; set; } + public abstract System.Net.Http.HttpMessageHandler PrimaryHandler { get; set; } + public virtual System.IServiceProvider Services { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Http.IHttpMessageHandlerBuilderFilter` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMessageHandlerBuilderFilter + { + System.Action Configure(System.Action next); + } + + // Generated from `Microsoft.Extensions.Http.ITypedHttpClientFactory<>` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ITypedHttpClientFactory + { + TClient CreateClient(System.Net.Http.HttpClient httpClient); + } + + namespace Logging + { + // Generated from `Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggingHttpMessageHandler : System.Net.Http.DelegatingHandler + { + public LoggingHttpMessageHandler(Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Http.HttpClientFactoryOptions options) => throw null; + public LoggingHttpMessageHandler(Microsoft.Extensions.Logging.ILogger logger) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggingScopeHttpMessageHandler : System.Net.Http.DelegatingHandler + { + public LoggingScopeHttpMessageHandler(Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Http.HttpClientFactoryOptions options) => throw null; + public LoggingScopeHttpMessageHandler(Microsoft.Extensions.Logging.ILogger logger) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + } + + } + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'DynamicallyAccessedMemberTypes' is not stubbed in this assembly 'Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMembersAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } + namespace Net + { + namespace Http + { + // Generated from `System.Net.Http.HttpClientFactoryExtensions` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpClientFactoryExtensions + { + public static System.Net.Http.HttpClient CreateClient(this System.Net.Http.IHttpClientFactory factory) => throw null; + } + + // Generated from `System.Net.Http.HttpMessageHandlerFactoryExtensions` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HttpMessageHandlerFactoryExtensions + { + public static System.Net.Http.HttpMessageHandler CreateHandler(this System.Net.Http.IHttpMessageHandlerFactory factory) => throw null; + } + + // Generated from `System.Net.Http.IHttpClientFactory` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpClientFactory + { + System.Net.Http.HttpClient CreateClient(string name); + } + + // Generated from `System.Net.Http.IHttpMessageHandlerFactory` in `Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IHttpMessageHandlerFactory + { + System.Net.Http.HttpMessageHandler CreateHandler(string name); + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs new file mode 100644 index 000000000000..ca58895ac701 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs @@ -0,0 +1,774 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Identity + { + // Generated from `Microsoft.AspNetCore.Identity.AuthenticatorTokenProvider<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class AuthenticatorTokenProvider : Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider where TUser : class + { + public AuthenticatorTokenProvider() => throw null; + public virtual System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public virtual System.Threading.Tasks.Task ValidateAsync(string purpose, string token, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.ClaimsIdentityOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ClaimsIdentityOptions + { + public ClaimsIdentityOptions() => throw null; + public string EmailClaimType { get => throw null; set => throw null; } + public string RoleClaimType { get => throw null; set => throw null; } + public string SecurityStampClaimType { get => throw null; set => throw null; } + public string UserIdClaimType { get => throw null; set => throw null; } + public string UserNameClaimType { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.DefaultPersonalDataProtector` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultPersonalDataProtector : Microsoft.AspNetCore.Identity.IPersonalDataProtector + { + public DefaultPersonalDataProtector(Microsoft.AspNetCore.Identity.ILookupProtectorKeyRing keyRing, Microsoft.AspNetCore.Identity.ILookupProtector protector) => throw null; + public virtual string Protect(string data) => throw null; + public virtual string Unprotect(string data) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.DefaultUserConfirmation<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultUserConfirmation : Microsoft.AspNetCore.Identity.IUserConfirmation where TUser : class + { + public DefaultUserConfirmation() => throw null; + public virtual System.Threading.Tasks.Task IsConfirmedAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.EmailTokenProvider<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EmailTokenProvider : Microsoft.AspNetCore.Identity.TotpSecurityStampBasedTokenProvider where TUser : class + { + public override System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public EmailTokenProvider() => throw null; + public override System.Threading.Tasks.Task GetUserModifierAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.ILookupNormalizer` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILookupNormalizer + { + string NormalizeEmail(string email); + string NormalizeName(string name); + } + + // Generated from `Microsoft.AspNetCore.Identity.ILookupProtector` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILookupProtector + { + string Protect(string keyId, string data); + string Unprotect(string keyId, string data); + } + + // Generated from `Microsoft.AspNetCore.Identity.ILookupProtectorKeyRing` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILookupProtectorKeyRing + { + string CurrentKeyId { get; } + System.Collections.Generic.IEnumerable GetAllKeyIds(); + string this[string keyId] { get; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IPasswordHasher<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPasswordHasher where TUser : class + { + string HashPassword(TUser user, string password); + Microsoft.AspNetCore.Identity.PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword); + } + + // Generated from `Microsoft.AspNetCore.Identity.IPasswordValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPasswordValidator where TUser : class + { + System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user, string password); + } + + // Generated from `Microsoft.AspNetCore.Identity.IPersonalDataProtector` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPersonalDataProtector + { + string Protect(string data); + string Unprotect(string data); + } + + // Generated from `Microsoft.AspNetCore.Identity.IProtectedUserStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IProtectedUserStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + } + + // Generated from `Microsoft.AspNetCore.Identity.IQueryableRoleStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IQueryableRoleStore : System.IDisposable, Microsoft.AspNetCore.Identity.IRoleStore where TRole : class + { + System.Linq.IQueryable Roles { get; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IQueryableUserStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IQueryableUserStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Linq.IQueryable Users { get; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IRoleClaimStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRoleClaimStore : System.IDisposable, Microsoft.AspNetCore.Identity.IRoleStore where TRole : class + { + System.Threading.Tasks.Task AddClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetClaimsAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RemoveClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Identity.IRoleStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRoleStore : System.IDisposable where TRole : class + { + System.Threading.Tasks.Task CreateAsync(TRole role, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task DeleteAsync(TRole role, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task FindByIdAsync(string roleId, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task FindByNameAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetNormalizedRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetRoleIdAsync(TRole role, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetNormalizedRoleNameAsync(TRole role, string normalizedName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetRoleNameAsync(TRole role, string roleName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task UpdateAsync(TRole role, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IRoleValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IRoleValidator where TRole : class + { + System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.RoleManager manager, TRole role); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserAuthenticationTokenStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task RemoveTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetTokenAsync(TUser user, string loginProvider, string name, string value, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserAuthenticatorKeyStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserAuthenticatorKeyStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetAuthenticatorKeyAsync(TUser user, string key, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserClaimStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserClaimStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task AddClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetClaimsAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetUsersForClaimAsync(System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task RemoveClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ReplaceClaimAsync(TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserClaimsPrincipalFactory where TUser : class + { + System.Threading.Tasks.Task CreateAsync(TUser user); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserConfirmation<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserConfirmation where TUser : class + { + System.Threading.Tasks.Task IsConfirmedAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserEmailStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserEmailStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task FindByEmailAsync(string normalizedEmail, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetEmailConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetNormalizedEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetEmailAsync(TUser user, string email, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetEmailConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetNormalizedEmailAsync(TUser user, string normalizedEmail, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserLockoutStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserLockoutStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetLockoutEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetLockoutEndDateAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task IncrementAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ResetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetLockoutEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetLockoutEndDateAsync(TUser user, System.DateTimeOffset? lockoutEnd, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserLoginStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserLoginStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task AddLoginAsync(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task FindByLoginAsync(string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetLoginsAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserPasswordStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserPasswordStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetPasswordHashAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task HasPasswordAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetPasswordHashAsync(TUser user, string passwordHash, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserPhoneNumberStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserPhoneNumberStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetPhoneNumberAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetPhoneNumberConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetPhoneNumberAsync(TUser user, string phoneNumber, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserRoleStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserRoleStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task AddToRoleAsync(TUser user, string roleName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetRolesAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetUsersInRoleAsync(string roleName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task IsInRoleAsync(TUser user, string roleName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task RemoveFromRoleAsync(TUser user, string roleName, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserSecurityStampStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserSecurityStampStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetSecurityStampAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetSecurityStampAsync(TUser user, string stamp, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserStore : System.IDisposable where TUser : class + { + System.Threading.Tasks.Task CreateAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task DeleteAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task FindByIdAsync(string userId, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task FindByNameAsync(string normalizedUserName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetNormalizedUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetUserIdAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task GetUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetNormalizedUserNameAsync(TUser user, string normalizedName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetUserNameAsync(TUser user, string userName, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task UpdateAsync(TUser user, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserTwoFactorRecoveryCodeStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserTwoFactorRecoveryCodeStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task CountCodesAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task RedeemCodeAsync(TUser user, string code, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ReplaceCodesAsync(TUser user, System.Collections.Generic.IEnumerable recoveryCodes, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserTwoFactorStore<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserTwoFactorStore : System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore where TUser : class + { + System.Threading.Tasks.Task GetTwoFactorEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task SetTwoFactorEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserTwoFactorTokenProvider where TUser : class + { + System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + System.Threading.Tasks.Task GenerateAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + System.Threading.Tasks.Task ValidateAsync(string purpose, string token, Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + } + + // Generated from `Microsoft.AspNetCore.Identity.IUserValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IUserValidator where TUser : class + { + System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityBuilder` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityBuilder + { + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddClaimsPrincipalFactory() where TFactory : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddErrorDescriber() where TDescriber : Microsoft.AspNetCore.Identity.IdentityErrorDescriber => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddPasswordValidator() where TValidator : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddPersonalDataProtection() where TKeyRing : class, Microsoft.AspNetCore.Identity.ILookupProtectorKeyRing where TProtector : class, Microsoft.AspNetCore.Identity.ILookupProtector => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoleManager() where TRoleManager : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoleStore() where TStore : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoleValidator() where TRole : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoles() where TRole : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddTokenProvider(string providerName) where TProvider : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddTokenProvider(string providerName, System.Type provider) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddUserConfirmation() where TUserConfirmation : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddUserManager() where TUserManager : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddUserStore() where TStore : class => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddUserValidator() where TValidator : class => throw null; + public IdentityBuilder(System.Type user, System.Type role, Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public IdentityBuilder(System.Type user, Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public System.Type RoleType { get => throw null; } + public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get => throw null; } + public System.Type UserType { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityError` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityError + { + public string Code { get => throw null; set => throw null; } + public string Description { get => throw null; set => throw null; } + public IdentityError() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityErrorDescriber` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityErrorDescriber + { + public virtual Microsoft.AspNetCore.Identity.IdentityError ConcurrencyFailure() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError DefaultError() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError DuplicateEmail(string email) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError DuplicateRoleName(string role) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError DuplicateUserName(string userName) => throw null; + public IdentityErrorDescriber() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError InvalidEmail(string email) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError InvalidRoleName(string role) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError InvalidToken() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError InvalidUserName(string userName) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError LoginAlreadyAssociated() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordMismatch() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordRequiresDigit() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordRequiresLower() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordRequiresNonAlphanumeric() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordRequiresUniqueChars(int uniqueChars) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordRequiresUpper() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError PasswordTooShort(int length) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError RecoveryCodeRedemptionFailed() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError UserAlreadyHasPassword() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError UserAlreadyInRole(string role) => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError UserLockoutNotEnabled() => throw null; + public virtual Microsoft.AspNetCore.Identity.IdentityError UserNotInRole(string role) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityOptions + { + public Microsoft.AspNetCore.Identity.ClaimsIdentityOptions ClaimsIdentity { get => throw null; set => throw null; } + public IdentityOptions() => throw null; + public Microsoft.AspNetCore.Identity.LockoutOptions Lockout { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.PasswordOptions Password { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.SignInOptions SignIn { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.StoreOptions Stores { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.TokenOptions Tokens { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.UserOptions User { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityResult` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityResult + { + public System.Collections.Generic.IEnumerable Errors { get => throw null; } + public static Microsoft.AspNetCore.Identity.IdentityResult Failed(params Microsoft.AspNetCore.Identity.IdentityError[] errors) => throw null; + public IdentityResult() => throw null; + public bool Succeeded { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Identity.IdentityResult Success { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.LockoutOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LockoutOptions + { + public bool AllowedForNewUsers { get => throw null; set => throw null; } + public System.TimeSpan DefaultLockoutTimeSpan { get => throw null; set => throw null; } + public LockoutOptions() => throw null; + public int MaxFailedAccessAttempts { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordHasher<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PasswordHasher : Microsoft.AspNetCore.Identity.IPasswordHasher where TUser : class + { + public virtual string HashPassword(TUser user, string password) => throw null; + public PasswordHasher(Microsoft.Extensions.Options.IOptions optionsAccessor = default(Microsoft.Extensions.Options.IOptions)) => throw null; + public virtual Microsoft.AspNetCore.Identity.PasswordVerificationResult VerifyHashedPassword(TUser user, string hashedPassword, string providedPassword) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordHasherCompatibilityMode` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum PasswordHasherCompatibilityMode + { + IdentityV2, + IdentityV3, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordHasherOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PasswordHasherOptions + { + public Microsoft.AspNetCore.Identity.PasswordHasherCompatibilityMode CompatibilityMode { get => throw null; set => throw null; } + public int IterationCount { get => throw null; set => throw null; } + public PasswordHasherOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PasswordOptions + { + public PasswordOptions() => throw null; + public bool RequireDigit { get => throw null; set => throw null; } + public bool RequireLowercase { get => throw null; set => throw null; } + public bool RequireNonAlphanumeric { get => throw null; set => throw null; } + public bool RequireUppercase { get => throw null; set => throw null; } + public int RequiredLength { get => throw null; set => throw null; } + public int RequiredUniqueChars { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PasswordValidator : Microsoft.AspNetCore.Identity.IPasswordValidator where TUser : class + { + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber Describer { get => throw null; } + public virtual bool IsDigit(System.Char c) => throw null; + public virtual bool IsLetterOrDigit(System.Char c) => throw null; + public virtual bool IsLower(System.Char c) => throw null; + public virtual bool IsUpper(System.Char c) => throw null; + public PasswordValidator(Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors = default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) => throw null; + public virtual System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user, string password) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.PasswordVerificationResult` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum PasswordVerificationResult + { + Failed, + // Stub generator skipped constructor + Success, + SuccessRehashNeeded, + } + + // Generated from `Microsoft.AspNetCore.Identity.PersonalDataAttribute` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PersonalDataAttribute : System.Attribute + { + public PersonalDataAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.PhoneNumberTokenProvider<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PhoneNumberTokenProvider : Microsoft.AspNetCore.Identity.TotpSecurityStampBasedTokenProvider where TUser : class + { + public override System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public override System.Threading.Tasks.Task GetUserModifierAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public PhoneNumberTokenProvider() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.ProtectedPersonalDataAttribute` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProtectedPersonalDataAttribute : Microsoft.AspNetCore.Identity.PersonalDataAttribute + { + public ProtectedPersonalDataAttribute() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.RoleManager<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoleManager : System.IDisposable where TRole : class + { + public virtual System.Threading.Tasks.Task AddClaimAsync(TRole role, System.Security.Claims.Claim claim) => throw null; + protected virtual System.Threading.CancellationToken CancellationToken { get => throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(TRole role) => throw null; + public virtual System.Threading.Tasks.Task DeleteAsync(TRole role) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task FindByIdAsync(string roleId) => throw null; + public virtual System.Threading.Tasks.Task FindByNameAsync(string roleName) => throw null; + public virtual System.Threading.Tasks.Task> GetClaimsAsync(TRole role) => throw null; + public virtual System.Threading.Tasks.Task GetRoleIdAsync(TRole role) => throw null; + public virtual System.Threading.Tasks.Task GetRoleNameAsync(TRole role) => throw null; + public Microsoft.AspNetCore.Identity.ILookupNormalizer KeyNormalizer { get => throw null; set => throw null; } + public virtual Microsoft.Extensions.Logging.ILogger Logger { get => throw null; set => throw null; } + public virtual string NormalizeKey(string key) => throw null; + public virtual System.Threading.Tasks.Task RemoveClaimAsync(TRole role, System.Security.Claims.Claim claim) => throw null; + public virtual System.Threading.Tasks.Task RoleExistsAsync(string roleName) => throw null; + public RoleManager(Microsoft.AspNetCore.Identity.IRoleStore store, System.Collections.Generic.IEnumerable> roleValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, Microsoft.Extensions.Logging.ILogger> logger) => throw null; + public System.Collections.Generic.IList> RoleValidators { get => throw null; } + public virtual System.Linq.IQueryable Roles { get => throw null; } + public virtual System.Threading.Tasks.Task SetRoleNameAsync(TRole role, string name) => throw null; + protected Microsoft.AspNetCore.Identity.IRoleStore Store { get => throw null; } + public virtual bool SupportsQueryableRoles { get => throw null; } + public virtual bool SupportsRoleClaims { get => throw null; } + protected void ThrowIfDisposed() => throw null; + public virtual System.Threading.Tasks.Task UpdateAsync(TRole role) => throw null; + public virtual System.Threading.Tasks.Task UpdateNormalizedRoleNameAsync(TRole role) => throw null; + protected virtual System.Threading.Tasks.Task UpdateRoleAsync(TRole role) => throw null; + protected virtual System.Threading.Tasks.Task ValidateRoleAsync(TRole role) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.RoleValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RoleValidator : Microsoft.AspNetCore.Identity.IRoleValidator where TRole : class + { + public RoleValidator(Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors = default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) => throw null; + public virtual System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.RoleManager manager, TRole role) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.SignInOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SignInOptions + { + public bool RequireConfirmedAccount { get => throw null; set => throw null; } + public bool RequireConfirmedEmail { get => throw null; set => throw null; } + public bool RequireConfirmedPhoneNumber { get => throw null; set => throw null; } + public SignInOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.SignInResult` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SignInResult + { + public static Microsoft.AspNetCore.Identity.SignInResult Failed { get => throw null; } + public bool IsLockedOut { get => throw null; set => throw null; } + public bool IsNotAllowed { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Identity.SignInResult LockedOut { get => throw null; } + public static Microsoft.AspNetCore.Identity.SignInResult NotAllowed { get => throw null; } + public bool RequiresTwoFactor { get => throw null; set => throw null; } + public SignInResult() => throw null; + public bool Succeeded { get => throw null; set => throw null; } + public static Microsoft.AspNetCore.Identity.SignInResult Success { get => throw null; } + public override string ToString() => throw null; + public static Microsoft.AspNetCore.Identity.SignInResult TwoFactorRequired { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.StoreOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StoreOptions + { + public int MaxLengthForKeys { get => throw null; set => throw null; } + public bool ProtectPersonalData { get => throw null; set => throw null; } + public StoreOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.TokenOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TokenOptions + { + public string AuthenticatorIssuer { get => throw null; set => throw null; } + public string AuthenticatorTokenProvider { get => throw null; set => throw null; } + public string ChangeEmailTokenProvider { get => throw null; set => throw null; } + public string ChangePhoneNumberTokenProvider { get => throw null; set => throw null; } + public static string DefaultAuthenticatorProvider; + public static string DefaultEmailProvider; + public static string DefaultPhoneProvider; + public static string DefaultProvider; + public string EmailConfirmationTokenProvider { get => throw null; set => throw null; } + public string PasswordResetTokenProvider { get => throw null; set => throw null; } + public System.Collections.Generic.Dictionary ProviderMap { get => throw null; set => throw null; } + public TokenOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.TokenProviderDescriptor` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TokenProviderDescriptor + { + public object ProviderInstance { get => throw null; set => throw null; } + public System.Type ProviderType { get => throw null; } + public TokenProviderDescriptor(System.Type type) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.TotpSecurityStampBasedTokenProvider<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class TotpSecurityStampBasedTokenProvider : Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider where TUser : class + { + public abstract System.Threading.Tasks.Task CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user); + public virtual System.Threading.Tasks.Task GenerateAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetUserModifierAsync(string purpose, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + protected TotpSecurityStampBasedTokenProvider() => throw null; + public virtual System.Threading.Tasks.Task ValidateAsync(string purpose, string token, Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UpperInvariantLookupNormalizer` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UpperInvariantLookupNormalizer : Microsoft.AspNetCore.Identity.ILookupNormalizer + { + public string NormalizeEmail(string email) => throw null; + public string NormalizeName(string name) => throw null; + public UpperInvariantLookupNormalizer() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<,>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserClaimsPrincipalFactory : Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory where TRole : class where TUser : class + { + protected override System.Threading.Tasks.Task GenerateClaimsAsync(TUser user) => throw null; + public Microsoft.AspNetCore.Identity.RoleManager RoleManager { get => throw null; } + public UserClaimsPrincipalFactory(Microsoft.AspNetCore.Identity.UserManager userManager, Microsoft.AspNetCore.Identity.RoleManager roleManager, Microsoft.Extensions.Options.IOptions options) : base(default(Microsoft.AspNetCore.Identity.UserManager), default(Microsoft.Extensions.Options.IOptions)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserClaimsPrincipalFactory : Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory where TUser : class + { + public virtual System.Threading.Tasks.Task CreateAsync(TUser user) => throw null; + protected virtual System.Threading.Tasks.Task GenerateClaimsAsync(TUser user) => throw null; + public Microsoft.AspNetCore.Identity.IdentityOptions Options { get => throw null; } + public UserClaimsPrincipalFactory(Microsoft.AspNetCore.Identity.UserManager userManager, Microsoft.Extensions.Options.IOptions optionsAccessor) => throw null; + public Microsoft.AspNetCore.Identity.UserManager UserManager { get => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.UserLoginInfo` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserLoginInfo + { + public string LoginProvider { get => throw null; set => throw null; } + public string ProviderDisplayName { get => throw null; set => throw null; } + public string ProviderKey { get => throw null; set => throw null; } + public UserLoginInfo(string loginProvider, string providerKey, string displayName) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserManager<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserManager : System.IDisposable where TUser : class + { + public virtual System.Threading.Tasks.Task AccessFailedAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task AddClaimAsync(TUser user, System.Security.Claims.Claim claim) => throw null; + public virtual System.Threading.Tasks.Task AddClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims) => throw null; + public virtual System.Threading.Tasks.Task AddLoginAsync(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login) => throw null; + public virtual System.Threading.Tasks.Task AddPasswordAsync(TUser user, string password) => throw null; + public virtual System.Threading.Tasks.Task AddToRoleAsync(TUser user, string role) => throw null; + public virtual System.Threading.Tasks.Task AddToRolesAsync(TUser user, System.Collections.Generic.IEnumerable roles) => throw null; + protected virtual System.Threading.CancellationToken CancellationToken { get => throw null; } + public virtual System.Threading.Tasks.Task ChangeEmailAsync(TUser user, string newEmail, string token) => throw null; + public virtual System.Threading.Tasks.Task ChangePasswordAsync(TUser user, string currentPassword, string newPassword) => throw null; + public virtual System.Threading.Tasks.Task ChangePhoneNumberAsync(TUser user, string phoneNumber, string token) => throw null; + public const string ChangePhoneNumberTokenPurpose = default; + public virtual System.Threading.Tasks.Task CheckPasswordAsync(TUser user, string password) => throw null; + public virtual System.Threading.Tasks.Task ConfirmEmailAsync(TUser user, string token) => throw null; + public const string ConfirmEmailTokenPurpose = default; + public virtual System.Threading.Tasks.Task CountRecoveryCodesAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task CreateAsync(TUser user, string password) => throw null; + public virtual System.Threading.Tasks.Task CreateAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task CreateSecurityTokenAsync(TUser user) => throw null; + protected virtual string CreateTwoFactorRecoveryCode() => throw null; + public virtual System.Threading.Tasks.Task DeleteAsync(TUser user) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { get => throw null; set => throw null; } + public virtual System.Threading.Tasks.Task FindByEmailAsync(string email) => throw null; + public virtual System.Threading.Tasks.Task FindByIdAsync(string userId) => throw null; + public virtual System.Threading.Tasks.Task FindByLoginAsync(string loginProvider, string providerKey) => throw null; + public virtual System.Threading.Tasks.Task FindByNameAsync(string userName) => throw null; + public virtual System.Threading.Tasks.Task GenerateChangeEmailTokenAsync(TUser user, string newEmail) => throw null; + public virtual System.Threading.Tasks.Task GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) => throw null; + public virtual System.Threading.Tasks.Task GenerateConcurrencyStampAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GenerateEmailConfirmationTokenAsync(TUser user) => throw null; + public virtual string GenerateNewAuthenticatorKey() => throw null; + public virtual System.Threading.Tasks.Task> GenerateNewTwoFactorRecoveryCodesAsync(TUser user, int number) => throw null; + public virtual System.Threading.Tasks.Task GeneratePasswordResetTokenAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GenerateTwoFactorTokenAsync(TUser user, string tokenProvider) => throw null; + public virtual System.Threading.Tasks.Task GenerateUserTokenAsync(TUser user, string tokenProvider, string purpose) => throw null; + public virtual System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) => throw null; + public virtual System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user) => throw null; + public static string GetChangeEmailTokenPurpose(string newEmail) => throw null; + public virtual System.Threading.Tasks.Task> GetClaimsAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetEmailAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetLockoutEnabledAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetLockoutEndDateAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task> GetLoginsAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetPhoneNumberAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task> GetRolesAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetSecurityStampAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetTwoFactorEnabledAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task GetUserAsync(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual string GetUserId(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual System.Threading.Tasks.Task GetUserIdAsync(TUser user) => throw null; + public virtual string GetUserName(System.Security.Claims.ClaimsPrincipal principal) => throw null; + public virtual System.Threading.Tasks.Task GetUserNameAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task> GetUsersForClaimAsync(System.Security.Claims.Claim claim) => throw null; + public virtual System.Threading.Tasks.Task> GetUsersInRoleAsync(string roleName) => throw null; + public virtual System.Threading.Tasks.Task> GetValidTwoFactorProvidersAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task HasPasswordAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task IsEmailConfirmedAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task IsInRoleAsync(TUser user, string role) => throw null; + public virtual System.Threading.Tasks.Task IsLockedOutAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task IsPhoneNumberConfirmedAsync(TUser user) => throw null; + public Microsoft.AspNetCore.Identity.ILookupNormalizer KeyNormalizer { get => throw null; set => throw null; } + public virtual Microsoft.Extensions.Logging.ILogger Logger { get => throw null; set => throw null; } + public virtual string NormalizeEmail(string email) => throw null; + public virtual string NormalizeName(string name) => throw null; + public Microsoft.AspNetCore.Identity.IdentityOptions Options { get => throw null; set => throw null; } + public Microsoft.AspNetCore.Identity.IPasswordHasher PasswordHasher { get => throw null; set => throw null; } + public System.Collections.Generic.IList> PasswordValidators { get => throw null; } + public virtual System.Threading.Tasks.Task RedeemTwoFactorRecoveryCodeAsync(TUser user, string code) => throw null; + public virtual void RegisterTokenProvider(string providerName, Microsoft.AspNetCore.Identity.IUserTwoFactorTokenProvider provider) => throw null; + public virtual System.Threading.Tasks.Task RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) => throw null; + public virtual System.Threading.Tasks.Task RemoveClaimAsync(TUser user, System.Security.Claims.Claim claim) => throw null; + public virtual System.Threading.Tasks.Task RemoveClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims) => throw null; + public virtual System.Threading.Tasks.Task RemoveFromRoleAsync(TUser user, string role) => throw null; + public virtual System.Threading.Tasks.Task RemoveFromRolesAsync(TUser user, System.Collections.Generic.IEnumerable roles) => throw null; + public virtual System.Threading.Tasks.Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey) => throw null; + public virtual System.Threading.Tasks.Task RemovePasswordAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task ReplaceClaimAsync(TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim) => throw null; + public virtual System.Threading.Tasks.Task ResetAccessFailedCountAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task ResetAuthenticatorKeyAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task ResetPasswordAsync(TUser user, string token, string newPassword) => throw null; + public const string ResetPasswordTokenPurpose = default; + public virtual System.Threading.Tasks.Task SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string tokenValue) => throw null; + public virtual System.Threading.Tasks.Task SetEmailAsync(TUser user, string email) => throw null; + public virtual System.Threading.Tasks.Task SetLockoutEnabledAsync(TUser user, bool enabled) => throw null; + public virtual System.Threading.Tasks.Task SetLockoutEndDateAsync(TUser user, System.DateTimeOffset? lockoutEnd) => throw null; + public virtual System.Threading.Tasks.Task SetPhoneNumberAsync(TUser user, string phoneNumber) => throw null; + public virtual System.Threading.Tasks.Task SetTwoFactorEnabledAsync(TUser user, bool enabled) => throw null; + public virtual System.Threading.Tasks.Task SetUserNameAsync(TUser user, string userName) => throw null; + protected internal Microsoft.AspNetCore.Identity.IUserStore Store { get => throw null; set => throw null; } + public virtual bool SupportsQueryableUsers { get => throw null; } + public virtual bool SupportsUserAuthenticationTokens { get => throw null; } + public virtual bool SupportsUserAuthenticatorKey { get => throw null; } + public virtual bool SupportsUserClaim { get => throw null; } + public virtual bool SupportsUserEmail { get => throw null; } + public virtual bool SupportsUserLockout { get => throw null; } + public virtual bool SupportsUserLogin { get => throw null; } + public virtual bool SupportsUserPassword { get => throw null; } + public virtual bool SupportsUserPhoneNumber { get => throw null; } + public virtual bool SupportsUserRole { get => throw null; } + public virtual bool SupportsUserSecurityStamp { get => throw null; } + public virtual bool SupportsUserTwoFactor { get => throw null; } + public virtual bool SupportsUserTwoFactorRecoveryCodes { get => throw null; } + protected void ThrowIfDisposed() => throw null; + public virtual System.Threading.Tasks.Task UpdateAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task UpdateNormalizedEmailAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task UpdateNormalizedUserNameAsync(TUser user) => throw null; + protected virtual System.Threading.Tasks.Task UpdatePasswordHash(TUser user, string newPassword, bool validatePassword) => throw null; + public virtual System.Threading.Tasks.Task UpdateSecurityStampAsync(TUser user) => throw null; + protected virtual System.Threading.Tasks.Task UpdateUserAsync(TUser user) => throw null; + public UserManager(Microsoft.AspNetCore.Identity.IUserStore store, Microsoft.Extensions.Options.IOptions optionsAccessor, Microsoft.AspNetCore.Identity.IPasswordHasher passwordHasher, System.Collections.Generic.IEnumerable> userValidators, System.Collections.Generic.IEnumerable> passwordValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, System.IServiceProvider services, Microsoft.Extensions.Logging.ILogger> logger) => throw null; + public System.Collections.Generic.IList> UserValidators { get => throw null; } + public virtual System.Linq.IQueryable Users { get => throw null; } + protected System.Threading.Tasks.Task ValidatePasswordAsync(TUser user, string password) => throw null; + protected System.Threading.Tasks.Task ValidateUserAsync(TUser user) => throw null; + public virtual System.Threading.Tasks.Task VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) => throw null; + protected virtual System.Threading.Tasks.Task VerifyPasswordAsync(Microsoft.AspNetCore.Identity.IUserPasswordStore store, TUser user, string password) => throw null; + public virtual System.Threading.Tasks.Task VerifyTwoFactorTokenAsync(TUser user, string tokenProvider, string token) => throw null; + public virtual System.Threading.Tasks.Task VerifyUserTokenAsync(TUser user, string tokenProvider, string purpose, string token) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserOptions + { + public string AllowedUserNameCharacters { get => throw null; set => throw null; } + public bool RequireUniqueEmail { get => throw null; set => throw null; } + public UserOptions() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserValidator<>` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UserValidator : Microsoft.AspNetCore.Identity.IUserValidator where TUser : class + { + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber Describer { get => throw null; } + public UserValidator(Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors = default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) => throw null; + public virtual System.Threading.Tasks.Task ValidateAsync(Microsoft.AspNetCore.Identity.UserManager manager, TUser user) => throw null; + } + + } + } + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions` in `Microsoft.AspNetCore.Identity, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class IdentityServiceCollectionExtensions + { + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentityCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) where TUser : class => throw null; + public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentityCore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TUser : class => throw null; + } + + } + } +} +namespace System +{ + namespace Security + { + namespace Claims + { + // Generated from `System.Security.Claims.PrincipalExtensions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class PrincipalExtensions + { + public static string FindFirstValue(this System.Security.Claims.ClaimsPrincipal principal, string claimType) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs new file mode 100644 index 000000000000..4683d0efb8e0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs @@ -0,0 +1,225 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace AspNetCore + { + namespace Identity + { + // Generated from `Microsoft.AspNetCore.Identity.IdentityRole` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityRole : Microsoft.AspNetCore.Identity.IdentityRole + { + public IdentityRole(string roleName) => throw null; + public IdentityRole() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityRole<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityRole where TKey : System.IEquatable + { + public virtual string ConcurrencyStamp { get => throw null; set => throw null; } + public virtual TKey Id { get => throw null; set => throw null; } + public IdentityRole(string roleName) => throw null; + public IdentityRole() => throw null; + public virtual string Name { get => throw null; set => throw null; } + public virtual string NormalizedName { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityRoleClaim<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityRoleClaim where TKey : System.IEquatable + { + public virtual string ClaimType { get => throw null; set => throw null; } + public virtual string ClaimValue { get => throw null; set => throw null; } + public virtual int Id { get => throw null; set => throw null; } + public IdentityRoleClaim() => throw null; + public virtual void InitializeFromClaim(System.Security.Claims.Claim other) => throw null; + public virtual TKey RoleId { get => throw null; set => throw null; } + public virtual System.Security.Claims.Claim ToClaim() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUser` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUser : Microsoft.AspNetCore.Identity.IdentityUser + { + public IdentityUser(string userName) => throw null; + public IdentityUser() => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUser<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUser where TKey : System.IEquatable + { + public virtual int AccessFailedCount { get => throw null; set => throw null; } + public virtual string ConcurrencyStamp { get => throw null; set => throw null; } + public virtual string Email { get => throw null; set => throw null; } + public virtual bool EmailConfirmed { get => throw null; set => throw null; } + public virtual TKey Id { get => throw null; set => throw null; } + public IdentityUser(string userName) => throw null; + public IdentityUser() => throw null; + public virtual bool LockoutEnabled { get => throw null; set => throw null; } + public virtual System.DateTimeOffset? LockoutEnd { get => throw null; set => throw null; } + public virtual string NormalizedEmail { get => throw null; set => throw null; } + public virtual string NormalizedUserName { get => throw null; set => throw null; } + public virtual string PasswordHash { get => throw null; set => throw null; } + public virtual string PhoneNumber { get => throw null; set => throw null; } + public virtual bool PhoneNumberConfirmed { get => throw null; set => throw null; } + public virtual string SecurityStamp { get => throw null; set => throw null; } + public override string ToString() => throw null; + public virtual bool TwoFactorEnabled { get => throw null; set => throw null; } + public virtual string UserName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUserClaim<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUserClaim where TKey : System.IEquatable + { + public virtual string ClaimType { get => throw null; set => throw null; } + public virtual string ClaimValue { get => throw null; set => throw null; } + public virtual int Id { get => throw null; set => throw null; } + public IdentityUserClaim() => throw null; + public virtual void InitializeFromClaim(System.Security.Claims.Claim claim) => throw null; + public virtual System.Security.Claims.Claim ToClaim() => throw null; + public virtual TKey UserId { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUserLogin<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUserLogin where TKey : System.IEquatable + { + public IdentityUserLogin() => throw null; + public virtual string LoginProvider { get => throw null; set => throw null; } + public virtual string ProviderDisplayName { get => throw null; set => throw null; } + public virtual string ProviderKey { get => throw null; set => throw null; } + public virtual TKey UserId { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUserRole<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUserRole where TKey : System.IEquatable + { + public IdentityUserRole() => throw null; + public virtual TKey RoleId { get => throw null; set => throw null; } + public virtual TKey UserId { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.IdentityUserToken<>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class IdentityUserToken where TKey : System.IEquatable + { + public IdentityUserToken() => throw null; + public virtual string LoginProvider { get => throw null; set => throw null; } + public virtual string Name { get => throw null; set => throw null; } + public virtual TKey UserId { get => throw null; set => throw null; } + public virtual string Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.AspNetCore.Identity.RoleStoreBase<,,,>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class RoleStoreBase : System.IDisposable, Microsoft.AspNetCore.Identity.IRoleStore, Microsoft.AspNetCore.Identity.IRoleClaimStore, Microsoft.AspNetCore.Identity.IQueryableRoleStore where TKey : System.IEquatable where TRole : Microsoft.AspNetCore.Identity.IdentityRole where TRoleClaim : Microsoft.AspNetCore.Identity.IdentityRoleClaim, new() where TUserRole : Microsoft.AspNetCore.Identity.IdentityUserRole, new() + { + public abstract System.Threading.Tasks.Task AddClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual TKey ConvertIdFromString(string id) => throw null; + public virtual string ConvertIdToString(TKey id) => throw null; + public abstract System.Threading.Tasks.Task CreateAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TRoleClaim CreateRoleClaim(TRole role, System.Security.Claims.Claim claim) => throw null; + public abstract System.Threading.Tasks.Task DeleteAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public void Dispose() => throw null; + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { get => throw null; set => throw null; } + public abstract System.Threading.Tasks.Task FindByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task FindByNameAsync(string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> GetClaimsAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetNormalizedRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetRoleIdAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetRoleNameAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract System.Threading.Tasks.Task RemoveClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public RoleStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) => throw null; + public abstract System.Linq.IQueryable Roles { get; } + public virtual System.Threading.Tasks.Task SetNormalizedRoleNameAsync(TRole role, string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetRoleNameAsync(TRole role, string roleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected void ThrowIfDisposed() => throw null; + public abstract System.Threading.Tasks.Task UpdateAsync(TRole role, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `Microsoft.AspNetCore.Identity.UserStoreBase<,,,,,,,>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class UserStoreBase : Microsoft.AspNetCore.Identity.UserStoreBase, System.IDisposable, Microsoft.AspNetCore.Identity.IUserStore, Microsoft.AspNetCore.Identity.IUserRoleStore where TKey : System.IEquatable where TRole : Microsoft.AspNetCore.Identity.IdentityRole where TRoleClaim : Microsoft.AspNetCore.Identity.IdentityRoleClaim, new() where TUser : Microsoft.AspNetCore.Identity.IdentityUser where TUserClaim : Microsoft.AspNetCore.Identity.IdentityUserClaim, new() where TUserLogin : Microsoft.AspNetCore.Identity.IdentityUserLogin, new() where TUserRole : Microsoft.AspNetCore.Identity.IdentityUserRole, new() where TUserToken : Microsoft.AspNetCore.Identity.IdentityUserToken, new() + { + public abstract System.Threading.Tasks.Task AddToRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TUserRole CreateUserRole(TUser user, TRole role) => throw null; + protected abstract System.Threading.Tasks.Task FindRoleAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserRoleAsync(TKey userId, TKey roleId, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task> GetRolesAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> GetUsersInRoleAsync(string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task IsInRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task RemoveFromRoleAsync(TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public UserStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) : base(default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) => throw null; + } + + // Generated from `Microsoft.AspNetCore.Identity.UserStoreBase<,,,,>` in `Microsoft.Extensions.Identity.Stores, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class UserStoreBase : System.IDisposable, Microsoft.AspNetCore.Identity.IUserTwoFactorStore, Microsoft.AspNetCore.Identity.IUserTwoFactorRecoveryCodeStore, Microsoft.AspNetCore.Identity.IUserStore, Microsoft.AspNetCore.Identity.IUserSecurityStampStore, Microsoft.AspNetCore.Identity.IUserPhoneNumberStore, Microsoft.AspNetCore.Identity.IUserPasswordStore, Microsoft.AspNetCore.Identity.IUserLoginStore, Microsoft.AspNetCore.Identity.IUserLockoutStore, Microsoft.AspNetCore.Identity.IUserEmailStore, Microsoft.AspNetCore.Identity.IUserClaimStore, Microsoft.AspNetCore.Identity.IUserAuthenticatorKeyStore, Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore, Microsoft.AspNetCore.Identity.IQueryableUserStore where TKey : System.IEquatable where TUser : Microsoft.AspNetCore.Identity.IdentityUser where TUserClaim : Microsoft.AspNetCore.Identity.IdentityUserClaim, new() where TUserLogin : Microsoft.AspNetCore.Identity.IdentityUserLogin, new() where TUserToken : Microsoft.AspNetCore.Identity.IdentityUserToken, new() + { + public abstract System.Threading.Tasks.Task AddClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task AddLoginAsync(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected abstract System.Threading.Tasks.Task AddUserTokenAsync(TUserToken token); + public virtual TKey ConvertIdFromString(string id) => throw null; + public virtual string ConvertIdToString(TKey id) => throw null; + public virtual System.Threading.Tasks.Task CountCodesAsync(TUser user, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task CreateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected virtual TUserClaim CreateUserClaim(TUser user, System.Security.Claims.Claim claim) => throw null; + protected virtual TUserLogin CreateUserLogin(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login) => throw null; + protected virtual TUserToken CreateUserToken(TUser user, string loginProvider, string name, string value) => throw null; + public abstract System.Threading.Tasks.Task DeleteAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public void Dispose() => throw null; + public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { get => throw null; set => throw null; } + public abstract System.Threading.Tasks.Task FindByEmailAsync(string normalizedEmail, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task FindByIdAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task FindByLoginAsync(string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract System.Threading.Tasks.Task FindByNameAsync(string normalizedUserName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected abstract System.Threading.Tasks.Task FindTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserAsync(TKey userId, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserLoginAsync(string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + protected abstract System.Threading.Tasks.Task FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken); + public virtual System.Threading.Tasks.Task GetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetAuthenticatorKeyAsync(TUser user, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task> GetClaimsAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetEmailConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetLockoutEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetLockoutEndDateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract System.Threading.Tasks.Task> GetLoginsAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task GetNormalizedEmailAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetNormalizedUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetPasswordHashAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetPhoneNumberAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetPhoneNumberConfirmedAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetSecurityStampAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task GetTwoFactorEnabledAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetUserIdAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetUserNameAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract System.Threading.Tasks.Task> GetUsersForClaimAsync(System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task HasPasswordAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task IncrementAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task RedeemCodeAsync(TUser user, string code, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task RemoveClaimsAsync(TUser user, System.Collections.Generic.IEnumerable claims, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task RemoveTokenAsync(TUser user, string loginProvider, string name, System.Threading.CancellationToken cancellationToken) => throw null; + protected abstract System.Threading.Tasks.Task RemoveUserTokenAsync(TUserToken token); + public abstract System.Threading.Tasks.Task ReplaceClaimAsync(TUser user, System.Security.Claims.Claim claim, System.Security.Claims.Claim newClaim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.Task ReplaceCodesAsync(TUser user, System.Collections.Generic.IEnumerable recoveryCodes, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task ResetAccessFailedCountAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetAuthenticatorKeyAsync(TUser user, string key, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task SetEmailAsync(TUser user, string email, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetEmailConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetLockoutEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetLockoutEndDateAsync(TUser user, System.DateTimeOffset? lockoutEnd, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetNormalizedEmailAsync(TUser user, string normalizedEmail, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetNormalizedUserNameAsync(TUser user, string normalizedName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetPasswordHashAsync(TUser user, string passwordHash, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetPhoneNumberAsync(TUser user, string phoneNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetSecurityStampAsync(TUser user, string stamp, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetTokenAsync(TUser user, string loginProvider, string name, string value, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task SetTwoFactorEnabledAsync(TUser user, bool enabled, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task SetUserNameAsync(TUser user, string userName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected void ThrowIfDisposed() => throw null; + public abstract System.Threading.Tasks.Task UpdateAsync(TUser user, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public UserStoreBase(Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer) => throw null; + public abstract System.Linq.IQueryable Users { get; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs new file mode 100644 index 000000000000..782704a521ec --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs @@ -0,0 +1,62 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Localization + { + // Generated from `Microsoft.Extensions.Localization.IStringLocalizer` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStringLocalizer + { + System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures); + Microsoft.Extensions.Localization.LocalizedString this[string name] { get; } + Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get; } + } + + // Generated from `Microsoft.Extensions.Localization.IStringLocalizer<>` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer + { + } + + // Generated from `Microsoft.Extensions.Localization.IStringLocalizerFactory` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IStringLocalizerFactory + { + Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location); + Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource); + } + + // Generated from `Microsoft.Extensions.Localization.LocalizedString` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocalizedString + { + public LocalizedString(string name, string value, bool resourceNotFound, string searchedLocation) => throw null; + public LocalizedString(string name, string value, bool resourceNotFound) => throw null; + public LocalizedString(string name, string value) => throw null; + public string Name { get => throw null; } + public bool ResourceNotFound { get => throw null; } + public string SearchedLocation { get => throw null; } + public override string ToString() => throw null; + public string Value { get => throw null; } + // Stub generator skipped operator: implicit conversion + } + + // Generated from `Microsoft.Extensions.Localization.StringLocalizer<>` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer, Microsoft.Extensions.Localization.IStringLocalizer + { + public System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get => throw null; } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get => throw null; } + public StringLocalizer(Microsoft.Extensions.Localization.IStringLocalizerFactory factory) => throw null; + } + + // Generated from `Microsoft.Extensions.Localization.StringLocalizerExtensions` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class StringLocalizerExtensions + { + public static System.Collections.Generic.IEnumerable GetAllStrings(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer) => throw null; + public static Microsoft.Extensions.Localization.LocalizedString GetString(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name, params object[] arguments) => throw null; + public static Microsoft.Extensions.Localization.LocalizedString GetString(this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs new file mode 100644 index 000000000000..398ac84965da --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs @@ -0,0 +1,81 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.LocalizationServiceCollectionExtensions` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LocalizationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLocalization(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + namespace Localization + { + // Generated from `Microsoft.Extensions.Localization.IResourceNamesCache` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IResourceNamesCache + { + System.Collections.Generic.IList GetOrAdd(string name, System.Func> valueFactory); + } + + // Generated from `Microsoft.Extensions.Localization.LocalizationOptions` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LocalizationOptions + { + public LocalizationOptions() => throw null; + public string ResourcesPath { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Localization.ResourceLocationAttribute` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceLocationAttribute : System.Attribute + { + public string ResourceLocation { get => throw null; } + public ResourceLocationAttribute(string resourceLocation) => throw null; + } + + // Generated from `Microsoft.Extensions.Localization.ResourceManagerStringLocalizer` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceManagerStringLocalizer : Microsoft.Extensions.Localization.IStringLocalizer + { + public virtual System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures) => throw null; + protected System.Collections.Generic.IEnumerable GetAllStrings(bool includeParentCultures, System.Globalization.CultureInfo culture) => throw null; + protected string GetStringSafely(string name, System.Globalization.CultureInfo culture) => throw null; + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name] { get => throw null; } + public virtual Microsoft.Extensions.Localization.LocalizedString this[string name, params object[] arguments] { get => throw null; } + public ResourceManagerStringLocalizer(System.Resources.ResourceManager resourceManager, System.Reflection.Assembly resourceAssembly, string baseName, Microsoft.Extensions.Localization.IResourceNamesCache resourceNamesCache, Microsoft.Extensions.Logging.ILogger logger) => throw null; + } + + // Generated from `Microsoft.Extensions.Localization.ResourceManagerStringLocalizerFactory` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceManagerStringLocalizerFactory : Microsoft.Extensions.Localization.IStringLocalizerFactory + { + public Microsoft.Extensions.Localization.IStringLocalizer Create(string baseName, string location) => throw null; + public Microsoft.Extensions.Localization.IStringLocalizer Create(System.Type resourceSource) => throw null; + protected virtual Microsoft.Extensions.Localization.ResourceManagerStringLocalizer CreateResourceManagerStringLocalizer(System.Reflection.Assembly assembly, string baseName) => throw null; + protected virtual Microsoft.Extensions.Localization.ResourceLocationAttribute GetResourceLocationAttribute(System.Reflection.Assembly assembly) => throw null; + protected virtual string GetResourcePrefix(string location, string baseName, string resourceLocation) => throw null; + protected virtual string GetResourcePrefix(string baseResourceName, string baseNamespace) => throw null; + protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo, string baseNamespace, string resourcesRelativePath) => throw null; + protected virtual string GetResourcePrefix(System.Reflection.TypeInfo typeInfo) => throw null; + protected virtual Microsoft.Extensions.Localization.RootNamespaceAttribute GetRootNamespaceAttribute(System.Reflection.Assembly assembly) => throw null; + public ResourceManagerStringLocalizerFactory(Microsoft.Extensions.Options.IOptions localizationOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `Microsoft.Extensions.Localization.ResourceNamesCache` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNamesCache + { + public System.Collections.Generic.IList GetOrAdd(string name, System.Func> valueFactory) => throw null; + public ResourceNamesCache() => throw null; + } + + // Generated from `Microsoft.Extensions.Localization.RootNamespaceAttribute` in `Microsoft.Extensions.Localization, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RootNamespaceAttribute : System.Attribute + { + public string RootNamespace { get => throw null; } + public RootNamespaceAttribute(string rootNamespace) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs new file mode 100644 index 000000000000..620c616aaa78 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs @@ -0,0 +1,220 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.EventId` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct EventId + { + public static bool operator !=(Microsoft.Extensions.Logging.EventId left, Microsoft.Extensions.Logging.EventId right) => throw null; + public static bool operator ==(Microsoft.Extensions.Logging.EventId left, Microsoft.Extensions.Logging.EventId right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Microsoft.Extensions.Logging.EventId other) => throw null; + public EventId(int id, string name = default(string)) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public int Id { get => throw null; } + public string Name { get => throw null; } + public override string ToString() => throw null; + // Stub generator skipped operator: implicit conversion + } + + // Generated from `Microsoft.Extensions.Logging.IExternalScopeProvider` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IExternalScopeProvider + { + void ForEachScope(System.Action callback, TState state); + System.IDisposable Push(object state); + } + + // Generated from `Microsoft.Extensions.Logging.ILogger` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILogger + { + System.IDisposable BeginScope(TState state); + bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel); + void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter); + } + + // Generated from `Microsoft.Extensions.Logging.ILogger<>` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILogger : Microsoft.Extensions.Logging.ILogger + { + } + + // Generated from `Microsoft.Extensions.Logging.ILoggerFactory` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILoggerFactory : System.IDisposable + { + void AddProvider(Microsoft.Extensions.Logging.ILoggerProvider provider); + Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName); + } + + // Generated from `Microsoft.Extensions.Logging.ILoggerProvider` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILoggerProvider : System.IDisposable + { + Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName); + } + + // Generated from `Microsoft.Extensions.Logging.ISupportExternalScope` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ISupportExternalScope + { + void SetScopeProvider(Microsoft.Extensions.Logging.IExternalScopeProvider scopeProvider); + } + + // Generated from `Microsoft.Extensions.Logging.LogLevel` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum LogLevel + { + Critical, + Debug, + Error, + Information, + // Stub generator skipped constructor + None, + Trace, + Warning, + } + + // Generated from `Microsoft.Extensions.Logging.Logger<>` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class Logger : Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.ILogger + { + System.IDisposable Microsoft.Extensions.Logging.ILogger.BeginScope(TState state) => throw null; + bool Microsoft.Extensions.Logging.ILogger.IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) => throw null; + void Microsoft.Extensions.Logging.ILogger.Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) => throw null; + public Logger(Microsoft.Extensions.Logging.ILoggerFactory factory) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerExtensions` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggerExtensions + { + public static System.IDisposable BeginScope(this Microsoft.Extensions.Logging.ILogger logger, string messageFormat, params object[] args) => throw null; + public static void Log(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.LogLevel logLevel, string message, params object[] args) => throw null; + public static void Log(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.LogLevel logLevel, System.Exception exception, string message, params object[] args) => throw null; + public static void Log(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void Log(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogCritical(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogCritical(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogCritical(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogCritical(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogDebug(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogDebug(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogDebug(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogDebug(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogError(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogError(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogError(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogError(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogInformation(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogInformation(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogInformation(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogInformation(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogTrace(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogTrace(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogTrace(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogTrace(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + public static void LogWarning(this Microsoft.Extensions.Logging.ILogger logger, string message, params object[] args) => throw null; + public static void LogWarning(this Microsoft.Extensions.Logging.ILogger logger, System.Exception exception, string message, params object[] args) => throw null; + public static void LogWarning(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, string message, params object[] args) => throw null; + public static void LogWarning(this Microsoft.Extensions.Logging.ILogger logger, Microsoft.Extensions.Logging.EventId eventId, System.Exception exception, string message, params object[] args) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerExternalScopeProvider` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerExternalScopeProvider : Microsoft.Extensions.Logging.IExternalScopeProvider + { + public void ForEachScope(System.Action callback, TState state) => throw null; + public LoggerExternalScopeProvider() => throw null; + public System.IDisposable Push(object state) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerFactoryExtensions` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggerFactoryExtensions + { + public static Microsoft.Extensions.Logging.ILogger CreateLogger(this Microsoft.Extensions.Logging.ILoggerFactory factory) => throw null; + public static Microsoft.Extensions.Logging.ILogger CreateLogger(this Microsoft.Extensions.Logging.ILoggerFactory factory, System.Type type) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerMessage` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggerMessage + { + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Action Define(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + public static System.Func DefineScope(string formatString) => throw null; + } + + namespace Abstractions + { + // Generated from `Microsoft.Extensions.Logging.Abstractions.LogEntry<>` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct LogEntry + { + public string Category { get => throw null; } + public Microsoft.Extensions.Logging.EventId EventId { get => throw null; } + public System.Exception Exception { get => throw null; } + public System.Func Formatter { get => throw null; } + public LogEntry(Microsoft.Extensions.Logging.LogLevel logLevel, string category, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) => throw null; + // Stub generator skipped constructor + public Microsoft.Extensions.Logging.LogLevel LogLevel { get => throw null; } + public TState State { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Logging.Abstractions.NullLogger` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullLogger : Microsoft.Extensions.Logging.ILogger + { + public System.IDisposable BeginScope(TState state) => throw null; + public static Microsoft.Extensions.Logging.Abstractions.NullLogger Instance { get => throw null; } + public bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) => throw null; + public void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Abstractions.NullLogger<>` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullLogger : Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.ILogger + { + public System.IDisposable BeginScope(TState state) => throw null; + public static Microsoft.Extensions.Logging.Abstractions.NullLogger Instance; + public bool IsEnabled(Microsoft.Extensions.Logging.LogLevel logLevel) => throw null; + public void Log(Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, TState state, System.Exception exception, System.Func formatter) => throw null; + public NullLogger() => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Abstractions.NullLoggerFactory` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullLoggerFactory : System.IDisposable, Microsoft.Extensions.Logging.ILoggerFactory + { + public void AddProvider(Microsoft.Extensions.Logging.ILoggerProvider provider) => throw null; + public Microsoft.Extensions.Logging.ILogger CreateLogger(string name) => throw null; + public void Dispose() => throw null; + public static Microsoft.Extensions.Logging.Abstractions.NullLoggerFactory Instance; + public NullLoggerFactory() => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Abstractions.NullLoggerProvider` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NullLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ILoggerProvider + { + public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) => throw null; + public void Dispose() => throw null; + public static Microsoft.Extensions.Logging.Abstractions.NullLoggerProvider Instance { get => throw null; } + } + + } + } + } +} +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs new file mode 100644 index 000000000000..9e81f3e05c66 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs @@ -0,0 +1,50 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.LoggingBuilderExtensions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class LoggingBuilderExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddConfiguration(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) => throw null; + } + + namespace Configuration + { + // Generated from `Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration<>` in `Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILoggerProviderConfiguration + { + Microsoft.Extensions.Configuration.IConfiguration Configuration { get; } + } + + // Generated from `Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfigurationFactory` in `Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILoggerProviderConfigurationFactory + { + Microsoft.Extensions.Configuration.IConfiguration GetConfiguration(System.Type providerType); + } + + // Generated from `Microsoft.Extensions.Logging.Configuration.LoggerProviderOptions` in `Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggerProviderOptions + { + public static void RegisterProviderOptions(Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TOptions : class => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Configuration.LoggerProviderOptionsChangeTokenSource<,>` in `Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerProviderOptionsChangeTokenSource : Microsoft.Extensions.Options.ConfigurationChangeTokenSource + { + public LoggerProviderOptionsChangeTokenSource(Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration providerConfiguration) : base(default(Microsoft.Extensions.Configuration.IConfiguration)) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Configuration.LoggingBuilderConfigurationExtensions` in `Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggingBuilderConfigurationExtensions + { + public static void AddConfiguration(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs new file mode 100644 index 000000000000..62d523966edb --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs @@ -0,0 +1,130 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.ConsoleLoggerExtensions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConsoleLoggerExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsoleFormatter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) where TFormatter : Microsoft.Extensions.Logging.Console.ConsoleFormatter where TOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsoleFormatter(this Microsoft.Extensions.Logging.ILoggingBuilder builder) where TFormatter : Microsoft.Extensions.Logging.Console.ConsoleFormatter where TOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddJsonConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddJsonConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddSimpleConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddSimpleConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddSystemdConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddSystemdConsole(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + } + + namespace Console + { + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleFormatter` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ConsoleFormatter + { + protected ConsoleFormatter(string name) => throw null; + public string Name { get => throw null; } + public abstract void Write(Microsoft.Extensions.Logging.Abstractions.LogEntry logEntry, Microsoft.Extensions.Logging.IExternalScopeProvider scopeProvider, System.IO.TextWriter textWriter); + } + + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleFormatterNames` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ConsoleFormatterNames + { + public const string Json = default; + public const string Simple = default; + public const string Systemd = default; + } + + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsoleFormatterOptions + { + public ConsoleFormatterOptions() => throw null; + public bool IncludeScopes { get => throw null; set => throw null; } + public string TimestampFormat { get => throw null; set => throw null; } + public bool UseUtcTimestamp { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleLoggerFormat` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum ConsoleLoggerFormat + { + // Stub generator skipped constructor + Default, + Systemd, + } + + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsoleLoggerOptions + { + public ConsoleLoggerOptions() => throw null; + public bool DisableColors { get => throw null; set => throw null; } + public Microsoft.Extensions.Logging.Console.ConsoleLoggerFormat Format { get => throw null; set => throw null; } + public string FormatterName { get => throw null; set => throw null; } + public bool IncludeScopes { get => throw null; set => throw null; } + public Microsoft.Extensions.Logging.LogLevel LogToStandardErrorThreshold { get => throw null; set => throw null; } + public string TimestampFormat { get => throw null; set => throw null; } + public bool UseUtcTimestamp { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Logging.Console.ConsoleLoggerProvider` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConsoleLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ISupportExternalScope, Microsoft.Extensions.Logging.ILoggerProvider + { + public ConsoleLoggerProvider(Microsoft.Extensions.Options.IOptionsMonitor options, System.Collections.Generic.IEnumerable formatters) => throw null; + public ConsoleLoggerProvider(Microsoft.Extensions.Options.IOptionsMonitor options) => throw null; + public Microsoft.Extensions.Logging.ILogger CreateLogger(string name) => throw null; + public void Dispose() => throw null; + public void SetScopeProvider(Microsoft.Extensions.Logging.IExternalScopeProvider scopeProvider) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.Console.JsonConsoleFormatterOptions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JsonConsoleFormatterOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions + { + public JsonConsoleFormatterOptions() => throw null; + public System.Text.Json.JsonWriterOptions JsonWriterOptions { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.Logging.Console.LoggerColorBehavior` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum LoggerColorBehavior + { + Default, + Disabled, + Enabled, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.Extensions.Logging.Console.SimpleConsoleFormatterOptions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SimpleConsoleFormatterOptions : Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions + { + public Microsoft.Extensions.Logging.Console.LoggerColorBehavior ColorBehavior { get => throw null; set => throw null; } + public SimpleConsoleFormatterOptions() => throw null; + public bool SingleLine { get => throw null; set => throw null; } + } + + } + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'DynamicallyAccessedMemberTypes' is not stubbed in this assembly 'Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMembersAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs new file mode 100644 index 000000000000..7571ca1a9f21 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs @@ -0,0 +1,28 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.DebugLoggerFactoryExtensions` in `Microsoft.Extensions.Logging.Debug, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DebugLoggerFactoryExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddDebug(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + } + + namespace Debug + { + // Generated from `Microsoft.Extensions.Logging.Debug.DebugLoggerProvider` in `Microsoft.Extensions.Logging.Debug, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DebugLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ILoggerProvider + { + public Microsoft.Extensions.Logging.ILogger CreateLogger(string name) => throw null; + public DebugLoggerProvider() => throw null; + public void Dispose() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs new file mode 100644 index 000000000000..062beacb0b7c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs @@ -0,0 +1,43 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.EventLoggerFactoryExtensions` in `Microsoft.Extensions.Logging.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EventLoggerFactoryExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action configure) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.EventLog.EventLogSettings settings) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventLog(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + } + + namespace EventLog + { + // Generated from `Microsoft.Extensions.Logging.EventLog.EventLogLoggerProvider` in `Microsoft.Extensions.Logging.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventLogLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ISupportExternalScope, Microsoft.Extensions.Logging.ILoggerProvider + { + public Microsoft.Extensions.Logging.ILogger CreateLogger(string name) => throw null; + public void Dispose() => throw null; + public EventLogLoggerProvider(Microsoft.Extensions.Options.IOptions options) => throw null; + public EventLogLoggerProvider(Microsoft.Extensions.Logging.EventLog.EventLogSettings settings) => throw null; + public EventLogLoggerProvider() => throw null; + public void SetScopeProvider(Microsoft.Extensions.Logging.IExternalScopeProvider scopeProvider) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.EventLog.EventLogSettings` in `Microsoft.Extensions.Logging.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventLogSettings + { + public EventLogSettings() => throw null; + public System.Func Filter { get => throw null; set => throw null; } + public string LogName { get => throw null; set => throw null; } + public string MachineName { get => throw null; set => throw null; } + public string SourceName { get => throw null; set => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs new file mode 100644 index 000000000000..aeb96d57b5a3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs @@ -0,0 +1,44 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.EventSourceLoggerFactoryExtensions` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EventSourceLoggerFactoryExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddEventSourceLogger(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + } + + namespace EventSource + { + // Generated from `Microsoft.Extensions.Logging.EventSource.EventSourceLoggerProvider` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EventSourceLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ILoggerProvider + { + public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) => throw null; + public void Dispose() => throw null; + public EventSourceLoggerProvider(Microsoft.Extensions.Logging.EventSource.LoggingEventSource eventSource) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.EventSource.LoggingEventSource` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggingEventSource : System.Diagnostics.Tracing.EventSource + { + // Generated from `Microsoft.Extensions.Logging.EventSource.LoggingEventSource.Keywords` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Keywords + { + public const System.Diagnostics.Tracing.EventKeywords FormattedMessage = default; + public const System.Diagnostics.Tracing.EventKeywords JsonMessage = default; + public const System.Diagnostics.Tracing.EventKeywords Message = default; + public const System.Diagnostics.Tracing.EventKeywords Meta = default; + } + + + protected override void OnEventCommand(System.Diagnostics.Tracing.EventCommandEventArgs command) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs new file mode 100644 index 000000000000..a0f52bf7b4bd --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs @@ -0,0 +1,32 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.TraceSourceFactoryExtensions` in `Microsoft.Extensions.Logging.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class TraceSourceFactoryExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string switchName, System.Diagnostics.TraceListener listener) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string switchName) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Diagnostics.SourceSwitch sourceSwitch, System.Diagnostics.TraceListener listener) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddTraceSource(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Diagnostics.SourceSwitch sourceSwitch) => throw null; + } + + namespace TraceSource + { + // Generated from `Microsoft.Extensions.Logging.TraceSource.TraceSourceLoggerProvider` in `Microsoft.Extensions.Logging.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class TraceSourceLoggerProvider : System.IDisposable, Microsoft.Extensions.Logging.ILoggerProvider + { + public Microsoft.Extensions.Logging.ILogger CreateLogger(string name) => throw null; + public void Dispose() => throw null; + public TraceSourceLoggerProvider(System.Diagnostics.SourceSwitch rootSourceSwitch, System.Diagnostics.TraceListener rootTraceListener) => throw null; + public TraceSourceLoggerProvider(System.Diagnostics.SourceSwitch rootSourceSwitch) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs new file mode 100644 index 000000000000..b1ba2ef19880 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs @@ -0,0 +1,121 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class LoggingServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configure) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogging(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + namespace Logging + { + // Generated from `Microsoft.Extensions.Logging.ActivityTrackingOptions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + [System.Flags] + public enum ActivityTrackingOptions + { + // Stub generator skipped constructor + None, + ParentId, + SpanId, + TraceFlags, + TraceId, + TraceState, + } + + // Generated from `Microsoft.Extensions.Logging.FilterLoggingBuilderExtensions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class FilterLoggingBuilderExtensions + { + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, System.Func levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, System.Func categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, System.Func levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, System.Func levelFilter) => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Microsoft.Extensions.Logging.LogLevel level) => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, System.Func filter) => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, System.Func categoryLevelFilter) => throw null; + public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter(this Microsoft.Extensions.Logging.LoggerFilterOptions builder, System.Func levelFilter) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, System.Func levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Func categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Func levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, System.Func levelFilter) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Microsoft.Extensions.Logging.LogLevel level) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Func filter) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Func categoryLevelFilter) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Func levelFilter) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.ILoggingBuilder` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface ILoggingBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + + // Generated from `Microsoft.Extensions.Logging.LoggerFactory` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerFactory : System.IDisposable, Microsoft.Extensions.Logging.ILoggerFactory + { + public void AddProvider(Microsoft.Extensions.Logging.ILoggerProvider provider) => throw null; + protected virtual bool CheckDisposed() => throw null; + public static Microsoft.Extensions.Logging.ILoggerFactory Create(System.Action configure) => throw null; + public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) => throw null; + public void Dispose() => throw null; + public LoggerFactory(System.Collections.Generic.IEnumerable providers, Microsoft.Extensions.Options.IOptionsMonitor filterOption, Microsoft.Extensions.Options.IOptions options = default(Microsoft.Extensions.Options.IOptions)) => throw null; + public LoggerFactory(System.Collections.Generic.IEnumerable providers, Microsoft.Extensions.Options.IOptionsMonitor filterOption) => throw null; + public LoggerFactory(System.Collections.Generic.IEnumerable providers, Microsoft.Extensions.Logging.LoggerFilterOptions filterOptions) => throw null; + public LoggerFactory(System.Collections.Generic.IEnumerable providers) => throw null; + public LoggerFactory() => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerFactoryOptions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerFactoryOptions + { + public Microsoft.Extensions.Logging.ActivityTrackingOptions ActivityTrackingOptions { get => throw null; set => throw null; } + public LoggerFactoryOptions() => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggerFilterOptions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerFilterOptions + { + public bool CaptureScopes { get => throw null; set => throw null; } + public LoggerFilterOptions() => throw null; + public Microsoft.Extensions.Logging.LogLevel MinLevel { get => throw null; set => throw null; } + public System.Collections.Generic.IList Rules { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Logging.LoggerFilterRule` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LoggerFilterRule + { + public string CategoryName { get => throw null; } + public System.Func Filter { get => throw null; } + public Microsoft.Extensions.Logging.LogLevel? LogLevel { get => throw null; } + public LoggerFilterRule(string providerName, string categoryName, Microsoft.Extensions.Logging.LogLevel? logLevel, System.Func filter) => throw null; + public string ProviderName { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.LoggingBuilderExtensions` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static partial class LoggingBuilderExtensions + { + public static Microsoft.Extensions.Logging.ILoggingBuilder AddProvider(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.ILoggerProvider provider) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder ClearProviders(this Microsoft.Extensions.Logging.ILoggingBuilder builder) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder Configure(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action action) => throw null; + public static Microsoft.Extensions.Logging.ILoggingBuilder SetMinimumLevel(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.LogLevel level) => throw null; + } + + // Generated from `Microsoft.Extensions.Logging.ProviderAliasAttribute` in `Microsoft.Extensions.Logging, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ProviderAliasAttribute : System.Attribute + { + public string Alias { get => throw null; } + public ProviderAliasAttribute(string alias) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs new file mode 100644 index 000000000000..76bfdf1bdec7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs @@ -0,0 +1,105 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace ObjectPool + { + // Generated from `Microsoft.Extensions.ObjectPool.DefaultObjectPool<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultObjectPool : Microsoft.Extensions.ObjectPool.ObjectPool where T : class + { + public DefaultObjectPool(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy, int maximumRetained) => throw null; + public DefaultObjectPool(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy) => throw null; + public override T Get() => throw null; + public override void Return(T obj) => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.DefaultObjectPoolProvider` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultObjectPoolProvider : Microsoft.Extensions.ObjectPool.ObjectPoolProvider + { + public override Microsoft.Extensions.ObjectPool.ObjectPool Create(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy) where T : class => throw null; + public DefaultObjectPoolProvider() => throw null; + public int MaximumRetained { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Extensions.ObjectPool.DefaultPooledObjectPolicy<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DefaultPooledObjectPolicy : Microsoft.Extensions.ObjectPool.PooledObjectPolicy where T : class, new() + { + public override T Create() => throw null; + public DefaultPooledObjectPolicy() => throw null; + public override bool Return(T obj) => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.IPooledObjectPolicy<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPooledObjectPolicy + { + T Create(); + bool Return(T obj); + } + + // Generated from `Microsoft.Extensions.ObjectPool.LeakTrackingObjectPool<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LeakTrackingObjectPool : Microsoft.Extensions.ObjectPool.ObjectPool where T : class + { + public override T Get() => throw null; + public LeakTrackingObjectPool(Microsoft.Extensions.ObjectPool.ObjectPool inner) => throw null; + public override void Return(T obj) => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.LeakTrackingObjectPoolProvider` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class LeakTrackingObjectPoolProvider : Microsoft.Extensions.ObjectPool.ObjectPoolProvider + { + public override Microsoft.Extensions.ObjectPool.ObjectPool Create(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy) where T : class => throw null; + public LeakTrackingObjectPoolProvider(Microsoft.Extensions.ObjectPool.ObjectPoolProvider inner) => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.ObjectPool` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ObjectPool + { + public static Microsoft.Extensions.ObjectPool.ObjectPool Create(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy = default(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy)) where T : class, new() => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.ObjectPool<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ObjectPool where T : class + { + public abstract T Get(); + protected ObjectPool() => throw null; + public abstract void Return(T obj); + } + + // Generated from `Microsoft.Extensions.ObjectPool.ObjectPoolProvider` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class ObjectPoolProvider + { + public abstract Microsoft.Extensions.ObjectPool.ObjectPool Create(Microsoft.Extensions.ObjectPool.IPooledObjectPolicy policy) where T : class; + public Microsoft.Extensions.ObjectPool.ObjectPool Create() where T : class, new() => throw null; + protected ObjectPoolProvider() => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.ObjectPoolProviderExtensions` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ObjectPoolProviderExtensions + { + public static Microsoft.Extensions.ObjectPool.ObjectPool CreateStringBuilderPool(this Microsoft.Extensions.ObjectPool.ObjectPoolProvider provider, int initialCapacity, int maximumRetainedCapacity) => throw null; + public static Microsoft.Extensions.ObjectPool.ObjectPool CreateStringBuilderPool(this Microsoft.Extensions.ObjectPool.ObjectPoolProvider provider) => throw null; + } + + // Generated from `Microsoft.Extensions.ObjectPool.PooledObjectPolicy<>` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class PooledObjectPolicy : Microsoft.Extensions.ObjectPool.IPooledObjectPolicy + { + public abstract T Create(); + protected PooledObjectPolicy() => throw null; + public abstract bool Return(T obj); + } + + // Generated from `Microsoft.Extensions.ObjectPool.StringBuilderPooledObjectPolicy` in `Microsoft.Extensions.ObjectPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringBuilderPooledObjectPolicy : Microsoft.Extensions.ObjectPool.PooledObjectPolicy + { + public override System.Text.StringBuilder Create() => throw null; + public int InitialCapacity { get => throw null; set => throw null; } + public int MaximumRetainedCapacity { get => throw null; set => throw null; } + public override bool Return(System.Text.StringBuilder obj) => throw null; + public StringBuilderPooledObjectPolicy() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs new file mode 100644 index 000000000000..5f09ef1d2d5a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs @@ -0,0 +1,53 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.OptionsBuilderConfigurationExtensions` in `Microsoft.Extensions.Options.ConfigurationExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OptionsBuilderConfigurationExtensions + { + public static Microsoft.Extensions.Options.OptionsBuilder Bind(this Microsoft.Extensions.Options.OptionsBuilder optionsBuilder, Microsoft.Extensions.Configuration.IConfiguration config, System.Action configureBinder) where TOptions : class => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder Bind(this Microsoft.Extensions.Options.OptionsBuilder optionsBuilder, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder BindConfiguration(this Microsoft.Extensions.Options.OptionsBuilder optionsBuilder, string configSectionPath, System.Action configureBinder = default(System.Action)) where TOptions : class => throw null; + } + + // Generated from `Microsoft.Extensions.DependencyInjection.OptionsConfigurationServiceCollectionExtensions` in `Microsoft.Extensions.Options.ConfigurationExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OptionsConfigurationServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Microsoft.Extensions.Configuration.IConfiguration config, System.Action configureBinder) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config, System.Action configureBinder) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class => throw null; + } + + } + namespace Options + { + // Generated from `Microsoft.Extensions.Options.ConfigurationChangeTokenSource<>` in `Microsoft.Extensions.Options.ConfigurationExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigurationChangeTokenSource : Microsoft.Extensions.Options.IOptionsChangeTokenSource + { + public ConfigurationChangeTokenSource(string name, Microsoft.Extensions.Configuration.IConfiguration config) => throw null; + public ConfigurationChangeTokenSource(Microsoft.Extensions.Configuration.IConfiguration config) => throw null; + public Microsoft.Extensions.Primitives.IChangeToken GetChangeToken() => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureFromConfigurationOptions<>` in `Microsoft.Extensions.Options.ConfigurationExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureFromConfigurationOptions : Microsoft.Extensions.Options.ConfigureOptions where TOptions : class + { + public ConfigureFromConfigurationOptions(Microsoft.Extensions.Configuration.IConfiguration config) : base(default(System.Action)) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions<>` in `Microsoft.Extensions.Options.ConfigurationExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NamedConfigureFromConfigurationOptions : Microsoft.Extensions.Options.ConfigureNamedOptions where TOptions : class + { + public NamedConfigureFromConfigurationOptions(string name, Microsoft.Extensions.Configuration.IConfiguration config, System.Action configureBinder) : base(default(string), default(System.Action)) => throw null; + public NamedConfigureFromConfigurationOptions(string name, Microsoft.Extensions.Configuration.IConfiguration config) : base(default(string), default(System.Action)) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs new file mode 100644 index 000000000000..b1ce3aa9e210 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs @@ -0,0 +1,28 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.OptionsBuilderDataAnnotationsExtensions` in `Microsoft.Extensions.Options.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OptionsBuilderDataAnnotationsExtensions + { + public static Microsoft.Extensions.Options.OptionsBuilder ValidateDataAnnotations(this Microsoft.Extensions.Options.OptionsBuilder optionsBuilder) where TOptions : class => throw null; + } + + } + namespace Options + { + // Generated from `Microsoft.Extensions.Options.DataAnnotationValidateOptions<>` in `Microsoft.Extensions.Options.DataAnnotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DataAnnotationValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public DataAnnotationValidateOptions(string name) => throw null; + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs new file mode 100644 index 000000000000..a50698fc0827 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs @@ -0,0 +1,456 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OptionsServiceCollectionExtensions + { + public static Microsoft.Extensions.Options.OptionsBuilder AddOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TOptions : class => throw null; + public static Microsoft.Extensions.Options.OptionsBuilder AddOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureOptions) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureAll(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TConfigureOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, object configureInstance) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type configureType) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection PostConfigure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, System.Action configureOptions) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection PostConfigure(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TOptions : class => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection PostConfigureAll(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action configureOptions) where TOptions : class => throw null; + } + + } + namespace Options + { + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<,,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TDep5 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5, System.Action action) => throw null; + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public TDep5 Dependency5 { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, System.Action action) => throw null; + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TDep1 : class where TDep2 : class where TDep3 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, TDep1 dependency, TDep2 dependency2, TDep3 dependency3, System.Action action) => throw null; + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TDep1 : class where TDep2 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, TDep1 dependency, TDep2 dependency2, System.Action action) => throw null; + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TDep : class where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, TDep dependency, System.Action action) => throw null; + public TDep Dependency { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureNamedOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions, Microsoft.Extensions.Options.IConfigureNamedOptions where TOptions : class + { + public System.Action Action { get => throw null; } + public void Configure(TOptions options) => throw null; + public virtual void Configure(string name, TOptions options) => throw null; + public ConfigureNamedOptions(string name, System.Action action) => throw null; + public string Name { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ConfigureOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ConfigureOptions : Microsoft.Extensions.Options.IConfigureOptions where TOptions : class + { + public System.Action Action { get => throw null; } + public virtual void Configure(TOptions options) => throw null; + public ConfigureOptions(System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.IConfigureNamedOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigureNamedOptions : Microsoft.Extensions.Options.IConfigureOptions where TOptions : class + { + void Configure(string name, TOptions options); + } + + // Generated from `Microsoft.Extensions.Options.IConfigureOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IConfigureOptions where TOptions : class + { + void Configure(TOptions options); + } + + // Generated from `Microsoft.Extensions.Options.IOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptions where TOptions : class + { + TOptions Value { get; } + } + + // Generated from `Microsoft.Extensions.Options.IOptionsChangeTokenSource<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptionsChangeTokenSource + { + Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); + string Name { get; } + } + + // Generated from `Microsoft.Extensions.Options.IOptionsFactory<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptionsFactory where TOptions : class + { + TOptions Create(string name); + } + + // Generated from `Microsoft.Extensions.Options.IOptionsMonitor<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptionsMonitor + { + TOptions CurrentValue { get; } + TOptions Get(string name); + System.IDisposable OnChange(System.Action listener); + } + + // Generated from `Microsoft.Extensions.Options.IOptionsMonitorCache<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptionsMonitorCache where TOptions : class + { + void Clear(); + TOptions GetOrAdd(string name, System.Func createOptions); + bool TryAdd(string name, TOptions options); + bool TryRemove(string name); + } + + // Generated from `Microsoft.Extensions.Options.IOptionsSnapshot<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IOptionsSnapshot : Microsoft.Extensions.Options.IOptions where TOptions : class + { + TOptions Get(string name); + } + + // Generated from `Microsoft.Extensions.Options.IPostConfigureOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IPostConfigureOptions where TOptions : class + { + void PostConfigure(string name, TOptions options); + } + + // Generated from `Microsoft.Extensions.Options.IValidateOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IValidateOptions where TOptions : class + { + Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options); + } + + // Generated from `Microsoft.Extensions.Options.Options` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Options + { + public static Microsoft.Extensions.Options.IOptions Create(TOptions options) where TOptions : class => throw null; + public static string DefaultName; + } + + // Generated from `Microsoft.Extensions.Options.OptionsBuilder<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsBuilder where TOptions : class + { + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) where TDep : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) where TDep1 : class where TDep2 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TDep5 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Configure(System.Action configureOptions) => throw null; + public string Name { get => throw null; } + public OptionsBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) where TDep : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) where TDep1 : class where TDep2 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TDep5 : class => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder PostConfigure(System.Action configureOptions) => throw null; + public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get => throw null; } + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation, string failureMessage) => throw null; + public virtual Microsoft.Extensions.Options.OptionsBuilder Validate(System.Func validation) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsCache<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsCache : Microsoft.Extensions.Options.IOptionsMonitorCache where TOptions : class + { + public void Clear() => throw null; + public virtual TOptions GetOrAdd(string name, System.Func createOptions) => throw null; + public OptionsCache() => throw null; + public virtual bool TryAdd(string name, TOptions options) => throw null; + public virtual bool TryRemove(string name) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsFactory<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsFactory : Microsoft.Extensions.Options.IOptionsFactory where TOptions : class + { + public TOptions Create(string name) => throw null; + protected virtual TOptions CreateInstance(string name) => throw null; + public OptionsFactory(System.Collections.Generic.IEnumerable> setups, System.Collections.Generic.IEnumerable> postConfigures, System.Collections.Generic.IEnumerable> validations) => throw null; + public OptionsFactory(System.Collections.Generic.IEnumerable> setups, System.Collections.Generic.IEnumerable> postConfigures) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsManager<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsManager : Microsoft.Extensions.Options.IOptionsSnapshot, Microsoft.Extensions.Options.IOptions where TOptions : class + { + public virtual TOptions Get(string name) => throw null; + public OptionsManager(Microsoft.Extensions.Options.IOptionsFactory factory) => throw null; + public TOptions Value { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.OptionsMonitor<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsMonitor : System.IDisposable, Microsoft.Extensions.Options.IOptionsMonitor where TOptions : class + { + public TOptions CurrentValue { get => throw null; } + public void Dispose() => throw null; + public virtual TOptions Get(string name) => throw null; + public System.IDisposable OnChange(System.Action listener) => throw null; + public OptionsMonitor(Microsoft.Extensions.Options.IOptionsFactory factory, System.Collections.Generic.IEnumerable> sources, Microsoft.Extensions.Options.IOptionsMonitorCache cache) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsMonitorExtensions` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class OptionsMonitorExtensions + { + public static System.IDisposable OnChange(this Microsoft.Extensions.Options.IOptionsMonitor monitor, System.Action listener) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsValidationException` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsValidationException : System.Exception + { + public System.Collections.Generic.IEnumerable Failures { get => throw null; } + public override string Message { get => throw null; } + public string OptionsName { get => throw null; } + public System.Type OptionsType { get => throw null; } + public OptionsValidationException(string optionsName, System.Type optionsType, System.Collections.Generic.IEnumerable failureMessages) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.OptionsWrapper<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class OptionsWrapper : Microsoft.Extensions.Options.IOptions where TOptions : class + { + public OptionsWrapper(TOptions options) => throw null; + public TOptions Value { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<,,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TDep5 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public TDep5 Dependency5 { get => throw null; } + public string Name { get => throw null; } + public void PostConfigure(TOptions options) => throw null; + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public string Name { get => throw null; } + public void PostConfigure(TOptions options) => throw null; + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TDep1 : class where TDep2 : class where TDep3 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public string Name { get => throw null; } + public void PostConfigure(TOptions options) => throw null; + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, TDep1 dependency, TDep2 dependency2, TDep3 dependency3, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TDep1 : class where TDep2 : class where TOptions : class + { + public System.Action Action { get => throw null; } + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public string Name { get => throw null; } + public void PostConfigure(TOptions options) => throw null; + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, TDep1 dependency, TDep2 dependency2, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TDep : class where TOptions : class + { + public System.Action Action { get => throw null; } + public TDep Dependency { get => throw null; } + public string Name { get => throw null; } + public void PostConfigure(TOptions options) => throw null; + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, TDep dependency, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.PostConfigureOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class PostConfigureOptions : Microsoft.Extensions.Options.IPostConfigureOptions where TOptions : class + { + public System.Action Action { get => throw null; } + public string Name { get => throw null; } + public virtual void PostConfigure(string name, TOptions options) => throw null; + public PostConfigureOptions(string name, System.Action action) => throw null; + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<,,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public TDep5 Dependency5 { get => throw null; } + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<,,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public TDep4 Dependency4 { get => throw null; } + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<,,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public TDep3 Dependency3 { get => throw null; } + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<,,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public TDep1 Dependency1 { get => throw null; } + public TDep2 Dependency2 { get => throw null; } + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, TDep1 dependency1, TDep2 dependency2, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<,>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public TDep Dependency { get => throw null; } + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, TDep dependency, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptions<>` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptions : Microsoft.Extensions.Options.IValidateOptions where TOptions : class + { + public string FailureMessage { get => throw null; } + public string Name { get => throw null; } + public Microsoft.Extensions.Options.ValidateOptionsResult Validate(string name, TOptions options) => throw null; + public ValidateOptions(string name, System.Func validation, string failureMessage) => throw null; + public System.Func Validation { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Options.ValidateOptionsResult` in `Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ValidateOptionsResult + { + public static Microsoft.Extensions.Options.ValidateOptionsResult Fail(string failureMessage) => throw null; + public static Microsoft.Extensions.Options.ValidateOptionsResult Fail(System.Collections.Generic.IEnumerable failures) => throw null; + public bool Failed { get => throw null; set => throw null; } + public string FailureMessage { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Failures { get => throw null; set => throw null; } + public static Microsoft.Extensions.Options.ValidateOptionsResult Skip; + public bool Skipped { get => throw null; set => throw null; } + public bool Succeeded { get => throw null; set => throw null; } + public static Microsoft.Extensions.Options.ValidateOptionsResult Success; + public ValidateOptionsResult() => throw null; + } + + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'DynamicallyAccessedMemberTypes' is not stubbed in this assembly 'Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + /* Duplicate type 'DynamicallyAccessedMembersAttribute' is not stubbed in this assembly 'Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs new file mode 100644 index 000000000000..30be4b497fa2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs @@ -0,0 +1,205 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace Primitives + { + // Generated from `Microsoft.Extensions.Primitives.CancellationChangeToken` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CancellationChangeToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + public CancellationChangeToken(System.Threading.CancellationToken cancellationToken) => throw null; + public bool HasChanged { get => throw null; } + public System.IDisposable RegisterChangeCallback(System.Action callback, object state) => throw null; + } + + // Generated from `Microsoft.Extensions.Primitives.ChangeToken` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ChangeToken + { + public static System.IDisposable OnChange(System.Func changeTokenProducer, System.Action changeTokenConsumer, TState state) => throw null; + public static System.IDisposable OnChange(System.Func changeTokenProducer, System.Action changeTokenConsumer) => throw null; + } + + // Generated from `Microsoft.Extensions.Primitives.CompositeChangeToken` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CompositeChangeToken : Microsoft.Extensions.Primitives.IChangeToken + { + public bool ActiveChangeCallbacks { get => throw null; } + public System.Collections.Generic.IReadOnlyList ChangeTokens { get => throw null; } + public CompositeChangeToken(System.Collections.Generic.IReadOnlyList changeTokens) => throw null; + public bool HasChanged { get => throw null; } + public System.IDisposable RegisterChangeCallback(System.Action callback, object state) => throw null; + } + + // Generated from `Microsoft.Extensions.Primitives.Extensions` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class Extensions + { + public static System.Text.StringBuilder Append(this System.Text.StringBuilder builder, Microsoft.Extensions.Primitives.StringSegment segment) => throw null; + } + + // Generated from `Microsoft.Extensions.Primitives.IChangeToken` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IChangeToken + { + bool ActiveChangeCallbacks { get; } + bool HasChanged { get; } + System.IDisposable RegisterChangeCallback(System.Action callback, object state); + } + + // Generated from `Microsoft.Extensions.Primitives.StringSegment` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct StringSegment : System.IEquatable, System.IEquatable + { + public static bool operator !=(Microsoft.Extensions.Primitives.StringSegment left, Microsoft.Extensions.Primitives.StringSegment right) => throw null; + public static bool operator ==(Microsoft.Extensions.Primitives.StringSegment left, Microsoft.Extensions.Primitives.StringSegment right) => throw null; + public System.ReadOnlyMemory AsMemory() => throw null; + public System.ReadOnlySpan AsSpan() => throw null; + public string Buffer { get => throw null; } + public static int Compare(Microsoft.Extensions.Primitives.StringSegment a, Microsoft.Extensions.Primitives.StringSegment b, System.StringComparison comparisonType) => throw null; + public static Microsoft.Extensions.Primitives.StringSegment Empty; + public bool EndsWith(string text, System.StringComparison comparisonType) => throw null; + public static bool Equals(Microsoft.Extensions.Primitives.StringSegment a, Microsoft.Extensions.Primitives.StringSegment b, System.StringComparison comparisonType) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(string text, System.StringComparison comparisonType) => throw null; + public bool Equals(string text) => throw null; + public bool Equals(Microsoft.Extensions.Primitives.StringSegment other, System.StringComparison comparisonType) => throw null; + public bool Equals(Microsoft.Extensions.Primitives.StringSegment other) => throw null; + public override int GetHashCode() => throw null; + public bool HasValue { get => throw null; } + public int IndexOf(System.Char c, int start, int count) => throw null; + public int IndexOf(System.Char c, int start) => throw null; + public int IndexOf(System.Char c) => throw null; + public int IndexOfAny(System.Char[] anyOf, int startIndex, int count) => throw null; + public int IndexOfAny(System.Char[] anyOf, int startIndex) => throw null; + public int IndexOfAny(System.Char[] anyOf) => throw null; + public static bool IsNullOrEmpty(Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public System.Char this[int index] { get => throw null; } + public int LastIndexOf(System.Char value) => throw null; + public int Length { get => throw null; } + public int Offset { get => throw null; } + public Microsoft.Extensions.Primitives.StringTokenizer Split(System.Char[] chars) => throw null; + public bool StartsWith(string text, System.StringComparison comparisonType) => throw null; + public StringSegment(string buffer, int offset, int length) => throw null; + public StringSegment(string buffer) => throw null; + // Stub generator skipped constructor + public Microsoft.Extensions.Primitives.StringSegment Subsegment(int offset, int length) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Subsegment(int offset) => throw null; + public string Substring(int offset, int length) => throw null; + public string Substring(int offset) => throw null; + public override string ToString() => throw null; + public Microsoft.Extensions.Primitives.StringSegment Trim() => throw null; + public Microsoft.Extensions.Primitives.StringSegment TrimEnd() => throw null; + public Microsoft.Extensions.Primitives.StringSegment TrimStart() => throw null; + public string Value { get => throw null; } + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `Microsoft.Extensions.Primitives.StringSegmentComparer` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringSegmentComparer : System.Collections.Generic.IEqualityComparer, System.Collections.Generic.IComparer + { + public int Compare(Microsoft.Extensions.Primitives.StringSegment x, Microsoft.Extensions.Primitives.StringSegment y) => throw null; + public bool Equals(Microsoft.Extensions.Primitives.StringSegment x, Microsoft.Extensions.Primitives.StringSegment y) => throw null; + public int GetHashCode(Microsoft.Extensions.Primitives.StringSegment obj) => throw null; + public static Microsoft.Extensions.Primitives.StringSegmentComparer Ordinal { get => throw null; } + public static Microsoft.Extensions.Primitives.StringSegmentComparer OrdinalIgnoreCase { get => throw null; } + } + + // Generated from `Microsoft.Extensions.Primitives.StringTokenizer` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct StringTokenizer : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + // Generated from `Microsoft.Extensions.Primitives.StringTokenizer.Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public Microsoft.Extensions.Primitives.StringSegment Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(ref Microsoft.Extensions.Primitives.StringTokenizer tokenizer) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public Microsoft.Extensions.Primitives.StringTokenizer.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public StringTokenizer(string value, System.Char[] separators) => throw null; + public StringTokenizer(Microsoft.Extensions.Primitives.StringSegment value, System.Char[] separators) => throw null; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.Extensions.Primitives.StringValues` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct StringValues : System.IEquatable, System.IEquatable, System.IEquatable, System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public static bool operator !=(string[] left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator !=(string left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator !=(object left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator !=(Microsoft.Extensions.Primitives.StringValues left, string[] right) => throw null; + public static bool operator !=(Microsoft.Extensions.Primitives.StringValues left, string right) => throw null; + public static bool operator !=(Microsoft.Extensions.Primitives.StringValues left, object right) => throw null; + public static bool operator !=(Microsoft.Extensions.Primitives.StringValues left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator ==(string[] left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator ==(string left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator ==(object left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool operator ==(Microsoft.Extensions.Primitives.StringValues left, string[] right) => throw null; + public static bool operator ==(Microsoft.Extensions.Primitives.StringValues left, string right) => throw null; + public static bool operator ==(Microsoft.Extensions.Primitives.StringValues left, object right) => throw null; + public static bool operator ==(Microsoft.Extensions.Primitives.StringValues left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + void System.Collections.Generic.ICollection.Add(string item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public static Microsoft.Extensions.Primitives.StringValues Concat(string value, Microsoft.Extensions.Primitives.StringValues values) => throw null; + public static Microsoft.Extensions.Primitives.StringValues Concat(Microsoft.Extensions.Primitives.StringValues values1, Microsoft.Extensions.Primitives.StringValues values2) => throw null; + public static Microsoft.Extensions.Primitives.StringValues Concat(Microsoft.Extensions.Primitives.StringValues values, string value) => throw null; + bool System.Collections.Generic.ICollection.Contains(string item) => throw null; + void System.Collections.Generic.ICollection.CopyTo(string[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public static Microsoft.Extensions.Primitives.StringValues Empty; + // Generated from `Microsoft.Extensions.Primitives.StringValues.Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public string Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public Enumerator(ref Microsoft.Extensions.Primitives.StringValues values) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public static bool Equals(string[] left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool Equals(string left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, string[] right) => throw null; + public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, string right) => throw null; + public static bool Equals(Microsoft.Extensions.Primitives.StringValues left, Microsoft.Extensions.Primitives.StringValues right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(string[] other) => throw null; + public bool Equals(string other) => throw null; + public bool Equals(Microsoft.Extensions.Primitives.StringValues other) => throw null; + public Microsoft.Extensions.Primitives.StringValues.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + int System.Collections.Generic.IList.IndexOf(string item) => throw null; + void System.Collections.Generic.IList.Insert(int index, string item) => throw null; + public static bool IsNullOrEmpty(Microsoft.Extensions.Primitives.StringValues value) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + string System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public string this[int index] { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(string item) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public StringValues(string[] values) => throw null; + public StringValues(string value) => throw null; + // Stub generator skipped constructor + public string[] ToArray() => throw null; + public override string ToString() => throw null; + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs new file mode 100644 index 000000000000..4a3e67a42b85 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs @@ -0,0 +1,70 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Extensions + { + namespace DependencyInjection + { + // Generated from `Microsoft.Extensions.DependencyInjection.EncoderServiceCollectionExtensions` in `Microsoft.Extensions.WebEncoders, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class EncoderServiceCollectionExtensions + { + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action setupAction) => throw null; + public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null; + } + + } + namespace WebEncoders + { + // Generated from `Microsoft.Extensions.WebEncoders.WebEncoderOptions` in `Microsoft.Extensions.WebEncoders, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class WebEncoderOptions + { + public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { get => throw null; set => throw null; } + public WebEncoderOptions() => throw null; + } + + namespace Testing + { + // Generated from `Microsoft.Extensions.WebEncoders.Testing.HtmlTestEncoder` in `Microsoft.Extensions.WebEncoders, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class HtmlTestEncoder : System.Text.Encodings.Web.HtmlEncoder + { + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) => throw null; + public override void Encode(System.IO.TextWriter output, System.Char[] value, int startIndex, int characterCount) => throw null; + public override string Encode(string value) => throw null; + unsafe public override int FindFirstCharacterToEncode(System.Char* text, int textLength) => throw null; + public HtmlTestEncoder() => throw null; + public override int MaxOutputCharactersPerInputCharacter { get => throw null; } + unsafe public override bool TryEncodeUnicodeScalar(int unicodeScalar, System.Char* buffer, int bufferLength, out int numberOfCharactersWritten) => throw null; + public override bool WillEncode(int unicodeScalar) => throw null; + } + + // Generated from `Microsoft.Extensions.WebEncoders.Testing.JavaScriptTestEncoder` in `Microsoft.Extensions.WebEncoders, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JavaScriptTestEncoder : System.Text.Encodings.Web.JavaScriptEncoder + { + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) => throw null; + public override void Encode(System.IO.TextWriter output, System.Char[] value, int startIndex, int characterCount) => throw null; + public override string Encode(string value) => throw null; + unsafe public override int FindFirstCharacterToEncode(System.Char* text, int textLength) => throw null; + public JavaScriptTestEncoder() => throw null; + public override int MaxOutputCharactersPerInputCharacter { get => throw null; } + unsafe public override bool TryEncodeUnicodeScalar(int unicodeScalar, System.Char* buffer, int bufferLength, out int numberOfCharactersWritten) => throw null; + public override bool WillEncode(int unicodeScalar) => throw null; + } + + // Generated from `Microsoft.Extensions.WebEncoders.Testing.UrlTestEncoder` in `Microsoft.Extensions.WebEncoders, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class UrlTestEncoder : System.Text.Encodings.Web.UrlEncoder + { + public override void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) => throw null; + public override void Encode(System.IO.TextWriter output, System.Char[] value, int startIndex, int characterCount) => throw null; + public override string Encode(string value) => throw null; + unsafe public override int FindFirstCharacterToEncode(System.Char* text, int textLength) => throw null; + public override int MaxOutputCharactersPerInputCharacter { get => throw null; } + unsafe public override bool TryEncodeUnicodeScalar(int unicodeScalar, System.Char* buffer, int bufferLength, out int numberOfCharactersWritten) => throw null; + public UrlTestEncoder() => throw null; + public override bool WillEncode(int unicodeScalar) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs new file mode 100644 index 000000000000..4ba01faec0e0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs @@ -0,0 +1,205 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace JSInterop + { + // Generated from `Microsoft.JSInterop.DotNetObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DotNetObjectReference + { + public static Microsoft.JSInterop.DotNetObjectReference Create(TValue value) where TValue : class => throw null; + } + + // Generated from `Microsoft.JSInterop.DotNetObjectReference<>` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class DotNetObjectReference : System.IDisposable where TValue : class + { + public void Dispose() => throw null; + public TValue Value { get => throw null; } + } + + // Generated from `Microsoft.JSInterop.IJSInProcessObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSInProcessObjectReference : System.IDisposable, System.IAsyncDisposable, Microsoft.JSInterop.IJSObjectReference + { + TValue Invoke(string identifier, params object[] args); + } + + // Generated from `Microsoft.JSInterop.IJSInProcessRuntime` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSInProcessRuntime : Microsoft.JSInterop.IJSRuntime + { + TResult Invoke(string identifier, params object[] args); + } + + // Generated from `Microsoft.JSInterop.IJSObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSObjectReference : System.IAsyncDisposable + { + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args); + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args); + } + + // Generated from `Microsoft.JSInterop.IJSRuntime` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSRuntime + { + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args); + System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args); + } + + // Generated from `Microsoft.JSInterop.IJSUnmarshalledObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSUnmarshalledObjectReference : System.IDisposable, System.IAsyncDisposable, Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop.IJSInProcessObjectReference + { + TResult InvokeUnmarshalled(string identifier); + TResult InvokeUnmarshalled(string identifier, T0 arg0); + TResult InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1); + TResult InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2); + } + + // Generated from `Microsoft.JSInterop.IJSUnmarshalledRuntime` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public interface IJSUnmarshalledRuntime + { + TResult InvokeUnmarshalled(string identifier); + TResult InvokeUnmarshalled(string identifier, T0 arg0); + TResult InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1); + TResult InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2); + } + + // Generated from `Microsoft.JSInterop.JSCallResultType` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum JSCallResultType + { + Default, + // Stub generator skipped constructor + JSObjectReference, + } + + // Generated from `Microsoft.JSInterop.JSException` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JSException : System.Exception + { + public JSException(string message, System.Exception innerException) => throw null; + public JSException(string message) => throw null; + } + + // Generated from `Microsoft.JSInterop.JSInProcessObjectReferenceExtensions` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JSInProcessObjectReferenceExtensions + { + public static void InvokeVoid(this Microsoft.JSInterop.IJSInProcessObjectReference jsObjectReference, string identifier, params object[] args) => throw null; + } + + // Generated from `Microsoft.JSInterop.JSInProcessRuntime` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class JSInProcessRuntime : Microsoft.JSInterop.JSRuntime, Microsoft.JSInterop.IJSRuntime, Microsoft.JSInterop.IJSInProcessRuntime + { + public TValue Invoke(string identifier, params object[] args) => throw null; + protected virtual string InvokeJS(string identifier, string argsJson) => throw null; + protected abstract string InvokeJS(string identifier, string argsJson, Microsoft.JSInterop.JSCallResultType resultType, System.Int64 targetInstanceId); + protected JSInProcessRuntime() => throw null; + } + + // Generated from `Microsoft.JSInterop.JSInProcessRuntimeExtensions` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JSInProcessRuntimeExtensions + { + public static void InvokeVoid(this Microsoft.JSInterop.IJSInProcessRuntime jsRuntime, string identifier, params object[] args) => throw null; + } + + // Generated from `Microsoft.JSInterop.JSInvokableAttribute` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JSInvokableAttribute : System.Attribute + { + public string Identifier { get => throw null; } + public JSInvokableAttribute(string identifier) => throw null; + public JSInvokableAttribute() => throw null; + } + + // Generated from `Microsoft.JSInterop.JSObjectReferenceExtensions` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JSObjectReferenceExtensions + { + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.TimeSpan timeout, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.TimeSpan timeout, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) => throw null; + } + + // Generated from `Microsoft.JSInterop.JSRuntime` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public abstract class JSRuntime : Microsoft.JSInterop.IJSRuntime + { + protected virtual void BeginInvokeJS(System.Int64 taskId, string identifier, string argsJson) => throw null; + protected abstract void BeginInvokeJS(System.Int64 taskId, string identifier, string argsJson, Microsoft.JSInterop.JSCallResultType resultType, System.Int64 targetInstanceId); + protected System.TimeSpan? DefaultAsyncTimeout { get => throw null; set => throw null; } + protected internal abstract void EndInvokeDotNet(Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, Microsoft.JSInterop.Infrastructure.DotNetInvocationResult invocationResult); + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args) => throw null; + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args) => throw null; + protected JSRuntime() => throw null; + protected internal System.Text.Json.JsonSerializerOptions JsonSerializerOptions { get => throw null; } + } + + // Generated from `Microsoft.JSInterop.JSRuntimeExtensions` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class JSRuntimeExtensions + { + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.TimeSpan timeout, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.TimeSpan timeout, params object[] args) => throw null; + public static System.Threading.Tasks.ValueTask InvokeVoidAsync(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, System.Threading.CancellationToken cancellationToken, params object[] args) => throw null; + } + + namespace Implementation + { + // Generated from `Microsoft.JSInterop.Implementation.JSInProcessObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JSInProcessObjectReference : Microsoft.JSInterop.Implementation.JSObjectReference, System.IDisposable, System.IAsyncDisposable, Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop.IJSInProcessObjectReference + { + public void Dispose() => throw null; + public TValue Invoke(string identifier, params object[] args) => throw null; + protected internal JSInProcessObjectReference(Microsoft.JSInterop.JSInProcessRuntime jsRuntime, System.Int64 id) : base(default(Microsoft.JSInterop.JSRuntime), default(System.Int64)) => throw null; + } + + // Generated from `Microsoft.JSInterop.Implementation.JSObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class JSObjectReference : System.IAsyncDisposable, Microsoft.JSInterop.IJSObjectReference + { + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + protected internal System.Int64 Id { get => throw null; } + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, object[] args) => throw null; + public System.Threading.Tasks.ValueTask InvokeAsync(string identifier, System.Threading.CancellationToken cancellationToken, object[] args) => throw null; + protected internal JSObjectReference(Microsoft.JSInterop.JSRuntime jsRuntime, System.Int64 id) => throw null; + protected void ThrowIfDisposed() => throw null; + } + + } + namespace Infrastructure + { + // Generated from `Microsoft.JSInterop.Infrastructure.DotNetDispatcher` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class DotNetDispatcher + { + public static void BeginInvokeDotNet(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson) => throw null; + public static void EndInvokeJS(Microsoft.JSInterop.JSRuntime jsRuntime, string arguments) => throw null; + public static string Invoke(Microsoft.JSInterop.JSRuntime jsRuntime, Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo invocationInfo, string argsJson) => throw null; + } + + // Generated from `Microsoft.JSInterop.Infrastructure.DotNetInvocationInfo` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct DotNetInvocationInfo + { + public string AssemblyName { get => throw null; } + public string CallId { get => throw null; } + public DotNetInvocationInfo(string assemblyName, string methodIdentifier, System.Int64 dotNetObjectId, string callId) => throw null; + // Stub generator skipped constructor + public System.Int64 DotNetObjectId { get => throw null; } + public string MethodIdentifier { get => throw null; } + } + + // Generated from `Microsoft.JSInterop.Infrastructure.DotNetInvocationResult` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public struct DotNetInvocationResult + { + public DotNetInvocationResult(object result) => throw null; + public DotNetInvocationResult(System.Exception exception, string errorKind) => throw null; + // Stub generator skipped constructor + public string ErrorKind { get => throw null; } + public System.Exception Exception { get => throw null; } + public object Result { get => throw null; } + public bool Success { get => throw null; } + } + + // Generated from `Microsoft.JSInterop.Infrastructure.IDotNetObjectReference` in `Microsoft.JSInterop, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + internal interface IDotNetObjectReference : System.IDisposable + { + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs new file mode 100644 index 000000000000..49469ae691e2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs @@ -0,0 +1,423 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Net + { + namespace Http + { + namespace Headers + { + // Generated from `Microsoft.Net.Http.Headers.CacheControlHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CacheControlHeaderValue + { + public CacheControlHeaderValue() => throw null; + public override bool Equals(object obj) => throw null; + public System.Collections.Generic.IList Extensions { get => throw null; } + public override int GetHashCode() => throw null; + public System.TimeSpan? MaxAge { get => throw null; set => throw null; } + public static string MaxAgeString; + public bool MaxStale { get => throw null; set => throw null; } + public System.TimeSpan? MaxStaleLimit { get => throw null; set => throw null; } + public static string MaxStaleString; + public System.TimeSpan? MinFresh { get => throw null; set => throw null; } + public static string MinFreshString; + public bool MustRevalidate { get => throw null; set => throw null; } + public static string MustRevalidateString; + public bool NoCache { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection NoCacheHeaders { get => throw null; } + public static string NoCacheString; + public bool NoStore { get => throw null; set => throw null; } + public static string NoStoreString; + public bool NoTransform { get => throw null; set => throw null; } + public static string NoTransformString; + public bool OnlyIfCached { get => throw null; set => throw null; } + public static string OnlyIfCachedString; + public static Microsoft.Net.Http.Headers.CacheControlHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public bool Private { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection PrivateHeaders { get => throw null; } + public static string PrivateString; + public bool ProxyRevalidate { get => throw null; set => throw null; } + public static string ProxyRevalidateString; + public bool Public { get => throw null; set => throw null; } + public static string PublicString; + public System.TimeSpan? SharedMaxAge { get => throw null; set => throw null; } + public static string SharedMaxAgeString; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.CacheControlHeaderValue parsedValue) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.ContentDispositionHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ContentDispositionHeaderValue + { + public ContentDispositionHeaderValue(Microsoft.Extensions.Primitives.StringSegment dispositionType) => throw null; + public System.DateTimeOffset? CreationDate { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment DispositionType { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public Microsoft.Extensions.Primitives.StringSegment FileName { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment FileNameStar { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.DateTimeOffset? ModificationDate { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Name { get => throw null; set => throw null; } + public System.Collections.Generic.IList Parameters { get => throw null; } + public static Microsoft.Net.Http.Headers.ContentDispositionHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public System.DateTimeOffset? ReadDate { get => throw null; set => throw null; } + public void SetHttpFileName(Microsoft.Extensions.Primitives.StringSegment fileName) => throw null; + public void SetMimeFileName(Microsoft.Extensions.Primitives.StringSegment fileName) => throw null; + public System.Int64? Size { get => throw null; set => throw null; } + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.ContentDispositionHeaderValue parsedValue) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.ContentDispositionHeaderValueIdentityExtensions` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class ContentDispositionHeaderValueIdentityExtensions + { + public static bool IsFileDisposition(this Microsoft.Net.Http.Headers.ContentDispositionHeaderValue header) => throw null; + public static bool IsFormDisposition(this Microsoft.Net.Http.Headers.ContentDispositionHeaderValue header) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.ContentRangeHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class ContentRangeHeaderValue + { + public ContentRangeHeaderValue(System.Int64 length) => throw null; + public ContentRangeHeaderValue(System.Int64 from, System.Int64 to, System.Int64 length) => throw null; + public ContentRangeHeaderValue(System.Int64 from, System.Int64 to) => throw null; + public override bool Equals(object obj) => throw null; + public System.Int64? From { get => throw null; } + public override int GetHashCode() => throw null; + public bool HasLength { get => throw null; } + public bool HasRange { get => throw null; } + public System.Int64? Length { get => throw null; } + public static Microsoft.Net.Http.Headers.ContentRangeHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public System.Int64? To { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.ContentRangeHeaderValue parsedValue) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Unit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.CookieHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class CookieHeaderValue + { + public CookieHeaderValue(Microsoft.Extensions.Primitives.StringSegment name, Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public CookieHeaderValue(Microsoft.Extensions.Primitives.StringSegment name) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public Microsoft.Extensions.Primitives.StringSegment Name { get => throw null; set => throw null; } + public static Microsoft.Net.Http.Headers.CookieHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList inputs) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList inputs) => throw null; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.CookieHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.EntityTagHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class EntityTagHeaderValue + { + public static Microsoft.Net.Http.Headers.EntityTagHeaderValue Any { get => throw null; } + public bool Compare(Microsoft.Net.Http.Headers.EntityTagHeaderValue other, bool useStrongComparison) => throw null; + public EntityTagHeaderValue(Microsoft.Extensions.Primitives.StringSegment tag, bool isWeak) => throw null; + public EntityTagHeaderValue(Microsoft.Extensions.Primitives.StringSegment tag) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsWeak { get => throw null; } + public static Microsoft.Net.Http.Headers.EntityTagHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList inputs) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList inputs) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Tag { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.EntityTagHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.HeaderNames` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HeaderNames + { + public static string Accept; + public static string AcceptCharset; + public static string AcceptEncoding; + public static string AcceptLanguage; + public static string AcceptRanges; + public static string AccessControlAllowCredentials; + public static string AccessControlAllowHeaders; + public static string AccessControlAllowMethods; + public static string AccessControlAllowOrigin; + public static string AccessControlExposeHeaders; + public static string AccessControlMaxAge; + public static string AccessControlRequestHeaders; + public static string AccessControlRequestMethod; + public static string Age; + public static string Allow; + public static string AltSvc; + public static string Authority; + public static string Authorization; + public static string CacheControl; + public static string Connection; + public static string ContentDisposition; + public static string ContentEncoding; + public static string ContentLanguage; + public static string ContentLength; + public static string ContentLocation; + public static string ContentMD5; + public static string ContentRange; + public static string ContentSecurityPolicy; + public static string ContentSecurityPolicyReportOnly; + public static string ContentType; + public static string Cookie; + public static string CorrelationContext; + public static string DNT; + public static string Date; + public static string ETag; + public static string Expect; + public static string Expires; + public static string From; + public static string GrpcAcceptEncoding; + public static string GrpcEncoding; + public static string GrpcMessage; + public static string GrpcStatus; + public static string GrpcTimeout; + public static string Host; + public static string IfMatch; + public static string IfModifiedSince; + public static string IfNoneMatch; + public static string IfRange; + public static string IfUnmodifiedSince; + public static string KeepAlive; + public static string LastModified; + public static string Location; + public static string MaxForwards; + public static string Method; + public static string Origin; + public static string Path; + public static string Pragma; + public static string ProxyAuthenticate; + public static string ProxyAuthorization; + public static string Range; + public static string Referer; + public static string RequestId; + public static string RetryAfter; + public static string Scheme; + public static string SecWebSocketAccept; + public static string SecWebSocketKey; + public static string SecWebSocketProtocol; + public static string SecWebSocketVersion; + public static string Server; + public static string SetCookie; + public static string Status; + public static string StrictTransportSecurity; + public static string TE; + public static string TraceParent; + public static string TraceState; + public static string Trailer; + public static string TransferEncoding; + public static string Translate; + public static string Upgrade; + public static string UpgradeInsecureRequests; + public static string UserAgent; + public static string Vary; + public static string Via; + public static string WWWAuthenticate; + public static string Warning; + public static string WebSocketSubProtocols; + public static string XFrameOptions; + public static string XRequestedWith; + } + + // Generated from `Microsoft.Net.Http.Headers.HeaderQuality` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HeaderQuality + { + public const double Match = default; + public const double NoMatch = default; + } + + // Generated from `Microsoft.Net.Http.Headers.HeaderUtilities` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public static class HeaderUtilities + { + public static bool ContainsCacheDirective(Microsoft.Extensions.Primitives.StringValues cacheControlDirectives, string targetDirectives) => throw null; + public static Microsoft.Extensions.Primitives.StringSegment EscapeAsQuotedString(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static string FormatDate(System.DateTimeOffset dateTime, bool quoted) => throw null; + public static string FormatDate(System.DateTimeOffset dateTime) => throw null; + public static string FormatNonNegativeInt64(System.Int64 value) => throw null; + public static bool IsQuoted(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static Microsoft.Extensions.Primitives.StringSegment RemoveQuotes(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static bool TryParseDate(Microsoft.Extensions.Primitives.StringSegment input, out System.DateTimeOffset result) => throw null; + public static bool TryParseNonNegativeInt32(Microsoft.Extensions.Primitives.StringSegment value, out int result) => throw null; + public static bool TryParseNonNegativeInt64(Microsoft.Extensions.Primitives.StringSegment value, out System.Int64 result) => throw null; + public static bool TryParseSeconds(Microsoft.Extensions.Primitives.StringValues headerValues, string targetValue, out System.TimeSpan? value) => throw null; + public static Microsoft.Extensions.Primitives.StringSegment UnescapeAsQuotedString(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.MediaTypeHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MediaTypeHeaderValue + { + public Microsoft.Extensions.Primitives.StringSegment Boundary { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Charset { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.MediaTypeHeaderValue Copy() => throw null; + public Microsoft.Net.Http.Headers.MediaTypeHeaderValue CopyAsReadOnly() => throw null; + public System.Text.Encoding Encoding { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public System.Collections.Generic.IEnumerable Facets { get => throw null; } + public override int GetHashCode() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSubsetOf(Microsoft.Net.Http.Headers.MediaTypeHeaderValue otherMediaType) => throw null; + public bool MatchesAllSubTypes { get => throw null; } + public bool MatchesAllSubTypesWithoutSuffix { get => throw null; } + public bool MatchesAllTypes { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment MediaType { get => throw null; set => throw null; } + public MediaTypeHeaderValue(Microsoft.Extensions.Primitives.StringSegment mediaType, double quality) => throw null; + public MediaTypeHeaderValue(Microsoft.Extensions.Primitives.StringSegment mediaType) => throw null; + public System.Collections.Generic.IList Parameters { get => throw null; } + public static Microsoft.Net.Http.Headers.MediaTypeHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList inputs) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList inputs) => throw null; + public double? Quality { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment SubType { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment SubTypeWithoutSuffix { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Suffix { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.MediaTypeHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Type { get => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.MediaTypeHeaderValueComparer` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class MediaTypeHeaderValueComparer : System.Collections.Generic.IComparer + { + public int Compare(Microsoft.Net.Http.Headers.MediaTypeHeaderValue mediaType1, Microsoft.Net.Http.Headers.MediaTypeHeaderValue mediaType2) => throw null; + public static Microsoft.Net.Http.Headers.MediaTypeHeaderValueComparer QualityComparer { get => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.NameValueHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class NameValueHeaderValue + { + public Microsoft.Net.Http.Headers.NameValueHeaderValue Copy() => throw null; + public Microsoft.Net.Http.Headers.NameValueHeaderValue CopyAsReadOnly() => throw null; + public override bool Equals(object obj) => throw null; + public static Microsoft.Net.Http.Headers.NameValueHeaderValue Find(System.Collections.Generic.IList values, Microsoft.Extensions.Primitives.StringSegment name) => throw null; + public override int GetHashCode() => throw null; + public Microsoft.Extensions.Primitives.StringSegment GetUnescapedValue() => throw null; + public bool IsReadOnly { get => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Name { get => throw null; } + public NameValueHeaderValue(Microsoft.Extensions.Primitives.StringSegment name, Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public NameValueHeaderValue(Microsoft.Extensions.Primitives.StringSegment name) => throw null; + public static Microsoft.Net.Http.Headers.NameValueHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList input) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList input) => throw null; + public void SetAndEscapeValue(Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.NameValueHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList input, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList input, out System.Collections.Generic.IList parsedValues) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.RangeConditionHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RangeConditionHeaderValue + { + public Microsoft.Net.Http.Headers.EntityTagHeaderValue EntityTag { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public System.DateTimeOffset? LastModified { get => throw null; } + public static Microsoft.Net.Http.Headers.RangeConditionHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public RangeConditionHeaderValue(string entityTag) => throw null; + public RangeConditionHeaderValue(System.DateTimeOffset lastModified) => throw null; + public RangeConditionHeaderValue(Microsoft.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.RangeConditionHeaderValue parsedValue) => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.RangeHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RangeHeaderValue + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static Microsoft.Net.Http.Headers.RangeHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public RangeHeaderValue(System.Int64? from, System.Int64? to) => throw null; + public RangeHeaderValue() => throw null; + public System.Collections.Generic.ICollection Ranges { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.RangeHeaderValue parsedValue) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Unit { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.RangeItemHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class RangeItemHeaderValue + { + public override bool Equals(object obj) => throw null; + public System.Int64? From { get => throw null; } + public override int GetHashCode() => throw null; + public RangeItemHeaderValue(System.Int64? from, System.Int64? to) => throw null; + public System.Int64? To { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Microsoft.Net.Http.Headers.SameSiteMode` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public enum SameSiteMode + { + Lax, + None, + // Stub generator skipped constructor + Strict, + Unspecified, + } + + // Generated from `Microsoft.Net.Http.Headers.SetCookieHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class SetCookieHeaderValue + { + public void AppendToStringBuilder(System.Text.StringBuilder builder) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Domain { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public System.DateTimeOffset? Expires { get => throw null; set => throw null; } + public System.Collections.Generic.IList Extensions { get => throw null; } + public override int GetHashCode() => throw null; + public bool HttpOnly { get => throw null; set => throw null; } + public System.TimeSpan? MaxAge { get => throw null; set => throw null; } + public Microsoft.Extensions.Primitives.StringSegment Name { get => throw null; set => throw null; } + public static Microsoft.Net.Http.Headers.SetCookieHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList inputs) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList inputs) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Path { get => throw null; set => throw null; } + public Microsoft.Net.Http.Headers.SameSiteMode SameSite { get => throw null; set => throw null; } + public bool Secure { get => throw null; set => throw null; } + public SetCookieHeaderValue(Microsoft.Extensions.Primitives.StringSegment name, Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public SetCookieHeaderValue(Microsoft.Extensions.Primitives.StringSegment name) => throw null; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.SetCookieHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList inputs, out System.Collections.Generic.IList parsedValues) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Value { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.StringWithQualityHeaderValue` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringWithQualityHeaderValue + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static Microsoft.Net.Http.Headers.StringWithQualityHeaderValue Parse(Microsoft.Extensions.Primitives.StringSegment input) => throw null; + public static System.Collections.Generic.IList ParseList(System.Collections.Generic.IList input) => throw null; + public static System.Collections.Generic.IList ParseStrictList(System.Collections.Generic.IList input) => throw null; + public double? Quality { get => throw null; } + public StringWithQualityHeaderValue(Microsoft.Extensions.Primitives.StringSegment value, double quality) => throw null; + public StringWithQualityHeaderValue(Microsoft.Extensions.Primitives.StringSegment value) => throw null; + public override string ToString() => throw null; + public static bool TryParse(Microsoft.Extensions.Primitives.StringSegment input, out Microsoft.Net.Http.Headers.StringWithQualityHeaderValue parsedValue) => throw null; + public static bool TryParseList(System.Collections.Generic.IList input, out System.Collections.Generic.IList parsedValues) => throw null; + public static bool TryParseStrictList(System.Collections.Generic.IList input, out System.Collections.Generic.IList parsedValues) => throw null; + public Microsoft.Extensions.Primitives.StringSegment Value { get => throw null; } + } + + // Generated from `Microsoft.Net.Http.Headers.StringWithQualityHeaderValueComparer` in `Microsoft.Net.Http.Headers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + public class StringWithQualityHeaderValueComparer : System.Collections.Generic.IComparer + { + public int Compare(Microsoft.Net.Http.Headers.StringWithQualityHeaderValue stringWithQuality1, Microsoft.Net.Http.Headers.StringWithQualityHeaderValue stringWithQuality2) => throw null; + public static Microsoft.Net.Http.Headers.StringWithQualityHeaderValueComparer QualityComparer { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs new file mode 100644 index 000000000000..22f20a410ae9 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs @@ -0,0 +1,254 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + // Generated from `Microsoft.Win32.Registry` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Registry + { + public static Microsoft.Win32.RegistryKey ClassesRoot; + public static Microsoft.Win32.RegistryKey CurrentConfig; + public static Microsoft.Win32.RegistryKey CurrentUser; + public static object GetValue(string keyName, string valueName, object defaultValue) => throw null; + public static Microsoft.Win32.RegistryKey LocalMachine; + public static Microsoft.Win32.RegistryKey PerformanceData; + public static void SetValue(string keyName, string valueName, object value, Microsoft.Win32.RegistryValueKind valueKind) => throw null; + public static void SetValue(string keyName, string valueName, object value) => throw null; + public static Microsoft.Win32.RegistryKey Users; + } + + // Generated from `Microsoft.Win32.RegistryHive` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RegistryHive + { + ClassesRoot, + CurrentConfig, + CurrentUser, + LocalMachine, + PerformanceData, + // Stub generator skipped constructor + Users, + } + + // Generated from `Microsoft.Win32.RegistryKey` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegistryKey : System.MarshalByRefObject, System.IDisposable + { + public void Close() => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, bool writable, Microsoft.Win32.RegistryOptions options) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, bool writable) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck, System.Security.AccessControl.RegistrySecurity registrySecurity) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck, Microsoft.Win32.RegistryOptions registryOptions, System.Security.AccessControl.RegistrySecurity registrySecurity) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck, Microsoft.Win32.RegistryOptions registryOptions) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck) => throw null; + public Microsoft.Win32.RegistryKey CreateSubKey(string subkey) => throw null; + public void DeleteSubKey(string subkey, bool throwOnMissingSubKey) => throw null; + public void DeleteSubKey(string subkey) => throw null; + public void DeleteSubKeyTree(string subkey, bool throwOnMissingSubKey) => throw null; + public void DeleteSubKeyTree(string subkey) => throw null; + public void DeleteValue(string name, bool throwOnMissingValue) => throw null; + public void DeleteValue(string name) => throw null; + public void Dispose() => throw null; + public void Flush() => throw null; + public static Microsoft.Win32.RegistryKey FromHandle(Microsoft.Win32.SafeHandles.SafeRegistryHandle handle, Microsoft.Win32.RegistryView view) => throw null; + public static Microsoft.Win32.RegistryKey FromHandle(Microsoft.Win32.SafeHandles.SafeRegistryHandle handle) => throw null; + public System.Security.AccessControl.RegistrySecurity GetAccessControl(System.Security.AccessControl.AccessControlSections includeSections) => throw null; + public System.Security.AccessControl.RegistrySecurity GetAccessControl() => throw null; + public string[] GetSubKeyNames() => throw null; + public object GetValue(string name, object defaultValue, Microsoft.Win32.RegistryValueOptions options) => throw null; + public object GetValue(string name, object defaultValue) => throw null; + public object GetValue(string name) => throw null; + public Microsoft.Win32.RegistryValueKind GetValueKind(string name) => throw null; + public string[] GetValueNames() => throw null; + public Microsoft.Win32.SafeHandles.SafeRegistryHandle Handle { get => throw null; } + public string Name { get => throw null; } + public static Microsoft.Win32.RegistryKey OpenBaseKey(Microsoft.Win32.RegistryHive hKey, Microsoft.Win32.RegistryView view) => throw null; + public static Microsoft.Win32.RegistryKey OpenRemoteBaseKey(Microsoft.Win32.RegistryHive hKey, string machineName, Microsoft.Win32.RegistryView view) => throw null; + public static Microsoft.Win32.RegistryKey OpenRemoteBaseKey(Microsoft.Win32.RegistryHive hKey, string machineName) => throw null; + public Microsoft.Win32.RegistryKey OpenSubKey(string name, bool writable) => throw null; + public Microsoft.Win32.RegistryKey OpenSubKey(string name, System.Security.AccessControl.RegistryRights rights) => throw null; + public Microsoft.Win32.RegistryKey OpenSubKey(string name, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck, System.Security.AccessControl.RegistryRights rights) => throw null; + public Microsoft.Win32.RegistryKey OpenSubKey(string name, Microsoft.Win32.RegistryKeyPermissionCheck permissionCheck) => throw null; + public Microsoft.Win32.RegistryKey OpenSubKey(string name) => throw null; + public void SetAccessControl(System.Security.AccessControl.RegistrySecurity registrySecurity) => throw null; + public void SetValue(string name, object value, Microsoft.Win32.RegistryValueKind valueKind) => throw null; + public void SetValue(string name, object value) => throw null; + public int SubKeyCount { get => throw null; } + public override string ToString() => throw null; + public int ValueCount { get => throw null; } + public Microsoft.Win32.RegistryView View { get => throw null; } + } + + // Generated from `Microsoft.Win32.RegistryKeyPermissionCheck` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RegistryKeyPermissionCheck + { + Default, + ReadSubTree, + ReadWriteSubTree, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.Win32.RegistryOptions` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum RegistryOptions + { + None, + // Stub generator skipped constructor + Volatile, + } + + // Generated from `Microsoft.Win32.RegistryValueKind` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RegistryValueKind + { + Binary, + DWord, + ExpandString, + MultiString, + None, + QWord, + // Stub generator skipped constructor + String, + Unknown, + } + + // Generated from `Microsoft.Win32.RegistryValueOptions` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum RegistryValueOptions + { + DoNotExpandEnvironmentNames, + None, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.Win32.RegistryView` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RegistryView + { + Default, + Registry32, + Registry64, + // Stub generator skipped constructor + } + + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeRegistryHandle` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeRegistryHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + protected override bool ReleaseHandle() => throw null; + public SafeRegistryHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Security + { + namespace AccessControl + { + // Generated from `System.Security.AccessControl.RegistryAccessRule` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegistryAccessRule : System.Security.AccessControl.AccessRule + { + public RegistryAccessRule(string identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public RegistryAccessRule(string identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public RegistryAccessRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public RegistryAccessRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public System.Security.AccessControl.RegistryRights RegistryRights { get => throw null; } + } + + // Generated from `System.Security.AccessControl.RegistryAuditRule` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegistryAuditRule : System.Security.AccessControl.AuditRule + { + public RegistryAuditRule(string identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public RegistryAuditRule(System.Security.Principal.IdentityReference identity, System.Security.AccessControl.RegistryRights registryRights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public System.Security.AccessControl.RegistryRights RegistryRights { get => throw null; } + } + + // Generated from `System.Security.AccessControl.RegistryRights` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum RegistryRights + { + ChangePermissions, + CreateLink, + CreateSubKey, + Delete, + EnumerateSubKeys, + ExecuteKey, + FullControl, + Notify, + QueryValues, + ReadKey, + ReadPermissions, + // Stub generator skipped constructor + SetValue, + TakeOwnership, + WriteKey, + } + + // Generated from `System.Security.AccessControl.RegistrySecurity` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegistrySecurity : System.Security.AccessControl.NativeObjectSecurity + { + public override System.Type AccessRightType { get => throw null; } + public override System.Security.AccessControl.AccessRule AccessRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) => throw null; + public override System.Type AccessRuleType { get => throw null; } + public void AddAccessRule(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public void AddAuditRule(System.Security.AccessControl.RegistryAuditRule rule) => throw null; + public override System.Security.AccessControl.AuditRule AuditRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) => throw null; + public override System.Type AuditRuleType { get => throw null; } + public RegistrySecurity() : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + public bool RemoveAccessRule(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public void RemoveAccessRuleAll(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public void RemoveAccessRuleSpecific(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public bool RemoveAuditRule(System.Security.AccessControl.RegistryAuditRule rule) => throw null; + public void RemoveAuditRuleAll(System.Security.AccessControl.RegistryAuditRule rule) => throw null; + public void RemoveAuditRuleSpecific(System.Security.AccessControl.RegistryAuditRule rule) => throw null; + public void ResetAccessRule(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public void SetAccessRule(System.Security.AccessControl.RegistryAccessRule rule) => throw null; + public void SetAuditRule(System.Security.AccessControl.RegistryAuditRule rule) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs new file mode 100644 index 000000000000..acbd76504c8e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs @@ -0,0 +1,620 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.EntryWrittenEventArgs` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EntryWrittenEventArgs : System.EventArgs + { + public System.Diagnostics.EventLogEntry Entry { get => throw null; } + public EntryWrittenEventArgs(System.Diagnostics.EventLogEntry entry) => throw null; + public EntryWrittenEventArgs() => throw null; + } + + // Generated from `System.Diagnostics.EntryWrittenEventHandler` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void EntryWrittenEventHandler(object sender, System.Diagnostics.EntryWrittenEventArgs e); + + // Generated from `System.Diagnostics.EventInstance` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventInstance + { + public int CategoryId { get => throw null; set => throw null; } + public System.Diagnostics.EventLogEntryType EntryType { get => throw null; set => throw null; } + public EventInstance(System.Int64 instanceId, int categoryId, System.Diagnostics.EventLogEntryType entryType) => throw null; + public EventInstance(System.Int64 instanceId, int categoryId) => throw null; + public System.Int64 InstanceId { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.EventLog` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLog : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize + { + public void BeginInit() => throw null; + public void Clear() => throw null; + public void Close() => throw null; + public static void CreateEventSource(string source, string logName, string machineName) => throw null; + public static void CreateEventSource(string source, string logName) => throw null; + public static void CreateEventSource(System.Diagnostics.EventSourceCreationData sourceData) => throw null; + public static void Delete(string logName, string machineName) => throw null; + public static void Delete(string logName) => throw null; + public static void DeleteEventSource(string source, string machineName) => throw null; + public static void DeleteEventSource(string source) => throw null; + protected override void Dispose(bool disposing) => throw null; + public bool EnableRaisingEvents { get => throw null; set => throw null; } + public void EndInit() => throw null; + public System.Diagnostics.EventLogEntryCollection Entries { get => throw null; } + public event System.Diagnostics.EntryWrittenEventHandler EntryWritten; + public EventLog(string logName, string machineName, string source) => throw null; + public EventLog(string logName, string machineName) => throw null; + public EventLog(string logName) => throw null; + public EventLog() => throw null; + public static bool Exists(string logName, string machineName) => throw null; + public static bool Exists(string logName) => throw null; + public static System.Diagnostics.EventLog[] GetEventLogs(string machineName) => throw null; + public static System.Diagnostics.EventLog[] GetEventLogs() => throw null; + public string Log { get => throw null; set => throw null; } + public string LogDisplayName { get => throw null; } + public static string LogNameFromSourceName(string source, string machineName) => throw null; + public string MachineName { get => throw null; set => throw null; } + public System.Int64 MaximumKilobytes { get => throw null; set => throw null; } + public int MinimumRetentionDays { get => throw null; } + public void ModifyOverflowPolicy(System.Diagnostics.OverflowAction action, int retentionDays) => throw null; + public System.Diagnostics.OverflowAction OverflowAction { get => throw null; } + public void RegisterDisplayName(string resourceFile, System.Int64 resourceId) => throw null; + public string Source { get => throw null; set => throw null; } + public static bool SourceExists(string source, string machineName) => throw null; + public static bool SourceExists(string source) => throw null; + public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get => throw null; set => throw null; } + public void WriteEntry(string message, System.Diagnostics.EventLogEntryType type, int eventID, System.Int16 category, System.Byte[] rawData) => throw null; + public void WriteEntry(string message, System.Diagnostics.EventLogEntryType type, int eventID, System.Int16 category) => throw null; + public void WriteEntry(string message, System.Diagnostics.EventLogEntryType type, int eventID) => throw null; + public void WriteEntry(string message, System.Diagnostics.EventLogEntryType type) => throw null; + public void WriteEntry(string message) => throw null; + public static void WriteEntry(string source, string message, System.Diagnostics.EventLogEntryType type, int eventID, System.Int16 category, System.Byte[] rawData) => throw null; + public static void WriteEntry(string source, string message, System.Diagnostics.EventLogEntryType type, int eventID, System.Int16 category) => throw null; + public static void WriteEntry(string source, string message, System.Diagnostics.EventLogEntryType type, int eventID) => throw null; + public static void WriteEntry(string source, string message, System.Diagnostics.EventLogEntryType type) => throw null; + public static void WriteEntry(string source, string message) => throw null; + public void WriteEvent(System.Diagnostics.EventInstance instance, params object[] values) => throw null; + public void WriteEvent(System.Diagnostics.EventInstance instance, System.Byte[] data, params object[] values) => throw null; + public static void WriteEvent(string source, System.Diagnostics.EventInstance instance, params object[] values) => throw null; + public static void WriteEvent(string source, System.Diagnostics.EventInstance instance, System.Byte[] data, params object[] values) => throw null; + } + + // Generated from `System.Diagnostics.EventLogEntry` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogEntry : System.ComponentModel.Component, System.Runtime.Serialization.ISerializable + { + public string Category { get => throw null; } + public System.Int16 CategoryNumber { get => throw null; } + public System.Byte[] Data { get => throw null; } + public System.Diagnostics.EventLogEntryType EntryType { get => throw null; } + public bool Equals(System.Diagnostics.EventLogEntry otherEntry) => throw null; + public int EventID { get => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int Index { get => throw null; } + public System.Int64 InstanceId { get => throw null; } + public string MachineName { get => throw null; } + public string Message { get => throw null; } + public string[] ReplacementStrings { get => throw null; } + public string Source { get => throw null; } + public System.DateTime TimeGenerated { get => throw null; } + public System.DateTime TimeWritten { get => throw null; } + public string UserName { get => throw null; } + } + + // Generated from `System.Diagnostics.EventLogEntryCollection` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogEntryCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Diagnostics.EventLogEntry[] entries, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.Diagnostics.EventLogEntry this[int index] { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Diagnostics.EventLogEntryType` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum EventLogEntryType + { + Error, + // Stub generator skipped constructor + FailureAudit, + Information, + SuccessAudit, + Warning, + } + + // Generated from `System.Diagnostics.EventLogTraceListener` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogTraceListener : System.Diagnostics.TraceListener + { + public override void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Diagnostics.EventLog EventLog { get => throw null; set => throw null; } + public EventLogTraceListener(string source) => throw null; + public EventLogTraceListener(System.Diagnostics.EventLog eventLog) => throw null; + public EventLogTraceListener() => throw null; + public override string Name { get => throw null; set => throw null; } + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, params object[] data) => throw null; + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, object data) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, string message) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType severity, int id, string format, params object[] args) => throw null; + public override void Write(string message) => throw null; + public override void WriteLine(string message) => throw null; + } + + // Generated from `System.Diagnostics.EventSourceCreationData` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventSourceCreationData + { + public int CategoryCount { get => throw null; set => throw null; } + public string CategoryResourceFile { get => throw null; set => throw null; } + public EventSourceCreationData(string source, string logName) => throw null; + public string LogName { get => throw null; set => throw null; } + public string MachineName { get => throw null; set => throw null; } + public string MessageResourceFile { get => throw null; set => throw null; } + public string ParameterResourceFile { get => throw null; set => throw null; } + public string Source { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.OverflowAction` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum OverflowAction + { + DoNotOverwrite, + // Stub generator skipped constructor + OverwriteAsNeeded, + OverwriteOlder, + } + + namespace Eventing + { + namespace Reader + { + // Generated from `System.Diagnostics.Eventing.Reader.EventBookmark` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventBookmark + { + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventKeyword` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventKeyword + { + public string DisplayName { get => throw null; } + public string Name { get => throw null; } + public System.Int64 Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLevel` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLevel + { + public string DisplayName { get => throw null; } + public string Name { get => throw null; } + public int Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogConfiguration` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogConfiguration : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public EventLogConfiguration(string logName, System.Diagnostics.Eventing.Reader.EventLogSession session) => throw null; + public EventLogConfiguration(string logName) => throw null; + public bool IsClassicLog { get => throw null; } + public bool IsEnabled { get => throw null; set => throw null; } + public string LogFilePath { get => throw null; set => throw null; } + public System.Diagnostics.Eventing.Reader.EventLogIsolation LogIsolation { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventLogMode LogMode { get => throw null; set => throw null; } + public string LogName { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventLogType LogType { get => throw null; } + public System.Int64 MaximumSizeInBytes { get => throw null; set => throw null; } + public string OwningProviderName { get => throw null; } + public int? ProviderBufferSize { get => throw null; } + public System.Guid? ProviderControlGuid { get => throw null; } + public System.Int64? ProviderKeywords { get => throw null; set => throw null; } + public int? ProviderLatency { get => throw null; } + public int? ProviderLevel { get => throw null; set => throw null; } + public int? ProviderMaximumNumberOfBuffers { get => throw null; } + public int? ProviderMinimumNumberOfBuffers { get => throw null; } + public System.Collections.Generic.IEnumerable ProviderNames { get => throw null; } + public void SaveChanges() => throw null; + public string SecurityDescriptor { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogException` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogException : System.Exception + { + public EventLogException(string message, System.Exception innerException) => throw null; + public EventLogException(string message) => throw null; + public EventLogException() => throw null; + protected EventLogException(int errorCode) => throw null; + protected EventLogException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogInformation` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogInformation + { + public int? Attributes { get => throw null; } + public System.DateTime? CreationTime { get => throw null; } + public System.Int64? FileSize { get => throw null; } + public bool? IsLogFull { get => throw null; } + public System.DateTime? LastAccessTime { get => throw null; } + public System.DateTime? LastWriteTime { get => throw null; } + public System.Int64? OldestRecordNumber { get => throw null; } + public System.Int64? RecordCount { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogInvalidDataException` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogInvalidDataException : System.Diagnostics.Eventing.Reader.EventLogException + { + public EventLogInvalidDataException(string message, System.Exception innerException) => throw null; + public EventLogInvalidDataException(string message) => throw null; + public EventLogInvalidDataException() => throw null; + protected EventLogInvalidDataException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogIsolation` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum EventLogIsolation + { + Application, + Custom, + // Stub generator skipped constructor + System, + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogLink` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogLink + { + public string DisplayName { get => throw null; } + public bool IsImported { get => throw null; } + public string LogName { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogMode` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum EventLogMode + { + AutoBackup, + Circular, + // Stub generator skipped constructor + Retain, + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogNotFoundException` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogNotFoundException : System.Diagnostics.Eventing.Reader.EventLogException + { + public EventLogNotFoundException(string message, System.Exception innerException) => throw null; + public EventLogNotFoundException(string message) => throw null; + public EventLogNotFoundException() => throw null; + protected EventLogNotFoundException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogPropertySelector` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogPropertySelector : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public EventLogPropertySelector(System.Collections.Generic.IEnumerable propertyQueries) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogProviderDisabledException` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogProviderDisabledException : System.Diagnostics.Eventing.Reader.EventLogException + { + public EventLogProviderDisabledException(string message, System.Exception innerException) => throw null; + public EventLogProviderDisabledException(string message) => throw null; + public EventLogProviderDisabledException() => throw null; + protected EventLogProviderDisabledException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogQuery` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogQuery + { + public EventLogQuery(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query) => throw null; + public EventLogQuery(string path, System.Diagnostics.Eventing.Reader.PathType pathType) => throw null; + public bool ReverseDirection { get => throw null; set => throw null; } + public System.Diagnostics.Eventing.Reader.EventLogSession Session { get => throw null; set => throw null; } + public bool TolerateQueryErrors { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogReader` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogReader : System.IDisposable + { + public int BatchSize { get => throw null; set => throw null; } + public void CancelReading() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public EventLogReader(string path, System.Diagnostics.Eventing.Reader.PathType pathType) => throw null; + public EventLogReader(string path) => throw null; + public EventLogReader(System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark) => throw null; + public EventLogReader(System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery) => throw null; + public System.Collections.Generic.IList LogStatus { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent(System.TimeSpan timeout) => throw null; + public System.Diagnostics.Eventing.Reader.EventRecord ReadEvent() => throw null; + public void Seek(System.IO.SeekOrigin origin, System.Int64 offset) => throw null; + public void Seek(System.Diagnostics.Eventing.Reader.EventBookmark bookmark, System.Int64 offset) => throw null; + public void Seek(System.Diagnostics.Eventing.Reader.EventBookmark bookmark) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogReadingException` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogReadingException : System.Diagnostics.Eventing.Reader.EventLogException + { + public EventLogReadingException(string message, System.Exception innerException) => throw null; + public EventLogReadingException(string message) => throw null; + public EventLogReadingException() => throw null; + protected EventLogReadingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogRecord` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogRecord : System.Diagnostics.Eventing.Reader.EventRecord + { + public override System.Guid? ActivityId { get => throw null; } + public override System.Diagnostics.Eventing.Reader.EventBookmark Bookmark { get => throw null; } + public string ContainerLog { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override string FormatDescription(System.Collections.Generic.IEnumerable values) => throw null; + public override string FormatDescription() => throw null; + public System.Collections.Generic.IList GetPropertyValues(System.Diagnostics.Eventing.Reader.EventLogPropertySelector propertySelector) => throw null; + public override int Id { get => throw null; } + public override System.Int64? Keywords { get => throw null; } + public override System.Collections.Generic.IEnumerable KeywordsDisplayNames { get => throw null; } + public override System.Byte? Level { get => throw null; } + public override string LevelDisplayName { get => throw null; } + public override string LogName { get => throw null; } + public override string MachineName { get => throw null; } + public System.Collections.Generic.IEnumerable MatchedQueryIds { get => throw null; } + public override System.Int16? Opcode { get => throw null; } + public override string OpcodeDisplayName { get => throw null; } + public override int? ProcessId { get => throw null; } + public override System.Collections.Generic.IList Properties { get => throw null; } + public override System.Guid? ProviderId { get => throw null; } + public override string ProviderName { get => throw null; } + public override int? Qualifiers { get => throw null; } + public override System.Int64? RecordId { get => throw null; } + public override System.Guid? RelatedActivityId { get => throw null; } + public override int? Task { get => throw null; } + public override string TaskDisplayName { get => throw null; } + public override int? ThreadId { get => throw null; } + public override System.DateTime? TimeCreated { get => throw null; } + public override string ToXml() => throw null; + public override System.Security.Principal.SecurityIdentifier UserId { get => throw null; } + public override System.Byte? Version { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogSession` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogSession : System.IDisposable + { + public void CancelCurrentOperations() => throw null; + public void ClearLog(string logName, string backupPath) => throw null; + public void ClearLog(string logName) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public EventLogSession(string server, string domain, string user, System.Security.SecureString password, System.Diagnostics.Eventing.Reader.SessionAuthentication logOnType) => throw null; + public EventLogSession(string server) => throw null; + public EventLogSession() => throw null; + public void ExportLog(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors) => throw null; + public void ExportLog(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath) => throw null; + public void ExportLogAndMessages(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors, System.Globalization.CultureInfo targetCultureInfo) => throw null; + public void ExportLogAndMessages(string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath) => throw null; + public System.Diagnostics.Eventing.Reader.EventLogInformation GetLogInformation(string logName, System.Diagnostics.Eventing.Reader.PathType pathType) => throw null; + public System.Collections.Generic.IEnumerable GetLogNames() => throw null; + public System.Collections.Generic.IEnumerable GetProviderNames() => throw null; + public static System.Diagnostics.Eventing.Reader.EventLogSession GlobalSession { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogStatus` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogStatus + { + public string LogName { get => throw null; } + public int StatusCode { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogType` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum EventLogType + { + Administrative, + Analytical, + Debug, + // Stub generator skipped constructor + Operational, + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventLogWatcher` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogWatcher : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool Enabled { get => throw null; set => throw null; } + public EventLogWatcher(string path) => throw null; + public EventLogWatcher(System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark, bool readExistingEvents) => throw null; + public EventLogWatcher(System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery, System.Diagnostics.Eventing.Reader.EventBookmark bookmark) => throw null; + public EventLogWatcher(System.Diagnostics.Eventing.Reader.EventLogQuery eventQuery) => throw null; + public event System.EventHandler EventRecordWritten; + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventMetadata` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventMetadata + { + public string Description { get => throw null; } + public System.Int64 Id { get => throw null; } + public System.Collections.Generic.IEnumerable Keywords { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventLevel Level { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventLogLink LogLink { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventOpcode Opcode { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventTask Task { get => throw null; } + public string Template { get => throw null; } + public System.Byte Version { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventOpcode` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventOpcode + { + public string DisplayName { get => throw null; } + public string Name { get => throw null; } + public int Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventProperty` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventProperty + { + public object Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventRecord` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class EventRecord : System.IDisposable + { + public abstract System.Guid? ActivityId { get; } + public abstract System.Diagnostics.Eventing.Reader.EventBookmark Bookmark { get; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected EventRecord() => throw null; + public abstract string FormatDescription(System.Collections.Generic.IEnumerable values); + public abstract string FormatDescription(); + public abstract int Id { get; } + public abstract System.Int64? Keywords { get; } + public abstract System.Collections.Generic.IEnumerable KeywordsDisplayNames { get; } + public abstract System.Byte? Level { get; } + public abstract string LevelDisplayName { get; } + public abstract string LogName { get; } + public abstract string MachineName { get; } + public abstract System.Int16? Opcode { get; } + public abstract string OpcodeDisplayName { get; } + public abstract int? ProcessId { get; } + public abstract System.Collections.Generic.IList Properties { get; } + public abstract System.Guid? ProviderId { get; } + public abstract string ProviderName { get; } + public abstract int? Qualifiers { get; } + public abstract System.Int64? RecordId { get; } + public abstract System.Guid? RelatedActivityId { get; } + public abstract int? Task { get; } + public abstract string TaskDisplayName { get; } + public abstract int? ThreadId { get; } + public abstract System.DateTime? TimeCreated { get; } + public abstract string ToXml(); + public abstract System.Security.Principal.SecurityIdentifier UserId { get; } + public abstract System.Byte? Version { get; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventRecordWrittenEventArgs` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventRecordWrittenEventArgs : System.EventArgs + { + public System.Exception EventException { get => throw null; } + public System.Diagnostics.Eventing.Reader.EventRecord EventRecord { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.EventTask` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventTask + { + public string DisplayName { get => throw null; } + public System.Guid EventGuid { get => throw null; } + public string Name { get => throw null; } + public int Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.PathType` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum PathType + { + FilePath, + LogName, + // Stub generator skipped constructor + } + + // Generated from `System.Diagnostics.Eventing.Reader.ProviderMetadata` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProviderMetadata : System.IDisposable + { + public string DisplayName { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Collections.Generic.IEnumerable Events { get => throw null; } + public System.Uri HelpLink { get => throw null; } + public System.Guid Id { get => throw null; } + public System.Collections.Generic.IList Keywords { get => throw null; } + public System.Collections.Generic.IList Levels { get => throw null; } + public System.Collections.Generic.IList LogLinks { get => throw null; } + public string MessageFilePath { get => throw null; } + public string Name { get => throw null; } + public System.Collections.Generic.IList Opcodes { get => throw null; } + public string ParameterFilePath { get => throw null; } + public ProviderMetadata(string providerName, System.Diagnostics.Eventing.Reader.EventLogSession session, System.Globalization.CultureInfo targetCultureInfo) => throw null; + public ProviderMetadata(string providerName) => throw null; + public string ResourceFilePath { get => throw null; } + public System.Collections.Generic.IList Tasks { get => throw null; } + } + + // Generated from `System.Diagnostics.Eventing.Reader.SessionAuthentication` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SessionAuthentication + { + Default, + Kerberos, + Negotiate, + Ntlm, + // Stub generator skipped constructor + } + + // Generated from `System.Diagnostics.Eventing.Reader.StandardEventKeywords` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum StandardEventKeywords + { + AuditFailure, + AuditSuccess, + CorrelationHint, + CorrelationHint2, + EventLogClassic, + None, + ResponseTime, + Sqm, + // Stub generator skipped constructor + WdiContext, + WdiDiagnostic, + } + + // Generated from `System.Diagnostics.Eventing.Reader.StandardEventLevel` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum StandardEventLevel + { + Critical, + Error, + Informational, + LogAlways, + // Stub generator skipped constructor + Verbose, + Warning, + } + + // Generated from `System.Diagnostics.Eventing.Reader.StandardEventOpcode` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum StandardEventOpcode + { + DataCollectionStart, + DataCollectionStop, + Extension, + Info, + Receive, + Reply, + Resume, + Send, + // Stub generator skipped constructor + Start, + Stop, + Suspend, + } + + // Generated from `System.Diagnostics.Eventing.Reader.StandardEventTask` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum StandardEventTask + { + None, + // Stub generator skipped constructor + } + + } + } + } + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs new file mode 100644 index 000000000000..f10b9e65da2b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs @@ -0,0 +1,167 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } + namespace IO + { + namespace Pipelines + { + // Generated from `System.IO.Pipelines.FlushResult` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct FlushResult + { + public FlushResult(bool isCanceled, bool isCompleted) => throw null; + // Stub generator skipped constructor + public bool IsCanceled { get => throw null; } + public bool IsCompleted { get => throw null; } + } + + // Generated from `System.IO.Pipelines.IDuplexPipe` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IDuplexPipe + { + System.IO.Pipelines.PipeReader Input { get; } + System.IO.Pipelines.PipeWriter Output { get; } + } + + // Generated from `System.IO.Pipelines.Pipe` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Pipe + { + public Pipe(System.IO.Pipelines.PipeOptions options) => throw null; + public Pipe() => throw null; + public System.IO.Pipelines.PipeReader Reader { get => throw null; } + public void Reset() => throw null; + public System.IO.Pipelines.PipeWriter Writer { get => throw null; } + } + + // Generated from `System.IO.Pipelines.PipeOptions` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PipeOptions + { + public static System.IO.Pipelines.PipeOptions Default { get => throw null; } + public int MinimumSegmentSize { get => throw null; } + public System.Int64 PauseWriterThreshold { get => throw null; } + public PipeOptions(System.Buffers.MemoryPool pool = default(System.Buffers.MemoryPool), System.IO.Pipelines.PipeScheduler readerScheduler = default(System.IO.Pipelines.PipeScheduler), System.IO.Pipelines.PipeScheduler writerScheduler = default(System.IO.Pipelines.PipeScheduler), System.Int64 pauseWriterThreshold = default(System.Int64), System.Int64 resumeWriterThreshold = default(System.Int64), int minimumSegmentSize = default(int), bool useSynchronizationContext = default(bool)) => throw null; + public System.Buffers.MemoryPool Pool { get => throw null; } + public System.IO.Pipelines.PipeScheduler ReaderScheduler { get => throw null; } + public System.Int64 ResumeWriterThreshold { get => throw null; } + public bool UseSynchronizationContext { get => throw null; } + public System.IO.Pipelines.PipeScheduler WriterScheduler { get => throw null; } + } + + // Generated from `System.IO.Pipelines.PipeReader` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class PipeReader + { + public abstract void AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined); + public abstract void AdvanceTo(System.SequencePosition consumed); + public virtual System.IO.Stream AsStream(bool leaveOpen = default(bool)) => throw null; + public abstract void CancelPendingRead(); + public abstract void Complete(System.Exception exception = default(System.Exception)); + public virtual System.Threading.Tasks.ValueTask CompleteAsync(System.Exception exception = default(System.Exception)) => throw null; + public virtual System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task CopyToAsync(System.IO.Pipelines.PipeWriter destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.IO.Pipelines.PipeReader Create(System.IO.Stream stream, System.IO.Pipelines.StreamPipeReaderOptions readerOptions = default(System.IO.Pipelines.StreamPipeReaderOptions)) => throw null; + public virtual void OnWriterCompleted(System.Action callback, object state) => throw null; + protected PipeReader() => throw null; + public abstract System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract bool TryRead(out System.IO.Pipelines.ReadResult result); + } + + // Generated from `System.IO.Pipelines.PipeScheduler` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class PipeScheduler + { + public static System.IO.Pipelines.PipeScheduler Inline { get => throw null; } + protected PipeScheduler() => throw null; + public abstract void Schedule(System.Action action, object state); + public static System.IO.Pipelines.PipeScheduler ThreadPool { get => throw null; } + } + + // Generated from `System.IO.Pipelines.PipeWriter` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class PipeWriter : System.Buffers.IBufferWriter + { + public abstract void Advance(int bytes); + public virtual System.IO.Stream AsStream(bool leaveOpen = default(bool)) => throw null; + public abstract void CancelPendingFlush(); + public abstract void Complete(System.Exception exception = default(System.Exception)); + public virtual System.Threading.Tasks.ValueTask CompleteAsync(System.Exception exception = default(System.Exception)) => throw null; + protected internal virtual System.Threading.Tasks.Task CopyFromAsync(System.IO.Stream source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.IO.Pipelines.PipeWriter Create(System.IO.Stream stream, System.IO.Pipelines.StreamPipeWriterOptions writerOptions = default(System.IO.Pipelines.StreamPipeWriterOptions)) => throw null; + public abstract System.Threading.Tasks.ValueTask FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Memory GetMemory(int sizeHint = default(int)); + public abstract System.Span GetSpan(int sizeHint = default(int)); + public virtual void OnReaderCompleted(System.Action callback, object state) => throw null; + protected PipeWriter() => throw null; + public virtual System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.IO.Pipelines.ReadResult` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ReadResult + { + public System.Buffers.ReadOnlySequence Buffer { get => throw null; } + public bool IsCanceled { get => throw null; } + public bool IsCompleted { get => throw null; } + public ReadResult(System.Buffers.ReadOnlySequence buffer, bool isCanceled, bool isCompleted) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.IO.Pipelines.StreamPipeExtensions` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class StreamPipeExtensions + { + public static System.Threading.Tasks.Task CopyToAsync(this System.IO.Stream source, System.IO.Pipelines.PipeWriter destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.IO.Pipelines.StreamPipeReaderOptions` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StreamPipeReaderOptions + { + public int BufferSize { get => throw null; } + public bool LeaveOpen { get => throw null; } + public int MinimumReadSize { get => throw null; } + public System.Buffers.MemoryPool Pool { get => throw null; } + public StreamPipeReaderOptions(System.Buffers.MemoryPool pool = default(System.Buffers.MemoryPool), int bufferSize = default(int), int minimumReadSize = default(int), bool leaveOpen = default(bool)) => throw null; + } + + // Generated from `System.IO.Pipelines.StreamPipeWriterOptions` in `System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StreamPipeWriterOptions + { + public bool LeaveOpen { get => throw null; } + public int MinimumBufferSize { get => throw null; } + public System.Buffers.MemoryPool Pool { get => throw null; } + public StreamPipeWriterOptions(System.Buffers.MemoryPool pool = default(System.Buffers.MemoryPool), int minimumBufferSize = default(int), bool leaveOpen = default(bool)) => throw null; + } + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs new file mode 100644 index 000000000000..3daf16967265 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs @@ -0,0 +1,681 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Security + { + namespace AccessControl + { + // Generated from `System.Security.AccessControl.AccessControlActions` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AccessControlActions + { + // Stub generator skipped constructor + Change, + None, + View, + } + + // Generated from `System.Security.AccessControl.AccessControlModification` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AccessControlModification + { + // Stub generator skipped constructor + Add, + Remove, + RemoveAll, + RemoveSpecific, + Reset, + Set, + } + + // Generated from `System.Security.AccessControl.AccessControlSections` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AccessControlSections + { + Access, + // Stub generator skipped constructor + All, + Audit, + Group, + None, + Owner, + } + + // Generated from `System.Security.AccessControl.AccessControlType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AccessControlType + { + // Stub generator skipped constructor + Allow, + Deny, + } + + // Generated from `System.Security.AccessControl.AccessRule` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AccessRule : System.Security.AccessControl.AuthorizationRule + { + public System.Security.AccessControl.AccessControlType AccessControlType { get => throw null; } + protected AccessRule(System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags)) => throw null; + } + + // Generated from `System.Security.AccessControl.AccessRule<>` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AccessRule : System.Security.AccessControl.AccessRule where T : struct + { + public AccessRule(string identity, T rights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public AccessRule(string identity, T rights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public AccessRule(System.Security.Principal.IdentityReference identity, T rights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public AccessRule(System.Security.Principal.IdentityReference identity, T rights, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public T Rights { get => throw null; } + } + + // Generated from `System.Security.AccessControl.AceEnumerator` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AceEnumerator : System.Collections.IEnumerator + { + public System.Security.AccessControl.GenericAce Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.AccessControl.AceFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AceFlags + { + // Stub generator skipped constructor + AuditFlags, + ContainerInherit, + FailedAccess, + InheritOnly, + InheritanceFlags, + Inherited, + NoPropagateInherit, + None, + ObjectInherit, + SuccessfulAccess, + } + + // Generated from `System.Security.AccessControl.AceQualifier` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AceQualifier + { + AccessAllowed, + AccessDenied, + // Stub generator skipped constructor + SystemAlarm, + SystemAudit, + } + + // Generated from `System.Security.AccessControl.AceType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AceType + { + AccessAllowed, + AccessAllowedCallback, + AccessAllowedCallbackObject, + AccessAllowedCompound, + AccessAllowedObject, + AccessDenied, + AccessDeniedCallback, + AccessDeniedCallbackObject, + AccessDeniedObject, + // Stub generator skipped constructor + MaxDefinedAceType, + SystemAlarm, + SystemAlarmCallback, + SystemAlarmCallbackObject, + SystemAlarmObject, + SystemAudit, + SystemAuditCallback, + SystemAuditCallbackObject, + SystemAuditObject, + } + + // Generated from `System.Security.AccessControl.AuditFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AuditFlags + { + // Stub generator skipped constructor + Failure, + None, + Success, + } + + // Generated from `System.Security.AccessControl.AuditRule` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AuditRule : System.Security.AccessControl.AuthorizationRule + { + public System.Security.AccessControl.AuditFlags AuditFlags { get => throw null; } + protected AuditRule(System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags auditFlags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags)) => throw null; + } + + // Generated from `System.Security.AccessControl.AuditRule<>` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AuditRule : System.Security.AccessControl.AuditRule where T : struct + { + public AuditRule(string identity, T rights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public AuditRule(string identity, T rights, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public AuditRule(System.Security.Principal.IdentityReference identity, T rights, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public AuditRule(System.Security.Principal.IdentityReference identity, T rights, System.Security.AccessControl.AuditFlags flags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public T Rights { get => throw null; } + } + + // Generated from `System.Security.AccessControl.AuthorizationRule` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AuthorizationRule + { + protected internal int AccessMask { get => throw null; } + protected internal AuthorizationRule(System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public System.Security.Principal.IdentityReference IdentityReference { get => throw null; } + public System.Security.AccessControl.InheritanceFlags InheritanceFlags { get => throw null; } + public bool IsInherited { get => throw null; } + public System.Security.AccessControl.PropagationFlags PropagationFlags { get => throw null; } + } + + // Generated from `System.Security.AccessControl.AuthorizationRuleCollection` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AuthorizationRuleCollection : System.Collections.ReadOnlyCollectionBase + { + public void AddRule(System.Security.AccessControl.AuthorizationRule rule) => throw null; + public AuthorizationRuleCollection() => throw null; + public void CopyTo(System.Security.AccessControl.AuthorizationRule[] rules, int index) => throw null; + public System.Security.AccessControl.AuthorizationRule this[int index] { get => throw null; } + } + + // Generated from `System.Security.AccessControl.CommonAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CommonAce : System.Security.AccessControl.QualifiedAce + { + public override int BinaryLength { get => throw null; } + public CommonAce(System.Security.AccessControl.AceFlags flags, System.Security.AccessControl.AceQualifier qualifier, int accessMask, System.Security.Principal.SecurityIdentifier sid, bool isCallback, System.Byte[] opaque) => throw null; + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public static int MaxOpaqueLength(bool isCallback) => throw null; + } + + // Generated from `System.Security.AccessControl.CommonAcl` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CommonAcl : System.Security.AccessControl.GenericAcl + { + public override int BinaryLength { get => throw null; } + internal CommonAcl() => throw null; + public override int Count { get => throw null; } + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public bool IsCanonical { get => throw null; } + public bool IsContainer { get => throw null; } + public bool IsDS { get => throw null; } + public override System.Security.AccessControl.GenericAce this[int index] { get => throw null; set => throw null; } + public void Purge(System.Security.Principal.SecurityIdentifier sid) => throw null; + public void RemoveInheritedAces() => throw null; + public override System.Byte Revision { get => throw null; } + } + + // Generated from `System.Security.AccessControl.CommonObjectSecurity` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CommonObjectSecurity : System.Security.AccessControl.ObjectSecurity + { + protected void AddAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + protected void AddAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + protected CommonObjectSecurity(bool isContainer) => throw null; + public System.Security.AccessControl.AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, System.Type targetType) => throw null; + public System.Security.AccessControl.AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, System.Type targetType) => throw null; + protected override bool ModifyAccess(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified) => throw null; + protected override bool ModifyAudit(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AuditRule rule, out bool modified) => throw null; + protected bool RemoveAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + protected void RemoveAccessRuleAll(System.Security.AccessControl.AccessRule rule) => throw null; + protected void RemoveAccessRuleSpecific(System.Security.AccessControl.AccessRule rule) => throw null; + protected bool RemoveAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + protected void RemoveAuditRuleAll(System.Security.AccessControl.AuditRule rule) => throw null; + protected void RemoveAuditRuleSpecific(System.Security.AccessControl.AuditRule rule) => throw null; + protected void ResetAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + protected void SetAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + protected void SetAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + } + + // Generated from `System.Security.AccessControl.CommonSecurityDescriptor` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CommonSecurityDescriptor : System.Security.AccessControl.GenericSecurityDescriptor + { + public void AddDiscretionaryAcl(System.Byte revision, int trusted) => throw null; + public void AddSystemAcl(System.Byte revision, int trusted) => throw null; + public CommonSecurityDescriptor(bool isContainer, bool isDS, string sddlForm) => throw null; + public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Security.AccessControl.RawSecurityDescriptor rawSecurityDescriptor) => throw null; + public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Security.AccessControl.ControlFlags flags, System.Security.Principal.SecurityIdentifier owner, System.Security.Principal.SecurityIdentifier group, System.Security.AccessControl.SystemAcl systemAcl, System.Security.AccessControl.DiscretionaryAcl discretionaryAcl) => throw null; + public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Byte[] binaryForm, int offset) => throw null; + public override System.Security.AccessControl.ControlFlags ControlFlags { get => throw null; } + public System.Security.AccessControl.DiscretionaryAcl DiscretionaryAcl { get => throw null; set => throw null; } + public override System.Security.Principal.SecurityIdentifier Group { get => throw null; set => throw null; } + public bool IsContainer { get => throw null; } + public bool IsDS { get => throw null; } + public bool IsDiscretionaryAclCanonical { get => throw null; } + public bool IsSystemAclCanonical { get => throw null; } + public override System.Security.Principal.SecurityIdentifier Owner { get => throw null; set => throw null; } + public void PurgeAccessControl(System.Security.Principal.SecurityIdentifier sid) => throw null; + public void PurgeAudit(System.Security.Principal.SecurityIdentifier sid) => throw null; + public void SetDiscretionaryAclProtection(bool isProtected, bool preserveInheritance) => throw null; + public void SetSystemAclProtection(bool isProtected, bool preserveInheritance) => throw null; + public System.Security.AccessControl.SystemAcl SystemAcl { get => throw null; set => throw null; } + } + + // Generated from `System.Security.AccessControl.CompoundAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompoundAce : System.Security.AccessControl.KnownAce + { + public override int BinaryLength { get => throw null; } + public CompoundAce(System.Security.AccessControl.AceFlags flags, int accessMask, System.Security.AccessControl.CompoundAceType compoundAceType, System.Security.Principal.SecurityIdentifier sid) => throw null; + public System.Security.AccessControl.CompoundAceType CompoundAceType { get => throw null; set => throw null; } + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + } + + // Generated from `System.Security.AccessControl.CompoundAceType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CompoundAceType + { + // Stub generator skipped constructor + Impersonation, + } + + // Generated from `System.Security.AccessControl.ControlFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ControlFlags + { + // Stub generator skipped constructor + DiscretionaryAclAutoInheritRequired, + DiscretionaryAclAutoInherited, + DiscretionaryAclDefaulted, + DiscretionaryAclPresent, + DiscretionaryAclProtected, + DiscretionaryAclUntrusted, + GroupDefaulted, + None, + OwnerDefaulted, + RMControlValid, + SelfRelative, + ServerSecurity, + SystemAclAutoInheritRequired, + SystemAclAutoInherited, + SystemAclDefaulted, + SystemAclPresent, + SystemAclProtected, + } + + // Generated from `System.Security.AccessControl.CustomAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CustomAce : System.Security.AccessControl.GenericAce + { + public override int BinaryLength { get => throw null; } + public CustomAce(System.Security.AccessControl.AceType type, System.Security.AccessControl.AceFlags flags, System.Byte[] opaque) => throw null; + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public System.Byte[] GetOpaque() => throw null; + public static int MaxOpaqueLength; + public int OpaqueLength { get => throw null; } + public void SetOpaque(System.Byte[] opaque) => throw null; + } + + // Generated from `System.Security.AccessControl.DiscretionaryAcl` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DiscretionaryAcl : System.Security.AccessControl.CommonAcl + { + public void AddAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void AddAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public void AddAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule) => throw null; + public DiscretionaryAcl(bool isContainer, bool isDS, int capacity) => throw null; + public DiscretionaryAcl(bool isContainer, bool isDS, System.Security.AccessControl.RawAcl rawAcl) => throw null; + public DiscretionaryAcl(bool isContainer, bool isDS, System.Byte revision, int capacity) => throw null; + public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public bool RemoveAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule) => throw null; + public void RemoveAccessSpecific(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void RemoveAccessSpecific(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public void RemoveAccessSpecific(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule) => throw null; + public void SetAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void SetAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public void SetAccess(System.Security.AccessControl.AccessControlType accessType, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAccessRule rule) => throw null; + } + + // Generated from `System.Security.AccessControl.GenericAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GenericAce + { + public static bool operator !=(System.Security.AccessControl.GenericAce left, System.Security.AccessControl.GenericAce right) => throw null; + public static bool operator ==(System.Security.AccessControl.GenericAce left, System.Security.AccessControl.GenericAce right) => throw null; + public System.Security.AccessControl.AceFlags AceFlags { get => throw null; set => throw null; } + public System.Security.AccessControl.AceType AceType { get => throw null; } + public System.Security.AccessControl.AuditFlags AuditFlags { get => throw null; } + public abstract int BinaryLength { get; } + public System.Security.AccessControl.GenericAce Copy() => throw null; + public static System.Security.AccessControl.GenericAce CreateFromBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public override bool Equals(object o) => throw null; + internal GenericAce() => throw null; + public abstract void GetBinaryForm(System.Byte[] binaryForm, int offset); + public override int GetHashCode() => throw null; + public System.Security.AccessControl.InheritanceFlags InheritanceFlags { get => throw null; } + public bool IsInherited { get => throw null; } + public System.Security.AccessControl.PropagationFlags PropagationFlags { get => throw null; } + } + + // Generated from `System.Security.AccessControl.GenericAcl` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GenericAcl : System.Collections.IEnumerable, System.Collections.ICollection + { + public static System.Byte AclRevision; + public static System.Byte AclRevisionDS; + public abstract int BinaryLength { get; } + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.AccessControl.GenericAce[] array, int index) => throw null; + public abstract int Count { get; } + protected GenericAcl() => throw null; + public abstract void GetBinaryForm(System.Byte[] binaryForm, int offset); + public System.Security.AccessControl.AceEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public abstract System.Security.AccessControl.GenericAce this[int index] { get; set; } + public static int MaxBinaryLength; + public abstract System.Byte Revision { get; } + public virtual object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.AccessControl.GenericSecurityDescriptor` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GenericSecurityDescriptor + { + public int BinaryLength { get => throw null; } + public abstract System.Security.AccessControl.ControlFlags ControlFlags { get; } + internal GenericSecurityDescriptor() => throw null; + public void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public string GetSddlForm(System.Security.AccessControl.AccessControlSections includeSections) => throw null; + public abstract System.Security.Principal.SecurityIdentifier Group { get; set; } + public static bool IsSddlConversionSupported() => throw null; + public abstract System.Security.Principal.SecurityIdentifier Owner { get; set; } + public static System.Byte Revision { get => throw null; } + } + + // Generated from `System.Security.AccessControl.InheritanceFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum InheritanceFlags + { + ContainerInherit, + // Stub generator skipped constructor + None, + ObjectInherit, + } + + // Generated from `System.Security.AccessControl.KnownAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class KnownAce : System.Security.AccessControl.GenericAce + { + public int AccessMask { get => throw null; set => throw null; } + internal KnownAce() => throw null; + public System.Security.Principal.SecurityIdentifier SecurityIdentifier { get => throw null; set => throw null; } + } + + // Generated from `System.Security.AccessControl.NativeObjectSecurity` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class NativeObjectSecurity : System.Security.AccessControl.CommonObjectSecurity + { + // Generated from `System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected internal delegate System.Exception ExceptionFromErrorCode(int errorCode, string name, System.Runtime.InteropServices.SafeHandle handle, object context); + + + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(default(bool)) => throw null; + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections) : base(default(bool)) => throw null; + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(default(bool)) => throw null; + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(default(bool)) => throw null; + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections) : base(default(bool)) => throw null; + protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType) : base(default(bool)) => throw null; + protected void Persist(string name, System.Security.AccessControl.AccessControlSections includeSections, object exceptionContext) => throw null; + protected void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, object exceptionContext) => throw null; + protected override void Persist(string name, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + protected override void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + } + + // Generated from `System.Security.AccessControl.ObjectAccessRule` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ObjectAccessRule : System.Security.AccessControl.AccessRule + { + public System.Guid InheritedObjectType { get => throw null; } + protected ObjectAccessRule(System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Guid objectType, System.Guid inheritedObjectType, System.Security.AccessControl.AccessControlType type) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AccessControlType)) => throw null; + public System.Security.AccessControl.ObjectAceFlags ObjectFlags { get => throw null; } + public System.Guid ObjectType { get => throw null; } + } + + // Generated from `System.Security.AccessControl.ObjectAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectAce : System.Security.AccessControl.QualifiedAce + { + public override int BinaryLength { get => throw null; } + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public System.Guid InheritedObjectAceType { get => throw null; set => throw null; } + public static int MaxOpaqueLength(bool isCallback) => throw null; + public ObjectAce(System.Security.AccessControl.AceFlags aceFlags, System.Security.AccessControl.AceQualifier qualifier, int accessMask, System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAceFlags flags, System.Guid type, System.Guid inheritedType, bool isCallback, System.Byte[] opaque) => throw null; + public System.Security.AccessControl.ObjectAceFlags ObjectAceFlags { get => throw null; set => throw null; } + public System.Guid ObjectAceType { get => throw null; set => throw null; } + } + + // Generated from `System.Security.AccessControl.ObjectAceFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ObjectAceFlags + { + InheritedObjectAceTypePresent, + None, + // Stub generator skipped constructor + ObjectAceTypePresent, + } + + // Generated from `System.Security.AccessControl.ObjectAuditRule` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ObjectAuditRule : System.Security.AccessControl.AuditRule + { + public System.Guid InheritedObjectType { get => throw null; } + protected ObjectAuditRule(System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Guid objectType, System.Guid inheritedObjectType, System.Security.AccessControl.AuditFlags auditFlags) : base(default(System.Security.Principal.IdentityReference), default(int), default(bool), default(System.Security.AccessControl.InheritanceFlags), default(System.Security.AccessControl.PropagationFlags), default(System.Security.AccessControl.AuditFlags)) => throw null; + public System.Security.AccessControl.ObjectAceFlags ObjectFlags { get => throw null; } + public System.Guid ObjectType { get => throw null; } + } + + // Generated from `System.Security.AccessControl.ObjectSecurity` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ObjectSecurity + { + public abstract System.Type AccessRightType { get; } + public abstract System.Security.AccessControl.AccessRule AccessRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type); + public abstract System.Type AccessRuleType { get; } + protected bool AccessRulesModified { get => throw null; set => throw null; } + public bool AreAccessRulesCanonical { get => throw null; } + public bool AreAccessRulesProtected { get => throw null; } + public bool AreAuditRulesCanonical { get => throw null; } + public bool AreAuditRulesProtected { get => throw null; } + public abstract System.Security.AccessControl.AuditRule AuditRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags); + public abstract System.Type AuditRuleType { get; } + protected bool AuditRulesModified { get => throw null; set => throw null; } + public System.Security.Principal.IdentityReference GetGroup(System.Type targetType) => throw null; + public System.Security.Principal.IdentityReference GetOwner(System.Type targetType) => throw null; + public System.Byte[] GetSecurityDescriptorBinaryForm() => throw null; + public string GetSecurityDescriptorSddlForm(System.Security.AccessControl.AccessControlSections includeSections) => throw null; + protected bool GroupModified { get => throw null; set => throw null; } + protected bool IsContainer { get => throw null; } + protected bool IsDS { get => throw null; } + public static bool IsSddlConversionSupported() => throw null; + protected abstract bool ModifyAccess(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified); + public virtual bool ModifyAccessRule(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified) => throw null; + protected abstract bool ModifyAudit(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AuditRule rule, out bool modified); + public virtual bool ModifyAuditRule(System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AuditRule rule, out bool modified) => throw null; + protected ObjectSecurity(bool isContainer, bool isDS) => throw null; + protected ObjectSecurity(System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor) => throw null; + protected ObjectSecurity() => throw null; + protected bool OwnerModified { get => throw null; set => throw null; } + protected virtual void Persist(string name, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + protected virtual void Persist(bool enableOwnershipPrivilege, string name, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + protected virtual void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + public virtual void PurgeAccessRules(System.Security.Principal.IdentityReference identity) => throw null; + public virtual void PurgeAuditRules(System.Security.Principal.IdentityReference identity) => throw null; + protected void ReadLock() => throw null; + protected void ReadUnlock() => throw null; + protected System.Security.AccessControl.CommonSecurityDescriptor SecurityDescriptor { get => throw null; } + public void SetAccessRuleProtection(bool isProtected, bool preserveInheritance) => throw null; + public void SetAuditRuleProtection(bool isProtected, bool preserveInheritance) => throw null; + public void SetGroup(System.Security.Principal.IdentityReference identity) => throw null; + public void SetOwner(System.Security.Principal.IdentityReference identity) => throw null; + public void SetSecurityDescriptorBinaryForm(System.Byte[] binaryForm, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + public void SetSecurityDescriptorBinaryForm(System.Byte[] binaryForm) => throw null; + public void SetSecurityDescriptorSddlForm(string sddlForm, System.Security.AccessControl.AccessControlSections includeSections) => throw null; + public void SetSecurityDescriptorSddlForm(string sddlForm) => throw null; + protected void WriteLock() => throw null; + protected void WriteUnlock() => throw null; + } + + // Generated from `System.Security.AccessControl.ObjectSecurity<>` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ObjectSecurity : System.Security.AccessControl.NativeObjectSecurity where T : struct + { + public override System.Type AccessRightType { get => throw null; } + public override System.Security.AccessControl.AccessRule AccessRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type) => throw null; + public override System.Type AccessRuleType { get => throw null; } + public virtual void AddAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual void AddAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + public override System.Security.AccessControl.AuditRule AuditRuleFactory(System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AuditFlags flags) => throw null; + public override System.Type AuditRuleType { get => throw null; } + protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, string name, System.Security.AccessControl.AccessControlSections includeSections) : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle safeHandle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext) : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle safeHandle, System.Security.AccessControl.AccessControlSections includeSections) : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType) : base(default(bool), default(System.Security.AccessControl.ResourceType)) => throw null; + protected internal void Persist(string name) => throw null; + protected internal void Persist(System.Runtime.InteropServices.SafeHandle handle) => throw null; + public virtual bool RemoveAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual void RemoveAccessRuleAll(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual void RemoveAccessRuleSpecific(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual bool RemoveAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + public virtual void RemoveAuditRuleAll(System.Security.AccessControl.AuditRule rule) => throw null; + public virtual void RemoveAuditRuleSpecific(System.Security.AccessControl.AuditRule rule) => throw null; + public virtual void ResetAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual void SetAccessRule(System.Security.AccessControl.AccessRule rule) => throw null; + public virtual void SetAuditRule(System.Security.AccessControl.AuditRule rule) => throw null; + } + + // Generated from `System.Security.AccessControl.PrivilegeNotHeldException` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PrivilegeNotHeldException : System.UnauthorizedAccessException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string PrivilegeName { get => throw null; } + public PrivilegeNotHeldException(string privilege, System.Exception inner) => throw null; + public PrivilegeNotHeldException(string privilege) => throw null; + public PrivilegeNotHeldException() => throw null; + } + + // Generated from `System.Security.AccessControl.PropagationFlags` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PropagationFlags + { + InheritOnly, + NoPropagateInherit, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Security.AccessControl.QualifiedAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class QualifiedAce : System.Security.AccessControl.KnownAce + { + public System.Security.AccessControl.AceQualifier AceQualifier { get => throw null; } + public System.Byte[] GetOpaque() => throw null; + public bool IsCallback { get => throw null; } + public int OpaqueLength { get => throw null; } + internal QualifiedAce() => throw null; + public void SetOpaque(System.Byte[] opaque) => throw null; + } + + // Generated from `System.Security.AccessControl.RawAcl` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RawAcl : System.Security.AccessControl.GenericAcl + { + public override int BinaryLength { get => throw null; } + public override int Count { get => throw null; } + public override void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public void InsertAce(int index, System.Security.AccessControl.GenericAce ace) => throw null; + public override System.Security.AccessControl.GenericAce this[int index] { get => throw null; set => throw null; } + public RawAcl(System.Byte[] binaryForm, int offset) => throw null; + public RawAcl(System.Byte revision, int capacity) => throw null; + public void RemoveAce(int index) => throw null; + public override System.Byte Revision { get => throw null; } + } + + // Generated from `System.Security.AccessControl.RawSecurityDescriptor` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RawSecurityDescriptor : System.Security.AccessControl.GenericSecurityDescriptor + { + public override System.Security.AccessControl.ControlFlags ControlFlags { get => throw null; } + public System.Security.AccessControl.RawAcl DiscretionaryAcl { get => throw null; set => throw null; } + public override System.Security.Principal.SecurityIdentifier Group { get => throw null; set => throw null; } + public override System.Security.Principal.SecurityIdentifier Owner { get => throw null; set => throw null; } + public RawSecurityDescriptor(string sddlForm) => throw null; + public RawSecurityDescriptor(System.Security.AccessControl.ControlFlags flags, System.Security.Principal.SecurityIdentifier owner, System.Security.Principal.SecurityIdentifier group, System.Security.AccessControl.RawAcl systemAcl, System.Security.AccessControl.RawAcl discretionaryAcl) => throw null; + public RawSecurityDescriptor(System.Byte[] binaryForm, int offset) => throw null; + public System.Byte ResourceManagerControl { get => throw null; set => throw null; } + public void SetFlags(System.Security.AccessControl.ControlFlags flags) => throw null; + public System.Security.AccessControl.RawAcl SystemAcl { get => throw null; set => throw null; } + } + + // Generated from `System.Security.AccessControl.ResourceType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ResourceType + { + DSObject, + DSObjectAll, + FileObject, + KernelObject, + LMShare, + Printer, + ProviderDefined, + RegistryKey, + RegistryWow6432Key, + // Stub generator skipped constructor + Service, + Unknown, + WindowObject, + WmiGuidObject, + } + + // Generated from `System.Security.AccessControl.SecurityInfos` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SecurityInfos + { + DiscretionaryAcl, + Group, + Owner, + // Stub generator skipped constructor + SystemAcl, + } + + // Generated from `System.Security.AccessControl.SystemAcl` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SystemAcl : System.Security.AccessControl.CommonAcl + { + public void AddAudit(System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAuditRule rule) => throw null; + public void AddAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void AddAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public bool RemoveAudit(System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAuditRule rule) => throw null; + public bool RemoveAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public bool RemoveAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public void RemoveAuditSpecific(System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAuditRule rule) => throw null; + public void RemoveAuditSpecific(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void RemoveAuditSpecific(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public void SetAudit(System.Security.Principal.SecurityIdentifier sid, System.Security.AccessControl.ObjectAuditRule rule) => throw null; + public void SetAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.ObjectAceFlags objectFlags, System.Guid objectType, System.Guid inheritedObjectType) => throw null; + public void SetAudit(System.Security.AccessControl.AuditFlags auditFlags, System.Security.Principal.SecurityIdentifier sid, int accessMask, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags) => throw null; + public SystemAcl(bool isContainer, bool isDS, int capacity) => throw null; + public SystemAcl(bool isContainer, bool isDS, System.Security.AccessControl.RawAcl rawAcl) => throw null; + public SystemAcl(bool isContainer, bool isDS, System.Byte revision, int capacity) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs new file mode 100644 index 000000000000..8b7c3d7c9958 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs @@ -0,0 +1,474 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeNCryptHandle` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SafeNCryptHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + public override bool IsInvalid { get => throw null; } + protected override bool ReleaseHandle() => throw null; + protected abstract bool ReleaseNativeHandle(); + protected SafeNCryptHandle(System.IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) : base(default(bool)) => throw null; + protected SafeNCryptHandle() : base(default(bool)) => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeNCryptKeyHandle : Microsoft.Win32.SafeHandles.SafeNCryptHandle + { + protected override bool ReleaseNativeHandle() => throw null; + public SafeNCryptKeyHandle(System.IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle) => throw null; + public SafeNCryptKeyHandle() => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeNCryptProviderHandle : Microsoft.Win32.SafeHandles.SafeNCryptHandle + { + protected override bool ReleaseNativeHandle() => throw null; + public SafeNCryptProviderHandle() => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeNCryptSecretHandle : Microsoft.Win32.SafeHandles.SafeNCryptHandle + { + protected override bool ReleaseNativeHandle() => throw null; + public SafeNCryptSecretHandle() => throw null; + } + + } + } +} +namespace System +{ + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Security + { + namespace Cryptography + { + // Generated from `System.Security.Cryptography.AesCng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AesCng : System.Security.Cryptography.Aes + { + public AesCng(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions) => throw null; + public AesCng(string keyName, System.Security.Cryptography.CngProvider provider) => throw null; + public AesCng(string keyName) => throw null; + public AesCng() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.CngAlgorithm` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngAlgorithm : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.CngAlgorithm left, System.Security.Cryptography.CngAlgorithm right) => throw null; + public static bool operator ==(System.Security.Cryptography.CngAlgorithm left, System.Security.Cryptography.CngAlgorithm right) => throw null; + public string Algorithm { get => throw null; } + public CngAlgorithm(string algorithm) => throw null; + public static System.Security.Cryptography.CngAlgorithm ECDiffieHellman { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDiffieHellmanP256 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDiffieHellmanP384 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDiffieHellmanP521 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDsa { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDsaP256 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDsaP384 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm ECDsaP521 { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.CngAlgorithm other) => throw null; + public override int GetHashCode() => throw null; + public static System.Security.Cryptography.CngAlgorithm MD5 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm Rsa { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm Sha1 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm Sha256 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm Sha384 { get => throw null; } + public static System.Security.Cryptography.CngAlgorithm Sha512 { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.CngAlgorithmGroup` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngAlgorithmGroup : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.CngAlgorithmGroup left, System.Security.Cryptography.CngAlgorithmGroup right) => throw null; + public static bool operator ==(System.Security.Cryptography.CngAlgorithmGroup left, System.Security.Cryptography.CngAlgorithmGroup right) => throw null; + public string AlgorithmGroup { get => throw null; } + public CngAlgorithmGroup(string algorithmGroup) => throw null; + public static System.Security.Cryptography.CngAlgorithmGroup DiffieHellman { get => throw null; } + public static System.Security.Cryptography.CngAlgorithmGroup Dsa { get => throw null; } + public static System.Security.Cryptography.CngAlgorithmGroup ECDiffieHellman { get => throw null; } + public static System.Security.Cryptography.CngAlgorithmGroup ECDsa { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.CngAlgorithmGroup other) => throw null; + public override int GetHashCode() => throw null; + public static System.Security.Cryptography.CngAlgorithmGroup Rsa { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.CngExportPolicies` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngExportPolicies + { + AllowArchiving, + AllowExport, + AllowPlaintextArchiving, + AllowPlaintextExport, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Security.Cryptography.CngKey` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngKey : System.IDisposable + { + public System.Security.Cryptography.CngAlgorithm Algorithm { get => throw null; } + public System.Security.Cryptography.CngAlgorithmGroup AlgorithmGroup { get => throw null; } + public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName, System.Security.Cryptography.CngKeyCreationParameters creationParameters) => throw null; + public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm, string keyName) => throw null; + public static System.Security.Cryptography.CngKey Create(System.Security.Cryptography.CngAlgorithm algorithm) => throw null; + public void Delete() => throw null; + public void Dispose() => throw null; + public static bool Exists(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions options) => throw null; + public static bool Exists(string keyName, System.Security.Cryptography.CngProvider provider) => throw null; + public static bool Exists(string keyName) => throw null; + public System.Byte[] Export(System.Security.Cryptography.CngKeyBlobFormat format) => throw null; + public System.Security.Cryptography.CngExportPolicies ExportPolicy { get => throw null; } + public System.Security.Cryptography.CngProperty GetProperty(string name, System.Security.Cryptography.CngPropertyOptions options) => throw null; + public Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle Handle { get => throw null; } + public bool HasProperty(string name, System.Security.Cryptography.CngPropertyOptions options) => throw null; + public static System.Security.Cryptography.CngKey Import(System.Byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format, System.Security.Cryptography.CngProvider provider) => throw null; + public static System.Security.Cryptography.CngKey Import(System.Byte[] keyBlob, System.Security.Cryptography.CngKeyBlobFormat format) => throw null; + public bool IsEphemeral { get => throw null; } + public bool IsMachineKey { get => throw null; } + public string KeyName { get => throw null; } + public int KeySize { get => throw null; } + public System.Security.Cryptography.CngKeyUsages KeyUsage { get => throw null; } + public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions) => throw null; + public static System.Security.Cryptography.CngKey Open(string keyName, System.Security.Cryptography.CngProvider provider) => throw null; + public static System.Security.Cryptography.CngKey Open(string keyName) => throw null; + public static System.Security.Cryptography.CngKey Open(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle, System.Security.Cryptography.CngKeyHandleOpenOptions keyHandleOpenOptions) => throw null; + public System.IntPtr ParentWindowHandle { get => throw null; set => throw null; } + public System.Security.Cryptography.CngProvider Provider { get => throw null; } + public Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle ProviderHandle { get => throw null; } + public void SetProperty(System.Security.Cryptography.CngProperty property) => throw null; + public System.Security.Cryptography.CngUIPolicy UIPolicy { get => throw null; } + public string UniqueName { get => throw null; } + } + + // Generated from `System.Security.Cryptography.CngKeyBlobFormat` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngKeyBlobFormat : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.CngKeyBlobFormat left, System.Security.Cryptography.CngKeyBlobFormat right) => throw null; + public static bool operator ==(System.Security.Cryptography.CngKeyBlobFormat left, System.Security.Cryptography.CngKeyBlobFormat right) => throw null; + public CngKeyBlobFormat(string format) => throw null; + public static System.Security.Cryptography.CngKeyBlobFormat EccFullPrivateBlob { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat EccFullPublicBlob { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat EccPrivateBlob { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat EccPublicBlob { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.CngKeyBlobFormat other) => throw null; + public string Format { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat GenericPrivateBlob { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat GenericPublicBlob { get => throw null; } + public override int GetHashCode() => throw null; + public static System.Security.Cryptography.CngKeyBlobFormat OpaqueTransportBlob { get => throw null; } + public static System.Security.Cryptography.CngKeyBlobFormat Pkcs8PrivateBlob { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.CngKeyCreationOptions` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngKeyCreationOptions + { + // Stub generator skipped constructor + MachineKey, + None, + OverwriteExistingKey, + } + + // Generated from `System.Security.Cryptography.CngKeyCreationParameters` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngKeyCreationParameters + { + public CngKeyCreationParameters() => throw null; + public System.Security.Cryptography.CngExportPolicies? ExportPolicy { get => throw null; set => throw null; } + public System.Security.Cryptography.CngKeyCreationOptions KeyCreationOptions { get => throw null; set => throw null; } + public System.Security.Cryptography.CngKeyUsages? KeyUsage { get => throw null; set => throw null; } + public System.Security.Cryptography.CngPropertyCollection Parameters { get => throw null; } + public System.IntPtr ParentWindowHandle { get => throw null; set => throw null; } + public System.Security.Cryptography.CngProvider Provider { get => throw null; set => throw null; } + public System.Security.Cryptography.CngUIPolicy UIPolicy { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.CngKeyHandleOpenOptions` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngKeyHandleOpenOptions + { + // Stub generator skipped constructor + EphemeralKey, + None, + } + + // Generated from `System.Security.Cryptography.CngKeyOpenOptions` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngKeyOpenOptions + { + // Stub generator skipped constructor + MachineKey, + None, + Silent, + UserKey, + } + + // Generated from `System.Security.Cryptography.CngKeyUsages` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngKeyUsages + { + AllUsages, + // Stub generator skipped constructor + Decryption, + KeyAgreement, + None, + Signing, + } + + // Generated from `System.Security.Cryptography.CngProperty` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CngProperty : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.CngProperty left, System.Security.Cryptography.CngProperty right) => throw null; + public static bool operator ==(System.Security.Cryptography.CngProperty left, System.Security.Cryptography.CngProperty right) => throw null; + public CngProperty(string name, System.Byte[] value, System.Security.Cryptography.CngPropertyOptions options) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.CngProperty other) => throw null; + public override int GetHashCode() => throw null; + public System.Byte[] GetValue() => throw null; + public string Name { get => throw null; } + public System.Security.Cryptography.CngPropertyOptions Options { get => throw null; } + } + + // Generated from `System.Security.Cryptography.CngPropertyCollection` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngPropertyCollection : System.Collections.ObjectModel.Collection + { + public CngPropertyCollection() => throw null; + } + + // Generated from `System.Security.Cryptography.CngPropertyOptions` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngPropertyOptions + { + // Stub generator skipped constructor + CustomProperty, + None, + Persist, + } + + // Generated from `System.Security.Cryptography.CngProvider` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngProvider : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.CngProvider left, System.Security.Cryptography.CngProvider right) => throw null; + public static bool operator ==(System.Security.Cryptography.CngProvider left, System.Security.Cryptography.CngProvider right) => throw null; + public CngProvider(string provider) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.CngProvider other) => throw null; + public override int GetHashCode() => throw null; + public static System.Security.Cryptography.CngProvider MicrosoftSmartCardKeyStorageProvider { get => throw null; } + public static System.Security.Cryptography.CngProvider MicrosoftSoftwareKeyStorageProvider { get => throw null; } + public string Provider { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.CngUIPolicy` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CngUIPolicy + { + public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description, string useContext, string creationTitle) => throw null; + public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description, string useContext) => throw null; + public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description) => throw null; + public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName) => throw null; + public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel) => throw null; + public string CreationTitle { get => throw null; } + public string Description { get => throw null; } + public string FriendlyName { get => throw null; } + public System.Security.Cryptography.CngUIProtectionLevels ProtectionLevel { get => throw null; } + public string UseContext { get => throw null; } + } + + // Generated from `System.Security.Cryptography.CngUIProtectionLevels` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CngUIProtectionLevels + { + // Stub generator skipped constructor + ForceHighProtection, + None, + ProtectKey, + } + + // Generated from `System.Security.Cryptography.DSACng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DSACng : System.Security.Cryptography.DSA + { + public override System.Byte[] CreateSignature(System.Byte[] rgbHash) => throw null; + public DSACng(int keySize) => throw null; + public DSACng(System.Security.Cryptography.CngKey key) => throw null; + public DSACng() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Security.Cryptography.DSAParameters ExportParameters(bool includePrivateParameters) => throw null; + protected override System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected override System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override void ImportParameters(System.Security.Cryptography.DSAParameters parameters) => throw null; + public System.Security.Cryptography.CngKey Key { get => throw null; } + public override string KeyExchangeAlgorithm { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public override string SignatureAlgorithm { get => throw null; } + public override bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature) => throw null; + } + + // Generated from `System.Security.Cryptography.ECDiffieHellmanCng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ECDiffieHellmanCng : System.Security.Cryptography.ECDiffieHellman + { + public override System.Byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] secretPrepend, System.Byte[] secretAppend) => throw null; + public override System.Byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] hmacKey, System.Byte[] secretPrepend, System.Byte[] secretAppend) => throw null; + public override System.Byte[] DeriveKeyMaterial(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey) => throw null; + public System.Byte[] DeriveKeyMaterial(System.Security.Cryptography.CngKey otherPartyPublicKey) => throw null; + public override System.Byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Byte[] prfLabel, System.Byte[] prfSeed) => throw null; + public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey) => throw null; + public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle(System.Security.Cryptography.CngKey otherPartyPublicKey) => throw null; + protected override void Dispose(bool disposing) => throw null; + public ECDiffieHellmanCng(int keySize) => throw null; + public ECDiffieHellmanCng(System.Security.Cryptography.ECCurve curve) => throw null; + public ECDiffieHellmanCng(System.Security.Cryptography.CngKey key) => throw null; + public ECDiffieHellmanCng() => throw null; + public override System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) => throw null; + public override System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) => throw null; + public void FromXmlString(string xml, System.Security.Cryptography.ECKeyXmlFormat format) => throw null; + public override void GenerateKey(System.Security.Cryptography.ECCurve curve) => throw null; + public System.Security.Cryptography.CngAlgorithm HashAlgorithm { get => throw null; set => throw null; } + public System.Byte[] HmacKey { get => throw null; set => throw null; } + public override void ImportParameters(System.Security.Cryptography.ECParameters parameters) => throw null; + public System.Security.Cryptography.CngKey Key { get => throw null; } + public System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction KeyDerivationFunction { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public System.Byte[] Label { get => throw null; set => throw null; } + public override System.Security.Cryptography.ECDiffieHellmanPublicKey PublicKey { get => throw null; } + public System.Byte[] SecretAppend { get => throw null; set => throw null; } + public System.Byte[] SecretPrepend { get => throw null; set => throw null; } + public System.Byte[] Seed { get => throw null; set => throw null; } + public string ToXmlString(System.Security.Cryptography.ECKeyXmlFormat format) => throw null; + public bool UseSecretAgreementAsHmacKey { get => throw null; } + } + + // Generated from `System.Security.Cryptography.ECDiffieHellmanCngPublicKey` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ECDiffieHellmanCngPublicKey : System.Security.Cryptography.ECDiffieHellmanPublicKey + { + public System.Security.Cryptography.CngKeyBlobFormat BlobFormat { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Security.Cryptography.ECParameters ExportExplicitParameters() => throw null; + public override System.Security.Cryptography.ECParameters ExportParameters() => throw null; + public static System.Security.Cryptography.ECDiffieHellmanPublicKey FromByteArray(System.Byte[] publicKeyBlob, System.Security.Cryptography.CngKeyBlobFormat format) => throw null; + public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString(string xml) => throw null; + public System.Security.Cryptography.CngKey Import() => throw null; + public override string ToXmlString() => throw null; + } + + // Generated from `System.Security.Cryptography.ECDiffieHellmanKeyDerivationFunction` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ECDiffieHellmanKeyDerivationFunction + { + // Stub generator skipped constructor + Hash, + Hmac, + Tls, + } + + // Generated from `System.Security.Cryptography.ECDsaCng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ECDsaCng : System.Security.Cryptography.ECDsa + { + protected override void Dispose(bool disposing) => throw null; + public ECDsaCng(int keySize) => throw null; + public ECDsaCng(System.Security.Cryptography.ECCurve curve) => throw null; + public ECDsaCng(System.Security.Cryptography.CngKey key) => throw null; + public ECDsaCng() => throw null; + public override System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) => throw null; + public override System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) => throw null; + public void FromXmlString(string xml, System.Security.Cryptography.ECKeyXmlFormat format) => throw null; + public override void GenerateKey(System.Security.Cryptography.ECCurve curve) => throw null; + public System.Security.Cryptography.CngAlgorithm HashAlgorithm { get => throw null; set => throw null; } + protected override System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected override System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override void ImportParameters(System.Security.Cryptography.ECParameters parameters) => throw null; + public System.Security.Cryptography.CngKey Key { get => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public System.Byte[] SignData(System.IO.Stream data) => throw null; + public System.Byte[] SignData(System.Byte[] data, int offset, int count) => throw null; + public System.Byte[] SignData(System.Byte[] data) => throw null; + public override System.Byte[] SignHash(System.Byte[] hash) => throw null; + public string ToXmlString(System.Security.Cryptography.ECKeyXmlFormat format) => throw null; + public bool VerifyData(System.IO.Stream data, System.Byte[] signature) => throw null; + public bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature) => throw null; + public override bool VerifyHash(System.Byte[] hash, System.Byte[] signature) => throw null; + } + + // Generated from `System.Security.Cryptography.ECKeyXmlFormat` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ECKeyXmlFormat + { + // Stub generator skipped constructor + Rfc4050, + } + + // Generated from `System.Security.Cryptography.RSACng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSACng : System.Security.Cryptography.RSA + { + public override System.Byte[] Decrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Byte[] Encrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + public override System.Security.Cryptography.RSAParameters ExportParameters(bool includePrivateParameters) => throw null; + protected override System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected override System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override void ImportParameters(System.Security.Cryptography.RSAParameters parameters) => throw null; + public System.Security.Cryptography.CngKey Key { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public RSACng(int keySize) => throw null; + public RSACng(System.Security.Cryptography.CngKey key) => throw null; + public RSACng() => throw null; + public override System.Byte[] SignHash(System.Byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public override bool VerifyHash(System.Byte[] hash, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + } + + // Generated from `System.Security.Cryptography.TripleDESCng` in `System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TripleDESCng : System.Security.Cryptography.TripleDES + { + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public TripleDESCng(string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions) => throw null; + public TripleDESCng(string keyName, System.Security.Cryptography.CngProvider provider) => throw null; + public TripleDESCng(string keyName) => throw null; + public TripleDESCng() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs new file mode 100644 index 000000000000..454757a6fdff --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs @@ -0,0 +1,639 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } + namespace Security + { + namespace Cryptography + { + namespace Xml + { + // Generated from `System.Security.Cryptography.Xml.CipherData` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CipherData + { + public CipherData(System.Security.Cryptography.Xml.CipherReference cipherReference) => throw null; + public CipherData(System.Byte[] cipherValue) => throw null; + public CipherData() => throw null; + public System.Security.Cryptography.Xml.CipherReference CipherReference { get => throw null; set => throw null; } + public System.Byte[] CipherValue { get => throw null; set => throw null; } + public System.Xml.XmlElement GetXml() => throw null; + public void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.CipherReference` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CipherReference : System.Security.Cryptography.Xml.EncryptedReference + { + public CipherReference(string uri, System.Security.Cryptography.Xml.TransformChain transformChain) => throw null; + public CipherReference(string uri) => throw null; + public CipherReference() => throw null; + public override System.Xml.XmlElement GetXml() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.DSAKeyValue` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DSAKeyValue : System.Security.Cryptography.Xml.KeyInfoClause + { + public DSAKeyValue(System.Security.Cryptography.DSA key) => throw null; + public DSAKeyValue() => throw null; + public override System.Xml.XmlElement GetXml() => throw null; + public System.Security.Cryptography.DSA Key { get => throw null; set => throw null; } + public override void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.DataObject` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DataObject + { + public System.Xml.XmlNodeList Data { get => throw null; set => throw null; } + public DataObject(string id, string mimeType, string encoding, System.Xml.XmlElement data) => throw null; + public DataObject() => throw null; + public string Encoding { get => throw null; set => throw null; } + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; set => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public string MimeType { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.DataReference` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DataReference : System.Security.Cryptography.Xml.EncryptedReference + { + public DataReference(string uri, System.Security.Cryptography.Xml.TransformChain transformChain) => throw null; + public DataReference(string uri) => throw null; + public DataReference() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.EncryptedData` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptedData : System.Security.Cryptography.Xml.EncryptedType + { + public EncryptedData() => throw null; + public override System.Xml.XmlElement GetXml() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.EncryptedKey` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptedKey : System.Security.Cryptography.Xml.EncryptedType + { + public void AddReference(System.Security.Cryptography.Xml.KeyReference keyReference) => throw null; + public void AddReference(System.Security.Cryptography.Xml.DataReference dataReference) => throw null; + public string CarriedKeyName { get => throw null; set => throw null; } + public EncryptedKey() => throw null; + public override System.Xml.XmlElement GetXml() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + public string Recipient { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.ReferenceList ReferenceList { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.EncryptedReference` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class EncryptedReference + { + public void AddTransform(System.Security.Cryptography.Xml.Transform transform) => throw null; + protected internal bool CacheValid { get => throw null; } + protected EncryptedReference(string uri, System.Security.Cryptography.Xml.TransformChain transformChain) => throw null; + protected EncryptedReference(string uri) => throw null; + protected EncryptedReference() => throw null; + public virtual System.Xml.XmlElement GetXml() => throw null; + public virtual void LoadXml(System.Xml.XmlElement value) => throw null; + protected string ReferenceType { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.TransformChain TransformChain { get => throw null; set => throw null; } + public string Uri { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.EncryptedType` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class EncryptedType + { + public void AddProperty(System.Security.Cryptography.Xml.EncryptionProperty ep) => throw null; + public virtual System.Security.Cryptography.Xml.CipherData CipherData { get => throw null; set => throw null; } + public virtual string Encoding { get => throw null; set => throw null; } + protected EncryptedType() => throw null; + public virtual System.Security.Cryptography.Xml.EncryptionMethod EncryptionMethod { get => throw null; set => throw null; } + public virtual System.Security.Cryptography.Xml.EncryptionPropertyCollection EncryptionProperties { get => throw null; } + public abstract System.Xml.XmlElement GetXml(); + public virtual string Id { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get => throw null; set => throw null; } + public abstract void LoadXml(System.Xml.XmlElement value); + public virtual string MimeType { get => throw null; set => throw null; } + public virtual string Type { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.EncryptedXml` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptedXml + { + public void AddKeyNameMapping(string keyName, object keyObject) => throw null; + public void ClearKeyNameMappings() => throw null; + public System.Byte[] DecryptData(System.Security.Cryptography.Xml.EncryptedData encryptedData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) => throw null; + public void DecryptDocument() => throw null; + public virtual System.Byte[] DecryptEncryptedKey(System.Security.Cryptography.Xml.EncryptedKey encryptedKey) => throw null; + public static System.Byte[] DecryptKey(System.Byte[] keyData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) => throw null; + public static System.Byte[] DecryptKey(System.Byte[] keyData, System.Security.Cryptography.RSA rsa, bool useOAEP) => throw null; + public System.Security.Policy.Evidence DocumentEvidence { get => throw null; set => throw null; } + public System.Text.Encoding Encoding { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.EncryptedData Encrypt(System.Xml.XmlElement inputElement, string keyName) => throw null; + public System.Security.Cryptography.Xml.EncryptedData Encrypt(System.Xml.XmlElement inputElement, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public System.Byte[] EncryptData(System.Xml.XmlElement inputElement, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm, bool content) => throw null; + public System.Byte[] EncryptData(System.Byte[] plaintext, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) => throw null; + public static System.Byte[] EncryptKey(System.Byte[] keyData, System.Security.Cryptography.SymmetricAlgorithm symmetricAlgorithm) => throw null; + public static System.Byte[] EncryptKey(System.Byte[] keyData, System.Security.Cryptography.RSA rsa, bool useOAEP) => throw null; + public EncryptedXml(System.Xml.XmlDocument document, System.Security.Policy.Evidence evidence) => throw null; + public EncryptedXml(System.Xml.XmlDocument document) => throw null; + public EncryptedXml() => throw null; + public virtual System.Byte[] GetDecryptionIV(System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri) => throw null; + public virtual System.Security.Cryptography.SymmetricAlgorithm GetDecryptionKey(System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri) => throw null; + public virtual System.Xml.XmlElement GetIdElement(System.Xml.XmlDocument document, string idValue) => throw null; + public System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + public System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + public string Recipient { get => throw null; set => throw null; } + public void ReplaceData(System.Xml.XmlElement inputElement, System.Byte[] decryptedData) => throw null; + public static void ReplaceElement(System.Xml.XmlElement inputElement, System.Security.Cryptography.Xml.EncryptedData encryptedData, bool content) => throw null; + public System.Xml.XmlResolver Resolver { get => throw null; set => throw null; } + public int XmlDSigSearchDepth { get => throw null; set => throw null; } + public const string XmlEncAES128KeyWrapUrl = default; + public const string XmlEncAES128Url = default; + public const string XmlEncAES192KeyWrapUrl = default; + public const string XmlEncAES192Url = default; + public const string XmlEncAES256KeyWrapUrl = default; + public const string XmlEncAES256Url = default; + public const string XmlEncDESUrl = default; + public const string XmlEncElementContentUrl = default; + public const string XmlEncElementUrl = default; + public const string XmlEncEncryptedKeyUrl = default; + public const string XmlEncNamespaceUrl = default; + public const string XmlEncRSA15Url = default; + public const string XmlEncRSAOAEPUrl = default; + public const string XmlEncSHA256Url = default; + public const string XmlEncSHA512Url = default; + public const string XmlEncTripleDESKeyWrapUrl = default; + public const string XmlEncTripleDESUrl = default; + } + + // Generated from `System.Security.Cryptography.Xml.EncryptionMethod` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptionMethod + { + public EncryptionMethod(string algorithm) => throw null; + public EncryptionMethod() => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public string KeyAlgorithm { get => throw null; set => throw null; } + public int KeySize { get => throw null; set => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.EncryptionProperty` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptionProperty + { + public EncryptionProperty(System.Xml.XmlElement elementProperty) => throw null; + public EncryptionProperty() => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public System.Xml.XmlElement PropertyElement { get => throw null; set => throw null; } + public string Target { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.EncryptionPropertyCollection` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EncryptionPropertyCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Cryptography.Xml.EncryptionProperty value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void Clear() => throw null; + public bool Contains(System.Security.Cryptography.Xml.EncryptionProperty value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public void CopyTo(System.Security.Cryptography.Xml.EncryptionProperty[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public EncryptionPropertyCollection() => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(System.Security.Cryptography.Xml.EncryptionProperty value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, System.Security.Cryptography.Xml.EncryptionProperty value) => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.Xml.EncryptionProperty Item(int index) => throw null; + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public System.Security.Cryptography.Xml.EncryptionProperty this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public void Remove(System.Security.Cryptography.Xml.EncryptionProperty value) => throw null; + public void RemoveAt(int index) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.IRelDecryptor` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IRelDecryptor + { + System.IO.Stream Decrypt(System.Security.Cryptography.Xml.EncryptionMethod encryptionMethod, System.Security.Cryptography.Xml.KeyInfo keyInfo, System.IO.Stream toDecrypt); + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfo` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfo : System.Collections.IEnumerable + { + public void AddClause(System.Security.Cryptography.Xml.KeyInfoClause clause) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator(System.Type requestedObjectType) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; set => throw null; } + public KeyInfo() => throw null; + public void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoClause` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class KeyInfoClause + { + public abstract System.Xml.XmlElement GetXml(); + protected KeyInfoClause() => throw null; + public abstract void LoadXml(System.Xml.XmlElement element); + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoEncryptedKey` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfoEncryptedKey : System.Security.Cryptography.Xml.KeyInfoClause + { + public System.Security.Cryptography.Xml.EncryptedKey EncryptedKey { get => throw null; set => throw null; } + public override System.Xml.XmlElement GetXml() => throw null; + public KeyInfoEncryptedKey(System.Security.Cryptography.Xml.EncryptedKey encryptedKey) => throw null; + public KeyInfoEncryptedKey() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoName` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfoName : System.Security.Cryptography.Xml.KeyInfoClause + { + public override System.Xml.XmlElement GetXml() => throw null; + public KeyInfoName(string keyName) => throw null; + public KeyInfoName() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoNode` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfoNode : System.Security.Cryptography.Xml.KeyInfoClause + { + public override System.Xml.XmlElement GetXml() => throw null; + public KeyInfoNode(System.Xml.XmlElement node) => throw null; + public KeyInfoNode() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + public System.Xml.XmlElement Value { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoRetrievalMethod` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfoRetrievalMethod : System.Security.Cryptography.Xml.KeyInfoClause + { + public override System.Xml.XmlElement GetXml() => throw null; + public KeyInfoRetrievalMethod(string strUri, string typeName) => throw null; + public KeyInfoRetrievalMethod(string strUri) => throw null; + public KeyInfoRetrievalMethod() => throw null; + public override void LoadXml(System.Xml.XmlElement value) => throw null; + public string Type { get => throw null; set => throw null; } + public string Uri { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.KeyInfoX509Data` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyInfoX509Data : System.Security.Cryptography.Xml.KeyInfoClause + { + public void AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate certificate) => throw null; + public void AddIssuerSerial(string issuerName, string serialNumber) => throw null; + public void AddSubjectKeyId(string subjectKeyId) => throw null; + public void AddSubjectKeyId(System.Byte[] subjectKeyId) => throw null; + public void AddSubjectName(string subjectName) => throw null; + public System.Byte[] CRL { get => throw null; set => throw null; } + public System.Collections.ArrayList Certificates { get => throw null; } + public override System.Xml.XmlElement GetXml() => throw null; + public System.Collections.ArrayList IssuerSerials { get => throw null; } + public KeyInfoX509Data(System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Security.Cryptography.X509Certificates.X509IncludeOption includeOption) => throw null; + public KeyInfoX509Data(System.Security.Cryptography.X509Certificates.X509Certificate cert) => throw null; + public KeyInfoX509Data(System.Byte[] rgbCert) => throw null; + public KeyInfoX509Data() => throw null; + public override void LoadXml(System.Xml.XmlElement element) => throw null; + public System.Collections.ArrayList SubjectKeyIds { get => throw null; } + public System.Collections.ArrayList SubjectNames { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.KeyReference` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyReference : System.Security.Cryptography.Xml.EncryptedReference + { + public KeyReference(string uri, System.Security.Cryptography.Xml.TransformChain transformChain) => throw null; + public KeyReference(string uri) => throw null; + public KeyReference() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.RSAKeyValue` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RSAKeyValue : System.Security.Cryptography.Xml.KeyInfoClause + { + public override System.Xml.XmlElement GetXml() => throw null; + public System.Security.Cryptography.RSA Key { get => throw null; set => throw null; } + public override void LoadXml(System.Xml.XmlElement value) => throw null; + public RSAKeyValue(System.Security.Cryptography.RSA key) => throw null; + public RSAKeyValue() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.Reference` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Reference + { + public void AddTransform(System.Security.Cryptography.Xml.Transform transform) => throw null; + public string DigestMethod { get => throw null; set => throw null; } + public System.Byte[] DigestValue { get => throw null; set => throw null; } + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; set => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public Reference(string uri) => throw null; + public Reference(System.IO.Stream stream) => throw null; + public Reference() => throw null; + public System.Security.Cryptography.Xml.TransformChain TransformChain { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + public string Uri { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.ReferenceList` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ReferenceList : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(object value) => throw null; + public void Clear() => throw null; + public bool Contains(object value) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(object value) => throw null; + public void Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.Xml.EncryptedReference Item(int index) => throw null; + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public System.Security.Cryptography.Xml.EncryptedReference this[int index] { get => throw null; set => throw null; } + public ReferenceList() => throw null; + public void Remove(object value) => throw null; + public void RemoveAt(int index) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.Signature` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Signature + { + public void AddObject(System.Security.Cryptography.Xml.DataObject dataObject) => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get => throw null; set => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public System.Collections.IList ObjectList { get => throw null; set => throw null; } + public Signature() => throw null; + public System.Byte[] SignatureValue { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.SignedInfo SignedInfo { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.SignedInfo` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SignedInfo : System.Collections.IEnumerable, System.Collections.ICollection + { + public void AddReference(System.Security.Cryptography.Xml.Reference reference) => throw null; + public string CanonicalizationMethod { get => throw null; set => throw null; } + public System.Security.Cryptography.Xml.Transform CanonicalizationMethodObject { get => throw null; } + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public string Id { get => throw null; set => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public System.Collections.ArrayList References { get => throw null; } + public string SignatureLength { get => throw null; set => throw null; } + public string SignatureMethod { get => throw null; set => throw null; } + public SignedInfo() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.Xml.SignedXml` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SignedXml + { + public void AddObject(System.Security.Cryptography.Xml.DataObject dataObject) => throw null; + public void AddReference(System.Security.Cryptography.Xml.Reference reference) => throw null; + public bool CheckSignature(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, bool verifySignatureOnly) => throw null; + public bool CheckSignature(System.Security.Cryptography.KeyedHashAlgorithm macAlg) => throw null; + public bool CheckSignature(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public bool CheckSignature() => throw null; + public bool CheckSignatureReturningKey(out System.Security.Cryptography.AsymmetricAlgorithm signingKey) => throw null; + public void ComputeSignature(System.Security.Cryptography.KeyedHashAlgorithm macAlg) => throw null; + public void ComputeSignature() => throw null; + public System.Security.Cryptography.Xml.EncryptedXml EncryptedXml { get => throw null; set => throw null; } + public virtual System.Xml.XmlElement GetIdElement(System.Xml.XmlDocument document, string idValue) => throw null; + protected virtual System.Security.Cryptography.AsymmetricAlgorithm GetPublicKey() => throw null; + public System.Xml.XmlElement GetXml() => throw null; + public System.Security.Cryptography.Xml.KeyInfo KeyInfo { get => throw null; set => throw null; } + public void LoadXml(System.Xml.XmlElement value) => throw null; + public System.Xml.XmlResolver Resolver { set => throw null; } + public System.Collections.ObjectModel.Collection SafeCanonicalizationMethods { get => throw null; } + public System.Security.Cryptography.Xml.Signature Signature { get => throw null; } + public System.Func SignatureFormatValidator { get => throw null; set => throw null; } + public string SignatureLength { get => throw null; } + public string SignatureMethod { get => throw null; } + public System.Byte[] SignatureValue { get => throw null; } + public System.Security.Cryptography.Xml.SignedInfo SignedInfo { get => throw null; } + public SignedXml(System.Xml.XmlElement elem) => throw null; + public SignedXml(System.Xml.XmlDocument document) => throw null; + public SignedXml() => throw null; + public System.Security.Cryptography.AsymmetricAlgorithm SigningKey { get => throw null; set => throw null; } + public string SigningKeyName { get => throw null; set => throw null; } + public const string XmlDecryptionTransformUrl = default; + public const string XmlDsigBase64TransformUrl = default; + public const string XmlDsigC14NTransformUrl = default; + public const string XmlDsigC14NWithCommentsTransformUrl = default; + public const string XmlDsigCanonicalizationUrl = default; + public const string XmlDsigCanonicalizationWithCommentsUrl = default; + public const string XmlDsigDSAUrl = default; + public const string XmlDsigEnvelopedSignatureTransformUrl = default; + public const string XmlDsigExcC14NTransformUrl = default; + public const string XmlDsigExcC14NWithCommentsTransformUrl = default; + public const string XmlDsigHMACSHA1Url = default; + public const string XmlDsigMinimalCanonicalizationUrl = default; + public const string XmlDsigNamespaceUrl = default; + public const string XmlDsigRSASHA1Url = default; + public const string XmlDsigRSASHA256Url = default; + public const string XmlDsigRSASHA384Url = default; + public const string XmlDsigRSASHA512Url = default; + public const string XmlDsigSHA1Url = default; + public const string XmlDsigSHA256Url = default; + public const string XmlDsigSHA384Url = default; + public const string XmlDsigSHA512Url = default; + public const string XmlDsigXPathTransformUrl = default; + public const string XmlDsigXsltTransformUrl = default; + public const string XmlLicenseTransformUrl = default; + protected System.Security.Cryptography.Xml.Signature m_signature; + protected string m_strSigningKeyName; + } + + // Generated from `System.Security.Cryptography.Xml.Transform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Transform + { + public string Algorithm { get => throw null; set => throw null; } + public System.Xml.XmlElement Context { get => throw null; set => throw null; } + public virtual System.Byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) => throw null; + protected abstract System.Xml.XmlNodeList GetInnerXml(); + public abstract object GetOutput(System.Type type); + public abstract object GetOutput(); + public System.Xml.XmlElement GetXml() => throw null; + public abstract System.Type[] InputTypes { get; } + public abstract void LoadInnerXml(System.Xml.XmlNodeList nodeList); + public abstract void LoadInput(object obj); + public abstract System.Type[] OutputTypes { get; } + public System.Collections.Hashtable PropagatedNamespaces { get => throw null; } + public System.Xml.XmlResolver Resolver { set => throw null; } + protected Transform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.TransformChain` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransformChain + { + public void Add(System.Security.Cryptography.Xml.Transform transform) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public System.Security.Cryptography.Xml.Transform this[int index] { get => throw null; } + public TransformChain() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDecryptionTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDecryptionTransform : System.Security.Cryptography.Xml.Transform + { + public void AddExceptUri(string uri) => throw null; + public System.Security.Cryptography.Xml.EncryptedXml EncryptedXml { get => throw null; set => throw null; } + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + protected virtual bool IsTargetElement(System.Xml.XmlElement inputElement, string idValue) => throw null; + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDecryptionTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigBase64Transform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigBase64Transform : System.Security.Cryptography.Xml.Transform + { + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigBase64Transform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigC14NTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigC14NTransform : System.Security.Cryptography.Xml.Transform + { + public override System.Byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) => throw null; + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigC14NTransform(bool includeComments) => throw null; + public XmlDsigC14NTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigC14NWithCommentsTransform : System.Security.Cryptography.Xml.XmlDsigC14NTransform + { + public XmlDsigC14NWithCommentsTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigEnvelopedSignatureTransform : System.Security.Cryptography.Xml.Transform + { + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigEnvelopedSignatureTransform(bool includeComments) => throw null; + public XmlDsigEnvelopedSignatureTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigExcC14NTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigExcC14NTransform : System.Security.Cryptography.Xml.Transform + { + public override System.Byte[] GetDigestedOutput(System.Security.Cryptography.HashAlgorithm hash) => throw null; + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public string InclusiveNamespacesPrefixList { get => throw null; set => throw null; } + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigExcC14NTransform(string inclusiveNamespacesPrefixList) => throw null; + public XmlDsigExcC14NTransform(bool includeComments, string inclusiveNamespacesPrefixList) => throw null; + public XmlDsigExcC14NTransform(bool includeComments) => throw null; + public XmlDsigExcC14NTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigExcC14NWithCommentsTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigExcC14NWithCommentsTransform : System.Security.Cryptography.Xml.XmlDsigExcC14NTransform + { + public XmlDsigExcC14NWithCommentsTransform(string inclusiveNamespacesPrefixList) => throw null; + public XmlDsigExcC14NWithCommentsTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigXPathTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigXPathTransform : System.Security.Cryptography.Xml.Transform + { + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigXPathTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlDsigXsltTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlDsigXsltTransform : System.Security.Cryptography.Xml.Transform + { + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlDsigXsltTransform(bool includeComments) => throw null; + public XmlDsigXsltTransform() => throw null; + } + + // Generated from `System.Security.Cryptography.Xml.XmlLicenseTransform` in `System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlLicenseTransform : System.Security.Cryptography.Xml.Transform + { + public System.Security.Cryptography.Xml.IRelDecryptor Decryptor { get => throw null; set => throw null; } + protected override System.Xml.XmlNodeList GetInnerXml() => throw null; + public override object GetOutput(System.Type type) => throw null; + public override object GetOutput() => throw null; + public override System.Type[] InputTypes { get => throw null; } + public override void LoadInnerXml(System.Xml.XmlNodeList nodeList) => throw null; + public override void LoadInput(object obj) => throw null; + public override System.Type[] OutputTypes { get => throw null; } + public XmlLicenseTransform() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs new file mode 100644 index 000000000000..c0371a668ccc --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs @@ -0,0 +1,2353 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.ApplicationIdentity` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationIdentity : System.Runtime.Serialization.ISerializable + { + public ApplicationIdentity(string applicationIdentityFullName) => throw null; + public string CodeBase { get => throw null; } + public string FullName { get => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string ToString() => throw null; + } + + namespace Configuration + { + // Generated from `System.Configuration.ConfigurationPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public ConfigurationPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Configuration.ConfigurationPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public ConfigurationPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public override System.Security.IPermission CreatePermission() => throw null; + } + + } + namespace Data + { + namespace Common + { + // Generated from `System.Data.Common.DBDataPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class DBDataPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public virtual void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) => throw null; + public bool AllowBlankPassword { get => throw null; set => throw null; } + protected void Clear() => throw null; + public override System.Security.IPermission Copy() => throw null; + protected virtual System.Data.Common.DBDataPermission CreateInstance() => throw null; + protected DBDataPermission(System.Security.Permissions.PermissionState state, bool allowBlankPassword) => throw null; + protected DBDataPermission(System.Security.Permissions.PermissionState state) => throw null; + protected DBDataPermission(System.Data.Common.DBDataPermissionAttribute permissionAttribute) => throw null; + protected DBDataPermission(System.Data.Common.DBDataPermission permission) => throw null; + protected DBDataPermission() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Data.Common.DBDataPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class DBDataPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public bool AllowBlankPassword { get => throw null; set => throw null; } + public string ConnectionString { get => throw null; set => throw null; } + protected DBDataPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Data.KeyRestrictionBehavior KeyRestrictionBehavior { get => throw null; set => throw null; } + public string KeyRestrictions { get => throw null; set => throw null; } + public bool ShouldSerializeConnectionString() => throw null; + public bool ShouldSerializeKeyRestrictions() => throw null; + } + + } + namespace Odbc + { + // Generated from `System.Data.Odbc.OdbcPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OdbcPermission : System.Data.Common.DBDataPermission + { + public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) => throw null; + public override System.Security.IPermission Copy() => throw null; + public OdbcPermission(System.Security.Permissions.PermissionState state, bool allowBlankPassword) => throw null; + public OdbcPermission(System.Security.Permissions.PermissionState state) => throw null; + public OdbcPermission() => throw null; + } + + // Generated from `System.Data.Odbc.OdbcPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OdbcPermissionAttribute : System.Data.Common.DBDataPermissionAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public OdbcPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + namespace OleDb + { + // Generated from `System.Data.OleDb.OleDbPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OleDbPermission : System.Data.Common.DBDataPermission + { + public override System.Security.IPermission Copy() => throw null; + public OleDbPermission(System.Security.Permissions.PermissionState state, bool allowBlankPassword) => throw null; + public OleDbPermission(System.Security.Permissions.PermissionState state) => throw null; + public OleDbPermission() => throw null; + public string Provider { get => throw null; set => throw null; } + } + + // Generated from `System.Data.OleDb.OleDbPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OleDbPermissionAttribute : System.Data.Common.DBDataPermissionAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public OleDbPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string Provider { get => throw null; set => throw null; } + } + + } + namespace OracleClient + { + // Generated from `System.Data.OracleClient.OraclePermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OraclePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) => throw null; + public bool AllowBlankPassword { get => throw null; set => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public OraclePermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Data.OracleClient.OraclePermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OraclePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public bool AllowBlankPassword { get => throw null; set => throw null; } + public string ConnectionString { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public System.Data.KeyRestrictionBehavior KeyRestrictionBehavior { get => throw null; set => throw null; } + public string KeyRestrictions { get => throw null; set => throw null; } + public OraclePermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool ShouldSerializeConnectionString() => throw null; + public bool ShouldSerializeKeyRestrictions() => throw null; + } + + } + namespace SqlClient + { + // Generated from `System.Data.SqlClient.SqlClientPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SqlClientPermission : System.Data.Common.DBDataPermission + { + public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) => throw null; + public override System.Security.IPermission Copy() => throw null; + public SqlClientPermission(System.Security.Permissions.PermissionState state, bool allowBlankPassword) => throw null; + public SqlClientPermission(System.Security.Permissions.PermissionState state) => throw null; + public SqlClientPermission() => throw null; + } + + // Generated from `System.Data.SqlClient.SqlClientPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SqlClientPermissionAttribute : System.Data.Common.DBDataPermissionAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public SqlClientPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + } + namespace Diagnostics + { + // Generated from `System.Diagnostics.EventLogPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogPermission : System.Security.Permissions.ResourcePermissionBase + { + public EventLogPermission(System.Security.Permissions.PermissionState state) => throw null; + public EventLogPermission(System.Diagnostics.EventLogPermissionEntry[] permissionAccessEntries) => throw null; + public EventLogPermission(System.Diagnostics.EventLogPermissionAccess permissionAccess, string machineName) => throw null; + public EventLogPermission() => throw null; + public System.Diagnostics.EventLogPermissionEntryCollection PermissionEntries { get => throw null; } + } + + // Generated from `System.Diagnostics.EventLogPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum EventLogPermissionAccess + { + Administer, + Audit, + Browse, + // Stub generator skipped constructor + Instrument, + None, + Write, + } + + // Generated from `System.Diagnostics.EventLogPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public EventLogPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string MachineName { get => throw null; set => throw null; } + public System.Diagnostics.EventLogPermissionAccess PermissionAccess { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.EventLogPermissionEntry` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogPermissionEntry + { + public EventLogPermissionEntry(System.Diagnostics.EventLogPermissionAccess permissionAccess, string machineName) => throw null; + public string MachineName { get => throw null; } + public System.Diagnostics.EventLogPermissionAccess PermissionAccess { get => throw null; } + } + + // Generated from `System.Diagnostics.EventLogPermissionEntryCollection` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EventLogPermissionEntryCollection : System.Collections.CollectionBase + { + public int Add(System.Diagnostics.EventLogPermissionEntry value) => throw null; + public void AddRange(System.Diagnostics.EventLogPermissionEntry[] value) => throw null; + public void AddRange(System.Diagnostics.EventLogPermissionEntryCollection value) => throw null; + public bool Contains(System.Diagnostics.EventLogPermissionEntry value) => throw null; + public void CopyTo(System.Diagnostics.EventLogPermissionEntry[] array, int index) => throw null; + public int IndexOf(System.Diagnostics.EventLogPermissionEntry value) => throw null; + public void Insert(int index, System.Diagnostics.EventLogPermissionEntry value) => throw null; + public System.Diagnostics.EventLogPermissionEntry this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object value) => throw null; + protected override void OnRemove(int index, object value) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + public void Remove(System.Diagnostics.EventLogPermissionEntry value) => throw null; + } + + // Generated from `System.Diagnostics.PerformanceCounterPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PerformanceCounterPermission : System.Security.Permissions.ResourcePermissionBase + { + public PerformanceCounterPermission(System.Security.Permissions.PermissionState state) => throw null; + public PerformanceCounterPermission(System.Diagnostics.PerformanceCounterPermissionEntry[] permissionAccessEntries) => throw null; + public PerformanceCounterPermission(System.Diagnostics.PerformanceCounterPermissionAccess permissionAccess, string machineName, string categoryName) => throw null; + public PerformanceCounterPermission() => throw null; + public System.Diagnostics.PerformanceCounterPermissionEntryCollection PermissionEntries { get => throw null; } + } + + // Generated from `System.Diagnostics.PerformanceCounterPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum PerformanceCounterPermissionAccess + { + Administer, + Browse, + Instrument, + None, + // Stub generator skipped constructor + Read, + Write, + } + + // Generated from `System.Diagnostics.PerformanceCounterPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PerformanceCounterPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string CategoryName { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public string MachineName { get => throw null; set => throw null; } + public PerformanceCounterPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Diagnostics.PerformanceCounterPermissionAccess PermissionAccess { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.PerformanceCounterPermissionEntry` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PerformanceCounterPermissionEntry + { + public string CategoryName { get => throw null; } + public string MachineName { get => throw null; } + public PerformanceCounterPermissionEntry(System.Diagnostics.PerformanceCounterPermissionAccess permissionAccess, string machineName, string categoryName) => throw null; + public System.Diagnostics.PerformanceCounterPermissionAccess PermissionAccess { get => throw null; } + } + + // Generated from `System.Diagnostics.PerformanceCounterPermissionEntryCollection` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PerformanceCounterPermissionEntryCollection : System.Collections.CollectionBase + { + public int Add(System.Diagnostics.PerformanceCounterPermissionEntry value) => throw null; + public void AddRange(System.Diagnostics.PerformanceCounterPermissionEntry[] value) => throw null; + public void AddRange(System.Diagnostics.PerformanceCounterPermissionEntryCollection value) => throw null; + public bool Contains(System.Diagnostics.PerformanceCounterPermissionEntry value) => throw null; + public void CopyTo(System.Diagnostics.PerformanceCounterPermissionEntry[] array, int index) => throw null; + public int IndexOf(System.Diagnostics.PerformanceCounterPermissionEntry value) => throw null; + public void Insert(int index, System.Diagnostics.PerformanceCounterPermissionEntry value) => throw null; + public System.Diagnostics.PerformanceCounterPermissionEntry this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object value) => throw null; + protected override void OnRemove(int index, object value) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + public void Remove(System.Diagnostics.PerformanceCounterPermissionEntry value) => throw null; + } + + } + namespace Drawing + { + namespace Printing + { + // Generated from `System.Drawing.Printing.PrintingPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PrintingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement element) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public System.Drawing.Printing.PrintingPermissionLevel Level { get => throw null; set => throw null; } + public PrintingPermission(System.Security.Permissions.PermissionState state) => throw null; + public PrintingPermission(System.Drawing.Printing.PrintingPermissionLevel printingLevel) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Drawing.Printing.PrintingPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PrintingPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Drawing.Printing.PrintingPermissionLevel Level { get => throw null; set => throw null; } + public PrintingPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Drawing.Printing.PrintingPermissionLevel` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum PrintingPermissionLevel + { + AllPrinting, + DefaultPrinting, + NoPrinting, + // Stub generator skipped constructor + SafePrinting, + } + + } + } + namespace Net + { + // Generated from `System.Net.DnsPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DnsPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public DnsPermission(System.Security.Permissions.PermissionState state) => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.DnsPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DnsPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public DnsPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Net.EndpointPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EndpointPermission + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Hostname { get => throw null; } + public int Port { get => throw null; } + public System.Net.TransportType Transport { get => throw null; } + } + + // Generated from `System.Net.NetworkAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum NetworkAccess + { + Accept, + Connect, + // Stub generator skipped constructor + } + + // Generated from `System.Net.SocketPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Collections.IEnumerator AcceptList { get => throw null; } + public void AddPermission(System.Net.NetworkAccess access, System.Net.TransportType transport, string hostName, int portNumber) => throw null; + public const int AllPorts = default; + public System.Collections.IEnumerator ConnectList { get => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public SocketPermission(System.Security.Permissions.PermissionState state) => throw null; + public SocketPermission(System.Net.NetworkAccess access, System.Net.TransportType transport, string hostName, int portNumber) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.SocketPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SocketPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string Access { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public string Host { get => throw null; set => throw null; } + public string Port { get => throw null; set => throw null; } + public SocketPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string Transport { get => throw null; set => throw null; } + } + + // Generated from `System.Net.TransportType` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TransportType + { + All, + ConnectionOriented, + Connectionless, + Tcp, + // Stub generator skipped constructor + Udp, + } + + // Generated from `System.Net.WebPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Collections.IEnumerator AcceptList { get => throw null; } + public void AddPermission(System.Net.NetworkAccess access, string uriString) => throw null; + public void AddPermission(System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex) => throw null; + public System.Collections.IEnumerator ConnectList { get => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public WebPermission(System.Security.Permissions.PermissionState state) => throw null; + public WebPermission(System.Net.NetworkAccess access, string uriString) => throw null; + public WebPermission(System.Net.NetworkAccess access, System.Text.RegularExpressions.Regex uriRegex) => throw null; + public WebPermission() => throw null; + } + + // Generated from `System.Net.WebPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string Accept { get => throw null; set => throw null; } + public string AcceptPattern { get => throw null; set => throw null; } + public string Connect { get => throw null; set => throw null; } + public string ConnectPattern { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public WebPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + namespace Mail + { + // Generated from `System.Net.Mail.SmtpAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SmtpAccess + { + Connect, + ConnectToUnrestrictedPort, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Net.Mail.SmtpPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Net.Mail.SmtpAccess Access { get => throw null; } + public void AddPermission(System.Net.Mail.SmtpAccess access) => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public SmtpPermission(bool unrestricted) => throw null; + public SmtpPermission(System.Security.Permissions.PermissionState state) => throw null; + public SmtpPermission(System.Net.Mail.SmtpAccess access) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.Mail.SmtpPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string Access { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public SmtpPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + namespace NetworkInformation + { + // Generated from `System.Net.NetworkInformation.NetworkInformationAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum NetworkInformationAccess + { + // Stub generator skipped constructor + None, + Ping, + Read, + } + + // Generated from `System.Net.NetworkInformation.NetworkInformationPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NetworkInformationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Net.NetworkInformation.NetworkInformationAccess Access { get => throw null; } + public void AddPermission(System.Net.NetworkInformation.NetworkInformationAccess access) => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public NetworkInformationPermission(System.Security.Permissions.PermissionState state) => throw null; + public NetworkInformationPermission(System.Net.NetworkInformation.NetworkInformationAccess access) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.NetworkInformation.NetworkInformationPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NetworkInformationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string Access { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public NetworkInformationPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + namespace PeerToPeer + { + // Generated from `System.Net.PeerToPeer.PnrpPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PnrpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement e) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public PnrpPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.PeerToPeer.PnrpPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PnrpPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public PnrpPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Net.PeerToPeer.PnrpScope` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum PnrpScope + { + All, + Global, + LinkLocal, + // Stub generator skipped constructor + SiteLocal, + } + + namespace Collaboration + { + // Generated from `System.Net.PeerToPeer.Collaboration.PeerCollaborationPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PeerCollaborationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement e) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public PeerCollaborationPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Net.PeerToPeer.Collaboration.PeerCollaborationPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PeerCollaborationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public PeerCollaborationPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + } + } + namespace Security + { + // Generated from `System.Security.CodeAccessPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class CodeAccessPermission : System.Security.IStackWalk, System.Security.ISecurityEncodable, System.Security.IPermission + { + public void Assert() => throw null; + protected CodeAccessPermission() => throw null; + public abstract System.Security.IPermission Copy(); + public void Demand() => throw null; + public void Deny() => throw null; + public override bool Equals(object obj) => throw null; + public abstract void FromXml(System.Security.SecurityElement elem); + public override int GetHashCode() => throw null; + public abstract System.Security.IPermission Intersect(System.Security.IPermission target); + public abstract bool IsSubsetOf(System.Security.IPermission target); + public void PermitOnly() => throw null; + public static void RevertAll() => throw null; + public static void RevertAssert() => throw null; + public static void RevertDeny() => throw null; + public static void RevertPermitOnly() => throw null; + public override string ToString() => throw null; + public abstract System.Security.SecurityElement ToXml(); + public virtual System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.HostProtectionException` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HostProtectionException : System.SystemException + { + public System.Security.Permissions.HostProtectionResource DemandedResources { get => throw null; } + public HostProtectionException(string message, System.Security.Permissions.HostProtectionResource protectedResources, System.Security.Permissions.HostProtectionResource demandedResources) => throw null; + public HostProtectionException(string message, System.Exception e) => throw null; + public HostProtectionException(string message) => throw null; + public HostProtectionException() => throw null; + protected HostProtectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Security.Permissions.HostProtectionResource ProtectedResources { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.HostSecurityManager` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HostSecurityManager + { + public virtual System.Security.Policy.ApplicationTrust DetermineApplicationTrust(System.Security.Policy.Evidence applicationEvidence, System.Security.Policy.Evidence activatorEvidence, System.Security.Policy.TrustManagerContext context) => throw null; + public virtual System.Security.Policy.PolicyLevel DomainPolicy { get => throw null; } + public virtual System.Security.HostSecurityManagerOptions Flags { get => throw null; } + public virtual System.Security.Policy.EvidenceBase GenerateAppDomainEvidence(System.Type evidenceType) => throw null; + public virtual System.Security.Policy.EvidenceBase GenerateAssemblyEvidence(System.Type evidenceType, System.Reflection.Assembly assembly) => throw null; + public virtual System.Type[] GetHostSuppliedAppDomainEvidenceTypes() => throw null; + public virtual System.Type[] GetHostSuppliedAssemblyEvidenceTypes(System.Reflection.Assembly assembly) => throw null; + public HostSecurityManager() => throw null; + public virtual System.Security.Policy.Evidence ProvideAppDomainEvidence(System.Security.Policy.Evidence inputEvidence) => throw null; + public virtual System.Security.Policy.Evidence ProvideAssemblyEvidence(System.Reflection.Assembly loadedAssembly, System.Security.Policy.Evidence inputEvidence) => throw null; + public virtual System.Security.PermissionSet ResolvePolicy(System.Security.Policy.Evidence evidence) => throw null; + } + + // Generated from `System.Security.HostSecurityManagerOptions` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum HostSecurityManagerOptions + { + AllFlags, + HostAppDomainEvidence, + HostAssemblyEvidence, + HostDetermineApplicationTrust, + HostPolicyLevel, + HostResolvePolicy, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Security.IEvidenceFactory` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IEvidenceFactory + { + System.Security.Policy.Evidence Evidence { get; } + } + + // Generated from `System.Security.ISecurityPolicyEncodable` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface ISecurityPolicyEncodable + { + void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level); + System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level); + } + + // Generated from `System.Security.NamedPermissionSet` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NamedPermissionSet : System.Security.PermissionSet + { + public override System.Security.PermissionSet Copy() => throw null; + public System.Security.NamedPermissionSet Copy(string name) => throw null; + public string Description { get => throw null; set => throw null; } + public override bool Equals(object o) => throw null; + public override void FromXml(System.Security.SecurityElement et) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; set => throw null; } + public NamedPermissionSet(string name, System.Security.Permissions.PermissionState state) : base(default(System.Security.PermissionSet)) => throw null; + public NamedPermissionSet(string name, System.Security.PermissionSet permSet) : base(default(System.Security.PermissionSet)) => throw null; + public NamedPermissionSet(string name) : base(default(System.Security.PermissionSet)) => throw null; + public NamedPermissionSet(System.Security.NamedPermissionSet permSet) : base(default(System.Security.PermissionSet)) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.PolicyLevelType` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum PolicyLevelType + { + AppDomain, + Enterprise, + Machine, + // Stub generator skipped constructor + User, + } + + // Generated from `System.Security.SecurityContext` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SecurityContext : System.IDisposable + { + public static System.Security.SecurityContext Capture() => throw null; + public System.Security.SecurityContext CreateCopy() => throw null; + public void Dispose() => throw null; + public static bool IsFlowSuppressed() => throw null; + public static bool IsWindowsIdentityFlowSuppressed() => throw null; + public static void RestoreFlow() => throw null; + public static void Run(System.Security.SecurityContext securityContext, System.Threading.ContextCallback callback, object state) => throw null; + public static System.Threading.AsyncFlowControl SuppressFlow() => throw null; + public static System.Threading.AsyncFlowControl SuppressFlowWindowsIdentity() => throw null; + } + + // Generated from `System.Security.SecurityContextSource` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SecurityContextSource + { + CurrentAppDomain, + CurrentAssembly, + // Stub generator skipped constructor + } + + // Generated from `System.Security.SecurityManager` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class SecurityManager + { + public static bool CheckExecutionRights { get => throw null; set => throw null; } + public static bool CurrentThreadRequiresSecurityContextCapture() => throw null; + public static System.Security.PermissionSet GetStandardSandbox(System.Security.Policy.Evidence evidence) => throw null; + public static void GetZoneAndOrigin(out System.Collections.ArrayList zone, out System.Collections.ArrayList origin) => throw null; + public static bool IsGranted(System.Security.IPermission perm) => throw null; + public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromFile(string path, System.Security.PolicyLevelType type) => throw null; + public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromString(string str, System.Security.PolicyLevelType type) => throw null; + public static System.Collections.IEnumerator PolicyHierarchy() => throw null; + public static System.Security.PermissionSet ResolvePolicy(System.Security.Policy.Evidence[] evidences) => throw null; + public static System.Security.PermissionSet ResolvePolicy(System.Security.Policy.Evidence evidence, System.Security.PermissionSet reqdPset, System.Security.PermissionSet optPset, System.Security.PermissionSet denyPset, out System.Security.PermissionSet denied) => throw null; + public static System.Security.PermissionSet ResolvePolicy(System.Security.Policy.Evidence evidence) => throw null; + public static System.Collections.IEnumerator ResolvePolicyGroups(System.Security.Policy.Evidence evidence) => throw null; + public static System.Security.PermissionSet ResolveSystemPolicy(System.Security.Policy.Evidence evidence) => throw null; + public static void SavePolicy() => throw null; + public static void SavePolicyLevel(System.Security.Policy.PolicyLevel level) => throw null; + public static bool SecurityEnabled { get => throw null; set => throw null; } + } + + // Generated from `System.Security.SecurityState` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class SecurityState + { + public abstract void EnsureState(); + public bool IsStateAvailable() => throw null; + protected SecurityState() => throw null; + } + + // Generated from `System.Security.SecurityZone` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SecurityZone + { + Internet, + Intranet, + MyComputer, + NoZone, + // Stub generator skipped constructor + Trusted, + Untrusted, + } + + // Generated from `System.Security.XmlSyntaxException` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XmlSyntaxException : System.SystemException + { + public XmlSyntaxException(string message, System.Exception inner) => throw null; + public XmlSyntaxException(string message) => throw null; + public XmlSyntaxException(int lineNumber, string message) => throw null; + public XmlSyntaxException(int lineNumber) => throw null; + public XmlSyntaxException() => throw null; + } + + namespace Permissions + { + // Generated from `System.Security.Permissions.DataProtectionPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DataProtectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public DataProtectionPermission(System.Security.Permissions.PermissionState state) => throw null; + public DataProtectionPermission(System.Security.Permissions.DataProtectionPermissionFlags flag) => throw null; + public System.Security.Permissions.DataProtectionPermissionFlags Flags { get => throw null; set => throw null; } + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.DataProtectionPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DataProtectionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public DataProtectionPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Security.Permissions.DataProtectionPermissionFlags Flags { get => throw null; set => throw null; } + public bool ProtectData { get => throw null; set => throw null; } + public bool ProtectMemory { get => throw null; set => throw null; } + public bool UnprotectData { get => throw null; set => throw null; } + public bool UnprotectMemory { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.DataProtectionPermissionFlags` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum DataProtectionPermissionFlags + { + AllFlags, + // Stub generator skipped constructor + NoFlags, + ProtectData, + ProtectMemory, + UnprotectData, + UnprotectMemory, + } + + // Generated from `System.Security.Permissions.EnvironmentPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EnvironmentPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public void AddPathList(System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) => throw null; + public override System.Security.IPermission Copy() => throw null; + public EnvironmentPermission(System.Security.Permissions.PermissionState state) => throw null; + public EnvironmentPermission(System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public string GetPathList(System.Security.Permissions.EnvironmentPermissionAccess flag) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public void SetPathList(System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.Permissions.EnvironmentPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum EnvironmentPermissionAccess + { + AllAccess, + // Stub generator skipped constructor + NoAccess, + Read, + Write, + } + + // Generated from `System.Security.Permissions.EnvironmentPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class EnvironmentPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string All { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public EnvironmentPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string Read { get => throw null; set => throw null; } + public string Write { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.FileDialogPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FileDialogPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Security.Permissions.FileDialogPermissionAccess Access { get => throw null; set => throw null; } + public override System.Security.IPermission Copy() => throw null; + public FileDialogPermission(System.Security.Permissions.PermissionState state) => throw null; + public FileDialogPermission(System.Security.Permissions.FileDialogPermissionAccess access) => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.FileDialogPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum FileDialogPermissionAccess + { + // Stub generator skipped constructor + None, + Open, + OpenSave, + Save, + } + + // Generated from `System.Security.Permissions.FileDialogPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FileDialogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public FileDialogPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool Open { get => throw null; set => throw null; } + public bool Save { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.FileIOPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FileIOPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public void AddPathList(System.Security.Permissions.FileIOPermissionAccess access, string[] pathList) => throw null; + public void AddPathList(System.Security.Permissions.FileIOPermissionAccess access, string path) => throw null; + public System.Security.Permissions.FileIOPermissionAccess AllFiles { get => throw null; set => throw null; } + public System.Security.Permissions.FileIOPermissionAccess AllLocalFiles { get => throw null; set => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override bool Equals(object o) => throw null; + public FileIOPermission(System.Security.Permissions.PermissionState state) => throw null; + public FileIOPermission(System.Security.Permissions.FileIOPermissionAccess access, string[] pathList) => throw null; + public FileIOPermission(System.Security.Permissions.FileIOPermissionAccess access, string path) => throw null; + public FileIOPermission(System.Security.Permissions.FileIOPermissionAccess access, System.Security.AccessControl.AccessControlActions actions, string[] pathList) => throw null; + public FileIOPermission(System.Security.Permissions.FileIOPermissionAccess access, System.Security.AccessControl.AccessControlActions actions, string path) => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override int GetHashCode() => throw null; + public string[] GetPathList(System.Security.Permissions.FileIOPermissionAccess access) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public void SetPathList(System.Security.Permissions.FileIOPermissionAccess access, string[] pathList) => throw null; + public void SetPathList(System.Security.Permissions.FileIOPermissionAccess access, string path) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.Permissions.FileIOPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum FileIOPermissionAccess + { + AllAccess, + Append, + // Stub generator skipped constructor + NoAccess, + PathDiscovery, + Read, + Write, + } + + // Generated from `System.Security.Permissions.FileIOPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FileIOPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string All { get => throw null; set => throw null; } + public System.Security.Permissions.FileIOPermissionAccess AllFiles { get => throw null; set => throw null; } + public System.Security.Permissions.FileIOPermissionAccess AllLocalFiles { get => throw null; set => throw null; } + public string Append { get => throw null; set => throw null; } + public string ChangeAccessControl { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public FileIOPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string PathDiscovery { get => throw null; set => throw null; } + public string Read { get => throw null; set => throw null; } + public string ViewAccessControl { get => throw null; set => throw null; } + public string ViewAndModify { get => throw null; set => throw null; } + public string Write { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.GacIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class GacIdentityPermission : System.Security.CodeAccessPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public GacIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + public GacIdentityPermission() => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.GacIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class GacIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public GacIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.HostProtectionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HostProtectionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public bool ExternalProcessMgmt { get => throw null; set => throw null; } + public bool ExternalThreading { get => throw null; set => throw null; } + public HostProtectionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public HostProtectionAttribute() : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool MayLeakOnAbort { get => throw null; set => throw null; } + public System.Security.Permissions.HostProtectionResource Resources { get => throw null; set => throw null; } + public bool SecurityInfrastructure { get => throw null; set => throw null; } + public bool SelfAffectingProcessMgmt { get => throw null; set => throw null; } + public bool SelfAffectingThreading { get => throw null; set => throw null; } + public bool SharedState { get => throw null; set => throw null; } + public bool Synchronization { get => throw null; set => throw null; } + public bool UI { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.HostProtectionResource` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum HostProtectionResource + { + All, + ExternalProcessMgmt, + ExternalThreading, + // Stub generator skipped constructor + MayLeakOnAbort, + None, + SecurityInfrastructure, + SelfAffectingProcessMgmt, + SelfAffectingThreading, + SharedState, + Synchronization, + UI, + } + + // Generated from `System.Security.Permissions.IUnrestrictedPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IUnrestrictedPermission + { + bool IsUnrestricted(); + } + + // Generated from `System.Security.Permissions.IsolatedStorageContainment` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum IsolatedStorageContainment + { + AdministerIsolatedStorageByUser, + ApplicationIsolationByMachine, + ApplicationIsolationByRoamingUser, + ApplicationIsolationByUser, + AssemblyIsolationByMachine, + AssemblyIsolationByRoamingUser, + AssemblyIsolationByUser, + DomainIsolationByMachine, + DomainIsolationByRoamingUser, + DomainIsolationByUser, + // Stub generator skipped constructor + None, + UnrestrictedIsolatedStorage, + } + + // Generated from `System.Security.Permissions.IsolatedStorageFilePermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission + { + public override System.Security.IPermission Copy() => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public IsolatedStorageFilePermission(System.Security.Permissions.PermissionState state) : base(default(System.Security.Permissions.PermissionState)) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.IsolatedStorageFilePermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IsolatedStorageFilePermissionAttribute : System.Security.Permissions.IsolatedStoragePermissionAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public IsolatedStorageFilePermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.IsolatedStoragePermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class IsolatedStoragePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public bool IsUnrestricted() => throw null; + protected IsolatedStoragePermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public System.Security.Permissions.IsolatedStorageContainment UsageAllowed { get => throw null; set => throw null; } + public System.Int64 UserQuota { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.IsolatedStoragePermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class IsolatedStoragePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + protected IsolatedStoragePermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Security.Permissions.IsolatedStorageContainment UsageAllowed { get => throw null; set => throw null; } + public System.Int64 UserQuota { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.KeyContainerPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyContainerPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Security.Permissions.KeyContainerPermissionAccessEntryCollection AccessEntries { get => throw null; } + public override System.Security.IPermission Copy() => throw null; + public System.Security.Permissions.KeyContainerPermissionFlags Flags { get => throw null; } + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public KeyContainerPermission(System.Security.Permissions.PermissionState state) => throw null; + public KeyContainerPermission(System.Security.Permissions.KeyContainerPermissionFlags flags, System.Security.Permissions.KeyContainerPermissionAccessEntry[] accessList) => throw null; + public KeyContainerPermission(System.Security.Permissions.KeyContainerPermissionFlags flags) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.KeyContainerPermissionAccessEntry` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyContainerPermissionAccessEntry + { + public override bool Equals(object o) => throw null; + public System.Security.Permissions.KeyContainerPermissionFlags Flags { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public string KeyContainerName { get => throw null; set => throw null; } + public KeyContainerPermissionAccessEntry(string keyStore, string providerName, int providerType, string keyContainerName, int keySpec, System.Security.Permissions.KeyContainerPermissionFlags flags) => throw null; + public KeyContainerPermissionAccessEntry(string keyContainerName, System.Security.Permissions.KeyContainerPermissionFlags flags) => throw null; + public KeyContainerPermissionAccessEntry(System.Security.Cryptography.CspParameters parameters, System.Security.Permissions.KeyContainerPermissionFlags flags) => throw null; + public int KeySpec { get => throw null; set => throw null; } + public string KeyStore { get => throw null; set => throw null; } + public string ProviderName { get => throw null; set => throw null; } + public int ProviderType { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.KeyContainerPermissionAccessEntryCollection` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyContainerPermissionAccessEntryCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Permissions.KeyContainerPermissionAccessEntry accessEntry) => throw null; + public void Clear() => throw null; + public void CopyTo(System.Security.Permissions.KeyContainerPermissionAccessEntry[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(System.Security.Permissions.KeyContainerPermissionAccessEntry accessEntry) => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Permissions.KeyContainerPermissionAccessEntry this[int index] { get => throw null; } + public KeyContainerPermissionAccessEntryCollection() => throw null; + public void Remove(System.Security.Permissions.KeyContainerPermissionAccessEntry accessEntry) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyContainerPermissionAccessEntryEnumerator : System.Collections.IEnumerator + { + public System.Security.Permissions.KeyContainerPermissionAccessEntry Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public KeyContainerPermissionAccessEntryEnumerator() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Permissions.KeyContainerPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyContainerPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.Permissions.KeyContainerPermissionFlags Flags { get => throw null; set => throw null; } + public string KeyContainerName { get => throw null; set => throw null; } + public KeyContainerPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public int KeySpec { get => throw null; set => throw null; } + public string KeyStore { get => throw null; set => throw null; } + public string ProviderName { get => throw null; set => throw null; } + public int ProviderType { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.KeyContainerPermissionFlags` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum KeyContainerPermissionFlags + { + AllFlags, + ChangeAcl, + Create, + Decrypt, + Delete, + Export, + Import, + // Stub generator skipped constructor + NoFlags, + Open, + Sign, + ViewAcl, + } + + // Generated from `System.Security.Permissions.MediaPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class MediaPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Security.Permissions.MediaPermissionAudio Audio { get => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public System.Security.Permissions.MediaPermissionImage Image { get => throw null; } + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public MediaPermission(System.Security.Permissions.PermissionState state) => throw null; + public MediaPermission(System.Security.Permissions.MediaPermissionVideo permissionVideo) => throw null; + public MediaPermission(System.Security.Permissions.MediaPermissionImage permissionImage) => throw null; + public MediaPermission(System.Security.Permissions.MediaPermissionAudio permissionAudio, System.Security.Permissions.MediaPermissionVideo permissionVideo, System.Security.Permissions.MediaPermissionImage permissionImage) => throw null; + public MediaPermission(System.Security.Permissions.MediaPermissionAudio permissionAudio) => throw null; + public MediaPermission() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public System.Security.Permissions.MediaPermissionVideo Video { get => throw null; } + } + + // Generated from `System.Security.Permissions.MediaPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class MediaPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public System.Security.Permissions.MediaPermissionAudio Audio { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.Permissions.MediaPermissionImage Image { get => throw null; set => throw null; } + public MediaPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Security.Permissions.MediaPermissionVideo Video { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.MediaPermissionAudio` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum MediaPermissionAudio + { + AllAudio, + // Stub generator skipped constructor + NoAudio, + SafeAudio, + SiteOfOriginAudio, + } + + // Generated from `System.Security.Permissions.MediaPermissionImage` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum MediaPermissionImage + { + AllImage, + // Stub generator skipped constructor + NoImage, + SafeImage, + SiteOfOriginImage, + } + + // Generated from `System.Security.Permissions.MediaPermissionVideo` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum MediaPermissionVideo + { + AllVideo, + // Stub generator skipped constructor + NoVideo, + SafeVideo, + SiteOfOriginVideo, + } + + // Generated from `System.Security.Permissions.PermissionSetAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PermissionSetAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.PermissionSet CreatePermissionSet() => throw null; + public string File { get => throw null; set => throw null; } + public string Hex { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public PermissionSetAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool UnicodeEncoded { get => throw null; set => throw null; } + public string XML { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.PrincipalPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PrincipalPermission : System.Security.Permissions.IUnrestrictedPermission, System.Security.ISecurityEncodable, System.Security.IPermission + { + public System.Security.IPermission Copy() => throw null; + public void Demand() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement elem) => throw null; + public override int GetHashCode() => throw null; + public System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public PrincipalPermission(string name, string role, bool isAuthenticated) => throw null; + public PrincipalPermission(string name, string role) => throw null; + public PrincipalPermission(System.Security.Permissions.PermissionState state) => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml() => throw null; + public System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.Permissions.PrincipalPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PrincipalPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public bool Authenticated { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public string Name { get => throw null; set => throw null; } + public PrincipalPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string Role { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.PublisherIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PublisherIdentityPermission : System.Security.CodeAccessPermission + { + public System.Security.Cryptography.X509Certificates.X509Certificate Certificate { get => throw null; set => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public PublisherIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + public PublisherIdentityPermission(System.Security.Cryptography.X509Certificates.X509Certificate certificate) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.PublisherIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PublisherIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string CertFile { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public PublisherIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string SignedFile { get => throw null; set => throw null; } + public string X509Certificate { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.ReflectionPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ReflectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public System.Security.Permissions.ReflectionPermissionFlag Flags { get => throw null; set => throw null; } + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public ReflectionPermission(System.Security.Permissions.ReflectionPermissionFlag flag) => throw null; + public ReflectionPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.Permissions.ReflectionPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ReflectionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.Permissions.ReflectionPermissionFlag Flags { get => throw null; set => throw null; } + public bool MemberAccess { get => throw null; set => throw null; } + public bool ReflectionEmit { get => throw null; set => throw null; } + public ReflectionPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool RestrictedMemberAccess { get => throw null; set => throw null; } + public bool TypeInformation { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.ReflectionPermissionFlag` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum ReflectionPermissionFlag + { + AllFlags, + MemberAccess, + NoFlags, + ReflectionEmit, + // Stub generator skipped constructor + RestrictedMemberAccess, + TypeInformation, + } + + // Generated from `System.Security.Permissions.RegistryPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RegistryPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public void AddPathList(System.Security.Permissions.RegistryPermissionAccess access, string pathList) => throw null; + public void AddPathList(System.Security.Permissions.RegistryPermissionAccess access, System.Security.AccessControl.AccessControlActions actions, string pathList) => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement elem) => throw null; + public string GetPathList(System.Security.Permissions.RegistryPermissionAccess access) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public RegistryPermission(System.Security.Permissions.RegistryPermissionAccess access, string pathList) => throw null; + public RegistryPermission(System.Security.Permissions.RegistryPermissionAccess access, System.Security.AccessControl.AccessControlActions control, string pathList) => throw null; + public RegistryPermission(System.Security.Permissions.PermissionState state) => throw null; + public void SetPathList(System.Security.Permissions.RegistryPermissionAccess access, string pathList) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission other) => throw null; + } + + // Generated from `System.Security.Permissions.RegistryPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum RegistryPermissionAccess + { + AllAccess, + Create, + NoAccess, + Read, + // Stub generator skipped constructor + Write, + } + + // Generated from `System.Security.Permissions.RegistryPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RegistryPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public string All { get => throw null; set => throw null; } + public string ChangeAccessControl { get => throw null; set => throw null; } + public string Create { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public string Read { get => throw null; set => throw null; } + public RegistryPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string ViewAccessControl { get => throw null; set => throw null; } + public string ViewAndModify { get => throw null; set => throw null; } + public string Write { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.ResourcePermissionBase` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ResourcePermissionBase : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + protected void AddPermissionAccess(System.Security.Permissions.ResourcePermissionBaseEntry entry) => throw null; + public const string Any = default; + protected void Clear() => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + protected System.Security.Permissions.ResourcePermissionBaseEntry[] GetPermissionEntries() => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public const string Local = default; + protected System.Type PermissionAccessType { get => throw null; set => throw null; } + protected void RemovePermissionAccess(System.Security.Permissions.ResourcePermissionBaseEntry entry) => throw null; + protected ResourcePermissionBase(System.Security.Permissions.PermissionState state) => throw null; + protected ResourcePermissionBase() => throw null; + protected string[] TagNames { get => throw null; set => throw null; } + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.ResourcePermissionBaseEntry` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ResourcePermissionBaseEntry + { + public int PermissionAccess { get => throw null; } + public string[] PermissionAccessPath { get => throw null; } + public ResourcePermissionBaseEntry(int permissionAccess, string[] permissionAccessPath) => throw null; + public ResourcePermissionBaseEntry() => throw null; + } + + // Generated from `System.Security.Permissions.SecurityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SecurityPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public System.Security.Permissions.SecurityPermissionFlag Flags { get => throw null; set => throw null; } + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public SecurityPermission(System.Security.Permissions.SecurityPermissionFlag flag) => throw null; + public SecurityPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.SiteIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SiteIdentityPermission : System.Security.CodeAccessPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public string Site { get => throw null; set => throw null; } + public SiteIdentityPermission(string site) => throw null; + public SiteIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.SiteIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public string Site { get => throw null; set => throw null; } + public SiteIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.StorePermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StorePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public System.Security.Permissions.StorePermissionFlags Flags { get => throw null; set => throw null; } + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public StorePermission(System.Security.Permissions.StorePermissionFlags flag) => throw null; + public StorePermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.StorePermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StorePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public bool AddToStore { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public bool CreateStore { get => throw null; set => throw null; } + public bool DeleteStore { get => throw null; set => throw null; } + public bool EnumerateCertificates { get => throw null; set => throw null; } + public bool EnumerateStores { get => throw null; set => throw null; } + public System.Security.Permissions.StorePermissionFlags Flags { get => throw null; set => throw null; } + public bool OpenStore { get => throw null; set => throw null; } + public bool RemoveFromStore { get => throw null; set => throw null; } + public StorePermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.StorePermissionFlags` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum StorePermissionFlags + { + AddToStore, + AllFlags, + CreateStore, + DeleteStore, + EnumerateCertificates, + EnumerateStores, + NoFlags, + OpenStore, + RemoveFromStore, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.StrongNameIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StrongNameIdentityPermission : System.Security.CodeAccessPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement e) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public string Name { get => throw null; set => throw null; } + public System.Security.Permissions.StrongNamePublicKeyBlob PublicKey { get => throw null; set => throw null; } + public StrongNameIdentityPermission(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version) => throw null; + public StrongNameIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public System.Version Version { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.StrongNameIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public string Name { get => throw null; set => throw null; } + public string PublicKey { get => throw null; set => throw null; } + public StrongNameIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string Version { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.StrongNamePublicKeyBlob` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StrongNamePublicKeyBlob + { + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public StrongNamePublicKeyBlob(System.Byte[] publicKey) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Security.Permissions.TypeDescriptorPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TypeDescriptorPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public System.Security.Permissions.TypeDescriptorPermissionFlags Flags { get => throw null; set => throw null; } + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public TypeDescriptorPermission(System.Security.Permissions.TypeDescriptorPermissionFlags flag) => throw null; + public TypeDescriptorPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Security.Permissions.TypeDescriptorPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TypeDescriptorPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.Permissions.TypeDescriptorPermissionFlags Flags { get => throw null; set => throw null; } + public bool RestrictedRegistrationAccess { get => throw null; set => throw null; } + public TypeDescriptorPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.TypeDescriptorPermissionFlags` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum TypeDescriptorPermissionFlags + { + NoFlags, + RestrictedRegistrationAccess, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.UIPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UIPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Security.Permissions.UIPermissionClipboard Clipboard { get => throw null; set => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public UIPermission(System.Security.Permissions.UIPermissionWindow windowFlag, System.Security.Permissions.UIPermissionClipboard clipboardFlag) => throw null; + public UIPermission(System.Security.Permissions.UIPermissionWindow windowFlag) => throw null; + public UIPermission(System.Security.Permissions.UIPermissionClipboard clipboardFlag) => throw null; + public UIPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public System.Security.Permissions.UIPermissionWindow Window { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.UIPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UIPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public System.Security.Permissions.UIPermissionClipboard Clipboard { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public UIPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public System.Security.Permissions.UIPermissionWindow Window { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.UIPermissionClipboard` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum UIPermissionClipboard + { + AllClipboard, + NoClipboard, + OwnClipboard, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.UIPermissionWindow` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum UIPermissionWindow + { + AllWindows, + NoWindows, + SafeSubWindows, + SafeTopLevelWindows, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.UrlIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UrlIdentityPermission : System.Security.CodeAccessPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public string Url { get => throw null; set => throw null; } + public UrlIdentityPermission(string site) => throw null; + public UrlIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + } + + // Generated from `System.Security.Permissions.UrlIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UrlIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public string Url { get => throw null; set => throw null; } + public UrlIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.WebBrowserPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebBrowserPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public System.Security.Permissions.WebBrowserPermissionLevel Level { get => throw null; set => throw null; } + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public WebBrowserPermission(System.Security.Permissions.WebBrowserPermissionLevel webBrowserPermissionLevel) => throw null; + public WebBrowserPermission(System.Security.Permissions.PermissionState state) => throw null; + public WebBrowserPermission() => throw null; + } + + // Generated from `System.Security.Permissions.WebBrowserPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebBrowserPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.Permissions.WebBrowserPermissionLevel Level { get => throw null; set => throw null; } + public WebBrowserPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.WebBrowserPermissionLevel` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum WebBrowserPermissionLevel + { + None, + Safe, + Unrestricted, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.ZoneIdentityPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ZoneIdentityPermission : System.Security.CodeAccessPermission + { + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement esd) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public System.Security.SecurityZone SecurityZone { get => throw null; set => throw null; } + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + public ZoneIdentityPermission(System.Security.SecurityZone zone) => throw null; + public ZoneIdentityPermission(System.Security.Permissions.PermissionState state) => throw null; + } + + // Generated from `System.Security.Permissions.ZoneIdentityPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public System.Security.SecurityZone Zone { get => throw null; set => throw null; } + public ZoneIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + } + namespace Policy + { + // Generated from `System.Security.Policy.AllMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AllMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public AllMembershipCondition() => throw null; + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.ApplicationDirectory` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationDirectory : System.Security.Policy.EvidenceBase + { + public ApplicationDirectory(string name) => throw null; + public object Copy() => throw null; + public string Directory { get => throw null; } + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.ApplicationDirectoryMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationDirectoryMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public ApplicationDirectoryMembershipCondition() => throw null; + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.ApplicationTrust` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationTrust : System.Security.Policy.EvidenceBase, System.Security.ISecurityEncodable + { + public System.ApplicationIdentity ApplicationIdentity { get => throw null; set => throw null; } + public ApplicationTrust(System.Security.PermissionSet defaultGrantSet, System.Collections.Generic.IEnumerable fullTrustAssemblies) => throw null; + public ApplicationTrust(System.ApplicationIdentity identity) => throw null; + public ApplicationTrust() => throw null; + public System.Security.Policy.PolicyStatement DefaultGrantSet { get => throw null; set => throw null; } + public object ExtraInfo { get => throw null; set => throw null; } + public void FromXml(System.Security.SecurityElement element) => throw null; + public System.Collections.Generic.IList FullTrustAssemblies { get => throw null; } + public bool IsApplicationTrustedToRun { get => throw null; set => throw null; } + public bool Persist { get => throw null; set => throw null; } + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.ApplicationTrustCollection` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationTrustCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Policy.ApplicationTrust trust) => throw null; + public void AddRange(System.Security.Policy.ApplicationTrust[] trusts) => throw null; + public void AddRange(System.Security.Policy.ApplicationTrustCollection trusts) => throw null; + public void Clear() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.Policy.ApplicationTrust[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Policy.ApplicationTrustCollection Find(System.ApplicationIdentity applicationIdentity, System.Security.Policy.ApplicationVersionMatch versionMatch) => throw null; + public System.Security.Policy.ApplicationTrustEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Policy.ApplicationTrust this[string appFullName] { get => throw null; } + public System.Security.Policy.ApplicationTrust this[int index] { get => throw null; } + public void Remove(System.Security.Policy.ApplicationTrust trust) => throw null; + public void Remove(System.ApplicationIdentity applicationIdentity, System.Security.Policy.ApplicationVersionMatch versionMatch) => throw null; + public void RemoveRange(System.Security.Policy.ApplicationTrust[] trusts) => throw null; + public void RemoveRange(System.Security.Policy.ApplicationTrustCollection trusts) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Policy.ApplicationTrustEnumerator` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationTrustEnumerator : System.Collections.IEnumerator + { + public System.Security.Policy.ApplicationTrust Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Policy.ApplicationVersionMatch` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ApplicationVersionMatch + { + // Stub generator skipped constructor + MatchAllVersions, + MatchExactVersion, + } + + // Generated from `System.Security.Policy.CodeConnectAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CodeConnectAccess + { + public static string AnyScheme; + public CodeConnectAccess(string allowScheme, int allowPort) => throw null; + public static System.Security.Policy.CodeConnectAccess CreateAnySchemeAccess(int allowPort) => throw null; + public static System.Security.Policy.CodeConnectAccess CreateOriginSchemeAccess(int allowPort) => throw null; + public static int DefaultPort; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public static int OriginPort; + public static string OriginScheme; + public int Port { get => throw null; } + public string Scheme { get => throw null; } + } + + // Generated from `System.Security.Policy.CodeGroup` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class CodeGroup + { + public void AddChild(System.Security.Policy.CodeGroup group) => throw null; + public virtual string AttributeString { get => throw null; } + public System.Collections.IList Children { get => throw null; set => throw null; } + protected CodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy) => throw null; + public abstract System.Security.Policy.CodeGroup Copy(); + protected virtual void CreateXml(System.Security.SecurityElement element, System.Security.Policy.PolicyLevel level) => throw null; + public string Description { get => throw null; set => throw null; } + public override bool Equals(object o) => throw null; + public bool Equals(System.Security.Policy.CodeGroup cg, bool compareChildren) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public System.Security.Policy.IMembershipCondition MembershipCondition { get => throw null; set => throw null; } + public abstract string MergeLogic { get; } + public string Name { get => throw null; set => throw null; } + protected virtual void ParseXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public virtual string PermissionSetName { get => throw null; } + public System.Security.Policy.PolicyStatement PolicyStatement { get => throw null; set => throw null; } + public void RemoveChild(System.Security.Policy.CodeGroup group) => throw null; + public abstract System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence); + public abstract System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence); + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.Evidence` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Evidence : System.Collections.IEnumerable, System.Collections.ICollection + { + public void AddAssembly(object id) => throw null; + public void AddAssemblyEvidence(T evidence) where T : System.Security.Policy.EvidenceBase => throw null; + public void AddHost(object id) => throw null; + public void AddHostEvidence(T evidence) where T : System.Security.Policy.EvidenceBase => throw null; + public void Clear() => throw null; + public System.Security.Policy.Evidence Clone() => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public Evidence(object[] hostEvidence, object[] assemblyEvidence) => throw null; + public Evidence(System.Security.Policy.EvidenceBase[] hostEvidence, System.Security.Policy.EvidenceBase[] assemblyEvidence) => throw null; + public Evidence(System.Security.Policy.Evidence evidence) => throw null; + public Evidence() => throw null; + public System.Collections.IEnumerator GetAssemblyEnumerator() => throw null; + public T GetAssemblyEvidence() where T : System.Security.Policy.EvidenceBase => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public System.Collections.IEnumerator GetHostEnumerator() => throw null; + public T GetHostEvidence() where T : System.Security.Policy.EvidenceBase => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public bool Locked { get => throw null; set => throw null; } + public void Merge(System.Security.Policy.Evidence evidence) => throw null; + public void RemoveType(System.Type t) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Policy.EvidenceBase` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class EvidenceBase + { + public virtual System.Security.Policy.EvidenceBase Clone() => throw null; + protected EvidenceBase() => throw null; + } + + // Generated from `System.Security.Policy.FileCodeGroup` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FileCodeGroup : System.Security.Policy.CodeGroup + { + public override string AttributeString { get => throw null; } + public override System.Security.Policy.CodeGroup Copy() => throw null; + protected override void CreateXml(System.Security.SecurityElement element, System.Security.Policy.PolicyLevel level) => throw null; + public override bool Equals(object o) => throw null; + public FileCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Permissions.FileIOPermissionAccess access) : base(default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement)) => throw null; + public override int GetHashCode() => throw null; + public override string MergeLogic { get => throw null; } + protected override void ParseXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public override string PermissionSetName { get => throw null; } + public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) => throw null; + public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) => throw null; + } + + // Generated from `System.Security.Policy.FirstMatchCodeGroup` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class FirstMatchCodeGroup : System.Security.Policy.CodeGroup + { + public override System.Security.Policy.CodeGroup Copy() => throw null; + public FirstMatchCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy) : base(default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement)) => throw null; + public override string MergeLogic { get => throw null; } + public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) => throw null; + public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) => throw null; + } + + // Generated from `System.Security.Policy.GacInstalled` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class GacInstalled : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public object Copy() => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public GacInstalled() => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.GacMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class GacMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public GacMembershipCondition() => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.Hash` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Hash : System.Security.Policy.EvidenceBase, System.Runtime.Serialization.ISerializable + { + public static System.Security.Policy.Hash CreateMD5(System.Byte[] md5) => throw null; + public static System.Security.Policy.Hash CreateSHA1(System.Byte[] sha1) => throw null; + public static System.Security.Policy.Hash CreateSHA256(System.Byte[] sha256) => throw null; + public System.Byte[] GenerateHash(System.Security.Cryptography.HashAlgorithm hashAlg) => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public Hash(System.Reflection.Assembly assembly) => throw null; + public System.Byte[] MD5 { get => throw null; } + public System.Byte[] SHA1 { get => throw null; } + public System.Byte[] SHA256 { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.HashMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HashMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Security.Cryptography.HashAlgorithm HashAlgorithm { get => throw null; set => throw null; } + public HashMembershipCondition(System.Security.Cryptography.HashAlgorithm hashAlg, System.Byte[] value) => throw null; + public System.Byte[] HashValue { get => throw null; set => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.IIdentityPermissionFactory` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IIdentityPermissionFactory + { + System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence); + } + + // Generated from `System.Security.Policy.IMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IMembershipCondition : System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + bool Check(System.Security.Policy.Evidence evidence); + System.Security.Policy.IMembershipCondition Copy(); + bool Equals(object obj); + string ToString(); + } + + // Generated from `System.Security.Policy.NetCodeGroup` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NetCodeGroup : System.Security.Policy.CodeGroup + { + public static string AbsentOriginScheme; + public void AddConnectAccess(string originScheme, System.Security.Policy.CodeConnectAccess connectAccess) => throw null; + public static string AnyOtherOriginScheme; + public override string AttributeString { get => throw null; } + public override System.Security.Policy.CodeGroup Copy() => throw null; + protected override void CreateXml(System.Security.SecurityElement element, System.Security.Policy.PolicyLevel level) => throw null; + public override bool Equals(object o) => throw null; + public System.Collections.DictionaryEntry[] GetConnectAccessRules() => throw null; + public override int GetHashCode() => throw null; + public override string MergeLogic { get => throw null; } + public NetCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition) : base(default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement)) => throw null; + protected override void ParseXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public override string PermissionSetName { get => throw null; } + public void ResetConnectAccess() => throw null; + public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) => throw null; + public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) => throw null; + } + + // Generated from `System.Security.Policy.PermissionRequestEvidence` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PermissionRequestEvidence : System.Security.Policy.EvidenceBase + { + public System.Security.Policy.PermissionRequestEvidence Copy() => throw null; + public System.Security.PermissionSet DeniedPermissions { get => throw null; } + public System.Security.PermissionSet OptionalPermissions { get => throw null; } + public PermissionRequestEvidence(System.Security.PermissionSet request, System.Security.PermissionSet optional, System.Security.PermissionSet denied) => throw null; + public System.Security.PermissionSet RequestedPermissions { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.PolicyException` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PolicyException : System.SystemException + { + public PolicyException(string message, System.Exception exception) => throw null; + public PolicyException(string message) => throw null; + public PolicyException() => throw null; + protected PolicyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Security.Policy.PolicyLevel` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PolicyLevel + { + public void AddFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) => throw null; + public void AddFullTrustAssembly(System.Security.Policy.StrongName sn) => throw null; + public void AddNamedPermissionSet(System.Security.NamedPermissionSet permSet) => throw null; + public System.Security.NamedPermissionSet ChangeNamedPermissionSet(string name, System.Security.PermissionSet pSet) => throw null; + public static System.Security.Policy.PolicyLevel CreateAppDomainLevel() => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public System.Collections.IList FullTrustAssemblies { get => throw null; } + public System.Security.NamedPermissionSet GetNamedPermissionSet(string name) => throw null; + public string Label { get => throw null; } + public System.Collections.IList NamedPermissionSets { get => throw null; } + public void Recover() => throw null; + public void RemoveFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) => throw null; + public void RemoveFullTrustAssembly(System.Security.Policy.StrongName sn) => throw null; + public System.Security.NamedPermissionSet RemoveNamedPermissionSet(string name) => throw null; + public System.Security.NamedPermissionSet RemoveNamedPermissionSet(System.Security.NamedPermissionSet permSet) => throw null; + public void Reset() => throw null; + public System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.CodeGroup RootCodeGroup { get => throw null; set => throw null; } + public string StoreLocation { get => throw null; } + public System.Security.SecurityElement ToXml() => throw null; + public System.Security.PolicyLevelType Type { get => throw null; } + } + + // Generated from `System.Security.Policy.PolicyStatement` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PolicyStatement : System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public string AttributeString { get => throw null; } + public System.Security.Policy.PolicyStatementAttribute Attributes { get => throw null; set => throw null; } + public System.Security.Policy.PolicyStatement Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement et, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement et) => throw null; + public override int GetHashCode() => throw null; + public System.Security.PermissionSet PermissionSet { get => throw null; set => throw null; } + public PolicyStatement(System.Security.PermissionSet permSet, System.Security.Policy.PolicyStatementAttribute attributes) => throw null; + public PolicyStatement(System.Security.PermissionSet permSet) => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.PolicyStatementAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum PolicyStatementAttribute + { + All, + Exclusive, + LevelFinal, + Nothing, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Policy.Publisher` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Publisher : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public System.Security.Cryptography.X509Certificates.X509Certificate Certificate { get => throw null; } + public object Copy() => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public Publisher(System.Security.Cryptography.X509Certificates.X509Certificate cert) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.PublisherMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PublisherMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public System.Security.Cryptography.X509Certificates.X509Certificate Certificate { get => throw null; set => throw null; } + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public PublisherMembershipCondition(System.Security.Cryptography.X509Certificates.X509Certificate certificate) => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.Site` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public object Copy() => throw null; + public static System.Security.Policy.Site CreateFromUrl(string url) => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + public Site(string name) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Security.Policy.SiteMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SiteMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public string Site { get => throw null; set => throw null; } + public SiteMembershipCondition(string site) => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + } + + // Generated from `System.Security.Policy.StrongName` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public object Copy() => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + public System.Security.Permissions.StrongNamePublicKeyBlob PublicKey { get => throw null; } + public StrongName(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version) => throw null; + public override string ToString() => throw null; + public System.Version Version { get => throw null; } + } + + // Generated from `System.Security.Policy.StrongNameMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StrongNameMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; set => throw null; } + public System.Security.Permissions.StrongNamePublicKeyBlob PublicKey { get => throw null; set => throw null; } + public StrongNameMembershipCondition(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version) => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + public System.Version Version { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Policy.TrustManagerContext` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TrustManagerContext + { + public virtual bool IgnorePersistedDecision { get => throw null; set => throw null; } + public virtual bool KeepAlive { get => throw null; set => throw null; } + public virtual bool NoPrompt { get => throw null; set => throw null; } + public virtual bool Persist { get => throw null; set => throw null; } + public virtual System.ApplicationIdentity PreviousApplicationIdentity { get => throw null; set => throw null; } + public TrustManagerContext(System.Security.Policy.TrustManagerUIContext uiContext) => throw null; + public TrustManagerContext() => throw null; + public virtual System.Security.Policy.TrustManagerUIContext UIContext { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Policy.TrustManagerUIContext` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TrustManagerUIContext + { + Install, + Run, + // Stub generator skipped constructor + Upgrade, + } + + // Generated from `System.Security.Policy.UnionCodeGroup` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UnionCodeGroup : System.Security.Policy.CodeGroup + { + public override System.Security.Policy.CodeGroup Copy() => throw null; + public override string MergeLogic { get => throw null; } + public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) => throw null; + public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) => throw null; + public UnionCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Policy.PolicyStatement policy) : base(default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement)) => throw null; + } + + // Generated from `System.Security.Policy.Url` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Url : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public object Copy() => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public Url(string name) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Security.Policy.UrlMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UrlMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + public string Url { get => throw null; set => throw null; } + public UrlMembershipCondition(string url) => throw null; + } + + // Generated from `System.Security.Policy.Zone` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory + { + public object Copy() => throw null; + public static System.Security.Policy.Zone CreateFromUrl(string url) => throw null; + public System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public System.Security.SecurityZone SecurityZone { get => throw null; } + public override string ToString() => throw null; + public Zone(System.Security.SecurityZone zone) => throw null; + } + + // Generated from `System.Security.Policy.ZoneMembershipCondition` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ZoneMembershipCondition : System.Security.Policy.IMembershipCondition, System.Security.ISecurityPolicyEncodable, System.Security.ISecurityEncodable + { + public bool Check(System.Security.Policy.Evidence evidence) => throw null; + public System.Security.Policy.IMembershipCondition Copy() => throw null; + public override bool Equals(object o) => throw null; + public void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level) => throw null; + public void FromXml(System.Security.SecurityElement e) => throw null; + public override int GetHashCode() => throw null; + public System.Security.SecurityZone SecurityZone { get => throw null; set => throw null; } + public override string ToString() => throw null; + public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) => throw null; + public System.Security.SecurityElement ToXml() => throw null; + public ZoneMembershipCondition(System.Security.SecurityZone zone) => throw null; + } + + } + } + namespace ServiceProcess + { + // Generated from `System.ServiceProcess.ServiceControllerPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServiceControllerPermission : System.Security.Permissions.ResourcePermissionBase + { + public System.ServiceProcess.ServiceControllerPermissionEntryCollection PermissionEntries { get => throw null; } + public ServiceControllerPermission(System.ServiceProcess.ServiceControllerPermissionEntry[] permissionAccessEntries) => throw null; + public ServiceControllerPermission(System.ServiceProcess.ServiceControllerPermissionAccess permissionAccess, string machineName, string serviceName) => throw null; + public ServiceControllerPermission(System.Security.Permissions.PermissionState state) => throw null; + public ServiceControllerPermission() => throw null; + } + + // Generated from `System.ServiceProcess.ServiceControllerPermissionAccess` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum ServiceControllerPermissionAccess + { + Browse, + Control, + None, + // Stub generator skipped constructor + } + + // Generated from `System.ServiceProcess.ServiceControllerPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServiceControllerPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public string MachineName { get => throw null; set => throw null; } + public System.ServiceProcess.ServiceControllerPermissionAccess PermissionAccess { get => throw null; set => throw null; } + public ServiceControllerPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public string ServiceName { get => throw null; set => throw null; } + } + + // Generated from `System.ServiceProcess.ServiceControllerPermissionEntry` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServiceControllerPermissionEntry + { + public string MachineName { get => throw null; } + public System.ServiceProcess.ServiceControllerPermissionAccess PermissionAccess { get => throw null; } + public ServiceControllerPermissionEntry(System.ServiceProcess.ServiceControllerPermissionAccess permissionAccess, string machineName, string serviceName) => throw null; + public ServiceControllerPermissionEntry() => throw null; + public string ServiceName { get => throw null; } + } + + // Generated from `System.ServiceProcess.ServiceControllerPermissionEntryCollection` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServiceControllerPermissionEntryCollection : System.Collections.CollectionBase + { + public int Add(System.ServiceProcess.ServiceControllerPermissionEntry value) => throw null; + public void AddRange(System.ServiceProcess.ServiceControllerPermissionEntry[] value) => throw null; + public void AddRange(System.ServiceProcess.ServiceControllerPermissionEntryCollection value) => throw null; + public bool Contains(System.ServiceProcess.ServiceControllerPermissionEntry value) => throw null; + public void CopyTo(System.ServiceProcess.ServiceControllerPermissionEntry[] array, int index) => throw null; + public int IndexOf(System.ServiceProcess.ServiceControllerPermissionEntry value) => throw null; + public void Insert(int index, System.ServiceProcess.ServiceControllerPermissionEntry value) => throw null; + public System.ServiceProcess.ServiceControllerPermissionEntry this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object value) => throw null; + protected override void OnRemove(int index, object value) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + public void Remove(System.ServiceProcess.ServiceControllerPermissionEntry value) => throw null; + } + + } + namespace Transactions + { + // Generated from `System.Transactions.DistributedTransactionPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DistributedTransactionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public override System.Security.IPermission Copy() => throw null; + public DistributedTransactionPermission(System.Security.Permissions.PermissionState state) => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Transactions.DistributedTransactionPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DistributedTransactionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public override System.Security.IPermission CreatePermission() => throw null; + public DistributedTransactionPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool Unrestricted { get => throw null; set => throw null; } + } + + } + namespace Web + { + // Generated from `System.Web.AspNetHostingPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AspNetHostingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public AspNetHostingPermission(System.Web.AspNetHostingPermissionLevel level) => throw null; + public AspNetHostingPermission(System.Security.Permissions.PermissionState state) => throw null; + public override System.Security.IPermission Copy() => throw null; + public override void FromXml(System.Security.SecurityElement securityElement) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public System.Web.AspNetHostingPermissionLevel Level { get => throw null; set => throw null; } + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission target) => throw null; + } + + // Generated from `System.Web.AspNetHostingPermissionAttribute` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AspNetHostingPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public AspNetHostingPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public override System.Security.IPermission CreatePermission() => throw null; + public System.Web.AspNetHostingPermissionLevel Level { get => throw null; set => throw null; } + } + + // Generated from `System.Web.AspNetHostingPermissionLevel` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum AspNetHostingPermissionLevel + { + // Stub generator skipped constructor + High, + Low, + Medium, + Minimal, + None, + Unrestricted, + } + + } + namespace Xaml + { + namespace Permissions + { + // Generated from `System.Xaml.Permissions.XamlLoadPermission` in `System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XamlLoadPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission + { + public System.Collections.Generic.IList AllowedAccess { get => throw null; } + public override System.Security.IPermission Copy() => throw null; + public override bool Equals(object obj) => throw null; + public override void FromXml(System.Security.SecurityElement elem) => throw null; + public override int GetHashCode() => throw null; + public bool Includes(System.Xaml.Permissions.XamlAccessLevel requestedAccess) => throw null; + public override System.Security.IPermission Intersect(System.Security.IPermission target) => throw null; + public override bool IsSubsetOf(System.Security.IPermission target) => throw null; + public bool IsUnrestricted() => throw null; + public override System.Security.SecurityElement ToXml() => throw null; + public override System.Security.IPermission Union(System.Security.IPermission other) => throw null; + public XamlLoadPermission(System.Xaml.Permissions.XamlAccessLevel allowedAccess) => throw null; + public XamlLoadPermission(System.Security.Permissions.PermissionState state) => throw null; + public XamlLoadPermission(System.Collections.Generic.IEnumerable allowedAccess) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs new file mode 100644 index 000000000000..0db59ed1d8f3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs @@ -0,0 +1,329 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeAccessTokenHandle` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeAccessTokenHandle : System.Runtime.InteropServices.SafeHandle + { + public static Microsoft.Win32.SafeHandles.SafeAccessTokenHandle InvalidHandle { get => throw null; } + public override bool IsInvalid { get => throw null; } + protected override bool ReleaseHandle() => throw null; + public SafeAccessTokenHandle(System.IntPtr handle) : base(default(System.IntPtr), default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Security + { + namespace Principal + { + // Generated from `System.Security.Principal.IdentityNotMappedException` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IdentityNotMappedException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public IdentityNotMappedException(string message, System.Exception inner) => throw null; + public IdentityNotMappedException(string message) => throw null; + public IdentityNotMappedException() => throw null; + public System.Security.Principal.IdentityReferenceCollection UnmappedIdentities { get => throw null; } + } + + // Generated from `System.Security.Principal.IdentityReference` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IdentityReference + { + public static bool operator !=(System.Security.Principal.IdentityReference left, System.Security.Principal.IdentityReference right) => throw null; + public static bool operator ==(System.Security.Principal.IdentityReference left, System.Security.Principal.IdentityReference right) => throw null; + public abstract override bool Equals(object o); + public abstract override int GetHashCode(); + internal IdentityReference() => throw null; + public abstract bool IsValidTargetType(System.Type targetType); + public abstract override string ToString(); + public abstract System.Security.Principal.IdentityReference Translate(System.Type targetType); + public abstract string Value { get; } + } + + // Generated from `System.Security.Principal.IdentityReferenceCollection` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IdentityReferenceCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(System.Security.Principal.IdentityReference identity) => throw null; + public void Clear() => throw null; + public bool Contains(System.Security.Principal.IdentityReference identity) => throw null; + public void CopyTo(System.Security.Principal.IdentityReference[] array, int offset) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public IdentityReferenceCollection(int capacity) => throw null; + public IdentityReferenceCollection() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public System.Security.Principal.IdentityReference this[int index] { get => throw null; set => throw null; } + public bool Remove(System.Security.Principal.IdentityReference identity) => throw null; + public System.Security.Principal.IdentityReferenceCollection Translate(System.Type targetType, bool forceSuccess) => throw null; + public System.Security.Principal.IdentityReferenceCollection Translate(System.Type targetType) => throw null; + } + + // Generated from `System.Security.Principal.NTAccount` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NTAccount : System.Security.Principal.IdentityReference + { + public static bool operator !=(System.Security.Principal.NTAccount left, System.Security.Principal.NTAccount right) => throw null; + public static bool operator ==(System.Security.Principal.NTAccount left, System.Security.Principal.NTAccount right) => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public override bool IsValidTargetType(System.Type targetType) => throw null; + public NTAccount(string name) => throw null; + public NTAccount(string domainName, string accountName) => throw null; + public override string ToString() => throw null; + public override System.Security.Principal.IdentityReference Translate(System.Type targetType) => throw null; + public override string Value { get => throw null; } + } + + // Generated from `System.Security.Principal.SecurityIdentifier` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityIdentifier : System.Security.Principal.IdentityReference, System.IComparable + { + public static bool operator !=(System.Security.Principal.SecurityIdentifier left, System.Security.Principal.SecurityIdentifier right) => throw null; + public static bool operator ==(System.Security.Principal.SecurityIdentifier left, System.Security.Principal.SecurityIdentifier right) => throw null; + public System.Security.Principal.SecurityIdentifier AccountDomainSid { get => throw null; } + public int BinaryLength { get => throw null; } + public int CompareTo(System.Security.Principal.SecurityIdentifier sid) => throw null; + public override bool Equals(object o) => throw null; + public bool Equals(System.Security.Principal.SecurityIdentifier sid) => throw null; + public void GetBinaryForm(System.Byte[] binaryForm, int offset) => throw null; + public override int GetHashCode() => throw null; + public bool IsAccountSid() => throw null; + public bool IsEqualDomainSid(System.Security.Principal.SecurityIdentifier sid) => throw null; + public override bool IsValidTargetType(System.Type targetType) => throw null; + public bool IsWellKnown(System.Security.Principal.WellKnownSidType type) => throw null; + public static int MaxBinaryLength; + public static int MinBinaryLength; + public SecurityIdentifier(string sddlForm) => throw null; + public SecurityIdentifier(System.Security.Principal.WellKnownSidType sidType, System.Security.Principal.SecurityIdentifier domainSid) => throw null; + public SecurityIdentifier(System.IntPtr binaryForm) => throw null; + public SecurityIdentifier(System.Byte[] binaryForm, int offset) => throw null; + public override string ToString() => throw null; + public override System.Security.Principal.IdentityReference Translate(System.Type targetType) => throw null; + public override string Value { get => throw null; } + } + + // Generated from `System.Security.Principal.TokenAccessLevels` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TokenAccessLevels + { + AdjustDefault, + AdjustGroups, + AdjustPrivileges, + AdjustSessionId, + AllAccess, + AssignPrimary, + Duplicate, + Impersonate, + MaximumAllowed, + Query, + QuerySource, + Read, + // Stub generator skipped constructor + Write, + } + + // Generated from `System.Security.Principal.WellKnownSidType` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WellKnownSidType + { + AccountAdministratorSid, + AccountCertAdminsSid, + AccountComputersSid, + AccountControllersSid, + AccountDomainAdminsSid, + AccountDomainGuestsSid, + AccountDomainUsersSid, + AccountEnterpriseAdminsSid, + AccountGuestSid, + AccountKrbtgtSid, + AccountPolicyAdminsSid, + AccountRasAndIasServersSid, + AccountSchemaAdminsSid, + AnonymousSid, + AuthenticatedUserSid, + BatchSid, + BuiltinAccountOperatorsSid, + BuiltinAdministratorsSid, + BuiltinAuthorizationAccessSid, + BuiltinBackupOperatorsSid, + BuiltinDomainSid, + BuiltinGuestsSid, + BuiltinIncomingForestTrustBuildersSid, + BuiltinNetworkConfigurationOperatorsSid, + BuiltinPerformanceLoggingUsersSid, + BuiltinPerformanceMonitoringUsersSid, + BuiltinPowerUsersSid, + BuiltinPreWindows2000CompatibleAccessSid, + BuiltinPrintOperatorsSid, + BuiltinRemoteDesktopUsersSid, + BuiltinReplicatorSid, + BuiltinSystemOperatorsSid, + BuiltinUsersSid, + CreatorGroupServerSid, + CreatorGroupSid, + CreatorOwnerServerSid, + CreatorOwnerSid, + DialupSid, + DigestAuthenticationSid, + EnterpriseControllersSid, + InteractiveSid, + LocalServiceSid, + LocalSid, + LocalSystemSid, + LogonIdsSid, + MaxDefined, + NTAuthoritySid, + NetworkServiceSid, + NetworkSid, + NtlmAuthenticationSid, + NullSid, + OtherOrganizationSid, + ProxySid, + RemoteLogonIdSid, + RestrictedCodeSid, + SChannelAuthenticationSid, + SelfSid, + ServiceSid, + TerminalServerSid, + ThisOrganizationSid, + // Stub generator skipped constructor + WinAccountReadonlyControllersSid, + WinApplicationPackageAuthoritySid, + WinBuiltinAnyPackageSid, + WinBuiltinCertSvcDComAccessGroup, + WinBuiltinCryptoOperatorsSid, + WinBuiltinDCOMUsersSid, + WinBuiltinEventLogReadersGroup, + WinBuiltinIUsersSid, + WinBuiltinTerminalServerLicenseServersSid, + WinCacheablePrincipalsGroupSid, + WinCapabilityDocumentsLibrarySid, + WinCapabilityEnterpriseAuthenticationSid, + WinCapabilityInternetClientServerSid, + WinCapabilityInternetClientSid, + WinCapabilityMusicLibrarySid, + WinCapabilityPicturesLibrarySid, + WinCapabilityPrivateNetworkClientServerSid, + WinCapabilityRemovableStorageSid, + WinCapabilitySharedUserCertificatesSid, + WinCapabilityVideosLibrarySid, + WinConsoleLogonSid, + WinCreatorOwnerRightsSid, + WinEnterpriseReadonlyControllersSid, + WinHighLabelSid, + WinIUserSid, + WinLocalLogonSid, + WinLowLabelSid, + WinMediumLabelSid, + WinMediumPlusLabelSid, + WinNewEnterpriseReadonlyControllersSid, + WinNonCacheablePrincipalsGroupSid, + WinSystemLabelSid, + WinThisOrganizationCertificateSid, + WinUntrustedLabelSid, + WinWriteRestrictedCodeSid, + WorldSid, + } + + // Generated from `System.Security.Principal.WindowsAccountType` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WindowsAccountType + { + Anonymous, + Guest, + Normal, + System, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Principal.WindowsBuiltInRole` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WindowsBuiltInRole + { + AccountOperator, + Administrator, + BackupOperator, + Guest, + PowerUser, + PrintOperator, + Replicator, + SystemOperator, + User, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Principal.WindowsIdentity` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WindowsIdentity : System.Security.Claims.ClaimsIdentity, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable + { + public Microsoft.Win32.SafeHandles.SafeAccessTokenHandle AccessToken { get => throw null; } + public override string AuthenticationType { get => throw null; } + public override System.Collections.Generic.IEnumerable Claims { get => throw null; } + public override System.Security.Claims.ClaimsIdentity Clone() => throw null; + public const string DefaultIssuer = default; + public virtual System.Collections.Generic.IEnumerable DeviceClaims { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public static System.Security.Principal.WindowsIdentity GetAnonymous() => throw null; + public static System.Security.Principal.WindowsIdentity GetCurrent(bool ifImpersonating) => throw null; + public static System.Security.Principal.WindowsIdentity GetCurrent(System.Security.Principal.TokenAccessLevels desiredAccess) => throw null; + public static System.Security.Principal.WindowsIdentity GetCurrent() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Security.Principal.IdentityReferenceCollection Groups { get => throw null; } + public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get => throw null; } + public virtual bool IsAnonymous { get => throw null; } + public override bool IsAuthenticated { get => throw null; } + public virtual bool IsGuest { get => throw null; } + public virtual bool IsSystem { get => throw null; } + public override string Name { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public System.Security.Principal.SecurityIdentifier Owner { get => throw null; } + public static void RunImpersonated(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, System.Action action) => throw null; + public static T RunImpersonated(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, System.Func func) => throw null; + public static System.Threading.Tasks.Task RunImpersonatedAsync(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, System.Func> func) => throw null; + public static System.Threading.Tasks.Task RunImpersonatedAsync(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, System.Func func) => throw null; + public virtual System.IntPtr Token { get => throw null; } + public System.Security.Principal.SecurityIdentifier User { get => throw null; } + public virtual System.Collections.Generic.IEnumerable UserClaims { get => throw null; } + public WindowsIdentity(string sUserPrincipalName) => throw null; + public WindowsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) => throw null; + public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) => throw null; + public WindowsIdentity(System.IntPtr userToken, string type) => throw null; + public WindowsIdentity(System.IntPtr userToken) => throw null; + protected WindowsIdentity(System.Security.Principal.WindowsIdentity identity) => throw null; + } + + // Generated from `System.Security.Principal.WindowsPrincipal` in `System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WindowsPrincipal : System.Security.Claims.ClaimsPrincipal + { + public virtual System.Collections.Generic.IEnumerable DeviceClaims { get => throw null; } + public override System.Security.Principal.IIdentity Identity { get => throw null; } + public virtual bool IsInRole(int rid) => throw null; + public virtual bool IsInRole(System.Security.Principal.WindowsBuiltInRole role) => throw null; + public virtual bool IsInRole(System.Security.Principal.SecurityIdentifier sid) => throw null; + public override bool IsInRole(string role) => throw null; + public virtual System.Collections.Generic.IEnumerable UserClaims { get => throw null; } + public WindowsPrincipal(System.Security.Principal.WindowsIdentity ntIdentity) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs new file mode 100644 index 000000000000..fcaa70071aa1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs @@ -0,0 +1,109 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Media + { + // Generated from `System.Media.SoundPlayer` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SoundPlayer : System.ComponentModel.Component, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool IsLoadCompleted { get => throw null; } + public void Load() => throw null; + public void LoadAsync() => throw null; + public event System.ComponentModel.AsyncCompletedEventHandler LoadCompleted; + public int LoadTimeout { get => throw null; set => throw null; } + protected virtual void OnLoadCompleted(System.ComponentModel.AsyncCompletedEventArgs e) => throw null; + protected virtual void OnSoundLocationChanged(System.EventArgs e) => throw null; + protected virtual void OnStreamChanged(System.EventArgs e) => throw null; + public void Play() => throw null; + public void PlayLooping() => throw null; + public void PlaySync() => throw null; + public string SoundLocation { get => throw null; set => throw null; } + public event System.EventHandler SoundLocationChanged; + public SoundPlayer(string soundLocation) => throw null; + public SoundPlayer(System.IO.Stream stream) => throw null; + public SoundPlayer() => throw null; + protected SoundPlayer(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) => throw null; + public void Stop() => throw null; + public System.IO.Stream Stream { get => throw null; set => throw null; } + public event System.EventHandler StreamChanged; + public object Tag { get => throw null; set => throw null; } + } + + // Generated from `System.Media.SystemSound` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SystemSound + { + public void Play() => throw null; + } + + // Generated from `System.Media.SystemSounds` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class SystemSounds + { + public static System.Media.SystemSound Asterisk { get => throw null; } + public static System.Media.SystemSound Beep { get => throw null; } + public static System.Media.SystemSound Exclamation { get => throw null; } + public static System.Media.SystemSound Hand { get => throw null; } + public static System.Media.SystemSound Question { get => throw null; } + } + + } + namespace Runtime + { + namespace Versioning + { + /* Duplicate type 'OSPlatformAttribute' is not stubbed in this assembly 'System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'SupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'TargetPlatformAttribute' is not stubbed in this assembly 'System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'UnsupportedOSPlatformAttribute' is not stubbed in this assembly 'System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } + namespace Security + { + namespace Cryptography + { + namespace X509Certificates + { + // Generated from `System.Security.Cryptography.X509Certificates.X509Certificate2UI` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class X509Certificate2UI + { + public static void DisplayCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.IntPtr hwndParent) => throw null; + public static void DisplayCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate2Collection SelectFromCollection(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates, string title, string message, System.Security.Cryptography.X509Certificates.X509SelectionFlag selectionFlag, System.IntPtr hwndParent) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate2Collection SelectFromCollection(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates, string title, string message, System.Security.Cryptography.X509Certificates.X509SelectionFlag selectionFlag) => throw null; + public X509Certificate2UI() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509SelectionFlag` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum X509SelectionFlag + { + MultiSelection, + SingleSelection, + // Stub generator skipped constructor + } + + } + } + } + namespace Xaml + { + namespace Permissions + { + // Generated from `System.Xaml.Permissions.XamlAccessLevel` in `System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class XamlAccessLevel + { + public static System.Xaml.Permissions.XamlAccessLevel AssemblyAccessTo(System.Reflection.AssemblyName assemblyName) => throw null; + public static System.Xaml.Permissions.XamlAccessLevel AssemblyAccessTo(System.Reflection.Assembly assembly) => throw null; + public System.Reflection.AssemblyName AssemblyAccessToAssemblyName { get => throw null; } + public static System.Xaml.Permissions.XamlAccessLevel PrivateAccessTo(string assemblyQualifiedTypeName) => throw null; + public static System.Xaml.Permissions.XamlAccessLevel PrivateAccessTo(System.Type type) => throw null; + public string PrivateAccessToTypeName { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs new file mode 100644 index 000000000000..17345c5338b9 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs @@ -0,0 +1,82 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace CSharp + { + namespace RuntimeBinder + { + // Generated from `Microsoft.CSharp.RuntimeBinder.Binder` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Binder + { + public static System.Runtime.CompilerServices.CallSiteBinder BinaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder Convert(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type type, System.Type context) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder GetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder Invoke(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder InvokeConstructor(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Collections.Generic.IEnumerable typeArguments, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder IsEvent(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder SetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, string name, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + public static System.Runtime.CompilerServices.CallSiteBinder UnaryOperation(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags flags, System.Linq.Expressions.ExpressionType operation, System.Type context, System.Collections.Generic.IEnumerable argumentInfo) => throw null; + } + + // Generated from `Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CSharpArgumentInfo + { + public static Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags flags, string name) => throw null; + } + + // Generated from `Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CSharpArgumentInfoFlags + { + // Stub generator skipped constructor + Constant, + IsOut, + IsRef, + IsStaticType, + NamedArgument, + None, + UseCompileTimeType, + } + + // Generated from `Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CSharpBinderFlags + { + BinaryOperationLogical, + // Stub generator skipped constructor + CheckedContext, + ConvertArrayIndex, + ConvertExplicit, + InvokeSimpleName, + InvokeSpecialName, + None, + ResultDiscarded, + ResultIndexed, + ValueFromCompoundAssignment, + } + + // Generated from `Microsoft.CSharp.RuntimeBinder.RuntimeBinderException` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuntimeBinderException : System.Exception + { + public RuntimeBinderException(string message, System.Exception innerException) => throw null; + public RuntimeBinderException(string message) => throw null; + public RuntimeBinderException() => throw null; + protected RuntimeBinderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException` in `Microsoft.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuntimeBinderInternalCompilerException : System.Exception + { + public RuntimeBinderInternalCompilerException(string message, System.Exception innerException) => throw null; + public RuntimeBinderInternalCompilerException(string message) => throw null; + public RuntimeBinderInternalCompilerException() => throw null; + protected RuntimeBinderInternalCompilerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj new file mode 100644 index 000000000000..d00db04fb4f1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj @@ -0,0 +1,9 @@ + + + net5.0 + true + bin\ + false + + + diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs new file mode 100644 index 000000000000..2f4e01abc2ab --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs @@ -0,0 +1,1293 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace VisualBasic + { + // Generated from `Microsoft.VisualBasic.AppWinStyle` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AppWinStyle + { + // Stub generator skipped constructor + Hide, + MaximizedFocus, + MinimizedFocus, + MinimizedNoFocus, + NormalFocus, + NormalNoFocus, + } + + // Generated from `Microsoft.VisualBasic.CallType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CallType + { + // Stub generator skipped constructor + Get, + Let, + Method, + Set, + } + + // Generated from `Microsoft.VisualBasic.Collection` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Collection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(object Item, string Key = default(string), object Before = default(object), object After = default(object)) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + public void Clear() => throw null; + public Collection() => throw null; + public bool Contains(string Key) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public object this[string Key] { get => throw null; } + public object this[object Index] { get => throw null; } + public object this[int Index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public void Remove(string Key) => throw null; + public void Remove(int Index) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `Microsoft.VisualBasic.ComClassAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComClassAttribute : System.Attribute + { + public string ClassID { get => throw null; } + public ComClassAttribute(string _ClassID, string _InterfaceID, string _EventId) => throw null; + public ComClassAttribute(string _ClassID, string _InterfaceID) => throw null; + public ComClassAttribute(string _ClassID) => throw null; + public ComClassAttribute() => throw null; + public string EventID { get => throw null; } + public string InterfaceID { get => throw null; } + public bool InterfaceShadows { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.VisualBasic.CompareMethod` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CompareMethod + { + Binary, + // Stub generator skipped constructor + Text, + } + + // Generated from `Microsoft.VisualBasic.Constants` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Constants + { + public const Microsoft.VisualBasic.MsgBoxResult vbAbort = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbAbortRetryIgnore = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbApplicationModal = default; + public const Microsoft.VisualBasic.FileAttribute vbArchive = default; + public const Microsoft.VisualBasic.VariantType vbArray = default; + public const string vbBack = default; + public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = default; + public const Microsoft.VisualBasic.VariantType vbBoolean = default; + public const Microsoft.VisualBasic.VariantType vbByte = default; + public const Microsoft.VisualBasic.MsgBoxResult vbCancel = default; + public const string vbCr = default; + public const string vbCrLf = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbCritical = default; + public const Microsoft.VisualBasic.VariantType vbCurrency = default; + public const Microsoft.VisualBasic.VariantType vbDate = default; + public const Microsoft.VisualBasic.VariantType vbDecimal = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton1 = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton2 = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton3 = default; + public const Microsoft.VisualBasic.FileAttribute vbDirectory = default; + public const Microsoft.VisualBasic.VariantType vbDouble = default; + public const Microsoft.VisualBasic.VariantType vbEmpty = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbExclamation = default; + public const Microsoft.VisualBasic.TriState vbFalse = default; + public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstFourDays = default; + public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstFullWeek = default; + public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstJan1 = default; + public const string vbFormFeed = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbFriday = default; + public const Microsoft.VisualBasic.DateFormat vbGeneralDate = default; + public const Microsoft.VisualBasic.CallType vbGet = default; + public const Microsoft.VisualBasic.FileAttribute vbHidden = default; + public const Microsoft.VisualBasic.AppWinStyle vbHide = default; + public const Microsoft.VisualBasic.VbStrConv vbHiragana = default; + public const Microsoft.VisualBasic.MsgBoxResult vbIgnore = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbInformation = default; + public const Microsoft.VisualBasic.VariantType vbInteger = default; + public const Microsoft.VisualBasic.VbStrConv vbKatakana = default; + public const Microsoft.VisualBasic.CallType vbLet = default; + public const string vbLf = default; + public const Microsoft.VisualBasic.VbStrConv vbLinguisticCasing = default; + public const Microsoft.VisualBasic.VariantType vbLong = default; + public const Microsoft.VisualBasic.DateFormat vbLongDate = default; + public const Microsoft.VisualBasic.DateFormat vbLongTime = default; + public const Microsoft.VisualBasic.VbStrConv vbLowerCase = default; + public const Microsoft.VisualBasic.AppWinStyle vbMaximizedFocus = default; + public const Microsoft.VisualBasic.CallType vbMethod = default; + public const Microsoft.VisualBasic.AppWinStyle vbMinimizedFocus = default; + public const Microsoft.VisualBasic.AppWinStyle vbMinimizedNoFocus = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbMonday = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxHelp = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRight = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRtlReading = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxSetForeground = default; + public const Microsoft.VisualBasic.VbStrConv vbNarrow = default; + public const string vbNewLine = default; + public const Microsoft.VisualBasic.MsgBoxResult vbNo = default; + public const Microsoft.VisualBasic.FileAttribute vbNormal = default; + public const Microsoft.VisualBasic.AppWinStyle vbNormalFocus = default; + public const Microsoft.VisualBasic.AppWinStyle vbNormalNoFocus = default; + public const Microsoft.VisualBasic.VariantType vbNull = default; + public const string vbNullChar = default; + public const string vbNullString = default; + public const Microsoft.VisualBasic.MsgBoxResult vbOK = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbOKCancel = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbOKOnly = default; + public const Microsoft.VisualBasic.VariantType vbObject = default; + public const int vbObjectError = default; + public const Microsoft.VisualBasic.VbStrConv vbProperCase = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbQuestion = default; + public const Microsoft.VisualBasic.FileAttribute vbReadOnly = default; + public const Microsoft.VisualBasic.MsgBoxResult vbRetry = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbRetryCancel = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbSaturday = default; + public const Microsoft.VisualBasic.CallType vbSet = default; + public const Microsoft.VisualBasic.DateFormat vbShortDate = default; + public const Microsoft.VisualBasic.DateFormat vbShortTime = default; + public const Microsoft.VisualBasic.VbStrConv vbSimplifiedChinese = default; + public const Microsoft.VisualBasic.VariantType vbSingle = default; + public const Microsoft.VisualBasic.VariantType vbString = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbSunday = default; + public const Microsoft.VisualBasic.FileAttribute vbSystem = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbSystemModal = default; + public const string vbTab = default; + public const Microsoft.VisualBasic.CompareMethod vbTextCompare = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbThursday = default; + public const Microsoft.VisualBasic.VbStrConv vbTraditionalChinese = default; + public const Microsoft.VisualBasic.TriState vbTrue = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbTuesday = default; + public const Microsoft.VisualBasic.VbStrConv vbUpperCase = default; + public const Microsoft.VisualBasic.TriState vbUseDefault = default; + public const Microsoft.VisualBasic.FirstWeekOfYear vbUseSystem = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbUseSystemDayOfWeek = default; + public const Microsoft.VisualBasic.VariantType vbUserDefinedType = default; + public const Microsoft.VisualBasic.VariantType vbVariant = default; + public const string vbVerticalTab = default; + public const Microsoft.VisualBasic.FileAttribute vbVolume = default; + public const Microsoft.VisualBasic.FirstDayOfWeek vbWednesday = default; + public const Microsoft.VisualBasic.VbStrConv vbWide = default; + public const Microsoft.VisualBasic.MsgBoxResult vbYes = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbYesNo = default; + public const Microsoft.VisualBasic.MsgBoxStyle vbYesNoCancel = default; + } + + // Generated from `Microsoft.VisualBasic.ControlChars` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ControlChars + { + public const System.Char Back = default; + public ControlChars() => throw null; + public const System.Char Cr = default; + public const string CrLf = default; + public const System.Char FormFeed = default; + public const System.Char Lf = default; + public const string NewLine = default; + public const System.Char NullChar = default; + public const System.Char Quote = default; + public const System.Char Tab = default; + public const System.Char VerticalTab = default; + } + + // Generated from `Microsoft.VisualBasic.Conversion` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Conversion + { + public static object CTypeDynamic(object Expression, System.Type TargetType) => throw null; + public static TargetType CTypeDynamic(object Expression) => throw null; + public static string ErrorToString(int ErrorNumber) => throw null; + public static string ErrorToString() => throw null; + public static object Fix(object Number) => throw null; + public static int Fix(int Number) => throw null; + public static float Fix(float Number) => throw null; + public static double Fix(double Number) => throw null; + public static System.Int64 Fix(System.Int64 Number) => throw null; + public static System.Int16 Fix(System.Int16 Number) => throw null; + public static System.Decimal Fix(System.Decimal Number) => throw null; + public static string Hex(object Number) => throw null; + public static string Hex(int Number) => throw null; + public static string Hex(System.UInt64 Number) => throw null; + public static string Hex(System.UInt32 Number) => throw null; + public static string Hex(System.UInt16 Number) => throw null; + public static string Hex(System.SByte Number) => throw null; + public static string Hex(System.Int64 Number) => throw null; + public static string Hex(System.Int16 Number) => throw null; + public static string Hex(System.Byte Number) => throw null; + public static object Int(object Number) => throw null; + public static int Int(int Number) => throw null; + public static float Int(float Number) => throw null; + public static double Int(double Number) => throw null; + public static System.Int64 Int(System.Int64 Number) => throw null; + public static System.Int16 Int(System.Int16 Number) => throw null; + public static System.Decimal Int(System.Decimal Number) => throw null; + public static string Oct(object Number) => throw null; + public static string Oct(int Number) => throw null; + public static string Oct(System.UInt64 Number) => throw null; + public static string Oct(System.UInt32 Number) => throw null; + public static string Oct(System.UInt16 Number) => throw null; + public static string Oct(System.SByte Number) => throw null; + public static string Oct(System.Int64 Number) => throw null; + public static string Oct(System.Int16 Number) => throw null; + public static string Oct(System.Byte Number) => throw null; + public static string Str(object Number) => throw null; + public static int Val(System.Char Expression) => throw null; + public static double Val(string InputStr) => throw null; + public static double Val(object Expression) => throw null; + } + + // Generated from `Microsoft.VisualBasic.DateAndTime` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateAndTime + { + public static System.DateTime DateAdd(string Interval, double Number, object DateValue) => throw null; + public static System.DateTime DateAdd(Microsoft.VisualBasic.DateInterval Interval, double Number, System.DateTime DateValue) => throw null; + public static System.Int64 DateDiff(string Interval, object Date1, object Date2, Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = default(Microsoft.VisualBasic.FirstDayOfWeek), Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear = default(Microsoft.VisualBasic.FirstWeekOfYear)) => throw null; + public static System.Int64 DateDiff(Microsoft.VisualBasic.DateInterval Interval, System.DateTime Date1, System.DateTime Date2, Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = default(Microsoft.VisualBasic.FirstDayOfWeek), Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear = default(Microsoft.VisualBasic.FirstWeekOfYear)) => throw null; + public static int DatePart(string Interval, object DateValue, Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = default(Microsoft.VisualBasic.FirstDayOfWeek), Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear = default(Microsoft.VisualBasic.FirstWeekOfYear)) => throw null; + public static int DatePart(Microsoft.VisualBasic.DateInterval Interval, System.DateTime DateValue, Microsoft.VisualBasic.FirstDayOfWeek FirstDayOfWeekValue = default(Microsoft.VisualBasic.FirstDayOfWeek), Microsoft.VisualBasic.FirstWeekOfYear FirstWeekOfYearValue = default(Microsoft.VisualBasic.FirstWeekOfYear)) => throw null; + public static System.DateTime DateSerial(int Year, int Month, int Day) => throw null; + public static string DateString { get => throw null; set => throw null; } + public static System.DateTime DateValue(string StringDate) => throw null; + public static int Day(System.DateTime DateValue) => throw null; + public static int Hour(System.DateTime TimeValue) => throw null; + public static int Minute(System.DateTime TimeValue) => throw null; + public static int Month(System.DateTime DateValue) => throw null; + public static string MonthName(int Month, bool Abbreviate = default(bool)) => throw null; + public static System.DateTime Now { get => throw null; } + public static int Second(System.DateTime TimeValue) => throw null; + public static System.DateTime TimeOfDay { get => throw null; set => throw null; } + public static System.DateTime TimeSerial(int Hour, int Minute, int Second) => throw null; + public static string TimeString { get => throw null; set => throw null; } + public static System.DateTime TimeValue(string StringTime) => throw null; + public static double Timer { get => throw null; } + public static System.DateTime Today { get => throw null; set => throw null; } + public static int Weekday(System.DateTime DateValue, Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = default(Microsoft.VisualBasic.FirstDayOfWeek)) => throw null; + public static string WeekdayName(int Weekday, bool Abbreviate = default(bool), Microsoft.VisualBasic.FirstDayOfWeek FirstDayOfWeekValue = default(Microsoft.VisualBasic.FirstDayOfWeek)) => throw null; + public static int Year(System.DateTime DateValue) => throw null; + } + + // Generated from `Microsoft.VisualBasic.DateFormat` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DateFormat + { + // Stub generator skipped constructor + GeneralDate, + LongDate, + LongTime, + ShortDate, + ShortTime, + } + + // Generated from `Microsoft.VisualBasic.DateInterval` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DateInterval + { + // Stub generator skipped constructor + Day, + DayOfYear, + Hour, + Minute, + Month, + Quarter, + Second, + WeekOfYear, + Weekday, + Year, + } + + // Generated from `Microsoft.VisualBasic.DueDate` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DueDate + { + BegOfPeriod, + // Stub generator skipped constructor + EndOfPeriod, + } + + // Generated from `Microsoft.VisualBasic.ErrObject` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ErrObject + { + public void Clear() => throw null; + public string Description { get => throw null; set => throw null; } + public int Erl { get => throw null; } + public System.Exception GetException() => throw null; + public int HelpContext { get => throw null; set => throw null; } + public string HelpFile { get => throw null; set => throw null; } + public int LastDllError { get => throw null; } + public int Number { get => throw null; set => throw null; } + public void Raise(int Number, object Source = default(object), object Description = default(object), object HelpFile = default(object), object HelpContext = default(object)) => throw null; + public string Source { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.VisualBasic.FileAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FileAttribute + { + Archive, + Directory, + // Stub generator skipped constructor + Hidden, + Normal, + ReadOnly, + System, + Volume, + } + + // Generated from `Microsoft.VisualBasic.FileSystem` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileSystem + { + public static void ChDir(string Path) => throw null; + public static void ChDrive(string Drive) => throw null; + public static void ChDrive(System.Char Drive) => throw null; + public static string CurDir(System.Char Drive) => throw null; + public static string CurDir() => throw null; + public static string Dir(string PathName, Microsoft.VisualBasic.FileAttribute Attributes = default(Microsoft.VisualBasic.FileAttribute)) => throw null; + public static string Dir() => throw null; + public static bool EOF(int FileNumber) => throw null; + public static Microsoft.VisualBasic.OpenMode FileAttr(int FileNumber) => throw null; + public static void FileClose(params int[] FileNumbers) => throw null; + public static void FileCopy(string Source, string Destination) => throw null; + public static System.DateTime FileDateTime(string PathName) => throw null; + public static void FileGet(int FileNumber, ref string Value, System.Int64 RecordNumber = default(System.Int64), bool StringIsFixedLength = default(bool)) => throw null; + public static void FileGet(int FileNumber, ref int Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref float Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref double Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref bool Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.ValueType Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Int64 Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Int16 Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Decimal Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.DateTime Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Char Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Byte Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileGet(int FileNumber, ref System.Array Value, System.Int64 RecordNumber = default(System.Int64), bool ArrayIsDynamic = default(bool), bool StringIsFixedLength = default(bool)) => throw null; + public static void FileGetObject(int FileNumber, ref object Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static System.Int64 FileLen(string PathName) => throw null; + public static void FileOpen(int FileNumber, string FileName, Microsoft.VisualBasic.OpenMode Mode, Microsoft.VisualBasic.OpenAccess Access = default(Microsoft.VisualBasic.OpenAccess), Microsoft.VisualBasic.OpenShare Share = default(Microsoft.VisualBasic.OpenShare), int RecordLength = default(int)) => throw null; + public static void FilePut(object FileNumber, object Value, object RecordNumber) => throw null; + public static void FilePut(int FileNumber, string Value, System.Int64 RecordNumber = default(System.Int64), bool StringIsFixedLength = default(bool)) => throw null; + public static void FilePut(int FileNumber, int Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, float Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, double Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, bool Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.ValueType Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Int64 Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Int16 Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Decimal Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.DateTime Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Char Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Byte Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FilePut(int FileNumber, System.Array Value, System.Int64 RecordNumber = default(System.Int64), bool ArrayIsDynamic = default(bool), bool StringIsFixedLength = default(bool)) => throw null; + public static void FilePutObject(int FileNumber, object Value, System.Int64 RecordNumber = default(System.Int64)) => throw null; + public static void FileWidth(int FileNumber, int RecordWidth) => throw null; + public static int FreeFile() => throw null; + public static Microsoft.VisualBasic.FileAttribute GetAttr(string PathName) => throw null; + public static void Input(int FileNumber, ref string Value) => throw null; + public static void Input(int FileNumber, ref object Value) => throw null; + public static void Input(int FileNumber, ref int Value) => throw null; + public static void Input(int FileNumber, ref float Value) => throw null; + public static void Input(int FileNumber, ref double Value) => throw null; + public static void Input(int FileNumber, ref bool Value) => throw null; + public static void Input(int FileNumber, ref System.Int64 Value) => throw null; + public static void Input(int FileNumber, ref System.Int16 Value) => throw null; + public static void Input(int FileNumber, ref System.Decimal Value) => throw null; + public static void Input(int FileNumber, ref System.DateTime Value) => throw null; + public static void Input(int FileNumber, ref System.Char Value) => throw null; + public static void Input(int FileNumber, ref System.Byte Value) => throw null; + public static string InputString(int FileNumber, int CharCount) => throw null; + public static void Kill(string PathName) => throw null; + public static System.Int64 LOF(int FileNumber) => throw null; + public static string LineInput(int FileNumber) => throw null; + public static System.Int64 Loc(int FileNumber) => throw null; + public static void Lock(int FileNumber, System.Int64 Record) => throw null; + public static void Lock(int FileNumber, System.Int64 FromRecord, System.Int64 ToRecord) => throw null; + public static void Lock(int FileNumber) => throw null; + public static void MkDir(string Path) => throw null; + public static void Print(int FileNumber, params object[] Output) => throw null; + public static void PrintLine(int FileNumber, params object[] Output) => throw null; + public static void Rename(string OldPath, string NewPath) => throw null; + public static void Reset() => throw null; + public static void RmDir(string Path) => throw null; + public static Microsoft.VisualBasic.SpcInfo SPC(System.Int16 Count) => throw null; + public static void Seek(int FileNumber, System.Int64 Position) => throw null; + public static System.Int64 Seek(int FileNumber) => throw null; + public static void SetAttr(string PathName, Microsoft.VisualBasic.FileAttribute Attributes) => throw null; + public static Microsoft.VisualBasic.TabInfo TAB(System.Int16 Column) => throw null; + public static Microsoft.VisualBasic.TabInfo TAB() => throw null; + public static void Unlock(int FileNumber, System.Int64 Record) => throw null; + public static void Unlock(int FileNumber, System.Int64 FromRecord, System.Int64 ToRecord) => throw null; + public static void Unlock(int FileNumber) => throw null; + public static void Write(int FileNumber, params object[] Output) => throw null; + public static void WriteLine(int FileNumber, params object[] Output) => throw null; + } + + // Generated from `Microsoft.VisualBasic.Financial` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Financial + { + public static double DDB(double Cost, double Salvage, double Life, double Period, double Factor = default(double)) => throw null; + public static double FV(double Rate, double NPer, double Pmt, double PV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double IPmt(double Rate, double Per, double NPer, double PV, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double IRR(ref double[] ValueArray, double Guess = default(double)) => throw null; + public static double MIRR(ref double[] ValueArray, double FinanceRate, double ReinvestRate) => throw null; + public static double NPV(double Rate, ref double[] ValueArray) => throw null; + public static double NPer(double Rate, double Pmt, double PV, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double PPmt(double Rate, double Per, double NPer, double PV, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double PV(double Rate, double NPer, double Pmt, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double Pmt(double Rate, double NPer, double PV, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate)) => throw null; + public static double Rate(double NPer, double Pmt, double PV, double FV = default(double), Microsoft.VisualBasic.DueDate Due = default(Microsoft.VisualBasic.DueDate), double Guess = default(double)) => throw null; + public static double SLN(double Cost, double Salvage, double Life) => throw null; + public static double SYD(double Cost, double Salvage, double Life, double Period) => throw null; + } + + // Generated from `Microsoft.VisualBasic.FirstDayOfWeek` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FirstDayOfWeek + { + // Stub generator skipped constructor + Friday, + Monday, + Saturday, + Sunday, + System, + Thursday, + Tuesday, + Wednesday, + } + + // Generated from `Microsoft.VisualBasic.FirstWeekOfYear` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FirstWeekOfYear + { + FirstFourDays, + FirstFullWeek, + // Stub generator skipped constructor + Jan1, + System, + } + + // Generated from `Microsoft.VisualBasic.HideModuleNameAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HideModuleNameAttribute : System.Attribute + { + public HideModuleNameAttribute() => throw null; + } + + // Generated from `Microsoft.VisualBasic.Information` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Information + { + public static int Erl() => throw null; + public static Microsoft.VisualBasic.ErrObject Err() => throw null; + public static bool IsArray(object VarName) => throw null; + public static bool IsDBNull(object Expression) => throw null; + public static bool IsDate(object Expression) => throw null; + public static bool IsError(object Expression) => throw null; + public static bool IsNothing(object Expression) => throw null; + public static bool IsNumeric(object Expression) => throw null; + public static bool IsReference(object Expression) => throw null; + public static int LBound(System.Array Array, int Rank = default(int)) => throw null; + public static int QBColor(int Color) => throw null; + public static int RGB(int Red, int Green, int Blue) => throw null; + public static string SystemTypeName(string VbName) => throw null; + public static string TypeName(object VarName) => throw null; + public static int UBound(System.Array Array, int Rank = default(int)) => throw null; + public static Microsoft.VisualBasic.VariantType VarType(object VarName) => throw null; + public static string VbTypeName(string UrtName) => throw null; + } + + // Generated from `Microsoft.VisualBasic.Interaction` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Interaction + { + public static void AppActivate(string Title) => throw null; + public static void AppActivate(int ProcessId) => throw null; + public static void Beep() => throw null; + public static object CallByName(object ObjectRef, string ProcName, Microsoft.VisualBasic.CallType UseCallType, params object[] Args) => throw null; + public static object Choose(double Index, params object[] Choice) => throw null; + public static string Command() => throw null; + public static object CreateObject(string ProgId, string ServerName = default(string)) => throw null; + public static void DeleteSetting(string AppName, string Section = default(string), string Key = default(string)) => throw null; + public static string Environ(string Expression) => throw null; + public static string Environ(int Expression) => throw null; + public static string[] GetAllSettings(string AppName, string Section) => throw null; + public static object GetObject(string PathName = default(string), string Class = default(string)) => throw null; + public static string GetSetting(string AppName, string Section, string Key, string Default = default(string)) => throw null; + public static object IIf(bool Expression, object TruePart, object FalsePart) => throw null; + public static string InputBox(string Prompt, string Title = default(string), string DefaultResponse = default(string), int XPos = default(int), int YPos = default(int)) => throw null; + public static Microsoft.VisualBasic.MsgBoxResult MsgBox(object Prompt, Microsoft.VisualBasic.MsgBoxStyle Buttons = default(Microsoft.VisualBasic.MsgBoxStyle), object Title = default(object)) => throw null; + public static string Partition(System.Int64 Number, System.Int64 Start, System.Int64 Stop, System.Int64 Interval) => throw null; + public static void SaveSetting(string AppName, string Section, string Key, string Setting) => throw null; + public static int Shell(string PathName, Microsoft.VisualBasic.AppWinStyle Style = default(Microsoft.VisualBasic.AppWinStyle), bool Wait = default(bool), int Timeout = default(int)) => throw null; + public static object Switch(params object[] VarExpr) => throw null; + } + + // Generated from `Microsoft.VisualBasic.MsgBoxResult` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MsgBoxResult + { + Abort, + Cancel, + Ignore, + // Stub generator skipped constructor + No, + Ok, + Retry, + Yes, + } + + // Generated from `Microsoft.VisualBasic.MsgBoxStyle` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MsgBoxStyle + { + AbortRetryIgnore, + ApplicationModal, + Critical, + DefaultButton1, + DefaultButton2, + DefaultButton3, + Exclamation, + Information, + MsgBoxHelp, + MsgBoxRight, + MsgBoxRtlReading, + MsgBoxSetForeground, + // Stub generator skipped constructor + OkCancel, + OkOnly, + Question, + RetryCancel, + SystemModal, + YesNo, + YesNoCancel, + } + + // Generated from `Microsoft.VisualBasic.MyGroupCollectionAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MyGroupCollectionAttribute : System.Attribute + { + public string CreateMethod { get => throw null; } + public string DefaultInstanceAlias { get => throw null; } + public string DisposeMethod { get => throw null; } + public MyGroupCollectionAttribute(string typeToCollect, string createInstanceMethodName, string disposeInstanceMethodName, string defaultInstanceAlias) => throw null; + public string MyGroupName { get => throw null; } + } + + // Generated from `Microsoft.VisualBasic.OpenAccess` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OpenAccess + { + Default, + // Stub generator skipped constructor + Read, + ReadWrite, + Write, + } + + // Generated from `Microsoft.VisualBasic.OpenMode` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OpenMode + { + Append, + Binary, + Input, + // Stub generator skipped constructor + Output, + Random, + } + + // Generated from `Microsoft.VisualBasic.OpenShare` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OpenShare + { + Default, + LockRead, + LockReadWrite, + LockWrite, + // Stub generator skipped constructor + Shared, + } + + // Generated from `Microsoft.VisualBasic.SpcInfo` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SpcInfo + { + public System.Int16 Count; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.VisualBasic.Strings` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Strings + { + public static int Asc(string String) => throw null; + public static int Asc(System.Char String) => throw null; + public static int AscW(string String) => throw null; + public static int AscW(System.Char String) => throw null; + public static System.Char Chr(int CharCode) => throw null; + public static System.Char ChrW(int CharCode) => throw null; + public static string[] Filter(string[] Source, string Match, bool Include = default(bool), Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static string[] Filter(object[] Source, string Match, bool Include = default(bool), Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static string Format(object Expression, string Style = default(string)) => throw null; + public static string FormatCurrency(object Expression, int NumDigitsAfterDecimal = default(int), Microsoft.VisualBasic.TriState IncludeLeadingDigit = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState UseParensForNegativeNumbers = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState GroupDigits = default(Microsoft.VisualBasic.TriState)) => throw null; + public static string FormatDateTime(System.DateTime Expression, Microsoft.VisualBasic.DateFormat NamedFormat = default(Microsoft.VisualBasic.DateFormat)) => throw null; + public static string FormatNumber(object Expression, int NumDigitsAfterDecimal = default(int), Microsoft.VisualBasic.TriState IncludeLeadingDigit = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState UseParensForNegativeNumbers = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState GroupDigits = default(Microsoft.VisualBasic.TriState)) => throw null; + public static string FormatPercent(object Expression, int NumDigitsAfterDecimal = default(int), Microsoft.VisualBasic.TriState IncludeLeadingDigit = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState UseParensForNegativeNumbers = default(Microsoft.VisualBasic.TriState), Microsoft.VisualBasic.TriState GroupDigits = default(Microsoft.VisualBasic.TriState)) => throw null; + public static System.Char GetChar(string str, int Index) => throw null; + public static int InStr(string String1, string String2, Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static int InStr(int StartPos, string String1, string String2, Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static int InStrRev(string StringCheck, string StringMatch, int Start = default(int), Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static string Join(string[] SourceArray, string Delimiter = default(string)) => throw null; + public static string Join(object[] SourceArray, string Delimiter = default(string)) => throw null; + public static string LCase(string Value) => throw null; + public static System.Char LCase(System.Char Value) => throw null; + public static string LSet(string Source, int Length) => throw null; + public static string LTrim(string str) => throw null; + public static string Left(string str, int Length) => throw null; + public static int Len(string Expression) => throw null; + public static int Len(object Expression) => throw null; + public static int Len(int Expression) => throw null; + public static int Len(float Expression) => throw null; + public static int Len(double Expression) => throw null; + public static int Len(bool Expression) => throw null; + public static int Len(System.UInt64 Expression) => throw null; + public static int Len(System.UInt32 Expression) => throw null; + public static int Len(System.UInt16 Expression) => throw null; + public static int Len(System.SByte Expression) => throw null; + public static int Len(System.Int64 Expression) => throw null; + public static int Len(System.Int16 Expression) => throw null; + public static int Len(System.Decimal Expression) => throw null; + public static int Len(System.DateTime Expression) => throw null; + public static int Len(System.Char Expression) => throw null; + public static int Len(System.Byte Expression) => throw null; + public static string Mid(string str, int Start, int Length) => throw null; + public static string Mid(string str, int Start) => throw null; + public static string RSet(string Source, int Length) => throw null; + public static string RTrim(string str) => throw null; + public static string Replace(string Expression, string Find, string Replacement, int Start = default(int), int Count = default(int), Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static string Right(string str, int Length) => throw null; + public static string Space(int Number) => throw null; + public static string[] Split(string Expression, string Delimiter = default(string), int Limit = default(int), Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static int StrComp(string String1, string String2, Microsoft.VisualBasic.CompareMethod Compare = default(Microsoft.VisualBasic.CompareMethod)) => throw null; + public static string StrConv(string str, Microsoft.VisualBasic.VbStrConv Conversion, int LocaleID = default(int)) => throw null; + public static string StrDup(int Number, string Character) => throw null; + public static string StrDup(int Number, System.Char Character) => throw null; + public static object StrDup(int Number, object Character) => throw null; + public static string StrReverse(string Expression) => throw null; + public static string Trim(string str) => throw null; + public static string UCase(string Value) => throw null; + public static System.Char UCase(System.Char Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.TabInfo` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TabInfo + { + public System.Int16 Column; + // Stub generator skipped constructor + } + + // Generated from `Microsoft.VisualBasic.TriState` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TriState + { + False, + // Stub generator skipped constructor + True, + UseDefault, + } + + // Generated from `Microsoft.VisualBasic.VBFixedArrayAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VBFixedArrayAttribute : System.Attribute + { + public int[] Bounds { get => throw null; } + public int Length { get => throw null; } + public VBFixedArrayAttribute(int UpperBound1, int UpperBound2) => throw null; + public VBFixedArrayAttribute(int UpperBound1) => throw null; + } + + // Generated from `Microsoft.VisualBasic.VBFixedStringAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VBFixedStringAttribute : System.Attribute + { + public int Length { get => throw null; } + public VBFixedStringAttribute(int Length) => throw null; + } + + // Generated from `Microsoft.VisualBasic.VBMath` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VBMath + { + public static void Randomize(double Number) => throw null; + public static void Randomize() => throw null; + public static float Rnd(float Number) => throw null; + public static float Rnd() => throw null; + } + + // Generated from `Microsoft.VisualBasic.VariantType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum VariantType + { + Array, + Boolean, + Byte, + Char, + Currency, + DataObject, + Date, + Decimal, + Double, + Empty, + Error, + Integer, + Long, + Null, + Object, + Short, + Single, + String, + UserDefinedType, + Variant, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.VisualBasic.VbStrConv` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum VbStrConv + { + Hiragana, + Katakana, + LinguisticCasing, + Lowercase, + Narrow, + None, + ProperCase, + SimplifiedChinese, + TraditionalChinese, + Uppercase, + // Stub generator skipped constructor + Wide, + } + + namespace CompilerServices + { + // Generated from `Microsoft.VisualBasic.CompilerServices.BooleanType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BooleanType + { + public static bool FromObject(object Value) => throw null; + public static bool FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.ByteType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ByteType + { + public static System.Byte FromObject(object Value) => throw null; + public static System.Byte FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.CharArrayType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CharArrayType + { + public static System.Char[] FromObject(object Value) => throw null; + public static System.Char[] FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.CharType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CharType + { + public static System.Char FromObject(object Value) => throw null; + public static System.Char FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.Conversions` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Conversions + { + public static object ChangeType(object Expression, System.Type TargetType) => throw null; + public static object FallbackUserDefinedConversion(object Expression, System.Type TargetType) => throw null; + public static string FromCharAndCount(System.Char Value, int Count) => throw null; + public static string FromCharArray(System.Char[] Value) => throw null; + public static string FromCharArraySubset(System.Char[] Value, int StartIndex, int Length) => throw null; + public static bool ToBoolean(string Value) => throw null; + public static bool ToBoolean(object Value) => throw null; + public static System.Byte ToByte(string Value) => throw null; + public static System.Byte ToByte(object Value) => throw null; + public static System.Char ToChar(string Value) => throw null; + public static System.Char ToChar(object Value) => throw null; + public static System.Char[] ToCharArrayRankOne(string Value) => throw null; + public static System.Char[] ToCharArrayRankOne(object Value) => throw null; + public static System.DateTime ToDate(string Value) => throw null; + public static System.DateTime ToDate(object Value) => throw null; + public static System.Decimal ToDecimal(string Value) => throw null; + public static System.Decimal ToDecimal(object Value) => throw null; + public static System.Decimal ToDecimal(bool Value) => throw null; + public static double ToDouble(string Value) => throw null; + public static double ToDouble(object Value) => throw null; + public static T ToGenericParameter(object Value) => throw null; + public static int ToInteger(string Value) => throw null; + public static int ToInteger(object Value) => throw null; + public static System.Int64 ToLong(string Value) => throw null; + public static System.Int64 ToLong(object Value) => throw null; + public static System.SByte ToSByte(string Value) => throw null; + public static System.SByte ToSByte(object Value) => throw null; + public static System.Int16 ToShort(string Value) => throw null; + public static System.Int16 ToShort(object Value) => throw null; + public static float ToSingle(string Value) => throw null; + public static float ToSingle(object Value) => throw null; + public static string ToString(object Value) => throw null; + public static string ToString(int Value) => throw null; + public static string ToString(float Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string ToString(float Value) => throw null; + public static string ToString(double Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string ToString(double Value) => throw null; + public static string ToString(bool Value) => throw null; + public static string ToString(System.UInt64 Value) => throw null; + public static string ToString(System.UInt32 Value) => throw null; + public static string ToString(System.Int64 Value) => throw null; + public static string ToString(System.Int16 Value) => throw null; + public static string ToString(System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string ToString(System.Decimal Value) => throw null; + public static string ToString(System.DateTime Value) => throw null; + public static string ToString(System.Char Value) => throw null; + public static string ToString(System.Byte Value) => throw null; + public static System.UInt32 ToUInteger(string Value) => throw null; + public static System.UInt32 ToUInteger(object Value) => throw null; + public static System.UInt64 ToULong(string Value) => throw null; + public static System.UInt64 ToULong(object Value) => throw null; + public static System.UInt16 ToUShort(string Value) => throw null; + public static System.UInt16 ToUShort(object Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.DateType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateType + { + public static System.DateTime FromObject(object Value) => throw null; + public static System.DateTime FromString(string Value, System.Globalization.CultureInfo culture) => throw null; + public static System.DateTime FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.DecimalType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecimalType + { + public static System.Decimal FromBoolean(bool Value) => throw null; + public static System.Decimal FromObject(object Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static System.Decimal FromObject(object Value) => throw null; + public static System.Decimal FromString(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static System.Decimal FromString(string Value) => throw null; + public static System.Decimal Parse(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.DesignerGeneratedAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerGeneratedAttribute : System.Attribute + { + public DesignerGeneratedAttribute() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.DoubleType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DoubleType + { + public static double FromObject(object Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static double FromObject(object Value) => throw null; + public static double FromString(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static double FromString(string Value) => throw null; + public static double Parse(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static double Parse(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.IncompleteInitialization` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IncompleteInitialization : System.Exception + { + public IncompleteInitialization() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.IntegerType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IntegerType + { + public static int FromObject(object Value) => throw null; + public static int FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.LateBinding` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LateBinding + { + public static void LateCall(object o, System.Type objType, string name, object[] args, string[] paramnames, bool[] CopyBack) => throw null; + public static object LateGet(object o, System.Type objType, string name, object[] args, string[] paramnames, bool[] CopyBack) => throw null; + public static object LateIndexGet(object o, object[] args, string[] paramnames) => throw null; + public static void LateIndexSet(object o, object[] args, string[] paramnames) => throw null; + public static void LateIndexSetComplex(object o, object[] args, string[] paramnames, bool OptimisticSet, bool RValueBase) => throw null; + public static void LateSet(object o, System.Type objType, string name, object[] args, string[] paramnames) => throw null; + public static void LateSetComplex(object o, System.Type objType, string name, object[] args, string[] paramnames, bool OptimisticSet, bool RValueBase) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.LikeOperator` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LikeOperator + { + public static object LikeObject(object Source, object Pattern, Microsoft.VisualBasic.CompareMethod CompareOption) => throw null; + public static bool LikeString(string Source, string Pattern, Microsoft.VisualBasic.CompareMethod CompareOption) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.LongType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LongType + { + public static System.Int64 FromObject(object Value) => throw null; + public static System.Int64 FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.NewLateBinding` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NewLateBinding + { + public static object FallbackCall(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames, bool IgnoreReturn) => throw null; + public static object FallbackGet(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames) => throw null; + public static void FallbackIndexSet(object Instance, object[] Arguments, string[] ArgumentNames) => throw null; + public static void FallbackIndexSetComplex(object Instance, object[] Arguments, string[] ArgumentNames, bool OptimisticSet, bool RValueBase) => throw null; + public static object FallbackInvokeDefault1(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) => throw null; + public static object FallbackInvokeDefault2(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) => throw null; + public static void FallbackSet(object Instance, string MemberName, object[] Arguments) => throw null; + public static void FallbackSetComplex(object Instance, string MemberName, object[] Arguments, bool OptimisticSet, bool RValueBase) => throw null; + public static object LateCall(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool[] CopyBack, bool IgnoreReturn) => throw null; + public static object LateCallInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) => throw null; + public static object LateGet(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool[] CopyBack) => throw null; + public static object LateGetInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) => throw null; + public static object LateIndexGet(object Instance, object[] Arguments, string[] ArgumentNames) => throw null; + public static void LateIndexSet(object Instance, object[] Arguments, string[] ArgumentNames) => throw null; + public static void LateIndexSetComplex(object Instance, object[] Arguments, string[] ArgumentNames, bool OptimisticSet, bool RValueBase) => throw null; + public static void LateSet(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool OptimisticSet, bool RValueBase, Microsoft.VisualBasic.CallType CallType) => throw null; + public static void LateSet(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments) => throw null; + public static void LateSetComplex(object Instance, System.Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, System.Type[] TypeArguments, bool OptimisticSet, bool RValueBase) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.ObjectFlowControl` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectFlowControl + { + public static void CheckForSyncLockOnValueType(object Expression) => throw null; + // Generated from `Microsoft.VisualBasic.CompilerServices.ObjectFlowControl.ForLoopControl` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ForLoopControl + { + public static bool ForLoopInitObj(object Counter, object Start, object Limit, object StepValue, ref object LoopForResult, ref object CounterResult) => throw null; + public static bool ForNextCheckDec(System.Decimal count, System.Decimal limit, System.Decimal StepValue) => throw null; + public static bool ForNextCheckObj(object Counter, object LoopObj, ref object CounterResult) => throw null; + public static bool ForNextCheckR4(float count, float limit, float StepValue) => throw null; + public static bool ForNextCheckR8(double count, double limit, double StepValue) => throw null; + } + + + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.ObjectType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectType + { + public static object AddObj(object o1, object o2) => throw null; + public static object BitAndObj(object obj1, object obj2) => throw null; + public static object BitOrObj(object obj1, object obj2) => throw null; + public static object BitXorObj(object obj1, object obj2) => throw null; + public static object DivObj(object o1, object o2) => throw null; + public static object GetObjectValuePrimitive(object o) => throw null; + public static object IDivObj(object o1, object o2) => throw null; + public static bool LikeObj(object vLeft, object vRight, Microsoft.VisualBasic.CompareMethod CompareOption) => throw null; + public static object ModObj(object o1, object o2) => throw null; + public static object MulObj(object o1, object o2) => throw null; + public static object NegObj(object obj) => throw null; + public static object NotObj(object obj) => throw null; + public static int ObjTst(object o1, object o2, bool TextCompare) => throw null; + public ObjectType() => throw null; + public static object PlusObj(object obj) => throw null; + public static object PowObj(object obj1, object obj2) => throw null; + public static object ShiftLeftObj(object o1, int amount) => throw null; + public static object ShiftRightObj(object o1, int amount) => throw null; + public static object StrCatObj(object vLeft, object vRight) => throw null; + public static object SubObj(object o1, object o2) => throw null; + public static object XorObj(object obj1, object obj2) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.Operators` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Operators + { + public static object AddObject(object Left, object Right) => throw null; + public static object AndObject(object Left, object Right) => throw null; + public static object CompareObjectEqual(object Left, object Right, bool TextCompare) => throw null; + public static object CompareObjectGreater(object Left, object Right, bool TextCompare) => throw null; + public static object CompareObjectGreaterEqual(object Left, object Right, bool TextCompare) => throw null; + public static object CompareObjectLess(object Left, object Right, bool TextCompare) => throw null; + public static object CompareObjectLessEqual(object Left, object Right, bool TextCompare) => throw null; + public static object CompareObjectNotEqual(object Left, object Right, bool TextCompare) => throw null; + public static int CompareString(string Left, string Right, bool TextCompare) => throw null; + public static object ConcatenateObject(object Left, object Right) => throw null; + public static bool ConditionalCompareObjectEqual(object Left, object Right, bool TextCompare) => throw null; + public static bool ConditionalCompareObjectGreater(object Left, object Right, bool TextCompare) => throw null; + public static bool ConditionalCompareObjectGreaterEqual(object Left, object Right, bool TextCompare) => throw null; + public static bool ConditionalCompareObjectLess(object Left, object Right, bool TextCompare) => throw null; + public static bool ConditionalCompareObjectLessEqual(object Left, object Right, bool TextCompare) => throw null; + public static bool ConditionalCompareObjectNotEqual(object Left, object Right, bool TextCompare) => throw null; + public static object DivideObject(object Left, object Right) => throw null; + public static object ExponentObject(object Left, object Right) => throw null; + public static object FallbackInvokeUserDefinedOperator(object vbOp, object[] arguments) => throw null; + public static object IntDivideObject(object Left, object Right) => throw null; + public static object LeftShiftObject(object Operand, object Amount) => throw null; + public static object ModObject(object Left, object Right) => throw null; + public static object MultiplyObject(object Left, object Right) => throw null; + public static object NegateObject(object Operand) => throw null; + public static object NotObject(object Operand) => throw null; + public static object OrObject(object Left, object Right) => throw null; + public static object PlusObject(object Operand) => throw null; + public static object RightShiftObject(object Operand, object Amount) => throw null; + public static object SubtractObject(object Left, object Right) => throw null; + public static object XorObject(object Left, object Right) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.OptionCompareAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OptionCompareAttribute : System.Attribute + { + public OptionCompareAttribute() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.OptionTextAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OptionTextAttribute : System.Attribute + { + public OptionTextAttribute() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.ProjectData` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProjectData + { + public static void ClearProjectError() => throw null; + public static System.Exception CreateProjectError(int hr) => throw null; + public static void EndApp() => throw null; + public static void SetProjectError(System.Exception ex, int lErl) => throw null; + public static void SetProjectError(System.Exception ex) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.ShortType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ShortType + { + public static System.Int16 FromObject(object Value) => throw null; + public static System.Int16 FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.SingleType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SingleType + { + public static float FromObject(object Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static float FromObject(object Value) => throw null; + public static float FromString(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static float FromString(string Value) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StandardModuleAttribute : System.Attribute + { + public StandardModuleAttribute() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.StaticLocalInitFlag` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StaticLocalInitFlag + { + public System.Int16 State; + public StaticLocalInitFlag() => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.StringType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringType + { + public static string FromBoolean(bool Value) => throw null; + public static string FromByte(System.Byte Value) => throw null; + public static string FromChar(System.Char Value) => throw null; + public static string FromDate(System.DateTime Value) => throw null; + public static string FromDecimal(System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string FromDecimal(System.Decimal Value) => throw null; + public static string FromDouble(double Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string FromDouble(double Value) => throw null; + public static string FromInteger(int Value) => throw null; + public static string FromLong(System.Int64 Value) => throw null; + public static string FromObject(object Value) => throw null; + public static string FromShort(System.Int16 Value) => throw null; + public static string FromSingle(float Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; + public static string FromSingle(float Value) => throw null; + public static void MidStmtStr(ref string sDest, int StartPosition, int MaxInsertLength, string sInsert) => throw null; + public static int StrCmp(string sLeft, string sRight, bool TextCompare) => throw null; + public static bool StrLike(string Source, string Pattern, Microsoft.VisualBasic.CompareMethod CompareOption) => throw null; + public static bool StrLikeBinary(string Source, string Pattern) => throw null; + public static bool StrLikeText(string Source, string Pattern) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.Utils` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Utils + { + public static System.Array CopyArray(System.Array arySrc, System.Array aryDest) => throw null; + public static string GetResourceString(string ResourceKey, params string[] Args) => throw null; + } + + // Generated from `Microsoft.VisualBasic.CompilerServices.Versioned` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Versioned + { + public static object CallByName(object Instance, string MethodName, Microsoft.VisualBasic.CallType UseCallType, params object[] Arguments) => throw null; + public static bool IsNumeric(object Expression) => throw null; + public static string SystemTypeName(string VbName) => throw null; + public static string TypeName(object Expression) => throw null; + public static string VbTypeName(string SystemName) => throw null; + } + + } + namespace FileIO + { + // Generated from `Microsoft.VisualBasic.FileIO.DeleteDirectoryOption` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DeleteDirectoryOption + { + DeleteAllContents, + // Stub generator skipped constructor + ThrowIfDirectoryNonEmpty, + } + + // Generated from `Microsoft.VisualBasic.FileIO.FieldType` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FieldType + { + Delimited, + // Stub generator skipped constructor + FixedWidth, + } + + // Generated from `Microsoft.VisualBasic.FileIO.FileSystem` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileSystem + { + public static string CombinePath(string baseDirectory, string relativePath) => throw null; + public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) => throw null; + public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) => throw null; + public static void CopyDirectory(string sourceDirectoryName, string destinationDirectoryName) => throw null; + public static void CopyFile(string sourceFileName, string destinationFileName, bool overwrite) => throw null; + public static void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void CopyFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) => throw null; + public static void CopyFile(string sourceFileName, string destinationFileName) => throw null; + public static void CreateDirectory(string directory) => throw null; + public static string CurrentDirectory { get => throw null; set => throw null; } + public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) => throw null; + public static void DeleteDirectory(string directory, Microsoft.VisualBasic.FileIO.DeleteDirectoryOption onDirectoryNotEmpty) => throw null; + public static void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void DeleteFile(string file, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.RecycleOption recycle) => throw null; + public static void DeleteFile(string file) => throw null; + public static bool DirectoryExists(string directory) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection Drives { get => throw null; } + public static bool FileExists(string file) => throw null; + public FileSystem() => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, Microsoft.VisualBasic.FileIO.SearchOption searchType, params string[] fileWildcards) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection FindInFiles(string directory, string containsText, bool ignoreCase, Microsoft.VisualBasic.FileIO.SearchOption searchType) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetDirectories(string directory, Microsoft.VisualBasic.FileIO.SearchOption searchType, params string[] wildcards) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetDirectories(string directory) => throw null; + public static System.IO.DirectoryInfo GetDirectoryInfo(string directory) => throw null; + public static System.IO.DriveInfo GetDriveInfo(string drive) => throw null; + public static System.IO.FileInfo GetFileInfo(string file) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetFiles(string directory, Microsoft.VisualBasic.FileIO.SearchOption searchType, params string[] wildcards) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetFiles(string directory) => throw null; + public static string GetName(string path) => throw null; + public static string GetParentPath(string path) => throw null; + public static string GetTempFileName() => throw null; + public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, bool overwrite) => throw null; + public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName, Microsoft.VisualBasic.FileIO.UIOption showUI) => throw null; + public static void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName) => throw null; + public static void MoveFile(string sourceFileName, string destinationFileName, bool overwrite) => throw null; + public static void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI, Microsoft.VisualBasic.FileIO.UICancelOption onUserCancel) => throw null; + public static void MoveFile(string sourceFileName, string destinationFileName, Microsoft.VisualBasic.FileIO.UIOption showUI) => throw null; + public static void MoveFile(string sourceFileName, string destinationFileName) => throw null; + public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params string[] delimiters) => throw null; + public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file, params int[] fieldWidths) => throw null; + public static Microsoft.VisualBasic.FileIO.TextFieldParser OpenTextFieldParser(string file) => throw null; + public static System.IO.StreamReader OpenTextFileReader(string file, System.Text.Encoding encoding) => throw null; + public static System.IO.StreamReader OpenTextFileReader(string file) => throw null; + public static System.IO.StreamWriter OpenTextFileWriter(string file, bool append, System.Text.Encoding encoding) => throw null; + public static System.IO.StreamWriter OpenTextFileWriter(string file, bool append) => throw null; + public static System.Byte[] ReadAllBytes(string file) => throw null; + public static string ReadAllText(string file, System.Text.Encoding encoding) => throw null; + public static string ReadAllText(string file) => throw null; + public static void RenameDirectory(string directory, string newName) => throw null; + public static void RenameFile(string file, string newName) => throw null; + public static void WriteAllBytes(string file, System.Byte[] data, bool append) => throw null; + public static void WriteAllText(string file, string text, bool append, System.Text.Encoding encoding) => throw null; + public static void WriteAllText(string file, string text, bool append) => throw null; + } + + // Generated from `Microsoft.VisualBasic.FileIO.MalformedLineException` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MalformedLineException : System.Exception + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Int64 LineNumber { get => throw null; set => throw null; } + public MalformedLineException(string message, System.Int64 lineNumber, System.Exception innerException) => throw null; + public MalformedLineException(string message, System.Int64 lineNumber) => throw null; + public MalformedLineException(string message, System.Exception innerException) => throw null; + public MalformedLineException(string message) => throw null; + public MalformedLineException() => throw null; + protected MalformedLineException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Microsoft.VisualBasic.FileIO.RecycleOption` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RecycleOption + { + DeletePermanently, + // Stub generator skipped constructor + SendToRecycleBin, + } + + // Generated from `Microsoft.VisualBasic.FileIO.SearchOption` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SearchOption + { + SearchAllSubDirectories, + // Stub generator skipped constructor + SearchTopLevelOnly, + } + + // Generated from `Microsoft.VisualBasic.FileIO.SpecialDirectories` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SpecialDirectories + { + public static string AllUsersApplicationData { get => throw null; } + public static string CurrentUserApplicationData { get => throw null; } + public static string Desktop { get => throw null; } + public static string MyDocuments { get => throw null; } + public static string MyMusic { get => throw null; } + public static string MyPictures { get => throw null; } + public static string ProgramFiles { get => throw null; } + public static string Programs { get => throw null; } + public SpecialDirectories() => throw null; + public static string Temp { get => throw null; } + } + + // Generated from `Microsoft.VisualBasic.FileIO.TextFieldParser` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TextFieldParser : System.IDisposable + { + public void Close() => throw null; + public string[] CommentTokens { get => throw null; set => throw null; } + public string[] Delimiters { get => throw null; set => throw null; } + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool EndOfData { get => throw null; } + public string ErrorLine { get => throw null; } + public System.Int64 ErrorLineNumber { get => throw null; } + public int[] FieldWidths { get => throw null; set => throw null; } + public bool HasFieldsEnclosedInQuotes { get => throw null; set => throw null; } + public System.Int64 LineNumber { get => throw null; } + public string PeekChars(int numberOfChars) => throw null; + public string[] ReadFields() => throw null; + public string ReadLine() => throw null; + public string ReadToEnd() => throw null; + public void SetDelimiters(params string[] delimiters) => throw null; + public void SetFieldWidths(params int[] fieldWidths) => throw null; + public TextFieldParser(string path, System.Text.Encoding defaultEncoding, bool detectEncoding) => throw null; + public TextFieldParser(string path, System.Text.Encoding defaultEncoding) => throw null; + public TextFieldParser(string path) => throw null; + public TextFieldParser(System.IO.TextReader reader) => throw null; + public TextFieldParser(System.IO.Stream stream, System.Text.Encoding defaultEncoding, bool detectEncoding, bool leaveOpen) => throw null; + public TextFieldParser(System.IO.Stream stream, System.Text.Encoding defaultEncoding, bool detectEncoding) => throw null; + public TextFieldParser(System.IO.Stream stream, System.Text.Encoding defaultEncoding) => throw null; + public TextFieldParser(System.IO.Stream stream) => throw null; + public Microsoft.VisualBasic.FileIO.FieldType TextFieldType { get => throw null; set => throw null; } + public bool TrimWhiteSpace { get => throw null; set => throw null; } + // ERR: Stub generator didn't handle member: ~TextFieldParser + } + + // Generated from `Microsoft.VisualBasic.FileIO.UICancelOption` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UICancelOption + { + DoNothing, + ThrowException, + // Stub generator skipped constructor + } + + // Generated from `Microsoft.VisualBasic.FileIO.UIOption` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UIOption + { + AllDialogs, + OnlyErrorDialogs, + // Stub generator skipped constructor + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs new file mode 100644 index 000000000000..234049c06b53 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs @@ -0,0 +1,22 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace ComponentModel + { + // Generated from `System.ComponentModel.Win32Exception` in `Microsoft.Win32.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Win32Exception : System.Runtime.InteropServices.ExternalException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int NativeErrorCode { get => throw null; } + public override string ToString() => throw null; + public Win32Exception(string message, System.Exception innerException) => throw null; + public Win32Exception(string message) => throw null; + public Win32Exception(int error, string message) => throw null; + public Win32Exception(int error) => throw null; + public Win32Exception() => throw null; + protected Win32Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs new file mode 100644 index 000000000000..b965101cd2a7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs @@ -0,0 +1,236 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + namespace Concurrent + { + // Generated from `System.Collections.Concurrent.BlockingCollection<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BlockingCollection : System.IDisposable, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public void Add(T item, System.Threading.CancellationToken cancellationToken) => throw null; + public void Add(T item) => throw null; + public static int AddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item, System.Threading.CancellationToken cancellationToken) => throw null; + public static int AddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item) => throw null; + public BlockingCollection(int boundedCapacity) => throw null; + public BlockingCollection(System.Collections.Concurrent.IProducerConsumerCollection collection, int boundedCapacity) => throw null; + public BlockingCollection(System.Collections.Concurrent.IProducerConsumerCollection collection) => throw null; + public BlockingCollection() => throw null; + public int BoundedCapacity { get => throw null; } + public void CompleteAdding() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Collections.Generic.IEnumerable GetConsumingEnumerable(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.Generic.IEnumerable GetConsumingEnumerable() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool IsAddingCompleted { get => throw null; } + public bool IsCompleted { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T Take(System.Threading.CancellationToken cancellationToken) => throw null; + public T Take() => throw null; + public static int TakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item, System.Threading.CancellationToken cancellationToken) => throw null; + public static int TakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item) => throw null; + public T[] ToArray() => throw null; + public bool TryAdd(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool TryAdd(T item, int millisecondsTimeout) => throw null; + public bool TryAdd(T item, System.TimeSpan timeout) => throw null; + public bool TryAdd(T item) => throw null; + public static int TryAddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static int TryAddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item, int millisecondsTimeout) => throw null; + public static int TryAddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item, System.TimeSpan timeout) => throw null; + public static int TryAddToAny(System.Collections.Concurrent.BlockingCollection[] collections, T item) => throw null; + public bool TryTake(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool TryTake(out T item, int millisecondsTimeout) => throw null; + public bool TryTake(out T item, System.TimeSpan timeout) => throw null; + public bool TryTake(out T item) => throw null; + public static int TryTakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static int TryTakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item, int millisecondsTimeout) => throw null; + public static int TryTakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item, System.TimeSpan timeout) => throw null; + public static int TryTakeFromAny(System.Collections.Concurrent.BlockingCollection[] collections, out T item) => throw null; + } + + // Generated from `System.Collections.Concurrent.ConcurrentBag<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrentBag : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Concurrent.IProducerConsumerCollection + { + public void Add(T item) => throw null; + public void Clear() => throw null; + public ConcurrentBag(System.Collections.Generic.IEnumerable collection) => throw null; + public ConcurrentBag() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + bool System.Collections.Concurrent.IProducerConsumerCollection.TryAdd(T item) => throw null; + public bool TryPeek(out T result) => throw null; + public bool TryTake(out T result) => throw null; + } + + // Generated from `System.Collections.Concurrent.ConcurrentDictionary<,>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrentDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.IDictionary.Add(TKey key, TValue value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public TValue AddOrUpdate(TKey key, System.Func addValueFactory, System.Func updateValueFactory, TArg factoryArgument) => throw null; + public TValue AddOrUpdate(TKey key, TValue addValue, System.Func updateValueFactory) => throw null; + public TValue AddOrUpdate(TKey key, System.Func addValueFactory, System.Func updateValueFactory) => throw null; + public void Clear() => throw null; + public ConcurrentDictionary(int concurrencyLevel, int capacity, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public ConcurrentDictionary(int concurrencyLevel, int capacity) => throw null; + public ConcurrentDictionary(int concurrencyLevel, System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public ConcurrentDictionary(System.Collections.Generic.IEqualityComparer comparer) => throw null; + public ConcurrentDictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public ConcurrentDictionary(System.Collections.Generic.IEnumerable> collection) => throw null; + public ConcurrentDictionary() => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public bool ContainsKey(TKey key) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + public TValue GetOrAdd(TKey key, System.Func valueFactory, TArg factoryArgument) => throw null; + public TValue GetOrAdd(TKey key, TValue value) => throw null; + public TValue GetOrAdd(TKey key, System.Func valueFactory) => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + bool System.Collections.Generic.IDictionary.Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Generic.KeyValuePair[] ToArray() => throw null; + public bool TryAdd(TKey key, TValue value) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public bool TryRemove(TKey key, out TValue value) => throw null; + public bool TryRemove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryUpdate(TKey key, TValue newValue, TValue comparisonValue) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.Concurrent.ConcurrentQueue<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrentQueue : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Concurrent.IProducerConsumerCollection + { + public void Clear() => throw null; + public ConcurrentQueue(System.Collections.Generic.IEnumerable collection) => throw null; + public ConcurrentQueue() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public void Enqueue(T item) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + bool System.Collections.Concurrent.IProducerConsumerCollection.TryAdd(T item) => throw null; + public bool TryDequeue(out T result) => throw null; + public bool TryPeek(out T result) => throw null; + bool System.Collections.Concurrent.IProducerConsumerCollection.TryTake(out T item) => throw null; + } + + // Generated from `System.Collections.Concurrent.ConcurrentStack<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrentStack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Concurrent.IProducerConsumerCollection + { + public void Clear() => throw null; + public ConcurrentStack(System.Collections.Generic.IEnumerable collection) => throw null; + public ConcurrentStack() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public void Push(T item) => throw null; + public void PushRange(T[] items, int startIndex, int count) => throw null; + public void PushRange(T[] items) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + bool System.Collections.Concurrent.IProducerConsumerCollection.TryAdd(T item) => throw null; + public bool TryPeek(out T result) => throw null; + public bool TryPop(out T result) => throw null; + public int TryPopRange(T[] items, int startIndex, int count) => throw null; + public int TryPopRange(T[] items) => throw null; + bool System.Collections.Concurrent.IProducerConsumerCollection.TryTake(out T item) => throw null; + } + + // Generated from `System.Collections.Concurrent.EnumerablePartitionerOptions` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EnumerablePartitionerOptions + { + // Stub generator skipped constructor + NoBuffering, + None, + } + + // Generated from `System.Collections.Concurrent.IProducerConsumerCollection<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IProducerConsumerCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IEnumerable + { + void CopyTo(T[] array, int index); + T[] ToArray(); + bool TryAdd(T item); + bool TryTake(out T item); + } + + // Generated from `System.Collections.Concurrent.OrderablePartitioner<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class OrderablePartitioner : System.Collections.Concurrent.Partitioner + { + public override System.Collections.Generic.IEnumerable GetDynamicPartitions() => throw null; + public virtual System.Collections.Generic.IEnumerable> GetOrderableDynamicPartitions() => throw null; + public abstract System.Collections.Generic.IList>> GetOrderablePartitions(int partitionCount); + public override System.Collections.Generic.IList> GetPartitions(int partitionCount) => throw null; + public bool KeysNormalized { get => throw null; } + public bool KeysOrderedAcrossPartitions { get => throw null; } + public bool KeysOrderedInEachPartition { get => throw null; } + protected OrderablePartitioner(bool keysOrderedInEachPartition, bool keysOrderedAcrossPartitions, bool keysNormalized) => throw null; + } + + // Generated from `System.Collections.Concurrent.Partitioner` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Partitioner + { + public static System.Collections.Concurrent.OrderablePartitioner Create(TSource[] array, bool loadBalance) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner Create(System.Collections.Generic.IList list, bool loadBalance) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner Create(System.Collections.Generic.IEnumerable source, System.Collections.Concurrent.EnumerablePartitionerOptions partitionerOptions) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner Create(System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner> Create(int fromInclusive, int toExclusive, int rangeSize) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner> Create(int fromInclusive, int toExclusive) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner> Create(System.Int64 fromInclusive, System.Int64 toExclusive, System.Int64 rangeSize) => throw null; + public static System.Collections.Concurrent.OrderablePartitioner> Create(System.Int64 fromInclusive, System.Int64 toExclusive) => throw null; + } + + // Generated from `System.Collections.Concurrent.Partitioner<>` in `System.Collections.Concurrent, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Partitioner + { + public virtual System.Collections.Generic.IEnumerable GetDynamicPartitions() => throw null; + public abstract System.Collections.Generic.IList> GetPartitions(int partitionCount); + protected Partitioner() => throw null; + public virtual bool SupportsDynamicPartitions { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs new file mode 100644 index 000000000000..7bdc9c57e3ee --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs @@ -0,0 +1,1141 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + namespace Immutable + { + // Generated from `System.Collections.Immutable.IImmutableDictionary<,>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IImmutableDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable> + { + System.Collections.Immutable.IImmutableDictionary Add(TKey key, TValue value); + System.Collections.Immutable.IImmutableDictionary AddRange(System.Collections.Generic.IEnumerable> pairs); + System.Collections.Immutable.IImmutableDictionary Clear(); + bool Contains(System.Collections.Generic.KeyValuePair pair); + System.Collections.Immutable.IImmutableDictionary Remove(TKey key); + System.Collections.Immutable.IImmutableDictionary RemoveRange(System.Collections.Generic.IEnumerable keys); + System.Collections.Immutable.IImmutableDictionary SetItem(TKey key, TValue value); + System.Collections.Immutable.IImmutableDictionary SetItems(System.Collections.Generic.IEnumerable> items); + bool TryGetKey(TKey equalKey, out TKey actualKey); + } + + // Generated from `System.Collections.Immutable.IImmutableList<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IImmutableList : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + System.Collections.Immutable.IImmutableList Add(T value); + System.Collections.Immutable.IImmutableList AddRange(System.Collections.Generic.IEnumerable items); + System.Collections.Immutable.IImmutableList Clear(); + int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer); + System.Collections.Immutable.IImmutableList Insert(int index, T element); + System.Collections.Immutable.IImmutableList InsertRange(int index, System.Collections.Generic.IEnumerable items); + int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer); + System.Collections.Immutable.IImmutableList Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer); + System.Collections.Immutable.IImmutableList RemoveAll(System.Predicate match); + System.Collections.Immutable.IImmutableList RemoveAt(int index); + System.Collections.Immutable.IImmutableList RemoveRange(int index, int count); + System.Collections.Immutable.IImmutableList RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer); + System.Collections.Immutable.IImmutableList Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer); + System.Collections.Immutable.IImmutableList SetItem(int index, T value); + } + + // Generated from `System.Collections.Immutable.IImmutableQueue<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IImmutableQueue : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Collections.Immutable.IImmutableQueue Clear(); + System.Collections.Immutable.IImmutableQueue Dequeue(); + System.Collections.Immutable.IImmutableQueue Enqueue(T value); + bool IsEmpty { get; } + T Peek(); + } + + // Generated from `System.Collections.Immutable.IImmutableSet<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IImmutableSet : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + System.Collections.Immutable.IImmutableSet Add(T value); + System.Collections.Immutable.IImmutableSet Clear(); + bool Contains(T value); + System.Collections.Immutable.IImmutableSet Except(System.Collections.Generic.IEnumerable other); + System.Collections.Immutable.IImmutableSet Intersect(System.Collections.Generic.IEnumerable other); + bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other); + bool IsSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsSupersetOf(System.Collections.Generic.IEnumerable other); + bool Overlaps(System.Collections.Generic.IEnumerable other); + System.Collections.Immutable.IImmutableSet Remove(T value); + bool SetEquals(System.Collections.Generic.IEnumerable other); + System.Collections.Immutable.IImmutableSet SymmetricExcept(System.Collections.Generic.IEnumerable other); + bool TryGetValue(T equalValue, out T actualValue); + System.Collections.Immutable.IImmutableSet Union(System.Collections.Generic.IEnumerable other); + } + + // Generated from `System.Collections.Immutable.IImmutableStack<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IImmutableStack : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Collections.Immutable.IImmutableStack Clear(); + bool IsEmpty { get; } + T Peek(); + System.Collections.Immutable.IImmutableStack Pop(); + System.Collections.Immutable.IImmutableStack Push(T value); + } + + // Generated from `System.Collections.Immutable.ImmutableArray` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableArray + { + public static int BinarySearch(this System.Collections.Immutable.ImmutableArray array, int index, int length, T value, System.Collections.Generic.IComparer comparer) => throw null; + public static int BinarySearch(this System.Collections.Immutable.ImmutableArray array, int index, int length, T value) => throw null; + public static int BinarySearch(this System.Collections.Immutable.ImmutableArray array, T value, System.Collections.Generic.IComparer comparer) => throw null; + public static int BinarySearch(this System.Collections.Immutable.ImmutableArray array, T value) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(T[] items, int start, int length) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(T item1, T item2, T item3, T item4) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(T item1, T item2, T item3) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(T item1, T item2) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableArray Create(System.Collections.Immutable.ImmutableArray items, int start, int length) => throw null; + public static System.Collections.Immutable.ImmutableArray Create() => throw null; + public static System.Collections.Immutable.ImmutableArray.Builder CreateBuilder(int initialCapacity) => throw null; + public static System.Collections.Immutable.ImmutableArray.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableArray CreateRange(System.Collections.Immutable.ImmutableArray items, int start, int length, System.Func selector) => throw null; + public static System.Collections.Immutable.ImmutableArray CreateRange(System.Collections.Immutable.ImmutableArray items, System.Func selector) => throw null; + public static System.Collections.Immutable.ImmutableArray CreateRange(System.Collections.Immutable.ImmutableArray items, int start, int length, System.Func selector, TArg arg) => throw null; + public static System.Collections.Immutable.ImmutableArray CreateRange(System.Collections.Immutable.ImmutableArray items, System.Func selector, TArg arg) => throw null; + public static System.Collections.Immutable.ImmutableArray CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.ImmutableArray ToImmutableArray(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableArray ToImmutableArray(this System.Collections.Generic.IEnumerable items) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableArray<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImmutableArray : System.IEquatable>, System.Collections.Immutable.IImmutableList, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public static bool operator !=(System.Collections.Immutable.ImmutableArray? left, System.Collections.Immutable.ImmutableArray? right) => throw null; + public static bool operator !=(System.Collections.Immutable.ImmutableArray left, System.Collections.Immutable.ImmutableArray right) => throw null; + public static bool operator ==(System.Collections.Immutable.ImmutableArray? left, System.Collections.Immutable.ImmutableArray? right) => throw null; + public static bool operator ==(System.Collections.Immutable.ImmutableArray left, System.Collections.Immutable.ImmutableArray right) => throw null; + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public System.Collections.Immutable.ImmutableArray Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Add(T value) => throw null; + public System.Collections.Immutable.ImmutableArray AddRange(System.Collections.Immutable.ImmutableArray items) => throw null; + public System.Collections.Immutable.ImmutableArray AddRange(System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.AddRange(System.Collections.Generic.IEnumerable items) => throw null; + public System.Collections.Immutable.ImmutableArray As() where TOther : class => throw null; + public System.ReadOnlyMemory AsMemory() => throw null; + public System.ReadOnlySpan AsSpan() => throw null; + // Generated from `System.Collections.Immutable.ImmutableArray<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + public void AddRange(TDerived[] items) where TDerived : T => throw null; + public void AddRange(System.Collections.Immutable.ImmutableArray.Builder items) where TDerived : T => throw null; + public void AddRange(System.Collections.Immutable.ImmutableArray items) where TDerived : T => throw null; + public void AddRange(params T[] items) => throw null; + public void AddRange(T[] items, int length) => throw null; + public void AddRange(System.Collections.Immutable.ImmutableArray.Builder items) => throw null; + public void AddRange(System.Collections.Immutable.ImmutableArray items, int length) => throw null; + public void AddRange(System.Collections.Immutable.ImmutableArray items) => throw null; + public void AddRange(System.Collections.Generic.IEnumerable items) => throw null; + public int Capacity { get => throw null; set => throw null; } + public void Clear() => throw null; + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int IndexOf(T item, int startIndex, int count) => throw null; + public int IndexOf(T item, int startIndex) => throw null; + public int IndexOf(T item) => throw null; + public void Insert(int index, T item) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + public T ItemRef(int index) => throw null; + public int LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int LastIndexOf(T item, int startIndex, int count) => throw null; + public int LastIndexOf(T item, int startIndex) => throw null; + public int LastIndexOf(T item) => throw null; + public System.Collections.Immutable.ImmutableArray MoveToImmutable() => throw null; + public bool Remove(T element) => throw null; + public void RemoveAt(int index) => throw null; + public void Reverse() => throw null; + public void Sort(int index, int count, System.Collections.Generic.IComparer comparer) => throw null; + public void Sort(System.Comparison comparison) => throw null; + public void Sort(System.Collections.Generic.IComparer comparer) => throw null; + public void Sort() => throw null; + public T[] ToArray() => throw null; + public System.Collections.Immutable.ImmutableArray ToImmutable() => throw null; + } + + + public System.Collections.Immutable.ImmutableArray CastArray() where TOther : class => throw null; + public static System.Collections.Immutable.ImmutableArray CastUp(System.Collections.Immutable.ImmutableArray items) where TDerived : class, T => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public System.Collections.Immutable.ImmutableArray Clear() => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Clear() => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(int sourceIndex, T[] destination, int destinationIndex, int length) => throw null; + public void CopyTo(T[] destination, int destinationIndex) => throw null; + public void CopyTo(T[] destination) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + int System.Collections.Generic.IReadOnlyCollection.Count { get => throw null; } + int System.Collections.Generic.ICollection.Count { get => throw null; } + public static System.Collections.Immutable.ImmutableArray Empty; + // Generated from `System.Collections.Immutable.ImmutableArray<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public override bool Equals(object obj) => throw null; + public bool Equals(System.Collections.Immutable.ImmutableArray other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public System.Collections.Immutable.ImmutableArray.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + // Stub generator skipped constructor + public int IndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int IndexOf(T item, int startIndex, int count) => throw null; + public int IndexOf(T item, int startIndex, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int IndexOf(T item, int startIndex) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, T item) => throw null; + public System.Collections.Immutable.ImmutableArray Insert(int index, T item) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Insert(int index, T element) => throw null; + public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Immutable.ImmutableArray items) => throw null; + public System.Collections.Immutable.ImmutableArray InsertRange(int index, System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.InsertRange(int index, System.Collections.Generic.IEnumerable items) => throw null; + public bool IsDefault { get => throw null; } + public bool IsDefaultOrEmpty { get => throw null; } + public bool IsEmpty { get => throw null; } + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + T System.Collections.Generic.IReadOnlyList.this[int index] { get => throw null; } + T System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public T ItemRef(int index) => throw null; + public int LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int LastIndexOf(T item, int startIndex, int count) => throw null; + public int LastIndexOf(T item, int startIndex) => throw null; + public int LastIndexOf(T item) => throw null; + public int Length { get => throw null; } + public System.Collections.Generic.IEnumerable OfType() => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public System.Collections.Immutable.ImmutableArray Remove(T item, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray Remove(T item) => throw null; + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveAll(System.Predicate match) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveAll(System.Predicate match) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveAt(int index) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveAt(int index) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveRange(int index, int length) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveRange(System.Collections.Immutable.ImmutableArray items, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveRange(System.Collections.Immutable.ImmutableArray items) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray RemoveRange(System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveRange(int index, int count) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray Replace(T oldValue, T newValue) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableArray SetItem(int index, T item) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.SetItem(int index, T value) => throw null; + public System.Collections.Immutable.ImmutableArray Sort(int index, int count, System.Collections.Generic.IComparer comparer) => throw null; + public System.Collections.Immutable.ImmutableArray Sort(System.Comparison comparison) => throw null; + public System.Collections.Immutable.ImmutableArray Sort(System.Collections.Generic.IComparer comparer) => throw null; + public System.Collections.Immutable.ImmutableArray Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableArray.Builder ToBuilder() => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableDictionary` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableDictionary + { + public static bool Contains(this System.Collections.Immutable.IImmutableDictionary map, TKey key, TValue value) => throw null; + public static System.Collections.Immutable.ImmutableDictionary Create(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary Create(System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary Create() => throw null; + public static System.Collections.Immutable.ImmutableDictionary.Builder CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary.Builder CreateBuilder(System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableDictionary CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) => throw null; + public static System.Collections.Immutable.ImmutableDictionary CreateRange(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEnumerable> items) => throw null; + public static System.Collections.Immutable.ImmutableDictionary CreateRange(System.Collections.Generic.IEnumerable> items) => throw null; + public static TValue GetValueOrDefault(this System.Collections.Immutable.IImmutableDictionary dictionary, TKey key, TValue defaultValue) => throw null; + public static TValue GetValueOrDefault(this System.Collections.Immutable.IImmutableDictionary dictionary, TKey key) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Immutable.ImmutableDictionary.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable> source, System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable> source, System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable> source) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableDictionary ToImmutableDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableDictionary<,>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableDictionary : System.Collections.Immutable.IImmutableDictionary, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.IDictionary.Add(TKey key, TValue value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + public System.Collections.Immutable.ImmutableDictionary Add(TKey key, TValue value) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Add(TKey key, TValue value) => throw null; + public System.Collections.Immutable.ImmutableDictionary AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; + // Generated from `System.Collections.Immutable.ImmutableDictionary<,>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void AddRange(System.Collections.Generic.IEnumerable> items) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Immutable.ImmutableDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public TValue GetValueOrDefault(TKey key, TValue defaultValue) => throw null; + public TValue GetValueOrDefault(TKey key) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.IEqualityComparer KeyComparer { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public void RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableDictionary ToImmutable() => throw null; + public bool TryGetKey(TKey equalKey, out TKey actualKey) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.IEqualityComparer ValueComparer { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + + void System.Collections.IDictionary.Clear() => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + public System.Collections.Immutable.ImmutableDictionary Clear() => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair pair) => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public static System.Collections.Immutable.ImmutableDictionary Empty; + // Generated from `System.Collections.Immutable.ImmutableDictionary<,>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Collections.Immutable.ImmutableDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + TValue System.Collections.Generic.IDictionary.this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.IEqualityComparer KeyComparer { get => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public System.Collections.Immutable.ImmutableDictionary Remove(TKey key) => throw null; + bool System.Collections.Generic.IDictionary.Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Remove(TKey key) => throw null; + public System.Collections.Immutable.ImmutableDictionary RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + public System.Collections.Immutable.ImmutableDictionary SetItem(TKey key, TValue value) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.SetItem(TKey key, TValue value) => throw null; + public System.Collections.Immutable.ImmutableDictionary SetItems(System.Collections.Generic.IEnumerable> items) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.SetItems(System.Collections.Generic.IEnumerable> items) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableDictionary.Builder ToBuilder() => throw null; + public bool TryGetKey(TKey equalKey, out TKey actualKey) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.IEqualityComparer ValueComparer { get => throw null; } + public System.Collections.Generic.IEnumerable Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + public System.Collections.Immutable.ImmutableDictionary WithComparers(System.Collections.Generic.IEqualityComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public System.Collections.Immutable.ImmutableDictionary WithComparers(System.Collections.Generic.IEqualityComparer keyComparer) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableHashSet` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableHashSet + { + public static System.Collections.Immutable.ImmutableHashSet Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableHashSet Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer equalityComparer, params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer equalityComparer, T item) => throw null; + public static System.Collections.Immutable.ImmutableHashSet Create(System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public static System.Collections.Immutable.ImmutableHashSet Create() => throw null; + public static System.Collections.Immutable.ImmutableHashSet.Builder CreateBuilder(System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public static System.Collections.Immutable.ImmutableHashSet.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableHashSet CreateRange(System.Collections.Generic.IEqualityComparer equalityComparer, System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.ImmutableHashSet CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Immutable.ImmutableHashSet.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public static System.Collections.Immutable.ImmutableHashSet ToImmutableHashSet(this System.Collections.Generic.IEnumerable source) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableHashSet<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableHashSet : System.Collections.Immutable.IImmutableSet, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public System.Collections.Immutable.ImmutableHashSet Add(T item) => throw null; + bool System.Collections.Generic.ISet.Add(T item) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Add(T item) => throw null; + // Generated from `System.Collections.Immutable.ImmutableHashSet<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.IEqualityComparer KeyComparer { get => throw null; set => throw null; } + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet ToImmutable() => throw null; + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + + void System.Collections.Generic.ICollection.Clear() => throw null; + public System.Collections.Immutable.ImmutableHashSet Clear() => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Clear() => throw null; + public bool Contains(T item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public static System.Collections.Immutable.ImmutableHashSet Empty; + // Generated from `System.Collections.Immutable.ImmutableHashSet<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Collections.Immutable.ImmutableHashSet Except(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Except(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Immutable.ImmutableHashSet Intersect(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Intersect(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsEmpty { get => throw null; } + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Collections.Generic.IEqualityComparer KeyComparer { get => throw null; } + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet Remove(T item) => throw null; + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Remove(T item) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet SymmetricExcept(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableHashSet.Builder ToBuilder() => throw null; + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public System.Collections.Immutable.ImmutableHashSet Union(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Union(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableHashSet WithComparer(System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableInterlocked` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableInterlocked + { + public static TValue AddOrUpdate(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, TValue addValue, System.Func updateValueFactory) => throw null; + public static TValue AddOrUpdate(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, System.Func addValueFactory, System.Func updateValueFactory) => throw null; + public static void Enqueue(ref System.Collections.Immutable.ImmutableQueue location, T value) => throw null; + public static TValue GetOrAdd(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, TValue value) => throw null; + public static TValue GetOrAdd(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, System.Func valueFactory) => throw null; + public static TValue GetOrAdd(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, System.Func valueFactory, TArg factoryArgument) => throw null; + public static System.Collections.Immutable.ImmutableArray InterlockedCompareExchange(ref System.Collections.Immutable.ImmutableArray location, System.Collections.Immutable.ImmutableArray value, System.Collections.Immutable.ImmutableArray comparand) => throw null; + public static System.Collections.Immutable.ImmutableArray InterlockedExchange(ref System.Collections.Immutable.ImmutableArray location, System.Collections.Immutable.ImmutableArray value) => throw null; + public static bool InterlockedInitialize(ref System.Collections.Immutable.ImmutableArray location, System.Collections.Immutable.ImmutableArray value) => throw null; + public static void Push(ref System.Collections.Immutable.ImmutableStack location, T value) => throw null; + public static bool TryAdd(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, TValue value) => throw null; + public static bool TryDequeue(ref System.Collections.Immutable.ImmutableQueue location, out T value) => throw null; + public static bool TryPop(ref System.Collections.Immutable.ImmutableStack location, out T value) => throw null; + public static bool TryRemove(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, out TValue value) => throw null; + public static bool TryUpdate(ref System.Collections.Immutable.ImmutableDictionary location, TKey key, TValue newValue, TValue comparisonValue) => throw null; + public static bool Update(ref T location, System.Func transformer) where T : class => throw null; + public static bool Update(ref System.Collections.Immutable.ImmutableArray location, System.Func, System.Collections.Immutable.ImmutableArray> transformer) => throw null; + public static bool Update(ref T location, System.Func transformer, TArg transformerArgument) where T : class => throw null; + public static bool Update(ref System.Collections.Immutable.ImmutableArray location, System.Func, TArg, System.Collections.Immutable.ImmutableArray> transformer, TArg transformerArgument) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableList` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableList + { + public static System.Collections.Immutable.ImmutableList Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableList Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableList Create() => throw null; + public static System.Collections.Immutable.ImmutableList.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableList CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item, int startIndex, int count) => throw null; + public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item, int startIndex) => throw null; + public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public static int IndexOf(this System.Collections.Immutable.IImmutableList list, T item) => throw null; + public static int LastIndexOf(this System.Collections.Immutable.IImmutableList list, T item, int startIndex, int count) => throw null; + public static int LastIndexOf(this System.Collections.Immutable.IImmutableList list, T item, int startIndex) => throw null; + public static int LastIndexOf(this System.Collections.Immutable.IImmutableList list, T item, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public static int LastIndexOf(this System.Collections.Immutable.IImmutableList list, T item) => throw null; + public static System.Collections.Immutable.IImmutableList Remove(this System.Collections.Immutable.IImmutableList list, T value) => throw null; + public static System.Collections.Immutable.IImmutableList RemoveRange(this System.Collections.Immutable.IImmutableList list, System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.IImmutableList Replace(this System.Collections.Immutable.IImmutableList list, T oldValue, T newValue) => throw null; + public static System.Collections.Immutable.ImmutableList ToImmutableList(this System.Collections.Immutable.ImmutableList.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableList ToImmutableList(this System.Collections.Generic.IEnumerable source) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableList<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableList : System.Collections.Immutable.IImmutableList, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public System.Collections.Immutable.ImmutableList Add(T value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Add(T value) => throw null; + public System.Collections.Immutable.ImmutableList AddRange(System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.AddRange(System.Collections.Generic.IEnumerable items) => throw null; + public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item) => throw null; + // Generated from `System.Collections.Immutable.ImmutableList<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void AddRange(System.Collections.Generic.IEnumerable items) => throw null; + public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item) => throw null; + void System.Collections.IList.Clear() => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public System.Collections.Immutable.ImmutableList ConvertAll(System.Func converter) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(int index, T[] array, int arrayIndex, int count) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public void CopyTo(T[] array) => throw null; + public int Count { get => throw null; } + public bool Exists(System.Predicate match) => throw null; + public T Find(System.Predicate match) => throw null; + public System.Collections.Immutable.ImmutableList FindAll(System.Predicate match) => throw null; + public int FindIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindIndex(int startIndex, System.Predicate match) => throw null; + public int FindIndex(System.Predicate match) => throw null; + public T FindLast(System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, System.Predicate match) => throw null; + public int FindLastIndex(System.Predicate match) => throw null; + public void ForEach(System.Action action) => throw null; + public System.Collections.Immutable.ImmutableList.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Immutable.ImmutableList GetRange(int index, int count) => throw null; + public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int IndexOf(T item, int index, int count) => throw null; + public int IndexOf(T item, int index) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + public void InsertRange(int index, System.Collections.Generic.IEnumerable items) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public T ItemRef(int index) => throw null; + public int LastIndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public int LastIndexOf(T item, int startIndex, int count) => throw null; + public int LastIndexOf(T item, int startIndex) => throw null; + public int LastIndexOf(T item) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public int RemoveAll(System.Predicate match) => throw null; + public void RemoveAt(int index) => throw null; + public void Reverse(int index, int count) => throw null; + public void Reverse() => throw null; + public void Sort(int index, int count, System.Collections.Generic.IComparer comparer) => throw null; + public void Sort(System.Comparison comparison) => throw null; + public void Sort(System.Collections.Generic.IComparer comparer) => throw null; + public void Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableList ToImmutable() => throw null; + public bool TrueForAll(System.Predicate match) => throw null; + } + + + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public System.Collections.Immutable.ImmutableList Clear() => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Clear() => throw null; + public bool Contains(T value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public System.Collections.Immutable.ImmutableList ConvertAll(System.Func converter) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(int index, T[] array, int arrayIndex, int count) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public void CopyTo(T[] array) => throw null; + public int Count { get => throw null; } + public static System.Collections.Immutable.ImmutableList Empty; + // Generated from `System.Collections.Immutable.ImmutableList<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public bool Exists(System.Predicate match) => throw null; + public T Find(System.Predicate match) => throw null; + public System.Collections.Immutable.ImmutableList FindAll(System.Predicate match) => throw null; + public int FindIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindIndex(int startIndex, System.Predicate match) => throw null; + public int FindIndex(System.Predicate match) => throw null; + public T FindLast(System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, System.Predicate match) => throw null; + public int FindLastIndex(System.Predicate match) => throw null; + public void ForEach(System.Action action) => throw null; + public System.Collections.Immutable.ImmutableList.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Immutable.ImmutableList GetRange(int index, int count) => throw null; + public int IndexOf(T value) => throw null; + public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, T item) => throw null; + public System.Collections.Immutable.ImmutableList Insert(int index, T item) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Insert(int index, T item) => throw null; + public System.Collections.Immutable.ImmutableList InsertRange(int index, System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.InsertRange(int index, System.Collections.Generic.IEnumerable items) => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + T System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public T ItemRef(int index) => throw null; + public int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public System.Collections.Immutable.ImmutableList Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList Remove(T value) => throw null; + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Remove(T value, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList RemoveAll(System.Predicate match) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveAll(System.Predicate match) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public System.Collections.Immutable.ImmutableList RemoveAt(int index) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveAt(int index) => throw null; + public System.Collections.Immutable.ImmutableList RemoveRange(int index, int count) => throw null; + public System.Collections.Immutable.ImmutableList RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList RemoveRange(System.Collections.Generic.IEnumerable items) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveRange(int index, int count) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.RemoveRange(System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList Replace(T oldValue, T newValue) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public System.Collections.Immutable.ImmutableList Reverse(int index, int count) => throw null; + public System.Collections.Immutable.ImmutableList Reverse() => throw null; + public System.Collections.Immutable.ImmutableList SetItem(int index, T value) => throw null; + System.Collections.Immutable.IImmutableList System.Collections.Immutable.IImmutableList.SetItem(int index, T value) => throw null; + public System.Collections.Immutable.ImmutableList Sort(int index, int count, System.Collections.Generic.IComparer comparer) => throw null; + public System.Collections.Immutable.ImmutableList Sort(System.Comparison comparison) => throw null; + public System.Collections.Immutable.ImmutableList Sort(System.Collections.Generic.IComparer comparer) => throw null; + public System.Collections.Immutable.ImmutableList Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableList.Builder ToBuilder() => throw null; + public bool TrueForAll(System.Predicate match) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableQueue` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableQueue + { + public static System.Collections.Immutable.ImmutableQueue Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableQueue Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableQueue Create() => throw null; + public static System.Collections.Immutable.ImmutableQueue CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.IImmutableQueue Dequeue(this System.Collections.Immutable.IImmutableQueue queue, out T value) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableQueue<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableQueue : System.Collections.Immutable.IImmutableQueue, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Immutable.ImmutableQueue Clear() => throw null; + System.Collections.Immutable.IImmutableQueue System.Collections.Immutable.IImmutableQueue.Clear() => throw null; + public System.Collections.Immutable.ImmutableQueue Dequeue(out T value) => throw null; + public System.Collections.Immutable.ImmutableQueue Dequeue() => throw null; + System.Collections.Immutable.IImmutableQueue System.Collections.Immutable.IImmutableQueue.Dequeue() => throw null; + public static System.Collections.Immutable.ImmutableQueue Empty { get => throw null; } + public System.Collections.Immutable.ImmutableQueue Enqueue(T value) => throw null; + System.Collections.Immutable.IImmutableQueue System.Collections.Immutable.IImmutableQueue.Enqueue(T value) => throw null; + // Generated from `System.Collections.Immutable.ImmutableQueue<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public System.Collections.Immutable.ImmutableQueue.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + public T Peek() => throw null; + public T PeekRef() => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableSortedDictionary + { + public static System.Collections.Immutable.ImmutableSortedDictionary Create(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary Create(System.Collections.Generic.IComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary Create() => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary.Builder CreateBuilder(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary.Builder CreateBuilder(System.Collections.Generic.IComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary CreateRange(System.Collections.Generic.IEnumerable> items) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer, System.Collections.Generic.IEnumerable> items) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary CreateRange(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEnumerable> items) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Immutable.ImmutableSortedDictionary.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable> source, System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable> source, System.Collections.Generic.IComparer keyComparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedDictionary ToImmutableSortedDictionary(this System.Collections.Generic.IEnumerable> source) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableSortedDictionary : System.Collections.Immutable.IImmutableDictionary, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.IDictionary.Add(TKey key, TValue value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary Add(TKey key, TValue value) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Add(TKey key, TValue value) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary AddRange(System.Collections.Generic.IEnumerable> items) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void AddRange(System.Collections.Generic.IEnumerable> items) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Immutable.ImmutableSortedDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public TValue GetValueOrDefault(TKey key, TValue defaultValue) => throw null; + public TValue GetValueOrDefault(TKey key) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.IComparer KeyComparer { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public void RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableSortedDictionary ToImmutable() => throw null; + public bool TryGetKey(TKey equalKey, out TKey actualKey) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.IEqualityComparer ValueComparer { get => throw null; set => throw null; } + public TValue ValueRef(TKey key) => throw null; + public System.Collections.Generic.IEnumerable Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + + void System.Collections.IDictionary.Clear() => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary Clear() => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair pair) => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public static System.Collections.Immutable.ImmutableSortedDictionary Empty; + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Collections.Immutable.ImmutableSortedDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + TValue System.Collections.Generic.IDictionary.this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.IComparer KeyComparer { get => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary Remove(TKey value) => throw null; + bool System.Collections.Generic.IDictionary.Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Remove(TKey key) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.RemoveRange(System.Collections.Generic.IEnumerable keys) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary SetItem(TKey key, TValue value) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.SetItem(TKey key, TValue value) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary SetItems(System.Collections.Generic.IEnumerable> items) => throw null; + System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.SetItems(System.Collections.Generic.IEnumerable> items) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableSortedDictionary.Builder ToBuilder() => throw null; + public bool TryGetKey(TKey equalKey, out TKey actualKey) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.IEqualityComparer ValueComparer { get => throw null; } + public TValue ValueRef(TKey key) => throw null; + public System.Collections.Generic.IEnumerable Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + public System.Collections.Immutable.ImmutableSortedDictionary WithComparers(System.Collections.Generic.IComparer keyComparer, System.Collections.Generic.IEqualityComparer valueComparer) => throw null; + public System.Collections.Immutable.ImmutableSortedDictionary WithComparers(System.Collections.Generic.IComparer keyComparer) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableSortedSet` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableSortedSet + { + public static System.Collections.Immutable.ImmutableSortedSet Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer comparer, params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer comparer, T item) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet Create(System.Collections.Generic.IComparer comparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet Create() => throw null; + public static System.Collections.Immutable.ImmutableSortedSet.Builder CreateBuilder(System.Collections.Generic.IComparer comparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet.Builder CreateBuilder() => throw null; + public static System.Collections.Immutable.ImmutableSortedSet CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet CreateRange(System.Collections.Generic.IComparer comparer, System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Immutable.ImmutableSortedSet.Builder builder) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Collections.Immutable.ImmutableSortedSet ToImmutableSortedSet(this System.Collections.Generic.IEnumerable source) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableSortedSet<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableSortedSet : System.Collections.Immutable.IImmutableSet, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public System.Collections.Immutable.ImmutableSortedSet Add(T value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + bool System.Collections.Generic.ISet.Add(T item) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Add(T value) => throw null; + // Generated from `System.Collections.Immutable.ImmutableSortedSet<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Builder : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableSortedSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; } + public T ItemRef(int index) => throw null; + public System.Collections.Generic.IComparer KeyComparer { get => throw null; set => throw null; } + public T Max { get => throw null; } + public T Min { get => throw null; } + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public System.Collections.Generic.IEnumerable Reverse() => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableSortedSet ToImmutable() => throw null; + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public System.Collections.Immutable.ImmutableSortedSet Clear() => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Clear() => throw null; + public bool Contains(T value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public static System.Collections.Immutable.ImmutableSortedSet Empty; + // Generated from `System.Collections.Immutable.ImmutableSortedSet<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Collections.Immutable.ImmutableSortedSet Except(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Except(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableSortedSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, T item) => throw null; + public System.Collections.Immutable.ImmutableSortedSet Intersect(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Intersect(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsEmpty { get => throw null; } + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + T System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public T ItemRef(int index) => throw null; + public System.Collections.Generic.IComparer KeyComparer { get => throw null; } + public T Max { get => throw null; } + public T Min { get => throw null; } + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public System.Collections.Immutable.ImmutableSortedSet Remove(T value) => throw null; + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Remove(T value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public System.Collections.Generic.IEnumerable Reverse() => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableSortedSet SymmetricExcept(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.SymmetricExcept(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.Immutable.ImmutableSortedSet.Builder ToBuilder() => throw null; + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public System.Collections.Immutable.ImmutableSortedSet Union(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Union(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Immutable.ImmutableSortedSet WithComparer(System.Collections.Generic.IComparer comparer) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableStack` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableStack + { + public static System.Collections.Immutable.ImmutableStack Create(params T[] items) => throw null; + public static System.Collections.Immutable.ImmutableStack Create(T item) => throw null; + public static System.Collections.Immutable.ImmutableStack Create() => throw null; + public static System.Collections.Immutable.ImmutableStack CreateRange(System.Collections.Generic.IEnumerable items) => throw null; + public static System.Collections.Immutable.IImmutableStack Pop(this System.Collections.Immutable.IImmutableStack stack, out T value) => throw null; + } + + // Generated from `System.Collections.Immutable.ImmutableStack<>` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableStack : System.Collections.Immutable.IImmutableStack, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Immutable.ImmutableStack Clear() => throw null; + System.Collections.Immutable.IImmutableStack System.Collections.Immutable.IImmutableStack.Clear() => throw null; + public static System.Collections.Immutable.ImmutableStack Empty { get => throw null; } + // Generated from `System.Collections.Immutable.ImmutableStack<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public System.Collections.Immutable.ImmutableStack.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool IsEmpty { get => throw null; } + public T Peek() => throw null; + public T PeekRef() => throw null; + public System.Collections.Immutable.ImmutableStack Pop(out T value) => throw null; + public System.Collections.Immutable.ImmutableStack Pop() => throw null; + System.Collections.Immutable.IImmutableStack System.Collections.Immutable.IImmutableStack.Pop() => throw null; + public System.Collections.Immutable.ImmutableStack Push(T value) => throw null; + System.Collections.Immutable.IImmutableStack System.Collections.Immutable.IImmutableStack.Push(T value) => throw null; + } + + } + } + namespace Linq + { + // Generated from `System.Linq.ImmutableArrayExtensions` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ImmutableArrayExtensions + { + public static TResult Aggregate(this System.Collections.Immutable.ImmutableArray immutableArray, TAccumulate seed, System.Func func, System.Func resultSelector) => throw null; + public static TAccumulate Aggregate(this System.Collections.Immutable.ImmutableArray immutableArray, TAccumulate seed, System.Func func) => throw null; + public static T Aggregate(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func func) => throw null; + public static bool All(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static bool Any(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static bool Any(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static bool Any(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T ElementAt(this System.Collections.Immutable.ImmutableArray immutableArray, int index) => throw null; + public static T ElementAtOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray, int index) => throw null; + public static T First(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static T First(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T First(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T FirstOrDefault(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static T FirstOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T FirstOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T Last(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static T Last(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T Last(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T LastOrDefault(this System.Collections.Immutable.ImmutableArray.Builder builder) => throw null; + public static T LastOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T LastOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static System.Collections.Generic.IEnumerable Select(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func selector) => throw null; + public static System.Collections.Generic.IEnumerable SelectMany(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func> collectionSelector, System.Func resultSelector) => throw null; + public static bool SequenceEqual(this System.Collections.Immutable.ImmutableArray immutableArray, System.Collections.Immutable.ImmutableArray items, System.Func predicate) where TDerived : TBase => throw null; + public static bool SequenceEqual(this System.Collections.Immutable.ImmutableArray immutableArray, System.Collections.Immutable.ImmutableArray items, System.Collections.Generic.IEqualityComparer comparer = default(System.Collections.Generic.IEqualityComparer)) where TDerived : TBase => throw null; + public static bool SequenceEqual(this System.Collections.Immutable.ImmutableArray immutableArray, System.Collections.Generic.IEnumerable items, System.Collections.Generic.IEqualityComparer comparer = default(System.Collections.Generic.IEqualityComparer)) where TDerived : TBase => throw null; + public static T Single(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T Single(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T SingleOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + public static T SingleOrDefault(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static T[] ToArray(this System.Collections.Immutable.ImmutableArray immutableArray) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func keySelector) => throw null; + public static System.Collections.Generic.IEnumerable Where(this System.Collections.Immutable.ImmutableArray immutableArray, System.Func predicate) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs new file mode 100644 index 000000000000..e1cf40b37497 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs @@ -0,0 +1,204 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + // Generated from `System.Collections.CaseInsensitiveComparer` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CaseInsensitiveComparer : System.Collections.IComparer + { + public CaseInsensitiveComparer(System.Globalization.CultureInfo culture) => throw null; + public CaseInsensitiveComparer() => throw null; + public int Compare(object a, object b) => throw null; + public static System.Collections.CaseInsensitiveComparer Default { get => throw null; } + public static System.Collections.CaseInsensitiveComparer DefaultInvariant { get => throw null; } + } + + // Generated from `System.Collections.CaseInsensitiveHashCodeProvider` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CaseInsensitiveHashCodeProvider : System.Collections.IHashCodeProvider + { + public CaseInsensitiveHashCodeProvider(System.Globalization.CultureInfo culture) => throw null; + public CaseInsensitiveHashCodeProvider() => throw null; + public static System.Collections.CaseInsensitiveHashCodeProvider Default { get => throw null; } + public static System.Collections.CaseInsensitiveHashCodeProvider DefaultInvariant { get => throw null; } + public int GetHashCode(object obj) => throw null; + } + + // Generated from `System.Collections.CollectionBase` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CollectionBase : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + public int Capacity { get => throw null; set => throw null; } + public void Clear() => throw null; + protected CollectionBase(int capacity) => throw null; + protected CollectionBase() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + protected System.Collections.ArrayList InnerList { get => throw null; } + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + protected System.Collections.IList List { get => throw null; } + protected virtual void OnClear() => throw null; + protected virtual void OnClearComplete() => throw null; + protected virtual void OnInsert(int index, object value) => throw null; + protected virtual void OnInsertComplete(int index, object value) => throw null; + protected virtual void OnRemove(int index, object value) => throw null; + protected virtual void OnRemoveComplete(int index, object value) => throw null; + protected virtual void OnSet(int index, object oldValue, object newValue) => throw null; + protected virtual void OnSetComplete(int index, object oldValue, object newValue) => throw null; + protected virtual void OnValidate(object value) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.DictionaryBase` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DictionaryBase : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + public void Clear() => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + protected System.Collections.IDictionary Dictionary { get => throw null; } + protected DictionaryBase() => throw null; + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + protected System.Collections.Hashtable InnerHashtable { get => throw null; } + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + protected virtual void OnClear() => throw null; + protected virtual void OnClearComplete() => throw null; + protected virtual object OnGet(object key, object currentValue) => throw null; + protected virtual void OnInsert(object key, object value) => throw null; + protected virtual void OnInsertComplete(object key, object value) => throw null; + protected virtual void OnRemove(object key, object value) => throw null; + protected virtual void OnRemoveComplete(object key, object value) => throw null; + protected virtual void OnSet(object key, object oldValue, object newValue) => throw null; + protected virtual void OnSetComplete(object key, object oldValue, object newValue) => throw null; + protected virtual void OnValidate(object key, object value) => throw null; + void System.Collections.IDictionary.Remove(object key) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.Queue` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Queue : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection + { + public virtual void Clear() => throw null; + public virtual object Clone() => throw null; + public virtual bool Contains(object obj) => throw null; + public virtual void CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual object Dequeue() => throw null; + public virtual void Enqueue(object obj) => throw null; + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual bool IsSynchronized { get => throw null; } + public virtual object Peek() => throw null; + public Queue(int capacity, float growFactor) => throw null; + public Queue(int capacity) => throw null; + public Queue(System.Collections.ICollection col) => throw null; + public Queue() => throw null; + public virtual object SyncRoot { get => throw null; } + public static System.Collections.Queue Synchronized(System.Collections.Queue queue) => throw null; + public virtual object[] ToArray() => throw null; + public virtual void TrimToSize() => throw null; + } + + // Generated from `System.Collections.ReadOnlyCollectionBase` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ReadOnlyCollectionBase : System.Collections.IEnumerable, System.Collections.ICollection + { + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + protected System.Collections.ArrayList InnerList { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + protected ReadOnlyCollectionBase() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.SortedList` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortedList : System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public virtual void Add(object key, object value) => throw null; + public virtual int Capacity { get => throw null; set => throw null; } + public virtual void Clear() => throw null; + public virtual object Clone() => throw null; + public virtual bool Contains(object key) => throw null; + public virtual bool ContainsKey(object key) => throw null; + public virtual bool ContainsValue(object value) => throw null; + public virtual void CopyTo(System.Array array, int arrayIndex) => throw null; + public virtual int Count { get => throw null; } + public virtual object GetByIndex(int index) => throw null; + public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual object GetKey(int index) => throw null; + public virtual System.Collections.IList GetKeyList() => throw null; + public virtual System.Collections.IList GetValueList() => throw null; + public virtual int IndexOfKey(object key) => throw null; + public virtual int IndexOfValue(object value) => throw null; + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public virtual bool IsSynchronized { get => throw null; } + public virtual object this[object key] { get => throw null; set => throw null; } + public virtual System.Collections.ICollection Keys { get => throw null; } + public virtual void Remove(object key) => throw null; + public virtual void RemoveAt(int index) => throw null; + public virtual void SetByIndex(int index, object value) => throw null; + public SortedList(int initialCapacity) => throw null; + public SortedList(System.Collections.IDictionary d, System.Collections.IComparer comparer) => throw null; + public SortedList(System.Collections.IDictionary d) => throw null; + public SortedList(System.Collections.IComparer comparer, int capacity) => throw null; + public SortedList(System.Collections.IComparer comparer) => throw null; + public SortedList() => throw null; + public virtual object SyncRoot { get => throw null; } + public static System.Collections.SortedList Synchronized(System.Collections.SortedList list) => throw null; + public virtual void TrimToSize() => throw null; + public virtual System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Collections.Stack` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Stack : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection + { + public virtual void Clear() => throw null; + public virtual object Clone() => throw null; + public virtual bool Contains(object obj) => throw null; + public virtual void CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual bool IsSynchronized { get => throw null; } + public virtual object Peek() => throw null; + public virtual object Pop() => throw null; + public virtual void Push(object obj) => throw null; + public Stack(int initialCapacity) => throw null; + public Stack(System.Collections.ICollection col) => throw null; + public Stack() => throw null; + public virtual object SyncRoot { get => throw null; } + public static System.Collections.Stack Synchronized(System.Collections.Stack stack) => throw null; + public virtual object[] ToArray() => throw null; + } + + namespace Specialized + { + // Generated from `System.Collections.Specialized.CollectionsUtil` in `System.Collections.NonGeneric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CollectionsUtil + { + public CollectionsUtil() => throw null; + public static System.Collections.Hashtable CreateCaseInsensitiveHashtable(int capacity) => throw null; + public static System.Collections.Hashtable CreateCaseInsensitiveHashtable(System.Collections.IDictionary d) => throw null; + public static System.Collections.Hashtable CreateCaseInsensitiveHashtable() => throw null; + public static System.Collections.SortedList CreateCaseInsensitiveSortedList() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs new file mode 100644 index 000000000000..5bdaf60125a3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs @@ -0,0 +1,268 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + namespace Specialized + { + // Generated from `System.Collections.Specialized.BitVector32` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BitVector32 + { + public BitVector32(int data) => throw null; + public BitVector32(System.Collections.Specialized.BitVector32 value) => throw null; + // Stub generator skipped constructor + public static int CreateMask(int previous) => throw null; + public static int CreateMask() => throw null; + public static System.Collections.Specialized.BitVector32.Section CreateSection(System.Int16 maxValue, System.Collections.Specialized.BitVector32.Section previous) => throw null; + public static System.Collections.Specialized.BitVector32.Section CreateSection(System.Int16 maxValue) => throw null; + public int Data { get => throw null; } + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public int this[System.Collections.Specialized.BitVector32.Section section] { get => throw null; set => throw null; } + public bool this[int bit] { get => throw null; set => throw null; } + // Generated from `System.Collections.Specialized.BitVector32.Section` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Section + { + public static bool operator !=(System.Collections.Specialized.BitVector32.Section a, System.Collections.Specialized.BitVector32.Section b) => throw null; + public static bool operator ==(System.Collections.Specialized.BitVector32.Section a, System.Collections.Specialized.BitVector32.Section b) => throw null; + public override bool Equals(object o) => throw null; + public bool Equals(System.Collections.Specialized.BitVector32.Section obj) => throw null; + public override int GetHashCode() => throw null; + public System.Int16 Mask { get => throw null; } + public System.Int16 Offset { get => throw null; } + // Stub generator skipped constructor + public static string ToString(System.Collections.Specialized.BitVector32.Section value) => throw null; + public override string ToString() => throw null; + } + + + public static string ToString(System.Collections.Specialized.BitVector32 value) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Collections.Specialized.HybridDictionary` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HybridDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object value) => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public HybridDictionary(int initialSize, bool caseInsensitive) => throw null; + public HybridDictionary(int initialSize) => throw null; + public HybridDictionary(bool caseInsensitive) => throw null; + public HybridDictionary() => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + public void Remove(object key) => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Collections.Specialized.IOrderedDictionary` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IOrderedDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + System.Collections.IDictionaryEnumerator GetEnumerator(); + void Insert(int index, object key, object value); + object this[int index] { get; set; } + void RemoveAt(int index); + } + + // Generated from `System.Collections.Specialized.ListDictionary` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object value) => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + public ListDictionary(System.Collections.IComparer comparer) => throw null; + public ListDictionary() => throw null; + public void Remove(object key) => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Collections.Specialized.NameObjectCollectionBase` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class NameObjectCollectionBase : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection + { + protected void BaseAdd(string name, object value) => throw null; + protected void BaseClear() => throw null; + protected object BaseGet(string name) => throw null; + protected object BaseGet(int index) => throw null; + protected string[] BaseGetAllKeys() => throw null; + protected object[] BaseGetAllValues(System.Type type) => throw null; + protected object[] BaseGetAllValues() => throw null; + protected string BaseGetKey(int index) => throw null; + protected bool BaseHasKeys() => throw null; + protected void BaseRemove(string name) => throw null; + protected void BaseRemoveAt(int index) => throw null; + protected void BaseSet(string name, object value) => throw null; + protected void BaseSet(int index, object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected bool IsReadOnly { get => throw null; set => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get => throw null; } + // Generated from `System.Collections.Specialized.NameObjectCollectionBase.KeysCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeysCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public virtual string Get(int index) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public string this[int index] { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + protected NameObjectCollectionBase(int capacity, System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer) => throw null; + protected NameObjectCollectionBase(int capacity, System.Collections.IEqualityComparer equalityComparer) => throw null; + protected NameObjectCollectionBase(int capacity) => throw null; + protected NameObjectCollectionBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected NameObjectCollectionBase(System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer) => throw null; + protected NameObjectCollectionBase(System.Collections.IEqualityComparer equalityComparer) => throw null; + protected NameObjectCollectionBase() => throw null; + public virtual void OnDeserialization(object sender) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.Specialized.NameValueCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NameValueCollection : System.Collections.Specialized.NameObjectCollectionBase + { + public void Add(System.Collections.Specialized.NameValueCollection c) => throw null; + public virtual void Add(string name, string value) => throw null; + public virtual string[] AllKeys { get => throw null; } + public virtual void Clear() => throw null; + public void CopyTo(System.Array dest, int index) => throw null; + public virtual string Get(string name) => throw null; + public virtual string Get(int index) => throw null; + public virtual string GetKey(int index) => throw null; + public virtual string[] GetValues(string name) => throw null; + public virtual string[] GetValues(int index) => throw null; + public bool HasKeys() => throw null; + protected void InvalidateCachedArrays() => throw null; + public string this[string name] { get => throw null; set => throw null; } + public string this[int index] { get => throw null; } + public NameValueCollection(int capacity, System.Collections.Specialized.NameValueCollection col) => throw null; + public NameValueCollection(int capacity, System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer) => throw null; + public NameValueCollection(int capacity, System.Collections.IEqualityComparer equalityComparer) => throw null; + public NameValueCollection(int capacity) => throw null; + public NameValueCollection(System.Collections.Specialized.NameValueCollection col) => throw null; + public NameValueCollection(System.Collections.IHashCodeProvider hashProvider, System.Collections.IComparer comparer) => throw null; + public NameValueCollection(System.Collections.IEqualityComparer equalityComparer) => throw null; + public NameValueCollection() => throw null; + protected NameValueCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual void Remove(string name) => throw null; + public virtual void Set(string name, string value) => throw null; + } + + // Generated from `System.Collections.Specialized.OrderedDictionary` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OrderedDictionary : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.Specialized.IOrderedDictionary, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object value) => throw null; + public System.Collections.Specialized.OrderedDictionary AsReadOnly() => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void Insert(int index, object key, object value) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public object this[int index] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + protected virtual void OnDeserialization(object sender) => throw null; + public OrderedDictionary(int capacity, System.Collections.IEqualityComparer comparer) => throw null; + public OrderedDictionary(int capacity) => throw null; + public OrderedDictionary(System.Collections.IEqualityComparer comparer) => throw null; + public OrderedDictionary() => throw null; + protected OrderedDictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void Remove(object key) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Collections.Specialized.StringCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(string value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void AddRange(string[] value) => throw null; + public void Clear() => throw null; + public bool Contains(string value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(string[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Specialized.StringEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(string value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, string value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public string this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public void Remove(string value) => throw null; + public void RemoveAt(int index) => throw null; + public StringCollection() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.Specialized.StringDictionary` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringDictionary : System.Collections.IEnumerable + { + public virtual void Add(string key, string value) => throw null; + public virtual void Clear() => throw null; + public virtual bool ContainsKey(string key) => throw null; + public virtual bool ContainsValue(string value) => throw null; + public virtual void CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual bool IsSynchronized { get => throw null; } + public virtual string this[string key] { get => throw null; set => throw null; } + public virtual System.Collections.ICollection Keys { get => throw null; } + public virtual void Remove(string key) => throw null; + public StringDictionary() => throw null; + public virtual object SyncRoot { get => throw null; } + public virtual System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Collections.Specialized.StringEnumerator` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringEnumerator + { + public string Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs new file mode 100644 index 000000000000..02ecbc46267b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs @@ -0,0 +1,732 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + // Generated from `System.Collections.BitArray` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BitArray : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection + { + public System.Collections.BitArray And(System.Collections.BitArray value) => throw null; + public BitArray(int[] values) => throw null; + public BitArray(int length, bool defaultValue) => throw null; + public BitArray(int length) => throw null; + public BitArray(bool[] values) => throw null; + public BitArray(System.Collections.BitArray bits) => throw null; + public BitArray(System.Byte[] bytes) => throw null; + public object Clone() => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public bool Get(int index) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public bool this[int index] { get => throw null; set => throw null; } + public System.Collections.BitArray LeftShift(int count) => throw null; + public int Length { get => throw null; set => throw null; } + public System.Collections.BitArray Not() => throw null; + public System.Collections.BitArray Or(System.Collections.BitArray value) => throw null; + public System.Collections.BitArray RightShift(int count) => throw null; + public void Set(int index, bool value) => throw null; + public void SetAll(bool value) => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.BitArray Xor(System.Collections.BitArray value) => throw null; + } + + // Generated from `System.Collections.StructuralComparisons` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class StructuralComparisons + { + public static System.Collections.IComparer StructuralComparer { get => throw null; } + public static System.Collections.IEqualityComparer StructuralEqualityComparer { get => throw null; } + } + + namespace Generic + { + // Generated from `System.Collections.Generic.CollectionExtensions` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CollectionExtensions + { + public static TValue GetValueOrDefault(this System.Collections.Generic.IReadOnlyDictionary dictionary, TKey key, TValue defaultValue) => throw null; + public static TValue GetValueOrDefault(this System.Collections.Generic.IReadOnlyDictionary dictionary, TKey key) => throw null; + public static bool Remove(this System.Collections.Generic.IDictionary dictionary, TKey key, out TValue value) => throw null; + public static bool TryAdd(this System.Collections.Generic.IDictionary dictionary, TKey key, TValue value) => throw null; + } + + // Generated from `System.Collections.Generic.Comparer<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Comparer : System.Collections.IComparer, System.Collections.Generic.IComparer + { + public abstract int Compare(T x, T y); + int System.Collections.IComparer.Compare(object x, object y) => throw null; + protected Comparer() => throw null; + public static System.Collections.Generic.Comparer Create(System.Comparison comparison) => throw null; + public static System.Collections.Generic.Comparer Default { get => throw null; } + } + + // Generated from `System.Collections.Generic.Dictionary<,>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Dictionary : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void Add(TKey key, TValue value) => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IEqualityComparer Comparer { get => throw null; } + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) => throw null; + public int Count { get => throw null; } + public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public Dictionary(int capacity) => throw null; + public Dictionary(System.Collections.Generic.IEqualityComparer comparer) => throw null; + public Dictionary(System.Collections.Generic.IEnumerable> collection, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public Dictionary(System.Collections.Generic.IEnumerable> collection) => throw null; + public Dictionary(System.Collections.Generic.IDictionary dictionary, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public Dictionary(System.Collections.Generic.IDictionary dictionary) => throw null; + public Dictionary() => throw null; + protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int EnsureCapacity(int capacity) => throw null; + // Generated from `System.Collections.Generic.Dictionary<,>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IDictionaryEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get => throw null; } + // Stub generator skipped constructor + object System.Collections.IDictionaryEnumerator.Key { get => throw null; } + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + object System.Collections.IDictionaryEnumerator.Value { get => throw null; } + } + + + public System.Collections.Generic.Dictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + // Generated from `System.Collections.Generic.Dictionary<,>.KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TKey item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TKey item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TKey[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.Dictionary<,>.KeyCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public TKey Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.Dictionary.KeyCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public KeyCollection(System.Collections.Generic.Dictionary dictionary) => throw null; + bool System.Collections.Generic.ICollection.Remove(TKey item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + public System.Collections.Generic.Dictionary.KeyCollection Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + public virtual void OnDeserialization(object sender) => throw null; + void System.Collections.IDictionary.Remove(object key) => throw null; + public bool Remove(TKey key, out TValue value) => throw null; + public bool Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public void TrimExcess(int capacity) => throw null; + public void TrimExcess() => throw null; + public bool TryAdd(TKey key, TValue value) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + // Generated from `System.Collections.Generic.Dictionary<,>.ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TValue item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TValue item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TValue[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.Dictionary<,>.ValueCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public TValue Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.Dictionary.ValueCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(TValue item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public ValueCollection(System.Collections.Generic.Dictionary dictionary) => throw null; + } + + + public System.Collections.Generic.Dictionary.ValueCollection Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.Generic.EqualityComparer<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EqualityComparer : System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer + { + public static System.Collections.Generic.EqualityComparer Default { get => throw null; } + protected EqualityComparer() => throw null; + public abstract bool Equals(T x, T y); + bool System.Collections.IEqualityComparer.Equals(object x, object y) => throw null; + public abstract int GetHashCode(T obj); + int System.Collections.IEqualityComparer.GetHashCode(object obj) => throw null; + } + + // Generated from `System.Collections.Generic.HashSet<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HashSet : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IEqualityComparer Comparer { get => throw null; } + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex, int count) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public void CopyTo(T[] array) => throw null; + public int Count { get => throw null; } + public static System.Collections.Generic.IEqualityComparer> CreateSetComparer() => throw null; + public int EnsureCapacity(int capacity) => throw null; + // Generated from `System.Collections.Generic.HashSet<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.HashSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public HashSet(int capacity, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public HashSet(int capacity) => throw null; + public HashSet(System.Collections.Generic.IEqualityComparer comparer) => throw null; + public HashSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public HashSet(System.Collections.Generic.IEnumerable collection) => throw null; + public HashSet() => throw null; + protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public virtual void OnDeserialization(object sender) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public int RemoveWhere(System.Predicate match) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public void TrimExcess() => throw null; + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + // Generated from `System.Collections.Generic.LinkedList<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LinkedList : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T value) => throw null; + public void AddAfter(System.Collections.Generic.LinkedListNode node, System.Collections.Generic.LinkedListNode newNode) => throw null; + public System.Collections.Generic.LinkedListNode AddAfter(System.Collections.Generic.LinkedListNode node, T value) => throw null; + public void AddBefore(System.Collections.Generic.LinkedListNode node, System.Collections.Generic.LinkedListNode newNode) => throw null; + public System.Collections.Generic.LinkedListNode AddBefore(System.Collections.Generic.LinkedListNode node, T value) => throw null; + public void AddFirst(System.Collections.Generic.LinkedListNode node) => throw null; + public System.Collections.Generic.LinkedListNode AddFirst(T value) => throw null; + public void AddLast(System.Collections.Generic.LinkedListNode node) => throw null; + public System.Collections.Generic.LinkedListNode AddLast(T value) => throw null; + public void Clear() => throw null; + public bool Contains(T value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.LinkedList<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool MoveNext() => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.LinkedListNode Find(T value) => throw null; + public System.Collections.Generic.LinkedListNode FindLast(T value) => throw null; + public System.Collections.Generic.LinkedListNode First { get => throw null; } + public System.Collections.Generic.LinkedList.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Collections.Generic.LinkedListNode Last { get => throw null; } + public LinkedList(System.Collections.Generic.IEnumerable collection) => throw null; + public LinkedList() => throw null; + protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual void OnDeserialization(object sender) => throw null; + public void Remove(System.Collections.Generic.LinkedListNode node) => throw null; + public bool Remove(T value) => throw null; + public void RemoveFirst() => throw null; + public void RemoveLast() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.Generic.LinkedListNode<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LinkedListNode + { + public LinkedListNode(T value) => throw null; + public System.Collections.Generic.LinkedList List { get => throw null; } + public System.Collections.Generic.LinkedListNode Next { get => throw null; } + public System.Collections.Generic.LinkedListNode Previous { get => throw null; } + public T Value { get => throw null; set => throw null; } + public T ValueRef { get => throw null; } + } + + // Generated from `System.Collections.Generic.List<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class List : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object item) => throw null; + public void AddRange(System.Collections.Generic.IEnumerable collection) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection AsReadOnly() => throw null; + public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item, System.Collections.Generic.IComparer comparer) => throw null; + public int BinarySearch(T item) => throw null; + public int Capacity { get => throw null; set => throw null; } + public void Clear() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object item) => throw null; + public System.Collections.Generic.List ConvertAll(System.Converter converter) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(int index, T[] array, int arrayIndex, int count) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public void CopyTo(T[] array) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.List<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public bool Exists(System.Predicate match) => throw null; + public T Find(System.Predicate match) => throw null; + public System.Collections.Generic.List FindAll(System.Predicate match) => throw null; + public int FindIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindIndex(int startIndex, System.Predicate match) => throw null; + public int FindIndex(System.Predicate match) => throw null; + public T FindLast(System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, int count, System.Predicate match) => throw null; + public int FindLastIndex(int startIndex, System.Predicate match) => throw null; + public int FindLastIndex(System.Predicate match) => throw null; + public void ForEach(System.Action action) => throw null; + public System.Collections.Generic.List.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Generic.List GetRange(int index, int count) => throw null; + public int IndexOf(T item, int index, int count) => throw null; + public int IndexOf(T item, int index) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object item) => throw null; + void System.Collections.IList.Insert(int index, object item) => throw null; + public void Insert(int index, T item) => throw null; + public void InsertRange(int index, System.Collections.Generic.IEnumerable collection) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public int LastIndexOf(T item, int index, int count) => throw null; + public int LastIndexOf(T item, int index) => throw null; + public int LastIndexOf(T item) => throw null; + public List(int capacity) => throw null; + public List(System.Collections.Generic.IEnumerable collection) => throw null; + public List() => throw null; + void System.Collections.IList.Remove(object item) => throw null; + public bool Remove(T item) => throw null; + public int RemoveAll(System.Predicate match) => throw null; + public void RemoveAt(int index) => throw null; + public void RemoveRange(int index, int count) => throw null; + public void Reverse(int index, int count) => throw null; + public void Reverse() => throw null; + public void Sort(int index, int count, System.Collections.Generic.IComparer comparer) => throw null; + public void Sort(System.Comparison comparison) => throw null; + public void Sort(System.Collections.Generic.IComparer comparer) => throw null; + public void Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + public void TrimExcess() => throw null; + public bool TrueForAll(System.Predicate match) => throw null; + } + + // Generated from `System.Collections.Generic.Queue<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Queue : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public void Clear() => throw null; + public bool Contains(T item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public T Dequeue() => throw null; + public void Enqueue(T item) => throw null; + // Generated from `System.Collections.Generic.Queue<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.Queue.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T Peek() => throw null; + public Queue(int capacity) => throw null; + public Queue(System.Collections.Generic.IEnumerable collection) => throw null; + public Queue() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + public void TrimExcess() => throw null; + public bool TryDequeue(out T result) => throw null; + public bool TryPeek(out T result) => throw null; + } + + // Generated from `System.Collections.Generic.ReferenceEqualityComparer` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReferenceEqualityComparer : System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer + { + public bool Equals(object x, object y) => throw null; + public int GetHashCode(object obj) => throw null; + public static System.Collections.Generic.ReferenceEqualityComparer Instance { get => throw null; } + } + + // Generated from `System.Collections.Generic.SortedDictionary<,>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortedDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void Add(TKey key, TValue value) => throw null; + public void Clear() => throw null; + public System.Collections.Generic.IComparer Comparer { get => throw null; } + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.SortedDictionary<,>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IDictionaryEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + System.Collections.DictionaryEntry System.Collections.IDictionaryEnumerator.Entry { get => throw null; } + // Stub generator skipped constructor + object System.Collections.IDictionaryEnumerator.Key { get => throw null; } + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + object System.Collections.IDictionaryEnumerator.Value { get => throw null; } + } + + + public System.Collections.Generic.SortedDictionary.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + // Generated from `System.Collections.Generic.SortedDictionary<,>.KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TKey item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TKey item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TKey[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.SortedDictionary<,>.KeyCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public TKey Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.SortedDictionary.KeyCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public KeyCollection(System.Collections.Generic.SortedDictionary dictionary) => throw null; + bool System.Collections.Generic.ICollection.Remove(TKey item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + public System.Collections.Generic.SortedDictionary.KeyCollection Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public bool Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public SortedDictionary(System.Collections.Generic.IDictionary dictionary, System.Collections.Generic.IComparer comparer) => throw null; + public SortedDictionary(System.Collections.Generic.IDictionary dictionary) => throw null; + public SortedDictionary(System.Collections.Generic.IComparer comparer) => throw null; + public SortedDictionary() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public bool TryGetValue(TKey key, out TValue value) => throw null; + // Generated from `System.Collections.Generic.SortedDictionary<,>.ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TValue item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TValue item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TValue[] array, int index) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.SortedDictionary<,>.ValueCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public TValue Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.SortedDictionary.ValueCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(TValue item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public ValueCollection(System.Collections.Generic.SortedDictionary dictionary) => throw null; + } + + + public System.Collections.Generic.SortedDictionary.ValueCollection Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.Generic.SortedList<,>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortedList : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void Add(TKey key, TValue value) => throw null; + public int Capacity { get => throw null; set => throw null; } + public void Clear() => throw null; + public System.Collections.Generic.IComparer Comparer { get => throw null; } + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public bool ContainsKey(TKey key) => throw null; + public bool ContainsValue(TValue value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public int IndexOfKey(TKey key) => throw null; + public int IndexOfValue(TValue value) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + public System.Collections.Generic.IList Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object key) => throw null; + public bool Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair keyValuePair) => throw null; + public void RemoveAt(int index) => throw null; + public SortedList(int capacity, System.Collections.Generic.IComparer comparer) => throw null; + public SortedList(int capacity) => throw null; + public SortedList(System.Collections.Generic.IDictionary dictionary, System.Collections.Generic.IComparer comparer) => throw null; + public SortedList(System.Collections.Generic.IDictionary dictionary) => throw null; + public SortedList(System.Collections.Generic.IComparer comparer) => throw null; + public SortedList() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public void TrimExcess() => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.IList Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.Generic.SortedSet<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortedSet : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlySet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public virtual void Clear() => throw null; + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public virtual bool Contains(T item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index, int count) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public void CopyTo(T[] array) => throw null; + public int Count { get => throw null; } + public static System.Collections.Generic.IEqualityComparer> CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) => throw null; + public static System.Collections.Generic.IEqualityComparer> CreateSetComparer() => throw null; + // Generated from `System.Collections.Generic.SortedSet<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool MoveNext() => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.SortedSet.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual System.Collections.Generic.SortedSet GetViewBetween(T lowerValue, T upperValue) => throw null; + public virtual void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T Max { get => throw null; } + public T Min { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + protected virtual void OnDeserialization(object sender) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public int RemoveWhere(System.Predicate match) => throw null; + public System.Collections.Generic.IEnumerable Reverse() => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public SortedSet(System.Collections.Generic.IEnumerable collection, System.Collections.Generic.IComparer comparer) => throw null; + public SortedSet(System.Collections.Generic.IEnumerable collection) => throw null; + public SortedSet(System.Collections.Generic.IComparer comparer) => throw null; + public SortedSet() => throw null; + protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public bool TryGetValue(T equalValue, out T actualValue) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + // Generated from `System.Collections.Generic.Stack<>` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Stack : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public void Clear() => throw null; + public bool Contains(T item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + // Generated from `System.Collections.Generic.Stack<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Collections.Generic.Stack.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T Peek() => throw null; + public T Pop() => throw null; + public void Push(T item) => throw null; + public Stack(int capacity) => throw null; + public Stack(System.Collections.Generic.IEnumerable collection) => throw null; + public Stack() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + public void TrimExcess() => throw null; + public bool TryPeek(out T result) => throw null; + public bool TryPop(out T result) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs new file mode 100644 index 000000000000..7dde4f19e0d1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs @@ -0,0 +1,449 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace ComponentModel + { + namespace DataAnnotations + { + // Generated from `System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssociatedMetadataTypeTypeDescriptionProvider : System.ComponentModel.TypeDescriptionProvider + { + public AssociatedMetadataTypeTypeDescriptionProvider(System.Type type, System.Type associatedMetadataType) => throw null; + public AssociatedMetadataTypeTypeDescriptionProvider(System.Type type) => throw null; + public override System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor(System.Type objectType, object instance) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.AssociationAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssociationAttribute : System.Attribute + { + public AssociationAttribute(string name, string thisKey, string otherKey) => throw null; + public bool IsForeignKey { get => throw null; set => throw null; } + public string Name { get => throw null; } + public string OtherKey { get => throw null; } + public System.Collections.Generic.IEnumerable OtherKeyMembers { get => throw null; } + public string ThisKey { get => throw null; } + public System.Collections.Generic.IEnumerable ThisKeyMembers { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.CompareAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompareAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public CompareAttribute(string otherProperty) => throw null; + public override string FormatErrorMessage(string name) => throw null; + protected override System.ComponentModel.DataAnnotations.ValidationResult IsValid(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public string OtherProperty { get => throw null; } + public string OtherPropertyDisplayName { get => throw null; } + public override bool RequiresValidationContext { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.ConcurrencyCheckAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrencyCheckAttribute : System.Attribute + { + public ConcurrencyCheckAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.CreditCardAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CreditCardAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public CreditCardAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + public override bool IsValid(object value) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.CustomValidationAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CustomValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public CustomValidationAttribute(System.Type validatorType, string method) => throw null; + public override string FormatErrorMessage(string name) => throw null; + protected override System.ComponentModel.DataAnnotations.ValidationResult IsValid(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public string Method { get => throw null; } + public System.Type ValidatorType { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.DataType` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataType + { + CreditCard, + Currency, + Custom, + // Stub generator skipped constructor + Date, + DateTime, + Duration, + EmailAddress, + Html, + ImageUrl, + MultilineText, + Password, + PhoneNumber, + PostalCode, + Text, + Time, + Upload, + Url, + } + + // Generated from `System.ComponentModel.DataAnnotations.DataTypeAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTypeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public string CustomDataType { get => throw null; } + public System.ComponentModel.DataAnnotations.DataType DataType { get => throw null; } + public DataTypeAttribute(string customDataType) => throw null; + public DataTypeAttribute(System.ComponentModel.DataAnnotations.DataType dataType) => throw null; + public System.ComponentModel.DataAnnotations.DisplayFormatAttribute DisplayFormat { get => throw null; set => throw null; } + public virtual string GetDataTypeName() => throw null; + public override bool IsValid(object value) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.DisplayAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DisplayAttribute : System.Attribute + { + public bool AutoGenerateField { get => throw null; set => throw null; } + public bool AutoGenerateFilter { get => throw null; set => throw null; } + public string Description { get => throw null; set => throw null; } + public DisplayAttribute() => throw null; + public bool? GetAutoGenerateField() => throw null; + public bool? GetAutoGenerateFilter() => throw null; + public string GetDescription() => throw null; + public string GetGroupName() => throw null; + public string GetName() => throw null; + public int? GetOrder() => throw null; + public string GetPrompt() => throw null; + public string GetShortName() => throw null; + public string GroupName { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public string Prompt { get => throw null; set => throw null; } + public System.Type ResourceType { get => throw null; set => throw null; } + public string ShortName { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.DisplayColumnAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DisplayColumnAttribute : System.Attribute + { + public string DisplayColumn { get => throw null; } + public DisplayColumnAttribute(string displayColumn, string sortColumn, bool sortDescending) => throw null; + public DisplayColumnAttribute(string displayColumn, string sortColumn) => throw null; + public DisplayColumnAttribute(string displayColumn) => throw null; + public string SortColumn { get => throw null; } + public bool SortDescending { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.DisplayFormatAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DisplayFormatAttribute : System.Attribute + { + public bool ApplyFormatInEditMode { get => throw null; set => throw null; } + public bool ConvertEmptyStringToNull { get => throw null; set => throw null; } + public string DataFormatString { get => throw null; set => throw null; } + public DisplayFormatAttribute() => throw null; + public string GetNullDisplayText() => throw null; + public bool HtmlEncode { get => throw null; set => throw null; } + public string NullDisplayText { get => throw null; set => throw null; } + public System.Type NullDisplayTextResourceType { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.EditableAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EditableAttribute : System.Attribute + { + public bool AllowEdit { get => throw null; } + public bool AllowInitialValue { get => throw null; set => throw null; } + public EditableAttribute(bool allowEdit) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.EmailAddressAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EmailAddressAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public EmailAddressAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + public override bool IsValid(object value) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.EnumDataTypeAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumDataTypeAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public EnumDataTypeAttribute(System.Type enumType) : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + public System.Type EnumType { get => throw null; } + public override bool IsValid(object value) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.FileExtensionsAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileExtensionsAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public string Extensions { get => throw null; set => throw null; } + public FileExtensionsAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.FilterUIHintAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FilterUIHintAttribute : System.Attribute + { + public System.Collections.Generic.IDictionary ControlParameters { get => throw null; } + public override bool Equals(object obj) => throw null; + public string FilterUIHint { get => throw null; } + public FilterUIHintAttribute(string filterUIHint, string presentationLayer, params object[] controlParameters) => throw null; + public FilterUIHintAttribute(string filterUIHint, string presentationLayer) => throw null; + public FilterUIHintAttribute(string filterUIHint) => throw null; + public override int GetHashCode() => throw null; + public string PresentationLayer { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.IValidatableObject` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IValidatableObject + { + System.Collections.Generic.IEnumerable Validate(System.ComponentModel.DataAnnotations.ValidationContext validationContext); + } + + // Generated from `System.ComponentModel.DataAnnotations.KeyAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeyAttribute : System.Attribute + { + public KeyAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.MaxLengthAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MaxLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + public int Length { get => throw null; } + public MaxLengthAttribute(int length) => throw null; + public MaxLengthAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.MetadataTypeAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataTypeAttribute : System.Attribute + { + public System.Type MetadataClassType { get => throw null; } + public MetadataTypeAttribute(System.Type metadataClassType) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.MinLengthAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MinLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + public int Length { get => throw null; } + public MinLengthAttribute(int length) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.PhoneAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PhoneAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public override bool IsValid(object value) => throw null; + public PhoneAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.RangeAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RangeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public bool ConvertValueInInvariantCulture { get => throw null; set => throw null; } + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + public object Maximum { get => throw null; } + public object Minimum { get => throw null; } + public System.Type OperandType { get => throw null; } + public bool ParseLimitsInInvariantCulture { get => throw null; set => throw null; } + public RangeAttribute(int minimum, int maximum) => throw null; + public RangeAttribute(double minimum, double maximum) => throw null; + public RangeAttribute(System.Type type, string minimum, string maximum) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.RegularExpressionAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegularExpressionAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + public int MatchTimeoutInMilliseconds { get => throw null; set => throw null; } + public string Pattern { get => throw null; } + public RegularExpressionAttribute(string pattern) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.RequiredAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RequiredAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public bool AllowEmptyStrings { get => throw null; set => throw null; } + public override bool IsValid(object value) => throw null; + public RequiredAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ScaffoldColumnAttribute : System.Attribute + { + public bool Scaffold { get => throw null; } + public ScaffoldColumnAttribute(bool scaffold) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.StringLengthAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute + { + public override string FormatErrorMessage(string name) => throw null; + public override bool IsValid(object value) => throw null; + public int MaximumLength { get => throw null; } + public int MinimumLength { get => throw null; set => throw null; } + public StringLengthAttribute(int maximumLength) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.TimestampAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimestampAttribute : System.Attribute + { + public TimestampAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.UIHintAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UIHintAttribute : System.Attribute + { + public System.Collections.Generic.IDictionary ControlParameters { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string PresentationLayer { get => throw null; } + public string UIHint { get => throw null; } + public UIHintAttribute(string uiHint, string presentationLayer, params object[] controlParameters) => throw null; + public UIHintAttribute(string uiHint, string presentationLayer) => throw null; + public UIHintAttribute(string uiHint) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.UrlAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UrlAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute + { + public override bool IsValid(object value) => throw null; + public UrlAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.ValidationAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ValidationAttribute : System.Attribute + { + public string ErrorMessage { get => throw null; set => throw null; } + public string ErrorMessageResourceName { get => throw null; set => throw null; } + public System.Type ErrorMessageResourceType { get => throw null; set => throw null; } + protected string ErrorMessageString { get => throw null; } + public virtual string FormatErrorMessage(string name) => throw null; + public System.ComponentModel.DataAnnotations.ValidationResult GetValidationResult(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public virtual bool IsValid(object value) => throw null; + protected virtual System.ComponentModel.DataAnnotations.ValidationResult IsValid(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public virtual bool RequiresValidationContext { get => throw null; } + public void Validate(object value, string name) => throw null; + public void Validate(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + protected ValidationAttribute(string errorMessage) => throw null; + protected ValidationAttribute(System.Func errorMessageAccessor) => throw null; + protected ValidationAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.ValidationContext` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValidationContext : System.IServiceProvider + { + public string DisplayName { get => throw null; set => throw null; } + public object GetService(System.Type serviceType) => throw null; + public void InitializeServiceProvider(System.Func serviceProvider) => throw null; + public System.Collections.Generic.IDictionary Items { get => throw null; } + public string MemberName { get => throw null; set => throw null; } + public object ObjectInstance { get => throw null; } + public System.Type ObjectType { get => throw null; } + public ValidationContext(object instance, System.IServiceProvider serviceProvider, System.Collections.Generic.IDictionary items) => throw null; + public ValidationContext(object instance, System.Collections.Generic.IDictionary items) => throw null; + public ValidationContext(object instance) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.ValidationException` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValidationException : System.Exception + { + public System.ComponentModel.DataAnnotations.ValidationAttribute ValidationAttribute { get => throw null; } + public ValidationException(string message, System.Exception innerException) => throw null; + public ValidationException(string message) => throw null; + public ValidationException(string errorMessage, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value) => throw null; + public ValidationException(System.ComponentModel.DataAnnotations.ValidationResult validationResult, System.ComponentModel.DataAnnotations.ValidationAttribute validatingAttribute, object value) => throw null; + public ValidationException() => throw null; + protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.ComponentModel.DataAnnotations.ValidationResult ValidationResult { get => throw null; } + public object Value { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.ValidationResult` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValidationResult + { + public string ErrorMessage { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable MemberNames { get => throw null; } + public static System.ComponentModel.DataAnnotations.ValidationResult Success; + public override string ToString() => throw null; + public ValidationResult(string errorMessage, System.Collections.Generic.IEnumerable memberNames) => throw null; + public ValidationResult(string errorMessage) => throw null; + protected ValidationResult(System.ComponentModel.DataAnnotations.ValidationResult validationResult) => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.Validator` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Validator + { + public static bool TryValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection validationResults, bool validateAllProperties) => throw null; + public static bool TryValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection validationResults) => throw null; + public static bool TryValidateProperty(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection validationResults) => throw null; + public static bool TryValidateValue(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection validationResults, System.Collections.Generic.IEnumerable validationAttributes) => throw null; + public static void ValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, bool validateAllProperties) => throw null; + public static void ValidateObject(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public static void ValidateProperty(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) => throw null; + public static void ValidateValue(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.IEnumerable validationAttributes) => throw null; + } + + namespace Schema + { + // Generated from `System.ComponentModel.DataAnnotations.Schema.ColumnAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ColumnAttribute : System.Attribute + { + public ColumnAttribute(string name) => throw null; + public ColumnAttribute() => throw null; + public string Name { get => throw null; } + public int Order { get => throw null; set => throw null; } + public string TypeName { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.ComplexTypeAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComplexTypeAttribute : System.Attribute + { + public ComplexTypeAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DatabaseGeneratedAttribute : System.Attribute + { + public DatabaseGeneratedAttribute(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption databaseGeneratedOption) => throw null; + public System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption DatabaseGeneratedOption { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DatabaseGeneratedOption + { + Computed, + // Stub generator skipped constructor + Identity, + None, + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.ForeignKeyAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ForeignKeyAttribute : System.Attribute + { + public ForeignKeyAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.InversePropertyAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InversePropertyAttribute : System.Attribute + { + public InversePropertyAttribute(string property) => throw null; + public string Property { get => throw null; } + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.NotMappedAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotMappedAttribute : System.Attribute + { + public NotMappedAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DataAnnotations.Schema.TableAttribute` in `System.ComponentModel.Annotations, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TableAttribute : System.Attribute + { + public string Name { get => throw null; } + public string Schema { get => throw null; set => throw null; } + public TableAttribute(string name) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs new file mode 100644 index 000000000000..6b7d02cfff41 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs @@ -0,0 +1,94 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace ComponentModel + { + // Generated from `System.ComponentModel.AsyncCompletedEventArgs` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncCompletedEventArgs : System.EventArgs + { + public AsyncCompletedEventArgs(System.Exception error, bool cancelled, object userState) => throw null; + public bool Cancelled { get => throw null; } + public System.Exception Error { get => throw null; } + protected void RaiseExceptionIfNecessary() => throw null; + public object UserState { get => throw null; } + } + + // Generated from `System.ComponentModel.AsyncCompletedEventHandler` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void AsyncCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + // Generated from `System.ComponentModel.AsyncOperation` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncOperation + { + public void OperationCompleted() => throw null; + public void Post(System.Threading.SendOrPostCallback d, object arg) => throw null; + public void PostOperationCompleted(System.Threading.SendOrPostCallback d, object arg) => throw null; + public System.Threading.SynchronizationContext SynchronizationContext { get => throw null; } + public object UserSuppliedState { get => throw null; } + // ERR: Stub generator didn't handle member: ~AsyncOperation + } + + // Generated from `System.ComponentModel.AsyncOperationManager` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class AsyncOperationManager + { + public static System.ComponentModel.AsyncOperation CreateOperation(object userSuppliedState) => throw null; + public static System.Threading.SynchronizationContext SynchronizationContext { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.BackgroundWorker` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BackgroundWorker : System.ComponentModel.Component + { + public BackgroundWorker() => throw null; + public void CancelAsync() => throw null; + public bool CancellationPending { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public event System.ComponentModel.DoWorkEventHandler DoWork; + public bool IsBusy { get => throw null; } + protected virtual void OnDoWork(System.ComponentModel.DoWorkEventArgs e) => throw null; + protected virtual void OnProgressChanged(System.ComponentModel.ProgressChangedEventArgs e) => throw null; + protected virtual void OnRunWorkerCompleted(System.ComponentModel.RunWorkerCompletedEventArgs e) => throw null; + public event System.ComponentModel.ProgressChangedEventHandler ProgressChanged; + public void ReportProgress(int percentProgress, object userState) => throw null; + public void ReportProgress(int percentProgress) => throw null; + public void RunWorkerAsync(object argument) => throw null; + public void RunWorkerAsync() => throw null; + public event System.ComponentModel.RunWorkerCompletedEventHandler RunWorkerCompleted; + public bool WorkerReportsProgress { get => throw null; set => throw null; } + public bool WorkerSupportsCancellation { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.DoWorkEventArgs` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DoWorkEventArgs : System.ComponentModel.CancelEventArgs + { + public object Argument { get => throw null; } + public DoWorkEventArgs(object argument) => throw null; + public object Result { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.DoWorkEventHandler` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DoWorkEventHandler(object sender, System.ComponentModel.DoWorkEventArgs e); + + // Generated from `System.ComponentModel.ProgressChangedEventArgs` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProgressChangedEventArgs : System.EventArgs + { + public ProgressChangedEventArgs(int progressPercentage, object userState) => throw null; + public int ProgressPercentage { get => throw null; } + public object UserState { get => throw null; } + } + + // Generated from `System.ComponentModel.ProgressChangedEventHandler` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ProgressChangedEventHandler(object sender, System.ComponentModel.ProgressChangedEventArgs e); + + // Generated from `System.ComponentModel.RunWorkerCompletedEventArgs` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RunWorkerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + public object Result { get => throw null; } + public RunWorkerCompletedEventArgs(object result, System.Exception error, bool cancelled) : base(default(System.Exception), default(bool), default(object)) => throw null; + public object UserState { get => throw null; } + } + + // Generated from `System.ComponentModel.RunWorkerCompletedEventHandler` in `System.ComponentModel.EventBasedAsync, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void RunWorkerCompletedEventHandler(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e); + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs new file mode 100644 index 000000000000..88658c4c621c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs @@ -0,0 +1,374 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace ComponentModel + { + // Generated from `System.ComponentModel.BrowsableAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BrowsableAttribute : System.Attribute + { + public bool Browsable { get => throw null; } + public BrowsableAttribute(bool browsable) => throw null; + public static System.ComponentModel.BrowsableAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.BrowsableAttribute No; + public static System.ComponentModel.BrowsableAttribute Yes; + } + + // Generated from `System.ComponentModel.CategoryAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CategoryAttribute : System.Attribute + { + public static System.ComponentModel.CategoryAttribute Action { get => throw null; } + public static System.ComponentModel.CategoryAttribute Appearance { get => throw null; } + public static System.ComponentModel.CategoryAttribute Asynchronous { get => throw null; } + public static System.ComponentModel.CategoryAttribute Behavior { get => throw null; } + public string Category { get => throw null; } + public CategoryAttribute(string category) => throw null; + public CategoryAttribute() => throw null; + public static System.ComponentModel.CategoryAttribute Data { get => throw null; } + public static System.ComponentModel.CategoryAttribute Default { get => throw null; } + public static System.ComponentModel.CategoryAttribute Design { get => throw null; } + public static System.ComponentModel.CategoryAttribute DragDrop { get => throw null; } + public override bool Equals(object obj) => throw null; + public static System.ComponentModel.CategoryAttribute Focus { get => throw null; } + public static System.ComponentModel.CategoryAttribute Format { get => throw null; } + public override int GetHashCode() => throw null; + protected virtual string GetLocalizedString(string value) => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.CategoryAttribute Key { get => throw null; } + public static System.ComponentModel.CategoryAttribute Layout { get => throw null; } + public static System.ComponentModel.CategoryAttribute Mouse { get => throw null; } + public static System.ComponentModel.CategoryAttribute WindowStyle { get => throw null; } + } + + // Generated from `System.ComponentModel.Component` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Component : System.MarshalByRefObject, System.IDisposable, System.ComponentModel.IComponent + { + protected virtual bool CanRaiseEvents { get => throw null; } + public Component() => throw null; + public System.ComponentModel.IContainer Container { get => throw null; } + protected bool DesignMode { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public event System.EventHandler Disposed; + protected System.ComponentModel.EventHandlerList Events { get => throw null; } + protected virtual object GetService(System.Type service) => throw null; + public virtual System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public override string ToString() => throw null; + // ERR: Stub generator didn't handle member: ~Component + } + + // Generated from `System.ComponentModel.ComponentCollection` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentCollection : System.Collections.ReadOnlyCollectionBase + { + public ComponentCollection(System.ComponentModel.IComponent[] components) => throw null; + public void CopyTo(System.ComponentModel.IComponent[] array, int index) => throw null; + public virtual System.ComponentModel.IComponent this[string name] { get => throw null; } + public virtual System.ComponentModel.IComponent this[int index] { get => throw null; } + } + + // Generated from `System.ComponentModel.DescriptionAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DescriptionAttribute : System.Attribute + { + public static System.ComponentModel.DescriptionAttribute Default; + public virtual string Description { get => throw null; } + public DescriptionAttribute(string description) => throw null; + public DescriptionAttribute() => throw null; + protected string DescriptionValue { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + } + + // Generated from `System.ComponentModel.DesignOnlyAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignOnlyAttribute : System.Attribute + { + public static System.ComponentModel.DesignOnlyAttribute Default; + public DesignOnlyAttribute(bool isDesignOnly) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public bool IsDesignOnly { get => throw null; } + public static System.ComponentModel.DesignOnlyAttribute No; + public static System.ComponentModel.DesignOnlyAttribute Yes; + } + + // Generated from `System.ComponentModel.DesignerAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerAttribute : System.Attribute + { + public DesignerAttribute(string designerTypeName, string designerBaseTypeName) => throw null; + public DesignerAttribute(string designerTypeName, System.Type designerBaseType) => throw null; + public DesignerAttribute(string designerTypeName) => throw null; + public DesignerAttribute(System.Type designerType, System.Type designerBaseType) => throw null; + public DesignerAttribute(System.Type designerType) => throw null; + public string DesignerBaseTypeName { get => throw null; } + public string DesignerTypeName { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.DesignerCategoryAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerCategoryAttribute : System.Attribute + { + public string Category { get => throw null; } + public static System.ComponentModel.DesignerCategoryAttribute Component; + public static System.ComponentModel.DesignerCategoryAttribute Default; + public DesignerCategoryAttribute(string category) => throw null; + public DesignerCategoryAttribute() => throw null; + public override bool Equals(object obj) => throw null; + public static System.ComponentModel.DesignerCategoryAttribute Form; + public static System.ComponentModel.DesignerCategoryAttribute Generic; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.DesignerSerializationVisibility` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DesignerSerializationVisibility + { + Content, + // Stub generator skipped constructor + Hidden, + Visible, + } + + // Generated from `System.ComponentModel.DesignerSerializationVisibilityAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerSerializationVisibilityAttribute : System.Attribute + { + public static System.ComponentModel.DesignerSerializationVisibilityAttribute Content; + public static System.ComponentModel.DesignerSerializationVisibilityAttribute Default; + public DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility visibility) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.ComponentModel.DesignerSerializationVisibilityAttribute Hidden; + public override bool IsDefaultAttribute() => throw null; + public System.ComponentModel.DesignerSerializationVisibility Visibility { get => throw null; } + public static System.ComponentModel.DesignerSerializationVisibilityAttribute Visible; + } + + // Generated from `System.ComponentModel.DisplayNameAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DisplayNameAttribute : System.Attribute + { + public static System.ComponentModel.DisplayNameAttribute Default; + public virtual string DisplayName { get => throw null; } + public DisplayNameAttribute(string displayName) => throw null; + public DisplayNameAttribute() => throw null; + protected string DisplayNameValue { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + } + + // Generated from `System.ComponentModel.EditorAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EditorAttribute : System.Attribute + { + public EditorAttribute(string typeName, string baseTypeName) => throw null; + public EditorAttribute(string typeName, System.Type baseType) => throw null; + public EditorAttribute(System.Type type, System.Type baseType) => throw null; + public EditorAttribute() => throw null; + public string EditorBaseTypeName { get => throw null; } + public string EditorTypeName { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.EventHandlerList` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventHandlerList : System.IDisposable + { + public void AddHandler(object key, System.Delegate value) => throw null; + public void AddHandlers(System.ComponentModel.EventHandlerList listToAddFrom) => throw null; + public void Dispose() => throw null; + public EventHandlerList() => throw null; + public System.Delegate this[object key] { get => throw null; set => throw null; } + public void RemoveHandler(object key, System.Delegate value) => throw null; + } + + // Generated from `System.ComponentModel.IComponent` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComponent : System.IDisposable + { + event System.EventHandler Disposed; + System.ComponentModel.ISite Site { get; set; } + } + + // Generated from `System.ComponentModel.IContainer` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IContainer : System.IDisposable + { + void Add(System.ComponentModel.IComponent component, string name); + void Add(System.ComponentModel.IComponent component); + System.ComponentModel.ComponentCollection Components { get; } + void Remove(System.ComponentModel.IComponent component); + } + + // Generated from `System.ComponentModel.ISite` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISite : System.IServiceProvider + { + System.ComponentModel.IComponent Component { get; } + System.ComponentModel.IContainer Container { get; } + bool DesignMode { get; } + string Name { get; set; } + } + + // Generated from `System.ComponentModel.ISupportInitialize` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISupportInitialize + { + void BeginInit(); + void EndInit(); + } + + // Generated from `System.ComponentModel.ISynchronizeInvoke` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISynchronizeInvoke + { + System.IAsyncResult BeginInvoke(System.Delegate method, object[] args); + object EndInvoke(System.IAsyncResult result); + object Invoke(System.Delegate method, object[] args); + bool InvokeRequired { get; } + } + + // Generated from `System.ComponentModel.ImmutableObjectAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImmutableObjectAttribute : System.Attribute + { + public static System.ComponentModel.ImmutableObjectAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool Immutable { get => throw null; } + public ImmutableObjectAttribute(bool immutable) => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.ImmutableObjectAttribute No; + public static System.ComponentModel.ImmutableObjectAttribute Yes; + } + + // Generated from `System.ComponentModel.InitializationEventAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InitializationEventAttribute : System.Attribute + { + public string EventName { get => throw null; } + public InitializationEventAttribute(string eventName) => throw null; + } + + // Generated from `System.ComponentModel.InvalidAsynchronousStateException` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidAsynchronousStateException : System.ArgumentException + { + public InvalidAsynchronousStateException(string message, System.Exception innerException) => throw null; + public InvalidAsynchronousStateException(string message) => throw null; + public InvalidAsynchronousStateException() => throw null; + protected InvalidAsynchronousStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ComponentModel.InvalidEnumArgumentException` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidEnumArgumentException : System.ArgumentException + { + public InvalidEnumArgumentException(string message, System.Exception innerException) => throw null; + public InvalidEnumArgumentException(string message) => throw null; + public InvalidEnumArgumentException(string argumentName, int invalidValue, System.Type enumClass) => throw null; + public InvalidEnumArgumentException() => throw null; + protected InvalidEnumArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ComponentModel.LocalizableAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LocalizableAttribute : System.Attribute + { + public static System.ComponentModel.LocalizableAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public bool IsLocalizable { get => throw null; } + public LocalizableAttribute(bool isLocalizable) => throw null; + public static System.ComponentModel.LocalizableAttribute No; + public static System.ComponentModel.LocalizableAttribute Yes; + } + + // Generated from `System.ComponentModel.MergablePropertyAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MergablePropertyAttribute : System.Attribute + { + public bool AllowMerge { get => throw null; } + public static System.ComponentModel.MergablePropertyAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public MergablePropertyAttribute(bool allowMerge) => throw null; + public static System.ComponentModel.MergablePropertyAttribute No; + public static System.ComponentModel.MergablePropertyAttribute Yes; + } + + // Generated from `System.ComponentModel.NotifyParentPropertyAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotifyParentPropertyAttribute : System.Attribute + { + public static System.ComponentModel.NotifyParentPropertyAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.NotifyParentPropertyAttribute No; + public bool NotifyParent { get => throw null; } + public NotifyParentPropertyAttribute(bool notifyParent) => throw null; + public static System.ComponentModel.NotifyParentPropertyAttribute Yes; + } + + // Generated from `System.ComponentModel.ParenthesizePropertyNameAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParenthesizePropertyNameAttribute : System.Attribute + { + public static System.ComponentModel.ParenthesizePropertyNameAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public bool NeedParenthesis { get => throw null; } + public ParenthesizePropertyNameAttribute(bool needParenthesis) => throw null; + public ParenthesizePropertyNameAttribute() => throw null; + } + + // Generated from `System.ComponentModel.ReadOnlyAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyAttribute : System.Attribute + { + public static System.ComponentModel.ReadOnlyAttribute Default; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public bool IsReadOnly { get => throw null; } + public static System.ComponentModel.ReadOnlyAttribute No; + public ReadOnlyAttribute(bool isReadOnly) => throw null; + public static System.ComponentModel.ReadOnlyAttribute Yes; + } + + // Generated from `System.ComponentModel.RefreshProperties` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RefreshProperties + { + All, + None, + // Stub generator skipped constructor + Repaint, + } + + // Generated from `System.ComponentModel.RefreshPropertiesAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RefreshPropertiesAttribute : System.Attribute + { + public static System.ComponentModel.RefreshPropertiesAttribute All; + public static System.ComponentModel.RefreshPropertiesAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public System.ComponentModel.RefreshProperties RefreshProperties { get => throw null; } + public RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties refresh) => throw null; + public static System.ComponentModel.RefreshPropertiesAttribute Repaint; + } + + namespace Design + { + namespace Serialization + { + // Generated from `System.ComponentModel.Design.Serialization.DesignerSerializerAttribute` in `System.ComponentModel.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerSerializerAttribute : System.Attribute + { + public DesignerSerializerAttribute(string serializerTypeName, string baseSerializerTypeName) => throw null; + public DesignerSerializerAttribute(string serializerTypeName, System.Type baseSerializerType) => throw null; + public DesignerSerializerAttribute(System.Type serializerType, System.Type baseSerializerType) => throw null; + public string SerializerBaseTypeName { get => throw null; } + public string SerializerTypeName { get => throw null; } + public override object TypeId { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs new file mode 100644 index 000000000000..e1a3502f4c81 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs @@ -0,0 +1,2607 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.UriTypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UriTypeConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public UriTypeConverter() => throw null; + } + + namespace ComponentModel + { + // Generated from `System.ComponentModel.AddingNewEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AddingNewEventArgs : System.EventArgs + { + public AddingNewEventArgs(object newObject) => throw null; + public AddingNewEventArgs() => throw null; + public object NewObject { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.AddingNewEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void AddingNewEventHandler(object sender, System.ComponentModel.AddingNewEventArgs e); + + // Generated from `System.ComponentModel.AmbientValueAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AmbientValueAttribute : System.Attribute + { + public AmbientValueAttribute(string value) => throw null; + public AmbientValueAttribute(object value) => throw null; + public AmbientValueAttribute(int value) => throw null; + public AmbientValueAttribute(float value) => throw null; + public AmbientValueAttribute(double value) => throw null; + public AmbientValueAttribute(bool value) => throw null; + public AmbientValueAttribute(System.Type type, string value) => throw null; + public AmbientValueAttribute(System.Int64 value) => throw null; + public AmbientValueAttribute(System.Int16 value) => throw null; + public AmbientValueAttribute(System.Char value) => throw null; + public AmbientValueAttribute(System.Byte value) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public object Value { get => throw null; } + } + + // Generated from `System.ComponentModel.ArrayConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArrayConverter : System.ComponentModel.CollectionConverter + { + public ArrayConverter() => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.AttributeCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AttributeCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public AttributeCollection(params System.Attribute[] attributes) => throw null; + protected AttributeCollection() => throw null; + protected virtual System.Attribute[] Attributes { get => throw null; } + public bool Contains(System.Attribute[] attributes) => throw null; + public bool Contains(System.Attribute attribute) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public static System.ComponentModel.AttributeCollection Empty; + public static System.ComponentModel.AttributeCollection FromExisting(System.ComponentModel.AttributeCollection existing, params System.Attribute[] newAttributes) => throw null; + protected System.Attribute GetDefaultAttribute(System.Type attributeType) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.Attribute this[int index] { get => throw null; } + public virtual System.Attribute this[System.Type attributeType] { get => throw null; } + public bool Matches(System.Attribute[] attributes) => throw null; + public bool Matches(System.Attribute attribute) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.ComponentModel.AttributeProviderAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AttributeProviderAttribute : System.Attribute + { + public AttributeProviderAttribute(string typeName, string propertyName) => throw null; + public AttributeProviderAttribute(string typeName) => throw null; + public AttributeProviderAttribute(System.Type type) => throw null; + public string PropertyName { get => throw null; } + public string TypeName { get => throw null; } + } + + // Generated from `System.ComponentModel.BaseNumberConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class BaseNumberConverter : System.ComponentModel.TypeConverter + { + internal BaseNumberConverter() => throw null; + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + } + + // Generated from `System.ComponentModel.BindableAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BindableAttribute : System.Attribute + { + public bool Bindable { get => throw null; } + public BindableAttribute(bool bindable, System.ComponentModel.BindingDirection direction) => throw null; + public BindableAttribute(bool bindable) => throw null; + public BindableAttribute(System.ComponentModel.BindableSupport flags, System.ComponentModel.BindingDirection direction) => throw null; + public BindableAttribute(System.ComponentModel.BindableSupport flags) => throw null; + public static System.ComponentModel.BindableAttribute Default; + public System.ComponentModel.BindingDirection Direction { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.BindableAttribute No; + public static System.ComponentModel.BindableAttribute Yes; + } + + // Generated from `System.ComponentModel.BindableSupport` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum BindableSupport + { + // Stub generator skipped constructor + Default, + No, + Yes, + } + + // Generated from `System.ComponentModel.BindingDirection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum BindingDirection + { + // Stub generator skipped constructor + OneWay, + TwoWay, + } + + // Generated from `System.ComponentModel.BindingList<>` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BindingList : System.Collections.ObjectModel.Collection, System.ComponentModel.IRaiseItemChangedEvents, System.ComponentModel.ICancelAddNew, System.ComponentModel.IBindingList, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + void System.ComponentModel.IBindingList.AddIndex(System.ComponentModel.PropertyDescriptor prop) => throw null; + public T AddNew() => throw null; + object System.ComponentModel.IBindingList.AddNew() => throw null; + protected virtual object AddNewCore() => throw null; + public event System.ComponentModel.AddingNewEventHandler AddingNew; + public bool AllowEdit { get => throw null; set => throw null; } + bool System.ComponentModel.IBindingList.AllowEdit { get => throw null; } + public bool AllowNew { get => throw null; set => throw null; } + bool System.ComponentModel.IBindingList.AllowNew { get => throw null; } + public bool AllowRemove { get => throw null; set => throw null; } + bool System.ComponentModel.IBindingList.AllowRemove { get => throw null; } + void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor prop, System.ComponentModel.ListSortDirection direction) => throw null; + protected virtual void ApplySortCore(System.ComponentModel.PropertyDescriptor prop, System.ComponentModel.ListSortDirection direction) => throw null; + public BindingList(System.Collections.Generic.IList list) => throw null; + public BindingList() => throw null; + public virtual void CancelNew(int itemIndex) => throw null; + protected override void ClearItems() => throw null; + public virtual void EndNew(int itemIndex) => throw null; + int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor prop, object key) => throw null; + protected virtual int FindCore(System.ComponentModel.PropertyDescriptor prop, object key) => throw null; + protected override void InsertItem(int index, T item) => throw null; + bool System.ComponentModel.IBindingList.IsSorted { get => throw null; } + protected virtual bool IsSortedCore { get => throw null; } + public event System.ComponentModel.ListChangedEventHandler ListChanged; + protected virtual void OnAddingNew(System.ComponentModel.AddingNewEventArgs e) => throw null; + protected virtual void OnListChanged(System.ComponentModel.ListChangedEventArgs e) => throw null; + public bool RaiseListChangedEvents { get => throw null; set => throw null; } + bool System.ComponentModel.IRaiseItemChangedEvents.RaisesItemChangedEvents { get => throw null; } + void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor prop) => throw null; + protected override void RemoveItem(int index) => throw null; + void System.ComponentModel.IBindingList.RemoveSort() => throw null; + protected virtual void RemoveSortCore() => throw null; + public void ResetBindings() => throw null; + public void ResetItem(int position) => throw null; + protected override void SetItem(int index, T item) => throw null; + System.ComponentModel.ListSortDirection System.ComponentModel.IBindingList.SortDirection { get => throw null; } + protected virtual System.ComponentModel.ListSortDirection SortDirectionCore { get => throw null; } + System.ComponentModel.PropertyDescriptor System.ComponentModel.IBindingList.SortProperty { get => throw null; } + protected virtual System.ComponentModel.PropertyDescriptor SortPropertyCore { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsChangeNotification { get => throw null; } + protected virtual bool SupportsChangeNotificationCore { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSearching { get => throw null; } + protected virtual bool SupportsSearchingCore { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSorting { get => throw null; } + protected virtual bool SupportsSortingCore { get => throw null; } + } + + // Generated from `System.ComponentModel.BooleanConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BooleanConverter : System.ComponentModel.TypeConverter + { + public BooleanConverter() => throw null; + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.ByteConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ByteConverter : System.ComponentModel.BaseNumberConverter + { + public ByteConverter() => throw null; + } + + // Generated from `System.ComponentModel.CancelEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void CancelEventHandler(object sender, System.ComponentModel.CancelEventArgs e); + + // Generated from `System.ComponentModel.CharConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CharConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public CharConverter() => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + } + + // Generated from `System.ComponentModel.CollectionChangeAction` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CollectionChangeAction + { + Add, + // Stub generator skipped constructor + Refresh, + Remove, + } + + // Generated from `System.ComponentModel.CollectionChangeEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CollectionChangeEventArgs : System.EventArgs + { + public virtual System.ComponentModel.CollectionChangeAction Action { get => throw null; } + public CollectionChangeEventArgs(System.ComponentModel.CollectionChangeAction action, object element) => throw null; + public virtual object Element { get => throw null; } + } + + // Generated from `System.ComponentModel.CollectionChangeEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void CollectionChangeEventHandler(object sender, System.ComponentModel.CollectionChangeEventArgs e); + + // Generated from `System.ComponentModel.CollectionConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CollectionConverter : System.ComponentModel.TypeConverter + { + public CollectionConverter() => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.ComplexBindingPropertiesAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComplexBindingPropertiesAttribute : System.Attribute + { + public ComplexBindingPropertiesAttribute(string dataSource, string dataMember) => throw null; + public ComplexBindingPropertiesAttribute(string dataSource) => throw null; + public ComplexBindingPropertiesAttribute() => throw null; + public string DataMember { get => throw null; } + public string DataSource { get => throw null; } + public static System.ComponentModel.ComplexBindingPropertiesAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + } + + // Generated from `System.ComponentModel.ComponentConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentConverter : System.ComponentModel.ReferenceConverter + { + public ComponentConverter(System.Type type) : base(default(System.Type)) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.ComponentEditor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ComponentEditor + { + protected ComponentEditor() => throw null; + public bool EditComponent(object component) => throw null; + public abstract bool EditComponent(System.ComponentModel.ITypeDescriptorContext context, object component); + } + + // Generated from `System.ComponentModel.ComponentResourceManager` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentResourceManager : System.Resources.ResourceManager + { + public void ApplyResources(object value, string objectName) => throw null; + public virtual void ApplyResources(object value, string objectName, System.Globalization.CultureInfo culture) => throw null; + public ComponentResourceManager(System.Type t) => throw null; + public ComponentResourceManager() => throw null; + } + + // Generated from `System.ComponentModel.Container` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Container : System.IDisposable, System.ComponentModel.IContainer + { + public virtual void Add(System.ComponentModel.IComponent component, string name) => throw null; + public virtual void Add(System.ComponentModel.IComponent component) => throw null; + public virtual System.ComponentModel.ComponentCollection Components { get => throw null; } + public Container() => throw null; + protected virtual System.ComponentModel.ISite CreateSite(System.ComponentModel.IComponent component, string name) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected virtual object GetService(System.Type service) => throw null; + public virtual void Remove(System.ComponentModel.IComponent component) => throw null; + protected void RemoveWithoutUnsiting(System.ComponentModel.IComponent component) => throw null; + protected virtual void ValidateName(System.ComponentModel.IComponent component, string name) => throw null; + // ERR: Stub generator didn't handle member: ~Container + } + + // Generated from `System.ComponentModel.ContainerFilterService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ContainerFilterService + { + protected ContainerFilterService() => throw null; + public virtual System.ComponentModel.ComponentCollection FilterComponents(System.ComponentModel.ComponentCollection components) => throw null; + } + + // Generated from `System.ComponentModel.CultureInfoConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CultureInfoConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public CultureInfoConverter() => throw null; + protected virtual string GetCultureName(System.Globalization.CultureInfo culture) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.CustomTypeDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CustomTypeDescriptor : System.ComponentModel.ICustomTypeDescriptor + { + protected CustomTypeDescriptor(System.ComponentModel.ICustomTypeDescriptor parent) => throw null; + protected CustomTypeDescriptor() => throw null; + public virtual System.ComponentModel.AttributeCollection GetAttributes() => throw null; + public virtual string GetClassName() => throw null; + public virtual string GetComponentName() => throw null; + public virtual System.ComponentModel.TypeConverter GetConverter() => throw null; + public virtual System.ComponentModel.EventDescriptor GetDefaultEvent() => throw null; + public virtual System.ComponentModel.PropertyDescriptor GetDefaultProperty() => throw null; + public virtual object GetEditor(System.Type editorBaseType) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection GetEvents(System.Attribute[] attributes) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection GetEvents() => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties(System.Attribute[] attributes) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties() => throw null; + public virtual object GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; + } + + // Generated from `System.ComponentModel.DataObjectAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataObjectAttribute : System.Attribute + { + public static System.ComponentModel.DataObjectAttribute DataObject; + public DataObjectAttribute(bool isDataObject) => throw null; + public DataObjectAttribute() => throw null; + public static System.ComponentModel.DataObjectAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsDataObject { get => throw null; } + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.DataObjectAttribute NonDataObject; + } + + // Generated from `System.ComponentModel.DataObjectFieldAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataObjectFieldAttribute : System.Attribute + { + public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable, int length) => throw null; + public DataObjectFieldAttribute(bool primaryKey, bool isIdentity, bool isNullable) => throw null; + public DataObjectFieldAttribute(bool primaryKey, bool isIdentity) => throw null; + public DataObjectFieldAttribute(bool primaryKey) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsIdentity { get => throw null; } + public bool IsNullable { get => throw null; } + public int Length { get => throw null; } + public bool PrimaryKey { get => throw null; } + } + + // Generated from `System.ComponentModel.DataObjectMethodAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataObjectMethodAttribute : System.Attribute + { + public DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType methodType, bool isDefault) => throw null; + public DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType methodType) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsDefault { get => throw null; } + public override bool Match(object obj) => throw null; + public System.ComponentModel.DataObjectMethodType MethodType { get => throw null; } + } + + // Generated from `System.ComponentModel.DataObjectMethodType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataObjectMethodType + { + // Stub generator skipped constructor + Delete, + Fill, + Insert, + Select, + Update, + } + + // Generated from `System.ComponentModel.DateTimeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateTimeConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public DateTimeConverter() => throw null; + } + + // Generated from `System.ComponentModel.DateTimeOffsetConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateTimeOffsetConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public DateTimeOffsetConverter() => throw null; + } + + // Generated from `System.ComponentModel.DecimalConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecimalConverter : System.ComponentModel.BaseNumberConverter + { + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public DecimalConverter() => throw null; + } + + // Generated from `System.ComponentModel.DefaultBindingPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultBindingPropertyAttribute : System.Attribute + { + public static System.ComponentModel.DefaultBindingPropertyAttribute Default; + public DefaultBindingPropertyAttribute(string name) => throw null; + public DefaultBindingPropertyAttribute() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.ComponentModel.DefaultEventAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultEventAttribute : System.Attribute + { + public static System.ComponentModel.DefaultEventAttribute Default; + public DefaultEventAttribute(string name) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.ComponentModel.DefaultPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultPropertyAttribute : System.Attribute + { + public static System.ComponentModel.DefaultPropertyAttribute Default; + public DefaultPropertyAttribute(string name) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.ComponentModel.DesignTimeVisibleAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignTimeVisibleAttribute : System.Attribute + { + public static System.ComponentModel.DesignTimeVisibleAttribute Default; + public DesignTimeVisibleAttribute(bool visible) => throw null; + public DesignTimeVisibleAttribute() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.DesignTimeVisibleAttribute No; + public bool Visible { get => throw null; } + public static System.ComponentModel.DesignTimeVisibleAttribute Yes; + } + + // Generated from `System.ComponentModel.DoubleConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DoubleConverter : System.ComponentModel.BaseNumberConverter + { + public DoubleConverter() => throw null; + } + + // Generated from `System.ComponentModel.EnumConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + protected virtual System.Collections.IComparer Comparer { get => throw null; } + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public EnumConverter(System.Type type) => throw null; + protected System.Type EnumType { get => throw null; } + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + protected System.ComponentModel.TypeConverter.StandardValuesCollection Values { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.EventDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EventDescriptor : System.ComponentModel.MemberDescriptor + { + public abstract void AddEventHandler(object component, System.Delegate value); + public abstract System.Type ComponentType { get; } + protected EventDescriptor(string name, System.Attribute[] attrs) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected EventDescriptor(System.ComponentModel.MemberDescriptor descr, System.Attribute[] attrs) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected EventDescriptor(System.ComponentModel.MemberDescriptor descr) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + public abstract System.Type EventType { get; } + public abstract bool IsMulticast { get; } + public abstract void RemoveEventHandler(object component, System.Delegate value); + } + + // Generated from `System.ComponentModel.EventDescriptorCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventDescriptorCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.ComponentModel.EventDescriptor value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + public void Clear() => throw null; + public bool Contains(System.ComponentModel.EventDescriptor value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public static System.ComponentModel.EventDescriptorCollection Empty; + public EventDescriptorCollection(System.ComponentModel.EventDescriptor[] events, bool readOnly) => throw null; + public EventDescriptorCollection(System.ComponentModel.EventDescriptor[] events) => throw null; + public virtual System.ComponentModel.EventDescriptor Find(string name, bool ignoreCase) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(System.ComponentModel.EventDescriptor value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, System.ComponentModel.EventDescriptor value) => throw null; + protected void InternalSort(string[] names) => throw null; + protected void InternalSort(System.Collections.IComparer sorter) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.ComponentModel.EventDescriptor this[string name] { get => throw null; } + public virtual System.ComponentModel.EventDescriptor this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public void Remove(System.ComponentModel.EventDescriptor value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + public void RemoveAt(int index) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection Sort(string[] names) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection Sort(System.Collections.IComparer comparer) => throw null; + public virtual System.ComponentModel.EventDescriptorCollection Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.ComponentModel.ExpandableObjectConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExpandableObjectConverter : System.ComponentModel.TypeConverter + { + public ExpandableObjectConverter() => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.ComponentModel.ExtenderProvidedPropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExtenderProvidedPropertyAttribute : System.Attribute + { + public override bool Equals(object obj) => throw null; + public System.ComponentModel.PropertyDescriptor ExtenderProperty { get => throw null; } + public ExtenderProvidedPropertyAttribute() => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public System.ComponentModel.IExtenderProvider Provider { get => throw null; } + public System.Type ReceiverType { get => throw null; } + } + + // Generated from `System.ComponentModel.GuidConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GuidConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public GuidConverter() => throw null; + } + + // Generated from `System.ComponentModel.HandledEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HandledEventArgs : System.EventArgs + { + public bool Handled { get => throw null; set => throw null; } + public HandledEventArgs(bool defaultHandledValue) => throw null; + public HandledEventArgs() => throw null; + } + + // Generated from `System.ComponentModel.HandledEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void HandledEventHandler(object sender, System.ComponentModel.HandledEventArgs e); + + // Generated from `System.ComponentModel.IBindingList` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IBindingList : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + void AddIndex(System.ComponentModel.PropertyDescriptor property); + object AddNew(); + bool AllowEdit { get; } + bool AllowNew { get; } + bool AllowRemove { get; } + void ApplySort(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction); + int Find(System.ComponentModel.PropertyDescriptor property, object key); + bool IsSorted { get; } + event System.ComponentModel.ListChangedEventHandler ListChanged; + void RemoveIndex(System.ComponentModel.PropertyDescriptor property); + void RemoveSort(); + System.ComponentModel.ListSortDirection SortDirection { get; } + System.ComponentModel.PropertyDescriptor SortProperty { get; } + bool SupportsChangeNotification { get; } + bool SupportsSearching { get; } + bool SupportsSorting { get; } + } + + // Generated from `System.ComponentModel.IBindingListView` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IBindingListView : System.ComponentModel.IBindingList, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + void ApplySort(System.ComponentModel.ListSortDescriptionCollection sorts); + string Filter { get; set; } + void RemoveFilter(); + System.ComponentModel.ListSortDescriptionCollection SortDescriptions { get; } + bool SupportsAdvancedSorting { get; } + bool SupportsFiltering { get; } + } + + // Generated from `System.ComponentModel.ICancelAddNew` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICancelAddNew + { + void CancelNew(int itemIndex); + void EndNew(int itemIndex); + } + + // Generated from `System.ComponentModel.IComNativeDescriptorHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComNativeDescriptorHandler + { + System.ComponentModel.AttributeCollection GetAttributes(object component); + string GetClassName(object component); + System.ComponentModel.TypeConverter GetConverter(object component); + System.ComponentModel.EventDescriptor GetDefaultEvent(object component); + System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component); + object GetEditor(object component, System.Type baseEditorType); + System.ComponentModel.EventDescriptorCollection GetEvents(object component, System.Attribute[] attributes); + System.ComponentModel.EventDescriptorCollection GetEvents(object component); + string GetName(object component); + System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, System.Attribute[] attributes); + object GetPropertyValue(object component, string propertyName, ref bool success); + object GetPropertyValue(object component, int dispid, ref bool success); + } + + // Generated from `System.ComponentModel.ICustomTypeDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomTypeDescriptor + { + System.ComponentModel.AttributeCollection GetAttributes(); + string GetClassName(); + string GetComponentName(); + System.ComponentModel.TypeConverter GetConverter(); + System.ComponentModel.EventDescriptor GetDefaultEvent(); + System.ComponentModel.PropertyDescriptor GetDefaultProperty(); + object GetEditor(System.Type editorBaseType); + System.ComponentModel.EventDescriptorCollection GetEvents(System.Attribute[] attributes); + System.ComponentModel.EventDescriptorCollection GetEvents(); + System.ComponentModel.PropertyDescriptorCollection GetProperties(System.Attribute[] attributes); + System.ComponentModel.PropertyDescriptorCollection GetProperties(); + object GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd); + } + + // Generated from `System.ComponentModel.IDataErrorInfo` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataErrorInfo + { + string Error { get; } + string this[string columnName] { get; } + } + + // Generated from `System.ComponentModel.IExtenderProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IExtenderProvider + { + bool CanExtend(object extendee); + } + + // Generated from `System.ComponentModel.IIntellisenseBuilder` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IIntellisenseBuilder + { + string Name { get; } + bool Show(string language, string value, ref string newValue); + } + + // Generated from `System.ComponentModel.IListSource` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IListSource + { + bool ContainsListCollection { get; } + System.Collections.IList GetList(); + } + + // Generated from `System.ComponentModel.INestedContainer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INestedContainer : System.IDisposable, System.ComponentModel.IContainer + { + System.ComponentModel.IComponent Owner { get; } + } + + // Generated from `System.ComponentModel.INestedSite` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INestedSite : System.IServiceProvider, System.ComponentModel.ISite + { + string FullName { get; } + } + + // Generated from `System.ComponentModel.IRaiseItemChangedEvents` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IRaiseItemChangedEvents + { + bool RaisesItemChangedEvents { get; } + } + + // Generated from `System.ComponentModel.ISupportInitializeNotification` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISupportInitializeNotification : System.ComponentModel.ISupportInitialize + { + event System.EventHandler Initialized; + bool IsInitialized { get; } + } + + // Generated from `System.ComponentModel.ITypeDescriptorContext` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeDescriptorContext : System.IServiceProvider + { + System.ComponentModel.IContainer Container { get; } + object Instance { get; } + void OnComponentChanged(); + bool OnComponentChanging(); + System.ComponentModel.PropertyDescriptor PropertyDescriptor { get; } + } + + // Generated from `System.ComponentModel.ITypedList` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypedList + { + System.ComponentModel.PropertyDescriptorCollection GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors); + string GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors); + } + + // Generated from `System.ComponentModel.InheritanceAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InheritanceAttribute : System.Attribute + { + public static System.ComponentModel.InheritanceAttribute Default; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public InheritanceAttribute(System.ComponentModel.InheritanceLevel inheritanceLevel) => throw null; + public InheritanceAttribute() => throw null; + public System.ComponentModel.InheritanceLevel InheritanceLevel { get => throw null; } + public static System.ComponentModel.InheritanceAttribute Inherited; + public static System.ComponentModel.InheritanceAttribute InheritedReadOnly; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.InheritanceAttribute NotInherited; + public override string ToString() => throw null; + } + + // Generated from `System.ComponentModel.InheritanceLevel` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum InheritanceLevel + { + // Stub generator skipped constructor + Inherited, + InheritedReadOnly, + NotInherited, + } + + // Generated from `System.ComponentModel.InstallerTypeAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InstallerTypeAttribute : System.Attribute + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Type InstallerType { get => throw null; } + public InstallerTypeAttribute(string typeName) => throw null; + public InstallerTypeAttribute(System.Type installerType) => throw null; + } + + // Generated from `System.ComponentModel.InstanceCreationEditor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class InstanceCreationEditor + { + public abstract object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Type instanceType); + protected InstanceCreationEditor() => throw null; + public virtual string Text { get => throw null; } + } + + // Generated from `System.ComponentModel.Int16Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Int16Converter : System.ComponentModel.BaseNumberConverter + { + public Int16Converter() => throw null; + } + + // Generated from `System.ComponentModel.Int32Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Int32Converter : System.ComponentModel.BaseNumberConverter + { + public Int32Converter() => throw null; + } + + // Generated from `System.ComponentModel.Int64Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Int64Converter : System.ComponentModel.BaseNumberConverter + { + public Int64Converter() => throw null; + } + + // Generated from `System.ComponentModel.LicFileLicenseProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LicFileLicenseProvider : System.ComponentModel.LicenseProvider + { + protected virtual string GetKey(System.Type type) => throw null; + public override System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, System.Type type, object instance, bool allowExceptions) => throw null; + protected virtual bool IsKeyValid(string key, System.Type type) => throw null; + public LicFileLicenseProvider() => throw null; + } + + // Generated from `System.ComponentModel.License` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class License : System.IDisposable + { + public abstract void Dispose(); + protected License() => throw null; + public abstract string LicenseKey { get; } + } + + // Generated from `System.ComponentModel.LicenseContext` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LicenseContext : System.IServiceProvider + { + public virtual string GetSavedLicenseKey(System.Type type, System.Reflection.Assembly resourceAssembly) => throw null; + public virtual object GetService(System.Type type) => throw null; + public LicenseContext() => throw null; + public virtual void SetSavedLicenseKey(System.Type type, string key) => throw null; + public virtual System.ComponentModel.LicenseUsageMode UsageMode { get => throw null; } + } + + // Generated from `System.ComponentModel.LicenseException` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LicenseException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public LicenseException(System.Type type, object instance, string message, System.Exception innerException) => throw null; + public LicenseException(System.Type type, object instance, string message) => throw null; + public LicenseException(System.Type type, object instance) => throw null; + public LicenseException(System.Type type) => throw null; + protected LicenseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Type LicensedType { get => throw null; } + } + + // Generated from `System.ComponentModel.LicenseManager` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LicenseManager + { + public static object CreateWithContext(System.Type type, System.ComponentModel.LicenseContext creationContext, object[] args) => throw null; + public static object CreateWithContext(System.Type type, System.ComponentModel.LicenseContext creationContext) => throw null; + public static System.ComponentModel.LicenseContext CurrentContext { get => throw null; set => throw null; } + public static bool IsLicensed(System.Type type) => throw null; + public static bool IsValid(System.Type type, object instance, out System.ComponentModel.License license) => throw null; + public static bool IsValid(System.Type type) => throw null; + public static void LockContext(object contextUser) => throw null; + public static void UnlockContext(object contextUser) => throw null; + public static System.ComponentModel.LicenseUsageMode UsageMode { get => throw null; } + public static void Validate(System.Type type) => throw null; + public static System.ComponentModel.License Validate(System.Type type, object instance) => throw null; + } + + // Generated from `System.ComponentModel.LicenseProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class LicenseProvider + { + public abstract System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, System.Type type, object instance, bool allowExceptions); + protected LicenseProvider() => throw null; + } + + // Generated from `System.ComponentModel.LicenseProviderAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LicenseProviderAttribute : System.Attribute + { + public static System.ComponentModel.LicenseProviderAttribute Default; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public System.Type LicenseProvider { get => throw null; } + public LicenseProviderAttribute(string typeName) => throw null; + public LicenseProviderAttribute(System.Type type) => throw null; + public LicenseProviderAttribute() => throw null; + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.LicenseUsageMode` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LicenseUsageMode + { + Designtime, + // Stub generator skipped constructor + Runtime, + } + + // Generated from `System.ComponentModel.ListBindableAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListBindableAttribute : System.Attribute + { + public static System.ComponentModel.ListBindableAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public bool ListBindable { get => throw null; } + public ListBindableAttribute(bool listBindable) => throw null; + public ListBindableAttribute(System.ComponentModel.BindableSupport flags) => throw null; + public static System.ComponentModel.ListBindableAttribute No; + public static System.ComponentModel.ListBindableAttribute Yes; + } + + // Generated from `System.ComponentModel.ListChangedEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListChangedEventArgs : System.EventArgs + { + public ListChangedEventArgs(System.ComponentModel.ListChangedType listChangedType, int newIndex, int oldIndex) => throw null; + public ListChangedEventArgs(System.ComponentModel.ListChangedType listChangedType, int newIndex, System.ComponentModel.PropertyDescriptor propDesc) => throw null; + public ListChangedEventArgs(System.ComponentModel.ListChangedType listChangedType, int newIndex) => throw null; + public ListChangedEventArgs(System.ComponentModel.ListChangedType listChangedType, System.ComponentModel.PropertyDescriptor propDesc) => throw null; + public System.ComponentModel.ListChangedType ListChangedType { get => throw null; } + public int NewIndex { get => throw null; } + public int OldIndex { get => throw null; } + public System.ComponentModel.PropertyDescriptor PropertyDescriptor { get => throw null; } + } + + // Generated from `System.ComponentModel.ListChangedEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ListChangedEventHandler(object sender, System.ComponentModel.ListChangedEventArgs e); + + // Generated from `System.ComponentModel.ListChangedType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ListChangedType + { + ItemAdded, + ItemChanged, + ItemDeleted, + ItemMoved, + // Stub generator skipped constructor + PropertyDescriptorAdded, + PropertyDescriptorChanged, + PropertyDescriptorDeleted, + Reset, + } + + // Generated from `System.ComponentModel.ListSortDescription` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListSortDescription + { + public ListSortDescription(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction) => throw null; + public System.ComponentModel.PropertyDescriptor PropertyDescriptor { get => throw null; set => throw null; } + public System.ComponentModel.ListSortDirection SortDirection { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.ListSortDescriptionCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListSortDescriptionCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + public bool Contains(object value) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.ComponentModel.ListSortDescription this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public ListSortDescriptionCollection(System.ComponentModel.ListSortDescription[] sorts) => throw null; + public ListSortDescriptionCollection() => throw null; + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.ComponentModel.ListSortDirection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ListSortDirection + { + Ascending, + Descending, + // Stub generator skipped constructor + } + + // Generated from `System.ComponentModel.LookupBindingPropertiesAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LookupBindingPropertiesAttribute : System.Attribute + { + public string DataSource { get => throw null; } + public static System.ComponentModel.LookupBindingPropertiesAttribute Default; + public string DisplayMember { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public LookupBindingPropertiesAttribute(string dataSource, string displayMember, string valueMember, string lookupMember) => throw null; + public LookupBindingPropertiesAttribute() => throw null; + public string LookupMember { get => throw null; } + public string ValueMember { get => throw null; } + } + + // Generated from `System.ComponentModel.MarshalByValueComponent` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MarshalByValueComponent : System.IServiceProvider, System.IDisposable, System.ComponentModel.IComponent + { + public virtual System.ComponentModel.IContainer Container { get => throw null; } + public virtual bool DesignMode { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public event System.EventHandler Disposed; + protected System.ComponentModel.EventHandlerList Events { get => throw null; } + public virtual object GetService(System.Type service) => throw null; + public MarshalByValueComponent() => throw null; + public virtual System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public override string ToString() => throw null; + // ERR: Stub generator didn't handle member: ~MarshalByValueComponent + } + + // Generated from `System.ComponentModel.MaskedTextProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MaskedTextProvider : System.ICloneable + { + public bool Add(string input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Add(string input) => throw null; + public bool Add(System.Char input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Add(System.Char input) => throw null; + public bool AllowPromptAsInput { get => throw null; } + public bool AsciiOnly { get => throw null; } + public int AssignedEditPositionCount { get => throw null; } + public int AvailableEditPositionCount { get => throw null; } + public void Clear(out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public void Clear() => throw null; + public object Clone() => throw null; + public System.Globalization.CultureInfo Culture { get => throw null; } + public static System.Char DefaultPasswordChar { get => throw null; } + public int EditPositionCount { get => throw null; } + public System.Collections.IEnumerator EditPositions { get => throw null; } + public int FindAssignedEditPositionFrom(int position, bool direction) => throw null; + public int FindAssignedEditPositionInRange(int startPosition, int endPosition, bool direction) => throw null; + public int FindEditPositionFrom(int position, bool direction) => throw null; + public int FindEditPositionInRange(int startPosition, int endPosition, bool direction) => throw null; + public int FindNonEditPositionFrom(int position, bool direction) => throw null; + public int FindNonEditPositionInRange(int startPosition, int endPosition, bool direction) => throw null; + public int FindUnassignedEditPositionFrom(int position, bool direction) => throw null; + public int FindUnassignedEditPositionInRange(int startPosition, int endPosition, bool direction) => throw null; + public static bool GetOperationResultFromHint(System.ComponentModel.MaskedTextResultHint hint) => throw null; + public bool IncludeLiterals { get => throw null; set => throw null; } + public bool IncludePrompt { get => throw null; set => throw null; } + public bool InsertAt(string input, int position, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool InsertAt(string input, int position) => throw null; + public bool InsertAt(System.Char input, int position, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool InsertAt(System.Char input, int position) => throw null; + public static int InvalidIndex { get => throw null; } + public bool IsAvailablePosition(int position) => throw null; + public bool IsEditPosition(int position) => throw null; + public bool IsPassword { get => throw null; set => throw null; } + public static bool IsValidInputChar(System.Char c) => throw null; + public static bool IsValidMaskChar(System.Char c) => throw null; + public static bool IsValidPasswordChar(System.Char c) => throw null; + public System.Char this[int index] { get => throw null; } + public int LastAssignedPosition { get => throw null; } + public int Length { get => throw null; } + public string Mask { get => throw null; } + public bool MaskCompleted { get => throw null; } + public bool MaskFull { get => throw null; } + public MaskedTextProvider(string mask, bool restrictToAscii) => throw null; + public MaskedTextProvider(string mask, System.Globalization.CultureInfo culture, bool restrictToAscii) => throw null; + public MaskedTextProvider(string mask, System.Globalization.CultureInfo culture, bool allowPromptAsInput, System.Char promptChar, System.Char passwordChar, bool restrictToAscii) => throw null; + public MaskedTextProvider(string mask, System.Globalization.CultureInfo culture, System.Char passwordChar, bool allowPromptAsInput) => throw null; + public MaskedTextProvider(string mask, System.Globalization.CultureInfo culture) => throw null; + public MaskedTextProvider(string mask, System.Char passwordChar, bool allowPromptAsInput) => throw null; + public MaskedTextProvider(string mask) => throw null; + public System.Char PasswordChar { get => throw null; set => throw null; } + public System.Char PromptChar { get => throw null; set => throw null; } + public bool Remove(out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Remove() => throw null; + public bool RemoveAt(int startPosition, int endPosition, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool RemoveAt(int startPosition, int endPosition) => throw null; + public bool RemoveAt(int position) => throw null; + public bool Replace(string input, int startPosition, int endPosition, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Replace(string input, int position, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Replace(string input, int position) => throw null; + public bool Replace(System.Char input, int startPosition, int endPosition, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Replace(System.Char input, int position, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Replace(System.Char input, int position) => throw null; + public bool ResetOnPrompt { get => throw null; set => throw null; } + public bool ResetOnSpace { get => throw null; set => throw null; } + public bool Set(string input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool Set(string input) => throw null; + public bool SkipLiterals { get => throw null; set => throw null; } + public string ToDisplayString() => throw null; + public string ToString(int startPosition, int length) => throw null; + public string ToString(bool includePrompt, bool includeLiterals, int startPosition, int length) => throw null; + public string ToString(bool includePrompt, bool includeLiterals) => throw null; + public string ToString(bool ignorePasswordChar, int startPosition, int length) => throw null; + public string ToString(bool ignorePasswordChar, bool includePrompt, bool includeLiterals, int startPosition, int length) => throw null; + public string ToString(bool ignorePasswordChar) => throw null; + public override string ToString() => throw null; + public bool VerifyChar(System.Char input, int position, out System.ComponentModel.MaskedTextResultHint hint) => throw null; + public bool VerifyEscapeChar(System.Char input, int position) => throw null; + public bool VerifyString(string input, out int testPosition, out System.ComponentModel.MaskedTextResultHint resultHint) => throw null; + public bool VerifyString(string input) => throw null; + } + + // Generated from `System.ComponentModel.MaskedTextResultHint` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MaskedTextResultHint + { + AlphanumericCharacterExpected, + AsciiCharacterExpected, + CharacterEscaped, + DigitExpected, + InvalidInput, + LetterExpected, + // Stub generator skipped constructor + NoEffect, + NonEditPosition, + PositionOutOfRange, + PromptCharNotAllowed, + SideEffect, + SignedDigitExpected, + Success, + UnavailableEditPosition, + Unknown, + } + + // Generated from `System.ComponentModel.MemberDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MemberDescriptor + { + protected virtual System.Attribute[] AttributeArray { get => throw null; set => throw null; } + public virtual System.ComponentModel.AttributeCollection Attributes { get => throw null; } + public virtual string Category { get => throw null; } + protected virtual System.ComponentModel.AttributeCollection CreateAttributeCollection() => throw null; + public virtual string Description { get => throw null; } + public virtual bool DesignTimeOnly { get => throw null; } + public virtual string DisplayName { get => throw null; } + public override bool Equals(object obj) => throw null; + protected virtual void FillAttributes(System.Collections.IList attributeList) => throw null; + protected static System.Reflection.MethodInfo FindMethod(System.Type componentClass, string name, System.Type[] args, System.Type returnType, bool publicOnly) => throw null; + protected static System.Reflection.MethodInfo FindMethod(System.Type componentClass, string name, System.Type[] args, System.Type returnType) => throw null; + public override int GetHashCode() => throw null; + protected virtual object GetInvocationTarget(System.Type type, object instance) => throw null; + protected static object GetInvokee(System.Type componentClass, object component) => throw null; + protected static System.ComponentModel.ISite GetSite(object component) => throw null; + public virtual bool IsBrowsable { get => throw null; } + protected MemberDescriptor(string name, System.Attribute[] attributes) => throw null; + protected MemberDescriptor(string name) => throw null; + protected MemberDescriptor(System.ComponentModel.MemberDescriptor oldMemberDescriptor, System.Attribute[] newAttributes) => throw null; + protected MemberDescriptor(System.ComponentModel.MemberDescriptor descr) => throw null; + public virtual string Name { get => throw null; } + protected virtual int NameHashCode { get => throw null; } + } + + // Generated from `System.ComponentModel.MultilineStringConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MultilineStringConverter : System.ComponentModel.TypeConverter + { + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public MultilineStringConverter() => throw null; + } + + // Generated from `System.ComponentModel.NestedContainer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NestedContainer : System.ComponentModel.Container, System.IDisposable, System.ComponentModel.INestedContainer, System.ComponentModel.IContainer + { + protected override System.ComponentModel.ISite CreateSite(System.ComponentModel.IComponent component, string name) => throw null; + protected override void Dispose(bool disposing) => throw null; + protected override object GetService(System.Type service) => throw null; + public NestedContainer(System.ComponentModel.IComponent owner) => throw null; + public System.ComponentModel.IComponent Owner { get => throw null; } + protected virtual string OwnerName { get => throw null; } + } + + // Generated from `System.ComponentModel.NullableConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NullableConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public NullableConverter(System.Type type) => throw null; + public System.Type NullableType { get => throw null; } + public System.Type UnderlyingType { get => throw null; } + public System.ComponentModel.TypeConverter UnderlyingTypeConverter { get => throw null; } + } + + // Generated from `System.ComponentModel.PasswordPropertyTextAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PasswordPropertyTextAttribute : System.Attribute + { + public static System.ComponentModel.PasswordPropertyTextAttribute Default; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.PasswordPropertyTextAttribute No; + public bool Password { get => throw null; } + public PasswordPropertyTextAttribute(bool password) => throw null; + public PasswordPropertyTextAttribute() => throw null; + public static System.ComponentModel.PasswordPropertyTextAttribute Yes; + } + + // Generated from `System.ComponentModel.PropertyDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class PropertyDescriptor : System.ComponentModel.MemberDescriptor + { + public virtual void AddValueChanged(object component, System.EventHandler handler) => throw null; + public abstract bool CanResetValue(object component); + public abstract System.Type ComponentType { get; } + public virtual System.ComponentModel.TypeConverter Converter { get => throw null; } + protected object CreateInstance(System.Type type) => throw null; + public override bool Equals(object obj) => throw null; + protected override void FillAttributes(System.Collections.IList attributeList) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection GetChildProperties(object instance, System.Attribute[] filter) => throw null; + public System.ComponentModel.PropertyDescriptorCollection GetChildProperties(object instance) => throw null; + public System.ComponentModel.PropertyDescriptorCollection GetChildProperties(System.Attribute[] filter) => throw null; + public System.ComponentModel.PropertyDescriptorCollection GetChildProperties() => throw null; + public virtual object GetEditor(System.Type editorBaseType) => throw null; + public override int GetHashCode() => throw null; + protected override object GetInvocationTarget(System.Type type, object instance) => throw null; + protected System.Type GetTypeFromName(string typeName) => throw null; + public abstract object GetValue(object component); + protected internal System.EventHandler GetValueChangedHandler(object component) => throw null; + public virtual bool IsLocalizable { get => throw null; } + public abstract bool IsReadOnly { get; } + protected virtual void OnValueChanged(object component, System.EventArgs e) => throw null; + protected PropertyDescriptor(string name, System.Attribute[] attrs) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected PropertyDescriptor(System.ComponentModel.MemberDescriptor descr, System.Attribute[] attrs) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected PropertyDescriptor(System.ComponentModel.MemberDescriptor descr) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + public abstract System.Type PropertyType { get; } + public virtual void RemoveValueChanged(object component, System.EventHandler handler) => throw null; + public abstract void ResetValue(object component); + public System.ComponentModel.DesignerSerializationVisibility SerializationVisibility { get => throw null; } + public abstract void SetValue(object component, object value); + public abstract bool ShouldSerializeValue(object component); + public virtual bool SupportsChangeEvents { get => throw null; } + } + + // Generated from `System.ComponentModel.PropertyDescriptorCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyDescriptorCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + public int Add(System.ComponentModel.PropertyDescriptor value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.IDictionary.Clear() => throw null; + public void Clear() => throw null; + public bool Contains(System.ComponentModel.PropertyDescriptor value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public static System.ComponentModel.PropertyDescriptorCollection Empty; + public virtual System.ComponentModel.PropertyDescriptor Find(string name, bool ignoreCase) => throw null; + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + public int IndexOf(System.ComponentModel.PropertyDescriptor value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, System.ComponentModel.PropertyDescriptor value) => throw null; + protected void InternalSort(string[] names) => throw null; + protected void InternalSort(System.Collections.IComparer sorter) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.ComponentModel.PropertyDescriptor this[string name] { get => throw null; } + public virtual System.ComponentModel.PropertyDescriptor this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + public PropertyDescriptorCollection(System.ComponentModel.PropertyDescriptor[] properties, bool readOnly) => throw null; + public PropertyDescriptorCollection(System.ComponentModel.PropertyDescriptor[] properties) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IDictionary.Remove(object key) => throw null; + public void Remove(System.ComponentModel.PropertyDescriptor value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + public void RemoveAt(int index) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection Sort(System.Collections.IComparer comparer) => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection Sort() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + } + + // Generated from `System.ComponentModel.PropertyTabAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyTabAttribute : System.Attribute + { + public override bool Equals(object other) => throw null; + public bool Equals(System.ComponentModel.PropertyTabAttribute other) => throw null; + public override int GetHashCode() => throw null; + protected void InitializeArrays(string[] tabClassNames, System.ComponentModel.PropertyTabScope[] tabScopes) => throw null; + protected void InitializeArrays(System.Type[] tabClasses, System.ComponentModel.PropertyTabScope[] tabScopes) => throw null; + public PropertyTabAttribute(string tabClassName, System.ComponentModel.PropertyTabScope tabScope) => throw null; + public PropertyTabAttribute(string tabClassName) => throw null; + public PropertyTabAttribute(System.Type tabClass, System.ComponentModel.PropertyTabScope tabScope) => throw null; + public PropertyTabAttribute(System.Type tabClass) => throw null; + public PropertyTabAttribute() => throw null; + protected string[] TabClassNames { get => throw null; } + public System.Type[] TabClasses { get => throw null; } + public System.ComponentModel.PropertyTabScope[] TabScopes { get => throw null; } + } + + // Generated from `System.ComponentModel.PropertyTabScope` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PropertyTabScope + { + Component, + Document, + Global, + // Stub generator skipped constructor + Static, + } + + // Generated from `System.ComponentModel.ProvidePropertyAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProvidePropertyAttribute : System.Attribute + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string PropertyName { get => throw null; } + public ProvidePropertyAttribute(string propertyName, string receiverTypeName) => throw null; + public ProvidePropertyAttribute(string propertyName, System.Type receiverType) => throw null; + public string ReceiverTypeName { get => throw null; } + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.RecommendedAsConfigurableAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RecommendedAsConfigurableAttribute : System.Attribute + { + public static System.ComponentModel.RecommendedAsConfigurableAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.RecommendedAsConfigurableAttribute No; + public bool RecommendedAsConfigurable { get => throw null; } + public RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable) => throw null; + public static System.ComponentModel.RecommendedAsConfigurableAttribute Yes; + } + + // Generated from `System.ComponentModel.ReferenceConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReferenceConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + protected virtual bool IsValueAllowed(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public ReferenceConverter(System.Type type) => throw null; + } + + // Generated from `System.ComponentModel.RefreshEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RefreshEventArgs : System.EventArgs + { + public object ComponentChanged { get => throw null; } + public RefreshEventArgs(object componentChanged) => throw null; + public RefreshEventArgs(System.Type typeChanged) => throw null; + public System.Type TypeChanged { get => throw null; } + } + + // Generated from `System.ComponentModel.RefreshEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void RefreshEventHandler(System.ComponentModel.RefreshEventArgs e); + + // Generated from `System.ComponentModel.RunInstallerAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RunInstallerAttribute : System.Attribute + { + public static System.ComponentModel.RunInstallerAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.RunInstallerAttribute No; + public bool RunInstaller { get => throw null; } + public RunInstallerAttribute(bool runInstaller) => throw null; + public static System.ComponentModel.RunInstallerAttribute Yes; + } + + // Generated from `System.ComponentModel.SByteConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SByteConverter : System.ComponentModel.BaseNumberConverter + { + public SByteConverter() => throw null; + } + + // Generated from `System.ComponentModel.SettingsBindableAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SettingsBindableAttribute : System.Attribute + { + public bool Bindable { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.ComponentModel.SettingsBindableAttribute No; + public SettingsBindableAttribute(bool bindable) => throw null; + public static System.ComponentModel.SettingsBindableAttribute Yes; + } + + // Generated from `System.ComponentModel.SingleConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SingleConverter : System.ComponentModel.BaseNumberConverter + { + public SingleConverter() => throw null; + } + + // Generated from `System.ComponentModel.StringConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public StringConverter() => throw null; + } + + // Generated from `System.ComponentModel.SyntaxCheck` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SyntaxCheck + { + public static bool CheckMachineName(string value) => throw null; + public static bool CheckPath(string value) => throw null; + public static bool CheckRootedPath(string value) => throw null; + } + + // Generated from `System.ComponentModel.TimeSpanConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimeSpanConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public TimeSpanConverter() => throw null; + } + + // Generated from `System.ComponentModel.ToolboxItemAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ToolboxItemAttribute : System.Attribute + { + public static System.ComponentModel.ToolboxItemAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDefaultAttribute() => throw null; + public static System.ComponentModel.ToolboxItemAttribute None; + public ToolboxItemAttribute(string toolboxItemTypeName) => throw null; + public ToolboxItemAttribute(bool defaultType) => throw null; + public ToolboxItemAttribute(System.Type toolboxItemType) => throw null; + public System.Type ToolboxItemType { get => throw null; } + public string ToolboxItemTypeName { get => throw null; } + } + + // Generated from `System.ComponentModel.ToolboxItemFilterAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ToolboxItemFilterAttribute : System.Attribute + { + public override bool Equals(object obj) => throw null; + public string FilterString { get => throw null; } + public System.ComponentModel.ToolboxItemFilterType FilterType { get => throw null; } + public override int GetHashCode() => throw null; + public override bool Match(object obj) => throw null; + public override string ToString() => throw null; + public ToolboxItemFilterAttribute(string filterString, System.ComponentModel.ToolboxItemFilterType filterType) => throw null; + public ToolboxItemFilterAttribute(string filterString) => throw null; + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.ToolboxItemFilterType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ToolboxItemFilterType + { + Allow, + Custom, + Prevent, + Require, + // Stub generator skipped constructor + } + + // Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeConverter + { + public virtual bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public bool CanConvertFrom(System.Type sourceType) => throw null; + public virtual bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public bool CanConvertTo(System.Type destinationType) => throw null; + public virtual object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public object ConvertFrom(object value) => throw null; + public object ConvertFromInvariantString(string text) => throw null; + public object ConvertFromInvariantString(System.ComponentModel.ITypeDescriptorContext context, string text) => throw null; + public object ConvertFromString(string text) => throw null; + public object ConvertFromString(System.ComponentModel.ITypeDescriptorContext context, string text) => throw null; + public object ConvertFromString(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, string text) => throw null; + public virtual object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public object ConvertTo(object value, System.Type destinationType) => throw null; + public string ConvertToInvariantString(object value) => throw null; + public string ConvertToInvariantString(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public string ConvertToString(object value) => throw null; + public string ConvertToString(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public string ConvertToString(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public virtual object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public object CreateInstance(System.Collections.IDictionary propertyValues) => throw null; + protected System.Exception GetConvertFromException(object value) => throw null; + protected System.Exception GetConvertToException(object value, System.Type destinationType) => throw null; + public virtual bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public bool GetCreateInstanceSupported() => throw null; + public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public System.ComponentModel.PropertyDescriptorCollection GetProperties(object value) => throw null; + public System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public virtual bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public bool GetPropertiesSupported() => throw null; + public virtual System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public System.Collections.ICollection GetStandardValues() => throw null; + public virtual bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public bool GetStandardValuesExclusive() => throw null; + public virtual bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public bool GetStandardValuesSupported() => throw null; + public virtual bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public bool IsValid(object value) => throw null; + // Generated from `System.ComponentModel.TypeConverter.SimplePropertyDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected abstract class SimplePropertyDescriptor : System.ComponentModel.PropertyDescriptor + { + public override bool CanResetValue(object component) => throw null; + public override System.Type ComponentType { get => throw null; } + public override bool IsReadOnly { get => throw null; } + public override System.Type PropertyType { get => throw null; } + public override void ResetValue(object component) => throw null; + public override bool ShouldSerializeValue(object component) => throw null; + protected SimplePropertyDescriptor(System.Type componentType, string name, System.Type propertyType, System.Attribute[] attributes) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected SimplePropertyDescriptor(System.Type componentType, string name, System.Type propertyType) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + } + + + protected System.ComponentModel.PropertyDescriptorCollection SortProperties(System.ComponentModel.PropertyDescriptorCollection props, string[] names) => throw null; + // Generated from `System.ComponentModel.TypeConverter.StandardValuesCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StandardValuesCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public object this[int index] { get => throw null; } + public StandardValuesCollection(System.Collections.ICollection values) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + public TypeConverter() => throw null; + } + + // Generated from `System.ComponentModel.TypeDescriptionProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TypeDescriptionProvider + { + public virtual object CreateInstance(System.IServiceProvider provider, System.Type objectType, System.Type[] argTypes, object[] args) => throw null; + public virtual System.Collections.IDictionary GetCache(object instance) => throw null; + public virtual System.ComponentModel.ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance) => throw null; + protected internal virtual System.ComponentModel.IExtenderProvider[] GetExtenderProviders(object instance) => throw null; + public virtual string GetFullComponentName(object component) => throw null; + public virtual System.Type GetReflectionType(System.Type objectType, object instance) => throw null; + public System.Type GetReflectionType(object instance) => throw null; + public System.Type GetReflectionType(System.Type objectType) => throw null; + public virtual System.Type GetRuntimeType(System.Type reflectionType) => throw null; + public virtual System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor(System.Type objectType, object instance) => throw null; + public System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor(object instance) => throw null; + public System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor(System.Type objectType) => throw null; + public virtual bool IsSupportedType(System.Type type) => throw null; + protected TypeDescriptionProvider(System.ComponentModel.TypeDescriptionProvider parent) => throw null; + protected TypeDescriptionProvider() => throw null; + } + + // Generated from `System.ComponentModel.TypeDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeDescriptor + { + public static System.ComponentModel.TypeDescriptionProvider AddAttributes(object instance, params System.Attribute[] attributes) => throw null; + public static System.ComponentModel.TypeDescriptionProvider AddAttributes(System.Type type, params System.Attribute[] attributes) => throw null; + public static void AddEditorTable(System.Type editorBaseType, System.Collections.Hashtable table) => throw null; + public static void AddProvider(System.ComponentModel.TypeDescriptionProvider provider, object instance) => throw null; + public static void AddProvider(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) => throw null; + public static void AddProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, object instance) => throw null; + public static void AddProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) => throw null; + public static System.ComponentModel.IComNativeDescriptorHandler ComNativeDescriptorHandler { get => throw null; set => throw null; } + public static System.Type ComObjectType { get => throw null; } + public static void CreateAssociation(object primary, object secondary) => throw null; + public static System.ComponentModel.Design.IDesigner CreateDesigner(System.ComponentModel.IComponent component, System.Type designerBaseType) => throw null; + public static System.ComponentModel.EventDescriptor CreateEvent(System.Type componentType, string name, System.Type type, params System.Attribute[] attributes) => throw null; + public static System.ComponentModel.EventDescriptor CreateEvent(System.Type componentType, System.ComponentModel.EventDescriptor oldEventDescriptor, params System.Attribute[] attributes) => throw null; + public static object CreateInstance(System.IServiceProvider provider, System.Type objectType, System.Type[] argTypes, object[] args) => throw null; + public static System.ComponentModel.PropertyDescriptor CreateProperty(System.Type componentType, string name, System.Type type, params System.Attribute[] attributes) => throw null; + public static System.ComponentModel.PropertyDescriptor CreateProperty(System.Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params System.Attribute[] attributes) => throw null; + public static object GetAssociation(System.Type type, object primary) => throw null; + public static System.ComponentModel.AttributeCollection GetAttributes(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.AttributeCollection GetAttributes(object component) => throw null; + public static System.ComponentModel.AttributeCollection GetAttributes(System.Type componentType) => throw null; + public static string GetClassName(object component, bool noCustomTypeDesc) => throw null; + public static string GetClassName(object component) => throw null; + public static string GetClassName(System.Type componentType) => throw null; + public static string GetComponentName(object component, bool noCustomTypeDesc) => throw null; + public static string GetComponentName(object component) => throw null; + public static System.ComponentModel.TypeConverter GetConverter(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.TypeConverter GetConverter(object component) => throw null; + public static System.ComponentModel.TypeConverter GetConverter(System.Type type) => throw null; + public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component) => throw null; + public static System.ComponentModel.EventDescriptor GetDefaultEvent(System.Type componentType) => throw null; + public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component) => throw null; + public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(System.Type componentType) => throw null; + public static object GetEditor(object component, System.Type editorBaseType, bool noCustomTypeDesc) => throw null; + public static object GetEditor(object component, System.Type editorBaseType) => throw null; + public static object GetEditor(System.Type type, System.Type editorBaseType) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, System.Attribute[] attributes, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(object component, System.Attribute[] attributes) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(object component) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(System.Type componentType, System.Attribute[] attributes) => throw null; + public static System.ComponentModel.EventDescriptorCollection GetEvents(System.Type componentType) => throw null; + public static string GetFullComponentName(object component) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, System.Attribute[] attributes, bool noCustomTypeDesc) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component, System.Attribute[] attributes) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(object component) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(System.Type componentType, System.Attribute[] attributes) => throw null; + public static System.ComponentModel.PropertyDescriptorCollection GetProperties(System.Type componentType) => throw null; + public static System.ComponentModel.TypeDescriptionProvider GetProvider(object instance) => throw null; + public static System.ComponentModel.TypeDescriptionProvider GetProvider(System.Type type) => throw null; + public static System.Type GetReflectionType(object instance) => throw null; + public static System.Type GetReflectionType(System.Type type) => throw null; + public static System.Type InterfaceType { get => throw null; } + public static void Refresh(object component) => throw null; + public static void Refresh(System.Type type) => throw null; + public static void Refresh(System.Reflection.Module module) => throw null; + public static void Refresh(System.Reflection.Assembly assembly) => throw null; + public static event System.ComponentModel.RefreshEventHandler Refreshed; + public static void RemoveAssociation(object primary, object secondary) => throw null; + public static void RemoveAssociations(object primary) => throw null; + public static void RemoveProvider(System.ComponentModel.TypeDescriptionProvider provider, object instance) => throw null; + public static void RemoveProvider(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) => throw null; + public static void RemoveProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, object instance) => throw null; + public static void RemoveProviderTransparent(System.ComponentModel.TypeDescriptionProvider provider, System.Type type) => throw null; + public static void SortDescriptorArray(System.Collections.IList infos) => throw null; + } + + // Generated from `System.ComponentModel.TypeListConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TypeListConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + protected TypeListConverter(System.Type[] types) => throw null; + } + + // Generated from `System.ComponentModel.UInt16Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UInt16Converter : System.ComponentModel.BaseNumberConverter + { + public UInt16Converter() => throw null; + } + + // Generated from `System.ComponentModel.UInt32Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UInt32Converter : System.ComponentModel.BaseNumberConverter + { + public UInt32Converter() => throw null; + } + + // Generated from `System.ComponentModel.UInt64Converter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UInt64Converter : System.ComponentModel.BaseNumberConverter + { + public UInt64Converter() => throw null; + } + + // Generated from `System.ComponentModel.VersionConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VersionConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; + public VersionConverter() => throw null; + } + + // Generated from `System.ComponentModel.WarningException` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WarningException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string HelpTopic { get => throw null; } + public string HelpUrl { get => throw null; } + public WarningException(string message, string helpUrl, string helpTopic) => throw null; + public WarningException(string message, string helpUrl) => throw null; + public WarningException(string message, System.Exception innerException) => throw null; + public WarningException(string message) => throw null; + public WarningException() => throw null; + protected WarningException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + namespace Design + { + // Generated from `System.ComponentModel.Design.ActiveDesignerEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ActiveDesignerEventArgs : System.EventArgs + { + public ActiveDesignerEventArgs(System.ComponentModel.Design.IDesignerHost oldDesigner, System.ComponentModel.Design.IDesignerHost newDesigner) => throw null; + public System.ComponentModel.Design.IDesignerHost NewDesigner { get => throw null; } + public System.ComponentModel.Design.IDesignerHost OldDesigner { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.ActiveDesignerEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ActiveDesignerEventHandler(object sender, System.ComponentModel.Design.ActiveDesignerEventArgs e); + + // Generated from `System.ComponentModel.Design.CheckoutException` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CheckoutException : System.Runtime.InteropServices.ExternalException + { + public static System.ComponentModel.Design.CheckoutException Canceled; + public CheckoutException(string message, int errorCode) => throw null; + public CheckoutException(string message, System.Exception innerException) => throw null; + public CheckoutException(string message) => throw null; + public CheckoutException() => throw null; + protected CheckoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ComponentModel.Design.CommandID` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CommandID + { + public CommandID(System.Guid menuGroup, int commandID) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Guid Guid { get => throw null; } + public virtual int ID { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.ComponentModel.Design.ComponentChangedEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentChangedEventArgs : System.EventArgs + { + public object Component { get => throw null; } + public ComponentChangedEventArgs(object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue) => throw null; + public System.ComponentModel.MemberDescriptor Member { get => throw null; } + public object NewValue { get => throw null; } + public object OldValue { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.ComponentChangedEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ComponentChangedEventHandler(object sender, System.ComponentModel.Design.ComponentChangedEventArgs e); + + // Generated from `System.ComponentModel.Design.ComponentChangingEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentChangingEventArgs : System.EventArgs + { + public object Component { get => throw null; } + public ComponentChangingEventArgs(object component, System.ComponentModel.MemberDescriptor member) => throw null; + public System.ComponentModel.MemberDescriptor Member { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.ComponentChangingEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ComponentChangingEventHandler(object sender, System.ComponentModel.Design.ComponentChangingEventArgs e); + + // Generated from `System.ComponentModel.Design.ComponentEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentEventArgs : System.EventArgs + { + public virtual System.ComponentModel.IComponent Component { get => throw null; } + public ComponentEventArgs(System.ComponentModel.IComponent component) => throw null; + } + + // Generated from `System.ComponentModel.Design.ComponentEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ComponentEventHandler(object sender, System.ComponentModel.Design.ComponentEventArgs e); + + // Generated from `System.ComponentModel.Design.ComponentRenameEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentRenameEventArgs : System.EventArgs + { + public object Component { get => throw null; } + public ComponentRenameEventArgs(object component, string oldName, string newName) => throw null; + public virtual string NewName { get => throw null; } + public virtual string OldName { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.ComponentRenameEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ComponentRenameEventHandler(object sender, System.ComponentModel.Design.ComponentRenameEventArgs e); + + // Generated from `System.ComponentModel.Design.DesignerCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public DesignerCollection(System.ComponentModel.Design.IDesignerHost[] designers) => throw null; + public DesignerCollection(System.Collections.IList designers) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual System.ComponentModel.Design.IDesignerHost this[int index] { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.DesignerEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerEventArgs : System.EventArgs + { + public System.ComponentModel.Design.IDesignerHost Designer { get => throw null; } + public DesignerEventArgs(System.ComponentModel.Design.IDesignerHost host) => throw null; + } + + // Generated from `System.ComponentModel.Design.DesignerEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DesignerEventHandler(object sender, System.ComponentModel.Design.DesignerEventArgs e); + + // Generated from `System.ComponentModel.Design.DesignerOptionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DesignerOptionService : System.ComponentModel.Design.IDesignerOptionService + { + protected System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection CreateOptionCollection(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection parent, string name, object value) => throw null; + // Generated from `System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerOptionCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection this[string name] { get => throw null; } + public System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public string Name { get => throw null; } + public System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection Parent { get => throw null; } + public System.ComponentModel.PropertyDescriptorCollection Properties { get => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + public bool ShowDialog() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + protected DesignerOptionService() => throw null; + object System.ComponentModel.Design.IDesignerOptionService.GetOptionValue(string pageName, string valueName) => throw null; + public System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection Options { get => throw null; } + protected virtual void PopulateOptionCollection(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection options) => throw null; + void System.ComponentModel.Design.IDesignerOptionService.SetOptionValue(string pageName, string valueName, object value) => throw null; + protected virtual bool ShowDialog(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection options, object optionObject) => throw null; + } + + // Generated from `System.ComponentModel.Design.DesignerTransaction` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DesignerTransaction : System.IDisposable + { + public void Cancel() => throw null; + public bool Canceled { get => throw null; } + public void Commit() => throw null; + public bool Committed { get => throw null; } + public string Description { get => throw null; } + protected DesignerTransaction(string description) => throw null; + protected DesignerTransaction() => throw null; + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected abstract void OnCancel(); + protected abstract void OnCommit(); + // ERR: Stub generator didn't handle member: ~DesignerTransaction + } + + // Generated from `System.ComponentModel.Design.DesignerTransactionCloseEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerTransactionCloseEventArgs : System.EventArgs + { + public DesignerTransactionCloseEventArgs(bool commit, bool lastTransaction) => throw null; + public DesignerTransactionCloseEventArgs(bool commit) => throw null; + public bool LastTransaction { get => throw null; } + public bool TransactionCommitted { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.DesignerTransactionCloseEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DesignerTransactionCloseEventHandler(object sender, System.ComponentModel.Design.DesignerTransactionCloseEventArgs e); + + // Generated from `System.ComponentModel.Design.DesignerVerb` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerVerb : System.ComponentModel.Design.MenuCommand + { + public string Description { get => throw null; set => throw null; } + public DesignerVerb(string text, System.EventHandler handler, System.ComponentModel.Design.CommandID startCommandID) : base(default(System.EventHandler), default(System.ComponentModel.Design.CommandID)) => throw null; + public DesignerVerb(string text, System.EventHandler handler) : base(default(System.EventHandler), default(System.ComponentModel.Design.CommandID)) => throw null; + public string Text { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.ComponentModel.Design.DesignerVerbCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesignerVerbCollection : System.Collections.CollectionBase + { + public int Add(System.ComponentModel.Design.DesignerVerb value) => throw null; + public void AddRange(System.ComponentModel.Design.DesignerVerb[] value) => throw null; + public void AddRange(System.ComponentModel.Design.DesignerVerbCollection value) => throw null; + public bool Contains(System.ComponentModel.Design.DesignerVerb value) => throw null; + public void CopyTo(System.ComponentModel.Design.DesignerVerb[] array, int index) => throw null; + public DesignerVerbCollection(System.ComponentModel.Design.DesignerVerb[] value) => throw null; + public DesignerVerbCollection() => throw null; + public int IndexOf(System.ComponentModel.Design.DesignerVerb value) => throw null; + public void Insert(int index, System.ComponentModel.Design.DesignerVerb value) => throw null; + public System.ComponentModel.Design.DesignerVerb this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object value) => throw null; + protected override void OnRemove(int index, object value) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + protected override void OnValidate(object value) => throw null; + public void Remove(System.ComponentModel.Design.DesignerVerb value) => throw null; + } + + // Generated from `System.ComponentModel.Design.DesigntimeLicenseContext` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesigntimeLicenseContext : System.ComponentModel.LicenseContext + { + public DesigntimeLicenseContext() => throw null; + public override string GetSavedLicenseKey(System.Type type, System.Reflection.Assembly resourceAssembly) => throw null; + public override void SetSavedLicenseKey(System.Type type, string key) => throw null; + public override System.ComponentModel.LicenseUsageMode UsageMode { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.DesigntimeLicenseContextSerializer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DesigntimeLicenseContextSerializer + { + public static void Serialize(System.IO.Stream o, string cryptoKey, System.ComponentModel.Design.DesigntimeLicenseContext context) => throw null; + } + + // Generated from `System.ComponentModel.Design.HelpContextType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HelpContextType + { + Ambient, + // Stub generator skipped constructor + Selection, + ToolWindowSelection, + Window, + } + + // Generated from `System.ComponentModel.Design.HelpKeywordAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HelpKeywordAttribute : System.Attribute + { + public static System.ComponentModel.Design.HelpKeywordAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string HelpKeyword { get => throw null; } + public HelpKeywordAttribute(string keyword) => throw null; + public HelpKeywordAttribute(System.Type t) => throw null; + public HelpKeywordAttribute() => throw null; + public override bool IsDefaultAttribute() => throw null; + } + + // Generated from `System.ComponentModel.Design.HelpKeywordType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HelpKeywordType + { + F1Keyword, + FilterKeyword, + GeneralKeyword, + // Stub generator skipped constructor + } + + // Generated from `System.ComponentModel.Design.IComponentChangeService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComponentChangeService + { + event System.ComponentModel.Design.ComponentEventHandler ComponentAdded; + event System.ComponentModel.Design.ComponentEventHandler ComponentAdding; + event System.ComponentModel.Design.ComponentChangedEventHandler ComponentChanged; + event System.ComponentModel.Design.ComponentChangingEventHandler ComponentChanging; + event System.ComponentModel.Design.ComponentEventHandler ComponentRemoved; + event System.ComponentModel.Design.ComponentEventHandler ComponentRemoving; + event System.ComponentModel.Design.ComponentRenameEventHandler ComponentRename; + void OnComponentChanged(object component, System.ComponentModel.MemberDescriptor member, object oldValue, object newValue); + void OnComponentChanging(object component, System.ComponentModel.MemberDescriptor member); + } + + // Generated from `System.ComponentModel.Design.IComponentDiscoveryService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComponentDiscoveryService + { + System.Collections.ICollection GetComponentTypes(System.ComponentModel.Design.IDesignerHost designerHost, System.Type baseType); + } + + // Generated from `System.ComponentModel.Design.IComponentInitializer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComponentInitializer + { + void InitializeExistingComponent(System.Collections.IDictionary defaultValues); + void InitializeNewComponent(System.Collections.IDictionary defaultValues); + } + + // Generated from `System.ComponentModel.Design.IDesigner` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesigner : System.IDisposable + { + System.ComponentModel.IComponent Component { get; } + void DoDefaultAction(); + void Initialize(System.ComponentModel.IComponent component); + System.ComponentModel.Design.DesignerVerbCollection Verbs { get; } + } + + // Generated from `System.ComponentModel.Design.IDesignerEventService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerEventService + { + System.ComponentModel.Design.IDesignerHost ActiveDesigner { get; } + event System.ComponentModel.Design.ActiveDesignerEventHandler ActiveDesignerChanged; + event System.ComponentModel.Design.DesignerEventHandler DesignerCreated; + event System.ComponentModel.Design.DesignerEventHandler DesignerDisposed; + System.ComponentModel.Design.DesignerCollection Designers { get; } + event System.EventHandler SelectionChanged; + } + + // Generated from `System.ComponentModel.Design.IDesignerFilter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerFilter + { + void PostFilterAttributes(System.Collections.IDictionary attributes); + void PostFilterEvents(System.Collections.IDictionary events); + void PostFilterProperties(System.Collections.IDictionary properties); + void PreFilterAttributes(System.Collections.IDictionary attributes); + void PreFilterEvents(System.Collections.IDictionary events); + void PreFilterProperties(System.Collections.IDictionary properties); + } + + // Generated from `System.ComponentModel.Design.IDesignerHost` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerHost : System.IServiceProvider, System.ComponentModel.Design.IServiceContainer + { + void Activate(); + event System.EventHandler Activated; + System.ComponentModel.IContainer Container { get; } + System.ComponentModel.IComponent CreateComponent(System.Type componentClass, string name); + System.ComponentModel.IComponent CreateComponent(System.Type componentClass); + System.ComponentModel.Design.DesignerTransaction CreateTransaction(string description); + System.ComponentModel.Design.DesignerTransaction CreateTransaction(); + event System.EventHandler Deactivated; + void DestroyComponent(System.ComponentModel.IComponent component); + System.ComponentModel.Design.IDesigner GetDesigner(System.ComponentModel.IComponent component); + System.Type GetType(string typeName); + bool InTransaction { get; } + event System.EventHandler LoadComplete; + bool Loading { get; } + System.ComponentModel.IComponent RootComponent { get; } + string RootComponentClassName { get; } + event System.ComponentModel.Design.DesignerTransactionCloseEventHandler TransactionClosed; + event System.ComponentModel.Design.DesignerTransactionCloseEventHandler TransactionClosing; + string TransactionDescription { get; } + event System.EventHandler TransactionOpened; + event System.EventHandler TransactionOpening; + } + + // Generated from `System.ComponentModel.Design.IDesignerHostTransactionState` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerHostTransactionState + { + bool IsClosingTransaction { get; } + } + + // Generated from `System.ComponentModel.Design.IDesignerOptionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerOptionService + { + object GetOptionValue(string pageName, string valueName); + void SetOptionValue(string pageName, string valueName, object value); + } + + // Generated from `System.ComponentModel.Design.IDictionaryService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDictionaryService + { + object GetKey(object value); + object GetValue(object key); + void SetValue(object key, object value); + } + + // Generated from `System.ComponentModel.Design.IEventBindingService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEventBindingService + { + string CreateUniqueMethodName(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e); + System.Collections.ICollection GetCompatibleMethods(System.ComponentModel.EventDescriptor e); + System.ComponentModel.EventDescriptor GetEvent(System.ComponentModel.PropertyDescriptor property); + System.ComponentModel.PropertyDescriptorCollection GetEventProperties(System.ComponentModel.EventDescriptorCollection events); + System.ComponentModel.PropertyDescriptor GetEventProperty(System.ComponentModel.EventDescriptor e); + bool ShowCode(int lineNumber); + bool ShowCode(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e); + bool ShowCode(); + } + + // Generated from `System.ComponentModel.Design.IExtenderListService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IExtenderListService + { + System.ComponentModel.IExtenderProvider[] GetExtenderProviders(); + } + + // Generated from `System.ComponentModel.Design.IExtenderProviderService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IExtenderProviderService + { + void AddExtenderProvider(System.ComponentModel.IExtenderProvider provider); + void RemoveExtenderProvider(System.ComponentModel.IExtenderProvider provider); + } + + // Generated from `System.ComponentModel.Design.IHelpService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IHelpService + { + void AddContextAttribute(string name, string value, System.ComponentModel.Design.HelpKeywordType keywordType); + void ClearContextAttributes(); + System.ComponentModel.Design.IHelpService CreateLocalContext(System.ComponentModel.Design.HelpContextType contextType); + void RemoveContextAttribute(string name, string value); + void RemoveLocalContext(System.ComponentModel.Design.IHelpService localContext); + void ShowHelpFromKeyword(string helpKeyword); + void ShowHelpFromUrl(string helpUrl); + } + + // Generated from `System.ComponentModel.Design.IInheritanceService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IInheritanceService + { + void AddInheritedComponents(System.ComponentModel.IComponent component, System.ComponentModel.IContainer container); + System.ComponentModel.InheritanceAttribute GetInheritanceAttribute(System.ComponentModel.IComponent component); + } + + // Generated from `System.ComponentModel.Design.IMenuCommandService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IMenuCommandService + { + void AddCommand(System.ComponentModel.Design.MenuCommand command); + void AddVerb(System.ComponentModel.Design.DesignerVerb verb); + System.ComponentModel.Design.MenuCommand FindCommand(System.ComponentModel.Design.CommandID commandID); + bool GlobalInvoke(System.ComponentModel.Design.CommandID commandID); + void RemoveCommand(System.ComponentModel.Design.MenuCommand command); + void RemoveVerb(System.ComponentModel.Design.DesignerVerb verb); + void ShowContextMenu(System.ComponentModel.Design.CommandID menuID, int x, int y); + System.ComponentModel.Design.DesignerVerbCollection Verbs { get; } + } + + // Generated from `System.ComponentModel.Design.IReferenceService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReferenceService + { + System.ComponentModel.IComponent GetComponent(object reference); + string GetName(object reference); + object GetReference(string name); + object[] GetReferences(System.Type baseType); + object[] GetReferences(); + } + + // Generated from `System.ComponentModel.Design.IResourceService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IResourceService + { + System.Resources.IResourceReader GetResourceReader(System.Globalization.CultureInfo info); + System.Resources.IResourceWriter GetResourceWriter(System.Globalization.CultureInfo info); + } + + // Generated from `System.ComponentModel.Design.IRootDesigner` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IRootDesigner : System.IDisposable, System.ComponentModel.Design.IDesigner + { + object GetView(System.ComponentModel.Design.ViewTechnology technology); + System.ComponentModel.Design.ViewTechnology[] SupportedTechnologies { get; } + } + + // Generated from `System.ComponentModel.Design.ISelectionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISelectionService + { + bool GetComponentSelected(object component); + System.Collections.ICollection GetSelectedComponents(); + object PrimarySelection { get; } + event System.EventHandler SelectionChanged; + event System.EventHandler SelectionChanging; + int SelectionCount { get; } + void SetSelectedComponents(System.Collections.ICollection components, System.ComponentModel.Design.SelectionTypes selectionType); + void SetSelectedComponents(System.Collections.ICollection components); + } + + // Generated from `System.ComponentModel.Design.IServiceContainer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IServiceContainer : System.IServiceProvider + { + void AddService(System.Type serviceType, object serviceInstance, bool promote); + void AddService(System.Type serviceType, object serviceInstance); + void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback, bool promote); + void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback); + void RemoveService(System.Type serviceType, bool promote); + void RemoveService(System.Type serviceType); + } + + // Generated from `System.ComponentModel.Design.ITreeDesigner` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITreeDesigner : System.IDisposable, System.ComponentModel.Design.IDesigner + { + System.Collections.ICollection Children { get; } + System.ComponentModel.Design.IDesigner Parent { get; } + } + + // Generated from `System.ComponentModel.Design.ITypeDescriptorFilterService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeDescriptorFilterService + { + bool FilterAttributes(System.ComponentModel.IComponent component, System.Collections.IDictionary attributes); + bool FilterEvents(System.ComponentModel.IComponent component, System.Collections.IDictionary events); + bool FilterProperties(System.ComponentModel.IComponent component, System.Collections.IDictionary properties); + } + + // Generated from `System.ComponentModel.Design.ITypeDiscoveryService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeDiscoveryService + { + System.Collections.ICollection GetTypes(System.Type baseType, bool excludeGlobalTypes); + } + + // Generated from `System.ComponentModel.Design.ITypeResolutionService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeResolutionService + { + System.Reflection.Assembly GetAssembly(System.Reflection.AssemblyName name, bool throwOnError); + System.Reflection.Assembly GetAssembly(System.Reflection.AssemblyName name); + string GetPathOfAssembly(System.Reflection.AssemblyName name); + System.Type GetType(string name, bool throwOnError, bool ignoreCase); + System.Type GetType(string name, bool throwOnError); + System.Type GetType(string name); + void ReferenceAssembly(System.Reflection.AssemblyName name); + } + + // Generated from `System.ComponentModel.Design.MenuCommand` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MenuCommand + { + public virtual bool Checked { get => throw null; set => throw null; } + public event System.EventHandler CommandChanged; + public virtual System.ComponentModel.Design.CommandID CommandID { get => throw null; } + public virtual bool Enabled { get => throw null; set => throw null; } + public virtual void Invoke(object arg) => throw null; + public virtual void Invoke() => throw null; + public MenuCommand(System.EventHandler handler, System.ComponentModel.Design.CommandID command) => throw null; + public virtual int OleStatus { get => throw null; } + protected virtual void OnCommandChanged(System.EventArgs e) => throw null; + public virtual System.Collections.IDictionary Properties { get => throw null; } + public virtual bool Supported { get => throw null; set => throw null; } + public override string ToString() => throw null; + public virtual bool Visible { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.Design.SelectionTypes` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SelectionTypes + { + Add, + Auto, + Click, + MouseDown, + MouseUp, + Normal, + Primary, + Remove, + Replace, + // Stub generator skipped constructor + Toggle, + Valid, + } + + // Generated from `System.ComponentModel.Design.ServiceContainer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ServiceContainer : System.IServiceProvider, System.IDisposable, System.ComponentModel.Design.IServiceContainer + { + public void AddService(System.Type serviceType, object serviceInstance) => throw null; + public void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback) => throw null; + public virtual void AddService(System.Type serviceType, object serviceInstance, bool promote) => throw null; + public virtual void AddService(System.Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback, bool promote) => throw null; + protected virtual System.Type[] DefaultServices { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual object GetService(System.Type serviceType) => throw null; + public void RemoveService(System.Type serviceType) => throw null; + public virtual void RemoveService(System.Type serviceType, bool promote) => throw null; + public ServiceContainer(System.IServiceProvider parentProvider) => throw null; + public ServiceContainer() => throw null; + } + + // Generated from `System.ComponentModel.Design.ServiceCreatorCallback` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate object ServiceCreatorCallback(System.ComponentModel.Design.IServiceContainer container, System.Type serviceType); + + // Generated from `System.ComponentModel.Design.StandardCommands` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StandardCommands + { + public static System.ComponentModel.Design.CommandID AlignBottom; + public static System.ComponentModel.Design.CommandID AlignHorizontalCenters; + public static System.ComponentModel.Design.CommandID AlignLeft; + public static System.ComponentModel.Design.CommandID AlignRight; + public static System.ComponentModel.Design.CommandID AlignToGrid; + public static System.ComponentModel.Design.CommandID AlignTop; + public static System.ComponentModel.Design.CommandID AlignVerticalCenters; + public static System.ComponentModel.Design.CommandID ArrangeBottom; + public static System.ComponentModel.Design.CommandID ArrangeIcons; + public static System.ComponentModel.Design.CommandID ArrangeRight; + public static System.ComponentModel.Design.CommandID BringForward; + public static System.ComponentModel.Design.CommandID BringToFront; + public static System.ComponentModel.Design.CommandID CenterHorizontally; + public static System.ComponentModel.Design.CommandID CenterVertically; + public static System.ComponentModel.Design.CommandID Copy; + public static System.ComponentModel.Design.CommandID Cut; + public static System.ComponentModel.Design.CommandID Delete; + public static System.ComponentModel.Design.CommandID DocumentOutline; + public static System.ComponentModel.Design.CommandID F1Help; + public static System.ComponentModel.Design.CommandID Group; + public static System.ComponentModel.Design.CommandID HorizSpaceConcatenate; + public static System.ComponentModel.Design.CommandID HorizSpaceDecrease; + public static System.ComponentModel.Design.CommandID HorizSpaceIncrease; + public static System.ComponentModel.Design.CommandID HorizSpaceMakeEqual; + public static System.ComponentModel.Design.CommandID LineupIcons; + public static System.ComponentModel.Design.CommandID LockControls; + public static System.ComponentModel.Design.CommandID MultiLevelRedo; + public static System.ComponentModel.Design.CommandID MultiLevelUndo; + public static System.ComponentModel.Design.CommandID Paste; + public static System.ComponentModel.Design.CommandID Properties; + public static System.ComponentModel.Design.CommandID PropertiesWindow; + public static System.ComponentModel.Design.CommandID Redo; + public static System.ComponentModel.Design.CommandID Replace; + public static System.ComponentModel.Design.CommandID SelectAll; + public static System.ComponentModel.Design.CommandID SendBackward; + public static System.ComponentModel.Design.CommandID SendToBack; + public static System.ComponentModel.Design.CommandID ShowGrid; + public static System.ComponentModel.Design.CommandID ShowLargeIcons; + public static System.ComponentModel.Design.CommandID SizeToControl; + public static System.ComponentModel.Design.CommandID SizeToControlHeight; + public static System.ComponentModel.Design.CommandID SizeToControlWidth; + public static System.ComponentModel.Design.CommandID SizeToFit; + public static System.ComponentModel.Design.CommandID SizeToGrid; + public static System.ComponentModel.Design.CommandID SnapToGrid; + public StandardCommands() => throw null; + public static System.ComponentModel.Design.CommandID TabOrder; + public static System.ComponentModel.Design.CommandID Undo; + public static System.ComponentModel.Design.CommandID Ungroup; + public static System.ComponentModel.Design.CommandID VerbFirst; + public static System.ComponentModel.Design.CommandID VerbLast; + public static System.ComponentModel.Design.CommandID VertSpaceConcatenate; + public static System.ComponentModel.Design.CommandID VertSpaceDecrease; + public static System.ComponentModel.Design.CommandID VertSpaceIncrease; + public static System.ComponentModel.Design.CommandID VertSpaceMakeEqual; + public static System.ComponentModel.Design.CommandID ViewCode; + public static System.ComponentModel.Design.CommandID ViewGrid; + } + + // Generated from `System.ComponentModel.Design.StandardToolWindows` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StandardToolWindows + { + public static System.Guid ObjectBrowser; + public static System.Guid OutputWindow; + public static System.Guid ProjectExplorer; + public static System.Guid PropertyBrowser; + public static System.Guid RelatedLinks; + public static System.Guid ServerExplorer; + public StandardToolWindows() => throw null; + public static System.Guid TaskList; + public static System.Guid Toolbox; + } + + // Generated from `System.ComponentModel.Design.TypeDescriptionProviderService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TypeDescriptionProviderService + { + public abstract System.ComponentModel.TypeDescriptionProvider GetProvider(object instance); + public abstract System.ComponentModel.TypeDescriptionProvider GetProvider(System.Type type); + protected TypeDescriptionProviderService() => throw null; + } + + // Generated from `System.ComponentModel.Design.ViewTechnology` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ViewTechnology + { + Default, + Passthrough, + // Stub generator skipped constructor + WindowsForms, + } + + namespace Serialization + { + // Generated from `System.ComponentModel.Design.Serialization.ComponentSerializationService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ComponentSerializationService + { + protected ComponentSerializationService() => throw null; + public abstract System.ComponentModel.Design.Serialization.SerializationStore CreateStore(); + public abstract System.Collections.ICollection Deserialize(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container); + public abstract System.Collections.ICollection Deserialize(System.ComponentModel.Design.Serialization.SerializationStore store); + public void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container, bool validateRecycledTypes) => throw null; + public void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container) => throw null; + public abstract void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container, bool validateRecycledTypes, bool applyDefaults); + public abstract System.ComponentModel.Design.Serialization.SerializationStore LoadStore(System.IO.Stream stream); + public abstract void Serialize(System.ComponentModel.Design.Serialization.SerializationStore store, object value); + public abstract void SerializeAbsolute(System.ComponentModel.Design.Serialization.SerializationStore store, object value); + public abstract void SerializeMember(System.ComponentModel.Design.Serialization.SerializationStore store, object owningObject, System.ComponentModel.MemberDescriptor member); + public abstract void SerializeMemberAbsolute(System.ComponentModel.Design.Serialization.SerializationStore store, object owningObject, System.ComponentModel.MemberDescriptor member); + } + + // Generated from `System.ComponentModel.Design.Serialization.ContextStack` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContextStack + { + public void Append(object context) => throw null; + public ContextStack() => throw null; + public object Current { get => throw null; } + public object this[int level] { get => throw null; } + public object this[System.Type type] { get => throw null; } + public object Pop() => throw null; + public void Push(object context) => throw null; + } + + // Generated from `System.ComponentModel.Design.Serialization.DefaultSerializationProviderAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultSerializationProviderAttribute : System.Attribute + { + public DefaultSerializationProviderAttribute(string providerTypeName) => throw null; + public DefaultSerializationProviderAttribute(System.Type providerType) => throw null; + public string ProviderTypeName { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.DesignerLoader` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DesignerLoader + { + public abstract void BeginLoad(System.ComponentModel.Design.Serialization.IDesignerLoaderHost host); + protected DesignerLoader() => throw null; + public abstract void Dispose(); + public virtual void Flush() => throw null; + public virtual bool Loading { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerLoaderHost` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerLoaderHost : System.IServiceProvider, System.ComponentModel.Design.IServiceContainer, System.ComponentModel.Design.IDesignerHost + { + void EndLoad(string baseClassName, bool successful, System.Collections.ICollection errorCollection); + void Reload(); + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerLoaderHost2` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerLoaderHost2 : System.IServiceProvider, System.ComponentModel.Design.Serialization.IDesignerLoaderHost, System.ComponentModel.Design.IServiceContainer, System.ComponentModel.Design.IDesignerHost + { + bool CanReloadWithErrors { get; set; } + bool IgnoreErrorsDuringReload { get; set; } + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerLoaderService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerLoaderService + { + void AddLoadDependency(); + void DependentLoadComplete(bool successful, System.Collections.ICollection errorCollection); + bool Reload(); + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerSerializationManager` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerSerializationManager : System.IServiceProvider + { + void AddSerializationProvider(System.ComponentModel.Design.Serialization.IDesignerSerializationProvider provider); + System.ComponentModel.Design.Serialization.ContextStack Context { get; } + object CreateInstance(System.Type type, System.Collections.ICollection arguments, string name, bool addToContainer); + object GetInstance(string name); + string GetName(object value); + object GetSerializer(System.Type objectType, System.Type serializerType); + System.Type GetType(string typeName); + System.ComponentModel.PropertyDescriptorCollection Properties { get; } + void RemoveSerializationProvider(System.ComponentModel.Design.Serialization.IDesignerSerializationProvider provider); + void ReportError(object errorInformation); + event System.ComponentModel.Design.Serialization.ResolveNameEventHandler ResolveName; + event System.EventHandler SerializationComplete; + void SetName(object instance, string name); + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerSerializationProvider` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerSerializationProvider + { + object GetSerializer(System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object currentSerializer, System.Type objectType, System.Type serializerType); + } + + // Generated from `System.ComponentModel.Design.Serialization.IDesignerSerializationService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDesignerSerializationService + { + System.Collections.ICollection Deserialize(object serializationData); + object Serialize(System.Collections.ICollection objects); + } + + // Generated from `System.ComponentModel.Design.Serialization.INameCreationService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INameCreationService + { + string CreateName(System.ComponentModel.IContainer container, System.Type dataType); + bool IsValidName(string name); + void ValidateName(string name); + } + + // Generated from `System.ComponentModel.Design.Serialization.InstanceDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InstanceDescriptor + { + public System.Collections.ICollection Arguments { get => throw null; } + public InstanceDescriptor(System.Reflection.MemberInfo member, System.Collections.ICollection arguments, bool isComplete) => throw null; + public InstanceDescriptor(System.Reflection.MemberInfo member, System.Collections.ICollection arguments) => throw null; + public object Invoke() => throw null; + public bool IsComplete { get => throw null; } + public System.Reflection.MemberInfo MemberInfo { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.MemberRelationship` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MemberRelationship + { + public static bool operator !=(System.ComponentModel.Design.Serialization.MemberRelationship left, System.ComponentModel.Design.Serialization.MemberRelationship right) => throw null; + public static bool operator ==(System.ComponentModel.Design.Serialization.MemberRelationship left, System.ComponentModel.Design.Serialization.MemberRelationship right) => throw null; + public static System.ComponentModel.Design.Serialization.MemberRelationship Empty; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public System.ComponentModel.MemberDescriptor Member { get => throw null; } + public MemberRelationship(object owner, System.ComponentModel.MemberDescriptor member) => throw null; + // Stub generator skipped constructor + public object Owner { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.MemberRelationshipService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MemberRelationshipService + { + protected virtual System.ComponentModel.Design.Serialization.MemberRelationship GetRelationship(System.ComponentModel.Design.Serialization.MemberRelationship source) => throw null; + public System.ComponentModel.Design.Serialization.MemberRelationship this[object sourceOwner, System.ComponentModel.MemberDescriptor sourceMember] { get => throw null; set => throw null; } + public System.ComponentModel.Design.Serialization.MemberRelationship this[System.ComponentModel.Design.Serialization.MemberRelationship source] { get => throw null; set => throw null; } + protected MemberRelationshipService() => throw null; + protected virtual void SetRelationship(System.ComponentModel.Design.Serialization.MemberRelationship source, System.ComponentModel.Design.Serialization.MemberRelationship relationship) => throw null; + public abstract bool SupportsRelationship(System.ComponentModel.Design.Serialization.MemberRelationship source, System.ComponentModel.Design.Serialization.MemberRelationship relationship); + } + + // Generated from `System.ComponentModel.Design.Serialization.ResolveNameEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResolveNameEventArgs : System.EventArgs + { + public string Name { get => throw null; } + public ResolveNameEventArgs(string name) => throw null; + public object Value { get => throw null; set => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.ResolveNameEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ResolveNameEventHandler(object sender, System.ComponentModel.Design.Serialization.ResolveNameEventArgs e); + + // Generated from `System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RootDesignerSerializerAttribute : System.Attribute + { + public bool Reloadable { get => throw null; } + public RootDesignerSerializerAttribute(string serializerTypeName, string baseSerializerTypeName, bool reloadable) => throw null; + public RootDesignerSerializerAttribute(string serializerTypeName, System.Type baseSerializerType, bool reloadable) => throw null; + public RootDesignerSerializerAttribute(System.Type serializerType, System.Type baseSerializerType, bool reloadable) => throw null; + public string SerializerBaseTypeName { get => throw null; } + public string SerializerTypeName { get => throw null; } + public override object TypeId { get => throw null; } + } + + // Generated from `System.ComponentModel.Design.Serialization.SerializationStore` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SerializationStore : System.IDisposable + { + public abstract void Close(); + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public abstract System.Collections.ICollection Errors { get; } + public abstract void Save(System.IO.Stream stream); + protected SerializationStore() => throw null; + } + + } + } + } + namespace Drawing + { + // Generated from `System.Drawing.ColorConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ColorConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public ColorConverter() => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override bool GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + } + + // Generated from `System.Drawing.PointConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PointConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public PointConverter() => throw null; + } + + // Generated from `System.Drawing.RectangleConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RectangleConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public RectangleConverter() => throw null; + } + + // Generated from `System.Drawing.SizeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SizeConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public SizeConverter() => throw null; + } + + // Generated from `System.Drawing.SizeFConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SizeFConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public override object CreateInstance(System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues) => throw null; + public override bool GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; + public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; + public SizeFConverter() => throw null; + } + + } + namespace Security + { + namespace Authentication + { + namespace ExtendedProtection + { + // Generated from `System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicyTypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExtendedProtectionPolicyTypeConverter : System.ComponentModel.TypeConverter + { + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type destinationType) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; + public ExtendedProtectionPolicyTypeConverter() => throw null; + } + + } + } + } + namespace Timers + { + // Generated from `System.Timers.ElapsedEventArgs` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ElapsedEventArgs : System.EventArgs + { + public System.DateTime SignalTime { get => throw null; } + } + + // Generated from `System.Timers.ElapsedEventHandler` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ElapsedEventHandler(object sender, System.Timers.ElapsedEventArgs e); + + // Generated from `System.Timers.Timer` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Timer : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize + { + public bool AutoReset { get => throw null; set => throw null; } + public void BeginInit() => throw null; + public void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public event System.Timers.ElapsedEventHandler Elapsed; + public bool Enabled { get => throw null; set => throw null; } + public void EndInit() => throw null; + public double Interval { get => throw null; set => throw null; } + public override System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public void Start() => throw null; + public void Stop() => throw null; + public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get => throw null; set => throw null; } + public Timer(double interval) => throw null; + public Timer() => throw null; + } + + // Generated from `System.Timers.TimersDescriptionAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimersDescriptionAttribute : System.ComponentModel.DescriptionAttribute + { + public override string Description { get => throw null; } + public TimersDescriptionAttribute(string description) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs new file mode 100644 index 000000000000..cc3f93249b1e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs @@ -0,0 +1,43 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.IServiceProvider` in `System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IServiceProvider + { + object GetService(System.Type serviceType); + } + + namespace ComponentModel + { + // Generated from `System.ComponentModel.CancelEventArgs` in `System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CancelEventArgs : System.EventArgs + { + public bool Cancel { get => throw null; set => throw null; } + public CancelEventArgs(bool cancel) => throw null; + public CancelEventArgs() => throw null; + } + + // Generated from `System.ComponentModel.IChangeTracking` in `System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IChangeTracking + { + void AcceptChanges(); + bool IsChanged { get; } + } + + // Generated from `System.ComponentModel.IEditableObject` in `System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEditableObject + { + void BeginEdit(); + void CancelEdit(); + void EndEdit(); + } + + // Generated from `System.ComponentModel.IRevertibleChangeTracking` in `System.ComponentModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IRevertibleChangeTracking : System.ComponentModel.IChangeTracking + { + void RejectChanges(); + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs new file mode 100644 index 000000000000..75567dd31438 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs @@ -0,0 +1,312 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.Console` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Console + { + public static System.ConsoleColor BackgroundColor { get => throw null; set => throw null; } + public static void Beep(int frequency, int duration) => throw null; + public static void Beep() => throw null; + public static int BufferHeight { get => throw null; set => throw null; } + public static int BufferWidth { get => throw null; set => throw null; } + public static event System.ConsoleCancelEventHandler CancelKeyPress; + public static bool CapsLock { get => throw null; } + public static void Clear() => throw null; + public static int CursorLeft { get => throw null; set => throw null; } + public static int CursorSize { get => throw null; set => throw null; } + public static int CursorTop { get => throw null; set => throw null; } + public static bool CursorVisible { get => throw null; set => throw null; } + public static System.IO.TextWriter Error { get => throw null; } + public static System.ConsoleColor ForegroundColor { get => throw null; set => throw null; } + public static (int, int) GetCursorPosition() => throw null; + public static System.IO.TextReader In { get => throw null; } + public static System.Text.Encoding InputEncoding { get => throw null; set => throw null; } + public static bool IsErrorRedirected { get => throw null; } + public static bool IsInputRedirected { get => throw null; } + public static bool IsOutputRedirected { get => throw null; } + public static bool KeyAvailable { get => throw null; } + public static int LargestWindowHeight { get => throw null; } + public static int LargestWindowWidth { get => throw null; } + public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, System.Char sourceChar, System.ConsoleColor sourceForeColor, System.ConsoleColor sourceBackColor) => throw null; + public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) => throw null; + public static bool NumberLock { get => throw null; } + public static System.IO.Stream OpenStandardError(int bufferSize) => throw null; + public static System.IO.Stream OpenStandardError() => throw null; + public static System.IO.Stream OpenStandardInput(int bufferSize) => throw null; + public static System.IO.Stream OpenStandardInput() => throw null; + public static System.IO.Stream OpenStandardOutput(int bufferSize) => throw null; + public static System.IO.Stream OpenStandardOutput() => throw null; + public static System.IO.TextWriter Out { get => throw null; } + public static System.Text.Encoding OutputEncoding { get => throw null; set => throw null; } + public static int Read() => throw null; + public static System.ConsoleKeyInfo ReadKey(bool intercept) => throw null; + public static System.ConsoleKeyInfo ReadKey() => throw null; + public static string ReadLine() => throw null; + public static void ResetColor() => throw null; + public static void SetBufferSize(int width, int height) => throw null; + public static void SetCursorPosition(int left, int top) => throw null; + public static void SetError(System.IO.TextWriter newError) => throw null; + public static void SetIn(System.IO.TextReader newIn) => throw null; + public static void SetOut(System.IO.TextWriter newOut) => throw null; + public static void SetWindowPosition(int left, int top) => throw null; + public static void SetWindowSize(int width, int height) => throw null; + public static string Title { get => throw null; set => throw null; } + public static bool TreatControlCAsInput { get => throw null; set => throw null; } + public static int WindowHeight { get => throw null; set => throw null; } + public static int WindowLeft { get => throw null; set => throw null; } + public static int WindowTop { get => throw null; set => throw null; } + public static int WindowWidth { get => throw null; set => throw null; } + public static void Write(string value) => throw null; + public static void Write(string format, params object[] arg) => throw null; + public static void Write(string format, object arg0, object arg1, object arg2) => throw null; + public static void Write(string format, object arg0, object arg1) => throw null; + public static void Write(string format, object arg0) => throw null; + public static void Write(object value) => throw null; + public static void Write(int value) => throw null; + public static void Write(float value) => throw null; + public static void Write(double value) => throw null; + public static void Write(bool value) => throw null; + public static void Write(System.UInt64 value) => throw null; + public static void Write(System.UInt32 value) => throw null; + public static void Write(System.Int64 value) => throw null; + public static void Write(System.Decimal value) => throw null; + public static void Write(System.Char[] buffer, int index, int count) => throw null; + public static void Write(System.Char[] buffer) => throw null; + public static void Write(System.Char value) => throw null; + public static void WriteLine(string value) => throw null; + public static void WriteLine(string format, params object[] arg) => throw null; + public static void WriteLine(string format, object arg0, object arg1, object arg2) => throw null; + public static void WriteLine(string format, object arg0, object arg1) => throw null; + public static void WriteLine(string format, object arg0) => throw null; + public static void WriteLine(object value) => throw null; + public static void WriteLine(int value) => throw null; + public static void WriteLine(float value) => throw null; + public static void WriteLine(double value) => throw null; + public static void WriteLine(bool value) => throw null; + public static void WriteLine(System.UInt64 value) => throw null; + public static void WriteLine(System.UInt32 value) => throw null; + public static void WriteLine(System.Int64 value) => throw null; + public static void WriteLine(System.Decimal value) => throw null; + public static void WriteLine(System.Char[] buffer, int index, int count) => throw null; + public static void WriteLine(System.Char[] buffer) => throw null; + public static void WriteLine(System.Char value) => throw null; + public static void WriteLine() => throw null; + } + + // Generated from `System.ConsoleCancelEventArgs` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConsoleCancelEventArgs : System.EventArgs + { + public bool Cancel { get => throw null; set => throw null; } + public System.ConsoleSpecialKey SpecialKey { get => throw null; } + } + + // Generated from `System.ConsoleCancelEventHandler` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ConsoleCancelEventHandler(object sender, System.ConsoleCancelEventArgs e); + + // Generated from `System.ConsoleColor` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConsoleColor + { + Black, + Blue, + // Stub generator skipped constructor + Cyan, + DarkBlue, + DarkCyan, + DarkGray, + DarkGreen, + DarkMagenta, + DarkRed, + DarkYellow, + Gray, + Green, + Magenta, + Red, + White, + Yellow, + } + + // Generated from `System.ConsoleKey` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConsoleKey + { + A, + Add, + Applications, + Attention, + B, + Backspace, + BrowserBack, + BrowserFavorites, + BrowserForward, + BrowserHome, + BrowserRefresh, + BrowserSearch, + BrowserStop, + C, + Clear, + // Stub generator skipped constructor + CrSel, + D, + D0, + D1, + D2, + D3, + D4, + D5, + D6, + D7, + D8, + D9, + Decimal, + Delete, + Divide, + DownArrow, + E, + End, + Enter, + EraseEndOfFile, + Escape, + ExSel, + Execute, + F, + F1, + F10, + F11, + F12, + F13, + F14, + F15, + F16, + F17, + F18, + F19, + F2, + F20, + F21, + F22, + F23, + F24, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + G, + H, + Help, + Home, + I, + Insert, + J, + K, + L, + LaunchApp1, + LaunchApp2, + LaunchMail, + LaunchMediaSelect, + LeftArrow, + LeftWindows, + M, + MediaNext, + MediaPlay, + MediaPrevious, + MediaStop, + Multiply, + N, + NoName, + NumPad0, + NumPad1, + NumPad2, + NumPad3, + NumPad4, + NumPad5, + NumPad6, + NumPad7, + NumPad8, + NumPad9, + O, + Oem1, + Oem102, + Oem2, + Oem3, + Oem4, + Oem5, + Oem6, + Oem7, + Oem8, + OemClear, + OemComma, + OemMinus, + OemPeriod, + OemPlus, + P, + Pa1, + Packet, + PageDown, + PageUp, + Pause, + Play, + Print, + PrintScreen, + Process, + Q, + R, + RightArrow, + RightWindows, + S, + Select, + Separator, + Sleep, + Spacebar, + Subtract, + T, + Tab, + U, + UpArrow, + V, + VolumeDown, + VolumeMute, + VolumeUp, + W, + X, + Y, + Z, + Zoom, + } + + // Generated from `System.ConsoleKeyInfo` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConsoleKeyInfo : System.IEquatable + { + public static bool operator !=(System.ConsoleKeyInfo a, System.ConsoleKeyInfo b) => throw null; + public static bool operator ==(System.ConsoleKeyInfo a, System.ConsoleKeyInfo b) => throw null; + public ConsoleKeyInfo(System.Char keyChar, System.ConsoleKey key, bool shift, bool alt, bool control) => throw null; + // Stub generator skipped constructor + public override bool Equals(object value) => throw null; + public bool Equals(System.ConsoleKeyInfo obj) => throw null; + public override int GetHashCode() => throw null; + public System.ConsoleKey Key { get => throw null; } + public System.Char KeyChar { get => throw null; } + public System.ConsoleModifiers Modifiers { get => throw null; } + } + + // Generated from `System.ConsoleModifiers` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ConsoleModifiers + { + Alt, + // Stub generator skipped constructor + Control, + Shift, + } + + // Generated from `System.ConsoleSpecialKey` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConsoleSpecialKey + { + // Stub generator skipped constructor + ControlBreak, + ControlC, + } + +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs new file mode 100644 index 000000000000..09619994dba7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs @@ -0,0 +1,3548 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Data + { + // Generated from `System.Data.AcceptRejectRule` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AcceptRejectRule + { + // Stub generator skipped constructor + Cascade, + None, + } + + // Generated from `System.Data.CommandBehavior` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CommandBehavior + { + CloseConnection, + // Stub generator skipped constructor + Default, + KeyInfo, + SchemaOnly, + SequentialAccess, + SingleResult, + SingleRow, + } + + // Generated from `System.Data.CommandType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CommandType + { + // Stub generator skipped constructor + StoredProcedure, + TableDirect, + Text, + } + + // Generated from `System.Data.ConflictOption` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConflictOption + { + CompareAllSearchableValues, + CompareRowVersion, + // Stub generator skipped constructor + OverwriteChanges, + } + + // Generated from `System.Data.ConnectionState` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ConnectionState + { + Broken, + Closed, + Connecting, + // Stub generator skipped constructor + Executing, + Fetching, + Open, + } + + // Generated from `System.Data.Constraint` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Constraint + { + protected void CheckStateForProperty() => throw null; + internal Constraint() => throw null; + public virtual string ConstraintName { get => throw null; set => throw null; } + public System.Data.PropertyCollection ExtendedProperties { get => throw null; } + protected internal void SetDataSet(System.Data.DataSet dataSet) => throw null; + public abstract System.Data.DataTable Table { get; } + public override string ToString() => throw null; + protected virtual System.Data.DataSet _DataSet { get => throw null; } + } + + // Generated from `System.Data.ConstraintCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConstraintCollection : System.Data.InternalDataCollectionBase + { + public void Add(System.Data.Constraint constraint) => throw null; + public System.Data.Constraint Add(string name, System.Data.DataColumn[] primaryKeyColumns, System.Data.DataColumn[] foreignKeyColumns) => throw null; + public System.Data.Constraint Add(string name, System.Data.DataColumn[] columns, bool primaryKey) => throw null; + public System.Data.Constraint Add(string name, System.Data.DataColumn primaryKeyColumn, System.Data.DataColumn foreignKeyColumn) => throw null; + public System.Data.Constraint Add(string name, System.Data.DataColumn column, bool primaryKey) => throw null; + public void AddRange(System.Data.Constraint[] constraints) => throw null; + public bool CanRemove(System.Data.Constraint constraint) => throw null; + public void Clear() => throw null; + public event System.ComponentModel.CollectionChangeEventHandler CollectionChanged; + public bool Contains(string name) => throw null; + public void CopyTo(System.Data.Constraint[] array, int index) => throw null; + public int IndexOf(string constraintName) => throw null; + public int IndexOf(System.Data.Constraint constraint) => throw null; + public System.Data.Constraint this[string name] { get => throw null; } + public System.Data.Constraint this[int index] { get => throw null; } + protected override System.Collections.ArrayList List { get => throw null; } + public void Remove(string name) => throw null; + public void Remove(System.Data.Constraint constraint) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Data.ConstraintException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConstraintException : System.Data.DataException + { + public ConstraintException(string s) => throw null; + public ConstraintException(string message, System.Exception innerException) => throw null; + public ConstraintException() => throw null; + protected ConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.DBConcurrencyException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DBConcurrencyException : System.SystemException + { + public void CopyToRows(System.Data.DataRow[] array, int arrayIndex) => throw null; + public void CopyToRows(System.Data.DataRow[] array) => throw null; + public DBConcurrencyException(string message, System.Exception inner, System.Data.DataRow[] dataRows) => throw null; + public DBConcurrencyException(string message, System.Exception inner) => throw null; + public DBConcurrencyException(string message) => throw null; + public DBConcurrencyException() => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Data.DataRow Row { get => throw null; set => throw null; } + public int RowCount { get => throw null; } + } + + // Generated from `System.Data.DataColumn` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataColumn : System.ComponentModel.MarshalByValueComponent + { + public bool AllowDBNull { get => throw null; set => throw null; } + public bool AutoIncrement { get => throw null; set => throw null; } + public System.Int64 AutoIncrementSeed { get => throw null; set => throw null; } + public System.Int64 AutoIncrementStep { get => throw null; set => throw null; } + public string Caption { get => throw null; set => throw null; } + protected internal void CheckNotAllowNull() => throw null; + protected void CheckUnique() => throw null; + public virtual System.Data.MappingType ColumnMapping { get => throw null; set => throw null; } + public string ColumnName { get => throw null; set => throw null; } + public DataColumn(string columnName, System.Type dataType, string expr, System.Data.MappingType type) => throw null; + public DataColumn(string columnName, System.Type dataType, string expr) => throw null; + public DataColumn(string columnName, System.Type dataType) => throw null; + public DataColumn(string columnName) => throw null; + public DataColumn() => throw null; + public System.Type DataType { get => throw null; set => throw null; } + public System.Data.DataSetDateTime DateTimeMode { get => throw null; set => throw null; } + public object DefaultValue { get => throw null; set => throw null; } + public string Expression { get => throw null; set => throw null; } + public System.Data.PropertyCollection ExtendedProperties { get => throw null; } + public int MaxLength { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + protected virtual void OnPropertyChanging(System.ComponentModel.PropertyChangedEventArgs pcevent) => throw null; + public int Ordinal { get => throw null; } + public string Prefix { get => throw null; set => throw null; } + protected internal void RaisePropertyChanging(string name) => throw null; + public bool ReadOnly { get => throw null; set => throw null; } + public void SetOrdinal(int ordinal) => throw null; + public System.Data.DataTable Table { get => throw null; } + public override string ToString() => throw null; + public bool Unique { get => throw null; set => throw null; } + } + + // Generated from `System.Data.DataColumnChangeEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataColumnChangeEventArgs : System.EventArgs + { + public System.Data.DataColumn Column { get => throw null; } + public DataColumnChangeEventArgs(System.Data.DataRow row, System.Data.DataColumn column, object value) => throw null; + public object ProposedValue { get => throw null; set => throw null; } + public System.Data.DataRow Row { get => throw null; } + } + + // Generated from `System.Data.DataColumnChangeEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DataColumnChangeEventHandler(object sender, System.Data.DataColumnChangeEventArgs e); + + // Generated from `System.Data.DataColumnCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataColumnCollection : System.Data.InternalDataCollectionBase + { + public void Add(System.Data.DataColumn column) => throw null; + public System.Data.DataColumn Add(string columnName, System.Type type, string expression) => throw null; + public System.Data.DataColumn Add(string columnName, System.Type type) => throw null; + public System.Data.DataColumn Add(string columnName) => throw null; + public System.Data.DataColumn Add() => throw null; + public void AddRange(System.Data.DataColumn[] columns) => throw null; + public bool CanRemove(System.Data.DataColumn column) => throw null; + public void Clear() => throw null; + public event System.ComponentModel.CollectionChangeEventHandler CollectionChanged; + public bool Contains(string name) => throw null; + public void CopyTo(System.Data.DataColumn[] array, int index) => throw null; + public int IndexOf(string columnName) => throw null; + public int IndexOf(System.Data.DataColumn column) => throw null; + public System.Data.DataColumn this[string name] { get => throw null; } + public System.Data.DataColumn this[int index] { get => throw null; } + protected override System.Collections.ArrayList List { get => throw null; } + public void Remove(string name) => throw null; + public void Remove(System.Data.DataColumn column) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Data.DataException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataException : System.SystemException + { + public DataException(string s, System.Exception innerException) => throw null; + public DataException(string s) => throw null; + public DataException() => throw null; + protected DataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.DataReaderExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataReaderExtensions + { + public static bool GetBoolean(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Byte GetByte(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Int64 GetBytes(this System.Data.Common.DbDataReader reader, string name, System.Int64 dataOffset, System.Byte[] buffer, int bufferOffset, int length) => throw null; + public static System.Char GetChar(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Int64 GetChars(this System.Data.Common.DbDataReader reader, string name, System.Int64 dataOffset, System.Char[] buffer, int bufferOffset, int length) => throw null; + public static System.Data.Common.DbDataReader GetData(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static string GetDataTypeName(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.DateTime GetDateTime(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Decimal GetDecimal(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static double GetDouble(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Type GetFieldType(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static T GetFieldValue(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Threading.Tasks.Task GetFieldValueAsync(this System.Data.Common.DbDataReader reader, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static float GetFloat(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Guid GetGuid(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Int16 GetInt16(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static int GetInt32(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Int64 GetInt64(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Type GetProviderSpecificFieldType(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static object GetProviderSpecificValue(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.IO.Stream GetStream(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static string GetString(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.IO.TextReader GetTextReader(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static object GetValue(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static bool IsDBNull(this System.Data.Common.DbDataReader reader, string name) => throw null; + public static System.Threading.Tasks.Task IsDBNullAsync(this System.Data.Common.DbDataReader reader, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.Data.DataRelation` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRelation + { + protected void CheckStateForProperty() => throw null; + public virtual System.Data.DataColumn[] ChildColumns { get => throw null; } + public virtual System.Data.ForeignKeyConstraint ChildKeyConstraint { get => throw null; } + public virtual System.Data.DataTable ChildTable { get => throw null; } + public DataRelation(string relationName, string parentTableName, string parentTableNamespace, string childTableName, string childTableNamespace, string[] parentColumnNames, string[] childColumnNames, bool nested) => throw null; + public DataRelation(string relationName, string parentTableName, string childTableName, string[] parentColumnNames, string[] childColumnNames, bool nested) => throw null; + public DataRelation(string relationName, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns, bool createConstraints) => throw null; + public DataRelation(string relationName, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) => throw null; + public DataRelation(string relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn, bool createConstraints) => throw null; + public DataRelation(string relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) => throw null; + public virtual System.Data.DataSet DataSet { get => throw null; } + public System.Data.PropertyCollection ExtendedProperties { get => throw null; } + public virtual bool Nested { get => throw null; set => throw null; } + protected internal void OnPropertyChanging(System.ComponentModel.PropertyChangedEventArgs pcevent) => throw null; + public virtual System.Data.DataColumn[] ParentColumns { get => throw null; } + public virtual System.Data.UniqueConstraint ParentKeyConstraint { get => throw null; } + public virtual System.Data.DataTable ParentTable { get => throw null; } + protected internal void RaisePropertyChanging(string name) => throw null; + public virtual string RelationName { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.DataRelationCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DataRelationCollection : System.Data.InternalDataCollectionBase + { + public void Add(System.Data.DataRelation relation) => throw null; + public virtual System.Data.DataRelation Add(string name, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns, bool createConstraints) => throw null; + public virtual System.Data.DataRelation Add(string name, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) => throw null; + public virtual System.Data.DataRelation Add(string name, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn, bool createConstraints) => throw null; + public virtual System.Data.DataRelation Add(string name, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) => throw null; + public virtual System.Data.DataRelation Add(System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) => throw null; + public virtual System.Data.DataRelation Add(System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) => throw null; + protected virtual void AddCore(System.Data.DataRelation relation) => throw null; + public virtual void AddRange(System.Data.DataRelation[] relations) => throw null; + public virtual bool CanRemove(System.Data.DataRelation relation) => throw null; + public virtual void Clear() => throw null; + public event System.ComponentModel.CollectionChangeEventHandler CollectionChanged; + public virtual bool Contains(string name) => throw null; + public void CopyTo(System.Data.DataRelation[] array, int index) => throw null; + protected DataRelationCollection() => throw null; + protected abstract System.Data.DataSet GetDataSet(); + public virtual int IndexOf(string relationName) => throw null; + public virtual int IndexOf(System.Data.DataRelation relation) => throw null; + public abstract System.Data.DataRelation this[string name] { get; } + public abstract System.Data.DataRelation this[int index] { get; } + protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs ccevent) => throw null; + protected virtual void OnCollectionChanging(System.ComponentModel.CollectionChangeEventArgs ccevent) => throw null; + public void Remove(string name) => throw null; + public void Remove(System.Data.DataRelation relation) => throw null; + public void RemoveAt(int index) => throw null; + protected virtual void RemoveCore(System.Data.DataRelation relation) => throw null; + } + + // Generated from `System.Data.DataRow` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRow + { + public void AcceptChanges() => throw null; + public void BeginEdit() => throw null; + public void CancelEdit() => throw null; + public void ClearErrors() => throw null; + protected internal DataRow(System.Data.DataRowBuilder builder) => throw null; + public void Delete() => throw null; + public void EndEdit() => throw null; + public System.Data.DataRow[] GetChildRows(string relationName, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow[] GetChildRows(string relationName) => throw null; + public System.Data.DataRow[] GetChildRows(System.Data.DataRelation relation, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow[] GetChildRows(System.Data.DataRelation relation) => throw null; + public string GetColumnError(string columnName) => throw null; + public string GetColumnError(int columnIndex) => throw null; + public string GetColumnError(System.Data.DataColumn column) => throw null; + public System.Data.DataColumn[] GetColumnsInError() => throw null; + public System.Data.DataRow GetParentRow(string relationName, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow GetParentRow(string relationName) => throw null; + public System.Data.DataRow GetParentRow(System.Data.DataRelation relation, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow GetParentRow(System.Data.DataRelation relation) => throw null; + public System.Data.DataRow[] GetParentRows(string relationName, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow[] GetParentRows(string relationName) => throw null; + public System.Data.DataRow[] GetParentRows(System.Data.DataRelation relation, System.Data.DataRowVersion version) => throw null; + public System.Data.DataRow[] GetParentRows(System.Data.DataRelation relation) => throw null; + public bool HasErrors { get => throw null; } + public bool HasVersion(System.Data.DataRowVersion version) => throw null; + public bool IsNull(string columnName) => throw null; + public bool IsNull(int columnIndex) => throw null; + public bool IsNull(System.Data.DataColumn column, System.Data.DataRowVersion version) => throw null; + public bool IsNull(System.Data.DataColumn column) => throw null; + public object this[string columnName] { get => throw null; set => throw null; } + public object this[string columnName, System.Data.DataRowVersion version] { get => throw null; } + public object this[int columnIndex] { get => throw null; set => throw null; } + public object this[int columnIndex, System.Data.DataRowVersion version] { get => throw null; } + public object this[System.Data.DataColumn column] { get => throw null; set => throw null; } + public object this[System.Data.DataColumn column, System.Data.DataRowVersion version] { get => throw null; } + public object[] ItemArray { get => throw null; set => throw null; } + public void RejectChanges() => throw null; + public string RowError { get => throw null; set => throw null; } + public System.Data.DataRowState RowState { get => throw null; } + public void SetAdded() => throw null; + public void SetColumnError(string columnName, string error) => throw null; + public void SetColumnError(int columnIndex, string error) => throw null; + public void SetColumnError(System.Data.DataColumn column, string error) => throw null; + public void SetModified() => throw null; + protected void SetNull(System.Data.DataColumn column) => throw null; + public void SetParentRow(System.Data.DataRow parentRow, System.Data.DataRelation relation) => throw null; + public void SetParentRow(System.Data.DataRow parentRow) => throw null; + public System.Data.DataTable Table { get => throw null; } + } + + // Generated from `System.Data.DataRowAction` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DataRowAction + { + Add, + Change, + ChangeCurrentAndOriginal, + ChangeOriginal, + Commit, + // Stub generator skipped constructor + Delete, + Nothing, + Rollback, + } + + // Generated from `System.Data.DataRowBuilder` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRowBuilder + { + } + + // Generated from `System.Data.DataRowChangeEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRowChangeEventArgs : System.EventArgs + { + public System.Data.DataRowAction Action { get => throw null; } + public DataRowChangeEventArgs(System.Data.DataRow row, System.Data.DataRowAction action) => throw null; + public System.Data.DataRow Row { get => throw null; } + } + + // Generated from `System.Data.DataRowChangeEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DataRowChangeEventHandler(object sender, System.Data.DataRowChangeEventArgs e); + + // Generated from `System.Data.DataRowCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRowCollection : System.Data.InternalDataCollectionBase + { + public void Add(System.Data.DataRow row) => throw null; + public System.Data.DataRow Add(params object[] values) => throw null; + public void Clear() => throw null; + public bool Contains(object[] keys) => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Data.DataRow[] array, int index) => throw null; + public override void CopyTo(System.Array ar, int index) => throw null; + public override int Count { get => throw null; } + public System.Data.DataRow Find(object[] keys) => throw null; + public System.Data.DataRow Find(object key) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(System.Data.DataRow row) => throw null; + public void InsertAt(System.Data.DataRow row, int pos) => throw null; + public System.Data.DataRow this[int index] { get => throw null; } + public void Remove(System.Data.DataRow row) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Data.DataRowComparer` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataRowComparer + { + public static System.Data.DataRowComparer Default { get => throw null; } + } + + // Generated from `System.Data.DataRowComparer<>` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRowComparer : System.Collections.Generic.IEqualityComparer where TRow : System.Data.DataRow + { + public static System.Data.DataRowComparer Default { get => throw null; } + public bool Equals(TRow leftRow, TRow rightRow) => throw null; + public int GetHashCode(TRow row) => throw null; + } + + // Generated from `System.Data.DataRowExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataRowExtensions + { + public static T Field(this System.Data.DataRow row, string columnName, System.Data.DataRowVersion version) => throw null; + public static T Field(this System.Data.DataRow row, string columnName) => throw null; + public static T Field(this System.Data.DataRow row, int columnIndex, System.Data.DataRowVersion version) => throw null; + public static T Field(this System.Data.DataRow row, int columnIndex) => throw null; + public static T Field(this System.Data.DataRow row, System.Data.DataColumn column, System.Data.DataRowVersion version) => throw null; + public static T Field(this System.Data.DataRow row, System.Data.DataColumn column) => throw null; + public static void SetField(this System.Data.DataRow row, string columnName, T value) => throw null; + public static void SetField(this System.Data.DataRow row, int columnIndex, T value) => throw null; + public static void SetField(this System.Data.DataRow row, System.Data.DataColumn column, T value) => throw null; + } + + // Generated from `System.Data.DataRowState` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DataRowState + { + Added, + // Stub generator skipped constructor + Deleted, + Detached, + Modified, + Unchanged, + } + + // Generated from `System.Data.DataRowVersion` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataRowVersion + { + Current, + // Stub generator skipped constructor + Default, + Original, + Proposed, + } + + // Generated from `System.Data.DataRowView` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataRowView : System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.IEditableObject, System.ComponentModel.IDataErrorInfo, System.ComponentModel.ICustomTypeDescriptor + { + public void BeginEdit() => throw null; + public void CancelEdit() => throw null; + public System.Data.DataView CreateChildView(string relationName, bool followParent) => throw null; + public System.Data.DataView CreateChildView(string relationName) => throw null; + public System.Data.DataView CreateChildView(System.Data.DataRelation relation, bool followParent) => throw null; + public System.Data.DataView CreateChildView(System.Data.DataRelation relation) => throw null; + public System.Data.DataView DataView { get => throw null; } + public void Delete() => throw null; + public void EndEdit() => throw null; + public override bool Equals(object other) => throw null; + string System.ComponentModel.IDataErrorInfo.Error { get => throw null; } + System.ComponentModel.AttributeCollection System.ComponentModel.ICustomTypeDescriptor.GetAttributes() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetClassName() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetComponentName() => throw null; + System.ComponentModel.TypeConverter System.ComponentModel.ICustomTypeDescriptor.GetConverter() => throw null; + System.ComponentModel.EventDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultEvent() => throw null; + System.ComponentModel.PropertyDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultProperty() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetEditor(System.Type editorBaseType) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents(System.Attribute[] attributes) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents() => throw null; + public override int GetHashCode() => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties(System.Attribute[] attributes) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; + public bool IsEdit { get => throw null; } + public bool IsNew { get => throw null; } + string System.ComponentModel.IDataErrorInfo.this[string colName] { get => throw null; } + public object this[string property] { get => throw null; set => throw null; } + public object this[int ndx] { get => throw null; set => throw null; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + public System.Data.DataRow Row { get => throw null; } + public System.Data.DataRowVersion RowVersion { get => throw null; } + } + + // Generated from `System.Data.DataSet` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataSet : System.ComponentModel.MarshalByValueComponent, System.Xml.Serialization.IXmlSerializable, System.Runtime.Serialization.ISerializable, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ISupportInitialize, System.ComponentModel.IListSource + { + public void AcceptChanges() => throw null; + public void BeginInit() => throw null; + public bool CaseSensitive { get => throw null; set => throw null; } + public void Clear() => throw null; + public virtual System.Data.DataSet Clone() => throw null; + bool System.ComponentModel.IListSource.ContainsListCollection { get => throw null; } + public System.Data.DataSet Copy() => throw null; + public System.Data.DataTableReader CreateDataReader(params System.Data.DataTable[] dataTables) => throw null; + public System.Data.DataTableReader CreateDataReader() => throw null; + public DataSet(string dataSetName) => throw null; + public DataSet() => throw null; + protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, bool ConstructSchema) => throw null; + protected DataSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string DataSetName { get => throw null; set => throw null; } + public System.Data.DataViewManager DefaultViewManager { get => throw null; } + protected System.Data.SchemaSerializationMode DetermineSchemaSerializationMode(System.Xml.XmlReader reader) => throw null; + protected System.Data.SchemaSerializationMode DetermineSchemaSerializationMode(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void EndInit() => throw null; + public bool EnforceConstraints { get => throw null; set => throw null; } + public System.Data.PropertyCollection ExtendedProperties { get => throw null; } + public System.Data.DataSet GetChanges(System.Data.DataRowState rowStates) => throw null; + public System.Data.DataSet GetChanges() => throw null; + public static System.Xml.Schema.XmlSchemaComplexType GetDataSetSchema(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + System.Collections.IList System.ComponentModel.IListSource.GetList() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + protected virtual System.Xml.Schema.XmlSchema GetSchemaSerializable() => throw null; + protected void GetSerializationData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string GetXml() => throw null; + public string GetXmlSchema() => throw null; + public bool HasChanges(System.Data.DataRowState rowStates) => throw null; + public bool HasChanges() => throw null; + public bool HasErrors { get => throw null; } + public void InferXmlSchema(string fileName, string[] nsArray) => throw null; + public void InferXmlSchema(System.Xml.XmlReader reader, string[] nsArray) => throw null; + public void InferXmlSchema(System.IO.TextReader reader, string[] nsArray) => throw null; + public void InferXmlSchema(System.IO.Stream stream, string[] nsArray) => throw null; + protected virtual void InitializeDerivedDataSet() => throw null; + public event System.EventHandler Initialized; + protected bool IsBinarySerialized(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool IsInitialized { get => throw null; } + public void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption, params string[] tables) => throw null; + public void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption, params System.Data.DataTable[] tables) => throw null; + public virtual void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption, System.Data.FillErrorEventHandler errorHandler, params System.Data.DataTable[] tables) => throw null; + public System.Globalization.CultureInfo Locale { get => throw null; set => throw null; } + public void Merge(System.Data.DataTable table, bool preserveChanges, System.Data.MissingSchemaAction missingSchemaAction) => throw null; + public void Merge(System.Data.DataTable table) => throw null; + public void Merge(System.Data.DataSet dataSet, bool preserveChanges, System.Data.MissingSchemaAction missingSchemaAction) => throw null; + public void Merge(System.Data.DataSet dataSet, bool preserveChanges) => throw null; + public void Merge(System.Data.DataSet dataSet) => throw null; + public void Merge(System.Data.DataRow[] rows, bool preserveChanges, System.Data.MissingSchemaAction missingSchemaAction) => throw null; + public void Merge(System.Data.DataRow[] rows) => throw null; + public event System.Data.MergeFailedEventHandler MergeFailed; + public string Namespace { get => throw null; set => throw null; } + protected virtual void OnPropertyChanging(System.ComponentModel.PropertyChangedEventArgs pcevent) => throw null; + protected virtual void OnRemoveRelation(System.Data.DataRelation relation) => throw null; + protected internal virtual void OnRemoveTable(System.Data.DataTable table) => throw null; + public string Prefix { get => throw null; set => throw null; } + protected internal void RaisePropertyChanging(string name) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(string fileName, System.Data.XmlReadMode mode) => throw null; + public System.Data.XmlReadMode ReadXml(string fileName) => throw null; + public System.Data.XmlReadMode ReadXml(System.Xml.XmlReader reader, System.Data.XmlReadMode mode) => throw null; + public System.Data.XmlReadMode ReadXml(System.Xml.XmlReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.TextReader reader, System.Data.XmlReadMode mode) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.TextReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.Stream stream, System.Data.XmlReadMode mode) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.Stream stream) => throw null; + public void ReadXmlSchema(string fileName) => throw null; + public void ReadXmlSchema(System.Xml.XmlReader reader) => throw null; + public void ReadXmlSchema(System.IO.TextReader reader) => throw null; + public void ReadXmlSchema(System.IO.Stream stream) => throw null; + protected virtual void ReadXmlSerializable(System.Xml.XmlReader reader) => throw null; + public virtual void RejectChanges() => throw null; + public System.Data.DataRelationCollection Relations { get => throw null; } + public System.Data.SerializationFormat RemotingFormat { get => throw null; set => throw null; } + public virtual void Reset() => throw null; + public virtual System.Data.SchemaSerializationMode SchemaSerializationMode { get => throw null; set => throw null; } + protected virtual bool ShouldSerializeRelations() => throw null; + protected virtual bool ShouldSerializeTables() => throw null; + public override System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public System.Data.DataTableCollection Tables { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public void WriteXml(string fileName, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(string fileName) => throw null; + public void WriteXml(System.Xml.XmlWriter writer, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.Xml.XmlWriter writer) => throw null; + public void WriteXml(System.IO.TextWriter writer, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.IO.TextWriter writer) => throw null; + public void WriteXml(System.IO.Stream stream, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.IO.Stream stream) => throw null; + public void WriteXmlSchema(string fileName, System.Converter multipleTargetConverter) => throw null; + public void WriteXmlSchema(string fileName) => throw null; + public void WriteXmlSchema(System.Xml.XmlWriter writer, System.Converter multipleTargetConverter) => throw null; + public void WriteXmlSchema(System.Xml.XmlWriter writer) => throw null; + public void WriteXmlSchema(System.IO.TextWriter writer, System.Converter multipleTargetConverter) => throw null; + public void WriteXmlSchema(System.IO.TextWriter writer) => throw null; + public void WriteXmlSchema(System.IO.Stream stream, System.Converter multipleTargetConverter) => throw null; + public void WriteXmlSchema(System.IO.Stream stream) => throw null; + } + + // Generated from `System.Data.DataSetDateTime` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataSetDateTime + { + // Stub generator skipped constructor + Local, + Unspecified, + UnspecifiedLocal, + Utc, + } + + // Generated from `System.Data.DataSysDescriptionAttribute` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataSysDescriptionAttribute : System.ComponentModel.DescriptionAttribute + { + public DataSysDescriptionAttribute(string description) => throw null; + public override string Description { get => throw null; } + } + + // Generated from `System.Data.DataTable` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTable : System.ComponentModel.MarshalByValueComponent, System.Xml.Serialization.IXmlSerializable, System.Runtime.Serialization.ISerializable, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ISupportInitialize, System.ComponentModel.IListSource + { + public void AcceptChanges() => throw null; + public virtual void BeginInit() => throw null; + public void BeginLoadData() => throw null; + public bool CaseSensitive { get => throw null; set => throw null; } + public System.Data.DataRelationCollection ChildRelations { get => throw null; } + public void Clear() => throw null; + public virtual System.Data.DataTable Clone() => throw null; + public event System.Data.DataColumnChangeEventHandler ColumnChanged; + public event System.Data.DataColumnChangeEventHandler ColumnChanging; + public System.Data.DataColumnCollection Columns { get => throw null; } + public object Compute(string expression, string filter) => throw null; + public System.Data.ConstraintCollection Constraints { get => throw null; } + bool System.ComponentModel.IListSource.ContainsListCollection { get => throw null; } + public System.Data.DataTable Copy() => throw null; + public System.Data.DataTableReader CreateDataReader() => throw null; + protected virtual System.Data.DataTable CreateInstance() => throw null; + public System.Data.DataSet DataSet { get => throw null; } + public DataTable(string tableName, string tableNamespace) => throw null; + public DataTable(string tableName) => throw null; + public DataTable() => throw null; + protected DataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Data.DataView DefaultView { get => throw null; } + public string DisplayExpression { get => throw null; set => throw null; } + public virtual void EndInit() => throw null; + public void EndLoadData() => throw null; + public System.Data.PropertyCollection ExtendedProperties { get => throw null; } + public System.Data.DataTable GetChanges(System.Data.DataRowState rowStates) => throw null; + public System.Data.DataTable GetChanges() => throw null; + public static System.Xml.Schema.XmlSchemaComplexType GetDataTableSchema(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public System.Data.DataRow[] GetErrors() => throw null; + System.Collections.IList System.ComponentModel.IListSource.GetList() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected virtual System.Type GetRowType() => throw null; + protected virtual System.Xml.Schema.XmlSchema GetSchema() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public bool HasErrors { get => throw null; } + public void ImportRow(System.Data.DataRow row) => throw null; + public event System.EventHandler Initialized; + public bool IsInitialized { get => throw null; } + public void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption) => throw null; + public void Load(System.Data.IDataReader reader) => throw null; + public virtual void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption, System.Data.FillErrorEventHandler errorHandler) => throw null; + public System.Data.DataRow LoadDataRow(object[] values, bool fAcceptChanges) => throw null; + public System.Data.DataRow LoadDataRow(object[] values, System.Data.LoadOption loadOption) => throw null; + public System.Globalization.CultureInfo Locale { get => throw null; set => throw null; } + public void Merge(System.Data.DataTable table, bool preserveChanges, System.Data.MissingSchemaAction missingSchemaAction) => throw null; + public void Merge(System.Data.DataTable table, bool preserveChanges) => throw null; + public void Merge(System.Data.DataTable table) => throw null; + public int MinimumCapacity { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public System.Data.DataRow NewRow() => throw null; + protected internal System.Data.DataRow[] NewRowArray(int size) => throw null; + protected virtual System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) => throw null; + protected internal virtual void OnColumnChanged(System.Data.DataColumnChangeEventArgs e) => throw null; + protected internal virtual void OnColumnChanging(System.Data.DataColumnChangeEventArgs e) => throw null; + protected virtual void OnPropertyChanging(System.ComponentModel.PropertyChangedEventArgs pcevent) => throw null; + protected virtual void OnRemoveColumn(System.Data.DataColumn column) => throw null; + protected virtual void OnRowChanged(System.Data.DataRowChangeEventArgs e) => throw null; + protected virtual void OnRowChanging(System.Data.DataRowChangeEventArgs e) => throw null; + protected virtual void OnRowDeleted(System.Data.DataRowChangeEventArgs e) => throw null; + protected virtual void OnRowDeleting(System.Data.DataRowChangeEventArgs e) => throw null; + protected virtual void OnTableCleared(System.Data.DataTableClearEventArgs e) => throw null; + protected virtual void OnTableClearing(System.Data.DataTableClearEventArgs e) => throw null; + protected virtual void OnTableNewRow(System.Data.DataTableNewRowEventArgs e) => throw null; + public System.Data.DataRelationCollection ParentRelations { get => throw null; } + public string Prefix { get => throw null; set => throw null; } + public System.Data.DataColumn[] PrimaryKey { get => throw null; set => throw null; } + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(string fileName) => throw null; + public System.Data.XmlReadMode ReadXml(System.Xml.XmlReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.TextReader reader) => throw null; + public System.Data.XmlReadMode ReadXml(System.IO.Stream stream) => throw null; + public void ReadXmlSchema(string fileName) => throw null; + public void ReadXmlSchema(System.Xml.XmlReader reader) => throw null; + public void ReadXmlSchema(System.IO.TextReader reader) => throw null; + public void ReadXmlSchema(System.IO.Stream stream) => throw null; + protected virtual void ReadXmlSerializable(System.Xml.XmlReader reader) => throw null; + public void RejectChanges() => throw null; + public System.Data.SerializationFormat RemotingFormat { get => throw null; set => throw null; } + public virtual void Reset() => throw null; + public event System.Data.DataRowChangeEventHandler RowChanged; + public event System.Data.DataRowChangeEventHandler RowChanging; + public event System.Data.DataRowChangeEventHandler RowDeleted; + public event System.Data.DataRowChangeEventHandler RowDeleting; + public System.Data.DataRowCollection Rows { get => throw null; } + public System.Data.DataRow[] Select(string filterExpression, string sort, System.Data.DataViewRowState recordStates) => throw null; + public System.Data.DataRow[] Select(string filterExpression, string sort) => throw null; + public System.Data.DataRow[] Select(string filterExpression) => throw null; + public System.Data.DataRow[] Select() => throw null; + public override System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public event System.Data.DataTableClearEventHandler TableCleared; + public event System.Data.DataTableClearEventHandler TableClearing; + public string TableName { get => throw null; set => throw null; } + public event System.Data.DataTableNewRowEventHandler TableNewRow; + public override string ToString() => throw null; + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public void WriteXml(string fileName, bool writeHierarchy) => throw null; + public void WriteXml(string fileName, System.Data.XmlWriteMode mode, bool writeHierarchy) => throw null; + public void WriteXml(string fileName, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(string fileName) => throw null; + public void WriteXml(System.Xml.XmlWriter writer, bool writeHierarchy) => throw null; + public void WriteXml(System.Xml.XmlWriter writer, System.Data.XmlWriteMode mode, bool writeHierarchy) => throw null; + public void WriteXml(System.Xml.XmlWriter writer, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.Xml.XmlWriter writer) => throw null; + public void WriteXml(System.IO.TextWriter writer, bool writeHierarchy) => throw null; + public void WriteXml(System.IO.TextWriter writer, System.Data.XmlWriteMode mode, bool writeHierarchy) => throw null; + public void WriteXml(System.IO.TextWriter writer, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.IO.TextWriter writer) => throw null; + public void WriteXml(System.IO.Stream stream, bool writeHierarchy) => throw null; + public void WriteXml(System.IO.Stream stream, System.Data.XmlWriteMode mode, bool writeHierarchy) => throw null; + public void WriteXml(System.IO.Stream stream, System.Data.XmlWriteMode mode) => throw null; + public void WriteXml(System.IO.Stream stream) => throw null; + public void WriteXmlSchema(string fileName, bool writeHierarchy) => throw null; + public void WriteXmlSchema(string fileName) => throw null; + public void WriteXmlSchema(System.Xml.XmlWriter writer, bool writeHierarchy) => throw null; + public void WriteXmlSchema(System.Xml.XmlWriter writer) => throw null; + public void WriteXmlSchema(System.IO.TextWriter writer, bool writeHierarchy) => throw null; + public void WriteXmlSchema(System.IO.TextWriter writer) => throw null; + public void WriteXmlSchema(System.IO.Stream stream, bool writeHierarchy) => throw null; + public void WriteXmlSchema(System.IO.Stream stream) => throw null; + protected internal bool fInitInProgress; + } + + // Generated from `System.Data.DataTableClearEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableClearEventArgs : System.EventArgs + { + public DataTableClearEventArgs(System.Data.DataTable dataTable) => throw null; + public System.Data.DataTable Table { get => throw null; } + public string TableName { get => throw null; } + public string TableNamespace { get => throw null; } + } + + // Generated from `System.Data.DataTableClearEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DataTableClearEventHandler(object sender, System.Data.DataTableClearEventArgs e); + + // Generated from `System.Data.DataTableCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableCollection : System.Data.InternalDataCollectionBase + { + public void Add(System.Data.DataTable table) => throw null; + public System.Data.DataTable Add(string name, string tableNamespace) => throw null; + public System.Data.DataTable Add(string name) => throw null; + public System.Data.DataTable Add() => throw null; + public void AddRange(System.Data.DataTable[] tables) => throw null; + public bool CanRemove(System.Data.DataTable table) => throw null; + public void Clear() => throw null; + public event System.ComponentModel.CollectionChangeEventHandler CollectionChanged; + public event System.ComponentModel.CollectionChangeEventHandler CollectionChanging; + public bool Contains(string name, string tableNamespace) => throw null; + public bool Contains(string name) => throw null; + public void CopyTo(System.Data.DataTable[] array, int index) => throw null; + public int IndexOf(string tableName, string tableNamespace) => throw null; + public int IndexOf(string tableName) => throw null; + public int IndexOf(System.Data.DataTable table) => throw null; + public System.Data.DataTable this[string name] { get => throw null; } + public System.Data.DataTable this[string name, string tableNamespace] { get => throw null; } + public System.Data.DataTable this[int index] { get => throw null; } + protected override System.Collections.ArrayList List { get => throw null; } + public void Remove(string name, string tableNamespace) => throw null; + public void Remove(string name) => throw null; + public void Remove(System.Data.DataTable table) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Data.DataTableExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataTableExtensions + { + public static System.Data.DataView AsDataView(this System.Data.EnumerableRowCollection source) where T : System.Data.DataRow => throw null; + public static System.Data.DataView AsDataView(this System.Data.DataTable table) => throw null; + public static System.Data.EnumerableRowCollection AsEnumerable(this System.Data.DataTable source) => throw null; + public static void CopyToDataTable(this System.Collections.Generic.IEnumerable source, System.Data.DataTable table, System.Data.LoadOption options, System.Data.FillErrorEventHandler errorHandler) where T : System.Data.DataRow => throw null; + public static void CopyToDataTable(this System.Collections.Generic.IEnumerable source, System.Data.DataTable table, System.Data.LoadOption options) where T : System.Data.DataRow => throw null; + public static System.Data.DataTable CopyToDataTable(this System.Collections.Generic.IEnumerable source) where T : System.Data.DataRow => throw null; + } + + // Generated from `System.Data.DataTableNewRowEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableNewRowEventArgs : System.EventArgs + { + public DataTableNewRowEventArgs(System.Data.DataRow dataRow) => throw null; + public System.Data.DataRow Row { get => throw null; } + } + + // Generated from `System.Data.DataTableNewRowEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DataTableNewRowEventHandler(object sender, System.Data.DataTableNewRowEventArgs e); + + // Generated from `System.Data.DataTableReader` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableReader : System.Data.Common.DbDataReader + { + public override void Close() => throw null; + public DataTableReader(System.Data.DataTable[] dataTables) => throw null; + public DataTableReader(System.Data.DataTable dataTable) => throw null; + public override int Depth { get => throw null; } + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int ordinal) => throw null; + public override System.Byte GetByte(int ordinal) => throw null; + public override System.Int64 GetBytes(int ordinal, System.Int64 dataIndex, System.Byte[] buffer, int bufferIndex, int length) => throw null; + public override System.Char GetChar(int ordinal) => throw null; + public override System.Int64 GetChars(int ordinal, System.Int64 dataIndex, System.Char[] buffer, int bufferIndex, int length) => throw null; + public override string GetDataTypeName(int ordinal) => throw null; + public override System.DateTime GetDateTime(int ordinal) => throw null; + public override System.Decimal GetDecimal(int ordinal) => throw null; + public override double GetDouble(int ordinal) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int ordinal) => throw null; + public override float GetFloat(int ordinal) => throw null; + public override System.Guid GetGuid(int ordinal) => throw null; + public override System.Int16 GetInt16(int ordinal) => throw null; + public override int GetInt32(int ordinal) => throw null; + public override System.Int64 GetInt64(int ordinal) => throw null; + public override string GetName(int ordinal) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Type GetProviderSpecificFieldType(int ordinal) => throw null; + public override object GetProviderSpecificValue(int ordinal) => throw null; + public override int GetProviderSpecificValues(object[] values) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public override string GetString(int ordinal) => throw null; + public override object GetValue(int ordinal) => throw null; + public override int GetValues(object[] values) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + public override bool IsDBNull(int ordinal) => throw null; + public override object this[string name] { get => throw null; } + public override object this[int ordinal] { get => throw null; } + public override bool NextResult() => throw null; + public override bool Read() => throw null; + public override int RecordsAffected { get => throw null; } + } + + // Generated from `System.Data.DataView` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataView : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.ITypedList, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ISupportInitialize, System.ComponentModel.IBindingListView, System.ComponentModel.IBindingList, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + void System.ComponentModel.IBindingList.AddIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + public virtual System.Data.DataRowView AddNew() => throw null; + object System.ComponentModel.IBindingList.AddNew() => throw null; + public bool AllowDelete { get => throw null; set => throw null; } + public bool AllowEdit { get => throw null; set => throw null; } + bool System.ComponentModel.IBindingList.AllowEdit { get => throw null; } + public bool AllowNew { get => throw null; set => throw null; } + bool System.ComponentModel.IBindingList.AllowNew { get => throw null; } + bool System.ComponentModel.IBindingList.AllowRemove { get => throw null; } + public bool ApplyDefaultSort { get => throw null; set => throw null; } + void System.ComponentModel.IBindingListView.ApplySort(System.ComponentModel.ListSortDescriptionCollection sorts) => throw null; + void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction) => throw null; + public void BeginInit() => throw null; + void System.Collections.IList.Clear() => throw null; + protected void Close() => throw null; + protected virtual void ColumnCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public DataView(System.Data.DataTable table, string RowFilter, string Sort, System.Data.DataViewRowState RowState) => throw null; + public DataView(System.Data.DataTable table) => throw null; + public DataView() => throw null; + public System.Data.DataViewManager DataViewManager { get => throw null; } + public void Delete(int index) => throw null; + protected override void Dispose(bool disposing) => throw null; + public void EndInit() => throw null; + public virtual bool Equals(System.Data.DataView view) => throw null; + string System.ComponentModel.IBindingListView.Filter { get => throw null; set => throw null; } + public int Find(object[] key) => throw null; + public int Find(object key) => throw null; + int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key) => throw null; + public System.Data.DataRowView[] FindRows(object[] key) => throw null; + public System.Data.DataRowView[] FindRows(object key) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + protected virtual void IndexListChanged(object sender, System.ComponentModel.ListChangedEventArgs e) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + public event System.EventHandler Initialized; + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsInitialized { get => throw null; } + protected bool IsOpen { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.ComponentModel.IBindingList.IsSorted { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Data.DataRowView this[int recordIndex] { get => throw null; } + object System.Collections.IList.this[int recordIndex] { get => throw null; set => throw null; } + public event System.ComponentModel.ListChangedEventHandler ListChanged; + protected virtual void OnListChanged(System.ComponentModel.ListChangedEventArgs e) => throw null; + protected void Open() => throw null; + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.ComponentModel.IBindingListView.RemoveFilter() => throw null; + void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + void System.ComponentModel.IBindingList.RemoveSort() => throw null; + protected void Reset() => throw null; + public virtual string RowFilter { get => throw null; set => throw null; } + public System.Data.DataViewRowState RowStateFilter { get => throw null; set => throw null; } + public string Sort { get => throw null; set => throw null; } + System.ComponentModel.ListSortDescriptionCollection System.ComponentModel.IBindingListView.SortDescriptions { get => throw null; } + System.ComponentModel.ListSortDirection System.ComponentModel.IBindingList.SortDirection { get => throw null; } + System.ComponentModel.PropertyDescriptor System.ComponentModel.IBindingList.SortProperty { get => throw null; } + bool System.ComponentModel.IBindingListView.SupportsAdvancedSorting { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsChangeNotification { get => throw null; } + bool System.ComponentModel.IBindingListView.SupportsFiltering { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSearching { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSorting { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public System.Data.DataTable Table { get => throw null; set => throw null; } + public System.Data.DataTable ToTable(string tableName, bool distinct, params string[] columnNames) => throw null; + public System.Data.DataTable ToTable(string tableName) => throw null; + public System.Data.DataTable ToTable(bool distinct, params string[] columnNames) => throw null; + public System.Data.DataTable ToTable() => throw null; + protected void UpdateIndex() => throw null; + protected virtual void UpdateIndex(bool force) => throw null; + } + + // Generated from `System.Data.DataViewManager` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataViewManager : System.ComponentModel.MarshalByValueComponent, System.ComponentModel.ITypedList, System.ComponentModel.IBindingList, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + void System.ComponentModel.IBindingList.AddIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + object System.ComponentModel.IBindingList.AddNew() => throw null; + bool System.ComponentModel.IBindingList.AllowEdit { get => throw null; } + bool System.ComponentModel.IBindingList.AllowNew { get => throw null; } + bool System.ComponentModel.IBindingList.AllowRemove { get => throw null; } + void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction) => throw null; + void System.Collections.IList.Clear() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + public System.Data.DataView CreateDataView(System.Data.DataTable table) => throw null; + public System.Data.DataSet DataSet { get => throw null; set => throw null; } + public DataViewManager(System.Data.DataSet dataSet) => throw null; + public DataViewManager() => throw null; + public string DataViewSettingCollectionString { get => throw null; set => throw null; } + public System.Data.DataViewSettingCollection DataViewSettings { get => throw null; } + int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.ComponentModel.IBindingList.IsSorted { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public event System.ComponentModel.ListChangedEventHandler ListChanged; + protected virtual void OnListChanged(System.ComponentModel.ListChangedEventArgs e) => throw null; + protected virtual void RelationCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + void System.ComponentModel.IBindingList.RemoveSort() => throw null; + System.ComponentModel.ListSortDirection System.ComponentModel.IBindingList.SortDirection { get => throw null; } + System.ComponentModel.PropertyDescriptor System.ComponentModel.IBindingList.SortProperty { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsChangeNotification { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSearching { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSorting { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + protected virtual void TableCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) => throw null; + } + + // Generated from `System.Data.DataViewRowState` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DataViewRowState + { + Added, + CurrentRows, + // Stub generator skipped constructor + Deleted, + ModifiedCurrent, + ModifiedOriginal, + None, + OriginalRows, + Unchanged, + } + + // Generated from `System.Data.DataViewSetting` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataViewSetting + { + public bool ApplyDefaultSort { get => throw null; set => throw null; } + public System.Data.DataViewManager DataViewManager { get => throw null; } + public string RowFilter { get => throw null; set => throw null; } + public System.Data.DataViewRowState RowStateFilter { get => throw null; set => throw null; } + public string Sort { get => throw null; set => throw null; } + public System.Data.DataTable Table { get => throw null; } + } + + // Generated from `System.Data.DataViewSettingCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataViewSettingCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void CopyTo(System.Data.DataViewSetting[] ar, int index) => throw null; + public void CopyTo(System.Array ar, int index) => throw null; + public virtual int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public virtual System.Data.DataViewSetting this[string tableName] { get => throw null; } + public virtual System.Data.DataViewSetting this[int index] { get => throw null; set => throw null; } + public virtual System.Data.DataViewSetting this[System.Data.DataTable table] { get => throw null; set => throw null; } + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Data.DbType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DbType + { + AnsiString, + AnsiStringFixedLength, + Binary, + Boolean, + Byte, + Currency, + Date, + DateTime, + DateTime2, + DateTimeOffset, + // Stub generator skipped constructor + Decimal, + Double, + Guid, + Int16, + Int32, + Int64, + Object, + SByte, + Single, + String, + StringFixedLength, + Time, + UInt16, + UInt32, + UInt64, + VarNumeric, + Xml, + } + + // Generated from `System.Data.DeletedRowInaccessibleException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DeletedRowInaccessibleException : System.Data.DataException + { + public DeletedRowInaccessibleException(string s) => throw null; + public DeletedRowInaccessibleException(string message, System.Exception innerException) => throw null; + public DeletedRowInaccessibleException() => throw null; + protected DeletedRowInaccessibleException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.DuplicateNameException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DuplicateNameException : System.Data.DataException + { + public DuplicateNameException(string s) => throw null; + public DuplicateNameException(string message, System.Exception innerException) => throw null; + public DuplicateNameException() => throw null; + protected DuplicateNameException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.EnumerableRowCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EnumerableRowCollection : System.Collections.IEnumerable + { + internal EnumerableRowCollection() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Data.EnumerableRowCollection<>` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumerableRowCollection : System.Data.EnumerableRowCollection, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + internal EnumerableRowCollection() => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Data.EnumerableRowCollectionExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class EnumerableRowCollectionExtensions + { + public static System.Data.EnumerableRowCollection Cast(this System.Data.EnumerableRowCollection source) => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderBy(this System.Data.EnumerableRowCollection source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderBy(this System.Data.EnumerableRowCollection source, System.Func keySelector) => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderByDescending(this System.Data.EnumerableRowCollection source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderByDescending(this System.Data.EnumerableRowCollection source, System.Func keySelector) => throw null; + public static System.Data.EnumerableRowCollection Select(this System.Data.EnumerableRowCollection source, System.Func selector) => throw null; + public static System.Data.OrderedEnumerableRowCollection ThenBy(this System.Data.OrderedEnumerableRowCollection source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Data.OrderedEnumerableRowCollection ThenBy(this System.Data.OrderedEnumerableRowCollection source, System.Func keySelector) => throw null; + public static System.Data.OrderedEnumerableRowCollection ThenByDescending(this System.Data.OrderedEnumerableRowCollection source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Data.OrderedEnumerableRowCollection ThenByDescending(this System.Data.OrderedEnumerableRowCollection source, System.Func keySelector) => throw null; + public static System.Data.EnumerableRowCollection Where(this System.Data.EnumerableRowCollection source, System.Func predicate) => throw null; + } + + // Generated from `System.Data.EvaluateException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EvaluateException : System.Data.InvalidExpressionException + { + public EvaluateException(string s) => throw null; + public EvaluateException(string message, System.Exception innerException) => throw null; + public EvaluateException() => throw null; + protected EvaluateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.FillErrorEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FillErrorEventArgs : System.EventArgs + { + public bool Continue { get => throw null; set => throw null; } + public System.Data.DataTable DataTable { get => throw null; } + public System.Exception Errors { get => throw null; set => throw null; } + public FillErrorEventArgs(System.Data.DataTable dataTable, object[] values) => throw null; + public object[] Values { get => throw null; } + } + + // Generated from `System.Data.FillErrorEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void FillErrorEventHandler(object sender, System.Data.FillErrorEventArgs e); + + // Generated from `System.Data.ForeignKeyConstraint` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ForeignKeyConstraint : System.Data.Constraint + { + public virtual System.Data.AcceptRejectRule AcceptRejectRule { get => throw null; set => throw null; } + public virtual System.Data.DataColumn[] Columns { get => throw null; } + public virtual System.Data.Rule DeleteRule { get => throw null; set => throw null; } + public override bool Equals(object key) => throw null; + public ForeignKeyConstraint(string constraintName, string parentTableName, string[] parentColumnNames, string[] childColumnNames, System.Data.AcceptRejectRule acceptRejectRule, System.Data.Rule deleteRule, System.Data.Rule updateRule) => throw null; + public ForeignKeyConstraint(string constraintName, string parentTableName, string parentTableNamespace, string[] parentColumnNames, string[] childColumnNames, System.Data.AcceptRejectRule acceptRejectRule, System.Data.Rule deleteRule, System.Data.Rule updateRule) => throw null; + public ForeignKeyConstraint(string constraintName, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) => throw null; + public ForeignKeyConstraint(string constraintName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) => throw null; + public ForeignKeyConstraint(System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) => throw null; + public ForeignKeyConstraint(System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Data.DataColumn[] RelatedColumns { get => throw null; } + public virtual System.Data.DataTable RelatedTable { get => throw null; } + public override System.Data.DataTable Table { get => throw null; } + public virtual System.Data.Rule UpdateRule { get => throw null; set => throw null; } + } + + // Generated from `System.Data.IColumnMapping` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IColumnMapping + { + string DataSetColumn { get; set; } + string SourceColumn { get; set; } + } + + // Generated from `System.Data.IColumnMappingCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IColumnMappingCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + System.Data.IColumnMapping Add(string sourceColumnName, string dataSetColumnName); + bool Contains(string sourceColumnName); + System.Data.IColumnMapping GetByDataSetColumn(string dataSetColumnName); + int IndexOf(string sourceColumnName); + object this[string index] { get; set; } + void RemoveAt(string sourceColumnName); + } + + // Generated from `System.Data.IDataAdapter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataAdapter + { + int Fill(System.Data.DataSet dataSet); + System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType); + System.Data.IDataParameter[] GetFillParameters(); + System.Data.MissingMappingAction MissingMappingAction { get; set; } + System.Data.MissingSchemaAction MissingSchemaAction { get; set; } + System.Data.ITableMappingCollection TableMappings { get; } + int Update(System.Data.DataSet dataSet); + } + + // Generated from `System.Data.IDataParameter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataParameter + { + System.Data.DbType DbType { get; set; } + System.Data.ParameterDirection Direction { get; set; } + bool IsNullable { get; } + string ParameterName { get; set; } + string SourceColumn { get; set; } + System.Data.DataRowVersion SourceVersion { get; set; } + object Value { get; set; } + } + + // Generated from `System.Data.IDataParameterCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataParameterCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + bool Contains(string parameterName); + int IndexOf(string parameterName); + object this[string parameterName] { get; set; } + void RemoveAt(string parameterName); + } + + // Generated from `System.Data.IDataReader` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataReader : System.IDisposable, System.Data.IDataRecord + { + void Close(); + int Depth { get; } + System.Data.DataTable GetSchemaTable(); + bool IsClosed { get; } + bool NextResult(); + bool Read(); + int RecordsAffected { get; } + } + + // Generated from `System.Data.IDataRecord` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataRecord + { + int FieldCount { get; } + bool GetBoolean(int i); + System.Byte GetByte(int i); + System.Int64 GetBytes(int i, System.Int64 fieldOffset, System.Byte[] buffer, int bufferoffset, int length); + System.Char GetChar(int i); + System.Int64 GetChars(int i, System.Int64 fieldoffset, System.Char[] buffer, int bufferoffset, int length); + System.Data.IDataReader GetData(int i); + string GetDataTypeName(int i); + System.DateTime GetDateTime(int i); + System.Decimal GetDecimal(int i); + double GetDouble(int i); + System.Type GetFieldType(int i); + float GetFloat(int i); + System.Guid GetGuid(int i); + System.Int16 GetInt16(int i); + int GetInt32(int i); + System.Int64 GetInt64(int i); + string GetName(int i); + int GetOrdinal(string name); + string GetString(int i); + object GetValue(int i); + int GetValues(object[] values); + bool IsDBNull(int i); + object this[string name] { get; } + object this[int i] { get; } + } + + // Generated from `System.Data.IDbCommand` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbCommand : System.IDisposable + { + void Cancel(); + string CommandText { get; set; } + int CommandTimeout { get; set; } + System.Data.CommandType CommandType { get; set; } + System.Data.IDbConnection Connection { get; set; } + System.Data.IDbDataParameter CreateParameter(); + int ExecuteNonQuery(); + System.Data.IDataReader ExecuteReader(System.Data.CommandBehavior behavior); + System.Data.IDataReader ExecuteReader(); + object ExecuteScalar(); + System.Data.IDataParameterCollection Parameters { get; } + void Prepare(); + System.Data.IDbTransaction Transaction { get; set; } + System.Data.UpdateRowSource UpdatedRowSource { get; set; } + } + + // Generated from `System.Data.IDbConnection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbConnection : System.IDisposable + { + System.Data.IDbTransaction BeginTransaction(System.Data.IsolationLevel il); + System.Data.IDbTransaction BeginTransaction(); + void ChangeDatabase(string databaseName); + void Close(); + string ConnectionString { get; set; } + int ConnectionTimeout { get; } + System.Data.IDbCommand CreateCommand(); + string Database { get; } + void Open(); + System.Data.ConnectionState State { get; } + } + + // Generated from `System.Data.IDbDataAdapter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbDataAdapter : System.Data.IDataAdapter + { + System.Data.IDbCommand DeleteCommand { get; set; } + System.Data.IDbCommand InsertCommand { get; set; } + System.Data.IDbCommand SelectCommand { get; set; } + System.Data.IDbCommand UpdateCommand { get; set; } + } + + // Generated from `System.Data.IDbDataParameter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbDataParameter : System.Data.IDataParameter + { + System.Byte Precision { get; set; } + System.Byte Scale { get; set; } + int Size { get; set; } + } + + // Generated from `System.Data.IDbTransaction` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbTransaction : System.IDisposable + { + void Commit(); + System.Data.IDbConnection Connection { get; } + System.Data.IsolationLevel IsolationLevel { get; } + void Rollback(); + } + + // Generated from `System.Data.ITableMapping` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITableMapping + { + System.Data.IColumnMappingCollection ColumnMappings { get; } + string DataSetTable { get; set; } + string SourceTable { get; set; } + } + + // Generated from `System.Data.ITableMappingCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITableMappingCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + System.Data.ITableMapping Add(string sourceTableName, string dataSetTableName); + bool Contains(string sourceTableName); + System.Data.ITableMapping GetByDataSetTable(string dataSetTableName); + int IndexOf(string sourceTableName); + object this[string index] { get; set; } + void RemoveAt(string sourceTableName); + } + + // Generated from `System.Data.InRowChangingEventException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InRowChangingEventException : System.Data.DataException + { + public InRowChangingEventException(string s) => throw null; + public InRowChangingEventException(string message, System.Exception innerException) => throw null; + public InRowChangingEventException() => throw null; + protected InRowChangingEventException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.InternalDataCollectionBase` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InternalDataCollectionBase : System.Collections.IEnumerable, System.Collections.ICollection + { + public virtual void CopyTo(System.Array ar, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public InternalDataCollectionBase() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + protected virtual System.Collections.ArrayList List { get => throw null; } + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Data.InvalidConstraintException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidConstraintException : System.Data.DataException + { + public InvalidConstraintException(string s) => throw null; + public InvalidConstraintException(string message, System.Exception innerException) => throw null; + public InvalidConstraintException() => throw null; + protected InvalidConstraintException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.InvalidExpressionException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidExpressionException : System.Data.DataException + { + public InvalidExpressionException(string s) => throw null; + public InvalidExpressionException(string message, System.Exception innerException) => throw null; + public InvalidExpressionException() => throw null; + protected InvalidExpressionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.IsolationLevel` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum IsolationLevel + { + Chaos, + // Stub generator skipped constructor + ReadCommitted, + ReadUncommitted, + RepeatableRead, + Serializable, + Snapshot, + Unspecified, + } + + // Generated from `System.Data.KeyRestrictionBehavior` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum KeyRestrictionBehavior + { + AllowOnly, + // Stub generator skipped constructor + PreventUsage, + } + + // Generated from `System.Data.LoadOption` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LoadOption + { + // Stub generator skipped constructor + OverwriteChanges, + PreserveChanges, + Upsert, + } + + // Generated from `System.Data.MappingType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MappingType + { + Attribute, + Element, + Hidden, + // Stub generator skipped constructor + SimpleContent, + } + + // Generated from `System.Data.MergeFailedEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MergeFailedEventArgs : System.EventArgs + { + public string Conflict { get => throw null; } + public MergeFailedEventArgs(System.Data.DataTable table, string conflict) => throw null; + public System.Data.DataTable Table { get => throw null; } + } + + // Generated from `System.Data.MergeFailedEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void MergeFailedEventHandler(object sender, System.Data.MergeFailedEventArgs e); + + // Generated from `System.Data.MissingMappingAction` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MissingMappingAction + { + Error, + Ignore, + // Stub generator skipped constructor + Passthrough, + } + + // Generated from `System.Data.MissingPrimaryKeyException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingPrimaryKeyException : System.Data.DataException + { + public MissingPrimaryKeyException(string s) => throw null; + public MissingPrimaryKeyException(string message, System.Exception innerException) => throw null; + public MissingPrimaryKeyException() => throw null; + protected MissingPrimaryKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.MissingSchemaAction` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MissingSchemaAction + { + Add, + AddWithKey, + Error, + Ignore, + // Stub generator skipped constructor + } + + // Generated from `System.Data.NoNullAllowedException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NoNullAllowedException : System.Data.DataException + { + public NoNullAllowedException(string s) => throw null; + public NoNullAllowedException(string message, System.Exception innerException) => throw null; + public NoNullAllowedException() => throw null; + protected NoNullAllowedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.OrderedEnumerableRowCollection<>` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OrderedEnumerableRowCollection : System.Data.EnumerableRowCollection + { + } + + // Generated from `System.Data.ParameterDirection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ParameterDirection + { + Input, + InputOutput, + Output, + // Stub generator skipped constructor + ReturnValue, + } + + // Generated from `System.Data.PropertyCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyCollection : System.Collections.Hashtable, System.ICloneable + { + public override object Clone() => throw null; + public PropertyCollection() => throw null; + protected PropertyCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.ReadOnlyException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyException : System.Data.DataException + { + public ReadOnlyException(string s) => throw null; + public ReadOnlyException(string message, System.Exception innerException) => throw null; + public ReadOnlyException() => throw null; + protected ReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.RowNotInTableException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RowNotInTableException : System.Data.DataException + { + public RowNotInTableException(string s) => throw null; + public RowNotInTableException(string message, System.Exception innerException) => throw null; + public RowNotInTableException() => throw null; + protected RowNotInTableException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.Rule` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Rule + { + Cascade, + None, + // Stub generator skipped constructor + SetDefault, + SetNull, + } + + // Generated from `System.Data.SchemaSerializationMode` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SchemaSerializationMode + { + ExcludeSchema, + IncludeSchema, + // Stub generator skipped constructor + } + + // Generated from `System.Data.SchemaType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SchemaType + { + Mapped, + // Stub generator skipped constructor + Source, + } + + // Generated from `System.Data.SerializationFormat` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SerializationFormat + { + Binary, + // Stub generator skipped constructor + Xml, + } + + // Generated from `System.Data.SqlDbType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SqlDbType + { + BigInt, + Binary, + Bit, + Char, + Date, + DateTime, + DateTime2, + DateTimeOffset, + Decimal, + Float, + Image, + Int, + Money, + NChar, + NText, + NVarChar, + Real, + SmallDateTime, + SmallInt, + SmallMoney, + // Stub generator skipped constructor + Structured, + Text, + Time, + Timestamp, + TinyInt, + Udt, + UniqueIdentifier, + VarBinary, + VarChar, + Variant, + Xml, + } + + // Generated from `System.Data.StateChangeEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StateChangeEventArgs : System.EventArgs + { + public System.Data.ConnectionState CurrentState { get => throw null; } + public System.Data.ConnectionState OriginalState { get => throw null; } + public StateChangeEventArgs(System.Data.ConnectionState originalState, System.Data.ConnectionState currentState) => throw null; + } + + // Generated from `System.Data.StateChangeEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void StateChangeEventHandler(object sender, System.Data.StateChangeEventArgs e); + + // Generated from `System.Data.StatementCompletedEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StatementCompletedEventArgs : System.EventArgs + { + public int RecordCount { get => throw null; } + public StatementCompletedEventArgs(int recordCount) => throw null; + } + + // Generated from `System.Data.StatementCompletedEventHandler` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void StatementCompletedEventHandler(object sender, System.Data.StatementCompletedEventArgs e); + + // Generated from `System.Data.StatementType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StatementType + { + Batch, + Delete, + Insert, + Select, + // Stub generator skipped constructor + Update, + } + + // Generated from `System.Data.StrongTypingException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StrongTypingException : System.Data.DataException + { + public StrongTypingException(string s, System.Exception innerException) => throw null; + public StrongTypingException(string message) => throw null; + public StrongTypingException() => throw null; + protected StrongTypingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.SyntaxErrorException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SyntaxErrorException : System.Data.InvalidExpressionException + { + public SyntaxErrorException(string s) => throw null; + public SyntaxErrorException(string message, System.Exception innerException) => throw null; + public SyntaxErrorException() => throw null; + protected SyntaxErrorException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.TypedTableBase<>` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TypedTableBase : System.Data.DataTable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable where T : System.Data.DataRow + { + public System.Data.EnumerableRowCollection Cast() => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected TypedTableBase() => throw null; + } + + // Generated from `System.Data.TypedTableBaseExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class TypedTableBaseExtensions + { + public static System.Data.EnumerableRowCollection AsEnumerable(this System.Data.TypedTableBase source) where TRow : System.Data.DataRow => throw null; + public static TRow ElementAtOrDefault(this System.Data.TypedTableBase source, int index) where TRow : System.Data.DataRow => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderBy(this System.Data.TypedTableBase source, System.Func keySelector, System.Collections.Generic.IComparer comparer) where TRow : System.Data.DataRow => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderBy(this System.Data.TypedTableBase source, System.Func keySelector) where TRow : System.Data.DataRow => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderByDescending(this System.Data.TypedTableBase source, System.Func keySelector, System.Collections.Generic.IComparer comparer) where TRow : System.Data.DataRow => throw null; + public static System.Data.OrderedEnumerableRowCollection OrderByDescending(this System.Data.TypedTableBase source, System.Func keySelector) where TRow : System.Data.DataRow => throw null; + public static System.Data.EnumerableRowCollection Select(this System.Data.TypedTableBase source, System.Func selector) where TRow : System.Data.DataRow => throw null; + public static System.Data.EnumerableRowCollection Where(this System.Data.TypedTableBase source, System.Func predicate) where TRow : System.Data.DataRow => throw null; + } + + // Generated from `System.Data.UniqueConstraint` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UniqueConstraint : System.Data.Constraint + { + public virtual System.Data.DataColumn[] Columns { get => throw null; } + public override bool Equals(object key2) => throw null; + public override int GetHashCode() => throw null; + public bool IsPrimaryKey { get => throw null; } + public override System.Data.DataTable Table { get => throw null; } + public UniqueConstraint(string name, string[] columnNames, bool isPrimaryKey) => throw null; + public UniqueConstraint(string name, System.Data.DataColumn[] columns, bool isPrimaryKey) => throw null; + public UniqueConstraint(string name, System.Data.DataColumn[] columns) => throw null; + public UniqueConstraint(string name, System.Data.DataColumn column, bool isPrimaryKey) => throw null; + public UniqueConstraint(string name, System.Data.DataColumn column) => throw null; + public UniqueConstraint(System.Data.DataColumn[] columns, bool isPrimaryKey) => throw null; + public UniqueConstraint(System.Data.DataColumn[] columns) => throw null; + public UniqueConstraint(System.Data.DataColumn column, bool isPrimaryKey) => throw null; + public UniqueConstraint(System.Data.DataColumn column) => throw null; + } + + // Generated from `System.Data.UpdateRowSource` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UpdateRowSource + { + Both, + FirstReturnedRecord, + None, + OutputParameters, + // Stub generator skipped constructor + } + + // Generated from `System.Data.UpdateStatus` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UpdateStatus + { + Continue, + ErrorsOccurred, + SkipAllRemainingRows, + SkipCurrentRow, + // Stub generator skipped constructor + } + + // Generated from `System.Data.VersionNotFoundException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VersionNotFoundException : System.Data.DataException + { + public VersionNotFoundException(string s) => throw null; + public VersionNotFoundException(string message, System.Exception innerException) => throw null; + public VersionNotFoundException() => throw null; + protected VersionNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Data.XmlReadMode` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlReadMode + { + Auto, + DiffGram, + Fragment, + IgnoreSchema, + InferSchema, + InferTypedSchema, + ReadSchema, + // Stub generator skipped constructor + } + + // Generated from `System.Data.XmlWriteMode` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlWriteMode + { + DiffGram, + IgnoreSchema, + WriteSchema, + // Stub generator skipped constructor + } + + namespace Common + { + // Generated from `System.Data.Common.CatalogLocation` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CatalogLocation + { + // Stub generator skipped constructor + End, + Start, + } + + // Generated from `System.Data.Common.DataAdapter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataAdapter : System.ComponentModel.Component, System.Data.IDataAdapter + { + public bool AcceptChangesDuringFill { get => throw null; set => throw null; } + public bool AcceptChangesDuringUpdate { get => throw null; set => throw null; } + protected virtual System.Data.Common.DataAdapter CloneInternals() => throw null; + public bool ContinueUpdateOnError { get => throw null; set => throw null; } + protected virtual System.Data.Common.DataTableMappingCollection CreateTableMappings() => throw null; + protected DataAdapter(System.Data.Common.DataAdapter from) => throw null; + protected DataAdapter() => throw null; + protected override void Dispose(bool disposing) => throw null; + public virtual int Fill(System.Data.DataSet dataSet) => throw null; + protected virtual int Fill(System.Data.DataTable[] dataTables, System.Data.IDataReader dataReader, int startRecord, int maxRecords) => throw null; + protected virtual int Fill(System.Data.DataTable dataTable, System.Data.IDataReader dataReader) => throw null; + protected virtual int Fill(System.Data.DataSet dataSet, string srcTable, System.Data.IDataReader dataReader, int startRecord, int maxRecords) => throw null; + public event System.Data.FillErrorEventHandler FillError; + public System.Data.LoadOption FillLoadOption { get => throw null; set => throw null; } + public virtual System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType) => throw null; + protected virtual System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, string srcTable, System.Data.IDataReader dataReader) => throw null; + protected virtual System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType, System.Data.IDataReader dataReader) => throw null; + public virtual System.Data.IDataParameter[] GetFillParameters() => throw null; + protected bool HasTableMappings() => throw null; + public System.Data.MissingMappingAction MissingMappingAction { get => throw null; set => throw null; } + public System.Data.MissingSchemaAction MissingSchemaAction { get => throw null; set => throw null; } + protected virtual void OnFillError(System.Data.FillErrorEventArgs value) => throw null; + public void ResetFillLoadOption() => throw null; + public virtual bool ReturnProviderSpecificTypes { get => throw null; set => throw null; } + public virtual bool ShouldSerializeAcceptChangesDuringFill() => throw null; + public virtual bool ShouldSerializeFillLoadOption() => throw null; + protected virtual bool ShouldSerializeTableMappings() => throw null; + public System.Data.Common.DataTableMappingCollection TableMappings { get => throw null; } + System.Data.ITableMappingCollection System.Data.IDataAdapter.TableMappings { get => throw null; } + public virtual int Update(System.Data.DataSet dataSet) => throw null; + } + + // Generated from `System.Data.Common.DataColumnMapping` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataColumnMapping : System.MarshalByRefObject, System.ICloneable, System.Data.IColumnMapping + { + object System.ICloneable.Clone() => throw null; + public DataColumnMapping(string sourceColumn, string dataSetColumn) => throw null; + public DataColumnMapping() => throw null; + public string DataSetColumn { get => throw null; set => throw null; } + public static System.Data.DataColumn GetDataColumnBySchemaAction(string sourceColumn, string dataSetColumn, System.Data.DataTable dataTable, System.Type dataType, System.Data.MissingSchemaAction schemaAction) => throw null; + public System.Data.DataColumn GetDataColumnBySchemaAction(System.Data.DataTable dataTable, System.Type dataType, System.Data.MissingSchemaAction schemaAction) => throw null; + public string SourceColumn { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.Common.DataColumnMappingCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataColumnMappingCollection : System.MarshalByRefObject, System.Data.IColumnMappingCollection, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(object value) => throw null; + public System.Data.Common.DataColumnMapping Add(string sourceColumn, string dataSetColumn) => throw null; + System.Data.IColumnMapping System.Data.IColumnMappingCollection.Add(string sourceColumnName, string dataSetColumnName) => throw null; + public void AddRange(System.Data.Common.DataColumnMapping[] values) => throw null; + public void AddRange(System.Array values) => throw null; + public void Clear() => throw null; + public bool Contains(string value) => throw null; + public bool Contains(object value) => throw null; + public void CopyTo(System.Data.Common.DataColumnMapping[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public DataColumnMappingCollection() => throw null; + public System.Data.Common.DataColumnMapping GetByDataSetColumn(string value) => throw null; + System.Data.IColumnMapping System.Data.IColumnMappingCollection.GetByDataSetColumn(string dataSetColumnName) => throw null; + public static System.Data.Common.DataColumnMapping GetColumnMappingBySchemaAction(System.Data.Common.DataColumnMappingCollection columnMappings, string sourceColumn, System.Data.MissingMappingAction mappingAction) => throw null; + public static System.Data.DataColumn GetDataColumn(System.Data.Common.DataColumnMappingCollection columnMappings, string sourceColumn, System.Type dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(string sourceColumn) => throw null; + public int IndexOf(object value) => throw null; + public int IndexOfDataSetColumn(string dataSetColumn) => throw null; + public void Insert(int index, object value) => throw null; + public void Insert(int index, System.Data.Common.DataColumnMapping value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Data.Common.DataColumnMapping this[string sourceColumn] { get => throw null; set => throw null; } + public System.Data.Common.DataColumnMapping this[int index] { get => throw null; set => throw null; } + object System.Data.IColumnMappingCollection.this[string index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public void Remove(object value) => throw null; + public void Remove(System.Data.Common.DataColumnMapping value) => throw null; + public void RemoveAt(string sourceColumn) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Data.Common.DataTableMapping` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableMapping : System.MarshalByRefObject, System.ICloneable, System.Data.ITableMapping + { + object System.ICloneable.Clone() => throw null; + public System.Data.Common.DataColumnMappingCollection ColumnMappings { get => throw null; } + System.Data.IColumnMappingCollection System.Data.ITableMapping.ColumnMappings { get => throw null; } + public string DataSetTable { get => throw null; set => throw null; } + public DataTableMapping(string sourceTable, string dataSetTable, System.Data.Common.DataColumnMapping[] columnMappings) => throw null; + public DataTableMapping(string sourceTable, string dataSetTable) => throw null; + public DataTableMapping() => throw null; + public System.Data.Common.DataColumnMapping GetColumnMappingBySchemaAction(string sourceColumn, System.Data.MissingMappingAction mappingAction) => throw null; + public System.Data.DataColumn GetDataColumn(string sourceColumn, System.Type dataType, System.Data.DataTable dataTable, System.Data.MissingMappingAction mappingAction, System.Data.MissingSchemaAction schemaAction) => throw null; + public System.Data.DataTable GetDataTableBySchemaAction(System.Data.DataSet dataSet, System.Data.MissingSchemaAction schemaAction) => throw null; + public string SourceTable { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.Common.DataTableMappingCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataTableMappingCollection : System.MarshalByRefObject, System.Data.ITableMappingCollection, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(object value) => throw null; + public System.Data.Common.DataTableMapping Add(string sourceTable, string dataSetTable) => throw null; + System.Data.ITableMapping System.Data.ITableMappingCollection.Add(string sourceTableName, string dataSetTableName) => throw null; + public void AddRange(System.Data.Common.DataTableMapping[] values) => throw null; + public void AddRange(System.Array values) => throw null; + public void Clear() => throw null; + public bool Contains(string value) => throw null; + public bool Contains(object value) => throw null; + public void CopyTo(System.Data.Common.DataTableMapping[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public DataTableMappingCollection() => throw null; + public System.Data.Common.DataTableMapping GetByDataSetTable(string dataSetTable) => throw null; + System.Data.ITableMapping System.Data.ITableMappingCollection.GetByDataSetTable(string dataSetTableName) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public static System.Data.Common.DataTableMapping GetTableMappingBySchemaAction(System.Data.Common.DataTableMappingCollection tableMappings, string sourceTable, string dataSetTable, System.Data.MissingMappingAction mappingAction) => throw null; + public int IndexOf(string sourceTable) => throw null; + public int IndexOf(object value) => throw null; + public int IndexOfDataSetTable(string dataSetTable) => throw null; + public void Insert(int index, object value) => throw null; + public void Insert(int index, System.Data.Common.DataTableMapping value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Data.Common.DataTableMapping this[string sourceTable] { get => throw null; set => throw null; } + public System.Data.Common.DataTableMapping this[int index] { get => throw null; set => throw null; } + object System.Data.ITableMappingCollection.this[string index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public void Remove(object value) => throw null; + public void Remove(System.Data.Common.DataTableMapping value) => throw null; + public void RemoveAt(string sourceTable) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Data.Common.DbColumn` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbColumn + { + public bool? AllowDBNull { get => throw null; set => throw null; } + public string BaseCatalogName { get => throw null; set => throw null; } + public string BaseColumnName { get => throw null; set => throw null; } + public string BaseSchemaName { get => throw null; set => throw null; } + public string BaseServerName { get => throw null; set => throw null; } + public string BaseTableName { get => throw null; set => throw null; } + public string ColumnName { get => throw null; set => throw null; } + public int? ColumnOrdinal { get => throw null; set => throw null; } + public int? ColumnSize { get => throw null; set => throw null; } + public System.Type DataType { get => throw null; set => throw null; } + public string DataTypeName { get => throw null; set => throw null; } + protected DbColumn() => throw null; + public bool? IsAliased { get => throw null; set => throw null; } + public bool? IsAutoIncrement { get => throw null; set => throw null; } + public bool? IsExpression { get => throw null; set => throw null; } + public bool? IsHidden { get => throw null; set => throw null; } + public bool? IsIdentity { get => throw null; set => throw null; } + public bool? IsKey { get => throw null; set => throw null; } + public bool? IsLong { get => throw null; set => throw null; } + public bool? IsReadOnly { get => throw null; set => throw null; } + public bool? IsUnique { get => throw null; set => throw null; } + public virtual object this[string property] { get => throw null; } + public int? NumericPrecision { get => throw null; set => throw null; } + public int? NumericScale { get => throw null; set => throw null; } + public string UdtAssemblyQualifiedName { get => throw null; set => throw null; } + } + + // Generated from `System.Data.Common.DbCommand` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbCommand : System.ComponentModel.Component, System.IDisposable, System.IAsyncDisposable, System.Data.IDbCommand + { + public abstract void Cancel(); + public abstract string CommandText { get; set; } + public abstract int CommandTimeout { get; set; } + public abstract System.Data.CommandType CommandType { get; set; } + public System.Data.Common.DbConnection Connection { get => throw null; set => throw null; } + System.Data.IDbConnection System.Data.IDbCommand.Connection { get => throw null; set => throw null; } + protected abstract System.Data.Common.DbParameter CreateDbParameter(); + public System.Data.Common.DbParameter CreateParameter() => throw null; + System.Data.IDbDataParameter System.Data.IDbCommand.CreateParameter() => throw null; + protected DbCommand() => throw null; + protected abstract System.Data.Common.DbConnection DbConnection { get; set; } + protected abstract System.Data.Common.DbParameterCollection DbParameterCollection { get; } + protected abstract System.Data.Common.DbTransaction DbTransaction { get; set; } + public abstract bool DesignTimeVisible { get; set; } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + protected abstract System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior); + protected virtual System.Threading.Tasks.Task ExecuteDbDataReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract int ExecuteNonQuery(); + public virtual System.Threading.Tasks.Task ExecuteNonQueryAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteNonQueryAsync() => throw null; + public System.Data.Common.DbDataReader ExecuteReader(System.Data.CommandBehavior behavior) => throw null; + public System.Data.Common.DbDataReader ExecuteReader() => throw null; + System.Data.IDataReader System.Data.IDbCommand.ExecuteReader(System.Data.CommandBehavior behavior) => throw null; + System.Data.IDataReader System.Data.IDbCommand.ExecuteReader() => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.CommandBehavior behavior) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync() => throw null; + public abstract object ExecuteScalar(); + public virtual System.Threading.Tasks.Task ExecuteScalarAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteScalarAsync() => throw null; + public System.Data.Common.DbParameterCollection Parameters { get => throw null; } + System.Data.IDataParameterCollection System.Data.IDbCommand.Parameters { get => throw null; } + public abstract void Prepare(); + public virtual System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Data.Common.DbTransaction Transaction { get => throw null; set => throw null; } + System.Data.IDbTransaction System.Data.IDbCommand.Transaction { get => throw null; set => throw null; } + public abstract System.Data.UpdateRowSource UpdatedRowSource { get; set; } + } + + // Generated from `System.Data.Common.DbCommandBuilder` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbCommandBuilder : System.ComponentModel.Component + { + protected abstract void ApplyParameterInfo(System.Data.Common.DbParameter parameter, System.Data.DataRow row, System.Data.StatementType statementType, bool whereClause); + public virtual System.Data.Common.CatalogLocation CatalogLocation { get => throw null; set => throw null; } + public virtual string CatalogSeparator { get => throw null; set => throw null; } + public virtual System.Data.ConflictOption ConflictOption { get => throw null; set => throw null; } + public System.Data.Common.DbDataAdapter DataAdapter { get => throw null; set => throw null; } + protected DbCommandBuilder() => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Data.Common.DbCommand GetDeleteCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.Common.DbCommand GetDeleteCommand() => throw null; + public System.Data.Common.DbCommand GetInsertCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.Common.DbCommand GetInsertCommand() => throw null; + protected abstract string GetParameterName(string parameterName); + protected abstract string GetParameterName(int parameterOrdinal); + protected abstract string GetParameterPlaceholder(int parameterOrdinal); + protected virtual System.Data.DataTable GetSchemaTable(System.Data.Common.DbCommand sourceCommand) => throw null; + public System.Data.Common.DbCommand GetUpdateCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.Common.DbCommand GetUpdateCommand() => throw null; + protected virtual System.Data.Common.DbCommand InitializeCommand(System.Data.Common.DbCommand command) => throw null; + public virtual string QuoteIdentifier(string unquotedIdentifier) => throw null; + public virtual string QuotePrefix { get => throw null; set => throw null; } + public virtual string QuoteSuffix { get => throw null; set => throw null; } + public virtual void RefreshSchema() => throw null; + protected void RowUpdatingHandler(System.Data.Common.RowUpdatingEventArgs rowUpdatingEvent) => throw null; + public virtual string SchemaSeparator { get => throw null; set => throw null; } + public bool SetAllValues { get => throw null; set => throw null; } + protected abstract void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter); + public virtual string UnquoteIdentifier(string quotedIdentifier) => throw null; + } + + // Generated from `System.Data.Common.DbConnection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbConnection : System.ComponentModel.Component, System.IDisposable, System.IAsyncDisposable, System.Data.IDbConnection + { + protected abstract System.Data.Common.DbTransaction BeginDbTransaction(System.Data.IsolationLevel isolationLevel); + protected virtual System.Threading.Tasks.ValueTask BeginDbTransactionAsync(System.Data.IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Data.Common.DbTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) => throw null; + public System.Data.Common.DbTransaction BeginTransaction() => throw null; + System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction(System.Data.IsolationLevel isolationLevel) => throw null; + System.Data.IDbTransaction System.Data.IDbConnection.BeginTransaction() => throw null; + public System.Threading.Tasks.ValueTask BeginTransactionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.ValueTask BeginTransactionAsync(System.Data.IsolationLevel isolationLevel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract void ChangeDatabase(string databaseName); + public virtual System.Threading.Tasks.Task ChangeDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract void Close(); + public virtual System.Threading.Tasks.Task CloseAsync() => throw null; + public abstract string ConnectionString { get; set; } + public virtual int ConnectionTimeout { get => throw null; } + public System.Data.Common.DbCommand CreateCommand() => throw null; + System.Data.IDbCommand System.Data.IDbConnection.CreateCommand() => throw null; + protected abstract System.Data.Common.DbCommand CreateDbCommand(); + public abstract string DataSource { get; } + public abstract string Database { get; } + protected DbConnection() => throw null; + protected virtual System.Data.Common.DbProviderFactory DbProviderFactory { get => throw null; } + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public virtual void EnlistTransaction(System.Transactions.Transaction transaction) => throw null; + public virtual System.Data.DataTable GetSchema(string collectionName, string[] restrictionValues) => throw null; + public virtual System.Data.DataTable GetSchema(string collectionName) => throw null; + public virtual System.Data.DataTable GetSchema() => throw null; + public virtual System.Threading.Tasks.Task GetSchemaAsync(string collectionName, string[] restrictionValues, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetSchemaAsync(string collectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task GetSchemaAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual void OnStateChange(System.Data.StateChangeEventArgs stateChange) => throw null; + public abstract void Open(); + public virtual System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task OpenAsync() => throw null; + public abstract string ServerVersion { get; } + public abstract System.Data.ConnectionState State { get; } + public virtual event System.Data.StateChangeEventHandler StateChange; + } + + // Generated from `System.Data.Common.DbConnectionStringBuilder` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DbConnectionStringBuilder : System.ComponentModel.ICustomTypeDescriptor, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + void System.Collections.IDictionary.Add(object keyword, object value) => throw null; + public void Add(string keyword, object value) => throw null; + public static void AppendKeyValuePair(System.Text.StringBuilder builder, string keyword, string value, bool useOdbcRules) => throw null; + public static void AppendKeyValuePair(System.Text.StringBuilder builder, string keyword, string value) => throw null; + public bool BrowsableConnectionString { get => throw null; set => throw null; } + public virtual void Clear() => throw null; + protected internal void ClearPropertyDescriptors() => throw null; + public string ConnectionString { get => throw null; set => throw null; } + bool System.Collections.IDictionary.Contains(object keyword) => throw null; + public virtual bool ContainsKey(string keyword) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public DbConnectionStringBuilder(bool useOdbcRules) => throw null; + public DbConnectionStringBuilder() => throw null; + public virtual bool EquivalentTo(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder) => throw null; + System.ComponentModel.AttributeCollection System.ComponentModel.ICustomTypeDescriptor.GetAttributes() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetClassName() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetComponentName() => throw null; + System.ComponentModel.TypeConverter System.ComponentModel.ICustomTypeDescriptor.GetConverter() => throw null; + System.ComponentModel.EventDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultEvent() => throw null; + System.ComponentModel.PropertyDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultProperty() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetEditor(System.Type editorBaseType) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents(System.Attribute[] attributes) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents() => throw null; + protected virtual void GetProperties(System.Collections.Hashtable propertyDescriptors) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties(System.Attribute[] attributes) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; + public virtual bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public virtual object this[string keyword] { get => throw null; set => throw null; } + object System.Collections.IDictionary.this[object keyword] { get => throw null; set => throw null; } + public virtual System.Collections.ICollection Keys { get => throw null; } + void System.Collections.IDictionary.Remove(object keyword) => throw null; + public virtual bool Remove(string keyword) => throw null; + public virtual bool ShouldSerialize(string keyword) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public override string ToString() => throw null; + public virtual bool TryGetValue(string keyword, out object value) => throw null; + public virtual System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Data.Common.DbDataAdapter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbDataAdapter : System.Data.Common.DataAdapter, System.ICloneable, System.Data.IDbDataAdapter, System.Data.IDataAdapter + { + protected virtual int AddToBatch(System.Data.IDbCommand command) => throw null; + protected virtual void ClearBatch() => throw null; + object System.ICloneable.Clone() => throw null; + protected virtual System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) => throw null; + protected virtual System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) => throw null; + protected DbDataAdapter(System.Data.Common.DbDataAdapter adapter) => throw null; + protected DbDataAdapter() => throw null; + public const string DefaultSourceTableName = default; + public System.Data.Common.DbCommand DeleteCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand { get => throw null; set => throw null; } + protected override void Dispose(bool disposing) => throw null; + protected virtual int ExecuteBatch() => throw null; + public override int Fill(System.Data.DataSet dataSet) => throw null; + public int Fill(int startRecord, int maxRecords, params System.Data.DataTable[] dataTables) => throw null; + public int Fill(System.Data.DataTable dataTable) => throw null; + public int Fill(System.Data.DataSet dataSet, string srcTable) => throw null; + public int Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable) => throw null; + protected virtual int Fill(System.Data.DataTable[] dataTables, int startRecord, int maxRecords, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) => throw null; + protected virtual int Fill(System.Data.DataTable dataTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) => throw null; + protected virtual int Fill(System.Data.DataSet dataSet, int startRecord, int maxRecords, string srcTable, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) => throw null; + protected internal System.Data.CommandBehavior FillCommandBehavior { get => throw null; set => throw null; } + public override System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType) => throw null; + public System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, string srcTable) => throw null; + public System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType) => throw null; + protected virtual System.Data.DataTable[] FillSchema(System.Data.DataSet dataSet, System.Data.SchemaType schemaType, System.Data.IDbCommand command, string srcTable, System.Data.CommandBehavior behavior) => throw null; + protected virtual System.Data.DataTable FillSchema(System.Data.DataTable dataTable, System.Data.SchemaType schemaType, System.Data.IDbCommand command, System.Data.CommandBehavior behavior) => throw null; + protected virtual System.Data.IDataParameter GetBatchedParameter(int commandIdentifier, int parameterIndex) => throw null; + protected virtual bool GetBatchedRecordsAffected(int commandIdentifier, out int recordsAffected, out System.Exception error) => throw null; + public override System.Data.IDataParameter[] GetFillParameters() => throw null; + protected virtual void InitializeBatching() => throw null; + public System.Data.Common.DbCommand InsertCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand { get => throw null; set => throw null; } + protected virtual void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) => throw null; + protected virtual void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) => throw null; + public System.Data.Common.DbCommand SelectCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand { get => throw null; set => throw null; } + protected virtual void TerminateBatching() => throw null; + public override int Update(System.Data.DataSet dataSet) => throw null; + public int Update(System.Data.DataTable dataTable) => throw null; + public int Update(System.Data.DataSet dataSet, string srcTable) => throw null; + public int Update(System.Data.DataRow[] dataRows) => throw null; + protected virtual int Update(System.Data.DataRow[] dataRows, System.Data.Common.DataTableMapping tableMapping) => throw null; + public virtual int UpdateBatchSize { get => throw null; set => throw null; } + public System.Data.Common.DbCommand UpdateCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand { get => throw null; set => throw null; } + } + + // Generated from `System.Data.Common.DbDataReader` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbDataReader : System.MarshalByRefObject, System.IDisposable, System.IAsyncDisposable, System.Data.IDataRecord, System.Data.IDataReader, System.Collections.IEnumerable + { + public virtual void Close() => throw null; + public virtual System.Threading.Tasks.Task CloseAsync() => throw null; + protected DbDataReader() => throw null; + public abstract int Depth { get; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public abstract int FieldCount { get; } + public abstract bool GetBoolean(int ordinal); + public abstract System.Byte GetByte(int ordinal); + public abstract System.Int64 GetBytes(int ordinal, System.Int64 dataOffset, System.Byte[] buffer, int bufferOffset, int length); + public abstract System.Char GetChar(int ordinal); + public abstract System.Int64 GetChars(int ordinal, System.Int64 dataOffset, System.Char[] buffer, int bufferOffset, int length); + public virtual System.Threading.Tasks.Task> GetColumnSchemaAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Data.Common.DbDataReader GetData(int ordinal) => throw null; + System.Data.IDataReader System.Data.IDataRecord.GetData(int ordinal) => throw null; + public abstract string GetDataTypeName(int ordinal); + public abstract System.DateTime GetDateTime(int ordinal); + protected virtual System.Data.Common.DbDataReader GetDbDataReader(int ordinal) => throw null; + public abstract System.Decimal GetDecimal(int ordinal); + public abstract double GetDouble(int ordinal); + public abstract System.Collections.IEnumerator GetEnumerator(); + public abstract System.Type GetFieldType(int ordinal); + public virtual T GetFieldValue(int ordinal) => throw null; + public virtual System.Threading.Tasks.Task GetFieldValueAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetFieldValueAsync(int ordinal) => throw null; + public abstract float GetFloat(int ordinal); + public abstract System.Guid GetGuid(int ordinal); + public abstract System.Int16 GetInt16(int ordinal); + public abstract int GetInt32(int ordinal); + public abstract System.Int64 GetInt64(int ordinal); + public abstract string GetName(int ordinal); + public abstract int GetOrdinal(string name); + public virtual System.Type GetProviderSpecificFieldType(int ordinal) => throw null; + public virtual object GetProviderSpecificValue(int ordinal) => throw null; + public virtual int GetProviderSpecificValues(object[] values) => throw null; + public virtual System.Data.DataTable GetSchemaTable() => throw null; + public virtual System.Threading.Tasks.Task GetSchemaTableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.IO.Stream GetStream(int ordinal) => throw null; + public abstract string GetString(int ordinal); + public virtual System.IO.TextReader GetTextReader(int ordinal) => throw null; + public abstract object GetValue(int ordinal); + public abstract int GetValues(object[] values); + public abstract bool HasRows { get; } + public abstract bool IsClosed { get; } + public abstract bool IsDBNull(int ordinal); + public virtual System.Threading.Tasks.Task IsDBNullAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task IsDBNullAsync(int ordinal) => throw null; + public abstract object this[string name] { get; } + public abstract object this[int ordinal] { get; } + public abstract bool NextResult(); + public virtual System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task NextResultAsync() => throw null; + public abstract bool Read(); + public virtual System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadAsync() => throw null; + public abstract int RecordsAffected { get; } + public virtual int VisibleFieldCount { get => throw null; } + } + + // Generated from `System.Data.Common.DbDataReaderExtensions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DbDataReaderExtensions + { + public static bool CanGetColumnSchema(this System.Data.Common.DbDataReader reader) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetColumnSchema(this System.Data.Common.DbDataReader reader) => throw null; + } + + // Generated from `System.Data.Common.DbDataRecord` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbDataRecord : System.Data.IDataRecord, System.ComponentModel.ICustomTypeDescriptor + { + protected DbDataRecord() => throw null; + public abstract int FieldCount { get; } + System.ComponentModel.AttributeCollection System.ComponentModel.ICustomTypeDescriptor.GetAttributes() => throw null; + public abstract bool GetBoolean(int i); + public abstract System.Byte GetByte(int i); + public abstract System.Int64 GetBytes(int i, System.Int64 dataIndex, System.Byte[] buffer, int bufferIndex, int length); + public abstract System.Char GetChar(int i); + public abstract System.Int64 GetChars(int i, System.Int64 dataIndex, System.Char[] buffer, int bufferIndex, int length); + string System.ComponentModel.ICustomTypeDescriptor.GetClassName() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetComponentName() => throw null; + System.ComponentModel.TypeConverter System.ComponentModel.ICustomTypeDescriptor.GetConverter() => throw null; + public System.Data.IDataReader GetData(int i) => throw null; + public abstract string GetDataTypeName(int i); + public abstract System.DateTime GetDateTime(int i); + protected virtual System.Data.Common.DbDataReader GetDbDataReader(int i) => throw null; + public abstract System.Decimal GetDecimal(int i); + System.ComponentModel.EventDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultEvent() => throw null; + System.ComponentModel.PropertyDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultProperty() => throw null; + public abstract double GetDouble(int i); + object System.ComponentModel.ICustomTypeDescriptor.GetEditor(System.Type editorBaseType) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents(System.Attribute[] attributes) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents() => throw null; + public abstract System.Type GetFieldType(int i); + public abstract float GetFloat(int i); + public abstract System.Guid GetGuid(int i); + public abstract System.Int16 GetInt16(int i); + public abstract int GetInt32(int i); + public abstract System.Int64 GetInt64(int i); + public abstract string GetName(int i); + public abstract int GetOrdinal(string name); + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties(System.Attribute[] attributes) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; + public abstract string GetString(int i); + public abstract object GetValue(int i); + public abstract int GetValues(object[] values); + public abstract bool IsDBNull(int i); + public abstract object this[string name] { get; } + public abstract object this[int i] { get; } + } + + // Generated from `System.Data.Common.DbDataSourceEnumerator` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbDataSourceEnumerator + { + protected DbDataSourceEnumerator() => throw null; + public abstract System.Data.DataTable GetDataSources(); + } + + // Generated from `System.Data.Common.DbEnumerator` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DbEnumerator : System.Collections.IEnumerator + { + public object Current { get => throw null; } + public DbEnumerator(System.Data.IDataReader reader, bool closeReader) => throw null; + public DbEnumerator(System.Data.IDataReader reader) => throw null; + public DbEnumerator(System.Data.Common.DbDataReader reader, bool closeReader) => throw null; + public DbEnumerator(System.Data.Common.DbDataReader reader) => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Data.Common.DbException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbException : System.Runtime.InteropServices.ExternalException + { + protected DbException(string message, int errorCode) => throw null; + protected DbException(string message, System.Exception innerException) => throw null; + protected DbException(string message) => throw null; + protected DbException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected DbException() => throw null; + public virtual bool IsTransient { get => throw null; } + public virtual string SqlState { get => throw null; } + } + + // Generated from `System.Data.Common.DbMetaDataCollectionNames` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DbMetaDataCollectionNames + { + public static string DataSourceInformation; + public static string DataTypes; + public static string MetaDataCollections; + public static string ReservedWords; + public static string Restrictions; + } + + // Generated from `System.Data.Common.DbMetaDataColumnNames` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DbMetaDataColumnNames + { + public static string CollectionName; + public static string ColumnSize; + public static string CompositeIdentifierSeparatorPattern; + public static string CreateFormat; + public static string CreateParameters; + public static string DataSourceProductName; + public static string DataSourceProductVersion; + public static string DataSourceProductVersionNormalized; + public static string DataType; + public static string GroupByBehavior; + public static string IdentifierCase; + public static string IdentifierPattern; + public static string IsAutoIncrementable; + public static string IsBestMatch; + public static string IsCaseSensitive; + public static string IsConcurrencyType; + public static string IsFixedLength; + public static string IsFixedPrecisionScale; + public static string IsLiteralSupported; + public static string IsLong; + public static string IsNullable; + public static string IsSearchable; + public static string IsSearchableWithLike; + public static string IsUnsigned; + public static string LiteralPrefix; + public static string LiteralSuffix; + public static string MaximumScale; + public static string MinimumScale; + public static string NumberOfIdentifierParts; + public static string NumberOfRestrictions; + public static string OrderByColumnsInSelect; + public static string ParameterMarkerFormat; + public static string ParameterMarkerPattern; + public static string ParameterNameMaxLength; + public static string ParameterNamePattern; + public static string ProviderDbType; + public static string QuotedIdentifierCase; + public static string QuotedIdentifierPattern; + public static string ReservedWord; + public static string StatementSeparatorPattern; + public static string StringLiteralPattern; + public static string SupportedJoinOperators; + public static string TypeName; + } + + // Generated from `System.Data.Common.DbParameter` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbParameter : System.MarshalByRefObject, System.Data.IDbDataParameter, System.Data.IDataParameter + { + protected DbParameter() => throw null; + public abstract System.Data.DbType DbType { get; set; } + public abstract System.Data.ParameterDirection Direction { get; set; } + public abstract bool IsNullable { get; set; } + public abstract string ParameterName { get; set; } + public virtual System.Byte Precision { get => throw null; set => throw null; } + System.Byte System.Data.IDbDataParameter.Precision { get => throw null; set => throw null; } + public abstract void ResetDbType(); + public virtual System.Byte Scale { get => throw null; set => throw null; } + System.Byte System.Data.IDbDataParameter.Scale { get => throw null; set => throw null; } + public abstract int Size { get; set; } + public abstract string SourceColumn { get; set; } + public abstract bool SourceColumnNullMapping { get; set; } + public virtual System.Data.DataRowVersion SourceVersion { get => throw null; set => throw null; } + public abstract object Value { get; set; } + } + + // Generated from `System.Data.Common.DbParameterCollection` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbParameterCollection : System.MarshalByRefObject, System.Data.IDataParameterCollection, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public abstract int Add(object value); + int System.Collections.IList.Add(object value) => throw null; + public abstract void AddRange(System.Array values); + public abstract void Clear(); + public abstract bool Contains(string value); + public abstract bool Contains(object value); + bool System.Collections.IList.Contains(object value) => throw null; + public abstract void CopyTo(System.Array array, int index); + public abstract int Count { get; } + protected DbParameterCollection() => throw null; + public abstract System.Collections.IEnumerator GetEnumerator(); + protected abstract System.Data.Common.DbParameter GetParameter(string parameterName); + protected abstract System.Data.Common.DbParameter GetParameter(int index); + public abstract int IndexOf(string parameterName); + public abstract int IndexOf(object value); + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public abstract void Insert(int index, object value); + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public virtual bool IsSynchronized { get => throw null; } + public System.Data.Common.DbParameter this[string parameterName] { get => throw null; set => throw null; } + public System.Data.Common.DbParameter this[int index] { get => throw null; set => throw null; } + object System.Data.IDataParameterCollection.this[string parameterName] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public abstract void Remove(object value); + public abstract void RemoveAt(string parameterName); + public abstract void RemoveAt(int index); + protected abstract void SetParameter(string parameterName, System.Data.Common.DbParameter value); + protected abstract void SetParameter(int index, System.Data.Common.DbParameter value); + public abstract object SyncRoot { get; } + } + + // Generated from `System.Data.Common.DbProviderFactories` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DbProviderFactories + { + public static System.Data.Common.DbProviderFactory GetFactory(string providerInvariantName) => throw null; + public static System.Data.Common.DbProviderFactory GetFactory(System.Data.DataRow providerRow) => throw null; + public static System.Data.Common.DbProviderFactory GetFactory(System.Data.Common.DbConnection connection) => throw null; + public static System.Data.DataTable GetFactoryClasses() => throw null; + public static System.Collections.Generic.IEnumerable GetProviderInvariantNames() => throw null; + public static void RegisterFactory(string providerInvariantName, string factoryTypeAssemblyQualifiedName) => throw null; + public static void RegisterFactory(string providerInvariantName, System.Type providerFactoryClass) => throw null; + public static void RegisterFactory(string providerInvariantName, System.Data.Common.DbProviderFactory factory) => throw null; + public static bool TryGetFactory(string providerInvariantName, out System.Data.Common.DbProviderFactory factory) => throw null; + public static bool UnregisterFactory(string providerInvariantName) => throw null; + } + + // Generated from `System.Data.Common.DbProviderFactory` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbProviderFactory + { + public virtual bool CanCreateCommandBuilder { get => throw null; } + public virtual bool CanCreateDataAdapter { get => throw null; } + public virtual bool CanCreateDataSourceEnumerator { get => throw null; } + public virtual System.Data.Common.DbCommand CreateCommand() => throw null; + public virtual System.Data.Common.DbCommandBuilder CreateCommandBuilder() => throw null; + public virtual System.Data.Common.DbConnection CreateConnection() => throw null; + public virtual System.Data.Common.DbConnectionStringBuilder CreateConnectionStringBuilder() => throw null; + public virtual System.Data.Common.DbDataAdapter CreateDataAdapter() => throw null; + public virtual System.Data.Common.DbDataSourceEnumerator CreateDataSourceEnumerator() => throw null; + public virtual System.Data.Common.DbParameter CreateParameter() => throw null; + protected DbProviderFactory() => throw null; + } + + // Generated from `System.Data.Common.DbProviderSpecificTypePropertyAttribute` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DbProviderSpecificTypePropertyAttribute : System.Attribute + { + public DbProviderSpecificTypePropertyAttribute(bool isProviderSpecificTypeProperty) => throw null; + public bool IsProviderSpecificTypeProperty { get => throw null; } + } + + // Generated from `System.Data.Common.DbTransaction` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DbTransaction : System.MarshalByRefObject, System.IDisposable, System.IAsyncDisposable, System.Data.IDbTransaction + { + public abstract void Commit(); + public virtual System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Data.Common.DbConnection Connection { get => throw null; } + System.Data.IDbConnection System.Data.IDbTransaction.Connection { get => throw null; } + protected abstract System.Data.Common.DbConnection DbConnection { get; } + protected DbTransaction() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public abstract System.Data.IsolationLevel IsolationLevel { get; } + public virtual void Release(string savepointName) => throw null; + public virtual System.Threading.Tasks.Task ReleaseAsync(string savepointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void Rollback(string savepointName) => throw null; + public abstract void Rollback(); + public virtual System.Threading.Tasks.Task RollbackAsync(string savepointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task RollbackAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void Save(string savepointName) => throw null; + public virtual System.Threading.Tasks.Task SaveAsync(string savepointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual bool SupportsSavepoints { get => throw null; } + } + + // Generated from `System.Data.Common.GroupByBehavior` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GroupByBehavior + { + ExactMatch, + // Stub generator skipped constructor + MustContainAll, + NotSupported, + Unknown, + Unrelated, + } + + // Generated from `System.Data.Common.IDbColumnSchemaGenerator` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDbColumnSchemaGenerator + { + System.Collections.ObjectModel.ReadOnlyCollection GetColumnSchema(); + } + + // Generated from `System.Data.Common.IdentifierCase` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum IdentifierCase + { + // Stub generator skipped constructor + Insensitive, + Sensitive, + Unknown, + } + + // Generated from `System.Data.Common.RowUpdatedEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RowUpdatedEventArgs : System.EventArgs + { + public System.Data.IDbCommand Command { get => throw null; } + public void CopyToRows(System.Data.DataRow[] array, int arrayIndex) => throw null; + public void CopyToRows(System.Data.DataRow[] array) => throw null; + public System.Exception Errors { get => throw null; set => throw null; } + public int RecordsAffected { get => throw null; } + public System.Data.DataRow Row { get => throw null; } + public int RowCount { get => throw null; } + public RowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) => throw null; + public System.Data.StatementType StatementType { get => throw null; } + public System.Data.UpdateStatus Status { get => throw null; set => throw null; } + public System.Data.Common.DataTableMapping TableMapping { get => throw null; } + } + + // Generated from `System.Data.Common.RowUpdatingEventArgs` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RowUpdatingEventArgs : System.EventArgs + { + protected virtual System.Data.IDbCommand BaseCommand { get => throw null; set => throw null; } + public System.Data.IDbCommand Command { get => throw null; set => throw null; } + public System.Exception Errors { get => throw null; set => throw null; } + public System.Data.DataRow Row { get => throw null; } + public RowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) => throw null; + public System.Data.StatementType StatementType { get => throw null; } + public System.Data.UpdateStatus Status { get => throw null; set => throw null; } + public System.Data.Common.DataTableMapping TableMapping { get => throw null; } + } + + // Generated from `System.Data.Common.SchemaTableColumn` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SchemaTableColumn + { + public static string AllowDBNull; + public static string BaseColumnName; + public static string BaseSchemaName; + public static string BaseTableName; + public static string ColumnName; + public static string ColumnOrdinal; + public static string ColumnSize; + public static string DataType; + public static string IsAliased; + public static string IsExpression; + public static string IsKey; + public static string IsLong; + public static string IsUnique; + public static string NonVersionedProviderType; + public static string NumericPrecision; + public static string NumericScale; + public static string ProviderType; + } + + // Generated from `System.Data.Common.SchemaTableOptionalColumn` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SchemaTableOptionalColumn + { + public static string AutoIncrementSeed; + public static string AutoIncrementStep; + public static string BaseCatalogName; + public static string BaseColumnNamespace; + public static string BaseServerName; + public static string BaseTableNamespace; + public static string ColumnMapping; + public static string DefaultValue; + public static string Expression; + public static string IsAutoIncrement; + public static string IsHidden; + public static string IsReadOnly; + public static string IsRowVersion; + public static string ProviderSpecificDataType; + } + + // Generated from `System.Data.Common.SupportedJoinOperators` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SupportedJoinOperators + { + FullOuter, + Inner, + LeftOuter, + None, + RightOuter, + // Stub generator skipped constructor + } + + } + namespace SqlTypes + { + // Generated from `System.Data.SqlTypes.INullable` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INullable + { + bool IsNull { get; } + } + + // Generated from `System.Data.SqlTypes.SqlAlreadyFilledException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlAlreadyFilledException : System.Data.SqlTypes.SqlTypeException + { + public SqlAlreadyFilledException(string message, System.Exception e) => throw null; + public SqlAlreadyFilledException(string message) => throw null; + public SqlAlreadyFilledException() => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlBinary` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlBinary : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBinary operator +(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBinary Add(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlBinary value) => throw null; + public static System.Data.SqlTypes.SqlBinary Concat(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public bool IsNull { get => throw null; } + public System.Byte this[int index] { get => throw null; } + public int Length { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) => throw null; + public static System.Data.SqlTypes.SqlBinary Null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlBinary(System.Byte[] value) => throw null; + // Stub generator skipped constructor + public System.Data.SqlTypes.SqlGuid ToSqlGuid() => throw null; + public override string ToString() => throw null; + public System.Byte[] Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlBoolean` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlBoolean : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator &(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean And(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public System.Byte ByteValue { get => throw null; } + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlBoolean value) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public override bool Equals(object value) => throw null; + public static System.Data.SqlTypes.SqlBoolean False; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEquals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public bool IsFalse { get => throw null; } + public bool IsNull { get => throw null; } + public bool IsTrue { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEquals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Null; + public static System.Data.SqlTypes.SqlBoolean One; + public static System.Data.SqlTypes.SqlBoolean OnesComplement(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static System.Data.SqlTypes.SqlBoolean Or(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlBoolean(int value) => throw null; + public SqlBoolean(bool value) => throw null; + // Stub generator skipped constructor + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public static System.Data.SqlTypes.SqlBoolean True; + public bool Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlBoolean Xor(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Zero; + public static System.Data.SqlTypes.SqlBoolean operator ^(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + public static bool operator false(System.Data.SqlTypes.SqlBoolean x) => throw null; + // Stub generator skipped operator: implicit conversion + public static bool operator true(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator |(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ~(System.Data.SqlTypes.SqlBoolean x) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlByte` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlByte : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator %(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator &(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator *(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator +(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator -(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator /(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte Add(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte BitwiseAnd(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte BitwiseOr(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlByte value) => throw null; + public static System.Data.SqlTypes.SqlByte Divide(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte MaxValue; + public static System.Data.SqlTypes.SqlByte MinValue; + public static System.Data.SqlTypes.SqlByte Mod(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte Modulus(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte Multiply(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte Null; + public static System.Data.SqlTypes.SqlByte OnesComplement(System.Data.SqlTypes.SqlByte x) => throw null; + public static System.Data.SqlTypes.SqlByte Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlByte(System.Byte value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlByte Subtract(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.Byte Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlByte Xor(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte Zero; + public static System.Data.SqlTypes.SqlByte operator ^(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + public static System.Data.SqlTypes.SqlByte operator |(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; + public static System.Data.SqlTypes.SqlByte operator ~(System.Data.SqlTypes.SqlByte x) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlBytes` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlBytes : System.Xml.Serialization.IXmlSerializable, System.Runtime.Serialization.ISerializable, System.Data.SqlTypes.INullable + { + public System.Byte[] Buffer { get => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public bool IsNull { get => throw null; } + public System.Byte this[System.Int64 offset] { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; } + public System.Int64 MaxLength { get => throw null; } + public static System.Data.SqlTypes.SqlBytes Null { get => throw null; } + public System.Int64 Read(System.Int64 offset, System.Byte[] buffer, int offsetInBuffer, int count) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader r) => throw null; + public void SetLength(System.Int64 value) => throw null; + public void SetNull() => throw null; + public SqlBytes(System.IO.Stream s) => throw null; + public SqlBytes(System.Data.SqlTypes.SqlBinary value) => throw null; + public SqlBytes(System.Byte[] buffer) => throw null; + public SqlBytes() => throw null; + public System.Data.SqlTypes.StorageState Storage { get => throw null; } + public System.IO.Stream Stream { get => throw null; set => throw null; } + public System.Data.SqlTypes.SqlBinary ToSqlBinary() => throw null; + public System.Byte[] Value { get => throw null; } + public void Write(System.Int64 offset, System.Byte[] buffer, int offsetInBuffer, int count) => throw null; + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlChars` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlChars : System.Xml.Serialization.IXmlSerializable, System.Runtime.Serialization.ISerializable, System.Data.SqlTypes.INullable + { + public System.Char[] Buffer { get => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public bool IsNull { get => throw null; } + public System.Char this[System.Int64 offset] { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; } + public System.Int64 MaxLength { get => throw null; } + public static System.Data.SqlTypes.SqlChars Null { get => throw null; } + public System.Int64 Read(System.Int64 offset, System.Char[] buffer, int offsetInBuffer, int count) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader r) => throw null; + public void SetLength(System.Int64 value) => throw null; + public void SetNull() => throw null; + public SqlChars(System.Data.SqlTypes.SqlString value) => throw null; + public SqlChars(System.Char[] buffer) => throw null; + public SqlChars() => throw null; + public System.Data.SqlTypes.StorageState Storage { get => throw null; } + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public System.Char[] Value { get => throw null; } + public void Write(System.Int64 offset, System.Char[] buffer, int offsetInBuffer, int count) => throw null; + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlCompareOptions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SqlCompareOptions + { + BinarySort, + BinarySort2, + IgnoreCase, + IgnoreKanaType, + IgnoreNonSpace, + IgnoreWidth, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Data.SqlTypes.SqlDateTime` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlDateTime : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlDateTime operator +(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) => throw null; + public static System.Data.SqlTypes.SqlDateTime operator -(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlDateTime Add(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlDateTime value) => throw null; + public int DayTicks { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlDateTime MaxValue; + public static System.Data.SqlTypes.SqlDateTime MinValue; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) => throw null; + public static System.Data.SqlTypes.SqlDateTime Null; + public static System.Data.SqlTypes.SqlDateTime Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public static int SQLTicksPerHour; + public static int SQLTicksPerMinute; + public static int SQLTicksPerSecond; + public SqlDateTime(int year, int month, int day, int hour, int minute, int second, int bilisecond) => throw null; + public SqlDateTime(int year, int month, int day, int hour, int minute, int second, double millisecond) => throw null; + public SqlDateTime(int year, int month, int day, int hour, int minute, int second) => throw null; + public SqlDateTime(int year, int month, int day) => throw null; + public SqlDateTime(int dayTicks, int timeTicks) => throw null; + public SqlDateTime(System.DateTime value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlDateTime Subtract(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) => throw null; + public int TimeTicks { get => throw null; } + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.DateTime Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlDecimal` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlDecimal : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal operator *(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal operator +(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal operator -(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal operator -(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static System.Data.SqlTypes.SqlDecimal operator /(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal Abs(System.Data.SqlTypes.SqlDecimal n) => throw null; + public static System.Data.SqlTypes.SqlDecimal Add(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal AdjustScale(System.Data.SqlTypes.SqlDecimal n, int digits, bool fRound) => throw null; + public System.Byte[] BinData { get => throw null; } + public static System.Data.SqlTypes.SqlDecimal Ceiling(System.Data.SqlTypes.SqlDecimal n) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlDecimal value) => throw null; + public static System.Data.SqlTypes.SqlDecimal ConvertToPrecScale(System.Data.SqlTypes.SqlDecimal n, int precision, int scale) => throw null; + public int[] Data { get => throw null; } + public static System.Data.SqlTypes.SqlDecimal Divide(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public override bool Equals(object value) => throw null; + public static System.Data.SqlTypes.SqlDecimal Floor(System.Data.SqlTypes.SqlDecimal n) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public bool IsNull { get => throw null; } + public bool IsPositive { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Byte MaxPrecision; + public static System.Byte MaxScale; + public static System.Data.SqlTypes.SqlDecimal MaxValue; + public static System.Data.SqlTypes.SqlDecimal MinValue; + public static System.Data.SqlTypes.SqlDecimal Multiply(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public static System.Data.SqlTypes.SqlDecimal Null; + public static System.Data.SqlTypes.SqlDecimal Parse(string s) => throw null; + public static System.Data.SqlTypes.SqlDecimal Power(System.Data.SqlTypes.SqlDecimal n, double exp) => throw null; + public System.Byte Precision { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public static System.Data.SqlTypes.SqlDecimal Round(System.Data.SqlTypes.SqlDecimal n, int position) => throw null; + public System.Byte Scale { get => throw null; } + public static System.Data.SqlTypes.SqlInt32 Sign(System.Data.SqlTypes.SqlDecimal n) => throw null; + public SqlDecimal(int value) => throw null; + public SqlDecimal(double dVal) => throw null; + public SqlDecimal(System.Int64 value) => throw null; + public SqlDecimal(System.Decimal value) => throw null; + public SqlDecimal(System.Byte bPrecision, System.Byte bScale, bool fPositive, int[] bits) => throw null; + public SqlDecimal(System.Byte bPrecision, System.Byte bScale, bool fPositive, int data1, int data2, int data3, int data4) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlDecimal Subtract(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) => throw null; + public double ToDouble() => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public static System.Data.SqlTypes.SqlDecimal Truncate(System.Data.SqlTypes.SqlDecimal n, int position) => throw null; + public System.Decimal Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlDouble` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlDouble : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble operator *(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble operator +(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble operator -(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble operator -(System.Data.SqlTypes.SqlDouble x) => throw null; + public static System.Data.SqlTypes.SqlDouble operator /(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble Add(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlDouble value) => throw null; + public static System.Data.SqlTypes.SqlDouble Divide(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble MaxValue; + public static System.Data.SqlTypes.SqlDouble MinValue; + public static System.Data.SqlTypes.SqlDouble Multiply(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public static System.Data.SqlTypes.SqlDouble Null; + public static System.Data.SqlTypes.SqlDouble Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlDouble(double value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlDouble Subtract(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public double Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlDouble Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlGuid` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlGuid : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlGuid value) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) => throw null; + public static System.Data.SqlTypes.SqlGuid Null; + public static System.Data.SqlTypes.SqlGuid Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlGuid(string s) => throw null; + public SqlGuid(int a, System.Int16 b, System.Int16 c, System.Byte d, System.Byte e, System.Byte f, System.Byte g, System.Byte h, System.Byte i, System.Byte j, System.Byte k) => throw null; + public SqlGuid(System.Guid g) => throw null; + public SqlGuid(System.Byte[] value) => throw null; + // Stub generator skipped constructor + public System.Byte[] ToByteArray() => throw null; + public System.Data.SqlTypes.SqlBinary ToSqlBinary() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.Guid Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlInt16` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlInt16 : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator %(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator &(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator *(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator +(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator -(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator -(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator /(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 Add(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 BitwiseAnd(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 BitwiseOr(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlInt16 value) => throw null; + public static System.Data.SqlTypes.SqlInt16 Divide(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 MaxValue; + public static System.Data.SqlTypes.SqlInt16 MinValue; + public static System.Data.SqlTypes.SqlInt16 Mod(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 Modulus(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 Multiply(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 Null; + public static System.Data.SqlTypes.SqlInt16 OnesComplement(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static System.Data.SqlTypes.SqlInt16 Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlInt16(System.Int16 value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlInt16 Subtract(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.Int16 Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlInt16 Xor(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 Zero; + public static System.Data.SqlTypes.SqlInt16 operator ^(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + public static System.Data.SqlTypes.SqlInt16 operator |(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; + public static System.Data.SqlTypes.SqlInt16 operator ~(System.Data.SqlTypes.SqlInt16 x) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlInt32` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlInt32 : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator %(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator &(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator *(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator +(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator -(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator -(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator /(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 Add(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 BitwiseAnd(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 BitwiseOr(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlInt32 value) => throw null; + public static System.Data.SqlTypes.SqlInt32 Divide(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 MaxValue; + public static System.Data.SqlTypes.SqlInt32 MinValue; + public static System.Data.SqlTypes.SqlInt32 Mod(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 Modulus(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 Multiply(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 Null; + public static System.Data.SqlTypes.SqlInt32 OnesComplement(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static System.Data.SqlTypes.SqlInt32 Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlInt32(int value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlInt32 Subtract(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public int Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlInt32 Xor(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 Zero; + public static System.Data.SqlTypes.SqlInt32 operator ^(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + public static System.Data.SqlTypes.SqlInt32 operator |(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; + public static System.Data.SqlTypes.SqlInt32 operator ~(System.Data.SqlTypes.SqlInt32 x) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlInt64` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlInt64 : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator %(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator &(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator *(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator +(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator -(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator -(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator /(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 Add(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 BitwiseAnd(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 BitwiseOr(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlInt64 value) => throw null; + public static System.Data.SqlTypes.SqlInt64 Divide(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 MaxValue; + public static System.Data.SqlTypes.SqlInt64 MinValue; + public static System.Data.SqlTypes.SqlInt64 Mod(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 Modulus(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 Multiply(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 Null; + public static System.Data.SqlTypes.SqlInt64 OnesComplement(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static System.Data.SqlTypes.SqlInt64 Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlInt64(System.Int64 value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlInt64 Subtract(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.Int64 Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlInt64 Xor(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 Zero; + public static System.Data.SqlTypes.SqlInt64 operator ^(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + public static System.Data.SqlTypes.SqlInt64 operator |(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; + public static System.Data.SqlTypes.SqlInt64 operator ~(System.Data.SqlTypes.SqlInt64 x) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlMoney` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlMoney : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney operator *(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney operator +(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney operator -(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney operator -(System.Data.SqlTypes.SqlMoney x) => throw null; + public static System.Data.SqlTypes.SqlMoney operator /(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney Add(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlMoney value) => throw null; + public static System.Data.SqlTypes.SqlMoney Divide(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney MaxValue; + public static System.Data.SqlTypes.SqlMoney MinValue; + public static System.Data.SqlTypes.SqlMoney Multiply(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public static System.Data.SqlTypes.SqlMoney Null; + public static System.Data.SqlTypes.SqlMoney Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlMoney(int value) => throw null; + public SqlMoney(double value) => throw null; + public SqlMoney(System.Int64 value) => throw null; + public SqlMoney(System.Decimal value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlMoney Subtract(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) => throw null; + public System.Decimal ToDecimal() => throw null; + public double ToDouble() => throw null; + public int ToInt32() => throw null; + public System.Int64 ToInt64() => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public System.Decimal Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlMoney Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlNotFilledException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlNotFilledException : System.Data.SqlTypes.SqlTypeException + { + public SqlNotFilledException(string message, System.Exception e) => throw null; + public SqlNotFilledException(string message) => throw null; + public SqlNotFilledException() => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlNullValueException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlNullValueException : System.Data.SqlTypes.SqlTypeException + { + public SqlNullValueException(string message, System.Exception e) => throw null; + public SqlNullValueException(string message) => throw null; + public SqlNullValueException() => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlSingle` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlSingle : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle operator *(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle operator +(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle operator -(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle operator -(System.Data.SqlTypes.SqlSingle x) => throw null; + public static System.Data.SqlTypes.SqlSingle operator /(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle Add(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlSingle value) => throw null; + public static System.Data.SqlTypes.SqlSingle Divide(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle MaxValue; + public static System.Data.SqlTypes.SqlSingle MinValue; + public static System.Data.SqlTypes.SqlSingle Multiply(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public static System.Data.SqlTypes.SqlSingle Null; + public static System.Data.SqlTypes.SqlSingle Parse(string s) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public SqlSingle(float value) => throw null; + public SqlSingle(double value) => throw null; + // Stub generator skipped constructor + public static System.Data.SqlTypes.SqlSingle Subtract(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) => throw null; + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + public float Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public static System.Data.SqlTypes.SqlSingle Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlString` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SqlString : System.Xml.Serialization.IXmlSerializable, System.IComparable, System.Data.SqlTypes.INullable + { + public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlString operator +(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator ==(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean operator >=(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlString Add(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static int BinarySort; + public static int BinarySort2; + public System.Data.SqlTypes.SqlString Clone() => throw null; + public System.Globalization.CompareInfo CompareInfo { get => throw null; } + public static System.Globalization.CompareOptions CompareOptionsFromSqlCompareOptions(System.Data.SqlTypes.SqlCompareOptions compareOptions) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Data.SqlTypes.SqlString value) => throw null; + public static System.Data.SqlTypes.SqlString Concat(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public System.Globalization.CultureInfo CultureInfo { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public System.Byte[] GetNonUnicodeBytes() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public System.Byte[] GetUnicodeBytes() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static int IgnoreCase; + public static int IgnoreKanaType; + public static int IgnoreNonSpace; + public static int IgnoreWidth; + public bool IsNull { get => throw null; } + public int LCID { get => throw null; } + public static System.Data.SqlTypes.SqlBoolean LessThan(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean LessThanOrEqual(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlBoolean NotEquals(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) => throw null; + public static System.Data.SqlTypes.SqlString Null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public System.Data.SqlTypes.SqlCompareOptions SqlCompareOptions { get => throw null; } + public SqlString(string data, int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions) => throw null; + public SqlString(string data, int lcid) => throw null; + public SqlString(string data) => throw null; + public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Byte[] data, int index, int count, bool fUnicode) => throw null; + public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Byte[] data, int index, int count) => throw null; + public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Byte[] data, bool fUnicode) => throw null; + public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Byte[] data) => throw null; + // Stub generator skipped constructor + public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() => throw null; + public System.Data.SqlTypes.SqlByte ToSqlByte() => throw null; + public System.Data.SqlTypes.SqlDateTime ToSqlDateTime() => throw null; + public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() => throw null; + public System.Data.SqlTypes.SqlDouble ToSqlDouble() => throw null; + public System.Data.SqlTypes.SqlGuid ToSqlGuid() => throw null; + public System.Data.SqlTypes.SqlInt16 ToSqlInt16() => throw null; + public System.Data.SqlTypes.SqlInt32 ToSqlInt32() => throw null; + public System.Data.SqlTypes.SqlInt64 ToSqlInt64() => throw null; + public System.Data.SqlTypes.SqlMoney ToSqlMoney() => throw null; + public System.Data.SqlTypes.SqlSingle ToSqlSingle() => throw null; + public override string ToString() => throw null; + public string Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Data.SqlTypes.SqlTruncateException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlTruncateException : System.Data.SqlTypes.SqlTypeException + { + public SqlTruncateException(string message, System.Exception e) => throw null; + public SqlTruncateException(string message) => throw null; + public SqlTruncateException() => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlTypeException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlTypeException : System.SystemException + { + public SqlTypeException(string message, System.Exception e) => throw null; + public SqlTypeException(string message) => throw null; + public SqlTypeException() => throw null; + protected SqlTypeException(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext sc) => throw null; + } + + // Generated from `System.Data.SqlTypes.SqlXml` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlXml : System.Xml.Serialization.IXmlSerializable, System.Data.SqlTypes.INullable + { + public System.Xml.XmlReader CreateReader() => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) => throw null; + public bool IsNull { get => throw null; } + public static System.Data.SqlTypes.SqlXml Null { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader r) => throw null; + public SqlXml(System.Xml.XmlReader value) => throw null; + public SqlXml(System.IO.Stream value) => throw null; + public SqlXml() => throw null; + public string Value { get => throw null; } + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + } + + // Generated from `System.Data.SqlTypes.StorageState` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StorageState + { + Buffer, + // Stub generator skipped constructor + Stream, + UnmanagedBuffer, + } + + } + } + namespace Xml + { + // Generated from `System.Xml.XmlDataDocument` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDataDocument : System.Xml.XmlDocument + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override System.Xml.XmlElement CreateElement(string prefix, string localName, string namespaceURI) => throw null; + public override System.Xml.XmlEntityReference CreateEntityReference(string name) => throw null; + protected internal override System.Xml.XPath.XPathNavigator CreateNavigator(System.Xml.XmlNode node) => throw null; + public System.Data.DataSet DataSet { get => throw null; } + public override System.Xml.XmlElement GetElementById(string elemId) => throw null; + public System.Xml.XmlElement GetElementFromRow(System.Data.DataRow r) => throw null; + public override System.Xml.XmlNodeList GetElementsByTagName(string name) => throw null; + public System.Data.DataRow GetRowFromElement(System.Xml.XmlElement e) => throw null; + public override void Load(string filename) => throw null; + public override void Load(System.Xml.XmlReader reader) => throw null; + public override void Load(System.IO.TextReader txtReader) => throw null; + public override void Load(System.IO.Stream inStream) => throw null; + public XmlDataDocument(System.Data.DataSet dataset) => throw null; + public XmlDataDocument() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs new file mode 100644 index 000000000000..85e35f970f45 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs @@ -0,0 +1,153 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace Contracts + { + // Generated from `System.Diagnostics.Contracts.Contract` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Contract + { + public static void Assert(bool condition, string userMessage) => throw null; + public static void Assert(bool condition) => throw null; + public static void Assume(bool condition, string userMessage) => throw null; + public static void Assume(bool condition) => throw null; + public static event System.EventHandler ContractFailed; + public static void EndContractBlock() => throw null; + public static void Ensures(bool condition, string userMessage) => throw null; + public static void Ensures(bool condition) => throw null; + public static void EnsuresOnThrow(bool condition, string userMessage) where TException : System.Exception => throw null; + public static void EnsuresOnThrow(bool condition) where TException : System.Exception => throw null; + public static bool Exists(System.Collections.Generic.IEnumerable collection, System.Predicate predicate) => throw null; + public static bool Exists(int fromInclusive, int toExclusive, System.Predicate predicate) => throw null; + public static bool ForAll(System.Collections.Generic.IEnumerable collection, System.Predicate predicate) => throw null; + public static bool ForAll(int fromInclusive, int toExclusive, System.Predicate predicate) => throw null; + public static void Invariant(bool condition, string userMessage) => throw null; + public static void Invariant(bool condition) => throw null; + public static T OldValue(T value) => throw null; + public static void Requires(bool condition, string userMessage) where TException : System.Exception => throw null; + public static void Requires(bool condition) where TException : System.Exception => throw null; + public static void Requires(bool condition, string userMessage) => throw null; + public static void Requires(bool condition) => throw null; + public static T Result() => throw null; + public static T ValueAtReturn(out T value) => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractAbbreviatorAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractAbbreviatorAttribute : System.Attribute + { + public ContractAbbreviatorAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractArgumentValidatorAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractArgumentValidatorAttribute : System.Attribute + { + public ContractArgumentValidatorAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractClassAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractClassAttribute : System.Attribute + { + public ContractClassAttribute(System.Type typeContainingContracts) => throw null; + public System.Type TypeContainingContracts { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.ContractClassForAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractClassForAttribute : System.Attribute + { + public ContractClassForAttribute(System.Type typeContractsAreFor) => throw null; + public System.Type TypeContractsAreFor { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.ContractFailedEventArgs` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractFailedEventArgs : System.EventArgs + { + public string Condition { get => throw null; } + public ContractFailedEventArgs(System.Diagnostics.Contracts.ContractFailureKind failureKind, string message, string condition, System.Exception originalException) => throw null; + public System.Diagnostics.Contracts.ContractFailureKind FailureKind { get => throw null; } + public bool Handled { get => throw null; } + public string Message { get => throw null; } + public System.Exception OriginalException { get => throw null; } + public void SetHandled() => throw null; + public void SetUnwind() => throw null; + public bool Unwind { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.ContractFailureKind` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ContractFailureKind + { + Assert, + Assume, + // Stub generator skipped constructor + Invariant, + Postcondition, + PostconditionOnException, + Precondition, + } + + // Generated from `System.Diagnostics.Contracts.ContractInvariantMethodAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractInvariantMethodAttribute : System.Attribute + { + public ContractInvariantMethodAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractOptionAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractOptionAttribute : System.Attribute + { + public string Category { get => throw null; } + public ContractOptionAttribute(string category, string setting, string value) => throw null; + public ContractOptionAttribute(string category, string setting, bool enabled) => throw null; + public bool Enabled { get => throw null; } + public string Setting { get => throw null; } + public string Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractPublicPropertyNameAttribute : System.Attribute + { + public ContractPublicPropertyNameAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.ContractReferenceAssemblyAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractReferenceAssemblyAttribute : System.Attribute + { + public ContractReferenceAssemblyAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractRuntimeIgnoredAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractRuntimeIgnoredAttribute : System.Attribute + { + public ContractRuntimeIgnoredAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Contracts.ContractVerificationAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractVerificationAttribute : System.Attribute + { + public ContractVerificationAttribute(bool value) => throw null; + public bool Value { get => throw null; } + } + + // Generated from `System.Diagnostics.Contracts.PureAttribute` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PureAttribute : System.Attribute + { + public PureAttribute() => throw null; + } + + } + } + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.ContractHelper` in `System.Diagnostics.Contracts, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ContractHelper + { + public static string RaiseContractFailedEvent(System.Diagnostics.Contracts.ContractFailureKind failureKind, string userMessage, string conditionText, System.Exception innerException) => throw null; + public static void TriggerFailure(System.Diagnostics.Contracts.ContractFailureKind kind, string displayMessage, string userMessage, string conditionText, System.Exception innerException) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs new file mode 100644 index 000000000000..508c3a234867 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs @@ -0,0 +1,322 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.Activity` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Activity : System.IDisposable + { + public Activity(string operationName) => throw null; + public System.Diagnostics.ActivityTraceFlags ActivityTraceFlags { get => throw null; set => throw null; } + public System.Diagnostics.Activity AddBaggage(string key, string value) => throw null; + public System.Diagnostics.Activity AddEvent(System.Diagnostics.ActivityEvent e) => throw null; + public System.Diagnostics.Activity AddTag(string key, string value) => throw null; + public System.Diagnostics.Activity AddTag(string key, object value) => throw null; + public System.Collections.Generic.IEnumerable> Baggage { get => throw null; } + public System.Diagnostics.ActivityContext Context { get => throw null; } + public static System.Diagnostics.Activity Current { get => throw null; set => throw null; } + public static System.Diagnostics.ActivityIdFormat DefaultIdFormat { get => throw null; set => throw null; } + public string DisplayName { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.TimeSpan Duration { get => throw null; } + public System.Collections.Generic.IEnumerable Events { get => throw null; } + public static bool ForceDefaultIdFormat { get => throw null; set => throw null; } + public string GetBaggageItem(string key) => throw null; + public object GetCustomProperty(string propertyName) => throw null; + public string Id { get => throw null; } + public System.Diagnostics.ActivityIdFormat IdFormat { get => throw null; } + public bool IsAllDataRequested { get => throw null; set => throw null; } + public System.Diagnostics.ActivityKind Kind { get => throw null; } + public System.Collections.Generic.IEnumerable Links { get => throw null; } + public string OperationName { get => throw null; } + public System.Diagnostics.Activity Parent { get => throw null; } + public string ParentId { get => throw null; } + public System.Diagnostics.ActivitySpanId ParentSpanId { get => throw null; } + public bool Recorded { get => throw null; } + public string RootId { get => throw null; } + public void SetCustomProperty(string propertyName, object propertyValue) => throw null; + public System.Diagnostics.Activity SetEndTime(System.DateTime endTimeUtc) => throw null; + public System.Diagnostics.Activity SetIdFormat(System.Diagnostics.ActivityIdFormat format) => throw null; + public System.Diagnostics.Activity SetParentId(string parentId) => throw null; + public System.Diagnostics.Activity SetParentId(System.Diagnostics.ActivityTraceId traceId, System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags activityTraceFlags = default(System.Diagnostics.ActivityTraceFlags)) => throw null; + public System.Diagnostics.Activity SetStartTime(System.DateTime startTimeUtc) => throw null; + public System.Diagnostics.Activity SetTag(string key, object value) => throw null; + public System.Diagnostics.ActivitySource Source { get => throw null; } + public System.Diagnostics.ActivitySpanId SpanId { get => throw null; } + public System.Diagnostics.Activity Start() => throw null; + public System.DateTime StartTimeUtc { get => throw null; } + public void Stop() => throw null; + public System.Collections.Generic.IEnumerable> TagObjects { get => throw null; } + public System.Collections.Generic.IEnumerable> Tags { get => throw null; } + public System.Diagnostics.ActivityTraceId TraceId { get => throw null; } + public string TraceStateString { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.ActivityContext` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivityContext : System.IEquatable + { + public static bool operator !=(System.Diagnostics.ActivityContext left, System.Diagnostics.ActivityContext right) => throw null; + public static bool operator ==(System.Diagnostics.ActivityContext left, System.Diagnostics.ActivityContext right) => throw null; + public ActivityContext(System.Diagnostics.ActivityTraceId traceId, System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceFlags, string traceState = default(string), bool isRemote = default(bool)) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Diagnostics.ActivityContext value) => throw null; + public override int GetHashCode() => throw null; + public bool IsRemote { get => throw null; } + public static System.Diagnostics.ActivityContext Parse(string traceParent, string traceState) => throw null; + public System.Diagnostics.ActivitySpanId SpanId { get => throw null; } + public System.Diagnostics.ActivityTraceFlags TraceFlags { get => throw null; } + public System.Diagnostics.ActivityTraceId TraceId { get => throw null; } + public string TraceState { get => throw null; } + public static bool TryParse(string traceParent, string traceState, out System.Diagnostics.ActivityContext context) => throw null; + } + + // Generated from `System.Diagnostics.ActivityCreationOptions<>` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivityCreationOptions + { + // Stub generator skipped constructor + public System.Diagnostics.ActivityKind Kind { get => throw null; } + public System.Collections.Generic.IEnumerable Links { get => throw null; } + public string Name { get => throw null; } + public T Parent { get => throw null; } + public System.Diagnostics.ActivityTagsCollection SamplingTags { get => throw null; } + public System.Diagnostics.ActivitySource Source { get => throw null; } + public System.Collections.Generic.IEnumerable> Tags { get => throw null; } + public System.Diagnostics.ActivityTraceId TraceId { get => throw null; } + } + + // Generated from `System.Diagnostics.ActivityEvent` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivityEvent + { + public ActivityEvent(string name, System.DateTimeOffset timestamp = default(System.DateTimeOffset), System.Diagnostics.ActivityTagsCollection tags = default(System.Diagnostics.ActivityTagsCollection)) => throw null; + public ActivityEvent(string name) => throw null; + // Stub generator skipped constructor + public string Name { get => throw null; } + public System.Collections.Generic.IEnumerable> Tags { get => throw null; } + public System.DateTimeOffset Timestamp { get => throw null; } + } + + // Generated from `System.Diagnostics.ActivityIdFormat` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ActivityIdFormat + { + // Stub generator skipped constructor + Hierarchical, + Unknown, + W3C, + } + + // Generated from `System.Diagnostics.ActivityKind` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ActivityKind + { + // Stub generator skipped constructor + Client, + Consumer, + Internal, + Producer, + Server, + } + + // Generated from `System.Diagnostics.ActivityLink` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivityLink : System.IEquatable + { + public static bool operator !=(System.Diagnostics.ActivityLink left, System.Diagnostics.ActivityLink right) => throw null; + public static bool operator ==(System.Diagnostics.ActivityLink left, System.Diagnostics.ActivityLink right) => throw null; + public ActivityLink(System.Diagnostics.ActivityContext context, System.Diagnostics.ActivityTagsCollection tags = default(System.Diagnostics.ActivityTagsCollection)) => throw null; + // Stub generator skipped constructor + public System.Diagnostics.ActivityContext Context { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Diagnostics.ActivityLink value) => throw null; + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable> Tags { get => throw null; } + } + + // Generated from `System.Diagnostics.ActivityListener` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ActivityListener : System.IDisposable + { + public ActivityListener() => throw null; + public System.Action ActivityStarted { get => throw null; set => throw null; } + public System.Action ActivityStopped { get => throw null; set => throw null; } + public void Dispose() => throw null; + public System.Diagnostics.SampleActivity Sample { get => throw null; set => throw null; } + public System.Diagnostics.SampleActivity SampleUsingParentId { get => throw null; set => throw null; } + public System.Func ShouldListenTo { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.ActivitySamplingResult` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ActivitySamplingResult + { + // Stub generator skipped constructor + AllData, + AllDataAndRecorded, + None, + PropagationData, + } + + // Generated from `System.Diagnostics.ActivitySource` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ActivitySource : System.IDisposable + { + public ActivitySource(string name, string version = default(string)) => throw null; + public static void AddActivityListener(System.Diagnostics.ActivityListener listener) => throw null; + public void Dispose() => throw null; + public bool HasListeners() => throw null; + public string Name { get => throw null; } + public System.Diagnostics.Activity StartActivity(string name, System.Diagnostics.ActivityKind kind, string parentId, System.Collections.Generic.IEnumerable> tags = default(System.Collections.Generic.IEnumerable>), System.Collections.Generic.IEnumerable links = default(System.Collections.Generic.IEnumerable), System.DateTimeOffset startTime = default(System.DateTimeOffset)) => throw null; + public System.Diagnostics.Activity StartActivity(string name, System.Diagnostics.ActivityKind kind, System.Diagnostics.ActivityContext parentContext, System.Collections.Generic.IEnumerable> tags = default(System.Collections.Generic.IEnumerable>), System.Collections.Generic.IEnumerable links = default(System.Collections.Generic.IEnumerable), System.DateTimeOffset startTime = default(System.DateTimeOffset)) => throw null; + public System.Diagnostics.Activity StartActivity(string name, System.Diagnostics.ActivityKind kind = default(System.Diagnostics.ActivityKind)) => throw null; + public string Version { get => throw null; } + } + + // Generated from `System.Diagnostics.ActivitySpanId` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivitySpanId : System.IEquatable + { + public static bool operator !=(System.Diagnostics.ActivitySpanId spanId1, System.Diagnostics.ActivitySpanId spandId2) => throw null; + public static bool operator ==(System.Diagnostics.ActivitySpanId spanId1, System.Diagnostics.ActivitySpanId spandId2) => throw null; + // Stub generator skipped constructor + public void CopyTo(System.Span destination) => throw null; + public static System.Diagnostics.ActivitySpanId CreateFromBytes(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivitySpanId CreateFromString(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivitySpanId CreateFromUtf8String(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivitySpanId CreateRandom() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Diagnostics.ActivitySpanId spanId) => throw null; + public override int GetHashCode() => throw null; + public string ToHexString() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.ActivityTagsCollection` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ActivityTagsCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public ActivityTagsCollection(System.Collections.Generic.IEnumerable> list) => throw null; + public ActivityTagsCollection() => throw null; + public void Add(string key, object value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + // Generated from `System.Diagnostics.ActivityTagsCollection.Enumerator` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> + { + public System.Collections.Generic.KeyValuePair Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Diagnostics.ActivityTagsCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public object this[string key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public bool Remove(string key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(string key, out object value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `System.Diagnostics.ActivityTraceFlags` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum ActivityTraceFlags + { + // Stub generator skipped constructor + None, + Recorded, + } + + // Generated from `System.Diagnostics.ActivityTraceId` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ActivityTraceId : System.IEquatable + { + public static bool operator !=(System.Diagnostics.ActivityTraceId traceId1, System.Diagnostics.ActivityTraceId traceId2) => throw null; + public static bool operator ==(System.Diagnostics.ActivityTraceId traceId1, System.Diagnostics.ActivityTraceId traceId2) => throw null; + // Stub generator skipped constructor + public void CopyTo(System.Span destination) => throw null; + public static System.Diagnostics.ActivityTraceId CreateFromBytes(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivityTraceId CreateFromString(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivityTraceId CreateFromUtf8String(System.ReadOnlySpan idData) => throw null; + public static System.Diagnostics.ActivityTraceId CreateRandom() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Diagnostics.ActivityTraceId traceId) => throw null; + public override int GetHashCode() => throw null; + public string ToHexString() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.DiagnosticListener` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DiagnosticListener : System.Diagnostics.DiagnosticSource, System.IObservable>, System.IDisposable + { + public static System.IObservable AllListeners { get => throw null; } + public DiagnosticListener(string name) => throw null; + public virtual void Dispose() => throw null; + public override bool IsEnabled(string name, object arg1, object arg2 = default(object)) => throw null; + public override bool IsEnabled(string name) => throw null; + public bool IsEnabled() => throw null; + public string Name { get => throw null; } + public override void OnActivityExport(System.Diagnostics.Activity activity, object payload) => throw null; + public override void OnActivityImport(System.Diagnostics.Activity activity, object payload) => throw null; + public virtual System.IDisposable Subscribe(System.IObserver> observer, System.Predicate isEnabled) => throw null; + public virtual System.IDisposable Subscribe(System.IObserver> observer, System.Func isEnabled, System.Action onActivityImport = default(System.Action), System.Action onActivityExport = default(System.Action)) => throw null; + public virtual System.IDisposable Subscribe(System.IObserver> observer, System.Func isEnabled) => throw null; + public virtual System.IDisposable Subscribe(System.IObserver> observer) => throw null; + public override string ToString() => throw null; + public override void Write(string name, object value) => throw null; + } + + // Generated from `System.Diagnostics.DiagnosticSource` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class DiagnosticSource + { + protected DiagnosticSource() => throw null; + public virtual bool IsEnabled(string name, object arg1, object arg2 = default(object)) => throw null; + public abstract bool IsEnabled(string name); + public virtual void OnActivityExport(System.Diagnostics.Activity activity, object payload) => throw null; + public virtual void OnActivityImport(System.Diagnostics.Activity activity, object payload) => throw null; + public System.Diagnostics.Activity StartActivity(System.Diagnostics.Activity activity, object args) => throw null; + public void StopActivity(System.Diagnostics.Activity activity, object args) => throw null; + public abstract void Write(string name, object value); + } + + // Generated from `System.Diagnostics.SampleActivity<>` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate System.Diagnostics.ActivitySamplingResult SampleActivity(ref System.Diagnostics.ActivityCreationOptions options); + + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs new file mode 100644 index 000000000000..a3eef551d27a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs @@ -0,0 +1,42 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.FileVersionInfo` in `System.Diagnostics.FileVersionInfo, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileVersionInfo + { + public string Comments { get => throw null; } + public string CompanyName { get => throw null; } + public int FileBuildPart { get => throw null; } + public string FileDescription { get => throw null; } + public int FileMajorPart { get => throw null; } + public int FileMinorPart { get => throw null; } + public string FileName { get => throw null; } + public int FilePrivatePart { get => throw null; } + public string FileVersion { get => throw null; } + public static System.Diagnostics.FileVersionInfo GetVersionInfo(string fileName) => throw null; + public string InternalName { get => throw null; } + public bool IsDebug { get => throw null; } + public bool IsPatched { get => throw null; } + public bool IsPreRelease { get => throw null; } + public bool IsPrivateBuild { get => throw null; } + public bool IsSpecialBuild { get => throw null; } + public string Language { get => throw null; } + public string LegalCopyright { get => throw null; } + public string LegalTrademarks { get => throw null; } + public string OriginalFilename { get => throw null; } + public string PrivateBuild { get => throw null; } + public int ProductBuildPart { get => throw null; } + public int ProductMajorPart { get => throw null; } + public int ProductMinorPart { get => throw null; } + public string ProductName { get => throw null; } + public int ProductPrivatePart { get => throw null; } + public string ProductVersion { get => throw null; } + public string SpecialBuild { get => throw null; } + public override string ToString() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs new file mode 100644 index 000000000000..2853030e0674 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs @@ -0,0 +1,290 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeProcessHandle` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeProcessHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + protected override bool ReleaseHandle() => throw null; + public SafeProcessHandle(System.IntPtr existingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.DataReceivedEventArgs` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataReceivedEventArgs : System.EventArgs + { + public string Data { get => throw null; } + } + + // Generated from `System.Diagnostics.DataReceivedEventHandler` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void DataReceivedEventHandler(object sender, System.Diagnostics.DataReceivedEventArgs e); + + // Generated from `System.Diagnostics.MonitoringDescriptionAttribute` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MonitoringDescriptionAttribute : System.ComponentModel.DescriptionAttribute + { + public override string Description { get => throw null; } + public MonitoringDescriptionAttribute(string description) => throw null; + } + + // Generated from `System.Diagnostics.Process` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Process : System.ComponentModel.Component, System.IDisposable + { + public int BasePriority { get => throw null; } + public void BeginErrorReadLine() => throw null; + public void BeginOutputReadLine() => throw null; + public void CancelErrorRead() => throw null; + public void CancelOutputRead() => throw null; + public void Close() => throw null; + public bool CloseMainWindow() => throw null; + protected override void Dispose(bool disposing) => throw null; + public bool EnableRaisingEvents { get => throw null; set => throw null; } + public static void EnterDebugMode() => throw null; + public event System.Diagnostics.DataReceivedEventHandler ErrorDataReceived; + public int ExitCode { get => throw null; } + public System.DateTime ExitTime { get => throw null; } + public event System.EventHandler Exited; + public static System.Diagnostics.Process GetCurrentProcess() => throw null; + public static System.Diagnostics.Process GetProcessById(int processId, string machineName) => throw null; + public static System.Diagnostics.Process GetProcessById(int processId) => throw null; + public static System.Diagnostics.Process[] GetProcesses(string machineName) => throw null; + public static System.Diagnostics.Process[] GetProcesses() => throw null; + public static System.Diagnostics.Process[] GetProcessesByName(string processName, string machineName) => throw null; + public static System.Diagnostics.Process[] GetProcessesByName(string processName) => throw null; + public System.IntPtr Handle { get => throw null; } + public int HandleCount { get => throw null; } + public bool HasExited { get => throw null; } + public int Id { get => throw null; } + public void Kill(bool entireProcessTree) => throw null; + public void Kill() => throw null; + public static void LeaveDebugMode() => throw null; + public string MachineName { get => throw null; } + public System.Diagnostics.ProcessModule MainModule { get => throw null; } + public System.IntPtr MainWindowHandle { get => throw null; } + public string MainWindowTitle { get => throw null; } + public System.IntPtr MaxWorkingSet { get => throw null; set => throw null; } + public System.IntPtr MinWorkingSet { get => throw null; set => throw null; } + public System.Diagnostics.ProcessModuleCollection Modules { get => throw null; } + public int NonpagedSystemMemorySize { get => throw null; } + public System.Int64 NonpagedSystemMemorySize64 { get => throw null; } + protected void OnExited() => throw null; + public event System.Diagnostics.DataReceivedEventHandler OutputDataReceived; + public int PagedMemorySize { get => throw null; } + public System.Int64 PagedMemorySize64 { get => throw null; } + public int PagedSystemMemorySize { get => throw null; } + public System.Int64 PagedSystemMemorySize64 { get => throw null; } + public int PeakPagedMemorySize { get => throw null; } + public System.Int64 PeakPagedMemorySize64 { get => throw null; } + public int PeakVirtualMemorySize { get => throw null; } + public System.Int64 PeakVirtualMemorySize64 { get => throw null; } + public int PeakWorkingSet { get => throw null; } + public System.Int64 PeakWorkingSet64 { get => throw null; } + public bool PriorityBoostEnabled { get => throw null; set => throw null; } + public System.Diagnostics.ProcessPriorityClass PriorityClass { get => throw null; set => throw null; } + public int PrivateMemorySize { get => throw null; } + public System.Int64 PrivateMemorySize64 { get => throw null; } + public System.TimeSpan PrivilegedProcessorTime { get => throw null; } + public Process() => throw null; + public string ProcessName { get => throw null; } + public System.IntPtr ProcessorAffinity { get => throw null; set => throw null; } + public void Refresh() => throw null; + public bool Responding { get => throw null; } + public Microsoft.Win32.SafeHandles.SafeProcessHandle SafeHandle { get => throw null; } + public int SessionId { get => throw null; } + public System.IO.StreamReader StandardError { get => throw null; } + public System.IO.StreamWriter StandardInput { get => throw null; } + public System.IO.StreamReader StandardOutput { get => throw null; } + public static System.Diagnostics.Process Start(string fileName, string userName, System.Security.SecureString password, string domain) => throw null; + public static System.Diagnostics.Process Start(string fileName, string arguments, string userName, System.Security.SecureString password, string domain) => throw null; + public static System.Diagnostics.Process Start(string fileName, string arguments) => throw null; + public static System.Diagnostics.Process Start(string fileName, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Diagnostics.Process Start(string fileName) => throw null; + public static System.Diagnostics.Process Start(System.Diagnostics.ProcessStartInfo startInfo) => throw null; + public bool Start() => throw null; + public System.Diagnostics.ProcessStartInfo StartInfo { get => throw null; set => throw null; } + public System.DateTime StartTime { get => throw null; } + public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get => throw null; set => throw null; } + public System.Diagnostics.ProcessThreadCollection Threads { get => throw null; } + public override string ToString() => throw null; + public System.TimeSpan TotalProcessorTime { get => throw null; } + public System.TimeSpan UserProcessorTime { get => throw null; } + public int VirtualMemorySize { get => throw null; } + public System.Int64 VirtualMemorySize64 { get => throw null; } + public void WaitForExit() => throw null; + public bool WaitForExit(int milliseconds) => throw null; + public System.Threading.Tasks.Task WaitForExitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public bool WaitForInputIdle(int milliseconds) => throw null; + public bool WaitForInputIdle() => throw null; + public int WorkingSet { get => throw null; } + public System.Int64 WorkingSet64 { get => throw null; } + } + + // Generated from `System.Diagnostics.ProcessModule` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProcessModule : System.ComponentModel.Component + { + public System.IntPtr BaseAddress { get => throw null; } + public System.IntPtr EntryPointAddress { get => throw null; } + public string FileName { get => throw null; } + public System.Diagnostics.FileVersionInfo FileVersionInfo { get => throw null; } + public int ModuleMemorySize { get => throw null; } + public string ModuleName { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.ProcessModuleCollection` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProcessModuleCollection : System.Collections.ReadOnlyCollectionBase + { + public bool Contains(System.Diagnostics.ProcessModule module) => throw null; + public void CopyTo(System.Diagnostics.ProcessModule[] array, int index) => throw null; + public int IndexOf(System.Diagnostics.ProcessModule module) => throw null; + public System.Diagnostics.ProcessModule this[int index] { get => throw null; } + public ProcessModuleCollection(System.Diagnostics.ProcessModule[] processModules) => throw null; + protected ProcessModuleCollection() => throw null; + } + + // Generated from `System.Diagnostics.ProcessPriorityClass` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProcessPriorityClass + { + AboveNormal, + BelowNormal, + High, + Idle, + Normal, + // Stub generator skipped constructor + RealTime, + } + + // Generated from `System.Diagnostics.ProcessStartInfo` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProcessStartInfo + { + public System.Collections.ObjectModel.Collection ArgumentList { get => throw null; } + public string Arguments { get => throw null; set => throw null; } + public bool CreateNoWindow { get => throw null; set => throw null; } + public string Domain { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Environment { get => throw null; } + public System.Collections.Specialized.StringDictionary EnvironmentVariables { get => throw null; } + public bool ErrorDialog { get => throw null; set => throw null; } + public System.IntPtr ErrorDialogParentHandle { get => throw null; set => throw null; } + public string FileName { get => throw null; set => throw null; } + public bool LoadUserProfile { get => throw null; set => throw null; } + public System.Security.SecureString Password { get => throw null; set => throw null; } + public string PasswordInClearText { get => throw null; set => throw null; } + public ProcessStartInfo(string fileName, string arguments) => throw null; + public ProcessStartInfo(string fileName) => throw null; + public ProcessStartInfo() => throw null; + public bool RedirectStandardError { get => throw null; set => throw null; } + public bool RedirectStandardInput { get => throw null; set => throw null; } + public bool RedirectStandardOutput { get => throw null; set => throw null; } + public System.Text.Encoding StandardErrorEncoding { get => throw null; set => throw null; } + public System.Text.Encoding StandardInputEncoding { get => throw null; set => throw null; } + public System.Text.Encoding StandardOutputEncoding { get => throw null; set => throw null; } + public bool UseShellExecute { get => throw null; set => throw null; } + public string UserName { get => throw null; set => throw null; } + public string Verb { get => throw null; set => throw null; } + public string[] Verbs { get => throw null; } + public System.Diagnostics.ProcessWindowStyle WindowStyle { get => throw null; set => throw null; } + public string WorkingDirectory { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.ProcessThread` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProcessThread : System.ComponentModel.Component + { + public int BasePriority { get => throw null; } + public int CurrentPriority { get => throw null; } + public int Id { get => throw null; } + public int IdealProcessor { set => throw null; } + public bool PriorityBoostEnabled { get => throw null; set => throw null; } + public System.Diagnostics.ThreadPriorityLevel PriorityLevel { get => throw null; set => throw null; } + public System.TimeSpan PrivilegedProcessorTime { get => throw null; } + public System.IntPtr ProcessorAffinity { set => throw null; } + public void ResetIdealProcessor() => throw null; + public System.IntPtr StartAddress { get => throw null; } + public System.DateTime StartTime { get => throw null; } + public System.Diagnostics.ThreadState ThreadState { get => throw null; } + public System.TimeSpan TotalProcessorTime { get => throw null; } + public System.TimeSpan UserProcessorTime { get => throw null; } + public System.Diagnostics.ThreadWaitReason WaitReason { get => throw null; } + } + + // Generated from `System.Diagnostics.ProcessThreadCollection` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProcessThreadCollection : System.Collections.ReadOnlyCollectionBase + { + public int Add(System.Diagnostics.ProcessThread thread) => throw null; + public bool Contains(System.Diagnostics.ProcessThread thread) => throw null; + public void CopyTo(System.Diagnostics.ProcessThread[] array, int index) => throw null; + public int IndexOf(System.Diagnostics.ProcessThread thread) => throw null; + public void Insert(int index, System.Diagnostics.ProcessThread thread) => throw null; + public System.Diagnostics.ProcessThread this[int index] { get => throw null; } + public ProcessThreadCollection(System.Diagnostics.ProcessThread[] processThreads) => throw null; + protected ProcessThreadCollection() => throw null; + public void Remove(System.Diagnostics.ProcessThread thread) => throw null; + } + + // Generated from `System.Diagnostics.ProcessWindowStyle` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProcessWindowStyle + { + Hidden, + Maximized, + Minimized, + Normal, + // Stub generator skipped constructor + } + + // Generated from `System.Diagnostics.ThreadPriorityLevel` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ThreadPriorityLevel + { + AboveNormal, + BelowNormal, + Highest, + Idle, + Lowest, + Normal, + // Stub generator skipped constructor + TimeCritical, + } + + // Generated from `System.Diagnostics.ThreadState` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ThreadState + { + Initialized, + Ready, + Running, + Standby, + Terminated, + // Stub generator skipped constructor + Transition, + Unknown, + Wait, + } + + // Generated from `System.Diagnostics.ThreadWaitReason` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ThreadWaitReason + { + EventPairHigh, + EventPairLow, + ExecutionDelay, + Executive, + FreePage, + LpcReceive, + LpcReply, + PageIn, + PageOut, + Suspended, + SystemAllocation, + // Stub generator skipped constructor + Unknown, + UserRequest, + VirtualMemory, + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs new file mode 100644 index 000000000000..7063ea929410 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs @@ -0,0 +1,243 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.StackFrame` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StackFrame + { + public virtual int GetFileColumnNumber() => throw null; + public virtual int GetFileLineNumber() => throw null; + public virtual string GetFileName() => throw null; + public virtual int GetILOffset() => throw null; + public virtual System.Reflection.MethodBase GetMethod() => throw null; + public virtual int GetNativeOffset() => throw null; + public const int OFFSET_UNKNOWN = default; + public StackFrame(string fileName, int lineNumber, int colNumber) => throw null; + public StackFrame(string fileName, int lineNumber) => throw null; + public StackFrame(int skipFrames, bool needFileInfo) => throw null; + public StackFrame(int skipFrames) => throw null; + public StackFrame(bool needFileInfo) => throw null; + public StackFrame() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.StackFrameExtensions` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class StackFrameExtensions + { + public static System.IntPtr GetNativeIP(this System.Diagnostics.StackFrame stackFrame) => throw null; + public static System.IntPtr GetNativeImageBase(this System.Diagnostics.StackFrame stackFrame) => throw null; + public static bool HasILOffset(this System.Diagnostics.StackFrame stackFrame) => throw null; + public static bool HasMethod(this System.Diagnostics.StackFrame stackFrame) => throw null; + public static bool HasNativeImage(this System.Diagnostics.StackFrame stackFrame) => throw null; + public static bool HasSource(this System.Diagnostics.StackFrame stackFrame) => throw null; + } + + // Generated from `System.Diagnostics.StackTrace` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StackTrace + { + public virtual int FrameCount { get => throw null; } + public virtual System.Diagnostics.StackFrame GetFrame(int index) => throw null; + public virtual System.Diagnostics.StackFrame[] GetFrames() => throw null; + public const int METHODS_TO_SKIP = default; + public StackTrace(int skipFrames, bool fNeedFileInfo) => throw null; + public StackTrace(int skipFrames) => throw null; + public StackTrace(bool fNeedFileInfo) => throw null; + public StackTrace(System.Exception e, int skipFrames, bool fNeedFileInfo) => throw null; + public StackTrace(System.Exception e, int skipFrames) => throw null; + public StackTrace(System.Exception e, bool fNeedFileInfo) => throw null; + public StackTrace(System.Exception e) => throw null; + public StackTrace(System.Diagnostics.StackFrame frame) => throw null; + public StackTrace() => throw null; + public override string ToString() => throw null; + } + + namespace SymbolStore + { + // Generated from `System.Diagnostics.SymbolStore.ISymbolBinder` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolBinder + { + System.Diagnostics.SymbolStore.ISymbolReader GetReader(int importer, string filename, string searchPath); + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolBinder1` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolBinder1 + { + System.Diagnostics.SymbolStore.ISymbolReader GetReader(System.IntPtr importer, string filename, string searchPath); + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolDocument` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolDocument + { + System.Guid CheckSumAlgorithmId { get; } + System.Guid DocumentType { get; } + int FindClosestLine(int line); + System.Byte[] GetCheckSum(); + System.Byte[] GetSourceRange(int startLine, int startColumn, int endLine, int endColumn); + bool HasEmbeddedSource { get; } + System.Guid Language { get; } + System.Guid LanguageVendor { get; } + int SourceLength { get; } + string URL { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolDocumentWriter` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolDocumentWriter + { + void SetCheckSum(System.Guid algorithmId, System.Byte[] checkSum); + void SetSource(System.Byte[] source); + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolMethod` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolMethod + { + System.Diagnostics.SymbolStore.ISymbolNamespace GetNamespace(); + int GetOffset(System.Diagnostics.SymbolStore.ISymbolDocument document, int line, int column); + System.Diagnostics.SymbolStore.ISymbolVariable[] GetParameters(); + int[] GetRanges(System.Diagnostics.SymbolStore.ISymbolDocument document, int line, int column); + System.Diagnostics.SymbolStore.ISymbolScope GetScope(int offset); + void GetSequencePoints(int[] offsets, System.Diagnostics.SymbolStore.ISymbolDocument[] documents, int[] lines, int[] columns, int[] endLines, int[] endColumns); + bool GetSourceStartEnd(System.Diagnostics.SymbolStore.ISymbolDocument[] docs, int[] lines, int[] columns); + System.Diagnostics.SymbolStore.ISymbolScope RootScope { get; } + int SequencePointCount { get; } + System.Diagnostics.SymbolStore.SymbolToken Token { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolNamespace` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolNamespace + { + System.Diagnostics.SymbolStore.ISymbolNamespace[] GetNamespaces(); + System.Diagnostics.SymbolStore.ISymbolVariable[] GetVariables(); + string Name { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolReader` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolReader + { + System.Diagnostics.SymbolStore.ISymbolDocument GetDocument(string url, System.Guid language, System.Guid languageVendor, System.Guid documentType); + System.Diagnostics.SymbolStore.ISymbolDocument[] GetDocuments(); + System.Diagnostics.SymbolStore.ISymbolVariable[] GetGlobalVariables(); + System.Diagnostics.SymbolStore.ISymbolMethod GetMethod(System.Diagnostics.SymbolStore.SymbolToken method, int version); + System.Diagnostics.SymbolStore.ISymbolMethod GetMethod(System.Diagnostics.SymbolStore.SymbolToken method); + System.Diagnostics.SymbolStore.ISymbolMethod GetMethodFromDocumentPosition(System.Diagnostics.SymbolStore.ISymbolDocument document, int line, int column); + System.Diagnostics.SymbolStore.ISymbolNamespace[] GetNamespaces(); + System.Byte[] GetSymAttribute(System.Diagnostics.SymbolStore.SymbolToken parent, string name); + System.Diagnostics.SymbolStore.ISymbolVariable[] GetVariables(System.Diagnostics.SymbolStore.SymbolToken parent); + System.Diagnostics.SymbolStore.SymbolToken UserEntryPoint { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolScope` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolScope + { + int EndOffset { get; } + System.Diagnostics.SymbolStore.ISymbolScope[] GetChildren(); + System.Diagnostics.SymbolStore.ISymbolVariable[] GetLocals(); + System.Diagnostics.SymbolStore.ISymbolNamespace[] GetNamespaces(); + System.Diagnostics.SymbolStore.ISymbolMethod Method { get; } + System.Diagnostics.SymbolStore.ISymbolScope Parent { get; } + int StartOffset { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolVariable` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolVariable + { + int AddressField1 { get; } + int AddressField2 { get; } + int AddressField3 { get; } + System.Diagnostics.SymbolStore.SymAddressKind AddressKind { get; } + object Attributes { get; } + int EndOffset { get; } + System.Byte[] GetSignature(); + string Name { get; } + int StartOffset { get; } + } + + // Generated from `System.Diagnostics.SymbolStore.ISymbolWriter` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISymbolWriter + { + void Close(); + void CloseMethod(); + void CloseNamespace(); + void CloseScope(int endOffset); + System.Diagnostics.SymbolStore.ISymbolDocumentWriter DefineDocument(string url, System.Guid language, System.Guid languageVendor, System.Guid documentType); + void DefineField(System.Diagnostics.SymbolStore.SymbolToken parent, string name, System.Reflection.FieldAttributes attributes, System.Byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3); + void DefineGlobalVariable(string name, System.Reflection.FieldAttributes attributes, System.Byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3); + void DefineLocalVariable(string name, System.Reflection.FieldAttributes attributes, System.Byte[] signature, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3, int startOffset, int endOffset); + void DefineParameter(string name, System.Reflection.ParameterAttributes attributes, int sequence, System.Diagnostics.SymbolStore.SymAddressKind addrKind, int addr1, int addr2, int addr3); + void DefineSequencePoints(System.Diagnostics.SymbolStore.ISymbolDocumentWriter document, int[] offsets, int[] lines, int[] columns, int[] endLines, int[] endColumns); + void Initialize(System.IntPtr emitter, string filename, bool fFullBuild); + void OpenMethod(System.Diagnostics.SymbolStore.SymbolToken method); + void OpenNamespace(string name); + int OpenScope(int startOffset); + void SetMethodSourceRange(System.Diagnostics.SymbolStore.ISymbolDocumentWriter startDoc, int startLine, int startColumn, System.Diagnostics.SymbolStore.ISymbolDocumentWriter endDoc, int endLine, int endColumn); + void SetScopeRange(int scopeID, int startOffset, int endOffset); + void SetSymAttribute(System.Diagnostics.SymbolStore.SymbolToken parent, string name, System.Byte[] data); + void SetUnderlyingWriter(System.IntPtr underlyingWriter); + void SetUserEntryPoint(System.Diagnostics.SymbolStore.SymbolToken entryMethod); + void UsingNamespace(string fullName); + } + + // Generated from `System.Diagnostics.SymbolStore.SymAddressKind` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SymAddressKind + { + BitField, + ILOffset, + NativeOffset, + NativeRVA, + NativeRegister, + NativeRegisterRegister, + NativeRegisterRelative, + NativeRegisterStack, + NativeSectionOffset, + NativeStackRegister, + // Stub generator skipped constructor + } + + // Generated from `System.Diagnostics.SymbolStore.SymDocumentType` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SymDocumentType + { + public SymDocumentType() => throw null; + public static System.Guid Text; + } + + // Generated from `System.Diagnostics.SymbolStore.SymLanguageType` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SymLanguageType + { + public static System.Guid Basic; + public static System.Guid C; + public static System.Guid CPlusPlus; + public static System.Guid CSharp; + public static System.Guid Cobol; + public static System.Guid ILAssembly; + public static System.Guid JScript; + public static System.Guid Java; + public static System.Guid MCPlusPlus; + public static System.Guid Pascal; + public static System.Guid SMC; + public SymLanguageType() => throw null; + } + + // Generated from `System.Diagnostics.SymbolStore.SymLanguageVendor` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SymLanguageVendor + { + public static System.Guid Microsoft; + public SymLanguageVendor() => throw null; + } + + // Generated from `System.Diagnostics.SymbolStore.SymbolToken` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SymbolToken + { + public static bool operator !=(System.Diagnostics.SymbolStore.SymbolToken a, System.Diagnostics.SymbolStore.SymbolToken b) => throw null; + public static bool operator ==(System.Diagnostics.SymbolStore.SymbolToken a, System.Diagnostics.SymbolStore.SymbolToken b) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Diagnostics.SymbolStore.SymbolToken obj) => throw null; + public override int GetHashCode() => throw null; + public int GetToken() => throw null; + public SymbolToken(int val) => throw null; + // Stub generator skipped constructor + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs new file mode 100644 index 000000000000..037ca41f99c1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs @@ -0,0 +1,71 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.ConsoleTraceListener` in `System.Diagnostics.TextWriterTraceListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConsoleTraceListener : System.Diagnostics.TextWriterTraceListener + { + public override void Close() => throw null; + public ConsoleTraceListener(bool useErrorStream) => throw null; + public ConsoleTraceListener() => throw null; + } + + // Generated from `System.Diagnostics.DelimitedListTraceListener` in `System.Diagnostics.TextWriterTraceListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DelimitedListTraceListener : System.Diagnostics.TextWriterTraceListener + { + public DelimitedListTraceListener(string fileName, string name) => throw null; + public DelimitedListTraceListener(string fileName) => throw null; + public DelimitedListTraceListener(System.IO.TextWriter writer, string name) => throw null; + public DelimitedListTraceListener(System.IO.TextWriter writer) => throw null; + public DelimitedListTraceListener(System.IO.Stream stream, string name) => throw null; + public DelimitedListTraceListener(System.IO.Stream stream) => throw null; + public string Delimiter { get => throw null; set => throw null; } + protected override string[] GetSupportedAttributes() => throw null; + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, params object[] data) => throw null; + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, object data) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string message) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args) => throw null; + } + + // Generated from `System.Diagnostics.TextWriterTraceListener` in `System.Diagnostics.TextWriterTraceListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TextWriterTraceListener : System.Diagnostics.TraceListener + { + public override void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override void Flush() => throw null; + public TextWriterTraceListener(string fileName, string name) => throw null; + public TextWriterTraceListener(string fileName) => throw null; + public TextWriterTraceListener(System.IO.TextWriter writer, string name) => throw null; + public TextWriterTraceListener(System.IO.TextWriter writer) => throw null; + public TextWriterTraceListener(System.IO.Stream stream, string name) => throw null; + public TextWriterTraceListener(System.IO.Stream stream) => throw null; + public TextWriterTraceListener() => throw null; + public override void Write(string message) => throw null; + public override void WriteLine(string message) => throw null; + public System.IO.TextWriter Writer { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.XmlWriterTraceListener` in `System.Diagnostics.TextWriterTraceListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlWriterTraceListener : System.Diagnostics.TextWriterTraceListener + { + public override void Close() => throw null; + public override void Fail(string message, string detailMessage) => throw null; + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, params object[] data) => throw null; + public override void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, object data) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string message) => throw null; + public override void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args) => throw null; + public override void TraceTransfer(System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, System.Guid relatedActivityId) => throw null; + public override void Write(string message) => throw null; + public override void WriteLine(string message) => throw null; + public XmlWriterTraceListener(string filename, string name) => throw null; + public XmlWriterTraceListener(string filename) => throw null; + public XmlWriterTraceListener(System.IO.TextWriter writer, string name) => throw null; + public XmlWriterTraceListener(System.IO.TextWriter writer) => throw null; + public XmlWriterTraceListener(System.IO.Stream stream, string name) => throw null; + public XmlWriterTraceListener(System.IO.Stream stream) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs new file mode 100644 index 000000000000..a026c25d7525 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs @@ -0,0 +1,319 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + // Generated from `System.Diagnostics.BooleanSwitch` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BooleanSwitch : System.Diagnostics.Switch + { + public BooleanSwitch(string displayName, string description, string defaultSwitchValue) : base(default(string), default(string)) => throw null; + public BooleanSwitch(string displayName, string description) : base(default(string), default(string)) => throw null; + public bool Enabled { get => throw null; set => throw null; } + protected override void OnValueChanged() => throw null; + } + + // Generated from `System.Diagnostics.CorrelationManager` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CorrelationManager + { + public System.Guid ActivityId { get => throw null; set => throw null; } + public System.Collections.Stack LogicalOperationStack { get => throw null; } + public void StartLogicalOperation(object operationId) => throw null; + public void StartLogicalOperation() => throw null; + public void StopLogicalOperation() => throw null; + } + + // Generated from `System.Diagnostics.DefaultTraceListener` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultTraceListener : System.Diagnostics.TraceListener + { + public bool AssertUiEnabled { get => throw null; set => throw null; } + public DefaultTraceListener() => throw null; + public override void Fail(string message, string detailMessage) => throw null; + public override void Fail(string message) => throw null; + public string LogFileName { get => throw null; set => throw null; } + public override void Write(string message) => throw null; + public override void WriteLine(string message) => throw null; + } + + // Generated from `System.Diagnostics.EventTypeFilter` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventTypeFilter : System.Diagnostics.TraceFilter + { + public System.Diagnostics.SourceLevels EventType { get => throw null; set => throw null; } + public EventTypeFilter(System.Diagnostics.SourceLevels level) => throw null; + public override bool ShouldTrace(System.Diagnostics.TraceEventCache cache, string source, System.Diagnostics.TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data) => throw null; + } + + // Generated from `System.Diagnostics.SourceFilter` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SourceFilter : System.Diagnostics.TraceFilter + { + public override bool ShouldTrace(System.Diagnostics.TraceEventCache cache, string source, System.Diagnostics.TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data) => throw null; + public string Source { get => throw null; set => throw null; } + public SourceFilter(string source) => throw null; + } + + // Generated from `System.Diagnostics.SourceLevels` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SourceLevels + { + ActivityTracing, + All, + Critical, + Error, + Information, + Off, + // Stub generator skipped constructor + Verbose, + Warning, + } + + // Generated from `System.Diagnostics.SourceSwitch` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SourceSwitch : System.Diagnostics.Switch + { + public System.Diagnostics.SourceLevels Level { get => throw null; set => throw null; } + protected override void OnValueChanged() => throw null; + public bool ShouldTrace(System.Diagnostics.TraceEventType eventType) => throw null; + public SourceSwitch(string name) : base(default(string), default(string)) => throw null; + public SourceSwitch(string displayName, string defaultSwitchValue) : base(default(string), default(string)) => throw null; + } + + // Generated from `System.Diagnostics.Switch` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Switch + { + public System.Collections.Specialized.StringDictionary Attributes { get => throw null; } + public string Description { get => throw null; } + public string DisplayName { get => throw null; } + protected virtual string[] GetSupportedAttributes() => throw null; + protected virtual void OnSwitchSettingChanged() => throw null; + protected virtual void OnValueChanged() => throw null; + protected Switch(string displayName, string description, string defaultSwitchValue) => throw null; + protected Switch(string displayName, string description) => throw null; + protected int SwitchSetting { get => throw null; set => throw null; } + protected string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.SwitchAttribute` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SwitchAttribute : System.Attribute + { + public static System.Diagnostics.SwitchAttribute[] GetAll(System.Reflection.Assembly assembly) => throw null; + public SwitchAttribute(string switchName, System.Type switchType) => throw null; + public string SwitchDescription { get => throw null; set => throw null; } + public string SwitchName { get => throw null; set => throw null; } + public System.Type SwitchType { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.SwitchLevelAttribute` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SwitchLevelAttribute : System.Attribute + { + public SwitchLevelAttribute(System.Type switchLevelType) => throw null; + public System.Type SwitchLevelType { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Trace` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Trace + { + public static void Assert(bool condition, string message, string detailMessage) => throw null; + public static void Assert(bool condition, string message) => throw null; + public static void Assert(bool condition) => throw null; + public static bool AutoFlush { get => throw null; set => throw null; } + public static void Close() => throw null; + public static System.Diagnostics.CorrelationManager CorrelationManager { get => throw null; } + public static void Fail(string message, string detailMessage) => throw null; + public static void Fail(string message) => throw null; + public static void Flush() => throw null; + public static void Indent() => throw null; + public static int IndentLevel { get => throw null; set => throw null; } + public static int IndentSize { get => throw null; set => throw null; } + public static System.Diagnostics.TraceListenerCollection Listeners { get => throw null; } + public static void Refresh() => throw null; + public static void TraceError(string message) => throw null; + public static void TraceError(string format, params object[] args) => throw null; + public static void TraceInformation(string message) => throw null; + public static void TraceInformation(string format, params object[] args) => throw null; + public static void TraceWarning(string message) => throw null; + public static void TraceWarning(string format, params object[] args) => throw null; + public static void Unindent() => throw null; + public static bool UseGlobalLock { get => throw null; set => throw null; } + public static void Write(string message, string category) => throw null; + public static void Write(string message) => throw null; + public static void Write(object value, string category) => throw null; + public static void Write(object value) => throw null; + public static void WriteIf(bool condition, string message, string category) => throw null; + public static void WriteIf(bool condition, string message) => throw null; + public static void WriteIf(bool condition, object value, string category) => throw null; + public static void WriteIf(bool condition, object value) => throw null; + public static void WriteLine(string message, string category) => throw null; + public static void WriteLine(string message) => throw null; + public static void WriteLine(object value, string category) => throw null; + public static void WriteLine(object value) => throw null; + public static void WriteLineIf(bool condition, string message, string category) => throw null; + public static void WriteLineIf(bool condition, string message) => throw null; + public static void WriteLineIf(bool condition, object value, string category) => throw null; + public static void WriteLineIf(bool condition, object value) => throw null; + } + + // Generated from `System.Diagnostics.TraceEventCache` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TraceEventCache + { + public string Callstack { get => throw null; } + public System.DateTime DateTime { get => throw null; } + public System.Collections.Stack LogicalOperationStack { get => throw null; } + public int ProcessId { get => throw null; } + public string ThreadId { get => throw null; } + public System.Int64 Timestamp { get => throw null; } + public TraceEventCache() => throw null; + } + + // Generated from `System.Diagnostics.TraceEventType` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TraceEventType + { + Critical, + Error, + Information, + Resume, + Start, + Stop, + Suspend, + // Stub generator skipped constructor + Transfer, + Verbose, + Warning, + } + + // Generated from `System.Diagnostics.TraceFilter` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TraceFilter + { + public abstract bool ShouldTrace(System.Diagnostics.TraceEventCache cache, string source, System.Diagnostics.TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data); + protected TraceFilter() => throw null; + } + + // Generated from `System.Diagnostics.TraceLevel` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TraceLevel + { + Error, + Info, + Off, + // Stub generator skipped constructor + Verbose, + Warning, + } + + // Generated from `System.Diagnostics.TraceListener` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TraceListener : System.MarshalByRefObject, System.IDisposable + { + public System.Collections.Specialized.StringDictionary Attributes { get => throw null; } + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual void Fail(string message, string detailMessage) => throw null; + public virtual void Fail(string message) => throw null; + public System.Diagnostics.TraceFilter Filter { get => throw null; set => throw null; } + public virtual void Flush() => throw null; + protected virtual string[] GetSupportedAttributes() => throw null; + public int IndentLevel { get => throw null; set => throw null; } + public int IndentSize { get => throw null; set => throw null; } + public virtual bool IsThreadSafe { get => throw null; } + public virtual string Name { get => throw null; set => throw null; } + protected bool NeedIndent { get => throw null; set => throw null; } + public virtual void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, params object[] data) => throw null; + public virtual void TraceData(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, object data) => throw null; + public virtual void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string message) => throw null; + public virtual void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args) => throw null; + public virtual void TraceEvent(System.Diagnostics.TraceEventCache eventCache, string source, System.Diagnostics.TraceEventType eventType, int id) => throw null; + protected TraceListener(string name) => throw null; + protected TraceListener() => throw null; + public System.Diagnostics.TraceOptions TraceOutputOptions { get => throw null; set => throw null; } + public virtual void TraceTransfer(System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, System.Guid relatedActivityId) => throw null; + public virtual void Write(string message, string category) => throw null; + public virtual void Write(object o, string category) => throw null; + public virtual void Write(object o) => throw null; + public abstract void Write(string message); + protected virtual void WriteIndent() => throw null; + public virtual void WriteLine(string message, string category) => throw null; + public virtual void WriteLine(object o, string category) => throw null; + public virtual void WriteLine(object o) => throw null; + public abstract void WriteLine(string message); + } + + // Generated from `System.Diagnostics.TraceListenerCollection` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TraceListenerCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Diagnostics.TraceListener listener) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void AddRange(System.Diagnostics.TraceListener[] value) => throw null; + public void AddRange(System.Diagnostics.TraceListenerCollection value) => throw null; + public void Clear() => throw null; + public bool Contains(System.Diagnostics.TraceListener listener) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Diagnostics.TraceListener[] listeners, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public int IndexOf(System.Diagnostics.TraceListener listener) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, System.Diagnostics.TraceListener listener) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Diagnostics.TraceListener this[string name] { get => throw null; } + public System.Diagnostics.TraceListener this[int i] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public void Remove(string name) => throw null; + public void Remove(System.Diagnostics.TraceListener listener) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Diagnostics.TraceOptions` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TraceOptions + { + Callstack, + DateTime, + LogicalOperationStack, + None, + ProcessId, + ThreadId, + Timestamp, + // Stub generator skipped constructor + } + + // Generated from `System.Diagnostics.TraceSource` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TraceSource + { + public System.Collections.Specialized.StringDictionary Attributes { get => throw null; } + public void Close() => throw null; + public void Flush() => throw null; + protected virtual string[] GetSupportedAttributes() => throw null; + public System.Diagnostics.TraceListenerCollection Listeners { get => throw null; } + public string Name { get => throw null; } + public System.Diagnostics.SourceSwitch Switch { get => throw null; set => throw null; } + public void TraceData(System.Diagnostics.TraceEventType eventType, int id, params object[] data) => throw null; + public void TraceData(System.Diagnostics.TraceEventType eventType, int id, object data) => throw null; + public void TraceEvent(System.Diagnostics.TraceEventType eventType, int id, string message) => throw null; + public void TraceEvent(System.Diagnostics.TraceEventType eventType, int id, string format, params object[] args) => throw null; + public void TraceEvent(System.Diagnostics.TraceEventType eventType, int id) => throw null; + public void TraceInformation(string message) => throw null; + public void TraceInformation(string format, params object[] args) => throw null; + public TraceSource(string name, System.Diagnostics.SourceLevels defaultLevel) => throw null; + public TraceSource(string name) => throw null; + public void TraceTransfer(int id, string message, System.Guid relatedActivityId) => throw null; + } + + // Generated from `System.Diagnostics.TraceSwitch` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TraceSwitch : System.Diagnostics.Switch + { + public System.Diagnostics.TraceLevel Level { get => throw null; set => throw null; } + protected override void OnSwitchSettingChanged() => throw null; + protected override void OnValueChanged() => throw null; + public bool TraceError { get => throw null; } + public bool TraceInfo { get => throw null; } + public TraceSwitch(string displayName, string description, string defaultSwitchValue) : base(default(string), default(string)) => throw null; + public TraceSwitch(string displayName, string description) : base(default(string), default(string)) => throw null; + public bool TraceVerbose { get => throw null; } + public bool TraceWarning { get => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs new file mode 100644 index 000000000000..df631a1d61ab --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs @@ -0,0 +1,390 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace Tracing + { + // Generated from `System.Diagnostics.Tracing.DiagnosticCounter` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DiagnosticCounter : System.IDisposable + { + public void AddMetadata(string key, string value) => throw null; + internal DiagnosticCounter() => throw null; + public string DisplayName { get => throw null; set => throw null; } + public string DisplayUnits { get => throw null; set => throw null; } + public void Dispose() => throw null; + public System.Diagnostics.Tracing.EventSource EventSource { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventActivityOptions` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventActivityOptions + { + Detachable, + Disable, + // Stub generator skipped constructor + None, + Recursive, + } + + // Generated from `System.Diagnostics.Tracing.EventAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventAttribute : System.Attribute + { + public System.Diagnostics.Tracing.EventActivityOptions ActivityOptions { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventChannel Channel { get => throw null; set => throw null; } + public EventAttribute(int eventId) => throw null; + public int EventId { get => throw null; } + public System.Diagnostics.Tracing.EventKeywords Keywords { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventLevel Level { get => throw null; set => throw null; } + public string Message { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventOpcode Opcode { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventTags Tags { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventTask Task { get => throw null; set => throw null; } + public System.Byte Version { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventChannel` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventChannel + { + Admin, + Analytic, + Debug, + // Stub generator skipped constructor + None, + Operational, + } + + // Generated from `System.Diagnostics.Tracing.EventCommand` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventCommand + { + Disable, + Enable, + // Stub generator skipped constructor + SendManifest, + Update, + } + + // Generated from `System.Diagnostics.Tracing.EventCommandEventArgs` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventCommandEventArgs : System.EventArgs + { + public System.Collections.Generic.IDictionary Arguments { get => throw null; } + public System.Diagnostics.Tracing.EventCommand Command { get => throw null; } + public bool DisableEvent(int eventId) => throw null; + public bool EnableEvent(int eventId) => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventCounter` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter + { + public EventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) => throw null; + public override string ToString() => throw null; + public void WriteMetric(float value) => throw null; + public void WriteMetric(double value) => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventDataAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventDataAttribute : System.Attribute + { + public EventDataAttribute() => throw null; + public string Name { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventFieldAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventFieldAttribute : System.Attribute + { + public EventFieldAttribute() => throw null; + public System.Diagnostics.Tracing.EventFieldFormat Format { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventFieldTags Tags { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventFieldFormat` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventFieldFormat + { + Boolean, + Default, + // Stub generator skipped constructor + HResult, + Hexadecimal, + Json, + String, + Xml, + } + + // Generated from `System.Diagnostics.Tracing.EventFieldTags` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventFieldTags + { + // Stub generator skipped constructor + None, + } + + // Generated from `System.Diagnostics.Tracing.EventIgnoreAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventIgnoreAttribute : System.Attribute + { + public EventIgnoreAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventKeywords` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventKeywords + { + All, + AuditFailure, + AuditSuccess, + CorrelationHint, + // Stub generator skipped constructor + EventLogClassic, + MicrosoftTelemetry, + None, + Sqm, + WdiContext, + WdiDiagnostic, + } + + // Generated from `System.Diagnostics.Tracing.EventLevel` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventLevel + { + Critical, + Error, + // Stub generator skipped constructor + Informational, + LogAlways, + Verbose, + Warning, + } + + // Generated from `System.Diagnostics.Tracing.EventListener` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EventListener : System.IDisposable + { + public void DisableEvents(System.Diagnostics.Tracing.EventSource eventSource) => throw null; + public virtual void Dispose() => throw null; + public void EnableEvents(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords matchAnyKeyword, System.Collections.Generic.IDictionary arguments) => throw null; + public void EnableEvents(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords matchAnyKeyword) => throw null; + public void EnableEvents(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventLevel level) => throw null; + protected EventListener() => throw null; + public event System.EventHandler EventSourceCreated; + protected static int EventSourceIndex(System.Diagnostics.Tracing.EventSource eventSource) => throw null; + public event System.EventHandler EventWritten; + protected internal virtual void OnEventSourceCreated(System.Diagnostics.Tracing.EventSource eventSource) => throw null; + protected internal virtual void OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs eventData) => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventManifestOptions` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventManifestOptions + { + AllCultures, + AllowEventSourceOverride, + // Stub generator skipped constructor + None, + OnlyIfNeededForRegistration, + Strict, + } + + // Generated from `System.Diagnostics.Tracing.EventOpcode` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventOpcode + { + DataCollectionStart, + DataCollectionStop, + // Stub generator skipped constructor + Extension, + Info, + Receive, + Reply, + Resume, + Send, + Start, + Stop, + Suspend, + } + + // Generated from `System.Diagnostics.Tracing.EventSource` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventSource : System.IDisposable + { + public System.Exception ConstructionException { get => throw null; } + public static System.Guid CurrentThreadActivityId { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public event System.EventHandler EventCommandExecuted; + // Generated from `System.Diagnostics.Tracing.EventSource.EventData` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected internal struct EventData + { + public System.IntPtr DataPointer { get => throw null; set => throw null; } + // Stub generator skipped constructor + public int Size { get => throw null; set => throw null; } + } + + + public EventSource(string eventSourceName, System.Diagnostics.Tracing.EventSourceSettings config, params string[] traits) => throw null; + public EventSource(string eventSourceName, System.Diagnostics.Tracing.EventSourceSettings config) => throw null; + public EventSource(string eventSourceName) => throw null; + protected EventSource(bool throwOnEventWriteErrors) => throw null; + protected EventSource(System.Diagnostics.Tracing.EventSourceSettings settings, params string[] traits) => throw null; + protected EventSource(System.Diagnostics.Tracing.EventSourceSettings settings) => throw null; + protected EventSource() => throw null; + public static string GenerateManifest(System.Type eventSourceType, string assemblyPathToIncludeInManifest, System.Diagnostics.Tracing.EventManifestOptions flags) => throw null; + public static string GenerateManifest(System.Type eventSourceType, string assemblyPathToIncludeInManifest) => throw null; + public static System.Guid GetGuid(System.Type eventSourceType) => throw null; + public static string GetName(System.Type eventSourceType) => throw null; + public static System.Collections.Generic.IEnumerable GetSources() => throw null; + public string GetTrait(string key) => throw null; + public System.Guid Guid { get => throw null; } + public bool IsEnabled(System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords keywords, System.Diagnostics.Tracing.EventChannel channel) => throw null; + public bool IsEnabled(System.Diagnostics.Tracing.EventLevel level, System.Diagnostics.Tracing.EventKeywords keywords) => throw null; + public bool IsEnabled() => throw null; + public string Name { get => throw null; } + protected virtual void OnEventCommand(System.Diagnostics.Tracing.EventCommandEventArgs command) => throw null; + public static void SendCommand(System.Diagnostics.Tracing.EventSource eventSource, System.Diagnostics.Tracing.EventCommand command, System.Collections.Generic.IDictionary commandArguments) => throw null; + public static void SetCurrentThreadActivityId(System.Guid activityId, out System.Guid oldActivityThatWillContinue) => throw null; + public static void SetCurrentThreadActivityId(System.Guid activityId) => throw null; + public System.Diagnostics.Tracing.EventSourceSettings Settings { get => throw null; } + public override string ToString() => throw null; + public void Write(string eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref T data) => throw null; + public void Write(string eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref System.Guid activityId, ref System.Guid relatedActivityId, ref T data) => throw null; + public void Write(string eventName, T data) => throw null; + public void Write(string eventName, System.Diagnostics.Tracing.EventSourceOptions options, T data) => throw null; + public void Write(string eventName, System.Diagnostics.Tracing.EventSourceOptions options) => throw null; + public void Write(string eventName) => throw null; + protected void WriteEvent(int eventId, string arg1, string arg2, string arg3) => throw null; + protected void WriteEvent(int eventId, string arg1, string arg2) => throw null; + protected void WriteEvent(int eventId, string arg1, int arg2, int arg3) => throw null; + protected void WriteEvent(int eventId, string arg1, int arg2) => throw null; + protected void WriteEvent(int eventId, string arg1, System.Int64 arg2) => throw null; + protected void WriteEvent(int eventId, string arg1) => throw null; + protected void WriteEvent(int eventId, params object[] args) => throw null; + protected void WriteEvent(int eventId, int arg1, string arg2) => throw null; + protected void WriteEvent(int eventId, int arg1, int arg2, int arg3) => throw null; + protected void WriteEvent(int eventId, int arg1, int arg2) => throw null; + protected void WriteEvent(int eventId, int arg1) => throw null; + protected void WriteEvent(int eventId, System.Int64 arg1, string arg2) => throw null; + protected void WriteEvent(int eventId, System.Int64 arg1, System.Int64 arg2, System.Int64 arg3) => throw null; + protected void WriteEvent(int eventId, System.Int64 arg1, System.Int64 arg2) => throw null; + protected void WriteEvent(int eventId, System.Int64 arg1, System.Byte[] arg2) => throw null; + protected void WriteEvent(int eventId, System.Int64 arg1) => throw null; + protected void WriteEvent(int eventId, System.Byte[] arg1) => throw null; + protected void WriteEvent(int eventId) => throw null; + unsafe protected void WriteEventCore(int eventId, int eventDataCount, System.Diagnostics.Tracing.EventSource.EventData* data) => throw null; + protected void WriteEventWithRelatedActivityId(int eventId, System.Guid relatedActivityId, params object[] args) => throw null; + unsafe protected void WriteEventWithRelatedActivityIdCore(int eventId, System.Guid* relatedActivityId, int eventDataCount, System.Diagnostics.Tracing.EventSource.EventData* data) => throw null; + // ERR: Stub generator didn't handle member: ~EventSource + } + + // Generated from `System.Diagnostics.Tracing.EventSourceAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventSourceAttribute : System.Attribute + { + public EventSourceAttribute() => throw null; + public string Guid { get => throw null; set => throw null; } + public string LocalizationResources { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventSourceCreatedEventArgs` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventSourceCreatedEventArgs : System.EventArgs + { + public System.Diagnostics.Tracing.EventSource EventSource { get => throw null; } + public EventSourceCreatedEventArgs() => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventSourceException` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventSourceException : System.Exception + { + public EventSourceException(string message, System.Exception innerException) => throw null; + public EventSourceException(string message) => throw null; + public EventSourceException() => throw null; + protected EventSourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Diagnostics.Tracing.EventSourceOptions` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EventSourceOptions + { + public System.Diagnostics.Tracing.EventActivityOptions ActivityOptions { get => throw null; set => throw null; } + // Stub generator skipped constructor + public System.Diagnostics.Tracing.EventKeywords Keywords { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventLevel Level { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventOpcode Opcode { get => throw null; set => throw null; } + public System.Diagnostics.Tracing.EventTags Tags { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.EventSourceSettings` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventSourceSettings + { + Default, + EtwManifestEventFormat, + EtwSelfDescribingEventFormat, + // Stub generator skipped constructor + ThrowOnEventWriteErrors, + } + + // Generated from `System.Diagnostics.Tracing.EventTags` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventTags + { + // Stub generator skipped constructor + None, + } + + // Generated from `System.Diagnostics.Tracing.EventTask` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventTask + { + // Stub generator skipped constructor + None, + } + + // Generated from `System.Diagnostics.Tracing.EventWrittenEventArgs` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventWrittenEventArgs : System.EventArgs + { + public System.Guid ActivityId { get => throw null; } + public System.Diagnostics.Tracing.EventChannel Channel { get => throw null; } + public int EventId { get => throw null; } + public string EventName { get => throw null; } + public System.Diagnostics.Tracing.EventSource EventSource { get => throw null; } + public System.Diagnostics.Tracing.EventKeywords Keywords { get => throw null; } + public System.Diagnostics.Tracing.EventLevel Level { get => throw null; } + public string Message { get => throw null; } + public System.Int64 OSThreadId { get => throw null; } + public System.Diagnostics.Tracing.EventOpcode Opcode { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Payload { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection PayloadNames { get => throw null; } + public System.Guid RelatedActivityId { get => throw null; } + public System.Diagnostics.Tracing.EventTags Tags { get => throw null; } + public System.Diagnostics.Tracing.EventTask Task { get => throw null; } + public System.DateTime TimeStamp { get => throw null; } + public System.Byte Version { get => throw null; } + } + + // Generated from `System.Diagnostics.Tracing.IncrementingEventCounter` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IncrementingEventCounter : System.Diagnostics.Tracing.DiagnosticCounter + { + public System.TimeSpan DisplayRateTimeScale { get => throw null; set => throw null; } + public void Increment(double increment = default(double)) => throw null; + public IncrementingEventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.Tracing.IncrementingPollingCounter` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IncrementingPollingCounter : System.Diagnostics.Tracing.DiagnosticCounter + { + public System.TimeSpan DisplayRateTimeScale { get => throw null; set => throw null; } + public IncrementingPollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, System.Func totalValueProvider) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Diagnostics.Tracing.NonEventAttribute` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NonEventAttribute : System.Attribute + { + public NonEventAttribute() => throw null; + } + + // Generated from `System.Diagnostics.Tracing.PollingCounter` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PollingCounter : System.Diagnostics.Tracing.DiagnosticCounter + { + public PollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, System.Func metricProvider) => throw null; + public override string ToString() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs new file mode 100644 index 000000000000..bd82b4a1921f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs @@ -0,0 +1,610 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Drawing + { + // Generated from `System.Drawing.Color` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Color : System.IEquatable + { + public static bool operator !=(System.Drawing.Color left, System.Drawing.Color right) => throw null; + public static bool operator ==(System.Drawing.Color left, System.Drawing.Color right) => throw null; + public System.Byte A { get => throw null; } + public static System.Drawing.Color AliceBlue { get => throw null; } + public static System.Drawing.Color AntiqueWhite { get => throw null; } + public static System.Drawing.Color Aqua { get => throw null; } + public static System.Drawing.Color Aquamarine { get => throw null; } + public static System.Drawing.Color Azure { get => throw null; } + public System.Byte B { get => throw null; } + public static System.Drawing.Color Beige { get => throw null; } + public static System.Drawing.Color Bisque { get => throw null; } + public static System.Drawing.Color Black { get => throw null; } + public static System.Drawing.Color BlanchedAlmond { get => throw null; } + public static System.Drawing.Color Blue { get => throw null; } + public static System.Drawing.Color BlueViolet { get => throw null; } + public static System.Drawing.Color Brown { get => throw null; } + public static System.Drawing.Color BurlyWood { get => throw null; } + public static System.Drawing.Color CadetBlue { get => throw null; } + public static System.Drawing.Color Chartreuse { get => throw null; } + public static System.Drawing.Color Chocolate { get => throw null; } + // Stub generator skipped constructor + public static System.Drawing.Color Coral { get => throw null; } + public static System.Drawing.Color CornflowerBlue { get => throw null; } + public static System.Drawing.Color Cornsilk { get => throw null; } + public static System.Drawing.Color Crimson { get => throw null; } + public static System.Drawing.Color Cyan { get => throw null; } + public static System.Drawing.Color DarkBlue { get => throw null; } + public static System.Drawing.Color DarkCyan { get => throw null; } + public static System.Drawing.Color DarkGoldenrod { get => throw null; } + public static System.Drawing.Color DarkGray { get => throw null; } + public static System.Drawing.Color DarkGreen { get => throw null; } + public static System.Drawing.Color DarkKhaki { get => throw null; } + public static System.Drawing.Color DarkMagenta { get => throw null; } + public static System.Drawing.Color DarkOliveGreen { get => throw null; } + public static System.Drawing.Color DarkOrange { get => throw null; } + public static System.Drawing.Color DarkOrchid { get => throw null; } + public static System.Drawing.Color DarkRed { get => throw null; } + public static System.Drawing.Color DarkSalmon { get => throw null; } + public static System.Drawing.Color DarkSeaGreen { get => throw null; } + public static System.Drawing.Color DarkSlateBlue { get => throw null; } + public static System.Drawing.Color DarkSlateGray { get => throw null; } + public static System.Drawing.Color DarkTurquoise { get => throw null; } + public static System.Drawing.Color DarkViolet { get => throw null; } + public static System.Drawing.Color DeepPink { get => throw null; } + public static System.Drawing.Color DeepSkyBlue { get => throw null; } + public static System.Drawing.Color DimGray { get => throw null; } + public static System.Drawing.Color DodgerBlue { get => throw null; } + public static System.Drawing.Color Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.Color other) => throw null; + public static System.Drawing.Color Firebrick { get => throw null; } + public static System.Drawing.Color FloralWhite { get => throw null; } + public static System.Drawing.Color ForestGreen { get => throw null; } + public static System.Drawing.Color FromArgb(int red, int green, int blue) => throw null; + public static System.Drawing.Color FromArgb(int argb) => throw null; + public static System.Drawing.Color FromArgb(int alpha, int red, int green, int blue) => throw null; + public static System.Drawing.Color FromArgb(int alpha, System.Drawing.Color baseColor) => throw null; + public static System.Drawing.Color FromKnownColor(System.Drawing.KnownColor color) => throw null; + public static System.Drawing.Color FromName(string name) => throw null; + public static System.Drawing.Color Fuchsia { get => throw null; } + public System.Byte G { get => throw null; } + public static System.Drawing.Color Gainsboro { get => throw null; } + public float GetBrightness() => throw null; + public override int GetHashCode() => throw null; + public float GetHue() => throw null; + public float GetSaturation() => throw null; + public static System.Drawing.Color GhostWhite { get => throw null; } + public static System.Drawing.Color Gold { get => throw null; } + public static System.Drawing.Color Goldenrod { get => throw null; } + public static System.Drawing.Color Gray { get => throw null; } + public static System.Drawing.Color Green { get => throw null; } + public static System.Drawing.Color GreenYellow { get => throw null; } + public static System.Drawing.Color Honeydew { get => throw null; } + public static System.Drawing.Color HotPink { get => throw null; } + public static System.Drawing.Color IndianRed { get => throw null; } + public static System.Drawing.Color Indigo { get => throw null; } + public bool IsEmpty { get => throw null; } + public bool IsKnownColor { get => throw null; } + public bool IsNamedColor { get => throw null; } + public bool IsSystemColor { get => throw null; } + public static System.Drawing.Color Ivory { get => throw null; } + public static System.Drawing.Color Khaki { get => throw null; } + public static System.Drawing.Color Lavender { get => throw null; } + public static System.Drawing.Color LavenderBlush { get => throw null; } + public static System.Drawing.Color LawnGreen { get => throw null; } + public static System.Drawing.Color LemonChiffon { get => throw null; } + public static System.Drawing.Color LightBlue { get => throw null; } + public static System.Drawing.Color LightCoral { get => throw null; } + public static System.Drawing.Color LightCyan { get => throw null; } + public static System.Drawing.Color LightGoldenrodYellow { get => throw null; } + public static System.Drawing.Color LightGray { get => throw null; } + public static System.Drawing.Color LightGreen { get => throw null; } + public static System.Drawing.Color LightPink { get => throw null; } + public static System.Drawing.Color LightSalmon { get => throw null; } + public static System.Drawing.Color LightSeaGreen { get => throw null; } + public static System.Drawing.Color LightSkyBlue { get => throw null; } + public static System.Drawing.Color LightSlateGray { get => throw null; } + public static System.Drawing.Color LightSteelBlue { get => throw null; } + public static System.Drawing.Color LightYellow { get => throw null; } + public static System.Drawing.Color Lime { get => throw null; } + public static System.Drawing.Color LimeGreen { get => throw null; } + public static System.Drawing.Color Linen { get => throw null; } + public static System.Drawing.Color Magenta { get => throw null; } + public static System.Drawing.Color Maroon { get => throw null; } + public static System.Drawing.Color MediumAquamarine { get => throw null; } + public static System.Drawing.Color MediumBlue { get => throw null; } + public static System.Drawing.Color MediumOrchid { get => throw null; } + public static System.Drawing.Color MediumPurple { get => throw null; } + public static System.Drawing.Color MediumSeaGreen { get => throw null; } + public static System.Drawing.Color MediumSlateBlue { get => throw null; } + public static System.Drawing.Color MediumSpringGreen { get => throw null; } + public static System.Drawing.Color MediumTurquoise { get => throw null; } + public static System.Drawing.Color MediumVioletRed { get => throw null; } + public static System.Drawing.Color MidnightBlue { get => throw null; } + public static System.Drawing.Color MintCream { get => throw null; } + public static System.Drawing.Color MistyRose { get => throw null; } + public static System.Drawing.Color Moccasin { get => throw null; } + public string Name { get => throw null; } + public static System.Drawing.Color NavajoWhite { get => throw null; } + public static System.Drawing.Color Navy { get => throw null; } + public static System.Drawing.Color OldLace { get => throw null; } + public static System.Drawing.Color Olive { get => throw null; } + public static System.Drawing.Color OliveDrab { get => throw null; } + public static System.Drawing.Color Orange { get => throw null; } + public static System.Drawing.Color OrangeRed { get => throw null; } + public static System.Drawing.Color Orchid { get => throw null; } + public static System.Drawing.Color PaleGoldenrod { get => throw null; } + public static System.Drawing.Color PaleGreen { get => throw null; } + public static System.Drawing.Color PaleTurquoise { get => throw null; } + public static System.Drawing.Color PaleVioletRed { get => throw null; } + public static System.Drawing.Color PapayaWhip { get => throw null; } + public static System.Drawing.Color PeachPuff { get => throw null; } + public static System.Drawing.Color Peru { get => throw null; } + public static System.Drawing.Color Pink { get => throw null; } + public static System.Drawing.Color Plum { get => throw null; } + public static System.Drawing.Color PowderBlue { get => throw null; } + public static System.Drawing.Color Purple { get => throw null; } + public System.Byte R { get => throw null; } + public static System.Drawing.Color Red { get => throw null; } + public static System.Drawing.Color RosyBrown { get => throw null; } + public static System.Drawing.Color RoyalBlue { get => throw null; } + public static System.Drawing.Color SaddleBrown { get => throw null; } + public static System.Drawing.Color Salmon { get => throw null; } + public static System.Drawing.Color SandyBrown { get => throw null; } + public static System.Drawing.Color SeaGreen { get => throw null; } + public static System.Drawing.Color SeaShell { get => throw null; } + public static System.Drawing.Color Sienna { get => throw null; } + public static System.Drawing.Color Silver { get => throw null; } + public static System.Drawing.Color SkyBlue { get => throw null; } + public static System.Drawing.Color SlateBlue { get => throw null; } + public static System.Drawing.Color SlateGray { get => throw null; } + public static System.Drawing.Color Snow { get => throw null; } + public static System.Drawing.Color SpringGreen { get => throw null; } + public static System.Drawing.Color SteelBlue { get => throw null; } + public static System.Drawing.Color Tan { get => throw null; } + public static System.Drawing.Color Teal { get => throw null; } + public static System.Drawing.Color Thistle { get => throw null; } + public int ToArgb() => throw null; + public System.Drawing.KnownColor ToKnownColor() => throw null; + public override string ToString() => throw null; + public static System.Drawing.Color Tomato { get => throw null; } + public static System.Drawing.Color Transparent { get => throw null; } + public static System.Drawing.Color Turquoise { get => throw null; } + public static System.Drawing.Color Violet { get => throw null; } + public static System.Drawing.Color Wheat { get => throw null; } + public static System.Drawing.Color White { get => throw null; } + public static System.Drawing.Color WhiteSmoke { get => throw null; } + public static System.Drawing.Color Yellow { get => throw null; } + public static System.Drawing.Color YellowGreen { get => throw null; } + } + + // Generated from `System.Drawing.ColorTranslator` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ColorTranslator + { + public static System.Drawing.Color FromHtml(string htmlColor) => throw null; + public static System.Drawing.Color FromOle(int oleColor) => throw null; + public static System.Drawing.Color FromWin32(int win32Color) => throw null; + public static string ToHtml(System.Drawing.Color c) => throw null; + public static int ToOle(System.Drawing.Color c) => throw null; + public static int ToWin32(System.Drawing.Color c) => throw null; + } + + // Generated from `System.Drawing.KnownColor` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum KnownColor + { + ActiveBorder, + ActiveCaption, + ActiveCaptionText, + AliceBlue, + AntiqueWhite, + AppWorkspace, + Aqua, + Aquamarine, + Azure, + Beige, + Bisque, + Black, + BlanchedAlmond, + Blue, + BlueViolet, + Brown, + BurlyWood, + ButtonFace, + ButtonHighlight, + ButtonShadow, + CadetBlue, + Chartreuse, + Chocolate, + Control, + ControlDark, + ControlDarkDark, + ControlLight, + ControlLightLight, + ControlText, + Coral, + CornflowerBlue, + Cornsilk, + Crimson, + Cyan, + DarkBlue, + DarkCyan, + DarkGoldenrod, + DarkGray, + DarkGreen, + DarkKhaki, + DarkMagenta, + DarkOliveGreen, + DarkOrange, + DarkOrchid, + DarkRed, + DarkSalmon, + DarkSeaGreen, + DarkSlateBlue, + DarkSlateGray, + DarkTurquoise, + DarkViolet, + DeepPink, + DeepSkyBlue, + Desktop, + DimGray, + DodgerBlue, + Firebrick, + FloralWhite, + ForestGreen, + Fuchsia, + Gainsboro, + GhostWhite, + Gold, + Goldenrod, + GradientActiveCaption, + GradientInactiveCaption, + Gray, + GrayText, + Green, + GreenYellow, + Highlight, + HighlightText, + Honeydew, + HotPink, + HotTrack, + InactiveBorder, + InactiveCaption, + InactiveCaptionText, + IndianRed, + Indigo, + Info, + InfoText, + Ivory, + Khaki, + // Stub generator skipped constructor + Lavender, + LavenderBlush, + LawnGreen, + LemonChiffon, + LightBlue, + LightCoral, + LightCyan, + LightGoldenrodYellow, + LightGray, + LightGreen, + LightPink, + LightSalmon, + LightSeaGreen, + LightSkyBlue, + LightSlateGray, + LightSteelBlue, + LightYellow, + Lime, + LimeGreen, + Linen, + Magenta, + Maroon, + MediumAquamarine, + MediumBlue, + MediumOrchid, + MediumPurple, + MediumSeaGreen, + MediumSlateBlue, + MediumSpringGreen, + MediumTurquoise, + MediumVioletRed, + Menu, + MenuBar, + MenuHighlight, + MenuText, + MidnightBlue, + MintCream, + MistyRose, + Moccasin, + NavajoWhite, + Navy, + OldLace, + Olive, + OliveDrab, + Orange, + OrangeRed, + Orchid, + PaleGoldenrod, + PaleGreen, + PaleTurquoise, + PaleVioletRed, + PapayaWhip, + PeachPuff, + Peru, + Pink, + Plum, + PowderBlue, + Purple, + Red, + RosyBrown, + RoyalBlue, + SaddleBrown, + Salmon, + SandyBrown, + ScrollBar, + SeaGreen, + SeaShell, + Sienna, + Silver, + SkyBlue, + SlateBlue, + SlateGray, + Snow, + SpringGreen, + SteelBlue, + Tan, + Teal, + Thistle, + Tomato, + Transparent, + Turquoise, + Violet, + Wheat, + White, + WhiteSmoke, + Window, + WindowFrame, + WindowText, + Yellow, + YellowGreen, + } + + // Generated from `System.Drawing.Point` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Point : System.IEquatable + { + public static bool operator !=(System.Drawing.Point left, System.Drawing.Point right) => throw null; + public static System.Drawing.Point operator +(System.Drawing.Point pt, System.Drawing.Size sz) => throw null; + public static System.Drawing.Point operator -(System.Drawing.Point pt, System.Drawing.Size sz) => throw null; + public static bool operator ==(System.Drawing.Point left, System.Drawing.Point right) => throw null; + public static System.Drawing.Point Add(System.Drawing.Point pt, System.Drawing.Size sz) => throw null; + public static System.Drawing.Point Ceiling(System.Drawing.PointF value) => throw null; + public static System.Drawing.Point Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.Point other) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public void Offset(int dx, int dy) => throw null; + public void Offset(System.Drawing.Point p) => throw null; + public Point(int x, int y) => throw null; + public Point(int dw) => throw null; + public Point(System.Drawing.Size sz) => throw null; + // Stub generator skipped constructor + public static System.Drawing.Point Round(System.Drawing.PointF value) => throw null; + public static System.Drawing.Point Subtract(System.Drawing.Point pt, System.Drawing.Size sz) => throw null; + public override string ToString() => throw null; + public static System.Drawing.Point Truncate(System.Drawing.PointF value) => throw null; + public int X { get => throw null; set => throw null; } + public int Y { get => throw null; set => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Drawing.PointF` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PointF : System.IEquatable + { + public static bool operator !=(System.Drawing.PointF left, System.Drawing.PointF right) => throw null; + public static System.Drawing.PointF operator +(System.Drawing.PointF pt, System.Drawing.SizeF sz) => throw null; + public static System.Drawing.PointF operator +(System.Drawing.PointF pt, System.Drawing.Size sz) => throw null; + public static System.Drawing.PointF operator -(System.Drawing.PointF pt, System.Drawing.SizeF sz) => throw null; + public static System.Drawing.PointF operator -(System.Drawing.PointF pt, System.Drawing.Size sz) => throw null; + public static bool operator ==(System.Drawing.PointF left, System.Drawing.PointF right) => throw null; + public static System.Drawing.PointF Add(System.Drawing.PointF pt, System.Drawing.SizeF sz) => throw null; + public static System.Drawing.PointF Add(System.Drawing.PointF pt, System.Drawing.Size sz) => throw null; + public static System.Drawing.PointF Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.PointF other) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public PointF(float x, float y) => throw null; + // Stub generator skipped constructor + public static System.Drawing.PointF Subtract(System.Drawing.PointF pt, System.Drawing.SizeF sz) => throw null; + public static System.Drawing.PointF Subtract(System.Drawing.PointF pt, System.Drawing.Size sz) => throw null; + public override string ToString() => throw null; + public float X { get => throw null; set => throw null; } + public float Y { get => throw null; set => throw null; } + } + + // Generated from `System.Drawing.Rectangle` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Rectangle : System.IEquatable + { + public static bool operator !=(System.Drawing.Rectangle left, System.Drawing.Rectangle right) => throw null; + public static bool operator ==(System.Drawing.Rectangle left, System.Drawing.Rectangle right) => throw null; + public int Bottom { get => throw null; } + public static System.Drawing.Rectangle Ceiling(System.Drawing.RectangleF value) => throw null; + public bool Contains(int x, int y) => throw null; + public bool Contains(System.Drawing.Rectangle rect) => throw null; + public bool Contains(System.Drawing.Point pt) => throw null; + public static System.Drawing.Rectangle Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.Rectangle other) => throw null; + public static System.Drawing.Rectangle FromLTRB(int left, int top, int right, int bottom) => throw null; + public override int GetHashCode() => throw null; + public int Height { get => throw null; set => throw null; } + public void Inflate(int width, int height) => throw null; + public void Inflate(System.Drawing.Size size) => throw null; + public static System.Drawing.Rectangle Inflate(System.Drawing.Rectangle rect, int x, int y) => throw null; + public void Intersect(System.Drawing.Rectangle rect) => throw null; + public static System.Drawing.Rectangle Intersect(System.Drawing.Rectangle a, System.Drawing.Rectangle b) => throw null; + public bool IntersectsWith(System.Drawing.Rectangle rect) => throw null; + public bool IsEmpty { get => throw null; } + public int Left { get => throw null; } + public System.Drawing.Point Location { get => throw null; set => throw null; } + public void Offset(int x, int y) => throw null; + public void Offset(System.Drawing.Point pos) => throw null; + public Rectangle(int x, int y, int width, int height) => throw null; + public Rectangle(System.Drawing.Point location, System.Drawing.Size size) => throw null; + // Stub generator skipped constructor + public int Right { get => throw null; } + public static System.Drawing.Rectangle Round(System.Drawing.RectangleF value) => throw null; + public System.Drawing.Size Size { get => throw null; set => throw null; } + public override string ToString() => throw null; + public int Top { get => throw null; } + public static System.Drawing.Rectangle Truncate(System.Drawing.RectangleF value) => throw null; + public static System.Drawing.Rectangle Union(System.Drawing.Rectangle a, System.Drawing.Rectangle b) => throw null; + public int Width { get => throw null; set => throw null; } + public int X { get => throw null; set => throw null; } + public int Y { get => throw null; set => throw null; } + } + + // Generated from `System.Drawing.RectangleF` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RectangleF : System.IEquatable + { + public static bool operator !=(System.Drawing.RectangleF left, System.Drawing.RectangleF right) => throw null; + public static bool operator ==(System.Drawing.RectangleF left, System.Drawing.RectangleF right) => throw null; + public float Bottom { get => throw null; } + public bool Contains(float x, float y) => throw null; + public bool Contains(System.Drawing.RectangleF rect) => throw null; + public bool Contains(System.Drawing.PointF pt) => throw null; + public static System.Drawing.RectangleF Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.RectangleF other) => throw null; + public static System.Drawing.RectangleF FromLTRB(float left, float top, float right, float bottom) => throw null; + public override int GetHashCode() => throw null; + public float Height { get => throw null; set => throw null; } + public void Inflate(float x, float y) => throw null; + public void Inflate(System.Drawing.SizeF size) => throw null; + public static System.Drawing.RectangleF Inflate(System.Drawing.RectangleF rect, float x, float y) => throw null; + public void Intersect(System.Drawing.RectangleF rect) => throw null; + public static System.Drawing.RectangleF Intersect(System.Drawing.RectangleF a, System.Drawing.RectangleF b) => throw null; + public bool IntersectsWith(System.Drawing.RectangleF rect) => throw null; + public bool IsEmpty { get => throw null; } + public float Left { get => throw null; } + public System.Drawing.PointF Location { get => throw null; set => throw null; } + public void Offset(float x, float y) => throw null; + public void Offset(System.Drawing.PointF pos) => throw null; + public RectangleF(float x, float y, float width, float height) => throw null; + public RectangleF(System.Drawing.PointF location, System.Drawing.SizeF size) => throw null; + // Stub generator skipped constructor + public float Right { get => throw null; } + public System.Drawing.SizeF Size { get => throw null; set => throw null; } + public override string ToString() => throw null; + public float Top { get => throw null; } + public static System.Drawing.RectangleF Union(System.Drawing.RectangleF a, System.Drawing.RectangleF b) => throw null; + public float Width { get => throw null; set => throw null; } + public float X { get => throw null; set => throw null; } + public float Y { get => throw null; set => throw null; } + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Drawing.Size` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Size : System.IEquatable + { + public static bool operator !=(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public static System.Drawing.SizeF operator *(float left, System.Drawing.Size right) => throw null; + public static System.Drawing.SizeF operator *(System.Drawing.Size left, float right) => throw null; + public static System.Drawing.Size operator *(int left, System.Drawing.Size right) => throw null; + public static System.Drawing.Size operator *(System.Drawing.Size left, int right) => throw null; + public static System.Drawing.Size operator +(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public static System.Drawing.Size operator -(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public static System.Drawing.SizeF operator /(System.Drawing.Size left, float right) => throw null; + public static System.Drawing.Size operator /(System.Drawing.Size left, int right) => throw null; + public static bool operator ==(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public static System.Drawing.Size Add(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public static System.Drawing.Size Ceiling(System.Drawing.SizeF value) => throw null; + public static System.Drawing.Size Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.Size other) => throw null; + public override int GetHashCode() => throw null; + public int Height { get => throw null; set => throw null; } + public bool IsEmpty { get => throw null; } + public static System.Drawing.Size Round(System.Drawing.SizeF value) => throw null; + public Size(int width, int height) => throw null; + public Size(System.Drawing.Point pt) => throw null; + // Stub generator skipped constructor + public static System.Drawing.Size Subtract(System.Drawing.Size sz1, System.Drawing.Size sz2) => throw null; + public override string ToString() => throw null; + public static System.Drawing.Size Truncate(System.Drawing.SizeF value) => throw null; + public int Width { get => throw null; set => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Drawing.SizeF` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SizeF : System.IEquatable + { + public static bool operator !=(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public static System.Drawing.SizeF operator *(float left, System.Drawing.SizeF right) => throw null; + public static System.Drawing.SizeF operator *(System.Drawing.SizeF left, float right) => throw null; + public static System.Drawing.SizeF operator +(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public static System.Drawing.SizeF operator -(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public static System.Drawing.SizeF operator /(System.Drawing.SizeF left, float right) => throw null; + public static bool operator ==(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public static System.Drawing.SizeF Add(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public static System.Drawing.SizeF Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Drawing.SizeF other) => throw null; + public override int GetHashCode() => throw null; + public float Height { get => throw null; set => throw null; } + public bool IsEmpty { get => throw null; } + public SizeF(float width, float height) => throw null; + public SizeF(System.Drawing.SizeF size) => throw null; + public SizeF(System.Drawing.PointF pt) => throw null; + // Stub generator skipped constructor + public static System.Drawing.SizeF Subtract(System.Drawing.SizeF sz1, System.Drawing.SizeF sz2) => throw null; + public System.Drawing.PointF ToPointF() => throw null; + public System.Drawing.Size ToSize() => throw null; + public override string ToString() => throw null; + public float Width { get => throw null; set => throw null; } + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Drawing.SystemColors` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SystemColors + { + public static System.Drawing.Color ActiveBorder { get => throw null; } + public static System.Drawing.Color ActiveCaption { get => throw null; } + public static System.Drawing.Color ActiveCaptionText { get => throw null; } + public static System.Drawing.Color AppWorkspace { get => throw null; } + public static System.Drawing.Color ButtonFace { get => throw null; } + public static System.Drawing.Color ButtonHighlight { get => throw null; } + public static System.Drawing.Color ButtonShadow { get => throw null; } + public static System.Drawing.Color Control { get => throw null; } + public static System.Drawing.Color ControlDark { get => throw null; } + public static System.Drawing.Color ControlDarkDark { get => throw null; } + public static System.Drawing.Color ControlLight { get => throw null; } + public static System.Drawing.Color ControlLightLight { get => throw null; } + public static System.Drawing.Color ControlText { get => throw null; } + public static System.Drawing.Color Desktop { get => throw null; } + public static System.Drawing.Color GradientActiveCaption { get => throw null; } + public static System.Drawing.Color GradientInactiveCaption { get => throw null; } + public static System.Drawing.Color GrayText { get => throw null; } + public static System.Drawing.Color Highlight { get => throw null; } + public static System.Drawing.Color HighlightText { get => throw null; } + public static System.Drawing.Color HotTrack { get => throw null; } + public static System.Drawing.Color InactiveBorder { get => throw null; } + public static System.Drawing.Color InactiveCaption { get => throw null; } + public static System.Drawing.Color InactiveCaptionText { get => throw null; } + public static System.Drawing.Color Info { get => throw null; } + public static System.Drawing.Color InfoText { get => throw null; } + public static System.Drawing.Color Menu { get => throw null; } + public static System.Drawing.Color MenuBar { get => throw null; } + public static System.Drawing.Color MenuHighlight { get => throw null; } + public static System.Drawing.Color MenuText { get => throw null; } + public static System.Drawing.Color ScrollBar { get => throw null; } + public static System.Drawing.Color Window { get => throw null; } + public static System.Drawing.Color WindowFrame { get => throw null; } + public static System.Drawing.Color WindowText { get => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs new file mode 100644 index 000000000000..60fe85fa264c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs @@ -0,0 +1,299 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } + namespace Formats + { + namespace Asn1 + { + // Generated from `System.Formats.Asn1.Asn1Tag` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Asn1Tag : System.IEquatable + { + public static bool operator !=(System.Formats.Asn1.Asn1Tag left, System.Formats.Asn1.Asn1Tag right) => throw null; + public static bool operator ==(System.Formats.Asn1.Asn1Tag left, System.Formats.Asn1.Asn1Tag right) => throw null; + public System.Formats.Asn1.Asn1Tag AsConstructed() => throw null; + public System.Formats.Asn1.Asn1Tag AsPrimitive() => throw null; + public Asn1Tag(System.Formats.Asn1.UniversalTagNumber universalTagNumber, bool isConstructed = default(bool)) => throw null; + public Asn1Tag(System.Formats.Asn1.TagClass tagClass, int tagValue, bool isConstructed = default(bool)) => throw null; + // Stub generator skipped constructor + public static System.Formats.Asn1.Asn1Tag Boolean; + public int CalculateEncodedSize() => throw null; + public static System.Formats.Asn1.Asn1Tag ConstructedBitString; + public static System.Formats.Asn1.Asn1Tag ConstructedOctetString; + public static System.Formats.Asn1.Asn1Tag Decode(System.ReadOnlySpan source, out int bytesConsumed) => throw null; + public int Encode(System.Span destination) => throw null; + public static System.Formats.Asn1.Asn1Tag Enumerated; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Formats.Asn1.Asn1Tag other) => throw null; + public static System.Formats.Asn1.Asn1Tag GeneralizedTime; + public override int GetHashCode() => throw null; + public bool HasSameClassAndValue(System.Formats.Asn1.Asn1Tag other) => throw null; + public static System.Formats.Asn1.Asn1Tag Integer; + public bool IsConstructed { get => throw null; } + public static System.Formats.Asn1.Asn1Tag Null; + public static System.Formats.Asn1.Asn1Tag ObjectIdentifier; + public static System.Formats.Asn1.Asn1Tag PrimitiveBitString; + public static System.Formats.Asn1.Asn1Tag PrimitiveOctetString; + public static System.Formats.Asn1.Asn1Tag Sequence; + public static System.Formats.Asn1.Asn1Tag SetOf; + public System.Formats.Asn1.TagClass TagClass { get => throw null; } + public int TagValue { get => throw null; } + public override string ToString() => throw null; + public static bool TryDecode(System.ReadOnlySpan source, out System.Formats.Asn1.Asn1Tag tag, out int bytesConsumed) => throw null; + public bool TryEncode(System.Span destination, out int bytesWritten) => throw null; + public static System.Formats.Asn1.Asn1Tag UtcTime; + } + + // Generated from `System.Formats.Asn1.AsnContentException` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AsnContentException : System.Exception + { + public AsnContentException(string message, System.Exception inner) => throw null; + public AsnContentException(string message) => throw null; + public AsnContentException() => throw null; + protected AsnContentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Formats.Asn1.AsnDecoder` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class AsnDecoder + { + public static System.Byte[] ReadBitString(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int unusedBitCount, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool ReadBoolean(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static string ReadCharacterString(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Formats.Asn1.UniversalTagNumber encodingType, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.Formats.Asn1.Asn1Tag ReadEncodedValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int contentOffset, out int contentLength, out int bytesConsumed) => throw null; + public static System.ReadOnlySpan ReadEnumeratedBytes(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static TEnum ReadEnumeratedValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) where TEnum : System.Enum => throw null; + public static System.Enum ReadEnumeratedValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Type enumType, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.DateTimeOffset ReadGeneralizedTime(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.Numerics.BigInteger ReadInteger(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.ReadOnlySpan ReadIntegerBytes(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.Collections.BitArray ReadNamedBitList(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static TFlagsEnum ReadNamedBitListValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) where TFlagsEnum : System.Enum => throw null; + public static System.Enum ReadNamedBitListValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Type flagsEnumType, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static void ReadNull(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static string ReadObjectIdentifier(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.Byte[] ReadOctetString(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static void ReadSequence(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int contentOffset, out int contentLength, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static void ReadSetOf(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int contentOffset, out int contentLength, out int bytesConsumed, bool skipSortOrderValidation = default(bool), System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static System.DateTimeOffset ReadUtcTime(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, int twoDigitYearMax = default(int), System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadBitString(System.ReadOnlySpan source, System.Span destination, System.Formats.Asn1.AsnEncodingRules ruleSet, out int unusedBitCount, out int bytesConsumed, out int bytesWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadCharacterString(System.ReadOnlySpan source, System.Span destination, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Formats.Asn1.UniversalTagNumber encodingType, out int bytesConsumed, out int charsWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadCharacterStringBytes(System.ReadOnlySpan source, System.Span destination, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Formats.Asn1.Asn1Tag expectedTag, out int bytesConsumed, out int bytesWritten) => throw null; + public static bool TryReadEncodedValue(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out System.Formats.Asn1.Asn1Tag tag, out int contentOffset, out int contentLength, out int bytesConsumed) => throw null; + public static bool TryReadInt32(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadInt64(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out System.Int64 value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadOctetString(System.ReadOnlySpan source, System.Span destination, System.Formats.Asn1.AsnEncodingRules ruleSet, out int bytesConsumed, out int bytesWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadPrimitiveBitString(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out int unusedBitCount, out System.ReadOnlySpan value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadPrimitiveCharacterStringBytes(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Formats.Asn1.Asn1Tag expectedTag, out System.ReadOnlySpan value, out int bytesConsumed) => throw null; + public static bool TryReadPrimitiveOctetString(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out System.ReadOnlySpan value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadUInt32(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out System.UInt32 value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public static bool TryReadUInt64(System.ReadOnlySpan source, System.Formats.Asn1.AsnEncodingRules ruleSet, out System.UInt64 value, out int bytesConsumed, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + } + + // Generated from `System.Formats.Asn1.AsnEncodingRules` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum AsnEncodingRules + { + // Stub generator skipped constructor + BER, + CER, + DER, + } + + // Generated from `System.Formats.Asn1.AsnReader` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AsnReader + { + public AsnReader(System.ReadOnlyMemory data, System.Formats.Asn1.AsnEncodingRules ruleSet, System.Formats.Asn1.AsnReaderOptions options = default(System.Formats.Asn1.AsnReaderOptions)) => throw null; + public bool HasData { get => throw null; } + public System.ReadOnlyMemory PeekContentBytes() => throw null; + public System.ReadOnlyMemory PeekEncodedValue() => throw null; + public System.Formats.Asn1.Asn1Tag PeekTag() => throw null; + public System.Byte[] ReadBitString(out int unusedBitCount, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool ReadBoolean(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public string ReadCharacterString(System.Formats.Asn1.UniversalTagNumber encodingType, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.ReadOnlyMemory ReadEncodedValue() => throw null; + public System.ReadOnlyMemory ReadEnumeratedBytes(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public TEnum ReadEnumeratedValue(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) where TEnum : System.Enum => throw null; + public System.Enum ReadEnumeratedValue(System.Type enumType, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.DateTimeOffset ReadGeneralizedTime(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Numerics.BigInteger ReadInteger(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.ReadOnlyMemory ReadIntegerBytes(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Collections.BitArray ReadNamedBitList(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public TFlagsEnum ReadNamedBitListValue(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) where TFlagsEnum : System.Enum => throw null; + public System.Enum ReadNamedBitListValue(System.Type flagsEnumType, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void ReadNull(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public string ReadObjectIdentifier(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Byte[] ReadOctetString(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnReader ReadSequence(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnReader ReadSetOf(bool skipSortOrderValidation, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnReader ReadSetOf(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.DateTimeOffset ReadUtcTime(int twoDigitYearMax, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.DateTimeOffset ReadUtcTime(System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnEncodingRules RuleSet { get => throw null; } + public void ThrowIfNotEmpty() => throw null; + public bool TryReadBitString(System.Span destination, out int unusedBitCount, out int bytesWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadCharacterString(System.Span destination, System.Formats.Asn1.UniversalTagNumber encodingType, out int charsWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadCharacterStringBytes(System.Span destination, System.Formats.Asn1.Asn1Tag expectedTag, out int bytesWritten) => throw null; + public bool TryReadInt32(out int value, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadInt64(out System.Int64 value, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadOctetString(System.Span destination, out int bytesWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadPrimitiveBitString(out int unusedBitCount, out System.ReadOnlyMemory value, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadPrimitiveCharacterStringBytes(System.Formats.Asn1.Asn1Tag expectedTag, out System.ReadOnlyMemory contents) => throw null; + public bool TryReadPrimitiveOctetString(out System.ReadOnlyMemory contents, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadUInt32(out System.UInt32 value, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public bool TryReadUInt64(out System.UInt64 value, System.Formats.Asn1.Asn1Tag? expectedTag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + } + + // Generated from `System.Formats.Asn1.AsnReaderOptions` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct AsnReaderOptions + { + // Stub generator skipped constructor + public bool SkipSetSortOrderVerification { get => throw null; set => throw null; } + public int UtcTimeTwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Formats.Asn1.AsnWriter` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AsnWriter + { + public AsnWriter(System.Formats.Asn1.AsnEncodingRules ruleSet) => throw null; + public void CopyTo(System.Formats.Asn1.AsnWriter destination) => throw null; + public int Encode(System.Span destination) => throw null; + public System.Byte[] Encode() => throw null; + public bool EncodedValueEquals(System.ReadOnlySpan other) => throw null; + public bool EncodedValueEquals(System.Formats.Asn1.AsnWriter other) => throw null; + public int GetEncodedLength() => throw null; + public void PopOctetString(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void PopSequence(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void PopSetOf(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnWriter.Scope PushOctetString(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnWriter.Scope PushSequence(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public System.Formats.Asn1.AsnWriter.Scope PushSetOf(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void Reset() => throw null; + public System.Formats.Asn1.AsnEncodingRules RuleSet { get => throw null; } + // Generated from `System.Formats.Asn1.AsnWriter.Scope` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Scope : System.IDisposable + { + public void Dispose() => throw null; + // Stub generator skipped constructor + } + + + public bool TryEncode(System.Span destination, out int bytesWritten) => throw null; + public void WriteBitString(System.ReadOnlySpan value, int unusedBitCount = default(int), System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteBoolean(bool value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteCharacterString(System.Formats.Asn1.UniversalTagNumber encodingType, string value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteCharacterString(System.Formats.Asn1.UniversalTagNumber encodingType, System.ReadOnlySpan str, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteEncodedValue(System.ReadOnlySpan value) => throw null; + public void WriteEnumeratedValue(TEnum value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) where TEnum : System.Enum => throw null; + public void WriteEnumeratedValue(System.Enum value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteGeneralizedTime(System.DateTimeOffset value, bool omitFractionalSeconds = default(bool), System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteInteger(System.UInt64 value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteInteger(System.ReadOnlySpan value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteInteger(System.Numerics.BigInteger value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteInteger(System.Int64 value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteIntegerUnsigned(System.ReadOnlySpan value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteNamedBitList(TEnum value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) where TEnum : System.Enum => throw null; + public void WriteNamedBitList(System.Enum value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteNamedBitList(System.Collections.BitArray value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteNull(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteObjectIdentifier(string oidValue, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteObjectIdentifier(System.ReadOnlySpan oidValue, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteOctetString(System.ReadOnlySpan value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteUtcTime(System.DateTimeOffset value, int twoDigitYearMax, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + public void WriteUtcTime(System.DateTimeOffset value, System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; + } + + // Generated from `System.Formats.Asn1.TagClass` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TagClass + { + Application, + ContextSpecific, + Private, + // Stub generator skipped constructor + Universal, + } + + // Generated from `System.Formats.Asn1.UniversalTagNumber` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum UniversalTagNumber + { + BMPString, + BitString, + Boolean, + Date, + DateTime, + Duration, + Embedded, + EndOfContents, + Enumerated, + External, + GeneralString, + GeneralizedTime, + GraphicString, + IA5String, + ISO646String, + InstanceOf, + Integer, + Null, + NumericString, + ObjectDescriptor, + ObjectIdentifier, + ObjectIdentifierIRI, + OctetString, + PrintableString, + Real, + RelativeObjectIdentifier, + RelativeObjectIdentifierIRI, + Sequence, + SequenceOf, + Set, + SetOf, + T61String, + TeletexString, + Time, + TimeOfDay, + UTF8String, + UniversalString, + // Stub generator skipped constructor + UnrestrictedCharacterString, + UtcTime, + VideotexString, + VisibleString, + } + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs new file mode 100644 index 000000000000..c0a348d3ed24 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs @@ -0,0 +1,66 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + namespace Compression + { + // Generated from `System.IO.Compression.BrotliDecoder` in `System.IO.Compression.Brotli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public struct BrotliDecoder : System.IDisposable + { + // Stub generator skipped constructor + public System.Buffers.OperationStatus Decompress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten) => throw null; + public void Dispose() => throw null; + public static bool TryDecompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.IO.Compression.BrotliEncoder` in `System.IO.Compression.Brotli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public struct BrotliEncoder : System.IDisposable + { + public BrotliEncoder(int quality, int window) => throw null; + // Stub generator skipped constructor + public System.Buffers.OperationStatus Compress(System.ReadOnlySpan source, System.Span destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock) => throw null; + public void Dispose() => throw null; + public System.Buffers.OperationStatus Flush(System.Span destination, out int bytesWritten) => throw null; + public static int GetMaxCompressedLength(int inputSize) => throw null; + public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten, int quality, int window) => throw null; + public static bool TryCompress(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.IO.Compression.BrotliStream` in `System.IO.Compression.Brotli, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public class BrotliStream : System.IO.Stream + { + public System.IO.Stream BaseStream { get => throw null; } + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public BrotliStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) => throw null; + public BrotliStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) => throw null; + public BrotliStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) => throw null; + public BrotliStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs new file mode 100644 index 000000000000..537983993342 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs @@ -0,0 +1,37 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + namespace Compression + { + // Generated from `System.IO.Compression.ZipFile` in `System.IO.Compression.ZipFile, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public static class ZipFile + { + public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory, System.Text.Encoding entryNameEncoding) => throw null; + public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName, System.IO.Compression.CompressionLevel compressionLevel, bool includeBaseDirectory) => throw null; + public static void CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName) => throw null; + public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, bool overwriteFiles) => throw null; + public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding entryNameEncoding, bool overwriteFiles) => throw null; + public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName, System.Text.Encoding entryNameEncoding) => throw null; + public static void ExtractToDirectory(string sourceArchiveFileName, string destinationDirectoryName) => throw null; + public static System.IO.Compression.ZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode, System.Text.Encoding entryNameEncoding) => throw null; + public static System.IO.Compression.ZipArchive Open(string archiveFileName, System.IO.Compression.ZipArchiveMode mode) => throw null; + public static System.IO.Compression.ZipArchive OpenRead(string archiveFileName) => throw null; + } + + // Generated from `System.IO.Compression.ZipFileExtensions` in `System.IO.Compression.ZipFile, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public static class ZipFileExtensions + { + public static System.IO.Compression.ZipArchiveEntry CreateEntryFromFile(this System.IO.Compression.ZipArchive destination, string sourceFileName, string entryName, System.IO.Compression.CompressionLevel compressionLevel) => throw null; + public static System.IO.Compression.ZipArchiveEntry CreateEntryFromFile(this System.IO.Compression.ZipArchive destination, string sourceFileName, string entryName) => throw null; + public static void ExtractToDirectory(this System.IO.Compression.ZipArchive source, string destinationDirectoryName, bool overwriteFiles) => throw null; + public static void ExtractToDirectory(this System.IO.Compression.ZipArchive source, string destinationDirectoryName) => throw null; + public static void ExtractToFile(this System.IO.Compression.ZipArchiveEntry source, string destinationFileName, bool overwrite) => throw null; + public static void ExtractToFile(this System.IO.Compression.ZipArchiveEntry source, string destinationFileName) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs new file mode 100644 index 000000000000..6e00d357f34d --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs @@ -0,0 +1,141 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + namespace Compression + { + // Generated from `System.IO.Compression.CompressionLevel` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public enum CompressionLevel + { + // Stub generator skipped constructor + Fastest, + NoCompression, + Optimal, + } + + // Generated from `System.IO.Compression.CompressionMode` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public enum CompressionMode + { + Compress, + // Stub generator skipped constructor + Decompress, + } + + // Generated from `System.IO.Compression.DeflateStream` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public class DeflateStream : System.IO.Stream + { + public System.IO.Stream BaseStream { get => throw null; } + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override void CopyTo(System.IO.Stream destination, int bufferSize) => throw null; + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) => throw null; + public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) => throw null; + public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) => throw null; + public DeflateStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.IO.Compression.GZipStream` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public class GZipStream : System.IO.Stream + { + public System.IO.Stream BaseStream { get => throw null; } + public override System.IAsyncResult BeginRead(System.Byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] array, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override void CopyTo(System.IO.Stream destination, int bufferSize) => throw null; + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen) => throw null; + public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionMode mode) => throw null; + public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen) => throw null; + public GZipStream(System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.IO.Compression.ZipArchive` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public class ZipArchive : System.IDisposable + { + public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName, System.IO.Compression.CompressionLevel compressionLevel) => throw null; + public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Entries { get => throw null; } + public System.IO.Compression.ZipArchiveEntry GetEntry(string entryName) => throw null; + public System.IO.Compression.ZipArchiveMode Mode { get => throw null; } + public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen, System.Text.Encoding entryNameEncoding) => throw null; + public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen) => throw null; + public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode) => throw null; + public ZipArchive(System.IO.Stream stream) => throw null; + } + + // Generated from `System.IO.Compression.ZipArchiveEntry` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public class ZipArchiveEntry + { + public System.IO.Compression.ZipArchive Archive { get => throw null; } + public System.Int64 CompressedLength { get => throw null; } + public System.UInt32 Crc32 { get => throw null; } + public void Delete() => throw null; + public int ExternalAttributes { get => throw null; set => throw null; } + public string FullName { get => throw null; } + public System.DateTimeOffset LastWriteTime { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public System.IO.Stream Open() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.IO.Compression.ZipArchiveMode` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` + public enum ZipArchiveMode + { + Create, + Read, + Update, + // Stub generator skipped constructor + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs new file mode 100644 index 000000000000..889cf3027043 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs @@ -0,0 +1,48 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + // Generated from `System.IO.DriveInfo` in `System.IO.FileSystem.DriveInfo, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DriveInfo : System.Runtime.Serialization.ISerializable + { + public System.Int64 AvailableFreeSpace { get => throw null; } + public string DriveFormat { get => throw null; } + public DriveInfo(string driveName) => throw null; + public System.IO.DriveType DriveType { get => throw null; } + public static System.IO.DriveInfo[] GetDrives() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool IsReady { get => throw null; } + public string Name { get => throw null; } + public System.IO.DirectoryInfo RootDirectory { get => throw null; } + public override string ToString() => throw null; + public System.Int64 TotalFreeSpace { get => throw null; } + public System.Int64 TotalSize { get => throw null; } + public string VolumeLabel { get => throw null; set => throw null; } + } + + // Generated from `System.IO.DriveNotFoundException` in `System.IO.FileSystem.DriveInfo, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DriveNotFoundException : System.IO.IOException + { + public DriveNotFoundException(string message, System.Exception innerException) => throw null; + public DriveNotFoundException(string message) => throw null; + public DriveNotFoundException() => throw null; + protected DriveNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.DriveType` in `System.IO.FileSystem.DriveInfo, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DriveType + { + CDRom, + // Stub generator skipped constructor + Fixed, + Network, + NoRootDirectory, + Ram, + Removable, + Unknown, + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs new file mode 100644 index 000000000000..a5fd93fb6b88 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs @@ -0,0 +1,119 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + // Generated from `System.IO.ErrorEventArgs` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ErrorEventArgs : System.EventArgs + { + public ErrorEventArgs(System.Exception exception) => throw null; + public virtual System.Exception GetException() => throw null; + } + + // Generated from `System.IO.ErrorEventHandler` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ErrorEventHandler(object sender, System.IO.ErrorEventArgs e); + + // Generated from `System.IO.FileSystemEventArgs` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileSystemEventArgs : System.EventArgs + { + public System.IO.WatcherChangeTypes ChangeType { get => throw null; } + public FileSystemEventArgs(System.IO.WatcherChangeTypes changeType, string directory, string name) => throw null; + public string FullPath { get => throw null; } + public string Name { get => throw null; } + } + + // Generated from `System.IO.FileSystemEventHandler` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void FileSystemEventHandler(object sender, System.IO.FileSystemEventArgs e); + + // Generated from `System.IO.FileSystemWatcher` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileSystemWatcher : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize + { + public void BeginInit() => throw null; + public event System.IO.FileSystemEventHandler Changed; + public event System.IO.FileSystemEventHandler Created; + public event System.IO.FileSystemEventHandler Deleted; + protected override void Dispose(bool disposing) => throw null; + public bool EnableRaisingEvents { get => throw null; set => throw null; } + public void EndInit() => throw null; + public event System.IO.ErrorEventHandler Error; + public FileSystemWatcher(string path, string filter) => throw null; + public FileSystemWatcher(string path) => throw null; + public FileSystemWatcher() => throw null; + public string Filter { get => throw null; set => throw null; } + public System.Collections.ObjectModel.Collection Filters { get => throw null; } + public bool IncludeSubdirectories { get => throw null; set => throw null; } + public int InternalBufferSize { get => throw null; set => throw null; } + public System.IO.NotifyFilters NotifyFilter { get => throw null; set => throw null; } + protected void OnChanged(System.IO.FileSystemEventArgs e) => throw null; + protected void OnCreated(System.IO.FileSystemEventArgs e) => throw null; + protected void OnDeleted(System.IO.FileSystemEventArgs e) => throw null; + protected void OnError(System.IO.ErrorEventArgs e) => throw null; + protected void OnRenamed(System.IO.RenamedEventArgs e) => throw null; + public string Path { get => throw null; set => throw null; } + public event System.IO.RenamedEventHandler Renamed; + public override System.ComponentModel.ISite Site { get => throw null; set => throw null; } + public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get => throw null; set => throw null; } + public System.IO.WaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout) => throw null; + public System.IO.WaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType) => throw null; + } + + // Generated from `System.IO.InternalBufferOverflowException` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InternalBufferOverflowException : System.SystemException + { + public InternalBufferOverflowException(string message, System.Exception inner) => throw null; + public InternalBufferOverflowException(string message) => throw null; + public InternalBufferOverflowException() => throw null; + protected InternalBufferOverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.NotifyFilters` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum NotifyFilters + { + Attributes, + CreationTime, + DirectoryName, + FileName, + LastAccess, + LastWrite, + // Stub generator skipped constructor + Security, + Size, + } + + // Generated from `System.IO.RenamedEventArgs` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RenamedEventArgs : System.IO.FileSystemEventArgs + { + public string OldFullPath { get => throw null; } + public string OldName { get => throw null; } + public RenamedEventArgs(System.IO.WatcherChangeTypes changeType, string directory, string name, string oldName) : base(default(System.IO.WatcherChangeTypes), default(string), default(string)) => throw null; + } + + // Generated from `System.IO.RenamedEventHandler` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void RenamedEventHandler(object sender, System.IO.RenamedEventArgs e); + + // Generated from `System.IO.WaitForChangedResult` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct WaitForChangedResult + { + public System.IO.WatcherChangeTypes ChangeType { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string OldName { get => throw null; set => throw null; } + public bool TimedOut { get => throw null; set => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.IO.WatcherChangeTypes` in `System.IO.FileSystem.Watcher, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum WatcherChangeTypes + { + All, + Changed, + Created, + Deleted, + Renamed, + // Stub generator skipped constructor + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs new file mode 100644 index 000000000000..d0c65750cf5b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs @@ -0,0 +1,330 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + // Generated from `System.IO.Directory` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Directory + { + public static System.IO.DirectoryInfo CreateDirectory(string path) => throw null; + public static void Delete(string path, bool recursive) => throw null; + public static void Delete(string path) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateDirectories(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateDirectories(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateDirectories(string path, string searchPattern) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateDirectories(string path) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFileSystemEntries(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFileSystemEntries(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFileSystemEntries(string path, string searchPattern) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFileSystemEntries(string path) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFiles(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFiles(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFiles(string path, string searchPattern) => throw null; + public static System.Collections.Generic.IEnumerable EnumerateFiles(string path) => throw null; + public static bool Exists(string path) => throw null; + public static System.DateTime GetCreationTime(string path) => throw null; + public static System.DateTime GetCreationTimeUtc(string path) => throw null; + public static string GetCurrentDirectory() => throw null; + public static string[] GetDirectories(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static string[] GetDirectories(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static string[] GetDirectories(string path, string searchPattern) => throw null; + public static string[] GetDirectories(string path) => throw null; + public static string GetDirectoryRoot(string path) => throw null; + public static string[] GetFileSystemEntries(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static string[] GetFileSystemEntries(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static string[] GetFileSystemEntries(string path, string searchPattern) => throw null; + public static string[] GetFileSystemEntries(string path) => throw null; + public static string[] GetFiles(string path, string searchPattern, System.IO.SearchOption searchOption) => throw null; + public static string[] GetFiles(string path, string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public static string[] GetFiles(string path, string searchPattern) => throw null; + public static string[] GetFiles(string path) => throw null; + public static System.DateTime GetLastAccessTime(string path) => throw null; + public static System.DateTime GetLastAccessTimeUtc(string path) => throw null; + public static System.DateTime GetLastWriteTime(string path) => throw null; + public static System.DateTime GetLastWriteTimeUtc(string path) => throw null; + public static string[] GetLogicalDrives() => throw null; + public static System.IO.DirectoryInfo GetParent(string path) => throw null; + public static void Move(string sourceDirName, string destDirName) => throw null; + public static void SetCreationTime(string path, System.DateTime creationTime) => throw null; + public static void SetCreationTimeUtc(string path, System.DateTime creationTimeUtc) => throw null; + public static void SetCurrentDirectory(string path) => throw null; + public static void SetLastAccessTime(string path, System.DateTime lastAccessTime) => throw null; + public static void SetLastAccessTimeUtc(string path, System.DateTime lastAccessTimeUtc) => throw null; + public static void SetLastWriteTime(string path, System.DateTime lastWriteTime) => throw null; + public static void SetLastWriteTimeUtc(string path, System.DateTime lastWriteTimeUtc) => throw null; + } + + // Generated from `System.IO.DirectoryInfo` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DirectoryInfo : System.IO.FileSystemInfo + { + public void Create() => throw null; + public System.IO.DirectoryInfo CreateSubdirectory(string path) => throw null; + public void Delete(bool recursive) => throw null; + public override void Delete() => throw null; + public DirectoryInfo(string path) => throw null; + public System.Collections.Generic.IEnumerable EnumerateDirectories(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.Collections.Generic.IEnumerable EnumerateDirectories(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.Collections.Generic.IEnumerable EnumerateDirectories(string searchPattern) => throw null; + public System.Collections.Generic.IEnumerable EnumerateDirectories() => throw null; + public System.Collections.Generic.IEnumerable EnumerateFileSystemInfos(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFileSystemInfos(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFileSystemInfos(string searchPattern) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFileSystemInfos() => throw null; + public System.Collections.Generic.IEnumerable EnumerateFiles(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFiles(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFiles(string searchPattern) => throw null; + public System.Collections.Generic.IEnumerable EnumerateFiles() => throw null; + public override bool Exists { get => throw null; } + public System.IO.DirectoryInfo[] GetDirectories(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.IO.DirectoryInfo[] GetDirectories(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.IO.DirectoryInfo[] GetDirectories(string searchPattern) => throw null; + public System.IO.DirectoryInfo[] GetDirectories() => throw null; + public System.IO.FileSystemInfo[] GetFileSystemInfos(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.IO.FileSystemInfo[] GetFileSystemInfos(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.IO.FileSystemInfo[] GetFileSystemInfos(string searchPattern) => throw null; + public System.IO.FileSystemInfo[] GetFileSystemInfos() => throw null; + public System.IO.FileInfo[] GetFiles(string searchPattern, System.IO.SearchOption searchOption) => throw null; + public System.IO.FileInfo[] GetFiles(string searchPattern, System.IO.EnumerationOptions enumerationOptions) => throw null; + public System.IO.FileInfo[] GetFiles(string searchPattern) => throw null; + public System.IO.FileInfo[] GetFiles() => throw null; + public void MoveTo(string destDirName) => throw null; + public override string Name { get => throw null; } + public System.IO.DirectoryInfo Parent { get => throw null; } + public System.IO.DirectoryInfo Root { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.IO.EnumerationOptions` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumerationOptions + { + public System.IO.FileAttributes AttributesToSkip { get => throw null; set => throw null; } + public int BufferSize { get => throw null; set => throw null; } + public EnumerationOptions() => throw null; + public bool IgnoreInaccessible { get => throw null; set => throw null; } + public System.IO.MatchCasing MatchCasing { get => throw null; set => throw null; } + public System.IO.MatchType MatchType { get => throw null; set => throw null; } + public bool RecurseSubdirectories { get => throw null; set => throw null; } + public bool ReturnSpecialDirectories { get => throw null; set => throw null; } + } + + // Generated from `System.IO.File` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class File + { + public static void AppendAllLines(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding) => throw null; + public static void AppendAllLines(string path, System.Collections.Generic.IEnumerable contents) => throw null; + public static System.Threading.Tasks.Task AppendAllLinesAsync(string path, System.Collections.Generic.IEnumerable contents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AppendAllLinesAsync(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void AppendAllText(string path, string contents, System.Text.Encoding encoding) => throw null; + public static void AppendAllText(string path, string contents) => throw null; + public static System.Threading.Tasks.Task AppendAllTextAsync(string path, string contents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AppendAllTextAsync(string path, string contents, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.IO.StreamWriter AppendText(string path) => throw null; + public static void Copy(string sourceFileName, string destFileName, bool overwrite) => throw null; + public static void Copy(string sourceFileName, string destFileName) => throw null; + public static System.IO.FileStream Create(string path, int bufferSize, System.IO.FileOptions options) => throw null; + public static System.IO.FileStream Create(string path, int bufferSize) => throw null; + public static System.IO.FileStream Create(string path) => throw null; + public static System.IO.StreamWriter CreateText(string path) => throw null; + public static void Decrypt(string path) => throw null; + public static void Delete(string path) => throw null; + public static void Encrypt(string path) => throw null; + public static bool Exists(string path) => throw null; + public static System.IO.FileAttributes GetAttributes(string path) => throw null; + public static System.DateTime GetCreationTime(string path) => throw null; + public static System.DateTime GetCreationTimeUtc(string path) => throw null; + public static System.DateTime GetLastAccessTime(string path) => throw null; + public static System.DateTime GetLastAccessTimeUtc(string path) => throw null; + public static System.DateTime GetLastWriteTime(string path) => throw null; + public static System.DateTime GetLastWriteTimeUtc(string path) => throw null; + public static void Move(string sourceFileName, string destFileName, bool overwrite) => throw null; + public static void Move(string sourceFileName, string destFileName) => throw null; + public static System.IO.FileStream Open(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) => throw null; + public static System.IO.FileStream Open(string path, System.IO.FileMode mode, System.IO.FileAccess access) => throw null; + public static System.IO.FileStream Open(string path, System.IO.FileMode mode) => throw null; + public static System.IO.FileStream OpenRead(string path) => throw null; + public static System.IO.StreamReader OpenText(string path) => throw null; + public static System.IO.FileStream OpenWrite(string path) => throw null; + public static System.Byte[] ReadAllBytes(string path) => throw null; + public static System.Threading.Tasks.Task ReadAllBytesAsync(string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static string[] ReadAllLines(string path, System.Text.Encoding encoding) => throw null; + public static string[] ReadAllLines(string path) => throw null; + public static System.Threading.Tasks.Task ReadAllLinesAsync(string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task ReadAllLinesAsync(string path, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static string ReadAllText(string path, System.Text.Encoding encoding) => throw null; + public static string ReadAllText(string path) => throw null; + public static System.Threading.Tasks.Task ReadAllTextAsync(string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task ReadAllTextAsync(string path, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Collections.Generic.IEnumerable ReadLines(string path, System.Text.Encoding encoding) => throw null; + public static System.Collections.Generic.IEnumerable ReadLines(string path) => throw null; + public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) => throw null; + public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName) => throw null; + public static void SetAttributes(string path, System.IO.FileAttributes fileAttributes) => throw null; + public static void SetCreationTime(string path, System.DateTime creationTime) => throw null; + public static void SetCreationTimeUtc(string path, System.DateTime creationTimeUtc) => throw null; + public static void SetLastAccessTime(string path, System.DateTime lastAccessTime) => throw null; + public static void SetLastAccessTimeUtc(string path, System.DateTime lastAccessTimeUtc) => throw null; + public static void SetLastWriteTime(string path, System.DateTime lastWriteTime) => throw null; + public static void SetLastWriteTimeUtc(string path, System.DateTime lastWriteTimeUtc) => throw null; + public static void WriteAllBytes(string path, System.Byte[] bytes) => throw null; + public static System.Threading.Tasks.Task WriteAllBytesAsync(string path, System.Byte[] bytes, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void WriteAllLines(string path, string[] contents, System.Text.Encoding encoding) => throw null; + public static void WriteAllLines(string path, string[] contents) => throw null; + public static void WriteAllLines(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding) => throw null; + public static void WriteAllLines(string path, System.Collections.Generic.IEnumerable contents) => throw null; + public static System.Threading.Tasks.Task WriteAllLinesAsync(string path, System.Collections.Generic.IEnumerable contents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAllLinesAsync(string path, System.Collections.Generic.IEnumerable contents, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void WriteAllText(string path, string contents, System.Text.Encoding encoding) => throw null; + public static void WriteAllText(string path, string contents) => throw null; + public static System.Threading.Tasks.Task WriteAllTextAsync(string path, string contents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task WriteAllTextAsync(string path, string contents, System.Text.Encoding encoding, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.IO.FileInfo` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileInfo : System.IO.FileSystemInfo + { + public System.IO.StreamWriter AppendText() => throw null; + public System.IO.FileInfo CopyTo(string destFileName, bool overwrite) => throw null; + public System.IO.FileInfo CopyTo(string destFileName) => throw null; + public System.IO.FileStream Create() => throw null; + public System.IO.StreamWriter CreateText() => throw null; + public void Decrypt() => throw null; + public override void Delete() => throw null; + public System.IO.DirectoryInfo Directory { get => throw null; } + public string DirectoryName { get => throw null; } + public void Encrypt() => throw null; + public override bool Exists { get => throw null; } + public FileInfo(string fileName) => throw null; + public bool IsReadOnly { get => throw null; set => throw null; } + public System.Int64 Length { get => throw null; } + public void MoveTo(string destFileName, bool overwrite) => throw null; + public void MoveTo(string destFileName) => throw null; + public override string Name { get => throw null; } + public System.IO.FileStream Open(System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) => throw null; + public System.IO.FileStream Open(System.IO.FileMode mode, System.IO.FileAccess access) => throw null; + public System.IO.FileStream Open(System.IO.FileMode mode) => throw null; + public System.IO.FileStream OpenRead() => throw null; + public System.IO.StreamReader OpenText() => throw null; + public System.IO.FileStream OpenWrite() => throw null; + public System.IO.FileInfo Replace(string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) => throw null; + public System.IO.FileInfo Replace(string destinationFileName, string destinationBackupFileName) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.IO.FileSystemInfo` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class FileSystemInfo : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable + { + public System.IO.FileAttributes Attributes { get => throw null; set => throw null; } + public System.DateTime CreationTime { get => throw null; set => throw null; } + public System.DateTime CreationTimeUtc { get => throw null; set => throw null; } + public abstract void Delete(); + public abstract bool Exists { get; } + public string Extension { get => throw null; } + protected FileSystemInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected FileSystemInfo() => throw null; + public virtual string FullName { get => throw null; } + protected string FullPath; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.DateTime LastAccessTime { get => throw null; set => throw null; } + public System.DateTime LastAccessTimeUtc { get => throw null; set => throw null; } + public System.DateTime LastWriteTime { get => throw null; set => throw null; } + public System.DateTime LastWriteTimeUtc { get => throw null; set => throw null; } + public abstract string Name { get; } + protected string OriginalPath; + public void Refresh() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.IO.MatchCasing` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MatchCasing + { + CaseInsensitive, + CaseSensitive, + // Stub generator skipped constructor + PlatformDefault, + } + + // Generated from `System.IO.MatchType` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MatchType + { + // Stub generator skipped constructor + Simple, + Win32, + } + + // Generated from `System.IO.SearchOption` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SearchOption + { + AllDirectories, + // Stub generator skipped constructor + TopDirectoryOnly, + } + + namespace Enumeration + { + // Generated from `System.IO.Enumeration.FileSystemEntry` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FileSystemEntry + { + public System.IO.FileAttributes Attributes { get => throw null; } + public System.DateTimeOffset CreationTimeUtc { get => throw null; } + public System.ReadOnlySpan Directory { get => throw null; } + public System.ReadOnlySpan FileName { get => throw null; } + // Stub generator skipped constructor + public bool IsDirectory { get => throw null; } + public bool IsHidden { get => throw null; } + public System.DateTimeOffset LastAccessTimeUtc { get => throw null; } + public System.DateTimeOffset LastWriteTimeUtc { get => throw null; } + public System.Int64 Length { get => throw null; } + public System.ReadOnlySpan OriginalRootDirectory { get => throw null; } + public System.ReadOnlySpan RootDirectory { get => throw null; } + public System.IO.FileSystemInfo ToFileSystemInfo() => throw null; + public string ToFullPath() => throw null; + public string ToSpecifiedFullPath() => throw null; + } + + // Generated from `System.IO.Enumeration.FileSystemEnumerable<>` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileSystemEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public FileSystemEnumerable(string directory, System.IO.Enumeration.FileSystemEnumerable.FindTransform transform, System.IO.EnumerationOptions options = default(System.IO.EnumerationOptions)) => throw null; + // Generated from `System.IO.Enumeration.FileSystemEnumerable<>.FindPredicate` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate bool FindPredicate(ref System.IO.Enumeration.FileSystemEntry entry); + + + // Generated from `System.IO.Enumeration.FileSystemEnumerable<>.FindTransform` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult FindTransform(ref System.IO.Enumeration.FileSystemEntry entry); + + + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.IO.Enumeration.FileSystemEnumerable.FindPredicate ShouldIncludePredicate { get => throw null; set => throw null; } + public System.IO.Enumeration.FileSystemEnumerable.FindPredicate ShouldRecursePredicate { get => throw null; set => throw null; } + } + + // Generated from `System.IO.Enumeration.FileSystemEnumerator<>` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class FileSystemEnumerator : System.Runtime.ConstrainedExecution.CriticalFinalizerObject, System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + protected virtual bool ContinueOnError(int error) => throw null; + public TResult Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public FileSystemEnumerator(string directory, System.IO.EnumerationOptions options = default(System.IO.EnumerationOptions)) => throw null; + public bool MoveNext() => throw null; + protected virtual void OnDirectoryFinished(System.ReadOnlySpan directory) => throw null; + public void Reset() => throw null; + protected virtual bool ShouldIncludeEntry(ref System.IO.Enumeration.FileSystemEntry entry) => throw null; + protected virtual bool ShouldRecurseIntoEntry(ref System.IO.Enumeration.FileSystemEntry entry) => throw null; + protected abstract TResult TransformEntry(ref System.IO.Enumeration.FileSystemEntry entry); + } + + // Generated from `System.IO.Enumeration.FileSystemName` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class FileSystemName + { + public static bool MatchesSimpleExpression(System.ReadOnlySpan expression, System.ReadOnlySpan name, bool ignoreCase = default(bool)) => throw null; + public static bool MatchesWin32Expression(System.ReadOnlySpan expression, System.ReadOnlySpan name, bool ignoreCase = default(bool)) => throw null; + public static string TranslateWin32Expression(string expression) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs new file mode 100644 index 000000000000..26f1139e33d3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs @@ -0,0 +1,153 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace IO + { + namespace IsolatedStorage + { + // Generated from `System.IO.IsolatedStorage.INormalizeForIsolatedStorage` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INormalizeForIsolatedStorage + { + object Normalize(); + } + + // Generated from `System.IO.IsolatedStorage.IsolatedStorage` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IsolatedStorage : System.MarshalByRefObject + { + public object ApplicationIdentity { get => throw null; } + public object AssemblyIdentity { get => throw null; } + public virtual System.Int64 AvailableFreeSpace { get => throw null; } + public virtual System.UInt64 CurrentSize { get => throw null; } + public object DomainIdentity { get => throw null; } + public virtual bool IncreaseQuotaTo(System.Int64 newQuotaSize) => throw null; + protected void InitStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, System.Type domainEvidenceType, System.Type assemblyEvidenceType) => throw null; + protected void InitStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, System.Type appEvidenceType) => throw null; + protected IsolatedStorage() => throw null; + public virtual System.UInt64 MaximumSize { get => throw null; } + public virtual System.Int64 Quota { get => throw null; } + public abstract void Remove(); + public System.IO.IsolatedStorage.IsolatedStorageScope Scope { get => throw null; } + protected virtual System.Char SeparatorExternal { get => throw null; } + protected virtual System.Char SeparatorInternal { get => throw null; } + public virtual System.Int64 UsedSize { get => throw null; } + } + + // Generated from `System.IO.IsolatedStorage.IsolatedStorageException` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IsolatedStorageException : System.Exception + { + public IsolatedStorageException(string message, System.Exception inner) => throw null; + public IsolatedStorageException(string message) => throw null; + public IsolatedStorageException() => throw null; + protected IsolatedStorageException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.IsolatedStorage.IsolatedStorageFile` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IsolatedStorageFile : System.IO.IsolatedStorage.IsolatedStorage, System.IDisposable + { + public override System.Int64 AvailableFreeSpace { get => throw null; } + public void Close() => throw null; + public void CopyFile(string sourceFileName, string destinationFileName, bool overwrite) => throw null; + public void CopyFile(string sourceFileName, string destinationFileName) => throw null; + public void CreateDirectory(string dir) => throw null; + public System.IO.IsolatedStorage.IsolatedStorageFileStream CreateFile(string path) => throw null; + public override System.UInt64 CurrentSize { get => throw null; } + public void DeleteDirectory(string dir) => throw null; + public void DeleteFile(string file) => throw null; + public bool DirectoryExists(string path) => throw null; + public void Dispose() => throw null; + public bool FileExists(string path) => throw null; + public System.DateTimeOffset GetCreationTime(string path) => throw null; + public string[] GetDirectoryNames(string searchPattern) => throw null; + public string[] GetDirectoryNames() => throw null; + public static System.Collections.IEnumerator GetEnumerator(System.IO.IsolatedStorage.IsolatedStorageScope scope) => throw null; + public string[] GetFileNames(string searchPattern) => throw null; + public string[] GetFileNames() => throw null; + public System.DateTimeOffset GetLastAccessTime(string path) => throw null; + public System.DateTimeOffset GetLastWriteTime(string path) => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetMachineStoreForApplication() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetMachineStoreForAssembly() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetMachineStoreForDomain() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, object domainIdentity, object assemblyIdentity) => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, object applicationIdentity) => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, System.Type domainEvidenceType, System.Type assemblyEvidenceType) => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetStore(System.IO.IsolatedStorage.IsolatedStorageScope scope, System.Type applicationEvidenceType) => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForApplication() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForAssembly() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForDomain() => throw null; + public static System.IO.IsolatedStorage.IsolatedStorageFile GetUserStoreForSite() => throw null; + public override bool IncreaseQuotaTo(System.Int64 newQuotaSize) => throw null; + public static bool IsEnabled { get => throw null; } + public override System.UInt64 MaximumSize { get => throw null; } + public void MoveDirectory(string sourceDirectoryName, string destinationDirectoryName) => throw null; + public void MoveFile(string sourceFileName, string destinationFileName) => throw null; + public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) => throw null; + public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access) => throw null; + public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode) => throw null; + public override System.Int64 Quota { get => throw null; } + public static void Remove(System.IO.IsolatedStorage.IsolatedStorageScope scope) => throw null; + public override void Remove() => throw null; + public override System.Int64 UsedSize { get => throw null; } + } + + // Generated from `System.IO.IsolatedStorage.IsolatedStorageFileStream` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IsolatedStorageFileStream : System.IO.FileStream + { + public override System.IAsyncResult BeginRead(System.Byte[] array, int offset, int numBytes, System.AsyncCallback userCallback, object stateObject) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] array, int offset, int numBytes, System.AsyncCallback userCallback, object stateObject) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush(bool flushToDisk) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.IntPtr Handle { get => throw null; } + public override bool IsAsync { get => throw null; } + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.IO.IsolatedStorage.IsolatedStorageFile isf) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public IsolatedStorageFileStream(string path, System.IO.FileMode mode) : base(default(Microsoft.Win32.SafeHandles.SafeFileHandle), default(System.IO.FileAccess)) => throw null; + public override System.Int64 Length { get => throw null; } + public override void Lock(System.Int64 position, System.Int64 length) => throw null; + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle { get => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Unlock(System.Int64 position, System.Int64 length) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + } + + // Generated from `System.IO.IsolatedStorage.IsolatedStorageScope` in `System.IO.IsolatedStorage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum IsolatedStorageScope + { + Application, + Assembly, + Domain, + // Stub generator skipped constructor + Machine, + None, + Roaming, + User, + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs new file mode 100644 index 000000000000..a9814a4f36e5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs @@ -0,0 +1,124 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeMemoryMappedFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + public override bool IsInvalid { get => throw null; } + protected override bool ReleaseHandle() => throw null; + internal SafeMemoryMappedFileHandle() : base(default(bool)) => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeMemoryMappedViewHandle : System.Runtime.InteropServices.SafeBuffer + { + protected override bool ReleaseHandle() => throw null; + internal SafeMemoryMappedViewHandle() : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace IO + { + namespace MemoryMappedFiles + { + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedFile` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemoryMappedFile : System.IDisposable + { + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(string path, System.IO.FileMode mode, string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(string path, System.IO.FileMode mode, string mapName, System.Int64 capacity) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(string path, System.IO.FileMode mode, string mapName) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(string path, System.IO.FileMode mode) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(string path) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateFromFile(System.IO.FileStream fileStream, string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.HandleInheritability inheritability, bool leaveOpen) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateNew(string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.MemoryMappedFiles.MemoryMappedFileOptions options, System.IO.HandleInheritability inheritability) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateNew(string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateNew(string mapName, System.Int64 capacity) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen(string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access, System.IO.MemoryMappedFiles.MemoryMappedFileOptions options, System.IO.HandleInheritability inheritability) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen(string mapName, System.Int64 capacity, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile CreateOrOpen(string mapName, System.Int64 capacity) => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewAccessor CreateViewAccessor(System.Int64 offset, System.Int64 size, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access) => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewAccessor CreateViewAccessor(System.Int64 offset, System.Int64 size) => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewAccessor CreateViewAccessor() => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewStream CreateViewStream(System.Int64 offset, System.Int64 size, System.IO.MemoryMappedFiles.MemoryMappedFileAccess access) => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewStream CreateViewStream(System.Int64 offset, System.Int64 size) => throw null; + public System.IO.MemoryMappedFiles.MemoryMappedViewStream CreateViewStream() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile OpenExisting(string mapName, System.IO.MemoryMappedFiles.MemoryMappedFileRights desiredAccessRights, System.IO.HandleInheritability inheritability) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile OpenExisting(string mapName, System.IO.MemoryMappedFiles.MemoryMappedFileRights desiredAccessRights) => throw null; + public static System.IO.MemoryMappedFiles.MemoryMappedFile OpenExisting(string mapName) => throw null; + public Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle { get => throw null; } + } + + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedFileAccess` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MemoryMappedFileAccess + { + CopyOnWrite, + // Stub generator skipped constructor + Read, + ReadExecute, + ReadWrite, + ReadWriteExecute, + Write, + } + + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedFileOptions` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MemoryMappedFileOptions + { + DelayAllocatePages, + // Stub generator skipped constructor + None, + } + + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedFileRights` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MemoryMappedFileRights + { + AccessSystemSecurity, + ChangePermissions, + CopyOnWrite, + Delete, + Execute, + FullControl, + // Stub generator skipped constructor + Read, + ReadExecute, + ReadPermissions, + ReadWrite, + ReadWriteExecute, + TakeOwnership, + Write, + } + + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedViewAccessor` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemoryMappedViewAccessor : System.IO.UnmanagedMemoryAccessor + { + protected override void Dispose(bool disposing) => throw null; + public void Flush() => throw null; + public System.Int64 PointerOffset { get => throw null; } + public Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { get => throw null; } + } + + // Generated from `System.IO.MemoryMappedFiles.MemoryMappedViewStream` in `System.IO.MemoryMappedFiles, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemoryMappedViewStream : System.IO.UnmanagedMemoryStream + { + protected override void Dispose(bool disposing) => throw null; + public override void Flush() => throw null; + public System.Int64 PointerOffset { get => throw null; } + public Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle SafeMemoryMappedViewHandle { get => throw null; } + public override void SetLength(System.Int64 value) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs new file mode 100644 index 000000000000..f659ecd18c35 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs @@ -0,0 +1,175 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafePipeHandle` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafePipeHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + public override bool IsInvalid { get => throw null; } + protected override bool ReleaseHandle() => throw null; + public SafePipeHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace IO + { + namespace Pipes + { + // Generated from `System.IO.Pipes.AnonymousPipeClientStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AnonymousPipeClientStream : System.IO.Pipes.PipeStream + { + public AnonymousPipeClientStream(string pipeHandleAsString) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeClientStream(System.IO.Pipes.PipeDirection direction, string pipeHandleAsString) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeClientStream(System.IO.Pipes.PipeDirection direction, Microsoft.Win32.SafeHandles.SafePipeHandle safePipeHandle) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public override System.IO.Pipes.PipeTransmissionMode ReadMode { set => throw null; } + public override System.IO.Pipes.PipeTransmissionMode TransmissionMode { get => throw null; } + // ERR: Stub generator didn't handle member: ~AnonymousPipeClientStream + } + + // Generated from `System.IO.Pipes.AnonymousPipeServerStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AnonymousPipeServerStream : System.IO.Pipes.PipeStream + { + public AnonymousPipeServerStream(System.IO.Pipes.PipeDirection direction, System.IO.HandleInheritability inheritability, int bufferSize) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeServerStream(System.IO.Pipes.PipeDirection direction, System.IO.HandleInheritability inheritability) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeServerStream(System.IO.Pipes.PipeDirection direction, Microsoft.Win32.SafeHandles.SafePipeHandle serverSafePipeHandle, Microsoft.Win32.SafeHandles.SafePipeHandle clientSafePipeHandle) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeServerStream(System.IO.Pipes.PipeDirection direction) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public AnonymousPipeServerStream() : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public Microsoft.Win32.SafeHandles.SafePipeHandle ClientSafePipeHandle { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public void DisposeLocalCopyOfClientHandle() => throw null; + public string GetClientHandleAsString() => throw null; + public override System.IO.Pipes.PipeTransmissionMode ReadMode { set => throw null; } + public override System.IO.Pipes.PipeTransmissionMode TransmissionMode { get => throw null; } + // ERR: Stub generator didn't handle member: ~AnonymousPipeServerStream + } + + // Generated from `System.IO.Pipes.NamedPipeClientStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NamedPipeClientStream : System.IO.Pipes.PipeStream + { + protected internal override void CheckPipePropertyOperations() => throw null; + public void Connect(int timeout) => throw null; + public void Connect() => throw null; + public System.Threading.Tasks.Task ConnectAsync(int timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ConnectAsync(int timeout) => throw null; + public System.Threading.Tasks.Task ConnectAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ConnectAsync() => throw null; + public NamedPipeClientStream(string serverName, string pipeName, System.IO.Pipes.PipeDirection direction, System.IO.Pipes.PipeOptions options, System.Security.Principal.TokenImpersonationLevel impersonationLevel, System.IO.HandleInheritability inheritability) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(string serverName, string pipeName, System.IO.Pipes.PipeDirection direction, System.IO.Pipes.PipeOptions options, System.Security.Principal.TokenImpersonationLevel impersonationLevel) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(string serverName, string pipeName, System.IO.Pipes.PipeDirection direction, System.IO.Pipes.PipeOptions options) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(string serverName, string pipeName, System.IO.Pipes.PipeDirection direction) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(string serverName, string pipeName) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(string pipeName) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeClientStream(System.IO.Pipes.PipeDirection direction, bool isAsync, bool isConnected, Microsoft.Win32.SafeHandles.SafePipeHandle safePipeHandle) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public int NumberOfServerInstances { get => throw null; } + // ERR: Stub generator didn't handle member: ~NamedPipeClientStream + } + + // Generated from `System.IO.Pipes.NamedPipeServerStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NamedPipeServerStream : System.IO.Pipes.PipeStream + { + public System.IAsyncResult BeginWaitForConnection(System.AsyncCallback callback, object state) => throw null; + public void Disconnect() => throw null; + public void EndWaitForConnection(System.IAsyncResult asyncResult) => throw null; + public string GetImpersonationUserName() => throw null; + public const int MaxAllowedServerInstances = default; + public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options, int inBufferSize, int outBufferSize) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode, System.IO.Pipes.PipeOptions options) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances, System.IO.Pipes.PipeTransmissionMode transmissionMode) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction, int maxNumberOfServerInstances) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(string pipeName, System.IO.Pipes.PipeDirection direction) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(string pipeName) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public NamedPipeServerStream(System.IO.Pipes.PipeDirection direction, bool isAsync, bool isConnected, Microsoft.Win32.SafeHandles.SafePipeHandle safePipeHandle) : base(default(System.IO.Pipes.PipeDirection), default(int)) => throw null; + public void RunAsClient(System.IO.Pipes.PipeStreamImpersonationWorker impersonationWorker) => throw null; + public void WaitForConnection() => throw null; + public System.Threading.Tasks.Task WaitForConnectionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WaitForConnectionAsync() => throw null; + // ERR: Stub generator didn't handle member: ~NamedPipeServerStream + } + + // Generated from `System.IO.Pipes.PipeDirection` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PipeDirection + { + In, + InOut, + Out, + // Stub generator skipped constructor + } + + // Generated from `System.IO.Pipes.PipeOptions` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PipeOptions + { + Asynchronous, + CurrentUserOnly, + None, + // Stub generator skipped constructor + WriteThrough, + } + + // Generated from `System.IO.Pipes.PipeStream` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class PipeStream : System.IO.Stream + { + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + protected internal virtual void CheckPipePropertyOperations() => throw null; + protected internal void CheckReadOperations() => throw null; + protected internal void CheckWriteOperations() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual int InBufferSize { get => throw null; } + protected void InitializeHandle(Microsoft.Win32.SafeHandles.SafePipeHandle handle, bool isExposed, bool isAsync) => throw null; + public bool IsAsync { get => throw null; } + public bool IsConnected { get => throw null; set => throw null; } + protected bool IsHandleExposed { get => throw null; } + public bool IsMessageComplete { get => throw null; } + public override System.Int64 Length { get => throw null; } + public virtual int OutBufferSize { get => throw null; } + protected PipeStream(System.IO.Pipes.PipeDirection direction, int bufferSize) => throw null; + protected PipeStream(System.IO.Pipes.PipeDirection direction, System.IO.Pipes.PipeTransmissionMode transmissionMode, int outBufferSize) => throw null; + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public virtual System.IO.Pipes.PipeTransmissionMode ReadMode { get => throw null; set => throw null; } + public Microsoft.Win32.SafeHandles.SafePipeHandle SafePipeHandle { get => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public virtual System.IO.Pipes.PipeTransmissionMode TransmissionMode { get => throw null; } + public void WaitForPipeDrain() => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + } + + // Generated from `System.IO.Pipes.PipeStreamImpersonationWorker` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void PipeStreamImpersonationWorker(); + + // Generated from `System.IO.Pipes.PipeTransmissionMode` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PipeTransmissionMode + { + Byte, + Message, + // Stub generator skipped constructor + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs new file mode 100644 index 000000000000..0615c93a8c6c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs @@ -0,0 +1,1321 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Dynamic + { + // Generated from `System.Dynamic.BinaryOperationBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class BinaryOperationBinder : System.Dynamic.DynamicMetaObjectBinder + { + protected BinaryOperationBinder(System.Linq.Expressions.ExpressionType operation) => throw null; + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackBinaryOperation(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject arg, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackBinaryOperation(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject arg) => throw null; + public System.Linq.Expressions.ExpressionType Operation { get => throw null; } + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.BindingRestrictions` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class BindingRestrictions + { + public static System.Dynamic.BindingRestrictions Combine(System.Collections.Generic.IList contributingObjects) => throw null; + public static System.Dynamic.BindingRestrictions Empty; + public static System.Dynamic.BindingRestrictions GetExpressionRestriction(System.Linq.Expressions.Expression expression) => throw null; + public static System.Dynamic.BindingRestrictions GetInstanceRestriction(System.Linq.Expressions.Expression expression, object instance) => throw null; + public static System.Dynamic.BindingRestrictions GetTypeRestriction(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public System.Dynamic.BindingRestrictions Merge(System.Dynamic.BindingRestrictions restrictions) => throw null; + public System.Linq.Expressions.Expression ToExpression() => throw null; + } + + // Generated from `System.Dynamic.CallInfo` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallInfo + { + public int ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection ArgumentNames { get => throw null; } + public CallInfo(int argCount, params string[] argNames) => throw null; + public CallInfo(int argCount, System.Collections.Generic.IEnumerable argNames) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + } + + // Generated from `System.Dynamic.ConvertBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ConvertBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + protected ConvertBinder(System.Type type, bool @explicit) => throw null; + public bool Explicit { get => throw null; } + public abstract System.Dynamic.DynamicMetaObject FallbackConvert(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackConvert(System.Dynamic.DynamicMetaObject target) => throw null; + public override System.Type ReturnType { get => throw null; } + public System.Type Type { get => throw null; } + } + + // Generated from `System.Dynamic.CreateInstanceBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CreateInstanceBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + protected CreateInstanceBinder(System.Dynamic.CallInfo callInfo) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackCreateInstance(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackCreateInstance(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.DeleteIndexBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DeleteIndexBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + protected DeleteIndexBinder(System.Dynamic.CallInfo callInfo) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackDeleteIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackDeleteIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes) => throw null; + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.DeleteMemberBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DeleteMemberBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + protected DeleteMemberBinder(string name, bool ignoreCase) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackDeleteMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackDeleteMember(System.Dynamic.DynamicMetaObject target) => throw null; + public bool IgnoreCase { get => throw null; } + public string Name { get => throw null; } + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.DynamicMetaObject` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicMetaObject + { + public virtual System.Dynamic.DynamicMetaObject BindBinaryOperation(System.Dynamic.BinaryOperationBinder binder, System.Dynamic.DynamicMetaObject arg) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindConvert(System.Dynamic.ConvertBinder binder) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindCreateInstance(System.Dynamic.CreateInstanceBinder binder, System.Dynamic.DynamicMetaObject[] args) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindDeleteIndex(System.Dynamic.DeleteIndexBinder binder, System.Dynamic.DynamicMetaObject[] indexes) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindDeleteMember(System.Dynamic.DeleteMemberBinder binder) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindGetIndex(System.Dynamic.GetIndexBinder binder, System.Dynamic.DynamicMetaObject[] indexes) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindGetMember(System.Dynamic.GetMemberBinder binder) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindInvoke(System.Dynamic.InvokeBinder binder, System.Dynamic.DynamicMetaObject[] args) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindInvokeMember(System.Dynamic.InvokeMemberBinder binder, System.Dynamic.DynamicMetaObject[] args) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindSetIndex(System.Dynamic.SetIndexBinder binder, System.Dynamic.DynamicMetaObject[] indexes, System.Dynamic.DynamicMetaObject value) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindSetMember(System.Dynamic.SetMemberBinder binder, System.Dynamic.DynamicMetaObject value) => throw null; + public virtual System.Dynamic.DynamicMetaObject BindUnaryOperation(System.Dynamic.UnaryOperationBinder binder) => throw null; + public static System.Dynamic.DynamicMetaObject Create(object value, System.Linq.Expressions.Expression expression) => throw null; + public DynamicMetaObject(System.Linq.Expressions.Expression expression, System.Dynamic.BindingRestrictions restrictions, object value) => throw null; + public DynamicMetaObject(System.Linq.Expressions.Expression expression, System.Dynamic.BindingRestrictions restrictions) => throw null; + public static System.Dynamic.DynamicMetaObject[] EmptyMetaObjects; + public System.Linq.Expressions.Expression Expression { get => throw null; } + public virtual System.Collections.Generic.IEnumerable GetDynamicMemberNames() => throw null; + public bool HasValue { get => throw null; } + public System.Type LimitType { get => throw null; } + public System.Dynamic.BindingRestrictions Restrictions { get => throw null; } + public System.Type RuntimeType { get => throw null; } + public object Value { get => throw null; } + } + + // Generated from `System.Dynamic.DynamicMetaObjectBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DynamicMetaObjectBinder : System.Runtime.CompilerServices.CallSiteBinder + { + public override System.Linq.Expressions.Expression Bind(object[] args, System.Collections.ObjectModel.ReadOnlyCollection parameters, System.Linq.Expressions.LabelTarget returnLabel) => throw null; + public abstract System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args); + public System.Dynamic.DynamicMetaObject Defer(params System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.DynamicMetaObject Defer(System.Dynamic.DynamicMetaObject target, params System.Dynamic.DynamicMetaObject[] args) => throw null; + protected DynamicMetaObjectBinder() => throw null; + public System.Linq.Expressions.Expression GetUpdateExpression(System.Type type) => throw null; + public virtual System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.DynamicObject` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicObject : System.Dynamic.IDynamicMetaObjectProvider + { + protected DynamicObject() => throw null; + public virtual System.Collections.Generic.IEnumerable GetDynamicMemberNames() => throw null; + public virtual System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + public virtual bool TryBinaryOperation(System.Dynamic.BinaryOperationBinder binder, object arg, out object result) => throw null; + public virtual bool TryConvert(System.Dynamic.ConvertBinder binder, out object result) => throw null; + public virtual bool TryCreateInstance(System.Dynamic.CreateInstanceBinder binder, object[] args, out object result) => throw null; + public virtual bool TryDeleteIndex(System.Dynamic.DeleteIndexBinder binder, object[] indexes) => throw null; + public virtual bool TryDeleteMember(System.Dynamic.DeleteMemberBinder binder) => throw null; + public virtual bool TryGetIndex(System.Dynamic.GetIndexBinder binder, object[] indexes, out object result) => throw null; + public virtual bool TryGetMember(System.Dynamic.GetMemberBinder binder, out object result) => throw null; + public virtual bool TryInvoke(System.Dynamic.InvokeBinder binder, object[] args, out object result) => throw null; + public virtual bool TryInvokeMember(System.Dynamic.InvokeMemberBinder binder, object[] args, out object result) => throw null; + public virtual bool TrySetIndex(System.Dynamic.SetIndexBinder binder, object[] indexes, object value) => throw null; + public virtual bool TrySetMember(System.Dynamic.SetMemberBinder binder, object value) => throw null; + public virtual bool TryUnaryOperation(System.Dynamic.UnaryOperationBinder binder, out object result) => throw null; + } + + // Generated from `System.Dynamic.ExpandoObject` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExpandoObject : System.Dynamic.IDynamicMetaObjectProvider, System.ComponentModel.INotifyPropertyChanged, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.Generic.IDictionary.Add(string key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.ContainsKey(string key) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + int System.Collections.Generic.ICollection>.Count { get => throw null; } + public ExpandoObject() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + System.Dynamic.DynamicMetaObject System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + object System.Collections.Generic.IDictionary.this[string key] { get => throw null; set => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + event System.ComponentModel.PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged { add => throw null; remove => throw null; } + bool System.Collections.Generic.IDictionary.Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.TryGetValue(string key, out object value) => throw null; + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Dynamic.GetIndexBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GetIndexBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + public abstract System.Dynamic.DynamicMetaObject FallbackGetIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackGetIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes) => throw null; + protected GetIndexBinder(System.Dynamic.CallInfo callInfo) => throw null; + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.GetMemberBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GetMemberBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackGetMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackGetMember(System.Dynamic.DynamicMetaObject target) => throw null; + protected GetMemberBinder(string name, bool ignoreCase) => throw null; + public bool IgnoreCase { get => throw null; } + public string Name { get => throw null; } + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.IDynamicMetaObjectProvider` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDynamicMetaObjectProvider + { + System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression parameter); + } + + // Generated from `System.Dynamic.IInvokeOnGetBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IInvokeOnGetBinder + { + bool InvokeOnGet { get; } + } + + // Generated from `System.Dynamic.InvokeBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class InvokeBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + public abstract System.Dynamic.DynamicMetaObject FallbackInvoke(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackInvoke(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + protected InvokeBinder(System.Dynamic.CallInfo callInfo) => throw null; + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.InvokeMemberBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class InvokeMemberBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + public abstract System.Dynamic.DynamicMetaObject FallbackInvoke(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion); + public abstract System.Dynamic.DynamicMetaObject FallbackInvokeMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackInvokeMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public bool IgnoreCase { get => throw null; } + protected InvokeMemberBinder(string name, bool ignoreCase, System.Dynamic.CallInfo callInfo) => throw null; + public string Name { get => throw null; } + public override System.Type ReturnType { get => throw null; } + } + + // Generated from `System.Dynamic.SetIndexBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SetIndexBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public System.Dynamic.CallInfo CallInfo { get => throw null; } + public abstract System.Dynamic.DynamicMetaObject FallbackSetIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes, System.Dynamic.DynamicMetaObject value, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackSetIndex(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] indexes, System.Dynamic.DynamicMetaObject value) => throw null; + public override System.Type ReturnType { get => throw null; } + protected SetIndexBinder(System.Dynamic.CallInfo callInfo) => throw null; + } + + // Generated from `System.Dynamic.SetMemberBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SetMemberBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackSetMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject value, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackSetMember(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject value) => throw null; + public bool IgnoreCase { get => throw null; } + public string Name { get => throw null; } + public override System.Type ReturnType { get => throw null; } + protected SetMemberBinder(string name, bool ignoreCase) => throw null; + } + + // Generated from `System.Dynamic.UnaryOperationBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class UnaryOperationBinder : System.Dynamic.DynamicMetaObjectBinder + { + public override System.Dynamic.DynamicMetaObject Bind(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject[] args) => throw null; + public abstract System.Dynamic.DynamicMetaObject FallbackUnaryOperation(System.Dynamic.DynamicMetaObject target, System.Dynamic.DynamicMetaObject errorSuggestion); + public System.Dynamic.DynamicMetaObject FallbackUnaryOperation(System.Dynamic.DynamicMetaObject target) => throw null; + public System.Linq.Expressions.ExpressionType Operation { get => throw null; } + public override System.Type ReturnType { get => throw null; } + protected UnaryOperationBinder(System.Linq.Expressions.ExpressionType operation) => throw null; + } + + } + namespace Linq + { + // Generated from `System.Linq.IOrderedQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IOrderedQueryable : System.Linq.IQueryable, System.Collections.IEnumerable + { + } + + // Generated from `System.Linq.IOrderedQueryable<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IOrderedQueryable : System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IOrderedQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + } + + // Generated from `System.Linq.IQueryProvider` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IQueryProvider + { + System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression); + System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression); + object Execute(System.Linq.Expressions.Expression expression); + TResult Execute(System.Linq.Expressions.Expression expression); + } + + // Generated from `System.Linq.IQueryable` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IQueryable : System.Collections.IEnumerable + { + System.Type ElementType { get; } + System.Linq.Expressions.Expression Expression { get; } + System.Linq.IQueryProvider Provider { get; } + } + + // Generated from `System.Linq.IQueryable<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IQueryable : System.Linq.IQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + } + + namespace Expressions + { + // Generated from `System.Linq.Expressions.BinaryExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BinaryExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool CanReduce { get => throw null; } + public System.Linq.Expressions.LambdaExpression Conversion { get => throw null; } + public bool IsLifted { get => throw null; } + public bool IsLiftedToNull { get => throw null; } + public System.Linq.Expressions.Expression Left { get => throw null; } + public System.Reflection.MethodInfo Method { get => throw null; } + public override System.Linq.Expressions.Expression Reduce() => throw null; + public System.Linq.Expressions.Expression Right { get => throw null; } + public System.Linq.Expressions.BinaryExpression Update(System.Linq.Expressions.Expression left, System.Linq.Expressions.LambdaExpression conversion, System.Linq.Expressions.Expression right) => throw null; + } + + // Generated from `System.Linq.Expressions.BlockExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BlockExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Expressions { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression Result { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.BlockExpression Update(System.Collections.Generic.IEnumerable variables, System.Collections.Generic.IEnumerable expressions) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Variables { get => throw null; } + } + + // Generated from `System.Linq.Expressions.CatchBlock` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CatchBlock + { + public System.Linq.Expressions.Expression Body { get => throw null; } + public System.Linq.Expressions.Expression Filter { get => throw null; } + public System.Type Test { get => throw null; } + public override string ToString() => throw null; + public System.Linq.Expressions.CatchBlock Update(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression filter, System.Linq.Expressions.Expression body) => throw null; + public System.Linq.Expressions.ParameterExpression Variable { get => throw null; } + } + + // Generated from `System.Linq.Expressions.ConditionalExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConditionalExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression IfFalse { get => throw null; } + public System.Linq.Expressions.Expression IfTrue { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression Test { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.ConditionalExpression Update(System.Linq.Expressions.Expression test, System.Linq.Expressions.Expression ifTrue, System.Linq.Expressions.Expression ifFalse) => throw null; + } + + // Generated from `System.Linq.Expressions.ConstantExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConstantExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public object Value { get => throw null; } + } + + // Generated from `System.Linq.Expressions.DebugInfoExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebugInfoExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.SymbolDocumentInfo Document { get => throw null; } + public virtual int EndColumn { get => throw null; } + public virtual int EndLine { get => throw null; } + public virtual bool IsClear { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public virtual int StartColumn { get => throw null; } + public virtual int StartLine { get => throw null; } + public override System.Type Type { get => throw null; } + } + + // Generated from `System.Linq.Expressions.DefaultExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + } + + // Generated from `System.Linq.Expressions.DynamicExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicExpression : System.Linq.Expressions.Expression, System.Linq.Expressions.IDynamicExpression, System.Linq.Expressions.IArgumentProvider + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + public System.Runtime.CompilerServices.CallSiteBinder Binder { get => throw null; } + object System.Linq.Expressions.IDynamicExpression.CreateCallSite() => throw null; + public System.Type DelegateType { get => throw null; } + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Collections.Generic.IEnumerable arguments) => throw null; + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Collections.Generic.IEnumerable arguments) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IDynamicExpression.Rewrite(System.Linq.Expressions.Expression[] args) => throw null; + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.DynamicExpression Update(System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.DynamicExpressionVisitor` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DynamicExpressionVisitor : System.Linq.Expressions.ExpressionVisitor + { + protected DynamicExpressionVisitor() => throw null; + protected internal override System.Linq.Expressions.Expression VisitDynamic(System.Linq.Expressions.DynamicExpression node) => throw null; + } + + // Generated from `System.Linq.Expressions.ElementInit` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ElementInit : System.Linq.Expressions.IArgumentProvider + { + public System.Reflection.MethodInfo AddMethod { get => throw null; } + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public override string ToString() => throw null; + public System.Linq.Expressions.ElementInit Update(System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.Expression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Expression + { + protected internal virtual System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public static System.Linq.Expressions.BinaryExpression Add(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Add(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression AddAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression AddChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression AddChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression And(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression And(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression AndAlso(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression AndAlso(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression AndAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression AndAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression AndAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.IndexExpression ArrayAccess(System.Linq.Expressions.Expression array, params System.Linq.Expressions.Expression[] indexes) => throw null; + public static System.Linq.Expressions.IndexExpression ArrayAccess(System.Linq.Expressions.Expression array, System.Collections.Generic.IEnumerable indexes) => throw null; + public static System.Linq.Expressions.MethodCallExpression ArrayIndex(System.Linq.Expressions.Expression array, params System.Linq.Expressions.Expression[] indexes) => throw null; + public static System.Linq.Expressions.MethodCallExpression ArrayIndex(System.Linq.Expressions.Expression array, System.Collections.Generic.IEnumerable indexes) => throw null; + public static System.Linq.Expressions.BinaryExpression ArrayIndex(System.Linq.Expressions.Expression array, System.Linq.Expressions.Expression index) => throw null; + public static System.Linq.Expressions.UnaryExpression ArrayLength(System.Linq.Expressions.Expression array) => throw null; + public static System.Linq.Expressions.BinaryExpression Assign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.MemberAssignment Bind(System.Reflection.MethodInfo propertyAccessor, System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.MemberAssignment Bind(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.BlockExpression Block(params System.Linq.Expressions.Expression[] expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Type type, params System.Linq.Expressions.Expression[] expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Type type, System.Collections.Generic.IEnumerable variables, params System.Linq.Expressions.Expression[] expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Type type, System.Collections.Generic.IEnumerable variables, System.Collections.Generic.IEnumerable expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Type type, System.Collections.Generic.IEnumerable expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3, System.Linq.Expressions.Expression arg4) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Collections.Generic.IEnumerable variables, params System.Linq.Expressions.Expression[] expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Collections.Generic.IEnumerable variables, System.Collections.Generic.IEnumerable expressions) => throw null; + public static System.Linq.Expressions.BlockExpression Block(System.Collections.Generic.IEnumerable expressions) => throw null; + public static System.Linq.Expressions.GotoExpression Break(System.Linq.Expressions.LabelTarget target, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Break(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Break(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value) => throw null; + public static System.Linq.Expressions.GotoExpression Break(System.Linq.Expressions.LabelTarget target) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Type type, string methodName, System.Type[] typeArguments, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3, System.Linq.Expressions.Expression arg4) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Reflection.MethodInfo method, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, string methodName, System.Type[] typeArguments, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.MethodCallExpression Call(System.Linq.Expressions.Expression instance, System.Reflection.MethodInfo method) => throw null; + public virtual bool CanReduce { get => throw null; } + public static System.Linq.Expressions.CatchBlock Catch(System.Type type, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter) => throw null; + public static System.Linq.Expressions.CatchBlock Catch(System.Type type, System.Linq.Expressions.Expression body) => throw null; + public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter) => throw null; + public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body) => throw null; + public static System.Linq.Expressions.DebugInfoExpression ClearDebugInfo(System.Linq.Expressions.SymbolDocumentInfo document) => throw null; + public static System.Linq.Expressions.BinaryExpression Coalesce(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression Coalesce(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.ConditionalExpression Condition(System.Linq.Expressions.Expression test, System.Linq.Expressions.Expression ifTrue, System.Linq.Expressions.Expression ifFalse, System.Type type) => throw null; + public static System.Linq.Expressions.ConditionalExpression Condition(System.Linq.Expressions.Expression test, System.Linq.Expressions.Expression ifTrue, System.Linq.Expressions.Expression ifFalse) => throw null; + public static System.Linq.Expressions.ConstantExpression Constant(object value, System.Type type) => throw null; + public static System.Linq.Expressions.ConstantExpression Constant(object value) => throw null; + public static System.Linq.Expressions.GotoExpression Continue(System.Linq.Expressions.LabelTarget target, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Continue(System.Linq.Expressions.LabelTarget target) => throw null; + public static System.Linq.Expressions.UnaryExpression Convert(System.Linq.Expressions.Expression expression, System.Type type, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression Convert(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.UnaryExpression ConvertChecked(System.Linq.Expressions.Expression expression, System.Type type, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression ConvertChecked(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.DebugInfoExpression DebugInfo(System.Linq.Expressions.SymbolDocumentInfo document, int startLine, int startColumn, int endLine, int endColumn) => throw null; + public static System.Linq.Expressions.UnaryExpression Decrement(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression Decrement(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.DefaultExpression Default(System.Type type) => throw null; + public static System.Linq.Expressions.BinaryExpression Divide(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Divide(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression DivideAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression DivideAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression DivideAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Linq.Expressions.Expression arg0) => throw null; + public static System.Linq.Expressions.DynamicExpression Dynamic(System.Runtime.CompilerServices.CallSiteBinder binder, System.Type returnType, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.ElementInit ElementInit(System.Reflection.MethodInfo addMethod, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.ElementInit ElementInit(System.Reflection.MethodInfo addMethod, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.DefaultExpression Empty() => throw null; + public static System.Linq.Expressions.BinaryExpression Equal(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Equal(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression ExclusiveOr(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression ExclusiveOr(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression ExclusiveOrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression ExclusiveOrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression ExclusiveOrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + protected Expression(System.Linq.Expressions.ExpressionType nodeType, System.Type type) => throw null; + protected Expression() => throw null; + public static System.Linq.Expressions.MemberExpression Field(System.Linq.Expressions.Expression expression, string fieldName) => throw null; + public static System.Linq.Expressions.MemberExpression Field(System.Linq.Expressions.Expression expression, System.Type type, string fieldName) => throw null; + public static System.Linq.Expressions.MemberExpression Field(System.Linq.Expressions.Expression expression, System.Reflection.FieldInfo field) => throw null; + public static System.Type GetActionType(params System.Type[] typeArgs) => throw null; + public static System.Type GetDelegateType(params System.Type[] typeArgs) => throw null; + public static System.Type GetFuncType(params System.Type[] typeArgs) => throw null; + public static System.Linq.Expressions.GotoExpression Goto(System.Linq.Expressions.LabelTarget target, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Goto(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Goto(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value) => throw null; + public static System.Linq.Expressions.GotoExpression Goto(System.Linq.Expressions.LabelTarget target) => throw null; + public static System.Linq.Expressions.BinaryExpression GreaterThan(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression GreaterThan(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression GreaterThanOrEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression GreaterThanOrEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.ConditionalExpression IfThen(System.Linq.Expressions.Expression test, System.Linq.Expressions.Expression ifTrue) => throw null; + public static System.Linq.Expressions.ConditionalExpression IfThenElse(System.Linq.Expressions.Expression test, System.Linq.Expressions.Expression ifTrue, System.Linq.Expressions.Expression ifFalse) => throw null; + public static System.Linq.Expressions.UnaryExpression Increment(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression Increment(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.InvocationExpression Invoke(System.Linq.Expressions.Expression expression, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.InvocationExpression Invoke(System.Linq.Expressions.Expression expression, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.UnaryExpression IsFalse(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression IsFalse(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.UnaryExpression IsTrue(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression IsTrue(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.LabelTarget Label(string name) => throw null; + public static System.Linq.Expressions.LabelTarget Label(System.Type type, string name) => throw null; + public static System.Linq.Expressions.LabelTarget Label(System.Type type) => throw null; + public static System.Linq.Expressions.LabelTarget Label() => throw null; + public static System.Linq.Expressions.LabelExpression Label(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression defaultValue) => throw null; + public static System.Linq.Expressions.LabelExpression Label(System.Linq.Expressions.LabelTarget target) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, string name, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, string name, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, bool tailCall, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Type delegateType, System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, string name, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, string name, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, bool tailCall, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.LambdaExpression Lambda(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, string name, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, string name, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, bool tailCall, params System.Linq.Expressions.ParameterExpression[] parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, bool tailCall, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.Expression Lambda(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable parameters) => throw null; + public static System.Linq.Expressions.BinaryExpression LeftShift(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression LeftShift(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression LeftShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression LeftShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression LeftShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression LessThan(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression LessThan(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression LessThanOrEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression LessThanOrEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.MemberListBinding ListBind(System.Reflection.MethodInfo propertyAccessor, params System.Linq.Expressions.ElementInit[] initializers) => throw null; + public static System.Linq.Expressions.MemberListBinding ListBind(System.Reflection.MethodInfo propertyAccessor, System.Collections.Generic.IEnumerable initializers) => throw null; + public static System.Linq.Expressions.MemberListBinding ListBind(System.Reflection.MemberInfo member, params System.Linq.Expressions.ElementInit[] initializers) => throw null; + public static System.Linq.Expressions.MemberListBinding ListBind(System.Reflection.MemberInfo member, System.Collections.Generic.IEnumerable initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, params System.Linq.Expressions.Expression[] initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, params System.Linq.Expressions.ElementInit[] initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, System.Reflection.MethodInfo addMethod, params System.Linq.Expressions.Expression[] initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, System.Reflection.MethodInfo addMethod, System.Collections.Generic.IEnumerable initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, System.Collections.Generic.IEnumerable initializers) => throw null; + public static System.Linq.Expressions.ListInitExpression ListInit(System.Linq.Expressions.NewExpression newExpression, System.Collections.Generic.IEnumerable initializers) => throw null; + public static System.Linq.Expressions.LoopExpression Loop(System.Linq.Expressions.Expression body, System.Linq.Expressions.LabelTarget @break, System.Linq.Expressions.LabelTarget @continue) => throw null; + public static System.Linq.Expressions.LoopExpression Loop(System.Linq.Expressions.Expression body, System.Linq.Expressions.LabelTarget @break) => throw null; + public static System.Linq.Expressions.LoopExpression Loop(System.Linq.Expressions.Expression body) => throw null; + public static System.Linq.Expressions.BinaryExpression MakeBinary(System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression MakeBinary(System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression MakeBinary(System.Linq.Expressions.ExpressionType binaryType, System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.CatchBlock MakeCatchBlock(System.Type type, System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2, System.Linq.Expressions.Expression arg3) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1, System.Linq.Expressions.Expression arg2) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0, System.Linq.Expressions.Expression arg1) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Linq.Expressions.Expression arg0) => throw null; + public static System.Linq.Expressions.DynamicExpression MakeDynamic(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.GotoExpression MakeGoto(System.Linq.Expressions.GotoExpressionKind kind, System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value, System.Type type) => throw null; + public static System.Linq.Expressions.IndexExpression MakeIndex(System.Linq.Expressions.Expression instance, System.Reflection.PropertyInfo indexer, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.MemberExpression MakeMemberAccess(System.Linq.Expressions.Expression expression, System.Reflection.MemberInfo member) => throw null; + public static System.Linq.Expressions.TryExpression MakeTry(System.Type type, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression @finally, System.Linq.Expressions.Expression fault, System.Collections.Generic.IEnumerable handlers) => throw null; + public static System.Linq.Expressions.UnaryExpression MakeUnary(System.Linq.Expressions.ExpressionType unaryType, System.Linq.Expressions.Expression operand, System.Type type, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression MakeUnary(System.Linq.Expressions.ExpressionType unaryType, System.Linq.Expressions.Expression operand, System.Type type) => throw null; + public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MethodInfo propertyAccessor, params System.Linq.Expressions.MemberBinding[] bindings) => throw null; + public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MethodInfo propertyAccessor, System.Collections.Generic.IEnumerable bindings) => throw null; + public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MemberInfo member, params System.Linq.Expressions.MemberBinding[] bindings) => throw null; + public static System.Linq.Expressions.MemberMemberBinding MemberBind(System.Reflection.MemberInfo member, System.Collections.Generic.IEnumerable bindings) => throw null; + public static System.Linq.Expressions.MemberInitExpression MemberInit(System.Linq.Expressions.NewExpression newExpression, params System.Linq.Expressions.MemberBinding[] bindings) => throw null; + public static System.Linq.Expressions.MemberInitExpression MemberInit(System.Linq.Expressions.NewExpression newExpression, System.Collections.Generic.IEnumerable bindings) => throw null; + public static System.Linq.Expressions.BinaryExpression Modulo(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Modulo(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression ModuloAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression ModuloAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression ModuloAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression Multiply(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Multiply(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression MultiplyChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.UnaryExpression Negate(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression Negate(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.UnaryExpression NegateChecked(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression NegateChecked(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Type type) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Reflection.ConstructorInfo constructor, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable arguments, params System.Reflection.MemberInfo[] members) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable arguments, System.Collections.Generic.IEnumerable members) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.NewExpression New(System.Reflection.ConstructorInfo constructor) => throw null; + public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(System.Type type, params System.Linq.Expressions.Expression[] bounds) => throw null; + public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(System.Type type, System.Collections.Generic.IEnumerable bounds) => throw null; + public static System.Linq.Expressions.NewArrayExpression NewArrayInit(System.Type type, params System.Linq.Expressions.Expression[] initializers) => throw null; + public static System.Linq.Expressions.NewArrayExpression NewArrayInit(System.Type type, System.Collections.Generic.IEnumerable initializers) => throw null; + public virtual System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public static System.Linq.Expressions.UnaryExpression Not(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression Not(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.BinaryExpression NotEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, bool liftToNull, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression NotEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.UnaryExpression OnesComplement(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression OnesComplement(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.BinaryExpression Or(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Or(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression OrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression OrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression OrAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression OrElse(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression OrElse(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.ParameterExpression Parameter(System.Type type, string name) => throw null; + public static System.Linq.Expressions.ParameterExpression Parameter(System.Type type) => throw null; + public static System.Linq.Expressions.UnaryExpression PostDecrementAssign(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression PostDecrementAssign(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.UnaryExpression PostIncrementAssign(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression PostIncrementAssign(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.BinaryExpression Power(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Power(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression PowerAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression PowerAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression PowerAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.UnaryExpression PreDecrementAssign(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression PreDecrementAssign(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.UnaryExpression PreIncrementAssign(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression PreIncrementAssign(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.MemberExpression Property(System.Linq.Expressions.Expression expression, string propertyName) => throw null; + public static System.Linq.Expressions.MemberExpression Property(System.Linq.Expressions.Expression expression, System.Type type, string propertyName) => throw null; + public static System.Linq.Expressions.MemberExpression Property(System.Linq.Expressions.Expression expression, System.Reflection.PropertyInfo property) => throw null; + public static System.Linq.Expressions.MemberExpression Property(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo propertyAccessor) => throw null; + public static System.Linq.Expressions.IndexExpression Property(System.Linq.Expressions.Expression instance, string propertyName, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.IndexExpression Property(System.Linq.Expressions.Expression instance, System.Reflection.PropertyInfo indexer, params System.Linq.Expressions.Expression[] arguments) => throw null; + public static System.Linq.Expressions.IndexExpression Property(System.Linq.Expressions.Expression instance, System.Reflection.PropertyInfo indexer, System.Collections.Generic.IEnumerable arguments) => throw null; + public static System.Linq.Expressions.MemberExpression PropertyOrField(System.Linq.Expressions.Expression expression, string propertyOrFieldName) => throw null; + public static System.Linq.Expressions.UnaryExpression Quote(System.Linq.Expressions.Expression expression) => throw null; + public virtual System.Linq.Expressions.Expression Reduce() => throw null; + public System.Linq.Expressions.Expression ReduceAndCheck() => throw null; + public System.Linq.Expressions.Expression ReduceExtensions() => throw null; + public static System.Linq.Expressions.BinaryExpression ReferenceEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression ReferenceNotEqual(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.UnaryExpression Rethrow(System.Type type) => throw null; + public static System.Linq.Expressions.UnaryExpression Rethrow() => throw null; + public static System.Linq.Expressions.GotoExpression Return(System.Linq.Expressions.LabelTarget target, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Return(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value, System.Type type) => throw null; + public static System.Linq.Expressions.GotoExpression Return(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value) => throw null; + public static System.Linq.Expressions.GotoExpression Return(System.Linq.Expressions.LabelTarget target) => throw null; + public static System.Linq.Expressions.BinaryExpression RightShift(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression RightShift(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression RightShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression RightShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression RightShiftAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.RuntimeVariablesExpression RuntimeVariables(params System.Linq.Expressions.ParameterExpression[] variables) => throw null; + public static System.Linq.Expressions.RuntimeVariablesExpression RuntimeVariables(System.Collections.Generic.IEnumerable variables) => throw null; + public static System.Linq.Expressions.BinaryExpression Subtract(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression Subtract(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssign(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method, System.Linq.Expressions.LambdaExpression conversion) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractAssignChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.BinaryExpression SubtractChecked(System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Type type, System.Linq.Expressions.Expression switchValue, System.Linq.Expressions.Expression defaultBody, System.Reflection.MethodInfo comparison, params System.Linq.Expressions.SwitchCase[] cases) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Type type, System.Linq.Expressions.Expression switchValue, System.Linq.Expressions.Expression defaultBody, System.Reflection.MethodInfo comparison, System.Collections.Generic.IEnumerable cases) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Linq.Expressions.Expression switchValue, params System.Linq.Expressions.SwitchCase[] cases) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Linq.Expressions.Expression switchValue, System.Linq.Expressions.Expression defaultBody, params System.Linq.Expressions.SwitchCase[] cases) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Linq.Expressions.Expression switchValue, System.Linq.Expressions.Expression defaultBody, System.Reflection.MethodInfo comparison, params System.Linq.Expressions.SwitchCase[] cases) => throw null; + public static System.Linq.Expressions.SwitchExpression Switch(System.Linq.Expressions.Expression switchValue, System.Linq.Expressions.Expression defaultBody, System.Reflection.MethodInfo comparison, System.Collections.Generic.IEnumerable cases) => throw null; + public static System.Linq.Expressions.SwitchCase SwitchCase(System.Linq.Expressions.Expression body, params System.Linq.Expressions.Expression[] testValues) => throw null; + public static System.Linq.Expressions.SwitchCase SwitchCase(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable testValues) => throw null; + public static System.Linq.Expressions.SymbolDocumentInfo SymbolDocument(string fileName, System.Guid language, System.Guid languageVendor, System.Guid documentType) => throw null; + public static System.Linq.Expressions.SymbolDocumentInfo SymbolDocument(string fileName, System.Guid language, System.Guid languageVendor) => throw null; + public static System.Linq.Expressions.SymbolDocumentInfo SymbolDocument(string fileName, System.Guid language) => throw null; + public static System.Linq.Expressions.SymbolDocumentInfo SymbolDocument(string fileName) => throw null; + public static System.Linq.Expressions.UnaryExpression Throw(System.Linq.Expressions.Expression value, System.Type type) => throw null; + public static System.Linq.Expressions.UnaryExpression Throw(System.Linq.Expressions.Expression value) => throw null; + public override string ToString() => throw null; + public static System.Linq.Expressions.TryExpression TryCatch(System.Linq.Expressions.Expression body, params System.Linq.Expressions.CatchBlock[] handlers) => throw null; + public static System.Linq.Expressions.TryExpression TryCatchFinally(System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression @finally, params System.Linq.Expressions.CatchBlock[] handlers) => throw null; + public static System.Linq.Expressions.TryExpression TryFault(System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression fault) => throw null; + public static System.Linq.Expressions.TryExpression TryFinally(System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression @finally) => throw null; + public static bool TryGetActionType(System.Type[] typeArgs, out System.Type actionType) => throw null; + public static bool TryGetFuncType(System.Type[] typeArgs, out System.Type funcType) => throw null; + public virtual System.Type Type { get => throw null; } + public static System.Linq.Expressions.UnaryExpression TypeAs(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.TypeBinaryExpression TypeEqual(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.TypeBinaryExpression TypeIs(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.UnaryExpression UnaryPlus(System.Linq.Expressions.Expression expression, System.Reflection.MethodInfo method) => throw null; + public static System.Linq.Expressions.UnaryExpression UnaryPlus(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.UnaryExpression Unbox(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + public static System.Linq.Expressions.ParameterExpression Variable(System.Type type, string name) => throw null; + public static System.Linq.Expressions.ParameterExpression Variable(System.Type type) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `System.Linq.Expressions.Expression<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Expression : System.Linq.Expressions.LambdaExpression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public TDelegate Compile(bool preferInterpretation) => throw null; + public TDelegate Compile(System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator) => throw null; + public TDelegate Compile() => throw null; + public System.Linq.Expressions.Expression Update(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable parameters) => throw null; + } + + // Generated from `System.Linq.Expressions.ExpressionType` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ExpressionType + { + Add, + AddAssign, + AddAssignChecked, + AddChecked, + And, + AndAlso, + AndAssign, + ArrayIndex, + ArrayLength, + Assign, + Block, + Call, + Coalesce, + Conditional, + Constant, + Convert, + ConvertChecked, + DebugInfo, + Decrement, + Default, + Divide, + DivideAssign, + Dynamic, + Equal, + ExclusiveOr, + ExclusiveOrAssign, + // Stub generator skipped constructor + Extension, + Goto, + GreaterThan, + GreaterThanOrEqual, + Increment, + Index, + Invoke, + IsFalse, + IsTrue, + Label, + Lambda, + LeftShift, + LeftShiftAssign, + LessThan, + LessThanOrEqual, + ListInit, + Loop, + MemberAccess, + MemberInit, + Modulo, + ModuloAssign, + Multiply, + MultiplyAssign, + MultiplyAssignChecked, + MultiplyChecked, + Negate, + NegateChecked, + New, + NewArrayBounds, + NewArrayInit, + Not, + NotEqual, + OnesComplement, + Or, + OrAssign, + OrElse, + Parameter, + PostDecrementAssign, + PostIncrementAssign, + Power, + PowerAssign, + PreDecrementAssign, + PreIncrementAssign, + Quote, + RightShift, + RightShiftAssign, + RuntimeVariables, + Subtract, + SubtractAssign, + SubtractAssignChecked, + SubtractChecked, + Switch, + Throw, + Try, + TypeAs, + TypeEqual, + TypeIs, + UnaryPlus, + Unbox, + } + + // Generated from `System.Linq.Expressions.ExpressionVisitor` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ExpressionVisitor + { + protected ExpressionVisitor() => throw null; + public virtual System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression node) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection Visit(System.Collections.ObjectModel.ReadOnlyCollection nodes, System.Func elementVisitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Visit(System.Collections.ObjectModel.ReadOnlyCollection nodes) => throw null; + public T VisitAndConvert(T node, string callerName) where T : System.Linq.Expressions.Expression => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection VisitAndConvert(System.Collections.ObjectModel.ReadOnlyCollection nodes, string callerName) where T : System.Linq.Expressions.Expression => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitBlock(System.Linq.Expressions.BlockExpression node) => throw null; + protected virtual System.Linq.Expressions.CatchBlock VisitCatchBlock(System.Linq.Expressions.CatchBlock node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitConditional(System.Linq.Expressions.ConditionalExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitConstant(System.Linq.Expressions.ConstantExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitDebugInfo(System.Linq.Expressions.DebugInfoExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitDefault(System.Linq.Expressions.DefaultExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitDynamic(System.Linq.Expressions.DynamicExpression node) => throw null; + protected virtual System.Linq.Expressions.ElementInit VisitElementInit(System.Linq.Expressions.ElementInit node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitExtension(System.Linq.Expressions.Expression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitGoto(System.Linq.Expressions.GotoExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitIndex(System.Linq.Expressions.IndexExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitInvocation(System.Linq.Expressions.InvocationExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitLabel(System.Linq.Expressions.LabelExpression node) => throw null; + protected virtual System.Linq.Expressions.LabelTarget VisitLabelTarget(System.Linq.Expressions.LabelTarget node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitLambda(System.Linq.Expressions.Expression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitListInit(System.Linq.Expressions.ListInitExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitLoop(System.Linq.Expressions.LoopExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitMember(System.Linq.Expressions.MemberExpression node) => throw null; + protected virtual System.Linq.Expressions.MemberAssignment VisitMemberAssignment(System.Linq.Expressions.MemberAssignment node) => throw null; + protected virtual System.Linq.Expressions.MemberBinding VisitMemberBinding(System.Linq.Expressions.MemberBinding node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitMemberInit(System.Linq.Expressions.MemberInitExpression node) => throw null; + protected virtual System.Linq.Expressions.MemberListBinding VisitMemberListBinding(System.Linq.Expressions.MemberListBinding node) => throw null; + protected virtual System.Linq.Expressions.MemberMemberBinding VisitMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNewArray(System.Linq.Expressions.NewArrayExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitParameter(System.Linq.Expressions.ParameterExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitRuntimeVariables(System.Linq.Expressions.RuntimeVariablesExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitSwitch(System.Linq.Expressions.SwitchExpression node) => throw null; + protected virtual System.Linq.Expressions.SwitchCase VisitSwitchCase(System.Linq.Expressions.SwitchCase node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitTry(System.Linq.Expressions.TryExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression node) => throw null; + } + + // Generated from `System.Linq.Expressions.GotoExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GotoExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.GotoExpressionKind Kind { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.LabelTarget Target { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.GotoExpression Update(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression value) => throw null; + public System.Linq.Expressions.Expression Value { get => throw null; } + } + + // Generated from `System.Linq.Expressions.GotoExpressionKind` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GotoExpressionKind + { + Break, + Continue, + Goto, + // Stub generator skipped constructor + Return, + } + + // Generated from `System.Linq.Expressions.IArgumentProvider` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IArgumentProvider + { + int ArgumentCount { get; } + System.Linq.Expressions.Expression GetArgument(int index); + } + + // Generated from `System.Linq.Expressions.IDynamicExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDynamicExpression : System.Linq.Expressions.IArgumentProvider + { + object CreateCallSite(); + System.Type DelegateType { get; } + System.Linq.Expressions.Expression Rewrite(System.Linq.Expressions.Expression[] args); + } + + // Generated from `System.Linq.Expressions.IndexExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IndexExpression : System.Linq.Expressions.Expression, System.Linq.Expressions.IArgumentProvider + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public System.Reflection.PropertyInfo Indexer { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression Object { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.IndexExpression Update(System.Linq.Expressions.Expression @object, System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.InvocationExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvocationExpression : System.Linq.Expressions.Expression, System.Linq.Expressions.IArgumentProvider + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + public System.Linq.Expressions.Expression Expression { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.InvocationExpression Update(System.Linq.Expressions.Expression expression, System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.LabelExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LabelExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression DefaultValue { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.LabelTarget Target { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.LabelExpression Update(System.Linq.Expressions.LabelTarget target, System.Linq.Expressions.Expression defaultValue) => throw null; + } + + // Generated from `System.Linq.Expressions.LabelTarget` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LabelTarget + { + public string Name { get => throw null; } + public override string ToString() => throw null; + public System.Type Type { get => throw null; } + } + + // Generated from `System.Linq.Expressions.LambdaExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class LambdaExpression : System.Linq.Expressions.Expression + { + public System.Linq.Expressions.Expression Body { get => throw null; } + public System.Delegate Compile(bool preferInterpretation) => throw null; + public System.Delegate Compile(System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator) => throw null; + public System.Delegate Compile() => throw null; + internal LambdaExpression() => throw null; + public string Name { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Parameters { get => throw null; } + public System.Type ReturnType { get => throw null; } + public bool TailCall { get => throw null; } + public override System.Type Type { get => throw null; } + } + + // Generated from `System.Linq.Expressions.ListInitExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ListInitExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool CanReduce { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Initializers { get => throw null; } + public System.Linq.Expressions.NewExpression NewExpression { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Linq.Expressions.Expression Reduce() => throw null; + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.ListInitExpression Update(System.Linq.Expressions.NewExpression newExpression, System.Collections.Generic.IEnumerable initializers) => throw null; + } + + // Generated from `System.Linq.Expressions.LoopExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LoopExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Body { get => throw null; } + public System.Linq.Expressions.LabelTarget BreakLabel { get => throw null; } + public System.Linq.Expressions.LabelTarget ContinueLabel { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.LoopExpression Update(System.Linq.Expressions.LabelTarget breakLabel, System.Linq.Expressions.LabelTarget continueLabel, System.Linq.Expressions.Expression body) => throw null; + } + + // Generated from `System.Linq.Expressions.MemberAssignment` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberAssignment : System.Linq.Expressions.MemberBinding + { + public System.Linq.Expressions.Expression Expression { get => throw null; } + internal MemberAssignment() : base(default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) => throw null; + public System.Linq.Expressions.MemberAssignment Update(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `System.Linq.Expressions.MemberBinding` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MemberBinding + { + public System.Linq.Expressions.MemberBindingType BindingType { get => throw null; } + public System.Reflection.MemberInfo Member { get => throw null; } + protected MemberBinding(System.Linq.Expressions.MemberBindingType type, System.Reflection.MemberInfo member) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Linq.Expressions.MemberBindingType` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MemberBindingType + { + Assignment, + ListBinding, + MemberBinding, + // Stub generator skipped constructor + } + + // Generated from `System.Linq.Expressions.MemberExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Expression { get => throw null; } + public System.Reflection.MemberInfo Member { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.MemberExpression Update(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `System.Linq.Expressions.MemberInitExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberInitExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Bindings { get => throw null; } + public override bool CanReduce { get => throw null; } + public System.Linq.Expressions.NewExpression NewExpression { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Linq.Expressions.Expression Reduce() => throw null; + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.MemberInitExpression Update(System.Linq.Expressions.NewExpression newExpression, System.Collections.Generic.IEnumerable bindings) => throw null; + } + + // Generated from `System.Linq.Expressions.MemberListBinding` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberListBinding : System.Linq.Expressions.MemberBinding + { + public System.Collections.ObjectModel.ReadOnlyCollection Initializers { get => throw null; } + internal MemberListBinding() : base(default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) => throw null; + public System.Linq.Expressions.MemberListBinding Update(System.Collections.Generic.IEnumerable initializers) => throw null; + } + + // Generated from `System.Linq.Expressions.MemberMemberBinding` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberMemberBinding : System.Linq.Expressions.MemberBinding + { + public System.Collections.ObjectModel.ReadOnlyCollection Bindings { get => throw null; } + internal MemberMemberBinding() : base(default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) => throw null; + public System.Linq.Expressions.MemberMemberBinding Update(System.Collections.Generic.IEnumerable bindings) => throw null; + } + + // Generated from `System.Linq.Expressions.MethodCallExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodCallExpression : System.Linq.Expressions.Expression, System.Linq.Expressions.IArgumentProvider + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression Object { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.MethodCallExpression Update(System.Linq.Expressions.Expression @object, System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.NewArrayExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NewArrayExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Expressions { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.NewArrayExpression Update(System.Collections.Generic.IEnumerable expressions) => throw null; + } + + // Generated from `System.Linq.Expressions.NewExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NewExpression : System.Linq.Expressions.Expression, System.Linq.Expressions.IArgumentProvider + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + int System.Linq.Expressions.IArgumentProvider.ArgumentCount { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + public System.Reflection.ConstructorInfo Constructor { get => throw null; } + System.Linq.Expressions.Expression System.Linq.Expressions.IArgumentProvider.GetArgument(int index) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Members { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.NewExpression Update(System.Collections.Generic.IEnumerable arguments) => throw null; + } + + // Generated from `System.Linq.Expressions.ParameterExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParameterExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public bool IsByRef { get => throw null; } + public string Name { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + } + + // Generated from `System.Linq.Expressions.RuntimeVariablesExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuntimeVariablesExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.RuntimeVariablesExpression Update(System.Collections.Generic.IEnumerable variables) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Variables { get => throw null; } + } + + // Generated from `System.Linq.Expressions.SwitchCase` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SwitchCase + { + public System.Linq.Expressions.Expression Body { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection TestValues { get => throw null; } + public override string ToString() => throw null; + public System.Linq.Expressions.SwitchCase Update(System.Collections.Generic.IEnumerable testValues, System.Linq.Expressions.Expression body) => throw null; + } + + // Generated from `System.Linq.Expressions.SwitchExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SwitchExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Cases { get => throw null; } + public System.Reflection.MethodInfo Comparison { get => throw null; } + public System.Linq.Expressions.Expression DefaultBody { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression SwitchValue { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.SwitchExpression Update(System.Linq.Expressions.Expression switchValue, System.Collections.Generic.IEnumerable cases, System.Linq.Expressions.Expression defaultBody) => throw null; + } + + // Generated from `System.Linq.Expressions.SymbolDocumentInfo` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SymbolDocumentInfo + { + public virtual System.Guid DocumentType { get => throw null; } + public string FileName { get => throw null; } + public virtual System.Guid Language { get => throw null; } + public virtual System.Guid LanguageVendor { get => throw null; } + } + + // Generated from `System.Linq.Expressions.TryExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TryExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Body { get => throw null; } + public System.Linq.Expressions.Expression Fault { get => throw null; } + public System.Linq.Expressions.Expression Finally { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Handlers { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.TryExpression Update(System.Linq.Expressions.Expression body, System.Collections.Generic.IEnumerable handlers, System.Linq.Expressions.Expression @finally, System.Linq.Expressions.Expression fault) => throw null; + } + + // Generated from `System.Linq.Expressions.TypeBinaryExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeBinaryExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Expression { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Type Type { get => throw null; } + public System.Type TypeOperand { get => throw null; } + public System.Linq.Expressions.TypeBinaryExpression Update(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `System.Linq.Expressions.UnaryExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnaryExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool CanReduce { get => throw null; } + public bool IsLifted { get => throw null; } + public bool IsLiftedToNull { get => throw null; } + public System.Reflection.MethodInfo Method { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public System.Linq.Expressions.Expression Operand { get => throw null; } + public override System.Linq.Expressions.Expression Reduce() => throw null; + public override System.Type Type { get => throw null; } + public System.Linq.Expressions.UnaryExpression Update(System.Linq.Expressions.Expression operand) => throw null; + } + + } + } + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.CallSite` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallSite + { + public System.Runtime.CompilerServices.CallSiteBinder Binder { get => throw null; } + internal CallSite() => throw null; + public static System.Runtime.CompilerServices.CallSite Create(System.Type delegateType, System.Runtime.CompilerServices.CallSiteBinder binder) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallSite<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallSite : System.Runtime.CompilerServices.CallSite where T : class + { + public static System.Runtime.CompilerServices.CallSite Create(System.Runtime.CompilerServices.CallSiteBinder binder) => throw null; + public T Target; + public T Update { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.CallSiteBinder` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CallSiteBinder + { + public abstract System.Linq.Expressions.Expression Bind(object[] args, System.Collections.ObjectModel.ReadOnlyCollection parameters, System.Linq.Expressions.LabelTarget returnLabel); + public virtual T BindDelegate(System.Runtime.CompilerServices.CallSite site, object[] args) where T : class => throw null; + protected void CacheTarget(T target) where T : class => throw null; + protected CallSiteBinder() => throw null; + public static System.Linq.Expressions.LabelTarget UpdateLabel { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.CallSiteHelpers` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CallSiteHelpers + { + public static bool IsInternalFrame(System.Reflection.MethodBase mb) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.DebugInfoGenerator` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DebugInfoGenerator + { + public static System.Runtime.CompilerServices.DebugInfoGenerator CreatePdbGenerator() => throw null; + protected DebugInfoGenerator() => throw null; + public abstract void MarkSequencePoint(System.Linq.Expressions.LambdaExpression method, int ilOffset, System.Linq.Expressions.DebugInfoExpression sequencePoint); + } + + // Generated from `System.Runtime.CompilerServices.DynamicAttribute` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicAttribute : System.Attribute + { + public DynamicAttribute(bool[] transformFlags) => throw null; + public DynamicAttribute() => throw null; + public System.Collections.Generic.IList TransformFlags { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.IRuntimeVariables` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IRuntimeVariables + { + int Count { get; } + object this[int index] { get; set; } + } + + // Generated from `System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyCollectionBuilder : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public int Capacity { get => throw null; set => throw null; } + public void Clear() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public ReadOnlyCollectionBuilder(int capacity) => throw null; + public ReadOnlyCollectionBuilder(System.Collections.Generic.IEnumerable collection) => throw null; + public ReadOnlyCollectionBuilder() => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public void RemoveAt(int index) => throw null; + public void Reverse(int index, int count) => throw null; + public void Reverse() => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public T[] ToArray() => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection ToReadOnlyCollection() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.RuleCache<>` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuleCache where T : class + { + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs new file mode 100644 index 000000000000..58d8e98e05f6 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs @@ -0,0 +1,254 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Linq + { + // Generated from `System.Linq.OrderedParallelQuery<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OrderedParallelQuery : System.Linq.ParallelQuery + { + public override System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + } + + // Generated from `System.Linq.ParallelEnumerable` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ParallelEnumerable + { + public static TSource Aggregate(this System.Linq.ParallelQuery source, System.Func func) => throw null; + public static TResult Aggregate(this System.Linq.ParallelQuery source, TAccumulate seed, System.Func updateAccumulatorFunc, System.Func combineAccumulatorsFunc, System.Func resultSelector) => throw null; + public static TResult Aggregate(this System.Linq.ParallelQuery source, TAccumulate seed, System.Func func, System.Func resultSelector) => throw null; + public static TResult Aggregate(this System.Linq.ParallelQuery source, System.Func seedFactory, System.Func updateAccumulatorFunc, System.Func combineAccumulatorsFunc, System.Func resultSelector) => throw null; + public static TAccumulate Aggregate(this System.Linq.ParallelQuery source, TAccumulate seed, System.Func func) => throw null; + public static bool All(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static bool Any(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static bool Any(this System.Linq.ParallelQuery source) => throw null; + public static System.Collections.Generic.IEnumerable AsEnumerable(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery AsOrdered(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery AsOrdered(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery AsParallel(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Linq.ParallelQuery AsParallel(this System.Collections.Concurrent.Partitioner source) => throw null; + public static System.Linq.ParallelQuery AsParallel(this System.Collections.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable AsSequential(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery AsUnordered(this System.Linq.ParallelQuery source) => throw null; + public static float? Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float? Average(this System.Linq.ParallelQuery source) => throw null; + public static float Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float Average(this System.Linq.ParallelQuery source) => throw null; + public static double? Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Average(this System.Linq.ParallelQuery source) => throw null; + public static double? Average(this System.Linq.ParallelQuery source) => throw null; + public static double? Average(this System.Linq.ParallelQuery source) => throw null; + public static double Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Average(this System.Linq.ParallelQuery source) => throw null; + public static double Average(this System.Linq.ParallelQuery source) => throw null; + public static double Average(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal? Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal? Average(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal Average(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal Average(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Cast(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Concat(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second) => throw null; + public static System.Linq.ParallelQuery Concat(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second) => throw null; + public static bool Contains(this System.Linq.ParallelQuery source, TSource value, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool Contains(this System.Linq.ParallelQuery source, TSource value) => throw null; + public static int Count(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static int Count(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery DefaultIfEmpty(this System.Linq.ParallelQuery source, TSource defaultValue) => throw null; + public static System.Linq.ParallelQuery DefaultIfEmpty(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Distinct(this System.Linq.ParallelQuery source, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Distinct(this System.Linq.ParallelQuery source) => throw null; + public static TSource ElementAt(this System.Linq.ParallelQuery source, int index) => throw null; + public static TSource ElementAtOrDefault(this System.Linq.ParallelQuery source, int index) => throw null; + public static System.Linq.ParallelQuery Empty() => throw null; + public static System.Linq.ParallelQuery Except(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Except(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second) => throw null; + public static System.Linq.ParallelQuery Except(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Except(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second) => throw null; + public static TSource First(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource First(this System.Linq.ParallelQuery source) => throw null; + public static TSource FirstOrDefault(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource FirstOrDefault(this System.Linq.ParallelQuery source) => throw null; + public static void ForAll(this System.Linq.ParallelQuery source, System.Action action) => throw null; + public static System.Linq.ParallelQuery GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func, TResult> resultSelector) => throw null; + public static System.Linq.ParallelQuery GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector) => throw null; + public static System.Linq.ParallelQuery> GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery> GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector) => throw null; + public static System.Linq.ParallelQuery> GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery> GroupBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Linq.ParallelQuery GroupJoin(this System.Linq.ParallelQuery outer, System.Linq.ParallelQuery inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery GroupJoin(this System.Linq.ParallelQuery outer, System.Linq.ParallelQuery inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) => throw null; + public static System.Linq.ParallelQuery GroupJoin(this System.Linq.ParallelQuery outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery GroupJoin(this System.Linq.ParallelQuery outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) => throw null; + public static System.Linq.ParallelQuery Intersect(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Intersect(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second) => throw null; + public static System.Linq.ParallelQuery Intersect(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Intersect(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second) => throw null; + public static System.Linq.ParallelQuery Join(this System.Linq.ParallelQuery outer, System.Linq.ParallelQuery inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Join(this System.Linq.ParallelQuery outer, System.Linq.ParallelQuery inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) => throw null; + public static System.Linq.ParallelQuery Join(this System.Linq.ParallelQuery outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Join(this System.Linq.ParallelQuery outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) => throw null; + public static TSource Last(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource Last(this System.Linq.ParallelQuery source) => throw null; + public static TSource LastOrDefault(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource LastOrDefault(this System.Linq.ParallelQuery source) => throw null; + public static System.Int64 LongCount(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Int64 LongCount(this System.Linq.ParallelQuery source) => throw null; + public static int? Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int? Max(this System.Linq.ParallelQuery source) => throw null; + public static int Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int Max(this System.Linq.ParallelQuery source) => throw null; + public static float? Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float? Max(this System.Linq.ParallelQuery source) => throw null; + public static float Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float Max(this System.Linq.ParallelQuery source) => throw null; + public static double? Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Max(this System.Linq.ParallelQuery source) => throw null; + public static double Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Max(this System.Linq.ParallelQuery source) => throw null; + public static TSource Max(this System.Linq.ParallelQuery source) => throw null; + public static TResult Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64? Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64? Max(this System.Linq.ParallelQuery source) => throw null; + public static System.Int64 Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64 Max(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal? Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal? Max(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal Max(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal Max(this System.Linq.ParallelQuery source) => throw null; + public static int? Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int? Min(this System.Linq.ParallelQuery source) => throw null; + public static int Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int Min(this System.Linq.ParallelQuery source) => throw null; + public static float? Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float? Min(this System.Linq.ParallelQuery source) => throw null; + public static float Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float Min(this System.Linq.ParallelQuery source) => throw null; + public static double? Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Min(this System.Linq.ParallelQuery source) => throw null; + public static double Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Min(this System.Linq.ParallelQuery source) => throw null; + public static TSource Min(this System.Linq.ParallelQuery source) => throw null; + public static TResult Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64? Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64? Min(this System.Linq.ParallelQuery source) => throw null; + public static System.Int64 Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64 Min(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal? Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal? Min(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal Min(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal Min(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery OfType(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.OrderedParallelQuery OrderBy(this System.Linq.ParallelQuery source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.OrderedParallelQuery OrderBy(this System.Linq.ParallelQuery source, System.Func keySelector) => throw null; + public static System.Linq.OrderedParallelQuery OrderByDescending(this System.Linq.ParallelQuery source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.OrderedParallelQuery OrderByDescending(this System.Linq.ParallelQuery source, System.Func keySelector) => throw null; + public static System.Linq.ParallelQuery Range(int start, int count) => throw null; + public static System.Linq.ParallelQuery Repeat(TResult element, int count) => throw null; + public static System.Linq.ParallelQuery Reverse(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Select(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Linq.ParallelQuery Select(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Linq.ParallelQuery SelectMany(this System.Linq.ParallelQuery source, System.Func> selector) => throw null; + public static System.Linq.ParallelQuery SelectMany(this System.Linq.ParallelQuery source, System.Func> selector) => throw null; + public static System.Linq.ParallelQuery SelectMany(this System.Linq.ParallelQuery source, System.Func> collectionSelector, System.Func resultSelector) => throw null; + public static System.Linq.ParallelQuery SelectMany(this System.Linq.ParallelQuery source, System.Func> collectionSelector, System.Func resultSelector) => throw null; + public static bool SequenceEqual(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool SequenceEqual(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second) => throw null; + public static bool SequenceEqual(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool SequenceEqual(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second) => throw null; + public static TSource Single(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource Single(this System.Linq.ParallelQuery source) => throw null; + public static TSource SingleOrDefault(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static TSource SingleOrDefault(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Skip(this System.Linq.ParallelQuery source, int count) => throw null; + public static System.Linq.ParallelQuery SkipWhile(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Linq.ParallelQuery SkipWhile(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static int? Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int? Sum(this System.Linq.ParallelQuery source) => throw null; + public static int Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static int Sum(this System.Linq.ParallelQuery source) => throw null; + public static float? Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float? Sum(this System.Linq.ParallelQuery source) => throw null; + public static float Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static float Sum(this System.Linq.ParallelQuery source) => throw null; + public static double? Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double? Sum(this System.Linq.ParallelQuery source) => throw null; + public static double Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static double Sum(this System.Linq.ParallelQuery source) => throw null; + public static System.Int64? Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64? Sum(this System.Linq.ParallelQuery source) => throw null; + public static System.Int64 Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Int64 Sum(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal? Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal? Sum(this System.Linq.ParallelQuery source) => throw null; + public static System.Decimal Sum(this System.Linq.ParallelQuery source, System.Func selector) => throw null; + public static System.Decimal Sum(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ParallelQuery Take(this System.Linq.ParallelQuery source, int count) => throw null; + public static System.Linq.ParallelQuery TakeWhile(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Linq.ParallelQuery TakeWhile(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Linq.OrderedParallelQuery ThenBy(this System.Linq.OrderedParallelQuery source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.OrderedParallelQuery ThenBy(this System.Linq.OrderedParallelQuery source, System.Func keySelector) => throw null; + public static System.Linq.OrderedParallelQuery ThenByDescending(this System.Linq.OrderedParallelQuery source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.OrderedParallelQuery ThenByDescending(this System.Linq.OrderedParallelQuery source, System.Func keySelector) => throw null; + public static TSource[] ToArray(this System.Linq.ParallelQuery source) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Linq.ParallelQuery source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Linq.ParallelQuery source, System.Func keySelector) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Generic.List ToList(this System.Linq.ParallelQuery source) => throw null; + public static System.Linq.ILookup ToLookup(this System.Linq.ParallelQuery source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ILookup ToLookup(this System.Linq.ParallelQuery source, System.Func keySelector) => throw null; + public static System.Linq.ILookup ToLookup(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ILookup ToLookup(this System.Linq.ParallelQuery source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Linq.ParallelQuery Union(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Union(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second) => throw null; + public static System.Linq.ParallelQuery Union(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ParallelQuery Union(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second) => throw null; + public static System.Linq.ParallelQuery Where(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Linq.ParallelQuery Where(this System.Linq.ParallelQuery source, System.Func predicate) => throw null; + public static System.Linq.ParallelQuery WithCancellation(this System.Linq.ParallelQuery source, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Linq.ParallelQuery WithDegreeOfParallelism(this System.Linq.ParallelQuery source, int degreeOfParallelism) => throw null; + public static System.Linq.ParallelQuery WithExecutionMode(this System.Linq.ParallelQuery source, System.Linq.ParallelExecutionMode executionMode) => throw null; + public static System.Linq.ParallelQuery WithMergeOptions(this System.Linq.ParallelQuery source, System.Linq.ParallelMergeOptions mergeOptions) => throw null; + public static System.Linq.ParallelQuery Zip(this System.Linq.ParallelQuery first, System.Linq.ParallelQuery second, System.Func resultSelector) => throw null; + public static System.Linq.ParallelQuery Zip(this System.Linq.ParallelQuery first, System.Collections.Generic.IEnumerable second, System.Func resultSelector) => throw null; + } + + // Generated from `System.Linq.ParallelExecutionMode` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ParallelExecutionMode + { + Default, + ForceParallelism, + // Stub generator skipped constructor + } + + // Generated from `System.Linq.ParallelMergeOptions` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ParallelMergeOptions + { + AutoBuffered, + Default, + FullyBuffered, + NotBuffered, + // Stub generator skipped constructor + } + + // Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParallelQuery : System.Collections.IEnumerable + { + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + internal ParallelQuery() => throw null; + } + + // Generated from `System.Linq.ParallelQuery<>` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParallelQuery : System.Linq.ParallelQuery, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + internal ParallelQuery() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs new file mode 100644 index 000000000000..4983690925d5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs @@ -0,0 +1,176 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Linq + { + // Generated from `System.Linq.EnumerableExecutor` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EnumerableExecutor + { + internal EnumerableExecutor() => throw null; + } + + // Generated from `System.Linq.EnumerableExecutor<>` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumerableExecutor : System.Linq.EnumerableExecutor + { + public EnumerableExecutor(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `System.Linq.EnumerableQuery` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EnumerableQuery + { + internal EnumerableQuery() => throw null; + } + + // Generated from `System.Linq.EnumerableQuery<>` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumerableQuery : System.Linq.EnumerableQuery, System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IQueryProvider, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Linq.IQueryable System.Linq.IQueryProvider.CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + System.Linq.IQueryable System.Linq.IQueryProvider.CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + System.Type System.Linq.IQueryable.ElementType { get => throw null; } + public EnumerableQuery(System.Linq.Expressions.Expression expression) => throw null; + public EnumerableQuery(System.Collections.Generic.IEnumerable enumerable) => throw null; + object System.Linq.IQueryProvider.Execute(System.Linq.Expressions.Expression expression) => throw null; + TElement System.Linq.IQueryProvider.Execute(System.Linq.Expressions.Expression expression) => throw null; + System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + System.Linq.IQueryProvider System.Linq.IQueryable.Provider { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Linq.Queryable` in `System.Linq.Queryable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Queryable + { + public static TSource Aggregate(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> func) => throw null; + public static TResult Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func, System.Linq.Expressions.Expression> selector) => throw null; + public static TAccumulate Aggregate(this System.Linq.IQueryable source, TAccumulate seed, System.Linq.Expressions.Expression> func) => throw null; + public static bool All(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static bool Any(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static bool Any(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Append(this System.Linq.IQueryable source, TSource element) => throw null; + public static System.Linq.IQueryable AsQueryable(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Linq.IQueryable AsQueryable(this System.Collections.IEnumerable source) => throw null; + public static float? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static float? Average(this System.Linq.IQueryable source) => throw null; + public static float Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static float Average(this System.Linq.IQueryable source) => throw null; + public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double? Average(this System.Linq.IQueryable source) => throw null; + public static double? Average(this System.Linq.IQueryable source) => throw null; + public static double? Average(this System.Linq.IQueryable source) => throw null; + public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double Average(this System.Linq.IQueryable source) => throw null; + public static double Average(this System.Linq.IQueryable source) => throw null; + public static double Average(this System.Linq.IQueryable source) => throw null; + public static System.Decimal? Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Decimal? Average(this System.Linq.IQueryable source) => throw null; + public static System.Decimal Average(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Decimal Average(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Cast(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Concat(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + public static bool Contains(this System.Linq.IQueryable source, TSource item, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool Contains(this System.Linq.IQueryable source, TSource item) => throw null; + public static int Count(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static int Count(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source, TSource defaultValue) => throw null; + public static System.Linq.IQueryable DefaultIfEmpty(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Distinct(this System.Linq.IQueryable source, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable Distinct(this System.Linq.IQueryable source) => throw null; + public static TSource ElementAt(this System.Linq.IQueryable source, int index) => throw null; + public static TSource ElementAtOrDefault(this System.Linq.IQueryable source, int index) => throw null; + public static System.Linq.IQueryable Except(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable Except(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + public static TSource First(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource First(this System.Linq.IQueryable source) => throw null; + public static TSource FirstOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource FirstOrDefault(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) => throw null; + public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Linq.Expressions.Expression, TResult>> resultSelector) => throw null; + public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) => throw null; + public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable> GroupBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Linq.Expressions.Expression> elementSelector) => throw null; + public static System.Linq.IQueryable GroupJoin(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable GroupJoin(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression, TResult>> resultSelector) => throw null; + public static System.Linq.IQueryable Intersect(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable Intersect(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + public static System.Linq.IQueryable Join(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable Join(this System.Linq.IQueryable outer, System.Collections.Generic.IEnumerable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector) => throw null; + public static TSource Last(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource Last(this System.Linq.IQueryable source) => throw null; + public static TSource LastOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource LastOrDefault(this System.Linq.IQueryable source) => throw null; + public static System.Int64 LongCount(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Int64 LongCount(this System.Linq.IQueryable source) => throw null; + public static TSource Max(this System.Linq.IQueryable source) => throw null; + public static TResult Max(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static TSource Min(this System.Linq.IQueryable source) => throw null; + public static TResult Min(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Linq.IQueryable OfType(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IOrderedQueryable OrderBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedQueryable OrderBy(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) => throw null; + public static System.Linq.IOrderedQueryable OrderByDescending(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedQueryable OrderByDescending(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> keySelector) => throw null; + public static System.Linq.IQueryable Prepend(this System.Linq.IQueryable source, TSource element) => throw null; + public static System.Linq.IQueryable Reverse(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Select(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Linq.IQueryable Select(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> selector) => throw null; + public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> selector) => throw null; + public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) => throw null; + public static System.Linq.IQueryable SelectMany(this System.Linq.IQueryable source, System.Linq.Expressions.Expression>> collectionSelector, System.Linq.Expressions.Expression> resultSelector) => throw null; + public static bool SequenceEqual(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool SequenceEqual(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + public static TSource Single(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource Single(this System.Linq.IQueryable source) => throw null; + public static TSource SingleOrDefault(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static TSource SingleOrDefault(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Skip(this System.Linq.IQueryable source, int count) => throw null; + public static System.Linq.IQueryable SkipLast(this System.Linq.IQueryable source, int count) => throw null; + public static System.Linq.IQueryable SkipWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Linq.IQueryable SkipWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static int? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static int? Sum(this System.Linq.IQueryable source) => throw null; + public static int Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static int Sum(this System.Linq.IQueryable source) => throw null; + public static float? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static float? Sum(this System.Linq.IQueryable source) => throw null; + public static float Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static float Sum(this System.Linq.IQueryable source) => throw null; + public static double? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double? Sum(this System.Linq.IQueryable source) => throw null; + public static double Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static double Sum(this System.Linq.IQueryable source) => throw null; + public static System.Int64? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Int64? Sum(this System.Linq.IQueryable source) => throw null; + public static System.Int64 Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Int64 Sum(this System.Linq.IQueryable source) => throw null; + public static System.Decimal? Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Decimal? Sum(this System.Linq.IQueryable source) => throw null; + public static System.Decimal Sum(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector) => throw null; + public static System.Decimal Sum(this System.Linq.IQueryable source) => throw null; + public static System.Linq.IQueryable Take(this System.Linq.IQueryable source, int count) => throw null; + public static System.Linq.IQueryable TakeLast(this System.Linq.IQueryable source, int count) => throw null; + public static System.Linq.IQueryable TakeWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Linq.IQueryable TakeWhile(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Linq.IOrderedQueryable ThenBy(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedQueryable ThenBy(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector) => throw null; + public static System.Linq.IOrderedQueryable ThenByDescending(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedQueryable ThenByDescending(this System.Linq.IOrderedQueryable source, System.Linq.Expressions.Expression> keySelector) => throw null; + public static System.Linq.IQueryable Union(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.IQueryable Union(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + public static System.Linq.IQueryable Where(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Linq.IQueryable Where(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate) => throw null; + public static System.Linq.IQueryable Zip(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2, System.Linq.Expressions.Expression> resultSelector) => throw null; + public static System.Linq.IQueryable<(TFirst, TSecond)> Zip(this System.Linq.IQueryable source1, System.Collections.Generic.IEnumerable source2) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs new file mode 100644 index 000000000000..d2a152fbc95c --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs @@ -0,0 +1,226 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Linq + { + // Generated from `System.Linq.Enumerable` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Enumerable + { + public static TSource Aggregate(this System.Collections.Generic.IEnumerable source, System.Func func) => throw null; + public static TResult Aggregate(this System.Collections.Generic.IEnumerable source, TAccumulate seed, System.Func func, System.Func resultSelector) => throw null; + public static TAccumulate Aggregate(this System.Collections.Generic.IEnumerable source, TAccumulate seed, System.Func func) => throw null; + public static bool All(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static bool Any(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static bool Any(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Append(this System.Collections.Generic.IEnumerable source, TSource element) => throw null; + public static System.Collections.Generic.IEnumerable AsEnumerable(this System.Collections.Generic.IEnumerable source) => throw null; + public static float? Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float? Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static float Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal? Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal? Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal Average(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal Average(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Cast(this System.Collections.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Concat(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + public static bool Contains(this System.Collections.Generic.IEnumerable source, TSource value, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool Contains(this System.Collections.Generic.IEnumerable source, TSource value) => throw null; + public static int Count(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static int Count(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable DefaultIfEmpty(this System.Collections.Generic.IEnumerable source, TSource defaultValue) => throw null; + public static System.Collections.Generic.IEnumerable DefaultIfEmpty(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Distinct(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable Distinct(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource ElementAt(this System.Collections.Generic.IEnumerable source, int index) => throw null; + public static TSource ElementAtOrDefault(this System.Collections.Generic.IEnumerable source, int index) => throw null; + public static System.Collections.Generic.IEnumerable Empty() => throw null; + public static System.Collections.Generic.IEnumerable Except(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable Except(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + public static TSource First(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource First(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource FirstOrDefault(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource FirstOrDefault(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func, TResult> resultSelector) => throw null; + public static System.Collections.Generic.IEnumerable GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Func, TResult> resultSelector) => throw null; + public static System.Collections.Generic.IEnumerable> GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable> GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + public static System.Collections.Generic.IEnumerable> GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable> GroupBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Generic.IEnumerable GroupJoin(this System.Collections.Generic.IEnumerable outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable GroupJoin(this System.Collections.Generic.IEnumerable outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func, TResult> resultSelector) => throw null; + public static System.Collections.Generic.IEnumerable Intersect(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable Intersect(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + public static System.Collections.Generic.IEnumerable Join(this System.Collections.Generic.IEnumerable outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable Join(this System.Collections.Generic.IEnumerable outer, System.Collections.Generic.IEnumerable inner, System.Func outerKeySelector, System.Func innerKeySelector, System.Func resultSelector) => throw null; + public static TSource Last(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource Last(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource LastOrDefault(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource LastOrDefault(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Int64 LongCount(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Int64 LongCount(this System.Collections.Generic.IEnumerable source) => throw null; + public static int? Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int? Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static int Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static float? Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float? Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static float Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static TResult Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64? Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64? Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Int64 Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64 Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal? Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal? Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal Max(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal Max(this System.Collections.Generic.IEnumerable source) => throw null; + public static int? Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int? Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static int Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static float? Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float? Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static float Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static TResult Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64? Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64? Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Int64 Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64 Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal? Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal? Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal Min(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal Min(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable OfType(this System.Collections.IEnumerable source) => throw null; + public static System.Linq.IOrderedEnumerable OrderBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedEnumerable OrderBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + public static System.Linq.IOrderedEnumerable OrderByDescending(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedEnumerable OrderByDescending(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + public static System.Collections.Generic.IEnumerable Prepend(this System.Collections.Generic.IEnumerable source, TSource element) => throw null; + public static System.Collections.Generic.IEnumerable Range(int start, int count) => throw null; + public static System.Collections.Generic.IEnumerable Repeat(TResult element, int count) => throw null; + public static System.Collections.Generic.IEnumerable Reverse(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Collections.Generic.IEnumerable Select(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Collections.Generic.IEnumerable SelectMany(this System.Collections.Generic.IEnumerable source, System.Func> selector) => throw null; + public static System.Collections.Generic.IEnumerable SelectMany(this System.Collections.Generic.IEnumerable source, System.Func> selector) => throw null; + public static System.Collections.Generic.IEnumerable SelectMany(this System.Collections.Generic.IEnumerable source, System.Func> collectionSelector, System.Func resultSelector) => throw null; + public static System.Collections.Generic.IEnumerable SelectMany(this System.Collections.Generic.IEnumerable source, System.Func> collectionSelector, System.Func resultSelector) => throw null; + public static bool SequenceEqual(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool SequenceEqual(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + public static TSource Single(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource Single(this System.Collections.Generic.IEnumerable source) => throw null; + public static TSource SingleOrDefault(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static TSource SingleOrDefault(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Skip(this System.Collections.Generic.IEnumerable source, int count) => throw null; + public static System.Collections.Generic.IEnumerable SkipLast(this System.Collections.Generic.IEnumerable source, int count) => throw null; + public static System.Collections.Generic.IEnumerable SkipWhile(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Collections.Generic.IEnumerable SkipWhile(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static int? Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int? Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static int Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static int Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static float? Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float? Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static float Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static float Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static double? Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double? Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static double Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static double Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Int64? Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64? Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Int64 Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Int64 Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal? Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal? Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Decimal Sum(this System.Collections.Generic.IEnumerable source, System.Func selector) => throw null; + public static System.Decimal Sum(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Take(this System.Collections.Generic.IEnumerable source, int count) => throw null; + public static System.Collections.Generic.IEnumerable TakeLast(this System.Collections.Generic.IEnumerable source, int count) => throw null; + public static System.Collections.Generic.IEnumerable TakeWhile(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Collections.Generic.IEnumerable TakeWhile(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Linq.IOrderedEnumerable ThenBy(this System.Linq.IOrderedEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedEnumerable ThenBy(this System.Linq.IOrderedEnumerable source, System.Func keySelector) => throw null; + public static System.Linq.IOrderedEnumerable ThenByDescending(this System.Linq.IOrderedEnumerable source, System.Func keySelector, System.Collections.Generic.IComparer comparer) => throw null; + public static System.Linq.IOrderedEnumerable ThenByDescending(this System.Linq.IOrderedEnumerable source, System.Func keySelector) => throw null; + public static TSource[] ToArray(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.Dictionary ToDictionary(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Generic.HashSet ToHashSet(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.HashSet ToHashSet(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.List ToList(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Linq.ILookup ToLookup(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ILookup ToLookup(this System.Collections.Generic.IEnumerable source, System.Func keySelector) => throw null; + public static System.Linq.ILookup ToLookup(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Linq.ILookup ToLookup(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Func elementSelector) => throw null; + public static System.Collections.Generic.IEnumerable Union(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static System.Collections.Generic.IEnumerable Union(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + public static System.Collections.Generic.IEnumerable Where(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Collections.Generic.IEnumerable Where(this System.Collections.Generic.IEnumerable source, System.Func predicate) => throw null; + public static System.Collections.Generic.IEnumerable Zip(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Func resultSelector) => throw null; + public static System.Collections.Generic.IEnumerable<(TFirst, TSecond)> Zip(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + } + + // Generated from `System.Linq.IGrouping<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IGrouping : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + TKey Key { get; } + } + + // Generated from `System.Linq.ILookup<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ILookup : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + bool Contains(TKey key); + int Count { get; } + System.Collections.Generic.IEnumerable this[TKey key] { get; } + } + + // Generated from `System.Linq.IOrderedEnumerable<>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IOrderedEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Linq.IOrderedEnumerable CreateOrderedEnumerable(System.Func keySelector, System.Collections.Generic.IComparer comparer, bool descending); + } + + // Generated from `System.Linq.Lookup<,>` in `System.Linq, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Lookup : System.Linq.ILookup, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> + { + public System.Collections.Generic.IEnumerable ApplyResultSelector(System.Func, TResult> resultSelector) => throw null; + public bool Contains(TKey key) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Generic.IEnumerable this[TKey key] { get => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs new file mode 100644 index 000000000000..6afedec4626f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs @@ -0,0 +1,534 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.MemoryExtensions` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class MemoryExtensions + { + public static System.ReadOnlyMemory AsMemory(this string text, int start, int length) => throw null; + public static System.ReadOnlyMemory AsMemory(this string text, int start) => throw null; + public static System.ReadOnlyMemory AsMemory(this string text, System.Range range) => throw null; + public static System.ReadOnlyMemory AsMemory(this string text, System.Index startIndex) => throw null; + public static System.ReadOnlyMemory AsMemory(this string text) => throw null; + public static System.Memory AsMemory(this T[] array, int start, int length) => throw null; + public static System.Memory AsMemory(this T[] array, int start) => throw null; + public static System.Memory AsMemory(this T[] array, System.Range range) => throw null; + public static System.Memory AsMemory(this T[] array, System.Index startIndex) => throw null; + public static System.Memory AsMemory(this T[] array) => throw null; + public static System.Memory AsMemory(this System.ArraySegment segment, int start, int length) => throw null; + public static System.Memory AsMemory(this System.ArraySegment segment, int start) => throw null; + public static System.Memory AsMemory(this System.ArraySegment segment) => throw null; + public static System.Span AsSpan(this T[] array, int start, int length) => throw null; + public static System.Span AsSpan(this T[] array, int start) => throw null; + public static System.Span AsSpan(this T[] array, System.Range range) => throw null; + public static System.Span AsSpan(this T[] array, System.Index startIndex) => throw null; + public static System.Span AsSpan(this T[] array) => throw null; + public static System.Span AsSpan(this System.ArraySegment segment, int start, int length) => throw null; + public static System.Span AsSpan(this System.ArraySegment segment, int start) => throw null; + public static System.Span AsSpan(this System.ArraySegment segment, System.Range range) => throw null; + public static System.Span AsSpan(this System.ArraySegment segment, System.Index startIndex) => throw null; + public static System.Span AsSpan(this System.ArraySegment segment) => throw null; + public static System.ReadOnlySpan AsSpan(this string text, int start, int length) => throw null; + public static System.ReadOnlySpan AsSpan(this string text, int start) => throw null; + public static System.ReadOnlySpan AsSpan(this string text) => throw null; + public static int BinarySearch(this System.Span span, System.IComparable comparable) => throw null; + public static int BinarySearch(this System.ReadOnlySpan span, System.IComparable comparable) => throw null; + public static int BinarySearch(this System.Span span, T value, TComparer comparer) where TComparer : System.Collections.Generic.IComparer => throw null; + public static int BinarySearch(this System.ReadOnlySpan span, T value, TComparer comparer) where TComparer : System.Collections.Generic.IComparer => throw null; + public static int BinarySearch(this System.Span span, TComparable comparable) where TComparable : System.IComparable => throw null; + public static int BinarySearch(this System.ReadOnlySpan span, TComparable comparable) where TComparable : System.IComparable => throw null; + public static int CompareTo(this System.ReadOnlySpan span, System.ReadOnlySpan other, System.StringComparison comparisonType) => throw null; + public static bool Contains(this System.Span span, T value) where T : System.IEquatable => throw null; + public static bool Contains(this System.ReadOnlySpan span, T value) where T : System.IEquatable => throw null; + public static bool Contains(this System.ReadOnlySpan span, System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static void CopyTo(this T[] source, System.Span destination) => throw null; + public static void CopyTo(this T[] source, System.Memory destination) => throw null; + public static bool EndsWith(this System.Span span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static bool EndsWith(this System.ReadOnlySpan span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static bool EndsWith(this System.ReadOnlySpan span, System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static System.Text.SpanRuneEnumerator EnumerateRunes(this System.Span span) => throw null; + public static System.Text.SpanRuneEnumerator EnumerateRunes(this System.ReadOnlySpan span) => throw null; + public static bool Equals(this System.ReadOnlySpan span, System.ReadOnlySpan other, System.StringComparison comparisonType) => throw null; + public static int IndexOf(this System.Span span, T value) where T : System.IEquatable => throw null; + public static int IndexOf(this System.Span span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static int IndexOf(this System.ReadOnlySpan span, T value) where T : System.IEquatable => throw null; + public static int IndexOf(this System.ReadOnlySpan span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static int IndexOf(this System.ReadOnlySpan span, System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static int IndexOfAny(this System.Span span, T value0, T value1, T value2) where T : System.IEquatable => throw null; + public static int IndexOfAny(this System.Span span, T value0, T value1) where T : System.IEquatable => throw null; + public static int IndexOfAny(this System.Span span, System.ReadOnlySpan values) where T : System.IEquatable => throw null; + public static int IndexOfAny(this System.ReadOnlySpan span, T value0, T value1, T value2) where T : System.IEquatable => throw null; + public static int IndexOfAny(this System.ReadOnlySpan span, T value0, T value1) where T : System.IEquatable => throw null; + public static int IndexOfAny(this System.ReadOnlySpan span, System.ReadOnlySpan values) where T : System.IEquatable => throw null; + public static bool IsWhiteSpace(this System.ReadOnlySpan span) => throw null; + public static int LastIndexOf(this System.Span span, T value) where T : System.IEquatable => throw null; + public static int LastIndexOf(this System.Span span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static int LastIndexOf(this System.ReadOnlySpan span, T value) where T : System.IEquatable => throw null; + public static int LastIndexOf(this System.ReadOnlySpan span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static int LastIndexOf(this System.ReadOnlySpan span, System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static int LastIndexOfAny(this System.Span span, T value0, T value1, T value2) where T : System.IEquatable => throw null; + public static int LastIndexOfAny(this System.Span span, T value0, T value1) where T : System.IEquatable => throw null; + public static int LastIndexOfAny(this System.Span span, System.ReadOnlySpan values) where T : System.IEquatable => throw null; + public static int LastIndexOfAny(this System.ReadOnlySpan span, T value0, T value1, T value2) where T : System.IEquatable => throw null; + public static int LastIndexOfAny(this System.ReadOnlySpan span, T value0, T value1) where T : System.IEquatable => throw null; + public static int LastIndexOfAny(this System.ReadOnlySpan span, System.ReadOnlySpan values) where T : System.IEquatable => throw null; + public static bool Overlaps(this System.Span span, System.ReadOnlySpan other, out int elementOffset) => throw null; + public static bool Overlaps(this System.Span span, System.ReadOnlySpan other) => throw null; + public static bool Overlaps(this System.ReadOnlySpan span, System.ReadOnlySpan other, out int elementOffset) => throw null; + public static bool Overlaps(this System.ReadOnlySpan span, System.ReadOnlySpan other) => throw null; + public static void Reverse(this System.Span span) => throw null; + public static int SequenceCompareTo(this System.Span span, System.ReadOnlySpan other) where T : System.IComparable => throw null; + public static int SequenceCompareTo(this System.ReadOnlySpan span, System.ReadOnlySpan other) where T : System.IComparable => throw null; + public static bool SequenceEqual(this System.Span span, System.ReadOnlySpan other) where T : System.IEquatable => throw null; + public static bool SequenceEqual(this System.ReadOnlySpan span, System.ReadOnlySpan other) where T : System.IEquatable => throw null; + public static void Sort(this System.Span keys, System.Span items, System.Comparison comparison) => throw null; + public static void Sort(this System.Span keys, System.Span items) => throw null; + public static void Sort(this System.Span keys, System.Span items, TComparer comparer) where TComparer : System.Collections.Generic.IComparer => throw null; + public static void Sort(this System.Span span, System.Comparison comparison) => throw null; + public static void Sort(this System.Span span) => throw null; + public static void Sort(this System.Span span, TComparer comparer) where TComparer : System.Collections.Generic.IComparer => throw null; + public static bool StartsWith(this System.Span span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static bool StartsWith(this System.ReadOnlySpan span, System.ReadOnlySpan value) where T : System.IEquatable => throw null; + public static bool StartsWith(this System.ReadOnlySpan span, System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static int ToLower(this System.ReadOnlySpan source, System.Span destination, System.Globalization.CultureInfo culture) => throw null; + public static int ToLowerInvariant(this System.ReadOnlySpan source, System.Span destination) => throw null; + public static int ToUpper(this System.ReadOnlySpan source, System.Span destination, System.Globalization.CultureInfo culture) => throw null; + public static int ToUpperInvariant(this System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Span Trim(this System.Span span, T trimElement) where T : System.IEquatable => throw null; + public static System.Span Trim(this System.Span span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Span Trim(this System.Span span) => throw null; + public static System.ReadOnlySpan Trim(this System.ReadOnlySpan span, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan Trim(this System.ReadOnlySpan span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan Trim(this System.ReadOnlySpan span, System.ReadOnlySpan trimChars) => throw null; + public static System.ReadOnlySpan Trim(this System.ReadOnlySpan span, System.Char trimChar) => throw null; + public static System.ReadOnlySpan Trim(this System.ReadOnlySpan span) => throw null; + public static System.ReadOnlyMemory Trim(this System.ReadOnlyMemory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory Trim(this System.ReadOnlyMemory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory Trim(this System.ReadOnlyMemory memory) => throw null; + public static System.Memory Trim(this System.Memory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.Memory Trim(this System.Memory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Memory Trim(this System.Memory memory) => throw null; + public static System.Span TrimEnd(this System.Span span, T trimElement) where T : System.IEquatable => throw null; + public static System.Span TrimEnd(this System.Span span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Span TrimEnd(this System.Span span) => throw null; + public static System.ReadOnlySpan TrimEnd(this System.ReadOnlySpan span, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan TrimEnd(this System.ReadOnlySpan span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan TrimEnd(this System.ReadOnlySpan span, System.ReadOnlySpan trimChars) => throw null; + public static System.ReadOnlySpan TrimEnd(this System.ReadOnlySpan span, System.Char trimChar) => throw null; + public static System.ReadOnlySpan TrimEnd(this System.ReadOnlySpan span) => throw null; + public static System.ReadOnlyMemory TrimEnd(this System.ReadOnlyMemory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory TrimEnd(this System.ReadOnlyMemory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory TrimEnd(this System.ReadOnlyMemory memory) => throw null; + public static System.Memory TrimEnd(this System.Memory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.Memory TrimEnd(this System.Memory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Memory TrimEnd(this System.Memory memory) => throw null; + public static System.Span TrimStart(this System.Span span, T trimElement) where T : System.IEquatable => throw null; + public static System.Span TrimStart(this System.Span span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Span TrimStart(this System.Span span) => throw null; + public static System.ReadOnlySpan TrimStart(this System.ReadOnlySpan span, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan TrimStart(this System.ReadOnlySpan span, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlySpan TrimStart(this System.ReadOnlySpan span, System.ReadOnlySpan trimChars) => throw null; + public static System.ReadOnlySpan TrimStart(this System.ReadOnlySpan span, System.Char trimChar) => throw null; + public static System.ReadOnlySpan TrimStart(this System.ReadOnlySpan span) => throw null; + public static System.ReadOnlyMemory TrimStart(this System.ReadOnlyMemory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory TrimStart(this System.ReadOnlyMemory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.ReadOnlyMemory TrimStart(this System.ReadOnlyMemory memory) => throw null; + public static System.Memory TrimStart(this System.Memory memory, T trimElement) where T : System.IEquatable => throw null; + public static System.Memory TrimStart(this System.Memory memory, System.ReadOnlySpan trimElements) where T : System.IEquatable => throw null; + public static System.Memory TrimStart(this System.Memory memory) => throw null; + } + + // Generated from `System.SequencePosition` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct SequencePosition : System.IEquatable + { + public override bool Equals(object obj) => throw null; + public bool Equals(System.SequencePosition other) => throw null; + public override int GetHashCode() => throw null; + public int GetInteger() => throw null; + public object GetObject() => throw null; + public SequencePosition(object @object, int integer) => throw null; + // Stub generator skipped constructor + } + + namespace Buffers + { + // Generated from `System.Buffers.ArrayBufferWriter<>` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ArrayBufferWriter : System.Buffers.IBufferWriter + { + public void Advance(int count) => throw null; + public ArrayBufferWriter(int initialCapacity) => throw null; + public ArrayBufferWriter() => throw null; + public int Capacity { get => throw null; } + public void Clear() => throw null; + public int FreeCapacity { get => throw null; } + public System.Memory GetMemory(int sizeHint = default(int)) => throw null; + public System.Span GetSpan(int sizeHint = default(int)) => throw null; + public int WrittenCount { get => throw null; } + public System.ReadOnlyMemory WrittenMemory { get => throw null; } + public System.ReadOnlySpan WrittenSpan { get => throw null; } + } + + // Generated from `System.Buffers.BuffersExtensions` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class BuffersExtensions + { + public static void CopyTo(System.Buffers.ReadOnlySequence source, System.Span destination) => throw null; + public static System.SequencePosition? PositionOf(System.Buffers.ReadOnlySequence source, T value) where T : System.IEquatable => throw null; + public static T[] ToArray(System.Buffers.ReadOnlySequence sequence) => throw null; + public static void Write(this System.Buffers.IBufferWriter writer, System.ReadOnlySpan value) => throw null; + } + + // Generated from `System.Buffers.IBufferWriter<>` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IBufferWriter + { + void Advance(int count); + System.Memory GetMemory(int sizeHint = default(int)); + System.Span GetSpan(int sizeHint = default(int)); + } + + // Generated from `System.Buffers.MemoryPool<>` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class MemoryPool : System.IDisposable + { + public void Dispose() => throw null; + protected abstract void Dispose(bool disposing); + public abstract int MaxBufferSize { get; } + protected MemoryPool() => throw null; + public abstract System.Buffers.IMemoryOwner Rent(int minBufferSize = default(int)); + public static System.Buffers.MemoryPool Shared { get => throw null; } + } + + // Generated from `System.Buffers.ReadOnlySequence<>` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ReadOnlySequence + { + public static System.Buffers.ReadOnlySequence Empty; + public System.SequencePosition End { get => throw null; } + // Generated from `System.Buffers.ReadOnlySequence<>.Enumerator` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Enumerator + { + public System.ReadOnlyMemory Current { get => throw null; } + public Enumerator(System.Buffers.ReadOnlySequence sequence) => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public System.ReadOnlyMemory First { get => throw null; } + public System.ReadOnlySpan FirstSpan { get => throw null; } + public System.Buffers.ReadOnlySequence.Enumerator GetEnumerator() => throw null; + public System.Int64 GetOffset(System.SequencePosition position) => throw null; + public System.SequencePosition GetPosition(System.Int64 offset, System.SequencePosition origin) => throw null; + public System.SequencePosition GetPosition(System.Int64 offset) => throw null; + public bool IsEmpty { get => throw null; } + public bool IsSingleSegment { get => throw null; } + public System.Int64 Length { get => throw null; } + public ReadOnlySequence(T[] array, int start, int length) => throw null; + public ReadOnlySequence(T[] array) => throw null; + public ReadOnlySequence(System.ReadOnlyMemory memory) => throw null; + public ReadOnlySequence(System.Buffers.ReadOnlySequenceSegment startSegment, int startIndex, System.Buffers.ReadOnlySequenceSegment endSegment, int endIndex) => throw null; + // Stub generator skipped constructor + public System.Buffers.ReadOnlySequence Slice(int start, int length) => throw null; + public System.Buffers.ReadOnlySequence Slice(int start, System.SequencePosition end) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.SequencePosition start, int length) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.SequencePosition start, System.SequencePosition end) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.SequencePosition start, System.Int64 length) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.SequencePosition start) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.Int64 start, System.SequencePosition end) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.Int64 start, System.Int64 length) => throw null; + public System.Buffers.ReadOnlySequence Slice(System.Int64 start) => throw null; + public System.SequencePosition Start { get => throw null; } + public override string ToString() => throw null; + public bool TryGet(ref System.SequencePosition position, out System.ReadOnlyMemory memory, bool advance = default(bool)) => throw null; + } + + // Generated from `System.Buffers.ReadOnlySequenceSegment<>` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ReadOnlySequenceSegment + { + public System.ReadOnlyMemory Memory { get => throw null; set => throw null; } + public System.Buffers.ReadOnlySequenceSegment Next { get => throw null; set => throw null; } + protected ReadOnlySequenceSegment() => throw null; + public System.Int64 RunningIndex { get => throw null; set => throw null; } + } + + // Generated from `System.Buffers.SequenceReader<>` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public partial struct SequenceReader where T : unmanaged, System.IEquatable + { + public void Advance(System.Int64 count) => throw null; + public System.Int64 AdvancePast(T value) => throw null; + public System.Int64 AdvancePastAny(T value0, T value1, T value2, T value3) => throw null; + public System.Int64 AdvancePastAny(T value0, T value1, T value2) => throw null; + public System.Int64 AdvancePastAny(T value0, T value1) => throw null; + public System.Int64 AdvancePastAny(System.ReadOnlySpan values) => throw null; + public void AdvanceToEnd() => throw null; + public System.Int64 Consumed { get => throw null; } + public System.ReadOnlySpan CurrentSpan { get => throw null; } + public int CurrentSpanIndex { get => throw null; } + public bool End { get => throw null; } + public bool IsNext(T next, bool advancePast = default(bool)) => throw null; + public bool IsNext(System.ReadOnlySpan next, bool advancePast = default(bool)) => throw null; + public System.Int64 Length { get => throw null; } + public System.SequencePosition Position { get => throw null; } + public System.Int64 Remaining { get => throw null; } + public void Rewind(System.Int64 count) => throw null; + public System.Buffers.ReadOnlySequence Sequence { get => throw null; } + public SequenceReader(System.Buffers.ReadOnlySequence sequence) => throw null; + // Stub generator skipped constructor + public bool TryAdvanceTo(T delimiter, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryAdvanceToAny(System.ReadOnlySpan delimiters, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryCopyTo(System.Span destination) => throw null; + public bool TryPeek(out T value) => throw null; + public bool TryPeek(System.Int64 offset, out T value) => throw null; + public bool TryRead(out T value) => throw null; + public bool TryReadTo(out System.ReadOnlySpan span, T delimiter, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadTo(out System.ReadOnlySpan span, T delimiter, T delimiterEscape, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadTo(out System.ReadOnlySpan span, System.ReadOnlySpan delimiter, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadTo(out System.Buffers.ReadOnlySequence sequence, T delimiter, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadTo(out System.Buffers.ReadOnlySequence sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadTo(out System.Buffers.ReadOnlySequence sequence, System.ReadOnlySpan delimiter, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadToAny(out System.ReadOnlySpan span, System.ReadOnlySpan delimiters, bool advancePastDelimiter = default(bool)) => throw null; + public bool TryReadToAny(out System.Buffers.ReadOnlySequence sequence, System.ReadOnlySpan delimiters, bool advancePastDelimiter = default(bool)) => throw null; + public System.Buffers.ReadOnlySequence UnreadSequence { get => throw null; } + public System.ReadOnlySpan UnreadSpan { get => throw null; } + } + + // Generated from `System.Buffers.SequenceReaderExtensions` in `Microsoft.AspNetCore.Components.Server, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static partial class SequenceReaderExtensions + { + public static bool TryReadBigEndian(ref System.Buffers.SequenceReader reader, out int value) => throw null; + public static bool TryReadBigEndian(ref System.Buffers.SequenceReader reader, out System.Int64 value) => throw null; + public static bool TryReadBigEndian(ref System.Buffers.SequenceReader reader, out System.Int16 value) => throw null; + public static bool TryReadLittleEndian(ref System.Buffers.SequenceReader reader, out int value) => throw null; + public static bool TryReadLittleEndian(ref System.Buffers.SequenceReader reader, out System.Int64 value) => throw null; + public static bool TryReadLittleEndian(ref System.Buffers.SequenceReader reader, out System.Int16 value) => throw null; + } + + // Generated from `System.Buffers.StandardFormat` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct StandardFormat : System.IEquatable + { + public static bool operator !=(System.Buffers.StandardFormat left, System.Buffers.StandardFormat right) => throw null; + public static bool operator ==(System.Buffers.StandardFormat left, System.Buffers.StandardFormat right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Buffers.StandardFormat other) => throw null; + public override int GetHashCode() => throw null; + public bool HasPrecision { get => throw null; } + public bool IsDefault { get => throw null; } + public const System.Byte MaxPrecision = default; + public const System.Byte NoPrecision = default; + public static System.Buffers.StandardFormat Parse(string format) => throw null; + public static System.Buffers.StandardFormat Parse(System.ReadOnlySpan format) => throw null; + public System.Byte Precision { get => throw null; } + public StandardFormat(System.Char symbol, System.Byte precision = default(System.Byte)) => throw null; + // Stub generator skipped constructor + public System.Char Symbol { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(System.ReadOnlySpan format, out System.Buffers.StandardFormat result) => throw null; + // Stub generator skipped operator: implicit conversion + } + + namespace Binary + { + // Generated from `System.Buffers.Binary.BinaryPrimitives` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class BinaryPrimitives + { + public static double ReadDoubleBigEndian(System.ReadOnlySpan source) => throw null; + public static double ReadDoubleLittleEndian(System.ReadOnlySpan source) => throw null; + public static System.Int16 ReadInt16BigEndian(System.ReadOnlySpan source) => throw null; + public static System.Int16 ReadInt16LittleEndian(System.ReadOnlySpan source) => throw null; + public static int ReadInt32BigEndian(System.ReadOnlySpan source) => throw null; + public static int ReadInt32LittleEndian(System.ReadOnlySpan source) => throw null; + public static System.Int64 ReadInt64BigEndian(System.ReadOnlySpan source) => throw null; + public static System.Int64 ReadInt64LittleEndian(System.ReadOnlySpan source) => throw null; + public static float ReadSingleBigEndian(System.ReadOnlySpan source) => throw null; + public static float ReadSingleLittleEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt16 ReadUInt16BigEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt16 ReadUInt16LittleEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt32 ReadUInt32BigEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt32 ReadUInt32LittleEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt64 ReadUInt64BigEndian(System.ReadOnlySpan source) => throw null; + public static System.UInt64 ReadUInt64LittleEndian(System.ReadOnlySpan source) => throw null; + public static int ReverseEndianness(int value) => throw null; + public static System.UInt64 ReverseEndianness(System.UInt64 value) => throw null; + public static System.UInt32 ReverseEndianness(System.UInt32 value) => throw null; + public static System.UInt16 ReverseEndianness(System.UInt16 value) => throw null; + public static System.SByte ReverseEndianness(System.SByte value) => throw null; + public static System.Int64 ReverseEndianness(System.Int64 value) => throw null; + public static System.Int16 ReverseEndianness(System.Int16 value) => throw null; + public static System.Byte ReverseEndianness(System.Byte value) => throw null; + public static bool TryReadDoubleBigEndian(System.ReadOnlySpan source, out double value) => throw null; + public static bool TryReadDoubleLittleEndian(System.ReadOnlySpan source, out double value) => throw null; + public static bool TryReadInt16BigEndian(System.ReadOnlySpan source, out System.Int16 value) => throw null; + public static bool TryReadInt16LittleEndian(System.ReadOnlySpan source, out System.Int16 value) => throw null; + public static bool TryReadInt32BigEndian(System.ReadOnlySpan source, out int value) => throw null; + public static bool TryReadInt32LittleEndian(System.ReadOnlySpan source, out int value) => throw null; + public static bool TryReadInt64BigEndian(System.ReadOnlySpan source, out System.Int64 value) => throw null; + public static bool TryReadInt64LittleEndian(System.ReadOnlySpan source, out System.Int64 value) => throw null; + public static bool TryReadSingleBigEndian(System.ReadOnlySpan source, out float value) => throw null; + public static bool TryReadSingleLittleEndian(System.ReadOnlySpan source, out float value) => throw null; + public static bool TryReadUInt16BigEndian(System.ReadOnlySpan source, out System.UInt16 value) => throw null; + public static bool TryReadUInt16LittleEndian(System.ReadOnlySpan source, out System.UInt16 value) => throw null; + public static bool TryReadUInt32BigEndian(System.ReadOnlySpan source, out System.UInt32 value) => throw null; + public static bool TryReadUInt32LittleEndian(System.ReadOnlySpan source, out System.UInt32 value) => throw null; + public static bool TryReadUInt64BigEndian(System.ReadOnlySpan source, out System.UInt64 value) => throw null; + public static bool TryReadUInt64LittleEndian(System.ReadOnlySpan source, out System.UInt64 value) => throw null; + public static bool TryWriteDoubleBigEndian(System.Span destination, double value) => throw null; + public static bool TryWriteDoubleLittleEndian(System.Span destination, double value) => throw null; + public static bool TryWriteInt16BigEndian(System.Span destination, System.Int16 value) => throw null; + public static bool TryWriteInt16LittleEndian(System.Span destination, System.Int16 value) => throw null; + public static bool TryWriteInt32BigEndian(System.Span destination, int value) => throw null; + public static bool TryWriteInt32LittleEndian(System.Span destination, int value) => throw null; + public static bool TryWriteInt64BigEndian(System.Span destination, System.Int64 value) => throw null; + public static bool TryWriteInt64LittleEndian(System.Span destination, System.Int64 value) => throw null; + public static bool TryWriteSingleBigEndian(System.Span destination, float value) => throw null; + public static bool TryWriteSingleLittleEndian(System.Span destination, float value) => throw null; + public static bool TryWriteUInt16BigEndian(System.Span destination, System.UInt16 value) => throw null; + public static bool TryWriteUInt16LittleEndian(System.Span destination, System.UInt16 value) => throw null; + public static bool TryWriteUInt32BigEndian(System.Span destination, System.UInt32 value) => throw null; + public static bool TryWriteUInt32LittleEndian(System.Span destination, System.UInt32 value) => throw null; + public static bool TryWriteUInt64BigEndian(System.Span destination, System.UInt64 value) => throw null; + public static bool TryWriteUInt64LittleEndian(System.Span destination, System.UInt64 value) => throw null; + public static void WriteDoubleBigEndian(System.Span destination, double value) => throw null; + public static void WriteDoubleLittleEndian(System.Span destination, double value) => throw null; + public static void WriteInt16BigEndian(System.Span destination, System.Int16 value) => throw null; + public static void WriteInt16LittleEndian(System.Span destination, System.Int16 value) => throw null; + public static void WriteInt32BigEndian(System.Span destination, int value) => throw null; + public static void WriteInt32LittleEndian(System.Span destination, int value) => throw null; + public static void WriteInt64BigEndian(System.Span destination, System.Int64 value) => throw null; + public static void WriteInt64LittleEndian(System.Span destination, System.Int64 value) => throw null; + public static void WriteSingleBigEndian(System.Span destination, float value) => throw null; + public static void WriteSingleLittleEndian(System.Span destination, float value) => throw null; + public static void WriteUInt16BigEndian(System.Span destination, System.UInt16 value) => throw null; + public static void WriteUInt16LittleEndian(System.Span destination, System.UInt16 value) => throw null; + public static void WriteUInt32BigEndian(System.Span destination, System.UInt32 value) => throw null; + public static void WriteUInt32LittleEndian(System.Span destination, System.UInt32 value) => throw null; + public static void WriteUInt64BigEndian(System.Span destination, System.UInt64 value) => throw null; + public static void WriteUInt64LittleEndian(System.Span destination, System.UInt64 value) => throw null; + } + + } + namespace Text + { + // Generated from `System.Buffers.Text.Base64` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Base64 + { + public static System.Buffers.OperationStatus DecodeFromUtf8(System.ReadOnlySpan utf8, System.Span bytes, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = default(bool)) => throw null; + public static System.Buffers.OperationStatus DecodeFromUtf8InPlace(System.Span buffer, out int bytesWritten) => throw null; + public static System.Buffers.OperationStatus EncodeToUtf8(System.ReadOnlySpan bytes, System.Span utf8, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = default(bool)) => throw null; + public static System.Buffers.OperationStatus EncodeToUtf8InPlace(System.Span buffer, int dataLength, out int bytesWritten) => throw null; + public static int GetMaxDecodedFromUtf8Length(int length) => throw null; + public static int GetMaxEncodedToUtf8Length(int length) => throw null; + } + + // Generated from `System.Buffers.Text.Utf8Formatter` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Utf8Formatter + { + public static bool TryFormat(int value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(float value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(double value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(bool value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.UInt64 value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.UInt32 value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.UInt16 value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.TimeSpan value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.SByte value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.Int64 value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.Int16 value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.Guid value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.Decimal value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.DateTimeOffset value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.DateTime value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + public static bool TryFormat(System.Byte value, System.Span destination, out int bytesWritten, System.Buffers.StandardFormat format = default(System.Buffers.StandardFormat)) => throw null; + } + + // Generated from `System.Buffers.Text.Utf8Parser` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Utf8Parser + { + public static bool TryParse(System.ReadOnlySpan source, out int value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out float value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out double value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out bool value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.UInt64 value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.UInt32 value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.UInt16 value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.TimeSpan value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.SByte value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.Int64 value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.Int16 value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.Guid value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.Decimal value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.DateTimeOffset value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.DateTime value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + public static bool TryParse(System.ReadOnlySpan source, out System.Byte value, out int bytesConsumed, System.Char standardFormat = default(System.Char)) => throw null; + } + + } + } + namespace Runtime + { + namespace InteropServices + { + // Generated from `System.Runtime.InteropServices.MemoryMarshal` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class MemoryMarshal + { + public static System.Span AsBytes(System.Span span) where T : struct => throw null; + public static System.ReadOnlySpan AsBytes(System.ReadOnlySpan span) where T : struct => throw null; + public static System.Memory AsMemory(System.ReadOnlyMemory memory) => throw null; + public static T AsRef(System.Span span) where T : struct => throw null; + public static T AsRef(System.ReadOnlySpan span) where T : struct => throw null; + public static System.Span Cast(System.Span span) where TFrom : struct where TTo : struct => throw null; + public static System.ReadOnlySpan Cast(System.ReadOnlySpan span) where TFrom : struct where TTo : struct => throw null; + public static System.Memory CreateFromPinnedArray(T[] array, int start, int length) => throw null; + public static System.ReadOnlySpan CreateReadOnlySpan(ref T reference, int length) => throw null; + public static System.Span CreateSpan(ref T reference, int length) => throw null; + public static T GetArrayDataReference(T[] array) => throw null; + public static T GetReference(System.Span span) => throw null; + public static T GetReference(System.ReadOnlySpan span) => throw null; + public static T Read(System.ReadOnlySpan source) where T : struct => throw null; + public static System.Collections.Generic.IEnumerable ToEnumerable(System.ReadOnlyMemory memory) => throw null; + public static bool TryGetArray(System.ReadOnlyMemory memory, out System.ArraySegment segment) => throw null; + public static bool TryGetMemoryManager(System.ReadOnlyMemory memory, out TManager manager, out int start, out int length) where TManager : System.Buffers.MemoryManager => throw null; + public static bool TryGetMemoryManager(System.ReadOnlyMemory memory, out TManager manager) where TManager : System.Buffers.MemoryManager => throw null; + public static bool TryGetString(System.ReadOnlyMemory memory, out string text, out int start, out int length) => throw null; + public static bool TryRead(System.ReadOnlySpan source, out T value) where T : struct => throw null; + public static bool TryWrite(System.Span destination, ref T value) where T : struct => throw null; + public static void Write(System.Span destination, ref T value) where T : struct => throw null; + } + + // Generated from `System.Runtime.InteropServices.SequenceMarshal` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class SequenceMarshal + { + public static bool TryGetArray(System.Buffers.ReadOnlySequence sequence, out System.ArraySegment segment) => throw null; + public static bool TryGetReadOnlyMemory(System.Buffers.ReadOnlySequence sequence, out System.ReadOnlyMemory memory) => throw null; + public static bool TryGetReadOnlySequenceSegment(System.Buffers.ReadOnlySequence sequence, out System.Buffers.ReadOnlySequenceSegment startSegment, out int startIndex, out System.Buffers.ReadOnlySequenceSegment endSegment, out int endIndex) => throw null; + public static bool TryRead(ref System.Buffers.SequenceReader reader, out T value) where T : unmanaged => throw null; + } + + } + } + namespace Text + { + // Generated from `System.Text.EncodingExtensions` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class EncodingExtensions + { + public static void Convert(this System.Text.Encoder encoder, System.ReadOnlySpan chars, System.Buffers.IBufferWriter writer, bool flush, out System.Int64 bytesUsed, out bool completed) => throw null; + public static void Convert(this System.Text.Encoder encoder, System.Buffers.ReadOnlySequence chars, System.Buffers.IBufferWriter writer, bool flush, out System.Int64 bytesUsed, out bool completed) => throw null; + public static void Convert(this System.Text.Decoder decoder, System.ReadOnlySpan bytes, System.Buffers.IBufferWriter writer, bool flush, out System.Int64 charsUsed, out bool completed) => throw null; + public static void Convert(this System.Text.Decoder decoder, System.Buffers.ReadOnlySequence bytes, System.Buffers.IBufferWriter writer, bool flush, out System.Int64 charsUsed, out bool completed) => throw null; + public static int GetBytes(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence chars, System.Span bytes) => throw null; + public static System.Int64 GetBytes(this System.Text.Encoding encoding, System.ReadOnlySpan chars, System.Buffers.IBufferWriter writer) => throw null; + public static System.Int64 GetBytes(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence chars, System.Buffers.IBufferWriter writer) => throw null; + public static System.Byte[] GetBytes(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence chars) => throw null; + public static int GetChars(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence bytes, System.Span chars) => throw null; + public static System.Int64 GetChars(this System.Text.Encoding encoding, System.ReadOnlySpan bytes, System.Buffers.IBufferWriter writer) => throw null; + public static System.Int64 GetChars(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence bytes, System.Buffers.IBufferWriter writer) => throw null; + public static string GetString(this System.Text.Encoding encoding, System.Buffers.ReadOnlySequence bytes) => throw null; + } + + // Generated from `System.Text.SpanRuneEnumerator` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct SpanRuneEnumerator + { + public System.Text.Rune Current { get => throw null; } + public System.Text.SpanRuneEnumerator GetEnumerator() => throw null; + public bool MoveNext() => throw null; + // Stub generator skipped constructor + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs new file mode 100644 index 000000000000..e63965c30dd1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs @@ -0,0 +1,55 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace Http + { + namespace Json + { + // Generated from `System.Net.Http.Json.HttpClientJsonExtensions` in `System.Net.Http.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class HttpClientJsonExtensions + { + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, string requestUri, System.Type type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, string requestUri, System.Type type, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, System.Type type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, System.Type type, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, string requestUri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, string requestUri, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetFromJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, System.Text.Json.JsonSerializerOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task PostAsJsonAsync(this System.Net.Http.HttpClient client, string requestUri, TValue value, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task PostAsJsonAsync(this System.Net.Http.HttpClient client, string requestUri, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task PostAsJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, TValue value, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task PostAsJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task PutAsJsonAsync(this System.Net.Http.HttpClient client, string requestUri, TValue value, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task PutAsJsonAsync(this System.Net.Http.HttpClient client, string requestUri, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task PutAsJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, TValue value, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task PutAsJsonAsync(this System.Net.Http.HttpClient client, System.Uri requestUri, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.Net.Http.Json.HttpContentJsonExtensions` in `System.Net.Http.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class HttpContentJsonExtensions + { + public static System.Threading.Tasks.Task ReadFromJsonAsync(this System.Net.Http.HttpContent content, System.Type type, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task ReadFromJsonAsync(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.Net.Http.Json.JsonContent` in `System.Net.Http.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonContent : System.Net.Http.HttpContent + { + public static System.Net.Http.Json.JsonContent Create(T inputValue, System.Net.Http.Headers.MediaTypeHeaderValue mediaType = default(System.Net.Http.Headers.MediaTypeHeaderValue), System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static System.Net.Http.Json.JsonContent Create(object inputValue, System.Type inputType, System.Net.Http.Headers.MediaTypeHeaderValue mediaType = default(System.Net.Http.Headers.MediaTypeHeaderValue), System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public System.Type ObjectType { get => throw null; } + protected override void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + protected internal override bool TryComputeLength(out System.Int64 length) => throw null; + public object Value { get => throw null; } + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs new file mode 100644 index 000000000000..0a71057fd2ac --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs @@ -0,0 +1,894 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace Http + { + // Generated from `System.Net.Http.ByteArrayContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ByteArrayContent : System.Net.Http.HttpContent + { + public ByteArrayContent(System.Byte[] content, int offset, int count) => throw null; + public ByteArrayContent(System.Byte[] content) => throw null; + protected override System.IO.Stream CreateContentReadStream(System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task CreateContentReadStreamAsync() => throw null; + protected override void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + protected internal override bool TryComputeLength(out System.Int64 length) => throw null; + } + + // Generated from `System.Net.Http.ClientCertificateOption` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ClientCertificateOption + { + Automatic, + // Stub generator skipped constructor + Manual, + } + + // Generated from `System.Net.Http.DelegatingHandler` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DelegatingHandler : System.Net.Http.HttpMessageHandler + { + protected DelegatingHandler(System.Net.Http.HttpMessageHandler innerHandler) => throw null; + protected DelegatingHandler() => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Net.Http.HttpMessageHandler InnerHandler { get => throw null; set => throw null; } + protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Net.Http.FormUrlEncodedContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FormUrlEncodedContent : System.Net.Http.ByteArrayContent + { + public FormUrlEncodedContent(System.Collections.Generic.IEnumerable> nameValueCollection) : base(default(System.Byte[])) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Net.Http.HeaderEncodingSelector<>` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Text.Encoding HeaderEncodingSelector(string headerName, TContext context); + + // Generated from `System.Net.Http.HttpClient` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpClient : System.Net.Http.HttpMessageInvoker + { + public System.Uri BaseAddress { get => throw null; set => throw null; } + public void CancelPendingRequests() => throw null; + public static System.Net.IWebProxy DefaultProxy { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpRequestHeaders DefaultRequestHeaders { get => throw null; } + public System.Version DefaultRequestVersion { get => throw null; set => throw null; } + public System.Net.Http.HttpVersionPolicy DefaultVersionPolicy { get => throw null; set => throw null; } + public System.Threading.Tasks.Task DeleteAsync(string requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string requestUri) => throw null; + public System.Threading.Tasks.Task DeleteAsync(System.Uri requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task DeleteAsync(System.Uri requestUri) => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Threading.Tasks.Task GetAsync(string requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(string requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(string requestUri, System.Net.Http.HttpCompletionOption completionOption) => throw null; + public System.Threading.Tasks.Task GetAsync(string requestUri) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Uri requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Uri requestUri, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Uri requestUri, System.Net.Http.HttpCompletionOption completionOption) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Uri requestUri) => throw null; + public System.Threading.Tasks.Task GetByteArrayAsync(string requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetByteArrayAsync(string requestUri) => throw null; + public System.Threading.Tasks.Task GetByteArrayAsync(System.Uri requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetByteArrayAsync(System.Uri requestUri) => throw null; + public System.Threading.Tasks.Task GetStreamAsync(string requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetStreamAsync(string requestUri) => throw null; + public System.Threading.Tasks.Task GetStreamAsync(System.Uri requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetStreamAsync(System.Uri requestUri) => throw null; + public System.Threading.Tasks.Task GetStringAsync(string requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetStringAsync(string requestUri) => throw null; + public System.Threading.Tasks.Task GetStringAsync(System.Uri requestUri, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetStringAsync(System.Uri requestUri) => throw null; + public HttpClient(System.Net.Http.HttpMessageHandler handler, bool disposeHandler) : base(default(System.Net.Http.HttpMessageHandler)) => throw null; + public HttpClient(System.Net.Http.HttpMessageHandler handler) : base(default(System.Net.Http.HttpMessageHandler)) => throw null; + public HttpClient() : base(default(System.Net.Http.HttpMessageHandler)) => throw null; + public System.Int64 MaxResponseContentBufferSize { get => throw null; set => throw null; } + public System.Threading.Tasks.Task PatchAsync(string requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PatchAsync(string requestUri, System.Net.Http.HttpContent content) => throw null; + public System.Threading.Tasks.Task PatchAsync(System.Uri requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PatchAsync(System.Uri requestUri, System.Net.Http.HttpContent content) => throw null; + public System.Threading.Tasks.Task PostAsync(string requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PostAsync(string requestUri, System.Net.Http.HttpContent content) => throw null; + public System.Threading.Tasks.Task PostAsync(System.Uri requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PostAsync(System.Uri requestUri, System.Net.Http.HttpContent content) => throw null; + public System.Threading.Tasks.Task PutAsync(string requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PutAsync(string requestUri, System.Net.Http.HttpContent content) => throw null; + public System.Threading.Tasks.Task PutAsync(System.Uri requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PutAsync(System.Uri requestUri, System.Net.Http.HttpContent content) => throw null; + public override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption) => throw null; + public System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request) => throw null; + public override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request) => throw null; + public System.TimeSpan Timeout { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.HttpClientHandler` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpClientHandler : System.Net.Http.HttpMessageHandler + { + public bool AllowAutoRedirect { get => throw null; set => throw null; } + public System.Net.DecompressionMethods AutomaticDecompression { get => throw null; set => throw null; } + public bool CheckCertificateRevocationList { get => throw null; set => throw null; } + public System.Net.Http.ClientCertificateOption ClientCertificateOptions { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; } + public System.Net.CookieContainer CookieContainer { get => throw null; set => throw null; } + public System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public static System.Func DangerousAcceptAnyServerCertificateValidator { get => throw null; } + public System.Net.ICredentials DefaultProxyCredentials { get => throw null; set => throw null; } + protected override void Dispose(bool disposing) => throw null; + public HttpClientHandler() => throw null; + public int MaxAutomaticRedirections { get => throw null; set => throw null; } + public int MaxConnectionsPerServer { get => throw null; set => throw null; } + public System.Int64 MaxRequestContentBufferSize { get => throw null; set => throw null; } + public int MaxResponseHeadersLength { get => throw null; set => throw null; } + public bool PreAuthenticate { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Func ServerCertificateCustomValidationCallback { get => throw null; set => throw null; } + public System.Security.Authentication.SslProtocols SslProtocols { get => throw null; set => throw null; } + public virtual bool SupportsAutomaticDecompression { get => throw null; } + public virtual bool SupportsProxy { get => throw null; } + public virtual bool SupportsRedirectConfiguration { get => throw null; } + public bool UseCookies { get => throw null; set => throw null; } + public bool UseDefaultCredentials { get => throw null; set => throw null; } + public bool UseProxy { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.HttpCompletionOption` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpCompletionOption + { + // Stub generator skipped constructor + ResponseContentRead, + ResponseHeadersRead, + } + + // Generated from `System.Net.Http.HttpContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class HttpContent : System.IDisposable + { + public void CopyTo(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream stream) => throw null; + protected virtual System.IO.Stream CreateContentReadStream(System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task CreateContentReadStreamAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task CreateContentReadStreamAsync() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Net.Http.Headers.HttpContentHeaders Headers { get => throw null; } + protected HttpContent() => throw null; + public System.Threading.Tasks.Task LoadIntoBufferAsync(System.Int64 maxBufferSize) => throw null; + public System.Threading.Tasks.Task LoadIntoBufferAsync() => throw null; + public System.Threading.Tasks.Task ReadAsByteArrayAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadAsByteArrayAsync() => throw null; + public System.IO.Stream ReadAsStream(System.Threading.CancellationToken cancellationToken) => throw null; + public System.IO.Stream ReadAsStream() => throw null; + public System.Threading.Tasks.Task ReadAsStreamAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadAsStreamAsync() => throw null; + public System.Threading.Tasks.Task ReadAsStringAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadAsStringAsync() => throw null; + protected virtual void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected abstract System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context); + protected internal abstract bool TryComputeLength(out System.Int64 length); + } + + // Generated from `System.Net.Http.HttpKeepAlivePingPolicy` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpKeepAlivePingPolicy + { + Always, + // Stub generator skipped constructor + WithActiveRequests, + } + + // Generated from `System.Net.Http.HttpMessageHandler` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class HttpMessageHandler : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected HttpMessageHandler() => throw null; + protected internal virtual System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal abstract System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `System.Net.Http.HttpMessageInvoker` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpMessageInvoker : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public HttpMessageInvoker(System.Net.Http.HttpMessageHandler handler, bool disposeHandler) => throw null; + public HttpMessageInvoker(System.Net.Http.HttpMessageHandler handler) => throw null; + public virtual System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Net.Http.HttpMethod` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpMethod : System.IEquatable + { + public static bool operator !=(System.Net.Http.HttpMethod left, System.Net.Http.HttpMethod right) => throw null; + public static bool operator ==(System.Net.Http.HttpMethod left, System.Net.Http.HttpMethod right) => throw null; + public static System.Net.Http.HttpMethod Delete { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Net.Http.HttpMethod other) => throw null; + public static System.Net.Http.HttpMethod Get { get => throw null; } + public override int GetHashCode() => throw null; + public static System.Net.Http.HttpMethod Head { get => throw null; } + public HttpMethod(string method) => throw null; + public string Method { get => throw null; } + public static System.Net.Http.HttpMethod Options { get => throw null; } + public static System.Net.Http.HttpMethod Patch { get => throw null; } + public static System.Net.Http.HttpMethod Post { get => throw null; } + public static System.Net.Http.HttpMethod Put { get => throw null; } + public override string ToString() => throw null; + public static System.Net.Http.HttpMethod Trace { get => throw null; } + } + + // Generated from `System.Net.Http.HttpRequestException` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpRequestException : System.Exception + { + public HttpRequestException(string message, System.Exception inner, System.Net.HttpStatusCode? statusCode) => throw null; + public HttpRequestException(string message, System.Exception inner) => throw null; + public HttpRequestException(string message) => throw null; + public HttpRequestException() => throw null; + public System.Net.HttpStatusCode? StatusCode { get => throw null; } + } + + // Generated from `System.Net.Http.HttpRequestMessage` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpRequestMessage : System.IDisposable + { + public System.Net.Http.HttpContent Content { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Net.Http.Headers.HttpRequestHeaders Headers { get => throw null; } + public HttpRequestMessage(System.Net.Http.HttpMethod method, string requestUri) => throw null; + public HttpRequestMessage(System.Net.Http.HttpMethod method, System.Uri requestUri) => throw null; + public HttpRequestMessage() => throw null; + public System.Net.Http.HttpMethod Method { get => throw null; set => throw null; } + public System.Net.Http.HttpRequestOptions Options { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Uri RequestUri { get => throw null; set => throw null; } + public override string ToString() => throw null; + public System.Version Version { get => throw null; set => throw null; } + public System.Net.Http.HttpVersionPolicy VersionPolicy { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.HttpRequestOptions` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpRequestOptions : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.Generic.IDictionary.Add(string key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.ContainsKey(string key) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + int System.Collections.Generic.ICollection>.Count { get => throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public HttpRequestOptions() => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + object System.Collections.Generic.IDictionary.this[string key] { get => throw null; set => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + bool System.Collections.Generic.IDictionary.Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public void Set(System.Net.Http.HttpRequestOptionsKey key, TValue value) => throw null; + public bool TryGetValue(System.Net.Http.HttpRequestOptionsKey key, out TValue value) => throw null; + bool System.Collections.Generic.IDictionary.TryGetValue(string key, out object value) => throw null; + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Net.Http.HttpRequestOptionsKey<>` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct HttpRequestOptionsKey + { + public HttpRequestOptionsKey(string key) => throw null; + // Stub generator skipped constructor + public string Key { get => throw null; } + } + + // Generated from `System.Net.Http.HttpResponseMessage` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpResponseMessage : System.IDisposable + { + public System.Net.Http.HttpContent Content { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Net.Http.HttpResponseMessage EnsureSuccessStatusCode() => throw null; + public System.Net.Http.Headers.HttpResponseHeaders Headers { get => throw null; } + public HttpResponseMessage(System.Net.HttpStatusCode statusCode) => throw null; + public HttpResponseMessage() => throw null; + public bool IsSuccessStatusCode { get => throw null; } + public string ReasonPhrase { get => throw null; set => throw null; } + public System.Net.Http.HttpRequestMessage RequestMessage { get => throw null; set => throw null; } + public System.Net.HttpStatusCode StatusCode { get => throw null; set => throw null; } + public override string ToString() => throw null; + public System.Net.Http.Headers.HttpResponseHeaders TrailingHeaders { get => throw null; } + public System.Version Version { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.HttpVersionPolicy` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpVersionPolicy + { + // Stub generator skipped constructor + RequestVersionExact, + RequestVersionOrHigher, + RequestVersionOrLower, + } + + // Generated from `System.Net.Http.MessageProcessingHandler` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MessageProcessingHandler : System.Net.Http.DelegatingHandler + { + protected MessageProcessingHandler(System.Net.Http.HttpMessageHandler innerHandler) => throw null; + protected MessageProcessingHandler() => throw null; + protected abstract System.Net.Http.HttpRequestMessage ProcessRequest(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken); + protected abstract System.Net.Http.HttpResponseMessage ProcessResponse(System.Net.Http.HttpResponseMessage response, System.Threading.CancellationToken cancellationToken); + protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Net.Http.MultipartContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MultipartContent : System.Net.Http.HttpContent, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public virtual void Add(System.Net.Http.HttpContent content) => throw null; + protected override System.IO.Stream CreateContentReadStream(System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task CreateContentReadStreamAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task CreateContentReadStreamAsync() => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Net.Http.HeaderEncodingSelector HeaderEncodingSelector { get => throw null; set => throw null; } + public MultipartContent(string subtype, string boundary) => throw null; + public MultipartContent(string subtype) => throw null; + public MultipartContent() => throw null; + protected override void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + protected internal override bool TryComputeLength(out System.Int64 length) => throw null; + } + + // Generated from `System.Net.Http.MultipartFormDataContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MultipartFormDataContent : System.Net.Http.MultipartContent + { + public void Add(System.Net.Http.HttpContent content, string name, string fileName) => throw null; + public void Add(System.Net.Http.HttpContent content, string name) => throw null; + public override void Add(System.Net.Http.HttpContent content) => throw null; + public MultipartFormDataContent(string boundary) => throw null; + public MultipartFormDataContent() => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Net.Http.ReadOnlyMemoryContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyMemoryContent : System.Net.Http.HttpContent + { + protected override System.IO.Stream CreateContentReadStream(System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task CreateContentReadStreamAsync() => throw null; + public ReadOnlyMemoryContent(System.ReadOnlyMemory content) => throw null; + protected override void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + protected internal override bool TryComputeLength(out System.Int64 length) => throw null; + } + + // Generated from `System.Net.Http.SocketsHttpConnectionContext` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketsHttpConnectionContext + { + public System.Net.DnsEndPoint DnsEndPoint { get => throw null; } + public System.Net.Http.HttpRequestMessage InitialRequestMessage { get => throw null; } + } + + // Generated from `System.Net.Http.SocketsHttpHandler` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketsHttpHandler : System.Net.Http.HttpMessageHandler + { + public bool AllowAutoRedirect { get => throw null; set => throw null; } + public System.Net.DecompressionMethods AutomaticDecompression { get => throw null; set => throw null; } + public System.Func> ConnectCallback { get => throw null; set => throw null; } + public System.TimeSpan ConnectTimeout { get => throw null; set => throw null; } + public System.Net.CookieContainer CookieContainer { get => throw null; set => throw null; } + public System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public System.Net.ICredentials DefaultProxyCredentials { get => throw null; set => throw null; } + protected override void Dispose(bool disposing) => throw null; + public bool EnableMultipleHttp2Connections { get => throw null; set => throw null; } + public System.TimeSpan Expect100ContinueTimeout { get => throw null; set => throw null; } + public static bool IsSupported { get => throw null; } + public System.TimeSpan KeepAlivePingDelay { get => throw null; set => throw null; } + public System.Net.Http.HttpKeepAlivePingPolicy KeepAlivePingPolicy { get => throw null; set => throw null; } + public System.TimeSpan KeepAlivePingTimeout { get => throw null; set => throw null; } + public int MaxAutomaticRedirections { get => throw null; set => throw null; } + public int MaxConnectionsPerServer { get => throw null; set => throw null; } + public int MaxResponseDrainSize { get => throw null; set => throw null; } + public int MaxResponseHeadersLength { get => throw null; set => throw null; } + public System.Func> PlaintextStreamFilter { get => throw null; set => throw null; } + public System.TimeSpan PooledConnectionIdleTimeout { get => throw null; set => throw null; } + public System.TimeSpan PooledConnectionLifetime { get => throw null; set => throw null; } + public bool PreAuthenticate { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public System.Net.Http.HeaderEncodingSelector RequestHeaderEncodingSelector { get => throw null; set => throw null; } + public System.TimeSpan ResponseDrainTimeout { get => throw null; set => throw null; } + public System.Net.Http.HeaderEncodingSelector ResponseHeaderEncodingSelector { get => throw null; set => throw null; } + protected internal override System.Net.Http.HttpResponseMessage Send(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override System.Threading.Tasks.Task SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) => throw null; + public SocketsHttpHandler() => throw null; + public System.Net.Security.SslClientAuthenticationOptions SslOptions { get => throw null; set => throw null; } + public bool UseCookies { get => throw null; set => throw null; } + public bool UseProxy { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.SocketsHttpPlaintextStreamFilterContext` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketsHttpPlaintextStreamFilterContext + { + public System.Net.Http.HttpRequestMessage InitialRequestMessage { get => throw null; } + public System.Version NegotiatedHttpVersion { get => throw null; } + public System.IO.Stream PlaintextStream { get => throw null; } + } + + // Generated from `System.Net.Http.StreamContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StreamContent : System.Net.Http.HttpContent + { + protected override System.IO.Stream CreateContentReadStream(System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task CreateContentReadStreamAsync() => throw null; + protected override void Dispose(bool disposing) => throw null; + protected override void SerializeToStream(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null; + public StreamContent(System.IO.Stream content, int bufferSize) => throw null; + public StreamContent(System.IO.Stream content) => throw null; + protected internal override bool TryComputeLength(out System.Int64 length) => throw null; + } + + // Generated from `System.Net.Http.StringContent` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringContent : System.Net.Http.ByteArrayContent + { + protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context, System.Threading.CancellationToken cancellationToken) => throw null; + public StringContent(string content, System.Text.Encoding encoding, string mediaType) : base(default(System.Byte[])) => throw null; + public StringContent(string content, System.Text.Encoding encoding) : base(default(System.Byte[])) => throw null; + public StringContent(string content) : base(default(System.Byte[])) => throw null; + } + + namespace Headers + { + // Generated from `System.Net.Http.Headers.AuthenticationHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AuthenticationHeaderValue : System.ICloneable + { + public AuthenticationHeaderValue(string scheme, string parameter) => throw null; + public AuthenticationHeaderValue(string scheme) => throw null; + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Parameter { get => throw null; } + public static System.Net.Http.Headers.AuthenticationHeaderValue Parse(string input) => throw null; + public string Scheme { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.AuthenticationHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.CacheControlHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CacheControlHeaderValue : System.ICloneable + { + public CacheControlHeaderValue() => throw null; + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public System.Collections.Generic.ICollection Extensions { get => throw null; } + public override int GetHashCode() => throw null; + public System.TimeSpan? MaxAge { get => throw null; set => throw null; } + public bool MaxStale { get => throw null; set => throw null; } + public System.TimeSpan? MaxStaleLimit { get => throw null; set => throw null; } + public System.TimeSpan? MinFresh { get => throw null; set => throw null; } + public bool MustRevalidate { get => throw null; set => throw null; } + public bool NoCache { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection NoCacheHeaders { get => throw null; } + public bool NoStore { get => throw null; set => throw null; } + public bool NoTransform { get => throw null; set => throw null; } + public bool OnlyIfCached { get => throw null; set => throw null; } + public static System.Net.Http.Headers.CacheControlHeaderValue Parse(string input) => throw null; + public bool Private { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection PrivateHeaders { get => throw null; } + public bool ProxyRevalidate { get => throw null; set => throw null; } + public bool Public { get => throw null; set => throw null; } + public System.TimeSpan? SharedMaxAge { get => throw null; set => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.CacheControlHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.ContentDispositionHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContentDispositionHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public ContentDispositionHeaderValue(string dispositionType) => throw null; + protected ContentDispositionHeaderValue(System.Net.Http.Headers.ContentDispositionHeaderValue source) => throw null; + public System.DateTimeOffset? CreationDate { get => throw null; set => throw null; } + public string DispositionType { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public string FileName { get => throw null; set => throw null; } + public string FileNameStar { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.DateTimeOffset? ModificationDate { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Parameters { get => throw null; } + public static System.Net.Http.Headers.ContentDispositionHeaderValue Parse(string input) => throw null; + public System.DateTimeOffset? ReadDate { get => throw null; set => throw null; } + public System.Int64? Size { get => throw null; set => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.ContentDispositionHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.ContentRangeHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContentRangeHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public ContentRangeHeaderValue(System.Int64 length) => throw null; + public ContentRangeHeaderValue(System.Int64 from, System.Int64 to, System.Int64 length) => throw null; + public ContentRangeHeaderValue(System.Int64 from, System.Int64 to) => throw null; + public override bool Equals(object obj) => throw null; + public System.Int64? From { get => throw null; } + public override int GetHashCode() => throw null; + public bool HasLength { get => throw null; } + public bool HasRange { get => throw null; } + public System.Int64? Length { get => throw null; } + public static System.Net.Http.Headers.ContentRangeHeaderValue Parse(string input) => throw null; + public System.Int64? To { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.ContentRangeHeaderValue parsedValue) => throw null; + public string Unit { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.Headers.EntityTagHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EntityTagHeaderValue : System.ICloneable + { + public static System.Net.Http.Headers.EntityTagHeaderValue Any { get => throw null; } + object System.ICloneable.Clone() => throw null; + public EntityTagHeaderValue(string tag, bool isWeak) => throw null; + public EntityTagHeaderValue(string tag) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsWeak { get => throw null; } + public static System.Net.Http.Headers.EntityTagHeaderValue Parse(string input) => throw null; + public string Tag { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.EntityTagHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.HttpContentHeaders` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpContentHeaders : System.Net.Http.Headers.HttpHeaders + { + public System.Collections.Generic.ICollection Allow { get => throw null; } + public System.Net.Http.Headers.ContentDispositionHeaderValue ContentDisposition { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection ContentEncoding { get => throw null; } + public System.Collections.Generic.ICollection ContentLanguage { get => throw null; } + public System.Int64? ContentLength { get => throw null; set => throw null; } + public System.Uri ContentLocation { get => throw null; set => throw null; } + public System.Byte[] ContentMD5 { get => throw null; set => throw null; } + public System.Net.Http.Headers.ContentRangeHeaderValue ContentRange { get => throw null; set => throw null; } + public System.Net.Http.Headers.MediaTypeHeaderValue ContentType { get => throw null; set => throw null; } + public System.DateTimeOffset? Expires { get => throw null; set => throw null; } + public System.DateTimeOffset? LastModified { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.Headers.HttpHeaderValueCollection<>` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpHeaderValueCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection where T : class + { + public void Add(T item) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public void ParseAdd(string input) => throw null; + public bool Remove(T item) => throw null; + public override string ToString() => throw null; + public bool TryParseAdd(string input) => throw null; + } + + // Generated from `System.Net.Http.Headers.HttpHeaders` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class HttpHeaders : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>> + { + public void Add(string name, string value) => throw null; + public void Add(string name, System.Collections.Generic.IEnumerable values) => throw null; + public void Clear() => throw null; + public bool Contains(string name) => throw null; + public System.Collections.Generic.IEnumerator>> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Generic.IEnumerable GetValues(string name) => throw null; + protected HttpHeaders() => throw null; + public bool Remove(string name) => throw null; + public override string ToString() => throw null; + public bool TryAddWithoutValidation(string name, string value) => throw null; + public bool TryAddWithoutValidation(string name, System.Collections.Generic.IEnumerable values) => throw null; + public bool TryGetValues(string name, out System.Collections.Generic.IEnumerable values) => throw null; + } + + // Generated from `System.Net.Http.Headers.HttpRequestHeaders` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpRequestHeaders : System.Net.Http.Headers.HttpHeaders + { + public System.Net.Http.Headers.HttpHeaderValueCollection Accept { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection AcceptCharset { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection AcceptEncoding { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection AcceptLanguage { get => throw null; } + public System.Net.Http.Headers.AuthenticationHeaderValue Authorization { get => throw null; set => throw null; } + public System.Net.Http.Headers.CacheControlHeaderValue CacheControl { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Connection { get => throw null; } + public bool? ConnectionClose { get => throw null; set => throw null; } + public System.DateTimeOffset? Date { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Expect { get => throw null; } + public bool? ExpectContinue { get => throw null; set => throw null; } + public string From { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection IfMatch { get => throw null; } + public System.DateTimeOffset? IfModifiedSince { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection IfNoneMatch { get => throw null; } + public System.Net.Http.Headers.RangeConditionHeaderValue IfRange { get => throw null; set => throw null; } + public System.DateTimeOffset? IfUnmodifiedSince { get => throw null; set => throw null; } + public int? MaxForwards { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Pragma { get => throw null; } + public System.Net.Http.Headers.AuthenticationHeaderValue ProxyAuthorization { get => throw null; set => throw null; } + public System.Net.Http.Headers.RangeHeaderValue Range { get => throw null; set => throw null; } + public System.Uri Referrer { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection TE { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Trailer { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection TransferEncoding { get => throw null; } + public bool? TransferEncodingChunked { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Upgrade { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection UserAgent { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Via { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Warning { get => throw null; } + } + + // Generated from `System.Net.Http.Headers.HttpResponseHeaders` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpResponseHeaders : System.Net.Http.Headers.HttpHeaders + { + public System.Net.Http.Headers.HttpHeaderValueCollection AcceptRanges { get => throw null; } + public System.TimeSpan? Age { get => throw null; set => throw null; } + public System.Net.Http.Headers.CacheControlHeaderValue CacheControl { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Connection { get => throw null; } + public bool? ConnectionClose { get => throw null; set => throw null; } + public System.DateTimeOffset? Date { get => throw null; set => throw null; } + public System.Net.Http.Headers.EntityTagHeaderValue ETag { get => throw null; set => throw null; } + public System.Uri Location { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Pragma { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection ProxyAuthenticate { get => throw null; } + public System.Net.Http.Headers.RetryConditionHeaderValue RetryAfter { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Server { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Trailer { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection TransferEncoding { get => throw null; } + public bool? TransferEncodingChunked { get => throw null; set => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Upgrade { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Vary { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Via { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection Warning { get => throw null; } + public System.Net.Http.Headers.HttpHeaderValueCollection WwwAuthenticate { get => throw null; } + } + + // Generated from `System.Net.Http.Headers.MediaTypeHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MediaTypeHeaderValue : System.ICloneable + { + public string CharSet { get => throw null; set => throw null; } + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string MediaType { get => throw null; set => throw null; } + public MediaTypeHeaderValue(string mediaType) => throw null; + protected MediaTypeHeaderValue(System.Net.Http.Headers.MediaTypeHeaderValue source) => throw null; + public System.Collections.Generic.ICollection Parameters { get => throw null; } + public static System.Net.Http.Headers.MediaTypeHeaderValue Parse(string input) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.MediaTypeHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.MediaTypeWithQualityHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MediaTypeWithQualityHeaderValue : System.Net.Http.Headers.MediaTypeHeaderValue, System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public MediaTypeWithQualityHeaderValue(string mediaType, double quality) : base(default(System.Net.Http.Headers.MediaTypeHeaderValue)) => throw null; + public MediaTypeWithQualityHeaderValue(string mediaType) : base(default(System.Net.Http.Headers.MediaTypeHeaderValue)) => throw null; + public static System.Net.Http.Headers.MediaTypeWithQualityHeaderValue Parse(string input) => throw null; + public double? Quality { get => throw null; set => throw null; } + public static bool TryParse(string input, out System.Net.Http.Headers.MediaTypeWithQualityHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.NameValueHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NameValueHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + public NameValueHeaderValue(string name, string value) => throw null; + public NameValueHeaderValue(string name) => throw null; + protected NameValueHeaderValue(System.Net.Http.Headers.NameValueHeaderValue source) => throw null; + public static System.Net.Http.Headers.NameValueHeaderValue Parse(string input) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.NameValueHeaderValue parsedValue) => throw null; + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.Headers.NameValueWithParametersHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NameValueWithParametersHeaderValue : System.Net.Http.Headers.NameValueHeaderValue, System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public NameValueWithParametersHeaderValue(string name, string value) : base(default(System.Net.Http.Headers.NameValueHeaderValue)) => throw null; + public NameValueWithParametersHeaderValue(string name) : base(default(System.Net.Http.Headers.NameValueHeaderValue)) => throw null; + protected NameValueWithParametersHeaderValue(System.Net.Http.Headers.NameValueWithParametersHeaderValue source) : base(default(System.Net.Http.Headers.NameValueHeaderValue)) => throw null; + public System.Collections.Generic.ICollection Parameters { get => throw null; } + public static System.Net.Http.Headers.NameValueWithParametersHeaderValue Parse(string input) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.NameValueWithParametersHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.ProductHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProductHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + public static System.Net.Http.Headers.ProductHeaderValue Parse(string input) => throw null; + public ProductHeaderValue(string name, string version) => throw null; + public ProductHeaderValue(string name) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.ProductHeaderValue parsedValue) => throw null; + public string Version { get => throw null; } + } + + // Generated from `System.Net.Http.Headers.ProductInfoHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProductInfoHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public string Comment { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.ProductInfoHeaderValue Parse(string input) => throw null; + public System.Net.Http.Headers.ProductHeaderValue Product { get => throw null; } + public ProductInfoHeaderValue(string productName, string productVersion) => throw null; + public ProductInfoHeaderValue(string comment) => throw null; + public ProductInfoHeaderValue(System.Net.Http.Headers.ProductHeaderValue product) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.ProductInfoHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.RangeConditionHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RangeConditionHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public System.DateTimeOffset? Date { get => throw null; } + public System.Net.Http.Headers.EntityTagHeaderValue EntityTag { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.RangeConditionHeaderValue Parse(string input) => throw null; + public RangeConditionHeaderValue(string entityTag) => throw null; + public RangeConditionHeaderValue(System.Net.Http.Headers.EntityTagHeaderValue entityTag) => throw null; + public RangeConditionHeaderValue(System.DateTimeOffset date) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.RangeConditionHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.RangeHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RangeHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.RangeHeaderValue Parse(string input) => throw null; + public RangeHeaderValue(System.Int64? from, System.Int64? to) => throw null; + public RangeHeaderValue() => throw null; + public System.Collections.Generic.ICollection Ranges { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.RangeHeaderValue parsedValue) => throw null; + public string Unit { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Http.Headers.RangeItemHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RangeItemHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public System.Int64? From { get => throw null; } + public override int GetHashCode() => throw null; + public RangeItemHeaderValue(System.Int64? from, System.Int64? to) => throw null; + public System.Int64? To { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Net.Http.Headers.RetryConditionHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RetryConditionHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public System.DateTimeOffset? Date { get => throw null; } + public System.TimeSpan? Delta { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.RetryConditionHeaderValue Parse(string input) => throw null; + public RetryConditionHeaderValue(System.TimeSpan delta) => throw null; + public RetryConditionHeaderValue(System.DateTimeOffset date) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.RetryConditionHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.StringWithQualityHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringWithQualityHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.StringWithQualityHeaderValue Parse(string input) => throw null; + public double? Quality { get => throw null; } + public StringWithQualityHeaderValue(string value, double quality) => throw null; + public StringWithQualityHeaderValue(string value) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.StringWithQualityHeaderValue parsedValue) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Net.Http.Headers.TransferCodingHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TransferCodingHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public System.Collections.Generic.ICollection Parameters { get => throw null; } + public static System.Net.Http.Headers.TransferCodingHeaderValue Parse(string input) => throw null; + public override string ToString() => throw null; + public TransferCodingHeaderValue(string value) => throw null; + protected TransferCodingHeaderValue(System.Net.Http.Headers.TransferCodingHeaderValue source) => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.TransferCodingHeaderValue parsedValue) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Net.Http.Headers.TransferCodingWithQualityHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TransferCodingWithQualityHeaderValue : System.Net.Http.Headers.TransferCodingHeaderValue, System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public static System.Net.Http.Headers.TransferCodingWithQualityHeaderValue Parse(string input) => throw null; + public double? Quality { get => throw null; set => throw null; } + public TransferCodingWithQualityHeaderValue(string value, double quality) : base(default(System.Net.Http.Headers.TransferCodingHeaderValue)) => throw null; + public TransferCodingWithQualityHeaderValue(string value) : base(default(System.Net.Http.Headers.TransferCodingHeaderValue)) => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.TransferCodingWithQualityHeaderValue parsedValue) => throw null; + } + + // Generated from `System.Net.Http.Headers.ViaHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ViaHeaderValue : System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public string Comment { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.ViaHeaderValue Parse(string input) => throw null; + public string ProtocolName { get => throw null; } + public string ProtocolVersion { get => throw null; } + public string ReceivedBy { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.ViaHeaderValue parsedValue) => throw null; + public ViaHeaderValue(string protocolVersion, string receivedBy, string protocolName, string comment) => throw null; + public ViaHeaderValue(string protocolVersion, string receivedBy, string protocolName) => throw null; + public ViaHeaderValue(string protocolVersion, string receivedBy) => throw null; + } + + // Generated from `System.Net.Http.Headers.WarningHeaderValue` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WarningHeaderValue : System.ICloneable + { + public string Agent { get => throw null; } + object System.ICloneable.Clone() => throw null; + public int Code { get => throw null; } + public System.DateTimeOffset? Date { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Http.Headers.WarningHeaderValue Parse(string input) => throw null; + public string Text { get => throw null; } + public override string ToString() => throw null; + public static bool TryParse(string input, out System.Net.Http.Headers.WarningHeaderValue parsedValue) => throw null; + public WarningHeaderValue(int code, string agent, string text, System.DateTimeOffset date) => throw null; + public WarningHeaderValue(int code, string agent, string text) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs new file mode 100644 index 000000000000..4e01cda03e44 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs @@ -0,0 +1,183 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.AuthenticationSchemeSelector` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate System.Net.AuthenticationSchemes AuthenticationSchemeSelector(System.Net.HttpListenerRequest httpRequest); + + // Generated from `System.Net.HttpListener` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListener : System.IDisposable + { + public void Abort() => throw null; + public System.Net.AuthenticationSchemeSelector AuthenticationSchemeSelectorDelegate { get => throw null; set => throw null; } + public System.Net.AuthenticationSchemes AuthenticationSchemes { get => throw null; set => throw null; } + public System.IAsyncResult BeginGetContext(System.AsyncCallback callback, object state) => throw null; + public void Close() => throw null; + public System.Security.Authentication.ExtendedProtection.ServiceNameCollection DefaultServiceNames { get => throw null; } + void System.IDisposable.Dispose() => throw null; + public System.Net.HttpListenerContext EndGetContext(System.IAsyncResult asyncResult) => throw null; + public System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy ExtendedProtectionPolicy { get => throw null; set => throw null; } + // Generated from `System.Net.HttpListener.ExtendedProtectionSelector` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy ExtendedProtectionSelector(System.Net.HttpListenerRequest request); + + + public System.Net.HttpListener.ExtendedProtectionSelector ExtendedProtectionSelectorDelegate { get => throw null; set => throw null; } + public System.Net.HttpListenerContext GetContext() => throw null; + public System.Threading.Tasks.Task GetContextAsync() => throw null; + public HttpListener() => throw null; + public bool IgnoreWriteExceptions { get => throw null; set => throw null; } + public bool IsListening { get => throw null; } + public static bool IsSupported { get => throw null; } + public System.Net.HttpListenerPrefixCollection Prefixes { get => throw null; } + public string Realm { get => throw null; set => throw null; } + public void Start() => throw null; + public void Stop() => throw null; + public System.Net.HttpListenerTimeoutManager TimeoutManager { get => throw null; } + public bool UnsafeConnectionNtlmAuthentication { get => throw null; set => throw null; } + } + + // Generated from `System.Net.HttpListenerBasicIdentity` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerBasicIdentity : System.Security.Principal.GenericIdentity + { + public HttpListenerBasicIdentity(string username, string password) : base(default(System.Security.Principal.GenericIdentity)) => throw null; + public virtual string Password { get => throw null; } + } + + // Generated from `System.Net.HttpListenerContext` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerContext + { + public System.Threading.Tasks.Task AcceptWebSocketAsync(string subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval, System.ArraySegment internalBuffer) => throw null; + public System.Threading.Tasks.Task AcceptWebSocketAsync(string subProtocol, int receiveBufferSize, System.TimeSpan keepAliveInterval) => throw null; + public System.Threading.Tasks.Task AcceptWebSocketAsync(string subProtocol, System.TimeSpan keepAliveInterval) => throw null; + public System.Threading.Tasks.Task AcceptWebSocketAsync(string subProtocol) => throw null; + public System.Net.HttpListenerRequest Request { get => throw null; } + public System.Net.HttpListenerResponse Response { get => throw null; } + public System.Security.Principal.IPrincipal User { get => throw null; } + } + + // Generated from `System.Net.HttpListenerException` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerException : System.ComponentModel.Win32Exception + { + public override int ErrorCode { get => throw null; } + public HttpListenerException(int errorCode, string message) => throw null; + public HttpListenerException(int errorCode) => throw null; + public HttpListenerException() => throw null; + protected HttpListenerException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.HttpListenerPrefixCollection` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerPrefixCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(string uriPrefix) => throw null; + public void Clear() => throw null; + public bool Contains(string uriPrefix) => throw null; + public void CopyTo(string[] array, int offset) => throw null; + public void CopyTo(System.Array array, int offset) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public bool Remove(string uriPrefix) => throw null; + } + + // Generated from `System.Net.HttpListenerRequest` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerRequest + { + public string[] AcceptTypes { get => throw null; } + public System.IAsyncResult BeginGetClientCertificate(System.AsyncCallback requestCallback, object state) => throw null; + public int ClientCertificateError { get => throw null; } + public System.Text.Encoding ContentEncoding { get => throw null; } + public System.Int64 ContentLength64 { get => throw null; } + public string ContentType { get => throw null; } + public System.Net.CookieCollection Cookies { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate2 EndGetClientCertificate(System.IAsyncResult asyncResult) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 GetClientCertificate() => throw null; + public System.Threading.Tasks.Task GetClientCertificateAsync() => throw null; + public bool HasEntityBody { get => throw null; } + public System.Collections.Specialized.NameValueCollection Headers { get => throw null; } + public string HttpMethod { get => throw null; } + public System.IO.Stream InputStream { get => throw null; } + public bool IsAuthenticated { get => throw null; } + public bool IsLocal { get => throw null; } + public bool IsSecureConnection { get => throw null; } + public bool IsWebSocketRequest { get => throw null; } + public bool KeepAlive { get => throw null; } + public System.Net.IPEndPoint LocalEndPoint { get => throw null; } + public System.Version ProtocolVersion { get => throw null; } + public System.Collections.Specialized.NameValueCollection QueryString { get => throw null; } + public string RawUrl { get => throw null; } + public System.Net.IPEndPoint RemoteEndPoint { get => throw null; } + public System.Guid RequestTraceIdentifier { get => throw null; } + public string ServiceName { get => throw null; } + public System.Net.TransportContext TransportContext { get => throw null; } + public System.Uri Url { get => throw null; } + public System.Uri UrlReferrer { get => throw null; } + public string UserAgent { get => throw null; } + public string UserHostAddress { get => throw null; } + public string UserHostName { get => throw null; } + public string[] UserLanguages { get => throw null; } + } + + // Generated from `System.Net.HttpListenerResponse` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerResponse : System.IDisposable + { + public void Abort() => throw null; + public void AddHeader(string name, string value) => throw null; + public void AppendCookie(System.Net.Cookie cookie) => throw null; + public void AppendHeader(string name, string value) => throw null; + public void Close(System.Byte[] responseEntity, bool willBlock) => throw null; + public void Close() => throw null; + public System.Text.Encoding ContentEncoding { get => throw null; set => throw null; } + public System.Int64 ContentLength64 { get => throw null; set => throw null; } + public string ContentType { get => throw null; set => throw null; } + public System.Net.CookieCollection Cookies { get => throw null; set => throw null; } + public void CopyFrom(System.Net.HttpListenerResponse templateResponse) => throw null; + void System.IDisposable.Dispose() => throw null; + public System.Net.WebHeaderCollection Headers { get => throw null; set => throw null; } + public bool KeepAlive { get => throw null; set => throw null; } + public System.IO.Stream OutputStream { get => throw null; } + public System.Version ProtocolVersion { get => throw null; set => throw null; } + public void Redirect(string url) => throw null; + public string RedirectLocation { get => throw null; set => throw null; } + public bool SendChunked { get => throw null; set => throw null; } + public void SetCookie(System.Net.Cookie cookie) => throw null; + public int StatusCode { get => throw null; set => throw null; } + public string StatusDescription { get => throw null; set => throw null; } + } + + // Generated from `System.Net.HttpListenerTimeoutManager` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerTimeoutManager + { + public System.TimeSpan DrainEntityBody { get => throw null; set => throw null; } + public System.TimeSpan EntityBody { get => throw null; set => throw null; } + public System.TimeSpan HeaderWait { get => throw null; set => throw null; } + public System.TimeSpan IdleConnection { get => throw null; set => throw null; } + public System.Int64 MinSendBytesPerSecond { get => throw null; set => throw null; } + public System.TimeSpan RequestQueue { get => throw null; set => throw null; } + } + + namespace WebSockets + { + // Generated from `System.Net.WebSockets.HttpListenerWebSocketContext` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpListenerWebSocketContext : System.Net.WebSockets.WebSocketContext + { + public override System.Net.CookieCollection CookieCollection { get => throw null; } + public override System.Collections.Specialized.NameValueCollection Headers { get => throw null; } + public override bool IsAuthenticated { get => throw null; } + public override bool IsLocal { get => throw null; } + public override bool IsSecureConnection { get => throw null; } + public override string Origin { get => throw null; } + public override System.Uri RequestUri { get => throw null; } + public override string SecWebSocketKey { get => throw null; } + public override System.Collections.Generic.IEnumerable SecWebSocketProtocols { get => throw null; } + public override string SecWebSocketVersion { get => throw null; } + public override System.Security.Principal.IPrincipal User { get => throw null; } + public override System.Net.WebSockets.WebSocket WebSocket { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs new file mode 100644 index 000000000000..44855a298019 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs @@ -0,0 +1,403 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace Mail + { + // Generated from `System.Net.Mail.AlternateView` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AlternateView : System.Net.Mail.AttachmentBase + { + public AlternateView(string fileName, string mediaType) : base(default(System.IO.Stream)) => throw null; + public AlternateView(string fileName, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public AlternateView(string fileName) : base(default(System.IO.Stream)) => throw null; + public AlternateView(System.IO.Stream contentStream, string mediaType) : base(default(System.IO.Stream)) => throw null; + public AlternateView(System.IO.Stream contentStream, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public AlternateView(System.IO.Stream contentStream) : base(default(System.IO.Stream)) => throw null; + public System.Uri BaseUri { get => throw null; set => throw null; } + public static System.Net.Mail.AlternateView CreateAlternateViewFromString(string content, System.Text.Encoding contentEncoding, string mediaType) => throw null; + public static System.Net.Mail.AlternateView CreateAlternateViewFromString(string content, System.Net.Mime.ContentType contentType) => throw null; + public static System.Net.Mail.AlternateView CreateAlternateViewFromString(string content) => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Net.Mail.LinkedResourceCollection LinkedResources { get => throw null; } + } + + // Generated from `System.Net.Mail.AlternateViewCollection` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AlternateViewCollection : System.Collections.ObjectModel.Collection, System.IDisposable + { + protected override void ClearItems() => throw null; + public void Dispose() => throw null; + protected override void InsertItem(int index, System.Net.Mail.AlternateView item) => throw null; + protected override void RemoveItem(int index) => throw null; + protected override void SetItem(int index, System.Net.Mail.AlternateView item) => throw null; + } + + // Generated from `System.Net.Mail.Attachment` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Attachment : System.Net.Mail.AttachmentBase + { + public Attachment(string fileName, string mediaType) : base(default(System.IO.Stream)) => throw null; + public Attachment(string fileName, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public Attachment(string fileName) : base(default(System.IO.Stream)) => throw null; + public Attachment(System.IO.Stream contentStream, string name, string mediaType) : base(default(System.IO.Stream)) => throw null; + public Attachment(System.IO.Stream contentStream, string name) : base(default(System.IO.Stream)) => throw null; + public Attachment(System.IO.Stream contentStream, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public System.Net.Mime.ContentDisposition ContentDisposition { get => throw null; } + public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, string name, System.Text.Encoding contentEncoding, string mediaType) => throw null; + public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, string name) => throw null; + public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, System.Net.Mime.ContentType contentType) => throw null; + public string Name { get => throw null; set => throw null; } + public System.Text.Encoding NameEncoding { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Mail.AttachmentBase` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class AttachmentBase : System.IDisposable + { + protected AttachmentBase(string fileName, string mediaType) => throw null; + protected AttachmentBase(string fileName, System.Net.Mime.ContentType contentType) => throw null; + protected AttachmentBase(string fileName) => throw null; + protected AttachmentBase(System.IO.Stream contentStream, string mediaType) => throw null; + protected AttachmentBase(System.IO.Stream contentStream, System.Net.Mime.ContentType contentType) => throw null; + protected AttachmentBase(System.IO.Stream contentStream) => throw null; + public string ContentId { get => throw null; set => throw null; } + public System.IO.Stream ContentStream { get => throw null; } + public System.Net.Mime.ContentType ContentType { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Net.Mime.TransferEncoding TransferEncoding { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Mail.AttachmentCollection` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AttachmentCollection : System.Collections.ObjectModel.Collection, System.IDisposable + { + protected override void ClearItems() => throw null; + public void Dispose() => throw null; + protected override void InsertItem(int index, System.Net.Mail.Attachment item) => throw null; + protected override void RemoveItem(int index) => throw null; + protected override void SetItem(int index, System.Net.Mail.Attachment item) => throw null; + } + + // Generated from `System.Net.Mail.DeliveryNotificationOptions` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum DeliveryNotificationOptions + { + Delay, + // Stub generator skipped constructor + Never, + None, + OnFailure, + OnSuccess, + } + + // Generated from `System.Net.Mail.LinkedResource` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class LinkedResource : System.Net.Mail.AttachmentBase + { + public System.Uri ContentLink { get => throw null; set => throw null; } + public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString(string content, System.Text.Encoding contentEncoding, string mediaType) => throw null; + public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString(string content, System.Net.Mime.ContentType contentType) => throw null; + public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString(string content) => throw null; + public LinkedResource(string fileName, string mediaType) : base(default(System.IO.Stream)) => throw null; + public LinkedResource(string fileName, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public LinkedResource(string fileName) : base(default(System.IO.Stream)) => throw null; + public LinkedResource(System.IO.Stream contentStream, string mediaType) : base(default(System.IO.Stream)) => throw null; + public LinkedResource(System.IO.Stream contentStream, System.Net.Mime.ContentType contentType) : base(default(System.IO.Stream)) => throw null; + public LinkedResource(System.IO.Stream contentStream) : base(default(System.IO.Stream)) => throw null; + } + + // Generated from `System.Net.Mail.LinkedResourceCollection` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class LinkedResourceCollection : System.Collections.ObjectModel.Collection, System.IDisposable + { + protected override void ClearItems() => throw null; + public void Dispose() => throw null; + protected override void InsertItem(int index, System.Net.Mail.LinkedResource item) => throw null; + protected override void RemoveItem(int index) => throw null; + protected override void SetItem(int index, System.Net.Mail.LinkedResource item) => throw null; + } + + // Generated from `System.Net.Mail.MailAddress` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class MailAddress + { + public string Address { get => throw null; } + public string DisplayName { get => throw null; } + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public string Host { get => throw null; } + public MailAddress(string address, string displayName, System.Text.Encoding displayNameEncoding) => throw null; + public MailAddress(string address, string displayName) => throw null; + public MailAddress(string address) => throw null; + public override string ToString() => throw null; + public static bool TryCreate(string address, string displayName, out System.Net.Mail.MailAddress result) => throw null; + public static bool TryCreate(string address, string displayName, System.Text.Encoding displayNameEncoding, out System.Net.Mail.MailAddress result) => throw null; + public static bool TryCreate(string address, out System.Net.Mail.MailAddress result) => throw null; + public string User { get => throw null; } + } + + // Generated from `System.Net.Mail.MailAddressCollection` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class MailAddressCollection : System.Collections.ObjectModel.Collection + { + public void Add(string addresses) => throw null; + protected override void InsertItem(int index, System.Net.Mail.MailAddress item) => throw null; + public MailAddressCollection() => throw null; + protected override void SetItem(int index, System.Net.Mail.MailAddress item) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Net.Mail.MailMessage` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class MailMessage : System.IDisposable + { + public System.Net.Mail.AlternateViewCollection AlternateViews { get => throw null; } + public System.Net.Mail.AttachmentCollection Attachments { get => throw null; } + public System.Net.Mail.MailAddressCollection Bcc { get => throw null; } + public string Body { get => throw null; set => throw null; } + public System.Text.Encoding BodyEncoding { get => throw null; set => throw null; } + public System.Net.Mime.TransferEncoding BodyTransferEncoding { get => throw null; set => throw null; } + public System.Net.Mail.MailAddressCollection CC { get => throw null; } + public System.Net.Mail.DeliveryNotificationOptions DeliveryNotificationOptions { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Net.Mail.MailAddress From { get => throw null; set => throw null; } + public System.Collections.Specialized.NameValueCollection Headers { get => throw null; } + public System.Text.Encoding HeadersEncoding { get => throw null; set => throw null; } + public bool IsBodyHtml { get => throw null; set => throw null; } + public MailMessage(string from, string to, string subject, string body) => throw null; + public MailMessage(string from, string to) => throw null; + public MailMessage(System.Net.Mail.MailAddress from, System.Net.Mail.MailAddress to) => throw null; + public MailMessage() => throw null; + public System.Net.Mail.MailPriority Priority { get => throw null; set => throw null; } + public System.Net.Mail.MailAddress ReplyTo { get => throw null; set => throw null; } + public System.Net.Mail.MailAddressCollection ReplyToList { get => throw null; } + public System.Net.Mail.MailAddress Sender { get => throw null; set => throw null; } + public string Subject { get => throw null; set => throw null; } + public System.Text.Encoding SubjectEncoding { get => throw null; set => throw null; } + public System.Net.Mail.MailAddressCollection To { get => throw null; } + } + + // Generated from `System.Net.Mail.MailPriority` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum MailPriority + { + High, + Low, + // Stub generator skipped constructor + Normal, + } + + // Generated from `System.Net.Mail.SendCompletedEventHandler` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void SendCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + // Generated from `System.Net.Mail.SmtpClient` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpClient : System.IDisposable + { + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; } + public System.Net.ICredentialsByHost Credentials { get => throw null; set => throw null; } + public System.Net.Mail.SmtpDeliveryFormat DeliveryFormat { get => throw null; set => throw null; } + public System.Net.Mail.SmtpDeliveryMethod DeliveryMethod { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool EnableSsl { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + protected void OnSendCompleted(System.ComponentModel.AsyncCompletedEventArgs e) => throw null; + public string PickupDirectoryLocation { get => throw null; set => throw null; } + public int Port { get => throw null; set => throw null; } + public void Send(string from, string recipients, string subject, string body) => throw null; + public void Send(System.Net.Mail.MailMessage message) => throw null; + public void SendAsync(string from, string recipients, string subject, string body, object userToken) => throw null; + public void SendAsync(System.Net.Mail.MailMessage message, object userToken) => throw null; + public void SendAsyncCancel() => throw null; + public event System.Net.Mail.SendCompletedEventHandler SendCompleted; + public System.Threading.Tasks.Task SendMailAsync(string from, string recipients, string subject, string body, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SendMailAsync(string from, string recipients, string subject, string body) => throw null; + public System.Threading.Tasks.Task SendMailAsync(System.Net.Mail.MailMessage message, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SendMailAsync(System.Net.Mail.MailMessage message) => throw null; + public System.Net.ServicePoint ServicePoint { get => throw null; } + public SmtpClient(string host, int port) => throw null; + public SmtpClient(string host) => throw null; + public SmtpClient() => throw null; + public string TargetName { get => throw null; set => throw null; } + public int Timeout { get => throw null; set => throw null; } + public bool UseDefaultCredentials { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Mail.SmtpDeliveryFormat` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SmtpDeliveryFormat + { + International, + SevenBit, + // Stub generator skipped constructor + } + + // Generated from `System.Net.Mail.SmtpDeliveryMethod` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SmtpDeliveryMethod + { + Network, + PickupDirectoryFromIis, + // Stub generator skipped constructor + SpecifiedPickupDirectory, + } + + // Generated from `System.Net.Mail.SmtpException` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpException : System.Exception, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public SmtpException(string message, System.Exception innerException) => throw null; + public SmtpException(string message) => throw null; + public SmtpException(System.Net.Mail.SmtpStatusCode statusCode, string message) => throw null; + public SmtpException(System.Net.Mail.SmtpStatusCode statusCode) => throw null; + public SmtpException() => throw null; + protected SmtpException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public System.Net.Mail.SmtpStatusCode StatusCode { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Mail.SmtpFailedRecipientException` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpFailedRecipientException : System.Net.Mail.SmtpException, System.Runtime.Serialization.ISerializable + { + public string FailedRecipient { get => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public SmtpFailedRecipientException(string message, string failedRecipient, System.Exception innerException) => throw null; + public SmtpFailedRecipientException(string message, System.Exception innerException) => throw null; + public SmtpFailedRecipientException(string message) => throw null; + public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient, string serverResponse) => throw null; + public SmtpFailedRecipientException(System.Net.Mail.SmtpStatusCode statusCode, string failedRecipient) => throw null; + public SmtpFailedRecipientException() => throw null; + protected SmtpFailedRecipientException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Net.Mail.SmtpFailedRecipientsException` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SmtpFailedRecipientsException : System.Net.Mail.SmtpFailedRecipientException, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public System.Net.Mail.SmtpFailedRecipientException[] InnerExceptions { get => throw null; } + public SmtpFailedRecipientsException(string message, System.Net.Mail.SmtpFailedRecipientException[] innerExceptions) => throw null; + public SmtpFailedRecipientsException(string message, System.Exception innerException) => throw null; + public SmtpFailedRecipientsException(string message) => throw null; + public SmtpFailedRecipientsException() => throw null; + protected SmtpFailedRecipientsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Net.Mail.SmtpStatusCode` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SmtpStatusCode + { + BadCommandSequence, + CannotVerifyUserWillAttemptDelivery, + ClientNotPermitted, + CommandNotImplemented, + CommandParameterNotImplemented, + CommandUnrecognized, + ExceededStorageAllocation, + GeneralFailure, + HelpMessage, + InsufficientStorage, + LocalErrorInProcessing, + MailboxBusy, + MailboxNameNotAllowed, + MailboxUnavailable, + MustIssueStartTlsFirst, + Ok, + ServiceClosingTransmissionChannel, + ServiceNotAvailable, + ServiceReady, + // Stub generator skipped constructor + StartMailInput, + SyntaxError, + SystemStatus, + TransactionFailed, + UserNotLocalTryAlternatePath, + UserNotLocalWillForward, + } + + } + namespace Mime + { + // Generated from `System.Net.Mime.ContentDisposition` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ContentDisposition + { + public ContentDisposition(string disposition) => throw null; + public ContentDisposition() => throw null; + public System.DateTime CreationDate { get => throw null; set => throw null; } + public string DispositionType { get => throw null; set => throw null; } + public override bool Equals(object rparam) => throw null; + public string FileName { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public bool Inline { get => throw null; set => throw null; } + public System.DateTime ModificationDate { get => throw null; set => throw null; } + public System.Collections.Specialized.StringDictionary Parameters { get => throw null; } + public System.DateTime ReadDate { get => throw null; set => throw null; } + public System.Int64 Size { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Net.Mime.ContentType` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ContentType + { + public string Boundary { get => throw null; set => throw null; } + public string CharSet { get => throw null; set => throw null; } + public ContentType(string contentType) => throw null; + public ContentType() => throw null; + public override bool Equals(object rparam) => throw null; + public override int GetHashCode() => throw null; + public string MediaType { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Collections.Specialized.StringDictionary Parameters { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Net.Mime.DispositionTypeNames` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class DispositionTypeNames + { + public const string Attachment = default; + public const string Inline = default; + } + + // Generated from `System.Net.Mime.MediaTypeNames` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class MediaTypeNames + { + // Generated from `System.Net.Mime.MediaTypeNames.Application` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Application + { + public const string Json = default; + public const string Octet = default; + public const string Pdf = default; + public const string Rtf = default; + public const string Soap = default; + public const string Xml = default; + public const string Zip = default; + } + + + // Generated from `System.Net.Mime.MediaTypeNames.Image` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Image + { + public const string Gif = default; + public const string Jpeg = default; + public const string Tiff = default; + } + + + // Generated from `System.Net.Mime.MediaTypeNames.Text` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Text + { + public const string Html = default; + public const string Plain = default; + public const string RichText = default; + public const string Xml = default; + } + + + } + + // Generated from `System.Net.Mime.TransferEncoding` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TransferEncoding + { + Base64, + EightBit, + QuotedPrintable, + SevenBit, + // Stub generator skipped constructor + Unknown, + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs new file mode 100644 index 000000000000..f8c600c20c81 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs @@ -0,0 +1,42 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.Dns` in `System.Net.NameResolution, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Dns + { + public static System.IAsyncResult BeginGetHostAddresses(string hostNameOrAddress, System.AsyncCallback requestCallback, object state) => throw null; + public static System.IAsyncResult BeginGetHostByName(string hostName, System.AsyncCallback requestCallback, object stateObject) => throw null; + public static System.IAsyncResult BeginGetHostEntry(string hostNameOrAddress, System.AsyncCallback requestCallback, object stateObject) => throw null; + public static System.IAsyncResult BeginGetHostEntry(System.Net.IPAddress address, System.AsyncCallback requestCallback, object stateObject) => throw null; + public static System.IAsyncResult BeginResolve(string hostName, System.AsyncCallback requestCallback, object stateObject) => throw null; + public static System.Net.IPAddress[] EndGetHostAddresses(System.IAsyncResult asyncResult) => throw null; + public static System.Net.IPHostEntry EndGetHostByName(System.IAsyncResult asyncResult) => throw null; + public static System.Net.IPHostEntry EndGetHostEntry(System.IAsyncResult asyncResult) => throw null; + public static System.Net.IPHostEntry EndResolve(System.IAsyncResult asyncResult) => throw null; + public static System.Net.IPAddress[] GetHostAddresses(string hostNameOrAddress) => throw null; + public static System.Threading.Tasks.Task GetHostAddressesAsync(string hostNameOrAddress) => throw null; + public static System.Net.IPHostEntry GetHostByAddress(string address) => throw null; + public static System.Net.IPHostEntry GetHostByAddress(System.Net.IPAddress address) => throw null; + public static System.Net.IPHostEntry GetHostByName(string hostName) => throw null; + public static System.Net.IPHostEntry GetHostEntry(string hostNameOrAddress) => throw null; + public static System.Net.IPHostEntry GetHostEntry(System.Net.IPAddress address) => throw null; + public static System.Threading.Tasks.Task GetHostEntryAsync(string hostNameOrAddress) => throw null; + public static System.Threading.Tasks.Task GetHostEntryAsync(System.Net.IPAddress address) => throw null; + public static string GetHostName() => throw null; + public static System.Net.IPHostEntry Resolve(string hostName) => throw null; + } + + // Generated from `System.Net.IPHostEntry` in `System.Net.NameResolution, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPHostEntry + { + public System.Net.IPAddress[] AddressList { get => throw null; set => throw null; } + public string[] Aliases { get => throw null; set => throw null; } + public string HostName { get => throw null; set => throw null; } + public IPHostEntry() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs new file mode 100644 index 000000000000..3ab89d59c370 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs @@ -0,0 +1,558 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace NetworkInformation + { + // Generated from `System.Net.NetworkInformation.DuplicateAddressDetectionState` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DuplicateAddressDetectionState + { + Deprecated, + Duplicate, + // Stub generator skipped constructor + Invalid, + Preferred, + Tentative, + } + + // Generated from `System.Net.NetworkInformation.GatewayIPAddressInformation` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class GatewayIPAddressInformation + { + public abstract System.Net.IPAddress Address { get; } + protected GatewayIPAddressInformation() => throw null; + } + + // Generated from `System.Net.NetworkInformation.GatewayIPAddressInformationCollection` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GatewayIPAddressInformationCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public virtual void Add(System.Net.NetworkInformation.GatewayIPAddressInformation address) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(System.Net.NetworkInformation.GatewayIPAddressInformation address) => throw null; + public virtual void CopyTo(System.Net.NetworkInformation.GatewayIPAddressInformation[] array, int offset) => throw null; + public virtual int Count { get => throw null; } + protected internal GatewayIPAddressInformationCollection() => throw null; + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Net.NetworkInformation.GatewayIPAddressInformation this[int index] { get => throw null; } + public virtual bool Remove(System.Net.NetworkInformation.GatewayIPAddressInformation address) => throw null; + } + + // Generated from `System.Net.NetworkInformation.IPAddressInformation` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPAddressInformation + { + public abstract System.Net.IPAddress Address { get; } + protected IPAddressInformation() => throw null; + public abstract bool IsDnsEligible { get; } + public abstract bool IsTransient { get; } + } + + // Generated from `System.Net.NetworkInformation.IPAddressInformationCollection` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPAddressInformationCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public virtual void Add(System.Net.NetworkInformation.IPAddressInformation address) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(System.Net.NetworkInformation.IPAddressInformation address) => throw null; + public virtual void CopyTo(System.Net.NetworkInformation.IPAddressInformation[] array, int offset) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Net.NetworkInformation.IPAddressInformation this[int index] { get => throw null; } + public virtual bool Remove(System.Net.NetworkInformation.IPAddressInformation address) => throw null; + } + + // Generated from `System.Net.NetworkInformation.IPGlobalProperties` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPGlobalProperties + { + public virtual System.IAsyncResult BeginGetUnicastAddresses(System.AsyncCallback callback, object state) => throw null; + public abstract string DhcpScopeName { get; } + public abstract string DomainName { get; } + public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection EndGetUnicastAddresses(System.IAsyncResult asyncResult) => throw null; + public abstract System.Net.NetworkInformation.TcpConnectionInformation[] GetActiveTcpConnections(); + public abstract System.Net.IPEndPoint[] GetActiveTcpListeners(); + public abstract System.Net.IPEndPoint[] GetActiveUdpListeners(); + public static System.Net.NetworkInformation.IPGlobalProperties GetIPGlobalProperties() => throw null; + public abstract System.Net.NetworkInformation.IPGlobalStatistics GetIPv4GlobalStatistics(); + public abstract System.Net.NetworkInformation.IPGlobalStatistics GetIPv6GlobalStatistics(); + public abstract System.Net.NetworkInformation.IcmpV4Statistics GetIcmpV4Statistics(); + public abstract System.Net.NetworkInformation.IcmpV6Statistics GetIcmpV6Statistics(); + public abstract System.Net.NetworkInformation.TcpStatistics GetTcpIPv4Statistics(); + public abstract System.Net.NetworkInformation.TcpStatistics GetTcpIPv6Statistics(); + public abstract System.Net.NetworkInformation.UdpStatistics GetUdpIPv4Statistics(); + public abstract System.Net.NetworkInformation.UdpStatistics GetUdpIPv6Statistics(); + public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection GetUnicastAddresses() => throw null; + public virtual System.Threading.Tasks.Task GetUnicastAddressesAsync() => throw null; + public abstract string HostName { get; } + protected IPGlobalProperties() => throw null; + public abstract bool IsWinsProxy { get; } + public abstract System.Net.NetworkInformation.NetBiosNodeType NodeType { get; } + } + + // Generated from `System.Net.NetworkInformation.IPGlobalStatistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPGlobalStatistics + { + public abstract int DefaultTtl { get; } + public abstract bool ForwardingEnabled { get; } + protected IPGlobalStatistics() => throw null; + public abstract int NumberOfIPAddresses { get; } + public abstract int NumberOfInterfaces { get; } + public abstract int NumberOfRoutes { get; } + public abstract System.Int64 OutputPacketRequests { get; } + public abstract System.Int64 OutputPacketRoutingDiscards { get; } + public abstract System.Int64 OutputPacketsDiscarded { get; } + public abstract System.Int64 OutputPacketsWithNoRoute { get; } + public abstract System.Int64 PacketFragmentFailures { get; } + public abstract System.Int64 PacketReassembliesRequired { get; } + public abstract System.Int64 PacketReassemblyFailures { get; } + public abstract System.Int64 PacketReassemblyTimeout { get; } + public abstract System.Int64 PacketsFragmented { get; } + public abstract System.Int64 PacketsReassembled { get; } + public abstract System.Int64 ReceivedPackets { get; } + public abstract System.Int64 ReceivedPacketsDelivered { get; } + public abstract System.Int64 ReceivedPacketsDiscarded { get; } + public abstract System.Int64 ReceivedPacketsForwarded { get; } + public abstract System.Int64 ReceivedPacketsWithAddressErrors { get; } + public abstract System.Int64 ReceivedPacketsWithHeadersErrors { get; } + public abstract System.Int64 ReceivedPacketsWithUnknownProtocol { get; } + } + + // Generated from `System.Net.NetworkInformation.IPInterfaceProperties` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPInterfaceProperties + { + public abstract System.Net.NetworkInformation.IPAddressInformationCollection AnycastAddresses { get; } + public abstract System.Net.NetworkInformation.IPAddressCollection DhcpServerAddresses { get; } + public abstract System.Net.NetworkInformation.IPAddressCollection DnsAddresses { get; } + public abstract string DnsSuffix { get; } + public abstract System.Net.NetworkInformation.GatewayIPAddressInformationCollection GatewayAddresses { get; } + public abstract System.Net.NetworkInformation.IPv4InterfaceProperties GetIPv4Properties(); + public abstract System.Net.NetworkInformation.IPv6InterfaceProperties GetIPv6Properties(); + protected IPInterfaceProperties() => throw null; + public abstract bool IsDnsEnabled { get; } + public abstract bool IsDynamicDnsEnabled { get; } + public abstract System.Net.NetworkInformation.MulticastIPAddressInformationCollection MulticastAddresses { get; } + public abstract System.Net.NetworkInformation.UnicastIPAddressInformationCollection UnicastAddresses { get; } + public abstract System.Net.NetworkInformation.IPAddressCollection WinsServersAddresses { get; } + } + + // Generated from `System.Net.NetworkInformation.IPInterfaceStatistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPInterfaceStatistics + { + public abstract System.Int64 BytesReceived { get; } + public abstract System.Int64 BytesSent { get; } + protected IPInterfaceStatistics() => throw null; + public abstract System.Int64 IncomingPacketsDiscarded { get; } + public abstract System.Int64 IncomingPacketsWithErrors { get; } + public abstract System.Int64 IncomingUnknownProtocolPackets { get; } + public abstract System.Int64 NonUnicastPacketsReceived { get; } + public abstract System.Int64 NonUnicastPacketsSent { get; } + public abstract System.Int64 OutgoingPacketsDiscarded { get; } + public abstract System.Int64 OutgoingPacketsWithErrors { get; } + public abstract System.Int64 OutputQueueLength { get; } + public abstract System.Int64 UnicastPacketsReceived { get; } + public abstract System.Int64 UnicastPacketsSent { get; } + } + + // Generated from `System.Net.NetworkInformation.IPv4InterfaceProperties` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPv4InterfaceProperties + { + protected IPv4InterfaceProperties() => throw null; + public abstract int Index { get; } + public abstract bool IsAutomaticPrivateAddressingActive { get; } + public abstract bool IsAutomaticPrivateAddressingEnabled { get; } + public abstract bool IsDhcpEnabled { get; } + public abstract bool IsForwardingEnabled { get; } + public abstract int Mtu { get; } + public abstract bool UsesWins { get; } + } + + // Generated from `System.Net.NetworkInformation.IPv4InterfaceStatistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPv4InterfaceStatistics + { + public abstract System.Int64 BytesReceived { get; } + public abstract System.Int64 BytesSent { get; } + protected IPv4InterfaceStatistics() => throw null; + public abstract System.Int64 IncomingPacketsDiscarded { get; } + public abstract System.Int64 IncomingPacketsWithErrors { get; } + public abstract System.Int64 IncomingUnknownProtocolPackets { get; } + public abstract System.Int64 NonUnicastPacketsReceived { get; } + public abstract System.Int64 NonUnicastPacketsSent { get; } + public abstract System.Int64 OutgoingPacketsDiscarded { get; } + public abstract System.Int64 OutgoingPacketsWithErrors { get; } + public abstract System.Int64 OutputQueueLength { get; } + public abstract System.Int64 UnicastPacketsReceived { get; } + public abstract System.Int64 UnicastPacketsSent { get; } + } + + // Generated from `System.Net.NetworkInformation.IPv6InterfaceProperties` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IPv6InterfaceProperties + { + public virtual System.Int64 GetScopeId(System.Net.NetworkInformation.ScopeLevel scopeLevel) => throw null; + protected IPv6InterfaceProperties() => throw null; + public abstract int Index { get; } + public abstract int Mtu { get; } + } + + // Generated from `System.Net.NetworkInformation.IcmpV4Statistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IcmpV4Statistics + { + public abstract System.Int64 AddressMaskRepliesReceived { get; } + public abstract System.Int64 AddressMaskRepliesSent { get; } + public abstract System.Int64 AddressMaskRequestsReceived { get; } + public abstract System.Int64 AddressMaskRequestsSent { get; } + public abstract System.Int64 DestinationUnreachableMessagesReceived { get; } + public abstract System.Int64 DestinationUnreachableMessagesSent { get; } + public abstract System.Int64 EchoRepliesReceived { get; } + public abstract System.Int64 EchoRepliesSent { get; } + public abstract System.Int64 EchoRequestsReceived { get; } + public abstract System.Int64 EchoRequestsSent { get; } + public abstract System.Int64 ErrorsReceived { get; } + public abstract System.Int64 ErrorsSent { get; } + protected IcmpV4Statistics() => throw null; + public abstract System.Int64 MessagesReceived { get; } + public abstract System.Int64 MessagesSent { get; } + public abstract System.Int64 ParameterProblemsReceived { get; } + public abstract System.Int64 ParameterProblemsSent { get; } + public abstract System.Int64 RedirectsReceived { get; } + public abstract System.Int64 RedirectsSent { get; } + public abstract System.Int64 SourceQuenchesReceived { get; } + public abstract System.Int64 SourceQuenchesSent { get; } + public abstract System.Int64 TimeExceededMessagesReceived { get; } + public abstract System.Int64 TimeExceededMessagesSent { get; } + public abstract System.Int64 TimestampRepliesReceived { get; } + public abstract System.Int64 TimestampRepliesSent { get; } + public abstract System.Int64 TimestampRequestsReceived { get; } + public abstract System.Int64 TimestampRequestsSent { get; } + } + + // Generated from `System.Net.NetworkInformation.IcmpV6Statistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class IcmpV6Statistics + { + public abstract System.Int64 DestinationUnreachableMessagesReceived { get; } + public abstract System.Int64 DestinationUnreachableMessagesSent { get; } + public abstract System.Int64 EchoRepliesReceived { get; } + public abstract System.Int64 EchoRepliesSent { get; } + public abstract System.Int64 EchoRequestsReceived { get; } + public abstract System.Int64 EchoRequestsSent { get; } + public abstract System.Int64 ErrorsReceived { get; } + public abstract System.Int64 ErrorsSent { get; } + protected IcmpV6Statistics() => throw null; + public abstract System.Int64 MembershipQueriesReceived { get; } + public abstract System.Int64 MembershipQueriesSent { get; } + public abstract System.Int64 MembershipReductionsReceived { get; } + public abstract System.Int64 MembershipReductionsSent { get; } + public abstract System.Int64 MembershipReportsReceived { get; } + public abstract System.Int64 MembershipReportsSent { get; } + public abstract System.Int64 MessagesReceived { get; } + public abstract System.Int64 MessagesSent { get; } + public abstract System.Int64 NeighborAdvertisementsReceived { get; } + public abstract System.Int64 NeighborAdvertisementsSent { get; } + public abstract System.Int64 NeighborSolicitsReceived { get; } + public abstract System.Int64 NeighborSolicitsSent { get; } + public abstract System.Int64 PacketTooBigMessagesReceived { get; } + public abstract System.Int64 PacketTooBigMessagesSent { get; } + public abstract System.Int64 ParameterProblemsReceived { get; } + public abstract System.Int64 ParameterProblemsSent { get; } + public abstract System.Int64 RedirectsReceived { get; } + public abstract System.Int64 RedirectsSent { get; } + public abstract System.Int64 RouterAdvertisementsReceived { get; } + public abstract System.Int64 RouterAdvertisementsSent { get; } + public abstract System.Int64 RouterSolicitsReceived { get; } + public abstract System.Int64 RouterSolicitsSent { get; } + public abstract System.Int64 TimeExceededMessagesReceived { get; } + public abstract System.Int64 TimeExceededMessagesSent { get; } + } + + // Generated from `System.Net.NetworkInformation.MulticastIPAddressInformation` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MulticastIPAddressInformation : System.Net.NetworkInformation.IPAddressInformation + { + public abstract System.Int64 AddressPreferredLifetime { get; } + public abstract System.Int64 AddressValidLifetime { get; } + public abstract System.Int64 DhcpLeaseLifetime { get; } + public abstract System.Net.NetworkInformation.DuplicateAddressDetectionState DuplicateAddressDetectionState { get; } + protected MulticastIPAddressInformation() => throw null; + public abstract System.Net.NetworkInformation.PrefixOrigin PrefixOrigin { get; } + public abstract System.Net.NetworkInformation.SuffixOrigin SuffixOrigin { get; } + } + + // Generated from `System.Net.NetworkInformation.MulticastIPAddressInformationCollection` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MulticastIPAddressInformationCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public virtual void Add(System.Net.NetworkInformation.MulticastIPAddressInformation address) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(System.Net.NetworkInformation.MulticastIPAddressInformation address) => throw null; + public virtual void CopyTo(System.Net.NetworkInformation.MulticastIPAddressInformation[] array, int offset) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Net.NetworkInformation.MulticastIPAddressInformation this[int index] { get => throw null; } + protected internal MulticastIPAddressInformationCollection() => throw null; + public virtual bool Remove(System.Net.NetworkInformation.MulticastIPAddressInformation address) => throw null; + } + + // Generated from `System.Net.NetworkInformation.NetBiosNodeType` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NetBiosNodeType + { + Broadcast, + Hybrid, + Mixed, + // Stub generator skipped constructor + Peer2Peer, + Unknown, + } + + // Generated from `System.Net.NetworkInformation.NetworkAddressChangedEventHandler` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void NetworkAddressChangedEventHandler(object sender, System.EventArgs e); + + // Generated from `System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void NetworkAvailabilityChangedEventHandler(object sender, System.Net.NetworkInformation.NetworkAvailabilityEventArgs e); + + // Generated from `System.Net.NetworkInformation.NetworkAvailabilityEventArgs` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetworkAvailabilityEventArgs : System.EventArgs + { + public bool IsAvailable { get => throw null; } + } + + // Generated from `System.Net.NetworkInformation.NetworkChange` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetworkChange + { + public static event System.Net.NetworkInformation.NetworkAddressChangedEventHandler NetworkAddressChanged; + public static event System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged; + public NetworkChange() => throw null; + public static void RegisterNetworkChange(System.Net.NetworkInformation.NetworkChange nc) => throw null; + } + + // Generated from `System.Net.NetworkInformation.NetworkInformationException` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetworkInformationException : System.ComponentModel.Win32Exception + { + public override int ErrorCode { get => throw null; } + public NetworkInformationException(int errorCode) => throw null; + public NetworkInformationException() => throw null; + protected NetworkInformationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.NetworkInformation.NetworkInterface` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class NetworkInterface + { + public virtual string Description { get => throw null; } + public static System.Net.NetworkInformation.NetworkInterface[] GetAllNetworkInterfaces() => throw null; + public virtual System.Net.NetworkInformation.IPInterfaceProperties GetIPProperties() => throw null; + public virtual System.Net.NetworkInformation.IPInterfaceStatistics GetIPStatistics() => throw null; + public virtual System.Net.NetworkInformation.IPv4InterfaceStatistics GetIPv4Statistics() => throw null; + public static bool GetIsNetworkAvailable() => throw null; + public virtual System.Net.NetworkInformation.PhysicalAddress GetPhysicalAddress() => throw null; + public static int IPv6LoopbackInterfaceIndex { get => throw null; } + public virtual string Id { get => throw null; } + public virtual bool IsReceiveOnly { get => throw null; } + public static int LoopbackInterfaceIndex { get => throw null; } + public virtual string Name { get => throw null; } + protected NetworkInterface() => throw null; + public virtual System.Net.NetworkInformation.NetworkInterfaceType NetworkInterfaceType { get => throw null; } + public virtual System.Net.NetworkInformation.OperationalStatus OperationalStatus { get => throw null; } + public virtual System.Int64 Speed { get => throw null; } + public virtual bool Supports(System.Net.NetworkInformation.NetworkInterfaceComponent networkInterfaceComponent) => throw null; + public virtual bool SupportsMulticast { get => throw null; } + } + + // Generated from `System.Net.NetworkInformation.NetworkInterfaceComponent` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NetworkInterfaceComponent + { + IPv4, + IPv6, + // Stub generator skipped constructor + } + + // Generated from `System.Net.NetworkInformation.NetworkInterfaceType` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NetworkInterfaceType + { + AsymmetricDsl, + Atm, + BasicIsdn, + Ethernet, + Ethernet3Megabit, + FastEthernetFx, + FastEthernetT, + Fddi, + GenericModem, + GigabitEthernet, + HighPerformanceSerialBus, + IPOverAtm, + Isdn, + Loopback, + MultiRateSymmetricDsl, + // Stub generator skipped constructor + Ppp, + PrimaryIsdn, + RateAdaptDsl, + Slip, + SymmetricDsl, + TokenRing, + Tunnel, + Unknown, + VeryHighSpeedDsl, + Wireless80211, + Wman, + Wwanpp, + Wwanpp2, + } + + // Generated from `System.Net.NetworkInformation.OperationalStatus` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OperationalStatus + { + Dormant, + Down, + LowerLayerDown, + NotPresent, + // Stub generator skipped constructor + Testing, + Unknown, + Up, + } + + // Generated from `System.Net.NetworkInformation.PhysicalAddress` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PhysicalAddress + { + public override bool Equals(object comparand) => throw null; + public System.Byte[] GetAddressBytes() => throw null; + public override int GetHashCode() => throw null; + public static System.Net.NetworkInformation.PhysicalAddress None; + public static System.Net.NetworkInformation.PhysicalAddress Parse(string address) => throw null; + public static System.Net.NetworkInformation.PhysicalAddress Parse(System.ReadOnlySpan address) => throw null; + public PhysicalAddress(System.Byte[] address) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string address, out System.Net.NetworkInformation.PhysicalAddress value) => throw null; + public static bool TryParse(System.ReadOnlySpan address, out System.Net.NetworkInformation.PhysicalAddress value) => throw null; + } + + // Generated from `System.Net.NetworkInformation.PrefixOrigin` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PrefixOrigin + { + Dhcp, + Manual, + Other, + // Stub generator skipped constructor + RouterAdvertisement, + WellKnown, + } + + // Generated from `System.Net.NetworkInformation.ScopeLevel` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ScopeLevel + { + Admin, + Global, + Interface, + Link, + None, + Organization, + // Stub generator skipped constructor + Site, + Subnet, + } + + // Generated from `System.Net.NetworkInformation.SuffixOrigin` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SuffixOrigin + { + LinkLayerAddress, + Manual, + OriginDhcp, + Other, + Random, + // Stub generator skipped constructor + WellKnown, + } + + // Generated from `System.Net.NetworkInformation.TcpConnectionInformation` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TcpConnectionInformation + { + public abstract System.Net.IPEndPoint LocalEndPoint { get; } + public abstract System.Net.IPEndPoint RemoteEndPoint { get; } + public abstract System.Net.NetworkInformation.TcpState State { get; } + protected TcpConnectionInformation() => throw null; + } + + // Generated from `System.Net.NetworkInformation.TcpState` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TcpState + { + CloseWait, + Closed, + Closing, + DeleteTcb, + Established, + FinWait1, + FinWait2, + LastAck, + Listen, + SynReceived, + SynSent, + // Stub generator skipped constructor + TimeWait, + Unknown, + } + + // Generated from `System.Net.NetworkInformation.TcpStatistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TcpStatistics + { + public abstract System.Int64 ConnectionsAccepted { get; } + public abstract System.Int64 ConnectionsInitiated { get; } + public abstract System.Int64 CumulativeConnections { get; } + public abstract System.Int64 CurrentConnections { get; } + public abstract System.Int64 ErrorsReceived { get; } + public abstract System.Int64 FailedConnectionAttempts { get; } + public abstract System.Int64 MaximumConnections { get; } + public abstract System.Int64 MaximumTransmissionTimeout { get; } + public abstract System.Int64 MinimumTransmissionTimeout { get; } + public abstract System.Int64 ResetConnections { get; } + public abstract System.Int64 ResetsSent { get; } + public abstract System.Int64 SegmentsReceived { get; } + public abstract System.Int64 SegmentsResent { get; } + public abstract System.Int64 SegmentsSent { get; } + protected TcpStatistics() => throw null; + } + + // Generated from `System.Net.NetworkInformation.UdpStatistics` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class UdpStatistics + { + public abstract System.Int64 DatagramsReceived { get; } + public abstract System.Int64 DatagramsSent { get; } + public abstract System.Int64 IncomingDatagramsDiscarded { get; } + public abstract System.Int64 IncomingDatagramsWithErrors { get; } + public abstract int UdpListeners { get; } + protected UdpStatistics() => throw null; + } + + // Generated from `System.Net.NetworkInformation.UnicastIPAddressInformation` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class UnicastIPAddressInformation : System.Net.NetworkInformation.IPAddressInformation + { + public abstract System.Int64 AddressPreferredLifetime { get; } + public abstract System.Int64 AddressValidLifetime { get; } + public abstract System.Int64 DhcpLeaseLifetime { get; } + public abstract System.Net.NetworkInformation.DuplicateAddressDetectionState DuplicateAddressDetectionState { get; } + public abstract System.Net.IPAddress IPv4Mask { get; } + public virtual int PrefixLength { get => throw null; } + public abstract System.Net.NetworkInformation.PrefixOrigin PrefixOrigin { get; } + public abstract System.Net.NetworkInformation.SuffixOrigin SuffixOrigin { get; } + protected UnicastIPAddressInformation() => throw null; + } + + // Generated from `System.Net.NetworkInformation.UnicastIPAddressInformationCollection` in `System.Net.NetworkInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnicastIPAddressInformationCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public virtual void Add(System.Net.NetworkInformation.UnicastIPAddressInformation address) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(System.Net.NetworkInformation.UnicastIPAddressInformation address) => throw null; + public virtual void CopyTo(System.Net.NetworkInformation.UnicastIPAddressInformation[] array, int offset) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Net.NetworkInformation.UnicastIPAddressInformation this[int index] { get => throw null; } + public virtual bool Remove(System.Net.NetworkInformation.UnicastIPAddressInformation address) => throw null; + protected internal UnicastIPAddressInformationCollection() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs new file mode 100644 index 000000000000..f8c65f5f1796 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs @@ -0,0 +1,112 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace NetworkInformation + { + // Generated from `System.Net.NetworkInformation.IPStatus` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum IPStatus + { + BadDestination, + BadHeader, + BadOption, + BadRoute, + DestinationHostUnreachable, + DestinationNetworkUnreachable, + DestinationPortUnreachable, + DestinationProhibited, + DestinationProtocolUnreachable, + DestinationScopeMismatch, + DestinationUnreachable, + HardwareError, + // Stub generator skipped constructor + IcmpError, + NoResources, + PacketTooBig, + ParameterProblem, + SourceQuench, + Success, + TimeExceeded, + TimedOut, + TtlExpired, + TtlReassemblyTimeExceeded, + Unknown, + UnrecognizedNextHeader, + } + + // Generated from `System.Net.NetworkInformation.Ping` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Ping : System.ComponentModel.Component + { + protected override void Dispose(bool disposing) => throw null; + protected void OnPingCompleted(System.Net.NetworkInformation.PingCompletedEventArgs e) => throw null; + public Ping() => throw null; + public event System.Net.NetworkInformation.PingCompletedEventHandler PingCompleted; + public System.Net.NetworkInformation.PingReply Send(string hostNameOrAddress, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) => throw null; + public System.Net.NetworkInformation.PingReply Send(string hostNameOrAddress, int timeout, System.Byte[] buffer) => throw null; + public System.Net.NetworkInformation.PingReply Send(string hostNameOrAddress, int timeout) => throw null; + public System.Net.NetworkInformation.PingReply Send(string hostNameOrAddress) => throw null; + public System.Net.NetworkInformation.PingReply Send(System.Net.IPAddress address, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) => throw null; + public System.Net.NetworkInformation.PingReply Send(System.Net.IPAddress address, int timeout, System.Byte[] buffer) => throw null; + public System.Net.NetworkInformation.PingReply Send(System.Net.IPAddress address, int timeout) => throw null; + public System.Net.NetworkInformation.PingReply Send(System.Net.IPAddress address) => throw null; + public void SendAsync(string hostNameOrAddress, object userToken) => throw null; + public void SendAsync(string hostNameOrAddress, int timeout, object userToken) => throw null; + public void SendAsync(string hostNameOrAddress, int timeout, System.Byte[] buffer, object userToken) => throw null; + public void SendAsync(string hostNameOrAddress, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options, object userToken) => throw null; + public void SendAsync(System.Net.IPAddress address, object userToken) => throw null; + public void SendAsync(System.Net.IPAddress address, int timeout, object userToken) => throw null; + public void SendAsync(System.Net.IPAddress address, int timeout, System.Byte[] buffer, object userToken) => throw null; + public void SendAsync(System.Net.IPAddress address, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options, object userToken) => throw null; + public void SendAsyncCancel() => throw null; + public System.Threading.Tasks.Task SendPingAsync(string hostNameOrAddress, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) => throw null; + public System.Threading.Tasks.Task SendPingAsync(string hostNameOrAddress, int timeout, System.Byte[] buffer) => throw null; + public System.Threading.Tasks.Task SendPingAsync(string hostNameOrAddress, int timeout) => throw null; + public System.Threading.Tasks.Task SendPingAsync(string hostNameOrAddress) => throw null; + public System.Threading.Tasks.Task SendPingAsync(System.Net.IPAddress address, int timeout, System.Byte[] buffer, System.Net.NetworkInformation.PingOptions options) => throw null; + public System.Threading.Tasks.Task SendPingAsync(System.Net.IPAddress address, int timeout, System.Byte[] buffer) => throw null; + public System.Threading.Tasks.Task SendPingAsync(System.Net.IPAddress address, int timeout) => throw null; + public System.Threading.Tasks.Task SendPingAsync(System.Net.IPAddress address) => throw null; + } + + // Generated from `System.Net.NetworkInformation.PingCompletedEventArgs` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PingCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + internal PingCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + public System.Net.NetworkInformation.PingReply Reply { get => throw null; } + } + + // Generated from `System.Net.NetworkInformation.PingCompletedEventHandler` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void PingCompletedEventHandler(object sender, System.Net.NetworkInformation.PingCompletedEventArgs e); + + // Generated from `System.Net.NetworkInformation.PingException` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PingException : System.InvalidOperationException + { + public PingException(string message, System.Exception innerException) => throw null; + public PingException(string message) => throw null; + protected PingException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.NetworkInformation.PingOptions` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PingOptions + { + public bool DontFragment { get => throw null; set => throw null; } + public PingOptions(int ttl, bool dontFragment) => throw null; + public PingOptions() => throw null; + public int Ttl { get => throw null; set => throw null; } + } + + // Generated from `System.Net.NetworkInformation.PingReply` in `System.Net.Ping, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PingReply + { + public System.Net.IPAddress Address { get => throw null; } + public System.Byte[] Buffer { get => throw null; } + public System.Net.NetworkInformation.PingOptions Options { get => throw null; } + public System.Int64 RoundtripTime { get => throw null; } + public System.Net.NetworkInformation.IPStatus Status { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs new file mode 100644 index 000000000000..ab843cc26327 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs @@ -0,0 +1,603 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.AuthenticationSchemes` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AuthenticationSchemes + { + Anonymous, + // Stub generator skipped constructor + Basic, + Digest, + IntegratedWindowsAuthentication, + Negotiate, + None, + Ntlm, + } + + // Generated from `System.Net.Cookie` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Cookie + { + public string Comment { get => throw null; set => throw null; } + public System.Uri CommentUri { get => throw null; set => throw null; } + public Cookie(string name, string value, string path, string domain) => throw null; + public Cookie(string name, string value, string path) => throw null; + public Cookie(string name, string value) => throw null; + public Cookie() => throw null; + public bool Discard { get => throw null; set => throw null; } + public string Domain { get => throw null; set => throw null; } + public override bool Equals(object comparand) => throw null; + public bool Expired { get => throw null; set => throw null; } + public System.DateTime Expires { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public bool HttpOnly { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public string Port { get => throw null; set => throw null; } + public bool Secure { get => throw null; set => throw null; } + public System.DateTime TimeStamp { get => throw null; } + public override string ToString() => throw null; + public string Value { get => throw null; set => throw null; } + public int Version { get => throw null; set => throw null; } + } + + // Generated from `System.Net.CookieCollection` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CookieCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(System.Net.CookieCollection cookies) => throw null; + public void Add(System.Net.Cookie cookie) => throw null; + public void Clear() => throw null; + public bool Contains(System.Net.Cookie cookie) => throw null; + public CookieCollection() => throw null; + public void CopyTo(System.Net.Cookie[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public System.Net.Cookie this[string name] { get => throw null; } + public System.Net.Cookie this[int index] { get => throw null; } + public bool Remove(System.Net.Cookie cookie) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Net.CookieContainer` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CookieContainer + { + public void Add(System.Uri uri, System.Net.CookieCollection cookies) => throw null; + public void Add(System.Uri uri, System.Net.Cookie cookie) => throw null; + public void Add(System.Net.CookieCollection cookies) => throw null; + public void Add(System.Net.Cookie cookie) => throw null; + public int Capacity { get => throw null; set => throw null; } + public CookieContainer(int capacity, int perDomainCapacity, int maxCookieSize) => throw null; + public CookieContainer(int capacity) => throw null; + public CookieContainer() => throw null; + public int Count { get => throw null; } + public const int DefaultCookieLengthLimit = default; + public const int DefaultCookieLimit = default; + public const int DefaultPerDomainCookieLimit = default; + public string GetCookieHeader(System.Uri uri) => throw null; + public System.Net.CookieCollection GetCookies(System.Uri uri) => throw null; + public int MaxCookieSize { get => throw null; set => throw null; } + public int PerDomainCapacity { get => throw null; set => throw null; } + public void SetCookies(System.Uri uri, string cookieHeader) => throw null; + } + + // Generated from `System.Net.CookieException` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CookieException : System.FormatException, System.Runtime.Serialization.ISerializable + { + public CookieException() => throw null; + protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.CredentialCache` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CredentialCache : System.Net.ICredentialsByHost, System.Net.ICredentials, System.Collections.IEnumerable + { + public void Add(string host, int port, string authenticationType, System.Net.NetworkCredential credential) => throw null; + public void Add(System.Uri uriPrefix, string authType, System.Net.NetworkCredential cred) => throw null; + public CredentialCache() => throw null; + public static System.Net.ICredentials DefaultCredentials { get => throw null; } + public static System.Net.NetworkCredential DefaultNetworkCredentials { get => throw null; } + public System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType) => throw null; + public System.Net.NetworkCredential GetCredential(System.Uri uriPrefix, string authType) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public void Remove(string host, int port, string authenticationType) => throw null; + public void Remove(System.Uri uriPrefix, string authType) => throw null; + } + + // Generated from `System.Net.DecompressionMethods` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DecompressionMethods + { + All, + Brotli, + // Stub generator skipped constructor + Deflate, + GZip, + None, + } + + // Generated from `System.Net.DnsEndPoint` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DnsEndPoint : System.Net.EndPoint + { + public override System.Net.Sockets.AddressFamily AddressFamily { get => throw null; } + public DnsEndPoint(string host, int port, System.Net.Sockets.AddressFamily addressFamily) => throw null; + public DnsEndPoint(string host, int port) => throw null; + public override bool Equals(object comparand) => throw null; + public override int GetHashCode() => throw null; + public string Host { get => throw null; } + public int Port { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Net.EndPoint` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EndPoint + { + public virtual System.Net.Sockets.AddressFamily AddressFamily { get => throw null; } + public virtual System.Net.EndPoint Create(System.Net.SocketAddress socketAddress) => throw null; + protected EndPoint() => throw null; + public virtual System.Net.SocketAddress Serialize() => throw null; + } + + // Generated from `System.Net.HttpStatusCode` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpStatusCode + { + Accepted, + AlreadyReported, + Ambiguous, + BadGateway, + BadRequest, + Conflict, + Continue, + Created, + EarlyHints, + ExpectationFailed, + FailedDependency, + Forbidden, + Found, + GatewayTimeout, + Gone, + // Stub generator skipped constructor + HttpVersionNotSupported, + IMUsed, + InsufficientStorage, + InternalServerError, + LengthRequired, + Locked, + LoopDetected, + MethodNotAllowed, + MisdirectedRequest, + Moved, + MovedPermanently, + MultiStatus, + MultipleChoices, + NetworkAuthenticationRequired, + NoContent, + NonAuthoritativeInformation, + NotAcceptable, + NotExtended, + NotFound, + NotImplemented, + NotModified, + OK, + PartialContent, + PaymentRequired, + PermanentRedirect, + PreconditionFailed, + PreconditionRequired, + Processing, + ProxyAuthenticationRequired, + Redirect, + RedirectKeepVerb, + RedirectMethod, + RequestEntityTooLarge, + RequestHeaderFieldsTooLarge, + RequestTimeout, + RequestUriTooLong, + RequestedRangeNotSatisfiable, + ResetContent, + SeeOther, + ServiceUnavailable, + SwitchingProtocols, + TemporaryRedirect, + TooManyRequests, + Unauthorized, + UnavailableForLegalReasons, + UnprocessableEntity, + UnsupportedMediaType, + Unused, + UpgradeRequired, + UseProxy, + VariantAlsoNegotiates, + } + + // Generated from `System.Net.HttpVersion` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class HttpVersion + { + public static System.Version Unknown; + public static System.Version Version10; + public static System.Version Version11; + public static System.Version Version20; + } + + // Generated from `System.Net.ICredentials` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICredentials + { + System.Net.NetworkCredential GetCredential(System.Uri uri, string authType); + } + + // Generated from `System.Net.ICredentialsByHost` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICredentialsByHost + { + System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType); + } + + // Generated from `System.Net.IPAddress` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPAddress + { + public System.Int64 Address { get => throw null; set => throw null; } + public System.Net.Sockets.AddressFamily AddressFamily { get => throw null; } + public static System.Net.IPAddress Any; + public static System.Net.IPAddress Broadcast; + public override bool Equals(object comparand) => throw null; + public System.Byte[] GetAddressBytes() => throw null; + public override int GetHashCode() => throw null; + public static int HostToNetworkOrder(int host) => throw null; + public static System.Int64 HostToNetworkOrder(System.Int64 host) => throw null; + public static System.Int16 HostToNetworkOrder(System.Int16 host) => throw null; + public IPAddress(System.ReadOnlySpan address, System.Int64 scopeid) => throw null; + public IPAddress(System.ReadOnlySpan address) => throw null; + public IPAddress(System.Int64 newAddress) => throw null; + public IPAddress(System.Byte[] address, System.Int64 scopeid) => throw null; + public IPAddress(System.Byte[] address) => throw null; + public static System.Net.IPAddress IPv6Any; + public static System.Net.IPAddress IPv6Loopback; + public static System.Net.IPAddress IPv6None; + public bool IsIPv4MappedToIPv6 { get => throw null; } + public bool IsIPv6LinkLocal { get => throw null; } + public bool IsIPv6Multicast { get => throw null; } + public bool IsIPv6SiteLocal { get => throw null; } + public bool IsIPv6Teredo { get => throw null; } + public static bool IsLoopback(System.Net.IPAddress address) => throw null; + public static System.Net.IPAddress Loopback; + public System.Net.IPAddress MapToIPv4() => throw null; + public System.Net.IPAddress MapToIPv6() => throw null; + public static int NetworkToHostOrder(int network) => throw null; + public static System.Int64 NetworkToHostOrder(System.Int64 network) => throw null; + public static System.Int16 NetworkToHostOrder(System.Int16 network) => throw null; + public static System.Net.IPAddress None; + public static System.Net.IPAddress Parse(string ipString) => throw null; + public static System.Net.IPAddress Parse(System.ReadOnlySpan ipSpan) => throw null; + public System.Int64 ScopeId { get => throw null; set => throw null; } + public override string ToString() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten) => throw null; + public static bool TryParse(string ipString, out System.Net.IPAddress address) => throw null; + public static bool TryParse(System.ReadOnlySpan ipSpan, out System.Net.IPAddress address) => throw null; + public bool TryWriteBytes(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Net.IPEndPoint` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPEndPoint : System.Net.EndPoint + { + public System.Net.IPAddress Address { get => throw null; set => throw null; } + public override System.Net.Sockets.AddressFamily AddressFamily { get => throw null; } + public override System.Net.EndPoint Create(System.Net.SocketAddress socketAddress) => throw null; + public override bool Equals(object comparand) => throw null; + public override int GetHashCode() => throw null; + public IPEndPoint(System.Net.IPAddress address, int port) => throw null; + public IPEndPoint(System.Int64 address, int port) => throw null; + public const int MaxPort = default; + public const int MinPort = default; + public static System.Net.IPEndPoint Parse(string s) => throw null; + public static System.Net.IPEndPoint Parse(System.ReadOnlySpan s) => throw null; + public int Port { get => throw null; set => throw null; } + public override System.Net.SocketAddress Serialize() => throw null; + public override string ToString() => throw null; + public static bool TryParse(string s, out System.Net.IPEndPoint result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Net.IPEndPoint result) => throw null; + } + + // Generated from `System.Net.IWebProxy` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IWebProxy + { + System.Net.ICredentials Credentials { get; set; } + System.Uri GetProxy(System.Uri destination); + bool IsBypassed(System.Uri host); + } + + // Generated from `System.Net.NetworkCredential` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetworkCredential : System.Net.ICredentialsByHost, System.Net.ICredentials + { + public string Domain { get => throw null; set => throw null; } + public System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType) => throw null; + public System.Net.NetworkCredential GetCredential(System.Uri uri, string authenticationType) => throw null; + public NetworkCredential(string userName, string password, string domain) => throw null; + public NetworkCredential(string userName, string password) => throw null; + public NetworkCredential(string userName, System.Security.SecureString password, string domain) => throw null; + public NetworkCredential(string userName, System.Security.SecureString password) => throw null; + public NetworkCredential() => throw null; + public string Password { get => throw null; set => throw null; } + public System.Security.SecureString SecurePassword { get => throw null; set => throw null; } + public string UserName { get => throw null; set => throw null; } + } + + // Generated from `System.Net.SocketAddress` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketAddress + { + public override bool Equals(object comparand) => throw null; + public System.Net.Sockets.AddressFamily Family { get => throw null; } + public override int GetHashCode() => throw null; + public System.Byte this[int offset] { get => throw null; set => throw null; } + public int Size { get => throw null; } + public SocketAddress(System.Net.Sockets.AddressFamily family, int size) => throw null; + public SocketAddress(System.Net.Sockets.AddressFamily family) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Net.TransportContext` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TransportContext + { + public abstract System.Security.Authentication.ExtendedProtection.ChannelBinding GetChannelBinding(System.Security.Authentication.ExtendedProtection.ChannelBindingKind kind); + protected TransportContext() => throw null; + } + + namespace Cache + { + // Generated from `System.Net.Cache.RequestCacheLevel` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RequestCacheLevel + { + BypassCache, + CacheIfAvailable, + CacheOnly, + Default, + NoCacheNoStore, + Reload, + // Stub generator skipped constructor + Revalidate, + } + + // Generated from `System.Net.Cache.RequestCachePolicy` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RequestCachePolicy + { + public System.Net.Cache.RequestCacheLevel Level { get => throw null; } + public RequestCachePolicy(System.Net.Cache.RequestCacheLevel level) => throw null; + public RequestCachePolicy() => throw null; + public override string ToString() => throw null; + } + + } + namespace NetworkInformation + { + // Generated from `System.Net.NetworkInformation.IPAddressCollection` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPAddressCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public virtual void Add(System.Net.IPAddress address) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(System.Net.IPAddress address) => throw null; + public virtual void CopyTo(System.Net.IPAddress[] array, int offset) => throw null; + public virtual int Count { get => throw null; } + public virtual System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + protected internal IPAddressCollection() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Net.IPAddress this[int index] { get => throw null; } + public virtual bool Remove(System.Net.IPAddress address) => throw null; + } + + } + namespace Security + { + // Generated from `System.Net.Security.AuthenticationLevel` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AuthenticationLevel + { + // Stub generator skipped constructor + MutualAuthRequested, + MutualAuthRequired, + None, + } + + // Generated from `System.Net.Security.SslPolicyErrors` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SslPolicyErrors + { + None, + RemoteCertificateChainErrors, + RemoteCertificateNameMismatch, + RemoteCertificateNotAvailable, + // Stub generator skipped constructor + } + + } + namespace Sockets + { + // Generated from `System.Net.Sockets.AddressFamily` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AddressFamily + { + // Stub generator skipped constructor + AppleTalk, + Atm, + Banyan, + Ccitt, + Chaos, + Cluster, + ControllerAreaNetwork, + DataKit, + DataLink, + DecNet, + Ecma, + FireFox, + HyperChannel, + Ieee12844, + ImpLink, + InterNetwork, + InterNetworkV6, + Ipx, + Irda, + Iso, + Lat, + Max, + NS, + NetBios, + NetworkDesigners, + Osi, + Packet, + Pup, + Sna, + Unix, + Unknown, + Unspecified, + VoiceView, + } + + // Generated from `System.Net.Sockets.SocketError` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketError + { + AccessDenied, + AddressAlreadyInUse, + AddressFamilyNotSupported, + AddressNotAvailable, + AlreadyInProgress, + ConnectionAborted, + ConnectionRefused, + ConnectionReset, + DestinationAddressRequired, + Disconnecting, + Fault, + HostDown, + HostNotFound, + HostUnreachable, + IOPending, + InProgress, + Interrupted, + InvalidArgument, + IsConnected, + MessageSize, + NetworkDown, + NetworkReset, + NetworkUnreachable, + NoBufferSpaceAvailable, + NoData, + NoRecovery, + NotConnected, + NotInitialized, + NotSocket, + OperationAborted, + OperationNotSupported, + ProcessLimit, + ProtocolFamilyNotSupported, + ProtocolNotSupported, + ProtocolOption, + ProtocolType, + Shutdown, + SocketError, + // Stub generator skipped constructor + SocketNotSupported, + Success, + SystemNotReady, + TimedOut, + TooManyOpenSockets, + TryAgain, + TypeNotFound, + VersionNotSupported, + WouldBlock, + } + + // Generated from `System.Net.Sockets.SocketException` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketException : System.ComponentModel.Win32Exception + { + public override int ErrorCode { get => throw null; } + public override string Message { get => throw null; } + public System.Net.Sockets.SocketError SocketErrorCode { get => throw null; } + public SocketException(int errorCode) => throw null; + public SocketException() => throw null; + protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + } + } + namespace Security + { + namespace Authentication + { + // Generated from `System.Security.Authentication.CipherAlgorithmType` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CipherAlgorithmType + { + Aes, + Aes128, + Aes192, + Aes256, + // Stub generator skipped constructor + Des, + None, + Null, + Rc2, + Rc4, + TripleDes, + } + + // Generated from `System.Security.Authentication.ExchangeAlgorithmType` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ExchangeAlgorithmType + { + DiffieHellman, + // Stub generator skipped constructor + None, + RsaKeyX, + RsaSign, + } + + // Generated from `System.Security.Authentication.HashAlgorithmType` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HashAlgorithmType + { + // Stub generator skipped constructor + Md5, + None, + Sha1, + Sha256, + Sha384, + Sha512, + } + + // Generated from `System.Security.Authentication.SslProtocols` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SslProtocols + { + Default, + None, + Ssl2, + Ssl3, + // Stub generator skipped constructor + Tls, + Tls11, + Tls12, + Tls13, + } + + namespace ExtendedProtection + { + // Generated from `System.Security.Authentication.ExtendedProtection.ChannelBinding` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ChannelBinding : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + protected ChannelBinding(bool ownsHandle) : base(default(bool)) => throw null; + protected ChannelBinding() : base(default(bool)) => throw null; + public abstract int Size { get; } + } + + // Generated from `System.Security.Authentication.ExtendedProtection.ChannelBindingKind` in `System.Net.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ChannelBindingKind + { + // Stub generator skipped constructor + Endpoint, + Unique, + Unknown, + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs new file mode 100644 index 000000000000..8b4e8883c2e8 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs @@ -0,0 +1,504 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.AuthenticationManager` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AuthenticationManager + { + public static System.Net.Authorization Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials) => throw null; + public static System.Net.ICredentialPolicy CredentialPolicy { get => throw null; set => throw null; } + public static System.Collections.Specialized.StringDictionary CustomTargetNameDictionary { get => throw null; } + public static System.Net.Authorization PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials) => throw null; + public static void Register(System.Net.IAuthenticationModule authenticationModule) => throw null; + public static System.Collections.IEnumerator RegisteredModules { get => throw null; } + public static void Unregister(string authenticationScheme) => throw null; + public static void Unregister(System.Net.IAuthenticationModule authenticationModule) => throw null; + } + + // Generated from `System.Net.Authorization` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Authorization + { + public Authorization(string token, bool finished, string connectionGroupId) => throw null; + public Authorization(string token, bool finished) => throw null; + public Authorization(string token) => throw null; + public bool Complete { get => throw null; } + public string ConnectionGroupId { get => throw null; } + public string Message { get => throw null; } + public bool MutuallyAuthenticated { get => throw null; set => throw null; } + public string[] ProtectionRealm { get => throw null; set => throw null; } + } + + // Generated from `System.Net.FileWebRequest` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable + { + public override void Abort() => throw null; + public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) => throw null; + public override string ConnectionGroupName { get => throw null; set => throw null; } + public override System.Int64 ContentLength { get => throw null; set => throw null; } + public override string ContentType { get => throw null; set => throw null; } + public override System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) => throw null; + public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) => throw null; + protected FileWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override System.IO.Stream GetRequestStream() => throw null; + public override System.Threading.Tasks.Task GetRequestStreamAsync() => throw null; + public override System.Net.WebResponse GetResponse() => throw null; + public override System.Threading.Tasks.Task GetResponseAsync() => throw null; + public override System.Net.WebHeaderCollection Headers { get => throw null; } + public override string Method { get => throw null; set => throw null; } + public override bool PreAuthenticate { get => throw null; set => throw null; } + public override System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public override System.Uri RequestUri { get => throw null; } + public override int Timeout { get => throw null; set => throw null; } + public override bool UseDefaultCredentials { get => throw null; set => throw null; } + } + + // Generated from `System.Net.FileWebResponse` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable + { + public override void Close() => throw null; + public override System.Int64 ContentLength { get => throw null; } + public override string ContentType { get => throw null; } + protected FileWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override System.IO.Stream GetResponseStream() => throw null; + public override System.Net.WebHeaderCollection Headers { get => throw null; } + public override System.Uri ResponseUri { get => throw null; } + public override bool SupportsHeaders { get => throw null; } + } + + // Generated from `System.Net.FtpStatusCode` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FtpStatusCode + { + AccountNeeded, + ActionAbortedLocalProcessingError, + ActionAbortedUnknownPageType, + ActionNotTakenFileUnavailable, + ActionNotTakenFileUnavailableOrBusy, + ActionNotTakenFilenameNotAllowed, + ActionNotTakenInsufficientSpace, + ArgumentSyntaxError, + BadCommandSequence, + CantOpenData, + ClosingControl, + ClosingData, + CommandExtraneous, + CommandNotImplemented, + CommandOK, + CommandSyntaxError, + ConnectionClosed, + DataAlreadyOpen, + DirectoryStatus, + EnteringPassive, + FileActionAborted, + FileActionOK, + FileCommandPending, + FileStatus, + // Stub generator skipped constructor + LoggedInProceed, + NeedLoginAccount, + NotLoggedIn, + OpeningData, + PathnameCreated, + RestartMarker, + SendPasswordCommand, + SendUserCommand, + ServerWantsSecureSession, + ServiceNotAvailable, + ServiceTemporarilyNotAvailable, + SystemType, + Undefined, + } + + // Generated from `System.Net.FtpWebRequest` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FtpWebRequest : System.Net.WebRequest + { + public override void Abort() => throw null; + public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) => throw null; + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; set => throw null; } + public override string ConnectionGroupName { get => throw null; set => throw null; } + public override System.Int64 ContentLength { get => throw null; set => throw null; } + public System.Int64 ContentOffset { get => throw null; set => throw null; } + public override string ContentType { get => throw null; set => throw null; } + public override System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public static System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get => throw null; set => throw null; } + public bool EnableSsl { get => throw null; set => throw null; } + public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) => throw null; + public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) => throw null; + public override System.IO.Stream GetRequestStream() => throw null; + public override System.Net.WebResponse GetResponse() => throw null; + public override System.Net.WebHeaderCollection Headers { get => throw null; set => throw null; } + public bool KeepAlive { get => throw null; set => throw null; } + public override string Method { get => throw null; set => throw null; } + public override bool PreAuthenticate { get => throw null; set => throw null; } + public override System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public int ReadWriteTimeout { get => throw null; set => throw null; } + public string RenameTo { get => throw null; set => throw null; } + public override System.Uri RequestUri { get => throw null; } + public System.Net.ServicePoint ServicePoint { get => throw null; } + public override int Timeout { get => throw null; set => throw null; } + public bool UseBinary { get => throw null; set => throw null; } + public override bool UseDefaultCredentials { get => throw null; set => throw null; } + public bool UsePassive { get => throw null; set => throw null; } + } + + // Generated from `System.Net.FtpWebResponse` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FtpWebResponse : System.Net.WebResponse, System.IDisposable + { + public string BannerMessage { get => throw null; } + public override void Close() => throw null; + public override System.Int64 ContentLength { get => throw null; } + public string ExitMessage { get => throw null; } + public override System.IO.Stream GetResponseStream() => throw null; + public override System.Net.WebHeaderCollection Headers { get => throw null; } + public System.DateTime LastModified { get => throw null; } + public override System.Uri ResponseUri { get => throw null; } + public System.Net.FtpStatusCode StatusCode { get => throw null; } + public string StatusDescription { get => throw null; } + public override bool SupportsHeaders { get => throw null; } + public string WelcomeMessage { get => throw null; } + } + + // Generated from `System.Net.GlobalProxySelection` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GlobalProxySelection + { + public static System.Net.IWebProxy GetEmptyWebProxy() => throw null; + public GlobalProxySelection() => throw null; + public static System.Net.IWebProxy Select { get => throw null; set => throw null; } + } + + // Generated from `System.Net.HttpContinueDelegate` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void HttpContinueDelegate(int StatusCode, System.Net.WebHeaderCollection httpHeaders); + + // Generated from `System.Net.HttpWebRequest` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable + { + public override void Abort() => throw null; + public string Accept { get => throw null; set => throw null; } + public void AddRange(string rangeSpecifier, int range) => throw null; + public void AddRange(string rangeSpecifier, int from, int to) => throw null; + public void AddRange(string rangeSpecifier, System.Int64 range) => throw null; + public void AddRange(string rangeSpecifier, System.Int64 from, System.Int64 to) => throw null; + public void AddRange(int range) => throw null; + public void AddRange(int from, int to) => throw null; + public void AddRange(System.Int64 range) => throw null; + public void AddRange(System.Int64 from, System.Int64 to) => throw null; + public System.Uri Address { get => throw null; } + public virtual bool AllowAutoRedirect { get => throw null; set => throw null; } + public virtual bool AllowReadStreamBuffering { get => throw null; set => throw null; } + public virtual bool AllowWriteStreamBuffering { get => throw null; set => throw null; } + public System.Net.DecompressionMethods AutomaticDecompression { get => throw null; set => throw null; } + public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) => throw null; + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; set => throw null; } + public string Connection { get => throw null; set => throw null; } + public override string ConnectionGroupName { get => throw null; set => throw null; } + public override System.Int64 ContentLength { get => throw null; set => throw null; } + public override string ContentType { get => throw null; set => throw null; } + public System.Net.HttpContinueDelegate ContinueDelegate { get => throw null; set => throw null; } + public int ContinueTimeout { get => throw null; set => throw null; } + public virtual System.Net.CookieContainer CookieContainer { get => throw null; set => throw null; } + public override System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public System.DateTime Date { get => throw null; set => throw null; } + public static System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get => throw null; set => throw null; } + public static int DefaultMaximumErrorResponseLength { get => throw null; set => throw null; } + public static int DefaultMaximumResponseHeadersLength { get => throw null; set => throw null; } + public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) => throw null; + public System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult, out System.Net.TransportContext context) => throw null; + public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) => throw null; + public string Expect { get => throw null; set => throw null; } + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override System.IO.Stream GetRequestStream() => throw null; + public System.IO.Stream GetRequestStream(out System.Net.TransportContext context) => throw null; + public override System.Net.WebResponse GetResponse() => throw null; + public virtual bool HaveResponse { get => throw null; } + public override System.Net.WebHeaderCollection Headers { get => throw null; set => throw null; } + public string Host { get => throw null; set => throw null; } + protected HttpWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public System.DateTime IfModifiedSince { get => throw null; set => throw null; } + public bool KeepAlive { get => throw null; set => throw null; } + public int MaximumAutomaticRedirections { get => throw null; set => throw null; } + public int MaximumResponseHeadersLength { get => throw null; set => throw null; } + public string MediaType { get => throw null; set => throw null; } + public override string Method { get => throw null; set => throw null; } + public bool Pipelined { get => throw null; set => throw null; } + public override bool PreAuthenticate { get => throw null; set => throw null; } + public System.Version ProtocolVersion { get => throw null; set => throw null; } + public override System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public int ReadWriteTimeout { get => throw null; set => throw null; } + public string Referer { get => throw null; set => throw null; } + public override System.Uri RequestUri { get => throw null; } + public bool SendChunked { get => throw null; set => throw null; } + public System.Net.Security.RemoteCertificateValidationCallback ServerCertificateValidationCallback { get => throw null; set => throw null; } + public System.Net.ServicePoint ServicePoint { get => throw null; } + public virtual bool SupportsCookieContainer { get => throw null; } + public override int Timeout { get => throw null; set => throw null; } + public string TransferEncoding { get => throw null; set => throw null; } + public bool UnsafeAuthenticatedConnectionSharing { get => throw null; set => throw null; } + public override bool UseDefaultCredentials { get => throw null; set => throw null; } + public string UserAgent { get => throw null; set => throw null; } + } + + // Generated from `System.Net.HttpWebResponse` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable + { + public string CharacterSet { get => throw null; } + public override void Close() => throw null; + public string ContentEncoding { get => throw null; } + public override System.Int64 ContentLength { get => throw null; } + public override string ContentType { get => throw null; } + public virtual System.Net.CookieCollection Cookies { get => throw null; set => throw null; } + protected override void Dispose(bool disposing) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public string GetResponseHeader(string headerName) => throw null; + public override System.IO.Stream GetResponseStream() => throw null; + public override System.Net.WebHeaderCollection Headers { get => throw null; } + public HttpWebResponse() => throw null; + protected HttpWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override bool IsMutuallyAuthenticated { get => throw null; } + public System.DateTime LastModified { get => throw null; } + public virtual string Method { get => throw null; } + public System.Version ProtocolVersion { get => throw null; } + public override System.Uri ResponseUri { get => throw null; } + public string Server { get => throw null; } + public virtual System.Net.HttpStatusCode StatusCode { get => throw null; } + public virtual string StatusDescription { get => throw null; } + public override bool SupportsHeaders { get => throw null; } + } + + // Generated from `System.Net.IAuthenticationModule` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAuthenticationModule + { + System.Net.Authorization Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials); + string AuthenticationType { get; } + bool CanPreAuthenticate { get; } + System.Net.Authorization PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials); + } + + // Generated from `System.Net.ICredentialPolicy` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICredentialPolicy + { + bool ShouldSendCredential(System.Uri challengeUri, System.Net.WebRequest request, System.Net.NetworkCredential credential, System.Net.IAuthenticationModule authenticationModule); + } + + // Generated from `System.Net.IWebRequestCreate` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IWebRequestCreate + { + System.Net.WebRequest Create(System.Uri uri); + } + + // Generated from `System.Net.ProtocolViolationException` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public ProtocolViolationException(string message) => throw null; + public ProtocolViolationException() => throw null; + protected ProtocolViolationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.WebException` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WebException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public System.Net.WebResponse Response { get => throw null; } + public System.Net.WebExceptionStatus Status { get => throw null; } + public WebException(string message, System.Net.WebExceptionStatus status) => throw null; + public WebException(string message, System.Exception innerException, System.Net.WebExceptionStatus status, System.Net.WebResponse response) => throw null; + public WebException(string message, System.Exception innerException) => throw null; + public WebException(string message) => throw null; + public WebException() => throw null; + protected WebException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Net.WebExceptionStatus` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WebExceptionStatus + { + CacheEntryNotFound, + ConnectFailure, + ConnectionClosed, + KeepAliveFailure, + MessageLengthLimitExceeded, + NameResolutionFailure, + Pending, + PipelineFailure, + ProtocolError, + ProxyNameResolutionFailure, + ReceiveFailure, + RequestCanceled, + RequestProhibitedByCachePolicy, + RequestProhibitedByProxy, + SecureChannelFailure, + SendFailure, + ServerProtocolViolation, + Success, + Timeout, + TrustFailure, + UnknownError, + // Stub generator skipped constructor + } + + // Generated from `System.Net.WebRequest` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class WebRequest : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable + { + public virtual void Abort() => throw null; + public System.Net.Security.AuthenticationLevel AuthenticationLevel { get => throw null; set => throw null; } + public virtual System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) => throw null; + public virtual System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) => throw null; + public virtual System.Net.Cache.RequestCachePolicy CachePolicy { get => throw null; set => throw null; } + public virtual string ConnectionGroupName { get => throw null; set => throw null; } + public virtual System.Int64 ContentLength { get => throw null; set => throw null; } + public virtual string ContentType { get => throw null; set => throw null; } + public static System.Net.WebRequest Create(string requestUriString) => throw null; + public static System.Net.WebRequest Create(System.Uri requestUri) => throw null; + public static System.Net.WebRequest CreateDefault(System.Uri requestUri) => throw null; + public static System.Net.HttpWebRequest CreateHttp(string requestUriString) => throw null; + public static System.Net.HttpWebRequest CreateHttp(System.Uri requestUri) => throw null; + public virtual System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public static System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get => throw null; set => throw null; } + public static System.Net.IWebProxy DefaultWebProxy { get => throw null; set => throw null; } + public virtual System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) => throw null; + public virtual System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public virtual System.IO.Stream GetRequestStream() => throw null; + public virtual System.Threading.Tasks.Task GetRequestStreamAsync() => throw null; + public virtual System.Net.WebResponse GetResponse() => throw null; + public virtual System.Threading.Tasks.Task GetResponseAsync() => throw null; + public static System.Net.IWebProxy GetSystemWebProxy() => throw null; + public virtual System.Net.WebHeaderCollection Headers { get => throw null; set => throw null; } + public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get => throw null; set => throw null; } + public virtual string Method { get => throw null; set => throw null; } + public virtual bool PreAuthenticate { get => throw null; set => throw null; } + public virtual System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public static bool RegisterPrefix(string prefix, System.Net.IWebRequestCreate creator) => throw null; + public virtual System.Uri RequestUri { get => throw null; } + public virtual int Timeout { get => throw null; set => throw null; } + public virtual bool UseDefaultCredentials { get => throw null; set => throw null; } + protected WebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected WebRequest() => throw null; + } + + // Generated from `System.Net.WebRequestMethods` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class WebRequestMethods + { + // Generated from `System.Net.WebRequestMethods.File` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class File + { + public const string DownloadFile = default; + public const string UploadFile = default; + } + + + // Generated from `System.Net.WebRequestMethods.Ftp` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Ftp + { + public const string AppendFile = default; + public const string DeleteFile = default; + public const string DownloadFile = default; + public const string GetDateTimestamp = default; + public const string GetFileSize = default; + public const string ListDirectory = default; + public const string ListDirectoryDetails = default; + public const string MakeDirectory = default; + public const string PrintWorkingDirectory = default; + public const string RemoveDirectory = default; + public const string Rename = default; + public const string UploadFile = default; + public const string UploadFileWithUniqueName = default; + } + + + // Generated from `System.Net.WebRequestMethods.Http` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Http + { + public const string Connect = default; + public const string Get = default; + public const string Head = default; + public const string MkCol = default; + public const string Post = default; + public const string Put = default; + } + + + } + + // Generated from `System.Net.WebResponse` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class WebResponse : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable, System.IDisposable + { + public virtual void Close() => throw null; + public virtual System.Int64 ContentLength { get => throw null; set => throw null; } + public virtual string ContentType { get => throw null; set => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public virtual System.IO.Stream GetResponseStream() => throw null; + public virtual System.Net.WebHeaderCollection Headers { get => throw null; } + public virtual bool IsFromCache { get => throw null; } + public virtual bool IsMutuallyAuthenticated { get => throw null; } + public virtual System.Uri ResponseUri { get => throw null; } + public virtual bool SupportsHeaders { get => throw null; } + protected WebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected WebResponse() => throw null; + } + + namespace Cache + { + // Generated from `System.Net.Cache.HttpCacheAgeControl` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpCacheAgeControl + { + // Stub generator skipped constructor + MaxAge, + MaxAgeAndMaxStale, + MaxAgeAndMinFresh, + MaxStale, + MinFresh, + None, + } + + // Generated from `System.Net.Cache.HttpRequestCacheLevel` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpRequestCacheLevel + { + BypassCache, + CacheIfAvailable, + CacheOnly, + CacheOrNextCacheOnly, + Default, + // Stub generator skipped constructor + NoCacheNoStore, + Refresh, + Reload, + Revalidate, + } + + // Generated from `System.Net.Cache.HttpRequestCachePolicy` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpRequestCachePolicy : System.Net.Cache.RequestCachePolicy + { + public System.DateTime CacheSyncDate { get => throw null; } + public HttpRequestCachePolicy(System.Net.Cache.HttpRequestCacheLevel level) => throw null; + public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale, System.DateTime cacheSyncDate) => throw null; + public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale) => throw null; + public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan ageOrFreshOrStale) => throw null; + public HttpRequestCachePolicy(System.DateTime cacheSyncDate) => throw null; + public HttpRequestCachePolicy() => throw null; + public System.Net.Cache.HttpRequestCacheLevel Level { get => throw null; } + public System.TimeSpan MaxAge { get => throw null; } + public System.TimeSpan MaxStale { get => throw null; } + public System.TimeSpan MinFresh { get => throw null; } + public override string ToString() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs new file mode 100644 index 000000000000..ffed0c3a8462 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs @@ -0,0 +1,689 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace Security + { + // Generated from `System.Net.Security.AuthenticatedStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AuthenticatedStream : System.IO.Stream + { + protected AuthenticatedStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + protected System.IO.Stream InnerStream { get => throw null; } + public abstract bool IsAuthenticated { get; } + public abstract bool IsEncrypted { get; } + public abstract bool IsMutuallyAuthenticated { get; } + public abstract bool IsServer { get; } + public abstract bool IsSigned { get; } + public bool LeaveInnerStreamOpen { get => throw null; } + } + + // Generated from `System.Net.Security.CipherSuitesPolicy` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CipherSuitesPolicy + { + public System.Collections.Generic.IEnumerable AllowedCipherSuites { get => throw null; } + public CipherSuitesPolicy(System.Collections.Generic.IEnumerable allowedCipherSuites) => throw null; + } + + // Generated from `System.Net.Security.EncryptionPolicy` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EncryptionPolicy + { + AllowNoEncryption, + // Stub generator skipped constructor + NoEncryption, + RequireEncryption, + } + + // Generated from `System.Net.Security.LocalCertificateSelectionCallback` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Security.Cryptography.X509Certificates.X509Certificate LocalCertificateSelectionCallback(object sender, string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection localCertificates, System.Security.Cryptography.X509Certificates.X509Certificate remoteCertificate, string[] acceptableIssuers); + + // Generated from `System.Net.Security.NegotiateStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NegotiateStream : System.Net.Security.AuthenticatedStream + { + public virtual void AuthenticateAsClient(System.Net.NetworkCredential credential, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel) => throw null; + public virtual void AuthenticateAsClient(System.Net.NetworkCredential credential, string targetName) => throw null; + public virtual void AuthenticateAsClient(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel) => throw null; + public virtual void AuthenticateAsClient(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName) => throw null; + public virtual void AuthenticateAsClient() => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.NetworkCredential credential, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.NetworkCredential credential, string targetName) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync() => throw null; + public virtual void AuthenticateAsServer(System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy) => throw null; + public virtual void AuthenticateAsServer(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel) => throw null; + public virtual void AuthenticateAsServer(System.Net.NetworkCredential credential, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel) => throw null; + public virtual void AuthenticateAsServer() => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.NetworkCredential credential, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync() => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(System.Net.NetworkCredential credential, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(System.Net.NetworkCredential credential, string targetName, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Net.NetworkCredential credential, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanTimeout { get => throw null; } + public override bool CanWrite { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public virtual void EndAuthenticateAsClient(System.IAsyncResult asyncResult) => throw null; + public virtual void EndAuthenticateAsServer(System.IAsyncResult asyncResult) => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get => throw null; } + public override bool IsAuthenticated { get => throw null; } + public override bool IsEncrypted { get => throw null; } + public override bool IsMutuallyAuthenticated { get => throw null; } + public override bool IsServer { get => throw null; } + public override bool IsSigned { get => throw null; } + public override System.Int64 Length { get => throw null; } + public NegotiateStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen) : base(default(System.IO.Stream), default(bool)) => throw null; + public NegotiateStream(System.IO.Stream innerStream) : base(default(System.IO.Stream), default(bool)) => throw null; + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadTimeout { get => throw null; set => throw null; } + public virtual System.Security.Principal.IIdentity RemoteIdentity { get => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int WriteTimeout { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Security.ProtectionLevel` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProtectionLevel + { + EncryptAndSign, + None, + // Stub generator skipped constructor + Sign, + } + + // Generated from `System.Net.Security.RemoteCertificateValidationCallback` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate bool RemoteCertificateValidationCallback(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors); + + // Generated from `System.Net.Security.ServerCertificateSelectionCallback` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificateSelectionCallback(object sender, string hostName); + + // Generated from `System.Net.Security.ServerOptionsSelectionCallback` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Threading.Tasks.ValueTask ServerOptionsSelectionCallback(System.Net.Security.SslStream stream, System.Net.Security.SslClientHelloInfo clientHelloInfo, object state, System.Threading.CancellationToken cancellationToken); + + // Generated from `System.Net.Security.SslApplicationProtocol` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SslApplicationProtocol : System.IEquatable + { + public static bool operator !=(System.Net.Security.SslApplicationProtocol left, System.Net.Security.SslApplicationProtocol right) => throw null; + public static bool operator ==(System.Net.Security.SslApplicationProtocol left, System.Net.Security.SslApplicationProtocol right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Net.Security.SslApplicationProtocol other) => throw null; + public override int GetHashCode() => throw null; + public static System.Net.Security.SslApplicationProtocol Http11; + public static System.Net.Security.SslApplicationProtocol Http2; + public System.ReadOnlyMemory Protocol { get => throw null; } + public SslApplicationProtocol(string protocol) => throw null; + public SslApplicationProtocol(System.Byte[] protocol) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + } + + // Generated from `System.Net.Security.SslClientAuthenticationOptions` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SslClientAuthenticationOptions + { + public bool AllowRenegotiation { get => throw null; set => throw null; } + public System.Collections.Generic.List ApplicationProtocols { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509RevocationMode CertificateRevocationCheckMode { get => throw null; set => throw null; } + public System.Net.Security.CipherSuitesPolicy CipherSuitesPolicy { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; set => throw null; } + public System.Security.Authentication.SslProtocols EnabledSslProtocols { get => throw null; set => throw null; } + public System.Net.Security.EncryptionPolicy EncryptionPolicy { get => throw null; set => throw null; } + public System.Net.Security.LocalCertificateSelectionCallback LocalCertificateSelectionCallback { get => throw null; set => throw null; } + public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get => throw null; set => throw null; } + public SslClientAuthenticationOptions() => throw null; + public string TargetHost { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Security.SslClientHelloInfo` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SslClientHelloInfo + { + public string ServerName { get => throw null; } + // Stub generator skipped constructor + public System.Security.Authentication.SslProtocols SslProtocols { get => throw null; } + } + + // Generated from `System.Net.Security.SslServerAuthenticationOptions` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SslServerAuthenticationOptions + { + public bool AllowRenegotiation { get => throw null; set => throw null; } + public System.Collections.Generic.List ApplicationProtocols { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509RevocationMode CertificateRevocationCheckMode { get => throw null; set => throw null; } + public System.Net.Security.CipherSuitesPolicy CipherSuitesPolicy { get => throw null; set => throw null; } + public bool ClientCertificateRequired { get => throw null; set => throw null; } + public System.Security.Authentication.SslProtocols EnabledSslProtocols { get => throw null; set => throw null; } + public System.Net.Security.EncryptionPolicy EncryptionPolicy { get => throw null; set => throw null; } + public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate ServerCertificate { get => throw null; set => throw null; } + public System.Net.Security.SslStreamCertificateContext ServerCertificateContext { get => throw null; set => throw null; } + public System.Net.Security.ServerCertificateSelectionCallback ServerCertificateSelectionCallback { get => throw null; set => throw null; } + public SslServerAuthenticationOptions() => throw null; + } + + // Generated from `System.Net.Security.SslStream` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SslStream : System.Net.Security.AuthenticatedStream + { + public void AuthenticateAsClient(System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions) => throw null; + public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) => throw null; + public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) => throw null; + public virtual void AuthenticateAsClient(string targetHost) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync(string targetHost) => throw null; + public System.Threading.Tasks.Task AuthenticateAsClientAsync(System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void AuthenticateAsServer(System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) => throw null; + public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) => throw null; + public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) => throw null; + public virtual void AuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation) => throw null; + public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) => throw null; + public System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task AuthenticateAsServerAsync(System.Net.Security.ServerOptionsSelectionCallback optionsCallback, object state, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsClient(string targetHost, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, bool clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public virtual System.IAsyncResult BeginAuthenticateAsServer(System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback asyncCallback, object asyncState) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanTimeout { get => throw null; } + public override bool CanWrite { get => throw null; } + public virtual bool CheckCertRevocationStatus { get => throw null; } + public virtual System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get => throw null; } + public virtual int CipherStrength { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public virtual void EndAuthenticateAsClient(System.IAsyncResult asyncResult) => throw null; + public virtual void EndAuthenticateAsServer(System.IAsyncResult asyncResult) => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Security.Authentication.HashAlgorithmType HashAlgorithm { get => throw null; } + public virtual int HashStrength { get => throw null; } + public override bool IsAuthenticated { get => throw null; } + public override bool IsEncrypted { get => throw null; } + public override bool IsMutuallyAuthenticated { get => throw null; } + public override bool IsServer { get => throw null; } + public override bool IsSigned { get => throw null; } + public virtual System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm { get => throw null; } + public virtual int KeyExchangeStrength { get => throw null; } + public override System.Int64 Length { get => throw null; } + public virtual System.Security.Cryptography.X509Certificates.X509Certificate LocalCertificate { get => throw null; } + public System.Net.Security.SslApplicationProtocol NegotiatedApplicationProtocol { get => throw null; } + public virtual System.Net.Security.TlsCipherSuite NegotiatedCipherSuite { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override int ReadTimeout { get => throw null; set => throw null; } + public virtual System.Security.Cryptography.X509Certificates.X509Certificate RemoteCertificate { get => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public virtual System.Threading.Tasks.Task ShutdownAsync() => throw null; + public virtual System.Security.Authentication.SslProtocols SslProtocol { get => throw null; } + public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback, System.Net.Security.LocalCertificateSelectionCallback userCertificateSelectionCallback, System.Net.Security.EncryptionPolicy encryptionPolicy) : base(default(System.IO.Stream), default(bool)) => throw null; + public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback, System.Net.Security.LocalCertificateSelectionCallback userCertificateSelectionCallback) : base(default(System.IO.Stream), default(bool)) => throw null; + public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen, System.Net.Security.RemoteCertificateValidationCallback userCertificateValidationCallback) : base(default(System.IO.Stream), default(bool)) => throw null; + public SslStream(System.IO.Stream innerStream, bool leaveInnerStreamOpen) : base(default(System.IO.Stream), default(bool)) => throw null; + public SslStream(System.IO.Stream innerStream) : base(default(System.IO.Stream), default(bool)) => throw null; + public string TargetHostName { get => throw null; } + public System.Net.TransportContext TransportContext { get => throw null; } + public void Write(System.Byte[] buffer) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int WriteTimeout { get => throw null; set => throw null; } + // ERR: Stub generator didn't handle member: ~SslStream + } + + // Generated from `System.Net.Security.SslStreamCertificateContext` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SslStreamCertificateContext + { + public static System.Net.Security.SslStreamCertificateContext Create(System.Security.Cryptography.X509Certificates.X509Certificate2 target, System.Security.Cryptography.X509Certificates.X509Certificate2Collection additionalCertificates, bool offline = default(bool)) => throw null; + } + + // Generated from `System.Net.Security.TlsCipherSuite` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TlsCipherSuite + { + TLS_AES_128_CCM_8_SHA256, + TLS_AES_128_CCM_SHA256, + TLS_AES_128_GCM_SHA256, + TLS_AES_256_GCM_SHA384, + TLS_CHACHA20_POLY1305_SHA256, + TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, + TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, + TLS_DHE_DSS_WITH_AES_256_CBC_SHA, + TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, + TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, + TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256, + TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256, + TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384, + TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384, + TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA, + TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA, + TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256, + TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DHE_DSS_WITH_DES_CBC_SHA, + TLS_DHE_DSS_WITH_SEED_CBC_SHA, + TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, + TLS_DHE_PSK_WITH_AES_128_CBC_SHA, + TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, + TLS_DHE_PSK_WITH_AES_128_CCM, + TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, + TLS_DHE_PSK_WITH_AES_256_CBC_SHA, + TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, + TLS_DHE_PSK_WITH_AES_256_CCM, + TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, + TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256, + TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256, + TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384, + TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384, + TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, + TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256, + TLS_DHE_PSK_WITH_NULL_SHA, + TLS_DHE_PSK_WITH_NULL_SHA256, + TLS_DHE_PSK_WITH_NULL_SHA384, + TLS_DHE_PSK_WITH_RC4_128_SHA, + TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, + TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_DHE_RSA_WITH_AES_128_CCM, + TLS_DHE_RSA_WITH_AES_128_CCM_8, + TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_DHE_RSA_WITH_AES_256_CBC_SHA, + TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, + TLS_DHE_RSA_WITH_AES_256_CCM, + TLS_DHE_RSA_WITH_AES_256_CCM_8, + TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, + TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256, + TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256, + TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384, + TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384, + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, + TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, + TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, + TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256, + TLS_DHE_RSA_WITH_DES_CBC_SHA, + TLS_DHE_RSA_WITH_SEED_CBC_SHA, + TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA, + TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA, + TLS_DH_DSS_WITH_AES_128_CBC_SHA, + TLS_DH_DSS_WITH_AES_128_CBC_SHA256, + TLS_DH_DSS_WITH_AES_128_GCM_SHA256, + TLS_DH_DSS_WITH_AES_256_CBC_SHA, + TLS_DH_DSS_WITH_AES_256_CBC_SHA256, + TLS_DH_DSS_WITH_AES_256_GCM_SHA384, + TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256, + TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256, + TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384, + TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384, + TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA, + TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA, + TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256, + TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DH_DSS_WITH_DES_CBC_SHA, + TLS_DH_DSS_WITH_SEED_CBC_SHA, + TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA, + TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_DH_RSA_WITH_AES_128_CBC_SHA, + TLS_DH_RSA_WITH_AES_128_CBC_SHA256, + TLS_DH_RSA_WITH_AES_128_GCM_SHA256, + TLS_DH_RSA_WITH_AES_256_CBC_SHA, + TLS_DH_RSA_WITH_AES_256_CBC_SHA256, + TLS_DH_RSA_WITH_AES_256_GCM_SHA384, + TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256, + TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256, + TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384, + TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384, + TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA, + TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA, + TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256, + TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DH_RSA_WITH_DES_CBC_SHA, + TLS_DH_RSA_WITH_SEED_CBC_SHA, + TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA, + TLS_DH_anon_EXPORT_WITH_RC4_40_MD5, + TLS_DH_anon_WITH_3DES_EDE_CBC_SHA, + TLS_DH_anon_WITH_AES_128_CBC_SHA, + TLS_DH_anon_WITH_AES_128_CBC_SHA256, + TLS_DH_anon_WITH_AES_128_GCM_SHA256, + TLS_DH_anon_WITH_AES_256_CBC_SHA, + TLS_DH_anon_WITH_AES_256_CBC_SHA256, + TLS_DH_anon_WITH_AES_256_GCM_SHA384, + TLS_DH_anon_WITH_ARIA_128_CBC_SHA256, + TLS_DH_anon_WITH_ARIA_128_GCM_SHA256, + TLS_DH_anon_WITH_ARIA_256_CBC_SHA384, + TLS_DH_anon_WITH_ARIA_256_GCM_SHA384, + TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA, + TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256, + TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256, + TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA, + TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256, + TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384, + TLS_DH_anon_WITH_DES_CBC_SHA, + TLS_DH_anon_WITH_RC4_128_MD5, + TLS_DH_anon_WITH_SEED_CBC_SHA, + TLS_ECCPWD_WITH_AES_128_CCM_SHA256, + TLS_ECCPWD_WITH_AES_128_GCM_SHA256, + TLS_ECCPWD_WITH_AES_256_CCM_SHA384, + TLS_ECCPWD_WITH_AES_256_GCM_SHA384, + TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_128_CCM, + TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, + TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, + TLS_ECDHE_ECDSA_WITH_AES_256_CCM, + TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, + TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384, + TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384, + TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, + TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, + TLS_ECDHE_ECDSA_WITH_NULL_SHA, + TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, + TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, + TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256, + TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256, + TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, + TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, + TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384, + TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256, + TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384, + TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, + TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, + TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256, + TLS_ECDHE_PSK_WITH_NULL_SHA, + TLS_ECDHE_PSK_WITH_NULL_SHA256, + TLS_ECDHE_PSK_WITH_NULL_SHA384, + TLS_ECDHE_PSK_WITH_RC4_128_SHA, + TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, + TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384, + TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384, + TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, + TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, + TLS_ECDHE_RSA_WITH_NULL_SHA, + TLS_ECDHE_RSA_WITH_RC4_128_SHA, + TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, + TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, + TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, + TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256, + TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256, + TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384, + TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384, + TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, + TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_ECDH_ECDSA_WITH_NULL_SHA, + TLS_ECDH_ECDSA_WITH_RC4_128_SHA, + TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, + TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, + TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, + TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, + TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, + TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256, + TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256, + TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384, + TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384, + TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, + TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_ECDH_RSA_WITH_NULL_SHA, + TLS_ECDH_RSA_WITH_RC4_128_SHA, + TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA, + TLS_ECDH_anon_WITH_AES_128_CBC_SHA, + TLS_ECDH_anon_WITH_AES_256_CBC_SHA, + TLS_ECDH_anon_WITH_NULL_SHA, + TLS_ECDH_anon_WITH_RC4_128_SHA, + TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5, + TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, + TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5, + TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA, + TLS_KRB5_EXPORT_WITH_RC4_40_MD5, + TLS_KRB5_EXPORT_WITH_RC4_40_SHA, + TLS_KRB5_WITH_3DES_EDE_CBC_MD5, + TLS_KRB5_WITH_3DES_EDE_CBC_SHA, + TLS_KRB5_WITH_DES_CBC_MD5, + TLS_KRB5_WITH_DES_CBC_SHA, + TLS_KRB5_WITH_IDEA_CBC_MD5, + TLS_KRB5_WITH_IDEA_CBC_SHA, + TLS_KRB5_WITH_RC4_128_MD5, + TLS_KRB5_WITH_RC4_128_SHA, + TLS_NULL_WITH_NULL_NULL, + TLS_PSK_DHE_WITH_AES_128_CCM_8, + TLS_PSK_DHE_WITH_AES_256_CCM_8, + TLS_PSK_WITH_3DES_EDE_CBC_SHA, + TLS_PSK_WITH_AES_128_CBC_SHA, + TLS_PSK_WITH_AES_128_CBC_SHA256, + TLS_PSK_WITH_AES_128_CCM, + TLS_PSK_WITH_AES_128_CCM_8, + TLS_PSK_WITH_AES_128_GCM_SHA256, + TLS_PSK_WITH_AES_256_CBC_SHA, + TLS_PSK_WITH_AES_256_CBC_SHA384, + TLS_PSK_WITH_AES_256_CCM, + TLS_PSK_WITH_AES_256_CCM_8, + TLS_PSK_WITH_AES_256_GCM_SHA384, + TLS_PSK_WITH_ARIA_128_CBC_SHA256, + TLS_PSK_WITH_ARIA_128_GCM_SHA256, + TLS_PSK_WITH_ARIA_256_CBC_SHA384, + TLS_PSK_WITH_ARIA_256_GCM_SHA384, + TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, + TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, + TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, + TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, + TLS_PSK_WITH_CHACHA20_POLY1305_SHA256, + TLS_PSK_WITH_NULL_SHA, + TLS_PSK_WITH_NULL_SHA256, + TLS_PSK_WITH_NULL_SHA384, + TLS_PSK_WITH_RC4_128_SHA, + TLS_RSA_EXPORT_WITH_DES40_CBC_SHA, + TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5, + TLS_RSA_EXPORT_WITH_RC4_40_MD5, + TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, + TLS_RSA_PSK_WITH_AES_128_CBC_SHA, + TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, + TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, + TLS_RSA_PSK_WITH_AES_256_CBC_SHA, + TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, + TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, + TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256, + TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256, + TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384, + TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384, + TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, + TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, + TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, + TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, + TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256, + TLS_RSA_PSK_WITH_NULL_SHA, + TLS_RSA_PSK_WITH_NULL_SHA256, + TLS_RSA_PSK_WITH_NULL_SHA384, + TLS_RSA_PSK_WITH_RC4_128_SHA, + TLS_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_RSA_WITH_AES_128_CBC_SHA, + TLS_RSA_WITH_AES_128_CBC_SHA256, + TLS_RSA_WITH_AES_128_CCM, + TLS_RSA_WITH_AES_128_CCM_8, + TLS_RSA_WITH_AES_128_GCM_SHA256, + TLS_RSA_WITH_AES_256_CBC_SHA, + TLS_RSA_WITH_AES_256_CBC_SHA256, + TLS_RSA_WITH_AES_256_CCM, + TLS_RSA_WITH_AES_256_CCM_8, + TLS_RSA_WITH_AES_256_GCM_SHA384, + TLS_RSA_WITH_ARIA_128_CBC_SHA256, + TLS_RSA_WITH_ARIA_128_GCM_SHA256, + TLS_RSA_WITH_ARIA_256_CBC_SHA384, + TLS_RSA_WITH_ARIA_256_GCM_SHA384, + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, + TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, + TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, + TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, + TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, + TLS_RSA_WITH_DES_CBC_SHA, + TLS_RSA_WITH_IDEA_CBC_SHA, + TLS_RSA_WITH_NULL_MD5, + TLS_RSA_WITH_NULL_SHA, + TLS_RSA_WITH_NULL_SHA256, + TLS_RSA_WITH_RC4_128_MD5, + TLS_RSA_WITH_RC4_128_SHA, + TLS_RSA_WITH_SEED_CBC_SHA, + TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA, + TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA, + TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA, + TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA, + TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA, + TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA, + TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA, + TLS_SRP_SHA_WITH_AES_128_CBC_SHA, + TLS_SRP_SHA_WITH_AES_256_CBC_SHA, + // Stub generator skipped constructor + } + + } + } + namespace Security + { + namespace Authentication + { + // Generated from `System.Security.Authentication.AuthenticationException` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AuthenticationException : System.SystemException + { + public AuthenticationException(string message, System.Exception innerException) => throw null; + public AuthenticationException(string message) => throw null; + public AuthenticationException() => throw null; + protected AuthenticationException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.Security.Authentication.InvalidCredentialException` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidCredentialException : System.Security.Authentication.AuthenticationException + { + public InvalidCredentialException(string message, System.Exception innerException) => throw null; + public InvalidCredentialException(string message) => throw null; + public InvalidCredentialException() => throw null; + protected InvalidCredentialException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + namespace ExtendedProtection + { + // Generated from `System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExtendedProtectionPolicy : System.Runtime.Serialization.ISerializable + { + public System.Security.Authentication.ExtendedProtection.ChannelBinding CustomChannelBinding { get => throw null; } + public System.Security.Authentication.ExtendedProtection.ServiceNameCollection CustomServiceNames { get => throw null; } + public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Security.Authentication.ExtendedProtection.ServiceNameCollection customServiceNames) => throw null; + public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ProtectionScenario protectionScenario, System.Collections.ICollection customServiceNames) => throw null; + public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement, System.Security.Authentication.ExtendedProtection.ChannelBinding customChannelBinding) => throw null; + public ExtendedProtectionPolicy(System.Security.Authentication.ExtendedProtection.PolicyEnforcement policyEnforcement) => throw null; + protected ExtendedProtectionPolicy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static bool OSSupportsExtendedProtection { get => throw null; } + public System.Security.Authentication.ExtendedProtection.PolicyEnforcement PolicyEnforcement { get => throw null; } + public System.Security.Authentication.ExtendedProtection.ProtectionScenario ProtectionScenario { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Authentication.ExtendedProtection.PolicyEnforcement` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PolicyEnforcement + { + Always, + Never, + // Stub generator skipped constructor + WhenSupported, + } + + // Generated from `System.Security.Authentication.ExtendedProtection.ProtectionScenario` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProtectionScenario + { + // Stub generator skipped constructor + TransportSelected, + TrustedProxy, + } + + // Generated from `System.Security.Authentication.ExtendedProtection.ServiceNameCollection` in `System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ServiceNameCollection : System.Collections.ReadOnlyCollectionBase + { + public bool Contains(string searchServiceName) => throw null; + public System.Security.Authentication.ExtendedProtection.ServiceNameCollection Merge(string serviceName) => throw null; + public System.Security.Authentication.ExtendedProtection.ServiceNameCollection Merge(System.Collections.IEnumerable serviceNames) => throw null; + public ServiceNameCollection(System.Collections.ICollection items) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs new file mode 100644 index 000000000000..81f7eb3a90bb --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs @@ -0,0 +1,69 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.BindIPEndPoint` in `System.Net.ServicePoint, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate System.Net.IPEndPoint BindIPEndPoint(System.Net.ServicePoint servicePoint, System.Net.IPEndPoint remoteEndPoint, int retryCount); + + // Generated from `System.Net.SecurityProtocolType` in `System.Net.ServicePoint, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum SecurityProtocolType + { + // Stub generator skipped constructor + Ssl3, + SystemDefault, + Tls, + Tls11, + Tls12, + Tls13, + } + + // Generated from `System.Net.ServicePoint` in `System.Net.ServicePoint, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServicePoint + { + public System.Uri Address { get => throw null; } + public System.Net.BindIPEndPoint BindIPEndPointDelegate { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate Certificate { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate ClientCertificate { get => throw null; } + public bool CloseConnectionGroup(string connectionGroupName) => throw null; + public int ConnectionLeaseTimeout { get => throw null; set => throw null; } + public int ConnectionLimit { get => throw null; set => throw null; } + public string ConnectionName { get => throw null; } + public int CurrentConnections { get => throw null; } + public bool Expect100Continue { get => throw null; set => throw null; } + public System.DateTime IdleSince { get => throw null; } + public int MaxIdleTime { get => throw null; set => throw null; } + public virtual System.Version ProtocolVersion { get => throw null; } + public int ReceiveBufferSize { get => throw null; set => throw null; } + public void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval) => throw null; + public bool SupportsPipelining { get => throw null; } + public bool UseNagleAlgorithm { get => throw null; set => throw null; } + } + + // Generated from `System.Net.ServicePointManager` in `System.Net.ServicePoint, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ServicePointManager + { + public static bool CheckCertificateRevocationList { get => throw null; set => throw null; } + public static int DefaultConnectionLimit { get => throw null; set => throw null; } + public const int DefaultNonPersistentConnectionLimit = default; + public const int DefaultPersistentConnectionLimit = default; + public static int DnsRefreshTimeout { get => throw null; set => throw null; } + public static bool EnableDnsRoundRobin { get => throw null; set => throw null; } + public static System.Net.Security.EncryptionPolicy EncryptionPolicy { get => throw null; } + public static bool Expect100Continue { get => throw null; set => throw null; } + public static System.Net.ServicePoint FindServicePoint(string uriString, System.Net.IWebProxy proxy) => throw null; + public static System.Net.ServicePoint FindServicePoint(System.Uri address, System.Net.IWebProxy proxy) => throw null; + public static System.Net.ServicePoint FindServicePoint(System.Uri address) => throw null; + public static int MaxServicePointIdleTime { get => throw null; set => throw null; } + public static int MaxServicePoints { get => throw null; set => throw null; } + public static bool ReusePort { get => throw null; set => throw null; } + public static System.Net.SecurityProtocolType SecurityProtocol { get => throw null; set => throw null; } + public static System.Net.Security.RemoteCertificateValidationCallback ServerCertificateValidationCallback { get => throw null; set => throw null; } + public static void SetTcpKeepAlive(bool enabled, int keepAliveTime, int keepAliveInterval) => throw null; + public static bool UseNagleAlgorithm { get => throw null; set => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs new file mode 100644 index 000000000000..5cad879cbf62 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs @@ -0,0 +1,755 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace Sockets + { + // Generated from `System.Net.Sockets.IOControlCode` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum IOControlCode + { + AbsorbRouterAlert, + AddMulticastGroupOnInterface, + AddressListChange, + AddressListQuery, + AddressListSort, + AssociateHandle, + AsyncIO, + BindToInterface, + DataToRead, + DeleteMulticastGroupFromInterface, + EnableCircularQueuing, + Flush, + GetBroadcastAddress, + GetExtensionFunctionPointer, + GetGroupQos, + GetQos, + // Stub generator skipped constructor + KeepAliveValues, + LimitBroadcasts, + MulticastInterface, + MulticastScope, + MultipointLoopback, + NamespaceChange, + NonBlockingIO, + OobDataRead, + QueryTargetPnpHandle, + ReceiveAll, + ReceiveAllIgmpMulticast, + ReceiveAllMulticast, + RoutingInterfaceChange, + RoutingInterfaceQuery, + SetGroupQos, + SetQos, + TranslateHandle, + UnicastInterface, + } + + // Generated from `System.Net.Sockets.IPPacketInformation` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct IPPacketInformation + { + public static bool operator !=(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) => throw null; + public static bool operator ==(System.Net.Sockets.IPPacketInformation packetInformation1, System.Net.Sockets.IPPacketInformation packetInformation2) => throw null; + public System.Net.IPAddress Address { get => throw null; } + public override bool Equals(object comparand) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public int Interface { get => throw null; } + } + + // Generated from `System.Net.Sockets.IPProtectionLevel` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum IPProtectionLevel + { + EdgeRestricted, + // Stub generator skipped constructor + Restricted, + Unrestricted, + Unspecified, + } + + // Generated from `System.Net.Sockets.IPv6MulticastOption` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IPv6MulticastOption + { + public System.Net.IPAddress Group { get => throw null; set => throw null; } + public IPv6MulticastOption(System.Net.IPAddress group, System.Int64 ifindex) => throw null; + public IPv6MulticastOption(System.Net.IPAddress group) => throw null; + public System.Int64 InterfaceIndex { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Sockets.LingerOption` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LingerOption + { + public bool Enabled { get => throw null; set => throw null; } + public LingerOption(bool enable, int seconds) => throw null; + public int LingerTime { get => throw null; set => throw null; } + } + + // Generated from `System.Net.Sockets.MulticastOption` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MulticastOption + { + public System.Net.IPAddress Group { get => throw null; set => throw null; } + public int InterfaceIndex { get => throw null; set => throw null; } + public System.Net.IPAddress LocalAddress { get => throw null; set => throw null; } + public MulticastOption(System.Net.IPAddress group, int interfaceIndex) => throw null; + public MulticastOption(System.Net.IPAddress group, System.Net.IPAddress mcint) => throw null; + public MulticastOption(System.Net.IPAddress group) => throw null; + } + + // Generated from `System.Net.Sockets.NetworkStream` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetworkStream : System.IO.Stream + { + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int size, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int size, System.AsyncCallback callback, object state) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanTimeout { get => throw null; } + public override bool CanWrite { get => throw null; } + public void Close(int timeout) => throw null; + public virtual bool DataAvailable { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public NetworkStream(System.Net.Sockets.Socket socket, bool ownsSocket) => throw null; + public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access, bool ownsSocket) => throw null; + public NetworkStream(System.Net.Sockets.Socket socket, System.IO.FileAccess access) => throw null; + public NetworkStream(System.Net.Sockets.Socket socket) => throw null; + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] buffer, int offset, int size) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int size, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override int ReadTimeout { get => throw null; set => throw null; } + protected bool Readable { get => throw null; set => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public System.Net.Sockets.Socket Socket { get => throw null; } + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] buffer, int offset, int size) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int size, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + public override int WriteTimeout { get => throw null; set => throw null; } + protected bool Writeable { get => throw null; set => throw null; } + // ERR: Stub generator didn't handle member: ~NetworkStream + } + + // Generated from `System.Net.Sockets.ProtocolFamily` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProtocolFamily + { + AppleTalk, + Atm, + Banyan, + Ccitt, + Chaos, + Cluster, + ControllerAreaNetwork, + DataKit, + DataLink, + DecNet, + Ecma, + FireFox, + HyperChannel, + Ieee12844, + ImpLink, + InterNetwork, + InterNetworkV6, + Ipx, + Irda, + Iso, + Lat, + Max, + NS, + NetBios, + NetworkDesigners, + Osi, + Packet, + // Stub generator skipped constructor + Pup, + Sna, + Unix, + Unknown, + Unspecified, + VoiceView, + } + + // Generated from `System.Net.Sockets.ProtocolType` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProtocolType + { + Ggp, + IP, + IPSecAuthenticationHeader, + IPSecEncapsulatingSecurityPayload, + IPv4, + IPv6, + IPv6DestinationOptions, + IPv6FragmentHeader, + IPv6HopByHopOptions, + IPv6NoNextHeader, + IPv6RoutingHeader, + Icmp, + IcmpV6, + Idp, + Igmp, + Ipx, + ND, + // Stub generator skipped constructor + Pup, + Raw, + Spx, + SpxII, + Tcp, + Udp, + Unknown, + Unspecified, + } + + // Generated from `System.Net.Sockets.SafeSocketHandle` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeSocketHandle : Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid + { + protected override bool ReleaseHandle() => throw null; + public SafeSocketHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + // Generated from `System.Net.Sockets.SelectMode` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SelectMode + { + SelectError, + // Stub generator skipped constructor + SelectRead, + SelectWrite, + } + + // Generated from `System.Net.Sockets.SendPacketsElement` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SendPacketsElement + { + public System.Byte[] Buffer { get => throw null; } + public int Count { get => throw null; } + public bool EndOfPacket { get => throw null; } + public string FilePath { get => throw null; } + public System.IO.FileStream FileStream { get => throw null; } + public int Offset { get => throw null; } + public System.Int64 OffsetLong { get => throw null; } + public SendPacketsElement(string filepath, int offset, int count, bool endOfPacket) => throw null; + public SendPacketsElement(string filepath, int offset, int count) => throw null; + public SendPacketsElement(string filepath, System.Int64 offset, int count, bool endOfPacket) => throw null; + public SendPacketsElement(string filepath, System.Int64 offset, int count) => throw null; + public SendPacketsElement(string filepath) => throw null; + public SendPacketsElement(System.IO.FileStream fileStream, System.Int64 offset, int count, bool endOfPacket) => throw null; + public SendPacketsElement(System.IO.FileStream fileStream, System.Int64 offset, int count) => throw null; + public SendPacketsElement(System.IO.FileStream fileStream) => throw null; + public SendPacketsElement(System.Byte[] buffer, int offset, int count, bool endOfPacket) => throw null; + public SendPacketsElement(System.Byte[] buffer, int offset, int count) => throw null; + public SendPacketsElement(System.Byte[] buffer) => throw null; + } + + // Generated from `System.Net.Sockets.Socket` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Socket : System.IDisposable + { + public System.Net.Sockets.Socket Accept() => throw null; + public bool AcceptAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public System.Net.Sockets.AddressFamily AddressFamily { get => throw null; } + public int Available { get => throw null; } + public System.IAsyncResult BeginAccept(int receiveSize, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginAccept(System.Net.Sockets.Socket acceptSocket, int receiveSize, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginAccept(System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginConnect(System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginDisconnect(bool reuseSocket, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceive(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceive(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceive(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceive(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceiveFrom(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginReceiveMessageFrom(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSendFile(string fileName, System.Byte[] preBuffer, System.Byte[] postBuffer, System.Net.Sockets.TransmitFileOptions flags, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSendFile(string fileName, System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginSendTo(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state) => throw null; + public void Bind(System.Net.EndPoint localEP) => throw null; + public bool Blocking { get => throw null; set => throw null; } + public static void CancelConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public void Close(int timeout) => throw null; + public void Close() => throw null; + public void Connect(string host, int port) => throw null; + public void Connect(System.Net.IPAddress[] addresses, int port) => throw null; + public void Connect(System.Net.IPAddress address, int port) => throw null; + public void Connect(System.Net.EndPoint remoteEP) => throw null; + public static bool ConnectAsync(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType, System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public bool ConnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public bool Connected { get => throw null; } + public void Disconnect(bool reuseSocket) => throw null; + public bool DisconnectAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool DontFragment { get => throw null; set => throw null; } + public bool DualMode { get => throw null; set => throw null; } + public System.Net.Sockets.SocketInformation DuplicateAndClose(int targetProcessId) => throw null; + public bool EnableBroadcast { get => throw null; set => throw null; } + public System.Net.Sockets.Socket EndAccept(out System.Byte[] buffer, out int bytesTransferred, System.IAsyncResult asyncResult) => throw null; + public System.Net.Sockets.Socket EndAccept(out System.Byte[] buffer, System.IAsyncResult asyncResult) => throw null; + public System.Net.Sockets.Socket EndAccept(System.IAsyncResult asyncResult) => throw null; + public void EndConnect(System.IAsyncResult asyncResult) => throw null; + public void EndDisconnect(System.IAsyncResult asyncResult) => throw null; + public int EndReceive(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) => throw null; + public int EndReceive(System.IAsyncResult asyncResult) => throw null; + public int EndReceiveFrom(System.IAsyncResult asyncResult, ref System.Net.EndPoint endPoint) => throw null; + public int EndReceiveMessageFrom(System.IAsyncResult asyncResult, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint endPoint, out System.Net.Sockets.IPPacketInformation ipPacketInformation) => throw null; + public int EndSend(System.IAsyncResult asyncResult, out System.Net.Sockets.SocketError errorCode) => throw null; + public int EndSend(System.IAsyncResult asyncResult) => throw null; + public void EndSendFile(System.IAsyncResult asyncResult) => throw null; + public int EndSendTo(System.IAsyncResult asyncResult) => throw null; + public bool ExclusiveAddressUse { get => throw null; set => throw null; } + public int GetRawSocketOption(int optionLevel, int optionName, System.Span optionValue) => throw null; + public void GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Byte[] optionValue) => throw null; + public object GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName) => throw null; + public System.Byte[] GetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionLength) => throw null; + public System.IntPtr Handle { get => throw null; } + public int IOControl(int ioControlCode, System.Byte[] optionInValue, System.Byte[] optionOutValue) => throw null; + public int IOControl(System.Net.Sockets.IOControlCode ioControlCode, System.Byte[] optionInValue, System.Byte[] optionOutValue) => throw null; + public bool IsBound { get => throw null; } + public System.Net.Sockets.LingerOption LingerState { get => throw null; set => throw null; } + public void Listen(int backlog) => throw null; + public void Listen() => throw null; + public System.Net.EndPoint LocalEndPoint { get => throw null; } + public bool MulticastLoopback { get => throw null; set => throw null; } + public bool NoDelay { get => throw null; set => throw null; } + public static bool OSSupportsIPv4 { get => throw null; } + public static bool OSSupportsIPv6 { get => throw null; } + public static bool OSSupportsUnixDomainSockets { get => throw null; } + public bool Poll(int microSeconds, System.Net.Sockets.SelectMode mode) => throw null; + public System.Net.Sockets.ProtocolType ProtocolType { get => throw null; } + public int Receive(System.Span buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Receive(System.Span buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Receive(System.Span buffer) => throw null; + public int Receive(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Receive(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Receive(System.Collections.Generic.IList> buffers) => throw null; + public int Receive(System.Byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Receive(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Receive(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Receive(System.Byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Receive(System.Byte[] buffer) => throw null; + public bool ReceiveAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public int ReceiveBufferSize { get => throw null; set => throw null; } + public int ReceiveFrom(System.Byte[] buffer, ref System.Net.EndPoint remoteEP) => throw null; + public int ReceiveFrom(System.Byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) => throw null; + public int ReceiveFrom(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) => throw null; + public int ReceiveFrom(System.Byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP) => throw null; + public bool ReceiveFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public int ReceiveMessageFrom(System.Byte[] buffer, int offset, int size, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) => throw null; + public bool ReceiveMessageFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public int ReceiveTimeout { get => throw null; set => throw null; } + public System.Net.EndPoint RemoteEndPoint { get => throw null; } + public System.Net.Sockets.SafeSocketHandle SafeHandle { get => throw null; } + public static void Select(System.Collections.IList checkRead, System.Collections.IList checkWrite, System.Collections.IList checkError, int microSeconds) => throw null; + public int Send(System.ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Send(System.ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Send(System.ReadOnlySpan buffer) => throw null; + public int Send(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Send(System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Send(System.Collections.Generic.IList> buffers) => throw null; + public int Send(System.Byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Send(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) => throw null; + public int Send(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Send(System.Byte[] buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public int Send(System.Byte[] buffer) => throw null; + public bool SendAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public int SendBufferSize { get => throw null; set => throw null; } + public void SendFile(string fileName, System.Byte[] preBuffer, System.Byte[] postBuffer, System.Net.Sockets.TransmitFileOptions flags) => throw null; + public void SendFile(string fileName) => throw null; + public bool SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public int SendTimeout { get => throw null; set => throw null; } + public int SendTo(System.Byte[] buffer, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) => throw null; + public int SendTo(System.Byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) => throw null; + public int SendTo(System.Byte[] buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) => throw null; + public int SendTo(System.Byte[] buffer, System.Net.EndPoint remoteEP) => throw null; + public bool SendToAsync(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public void SetIPProtectionLevel(System.Net.Sockets.IPProtectionLevel level) => throw null; + public void SetRawSocketOption(int optionLevel, int optionName, System.ReadOnlySpan optionValue) => throw null; + public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, object optionValue) => throw null; + public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, int optionValue) => throw null; + public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, bool optionValue) => throw null; + public void SetSocketOption(System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Byte[] optionValue) => throw null; + public void Shutdown(System.Net.Sockets.SocketShutdown how) => throw null; + public Socket(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) => throw null; + public Socket(System.Net.Sockets.SocketInformation socketInformation) => throw null; + public Socket(System.Net.Sockets.SafeSocketHandle handle) => throw null; + public Socket(System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) => throw null; + public System.Net.Sockets.SocketType SocketType { get => throw null; } + public static bool SupportsIPv4 { get => throw null; } + public static bool SupportsIPv6 { get => throw null; } + public System.Int16 Ttl { get => throw null; set => throw null; } + public bool UseOnlyOverlappedIO { get => throw null; set => throw null; } + // ERR: Stub generator didn't handle member: ~Socket + } + + // Generated from `System.Net.Sockets.SocketAsyncEventArgs` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SocketAsyncEventArgs : System.EventArgs, System.IDisposable + { + public System.Net.Sockets.Socket AcceptSocket { get => throw null; set => throw null; } + public System.Byte[] Buffer { get => throw null; } + public System.Collections.Generic.IList> BufferList { get => throw null; set => throw null; } + public int BytesTransferred { get => throw null; } + public event System.EventHandler Completed; + public System.Exception ConnectByNameError { get => throw null; } + public System.Net.Sockets.Socket ConnectSocket { get => throw null; } + public int Count { get => throw null; } + public bool DisconnectReuseSocket { get => throw null; set => throw null; } + public void Dispose() => throw null; + public System.Net.Sockets.SocketAsyncOperation LastOperation { get => throw null; } + public System.Memory MemoryBuffer { get => throw null; } + public int Offset { get => throw null; } + protected virtual void OnCompleted(System.Net.Sockets.SocketAsyncEventArgs e) => throw null; + public System.Net.Sockets.IPPacketInformation ReceiveMessageFromPacketInfo { get => throw null; } + public System.Net.EndPoint RemoteEndPoint { get => throw null; set => throw null; } + public System.Net.Sockets.SendPacketsElement[] SendPacketsElements { get => throw null; set => throw null; } + public System.Net.Sockets.TransmitFileOptions SendPacketsFlags { get => throw null; set => throw null; } + public int SendPacketsSendSize { get => throw null; set => throw null; } + public void SetBuffer(int offset, int count) => throw null; + public void SetBuffer(System.Memory buffer) => throw null; + public void SetBuffer(System.Byte[] buffer, int offset, int count) => throw null; + public SocketAsyncEventArgs(bool unsafeSuppressExecutionContextFlow) => throw null; + public SocketAsyncEventArgs() => throw null; + public System.Net.Sockets.SocketError SocketError { get => throw null; set => throw null; } + public System.Net.Sockets.SocketFlags SocketFlags { get => throw null; set => throw null; } + public object UserToken { get => throw null; set => throw null; } + // ERR: Stub generator didn't handle member: ~SocketAsyncEventArgs + } + + // Generated from `System.Net.Sockets.SocketAsyncOperation` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketAsyncOperation + { + Accept, + Connect, + Disconnect, + None, + Receive, + ReceiveFrom, + ReceiveMessageFrom, + Send, + SendPackets, + SendTo, + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.SocketFlags` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SocketFlags + { + Broadcast, + ControlDataTruncated, + DontRoute, + Multicast, + None, + OutOfBand, + Partial, + Peek, + // Stub generator skipped constructor + Truncated, + } + + // Generated from `System.Net.Sockets.SocketInformation` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SocketInformation + { + public System.Net.Sockets.SocketInformationOptions Options { get => throw null; set => throw null; } + public System.Byte[] ProtocolInformation { get => throw null; set => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.SocketInformationOptions` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SocketInformationOptions + { + Connected, + Listening, + NonBlocking, + // Stub generator skipped constructor + UseOnlyOverlappedIO, + } + + // Generated from `System.Net.Sockets.SocketOptionLevel` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketOptionLevel + { + IP, + IPv6, + Socket, + // Stub generator skipped constructor + Tcp, + Udp, + } + + // Generated from `System.Net.Sockets.SocketOptionName` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketOptionName + { + AcceptConnection, + AddMembership, + AddSourceMembership, + BlockSource, + Broadcast, + BsdUrgent, + ChecksumCoverage, + Debug, + DontFragment, + DontLinger, + DontRoute, + DropMembership, + DropSourceMembership, + Error, + ExclusiveAddressUse, + Expedited, + HeaderIncluded, + HopLimit, + IPOptions, + IPProtectionLevel, + IPv6Only, + IpTimeToLive, + KeepAlive, + Linger, + MaxConnections, + MulticastInterface, + MulticastLoopback, + MulticastTimeToLive, + NoChecksum, + NoDelay, + OutOfBandInline, + PacketInformation, + ReceiveBuffer, + ReceiveLowWater, + ReceiveTimeout, + ReuseAddress, + ReuseUnicastPort, + SendBuffer, + SendLowWater, + SendTimeout, + // Stub generator skipped constructor + TcpKeepAliveInterval, + TcpKeepAliveRetryCount, + TcpKeepAliveTime, + Type, + TypeOfService, + UnblockSource, + UpdateAcceptContext, + UpdateConnectContext, + UseLoopback, + } + + // Generated from `System.Net.Sockets.SocketReceiveFromResult` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SocketReceiveFromResult + { + public int ReceivedBytes; + public System.Net.EndPoint RemoteEndPoint; + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.SocketReceiveMessageFromResult` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SocketReceiveMessageFromResult + { + public System.Net.Sockets.IPPacketInformation PacketInformation; + public int ReceivedBytes; + public System.Net.EndPoint RemoteEndPoint; + public System.Net.Sockets.SocketFlags SocketFlags; + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.SocketShutdown` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketShutdown + { + Both, + Receive, + Send, + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.SocketTaskExtensions` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SocketTaskExtensions + { + public static System.Threading.Tasks.Task AcceptAsync(this System.Net.Sockets.Socket socket, System.Net.Sockets.Socket acceptSocket) => throw null; + public static System.Threading.Tasks.Task AcceptAsync(this System.Net.Sockets.Socket socket) => throw null; + public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.ValueTask ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port) => throw null; + public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress[] addresses, int port) => throw null; + public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.IPAddress address, int port) => throw null; + public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, System.Net.EndPoint remoteEP) => throw null; + public static System.Threading.Tasks.ValueTask ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public static System.Threading.Tasks.Task ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) => throw null; + public static System.Threading.Tasks.Task ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) => throw null; + public static System.Threading.Tasks.ValueTask SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) => throw null; + public static System.Threading.Tasks.Task SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) => throw null; + } + + // Generated from `System.Net.Sockets.SocketType` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SocketType + { + Dgram, + Raw, + Rdm, + Seqpacket, + // Stub generator skipped constructor + Stream, + Unknown, + } + + // Generated from `System.Net.Sockets.TcpClient` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TcpClient : System.IDisposable + { + protected bool Active { get => throw null; set => throw null; } + public int Available { get => throw null; } + public System.IAsyncResult BeginConnect(string host, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginConnect(System.Net.IPAddress[] addresses, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginConnect(System.Net.IPAddress address, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.Net.Sockets.Socket Client { get => throw null; set => throw null; } + public void Close() => throw null; + public void Connect(string hostname, int port) => throw null; + public void Connect(System.Net.IPEndPoint remoteEP) => throw null; + public void Connect(System.Net.IPAddress[] ipAddresses, int port) => throw null; + public void Connect(System.Net.IPAddress address, int port) => throw null; + public System.Threading.Tasks.ValueTask ConnectAsync(string host, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress[] addresses, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.ValueTask ConnectAsync(System.Net.IPAddress address, int port, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ConnectAsync(string host, int port) => throw null; + public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress[] addresses, int port) => throw null; + public System.Threading.Tasks.Task ConnectAsync(System.Net.IPAddress address, int port) => throw null; + public bool Connected { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public void EndConnect(System.IAsyncResult asyncResult) => throw null; + public bool ExclusiveAddressUse { get => throw null; set => throw null; } + public System.Net.Sockets.NetworkStream GetStream() => throw null; + public System.Net.Sockets.LingerOption LingerState { get => throw null; set => throw null; } + public bool NoDelay { get => throw null; set => throw null; } + public int ReceiveBufferSize { get => throw null; set => throw null; } + public int ReceiveTimeout { get => throw null; set => throw null; } + public int SendBufferSize { get => throw null; set => throw null; } + public int SendTimeout { get => throw null; set => throw null; } + public TcpClient(string hostname, int port) => throw null; + public TcpClient(System.Net.Sockets.AddressFamily family) => throw null; + public TcpClient(System.Net.IPEndPoint localEP) => throw null; + public TcpClient() => throw null; + // ERR: Stub generator didn't handle member: ~TcpClient + } + + // Generated from `System.Net.Sockets.TcpListener` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TcpListener + { + public System.Net.Sockets.Socket AcceptSocket() => throw null; + public System.Threading.Tasks.Task AcceptSocketAsync() => throw null; + public System.Net.Sockets.TcpClient AcceptTcpClient() => throw null; + public System.Threading.Tasks.Task AcceptTcpClientAsync() => throw null; + protected bool Active { get => throw null; } + public void AllowNatTraversal(bool allowed) => throw null; + public System.IAsyncResult BeginAcceptSocket(System.AsyncCallback callback, object state) => throw null; + public System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback callback, object state) => throw null; + public static System.Net.Sockets.TcpListener Create(int port) => throw null; + public System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult asyncResult) => throw null; + public System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult asyncResult) => throw null; + public bool ExclusiveAddressUse { get => throw null; set => throw null; } + public System.Net.EndPoint LocalEndpoint { get => throw null; } + public bool Pending() => throw null; + public System.Net.Sockets.Socket Server { get => throw null; } + public void Start(int backlog) => throw null; + public void Start() => throw null; + public void Stop() => throw null; + public TcpListener(int port) => throw null; + public TcpListener(System.Net.IPEndPoint localEP) => throw null; + public TcpListener(System.Net.IPAddress localaddr, int port) => throw null; + } + + // Generated from `System.Net.Sockets.TransmitFileOptions` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TransmitFileOptions + { + Disconnect, + ReuseSocket, + // Stub generator skipped constructor + UseDefaultWorkerThread, + UseKernelApc, + UseSystemThread, + WriteBehind, + } + + // Generated from `System.Net.Sockets.UdpClient` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UdpClient : System.IDisposable + { + protected bool Active { get => throw null; set => throw null; } + public void AllowNatTraversal(bool allowed) => throw null; + public int Available { get => throw null; } + public System.IAsyncResult BeginReceive(System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Byte[] datagram, int bytes, string hostname, int port, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Byte[] datagram, int bytes, System.Net.IPEndPoint endPoint, System.AsyncCallback requestCallback, object state) => throw null; + public System.IAsyncResult BeginSend(System.Byte[] datagram, int bytes, System.AsyncCallback requestCallback, object state) => throw null; + public System.Net.Sockets.Socket Client { get => throw null; set => throw null; } + public void Close() => throw null; + public void Connect(string hostname, int port) => throw null; + public void Connect(System.Net.IPEndPoint endPoint) => throw null; + public void Connect(System.Net.IPAddress addr, int port) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool DontFragment { get => throw null; set => throw null; } + public void DropMulticastGroup(System.Net.IPAddress multicastAddr, int ifindex) => throw null; + public void DropMulticastGroup(System.Net.IPAddress multicastAddr) => throw null; + public bool EnableBroadcast { get => throw null; set => throw null; } + public System.Byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint remoteEP) => throw null; + public int EndSend(System.IAsyncResult asyncResult) => throw null; + public bool ExclusiveAddressUse { get => throw null; set => throw null; } + public void JoinMulticastGroup(int ifindex, System.Net.IPAddress multicastAddr) => throw null; + public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, int timeToLive) => throw null; + public void JoinMulticastGroup(System.Net.IPAddress multicastAddr, System.Net.IPAddress localAddress) => throw null; + public void JoinMulticastGroup(System.Net.IPAddress multicastAddr) => throw null; + public bool MulticastLoopback { get => throw null; set => throw null; } + public System.Byte[] Receive(ref System.Net.IPEndPoint remoteEP) => throw null; + public System.Threading.Tasks.Task ReceiveAsync() => throw null; + public int Send(System.Byte[] dgram, int bytes, string hostname, int port) => throw null; + public int Send(System.Byte[] dgram, int bytes, System.Net.IPEndPoint endPoint) => throw null; + public int Send(System.Byte[] dgram, int bytes) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Byte[] datagram, int bytes, string hostname, int port) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Byte[] datagram, int bytes, System.Net.IPEndPoint endPoint) => throw null; + public System.Threading.Tasks.Task SendAsync(System.Byte[] datagram, int bytes) => throw null; + public System.Int16 Ttl { get => throw null; set => throw null; } + public UdpClient(string hostname, int port) => throw null; + public UdpClient(int port, System.Net.Sockets.AddressFamily family) => throw null; + public UdpClient(int port) => throw null; + public UdpClient(System.Net.Sockets.AddressFamily family) => throw null; + public UdpClient(System.Net.IPEndPoint localEP) => throw null; + public UdpClient() => throw null; + } + + // Generated from `System.Net.Sockets.UdpReceiveResult` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UdpReceiveResult : System.IEquatable + { + public static bool operator !=(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) => throw null; + public static bool operator ==(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) => throw null; + public System.Byte[] Buffer { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Net.Sockets.UdpReceiveResult other) => throw null; + public override int GetHashCode() => throw null; + public System.Net.IPEndPoint RemoteEndPoint { get => throw null; } + public UdpReceiveResult(System.Byte[] buffer, System.Net.IPEndPoint remoteEndPoint) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Net.Sockets.UnixDomainSocketEndPoint` in `System.Net.Sockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnixDomainSocketEndPoint : System.Net.EndPoint + { + public UnixDomainSocketEndPoint(string path) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs new file mode 100644 index 000000000000..eebad465a40b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs @@ -0,0 +1,247 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.DownloadDataCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DownloadDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + internal DownloadDataCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + public System.Byte[] Result { get => throw null; } + } + + // Generated from `System.Net.DownloadDataCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void DownloadDataCompletedEventHandler(object sender, System.Net.DownloadDataCompletedEventArgs e); + + // Generated from `System.Net.DownloadProgressChangedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DownloadProgressChangedEventArgs : System.ComponentModel.ProgressChangedEventArgs + { + public System.Int64 BytesReceived { get => throw null; } + internal DownloadProgressChangedEventArgs() : base(default(int), default(object)) => throw null; + public System.Int64 TotalBytesToReceive { get => throw null; } + } + + // Generated from `System.Net.DownloadProgressChangedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void DownloadProgressChangedEventHandler(object sender, System.Net.DownloadProgressChangedEventArgs e); + + // Generated from `System.Net.DownloadStringCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DownloadStringCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + internal DownloadStringCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + public string Result { get => throw null; } + } + + // Generated from `System.Net.DownloadStringCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void DownloadStringCompletedEventHandler(object sender, System.Net.DownloadStringCompletedEventArgs e); + + // Generated from `System.Net.OpenReadCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OpenReadCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + internal OpenReadCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + public System.IO.Stream Result { get => throw null; } + } + + // Generated from `System.Net.OpenReadCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void OpenReadCompletedEventHandler(object sender, System.Net.OpenReadCompletedEventArgs e); + + // Generated from `System.Net.OpenWriteCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class OpenWriteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + internal OpenWriteCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + public System.IO.Stream Result { get => throw null; } + } + + // Generated from `System.Net.OpenWriteCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void OpenWriteCompletedEventHandler(object sender, System.Net.OpenWriteCompletedEventArgs e); + + // Generated from `System.Net.UploadDataCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UploadDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + public System.Byte[] Result { get => throw null; } + internal UploadDataCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + } + + // Generated from `System.Net.UploadDataCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void UploadDataCompletedEventHandler(object sender, System.Net.UploadDataCompletedEventArgs e); + + // Generated from `System.Net.UploadFileCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UploadFileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + public System.Byte[] Result { get => throw null; } + internal UploadFileCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + } + + // Generated from `System.Net.UploadFileCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void UploadFileCompletedEventHandler(object sender, System.Net.UploadFileCompletedEventArgs e); + + // Generated from `System.Net.UploadProgressChangedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UploadProgressChangedEventArgs : System.ComponentModel.ProgressChangedEventArgs + { + public System.Int64 BytesReceived { get => throw null; } + public System.Int64 BytesSent { get => throw null; } + public System.Int64 TotalBytesToReceive { get => throw null; } + public System.Int64 TotalBytesToSend { get => throw null; } + internal UploadProgressChangedEventArgs() : base(default(int), default(object)) => throw null; + } + + // Generated from `System.Net.UploadProgressChangedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void UploadProgressChangedEventHandler(object sender, System.Net.UploadProgressChangedEventArgs e); + + // Generated from `System.Net.UploadStringCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UploadStringCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + public string Result { get => throw null; } + internal UploadStringCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + } + + // Generated from `System.Net.UploadStringCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void UploadStringCompletedEventHandler(object sender, System.Net.UploadStringCompletedEventArgs e); + + // Generated from `System.Net.UploadValuesCompletedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UploadValuesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + public System.Byte[] Result { get => throw null; } + internal UploadValuesCompletedEventArgs() : base(default(System.Exception), default(bool), default(object)) => throw null; + } + + // Generated from `System.Net.UploadValuesCompletedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void UploadValuesCompletedEventHandler(object sender, System.Net.UploadValuesCompletedEventArgs e); + + // Generated from `System.Net.WebClient` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebClient : System.ComponentModel.Component + { + public bool AllowReadStreamBuffering { get => throw null; set => throw null; } + public bool AllowWriteStreamBuffering { get => throw null; set => throw null; } + public string BaseAddress { get => throw null; set => throw null; } + public System.Net.Cache.RequestCachePolicy CachePolicy { get => throw null; set => throw null; } + public void CancelAsync() => throw null; + public System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public System.Byte[] DownloadData(string address) => throw null; + public System.Byte[] DownloadData(System.Uri address) => throw null; + public void DownloadDataAsync(System.Uri address, object userToken) => throw null; + public void DownloadDataAsync(System.Uri address) => throw null; + public event System.Net.DownloadDataCompletedEventHandler DownloadDataCompleted; + public System.Threading.Tasks.Task DownloadDataTaskAsync(string address) => throw null; + public System.Threading.Tasks.Task DownloadDataTaskAsync(System.Uri address) => throw null; + public void DownloadFile(string address, string fileName) => throw null; + public void DownloadFile(System.Uri address, string fileName) => throw null; + public void DownloadFileAsync(System.Uri address, string fileName, object userToken) => throw null; + public void DownloadFileAsync(System.Uri address, string fileName) => throw null; + public event System.ComponentModel.AsyncCompletedEventHandler DownloadFileCompleted; + public System.Threading.Tasks.Task DownloadFileTaskAsync(string address, string fileName) => throw null; + public System.Threading.Tasks.Task DownloadFileTaskAsync(System.Uri address, string fileName) => throw null; + public event System.Net.DownloadProgressChangedEventHandler DownloadProgressChanged; + public string DownloadString(string address) => throw null; + public string DownloadString(System.Uri address) => throw null; + public void DownloadStringAsync(System.Uri address, object userToken) => throw null; + public void DownloadStringAsync(System.Uri address) => throw null; + public event System.Net.DownloadStringCompletedEventHandler DownloadStringCompleted; + public System.Threading.Tasks.Task DownloadStringTaskAsync(string address) => throw null; + public System.Threading.Tasks.Task DownloadStringTaskAsync(System.Uri address) => throw null; + public System.Text.Encoding Encoding { get => throw null; set => throw null; } + protected virtual System.Net.WebRequest GetWebRequest(System.Uri address) => throw null; + protected virtual System.Net.WebResponse GetWebResponse(System.Net.WebRequest request, System.IAsyncResult result) => throw null; + protected virtual System.Net.WebResponse GetWebResponse(System.Net.WebRequest request) => throw null; + public System.Net.WebHeaderCollection Headers { get => throw null; set => throw null; } + public bool IsBusy { get => throw null; } + protected virtual void OnDownloadDataCompleted(System.Net.DownloadDataCompletedEventArgs e) => throw null; + protected virtual void OnDownloadFileCompleted(System.ComponentModel.AsyncCompletedEventArgs e) => throw null; + protected virtual void OnDownloadProgressChanged(System.Net.DownloadProgressChangedEventArgs e) => throw null; + protected virtual void OnDownloadStringCompleted(System.Net.DownloadStringCompletedEventArgs e) => throw null; + protected virtual void OnOpenReadCompleted(System.Net.OpenReadCompletedEventArgs e) => throw null; + protected virtual void OnOpenWriteCompleted(System.Net.OpenWriteCompletedEventArgs e) => throw null; + protected virtual void OnUploadDataCompleted(System.Net.UploadDataCompletedEventArgs e) => throw null; + protected virtual void OnUploadFileCompleted(System.Net.UploadFileCompletedEventArgs e) => throw null; + protected virtual void OnUploadProgressChanged(System.Net.UploadProgressChangedEventArgs e) => throw null; + protected virtual void OnUploadStringCompleted(System.Net.UploadStringCompletedEventArgs e) => throw null; + protected virtual void OnUploadValuesCompleted(System.Net.UploadValuesCompletedEventArgs e) => throw null; + protected virtual void OnWriteStreamClosed(System.Net.WriteStreamClosedEventArgs e) => throw null; + public System.IO.Stream OpenRead(string address) => throw null; + public System.IO.Stream OpenRead(System.Uri address) => throw null; + public void OpenReadAsync(System.Uri address, object userToken) => throw null; + public void OpenReadAsync(System.Uri address) => throw null; + public event System.Net.OpenReadCompletedEventHandler OpenReadCompleted; + public System.Threading.Tasks.Task OpenReadTaskAsync(string address) => throw null; + public System.Threading.Tasks.Task OpenReadTaskAsync(System.Uri address) => throw null; + public System.IO.Stream OpenWrite(string address, string method) => throw null; + public System.IO.Stream OpenWrite(string address) => throw null; + public System.IO.Stream OpenWrite(System.Uri address, string method) => throw null; + public System.IO.Stream OpenWrite(System.Uri address) => throw null; + public void OpenWriteAsync(System.Uri address, string method, object userToken) => throw null; + public void OpenWriteAsync(System.Uri address, string method) => throw null; + public void OpenWriteAsync(System.Uri address) => throw null; + public event System.Net.OpenWriteCompletedEventHandler OpenWriteCompleted; + public System.Threading.Tasks.Task OpenWriteTaskAsync(string address, string method) => throw null; + public System.Threading.Tasks.Task OpenWriteTaskAsync(string address) => throw null; + public System.Threading.Tasks.Task OpenWriteTaskAsync(System.Uri address, string method) => throw null; + public System.Threading.Tasks.Task OpenWriteTaskAsync(System.Uri address) => throw null; + public System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public System.Collections.Specialized.NameValueCollection QueryString { get => throw null; set => throw null; } + public System.Net.WebHeaderCollection ResponseHeaders { get => throw null; } + public System.Byte[] UploadData(string address, string method, System.Byte[] data) => throw null; + public System.Byte[] UploadData(string address, System.Byte[] data) => throw null; + public System.Byte[] UploadData(System.Uri address, string method, System.Byte[] data) => throw null; + public System.Byte[] UploadData(System.Uri address, System.Byte[] data) => throw null; + public void UploadDataAsync(System.Uri address, string method, System.Byte[] data, object userToken) => throw null; + public void UploadDataAsync(System.Uri address, string method, System.Byte[] data) => throw null; + public void UploadDataAsync(System.Uri address, System.Byte[] data) => throw null; + public event System.Net.UploadDataCompletedEventHandler UploadDataCompleted; + public System.Threading.Tasks.Task UploadDataTaskAsync(string address, string method, System.Byte[] data) => throw null; + public System.Threading.Tasks.Task UploadDataTaskAsync(string address, System.Byte[] data) => throw null; + public System.Threading.Tasks.Task UploadDataTaskAsync(System.Uri address, string method, System.Byte[] data) => throw null; + public System.Threading.Tasks.Task UploadDataTaskAsync(System.Uri address, System.Byte[] data) => throw null; + public System.Byte[] UploadFile(string address, string method, string fileName) => throw null; + public System.Byte[] UploadFile(string address, string fileName) => throw null; + public System.Byte[] UploadFile(System.Uri address, string method, string fileName) => throw null; + public System.Byte[] UploadFile(System.Uri address, string fileName) => throw null; + public void UploadFileAsync(System.Uri address, string method, string fileName, object userToken) => throw null; + public void UploadFileAsync(System.Uri address, string method, string fileName) => throw null; + public void UploadFileAsync(System.Uri address, string fileName) => throw null; + public event System.Net.UploadFileCompletedEventHandler UploadFileCompleted; + public System.Threading.Tasks.Task UploadFileTaskAsync(string address, string method, string fileName) => throw null; + public System.Threading.Tasks.Task UploadFileTaskAsync(string address, string fileName) => throw null; + public System.Threading.Tasks.Task UploadFileTaskAsync(System.Uri address, string method, string fileName) => throw null; + public System.Threading.Tasks.Task UploadFileTaskAsync(System.Uri address, string fileName) => throw null; + public event System.Net.UploadProgressChangedEventHandler UploadProgressChanged; + public string UploadString(string address, string method, string data) => throw null; + public string UploadString(string address, string data) => throw null; + public string UploadString(System.Uri address, string method, string data) => throw null; + public string UploadString(System.Uri address, string data) => throw null; + public void UploadStringAsync(System.Uri address, string method, string data, object userToken) => throw null; + public void UploadStringAsync(System.Uri address, string method, string data) => throw null; + public void UploadStringAsync(System.Uri address, string data) => throw null; + public event System.Net.UploadStringCompletedEventHandler UploadStringCompleted; + public System.Threading.Tasks.Task UploadStringTaskAsync(string address, string method, string data) => throw null; + public System.Threading.Tasks.Task UploadStringTaskAsync(string address, string data) => throw null; + public System.Threading.Tasks.Task UploadStringTaskAsync(System.Uri address, string method, string data) => throw null; + public System.Threading.Tasks.Task UploadStringTaskAsync(System.Uri address, string data) => throw null; + public System.Byte[] UploadValues(string address, string method, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Byte[] UploadValues(string address, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Byte[] UploadValues(System.Uri address, string method, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Byte[] UploadValues(System.Uri address, System.Collections.Specialized.NameValueCollection data) => throw null; + public void UploadValuesAsync(System.Uri address, string method, System.Collections.Specialized.NameValueCollection data, object userToken) => throw null; + public void UploadValuesAsync(System.Uri address, string method, System.Collections.Specialized.NameValueCollection data) => throw null; + public void UploadValuesAsync(System.Uri address, System.Collections.Specialized.NameValueCollection data) => throw null; + public event System.Net.UploadValuesCompletedEventHandler UploadValuesCompleted; + public System.Threading.Tasks.Task UploadValuesTaskAsync(string address, string method, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Threading.Tasks.Task UploadValuesTaskAsync(string address, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Threading.Tasks.Task UploadValuesTaskAsync(System.Uri address, string method, System.Collections.Specialized.NameValueCollection data) => throw null; + public System.Threading.Tasks.Task UploadValuesTaskAsync(System.Uri address, System.Collections.Specialized.NameValueCollection data) => throw null; + public bool UseDefaultCredentials { get => throw null; set => throw null; } + public WebClient() => throw null; + public event System.Net.WriteStreamClosedEventHandler WriteStreamClosed; + } + + // Generated from `System.Net.WriteStreamClosedEventArgs` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WriteStreamClosedEventArgs : System.EventArgs + { + public System.Exception Error { get => throw null; } + public WriteStreamClosedEventArgs() => throw null; + } + + // Generated from `System.Net.WriteStreamClosedEventHandler` in `System.Net.WebClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void WriteStreamClosedEventHandler(object sender, System.Net.WriteStreamClosedEventArgs e); + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs new file mode 100644 index 000000000000..8104839494f2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs @@ -0,0 +1,128 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.HttpRequestHeader` in `System.Net.WebHeaderCollection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpRequestHeader + { + Accept, + AcceptCharset, + AcceptEncoding, + AcceptLanguage, + Allow, + Authorization, + CacheControl, + Connection, + ContentEncoding, + ContentLanguage, + ContentLength, + ContentLocation, + ContentMd5, + ContentRange, + ContentType, + Cookie, + Date, + Expect, + Expires, + From, + Host, + // Stub generator skipped constructor + IfMatch, + IfModifiedSince, + IfNoneMatch, + IfRange, + IfUnmodifiedSince, + KeepAlive, + LastModified, + MaxForwards, + Pragma, + ProxyAuthorization, + Range, + Referer, + Te, + Trailer, + TransferEncoding, + Translate, + Upgrade, + UserAgent, + Via, + Warning, + } + + // Generated from `System.Net.HttpResponseHeader` in `System.Net.WebHeaderCollection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HttpResponseHeader + { + AcceptRanges, + Age, + Allow, + CacheControl, + Connection, + ContentEncoding, + ContentLanguage, + ContentLength, + ContentLocation, + ContentMd5, + ContentRange, + ContentType, + Date, + ETag, + Expires, + // Stub generator skipped constructor + KeepAlive, + LastModified, + Location, + Pragma, + ProxyAuthenticate, + RetryAfter, + Server, + SetCookie, + Trailer, + TransferEncoding, + Upgrade, + Vary, + Via, + Warning, + WwwAuthenticate, + } + + // Generated from `System.Net.WebHeaderCollection` in `System.Net.WebHeaderCollection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WebHeaderCollection : System.Collections.Specialized.NameValueCollection, System.Runtime.Serialization.ISerializable, System.Collections.IEnumerable + { + public void Add(string header) => throw null; + public void Add(System.Net.HttpResponseHeader header, string value) => throw null; + public void Add(System.Net.HttpRequestHeader header, string value) => throw null; + public override void Add(string name, string value) => throw null; + protected void AddWithoutValidate(string headerName, string headerValue) => throw null; + public override string[] AllKeys { get => throw null; } + public override void Clear() => throw null; + public override int Count { get => throw null; } + public override string Get(string name) => throw null; + public override string Get(int index) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override string GetKey(int index) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public override string[] GetValues(string header) => throw null; + public override string[] GetValues(int index) => throw null; + public static bool IsRestricted(string headerName, bool response) => throw null; + public static bool IsRestricted(string headerName) => throw null; + public string this[System.Net.HttpResponseHeader header] { get => throw null; set => throw null; } + public string this[System.Net.HttpRequestHeader header] { get => throw null; set => throw null; } + public override System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get => throw null; } + public override void OnDeserialization(object sender) => throw null; + public void Remove(System.Net.HttpResponseHeader header) => throw null; + public void Remove(System.Net.HttpRequestHeader header) => throw null; + public override void Remove(string name) => throw null; + public void Set(System.Net.HttpResponseHeader header, string value) => throw null; + public void Set(System.Net.HttpRequestHeader header, string value) => throw null; + public override void Set(string name, string value) => throw null; + public System.Byte[] ToByteArray() => throw null; + public override string ToString() => throw null; + public WebHeaderCollection() => throw null; + protected WebHeaderCollection(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs new file mode 100644 index 000000000000..5080a019a88a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs @@ -0,0 +1,43 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + // Generated from `System.Net.IWebProxyScript` in `System.Net.WebProxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IWebProxyScript + { + void Close(); + bool Load(System.Uri scriptLocation, string script, System.Type helperType); + string Run(string url, string host); + } + + // Generated from `System.Net.WebProxy` in `System.Net.WebProxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WebProxy : System.Runtime.Serialization.ISerializable, System.Net.IWebProxy + { + public System.Uri Address { get => throw null; set => throw null; } + public System.Collections.ArrayList BypassArrayList { get => throw null; } + public string[] BypassList { get => throw null; set => throw null; } + public bool BypassProxyOnLocal { get => throw null; set => throw null; } + public System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public static System.Net.WebProxy GetDefaultProxy() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public System.Uri GetProxy(System.Uri destination) => throw null; + public bool IsBypassed(System.Uri host) => throw null; + public bool UseDefaultCredentials { get => throw null; set => throw null; } + public WebProxy(string Host, int Port) => throw null; + public WebProxy(string Address, bool BypassOnLocal, string[] BypassList, System.Net.ICredentials Credentials) => throw null; + public WebProxy(string Address, bool BypassOnLocal, string[] BypassList) => throw null; + public WebProxy(string Address, bool BypassOnLocal) => throw null; + public WebProxy(string Address) => throw null; + public WebProxy(System.Uri Address, bool BypassOnLocal, string[] BypassList, System.Net.ICredentials Credentials) => throw null; + public WebProxy(System.Uri Address, bool BypassOnLocal, string[] BypassList) => throw null; + public WebProxy(System.Uri Address, bool BypassOnLocal) => throw null; + public WebProxy(System.Uri Address) => throw null; + public WebProxy() => throw null; + protected WebProxy(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs new file mode 100644 index 000000000000..788c0a04c4eb --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs @@ -0,0 +1,47 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace WebSockets + { + // Generated from `System.Net.WebSockets.ClientWebSocket` in `System.Net.WebSockets.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ClientWebSocket : System.Net.WebSockets.WebSocket + { + public override void Abort() => throw null; + public ClientWebSocket() => throw null; + public override System.Threading.Tasks.Task CloseAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Net.WebSockets.WebSocketCloseStatus? CloseStatus { get => throw null; } + public override string CloseStatusDescription { get => throw null; } + public System.Threading.Tasks.Task ConnectAsync(System.Uri uri, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Dispose() => throw null; + public System.Net.WebSockets.ClientWebSocketOptions Options { get => throw null; } + public override System.Threading.Tasks.ValueTask ReceiveAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ReceiveAsync(System.ArraySegment buffer, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.ValueTask SendAsync(System.ReadOnlyMemory buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task SendAsync(System.ArraySegment buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Net.WebSockets.WebSocketState State { get => throw null; } + public override string SubProtocol { get => throw null; } + } + + // Generated from `System.Net.WebSockets.ClientWebSocketOptions` in `System.Net.WebSockets.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ClientWebSocketOptions + { + public void AddSubProtocol(string subProtocol) => throw null; + public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get => throw null; set => throw null; } + public System.Net.CookieContainer Cookies { get => throw null; set => throw null; } + public System.Net.ICredentials Credentials { get => throw null; set => throw null; } + public System.TimeSpan KeepAliveInterval { get => throw null; set => throw null; } + public System.Net.IWebProxy Proxy { get => throw null; set => throw null; } + public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get => throw null; set => throw null; } + public void SetBuffer(int receiveBufferSize, int sendBufferSize, System.ArraySegment buffer) => throw null; + public void SetBuffer(int receiveBufferSize, int sendBufferSize) => throw null; + public void SetRequestHeader(string headerName, string headerValue) => throw null; + public bool UseDefaultCredentials { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs new file mode 100644 index 000000000000..5fad18d3a67a --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs @@ -0,0 +1,154 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Net + { + namespace WebSockets + { + // Generated from `System.Net.WebSockets.ValueWebSocketReceiveResult` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueWebSocketReceiveResult + { + public int Count { get => throw null; } + public bool EndOfMessage { get => throw null; } + public System.Net.WebSockets.WebSocketMessageType MessageType { get => throw null; } + public ValueWebSocketReceiveResult(int count, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Net.WebSockets.WebSocket` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class WebSocket : System.IDisposable + { + public abstract void Abort(); + public abstract System.Threading.Tasks.Task CloseAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken); + public abstract System.Net.WebSockets.WebSocketCloseStatus? CloseStatus { get; } + public abstract string CloseStatusDescription { get; } + public static System.ArraySegment CreateClientBuffer(int receiveBufferSize, int sendBufferSize) => throw null; + public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, System.TimeSpan keepAliveInterval, bool useZeroMaskingKey, System.ArraySegment internalBuffer) => throw null; + public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string subProtocol, System.TimeSpan keepAliveInterval) => throw null; + public static System.ArraySegment CreateServerBuffer(int receiveBufferSize) => throw null; + public static System.TimeSpan DefaultKeepAliveInterval { get => throw null; } + public abstract void Dispose(); + public static bool IsApplicationTargeting45() => throw null; + protected static bool IsStateTerminal(System.Net.WebSockets.WebSocketState state) => throw null; + public virtual System.Threading.Tasks.ValueTask ReceiveAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ReceiveAsync(System.ArraySegment buffer, System.Threading.CancellationToken cancellationToken); + public static void RegisterPrefixes() => throw null; + public virtual System.Threading.Tasks.ValueTask SendAsync(System.ReadOnlyMemory buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task SendAsync(System.ArraySegment buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken); + public abstract System.Net.WebSockets.WebSocketState State { get; } + public abstract string SubProtocol { get; } + protected static void ThrowOnInvalidState(System.Net.WebSockets.WebSocketState state, params System.Net.WebSockets.WebSocketState[] validStates) => throw null; + protected WebSocket() => throw null; + } + + // Generated from `System.Net.WebSockets.WebSocketCloseStatus` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WebSocketCloseStatus + { + Empty, + EndpointUnavailable, + InternalServerError, + InvalidMessageType, + InvalidPayloadData, + MandatoryExtension, + MessageTooBig, + NormalClosure, + PolicyViolation, + ProtocolError, + // Stub generator skipped constructor + } + + // Generated from `System.Net.WebSockets.WebSocketContext` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class WebSocketContext + { + public abstract System.Net.CookieCollection CookieCollection { get; } + public abstract System.Collections.Specialized.NameValueCollection Headers { get; } + public abstract bool IsAuthenticated { get; } + public abstract bool IsLocal { get; } + public abstract bool IsSecureConnection { get; } + public abstract string Origin { get; } + public abstract System.Uri RequestUri { get; } + public abstract string SecWebSocketKey { get; } + public abstract System.Collections.Generic.IEnumerable SecWebSocketProtocols { get; } + public abstract string SecWebSocketVersion { get; } + public abstract System.Security.Principal.IPrincipal User { get; } + public abstract System.Net.WebSockets.WebSocket WebSocket { get; } + protected WebSocketContext() => throw null; + } + + // Generated from `System.Net.WebSockets.WebSocketError` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WebSocketError + { + ConnectionClosedPrematurely, + Faulted, + HeaderError, + InvalidMessageType, + InvalidState, + NativeError, + NotAWebSocket, + Success, + UnsupportedProtocol, + UnsupportedVersion, + // Stub generator skipped constructor + } + + // Generated from `System.Net.WebSockets.WebSocketException` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WebSocketException : System.ComponentModel.Win32Exception + { + public override int ErrorCode { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Net.WebSockets.WebSocketError WebSocketErrorCode { get => throw null; } + public WebSocketException(string message, System.Exception innerException) => throw null; + public WebSocketException(string message) => throw null; + public WebSocketException(int nativeError, string message) => throw null; + public WebSocketException(int nativeError, System.Exception innerException) => throw null; + public WebSocketException(int nativeError) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, string message, System.Exception innerException) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, string message) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string message, System.Exception innerException) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, string message) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError, System.Exception innerException) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, int nativeError) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error, System.Exception innerException) => throw null; + public WebSocketException(System.Net.WebSockets.WebSocketError error) => throw null; + public WebSocketException() => throw null; + } + + // Generated from `System.Net.WebSockets.WebSocketMessageType` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WebSocketMessageType + { + Binary, + Close, + Text, + // Stub generator skipped constructor + } + + // Generated from `System.Net.WebSockets.WebSocketReceiveResult` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WebSocketReceiveResult + { + public System.Net.WebSockets.WebSocketCloseStatus? CloseStatus { get => throw null; } + public string CloseStatusDescription { get => throw null; } + public int Count { get => throw null; } + public bool EndOfMessage { get => throw null; } + public System.Net.WebSockets.WebSocketMessageType MessageType { get => throw null; } + public WebSocketReceiveResult(int count, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Net.WebSockets.WebSocketCloseStatus? closeStatus, string closeStatusDescription) => throw null; + public WebSocketReceiveResult(int count, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage) => throw null; + } + + // Generated from `System.Net.WebSockets.WebSocketState` in `System.Net.WebSockets, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WebSocketState + { + Aborted, + CloseReceived, + CloseSent, + Closed, + Connecting, + None, + Open, + // Stub generator skipped constructor + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs new file mode 100644 index 000000000000..a82104b8e6bc --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs @@ -0,0 +1,530 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Numerics + { + // Generated from `System.Numerics.Matrix3x2` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Matrix3x2 : System.IEquatable + { + public static bool operator !=(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 operator *(System.Numerics.Matrix3x2 value1, float value2) => throw null; + public static System.Numerics.Matrix3x2 operator *(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 operator +(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 operator -(System.Numerics.Matrix3x2 value) => throw null; + public static bool operator ==(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 Add(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 CreateRotation(float radians, System.Numerics.Vector2 centerPoint) => throw null; + public static System.Numerics.Matrix3x2 CreateRotation(float radians) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(float xScale, float yScale, System.Numerics.Vector2 centerPoint) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(float xScale, float yScale) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(float scale, System.Numerics.Vector2 centerPoint) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(float scale) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(System.Numerics.Vector2 scales, System.Numerics.Vector2 centerPoint) => throw null; + public static System.Numerics.Matrix3x2 CreateScale(System.Numerics.Vector2 scales) => throw null; + public static System.Numerics.Matrix3x2 CreateSkew(float radiansX, float radiansY, System.Numerics.Vector2 centerPoint) => throw null; + public static System.Numerics.Matrix3x2 CreateSkew(float radiansX, float radiansY) => throw null; + public static System.Numerics.Matrix3x2 CreateTranslation(float xPosition, float yPosition) => throw null; + public static System.Numerics.Matrix3x2 CreateTranslation(System.Numerics.Vector2 position) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Matrix3x2 other) => throw null; + public float GetDeterminant() => throw null; + public override int GetHashCode() => throw null; + public static System.Numerics.Matrix3x2 Identity { get => throw null; } + public static bool Invert(System.Numerics.Matrix3x2 matrix, out System.Numerics.Matrix3x2 result) => throw null; + public bool IsIdentity { get => throw null; } + public static System.Numerics.Matrix3x2 Lerp(System.Numerics.Matrix3x2 matrix1, System.Numerics.Matrix3x2 matrix2, float amount) => throw null; + public float M11; + public float M12; + public float M21; + public float M22; + public float M31; + public float M32; + public Matrix3x2(float m11, float m12, float m21, float m22, float m31, float m32) => throw null; + // Stub generator skipped constructor + public static System.Numerics.Matrix3x2 Multiply(System.Numerics.Matrix3x2 value1, float value2) => throw null; + public static System.Numerics.Matrix3x2 Multiply(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public static System.Numerics.Matrix3x2 Negate(System.Numerics.Matrix3x2 value) => throw null; + public static System.Numerics.Matrix3x2 Subtract(System.Numerics.Matrix3x2 value1, System.Numerics.Matrix3x2 value2) => throw null; + public override string ToString() => throw null; + public System.Numerics.Vector2 Translation { get => throw null; set => throw null; } + } + + // Generated from `System.Numerics.Matrix4x4` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Matrix4x4 : System.IEquatable + { + public static bool operator !=(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 operator *(System.Numerics.Matrix4x4 value1, float value2) => throw null; + public static System.Numerics.Matrix4x4 operator *(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 operator +(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 operator -(System.Numerics.Matrix4x4 value) => throw null; + public static bool operator ==(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 Add(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 CreateBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 cameraUpVector, System.Numerics.Vector3 cameraForwardVector) => throw null; + public static System.Numerics.Matrix4x4 CreateConstrainedBillboard(System.Numerics.Vector3 objectPosition, System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 rotateAxis, System.Numerics.Vector3 cameraForwardVector, System.Numerics.Vector3 objectForwardVector) => throw null; + public static System.Numerics.Matrix4x4 CreateFromAxisAngle(System.Numerics.Vector3 axis, float angle) => throw null; + public static System.Numerics.Matrix4x4 CreateFromQuaternion(System.Numerics.Quaternion quaternion) => throw null; + public static System.Numerics.Matrix4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll) => throw null; + public static System.Numerics.Matrix4x4 CreateLookAt(System.Numerics.Vector3 cameraPosition, System.Numerics.Vector3 cameraTarget, System.Numerics.Vector3 cameraUpVector) => throw null; + public static System.Numerics.Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane) => throw null; + public static System.Numerics.Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) => throw null; + public static System.Numerics.Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance) => throw null; + public static System.Numerics.Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance) => throw null; + public static System.Numerics.Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance) => throw null; + public static System.Numerics.Matrix4x4 CreateReflection(System.Numerics.Plane value) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationX(float radians, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationX(float radians) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationY(float radians, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationY(float radians) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationZ(float radians, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateRotationZ(float radians) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(float xScale, float yScale, float zScale, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(float xScale, float yScale, float zScale) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(float scale, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(float scale) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(System.Numerics.Vector3 scales, System.Numerics.Vector3 centerPoint) => throw null; + public static System.Numerics.Matrix4x4 CreateScale(System.Numerics.Vector3 scales) => throw null; + public static System.Numerics.Matrix4x4 CreateShadow(System.Numerics.Vector3 lightDirection, System.Numerics.Plane plane) => throw null; + public static System.Numerics.Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition) => throw null; + public static System.Numerics.Matrix4x4 CreateTranslation(System.Numerics.Vector3 position) => throw null; + public static System.Numerics.Matrix4x4 CreateWorld(System.Numerics.Vector3 position, System.Numerics.Vector3 forward, System.Numerics.Vector3 up) => throw null; + public static bool Decompose(System.Numerics.Matrix4x4 matrix, out System.Numerics.Vector3 scale, out System.Numerics.Quaternion rotation, out System.Numerics.Vector3 translation) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Matrix4x4 other) => throw null; + public float GetDeterminant() => throw null; + public override int GetHashCode() => throw null; + public static System.Numerics.Matrix4x4 Identity { get => throw null; } + public static bool Invert(System.Numerics.Matrix4x4 matrix, out System.Numerics.Matrix4x4 result) => throw null; + public bool IsIdentity { get => throw null; } + public static System.Numerics.Matrix4x4 Lerp(System.Numerics.Matrix4x4 matrix1, System.Numerics.Matrix4x4 matrix2, float amount) => throw null; + public float M11; + public float M12; + public float M13; + public float M14; + public float M21; + public float M22; + public float M23; + public float M24; + public float M31; + public float M32; + public float M33; + public float M34; + public float M41; + public float M42; + public float M43; + public float M44; + public Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) => throw null; + public Matrix4x4(System.Numerics.Matrix3x2 value) => throw null; + // Stub generator skipped constructor + public static System.Numerics.Matrix4x4 Multiply(System.Numerics.Matrix4x4 value1, float value2) => throw null; + public static System.Numerics.Matrix4x4 Multiply(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public static System.Numerics.Matrix4x4 Negate(System.Numerics.Matrix4x4 value) => throw null; + public static System.Numerics.Matrix4x4 Subtract(System.Numerics.Matrix4x4 value1, System.Numerics.Matrix4x4 value2) => throw null; + public override string ToString() => throw null; + public static System.Numerics.Matrix4x4 Transform(System.Numerics.Matrix4x4 value, System.Numerics.Quaternion rotation) => throw null; + public System.Numerics.Vector3 Translation { get => throw null; set => throw null; } + public static System.Numerics.Matrix4x4 Transpose(System.Numerics.Matrix4x4 matrix) => throw null; + } + + // Generated from `System.Numerics.Plane` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Plane : System.IEquatable + { + public static bool operator !=(System.Numerics.Plane value1, System.Numerics.Plane value2) => throw null; + public static bool operator ==(System.Numerics.Plane value1, System.Numerics.Plane value2) => throw null; + public static System.Numerics.Plane CreateFromVertices(System.Numerics.Vector3 point1, System.Numerics.Vector3 point2, System.Numerics.Vector3 point3) => throw null; + public float D; + public static float Dot(System.Numerics.Plane plane, System.Numerics.Vector4 value) => throw null; + public static float DotCoordinate(System.Numerics.Plane plane, System.Numerics.Vector3 value) => throw null; + public static float DotNormal(System.Numerics.Plane plane, System.Numerics.Vector3 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Plane other) => throw null; + public override int GetHashCode() => throw null; + public System.Numerics.Vector3 Normal; + public static System.Numerics.Plane Normalize(System.Numerics.Plane value) => throw null; + public Plane(float x, float y, float z, float d) => throw null; + public Plane(System.Numerics.Vector4 value) => throw null; + public Plane(System.Numerics.Vector3 normal, float d) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Plane Transform(System.Numerics.Plane plane, System.Numerics.Matrix4x4 matrix) => throw null; + } + + // Generated from `System.Numerics.Quaternion` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Quaternion : System.IEquatable + { + public static bool operator !=(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion operator *(System.Numerics.Quaternion value1, float value2) => throw null; + public static System.Numerics.Quaternion operator *(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion operator +(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion operator -(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion operator -(System.Numerics.Quaternion value) => throw null; + public static System.Numerics.Quaternion operator /(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static bool operator ==(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion Add(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion Concatenate(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion Conjugate(System.Numerics.Quaternion value) => throw null; + public static System.Numerics.Quaternion CreateFromAxisAngle(System.Numerics.Vector3 axis, float angle) => throw null; + public static System.Numerics.Quaternion CreateFromRotationMatrix(System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll) => throw null; + public static System.Numerics.Quaternion Divide(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static float Dot(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Quaternion other) => throw null; + public override int GetHashCode() => throw null; + public static System.Numerics.Quaternion Identity { get => throw null; } + public static System.Numerics.Quaternion Inverse(System.Numerics.Quaternion value) => throw null; + public bool IsIdentity { get => throw null; } + public float Length() => throw null; + public float LengthSquared() => throw null; + public static System.Numerics.Quaternion Lerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) => throw null; + public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, float value2) => throw null; + public static System.Numerics.Quaternion Multiply(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public static System.Numerics.Quaternion Negate(System.Numerics.Quaternion value) => throw null; + public static System.Numerics.Quaternion Normalize(System.Numerics.Quaternion value) => throw null; + public Quaternion(float x, float y, float z, float w) => throw null; + public Quaternion(System.Numerics.Vector3 vectorPart, float scalarPart) => throw null; + // Stub generator skipped constructor + public static System.Numerics.Quaternion Slerp(System.Numerics.Quaternion quaternion1, System.Numerics.Quaternion quaternion2, float amount) => throw null; + public static System.Numerics.Quaternion Subtract(System.Numerics.Quaternion value1, System.Numerics.Quaternion value2) => throw null; + public override string ToString() => throw null; + public float W; + public float X; + public float Y; + public float Z; + } + + // Generated from `System.Numerics.Vector` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Vector + { + public static System.Numerics.Vector Abs(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector Add(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector AndNot(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector AsVectorByte(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorDouble(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorInt16(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorInt32(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorInt64(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorSByte(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorSingle(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorUInt16(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorUInt32(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector AsVectorUInt64(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector BitwiseAnd(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector BitwiseOr(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Ceiling(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector Ceiling(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConditionalSelect(System.Numerics.Vector condition, System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector ConditionalSelect(System.Numerics.Vector condition, System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector ConditionalSelect(System.Numerics.Vector condition, System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector ConvertToDouble(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToDouble(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToInt32(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToInt64(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToSingle(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToSingle(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToUInt32(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector ConvertToUInt64(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector Divide(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static T Dot(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Equals(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector Equals(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector Equals(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Equals(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector Equals(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool EqualsAll(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool EqualsAny(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Floor(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector Floor(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector GreaterThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThan(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector GreaterThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool GreaterThanAll(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool GreaterThanAny(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector GreaterThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector GreaterThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector GreaterThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool GreaterThanOrEqualAll(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool GreaterThanOrEqualAny(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool IsHardwareAccelerated { get => throw null; } + public static System.Numerics.Vector LessThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThan(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector LessThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThan(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool LessThanAll(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool LessThanAny(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector LessThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector LessThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector LessThanOrEqual(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool LessThanOrEqualAll(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static bool LessThanOrEqualAny(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Max(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Min(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Multiply(T left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Multiply(System.Numerics.Vector left, T right) where T : struct => throw null; + public static System.Numerics.Vector Multiply(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Narrow(System.Numerics.Vector source1, System.Numerics.Vector source2) => throw null; + public static System.Numerics.Vector Negate(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector OnesComplement(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector SquareRoot(System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector Subtract(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static void Widen(System.Numerics.Vector source, out System.Numerics.Vector dest1, out System.Numerics.Vector dest2) => throw null; + public static System.Numerics.Vector Xor(System.Numerics.Vector left, System.Numerics.Vector right) where T : struct => throw null; + } + + // Generated from `System.Numerics.Vector2` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Vector2 : System.IFormattable, System.IEquatable + { + public static bool operator !=(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 operator *(float left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 operator *(System.Numerics.Vector2 left, float right) => throw null; + public static System.Numerics.Vector2 operator *(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 operator +(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 operator -(System.Numerics.Vector2 value) => throw null; + public static System.Numerics.Vector2 operator -(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 operator /(System.Numerics.Vector2 value1, float value2) => throw null; + public static System.Numerics.Vector2 operator /(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static bool operator ==(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 Abs(System.Numerics.Vector2 value) => throw null; + public static System.Numerics.Vector2 Add(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 Clamp(System.Numerics.Vector2 value1, System.Numerics.Vector2 min, System.Numerics.Vector2 max) => throw null; + public void CopyTo(float[] array, int index) => throw null; + public void CopyTo(float[] array) => throw null; + public static float Distance(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) => throw null; + public static float DistanceSquared(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) => throw null; + public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, float divisor) => throw null; + public static System.Numerics.Vector2 Divide(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static float Dot(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Vector2 other) => throw null; + public override int GetHashCode() => throw null; + public float Length() => throw null; + public float LengthSquared() => throw null; + public static System.Numerics.Vector2 Lerp(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2, float amount) => throw null; + public static System.Numerics.Vector2 Max(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) => throw null; + public static System.Numerics.Vector2 Min(System.Numerics.Vector2 value1, System.Numerics.Vector2 value2) => throw null; + public static System.Numerics.Vector2 Multiply(float left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 Multiply(System.Numerics.Vector2 left, float right) => throw null; + public static System.Numerics.Vector2 Multiply(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public static System.Numerics.Vector2 Negate(System.Numerics.Vector2 value) => throw null; + public static System.Numerics.Vector2 Normalize(System.Numerics.Vector2 value) => throw null; + public static System.Numerics.Vector2 One { get => throw null; } + public static System.Numerics.Vector2 Reflect(System.Numerics.Vector2 vector, System.Numerics.Vector2 normal) => throw null; + public static System.Numerics.Vector2 SquareRoot(System.Numerics.Vector2 value) => throw null; + public static System.Numerics.Vector2 Subtract(System.Numerics.Vector2 left, System.Numerics.Vector2 right) => throw null; + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector2 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix3x2 matrix) => throw null; + public static System.Numerics.Vector2 TransformNormal(System.Numerics.Vector2 normal, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector2 TransformNormal(System.Numerics.Vector2 normal, System.Numerics.Matrix3x2 matrix) => throw null; + public static System.Numerics.Vector2 UnitX { get => throw null; } + public static System.Numerics.Vector2 UnitY { get => throw null; } + public Vector2(float x, float y) => throw null; + public Vector2(float value) => throw null; + // Stub generator skipped constructor + public float X; + public float Y; + public static System.Numerics.Vector2 Zero { get => throw null; } + } + + // Generated from `System.Numerics.Vector3` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Vector3 : System.IFormattable, System.IEquatable + { + public static bool operator !=(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 operator *(float left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 operator *(System.Numerics.Vector3 left, float right) => throw null; + public static System.Numerics.Vector3 operator *(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 operator +(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 operator -(System.Numerics.Vector3 value) => throw null; + public static System.Numerics.Vector3 operator -(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 operator /(System.Numerics.Vector3 value1, float value2) => throw null; + public static System.Numerics.Vector3 operator /(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static bool operator ==(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 Abs(System.Numerics.Vector3 value) => throw null; + public static System.Numerics.Vector3 Add(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 Clamp(System.Numerics.Vector3 value1, System.Numerics.Vector3 min, System.Numerics.Vector3 max) => throw null; + public void CopyTo(float[] array, int index) => throw null; + public void CopyTo(float[] array) => throw null; + public static System.Numerics.Vector3 Cross(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) => throw null; + public static float Distance(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) => throw null; + public static float DistanceSquared(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) => throw null; + public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, float divisor) => throw null; + public static System.Numerics.Vector3 Divide(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static float Dot(System.Numerics.Vector3 vector1, System.Numerics.Vector3 vector2) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Vector3 other) => throw null; + public override int GetHashCode() => throw null; + public float Length() => throw null; + public float LengthSquared() => throw null; + public static System.Numerics.Vector3 Lerp(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2, float amount) => throw null; + public static System.Numerics.Vector3 Max(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) => throw null; + public static System.Numerics.Vector3 Min(System.Numerics.Vector3 value1, System.Numerics.Vector3 value2) => throw null; + public static System.Numerics.Vector3 Multiply(float left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 Multiply(System.Numerics.Vector3 left, float right) => throw null; + public static System.Numerics.Vector3 Multiply(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public static System.Numerics.Vector3 Negate(System.Numerics.Vector3 value) => throw null; + public static System.Numerics.Vector3 Normalize(System.Numerics.Vector3 value) => throw null; + public static System.Numerics.Vector3 One { get => throw null; } + public static System.Numerics.Vector3 Reflect(System.Numerics.Vector3 vector, System.Numerics.Vector3 normal) => throw null; + public static System.Numerics.Vector3 SquareRoot(System.Numerics.Vector3 value) => throw null; + public static System.Numerics.Vector3 Subtract(System.Numerics.Vector3 left, System.Numerics.Vector3 right) => throw null; + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 value, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Vector3 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector3 TransformNormal(System.Numerics.Vector3 normal, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector3 UnitX { get => throw null; } + public static System.Numerics.Vector3 UnitY { get => throw null; } + public static System.Numerics.Vector3 UnitZ { get => throw null; } + public Vector3(float x, float y, float z) => throw null; + public Vector3(float value) => throw null; + public Vector3(System.Numerics.Vector2 value, float z) => throw null; + // Stub generator skipped constructor + public float X; + public float Y; + public float Z; + public static System.Numerics.Vector3 Zero { get => throw null; } + } + + // Generated from `System.Numerics.Vector4` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Vector4 : System.IFormattable, System.IEquatable + { + public static bool operator !=(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 operator *(float left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 operator *(System.Numerics.Vector4 left, float right) => throw null; + public static System.Numerics.Vector4 operator *(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 operator +(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 operator -(System.Numerics.Vector4 value) => throw null; + public static System.Numerics.Vector4 operator -(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 operator /(System.Numerics.Vector4 value1, float value2) => throw null; + public static System.Numerics.Vector4 operator /(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static bool operator ==(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 Abs(System.Numerics.Vector4 value) => throw null; + public static System.Numerics.Vector4 Add(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 Clamp(System.Numerics.Vector4 value1, System.Numerics.Vector4 min, System.Numerics.Vector4 max) => throw null; + public void CopyTo(float[] array, int index) => throw null; + public void CopyTo(float[] array) => throw null; + public static float Distance(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) => throw null; + public static float DistanceSquared(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) => throw null; + public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, float divisor) => throw null; + public static System.Numerics.Vector4 Divide(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static float Dot(System.Numerics.Vector4 vector1, System.Numerics.Vector4 vector2) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Vector4 other) => throw null; + public override int GetHashCode() => throw null; + public float Length() => throw null; + public float LengthSquared() => throw null; + public static System.Numerics.Vector4 Lerp(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2, float amount) => throw null; + public static System.Numerics.Vector4 Max(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) => throw null; + public static System.Numerics.Vector4 Min(System.Numerics.Vector4 value1, System.Numerics.Vector4 value2) => throw null; + public static System.Numerics.Vector4 Multiply(float left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 Multiply(System.Numerics.Vector4 left, float right) => throw null; + public static System.Numerics.Vector4 Multiply(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public static System.Numerics.Vector4 Negate(System.Numerics.Vector4 value) => throw null; + public static System.Numerics.Vector4 Normalize(System.Numerics.Vector4 vector) => throw null; + public static System.Numerics.Vector4 One { get => throw null; } + public static System.Numerics.Vector4 SquareRoot(System.Numerics.Vector4 value) => throw null; + public static System.Numerics.Vector4 Subtract(System.Numerics.Vector4 left, System.Numerics.Vector4 right) => throw null; + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector4 vector, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector4 value, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector3 value, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector3 position, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 value, System.Numerics.Quaternion rotation) => throw null; + public static System.Numerics.Vector4 Transform(System.Numerics.Vector2 position, System.Numerics.Matrix4x4 matrix) => throw null; + public static System.Numerics.Vector4 UnitW { get => throw null; } + public static System.Numerics.Vector4 UnitX { get => throw null; } + public static System.Numerics.Vector4 UnitY { get => throw null; } + public static System.Numerics.Vector4 UnitZ { get => throw null; } + public Vector4(float x, float y, float z, float w) => throw null; + public Vector4(float value) => throw null; + public Vector4(System.Numerics.Vector3 value, float w) => throw null; + public Vector4(System.Numerics.Vector2 value, float z, float w) => throw null; + // Stub generator skipped constructor + public float W; + public float X; + public float Y; + public float Z; + public static System.Numerics.Vector4 Zero { get => throw null; } + } + + // Generated from `System.Numerics.Vector<>` in `System.Numerics.Vectors, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Vector : System.IFormattable, System.IEquatable> where T : struct + { + public static bool operator !=(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator &(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator *(T factor, System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector operator *(System.Numerics.Vector value, T factor) => throw null; + public static System.Numerics.Vector operator *(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator +(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator -(System.Numerics.Vector value) => throw null; + public static System.Numerics.Vector operator -(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator /(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static bool operator ==(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public void CopyTo(T[] destination, int startIndex) => throw null; + public void CopyTo(T[] destination) => throw null; + public void CopyTo(System.Span destination) => throw null; + public void CopyTo(System.Span destination) => throw null; + public static int Count { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Vector other) => throw null; + public override int GetHashCode() => throw null; + public T this[int index] { get => throw null; } + public static System.Numerics.Vector One { get => throw null; } + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public bool TryCopyTo(System.Span destination) => throw null; + public bool TryCopyTo(System.Span destination) => throw null; + public Vector(T[] values, int index) => throw null; + public Vector(T[] values) => throw null; + public Vector(T value) => throw null; + public Vector(System.Span values) => throw null; + public Vector(System.ReadOnlySpan values) => throw null; + public Vector(System.ReadOnlySpan values) => throw null; + // Stub generator skipped constructor + public static System.Numerics.Vector Zero { get => throw null; } + public static System.Numerics.Vector operator ^(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + public static System.Numerics.Vector operator |(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; + public static System.Numerics.Vector operator ~(System.Numerics.Vector value) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs new file mode 100644 index 000000000000..01b254d1c807 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs @@ -0,0 +1,290 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Collections + { + namespace ObjectModel + { + // Generated from `System.Collections.ObjectModel.KeyedCollection<,>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class KeyedCollection : System.Collections.ObjectModel.Collection + { + protected void ChangeItemKey(TItem item, TKey newKey) => throw null; + protected override void ClearItems() => throw null; + public System.Collections.Generic.IEqualityComparer Comparer { get => throw null; } + public bool Contains(TKey key) => throw null; + protected System.Collections.Generic.IDictionary Dictionary { get => throw null; } + protected abstract TKey GetKeyForItem(TItem item); + protected override void InsertItem(int index, TItem item) => throw null; + public TItem this[TKey key] { get => throw null; } + protected KeyedCollection(System.Collections.Generic.IEqualityComparer comparer, int dictionaryCreationThreshold) => throw null; + protected KeyedCollection(System.Collections.Generic.IEqualityComparer comparer) => throw null; + protected KeyedCollection() => throw null; + public bool Remove(TKey key) => throw null; + protected override void RemoveItem(int index) => throw null; + protected override void SetItem(int index, TItem item) => throw null; + public bool TryGetValue(TKey key, out TItem item) => throw null; + } + + // Generated from `System.Collections.ObjectModel.ObservableCollection<>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObservableCollection : System.Collections.ObjectModel.Collection, System.ComponentModel.INotifyPropertyChanged, System.Collections.Specialized.INotifyCollectionChanged + { + protected System.IDisposable BlockReentrancy() => throw null; + protected void CheckReentrancy() => throw null; + protected override void ClearItems() => throw null; + public virtual event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged; + protected override void InsertItem(int index, T item) => throw null; + public void Move(int oldIndex, int newIndex) => throw null; + protected virtual void MoveItem(int oldIndex, int newIndex) => throw null; + public ObservableCollection(System.Collections.Generic.List list) => throw null; + public ObservableCollection(System.Collections.Generic.IEnumerable collection) => throw null; + public ObservableCollection() => throw null; + protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) => throw null; + protected virtual void OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs e) => throw null; + protected virtual event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + event System.ComponentModel.PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged { add => throw null; remove => throw null; } + protected override void RemoveItem(int index) => throw null; + protected override void SetItem(int index, T item) => throw null; + } + + // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyDictionary : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.IDictionary.Add(TKey key, TValue value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + void System.Collections.IDictionary.Clear() => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(TKey key) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + protected System.Collections.Generic.IDictionary Dictionary { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public TValue this[TKey key] { get => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + TValue System.Collections.Generic.IDictionary.this[TKey key] { get => throw null; set => throw null; } + // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TKey item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TKey item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TKey[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(TKey item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + public System.Collections.ObjectModel.ReadOnlyDictionary.KeyCollection Keys { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + public ReadOnlyDictionary(System.Collections.Generic.IDictionary dictionary) => throw null; + void System.Collections.IDictionary.Remove(object key) => throw null; + bool System.Collections.Generic.IDictionary.Remove(TKey key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public bool TryGetValue(TKey key, out TValue value) => throw null; + // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(TValue item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(TValue item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(TValue[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(TValue item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + + public System.Collections.ObjectModel.ReadOnlyDictionary.ValueCollection Values { get => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `System.Collections.ObjectModel.ReadOnlyObservableCollection<>` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyObservableCollection : System.Collections.ObjectModel.ReadOnlyCollection, System.ComponentModel.INotifyPropertyChanged, System.Collections.Specialized.INotifyCollectionChanged + { + protected virtual event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged; + event System.Collections.Specialized.NotifyCollectionChangedEventHandler System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged { add => throw null; remove => throw null; } + protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) => throw null; + protected virtual void OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs args) => throw null; + protected virtual event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + event System.ComponentModel.PropertyChangedEventHandler System.ComponentModel.INotifyPropertyChanged.PropertyChanged { add => throw null; remove => throw null; } + public ReadOnlyObservableCollection(System.Collections.ObjectModel.ObservableCollection list) : base(default(System.Collections.Generic.IList)) => throw null; + } + + } + namespace Specialized + { + // Generated from `System.Collections.Specialized.INotifyCollectionChanged` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INotifyCollectionChanged + { + event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged; + } + + // Generated from `System.Collections.Specialized.NotifyCollectionChangedAction` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NotifyCollectionChangedAction + { + Add, + Move, + // Stub generator skipped constructor + Remove, + Replace, + Reset, + } + + // Generated from `System.Collections.Specialized.NotifyCollectionChangedEventArgs` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotifyCollectionChangedEventArgs : System.EventArgs + { + public System.Collections.Specialized.NotifyCollectionChangedAction Action { get => throw null; } + public System.Collections.IList NewItems { get => throw null; } + public int NewStartingIndex { get => throw null; } + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, object newItem, object oldItem, int index) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, object newItem, object oldItem) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem, int index, int oldIndex) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem, int index) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList newItems, System.Collections.IList oldItems, int startingIndex) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList newItems, System.Collections.IList oldItems) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems, int startingIndex) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems, int index, int oldIndex) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems) => throw null; + public NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction action) => throw null; + public System.Collections.IList OldItems { get => throw null; } + public int OldStartingIndex { get => throw null; } + } + + // Generated from `System.Collections.Specialized.NotifyCollectionChangedEventHandler` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void NotifyCollectionChangedEventHandler(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e); + + } + } + namespace ComponentModel + { + // Generated from `System.ComponentModel.DataErrorsChangedEventArgs` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataErrorsChangedEventArgs : System.EventArgs + { + public DataErrorsChangedEventArgs(string propertyName) => throw null; + public virtual string PropertyName { get => throw null; } + } + + // Generated from `System.ComponentModel.INotifyDataErrorInfo` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INotifyDataErrorInfo + { + event System.EventHandler ErrorsChanged; + System.Collections.IEnumerable GetErrors(string propertyName); + bool HasErrors { get; } + } + + // Generated from `System.ComponentModel.INotifyPropertyChanged` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INotifyPropertyChanged + { + event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + } + + // Generated from `System.ComponentModel.INotifyPropertyChanging` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INotifyPropertyChanging + { + event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + } + + // Generated from `System.ComponentModel.PropertyChangedEventArgs` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyChangedEventArgs : System.EventArgs + { + public PropertyChangedEventArgs(string propertyName) => throw null; + public virtual string PropertyName { get => throw null; } + } + + // Generated from `System.ComponentModel.PropertyChangedEventHandler` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void PropertyChangedEventHandler(object sender, System.ComponentModel.PropertyChangedEventArgs e); + + // Generated from `System.ComponentModel.PropertyChangingEventArgs` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyChangingEventArgs : System.EventArgs + { + public PropertyChangingEventArgs(string propertyName) => throw null; + public virtual string PropertyName { get => throw null; } + } + + // Generated from `System.ComponentModel.PropertyChangingEventHandler` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void PropertyChangingEventHandler(object sender, System.ComponentModel.PropertyChangingEventArgs e); + + // Generated from `System.ComponentModel.TypeConverterAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeConverterAttribute : System.Attribute + { + public string ConverterTypeName { get => throw null; } + public static System.ComponentModel.TypeConverterAttribute Default; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public TypeConverterAttribute(string typeName) => throw null; + public TypeConverterAttribute(System.Type type) => throw null; + public TypeConverterAttribute() => throw null; + } + + // Generated from `System.ComponentModel.TypeDescriptionProviderAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeDescriptionProviderAttribute : System.Attribute + { + public TypeDescriptionProviderAttribute(string typeName) => throw null; + public TypeDescriptionProviderAttribute(System.Type type) => throw null; + public string TypeName { get => throw null; } + } + + } + namespace Reflection + { + // Generated from `System.Reflection.ICustomTypeProvider` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomTypeProvider + { + System.Type GetCustomType(); + } + + } + namespace Windows + { + namespace Input + { + // Generated from `System.Windows.Input.ICommand` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICommand + { + bool CanExecute(object parameter); + event System.EventHandler CanExecuteChanged; + void Execute(object parameter); + } + + } + namespace Markup + { + // Generated from `System.Windows.Markup.ValueSerializerAttribute` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValueSerializerAttribute : System.Attribute + { + public ValueSerializerAttribute(string valueSerializerTypeName) => throw null; + public ValueSerializerAttribute(System.Type valueSerializerType) => throw null; + public System.Type ValueSerializerType { get => throw null; } + public string ValueSerializerTypeName { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs new file mode 100644 index 000000000000..75d29691dc91 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs @@ -0,0 +1,16 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + // Generated from `System.Reflection.DispatchProxy` in `System.Reflection.DispatchProxy, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DispatchProxy + { + public static T Create() where TProxy : System.Reflection.DispatchProxy => throw null; + protected DispatchProxy() => throw null; + protected abstract object Invoke(System.Reflection.MethodInfo targetMethod, object[] args); + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs new file mode 100644 index 000000000000..8262754eb15d --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs @@ -0,0 +1,119 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + namespace Emit + { + // Generated from `System.Reflection.Emit.CustomAttributeBuilder` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CustomAttributeBuilder + { + public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues, System.Reflection.FieldInfo[] namedFields, object[] fieldValues) => throw null; + public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.PropertyInfo[] namedProperties, object[] propertyValues) => throw null; + public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object[] constructorArgs, System.Reflection.FieldInfo[] namedFields, object[] fieldValues) => throw null; + public CustomAttributeBuilder(System.Reflection.ConstructorInfo con, object[] constructorArgs) => throw null; + } + + // Generated from `System.Reflection.Emit.ILGenerator` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ILGenerator + { + public virtual void BeginCatchBlock(System.Type exceptionType) => throw null; + public virtual void BeginExceptFilterBlock() => throw null; + public virtual System.Reflection.Emit.Label BeginExceptionBlock() => throw null; + public virtual void BeginFaultBlock() => throw null; + public virtual void BeginFinallyBlock() => throw null; + public virtual void BeginScope() => throw null; + public virtual System.Reflection.Emit.LocalBuilder DeclareLocal(System.Type localType, bool pinned) => throw null; + public virtual System.Reflection.Emit.LocalBuilder DeclareLocal(System.Type localType) => throw null; + public virtual System.Reflection.Emit.Label DefineLabel() => throw null; + public void Emit(System.Reflection.Emit.OpCode opcode, System.SByte arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, string str) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, int arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, float arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, double arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Type cls) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.MethodInfo meth) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.FieldInfo field) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.Emit.SignatureHelper signature) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.Emit.LocalBuilder local) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.Emit.Label[] labels) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.Emit.Label label) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Reflection.ConstructorInfo con) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Int64 arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Int16 arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode, System.Byte arg) => throw null; + public virtual void Emit(System.Reflection.Emit.OpCode opcode) => throw null; + public virtual void EmitCall(System.Reflection.Emit.OpCode opcode, System.Reflection.MethodInfo methodInfo, System.Type[] optionalParameterTypes) => throw null; + public virtual void EmitCalli(System.Reflection.Emit.OpCode opcode, System.Runtime.InteropServices.CallingConvention unmanagedCallConv, System.Type returnType, System.Type[] parameterTypes) => throw null; + public virtual void EmitCalli(System.Reflection.Emit.OpCode opcode, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Type[] optionalParameterTypes) => throw null; + public virtual void EmitWriteLine(string value) => throw null; + public virtual void EmitWriteLine(System.Reflection.FieldInfo fld) => throw null; + public virtual void EmitWriteLine(System.Reflection.Emit.LocalBuilder localBuilder) => throw null; + public virtual void EndExceptionBlock() => throw null; + public virtual void EndScope() => throw null; + public virtual int ILOffset { get => throw null; } + public virtual void MarkLabel(System.Reflection.Emit.Label loc) => throw null; + public virtual void ThrowException(System.Type excType) => throw null; + public virtual void UsingNamespace(string usingNamespace) => throw null; + } + + // Generated from `System.Reflection.Emit.Label` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Label : System.IEquatable + { + public static bool operator !=(System.Reflection.Emit.Label a, System.Reflection.Emit.Label b) => throw null; + public static bool operator ==(System.Reflection.Emit.Label a, System.Reflection.Emit.Label b) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Emit.Label obj) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Emit.LocalBuilder` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LocalBuilder : System.Reflection.LocalVariableInfo + { + public override bool IsPinned { get => throw null; } + public override int LocalIndex { get => throw null; } + public override System.Type LocalType { get => throw null; } + } + + // Generated from `System.Reflection.Emit.ParameterBuilder` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParameterBuilder + { + public virtual int Attributes { get => throw null; } + public bool IsIn { get => throw null; } + public bool IsOptional { get => throw null; } + public bool IsOut { get => throw null; } + public virtual string Name { get => throw null; } + public virtual int Position { get => throw null; } + public virtual void SetConstant(object defaultValue) => throw null; + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + } + + // Generated from `System.Reflection.Emit.SignatureHelper` in `System.Reflection.Emit.ILGeneration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SignatureHelper + { + public void AddArgument(System.Type clsArgument) => throw null; + public void AddArgument(System.Type argument, bool pinned) => throw null; + public void AddArgument(System.Type argument, System.Type[] requiredCustomModifiers, System.Type[] optionalCustomModifiers) => throw null; + public void AddArguments(System.Type[] arguments, System.Type[][] requiredCustomModifiers, System.Type[][] optionalCustomModifiers) => throw null; + public void AddSentinel() => throw null; + public override bool Equals(object obj) => throw null; + public static System.Reflection.Emit.SignatureHelper GetFieldSigHelper(System.Reflection.Module mod) => throw null; + public override int GetHashCode() => throw null; + public static System.Reflection.Emit.SignatureHelper GetLocalVarSigHelper(System.Reflection.Module mod) => throw null; + public static System.Reflection.Emit.SignatureHelper GetLocalVarSigHelper() => throw null; + public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper(System.Reflection.Module mod, System.Type returnType, System.Type[] parameterTypes) => throw null; + public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper(System.Reflection.Module mod, System.Reflection.CallingConventions callingConvention, System.Type returnType) => throw null; + public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper(System.Reflection.CallingConventions callingConvention, System.Type returnType) => throw null; + public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper(System.Reflection.Module mod, System.Type returnType, System.Type[] requiredReturnTypeCustomModifiers, System.Type[] optionalReturnTypeCustomModifiers, System.Type[] parameterTypes, System.Type[][] requiredParameterTypeCustomModifiers, System.Type[][] optionalParameterTypeCustomModifiers) => throw null; + public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper(System.Reflection.Module mod, System.Type returnType, System.Type[] parameterTypes) => throw null; + public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper(System.Reflection.Module mod, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] requiredReturnTypeCustomModifiers, System.Type[] optionalReturnTypeCustomModifiers, System.Type[] parameterTypes, System.Type[][] requiredParameterTypeCustomModifiers, System.Type[][] optionalParameterTypeCustomModifiers) => throw null; + public System.Byte[] GetSignature() => throw null; + public override string ToString() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs new file mode 100644 index 000000000000..3002f8e913e7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs @@ -0,0 +1,72 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + namespace Emit + { + // Generated from `System.Reflection.Emit.DynamicILInfo` in `System.Reflection.Emit.Lightweight, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicILInfo + { + public System.Reflection.Emit.DynamicMethod DynamicMethod { get => throw null; } + public int GetTokenFor(string literal) => throw null; + public int GetTokenFor(System.RuntimeTypeHandle type) => throw null; + public int GetTokenFor(System.RuntimeMethodHandle method, System.RuntimeTypeHandle contextType) => throw null; + public int GetTokenFor(System.RuntimeMethodHandle method) => throw null; + public int GetTokenFor(System.RuntimeFieldHandle field, System.RuntimeTypeHandle contextType) => throw null; + public int GetTokenFor(System.RuntimeFieldHandle field) => throw null; + public int GetTokenFor(System.Reflection.Emit.DynamicMethod method) => throw null; + public int GetTokenFor(System.Byte[] signature) => throw null; + unsafe public void SetCode(System.Byte* code, int codeSize, int maxStackSize) => throw null; + public void SetCode(System.Byte[] code, int maxStackSize) => throw null; + unsafe public void SetExceptions(System.Byte* exceptions, int exceptionsSize) => throw null; + public void SetExceptions(System.Byte[] exceptions) => throw null; + unsafe public void SetLocalSignature(System.Byte* localSignature, int signatureSize) => throw null; + public void SetLocalSignature(System.Byte[] localSignature) => throw null; + } + + // Generated from `System.Reflection.Emit.DynamicMethod` in `System.Reflection.Emit.Lightweight, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicMethod : System.Reflection.MethodInfo + { + public override System.Reflection.MethodAttributes Attributes { get => throw null; } + public override System.Reflection.CallingConventions CallingConvention { get => throw null; } + public override System.Delegate CreateDelegate(System.Type delegateType, object target) => throw null; + public override System.Delegate CreateDelegate(System.Type delegateType) => throw null; + public override System.Type DeclaringType { get => throw null; } + public System.Reflection.Emit.ParameterBuilder DefineParameter(int position, System.Reflection.ParameterAttributes attributes, string parameterName) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes, bool restrictedSkipVisibility) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes, System.Type owner, bool skipVisibility) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes, System.Type owner) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes, System.Reflection.Module m, bool skipVisibility) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes, System.Reflection.Module m) => throw null; + public DynamicMethod(string name, System.Type returnType, System.Type[] parameterTypes) => throw null; + public DynamicMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Type owner, bool skipVisibility) => throw null; + public DynamicMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Reflection.Module m, bool skipVisibility) => throw null; + public override System.Reflection.MethodInfo GetBaseDefinition() => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public System.Reflection.Emit.DynamicILInfo GetDynamicILInfo() => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator(int streamSize) => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator() => throw null; + public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() => throw null; + public override System.Reflection.ParameterInfo[] GetParameters() => throw null; + public bool InitLocals { get => throw null; set => throw null; } + public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsSecurityCritical { get => throw null; } + public override bool IsSecuritySafeCritical { get => throw null; } + public override bool IsSecurityTransparent { get => throw null; } + public override System.RuntimeMethodHandle MethodHandle { get => throw null; } + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public override System.Reflection.ParameterInfo ReturnParameter { get => throw null; } + public override System.Type ReturnType { get => throw null; } + public override System.Reflection.ICustomAttributeProvider ReturnTypeCustomAttributes { get => throw null; } + public override string ToString() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs new file mode 100644 index 000000000000..4375122e3acc --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs @@ -0,0 +1,503 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + namespace Emit + { + // Generated from `System.Reflection.Emit.AssemblyBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyBuilder : System.Reflection.Assembly + { + public override string CodeBase { get => throw null; } + public static System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access, System.Collections.Generic.IEnumerable assemblyAttributes) => throw null; + public static System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access) => throw null; + public System.Reflection.Emit.ModuleBuilder DefineDynamicModule(string name) => throw null; + public override System.Reflection.MethodInfo EntryPoint { get => throw null; } + public override bool Equals(object obj) => throw null; + public override string FullName { get => throw null; } + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public System.Reflection.Emit.ModuleBuilder GetDynamicModule(string name) => throw null; + public override System.Type[] GetExportedTypes() => throw null; + public override System.IO.FileStream GetFile(string name) => throw null; + public override System.IO.FileStream[] GetFiles(bool getResourceModules) => throw null; + public override int GetHashCode() => throw null; + public override System.Reflection.Module[] GetLoadedModules(bool getResourceModules) => throw null; + public override System.Reflection.ManifestResourceInfo GetManifestResourceInfo(string resourceName) => throw null; + public override string[] GetManifestResourceNames() => throw null; + public override System.IO.Stream GetManifestResourceStream(string name) => throw null; + public override System.IO.Stream GetManifestResourceStream(System.Type type, string name) => throw null; + public override System.Reflection.Module GetModule(string name) => throw null; + public override System.Reflection.Module[] GetModules(bool getResourceModules) => throw null; + public override System.Reflection.AssemblyName GetName(bool copiedName) => throw null; + public override System.Reflection.AssemblyName[] GetReferencedAssemblies() => throw null; + public override System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture, System.Version version) => throw null; + public override System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture) => throw null; + public override System.Type GetType(string name, bool throwOnError, bool ignoreCase) => throw null; + public override bool GlobalAssemblyCache { get => throw null; } + public override System.Int64 HostContext { get => throw null; } + public override string ImageRuntimeVersion { get => throw null; } + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsDynamic { get => throw null; } + public override string Location { get => throw null; } + public override System.Reflection.Module ManifestModule { get => throw null; } + public override bool ReflectionOnly { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + } + + // Generated from `System.Reflection.Emit.AssemblyBuilderAccess` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AssemblyBuilderAccess + { + // Stub generator skipped constructor + Run, + RunAndCollect, + } + + // Generated from `System.Reflection.Emit.ConstructorBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConstructorBuilder : System.Reflection.ConstructorInfo + { + public override System.Reflection.MethodAttributes Attributes { get => throw null; } + public override System.Reflection.CallingConventions CallingConvention { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public System.Reflection.Emit.ParameterBuilder DefineParameter(int iSequence, System.Reflection.ParameterAttributes attributes, string strParamName) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator(int streamSize) => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator() => throw null; + public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() => throw null; + public override System.Reflection.ParameterInfo[] GetParameters() => throw null; + public bool InitLocals { get => throw null; set => throw null; } + public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) => throw null; + public override object Invoke(System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override System.RuntimeMethodHandle MethodHandle { get => throw null; } + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetImplementationFlags(System.Reflection.MethodImplAttributes attributes) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.Emit.EnumBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumBuilder : System.Type + { + public override System.Reflection.Assembly Assembly { get => throw null; } + public override string AssemblyQualifiedName { get => throw null; } + public override System.Type BaseType { get => throw null; } + public System.Reflection.TypeInfo CreateTypeInfo() => throw null; + public override System.Type DeclaringType { get => throw null; } + public System.Reflection.Emit.FieldBuilder DefineLiteral(string literalName, object literalValue) => throw null; + public override string FullName { get => throw null; } + public override System.Guid GUID { get => throw null; } + protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() => throw null; + protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Type GetElementType() => throw null; + public override System.Type GetEnumUnderlyingType() => throw null; + public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents() => throw null; + public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetInterface(string name, bool ignoreCase) => throw null; + public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) => throw null; + public override System.Type[] GetInterfaces() => throw null; + public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected override bool HasElementTypeImpl() => throw null; + public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) => throw null; + protected override bool IsArrayImpl() => throw null; + protected override bool IsByRefImpl() => throw null; + public override bool IsByRefLike { get => throw null; } + protected override bool IsCOMObjectImpl() => throw null; + public override bool IsConstructedGenericType { get => throw null; } + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + protected override bool IsPointerImpl() => throw null; + protected override bool IsPrimitiveImpl() => throw null; + public override bool IsSZArray { get => throw null; } + public override bool IsTypeDefinition { get => throw null; } + protected override bool IsValueTypeImpl() => throw null; + public override bool IsVariableBoundArray { get => throw null; } + public override System.Type MakeArrayType(int rank) => throw null; + public override System.Type MakeArrayType() => throw null; + public override System.Type MakeByRefType() => throw null; + public override System.Type MakePointerType() => throw null; + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override string Namespace { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public override System.RuntimeTypeHandle TypeHandle { get => throw null; } + public System.Reflection.Emit.FieldBuilder UnderlyingField { get => throw null; } + public override System.Type UnderlyingSystemType { get => throw null; } + } + + // Generated from `System.Reflection.Emit.EventBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventBuilder + { + public void AddOtherMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public void SetAddOnMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetRaiseMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public void SetRemoveOnMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + } + + // Generated from `System.Reflection.Emit.FieldBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FieldBuilder : System.Reflection.FieldInfo + { + public override System.Reflection.FieldAttributes Attributes { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public override System.RuntimeFieldHandle FieldHandle { get => throw null; } + public override System.Type FieldType { get => throw null; } + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override object GetValue(object obj) => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetConstant(object defaultValue) => throw null; + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetOffset(int iOffset) => throw null; + public override void SetValue(object obj, object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) => throw null; + } + + // Generated from `System.Reflection.Emit.GenericTypeParameterBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GenericTypeParameterBuilder : System.Type + { + public override System.Reflection.Assembly Assembly { get => throw null; } + public override string AssemblyQualifiedName { get => throw null; } + public override System.Type BaseType { get => throw null; } + public override bool ContainsGenericParameters { get => throw null; } + public override System.Reflection.MethodBase DeclaringMethod { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public override bool Equals(object o) => throw null; + public override string FullName { get => throw null; } + public override System.Guid GUID { get => throw null; } + public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get => throw null; } + public override int GenericParameterPosition { get => throw null; } + protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() => throw null; + protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Type GetElementType() => throw null; + public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents() => throw null; + public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetGenericArguments() => throw null; + public override System.Type GetGenericTypeDefinition() => throw null; + public override int GetHashCode() => throw null; + public override System.Type GetInterface(string name, bool ignoreCase) => throw null; + public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) => throw null; + public override System.Type[] GetInterfaces() => throw null; + public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected override bool HasElementTypeImpl() => throw null; + public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) => throw null; + protected override bool IsArrayImpl() => throw null; + public override bool IsAssignableFrom(System.Type c) => throw null; + protected override bool IsByRefImpl() => throw null; + public override bool IsByRefLike { get => throw null; } + protected override bool IsCOMObjectImpl() => throw null; + public override bool IsConstructedGenericType { get => throw null; } + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsGenericParameter { get => throw null; } + public override bool IsGenericType { get => throw null; } + public override bool IsGenericTypeDefinition { get => throw null; } + protected override bool IsPointerImpl() => throw null; + protected override bool IsPrimitiveImpl() => throw null; + public override bool IsSZArray { get => throw null; } + public override bool IsSubclassOf(System.Type c) => throw null; + public override bool IsTypeDefinition { get => throw null; } + protected override bool IsValueTypeImpl() => throw null; + public override bool IsVariableBoundArray { get => throw null; } + public override System.Type MakeArrayType(int rank) => throw null; + public override System.Type MakeArrayType() => throw null; + public override System.Type MakeByRefType() => throw null; + public override System.Type MakeGenericType(params System.Type[] typeArguments) => throw null; + public override System.Type MakePointerType() => throw null; + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override string Namespace { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetBaseTypeConstraint(System.Type baseTypeConstraint) => throw null; + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetGenericParameterAttributes(System.Reflection.GenericParameterAttributes genericParameterAttributes) => throw null; + public void SetInterfaceConstraints(params System.Type[] interfaceConstraints) => throw null; + public override string ToString() => throw null; + public override System.RuntimeTypeHandle TypeHandle { get => throw null; } + public override System.Type UnderlyingSystemType { get => throw null; } + } + + // Generated from `System.Reflection.Emit.MethodBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodBuilder : System.Reflection.MethodInfo + { + public override System.Reflection.MethodAttributes Attributes { get => throw null; } + public override System.Reflection.CallingConventions CallingConvention { get => throw null; } + public override bool ContainsGenericParameters { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public System.Reflection.Emit.GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names) => throw null; + public System.Reflection.Emit.ParameterBuilder DefineParameter(int position, System.Reflection.ParameterAttributes attributes, string strParamName) => throw null; + public override bool Equals(object obj) => throw null; + public override System.Reflection.MethodInfo GetBaseDefinition() => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Type[] GetGenericArguments() => throw null; + public override System.Reflection.MethodInfo GetGenericMethodDefinition() => throw null; + public override int GetHashCode() => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator(int size) => throw null; + public System.Reflection.Emit.ILGenerator GetILGenerator() => throw null; + public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() => throw null; + public override System.Reflection.ParameterInfo[] GetParameters() => throw null; + public bool InitLocals { get => throw null; set => throw null; } + public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) => throw null; + public override bool IsConstructedGenericMethod { get => throw null; } + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsGenericMethod { get => throw null; } + public override bool IsGenericMethodDefinition { get => throw null; } + public override bool IsSecurityCritical { get => throw null; } + public override bool IsSecuritySafeCritical { get => throw null; } + public override bool IsSecurityTransparent { get => throw null; } + public override System.Reflection.MethodInfo MakeGenericMethod(params System.Type[] typeArguments) => throw null; + public override System.RuntimeMethodHandle MethodHandle { get => throw null; } + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public override System.Reflection.ParameterInfo ReturnParameter { get => throw null; } + public override System.Type ReturnType { get => throw null; } + public override System.Reflection.ICustomAttributeProvider ReturnTypeCustomAttributes { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetImplementationFlags(System.Reflection.MethodImplAttributes attributes) => throw null; + public void SetParameters(params System.Type[] parameterTypes) => throw null; + public void SetReturnType(System.Type returnType) => throw null; + public void SetSignature(System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.Emit.ModuleBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ModuleBuilder : System.Reflection.Module + { + public override System.Reflection.Assembly Assembly { get => throw null; } + public void CreateGlobalFunctions() => throw null; + public System.Reflection.Emit.EnumBuilder DefineEnum(string name, System.Reflection.TypeAttributes visibility, System.Type underlyingType) => throw null; + public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] requiredReturnTypeCustomModifiers, System.Type[] optionalReturnTypeCustomModifiers, System.Type[] parameterTypes, System.Type[][] requiredParameterTypeCustomModifiers, System.Type[][] optionalParameterTypeCustomModifiers) => throw null; + public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, System.Byte[] data, System.Reflection.FieldAttributes attributes) => throw null; + public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) => throw null; + public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, int typesize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Type[] interfaces) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packsize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packingSize, int typesize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr) => throw null; + public System.Reflection.Emit.TypeBuilder DefineType(string name) => throw null; + public System.Reflection.Emit.FieldBuilder DefineUninitializedData(string name, int size, System.Reflection.FieldAttributes attributes) => throw null; + public override bool Equals(object obj) => throw null; + public override string FullyQualifiedName { get => throw null; } + public System.Reflection.MethodInfo GetArrayMethod(System.Type arrayClass, string methodName, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingFlags) => throw null; + public override int GetHashCode() => throw null; + public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags) => throw null; + public override void GetPEKind(out System.Reflection.PortableExecutableKinds peKind, out System.Reflection.ImageFileMachine machine) => throw null; + public override System.Type GetType(string className, bool throwOnError, bool ignoreCase) => throw null; + public override System.Type GetType(string className, bool ignoreCase) => throw null; + public override System.Type GetType(string className) => throw null; + public override System.Type[] GetTypes() => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsResource() => throw null; + public override int MDStreamVersion { get => throw null; } + public override int MetadataToken { get => throw null; } + public override System.Guid ModuleVersionId { get => throw null; } + public override string Name { get => throw null; } + public override System.Reflection.FieldInfo ResolveField(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public override System.Reflection.MemberInfo ResolveMember(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public override System.Reflection.MethodBase ResolveMethod(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public override System.Byte[] ResolveSignature(int metadataToken) => throw null; + public override string ResolveString(int metadataToken) => throw null; + public override System.Type ResolveType(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public override string ScopeName { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + } + + // Generated from `System.Reflection.Emit.PropertyBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PropertyBuilder : System.Reflection.PropertyInfo + { + public void AddOtherMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public override System.Reflection.PropertyAttributes Attributes { get => throw null; } + public override bool CanRead { get => throw null; } + public override bool CanWrite { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public override System.Reflection.MethodInfo[] GetAccessors(bool nonPublic) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Reflection.MethodInfo GetGetMethod(bool nonPublic) => throw null; + public override System.Reflection.ParameterInfo[] GetIndexParameters() => throw null; + public override System.Reflection.MethodInfo GetSetMethod(bool nonPublic) => throw null; + public override object GetValue(object obj, object[] index) => throw null; + public override object GetValue(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture) => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type PropertyType { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetConstant(object defaultValue) => throw null; + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetGetMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public void SetSetMethod(System.Reflection.Emit.MethodBuilder mdBuilder) => throw null; + public override void SetValue(object obj, object value, object[] index) => throw null; + public override void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture) => throw null; + } + + // Generated from `System.Reflection.Emit.TypeBuilder` in `System.Reflection.Emit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeBuilder : System.Type + { + public void AddInterfaceImplementation(System.Type interfaceType) => throw null; + public override System.Reflection.Assembly Assembly { get => throw null; } + public override string AssemblyQualifiedName { get => throw null; } + public override System.Type BaseType { get => throw null; } + public System.Type CreateType() => throw null; + public System.Reflection.TypeInfo CreateTypeInfo() => throw null; + public override System.Reflection.MethodBase DeclaringMethod { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes, System.Type[][] requiredCustomModifiers, System.Type[][] optionalCustomModifiers) => throw null; + public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.ConstructorBuilder DefineDefaultConstructor(System.Reflection.MethodAttributes attributes) => throw null; + public System.Reflection.Emit.EventBuilder DefineEvent(string name, System.Reflection.EventAttributes attributes, System.Type eventtype) => throw null; + public System.Reflection.Emit.FieldBuilder DefineField(string fieldName, System.Type type, System.Type[] requiredCustomModifiers, System.Type[] optionalCustomModifiers, System.Reflection.FieldAttributes attributes) => throw null; + public System.Reflection.Emit.FieldBuilder DefineField(string fieldName, System.Type type, System.Reflection.FieldAttributes attributes) => throw null; + public System.Reflection.Emit.GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names) => throw null; + public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, System.Byte[] data, System.Reflection.FieldAttributes attributes) => throw null; + public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) => throw null; + public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention) => throw null; + public System.Reflection.Emit.MethodBuilder DefineMethod(string name, System.Reflection.MethodAttributes attributes) => throw null; + public void DefineMethodOverride(System.Reflection.MethodInfo methodInfoBody, System.Reflection.MethodInfo methodInfoDeclaration) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, int typeSize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Type[] interfaces) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packSize, int typeSize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent, System.Reflection.Emit.PackingSize packSize) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr, System.Type parent) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name, System.Reflection.TypeAttributes attr) => throw null; + public System.Reflection.Emit.TypeBuilder DefineNestedType(string name) => throw null; + public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) => throw null; + public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) => throw null; + public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) => throw null; + public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) => throw null; + public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) => throw null; + public System.Reflection.Emit.PropertyBuilder DefineProperty(string name, System.Reflection.PropertyAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) => throw null; + public System.Reflection.Emit.ConstructorBuilder DefineTypeInitializer() => throw null; + public System.Reflection.Emit.FieldBuilder DefineUninitializedData(string name, int size, System.Reflection.FieldAttributes attributes) => throw null; + public override string FullName { get => throw null; } + public override System.Guid GUID { get => throw null; } + public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get => throw null; } + public override int GenericParameterPosition { get => throw null; } + protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() => throw null; + public static System.Reflection.ConstructorInfo GetConstructor(System.Type type, System.Reflection.ConstructorInfo constructor) => throw null; + protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Type GetElementType() => throw null; + public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents() => throw null; + public static System.Reflection.FieldInfo GetField(System.Type type, System.Reflection.FieldInfo field) => throw null; + public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetGenericArguments() => throw null; + public override System.Type GetGenericTypeDefinition() => throw null; + public override System.Type GetInterface(string name, bool ignoreCase) => throw null; + public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) => throw null; + public override System.Type[] GetInterfaces() => throw null; + public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.MethodInfo GetMethod(System.Type type, System.Reflection.MethodInfo method) => throw null; + protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected override bool HasElementTypeImpl() => throw null; + public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) => throw null; + protected override bool IsArrayImpl() => throw null; + public override bool IsAssignableFrom(System.Type c) => throw null; + protected override bool IsByRefImpl() => throw null; + public override bool IsByRefLike { get => throw null; } + protected override bool IsCOMObjectImpl() => throw null; + public override bool IsConstructedGenericType { get => throw null; } + public bool IsCreated() => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsGenericParameter { get => throw null; } + public override bool IsGenericType { get => throw null; } + public override bool IsGenericTypeDefinition { get => throw null; } + protected override bool IsPointerImpl() => throw null; + protected override bool IsPrimitiveImpl() => throw null; + public override bool IsSZArray { get => throw null; } + public override bool IsSecurityCritical { get => throw null; } + public override bool IsSecuritySafeCritical { get => throw null; } + public override bool IsSecurityTransparent { get => throw null; } + public override bool IsSubclassOf(System.Type c) => throw null; + public override bool IsTypeDefinition { get => throw null; } + public override bool IsVariableBoundArray { get => throw null; } + public override System.Type MakeArrayType(int rank) => throw null; + public override System.Type MakeArrayType() => throw null; + public override System.Type MakeByRefType() => throw null; + public override System.Type MakeGenericType(params System.Type[] typeArguments) => throw null; + public override System.Type MakePointerType() => throw null; + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override string Namespace { get => throw null; } + public System.Reflection.Emit.PackingSize PackingSize { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw null; + public void SetCustomAttribute(System.Reflection.ConstructorInfo con, System.Byte[] binaryAttribute) => throw null; + public void SetParent(System.Type parent) => throw null; + public int Size { get => throw null; } + public override string ToString() => throw null; + public override System.RuntimeTypeHandle TypeHandle { get => throw null; } + public override System.Type UnderlyingSystemType { get => throw null; } + public const int UnspecifiedTypeSize = default; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs new file mode 100644 index 000000000000..a493559199f5 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs @@ -0,0 +1,4037 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + // Generated from `System.Reflection.AssemblyFlags` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AssemblyFlags + { + // Stub generator skipped constructor + ContentTypeMask, + DisableJitCompileOptimizer, + EnableJitCompileTracking, + PublicKey, + Retargetable, + WindowsRuntime, + } + + // Generated from `System.Reflection.AssemblyHashAlgorithm` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AssemblyHashAlgorithm + { + // Stub generator skipped constructor + MD5, + None, + Sha1, + Sha256, + Sha384, + Sha512, + } + + // Generated from `System.Reflection.DeclarativeSecurityAction` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DeclarativeSecurityAction + { + Assert, + // Stub generator skipped constructor + Demand, + Deny, + InheritanceDemand, + LinkDemand, + None, + PermitOnly, + RequestMinimum, + RequestOptional, + RequestRefuse, + } + + // Generated from `System.Reflection.ManifestResourceAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ManifestResourceAttributes + { + // Stub generator skipped constructor + Private, + Public, + VisibilityMask, + } + + // Generated from `System.Reflection.MethodImportAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MethodImportAttributes + { + BestFitMappingDisable, + BestFitMappingEnable, + BestFitMappingMask, + CallingConventionCDecl, + CallingConventionFastCall, + CallingConventionMask, + CallingConventionStdCall, + CallingConventionThisCall, + CallingConventionWinApi, + CharSetAnsi, + CharSetAuto, + CharSetMask, + CharSetUnicode, + ExactSpelling, + // Stub generator skipped constructor + None, + SetLastError, + ThrowOnUnmappableCharDisable, + ThrowOnUnmappableCharEnable, + ThrowOnUnmappableCharMask, + } + + // Generated from `System.Reflection.MethodSemanticsAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MethodSemanticsAttributes + { + Adder, + Getter, + // Stub generator skipped constructor + Other, + Raiser, + Remover, + Setter, + } + + namespace Metadata + { + // Generated from `System.Reflection.Metadata.ArrayShape` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ArrayShape + { + public ArrayShape(int rank, System.Collections.Immutable.ImmutableArray sizes, System.Collections.Immutable.ImmutableArray lowerBounds) => throw null; + // Stub generator skipped constructor + public System.Collections.Immutable.ImmutableArray LowerBounds { get => throw null; } + public int Rank { get => throw null; } + public System.Collections.Immutable.ImmutableArray Sizes { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.AssemblyDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyDefinition + { + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Culture { get => throw null; } + public System.Reflection.AssemblyFlags Flags { get => throw null; } + public System.Reflection.AssemblyName GetAssemblyName() => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection GetDeclarativeSecurityAttributes() => throw null; + public System.Reflection.AssemblyHashAlgorithm HashAlgorithm { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.BlobHandle PublicKey { get => throw null; } + public System.Version Version { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.AssemblyDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.AssemblyDefinitionHandle left, System.Reflection.Metadata.AssemblyDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.AssemblyDefinitionHandle left, System.Reflection.Metadata.AssemblyDefinitionHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.AssemblyDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.AssemblyFile` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyFile + { + // Stub generator skipped constructor + public bool ContainsMetadata { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.BlobHandle HashValue { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.AssemblyFileHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyFileHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.AssemblyFileHandle left, System.Reflection.Metadata.AssemblyFileHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.AssemblyFileHandle left, System.Reflection.Metadata.AssemblyFileHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.AssemblyFileHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.AssemblyFileHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyFileHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + // Stub generator skipped constructor + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.AssemblyFileHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.AssemblyFileHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.AssemblyFileHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.AssemblyReference` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyReference + { + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Culture { get => throw null; } + public System.Reflection.AssemblyFlags Flags { get => throw null; } + public System.Reflection.AssemblyName GetAssemblyName() => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.BlobHandle HashValue { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.BlobHandle PublicKeyOrToken { get => throw null; } + public System.Version Version { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.AssemblyReferenceHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyReferenceHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.AssemblyReferenceHandle left, System.Reflection.Metadata.AssemblyReferenceHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.AssemblyReferenceHandle left, System.Reflection.Metadata.AssemblyReferenceHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.AssemblyReferenceHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.AssemblyReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AssemblyReferenceHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + // Stub generator skipped constructor + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.AssemblyReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.AssemblyReferenceHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.AssemblyReferenceHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.Blob` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Blob + { + // Stub generator skipped constructor + public System.ArraySegment GetBytes() => throw null; + public bool IsDefault { get => throw null; } + public int Length { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.BlobBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BlobBuilder + { + public void Align(int alignment) => throw null; + protected virtual System.Reflection.Metadata.BlobBuilder AllocateChunk(int minimalSize) => throw null; + public BlobBuilder(int capacity = default(int)) => throw null; + // Generated from `System.Reflection.Metadata.BlobBuilder.Blobs` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Blobs : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable + { + // Stub generator skipped constructor + public System.Reflection.Metadata.Blob Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + public System.Reflection.Metadata.BlobBuilder.Blobs GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + protected internal int ChunkCapacity { get => throw null; } + public void Clear() => throw null; + public bool ContentEquals(System.Reflection.Metadata.BlobBuilder other) => throw null; + public int Count { get => throw null; } + protected void Free() => throw null; + protected int FreeBytes { get => throw null; } + protected virtual void FreeChunk() => throw null; + public System.Reflection.Metadata.BlobBuilder.Blobs GetBlobs() => throw null; + public void LinkPrefix(System.Reflection.Metadata.BlobBuilder prefix) => throw null; + public void LinkSuffix(System.Reflection.Metadata.BlobBuilder suffix) => throw null; + public void PadTo(int position) => throw null; + public System.Reflection.Metadata.Blob ReserveBytes(int byteCount) => throw null; + public System.Byte[] ToArray(int start, int byteCount) => throw null; + public System.Byte[] ToArray() => throw null; + public System.Collections.Immutable.ImmutableArray ToImmutableArray(int start, int byteCount) => throw null; + public System.Collections.Immutable.ImmutableArray ToImmutableArray() => throw null; + public int TryWriteBytes(System.IO.Stream source, int byteCount) => throw null; + public void WriteBoolean(bool value) => throw null; + public void WriteByte(System.Byte value) => throw null; + unsafe public void WriteBytes(System.Byte* buffer, int byteCount) => throw null; + public void WriteBytes(System.Collections.Immutable.ImmutableArray buffer, int start, int byteCount) => throw null; + public void WriteBytes(System.Collections.Immutable.ImmutableArray buffer) => throw null; + public void WriteBytes(System.Byte[] buffer, int start, int byteCount) => throw null; + public void WriteBytes(System.Byte[] buffer) => throw null; + public void WriteBytes(System.Byte value, int byteCount) => throw null; + public void WriteCompressedInteger(int value) => throw null; + public void WriteCompressedSignedInteger(int value) => throw null; + public void WriteConstant(object value) => throw null; + public void WriteContentTo(ref System.Reflection.Metadata.BlobWriter destination) => throw null; + public void WriteContentTo(System.Reflection.Metadata.BlobBuilder destination) => throw null; + public void WriteContentTo(System.IO.Stream destination) => throw null; + public void WriteDateTime(System.DateTime value) => throw null; + public void WriteDecimal(System.Decimal value) => throw null; + public void WriteDouble(double value) => throw null; + public void WriteGuid(System.Guid value) => throw null; + public void WriteInt16(System.Int16 value) => throw null; + public void WriteInt16BE(System.Int16 value) => throw null; + public void WriteInt32(int value) => throw null; + public void WriteInt32BE(int value) => throw null; + public void WriteInt64(System.Int64 value) => throw null; + public void WriteReference(int reference, bool isSmall) => throw null; + public void WriteSByte(System.SByte value) => throw null; + public void WriteSerializedString(string value) => throw null; + public void WriteSingle(float value) => throw null; + public void WriteUInt16(System.UInt16 value) => throw null; + public void WriteUInt16BE(System.UInt16 value) => throw null; + public void WriteUInt32(System.UInt32 value) => throw null; + public void WriteUInt32BE(System.UInt32 value) => throw null; + public void WriteUInt64(System.UInt64 value) => throw null; + public void WriteUTF16(string value) => throw null; + public void WriteUTF16(System.Char[] value) => throw null; + public void WriteUTF8(string value, bool allowUnpairedSurrogates = default(bool)) => throw null; + public void WriteUserString(string value) => throw null; + } + + // Generated from `System.Reflection.Metadata.BlobContentId` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BlobContentId : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.BlobContentId left, System.Reflection.Metadata.BlobContentId right) => throw null; + public static bool operator ==(System.Reflection.Metadata.BlobContentId left, System.Reflection.Metadata.BlobContentId right) => throw null; + public BlobContentId(System.Guid guid, System.UInt32 stamp) => throw null; + public BlobContentId(System.Collections.Immutable.ImmutableArray id) => throw null; + public BlobContentId(System.Byte[] id) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.BlobContentId other) => throw null; + public static System.Reflection.Metadata.BlobContentId FromHash(System.Collections.Immutable.ImmutableArray hashCode) => throw null; + public static System.Reflection.Metadata.BlobContentId FromHash(System.Byte[] hashCode) => throw null; + public override int GetHashCode() => throw null; + public static System.Func, System.Reflection.Metadata.BlobContentId> GetTimeBasedProvider() => throw null; + public System.Guid Guid { get => throw null; } + public bool IsDefault { get => throw null; } + public System.UInt32 Stamp { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.BlobHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BlobHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.BlobHandle left, System.Reflection.Metadata.BlobHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.BlobHandle left, System.Reflection.Metadata.BlobHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.BlobHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.BlobReader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BlobReader + { + public void Align(System.Byte alignment) => throw null; + unsafe public BlobReader(System.Byte* buffer, int length) => throw null; + // Stub generator skipped constructor + unsafe public System.Byte* CurrentPointer { get => throw null; } + public int IndexOf(System.Byte value) => throw null; + public int Length { get => throw null; } + public int Offset { get => throw null; set => throw null; } + public System.Reflection.Metadata.BlobHandle ReadBlobHandle() => throw null; + public bool ReadBoolean() => throw null; + public System.Byte ReadByte() => throw null; + public void ReadBytes(int byteCount, System.Byte[] buffer, int bufferOffset) => throw null; + public System.Byte[] ReadBytes(int byteCount) => throw null; + public System.Char ReadChar() => throw null; + public int ReadCompressedInteger() => throw null; + public int ReadCompressedSignedInteger() => throw null; + public object ReadConstant(System.Reflection.Metadata.ConstantTypeCode typeCode) => throw null; + public System.DateTime ReadDateTime() => throw null; + public System.Decimal ReadDecimal() => throw null; + public double ReadDouble() => throw null; + public System.Guid ReadGuid() => throw null; + public System.Int16 ReadInt16() => throw null; + public int ReadInt32() => throw null; + public System.Int64 ReadInt64() => throw null; + public System.SByte ReadSByte() => throw null; + public System.Reflection.Metadata.SerializationTypeCode ReadSerializationTypeCode() => throw null; + public string ReadSerializedString() => throw null; + public System.Reflection.Metadata.SignatureHeader ReadSignatureHeader() => throw null; + public System.Reflection.Metadata.SignatureTypeCode ReadSignatureTypeCode() => throw null; + public float ReadSingle() => throw null; + public System.Reflection.Metadata.EntityHandle ReadTypeHandle() => throw null; + public System.UInt16 ReadUInt16() => throw null; + public System.UInt32 ReadUInt32() => throw null; + public System.UInt64 ReadUInt64() => throw null; + public string ReadUTF16(int byteCount) => throw null; + public string ReadUTF8(int byteCount) => throw null; + public int RemainingBytes { get => throw null; } + public void Reset() => throw null; + unsafe public System.Byte* StartPointer { get => throw null; } + public bool TryReadCompressedInteger(out int value) => throw null; + public bool TryReadCompressedSignedInteger(out int value) => throw null; + } + + // Generated from `System.Reflection.Metadata.BlobWriter` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BlobWriter + { + public void Align(int alignment) => throw null; + public System.Reflection.Metadata.Blob Blob { get => throw null; } + public BlobWriter(int size) => throw null; + public BlobWriter(System.Reflection.Metadata.Blob blob) => throw null; + public BlobWriter(System.Byte[] buffer, int start, int count) => throw null; + public BlobWriter(System.Byte[] buffer) => throw null; + // Stub generator skipped constructor + public void Clear() => throw null; + public bool ContentEquals(System.Reflection.Metadata.BlobWriter other) => throw null; + public int Length { get => throw null; } + public int Offset { get => throw null; set => throw null; } + public void PadTo(int offset) => throw null; + public int RemainingBytes { get => throw null; } + public System.Byte[] ToArray(int start, int byteCount) => throw null; + public System.Byte[] ToArray() => throw null; + public System.Collections.Immutable.ImmutableArray ToImmutableArray(int start, int byteCount) => throw null; + public System.Collections.Immutable.ImmutableArray ToImmutableArray() => throw null; + public void WriteBoolean(bool value) => throw null; + public void WriteByte(System.Byte value) => throw null; + unsafe public void WriteBytes(System.Byte* buffer, int byteCount) => throw null; + public void WriteBytes(System.Reflection.Metadata.BlobBuilder source) => throw null; + public void WriteBytes(System.Collections.Immutable.ImmutableArray buffer, int start, int byteCount) => throw null; + public void WriteBytes(System.Collections.Immutable.ImmutableArray buffer) => throw null; + public void WriteBytes(System.Byte[] buffer, int start, int byteCount) => throw null; + public void WriteBytes(System.Byte[] buffer) => throw null; + public void WriteBytes(System.Byte value, int byteCount) => throw null; + public int WriteBytes(System.IO.Stream source, int byteCount) => throw null; + public void WriteCompressedInteger(int value) => throw null; + public void WriteCompressedSignedInteger(int value) => throw null; + public void WriteConstant(object value) => throw null; + public void WriteDateTime(System.DateTime value) => throw null; + public void WriteDecimal(System.Decimal value) => throw null; + public void WriteDouble(double value) => throw null; + public void WriteGuid(System.Guid value) => throw null; + public void WriteInt16(System.Int16 value) => throw null; + public void WriteInt16BE(System.Int16 value) => throw null; + public void WriteInt32(int value) => throw null; + public void WriteInt32BE(int value) => throw null; + public void WriteInt64(System.Int64 value) => throw null; + public void WriteReference(int reference, bool isSmall) => throw null; + public void WriteSByte(System.SByte value) => throw null; + public void WriteSerializedString(string str) => throw null; + public void WriteSingle(float value) => throw null; + public void WriteUInt16(System.UInt16 value) => throw null; + public void WriteUInt16BE(System.UInt16 value) => throw null; + public void WriteUInt32(System.UInt32 value) => throw null; + public void WriteUInt32BE(System.UInt32 value) => throw null; + public void WriteUInt64(System.UInt64 value) => throw null; + public void WriteUTF16(string value) => throw null; + public void WriteUTF16(System.Char[] value) => throw null; + public void WriteUTF8(string value, bool allowUnpairedSurrogates) => throw null; + public void WriteUserString(string value) => throw null; + } + + // Generated from `System.Reflection.Metadata.Constant` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Constant + { + // Stub generator skipped constructor + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + public System.Reflection.Metadata.ConstantTypeCode TypeCode { get => throw null; } + public System.Reflection.Metadata.BlobHandle Value { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ConstantHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConstantHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ConstantHandle left, System.Reflection.Metadata.ConstantHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ConstantHandle left, System.Reflection.Metadata.ConstantHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ConstantHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ConstantTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConstantTypeCode + { + Boolean, + Byte, + Char, + // Stub generator skipped constructor + Double, + Int16, + Int32, + Int64, + Invalid, + NullReference, + SByte, + Single, + String, + UInt16, + UInt32, + UInt64, + } + + // Generated from `System.Reflection.Metadata.CustomAttribute` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttribute + { + public System.Reflection.Metadata.EntityHandle Constructor { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.CustomAttributeValue DecodeValue(System.Reflection.Metadata.ICustomAttributeTypeProvider provider) => throw null; + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + public System.Reflection.Metadata.BlobHandle Value { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.CustomAttributeHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.CustomAttributeHandle left, System.Reflection.Metadata.CustomAttributeHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.CustomAttributeHandle left, System.Reflection.Metadata.CustomAttributeHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.CustomAttributeHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.CustomAttributeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Stub generator skipped constructor + // Generated from `System.Reflection.Metadata.CustomAttributeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.CustomAttributeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.CustomAttributeHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.CustomAttributeNamedArgument<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeNamedArgument + { + public CustomAttributeNamedArgument(string name, System.Reflection.Metadata.CustomAttributeNamedArgumentKind kind, TType type, object value) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.CustomAttributeNamedArgumentKind Kind { get => throw null; } + public string Name { get => throw null; } + public TType Type { get => throw null; } + public object Value { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.CustomAttributeNamedArgumentKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CustomAttributeNamedArgumentKind + { + // Stub generator skipped constructor + Field, + Property, + } + + // Generated from `System.Reflection.Metadata.CustomAttributeTypedArgument<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeTypedArgument + { + public CustomAttributeTypedArgument(TType type, object value) => throw null; + // Stub generator skipped constructor + public TType Type { get => throw null; } + public object Value { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.CustomAttributeValue<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeValue + { + public CustomAttributeValue(System.Collections.Immutable.ImmutableArray> fixedArguments, System.Collections.Immutable.ImmutableArray> namedArguments) => throw null; + // Stub generator skipped constructor + public System.Collections.Immutable.ImmutableArray> FixedArguments { get => throw null; } + public System.Collections.Immutable.ImmutableArray> NamedArguments { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.CustomDebugInformation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomDebugInformation + { + // Stub generator skipped constructor + public System.Reflection.Metadata.GuidHandle Kind { get => throw null; } + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + public System.Reflection.Metadata.BlobHandle Value { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.CustomDebugInformationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomDebugInformationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.CustomDebugInformationHandle left, System.Reflection.Metadata.CustomDebugInformationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.CustomDebugInformationHandle left, System.Reflection.Metadata.CustomDebugInformationHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.CustomDebugInformationHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.CustomDebugInformationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomDebugInformationHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Stub generator skipped constructor + // Generated from `System.Reflection.Metadata.CustomDebugInformationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.CustomDebugInformationHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.CustomDebugInformationHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.DebugMetadataHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebugMetadataHeader + { + public System.Reflection.Metadata.MethodDefinitionHandle EntryPoint { get => throw null; } + public System.Collections.Immutable.ImmutableArray Id { get => throw null; } + public int IdStartOffset { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttribute` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DeclarativeSecurityAttribute + { + public System.Reflection.DeclarativeSecurityAction Action { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + public System.Reflection.Metadata.BlobHandle PermissionSet { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DeclarativeSecurityAttributeHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle left, System.Reflection.Metadata.DeclarativeSecurityAttributeHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle left, System.Reflection.Metadata.DeclarativeSecurityAttributeHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DeclarativeSecurityAttributeHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Stub generator skipped constructor + // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.Document` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Document + { + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobHandle Hash { get => throw null; } + public System.Reflection.Metadata.GuidHandle HashAlgorithm { get => throw null; } + public System.Reflection.Metadata.GuidHandle Language { get => throw null; } + public System.Reflection.Metadata.DocumentNameBlobHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.DocumentHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DocumentHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.DocumentHandle left, System.Reflection.Metadata.DocumentHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.DocumentHandle left, System.Reflection.Metadata.DocumentHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.DocumentHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.DocumentHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DocumentHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Stub generator skipped constructor + // Generated from `System.Reflection.Metadata.DocumentHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.DocumentHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.DocumentHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.DocumentNameBlobHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DocumentNameBlobHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.DocumentNameBlobHandle left, System.Reflection.Metadata.DocumentNameBlobHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.DocumentNameBlobHandle left, System.Reflection.Metadata.DocumentNameBlobHandle right) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.DocumentNameBlobHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.EntityHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EntityHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.EntityHandle left, System.Reflection.Metadata.EntityHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.EntityHandle left, System.Reflection.Metadata.EntityHandle right) => throw null; + public static System.Reflection.Metadata.AssemblyDefinitionHandle AssemblyDefinition; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.EntityHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + public System.Reflection.Metadata.HandleKind Kind { get => throw null; } + public static System.Reflection.Metadata.ModuleDefinitionHandle ModuleDefinition; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.EventAccessors` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EventAccessors + { + public System.Reflection.Metadata.MethodDefinitionHandle Adder { get => throw null; } + // Stub generator skipped constructor + public System.Collections.Immutable.ImmutableArray Others { get => throw null; } + public System.Reflection.Metadata.MethodDefinitionHandle Raiser { get => throw null; } + public System.Reflection.Metadata.MethodDefinitionHandle Remover { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.EventDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EventDefinition + { + public System.Reflection.EventAttributes Attributes { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.EventAccessors GetAccessors() => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.EntityHandle Type { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.EventDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EventDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.EventDefinitionHandle left, System.Reflection.Metadata.EventDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.EventDefinitionHandle left, System.Reflection.Metadata.EventDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.EventDefinitionHandle other) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.EventDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EventDefinitionHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.EventDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.EventDefinitionHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + // Stub generator skipped constructor + public System.Reflection.Metadata.EventDefinitionHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.ExceptionRegion` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ExceptionRegion + { + public System.Reflection.Metadata.EntityHandle CatchType { get => throw null; } + // Stub generator skipped constructor + public int FilterOffset { get => throw null; } + public int HandlerLength { get => throw null; } + public int HandlerOffset { get => throw null; } + public System.Reflection.Metadata.ExceptionRegionKind Kind { get => throw null; } + public int TryLength { get => throw null; } + public int TryOffset { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ExceptionRegionKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ExceptionRegionKind + { + Catch, + // Stub generator skipped constructor + Fault, + Filter, + Finally, + } + + // Generated from `System.Reflection.Metadata.ExportedType` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ExportedType + { + public System.Reflection.TypeAttributes Attributes { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.EntityHandle Implementation { get => throw null; } + public bool IsForwarder { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.StringHandle Namespace { get => throw null; } + public System.Reflection.Metadata.NamespaceDefinitionHandle NamespaceDefinition { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ExportedTypeHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ExportedTypeHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ExportedTypeHandle left, System.Reflection.Metadata.ExportedTypeHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ExportedTypeHandle left, System.Reflection.Metadata.ExportedTypeHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ExportedTypeHandle other) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ExportedTypeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ExportedTypeHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.ExportedTypeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.ExportedTypeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + // Stub generator skipped constructor + public System.Reflection.Metadata.ExportedTypeHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.FieldDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FieldDefinition + { + public System.Reflection.FieldAttributes Attributes { get => throw null; } + public TType DecodeSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.TypeDefinitionHandle GetDeclaringType() => throw null; + public System.Reflection.Metadata.ConstantHandle GetDefaultValue() => throw null; + public System.Reflection.Metadata.BlobHandle GetMarshallingDescriptor() => throw null; + public int GetOffset() => throw null; + public int GetRelativeVirtualAddress() => throw null; + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.FieldDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FieldDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.FieldDefinitionHandle left, System.Reflection.Metadata.FieldDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.FieldDefinitionHandle left, System.Reflection.Metadata.FieldDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.FieldDefinitionHandle other) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.FieldDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FieldDefinitionHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.FieldDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.FieldDefinitionHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + // Stub generator skipped constructor + public System.Reflection.Metadata.FieldDefinitionHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `System.Reflection.Metadata.GenericParameter` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameter + { + public System.Reflection.GenericParameterAttributes Attributes { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.GenericParameterConstraintHandleCollection GetConstraints() => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public int Index { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.GenericParameterConstraint` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameterConstraint + { + // Stub generator skipped constructor + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.GenericParameterHandle Parameter { get => throw null; } + public System.Reflection.Metadata.EntityHandle Type { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameterConstraintHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.GenericParameterConstraintHandle left, System.Reflection.Metadata.GenericParameterConstraintHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.GenericParameterConstraintHandle left, System.Reflection.Metadata.GenericParameterConstraintHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.GenericParameterConstraintHandle other) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameterConstraintHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.GenericParameterConstraintHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + // Stub generator skipped constructor + public System.Reflection.Metadata.GenericParameterConstraintHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Reflection.Metadata.GenericParameterConstraintHandle this[int index] { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.GenericParameterHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameterHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.GenericParameterHandle left, System.Reflection.Metadata.GenericParameterHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.GenericParameterHandle left, System.Reflection.Metadata.GenericParameterHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.GenericParameterHandle other) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.GenericParameterHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericParameterHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.GenericParameterHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.GenericParameterHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + // Stub generator skipped constructor + public System.Reflection.Metadata.GenericParameterHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Reflection.Metadata.GenericParameterHandle this[int index] { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.GuidHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GuidHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.GuidHandle left, System.Reflection.Metadata.GuidHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.GuidHandle left, System.Reflection.Metadata.GuidHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.GuidHandle other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.Handle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Handle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.Handle left, System.Reflection.Metadata.Handle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.Handle left, System.Reflection.Metadata.Handle right) => throw null; + public static System.Reflection.Metadata.AssemblyDefinitionHandle AssemblyDefinition; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.Handle other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public bool IsNil { get => throw null; } + public System.Reflection.Metadata.HandleKind Kind { get => throw null; } + public static System.Reflection.Metadata.ModuleDefinitionHandle ModuleDefinition; + } + + // Generated from `System.Reflection.Metadata.HandleComparer` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HandleComparer : System.Collections.Generic.IEqualityComparer, System.Collections.Generic.IEqualityComparer, System.Collections.Generic.IComparer, System.Collections.Generic.IComparer + { + public int Compare(System.Reflection.Metadata.Handle x, System.Reflection.Metadata.Handle y) => throw null; + public int Compare(System.Reflection.Metadata.EntityHandle x, System.Reflection.Metadata.EntityHandle y) => throw null; + public static System.Reflection.Metadata.HandleComparer Default { get => throw null; } + public bool Equals(System.Reflection.Metadata.Handle x, System.Reflection.Metadata.Handle y) => throw null; + public bool Equals(System.Reflection.Metadata.EntityHandle x, System.Reflection.Metadata.EntityHandle y) => throw null; + public int GetHashCode(System.Reflection.Metadata.Handle obj) => throw null; + public int GetHashCode(System.Reflection.Metadata.EntityHandle obj) => throw null; + } + + // Generated from `System.Reflection.Metadata.HandleKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HandleKind + { + AssemblyDefinition, + AssemblyFile, + AssemblyReference, + Blob, + Constant, + CustomAttribute, + CustomDebugInformation, + DeclarativeSecurityAttribute, + Document, + EventDefinition, + ExportedType, + FieldDefinition, + GenericParameter, + GenericParameterConstraint, + Guid, + // Stub generator skipped constructor + ImportScope, + InterfaceImplementation, + LocalConstant, + LocalScope, + LocalVariable, + ManifestResource, + MemberReference, + MethodDebugInformation, + MethodDefinition, + MethodImplementation, + MethodSpecification, + ModuleDefinition, + ModuleReference, + NamespaceDefinition, + Parameter, + PropertyDefinition, + StandaloneSignature, + String, + TypeDefinition, + TypeReference, + TypeSpecification, + UserString, + } + + // Generated from `System.Reflection.Metadata.IConstructedTypeProvider<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IConstructedTypeProvider : System.Reflection.Metadata.ISZArrayTypeProvider + { + TType GetArrayType(TType elementType, System.Reflection.Metadata.ArrayShape shape); + TType GetByReferenceType(TType elementType); + TType GetGenericInstantiation(TType genericType, System.Collections.Immutable.ImmutableArray typeArguments); + TType GetPointerType(TType elementType); + } + + // Generated from `System.Reflection.Metadata.ICustomAttributeTypeProvider<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomAttributeTypeProvider : System.Reflection.Metadata.ISimpleTypeProvider, System.Reflection.Metadata.ISZArrayTypeProvider + { + TType GetSystemType(); + TType GetTypeFromSerializedName(string name); + System.Reflection.Metadata.PrimitiveTypeCode GetUnderlyingEnumType(TType type); + bool IsSystemType(TType type); + } + + // Generated from `System.Reflection.Metadata.ILOpCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ILOpCode + { + Add, + Add_ovf, + Add_ovf_un, + And, + Arglist, + Beq, + Beq_s, + Bge, + Bge_s, + Bge_un, + Bge_un_s, + Bgt, + Bgt_s, + Bgt_un, + Bgt_un_s, + Ble, + Ble_s, + Ble_un, + Ble_un_s, + Blt, + Blt_s, + Blt_un, + Blt_un_s, + Bne_un, + Bne_un_s, + Box, + Br, + Br_s, + Break, + Brfalse, + Brfalse_s, + Brtrue, + Brtrue_s, + Call, + Calli, + Callvirt, + Castclass, + Ceq, + Cgt, + Cgt_un, + Ckfinite, + Clt, + Clt_un, + Constrained, + Conv_i, + Conv_i1, + Conv_i2, + Conv_i4, + Conv_i8, + Conv_ovf_i, + Conv_ovf_i1, + Conv_ovf_i1_un, + Conv_ovf_i2, + Conv_ovf_i2_un, + Conv_ovf_i4, + Conv_ovf_i4_un, + Conv_ovf_i8, + Conv_ovf_i8_un, + Conv_ovf_i_un, + Conv_ovf_u, + Conv_ovf_u1, + Conv_ovf_u1_un, + Conv_ovf_u2, + Conv_ovf_u2_un, + Conv_ovf_u4, + Conv_ovf_u4_un, + Conv_ovf_u8, + Conv_ovf_u8_un, + Conv_ovf_u_un, + Conv_r4, + Conv_r8, + Conv_r_un, + Conv_u, + Conv_u1, + Conv_u2, + Conv_u4, + Conv_u8, + Cpblk, + Cpobj, + Div, + Div_un, + Dup, + Endfilter, + Endfinally, + // Stub generator skipped constructor + Initblk, + Initobj, + Isinst, + Jmp, + Ldarg, + Ldarg_0, + Ldarg_1, + Ldarg_2, + Ldarg_3, + Ldarg_s, + Ldarga, + Ldarga_s, + Ldc_i4, + Ldc_i4_0, + Ldc_i4_1, + Ldc_i4_2, + Ldc_i4_3, + Ldc_i4_4, + Ldc_i4_5, + Ldc_i4_6, + Ldc_i4_7, + Ldc_i4_8, + Ldc_i4_m1, + Ldc_i4_s, + Ldc_i8, + Ldc_r4, + Ldc_r8, + Ldelem, + Ldelem_i, + Ldelem_i1, + Ldelem_i2, + Ldelem_i4, + Ldelem_i8, + Ldelem_r4, + Ldelem_r8, + Ldelem_ref, + Ldelem_u1, + Ldelem_u2, + Ldelem_u4, + Ldelema, + Ldfld, + Ldflda, + Ldftn, + Ldind_i, + Ldind_i1, + Ldind_i2, + Ldind_i4, + Ldind_i8, + Ldind_r4, + Ldind_r8, + Ldind_ref, + Ldind_u1, + Ldind_u2, + Ldind_u4, + Ldlen, + Ldloc, + Ldloc_0, + Ldloc_1, + Ldloc_2, + Ldloc_3, + Ldloc_s, + Ldloca, + Ldloca_s, + Ldnull, + Ldobj, + Ldsfld, + Ldsflda, + Ldstr, + Ldtoken, + Ldvirtftn, + Leave, + Leave_s, + Localloc, + Mkrefany, + Mul, + Mul_ovf, + Mul_ovf_un, + Neg, + Newarr, + Newobj, + Nop, + Not, + Or, + Pop, + Readonly, + Refanytype, + Refanyval, + Rem, + Rem_un, + Ret, + Rethrow, + Shl, + Shr, + Shr_un, + Sizeof, + Starg, + Starg_s, + Stelem, + Stelem_i, + Stelem_i1, + Stelem_i2, + Stelem_i4, + Stelem_i8, + Stelem_r4, + Stelem_r8, + Stelem_ref, + Stfld, + Stind_i, + Stind_i1, + Stind_i2, + Stind_i4, + Stind_i8, + Stind_r4, + Stind_r8, + Stind_ref, + Stloc, + Stloc_0, + Stloc_1, + Stloc_2, + Stloc_3, + Stloc_s, + Stobj, + Stsfld, + Sub, + Sub_ovf, + Sub_ovf_un, + Switch, + Tail, + Throw, + Unaligned, + Unbox, + Unbox_any, + Volatile, + Xor, + } + + // Generated from `System.Reflection.Metadata.ILOpCodeExtensions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ILOpCodeExtensions + { + public static int GetBranchOperandSize(this System.Reflection.Metadata.ILOpCode opCode) => throw null; + public static System.Reflection.Metadata.ILOpCode GetLongBranch(this System.Reflection.Metadata.ILOpCode opCode) => throw null; + public static System.Reflection.Metadata.ILOpCode GetShortBranch(this System.Reflection.Metadata.ILOpCode opCode) => throw null; + public static bool IsBranch(this System.Reflection.Metadata.ILOpCode opCode) => throw null; + } + + // Generated from `System.Reflection.Metadata.ISZArrayTypeProvider<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISZArrayTypeProvider + { + TType GetSZArrayType(TType elementType); + } + + // Generated from `System.Reflection.Metadata.ISignatureTypeProvider<,>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISignatureTypeProvider : System.Reflection.Metadata.ISimpleTypeProvider, System.Reflection.Metadata.ISZArrayTypeProvider, System.Reflection.Metadata.IConstructedTypeProvider + { + TType GetFunctionPointerType(System.Reflection.Metadata.MethodSignature signature); + TType GetGenericMethodParameter(TGenericContext genericContext, int index); + TType GetGenericTypeParameter(TGenericContext genericContext, int index); + TType GetModifiedType(TType modifier, TType unmodifiedType, bool isRequired); + TType GetPinnedType(TType elementType); + TType GetTypeFromSpecification(System.Reflection.Metadata.MetadataReader reader, TGenericContext genericContext, System.Reflection.Metadata.TypeSpecificationHandle handle, System.Byte rawTypeKind); + } + + // Generated from `System.Reflection.Metadata.ISimpleTypeProvider<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISimpleTypeProvider + { + TType GetPrimitiveType(System.Reflection.Metadata.PrimitiveTypeCode typeCode); + TType GetTypeFromDefinition(System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.TypeDefinitionHandle handle, System.Byte rawTypeKind); + TType GetTypeFromReference(System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.TypeReferenceHandle handle, System.Byte rawTypeKind); + } + + // Generated from `System.Reflection.Metadata.ImageFormatLimitationException` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImageFormatLimitationException : System.Exception + { + public ImageFormatLimitationException(string message, System.Exception innerException) => throw null; + public ImageFormatLimitationException(string message) => throw null; + public ImageFormatLimitationException() => throw null; + protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Reflection.Metadata.ImportDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImportDefinition + { + public System.Reflection.Metadata.BlobHandle Alias { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.ImportDefinitionKind Kind { get => throw null; } + public System.Reflection.Metadata.AssemblyReferenceHandle TargetAssembly { get => throw null; } + public System.Reflection.Metadata.BlobHandle TargetNamespace { get => throw null; } + public System.Reflection.Metadata.EntityHandle TargetType { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ImportDefinitionCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImportDefinitionCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + // Generated from `System.Reflection.Metadata.ImportDefinitionCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.ImportDefinition Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Reflection.Metadata.ImportDefinitionCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.ImportDefinitionKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ImportDefinitionKind + { + AliasAssemblyNamespace, + AliasAssemblyReference, + AliasNamespace, + AliasType, + ImportAssemblyNamespace, + ImportAssemblyReferenceAlias, + // Stub generator skipped constructor + ImportNamespace, + ImportType, + ImportXmlNamespace, + } + + // Generated from `System.Reflection.Metadata.ImportScope` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImportScope + { + public System.Reflection.Metadata.ImportDefinitionCollection GetImports() => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobHandle ImportsBlob { get => throw null; } + public System.Reflection.Metadata.ImportScopeHandle Parent { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ImportScopeCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImportScopeCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.ImportScopeCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.ImportScopeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.ImportScopeCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.ImportScopeHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ImportScopeHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ImportScopeHandle left, System.Reflection.Metadata.ImportScopeHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ImportScopeHandle left, System.Reflection.Metadata.ImportScopeHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ImportScopeHandle other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.InterfaceImplementation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct InterfaceImplementation + { + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.EntityHandle Interface { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.InterfaceImplementationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct InterfaceImplementationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.InterfaceImplementationHandle left, System.Reflection.Metadata.InterfaceImplementationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.InterfaceImplementationHandle left, System.Reflection.Metadata.InterfaceImplementationHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.InterfaceImplementationHandle other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public bool IsNil { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.InterfaceImplementationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct InterfaceImplementationHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.InterfaceImplementationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.InterfaceImplementationHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.InterfaceImplementationHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.LocalConstant` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalConstant + { + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.LocalConstantHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalConstantHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.LocalConstantHandle left, System.Reflection.Metadata.LocalConstantHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.LocalConstantHandle left, System.Reflection.Metadata.LocalConstantHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.LocalConstantHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.LocalConstantHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalConstantHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.LocalConstantHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.LocalConstantHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.LocalConstantHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.LocalScope` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalScope + { + public int EndOffset { get => throw null; } + public System.Reflection.Metadata.LocalScopeHandleCollection.ChildrenEnumerator GetChildren() => throw null; + public System.Reflection.Metadata.LocalConstantHandleCollection GetLocalConstants() => throw null; + public System.Reflection.Metadata.LocalVariableHandleCollection GetLocalVariables() => throw null; + public System.Reflection.Metadata.ImportScopeHandle ImportScope { get => throw null; } + public int Length { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.MethodDefinitionHandle Method { get => throw null; } + public int StartOffset { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.LocalScopeHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalScopeHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.LocalScopeHandle left, System.Reflection.Metadata.LocalScopeHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.LocalScopeHandle left, System.Reflection.Metadata.LocalScopeHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.LocalScopeHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalScopeHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection.ChildrenEnumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ChildrenEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + // Stub generator skipped constructor + public System.Reflection.Metadata.LocalScopeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.LocalScopeHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.LocalScopeHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.LocalVariable` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalVariable + { + public System.Reflection.Metadata.LocalVariableAttributes Attributes { get => throw null; } + public int Index { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.LocalVariableAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum LocalVariableAttributes + { + DebuggerHidden, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Reflection.Metadata.LocalVariableHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalVariableHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.LocalVariableHandle left, System.Reflection.Metadata.LocalVariableHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.LocalVariableHandle left, System.Reflection.Metadata.LocalVariableHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.LocalVariableHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.LocalVariableHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalVariableHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.LocalVariableHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.LocalVariableHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.LocalVariableHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.ManifestResource` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ManifestResource + { + public System.Reflection.ManifestResourceAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.EntityHandle Implementation { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Int64 Offset { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ManifestResourceHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ManifestResourceHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ManifestResourceHandle left, System.Reflection.Metadata.ManifestResourceHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ManifestResourceHandle left, System.Reflection.Metadata.ManifestResourceHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ManifestResourceHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ManifestResourceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ManifestResourceHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.ManifestResourceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.ManifestResourceHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.ManifestResourceHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.MemberReference` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MemberReference + { + public TType DecodeFieldSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.MethodSignature DecodeMethodSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.MemberReferenceKind GetKind() => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.EntityHandle Parent { get => throw null; } + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MemberReferenceHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MemberReferenceHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.MemberReferenceHandle left, System.Reflection.Metadata.MemberReferenceHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.MemberReferenceHandle left, System.Reflection.Metadata.MemberReferenceHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.MemberReferenceHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.MemberReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MemberReferenceHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.MemberReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.MemberReferenceHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.MemberReferenceHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.MemberReferenceKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MemberReferenceKind + { + Field, + // Stub generator skipped constructor + Method, + } + + // Generated from `System.Reflection.Metadata.MetadataKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MetadataKind + { + Ecma335, + ManagedWindowsMetadata, + // Stub generator skipped constructor + WindowsMetadata, + } + + // Generated from `System.Reflection.Metadata.MetadataReader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataReader + { + public System.Reflection.Metadata.AssemblyFileHandleCollection AssemblyFiles { get => throw null; } + public System.Reflection.Metadata.AssemblyReferenceHandleCollection AssemblyReferences { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection CustomAttributes { get => throw null; } + public System.Reflection.Metadata.CustomDebugInformationHandleCollection CustomDebugInformation { get => throw null; } + public System.Reflection.Metadata.DebugMetadataHeader DebugMetadataHeader { get => throw null; } + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection DeclarativeSecurityAttributes { get => throw null; } + public System.Reflection.Metadata.DocumentHandleCollection Documents { get => throw null; } + public System.Reflection.Metadata.EventDefinitionHandleCollection EventDefinitions { get => throw null; } + public System.Reflection.Metadata.ExportedTypeHandleCollection ExportedTypes { get => throw null; } + public System.Reflection.Metadata.FieldDefinitionHandleCollection FieldDefinitions { get => throw null; } + public System.Reflection.Metadata.AssemblyDefinition GetAssemblyDefinition() => throw null; + public System.Reflection.Metadata.AssemblyFile GetAssemblyFile(System.Reflection.Metadata.AssemblyFileHandle handle) => throw null; + public System.Reflection.Metadata.AssemblyReference GetAssemblyReference(System.Reflection.Metadata.AssemblyReferenceHandle handle) => throw null; + public System.Byte[] GetBlobBytes(System.Reflection.Metadata.BlobHandle handle) => throw null; + public System.Collections.Immutable.ImmutableArray GetBlobContent(System.Reflection.Metadata.BlobHandle handle) => throw null; + public System.Reflection.Metadata.BlobReader GetBlobReader(System.Reflection.Metadata.StringHandle handle) => throw null; + public System.Reflection.Metadata.BlobReader GetBlobReader(System.Reflection.Metadata.BlobHandle handle) => throw null; + public System.Reflection.Metadata.Constant GetConstant(System.Reflection.Metadata.ConstantHandle handle) => throw null; + public System.Reflection.Metadata.CustomAttribute GetCustomAttribute(System.Reflection.Metadata.CustomAttributeHandle handle) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes(System.Reflection.Metadata.EntityHandle handle) => throw null; + public System.Reflection.Metadata.CustomDebugInformationHandleCollection GetCustomDebugInformation(System.Reflection.Metadata.EntityHandle handle) => throw null; + public System.Reflection.Metadata.CustomDebugInformation GetCustomDebugInformation(System.Reflection.Metadata.CustomDebugInformationHandle handle) => throw null; + public System.Reflection.Metadata.DeclarativeSecurityAttribute GetDeclarativeSecurityAttribute(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle handle) => throw null; + public System.Reflection.Metadata.Document GetDocument(System.Reflection.Metadata.DocumentHandle handle) => throw null; + public System.Reflection.Metadata.EventDefinition GetEventDefinition(System.Reflection.Metadata.EventDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.ExportedType GetExportedType(System.Reflection.Metadata.ExportedTypeHandle handle) => throw null; + public System.Reflection.Metadata.FieldDefinition GetFieldDefinition(System.Reflection.Metadata.FieldDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.GenericParameter GetGenericParameter(System.Reflection.Metadata.GenericParameterHandle handle) => throw null; + public System.Reflection.Metadata.GenericParameterConstraint GetGenericParameterConstraint(System.Reflection.Metadata.GenericParameterConstraintHandle handle) => throw null; + public System.Guid GetGuid(System.Reflection.Metadata.GuidHandle handle) => throw null; + public System.Reflection.Metadata.ImportScope GetImportScope(System.Reflection.Metadata.ImportScopeHandle handle) => throw null; + public System.Reflection.Metadata.InterfaceImplementation GetInterfaceImplementation(System.Reflection.Metadata.InterfaceImplementationHandle handle) => throw null; + public System.Reflection.Metadata.LocalConstant GetLocalConstant(System.Reflection.Metadata.LocalConstantHandle handle) => throw null; + public System.Reflection.Metadata.LocalScope GetLocalScope(System.Reflection.Metadata.LocalScopeHandle handle) => throw null; + public System.Reflection.Metadata.LocalScopeHandleCollection GetLocalScopes(System.Reflection.Metadata.MethodDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.LocalScopeHandleCollection GetLocalScopes(System.Reflection.Metadata.MethodDebugInformationHandle handle) => throw null; + public System.Reflection.Metadata.LocalVariable GetLocalVariable(System.Reflection.Metadata.LocalVariableHandle handle) => throw null; + public System.Reflection.Metadata.ManifestResource GetManifestResource(System.Reflection.Metadata.ManifestResourceHandle handle) => throw null; + public System.Reflection.Metadata.MemberReference GetMemberReference(System.Reflection.Metadata.MemberReferenceHandle handle) => throw null; + public System.Reflection.Metadata.MethodDebugInformation GetMethodDebugInformation(System.Reflection.Metadata.MethodDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.MethodDebugInformation GetMethodDebugInformation(System.Reflection.Metadata.MethodDebugInformationHandle handle) => throw null; + public System.Reflection.Metadata.MethodDefinition GetMethodDefinition(System.Reflection.Metadata.MethodDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.MethodImplementation GetMethodImplementation(System.Reflection.Metadata.MethodImplementationHandle handle) => throw null; + public System.Reflection.Metadata.MethodSpecification GetMethodSpecification(System.Reflection.Metadata.MethodSpecificationHandle handle) => throw null; + public System.Reflection.Metadata.ModuleDefinition GetModuleDefinition() => throw null; + public System.Reflection.Metadata.ModuleReference GetModuleReference(System.Reflection.Metadata.ModuleReferenceHandle handle) => throw null; + public System.Reflection.Metadata.NamespaceDefinition GetNamespaceDefinition(System.Reflection.Metadata.NamespaceDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.NamespaceDefinition GetNamespaceDefinitionRoot() => throw null; + public System.Reflection.Metadata.Parameter GetParameter(System.Reflection.Metadata.ParameterHandle handle) => throw null; + public System.Reflection.Metadata.PropertyDefinition GetPropertyDefinition(System.Reflection.Metadata.PropertyDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.StandaloneSignature GetStandaloneSignature(System.Reflection.Metadata.StandaloneSignatureHandle handle) => throw null; + public string GetString(System.Reflection.Metadata.StringHandle handle) => throw null; + public string GetString(System.Reflection.Metadata.NamespaceDefinitionHandle handle) => throw null; + public string GetString(System.Reflection.Metadata.DocumentNameBlobHandle handle) => throw null; + public System.Reflection.Metadata.TypeDefinition GetTypeDefinition(System.Reflection.Metadata.TypeDefinitionHandle handle) => throw null; + public System.Reflection.Metadata.TypeReference GetTypeReference(System.Reflection.Metadata.TypeReferenceHandle handle) => throw null; + public System.Reflection.Metadata.TypeSpecification GetTypeSpecification(System.Reflection.Metadata.TypeSpecificationHandle handle) => throw null; + public string GetUserString(System.Reflection.Metadata.UserStringHandle handle) => throw null; + public System.Reflection.Metadata.ImportScopeCollection ImportScopes { get => throw null; } + public bool IsAssembly { get => throw null; } + public System.Reflection.Metadata.LocalConstantHandleCollection LocalConstants { get => throw null; } + public System.Reflection.Metadata.LocalScopeHandleCollection LocalScopes { get => throw null; } + public System.Reflection.Metadata.LocalVariableHandleCollection LocalVariables { get => throw null; } + public System.Reflection.Metadata.ManifestResourceHandleCollection ManifestResources { get => throw null; } + public System.Reflection.Metadata.MemberReferenceHandleCollection MemberReferences { get => throw null; } + public System.Reflection.Metadata.MetadataKind MetadataKind { get => throw null; } + public int MetadataLength { get => throw null; } + unsafe public System.Byte* MetadataPointer { get => throw null; } + unsafe public MetadataReader(System.Byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder) => throw null; + unsafe public MetadataReader(System.Byte* metadata, int length, System.Reflection.Metadata.MetadataReaderOptions options) => throw null; + unsafe public MetadataReader(System.Byte* metadata, int length) => throw null; + public string MetadataVersion { get => throw null; } + public System.Reflection.Metadata.MethodDebugInformationHandleCollection MethodDebugInformation { get => throw null; } + public System.Reflection.Metadata.MethodDefinitionHandleCollection MethodDefinitions { get => throw null; } + public System.Reflection.Metadata.MetadataReaderOptions Options { get => throw null; } + public System.Reflection.Metadata.PropertyDefinitionHandleCollection PropertyDefinitions { get => throw null; } + public System.Reflection.Metadata.MetadataStringComparer StringComparer { get => throw null; } + public System.Reflection.Metadata.TypeDefinitionHandleCollection TypeDefinitions { get => throw null; } + public System.Reflection.Metadata.TypeReferenceHandleCollection TypeReferences { get => throw null; } + public System.Reflection.Metadata.MetadataStringDecoder UTF8Decoder { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MetadataReaderOptions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MetadataReaderOptions + { + ApplyWindowsRuntimeProjections, + Default, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Reflection.Metadata.MetadataReaderProvider` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataReaderProvider : System.IDisposable + { + public void Dispose() => throw null; + unsafe public static System.Reflection.Metadata.MetadataReaderProvider FromMetadataImage(System.Byte* start, int size) => throw null; + public static System.Reflection.Metadata.MetadataReaderProvider FromMetadataImage(System.Collections.Immutable.ImmutableArray image) => throw null; + public static System.Reflection.Metadata.MetadataReaderProvider FromMetadataStream(System.IO.Stream stream, System.Reflection.Metadata.MetadataStreamOptions options = default(System.Reflection.Metadata.MetadataStreamOptions), int size = default(int)) => throw null; + unsafe public static System.Reflection.Metadata.MetadataReaderProvider FromPortablePdbImage(System.Byte* start, int size) => throw null; + public static System.Reflection.Metadata.MetadataReaderProvider FromPortablePdbImage(System.Collections.Immutable.ImmutableArray image) => throw null; + public static System.Reflection.Metadata.MetadataReaderProvider FromPortablePdbStream(System.IO.Stream stream, System.Reflection.Metadata.MetadataStreamOptions options = default(System.Reflection.Metadata.MetadataStreamOptions), int size = default(int)) => throw null; + public System.Reflection.Metadata.MetadataReader GetMetadataReader(System.Reflection.Metadata.MetadataReaderOptions options = default(System.Reflection.Metadata.MetadataReaderOptions), System.Reflection.Metadata.MetadataStringDecoder utf8Decoder = default(System.Reflection.Metadata.MetadataStringDecoder)) => throw null; + } + + // Generated from `System.Reflection.Metadata.MetadataStreamOptions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MetadataStreamOptions + { + Default, + LeaveOpen, + // Stub generator skipped constructor + PrefetchMetadata, + } + + // Generated from `System.Reflection.Metadata.MetadataStringComparer` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MetadataStringComparer + { + public bool Equals(System.Reflection.Metadata.StringHandle handle, string value, bool ignoreCase) => throw null; + public bool Equals(System.Reflection.Metadata.StringHandle handle, string value) => throw null; + public bool Equals(System.Reflection.Metadata.NamespaceDefinitionHandle handle, string value, bool ignoreCase) => throw null; + public bool Equals(System.Reflection.Metadata.NamespaceDefinitionHandle handle, string value) => throw null; + public bool Equals(System.Reflection.Metadata.DocumentNameBlobHandle handle, string value, bool ignoreCase) => throw null; + public bool Equals(System.Reflection.Metadata.DocumentNameBlobHandle handle, string value) => throw null; + // Stub generator skipped constructor + public bool StartsWith(System.Reflection.Metadata.StringHandle handle, string value, bool ignoreCase) => throw null; + public bool StartsWith(System.Reflection.Metadata.StringHandle handle, string value) => throw null; + } + + // Generated from `System.Reflection.Metadata.MetadataStringDecoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataStringDecoder + { + public static System.Reflection.Metadata.MetadataStringDecoder DefaultUTF8 { get => throw null; } + public System.Text.Encoding Encoding { get => throw null; } + unsafe public virtual string GetString(System.Byte* bytes, int byteCount) => throw null; + public MetadataStringDecoder(System.Text.Encoding encoding) => throw null; + } + + // Generated from `System.Reflection.Metadata.MethodBodyBlock` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodBodyBlock + { + public static System.Reflection.Metadata.MethodBodyBlock Create(System.Reflection.Metadata.BlobReader reader) => throw null; + public System.Collections.Immutable.ImmutableArray ExceptionRegions { get => throw null; } + public System.Byte[] GetILBytes() => throw null; + public System.Collections.Immutable.ImmutableArray GetILContent() => throw null; + public System.Reflection.Metadata.BlobReader GetILReader() => throw null; + public System.Reflection.Metadata.StandaloneSignatureHandle LocalSignature { get => throw null; } + public bool LocalVariablesInitialized { get => throw null; } + public int MaxStack { get => throw null; } + public int Size { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodDebugInformation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDebugInformation + { + public System.Reflection.Metadata.DocumentHandle Document { get => throw null; } + public System.Reflection.Metadata.SequencePointCollection GetSequencePoints() => throw null; + public System.Reflection.Metadata.MethodDefinitionHandle GetStateMachineKickoffMethod() => throw null; + public System.Reflection.Metadata.StandaloneSignatureHandle LocalSignature { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobHandle SequencePointsBlob { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodDebugInformationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDebugInformationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.MethodDebugInformationHandle left, System.Reflection.Metadata.MethodDebugInformationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.MethodDebugInformationHandle left, System.Reflection.Metadata.MethodDebugInformationHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.MethodDebugInformationHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.MethodDefinitionHandle ToDefinitionHandle() => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.MethodDebugInformationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDebugInformationHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.MethodDebugInformationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.MethodDebugInformationHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.MethodDebugInformationHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.MethodDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDefinition + { + public System.Reflection.MethodAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.MethodSignature DecodeSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection GetDeclarativeSecurityAttributes() => throw null; + public System.Reflection.Metadata.TypeDefinitionHandle GetDeclaringType() => throw null; + public System.Reflection.Metadata.GenericParameterHandleCollection GetGenericParameters() => throw null; + public System.Reflection.Metadata.MethodImport GetImport() => throw null; + public System.Reflection.Metadata.ParameterHandleCollection GetParameters() => throw null; + public System.Reflection.MethodImplAttributes ImplAttributes { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public int RelativeVirtualAddress { get => throw null; } + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.MethodDefinitionHandle left, System.Reflection.Metadata.MethodDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.MethodDefinitionHandle left, System.Reflection.Metadata.MethodDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.MethodDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.MethodDebugInformationHandle ToDebugInformationHandle() => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.MethodDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodDefinitionHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.MethodDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.MethodDefinitionHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.MethodDefinitionHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.MethodImplementation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodImplementation + { + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.EntityHandle MethodBody { get => throw null; } + public System.Reflection.Metadata.EntityHandle MethodDeclaration { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.TypeDefinitionHandle Type { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodImplementationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodImplementationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.MethodImplementationHandle left, System.Reflection.Metadata.MethodImplementationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.MethodImplementationHandle left, System.Reflection.Metadata.MethodImplementationHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.MethodImplementationHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.MethodImplementationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodImplementationHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.MethodImplementationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.MethodImplementationHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.MethodImplementationHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.MethodImport` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodImport + { + public System.Reflection.MethodImportAttributes Attributes { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.ModuleReferenceHandle Module { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodSignature<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodSignature + { + public int GenericParameterCount { get => throw null; } + public System.Reflection.Metadata.SignatureHeader Header { get => throw null; } + public MethodSignature(System.Reflection.Metadata.SignatureHeader header, TType returnType, int requiredParameterCount, int genericParameterCount, System.Collections.Immutable.ImmutableArray parameterTypes) => throw null; + // Stub generator skipped constructor + public System.Collections.Immutable.ImmutableArray ParameterTypes { get => throw null; } + public int RequiredParameterCount { get => throw null; } + public TType ReturnType { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodSpecification` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodSpecification + { + public System.Collections.Immutable.ImmutableArray DecodeSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.EntityHandle Method { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.MethodSpecificationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodSpecificationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.MethodSpecificationHandle left, System.Reflection.Metadata.MethodSpecificationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.MethodSpecificationHandle left, System.Reflection.Metadata.MethodSpecificationHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.MethodSpecificationHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ModuleDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ModuleDefinition + { + public System.Reflection.Metadata.GuidHandle BaseGenerationId { get => throw null; } + public int Generation { get => throw null; } + public System.Reflection.Metadata.GuidHandle GenerationId { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.GuidHandle Mvid { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ModuleDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ModuleDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ModuleDefinitionHandle left, System.Reflection.Metadata.ModuleDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ModuleDefinitionHandle left, System.Reflection.Metadata.ModuleDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ModuleDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ModuleReference` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ModuleReference + { + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ModuleReferenceHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ModuleReferenceHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ModuleReferenceHandle left, System.Reflection.Metadata.ModuleReferenceHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ModuleReferenceHandle left, System.Reflection.Metadata.ModuleReferenceHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ModuleReferenceHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.NamespaceDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NamespaceDefinition + { + public System.Collections.Immutable.ImmutableArray ExportedTypes { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + // Stub generator skipped constructor + public System.Collections.Immutable.ImmutableArray NamespaceDefinitions { get => throw null; } + public System.Reflection.Metadata.NamespaceDefinitionHandle Parent { get => throw null; } + public System.Collections.Immutable.ImmutableArray TypeDefinitions { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.NamespaceDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NamespaceDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.NamespaceDefinitionHandle left, System.Reflection.Metadata.NamespaceDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.NamespaceDefinitionHandle left, System.Reflection.Metadata.NamespaceDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.NamespaceDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.PEReaderExtensions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class PEReaderExtensions + { + public static System.Reflection.Metadata.MetadataReader GetMetadataReader(this System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options, System.Reflection.Metadata.MetadataStringDecoder utf8Decoder) => throw null; + public static System.Reflection.Metadata.MetadataReader GetMetadataReader(this System.Reflection.PortableExecutable.PEReader peReader, System.Reflection.Metadata.MetadataReaderOptions options) => throw null; + public static System.Reflection.Metadata.MetadataReader GetMetadataReader(this System.Reflection.PortableExecutable.PEReader peReader) => throw null; + public static System.Reflection.Metadata.MethodBodyBlock GetMethodBody(this System.Reflection.PortableExecutable.PEReader peReader, int relativeVirtualAddress) => throw null; + } + + // Generated from `System.Reflection.Metadata.Parameter` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Parameter + { + public System.Reflection.ParameterAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.ConstantHandle GetDefaultValue() => throw null; + public System.Reflection.Metadata.BlobHandle GetMarshallingDescriptor() => throw null; + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + // Stub generator skipped constructor + public int SequenceNumber { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.ParameterHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParameterHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.ParameterHandle left, System.Reflection.Metadata.ParameterHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.ParameterHandle left, System.Reflection.Metadata.ParameterHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.ParameterHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.ParameterHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParameterHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.ParameterHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.ParameterHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.ParameterHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.PrimitiveSerializationTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PrimitiveSerializationTypeCode + { + Boolean, + Byte, + Char, + Double, + Int16, + Int32, + Int64, + // Stub generator skipped constructor + SByte, + Single, + String, + UInt16, + UInt32, + UInt64, + } + + // Generated from `System.Reflection.Metadata.PrimitiveTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PrimitiveTypeCode + { + Boolean, + Byte, + Char, + Double, + Int16, + Int32, + Int64, + IntPtr, + Object, + // Stub generator skipped constructor + SByte, + Single, + String, + TypedReference, + UInt16, + UInt32, + UInt64, + UIntPtr, + Void, + } + + // Generated from `System.Reflection.Metadata.PropertyAccessors` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PropertyAccessors + { + public System.Reflection.Metadata.MethodDefinitionHandle Getter { get => throw null; } + public System.Collections.Immutable.ImmutableArray Others { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.MethodDefinitionHandle Setter { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.PropertyDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PropertyDefinition + { + public System.Reflection.PropertyAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.MethodSignature DecodeSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.PropertyAccessors GetAccessors() => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.ConstantHandle GetDefaultValue() => throw null; + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.PropertyDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PropertyDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.PropertyDefinitionHandle left, System.Reflection.Metadata.PropertyDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.PropertyDefinitionHandle left, System.Reflection.Metadata.PropertyDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.PropertyDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.PropertyDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PropertyDefinitionHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.PropertyDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.PropertyDefinitionHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.PropertyDefinitionHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.ReservedBlob<>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ReservedBlob where THandle : struct + { + public System.Reflection.Metadata.Blob Content { get => throw null; } + public System.Reflection.Metadata.BlobWriter CreateWriter() => throw null; + public THandle Handle { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.SequencePoint` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SequencePoint : System.IEquatable + { + public System.Reflection.Metadata.DocumentHandle Document { get => throw null; } + public int EndColumn { get => throw null; } + public int EndLine { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.SequencePoint other) => throw null; + public override int GetHashCode() => throw null; + public const int HiddenLine = default; + public bool IsHidden { get => throw null; } + public int Offset { get => throw null; } + // Stub generator skipped constructor + public int StartColumn { get => throw null; } + public int StartLine { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.SequencePointCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SequencePointCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + // Generated from `System.Reflection.Metadata.SequencePointCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.SequencePoint Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Reflection.Metadata.SequencePointCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.SerializationTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SerializationTypeCode + { + Boolean, + Byte, + Char, + Double, + Enum, + Int16, + Int32, + Int64, + Invalid, + SByte, + SZArray, + // Stub generator skipped constructor + Single, + String, + TaggedObject, + Type, + UInt16, + UInt32, + UInt64, + } + + // Generated from `System.Reflection.Metadata.SignatureAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SignatureAttributes + { + ExplicitThis, + Generic, + Instance, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.SignatureCallingConvention` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SignatureCallingConvention + { + CDecl, + Default, + FastCall, + // Stub generator skipped constructor + StdCall, + ThisCall, + Unmanaged, + VarArgs, + } + + // Generated from `System.Reflection.Metadata.SignatureHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SignatureHeader : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.SignatureHeader left, System.Reflection.Metadata.SignatureHeader right) => throw null; + public static bool operator ==(System.Reflection.Metadata.SignatureHeader left, System.Reflection.Metadata.SignatureHeader right) => throw null; + public System.Reflection.Metadata.SignatureAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.SignatureCallingConvention CallingConvention { get => throw null; } + public const System.Byte CallingConventionOrKindMask = default; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.SignatureHeader other) => throw null; + public override int GetHashCode() => throw null; + public bool HasExplicitThis { get => throw null; } + public bool IsGeneric { get => throw null; } + public bool IsInstance { get => throw null; } + public System.Reflection.Metadata.SignatureKind Kind { get => throw null; } + public System.Byte RawValue { get => throw null; } + public SignatureHeader(System.Reflection.Metadata.SignatureKind kind, System.Reflection.Metadata.SignatureCallingConvention convention, System.Reflection.Metadata.SignatureAttributes attributes) => throw null; + public SignatureHeader(System.Byte rawValue) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.Metadata.SignatureKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SignatureKind + { + Field, + LocalVariables, + Method, + MethodSpecification, + Property, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.SignatureTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SignatureTypeCode + { + Array, + Boolean, + ByReference, + Byte, + Char, + Double, + FunctionPointer, + GenericMethodParameter, + GenericTypeInstance, + GenericTypeParameter, + Int16, + Int32, + Int64, + IntPtr, + Invalid, + Object, + OptionalModifier, + Pinned, + Pointer, + RequiredModifier, + SByte, + SZArray, + Sentinel, + // Stub generator skipped constructor + Single, + String, + TypeHandle, + TypedReference, + UInt16, + UInt32, + UInt64, + UIntPtr, + Void, + } + + // Generated from `System.Reflection.Metadata.SignatureTypeKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SignatureTypeKind + { + Class, + // Stub generator skipped constructor + Unknown, + ValueType, + } + + // Generated from `System.Reflection.Metadata.StandaloneSignature` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct StandaloneSignature + { + public System.Collections.Immutable.ImmutableArray DecodeLocalSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.MethodSignature DecodeMethodSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.StandaloneSignatureKind GetKind() => throw null; + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.StandaloneSignatureHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct StandaloneSignatureHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.StandaloneSignatureHandle left, System.Reflection.Metadata.StandaloneSignatureHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.StandaloneSignatureHandle left, System.Reflection.Metadata.StandaloneSignatureHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.StandaloneSignatureHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.StandaloneSignatureKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StandaloneSignatureKind + { + LocalVariables, + Method, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.StringHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct StringHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.StringHandle left, System.Reflection.Metadata.StringHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.StringHandle left, System.Reflection.Metadata.StringHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.StringHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.TypeDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeDefinition + { + public System.Reflection.TypeAttributes Attributes { get => throw null; } + public System.Reflection.Metadata.EntityHandle BaseType { get => throw null; } + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection GetDeclarativeSecurityAttributes() => throw null; + public System.Reflection.Metadata.TypeDefinitionHandle GetDeclaringType() => throw null; + public System.Reflection.Metadata.EventDefinitionHandleCollection GetEvents() => throw null; + public System.Reflection.Metadata.FieldDefinitionHandleCollection GetFields() => throw null; + public System.Reflection.Metadata.GenericParameterHandleCollection GetGenericParameters() => throw null; + public System.Reflection.Metadata.InterfaceImplementationHandleCollection GetInterfaceImplementations() => throw null; + public System.Reflection.Metadata.TypeLayout GetLayout() => throw null; + public System.Reflection.Metadata.MethodImplementationHandleCollection GetMethodImplementations() => throw null; + public System.Reflection.Metadata.MethodDefinitionHandleCollection GetMethods() => throw null; + public System.Collections.Immutable.ImmutableArray GetNestedTypes() => throw null; + public System.Reflection.Metadata.PropertyDefinitionHandleCollection GetProperties() => throw null; + public bool IsNested { get => throw null; } + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.StringHandle Namespace { get => throw null; } + public System.Reflection.Metadata.NamespaceDefinitionHandle NamespaceDefinition { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeDefinitionHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeDefinitionHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.TypeDefinitionHandle left, System.Reflection.Metadata.TypeDefinitionHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.TypeDefinitionHandle left, System.Reflection.Metadata.TypeDefinitionHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.TypeDefinitionHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.TypeDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeDefinitionHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.TypeDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.TypeDefinitionHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.TypeDefinitionHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeLayout` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeLayout + { + public bool IsDefault { get => throw null; } + public int PackingSize { get => throw null; } + public int Size { get => throw null; } + public TypeLayout(int size, int packingSize) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeReference` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeReference + { + public System.Reflection.Metadata.StringHandle Name { get => throw null; } + public System.Reflection.Metadata.StringHandle Namespace { get => throw null; } + public System.Reflection.Metadata.EntityHandle ResolutionScope { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeReferenceHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeReferenceHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.TypeReferenceHandle left, System.Reflection.Metadata.TypeReferenceHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.TypeReferenceHandle left, System.Reflection.Metadata.TypeReferenceHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.TypeReferenceHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.TypeReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeReferenceHandleCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + public int Count { get => throw null; } + // Generated from `System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Reflection.Metadata.TypeReferenceHandle Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeSpecification` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeSpecification + { + public TType DecodeSignature(System.Reflection.Metadata.ISignatureTypeProvider provider, TGenericContext genericContext) => throw null; + public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() => throw null; + public System.Reflection.Metadata.BlobHandle Signature { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.TypeSpecificationHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypeSpecificationHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.TypeSpecificationHandle left, System.Reflection.Metadata.TypeSpecificationHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.TypeSpecificationHandle left, System.Reflection.Metadata.TypeSpecificationHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.TypeSpecificationHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Reflection.Metadata.UserStringHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UserStringHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.UserStringHandle left, System.Reflection.Metadata.UserStringHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.UserStringHandle left, System.Reflection.Metadata.UserStringHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.UserStringHandle other) => throw null; + public override int GetHashCode() => throw null; + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + namespace Ecma335 + { + // Generated from `System.Reflection.Metadata.Ecma335.ArrayShapeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ArrayShapeEncoder + { + public ArrayShapeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void Shape(int rank, System.Collections.Immutable.ImmutableArray sizes, System.Collections.Immutable.ImmutableArray lowerBounds) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.BlobEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BlobEncoder + { + public BlobEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void CustomAttributeSignature(out System.Reflection.Metadata.Ecma335.FixedArgumentsEncoder fixedArguments, out System.Reflection.Metadata.Ecma335.CustomAttributeNamedArgumentsEncoder namedArguments) => throw null; + public void CustomAttributeSignature(System.Action fixedArguments, System.Action namedArguments) => throw null; + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder FieldSignature() => throw null; + public System.Reflection.Metadata.Ecma335.LocalVariablesEncoder LocalVariableSignature(int variableCount) => throw null; + public System.Reflection.Metadata.Ecma335.MethodSignatureEncoder MethodSignature(System.Reflection.Metadata.SignatureCallingConvention convention = default(System.Reflection.Metadata.SignatureCallingConvention), int genericParameterCount = default(int), bool isInstanceMethod = default(bool)) => throw null; + public System.Reflection.Metadata.Ecma335.GenericTypeArgumentsEncoder MethodSpecificationSignature(int genericArgumentCount) => throw null; + public System.Reflection.Metadata.Ecma335.NamedArgumentsEncoder PermissionSetArguments(int argumentCount) => throw null; + public System.Reflection.Metadata.Ecma335.PermissionSetEncoder PermissionSetBlob(int attributeCount) => throw null; + public System.Reflection.Metadata.Ecma335.MethodSignatureEncoder PropertySignature(bool isInstanceProperty = default(bool)) => throw null; + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder TypeSpecificationSignature() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.CodedIndex` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CodedIndex + { + public static int CustomAttributeType(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasConstant(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasCustomAttribute(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasCustomDebugInformation(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasDeclSecurity(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasFieldMarshal(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int HasSemantics(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int Implementation(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int MemberForwarded(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int MemberRefParent(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int MethodDefOrRef(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int ResolutionScope(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int TypeDefOrRef(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int TypeDefOrRefOrSpec(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int TypeOrMethodDef(System.Reflection.Metadata.EntityHandle handle) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.ControlFlowBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ControlFlowBuilder + { + public void AddCatchRegion(System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd, System.Reflection.Metadata.EntityHandle catchType) => throw null; + public void AddFaultRegion(System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd) => throw null; + public void AddFilterRegion(System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd, System.Reflection.Metadata.Ecma335.LabelHandle filterStart) => throw null; + public void AddFinallyRegion(System.Reflection.Metadata.Ecma335.LabelHandle tryStart, System.Reflection.Metadata.Ecma335.LabelHandle tryEnd, System.Reflection.Metadata.Ecma335.LabelHandle handlerStart, System.Reflection.Metadata.Ecma335.LabelHandle handlerEnd) => throw null; + public ControlFlowBuilder() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.CustomAttributeArrayTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeArrayTypeEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public CustomAttributeArrayTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.CustomAttributeElementTypeEncoder ElementType() => throw null; + public void ObjectArray() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.CustomAttributeElementTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeElementTypeEncoder + { + public void Boolean() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void Byte() => throw null; + public void Char() => throw null; + public CustomAttributeElementTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public void Double() => throw null; + public void Enum(string enumTypeName) => throw null; + public void Int16() => throw null; + public void Int32() => throw null; + public void Int64() => throw null; + public void PrimitiveType(System.Reflection.Metadata.PrimitiveSerializationTypeCode type) => throw null; + public void SByte() => throw null; + public void Single() => throw null; + public void String() => throw null; + public void SystemType() => throw null; + public void UInt16() => throw null; + public void UInt32() => throw null; + public void UInt64() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.CustomAttributeNamedArgumentsEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeNamedArgumentsEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public System.Reflection.Metadata.Ecma335.NamedArgumentsEncoder Count(int count) => throw null; + public CustomAttributeNamedArgumentsEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.CustomModifiersEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomModifiersEncoder + { + public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder AddModifier(System.Reflection.Metadata.EntityHandle type, bool isOptional) => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public CustomModifiersEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.EditAndContinueLogEntry` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EditAndContinueLogEntry : System.IEquatable + { + public EditAndContinueLogEntry(System.Reflection.Metadata.EntityHandle handle, System.Reflection.Metadata.Ecma335.EditAndContinueOperation operation) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.Ecma335.EditAndContinueLogEntry other) => throw null; + public override int GetHashCode() => throw null; + public System.Reflection.Metadata.EntityHandle Handle { get => throw null; } + public System.Reflection.Metadata.Ecma335.EditAndContinueOperation Operation { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.Ecma335.EditAndContinueOperation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EditAndContinueOperation + { + AddEvent, + AddField, + AddMethod, + AddParameter, + AddProperty, + Default, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ExceptionRegionEncoder + { + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder Add(System.Reflection.Metadata.ExceptionRegionKind kind, int tryOffset, int tryLength, int handlerOffset, int handlerLength, System.Reflection.Metadata.EntityHandle catchType = default(System.Reflection.Metadata.EntityHandle), int filterOffset = default(int)) => throw null; + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder AddCatch(int tryOffset, int tryLength, int handlerOffset, int handlerLength, System.Reflection.Metadata.EntityHandle catchType) => throw null; + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder AddFault(int tryOffset, int tryLength, int handlerOffset, int handlerLength) => throw null; + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder AddFilter(int tryOffset, int tryLength, int handlerOffset, int handlerLength, int filterOffset) => throw null; + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder AddFinally(int tryOffset, int tryLength, int handlerOffset, int handlerLength) => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + // Stub generator skipped constructor + public bool HasSmallFormat { get => throw null; } + public static bool IsSmallExceptionRegion(int startOffset, int length) => throw null; + public static bool IsSmallRegionCount(int exceptionRegionCount) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.ExportedTypeExtensions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ExportedTypeExtensions + { + public static int GetTypeDefinitionId(this System.Reflection.Metadata.ExportedType exportedType) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.FixedArgumentsEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FixedArgumentsEncoder + { + public System.Reflection.Metadata.Ecma335.LiteralEncoder AddArgument() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public FixedArgumentsEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.FunctionPointerAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FunctionPointerAttributes + { + // Stub generator skipped constructor + HasExplicitThis, + HasThis, + None, + } + + // Generated from `System.Reflection.Metadata.Ecma335.GenericTypeArgumentsEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GenericTypeArgumentsEncoder + { + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder AddArgument() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public GenericTypeArgumentsEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.HeapIndex` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HeapIndex + { + Blob, + Guid, + // Stub generator skipped constructor + String, + UserString, + } + + // Generated from `System.Reflection.Metadata.Ecma335.InstructionEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct InstructionEncoder + { + public void Branch(System.Reflection.Metadata.ILOpCode code, System.Reflection.Metadata.Ecma335.LabelHandle label) => throw null; + public void Call(System.Reflection.Metadata.MethodSpecificationHandle methodHandle) => throw null; + public void Call(System.Reflection.Metadata.MethodDefinitionHandle methodHandle) => throw null; + public void Call(System.Reflection.Metadata.MemberReferenceHandle methodHandle) => throw null; + public void Call(System.Reflection.Metadata.EntityHandle methodHandle) => throw null; + public void CallIndirect(System.Reflection.Metadata.StandaloneSignatureHandle signature) => throw null; + public System.Reflection.Metadata.BlobBuilder CodeBuilder { get => throw null; } + public System.Reflection.Metadata.Ecma335.ControlFlowBuilder ControlFlowBuilder { get => throw null; } + public System.Reflection.Metadata.Ecma335.LabelHandle DefineLabel() => throw null; + public InstructionEncoder(System.Reflection.Metadata.BlobBuilder codeBuilder, System.Reflection.Metadata.Ecma335.ControlFlowBuilder controlFlowBuilder = default(System.Reflection.Metadata.Ecma335.ControlFlowBuilder)) => throw null; + // Stub generator skipped constructor + public void LoadArgument(int argumentIndex) => throw null; + public void LoadArgumentAddress(int argumentIndex) => throw null; + public void LoadConstantI4(int value) => throw null; + public void LoadConstantI8(System.Int64 value) => throw null; + public void LoadConstantR4(float value) => throw null; + public void LoadConstantR8(double value) => throw null; + public void LoadLocal(int slotIndex) => throw null; + public void LoadLocalAddress(int slotIndex) => throw null; + public void LoadString(System.Reflection.Metadata.UserStringHandle handle) => throw null; + public void MarkLabel(System.Reflection.Metadata.Ecma335.LabelHandle label) => throw null; + public int Offset { get => throw null; } + public void OpCode(System.Reflection.Metadata.ILOpCode code) => throw null; + public void StoreArgument(int argumentIndex) => throw null; + public void StoreLocal(int slotIndex) => throw null; + public void Token(int token) => throw null; + public void Token(System.Reflection.Metadata.EntityHandle handle) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.LabelHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LabelHandle : System.IEquatable + { + public static bool operator !=(System.Reflection.Metadata.Ecma335.LabelHandle left, System.Reflection.Metadata.Ecma335.LabelHandle right) => throw null; + public static bool operator ==(System.Reflection.Metadata.Ecma335.LabelHandle left, System.Reflection.Metadata.Ecma335.LabelHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Metadata.Ecma335.LabelHandle other) => throw null; + public override int GetHashCode() => throw null; + public int Id { get => throw null; } + public bool IsNil { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.LiteralEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LiteralEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public LiteralEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.ScalarEncoder Scalar() => throw null; + public void TaggedScalar(out System.Reflection.Metadata.Ecma335.CustomAttributeElementTypeEncoder type, out System.Reflection.Metadata.Ecma335.ScalarEncoder scalar) => throw null; + public void TaggedScalar(System.Action type, System.Action scalar) => throw null; + public void TaggedVector(out System.Reflection.Metadata.Ecma335.CustomAttributeArrayTypeEncoder arrayType, out System.Reflection.Metadata.Ecma335.VectorEncoder vector) => throw null; + public void TaggedVector(System.Action arrayType, System.Action vector) => throw null; + public System.Reflection.Metadata.Ecma335.VectorEncoder Vector() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.LiteralsEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LiteralsEncoder + { + public System.Reflection.Metadata.Ecma335.LiteralEncoder AddLiteral() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public LiteralsEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.LocalVariableTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalVariableTypeEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder CustomModifiers() => throw null; + public LocalVariableTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder Type(bool isByRef = default(bool), bool isPinned = default(bool)) => throw null; + public void TypedReference() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.LocalVariablesEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LocalVariablesEncoder + { + public System.Reflection.Metadata.Ecma335.LocalVariableTypeEncoder AddVariable() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public LocalVariablesEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataAggregator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataAggregator + { + public System.Reflection.Metadata.Handle GetGenerationHandle(System.Reflection.Metadata.Handle handle, out int generation) => throw null; + public MetadataAggregator(System.Reflection.Metadata.MetadataReader baseReader, System.Collections.Generic.IReadOnlyList deltaReaders) => throw null; + public MetadataAggregator(System.Collections.Generic.IReadOnlyList baseTableRowCounts, System.Collections.Generic.IReadOnlyList baseHeapSizes, System.Collections.Generic.IReadOnlyList deltaReaders) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataBuilder + { + public System.Reflection.Metadata.AssemblyDefinitionHandle AddAssembly(System.Reflection.Metadata.StringHandle name, System.Version version, System.Reflection.Metadata.StringHandle culture, System.Reflection.Metadata.BlobHandle publicKey, System.Reflection.AssemblyFlags flags, System.Reflection.AssemblyHashAlgorithm hashAlgorithm) => throw null; + public System.Reflection.Metadata.AssemblyFileHandle AddAssemblyFile(System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle hashValue, bool containsMetadata) => throw null; + public System.Reflection.Metadata.AssemblyReferenceHandle AddAssemblyReference(System.Reflection.Metadata.StringHandle name, System.Version version, System.Reflection.Metadata.StringHandle culture, System.Reflection.Metadata.BlobHandle publicKeyOrToken, System.Reflection.AssemblyFlags flags, System.Reflection.Metadata.BlobHandle hashValue) => throw null; + public System.Reflection.Metadata.ConstantHandle AddConstant(System.Reflection.Metadata.EntityHandle parent, object value) => throw null; + public System.Reflection.Metadata.CustomAttributeHandle AddCustomAttribute(System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.EntityHandle constructor, System.Reflection.Metadata.BlobHandle value) => throw null; + public System.Reflection.Metadata.CustomDebugInformationHandle AddCustomDebugInformation(System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.GuidHandle kind, System.Reflection.Metadata.BlobHandle value) => throw null; + public System.Reflection.Metadata.DeclarativeSecurityAttributeHandle AddDeclarativeSecurityAttribute(System.Reflection.Metadata.EntityHandle parent, System.Reflection.DeclarativeSecurityAction action, System.Reflection.Metadata.BlobHandle permissionSet) => throw null; + public System.Reflection.Metadata.DocumentHandle AddDocument(System.Reflection.Metadata.BlobHandle name, System.Reflection.Metadata.GuidHandle hashAlgorithm, System.Reflection.Metadata.BlobHandle hash, System.Reflection.Metadata.GuidHandle language) => throw null; + public void AddEncLogEntry(System.Reflection.Metadata.EntityHandle entity, System.Reflection.Metadata.Ecma335.EditAndContinueOperation code) => throw null; + public void AddEncMapEntry(System.Reflection.Metadata.EntityHandle entity) => throw null; + public System.Reflection.Metadata.EventDefinitionHandle AddEvent(System.Reflection.EventAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle type) => throw null; + public void AddEventMap(System.Reflection.Metadata.TypeDefinitionHandle declaringType, System.Reflection.Metadata.EventDefinitionHandle eventList) => throw null; + public System.Reflection.Metadata.ExportedTypeHandle AddExportedType(System.Reflection.TypeAttributes attributes, System.Reflection.Metadata.StringHandle @namespace, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle implementation, int typeDefinitionId) => throw null; + public System.Reflection.Metadata.FieldDefinitionHandle AddFieldDefinition(System.Reflection.FieldAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature) => throw null; + public void AddFieldLayout(System.Reflection.Metadata.FieldDefinitionHandle field, int offset) => throw null; + public void AddFieldRelativeVirtualAddress(System.Reflection.Metadata.FieldDefinitionHandle field, int offset) => throw null; + public System.Reflection.Metadata.GenericParameterHandle AddGenericParameter(System.Reflection.Metadata.EntityHandle parent, System.Reflection.GenericParameterAttributes attributes, System.Reflection.Metadata.StringHandle name, int index) => throw null; + public System.Reflection.Metadata.GenericParameterConstraintHandle AddGenericParameterConstraint(System.Reflection.Metadata.GenericParameterHandle genericParameter, System.Reflection.Metadata.EntityHandle constraint) => throw null; + public System.Reflection.Metadata.ImportScopeHandle AddImportScope(System.Reflection.Metadata.ImportScopeHandle parentScope, System.Reflection.Metadata.BlobHandle imports) => throw null; + public System.Reflection.Metadata.InterfaceImplementationHandle AddInterfaceImplementation(System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.EntityHandle implementedInterface) => throw null; + public System.Reflection.Metadata.LocalConstantHandle AddLocalConstant(System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature) => throw null; + public System.Reflection.Metadata.LocalScopeHandle AddLocalScope(System.Reflection.Metadata.MethodDefinitionHandle method, System.Reflection.Metadata.ImportScopeHandle importScope, System.Reflection.Metadata.LocalVariableHandle variableList, System.Reflection.Metadata.LocalConstantHandle constantList, int startOffset, int length) => throw null; + public System.Reflection.Metadata.LocalVariableHandle AddLocalVariable(System.Reflection.Metadata.LocalVariableAttributes attributes, int index, System.Reflection.Metadata.StringHandle name) => throw null; + public System.Reflection.Metadata.ManifestResourceHandle AddManifestResource(System.Reflection.ManifestResourceAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle implementation, System.UInt32 offset) => throw null; + public void AddMarshallingDescriptor(System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.BlobHandle descriptor) => throw null; + public System.Reflection.Metadata.MemberReferenceHandle AddMemberReference(System.Reflection.Metadata.EntityHandle parent, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature) => throw null; + public System.Reflection.Metadata.MethodDebugInformationHandle AddMethodDebugInformation(System.Reflection.Metadata.DocumentHandle document, System.Reflection.Metadata.BlobHandle sequencePoints) => throw null; + public System.Reflection.Metadata.MethodDefinitionHandle AddMethodDefinition(System.Reflection.MethodAttributes attributes, System.Reflection.MethodImplAttributes implAttributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature, int bodyOffset, System.Reflection.Metadata.ParameterHandle parameterList) => throw null; + public System.Reflection.Metadata.MethodImplementationHandle AddMethodImplementation(System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.EntityHandle methodBody, System.Reflection.Metadata.EntityHandle methodDeclaration) => throw null; + public void AddMethodImport(System.Reflection.Metadata.MethodDefinitionHandle method, System.Reflection.MethodImportAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.ModuleReferenceHandle module) => throw null; + public void AddMethodSemantics(System.Reflection.Metadata.EntityHandle association, System.Reflection.MethodSemanticsAttributes semantics, System.Reflection.Metadata.MethodDefinitionHandle methodDefinition) => throw null; + public System.Reflection.Metadata.MethodSpecificationHandle AddMethodSpecification(System.Reflection.Metadata.EntityHandle method, System.Reflection.Metadata.BlobHandle instantiation) => throw null; + public System.Reflection.Metadata.ModuleDefinitionHandle AddModule(int generation, System.Reflection.Metadata.StringHandle moduleName, System.Reflection.Metadata.GuidHandle mvid, System.Reflection.Metadata.GuidHandle encId, System.Reflection.Metadata.GuidHandle encBaseId) => throw null; + public System.Reflection.Metadata.ModuleReferenceHandle AddModuleReference(System.Reflection.Metadata.StringHandle moduleName) => throw null; + public void AddNestedType(System.Reflection.Metadata.TypeDefinitionHandle type, System.Reflection.Metadata.TypeDefinitionHandle enclosingType) => throw null; + public System.Reflection.Metadata.ParameterHandle AddParameter(System.Reflection.ParameterAttributes attributes, System.Reflection.Metadata.StringHandle name, int sequenceNumber) => throw null; + public System.Reflection.Metadata.PropertyDefinitionHandle AddProperty(System.Reflection.PropertyAttributes attributes, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.BlobHandle signature) => throw null; + public void AddPropertyMap(System.Reflection.Metadata.TypeDefinitionHandle declaringType, System.Reflection.Metadata.PropertyDefinitionHandle propertyList) => throw null; + public System.Reflection.Metadata.StandaloneSignatureHandle AddStandaloneSignature(System.Reflection.Metadata.BlobHandle signature) => throw null; + public void AddStateMachineMethod(System.Reflection.Metadata.MethodDefinitionHandle moveNextMethod, System.Reflection.Metadata.MethodDefinitionHandle kickoffMethod) => throw null; + public System.Reflection.Metadata.TypeDefinitionHandle AddTypeDefinition(System.Reflection.TypeAttributes attributes, System.Reflection.Metadata.StringHandle @namespace, System.Reflection.Metadata.StringHandle name, System.Reflection.Metadata.EntityHandle baseType, System.Reflection.Metadata.FieldDefinitionHandle fieldList, System.Reflection.Metadata.MethodDefinitionHandle methodList) => throw null; + public void AddTypeLayout(System.Reflection.Metadata.TypeDefinitionHandle type, System.UInt16 packingSize, System.UInt32 size) => throw null; + public System.Reflection.Metadata.TypeReferenceHandle AddTypeReference(System.Reflection.Metadata.EntityHandle resolutionScope, System.Reflection.Metadata.StringHandle @namespace, System.Reflection.Metadata.StringHandle name) => throw null; + public System.Reflection.Metadata.TypeSpecificationHandle AddTypeSpecification(System.Reflection.Metadata.BlobHandle signature) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddBlob(System.Reflection.Metadata.BlobBuilder value) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddBlob(System.Collections.Immutable.ImmutableArray value) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddBlob(System.Byte[] value) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddBlobUTF16(string value) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddBlobUTF8(string value, bool allowUnpairedSurrogates = default(bool)) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddConstantBlob(object value) => throw null; + public System.Reflection.Metadata.BlobHandle GetOrAddDocumentName(string value) => throw null; + public System.Reflection.Metadata.GuidHandle GetOrAddGuid(System.Guid guid) => throw null; + public System.Reflection.Metadata.StringHandle GetOrAddString(string value) => throw null; + public System.Reflection.Metadata.UserStringHandle GetOrAddUserString(string value) => throw null; + public int GetRowCount(System.Reflection.Metadata.Ecma335.TableIndex table) => throw null; + public System.Collections.Immutable.ImmutableArray GetRowCounts() => throw null; + public MetadataBuilder(int userStringHeapStartOffset = default(int), int stringHeapStartOffset = default(int), int blobHeapStartOffset = default(int), int guidHeapStartOffset = default(int)) => throw null; + public System.Reflection.Metadata.ReservedBlob ReserveGuid() => throw null; + public System.Reflection.Metadata.ReservedBlob ReserveUserString(int length) => throw null; + public void SetCapacity(System.Reflection.Metadata.Ecma335.TableIndex table, int rowCount) => throw null; + public void SetCapacity(System.Reflection.Metadata.Ecma335.HeapIndex heap, int byteCount) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataReaderExtensions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class MetadataReaderExtensions + { + public static System.Collections.Generic.IEnumerable GetEditAndContinueLogEntries(this System.Reflection.Metadata.MetadataReader reader) => throw null; + public static System.Collections.Generic.IEnumerable GetEditAndContinueMapEntries(this System.Reflection.Metadata.MetadataReader reader) => throw null; + public static int GetHeapMetadataOffset(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Ecma335.HeapIndex heapIndex) => throw null; + public static int GetHeapSize(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Ecma335.HeapIndex heapIndex) => throw null; + public static System.Reflection.Metadata.UserStringHandle GetNextHandle(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.UserStringHandle handle) => throw null; + public static System.Reflection.Metadata.StringHandle GetNextHandle(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.StringHandle handle) => throw null; + public static System.Reflection.Metadata.BlobHandle GetNextHandle(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.BlobHandle handle) => throw null; + public static int GetTableMetadataOffset(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Ecma335.TableIndex tableIndex) => throw null; + public static int GetTableRowCount(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Ecma335.TableIndex tableIndex) => throw null; + public static int GetTableRowSize(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Ecma335.TableIndex tableIndex) => throw null; + public static System.Collections.Generic.IEnumerable GetTypesWithEvents(this System.Reflection.Metadata.MetadataReader reader) => throw null; + public static System.Collections.Generic.IEnumerable GetTypesWithProperties(this System.Reflection.Metadata.MetadataReader reader) => throw null; + public static System.Reflection.Metadata.SignatureTypeKind ResolveSignatureTypeKind(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.EntityHandle typeHandle, System.Byte rawTypeKind) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataRootBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataRootBuilder + { + public MetadataRootBuilder(System.Reflection.Metadata.Ecma335.MetadataBuilder tablesAndHeaps, string metadataVersion = default(string), bool suppressValidation = default(bool)) => throw null; + public string MetadataVersion { get => throw null; } + public void Serialize(System.Reflection.Metadata.BlobBuilder builder, int methodBodyStreamRva, int mappedFieldDataStreamRva) => throw null; + public System.Reflection.Metadata.Ecma335.MetadataSizes Sizes { get => throw null; } + public bool SuppressValidation { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataSizes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MetadataSizes + { + public System.Collections.Immutable.ImmutableArray ExternalRowCounts { get => throw null; } + public int GetAlignedHeapSize(System.Reflection.Metadata.Ecma335.HeapIndex index) => throw null; + public System.Collections.Immutable.ImmutableArray HeapSizes { get => throw null; } + public System.Collections.Immutable.ImmutableArray RowCounts { get => throw null; } + } + + // Generated from `System.Reflection.Metadata.Ecma335.MetadataTokens` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class MetadataTokens + { + public static System.Reflection.Metadata.AssemblyFileHandle AssemblyFileHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.AssemblyReferenceHandle AssemblyReferenceHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.BlobHandle BlobHandle(int offset) => throw null; + public static System.Reflection.Metadata.ConstantHandle ConstantHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.CustomAttributeHandle CustomAttributeHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.CustomDebugInformationHandle CustomDebugInformationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.DeclarativeSecurityAttributeHandle DeclarativeSecurityAttributeHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.DocumentHandle DocumentHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.DocumentNameBlobHandle DocumentNameBlobHandle(int offset) => throw null; + public static System.Reflection.Metadata.EntityHandle EntityHandle(int token) => throw null; + public static System.Reflection.Metadata.EntityHandle EntityHandle(System.Reflection.Metadata.Ecma335.TableIndex tableIndex, int rowNumber) => throw null; + public static System.Reflection.Metadata.EventDefinitionHandle EventDefinitionHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.ExportedTypeHandle ExportedTypeHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.FieldDefinitionHandle FieldDefinitionHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.GenericParameterConstraintHandle GenericParameterConstraintHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.GenericParameterHandle GenericParameterHandle(int rowNumber) => throw null; + public static int GetHeapOffset(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Handle handle) => throw null; + public static int GetHeapOffset(System.Reflection.Metadata.UserStringHandle handle) => throw null; + public static int GetHeapOffset(System.Reflection.Metadata.StringHandle handle) => throw null; + public static int GetHeapOffset(System.Reflection.Metadata.Handle handle) => throw null; + public static int GetHeapOffset(System.Reflection.Metadata.GuidHandle handle) => throw null; + public static int GetHeapOffset(System.Reflection.Metadata.BlobHandle handle) => throw null; + public static int GetRowNumber(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int GetRowNumber(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int GetToken(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Handle handle) => throw null; + public static int GetToken(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.EntityHandle handle) => throw null; + public static int GetToken(System.Reflection.Metadata.Handle handle) => throw null; + public static int GetToken(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static System.Reflection.Metadata.GuidHandle GuidHandle(int offset) => throw null; + public static System.Reflection.Metadata.Handle Handle(int token) => throw null; + public static System.Reflection.Metadata.EntityHandle Handle(System.Reflection.Metadata.Ecma335.TableIndex tableIndex, int rowNumber) => throw null; + public static int HeapCount; + public static System.Reflection.Metadata.ImportScopeHandle ImportScopeHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.InterfaceImplementationHandle InterfaceImplementationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.LocalConstantHandle LocalConstantHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.LocalScopeHandle LocalScopeHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.LocalVariableHandle LocalVariableHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.ManifestResourceHandle ManifestResourceHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.MemberReferenceHandle MemberReferenceHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.MethodDebugInformationHandle MethodDebugInformationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.MethodDefinitionHandle MethodDefinitionHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.MethodImplementationHandle MethodImplementationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.MethodSpecificationHandle MethodSpecificationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.ModuleReferenceHandle ModuleReferenceHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.ParameterHandle ParameterHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.PropertyDefinitionHandle PropertyDefinitionHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.StandaloneSignatureHandle StandaloneSignatureHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.StringHandle StringHandle(int offset) => throw null; + public static int TableCount; + public static bool TryGetHeapIndex(System.Reflection.Metadata.HandleKind type, out System.Reflection.Metadata.Ecma335.HeapIndex index) => throw null; + public static bool TryGetTableIndex(System.Reflection.Metadata.HandleKind type, out System.Reflection.Metadata.Ecma335.TableIndex index) => throw null; + public static System.Reflection.Metadata.TypeDefinitionHandle TypeDefinitionHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.TypeReferenceHandle TypeReferenceHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.TypeSpecificationHandle TypeSpecificationHandle(int rowNumber) => throw null; + public static System.Reflection.Metadata.UserStringHandle UserStringHandle(int offset) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.MethodBodyAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MethodBodyAttributes + { + InitLocals, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodBodyStreamEncoder + { + public int AddMethodBody(System.Reflection.Metadata.Ecma335.InstructionEncoder instructionEncoder, int maxStack, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes) => throw null; + public int AddMethodBody(System.Reflection.Metadata.Ecma335.InstructionEncoder instructionEncoder, int maxStack = default(int), System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default(System.Reflection.Metadata.StandaloneSignatureHandle), System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = default(System.Reflection.Metadata.Ecma335.MethodBodyAttributes), bool hasDynamicStackAllocation = default(bool)) => throw null; + public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody(int codeSize, int maxStack, int exceptionRegionCount, bool hasSmallExceptionRegions, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes) => throw null; + public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody(int codeSize, int maxStack = default(int), int exceptionRegionCount = default(int), bool hasSmallExceptionRegions = default(bool), System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default(System.Reflection.Metadata.StandaloneSignatureHandle), System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = default(System.Reflection.Metadata.Ecma335.MethodBodyAttributes), bool hasDynamicStackAllocation = default(bool)) => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + // Generated from `System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodBody + { + public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder ExceptionRegions { get => throw null; } + public System.Reflection.Metadata.Blob Instructions { get => throw null; } + // Stub generator skipped constructor + public int Offset { get => throw null; } + } + + + public MethodBodyStreamEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.MethodSignatureEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MethodSignatureEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public bool HasVarArgs { get => throw null; } + public MethodSignatureEncoder(System.Reflection.Metadata.BlobBuilder builder, bool hasVarArgs) => throw null; + // Stub generator skipped constructor + public void Parameters(int parameterCount, out System.Reflection.Metadata.Ecma335.ReturnTypeEncoder returnType, out System.Reflection.Metadata.Ecma335.ParametersEncoder parameters) => throw null; + public void Parameters(int parameterCount, System.Action returnType, System.Action parameters) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.NameEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NameEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void Name(string name) => throw null; + public NameEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.NamedArgumentTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NamedArgumentTypeEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public NamedArgumentTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public void Object() => throw null; + public System.Reflection.Metadata.Ecma335.CustomAttributeArrayTypeEncoder SZArray() => throw null; + public System.Reflection.Metadata.Ecma335.CustomAttributeElementTypeEncoder ScalarType() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.NamedArgumentsEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NamedArgumentsEncoder + { + public void AddArgument(bool isField, out System.Reflection.Metadata.Ecma335.NamedArgumentTypeEncoder type, out System.Reflection.Metadata.Ecma335.NameEncoder name, out System.Reflection.Metadata.Ecma335.LiteralEncoder literal) => throw null; + public void AddArgument(bool isField, System.Action type, System.Action name, System.Action literal) => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public NamedArgumentsEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.ParameterTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParameterTypeEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder CustomModifiers() => throw null; + public ParameterTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder Type(bool isByRef = default(bool)) => throw null; + public void TypedReference() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.ParametersEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParametersEncoder + { + public System.Reflection.Metadata.Ecma335.ParameterTypeEncoder AddParameter() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public bool HasVarArgs { get => throw null; } + public ParametersEncoder(System.Reflection.Metadata.BlobBuilder builder, bool hasVarArgs = default(bool)) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.ParametersEncoder StartVarArgs() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.PermissionSetEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PermissionSetEncoder + { + public System.Reflection.Metadata.Ecma335.PermissionSetEncoder AddPermission(string typeName, System.Reflection.Metadata.BlobBuilder encodedArguments) => throw null; + public System.Reflection.Metadata.Ecma335.PermissionSetEncoder AddPermission(string typeName, System.Collections.Immutable.ImmutableArray encodedArguments) => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public PermissionSetEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.PortablePdbBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PortablePdbBuilder + { + public System.UInt16 FormatVersion { get => throw null; } + public System.Func, System.Reflection.Metadata.BlobContentId> IdProvider { get => throw null; } + public string MetadataVersion { get => throw null; } + public PortablePdbBuilder(System.Reflection.Metadata.Ecma335.MetadataBuilder tablesAndHeaps, System.Collections.Immutable.ImmutableArray typeSystemRowCounts, System.Reflection.Metadata.MethodDefinitionHandle entryPoint, System.Func, System.Reflection.Metadata.BlobContentId> idProvider = default(System.Func, System.Reflection.Metadata.BlobContentId>)) => throw null; + public System.Reflection.Metadata.BlobContentId Serialize(System.Reflection.Metadata.BlobBuilder builder) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.ReturnTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ReturnTypeEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder CustomModifiers() => throw null; + public ReturnTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder Type(bool isByRef = default(bool)) => throw null; + public void TypedReference() => throw null; + public void Void() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.ScalarEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ScalarEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void Constant(object value) => throw null; + public void NullArray() => throw null; + public ScalarEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public void SystemType(string serializedTypeName) => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.SignatureDecoder<,>` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SignatureDecoder + { + public TType DecodeFieldSignature(ref System.Reflection.Metadata.BlobReader blobReader) => throw null; + public System.Collections.Immutable.ImmutableArray DecodeLocalSignature(ref System.Reflection.Metadata.BlobReader blobReader) => throw null; + public System.Reflection.Metadata.MethodSignature DecodeMethodSignature(ref System.Reflection.Metadata.BlobReader blobReader) => throw null; + public System.Collections.Immutable.ImmutableArray DecodeMethodSpecificationSignature(ref System.Reflection.Metadata.BlobReader blobReader) => throw null; + public TType DecodeType(ref System.Reflection.Metadata.BlobReader blobReader, bool allowTypeSpecifications = default(bool)) => throw null; + public SignatureDecoder(System.Reflection.Metadata.ISignatureTypeProvider provider, System.Reflection.Metadata.MetadataReader metadataReader, TGenericContext genericContext) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Metadata.Ecma335.SignatureTypeEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SignatureTypeEncoder + { + public void Array(out System.Reflection.Metadata.Ecma335.SignatureTypeEncoder elementType, out System.Reflection.Metadata.Ecma335.ArrayShapeEncoder arrayShape) => throw null; + public void Array(System.Action elementType, System.Action arrayShape) => throw null; + public void Boolean() => throw null; + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public void Byte() => throw null; + public void Char() => throw null; + public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder CustomModifiers() => throw null; + public void Double() => throw null; + public System.Reflection.Metadata.Ecma335.MethodSignatureEncoder FunctionPointer(System.Reflection.Metadata.SignatureCallingConvention convention = default(System.Reflection.Metadata.SignatureCallingConvention), System.Reflection.Metadata.Ecma335.FunctionPointerAttributes attributes = default(System.Reflection.Metadata.Ecma335.FunctionPointerAttributes), int genericParameterCount = default(int)) => throw null; + public System.Reflection.Metadata.Ecma335.GenericTypeArgumentsEncoder GenericInstantiation(System.Reflection.Metadata.EntityHandle genericType, int genericArgumentCount, bool isValueType) => throw null; + public void GenericMethodTypeParameter(int parameterIndex) => throw null; + public void GenericTypeParameter(int parameterIndex) => throw null; + public void Int16() => throw null; + public void Int32() => throw null; + public void Int64() => throw null; + public void IntPtr() => throw null; + public void Object() => throw null; + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder Pointer() => throw null; + public void PrimitiveType(System.Reflection.Metadata.PrimitiveTypeCode type) => throw null; + public void SByte() => throw null; + public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder SZArray() => throw null; + public SignatureTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + public void Single() => throw null; + public void String() => throw null; + public void Type(System.Reflection.Metadata.EntityHandle type, bool isValueType) => throw null; + public void UInt16() => throw null; + public void UInt32() => throw null; + public void UInt64() => throw null; + public void UIntPtr() => throw null; + public void VoidPointer() => throw null; + } + + // Generated from `System.Reflection.Metadata.Ecma335.TableIndex` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TableIndex + { + Assembly, + AssemblyOS, + AssemblyProcessor, + AssemblyRef, + AssemblyRefOS, + AssemblyRefProcessor, + ClassLayout, + Constant, + CustomAttribute, + CustomDebugInformation, + DeclSecurity, + Document, + EncLog, + EncMap, + Event, + EventMap, + EventPtr, + ExportedType, + Field, + FieldLayout, + FieldMarshal, + FieldPtr, + FieldRva, + File, + GenericParam, + GenericParamConstraint, + ImplMap, + ImportScope, + InterfaceImpl, + LocalConstant, + LocalScope, + LocalVariable, + ManifestResource, + MemberRef, + MethodDebugInformation, + MethodDef, + MethodImpl, + MethodPtr, + MethodSemantics, + MethodSpec, + Module, + ModuleRef, + NestedClass, + Param, + ParamPtr, + Property, + PropertyMap, + PropertyPtr, + StandAloneSig, + StateMachineMethod, + // Stub generator skipped constructor + TypeDef, + TypeRef, + TypeSpec, + } + + // Generated from `System.Reflection.Metadata.Ecma335.VectorEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct VectorEncoder + { + public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } + public System.Reflection.Metadata.Ecma335.LiteralsEncoder Count(int count) => throw null; + public VectorEncoder(System.Reflection.Metadata.BlobBuilder builder) => throw null; + // Stub generator skipped constructor + } + + } + } + namespace PortableExecutable + { + // Generated from `System.Reflection.PortableExecutable.Characteristics` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum Characteristics + { + AggressiveWSTrim, + Bit32Machine, + BytesReversedHi, + BytesReversedLo, + // Stub generator skipped constructor + DebugStripped, + Dll, + ExecutableImage, + LargeAddressAware, + LineNumsStripped, + LocalSymsStripped, + NetRunFromSwap, + RelocsStripped, + RemovableRunFromSwap, + System, + UpSystemOnly, + } + + // Generated from `System.Reflection.PortableExecutable.CodeViewDebugDirectoryData` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CodeViewDebugDirectoryData + { + public int Age { get => throw null; } + // Stub generator skipped constructor + public System.Guid Guid { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.CoffHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CoffHeader + { + public System.Reflection.PortableExecutable.Characteristics Characteristics { get => throw null; } + public System.Reflection.PortableExecutable.Machine Machine { get => throw null; } + public System.Int16 NumberOfSections { get => throw null; } + public int NumberOfSymbols { get => throw null; } + public int PointerToSymbolTable { get => throw null; } + public System.Int16 SizeOfOptionalHeader { get => throw null; } + public int TimeDateStamp { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.CorFlags` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CorFlags + { + // Stub generator skipped constructor + ILLibrary, + ILOnly, + NativeEntryPoint, + Prefers32Bit, + Requires32Bit, + StrongNameSigned, + TrackDebugData, + } + + // Generated from `System.Reflection.PortableExecutable.CorHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CorHeader + { + public System.Reflection.PortableExecutable.DirectoryEntry CodeManagerTableDirectory { get => throw null; } + public int EntryPointTokenOrRelativeVirtualAddress { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ExportAddressTableJumpsDirectory { get => throw null; } + public System.Reflection.PortableExecutable.CorFlags Flags { get => throw null; } + public System.UInt16 MajorRuntimeVersion { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ManagedNativeHeaderDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry MetadataDirectory { get => throw null; } + public System.UInt16 MinorRuntimeVersion { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ResourcesDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry StrongNameSignatureDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry VtableFixupsDirectory { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.DebugDirectoryBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebugDirectoryBuilder + { + public void AddCodeViewEntry(string pdbPath, System.Reflection.Metadata.BlobContentId pdbContentId, System.UInt16 portablePdbVersion) => throw null; + public void AddEmbeddedPortablePdbEntry(System.Reflection.Metadata.BlobBuilder debugMetadata, System.UInt16 portablePdbVersion) => throw null; + public void AddEntry(System.Reflection.PortableExecutable.DebugDirectoryEntryType type, System.UInt32 version, System.UInt32 stamp, TData data, System.Action dataSerializer) => throw null; + public void AddEntry(System.Reflection.PortableExecutable.DebugDirectoryEntryType type, System.UInt32 version, System.UInt32 stamp) => throw null; + public void AddPdbChecksumEntry(string algorithmName, System.Collections.Immutable.ImmutableArray checksum) => throw null; + public void AddReproducibleEntry() => throw null; + public DebugDirectoryBuilder() => throw null; + } + + // Generated from `System.Reflection.PortableExecutable.DebugDirectoryEntry` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DebugDirectoryEntry + { + public int DataPointer { get => throw null; } + public int DataRelativeVirtualAddress { get => throw null; } + public int DataSize { get => throw null; } + public DebugDirectoryEntry(System.UInt32 stamp, System.UInt16 majorVersion, System.UInt16 minorVersion, System.Reflection.PortableExecutable.DebugDirectoryEntryType type, int dataSize, int dataRelativeVirtualAddress, int dataPointer) => throw null; + // Stub generator skipped constructor + public bool IsPortableCodeView { get => throw null; } + public System.UInt16 MajorVersion { get => throw null; } + public System.UInt16 MinorVersion { get => throw null; } + public System.UInt32 Stamp { get => throw null; } + public System.Reflection.PortableExecutable.DebugDirectoryEntryType Type { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.DebugDirectoryEntryType` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DebugDirectoryEntryType + { + CodeView, + Coff, + // Stub generator skipped constructor + EmbeddedPortablePdb, + PdbChecksum, + Reproducible, + Unknown, + } + + // Generated from `System.Reflection.PortableExecutable.DirectoryEntry` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DirectoryEntry + { + public DirectoryEntry(int relativeVirtualAddress, int size) => throw null; + // Stub generator skipped constructor + public int RelativeVirtualAddress; + public int Size; + } + + // Generated from `System.Reflection.PortableExecutable.DllCharacteristics` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DllCharacteristics + { + AppContainer, + // Stub generator skipped constructor + DynamicBase, + HighEntropyVirtualAddressSpace, + NoBind, + NoIsolation, + NoSeh, + NxCompatible, + ProcessInit, + ProcessTerm, + TerminalServerAware, + ThreadInit, + ThreadTerm, + WdmDriver, + } + + // Generated from `System.Reflection.PortableExecutable.Machine` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Machine + { + AM33, + Alpha, + Alpha64, + Amd64, + Arm, + Arm64, + ArmThumb2, + Ebc, + I386, + IA64, + M32R, + MIPS16, + // Stub generator skipped constructor + MipsFpu, + MipsFpu16, + PowerPC, + PowerPCFP, + SH3, + SH3Dsp, + SH3E, + SH4, + SH5, + Thumb, + Tricore, + Unknown, + WceMipsV2, + } + + // Generated from `System.Reflection.PortableExecutable.ManagedPEBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ManagedPEBuilder : System.Reflection.PortableExecutable.PEBuilder + { + protected override System.Collections.Immutable.ImmutableArray CreateSections() => throw null; + protected internal override System.Reflection.PortableExecutable.PEDirectoriesBuilder GetDirectories() => throw null; + public ManagedPEBuilder(System.Reflection.PortableExecutable.PEHeaderBuilder header, System.Reflection.Metadata.Ecma335.MetadataRootBuilder metadataRootBuilder, System.Reflection.Metadata.BlobBuilder ilStream, System.Reflection.Metadata.BlobBuilder mappedFieldData = default(System.Reflection.Metadata.BlobBuilder), System.Reflection.Metadata.BlobBuilder managedResources = default(System.Reflection.Metadata.BlobBuilder), System.Reflection.PortableExecutable.ResourceSectionBuilder nativeResources = default(System.Reflection.PortableExecutable.ResourceSectionBuilder), System.Reflection.PortableExecutable.DebugDirectoryBuilder debugDirectoryBuilder = default(System.Reflection.PortableExecutable.DebugDirectoryBuilder), int strongNameSignatureSize = default(int), System.Reflection.Metadata.MethodDefinitionHandle entryPoint = default(System.Reflection.Metadata.MethodDefinitionHandle), System.Reflection.PortableExecutable.CorFlags flags = default(System.Reflection.PortableExecutable.CorFlags), System.Func, System.Reflection.Metadata.BlobContentId> deterministicIdProvider = default(System.Func, System.Reflection.Metadata.BlobContentId>)) : base(default(System.Reflection.PortableExecutable.PEHeaderBuilder), default(System.Func, System.Reflection.Metadata.BlobContentId>)) => throw null; + public const int ManagedResourcesDataAlignment = default; + public const int MappedFieldDataAlignment = default; + protected override System.Reflection.Metadata.BlobBuilder SerializeSection(string name, System.Reflection.PortableExecutable.SectionLocation location) => throw null; + public void Sign(System.Reflection.Metadata.BlobBuilder peImage, System.Func, System.Byte[]> signatureProvider) => throw null; + } + + // Generated from `System.Reflection.PortableExecutable.PEBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class PEBuilder + { + protected abstract System.Collections.Immutable.ImmutableArray CreateSections(); + protected internal abstract System.Reflection.PortableExecutable.PEDirectoriesBuilder GetDirectories(); + protected System.Collections.Immutable.ImmutableArray GetSections() => throw null; + public System.Reflection.PortableExecutable.PEHeaderBuilder Header { get => throw null; } + public System.Func, System.Reflection.Metadata.BlobContentId> IdProvider { get => throw null; } + public bool IsDeterministic { get => throw null; } + protected PEBuilder(System.Reflection.PortableExecutable.PEHeaderBuilder header, System.Func, System.Reflection.Metadata.BlobContentId> deterministicIdProvider) => throw null; + // Generated from `System.Reflection.PortableExecutable.PEBuilder.Section` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected struct Section + { + public System.Reflection.PortableExecutable.SectionCharacteristics Characteristics; + public string Name; + public Section(string name, System.Reflection.PortableExecutable.SectionCharacteristics characteristics) => throw null; + // Stub generator skipped constructor + } + + + public System.Reflection.Metadata.BlobContentId Serialize(System.Reflection.Metadata.BlobBuilder builder) => throw null; + protected abstract System.Reflection.Metadata.BlobBuilder SerializeSection(string name, System.Reflection.PortableExecutable.SectionLocation location); + } + + // Generated from `System.Reflection.PortableExecutable.PEDirectoriesBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PEDirectoriesBuilder + { + public int AddressOfEntryPoint { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry BaseRelocationTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry BoundImportTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry CopyrightTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry CorHeaderTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry DebugTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry DelayImportTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ExceptionTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ExportTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry GlobalPointerTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ImportAddressTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ImportTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry LoadConfigTable { get => throw null; set => throw null; } + public PEDirectoriesBuilder() => throw null; + public System.Reflection.PortableExecutable.DirectoryEntry ResourceTable { get => throw null; set => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ThreadLocalStorageTable { get => throw null; set => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.PEHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PEHeader + { + public int AddressOfEntryPoint { get => throw null; } + public int BaseOfCode { get => throw null; } + public int BaseOfData { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry BaseRelocationTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry BoundImportTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry CertificateTableDirectory { get => throw null; } + public System.UInt32 CheckSum { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry CopyrightTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry CorHeaderTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry DebugTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry DelayImportTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DllCharacteristics DllCharacteristics { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ExceptionTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ExportTableDirectory { get => throw null; } + public int FileAlignment { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry GlobalPointerTableDirectory { get => throw null; } + public System.UInt64 ImageBase { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ImportAddressTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ImportTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry LoadConfigTableDirectory { get => throw null; } + public System.Reflection.PortableExecutable.PEMagic Magic { get => throw null; } + public System.UInt16 MajorImageVersion { get => throw null; } + public System.Byte MajorLinkerVersion { get => throw null; } + public System.UInt16 MajorOperatingSystemVersion { get => throw null; } + public System.UInt16 MajorSubsystemVersion { get => throw null; } + public System.UInt16 MinorImageVersion { get => throw null; } + public System.Byte MinorLinkerVersion { get => throw null; } + public System.UInt16 MinorOperatingSystemVersion { get => throw null; } + public System.UInt16 MinorSubsystemVersion { get => throw null; } + public int NumberOfRvaAndSizes { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ResourceTableDirectory { get => throw null; } + public int SectionAlignment { get => throw null; } + public int SizeOfCode { get => throw null; } + public int SizeOfHeaders { get => throw null; } + public System.UInt64 SizeOfHeapCommit { get => throw null; } + public System.UInt64 SizeOfHeapReserve { get => throw null; } + public int SizeOfImage { get => throw null; } + public int SizeOfInitializedData { get => throw null; } + public System.UInt64 SizeOfStackCommit { get => throw null; } + public System.UInt64 SizeOfStackReserve { get => throw null; } + public int SizeOfUninitializedData { get => throw null; } + public System.Reflection.PortableExecutable.Subsystem Subsystem { get => throw null; } + public System.Reflection.PortableExecutable.DirectoryEntry ThreadLocalStorageTableDirectory { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.PEHeaderBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PEHeaderBuilder + { + public static System.Reflection.PortableExecutable.PEHeaderBuilder CreateExecutableHeader() => throw null; + public static System.Reflection.PortableExecutable.PEHeaderBuilder CreateLibraryHeader() => throw null; + public System.Reflection.PortableExecutable.DllCharacteristics DllCharacteristics { get => throw null; } + public int FileAlignment { get => throw null; } + public System.UInt64 ImageBase { get => throw null; } + public System.Reflection.PortableExecutable.Characteristics ImageCharacteristics { get => throw null; } + public System.Reflection.PortableExecutable.Machine Machine { get => throw null; } + public System.UInt16 MajorImageVersion { get => throw null; } + public System.Byte MajorLinkerVersion { get => throw null; } + public System.UInt16 MajorOperatingSystemVersion { get => throw null; } + public System.UInt16 MajorSubsystemVersion { get => throw null; } + public System.UInt16 MinorImageVersion { get => throw null; } + public System.Byte MinorLinkerVersion { get => throw null; } + public System.UInt16 MinorOperatingSystemVersion { get => throw null; } + public System.UInt16 MinorSubsystemVersion { get => throw null; } + public PEHeaderBuilder(System.Reflection.PortableExecutable.Machine machine = default(System.Reflection.PortableExecutable.Machine), int sectionAlignment = default(int), int fileAlignment = default(int), System.UInt64 imageBase = default(System.UInt64), System.Byte majorLinkerVersion = default(System.Byte), System.Byte minorLinkerVersion = default(System.Byte), System.UInt16 majorOperatingSystemVersion = default(System.UInt16), System.UInt16 minorOperatingSystemVersion = default(System.UInt16), System.UInt16 majorImageVersion = default(System.UInt16), System.UInt16 minorImageVersion = default(System.UInt16), System.UInt16 majorSubsystemVersion = default(System.UInt16), System.UInt16 minorSubsystemVersion = default(System.UInt16), System.Reflection.PortableExecutable.Subsystem subsystem = default(System.Reflection.PortableExecutable.Subsystem), System.Reflection.PortableExecutable.DllCharacteristics dllCharacteristics = default(System.Reflection.PortableExecutable.DllCharacteristics), System.Reflection.PortableExecutable.Characteristics imageCharacteristics = default(System.Reflection.PortableExecutable.Characteristics), System.UInt64 sizeOfStackReserve = default(System.UInt64), System.UInt64 sizeOfStackCommit = default(System.UInt64), System.UInt64 sizeOfHeapReserve = default(System.UInt64), System.UInt64 sizeOfHeapCommit = default(System.UInt64)) => throw null; + public int SectionAlignment { get => throw null; } + public System.UInt64 SizeOfHeapCommit { get => throw null; } + public System.UInt64 SizeOfHeapReserve { get => throw null; } + public System.UInt64 SizeOfStackCommit { get => throw null; } + public System.UInt64 SizeOfStackReserve { get => throw null; } + public System.Reflection.PortableExecutable.Subsystem Subsystem { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.PEHeaders` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PEHeaders + { + public System.Reflection.PortableExecutable.CoffHeader CoffHeader { get => throw null; } + public int CoffHeaderStartOffset { get => throw null; } + public System.Reflection.PortableExecutable.CorHeader CorHeader { get => throw null; } + public int CorHeaderStartOffset { get => throw null; } + public int GetContainingSectionIndex(int relativeVirtualAddress) => throw null; + public bool IsCoffOnly { get => throw null; } + public bool IsConsoleApplication { get => throw null; } + public bool IsDll { get => throw null; } + public bool IsExe { get => throw null; } + public int MetadataSize { get => throw null; } + public int MetadataStartOffset { get => throw null; } + public System.Reflection.PortableExecutable.PEHeader PEHeader { get => throw null; } + public int PEHeaderStartOffset { get => throw null; } + public PEHeaders(System.IO.Stream peStream, int size, bool isLoadedImage) => throw null; + public PEHeaders(System.IO.Stream peStream, int size) => throw null; + public PEHeaders(System.IO.Stream peStream) => throw null; + public System.Collections.Immutable.ImmutableArray SectionHeaders { get => throw null; } + public bool TryGetDirectoryOffset(System.Reflection.PortableExecutable.DirectoryEntry directory, out int offset) => throw null; + } + + // Generated from `System.Reflection.PortableExecutable.PEMagic` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PEMagic + { + PE32, + PE32Plus, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.PortableExecutable.PEMemoryBlock` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PEMemoryBlock + { + public System.Collections.Immutable.ImmutableArray GetContent(int start, int length) => throw null; + public System.Collections.Immutable.ImmutableArray GetContent() => throw null; + public System.Reflection.Metadata.BlobReader GetReader(int start, int length) => throw null; + public System.Reflection.Metadata.BlobReader GetReader() => throw null; + public int Length { get => throw null; } + // Stub generator skipped constructor + unsafe public System.Byte* Pointer { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.PEReader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PEReader : System.IDisposable + { + public void Dispose() => throw null; + public System.Reflection.PortableExecutable.PEMemoryBlock GetEntireImage() => throw null; + public System.Reflection.PortableExecutable.PEMemoryBlock GetMetadata() => throw null; + public System.Reflection.PortableExecutable.PEMemoryBlock GetSectionData(string sectionName) => throw null; + public System.Reflection.PortableExecutable.PEMemoryBlock GetSectionData(int relativeVirtualAddress) => throw null; + public bool HasMetadata { get => throw null; } + public bool IsEntireImageAvailable { get => throw null; } + public bool IsLoadedImage { get => throw null; } + public System.Reflection.PortableExecutable.PEHeaders PEHeaders { get => throw null; } + unsafe public PEReader(System.Byte* peImage, int size, bool isLoadedImage) => throw null; + unsafe public PEReader(System.Byte* peImage, int size) => throw null; + public PEReader(System.IO.Stream peStream, System.Reflection.PortableExecutable.PEStreamOptions options, int size) => throw null; + public PEReader(System.IO.Stream peStream, System.Reflection.PortableExecutable.PEStreamOptions options) => throw null; + public PEReader(System.IO.Stream peStream) => throw null; + public PEReader(System.Collections.Immutable.ImmutableArray peImage) => throw null; + public System.Reflection.PortableExecutable.CodeViewDebugDirectoryData ReadCodeViewDebugDirectoryData(System.Reflection.PortableExecutable.DebugDirectoryEntry entry) => throw null; + public System.Collections.Immutable.ImmutableArray ReadDebugDirectory() => throw null; + public System.Reflection.Metadata.MetadataReaderProvider ReadEmbeddedPortablePdbDebugDirectoryData(System.Reflection.PortableExecutable.DebugDirectoryEntry entry) => throw null; + public System.Reflection.PortableExecutable.PdbChecksumDebugDirectoryData ReadPdbChecksumDebugDirectoryData(System.Reflection.PortableExecutable.DebugDirectoryEntry entry) => throw null; + public bool TryOpenAssociatedPortablePdb(string peImagePath, System.Func pdbFileStreamProvider, out System.Reflection.Metadata.MetadataReaderProvider pdbReaderProvider, out string pdbPath) => throw null; + } + + // Generated from `System.Reflection.PortableExecutable.PEStreamOptions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PEStreamOptions + { + Default, + IsLoadedImage, + LeaveOpen, + // Stub generator skipped constructor + PrefetchEntireImage, + PrefetchMetadata, + } + + // Generated from `System.Reflection.PortableExecutable.PdbChecksumDebugDirectoryData` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PdbChecksumDebugDirectoryData + { + public string AlgorithmName { get => throw null; } + public System.Collections.Immutable.ImmutableArray Checksum { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.PortableExecutable.ResourceSectionBuilder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ResourceSectionBuilder + { + protected ResourceSectionBuilder() => throw null; + protected internal abstract void Serialize(System.Reflection.Metadata.BlobBuilder builder, System.Reflection.PortableExecutable.SectionLocation location); + } + + // Generated from `System.Reflection.PortableExecutable.SectionCharacteristics` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SectionCharacteristics + { + Align1024Bytes, + Align128Bytes, + Align16Bytes, + Align1Bytes, + Align2048Bytes, + Align256Bytes, + Align2Bytes, + Align32Bytes, + Align4096Bytes, + Align4Bytes, + Align512Bytes, + Align64Bytes, + Align8192Bytes, + Align8Bytes, + AlignMask, + ContainsCode, + ContainsInitializedData, + ContainsUninitializedData, + GPRel, + LinkerComdat, + LinkerInfo, + LinkerNRelocOvfl, + LinkerOther, + LinkerRemove, + Mem16Bit, + MemDiscardable, + MemExecute, + MemFardata, + MemLocked, + MemNotCached, + MemNotPaged, + MemPreload, + MemProtected, + MemPurgeable, + MemRead, + MemShared, + MemSysheap, + MemWrite, + NoDeferSpecExc, + // Stub generator skipped constructor + TypeCopy, + TypeDSect, + TypeGroup, + TypeNoLoad, + TypeNoPad, + TypeOver, + TypeReg, + } + + // Generated from `System.Reflection.PortableExecutable.SectionHeader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SectionHeader + { + public string Name { get => throw null; } + public System.UInt16 NumberOfLineNumbers { get => throw null; } + public System.UInt16 NumberOfRelocations { get => throw null; } + public int PointerToLineNumbers { get => throw null; } + public int PointerToRawData { get => throw null; } + public int PointerToRelocations { get => throw null; } + public System.Reflection.PortableExecutable.SectionCharacteristics SectionCharacteristics { get => throw null; } + // Stub generator skipped constructor + public int SizeOfRawData { get => throw null; } + public int VirtualAddress { get => throw null; } + public int VirtualSize { get => throw null; } + } + + // Generated from `System.Reflection.PortableExecutable.SectionLocation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SectionLocation + { + public int PointerToRawData { get => throw null; } + public int RelativeVirtualAddress { get => throw null; } + public SectionLocation(int relativeVirtualAddress, int pointerToRawData) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.PortableExecutable.Subsystem` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Subsystem + { + EfiApplication, + EfiBootServiceDriver, + EfiRom, + EfiRuntimeDriver, + Native, + NativeWindows, + OS2Cui, + PosixCui, + // Stub generator skipped constructor + Unknown, + WindowsBootApplication, + WindowsCEGui, + WindowsCui, + WindowsGui, + Xbox, + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs new file mode 100644 index 000000000000..18aafc27ab45 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs @@ -0,0 +1,364 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + namespace Emit + { + // Generated from `System.Reflection.Emit.FlowControl` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FlowControl + { + Branch, + Break, + Call, + Cond_Branch, + // Stub generator skipped constructor + Meta, + Next, + Phi, + Return, + Throw, + } + + // Generated from `System.Reflection.Emit.OpCode` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct OpCode : System.IEquatable + { + public static bool operator !=(System.Reflection.Emit.OpCode a, System.Reflection.Emit.OpCode b) => throw null; + public static bool operator ==(System.Reflection.Emit.OpCode a, System.Reflection.Emit.OpCode b) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Reflection.Emit.OpCode obj) => throw null; + public System.Reflection.Emit.FlowControl FlowControl { get => throw null; } + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + // Stub generator skipped constructor + public System.Reflection.Emit.OpCodeType OpCodeType { get => throw null; } + public System.Reflection.Emit.OperandType OperandType { get => throw null; } + public int Size { get => throw null; } + public System.Reflection.Emit.StackBehaviour StackBehaviourPop { get => throw null; } + public System.Reflection.Emit.StackBehaviour StackBehaviourPush { get => throw null; } + public override string ToString() => throw null; + public System.Int16 Value { get => throw null; } + } + + // Generated from `System.Reflection.Emit.OpCodeType` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OpCodeType + { + Annotation, + Macro, + Nternal, + Objmodel, + // Stub generator skipped constructor + Prefix, + Primitive, + } + + // Generated from `System.Reflection.Emit.OpCodes` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OpCodes + { + public static System.Reflection.Emit.OpCode Add; + public static System.Reflection.Emit.OpCode Add_Ovf; + public static System.Reflection.Emit.OpCode Add_Ovf_Un; + public static System.Reflection.Emit.OpCode And; + public static System.Reflection.Emit.OpCode Arglist; + public static System.Reflection.Emit.OpCode Beq; + public static System.Reflection.Emit.OpCode Beq_S; + public static System.Reflection.Emit.OpCode Bge; + public static System.Reflection.Emit.OpCode Bge_S; + public static System.Reflection.Emit.OpCode Bge_Un; + public static System.Reflection.Emit.OpCode Bge_Un_S; + public static System.Reflection.Emit.OpCode Bgt; + public static System.Reflection.Emit.OpCode Bgt_S; + public static System.Reflection.Emit.OpCode Bgt_Un; + public static System.Reflection.Emit.OpCode Bgt_Un_S; + public static System.Reflection.Emit.OpCode Ble; + public static System.Reflection.Emit.OpCode Ble_S; + public static System.Reflection.Emit.OpCode Ble_Un; + public static System.Reflection.Emit.OpCode Ble_Un_S; + public static System.Reflection.Emit.OpCode Blt; + public static System.Reflection.Emit.OpCode Blt_S; + public static System.Reflection.Emit.OpCode Blt_Un; + public static System.Reflection.Emit.OpCode Blt_Un_S; + public static System.Reflection.Emit.OpCode Bne_Un; + public static System.Reflection.Emit.OpCode Bne_Un_S; + public static System.Reflection.Emit.OpCode Box; + public static System.Reflection.Emit.OpCode Br; + public static System.Reflection.Emit.OpCode Br_S; + public static System.Reflection.Emit.OpCode Break; + public static System.Reflection.Emit.OpCode Brfalse; + public static System.Reflection.Emit.OpCode Brfalse_S; + public static System.Reflection.Emit.OpCode Brtrue; + public static System.Reflection.Emit.OpCode Brtrue_S; + public static System.Reflection.Emit.OpCode Call; + public static System.Reflection.Emit.OpCode Calli; + public static System.Reflection.Emit.OpCode Callvirt; + public static System.Reflection.Emit.OpCode Castclass; + public static System.Reflection.Emit.OpCode Ceq; + public static System.Reflection.Emit.OpCode Cgt; + public static System.Reflection.Emit.OpCode Cgt_Un; + public static System.Reflection.Emit.OpCode Ckfinite; + public static System.Reflection.Emit.OpCode Clt; + public static System.Reflection.Emit.OpCode Clt_Un; + public static System.Reflection.Emit.OpCode Constrained; + public static System.Reflection.Emit.OpCode Conv_I; + public static System.Reflection.Emit.OpCode Conv_I1; + public static System.Reflection.Emit.OpCode Conv_I2; + public static System.Reflection.Emit.OpCode Conv_I4; + public static System.Reflection.Emit.OpCode Conv_I8; + public static System.Reflection.Emit.OpCode Conv_Ovf_I; + public static System.Reflection.Emit.OpCode Conv_Ovf_I1; + public static System.Reflection.Emit.OpCode Conv_Ovf_I1_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_I2; + public static System.Reflection.Emit.OpCode Conv_Ovf_I2_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_I4; + public static System.Reflection.Emit.OpCode Conv_Ovf_I4_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_I8; + public static System.Reflection.Emit.OpCode Conv_Ovf_I8_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_I_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_U; + public static System.Reflection.Emit.OpCode Conv_Ovf_U1; + public static System.Reflection.Emit.OpCode Conv_Ovf_U1_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_U2; + public static System.Reflection.Emit.OpCode Conv_Ovf_U2_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_U4; + public static System.Reflection.Emit.OpCode Conv_Ovf_U4_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_U8; + public static System.Reflection.Emit.OpCode Conv_Ovf_U8_Un; + public static System.Reflection.Emit.OpCode Conv_Ovf_U_Un; + public static System.Reflection.Emit.OpCode Conv_R4; + public static System.Reflection.Emit.OpCode Conv_R8; + public static System.Reflection.Emit.OpCode Conv_R_Un; + public static System.Reflection.Emit.OpCode Conv_U; + public static System.Reflection.Emit.OpCode Conv_U1; + public static System.Reflection.Emit.OpCode Conv_U2; + public static System.Reflection.Emit.OpCode Conv_U4; + public static System.Reflection.Emit.OpCode Conv_U8; + public static System.Reflection.Emit.OpCode Cpblk; + public static System.Reflection.Emit.OpCode Cpobj; + public static System.Reflection.Emit.OpCode Div; + public static System.Reflection.Emit.OpCode Div_Un; + public static System.Reflection.Emit.OpCode Dup; + public static System.Reflection.Emit.OpCode Endfilter; + public static System.Reflection.Emit.OpCode Endfinally; + public static System.Reflection.Emit.OpCode Initblk; + public static System.Reflection.Emit.OpCode Initobj; + public static System.Reflection.Emit.OpCode Isinst; + public static System.Reflection.Emit.OpCode Jmp; + public static System.Reflection.Emit.OpCode Ldarg; + public static System.Reflection.Emit.OpCode Ldarg_0; + public static System.Reflection.Emit.OpCode Ldarg_1; + public static System.Reflection.Emit.OpCode Ldarg_2; + public static System.Reflection.Emit.OpCode Ldarg_3; + public static System.Reflection.Emit.OpCode Ldarg_S; + public static System.Reflection.Emit.OpCode Ldarga; + public static System.Reflection.Emit.OpCode Ldarga_S; + public static System.Reflection.Emit.OpCode Ldc_I4; + public static System.Reflection.Emit.OpCode Ldc_I4_0; + public static System.Reflection.Emit.OpCode Ldc_I4_1; + public static System.Reflection.Emit.OpCode Ldc_I4_2; + public static System.Reflection.Emit.OpCode Ldc_I4_3; + public static System.Reflection.Emit.OpCode Ldc_I4_4; + public static System.Reflection.Emit.OpCode Ldc_I4_5; + public static System.Reflection.Emit.OpCode Ldc_I4_6; + public static System.Reflection.Emit.OpCode Ldc_I4_7; + public static System.Reflection.Emit.OpCode Ldc_I4_8; + public static System.Reflection.Emit.OpCode Ldc_I4_M1; + public static System.Reflection.Emit.OpCode Ldc_I4_S; + public static System.Reflection.Emit.OpCode Ldc_I8; + public static System.Reflection.Emit.OpCode Ldc_R4; + public static System.Reflection.Emit.OpCode Ldc_R8; + public static System.Reflection.Emit.OpCode Ldelem; + public static System.Reflection.Emit.OpCode Ldelem_I; + public static System.Reflection.Emit.OpCode Ldelem_I1; + public static System.Reflection.Emit.OpCode Ldelem_I2; + public static System.Reflection.Emit.OpCode Ldelem_I4; + public static System.Reflection.Emit.OpCode Ldelem_I8; + public static System.Reflection.Emit.OpCode Ldelem_R4; + public static System.Reflection.Emit.OpCode Ldelem_R8; + public static System.Reflection.Emit.OpCode Ldelem_Ref; + public static System.Reflection.Emit.OpCode Ldelem_U1; + public static System.Reflection.Emit.OpCode Ldelem_U2; + public static System.Reflection.Emit.OpCode Ldelem_U4; + public static System.Reflection.Emit.OpCode Ldelema; + public static System.Reflection.Emit.OpCode Ldfld; + public static System.Reflection.Emit.OpCode Ldflda; + public static System.Reflection.Emit.OpCode Ldftn; + public static System.Reflection.Emit.OpCode Ldind_I; + public static System.Reflection.Emit.OpCode Ldind_I1; + public static System.Reflection.Emit.OpCode Ldind_I2; + public static System.Reflection.Emit.OpCode Ldind_I4; + public static System.Reflection.Emit.OpCode Ldind_I8; + public static System.Reflection.Emit.OpCode Ldind_R4; + public static System.Reflection.Emit.OpCode Ldind_R8; + public static System.Reflection.Emit.OpCode Ldind_Ref; + public static System.Reflection.Emit.OpCode Ldind_U1; + public static System.Reflection.Emit.OpCode Ldind_U2; + public static System.Reflection.Emit.OpCode Ldind_U4; + public static System.Reflection.Emit.OpCode Ldlen; + public static System.Reflection.Emit.OpCode Ldloc; + public static System.Reflection.Emit.OpCode Ldloc_0; + public static System.Reflection.Emit.OpCode Ldloc_1; + public static System.Reflection.Emit.OpCode Ldloc_2; + public static System.Reflection.Emit.OpCode Ldloc_3; + public static System.Reflection.Emit.OpCode Ldloc_S; + public static System.Reflection.Emit.OpCode Ldloca; + public static System.Reflection.Emit.OpCode Ldloca_S; + public static System.Reflection.Emit.OpCode Ldnull; + public static System.Reflection.Emit.OpCode Ldobj; + public static System.Reflection.Emit.OpCode Ldsfld; + public static System.Reflection.Emit.OpCode Ldsflda; + public static System.Reflection.Emit.OpCode Ldstr; + public static System.Reflection.Emit.OpCode Ldtoken; + public static System.Reflection.Emit.OpCode Ldvirtftn; + public static System.Reflection.Emit.OpCode Leave; + public static System.Reflection.Emit.OpCode Leave_S; + public static System.Reflection.Emit.OpCode Localloc; + public static System.Reflection.Emit.OpCode Mkrefany; + public static System.Reflection.Emit.OpCode Mul; + public static System.Reflection.Emit.OpCode Mul_Ovf; + public static System.Reflection.Emit.OpCode Mul_Ovf_Un; + public static System.Reflection.Emit.OpCode Neg; + public static System.Reflection.Emit.OpCode Newarr; + public static System.Reflection.Emit.OpCode Newobj; + public static System.Reflection.Emit.OpCode Nop; + public static System.Reflection.Emit.OpCode Not; + public static System.Reflection.Emit.OpCode Or; + public static System.Reflection.Emit.OpCode Pop; + public static System.Reflection.Emit.OpCode Prefix1; + public static System.Reflection.Emit.OpCode Prefix2; + public static System.Reflection.Emit.OpCode Prefix3; + public static System.Reflection.Emit.OpCode Prefix4; + public static System.Reflection.Emit.OpCode Prefix5; + public static System.Reflection.Emit.OpCode Prefix6; + public static System.Reflection.Emit.OpCode Prefix7; + public static System.Reflection.Emit.OpCode Prefixref; + public static System.Reflection.Emit.OpCode Readonly; + public static System.Reflection.Emit.OpCode Refanytype; + public static System.Reflection.Emit.OpCode Refanyval; + public static System.Reflection.Emit.OpCode Rem; + public static System.Reflection.Emit.OpCode Rem_Un; + public static System.Reflection.Emit.OpCode Ret; + public static System.Reflection.Emit.OpCode Rethrow; + public static System.Reflection.Emit.OpCode Shl; + public static System.Reflection.Emit.OpCode Shr; + public static System.Reflection.Emit.OpCode Shr_Un; + public static System.Reflection.Emit.OpCode Sizeof; + public static System.Reflection.Emit.OpCode Starg; + public static System.Reflection.Emit.OpCode Starg_S; + public static System.Reflection.Emit.OpCode Stelem; + public static System.Reflection.Emit.OpCode Stelem_I; + public static System.Reflection.Emit.OpCode Stelem_I1; + public static System.Reflection.Emit.OpCode Stelem_I2; + public static System.Reflection.Emit.OpCode Stelem_I4; + public static System.Reflection.Emit.OpCode Stelem_I8; + public static System.Reflection.Emit.OpCode Stelem_R4; + public static System.Reflection.Emit.OpCode Stelem_R8; + public static System.Reflection.Emit.OpCode Stelem_Ref; + public static System.Reflection.Emit.OpCode Stfld; + public static System.Reflection.Emit.OpCode Stind_I; + public static System.Reflection.Emit.OpCode Stind_I1; + public static System.Reflection.Emit.OpCode Stind_I2; + public static System.Reflection.Emit.OpCode Stind_I4; + public static System.Reflection.Emit.OpCode Stind_I8; + public static System.Reflection.Emit.OpCode Stind_R4; + public static System.Reflection.Emit.OpCode Stind_R8; + public static System.Reflection.Emit.OpCode Stind_Ref; + public static System.Reflection.Emit.OpCode Stloc; + public static System.Reflection.Emit.OpCode Stloc_0; + public static System.Reflection.Emit.OpCode Stloc_1; + public static System.Reflection.Emit.OpCode Stloc_2; + public static System.Reflection.Emit.OpCode Stloc_3; + public static System.Reflection.Emit.OpCode Stloc_S; + public static System.Reflection.Emit.OpCode Stobj; + public static System.Reflection.Emit.OpCode Stsfld; + public static System.Reflection.Emit.OpCode Sub; + public static System.Reflection.Emit.OpCode Sub_Ovf; + public static System.Reflection.Emit.OpCode Sub_Ovf_Un; + public static System.Reflection.Emit.OpCode Switch; + public static System.Reflection.Emit.OpCode Tailcall; + public static bool TakesSingleByteArgument(System.Reflection.Emit.OpCode inst) => throw null; + public static System.Reflection.Emit.OpCode Throw; + public static System.Reflection.Emit.OpCode Unaligned; + public static System.Reflection.Emit.OpCode Unbox; + public static System.Reflection.Emit.OpCode Unbox_Any; + public static System.Reflection.Emit.OpCode Volatile; + public static System.Reflection.Emit.OpCode Xor; + } + + // Generated from `System.Reflection.Emit.OperandType` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OperandType + { + InlineBrTarget, + InlineField, + InlineI, + InlineI8, + InlineMethod, + InlineNone, + InlinePhi, + InlineR, + InlineSig, + InlineString, + InlineSwitch, + InlineTok, + InlineType, + InlineVar, + // Stub generator skipped constructor + ShortInlineBrTarget, + ShortInlineI, + ShortInlineR, + ShortInlineVar, + } + + // Generated from `System.Reflection.Emit.PackingSize` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PackingSize + { + // Stub generator skipped constructor + Size1, + Size128, + Size16, + Size2, + Size32, + Size4, + Size64, + Size8, + Unspecified, + } + + // Generated from `System.Reflection.Emit.StackBehaviour` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StackBehaviour + { + Pop0, + Pop1, + Pop1_pop1, + Popi, + Popi_pop1, + Popi_popi, + Popi_popi8, + Popi_popi_popi, + Popi_popr4, + Popi_popr8, + Popref, + Popref_pop1, + Popref_popi, + Popref_popi_pop1, + Popref_popi_popi, + Popref_popi_popi8, + Popref_popi_popr4, + Popref_popi_popr8, + Popref_popi_popref, + Push0, + Push1, + Push1_push1, + Pushi, + Pushi8, + Pushr4, + Pushr8, + Pushref, + // Stub generator skipped constructor + Varpop, + Varpush, + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs new file mode 100644 index 000000000000..1591a6f4bfe4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs @@ -0,0 +1,96 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + // Generated from `System.Reflection.AssemblyExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class AssemblyExtensions + { + public static System.Type[] GetExportedTypes(this System.Reflection.Assembly assembly) => throw null; + public static System.Reflection.Module[] GetModules(this System.Reflection.Assembly assembly) => throw null; + public static System.Type[] GetTypes(this System.Reflection.Assembly assembly) => throw null; + } + + // Generated from `System.Reflection.EventInfoExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class EventInfoExtensions + { + public static System.Reflection.MethodInfo GetAddMethod(this System.Reflection.EventInfo eventInfo, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo GetAddMethod(this System.Reflection.EventInfo eventInfo) => throw null; + public static System.Reflection.MethodInfo GetRaiseMethod(this System.Reflection.EventInfo eventInfo, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo GetRaiseMethod(this System.Reflection.EventInfo eventInfo) => throw null; + public static System.Reflection.MethodInfo GetRemoveMethod(this System.Reflection.EventInfo eventInfo, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo GetRemoveMethod(this System.Reflection.EventInfo eventInfo) => throw null; + } + + // Generated from `System.Reflection.MemberInfoExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class MemberInfoExtensions + { + public static int GetMetadataToken(this System.Reflection.MemberInfo member) => throw null; + public static bool HasMetadataToken(this System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `System.Reflection.MethodInfoExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class MethodInfoExtensions + { + public static System.Reflection.MethodInfo GetBaseDefinition(this System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `System.Reflection.ModuleExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ModuleExtensions + { + public static System.Guid GetModuleVersionId(this System.Reflection.Module module) => throw null; + public static bool HasModuleVersionId(this System.Reflection.Module module) => throw null; + } + + // Generated from `System.Reflection.PropertyInfoExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class PropertyInfoExtensions + { + public static System.Reflection.MethodInfo[] GetAccessors(this System.Reflection.PropertyInfo property, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo[] GetAccessors(this System.Reflection.PropertyInfo property) => throw null; + public static System.Reflection.MethodInfo GetGetMethod(this System.Reflection.PropertyInfo property, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo GetGetMethod(this System.Reflection.PropertyInfo property) => throw null; + public static System.Reflection.MethodInfo GetSetMethod(this System.Reflection.PropertyInfo property, bool nonPublic) => throw null; + public static System.Reflection.MethodInfo GetSetMethod(this System.Reflection.PropertyInfo property) => throw null; + } + + // Generated from `System.Reflection.TypeExtensions` in `System.Reflection.TypeExtensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class TypeExtensions + { + public static System.Reflection.ConstructorInfo GetConstructor(this System.Type type, System.Type[] types) => throw null; + public static System.Reflection.ConstructorInfo[] GetConstructors(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.ConstructorInfo[] GetConstructors(this System.Type type) => throw null; + public static System.Reflection.MemberInfo[] GetDefaultMembers(this System.Type type) => throw null; + public static System.Reflection.EventInfo GetEvent(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.EventInfo GetEvent(this System.Type type, string name) => throw null; + public static System.Reflection.EventInfo[] GetEvents(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.EventInfo[] GetEvents(this System.Type type) => throw null; + public static System.Reflection.FieldInfo GetField(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.FieldInfo GetField(this System.Type type, string name) => throw null; + public static System.Reflection.FieldInfo[] GetFields(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.FieldInfo[] GetFields(this System.Type type) => throw null; + public static System.Type[] GetGenericArguments(this System.Type type) => throw null; + public static System.Type[] GetInterfaces(this System.Type type) => throw null; + public static System.Reflection.MemberInfo[] GetMember(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.MemberInfo[] GetMember(this System.Type type, string name) => throw null; + public static System.Reflection.MemberInfo[] GetMembers(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.MemberInfo[] GetMembers(this System.Type type) => throw null; + public static System.Reflection.MethodInfo GetMethod(this System.Type type, string name, System.Type[] types) => throw null; + public static System.Reflection.MethodInfo GetMethod(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.MethodInfo GetMethod(this System.Type type, string name) => throw null; + public static System.Reflection.MethodInfo[] GetMethods(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.MethodInfo[] GetMethods(this System.Type type) => throw null; + public static System.Type GetNestedType(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Type[] GetNestedTypes(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.PropertyInfo[] GetProperties(this System.Type type, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.PropertyInfo[] GetProperties(this System.Type type) => throw null; + public static System.Reflection.PropertyInfo GetProperty(this System.Type type, string name, System.Type returnType, System.Type[] types) => throw null; + public static System.Reflection.PropertyInfo GetProperty(this System.Type type, string name, System.Type returnType) => throw null; + public static System.Reflection.PropertyInfo GetProperty(this System.Type type, string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public static System.Reflection.PropertyInfo GetProperty(this System.Type type, string name) => throw null; + public static bool IsAssignableFrom(this System.Type type, System.Type c) => throw null; + public static bool IsInstanceOfType(this System.Type type, object o) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs new file mode 100644 index 000000000000..a8e3f223eb32 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs @@ -0,0 +1,35 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Resources + { + // Generated from `System.Resources.IResourceWriter` in `System.Resources.Writer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IResourceWriter : System.IDisposable + { + void AddResource(string name, string value); + void AddResource(string name, object value); + void AddResource(string name, System.Byte[] value); + void Close(); + void Generate(); + } + + // Generated from `System.Resources.ResourceWriter` in `System.Resources.Writer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceWriter : System.Resources.IResourceWriter, System.IDisposable + { + public void AddResource(string name, string value) => throw null; + public void AddResource(string name, object value) => throw null; + public void AddResource(string name, System.IO.Stream value, bool closeAfterWrite = default(bool)) => throw null; + public void AddResource(string name, System.IO.Stream value) => throw null; + public void AddResource(string name, System.Byte[] value) => throw null; + public void AddResourceData(string name, string typeName, System.Byte[] serializedData) => throw null; + public void Close() => throw null; + public void Dispose() => throw null; + public void Generate() => throw null; + public ResourceWriter(string fileName) => throw null; + public ResourceWriter(System.IO.Stream stream) => throw null; + public System.Func TypeNameConverter { get => throw null; set => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs new file mode 100644 index 000000000000..108204ec3ee2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs @@ -0,0 +1,54 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.Unsafe` in `System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Unsafe + { + unsafe public static void* Add(void* source, int elementOffset) => throw null; + public static T Add(ref T source, int elementOffset) => throw null; + public static T Add(ref T source, System.IntPtr elementOffset) => throw null; + public static T AddByteOffset(ref T source, System.IntPtr byteOffset) => throw null; + public static bool AreSame(ref T left, ref T right) => throw null; + public static TTo As(ref TFrom source) => throw null; + public static T As(object o) where T : class => throw null; + unsafe public static void* AsPointer(ref T value) => throw null; + unsafe public static T AsRef(void* source) => throw null; + public static T AsRef(T source) => throw null; + public static System.IntPtr ByteOffset(ref T origin, ref T target) => throw null; + unsafe public static void Copy(void* destination, ref T source) => throw null; + unsafe public static void Copy(ref T destination, void* source) => throw null; + unsafe public static void CopyBlock(void* destination, void* source, System.UInt32 byteCount) => throw null; + public static void CopyBlock(ref System.Byte destination, ref System.Byte source, System.UInt32 byteCount) => throw null; + unsafe public static void CopyBlockUnaligned(void* destination, void* source, System.UInt32 byteCount) => throw null; + public static void CopyBlockUnaligned(ref System.Byte destination, ref System.Byte source, System.UInt32 byteCount) => throw null; + unsafe public static void InitBlock(void* startAddress, System.Byte value, System.UInt32 byteCount) => throw null; + public static void InitBlock(ref System.Byte startAddress, System.Byte value, System.UInt32 byteCount) => throw null; + unsafe public static void InitBlockUnaligned(void* startAddress, System.Byte value, System.UInt32 byteCount) => throw null; + public static void InitBlockUnaligned(ref System.Byte startAddress, System.Byte value, System.UInt32 byteCount) => throw null; + public static bool IsAddressGreaterThan(ref T left, ref T right) => throw null; + public static bool IsAddressLessThan(ref T left, ref T right) => throw null; + public static bool IsNullRef(ref T source) => throw null; + public static T NullRef() => throw null; + unsafe public static T Read(void* source) => throw null; + unsafe public static T ReadUnaligned(void* source) => throw null; + public static T ReadUnaligned(ref System.Byte source) => throw null; + public static int SizeOf() => throw null; + public static void SkipInit(out T value) => throw null; + unsafe public static void* Subtract(void* source, int elementOffset) => throw null; + public static T Subtract(ref T source, int elementOffset) => throw null; + public static T Subtract(ref T source, System.IntPtr elementOffset) => throw null; + public static T SubtractByteOffset(ref T source, System.IntPtr byteOffset) => throw null; + public static T Unbox(object box) where T : struct => throw null; + unsafe public static void Write(void* destination, T value) => throw null; + unsafe public static void WriteUnaligned(void* destination, T value) => throw null; + public static void WriteUnaligned(ref System.Byte destination, T value) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs new file mode 100644 index 000000000000..0721a5d3b622 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs @@ -0,0 +1,97 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.CompilerMarshalOverride` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CompilerMarshalOverride + { + } + + // Generated from `System.Runtime.CompilerServices.CppInlineNamespaceAttribute` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CppInlineNamespaceAttribute : System.Attribute + { + public CppInlineNamespaceAttribute(string dottedName) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.HasCopySemanticsAttribute` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HasCopySemanticsAttribute : System.Attribute + { + public HasCopySemanticsAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.IsBoxed` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsBoxed + { + } + + // Generated from `System.Runtime.CompilerServices.IsByValue` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsByValue + { + } + + // Generated from `System.Runtime.CompilerServices.IsCopyConstructed` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsCopyConstructed + { + } + + // Generated from `System.Runtime.CompilerServices.IsExplicitlyDereferenced` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsExplicitlyDereferenced + { + } + + // Generated from `System.Runtime.CompilerServices.IsImplicitlyDereferenced` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsImplicitlyDereferenced + { + } + + // Generated from `System.Runtime.CompilerServices.IsJitIntrinsic` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsJitIntrinsic + { + } + + // Generated from `System.Runtime.CompilerServices.IsLong` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsLong + { + } + + // Generated from `System.Runtime.CompilerServices.IsPinned` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsPinned + { + } + + // Generated from `System.Runtime.CompilerServices.IsSignUnspecifiedByte` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsSignUnspecifiedByte + { + } + + // Generated from `System.Runtime.CompilerServices.IsUdtReturn` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsUdtReturn + { + } + + // Generated from `System.Runtime.CompilerServices.NativeCppClassAttribute` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NativeCppClassAttribute : System.Attribute + { + public NativeCppClassAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.RequiredAttributeAttribute` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RequiredAttributeAttribute : System.Attribute + { + public RequiredAttributeAttribute(System.Type requiredContract) => throw null; + public System.Type RequiredContract { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.ScopelessEnumAttribute` in `System.Runtime.CompilerServices.VisualC, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ScopelessEnumAttribute : System.Attribute + { + public ScopelessEnumAttribute() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs new file mode 100644 index 000000000000..21d418a0c014 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs @@ -0,0 +1,50 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace InteropServices + { + // Generated from `System.Runtime.InteropServices.Architecture` in `System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Architecture + { + // Stub generator skipped constructor + Arm, + Arm64, + Wasm, + X64, + X86, + } + + // Generated from `System.Runtime.InteropServices.OSPlatform` in `System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct OSPlatform : System.IEquatable + { + public static bool operator !=(System.Runtime.InteropServices.OSPlatform left, System.Runtime.InteropServices.OSPlatform right) => throw null; + public static bool operator ==(System.Runtime.InteropServices.OSPlatform left, System.Runtime.InteropServices.OSPlatform right) => throw null; + public static System.Runtime.InteropServices.OSPlatform Create(string osPlatform) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.InteropServices.OSPlatform other) => throw null; + public static System.Runtime.InteropServices.OSPlatform FreeBSD { get => throw null; } + public override int GetHashCode() => throw null; + public static System.Runtime.InteropServices.OSPlatform Linux { get => throw null; } + // Stub generator skipped constructor + public static System.Runtime.InteropServices.OSPlatform OSX { get => throw null; } + public override string ToString() => throw null; + public static System.Runtime.InteropServices.OSPlatform Windows { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.RuntimeInformation` in `System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RuntimeInformation + { + public static string FrameworkDescription { get => throw null; } + public static bool IsOSPlatform(System.Runtime.InteropServices.OSPlatform osPlatform) => throw null; + public static System.Runtime.InteropServices.Architecture OSArchitecture { get => throw null; } + public static string OSDescription { get => throw null; } + public static System.Runtime.InteropServices.Architecture ProcessArchitecture { get => throw null; } + public static string RuntimeIdentifier { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs new file mode 100644 index 000000000000..fae91efe5fbd --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs @@ -0,0 +1,1872 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.DataMisalignedException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataMisalignedException : System.SystemException + { + public DataMisalignedException(string message, System.Exception innerException) => throw null; + public DataMisalignedException(string message) => throw null; + public DataMisalignedException() => throw null; + } + + // Generated from `System.DllNotFoundException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DllNotFoundException : System.TypeLoadException + { + public DllNotFoundException(string message, System.Exception inner) => throw null; + public DllNotFoundException(string message) => throw null; + public DllNotFoundException() => throw null; + protected DllNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + namespace IO + { + // Generated from `System.IO.UnmanagedMemoryAccessor` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnmanagedMemoryAccessor : System.IDisposable + { + public bool CanRead { get => throw null; } + public bool CanWrite { get => throw null; } + public System.Int64 Capacity { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected void Initialize(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 capacity, System.IO.FileAccess access) => throw null; + protected bool IsOpen { get => throw null; } + public void Read(System.Int64 position, out T structure) where T : struct => throw null; + public int ReadArray(System.Int64 position, T[] array, int offset, int count) where T : struct => throw null; + public bool ReadBoolean(System.Int64 position) => throw null; + public System.Byte ReadByte(System.Int64 position) => throw null; + public System.Char ReadChar(System.Int64 position) => throw null; + public System.Decimal ReadDecimal(System.Int64 position) => throw null; + public double ReadDouble(System.Int64 position) => throw null; + public System.Int16 ReadInt16(System.Int64 position) => throw null; + public int ReadInt32(System.Int64 position) => throw null; + public System.Int64 ReadInt64(System.Int64 position) => throw null; + public System.SByte ReadSByte(System.Int64 position) => throw null; + public float ReadSingle(System.Int64 position) => throw null; + public System.UInt16 ReadUInt16(System.Int64 position) => throw null; + public System.UInt32 ReadUInt32(System.Int64 position) => throw null; + public System.UInt64 ReadUInt64(System.Int64 position) => throw null; + public UnmanagedMemoryAccessor(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 capacity, System.IO.FileAccess access) => throw null; + public UnmanagedMemoryAccessor(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 capacity) => throw null; + protected UnmanagedMemoryAccessor() => throw null; + public void Write(System.Int64 position, ref T structure) where T : struct => throw null; + public void Write(System.Int64 position, int value) => throw null; + public void Write(System.Int64 position, float value) => throw null; + public void Write(System.Int64 position, double value) => throw null; + public void Write(System.Int64 position, bool value) => throw null; + public void Write(System.Int64 position, System.UInt64 value) => throw null; + public void Write(System.Int64 position, System.UInt32 value) => throw null; + public void Write(System.Int64 position, System.UInt16 value) => throw null; + public void Write(System.Int64 position, System.SByte value) => throw null; + public void Write(System.Int64 position, System.Int64 value) => throw null; + public void Write(System.Int64 position, System.Int16 value) => throw null; + public void Write(System.Int64 position, System.Decimal value) => throw null; + public void Write(System.Int64 position, System.Char value) => throw null; + public void Write(System.Int64 position, System.Byte value) => throw null; + public void WriteArray(System.Int64 position, T[] array, int offset, int count) where T : struct => throw null; + } + + } + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.IDispatchConstantAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IDispatchConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute + { + public IDispatchConstantAttribute() => throw null; + public override object Value { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.IUnknownConstantAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IUnknownConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute + { + public IUnknownConstantAttribute() => throw null; + public override object Value { get => throw null; } + } + + } + namespace InteropServices + { + // Generated from `System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AllowReversePInvokeCallsAttribute : System.Attribute + { + public AllowReversePInvokeCallsAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ArrayWithOffset` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ArrayWithOffset + { + public static bool operator !=(System.Runtime.InteropServices.ArrayWithOffset a, System.Runtime.InteropServices.ArrayWithOffset b) => throw null; + public static bool operator ==(System.Runtime.InteropServices.ArrayWithOffset a, System.Runtime.InteropServices.ArrayWithOffset b) => throw null; + public ArrayWithOffset(object array, int offset) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.InteropServices.ArrayWithOffset obj) => throw null; + public object GetArray() => throw null; + public override int GetHashCode() => throw null; + public int GetOffset() => throw null; + } + + // Generated from `System.Runtime.InteropServices.AutomationProxyAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AutomationProxyAttribute : System.Attribute + { + public AutomationProxyAttribute(bool val) => throw null; + public bool Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.BStrWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BStrWrapper + { + public BStrWrapper(string value) => throw null; + public BStrWrapper(object value) => throw null; + public string WrappedObject { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.BestFitMappingAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BestFitMappingAttribute : System.Attribute + { + public bool BestFitMapping { get => throw null; } + public BestFitMappingAttribute(bool BestFitMapping) => throw null; + public bool ThrowOnUnmappableChar; + } + + // Generated from `System.Runtime.InteropServices.COMException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class COMException : System.Runtime.InteropServices.ExternalException + { + public COMException(string message, int errorCode) => throw null; + public COMException(string message, System.Exception inner) => throw null; + public COMException(string message) => throw null; + public COMException() => throw null; + protected COMException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Runtime.InteropServices.CallingConvention` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CallingConvention + { + // Stub generator skipped constructor + Cdecl, + FastCall, + StdCall, + ThisCall, + Winapi, + } + + // Generated from `System.Runtime.InteropServices.ClassInterfaceAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ClassInterfaceAttribute : System.Attribute + { + public ClassInterfaceAttribute(System.Runtime.InteropServices.ClassInterfaceType classInterfaceType) => throw null; + public ClassInterfaceAttribute(System.Int16 classInterfaceType) => throw null; + public System.Runtime.InteropServices.ClassInterfaceType Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ClassInterfaceType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ClassInterfaceType + { + AutoDispatch, + AutoDual, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Runtime.InteropServices.CoClassAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CoClassAttribute : System.Attribute + { + public System.Type CoClass { get => throw null; } + public CoClassAttribute(System.Type coClass) => throw null; + } + + // Generated from `System.Runtime.InteropServices.CollectionsMarshal` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CollectionsMarshal + { + public static System.Span AsSpan(System.Collections.Generic.List list) => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComAliasNameAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComAliasNameAttribute : System.Attribute + { + public ComAliasNameAttribute(string alias) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ComAwareEventInfo` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComAwareEventInfo : System.Reflection.EventInfo + { + public override void AddEventHandler(object target, System.Delegate handler) => throw null; + public override System.Reflection.EventAttributes Attributes { get => throw null; } + public ComAwareEventInfo(System.Type type, string eventName) => throw null; + public override System.Type DeclaringType { get => throw null; } + public override System.Reflection.MethodInfo GetAddMethod(bool nonPublic) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public override System.Reflection.MethodInfo[] GetOtherMethods(bool nonPublic) => throw null; + public override System.Reflection.MethodInfo GetRaiseMethod(bool nonPublic) => throw null; + public override System.Reflection.MethodInfo GetRemoveMethod(bool nonPublic) => throw null; + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override int MetadataToken { get => throw null; } + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override System.Type ReflectedType { get => throw null; } + public override void RemoveEventHandler(object target, System.Delegate handler) => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComCompatibleVersionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComCompatibleVersionAttribute : System.Attribute + { + public int BuildNumber { get => throw null; } + public ComCompatibleVersionAttribute(int major, int minor, int build, int revision) => throw null; + public int MajorVersion { get => throw null; } + public int MinorVersion { get => throw null; } + public int RevisionNumber { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ComConversionLossAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComConversionLossAttribute : System.Attribute + { + public ComConversionLossAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComDefaultInterfaceAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComDefaultInterfaceAttribute : System.Attribute + { + public ComDefaultInterfaceAttribute(System.Type defaultInterface) => throw null; + public System.Type Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ComEventInterfaceAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComEventInterfaceAttribute : System.Attribute + { + public ComEventInterfaceAttribute(System.Type SourceInterface, System.Type EventProvider) => throw null; + public System.Type EventProvider { get => throw null; } + public System.Type SourceInterface { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ComEventsHelper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ComEventsHelper + { + public static void Combine(object rcw, System.Guid iid, int dispid, System.Delegate d) => throw null; + public static System.Delegate Remove(object rcw, System.Guid iid, int dispid, System.Delegate d) => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComImportAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComImportAttribute : System.Attribute + { + public ComImportAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComInterfaceType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ComInterfaceType + { + // Stub generator skipped constructor + InterfaceIsDual, + InterfaceIsIDispatch, + InterfaceIsIInspectable, + InterfaceIsIUnknown, + } + + // Generated from `System.Runtime.InteropServices.ComMemberType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ComMemberType + { + // Stub generator skipped constructor + Method, + PropGet, + PropSet, + } + + // Generated from `System.Runtime.InteropServices.ComRegisterFunctionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComRegisterFunctionAttribute : System.Attribute + { + public ComRegisterFunctionAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComSourceInterfacesAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComSourceInterfacesAttribute : System.Attribute + { + public ComSourceInterfacesAttribute(string sourceInterfaces) => throw null; + public ComSourceInterfacesAttribute(System.Type sourceInterface1, System.Type sourceInterface2, System.Type sourceInterface3, System.Type sourceInterface4) => throw null; + public ComSourceInterfacesAttribute(System.Type sourceInterface1, System.Type sourceInterface2, System.Type sourceInterface3) => throw null; + public ComSourceInterfacesAttribute(System.Type sourceInterface1, System.Type sourceInterface2) => throw null; + public ComSourceInterfacesAttribute(System.Type sourceInterface) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ComUnregisterFunctionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComUnregisterFunctionAttribute : System.Attribute + { + public ComUnregisterFunctionAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ComWrappers` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ComWrappers + { + // Generated from `System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ComInterfaceDispatch + { + // Stub generator skipped constructor + unsafe public static T GetInstance(System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* dispatchPtr) where T : class => throw null; + public System.IntPtr Vtable; + } + + + // Generated from `System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ComInterfaceEntry + { + // Stub generator skipped constructor + public System.Guid IID; + public System.IntPtr Vtable; + } + + + protected ComWrappers() => throw null; + unsafe protected abstract System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry* ComputeVtables(object obj, System.Runtime.InteropServices.CreateComInterfaceFlags flags, out int count); + protected abstract object CreateObject(System.IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags); + protected static void GetIUnknownImpl(out System.IntPtr fpQueryInterface, out System.IntPtr fpAddRef, out System.IntPtr fpRelease) => throw null; + public System.IntPtr GetOrCreateComInterfaceForObject(object instance, System.Runtime.InteropServices.CreateComInterfaceFlags flags) => throw null; + public object GetOrCreateObjectForComInstance(System.IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags) => throw null; + public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, System.Runtime.InteropServices.CreateObjectFlags flags, object wrapper) => throw null; + public static void RegisterForMarshalling(System.Runtime.InteropServices.ComWrappers instance) => throw null; + public static void RegisterForTrackerSupport(System.Runtime.InteropServices.ComWrappers instance) => throw null; + protected abstract void ReleaseObjects(System.Collections.IEnumerable objects); + } + + // Generated from `System.Runtime.InteropServices.CreateComInterfaceFlags` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CreateComInterfaceFlags + { + CallerDefinedIUnknown, + // Stub generator skipped constructor + None, + TrackerSupport, + } + + // Generated from `System.Runtime.InteropServices.CreateObjectFlags` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CreateObjectFlags + { + // Stub generator skipped constructor + None, + TrackerObject, + UniqueInstance, + } + + // Generated from `System.Runtime.InteropServices.CurrencyWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CurrencyWrapper + { + public CurrencyWrapper(object obj) => throw null; + public CurrencyWrapper(System.Decimal obj) => throw null; + public System.Decimal WrappedObject { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.CustomQueryInterfaceMode` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CustomQueryInterfaceMode + { + Allow, + // Stub generator skipped constructor + Ignore, + } + + // Generated from `System.Runtime.InteropServices.CustomQueryInterfaceResult` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CustomQueryInterfaceResult + { + // Stub generator skipped constructor + Failed, + Handled, + NotHandled, + } + + // Generated from `System.Runtime.InteropServices.DefaultCharSetAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultCharSetAttribute : System.Attribute + { + public System.Runtime.InteropServices.CharSet CharSet { get => throw null; } + public DefaultCharSetAttribute(System.Runtime.InteropServices.CharSet charSet) => throw null; + } + + // Generated from `System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultDllImportSearchPathsAttribute : System.Attribute + { + public DefaultDllImportSearchPathsAttribute(System.Runtime.InteropServices.DllImportSearchPath paths) => throw null; + public System.Runtime.InteropServices.DllImportSearchPath Paths { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.DefaultParameterValueAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultParameterValueAttribute : System.Attribute + { + public DefaultParameterValueAttribute(object value) => throw null; + public object Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.DispIdAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DispIdAttribute : System.Attribute + { + public DispIdAttribute(int dispId) => throw null; + public int Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.DispatchWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DispatchWrapper + { + public DispatchWrapper(object obj) => throw null; + public object WrappedObject { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.DllImportAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DllImportAttribute : System.Attribute + { + public bool BestFitMapping; + public System.Runtime.InteropServices.CallingConvention CallingConvention; + public System.Runtime.InteropServices.CharSet CharSet; + public DllImportAttribute(string dllName) => throw null; + public string EntryPoint; + public bool ExactSpelling; + public bool PreserveSig; + public bool SetLastError; + public bool ThrowOnUnmappableChar; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.DllImportResolver` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.IntPtr DllImportResolver(string libraryName, System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportSearchPath? searchPath); + + // Generated from `System.Runtime.InteropServices.DllImportSearchPath` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DllImportSearchPath + { + ApplicationDirectory, + AssemblyDirectory, + // Stub generator skipped constructor + LegacyBehavior, + SafeDirectories, + System32, + UseDllDirectoryForDependencies, + UserDirectories, + } + + // Generated from `System.Runtime.InteropServices.DynamicInterfaceCastableImplementationAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicInterfaceCastableImplementationAttribute : System.Attribute + { + public DynamicInterfaceCastableImplementationAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.ErrorWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ErrorWrapper + { + public int ErrorCode { get => throw null; } + public ErrorWrapper(object errorCode) => throw null; + public ErrorWrapper(int errorCode) => throw null; + public ErrorWrapper(System.Exception e) => throw null; + } + + // Generated from `System.Runtime.InteropServices.GuidAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GuidAttribute : System.Attribute + { + public GuidAttribute(string guid) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.HandleCollector` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HandleCollector + { + public void Add() => throw null; + public int Count { get => throw null; } + public HandleCollector(string name, int initialThreshold, int maximumThreshold) => throw null; + public HandleCollector(string name, int initialThreshold) => throw null; + public int InitialThreshold { get => throw null; } + public int MaximumThreshold { get => throw null; } + public string Name { get => throw null; } + public void Remove() => throw null; + } + + // Generated from `System.Runtime.InteropServices.HandleRef` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct HandleRef + { + public System.IntPtr Handle { get => throw null; } + public HandleRef(object wrapper, System.IntPtr handle) => throw null; + // Stub generator skipped constructor + public static System.IntPtr ToIntPtr(System.Runtime.InteropServices.HandleRef value) => throw null; + public object Wrapper { get => throw null; } + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Runtime.InteropServices.ICustomAdapter` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomAdapter + { + object GetUnderlyingObject(); + } + + // Generated from `System.Runtime.InteropServices.ICustomFactory` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomFactory + { + System.MarshalByRefObject CreateInstance(System.Type serverType); + } + + // Generated from `System.Runtime.InteropServices.ICustomMarshaler` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomMarshaler + { + void CleanUpManagedData(object ManagedObj); + void CleanUpNativeData(System.IntPtr pNativeData); + int GetNativeDataSize(); + System.IntPtr MarshalManagedToNative(object ManagedObj); + object MarshalNativeToManaged(System.IntPtr pNativeData); + } + + // Generated from `System.Runtime.InteropServices.ICustomQueryInterface` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomQueryInterface + { + System.Runtime.InteropServices.CustomQueryInterfaceResult GetInterface(ref System.Guid iid, out System.IntPtr ppv); + } + + // Generated from `System.Runtime.InteropServices.IDynamicInterfaceCastable` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDynamicInterfaceCastable + { + System.RuntimeTypeHandle GetInterfaceImplementation(System.RuntimeTypeHandle interfaceType); + bool IsInterfaceImplemented(System.RuntimeTypeHandle interfaceType, bool throwIfNotImplemented); + } + + // Generated from `System.Runtime.InteropServices.ImportedFromTypeLibAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImportedFromTypeLibAttribute : System.Attribute + { + public ImportedFromTypeLibAttribute(string tlbFile) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.InterfaceTypeAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InterfaceTypeAttribute : System.Attribute + { + public InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType interfaceType) => throw null; + public InterfaceTypeAttribute(System.Int16 interfaceType) => throw null; + public System.Runtime.InteropServices.ComInterfaceType Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.InvalidComObjectException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidComObjectException : System.SystemException + { + public InvalidComObjectException(string message, System.Exception inner) => throw null; + public InvalidComObjectException(string message) => throw null; + public InvalidComObjectException() => throw null; + protected InvalidComObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.InvalidOleVariantTypeException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidOleVariantTypeException : System.SystemException + { + public InvalidOleVariantTypeException(string message, System.Exception inner) => throw null; + public InvalidOleVariantTypeException(string message) => throw null; + public InvalidOleVariantTypeException() => throw null; + protected InvalidOleVariantTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.LCIDConversionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LCIDConversionAttribute : System.Attribute + { + public LCIDConversionAttribute(int lcid) => throw null; + public int Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ManagedToNativeComInteropStubAttribute : System.Attribute + { + public System.Type ClassType { get => throw null; } + public ManagedToNativeComInteropStubAttribute(System.Type classType, string methodName) => throw null; + public string MethodName { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.Marshal` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Marshal + { + public static int AddRef(System.IntPtr pUnk) => throw null; + public static System.IntPtr AllocCoTaskMem(int cb) => throw null; + public static System.IntPtr AllocHGlobal(int cb) => throw null; + public static System.IntPtr AllocHGlobal(System.IntPtr cb) => throw null; + public static bool AreComObjectsAvailableForCleanup() => throw null; + public static object BindToMoniker(string monikerName) => throw null; + public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak) => throw null; + public static void CleanupUnusedObjectsInCurrentContext() => throw null; + public static void Copy(int[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(float[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(double[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(System.IntPtr[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(System.IntPtr source, int[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, float[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, double[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, System.IntPtr[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, System.Int64[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, System.Int16[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, System.Char[] destination, int startIndex, int length) => throw null; + public static void Copy(System.IntPtr source, System.Byte[] destination, int startIndex, int length) => throw null; + public static void Copy(System.Int64[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(System.Int16[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(System.Char[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static void Copy(System.Byte[] source, int startIndex, System.IntPtr destination, int length) => throw null; + public static System.IntPtr CreateAggregatedObject(System.IntPtr pOuter, T o) => throw null; + public static System.IntPtr CreateAggregatedObject(System.IntPtr pOuter, object o) => throw null; + public static object CreateWrapperOfType(object o, System.Type t) => throw null; + public static TWrapper CreateWrapperOfType(T o) => throw null; + public static void DestroyStructure(System.IntPtr ptr) => throw null; + public static void DestroyStructure(System.IntPtr ptr, System.Type structuretype) => throw null; + public static int FinalReleaseComObject(object o) => throw null; + public static void FreeBSTR(System.IntPtr ptr) => throw null; + public static void FreeCoTaskMem(System.IntPtr ptr) => throw null; + public static void FreeHGlobal(System.IntPtr hglobal) => throw null; + public static System.Guid GenerateGuidForType(System.Type type) => throw null; + public static string GenerateProgIdForType(System.Type type) => throw null; + public static System.IntPtr GetComInterfaceForObject(T o) => throw null; + public static System.IntPtr GetComInterfaceForObject(object o, System.Type T, System.Runtime.InteropServices.CustomQueryInterfaceMode mode) => throw null; + public static System.IntPtr GetComInterfaceForObject(object o, System.Type T) => throw null; + public static object GetComObjectData(object obj, object key) => throw null; + public static TDelegate GetDelegateForFunctionPointer(System.IntPtr ptr) => throw null; + public static System.Delegate GetDelegateForFunctionPointer(System.IntPtr ptr, System.Type t) => throw null; + public static int GetEndComSlot(System.Type t) => throw null; + public static int GetExceptionCode() => throw null; + public static System.Exception GetExceptionForHR(int errorCode, System.IntPtr errorInfo) => throw null; + public static System.Exception GetExceptionForHR(int errorCode) => throw null; + public static System.IntPtr GetExceptionPointers() => throw null; + public static System.IntPtr GetFunctionPointerForDelegate(TDelegate d) => throw null; + public static System.IntPtr GetFunctionPointerForDelegate(System.Delegate d) => throw null; + public static System.IntPtr GetHINSTANCE(System.Reflection.Module m) => throw null; + public static int GetHRForException(System.Exception e) => throw null; + public static int GetHRForLastWin32Error() => throw null; + public static System.IntPtr GetIDispatchForObject(object o) => throw null; + public static System.IntPtr GetIUnknownForObject(object o) => throw null; + public static int GetLastWin32Error() => throw null; + public static void GetNativeVariantForObject(T obj, System.IntPtr pDstNativeVariant) => throw null; + public static void GetNativeVariantForObject(object obj, System.IntPtr pDstNativeVariant) => throw null; + public static object GetObjectForIUnknown(System.IntPtr pUnk) => throw null; + public static object GetObjectForNativeVariant(System.IntPtr pSrcNativeVariant) => throw null; + public static T GetObjectForNativeVariant(System.IntPtr pSrcNativeVariant) => throw null; + public static object[] GetObjectsForNativeVariants(System.IntPtr aSrcNativeVariant, int cVars) => throw null; + public static T[] GetObjectsForNativeVariants(System.IntPtr aSrcNativeVariant, int cVars) => throw null; + public static int GetStartComSlot(System.Type t) => throw null; + public static System.Type GetTypeFromCLSID(System.Guid clsid) => throw null; + public static string GetTypeInfoName(System.Runtime.InteropServices.ComTypes.ITypeInfo typeInfo) => throw null; + public static object GetTypedObjectForIUnknown(System.IntPtr pUnk, System.Type t) => throw null; + public static object GetUniqueObjectForIUnknown(System.IntPtr unknown) => throw null; + public static bool IsComObject(object o) => throw null; + public static bool IsTypeVisibleFromCom(System.Type t) => throw null; + public static System.IntPtr OffsetOf(string fieldName) => throw null; + public static System.IntPtr OffsetOf(System.Type t, string fieldName) => throw null; + public static void Prelink(System.Reflection.MethodInfo m) => throw null; + public static void PrelinkAll(System.Type c) => throw null; + public static string PtrToStringAnsi(System.IntPtr ptr, int len) => throw null; + public static string PtrToStringAnsi(System.IntPtr ptr) => throw null; + public static string PtrToStringAuto(System.IntPtr ptr, int len) => throw null; + public static string PtrToStringAuto(System.IntPtr ptr) => throw null; + public static string PtrToStringBSTR(System.IntPtr ptr) => throw null; + public static string PtrToStringUTF8(System.IntPtr ptr, int byteLen) => throw null; + public static string PtrToStringUTF8(System.IntPtr ptr) => throw null; + public static string PtrToStringUni(System.IntPtr ptr, int len) => throw null; + public static string PtrToStringUni(System.IntPtr ptr) => throw null; + public static void PtrToStructure(System.IntPtr ptr, T structure) => throw null; + public static void PtrToStructure(System.IntPtr ptr, object structure) => throw null; + public static object PtrToStructure(System.IntPtr ptr, System.Type structureType) => throw null; + public static T PtrToStructure(System.IntPtr ptr) => throw null; + public static int QueryInterface(System.IntPtr pUnk, ref System.Guid iid, out System.IntPtr ppv) => throw null; + public static System.IntPtr ReAllocCoTaskMem(System.IntPtr pv, int cb) => throw null; + public static System.IntPtr ReAllocHGlobal(System.IntPtr pv, System.IntPtr cb) => throw null; + public static System.Byte ReadByte(object ptr, int ofs) => throw null; + public static System.Byte ReadByte(System.IntPtr ptr, int ofs) => throw null; + public static System.Byte ReadByte(System.IntPtr ptr) => throw null; + public static System.Int16 ReadInt16(object ptr, int ofs) => throw null; + public static System.Int16 ReadInt16(System.IntPtr ptr, int ofs) => throw null; + public static System.Int16 ReadInt16(System.IntPtr ptr) => throw null; + public static int ReadInt32(object ptr, int ofs) => throw null; + public static int ReadInt32(System.IntPtr ptr, int ofs) => throw null; + public static int ReadInt32(System.IntPtr ptr) => throw null; + public static System.Int64 ReadInt64(object ptr, int ofs) => throw null; + public static System.Int64 ReadInt64(System.IntPtr ptr, int ofs) => throw null; + public static System.Int64 ReadInt64(System.IntPtr ptr) => throw null; + public static System.IntPtr ReadIntPtr(object ptr, int ofs) => throw null; + public static System.IntPtr ReadIntPtr(System.IntPtr ptr, int ofs) => throw null; + public static System.IntPtr ReadIntPtr(System.IntPtr ptr) => throw null; + public static int Release(System.IntPtr pUnk) => throw null; + public static int ReleaseComObject(object o) => throw null; + public static System.IntPtr SecureStringToBSTR(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToCoTaskMemAnsi(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToCoTaskMemUnicode(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToGlobalAllocAnsi(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToGlobalAllocUnicode(System.Security.SecureString s) => throw null; + public static bool SetComObjectData(object obj, object key, object data) => throw null; + public static int SizeOf(T structure) => throw null; + public static int SizeOf() => throw null; + public static int SizeOf(object structure) => throw null; + public static int SizeOf(System.Type t) => throw null; + public static System.IntPtr StringToBSTR(string s) => throw null; + public static System.IntPtr StringToCoTaskMemAnsi(string s) => throw null; + public static System.IntPtr StringToCoTaskMemAuto(string s) => throw null; + public static System.IntPtr StringToCoTaskMemUTF8(string s) => throw null; + public static System.IntPtr StringToCoTaskMemUni(string s) => throw null; + public static System.IntPtr StringToHGlobalAnsi(string s) => throw null; + public static System.IntPtr StringToHGlobalAuto(string s) => throw null; + public static System.IntPtr StringToHGlobalUni(string s) => throw null; + public static void StructureToPtr(T structure, System.IntPtr ptr, bool fDeleteOld) => throw null; + public static void StructureToPtr(object structure, System.IntPtr ptr, bool fDeleteOld) => throw null; + public static int SystemDefaultCharSize; + public static int SystemMaxDBCSCharSize; + public static void ThrowExceptionForHR(int errorCode, System.IntPtr errorInfo) => throw null; + public static void ThrowExceptionForHR(int errorCode) => throw null; + public static System.IntPtr UnsafeAddrOfPinnedArrayElement(T[] arr, int index) => throw null; + public static System.IntPtr UnsafeAddrOfPinnedArrayElement(System.Array arr, int index) => throw null; + public static void WriteByte(object ptr, int ofs, System.Byte val) => throw null; + public static void WriteByte(System.IntPtr ptr, int ofs, System.Byte val) => throw null; + public static void WriteByte(System.IntPtr ptr, System.Byte val) => throw null; + public static void WriteInt16(object ptr, int ofs, System.Int16 val) => throw null; + public static void WriteInt16(object ptr, int ofs, System.Char val) => throw null; + public static void WriteInt16(System.IntPtr ptr, int ofs, System.Int16 val) => throw null; + public static void WriteInt16(System.IntPtr ptr, int ofs, System.Char val) => throw null; + public static void WriteInt16(System.IntPtr ptr, System.Int16 val) => throw null; + public static void WriteInt16(System.IntPtr ptr, System.Char val) => throw null; + public static void WriteInt32(object ptr, int ofs, int val) => throw null; + public static void WriteInt32(System.IntPtr ptr, int val) => throw null; + public static void WriteInt32(System.IntPtr ptr, int ofs, int val) => throw null; + public static void WriteInt64(object ptr, int ofs, System.Int64 val) => throw null; + public static void WriteInt64(System.IntPtr ptr, int ofs, System.Int64 val) => throw null; + public static void WriteInt64(System.IntPtr ptr, System.Int64 val) => throw null; + public static void WriteIntPtr(object ptr, int ofs, System.IntPtr val) => throw null; + public static void WriteIntPtr(System.IntPtr ptr, int ofs, System.IntPtr val) => throw null; + public static void WriteIntPtr(System.IntPtr ptr, System.IntPtr val) => throw null; + public static void ZeroFreeBSTR(System.IntPtr s) => throw null; + public static void ZeroFreeCoTaskMemAnsi(System.IntPtr s) => throw null; + public static void ZeroFreeCoTaskMemUTF8(System.IntPtr s) => throw null; + public static void ZeroFreeCoTaskMemUnicode(System.IntPtr s) => throw null; + public static void ZeroFreeGlobalAllocAnsi(System.IntPtr s) => throw null; + public static void ZeroFreeGlobalAllocUnicode(System.IntPtr s) => throw null; + } + + // Generated from `System.Runtime.InteropServices.MarshalAsAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MarshalAsAttribute : System.Attribute + { + public System.Runtime.InteropServices.UnmanagedType ArraySubType; + public int IidParameterIndex; + public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanagedType) => throw null; + public MarshalAsAttribute(System.Int16 unmanagedType) => throw null; + public string MarshalCookie; + public string MarshalType; + public System.Type MarshalTypeRef; + public System.Runtime.InteropServices.VarEnum SafeArraySubType; + public System.Type SafeArrayUserDefinedSubType; + public int SizeConst; + public System.Int16 SizeParamIndex; + public System.Runtime.InteropServices.UnmanagedType Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.MarshalDirectiveException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MarshalDirectiveException : System.SystemException + { + public MarshalDirectiveException(string message, System.Exception inner) => throw null; + public MarshalDirectiveException(string message) => throw null; + public MarshalDirectiveException() => throw null; + protected MarshalDirectiveException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.NativeLibrary` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class NativeLibrary + { + public static void Free(System.IntPtr handle) => throw null; + public static System.IntPtr GetExport(System.IntPtr handle, string name) => throw null; + public static System.IntPtr Load(string libraryPath) => throw null; + public static System.IntPtr Load(string libraryName, System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportSearchPath? searchPath) => throw null; + public static void SetDllImportResolver(System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportResolver resolver) => throw null; + public static bool TryGetExport(System.IntPtr handle, string name, out System.IntPtr address) => throw null; + public static bool TryLoad(string libraryPath, out System.IntPtr handle) => throw null; + public static bool TryLoad(string libraryName, System.Reflection.Assembly assembly, System.Runtime.InteropServices.DllImportSearchPath? searchPath, out System.IntPtr handle) => throw null; + } + + // Generated from `System.Runtime.InteropServices.OptionalAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OptionalAttribute : System.Attribute + { + public OptionalAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.PreserveSigAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PreserveSigAttribute : System.Attribute + { + public PreserveSigAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PrimaryInteropAssemblyAttribute : System.Attribute + { + public int MajorVersion { get => throw null; } + public int MinorVersion { get => throw null; } + public PrimaryInteropAssemblyAttribute(int major, int minor) => throw null; + } + + // Generated from `System.Runtime.InteropServices.ProgIdAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ProgIdAttribute : System.Attribute + { + public ProgIdAttribute(string progId) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.RuntimeEnvironment` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RuntimeEnvironment + { + public static bool FromGlobalAccessCache(System.Reflection.Assembly a) => throw null; + public static string GetRuntimeDirectory() => throw null; + public static System.IntPtr GetRuntimeInterfaceAsIntPtr(System.Guid clsid, System.Guid riid) => throw null; + public static object GetRuntimeInterfaceAsObject(System.Guid clsid, System.Guid riid) => throw null; + public static string GetSystemVersion() => throw null; + public static string SystemConfigurationFile { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.SEHException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SEHException : System.Runtime.InteropServices.ExternalException + { + public virtual bool CanResume() => throw null; + public SEHException(string message, System.Exception inner) => throw null; + public SEHException(string message) => throw null; + public SEHException() => throw null; + protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.SafeArrayRankMismatchException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeArrayRankMismatchException : System.SystemException + { + public SafeArrayRankMismatchException(string message, System.Exception inner) => throw null; + public SafeArrayRankMismatchException(string message) => throw null; + public SafeArrayRankMismatchException() => throw null; + protected SafeArrayRankMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.SafeArrayTypeMismatchException` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeArrayTypeMismatchException : System.SystemException + { + public SafeArrayTypeMismatchException(string message, System.Exception inner) => throw null; + public SafeArrayTypeMismatchException(string message) => throw null; + public SafeArrayTypeMismatchException() => throw null; + protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.InteropServices.StandardOleMarshalObject` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StandardOleMarshalObject : System.MarshalByRefObject + { + protected StandardOleMarshalObject() => throw null; + } + + // Generated from `System.Runtime.InteropServices.TypeIdentifierAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeIdentifierAttribute : System.Attribute + { + public string Identifier { get => throw null; } + public string Scope { get => throw null; } + public TypeIdentifierAttribute(string scope, string identifier) => throw null; + public TypeIdentifierAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.TypeLibFuncAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLibFuncAttribute : System.Attribute + { + public TypeLibFuncAttribute(System.Runtime.InteropServices.TypeLibFuncFlags flags) => throw null; + public TypeLibFuncAttribute(System.Int16 flags) => throw null; + public System.Runtime.InteropServices.TypeLibFuncFlags Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.TypeLibFuncFlags` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TypeLibFuncFlags + { + FBindable, + FDefaultBind, + FDefaultCollelem, + FDisplayBind, + FHidden, + FImmediateBind, + FNonBrowsable, + FReplaceable, + FRequestEdit, + FRestricted, + FSource, + FUiDefault, + FUsesGetLastError, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.InteropServices.TypeLibImportClassAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLibImportClassAttribute : System.Attribute + { + public TypeLibImportClassAttribute(System.Type importClass) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.TypeLibTypeAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLibTypeAttribute : System.Attribute + { + public TypeLibTypeAttribute(System.Runtime.InteropServices.TypeLibTypeFlags flags) => throw null; + public TypeLibTypeAttribute(System.Int16 flags) => throw null; + public System.Runtime.InteropServices.TypeLibTypeFlags Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.TypeLibTypeFlags` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TypeLibTypeFlags + { + FAggregatable, + FAppObject, + FCanCreate, + FControl, + FDispatchable, + FDual, + FHidden, + FLicensed, + FNonExtensible, + FOleAutomation, + FPreDeclId, + FReplaceable, + FRestricted, + FReverseBind, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.InteropServices.TypeLibVarAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLibVarAttribute : System.Attribute + { + public TypeLibVarAttribute(System.Runtime.InteropServices.TypeLibVarFlags flags) => throw null; + public TypeLibVarAttribute(System.Int16 flags) => throw null; + public System.Runtime.InteropServices.TypeLibVarFlags Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.TypeLibVarFlags` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TypeLibVarFlags + { + FBindable, + FDefaultBind, + FDefaultCollelem, + FDisplayBind, + FHidden, + FImmediateBind, + FNonBrowsable, + FReadOnly, + FReplaceable, + FRequestEdit, + FRestricted, + FSource, + FUiDefault, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.InteropServices.TypeLibVersionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLibVersionAttribute : System.Attribute + { + public int MajorVersion { get => throw null; } + public int MinorVersion { get => throw null; } + public TypeLibVersionAttribute(int major, int minor) => throw null; + } + + // Generated from `System.Runtime.InteropServices.UnknownWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnknownWrapper + { + public UnknownWrapper(object obj) => throw null; + public object WrappedObject { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnmanagedCallersOnlyAttribute : System.Attribute + { + public System.Type[] CallConvs; + public string EntryPoint; + public UnmanagedCallersOnlyAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnmanagedFunctionPointerAttribute : System.Attribute + { + public bool BestFitMapping; + public System.Runtime.InteropServices.CallingConvention CallingConvention { get => throw null; } + public System.Runtime.InteropServices.CharSet CharSet; + public bool SetLastError; + public bool ThrowOnUnmappableChar; + public UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention callingConvention) => throw null; + } + + // Generated from `System.Runtime.InteropServices.UnmanagedType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UnmanagedType + { + AnsiBStr, + AsAny, + BStr, + Bool, + ByValArray, + ByValTStr, + Currency, + CustomMarshaler, + Error, + FunctionPtr, + HString, + I1, + I2, + I4, + I8, + IDispatch, + IInspectable, + IUnknown, + Interface, + LPArray, + LPStr, + LPStruct, + LPTStr, + LPUTF8Str, + LPWStr, + R4, + R8, + SafeArray, + Struct, + SysInt, + SysUInt, + TBStr, + U1, + U2, + U4, + U8, + // Stub generator skipped constructor + VBByRefStr, + VariantBool, + } + + // Generated from `System.Runtime.InteropServices.VarEnum` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum VarEnum + { + VT_ARRAY, + VT_BLOB, + VT_BLOB_OBJECT, + VT_BOOL, + VT_BSTR, + VT_BYREF, + VT_CARRAY, + VT_CF, + VT_CLSID, + VT_CY, + VT_DATE, + VT_DECIMAL, + VT_DISPATCH, + VT_EMPTY, + VT_ERROR, + VT_FILETIME, + VT_HRESULT, + VT_I1, + VT_I2, + VT_I4, + VT_I8, + VT_INT, + VT_LPSTR, + VT_LPWSTR, + VT_NULL, + VT_PTR, + VT_R4, + VT_R8, + VT_RECORD, + VT_SAFEARRAY, + VT_STORAGE, + VT_STORED_OBJECT, + VT_STREAM, + VT_STREAMED_OBJECT, + VT_UI1, + VT_UI2, + VT_UI4, + VT_UI8, + VT_UINT, + VT_UNKNOWN, + VT_USERDEFINED, + VT_VARIANT, + VT_VECTOR, + VT_VOID, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.InteropServices.VariantWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VariantWrapper + { + public VariantWrapper(object obj) => throw null; + public object WrappedObject { get => throw null; } + } + + namespace ComTypes + { + // Generated from `System.Runtime.InteropServices.ComTypes.ADVF` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ADVF + { + // Stub generator skipped constructor + ADVFCACHE_FORCEBUILTIN, + ADVFCACHE_NOHANDLER, + ADVFCACHE_ONSAVE, + ADVF_DATAONSTOP, + ADVF_NODATA, + ADVF_ONLYONCE, + ADVF_PRIMEFIRST, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.BINDPTR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BINDPTR + { + // Stub generator skipped constructor + public System.IntPtr lpfuncdesc; + public System.IntPtr lptcomp; + public System.IntPtr lpvardesc; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.BIND_OPTS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BIND_OPTS + { + // Stub generator skipped constructor + public int cbStruct; + public int dwTickCountDeadline; + public int grfFlags; + public int grfMode; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.CALLCONV` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CALLCONV + { + // Stub generator skipped constructor + CC_CDECL, + CC_MACPASCAL, + CC_MAX, + CC_MPWCDECL, + CC_MPWPASCAL, + CC_MSCPASCAL, + CC_PASCAL, + CC_RESERVED, + CC_STDCALL, + CC_SYSCALL, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.CONNECTDATA` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CONNECTDATA + { + // Stub generator skipped constructor + public int dwCookie; + public object pUnk; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.DATADIR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DATADIR + { + // Stub generator skipped constructor + DATADIR_GET, + DATADIR_SET, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.DESCKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DESCKIND + { + // Stub generator skipped constructor + DESCKIND_FUNCDESC, + DESCKIND_IMPLICITAPPOBJ, + DESCKIND_MAX, + DESCKIND_NONE, + DESCKIND_TYPECOMP, + DESCKIND_VARDESC, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.DISPPARAMS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DISPPARAMS + { + // Stub generator skipped constructor + public int cArgs; + public int cNamedArgs; + public System.IntPtr rgdispidNamedArgs; + public System.IntPtr rgvarg; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.DVASPECT` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DVASPECT + { + // Stub generator skipped constructor + DVASPECT_CONTENT, + DVASPECT_DOCPRINT, + DVASPECT_ICON, + DVASPECT_THUMBNAIL, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ELEMDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ELEMDESC + { + // Generated from `System.Runtime.InteropServices.ComTypes.ELEMDESC.DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DESCUNION + { + // Stub generator skipped constructor + public System.Runtime.InteropServices.ComTypes.IDLDESC idldesc; + public System.Runtime.InteropServices.ComTypes.PARAMDESC paramdesc; + } + + + // Stub generator skipped constructor + public System.Runtime.InteropServices.ComTypes.ELEMDESC.DESCUNION desc; + public System.Runtime.InteropServices.ComTypes.TYPEDESC tdesc; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.EXCEPINFO` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct EXCEPINFO + { + // Stub generator skipped constructor + public string bstrDescription; + public string bstrHelpFile; + public string bstrSource; + public int dwHelpContext; + public System.IntPtr pfnDeferredFillIn; + public System.IntPtr pvReserved; + public int scode; + public System.Int16 wCode; + public System.Int16 wReserved; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.FILETIME` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FILETIME + { + // Stub generator skipped constructor + public int dwHighDateTime; + public int dwLowDateTime; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.FORMATETC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FORMATETC + { + // Stub generator skipped constructor + public System.Int16 cfFormat; + public System.Runtime.InteropServices.ComTypes.DVASPECT dwAspect; + public int lindex; + public System.IntPtr ptd; + public System.Runtime.InteropServices.ComTypes.TYMED tymed; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.FUNCDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct FUNCDESC + { + // Stub generator skipped constructor + public System.Int16 cParams; + public System.Int16 cParamsOpt; + public System.Int16 cScodes; + public System.Runtime.InteropServices.ComTypes.CALLCONV callconv; + public System.Runtime.InteropServices.ComTypes.ELEMDESC elemdescFunc; + public System.Runtime.InteropServices.ComTypes.FUNCKIND funckind; + public System.Runtime.InteropServices.ComTypes.INVOKEKIND invkind; + public System.IntPtr lprgelemdescParam; + public System.IntPtr lprgscode; + public int memid; + public System.Int16 oVft; + public System.Int16 wFuncFlags; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.FUNCFLAGS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FUNCFLAGS + { + // Stub generator skipped constructor + FUNCFLAG_FBINDABLE, + FUNCFLAG_FDEFAULTBIND, + FUNCFLAG_FDEFAULTCOLLELEM, + FUNCFLAG_FDISPLAYBIND, + FUNCFLAG_FHIDDEN, + FUNCFLAG_FIMMEDIATEBIND, + FUNCFLAG_FNONBROWSABLE, + FUNCFLAG_FREPLACEABLE, + FUNCFLAG_FREQUESTEDIT, + FUNCFLAG_FRESTRICTED, + FUNCFLAG_FSOURCE, + FUNCFLAG_FUIDEFAULT, + FUNCFLAG_FUSESGETLASTERROR, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.FUNCKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FUNCKIND + { + // Stub generator skipped constructor + FUNC_DISPATCH, + FUNC_NONVIRTUAL, + FUNC_PUREVIRTUAL, + FUNC_STATIC, + FUNC_VIRTUAL, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IAdviseSink` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAdviseSink + { + void OnClose(); + void OnDataChange(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM stgmedium); + void OnRename(System.Runtime.InteropServices.ComTypes.IMoniker moniker); + void OnSave(); + void OnViewChange(int aspect, int index); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IBindCtx` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IBindCtx + { + void EnumObjectParam(out System.Runtime.InteropServices.ComTypes.IEnumString ppenum); + void GetBindOptions(ref System.Runtime.InteropServices.ComTypes.BIND_OPTS pbindopts); + void GetObjectParam(string pszKey, out object ppunk); + void GetRunningObjectTable(out System.Runtime.InteropServices.ComTypes.IRunningObjectTable pprot); + void RegisterObjectBound(object punk); + void RegisterObjectParam(string pszKey, object punk); + void ReleaseBoundObjects(); + void RevokeObjectBound(object punk); + int RevokeObjectParam(string pszKey); + void SetBindOptions(ref System.Runtime.InteropServices.ComTypes.BIND_OPTS pbindopts); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IConnectionPoint` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IConnectionPoint + { + void Advise(object pUnkSink, out int pdwCookie); + void EnumConnections(out System.Runtime.InteropServices.ComTypes.IEnumConnections ppEnum); + void GetConnectionInterface(out System.Guid pIID); + void GetConnectionPointContainer(out System.Runtime.InteropServices.ComTypes.IConnectionPointContainer ppCPC); + void Unadvise(int dwCookie); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IConnectionPointContainer` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IConnectionPointContainer + { + void EnumConnectionPoints(out System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints ppEnum); + void FindConnectionPoint(ref System.Guid riid, out System.Runtime.InteropServices.ComTypes.IConnectionPoint ppCP); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IDLDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct IDLDESC + { + // Stub generator skipped constructor + public System.IntPtr dwReserved; + public System.Runtime.InteropServices.ComTypes.IDLFLAG wIDLFlags; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IDLFLAG` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum IDLFLAG + { + // Stub generator skipped constructor + IDLFLAG_FIN, + IDLFLAG_FLCID, + IDLFLAG_FOUT, + IDLFLAG_FRETVAL, + IDLFLAG_NONE, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IDataObject` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataObject + { + int DAdvise(ref System.Runtime.InteropServices.ComTypes.FORMATETC pFormatetc, System.Runtime.InteropServices.ComTypes.ADVF advf, System.Runtime.InteropServices.ComTypes.IAdviseSink adviseSink, out int connection); + void DUnadvise(int connection); + int EnumDAdvise(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA enumAdvise); + System.Runtime.InteropServices.ComTypes.IEnumFORMATETC EnumFormatEtc(System.Runtime.InteropServices.ComTypes.DATADIR direction); + int GetCanonicalFormatEtc(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, out System.Runtime.InteropServices.ComTypes.FORMATETC formatOut); + void GetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, out System.Runtime.InteropServices.ComTypes.STGMEDIUM medium); + void GetDataHere(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium); + int QueryGetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format); + void SetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium, bool release); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumConnectionPoints + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints ppenum); + int Next(int celt, System.Runtime.InteropServices.ComTypes.IConnectionPoint[] rgelt, System.IntPtr pceltFetched); + void Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumConnections` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumConnections + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumConnections ppenum); + int Next(int celt, System.Runtime.InteropServices.ComTypes.CONNECTDATA[] rgelt, System.IntPtr pceltFetched); + void Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumFORMATETC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumFORMATETC + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumFORMATETC newEnum); + int Next(int celt, System.Runtime.InteropServices.ComTypes.FORMATETC[] rgelt, int[] pceltFetched); + int Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumMoniker` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumMoniker + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumMoniker ppenum); + int Next(int celt, System.Runtime.InteropServices.ComTypes.IMoniker[] rgelt, System.IntPtr pceltFetched); + void Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumSTATDATA` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumSTATDATA + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA newEnum); + int Next(int celt, System.Runtime.InteropServices.ComTypes.STATDATA[] rgelt, int[] pceltFetched); + int Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumString` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumString + { + void Clone(out System.Runtime.InteropServices.ComTypes.IEnumString ppenum); + int Next(int celt, string[] rgelt, System.IntPtr pceltFetched); + void Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IEnumVARIANT` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumVARIANT + { + System.Runtime.InteropServices.ComTypes.IEnumVARIANT Clone(); + int Next(int celt, object[] rgVar, System.IntPtr pceltFetched); + int Reset(); + int Skip(int celt); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum IMPLTYPEFLAGS + { + // Stub generator skipped constructor + IMPLTYPEFLAG_FDEFAULT, + IMPLTYPEFLAG_FDEFAULTVTABLE, + IMPLTYPEFLAG_FRESTRICTED, + IMPLTYPEFLAG_FSOURCE, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IMoniker` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IMoniker + { + void BindToObject(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, ref System.Guid riidResult, out object ppvResult); + void BindToStorage(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, ref System.Guid riid, out object ppvObj); + void CommonPrefixWith(System.Runtime.InteropServices.ComTypes.IMoniker pmkOther, out System.Runtime.InteropServices.ComTypes.IMoniker ppmkPrefix); + void ComposeWith(System.Runtime.InteropServices.ComTypes.IMoniker pmkRight, bool fOnlyIfNotGeneric, out System.Runtime.InteropServices.ComTypes.IMoniker ppmkComposite); + void Enum(bool fForward, out System.Runtime.InteropServices.ComTypes.IEnumMoniker ppenumMoniker); + void GetClassID(out System.Guid pClassID); + void GetDisplayName(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, out string ppszDisplayName); + void GetSizeMax(out System.Int64 pcbSize); + void GetTimeOfLastChange(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, out System.Runtime.InteropServices.ComTypes.FILETIME pFileTime); + void Hash(out int pdwHash); + void Inverse(out System.Runtime.InteropServices.ComTypes.IMoniker ppmk); + int IsDirty(); + int IsEqual(System.Runtime.InteropServices.ComTypes.IMoniker pmkOtherMoniker); + int IsRunning(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, System.Runtime.InteropServices.ComTypes.IMoniker pmkNewlyRunning); + int IsSystemMoniker(out int pdwMksys); + void Load(System.Runtime.InteropServices.ComTypes.IStream pStm); + void ParseDisplayName(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, System.Runtime.InteropServices.ComTypes.IMoniker pmkToLeft, string pszDisplayName, out int pchEaten, out System.Runtime.InteropServices.ComTypes.IMoniker ppmkOut); + void Reduce(System.Runtime.InteropServices.ComTypes.IBindCtx pbc, int dwReduceHowFar, ref System.Runtime.InteropServices.ComTypes.IMoniker ppmkToLeft, out System.Runtime.InteropServices.ComTypes.IMoniker ppmkReduced); + void RelativePathTo(System.Runtime.InteropServices.ComTypes.IMoniker pmkOther, out System.Runtime.InteropServices.ComTypes.IMoniker ppmkRelPath); + void Save(System.Runtime.InteropServices.ComTypes.IStream pStm, bool fClearDirty); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.INVOKEKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum INVOKEKIND + { + // Stub generator skipped constructor + INVOKE_FUNC, + INVOKE_PROPERTYGET, + INVOKE_PROPERTYPUT, + INVOKE_PROPERTYPUTREF, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IPersistFile` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IPersistFile + { + void GetClassID(out System.Guid pClassID); + void GetCurFile(out string ppszFileName); + int IsDirty(); + void Load(string pszFileName, int dwMode); + void Save(string pszFileName, bool fRemember); + void SaveCompleted(string pszFileName); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IRunningObjectTable` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IRunningObjectTable + { + void EnumRunning(out System.Runtime.InteropServices.ComTypes.IEnumMoniker ppenumMoniker); + int GetObject(System.Runtime.InteropServices.ComTypes.IMoniker pmkObjectName, out object ppunkObject); + int GetTimeOfLastChange(System.Runtime.InteropServices.ComTypes.IMoniker pmkObjectName, out System.Runtime.InteropServices.ComTypes.FILETIME pfiletime); + int IsRunning(System.Runtime.InteropServices.ComTypes.IMoniker pmkObjectName); + void NoteChangeTime(int dwRegister, ref System.Runtime.InteropServices.ComTypes.FILETIME pfiletime); + int Register(int grfFlags, object punkObject, System.Runtime.InteropServices.ComTypes.IMoniker pmkObjectName); + void Revoke(int dwRegister); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.IStream` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStream + { + void Clone(out System.Runtime.InteropServices.ComTypes.IStream ppstm); + void Commit(int grfCommitFlags); + void CopyTo(System.Runtime.InteropServices.ComTypes.IStream pstm, System.Int64 cb, System.IntPtr pcbRead, System.IntPtr pcbWritten); + void LockRegion(System.Int64 libOffset, System.Int64 cb, int dwLockType); + void Read(System.Byte[] pv, int cb, System.IntPtr pcbRead); + void Revert(); + void Seek(System.Int64 dlibMove, int dwOrigin, System.IntPtr plibNewPosition); + void SetSize(System.Int64 libNewSize); + void Stat(out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag); + void UnlockRegion(System.Int64 libOffset, System.Int64 cb, int dwLockType); + void Write(System.Byte[] pv, int cb, System.IntPtr pcbWritten); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ITypeComp` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeComp + { + void Bind(string szName, int lHashVal, System.Int16 wFlags, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTInfo, out System.Runtime.InteropServices.ComTypes.DESCKIND pDescKind, out System.Runtime.InteropServices.ComTypes.BINDPTR pBindPtr); + void BindType(string szName, int lHashVal, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTInfo, out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ITypeInfo` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeInfo + { + void AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv); + void CreateInstance(object pUnkOuter, ref System.Guid riid, out object ppvObj); + void GetContainingTypeLib(out System.Runtime.InteropServices.ComTypes.ITypeLib ppTLB, out int pIndex); + void GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal); + void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile); + void GetFuncDesc(int index, out System.IntPtr ppFuncDesc); + void GetIDsOfNames(string[] rgszNames, int cNames, int[] pMemId); + void GetImplTypeFlags(int index, out System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS pImplTypeFlags); + void GetMops(int memid, out string pBstrMops); + void GetNames(int memid, string[] rgBstrNames, int cMaxNames, out int pcNames); + void GetRefTypeInfo(int hRef, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTI); + void GetRefTypeOfImplType(int index, out int href); + void GetTypeAttr(out System.IntPtr ppTypeAttr); + void GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp); + void GetVarDesc(int index, out System.IntPtr ppVarDesc); + void Invoke(object pvInstance, int memid, System.Int16 wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr); + void ReleaseFuncDesc(System.IntPtr pFuncDesc); + void ReleaseTypeAttr(System.IntPtr pTypeAttr); + void ReleaseVarDesc(System.IntPtr pVarDesc); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ITypeInfo2` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeInfo2 : System.Runtime.InteropServices.ComTypes.ITypeInfo + { + void AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out System.IntPtr ppv); + void CreateInstance(object pUnkOuter, ref System.Guid riid, out object ppvObj); + void GetAllCustData(System.IntPtr pCustData); + void GetAllFuncCustData(int index, System.IntPtr pCustData); + void GetAllImplTypeCustData(int index, System.IntPtr pCustData); + void GetAllParamCustData(int indexFunc, int indexParam, System.IntPtr pCustData); + void GetAllVarCustData(int index, System.IntPtr pCustData); + void GetContainingTypeLib(out System.Runtime.InteropServices.ComTypes.ITypeLib ppTLB, out int pIndex); + void GetCustData(ref System.Guid guid, out object pVarVal); + void GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, System.IntPtr pBstrDllName, System.IntPtr pBstrName, System.IntPtr pwOrdinal); + void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile); + void GetDocumentation2(int memid, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll); + void GetFuncCustData(int index, ref System.Guid guid, out object pVarVal); + void GetFuncDesc(int index, out System.IntPtr ppFuncDesc); + void GetFuncIndexOfMemId(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out int pFuncIndex); + void GetIDsOfNames(string[] rgszNames, int cNames, int[] pMemId); + void GetImplTypeCustData(int index, ref System.Guid guid, out object pVarVal); + void GetImplTypeFlags(int index, out System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS pImplTypeFlags); + void GetMops(int memid, out string pBstrMops); + void GetNames(int memid, string[] rgBstrNames, int cMaxNames, out int pcNames); + void GetParamCustData(int indexFunc, int indexParam, ref System.Guid guid, out object pVarVal); + void GetRefTypeInfo(int hRef, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTI); + void GetRefTypeOfImplType(int index, out int href); + void GetTypeAttr(out System.IntPtr ppTypeAttr); + void GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp); + void GetTypeFlags(out int pTypeFlags); + void GetTypeKind(out System.Runtime.InteropServices.ComTypes.TYPEKIND pTypeKind); + void GetVarCustData(int index, ref System.Guid guid, out object pVarVal); + void GetVarDesc(int index, out System.IntPtr ppVarDesc); + void GetVarIndexOfMemId(int memid, out int pVarIndex); + void Invoke(object pvInstance, int memid, System.Int16 wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, System.IntPtr pVarResult, System.IntPtr pExcepInfo, out int puArgErr); + void ReleaseFuncDesc(System.IntPtr pFuncDesc); + void ReleaseTypeAttr(System.IntPtr pTypeAttr); + void ReleaseVarDesc(System.IntPtr pVarDesc); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ITypeLib` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeLib + { + void FindName(string szNameBuf, int lHashVal, System.Runtime.InteropServices.ComTypes.ITypeInfo[] ppTInfo, int[] rgMemId, ref System.Int16 pcFound); + void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile); + void GetLibAttr(out System.IntPtr ppTLibAttr); + void GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp); + void GetTypeInfo(int index, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTI); + int GetTypeInfoCount(); + void GetTypeInfoOfGuid(ref System.Guid guid, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTInfo); + void GetTypeInfoType(int index, out System.Runtime.InteropServices.ComTypes.TYPEKIND pTKind); + bool IsName(string szNameBuf, int lHashVal); + void ReleaseTLibAttr(System.IntPtr pTLibAttr); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.ITypeLib2` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITypeLib2 : System.Runtime.InteropServices.ComTypes.ITypeLib + { + void FindName(string szNameBuf, int lHashVal, System.Runtime.InteropServices.ComTypes.ITypeInfo[] ppTInfo, int[] rgMemId, ref System.Int16 pcFound); + void GetAllCustData(System.IntPtr pCustData); + void GetCustData(ref System.Guid guid, out object pVarVal); + void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile); + void GetDocumentation2(int index, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll); + void GetLibAttr(out System.IntPtr ppTLibAttr); + void GetLibStatistics(System.IntPtr pcUniqueNames, out int pcchUniqueNames); + void GetTypeComp(out System.Runtime.InteropServices.ComTypes.ITypeComp ppTComp); + void GetTypeInfo(int index, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTI); + int GetTypeInfoCount(); + void GetTypeInfoOfGuid(ref System.Guid guid, out System.Runtime.InteropServices.ComTypes.ITypeInfo ppTInfo); + void GetTypeInfoType(int index, out System.Runtime.InteropServices.ComTypes.TYPEKIND pTKind); + bool IsName(string szNameBuf, int lHashVal); + void ReleaseTLibAttr(System.IntPtr pTLibAttr); + } + + // Generated from `System.Runtime.InteropServices.ComTypes.LIBFLAGS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum LIBFLAGS + { + // Stub generator skipped constructor + LIBFLAG_FCONTROL, + LIBFLAG_FHASDISKIMAGE, + LIBFLAG_FHIDDEN, + LIBFLAG_FRESTRICTED, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.PARAMDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PARAMDESC + { + // Stub generator skipped constructor + public System.IntPtr lpVarValue; + public System.Runtime.InteropServices.ComTypes.PARAMFLAG wParamFlags; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.PARAMFLAG` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PARAMFLAG + { + // Stub generator skipped constructor + PARAMFLAG_FHASCUSTDATA, + PARAMFLAG_FHASDEFAULT, + PARAMFLAG_FIN, + PARAMFLAG_FLCID, + PARAMFLAG_FOPT, + PARAMFLAG_FOUT, + PARAMFLAG_FRETVAL, + PARAMFLAG_NONE, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.STATDATA` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct STATDATA + { + // Stub generator skipped constructor + public System.Runtime.InteropServices.ComTypes.IAdviseSink advSink; + public System.Runtime.InteropServices.ComTypes.ADVF advf; + public int connection; + public System.Runtime.InteropServices.ComTypes.FORMATETC formatetc; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.STATSTG` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct STATSTG + { + // Stub generator skipped constructor + public System.Runtime.InteropServices.ComTypes.FILETIME atime; + public System.Int64 cbSize; + public System.Guid clsid; + public System.Runtime.InteropServices.ComTypes.FILETIME ctime; + public int grfLocksSupported; + public int grfMode; + public int grfStateBits; + public System.Runtime.InteropServices.ComTypes.FILETIME mtime; + public string pwcsName; + public int reserved; + public int type; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.STGMEDIUM` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct STGMEDIUM + { + // Stub generator skipped constructor + public object pUnkForRelease; + public System.Runtime.InteropServices.ComTypes.TYMED tymed; + public System.IntPtr unionmember; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.SYSKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SYSKIND + { + // Stub generator skipped constructor + SYS_MAC, + SYS_WIN16, + SYS_WIN32, + SYS_WIN64, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYMED` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TYMED + { + // Stub generator skipped constructor + TYMED_ENHMF, + TYMED_FILE, + TYMED_GDI, + TYMED_HGLOBAL, + TYMED_ISTORAGE, + TYMED_ISTREAM, + TYMED_MFPICT, + TYMED_NULL, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYPEATTR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TYPEATTR + { + public const int MEMBER_ID_NIL = default; + // Stub generator skipped constructor + public System.Int16 cFuncs; + public System.Int16 cImplTypes; + public System.Int16 cVars; + public System.Int16 cbAlignment; + public int cbSizeInstance; + public System.Int16 cbSizeVft; + public int dwReserved; + public System.Guid guid; + public System.Runtime.InteropServices.ComTypes.IDLDESC idldescType; + public int lcid; + public System.IntPtr lpstrSchema; + public int memidConstructor; + public int memidDestructor; + public System.Runtime.InteropServices.ComTypes.TYPEDESC tdescAlias; + public System.Runtime.InteropServices.ComTypes.TYPEKIND typekind; + public System.Int16 wMajorVerNum; + public System.Int16 wMinorVerNum; + public System.Runtime.InteropServices.ComTypes.TYPEFLAGS wTypeFlags; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYPEDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TYPEDESC + { + // Stub generator skipped constructor + public System.IntPtr lpValue; + public System.Int16 vt; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYPEFLAGS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TYPEFLAGS + { + // Stub generator skipped constructor + TYPEFLAG_FAGGREGATABLE, + TYPEFLAG_FAPPOBJECT, + TYPEFLAG_FCANCREATE, + TYPEFLAG_FCONTROL, + TYPEFLAG_FDISPATCHABLE, + TYPEFLAG_FDUAL, + TYPEFLAG_FHIDDEN, + TYPEFLAG_FLICENSED, + TYPEFLAG_FNONEXTENSIBLE, + TYPEFLAG_FOLEAUTOMATION, + TYPEFLAG_FPREDECLID, + TYPEFLAG_FPROXY, + TYPEFLAG_FREPLACEABLE, + TYPEFLAG_FRESTRICTED, + TYPEFLAG_FREVERSEBIND, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYPEKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TYPEKIND + { + TKIND_ALIAS, + TKIND_COCLASS, + TKIND_DISPATCH, + TKIND_ENUM, + TKIND_INTERFACE, + TKIND_MAX, + TKIND_MODULE, + TKIND_RECORD, + TKIND_UNION, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.InteropServices.ComTypes.TYPELIBATTR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TYPELIBATTR + { + // Stub generator skipped constructor + public System.Guid guid; + public int lcid; + public System.Runtime.InteropServices.ComTypes.SYSKIND syskind; + public System.Runtime.InteropServices.ComTypes.LIBFLAGS wLibFlags; + public System.Int16 wMajorVerNum; + public System.Int16 wMinorVerNum; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.VARDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct VARDESC + { + // Generated from `System.Runtime.InteropServices.ComTypes.VARDESC.DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DESCUNION + { + // Stub generator skipped constructor + public System.IntPtr lpvarValue; + public int oInst; + } + + + // Stub generator skipped constructor + public System.Runtime.InteropServices.ComTypes.VARDESC.DESCUNION desc; + public System.Runtime.InteropServices.ComTypes.ELEMDESC elemdescVar; + public string lpstrSchema; + public int memid; + public System.Runtime.InteropServices.ComTypes.VARKIND varkind; + public System.Int16 wVarFlags; + } + + // Generated from `System.Runtime.InteropServices.ComTypes.VARFLAGS` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum VARFLAGS + { + // Stub generator skipped constructor + VARFLAG_FBINDABLE, + VARFLAG_FDEFAULTBIND, + VARFLAG_FDEFAULTCOLLELEM, + VARFLAG_FDISPLAYBIND, + VARFLAG_FHIDDEN, + VARFLAG_FIMMEDIATEBIND, + VARFLAG_FNONBROWSABLE, + VARFLAG_FREADONLY, + VARFLAG_FREPLACEABLE, + VARFLAG_FREQUESTEDIT, + VARFLAG_FRESTRICTED, + VARFLAG_FSOURCE, + VARFLAG_FUIDEFAULT, + } + + // Generated from `System.Runtime.InteropServices.ComTypes.VARKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum VARKIND + { + // Stub generator skipped constructor + VAR_CONST, + VAR_DISPATCH, + VAR_PERINSTANCE, + VAR_STATIC, + } + + } + } + } + namespace Security + { + // Generated from `System.Security.SecureString` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecureString : System.IDisposable + { + public void AppendChar(System.Char c) => throw null; + public void Clear() => throw null; + public System.Security.SecureString Copy() => throw null; + public void Dispose() => throw null; + public void InsertAt(int index, System.Char c) => throw null; + public bool IsReadOnly() => throw null; + public int Length { get => throw null; } + public void MakeReadOnly() => throw null; + public void RemoveAt(int index) => throw null; + unsafe public SecureString(System.Char* value, int length) => throw null; + public SecureString() => throw null; + public void SetAt(int index, System.Char c) => throw null; + } + + // Generated from `System.Security.SecureStringMarshal` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SecureStringMarshal + { + public static System.IntPtr SecureStringToCoTaskMemAnsi(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToCoTaskMemUnicode(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToGlobalAllocAnsi(System.Security.SecureString s) => throw null; + public static System.IntPtr SecureStringToGlobalAllocUnicode(System.Security.SecureString s) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs new file mode 100644 index 000000000000..3ae6b9115e27 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs @@ -0,0 +1,4217 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Intrinsics + { + // Generated from `System.Runtime.Intrinsics.Vector128` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Vector128 + { + public static System.Runtime.Intrinsics.Vector128 As(this System.Runtime.Intrinsics.Vector128 vector) where T : struct where U : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsByte(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsDouble(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsInt16(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsInt32(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsInt64(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsSByte(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsSingle(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsUInt16(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsUInt32(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsUInt64(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Numerics.Vector AsVector(this System.Runtime.Intrinsics.Vector128 value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 AsVector128(this System.Numerics.Vector4 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AsVector128(this System.Numerics.Vector3 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AsVector128(this System.Numerics.Vector2 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AsVector128(this System.Numerics.Vector value) where T : struct => throw null; + public static System.Numerics.Vector2 AsVector2(this System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Numerics.Vector3 AsVector3(this System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Numerics.Vector4 AsVector4(this System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(int e0, int e1, int e2, int e3) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(float value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(float e0, float e1, float e2, float e3) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(double value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(double e0, double e1) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt64 e0, System.UInt64 e1) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt32 e0, System.UInt32 e1, System.UInt32 e2, System.UInt32 e3) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.UInt16 e0, System.UInt16 e1, System.UInt16 e2, System.UInt16 e3, System.UInt16 e4, System.UInt16 e5, System.UInt16 e6, System.UInt16 e7) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.SByte e0, System.SByte e1, System.SByte e2, System.SByte e3, System.SByte e4, System.SByte e5, System.SByte e6, System.SByte e7, System.SByte e8, System.SByte e9, System.SByte e10, System.SByte e11, System.SByte e12, System.SByte e13, System.SByte e14, System.SByte e15) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Int64 e0, System.Int64 e1) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Int16 e0, System.Int16 e1, System.Int16 e2, System.Int16 e3, System.Int16 e4, System.Int16 e5, System.Int16 e6, System.Int16 e7) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector64 upper) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Create(System.Byte e0, System.Byte e1, System.Byte e2, System.Byte e3, System.Byte e4, System.Byte e5, System.Byte e6, System.Byte e7, System.Byte e8, System.Byte e9, System.Byte e10, System.Byte e11, System.Byte e12, System.Byte e13, System.Byte e14, System.Byte e15) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(float value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(double value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalar(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(float value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(double value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CreateScalarUnsafe(System.Byte value) => throw null; + public static T GetElement(this System.Runtime.Intrinsics.Vector128 vector, int index) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 GetLower(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 GetUpper(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static T ToScalar(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 ToVector256(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 ToVector256Unsafe(this System.Runtime.Intrinsics.Vector128 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 WithElement(this System.Runtime.Intrinsics.Vector128 vector, int index, T value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 WithLower(this System.Runtime.Intrinsics.Vector128 vector, System.Runtime.Intrinsics.Vector64 value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 WithUpper(this System.Runtime.Intrinsics.Vector128 vector, System.Runtime.Intrinsics.Vector64 value) where T : struct => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Vector128<>` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Vector128 : System.IEquatable> where T : struct + { + public static System.Runtime.Intrinsics.Vector128 AllBitsSet { get => throw null; } + public static int Count { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.Intrinsics.Vector128 other) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + // Stub generator skipped constructor + public static System.Runtime.Intrinsics.Vector128 Zero { get => throw null; } + } + + // Generated from `System.Runtime.Intrinsics.Vector256` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Vector256 + { + public static System.Runtime.Intrinsics.Vector256 As(this System.Runtime.Intrinsics.Vector256 vector) where T : struct where U : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsByte(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsDouble(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsInt16(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsInt32(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsInt64(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsSByte(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsSingle(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsUInt16(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsUInt32(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsUInt64(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Numerics.Vector AsVector(this System.Runtime.Intrinsics.Vector256 value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 AsVector256(this System.Numerics.Vector value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(int value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(int e0, int e1, int e2, int e3, int e4, int e5, int e6, int e7) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(float value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(float e0, float e1, float e2, float e3, float e4, float e5, float e6, float e7) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(double value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(double e0, double e1, double e2, double e3) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt64 e0, System.UInt64 e1, System.UInt64 e2, System.UInt64 e3) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt32 e0, System.UInt32 e1, System.UInt32 e2, System.UInt32 e3, System.UInt32 e4, System.UInt32 e5, System.UInt32 e6, System.UInt32 e7) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.UInt16 e0, System.UInt16 e1, System.UInt16 e2, System.UInt16 e3, System.UInt16 e4, System.UInt16 e5, System.UInt16 e6, System.UInt16 e7, System.UInt16 e8, System.UInt16 e9, System.UInt16 e10, System.UInt16 e11, System.UInt16 e12, System.UInt16 e13, System.UInt16 e14, System.UInt16 e15) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.SByte e0, System.SByte e1, System.SByte e2, System.SByte e3, System.SByte e4, System.SByte e5, System.SByte e6, System.SByte e7, System.SByte e8, System.SByte e9, System.SByte e10, System.SByte e11, System.SByte e12, System.SByte e13, System.SByte e14, System.SByte e15, System.SByte e16, System.SByte e17, System.SByte e18, System.SByte e19, System.SByte e20, System.SByte e21, System.SByte e22, System.SByte e23, System.SByte e24, System.SByte e25, System.SByte e26, System.SByte e27, System.SByte e28, System.SByte e29, System.SByte e30, System.SByte e31) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Int64 e0, System.Int64 e1, System.Int64 e2, System.Int64 e3) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Int16 e0, System.Int16 e1, System.Int16 e2, System.Int16 e3, System.Int16 e4, System.Int16 e5, System.Int16 e6, System.Int16 e7, System.Int16 e8, System.Int16 e9, System.Int16 e10, System.Int16 e11, System.Int16 e12, System.Int16 e13, System.Int16 e14, System.Int16 e15) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Runtime.Intrinsics.Vector128 lower, System.Runtime.Intrinsics.Vector128 upper) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Create(System.Byte e0, System.Byte e1, System.Byte e2, System.Byte e3, System.Byte e4, System.Byte e5, System.Byte e6, System.Byte e7, System.Byte e8, System.Byte e9, System.Byte e10, System.Byte e11, System.Byte e12, System.Byte e13, System.Byte e14, System.Byte e15, System.Byte e16, System.Byte e17, System.Byte e18, System.Byte e19, System.Byte e20, System.Byte e21, System.Byte e22, System.Byte e23, System.Byte e24, System.Byte e25, System.Byte e26, System.Byte e27, System.Byte e28, System.Byte e29, System.Byte e30, System.Byte e31) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(int value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(float value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(double value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalar(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(int value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(float value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(double value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 CreateScalarUnsafe(System.Byte value) => throw null; + public static T GetElement(this System.Runtime.Intrinsics.Vector256 vector, int index) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 GetLower(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 GetUpper(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static T ToScalar(this System.Runtime.Intrinsics.Vector256 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 WithElement(this System.Runtime.Intrinsics.Vector256 vector, int index, T value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 WithLower(this System.Runtime.Intrinsics.Vector256 vector, System.Runtime.Intrinsics.Vector128 value) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector256 WithUpper(this System.Runtime.Intrinsics.Vector256 vector, System.Runtime.Intrinsics.Vector128 value) where T : struct => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Vector256<>` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Vector256 : System.IEquatable> where T : struct + { + public static System.Runtime.Intrinsics.Vector256 AllBitsSet { get => throw null; } + public static int Count { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.Intrinsics.Vector256 other) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + // Stub generator skipped constructor + public static System.Runtime.Intrinsics.Vector256 Zero { get => throw null; } + } + + // Generated from `System.Runtime.Intrinsics.Vector64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Vector64 + { + public static System.Runtime.Intrinsics.Vector64 As(this System.Runtime.Intrinsics.Vector64 vector) where T : struct where U : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsByte(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsDouble(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsInt16(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsInt32(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsInt64(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsSByte(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsSingle(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsUInt16(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsUInt32(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 AsUInt64(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(int value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(int e0, int e1) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(float value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(float e0, float e1) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(double value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.UInt32 e0, System.UInt32 e1) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.UInt16 e0, System.UInt16 e1, System.UInt16 e2, System.UInt16 e3) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.SByte e0, System.SByte e1, System.SByte e2, System.SByte e3, System.SByte e4, System.SByte e5, System.SByte e6, System.SByte e7) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.Int16 e0, System.Int16 e1, System.Int16 e2, System.Int16 e3) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Create(System.Byte e0, System.Byte e1, System.Byte e2, System.Byte e3, System.Byte e4, System.Byte e5, System.Byte e6, System.Byte e7) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(int value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(float value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(double value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalar(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(int value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(float value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CreateScalarUnsafe(System.Byte value) => throw null; + public static T GetElement(this System.Runtime.Intrinsics.Vector64 vector, int index) where T : struct => throw null; + public static T ToScalar(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 ToVector128(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector128 ToVector128Unsafe(this System.Runtime.Intrinsics.Vector64 vector) where T : struct => throw null; + public static System.Runtime.Intrinsics.Vector64 WithElement(this System.Runtime.Intrinsics.Vector64 vector, int index, T value) where T : struct => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Vector64<>` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Vector64 : System.IEquatable> where T : struct + { + public static System.Runtime.Intrinsics.Vector64 AllBitsSet { get => throw null; } + public static int Count { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.Intrinsics.Vector64 other) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + // Stub generator skipped constructor + public static System.Runtime.Intrinsics.Vector64 Zero { get => throw null; } + } + + namespace Arm + { + // Generated from `System.Runtime.Intrinsics.Arm.AdvSimd` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class AdvSimd : System.Runtime.Intrinsics.Arm.ArmBase + { + public static System.Runtime.Intrinsics.Vector64 Abs(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Abs(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Abs(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Abs(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifference(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifferenceWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Add(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwiseWideningAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningAndAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseWideningScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + internal AdvSimd() => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 And(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + // Generated from `System.Runtime.Intrinsics.Arm.AdvSimd.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 + { + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteCompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteCompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AbsoluteDifference(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AbsoluteDifferenceScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddAcrossWidening(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 AddSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + internal Arm64() => throw null; + public static System.Runtime.Intrinsics.Vector128 Ceiling(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqualScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTestScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTestScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTestScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToDouble(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToDouble(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToDouble(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToDoubleScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToDoubleScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToDoubleUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt64RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt64RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt64RoundToEven(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt64RoundToEvenScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt64RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt64RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt64RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt64RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt64RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt64RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingleLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingleRoundToOddLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToSingleRoundToOddUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToSingleUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt64RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt64RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt64RoundToEven(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt64RoundToEvenScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt64RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt64RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt64RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt64RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt64RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt64RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Divide(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Divide(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Divide(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(double value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.UInt64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Floor(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddByScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractByScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 InsertSelectedScalar(System.Runtime.Intrinsics.Vector64 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value, System.Byte valueIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertSelectedScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector128 value, System.Byte valueIndex) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.Int64* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxNumber(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxNumberPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxNumberPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberPairwiseScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwiseScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinNumber(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberAcross(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinNumberPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinNumberPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberPairwiseScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinPairwise(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwiseScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwiseScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingSaturateHighScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingSaturateHighScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningAndAddSaturateScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningAndAddSaturateScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningAndSubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningAndSubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningSaturateScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtended(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtended(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtended(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtendedByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtendedBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtendedBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyExtendedBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyExtendedScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingSaturateHighScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingSaturateHighScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 NegateSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalEstimateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalEstimateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalExponentScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalExponentScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSquareRootEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootEstimateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootEstimateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSquareRootStep(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootStepScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootStepScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalStep(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalStepScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalStepScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElementBits(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElementBits(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElementBits(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElementBits(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearest(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 Sqrt(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sqrt(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sqrt(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static void StorePair(int* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(int* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(float* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(float* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(double* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(double* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.UInt64* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.UInt64* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.UInt32* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.UInt32* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.UInt16* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.UInt16* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.SByte* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.SByte* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.Int64* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.Int64* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.Int16* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.Int16* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePair(System.Byte* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePair(System.Byte* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(int* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(int* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(float* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(float* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(double* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(double* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt64* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt64* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt32* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt32* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt16* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.UInt16* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.SByte* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.SByte* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Int64* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Int64* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Int16* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Int16* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Byte* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairNonTemporal(System.Byte* address, System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) => throw null; + unsafe public static void StorePairScalar(int* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairScalar(float* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairScalar(System.UInt32* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairScalarNonTemporal(int* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairScalarNonTemporal(float* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + unsafe public static void StorePairScalarNonTemporal(System.UInt32* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 TransposeOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 TransposeOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipEven(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipEven(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 UnzipOdd(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnzipOdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 VectorTableLookup(System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector128 VectorTableLookup(System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector128 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector128 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector128 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector128 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector128 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ZipLow(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZipLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + } + + + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseClear(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseClear(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 BitwiseSelect(System.Runtime.Intrinsics.Vector64 select, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 BitwiseSelect(System.Runtime.Intrinsics.Vector128 select, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Ceiling(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Ceiling(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CeilingScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CeilingScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThan(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 CompareTest(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareTest(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundAwayFromZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt32RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToEven(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt32RoundToEven(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToEvenScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt32RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt32RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToInt32RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToInt32RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingle(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingle(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToSingle(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToSingle(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingleScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToSingleScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundAwayFromZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt32RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToEven(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt32RoundToEven(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToEvenScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt32RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt32RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToUInt32RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ConvertToUInt32RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DivideScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 DivideScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateSelectedScalarToVector128(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateSelectedScalarToVector64(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(float value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DuplicateToVector128(System.Byte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(int value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(float value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(System.UInt32 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(System.UInt16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(System.SByte value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(System.Int16 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 DuplicateToVector64(System.Byte value) => throw null; + public static int Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static int Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static float Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static float Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static double Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.UInt64 Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.UInt32 Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static System.UInt32 Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.UInt16 Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static System.UInt16 Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.SByte Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static System.SByte Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.Int64 Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.Int16 Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static System.Int16 Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.Byte Extract(System.Runtime.Intrinsics.Vector64 vector, System.Byte index) => throw null; + public static System.Byte Extract(System.Runtime.Intrinsics.Vector128 vector, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 ExtractVector64(System.Runtime.Intrinsics.Vector64 upper, System.Runtime.Intrinsics.Vector64 lower, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 Floor(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Floor(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 FloorScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 FloorScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedAddRoundedHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplyAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedMultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedMultiplySubtractScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 FusedSubtractHalving(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 FusedSubtractHalving(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, int data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, float data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, System.UInt32 data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, System.UInt16 data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, System.SByte data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, System.Int16 data) => throw null; + public static System.Runtime.Intrinsics.Vector64 Insert(System.Runtime.Intrinsics.Vector64 vector, System.Byte index, System.Byte data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, int data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, float data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, double data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.UInt64 data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.UInt32 data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.UInt16 data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.SByte data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.Int64 data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.Int16 data) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 vector, System.Byte index, System.Byte data) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 InsertScalar(System.Runtime.Intrinsics.Vector128 result, System.Byte resultIndex, System.Runtime.Intrinsics.Vector64 value) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector64 LeadingSignCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingSignCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingSignCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingSignCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingSignCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingSignCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 LeadingZeroCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 LeadingZeroCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte index, System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndInsertScalar(System.Runtime.Intrinsics.Vector128 value, System.Byte index, System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndReplicateToVector128(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadAndReplicateToVector64(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector64 LoadVector64(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Max(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumber(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxNumber(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxNumberScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MaxPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Min(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumber(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinNumber(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinNumberScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MinPairwise(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Multiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddByScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddBySelectedScalar(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyBySelectedScalarWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyDoublingSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerByScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerByScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerByScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerByScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerByScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateLowerBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperByScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningSaturateUpperBySelectedScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperByScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperByScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperByScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperByScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingByScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingSaturateHigh(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingSaturateHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyScalarBySelectedScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtract(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractByScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractBySelectedScalar(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningLowerAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyWideningUpperAndSubtract(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Negate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Negate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Negate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Negate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Negate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateSaturate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 NegateSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 NegateSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 NegateSaturate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 NegateScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Not(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Not(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Or(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 OrNot(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 OrNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 PolynomialMultiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 PolynomialMultiply(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 PopCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 PopCount(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 PopCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 PopCount(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalEstimate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalEstimate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootEstimate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootEstimate(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSquareRootEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSquareRootEstimate(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalSquareRootStep(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSquareRootStep(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReciprocalStep(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalStep(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement16(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement16(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement16(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement16(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement32(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement32(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ReverseElement8(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReverseElement8(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundAwayFromZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundAwayFromZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundAwayFromZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNearest(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearest(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNearestScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNearestScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToZero(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 RoundToZeroScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftArithmeticSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftArithmeticScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsertScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftAndInsertScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLeftLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogical(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalRoundedSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLogicalSaturate(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Runtime.Intrinsics.Vector64 count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsertScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightAndInsertScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte shift) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightArithmeticScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogical(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedAddScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector64 ShiftRightLogicalScalar(System.Runtime.Intrinsics.Vector64 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SignExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 SqrtScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector64 SqrtScalar(System.Runtime.Intrinsics.Vector64 value) => throw null; + unsafe public static void Store(int* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(int* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(float* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(double* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt64* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.UInt64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt32* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.UInt32* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt16* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.UInt16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.SByte* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.SByte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Int64* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.Int64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Int16* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.Int16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Byte* address, System.Runtime.Intrinsics.Vector64 source) => throw null; + unsafe public static void Store(System.Byte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreSelectedScalar(int* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(int* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(float* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(float* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(double* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.UInt64* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.UInt32* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.UInt32* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.UInt16* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.UInt16* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.SByte* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.SByte* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.Int64* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.Int16* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.Int16* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.Byte* address, System.Runtime.Intrinsics.Vector64 value, System.Byte index) => throw null; + unsafe public static void StoreSelectedScalar(System.Byte* address, System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Subtract(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractRoundedHighNarrowingLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractRoundedHighNarrowingUpper(System.Runtime.Intrinsics.Vector64 lower, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturate(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractSaturateScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 SubtractScalar(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningLower(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 VectorTableLookup(System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector64 VectorTableLookup(System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector64 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector64 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector64 VectorTableLookupExtension(System.Runtime.Intrinsics.Vector64 defaultValues, System.Runtime.Intrinsics.Vector128 table, System.Runtime.Intrinsics.Vector64 byteIndexes) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 Xor(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningLower(System.Runtime.Intrinsics.Vector64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ZeroExtendWideningUpper(System.Runtime.Intrinsics.Vector128 value) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Arm.Aes` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Aes : System.Runtime.Intrinsics.Arm.ArmBase + { + // Generated from `System.Runtime.Intrinsics.Arm.Aes.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 + { + public static bool IsSupported { get => throw null; } + } + + + public static System.Runtime.Intrinsics.Vector128 Decrypt(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 Encrypt(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 InverseMixColumns(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector128 MixColumns(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningLower(System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PolynomialMultiplyWideningUpper(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Arm.ArmBase` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ArmBase + { + // Generated from `System.Runtime.Intrinsics.Arm.ArmBase.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 + { + internal Arm64() => throw null; + public static bool IsSupported { get => throw null; } + public static int LeadingSignCount(int value) => throw null; + public static int LeadingSignCount(System.Int64 value) => throw null; + public static int LeadingZeroCount(System.UInt64 value) => throw null; + public static int LeadingZeroCount(System.Int64 value) => throw null; + public static System.UInt64 ReverseElementBits(System.UInt64 value) => throw null; + public static System.Int64 ReverseElementBits(System.Int64 value) => throw null; + } + + + internal ArmBase() => throw null; + public static bool IsSupported { get => throw null; } + public static int LeadingZeroCount(int value) => throw null; + public static int LeadingZeroCount(System.UInt32 value) => throw null; + public static int ReverseElementBits(int value) => throw null; + public static System.UInt32 ReverseElementBits(System.UInt32 value) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Arm.Crc32` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Crc32 : System.Runtime.Intrinsics.Arm.ArmBase + { + // Generated from `System.Runtime.Intrinsics.Arm.Crc32.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 + { + public static System.UInt32 ComputeCrc32(System.UInt32 crc, System.UInt64 data) => throw null; + public static System.UInt32 ComputeCrc32C(System.UInt32 crc, System.UInt64 data) => throw null; + public static bool IsSupported { get => throw null; } + } + + + public static System.UInt32 ComputeCrc32(System.UInt32 crc, System.UInt32 data) => throw null; + public static System.UInt32 ComputeCrc32(System.UInt32 crc, System.UInt16 data) => throw null; + public static System.UInt32 ComputeCrc32(System.UInt32 crc, System.Byte data) => throw null; + public static System.UInt32 ComputeCrc32C(System.UInt32 crc, System.UInt32 data) => throw null; + public static System.UInt32 ComputeCrc32C(System.UInt32 crc, System.UInt16 data) => throw null; + public static System.UInt32 ComputeCrc32C(System.UInt32 crc, System.Byte data) => throw null; + public static bool IsSupported { get => throw null; } + } + + // Generated from `System.Runtime.Intrinsics.Arm.Dp` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Dp : System.Runtime.Intrinsics.Arm.AdvSimd + { + // Generated from `System.Runtime.Intrinsics.Arm.Dp.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 + { + public static bool IsSupported { get => throw null; } + } + + + public static System.Runtime.Intrinsics.Vector64 DotProduct(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 DotProduct(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProduct(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProduct(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightScaledIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProductBySelectedQuadruplet(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightScaledIndex) => throw null; + public static bool IsSupported { get => throw null; } + } + + // Generated from `System.Runtime.Intrinsics.Arm.Rdm` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Rdm : System.Runtime.Intrinsics.Arm.AdvSimd + { + // Generated from `System.Runtime.Intrinsics.Arm.Rdm.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 + { + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndAddSaturateHighScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndAddSaturateHighScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndSubtractSaturateHighScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndSubtractSaturateHighScalar(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingScalarBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + } + + + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector64 addend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndAddSaturateHigh(System.Runtime.Intrinsics.Vector128 addend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector64 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector64 minuend, System.Runtime.Intrinsics.Vector64 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector64 right, System.Byte rightIndex) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyRoundedDoublingBySelectedScalarAndSubtractSaturateHigh(System.Runtime.Intrinsics.Vector128 minuend, System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte rightIndex) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Arm.Sha1` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sha1 : System.Runtime.Intrinsics.Arm.ArmBase + { + // Generated from `System.Runtime.Intrinsics.Arm.Sha1.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 + { + public static bool IsSupported { get => throw null; } + } + + + public static System.Runtime.Intrinsics.Vector64 FixedRotate(System.Runtime.Intrinsics.Vector64 hash_e) => throw null; + public static System.Runtime.Intrinsics.Vector128 HashUpdateChoose(System.Runtime.Intrinsics.Vector128 hash_abcd, System.Runtime.Intrinsics.Vector64 hash_e, System.Runtime.Intrinsics.Vector128 wk) => throw null; + public static System.Runtime.Intrinsics.Vector128 HashUpdateMajority(System.Runtime.Intrinsics.Vector128 hash_abcd, System.Runtime.Intrinsics.Vector64 hash_e, System.Runtime.Intrinsics.Vector128 wk) => throw null; + public static System.Runtime.Intrinsics.Vector128 HashUpdateParity(System.Runtime.Intrinsics.Vector128 hash_abcd, System.Runtime.Intrinsics.Vector64 hash_e, System.Runtime.Intrinsics.Vector128 wk) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector128 ScheduleUpdate0(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w4_7, System.Runtime.Intrinsics.Vector128 w8_11) => throw null; + public static System.Runtime.Intrinsics.Vector128 ScheduleUpdate1(System.Runtime.Intrinsics.Vector128 tw0_3, System.Runtime.Intrinsics.Vector128 w12_15) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.Arm.Sha256` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sha256 : System.Runtime.Intrinsics.Arm.ArmBase + { + // Generated from `System.Runtime.Intrinsics.Arm.Sha256.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 + { + public static bool IsSupported { get => throw null; } + } + + + public static System.Runtime.Intrinsics.Vector128 HashUpdate1(System.Runtime.Intrinsics.Vector128 hash_abcd, System.Runtime.Intrinsics.Vector128 hash_efgh, System.Runtime.Intrinsics.Vector128 wk) => throw null; + public static System.Runtime.Intrinsics.Vector128 HashUpdate2(System.Runtime.Intrinsics.Vector128 hash_efgh, System.Runtime.Intrinsics.Vector128 hash_abcd, System.Runtime.Intrinsics.Vector128 wk) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector128 ScheduleUpdate0(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w4_7) => throw null; + public static System.Runtime.Intrinsics.Vector128 ScheduleUpdate1(System.Runtime.Intrinsics.Vector128 w0_3, System.Runtime.Intrinsics.Vector128 w8_11, System.Runtime.Intrinsics.Vector128 w12_15) => throw null; + } + + } + namespace X86 + { + // Generated from `System.Runtime.Intrinsics.X86.Aes` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Aes : System.Runtime.Intrinsics.X86.Sse2 + { + public static System.Runtime.Intrinsics.Vector128 Decrypt(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 DecryptLast(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 Encrypt(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 EncryptLast(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 roundKey) => throw null; + public static System.Runtime.Intrinsics.Vector128 InverseMixColumns(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector128 KeygenAssist(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Aes.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 + { + public static bool IsSupported { get => throw null; } + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Avx` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Avx : System.Runtime.Intrinsics.X86.Sse42 + { + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + internal Avx() => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(float* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(float* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(double* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(double* address) => throw null; + public static System.Runtime.Intrinsics.Vector256 Ceiling(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Ceiling(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Compare(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector256 Compare(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector128 Compare(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector128 Compare(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareLessThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareLessThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotLessThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotLessThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotLessThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareNotLessThanOrEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareOrdered(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareOrdered(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.X86.FloatComparisonMode mode) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareUnordered(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareUnordered(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32WithTruncation(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Single(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Double(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Double(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32WithTruncation(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Single(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Divide(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Divide(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 DotProduct(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 DuplicateEvenIndexed(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 DuplicateEvenIndexed(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 DuplicateOddIndexed(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 Floor(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Floor(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalAdd(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalAdd(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadDquVector256(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadVector256(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(float* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(double* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(float* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(double* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static void MaskStore(float* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(float* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void MaskStore(double* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(double* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Multiply(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Multiply(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Permute(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Permute(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 PermuteVar(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 control) => throw null; + public static System.Runtime.Intrinsics.Vector256 PermuteVar(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 control) => throw null; + public static System.Runtime.Intrinsics.Vector128 PermuteVar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 control) => throw null; + public static System.Runtime.Intrinsics.Vector128 PermuteVar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Reciprocal(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ReciprocalSqrt(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundCurrentDirection(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundCurrentDirection(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToNearestInteger(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToNearestInteger(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToZero(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 RoundToZero(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Sqrt(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Sqrt(System.Runtime.Intrinsics.Vector256 value) => throw null; + unsafe public static void Store(int* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(float* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(double* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.UInt64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.UInt32* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.UInt16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.SByte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.Int64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.Int16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void Store(System.Byte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(int* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(float* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(double* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.UInt64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.UInt32* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.UInt16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.SByte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.Int64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.Int16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAligned(System.Byte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(int* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(float* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(double* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt32* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.SByte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Int64* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Int16* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Byte* address, System.Runtime.Intrinsics.Vector256 source) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Avx.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse42.X64 + { + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.X86.Avx2` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Avx2 : System.Runtime.Intrinsics.X86.Avx + { + public static System.Runtime.Intrinsics.Vector256 Abs(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Abs(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Abs(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Add(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AddSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 AlignRight(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 And(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 AndNot(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Average(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Average(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Blend(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 BlendVariable(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(int* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.UInt64* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.UInt32* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.UInt16* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.SByte* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Int64* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Int16* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Byte* source) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 BroadcastScalarToVector128(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(int* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.UInt64* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.UInt32* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.UInt16* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.SByte* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Int64* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Int16* source) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Byte* source) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 BroadcastScalarToVector256(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 BroadcastVector128ToVector256(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareEqual(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 CompareGreaterThan(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static int ConvertToInt32(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.UInt32 ConvertToUInt32(System.Runtime.Intrinsics.Vector256 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int16(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int16(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int16(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 ConvertToVector256Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 ExtractVector128(System.Runtime.Intrinsics.Vector256 value, System.Byte index) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, int* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, int* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, int* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, float* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, float* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, float* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherMaskVector128(System.Runtime.Intrinsics.Vector128 source, System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector128 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, int* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, float* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, double* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, System.Int64* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherMaskVector256(System.Runtime.Intrinsics.Vector256 source, System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Runtime.Intrinsics.Vector256 mask, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(int* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(int* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(int* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(float* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(float* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(float* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 GatherVector128(System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(int* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(float* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(double* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(double* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(System.UInt64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(System.UInt32* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(System.Int64* baseAddress, System.Runtime.Intrinsics.Vector256 index, System.Byte scale) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 GatherVector256(System.Int64* baseAddress, System.Runtime.Intrinsics.Vector128 index, System.Byte scale) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalAdd(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalAdd(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalAddSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalSubtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 HorizontalSubtractSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector256 InsertVector128(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 LoadAlignedVector256NonTemporal(System.Byte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(int* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(System.UInt64* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(System.UInt32* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector256 MaskLoad(System.Int64* address, System.Runtime.Intrinsics.Vector256 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(int* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(System.UInt64* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(System.UInt32* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 MaskLoad(System.Int64* address, System.Runtime.Intrinsics.Vector128 mask) => throw null; + unsafe public static void MaskStore(int* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(int* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void MaskStore(System.UInt64* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(System.UInt64* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void MaskStore(System.UInt32* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(System.UInt32* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void MaskStore(System.Int64* address, System.Runtime.Intrinsics.Vector256 mask, System.Runtime.Intrinsics.Vector256 source) => throw null; + unsafe public static void MaskStore(System.Int64* address, System.Runtime.Intrinsics.Vector128 mask, System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Max(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Min(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector256 value) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultipleSumAbsoluteDifferences(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 Multiply(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Multiply(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyHighRoundScale(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Or(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 PackSignedSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 PackSignedSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute2x128(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute4x64(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute4x64(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Permute4x64(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 PermuteVar8x32(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 control) => throw null; + public static System.Runtime.Intrinsics.Vector256 PermuteVar8x32(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 control) => throw null; + public static System.Runtime.Intrinsics.Vector256 PermuteVar8x32(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 control) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightArithmeticVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmeticVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical(System.Runtime.Intrinsics.Vector256 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector256 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogicalVariable(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 Shuffle(System.Runtime.Intrinsics.Vector256 value, System.Runtime.Intrinsics.Vector256 mask) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShuffleHigh(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShuffleHigh(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShuffleLow(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 ShuffleLow(System.Runtime.Intrinsics.Vector256 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector256 Sign(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Sign(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Sign(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Subtract(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 SubtractSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 SubtractSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 SubtractSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 SubtractSaturate(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 SumAbsoluteDifferences(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Avx2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Avx.X64 + { + public static bool IsSupported { get => throw null; } + } + + + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + public static System.Runtime.Intrinsics.Vector256 Xor(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.X86.Bmi1` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Bmi1 : System.Runtime.Intrinsics.X86.X86Base + { + public static System.UInt32 AndNot(System.UInt32 left, System.UInt32 right) => throw null; + public static System.UInt32 BitFieldExtract(System.UInt32 value, System.UInt16 control) => throw null; + public static System.UInt32 BitFieldExtract(System.UInt32 value, System.Byte start, System.Byte length) => throw null; + public static System.UInt32 ExtractLowestSetBit(System.UInt32 value) => throw null; + public static System.UInt32 GetMaskUpToLowestSetBit(System.UInt32 value) => throw null; + public static bool IsSupported { get => throw null; } + public static System.UInt32 ResetLowestSetBit(System.UInt32 value) => throw null; + public static System.UInt32 TrailingZeroCount(System.UInt32 value) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Bmi1.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 + { + public static System.UInt64 AndNot(System.UInt64 left, System.UInt64 right) => throw null; + public static System.UInt64 BitFieldExtract(System.UInt64 value, System.UInt16 control) => throw null; + public static System.UInt64 BitFieldExtract(System.UInt64 value, System.Byte start, System.Byte length) => throw null; + public static System.UInt64 ExtractLowestSetBit(System.UInt64 value) => throw null; + public static System.UInt64 GetMaskUpToLowestSetBit(System.UInt64 value) => throw null; + public static bool IsSupported { get => throw null; } + public static System.UInt64 ResetLowestSetBit(System.UInt64 value) => throw null; + public static System.UInt64 TrailingZeroCount(System.UInt64 value) => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Bmi2` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Bmi2 : System.Runtime.Intrinsics.X86.X86Base + { + public static bool IsSupported { get => throw null; } + unsafe public static System.UInt32 MultiplyNoFlags(System.UInt32 left, System.UInt32 right, System.UInt32* low) => throw null; + public static System.UInt32 MultiplyNoFlags(System.UInt32 left, System.UInt32 right) => throw null; + public static System.UInt32 ParallelBitDeposit(System.UInt32 value, System.UInt32 mask) => throw null; + public static System.UInt32 ParallelBitExtract(System.UInt32 value, System.UInt32 mask) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Bmi2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 + { + public static bool IsSupported { get => throw null; } + unsafe public static System.UInt64 MultiplyNoFlags(System.UInt64 left, System.UInt64 right, System.UInt64* low) => throw null; + public static System.UInt64 MultiplyNoFlags(System.UInt64 left, System.UInt64 right) => throw null; + public static System.UInt64 ParallelBitDeposit(System.UInt64 value, System.UInt64 mask) => throw null; + public static System.UInt64 ParallelBitExtract(System.UInt64 value, System.UInt64 mask) => throw null; + public static System.UInt64 ZeroHighBits(System.UInt64 value, System.UInt64 index) => throw null; + } + + + public static System.UInt32 ZeroHighBits(System.UInt32 value, System.UInt32 index) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.X86.FloatComparisonMode` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum FloatComparisonMode + { + // Stub generator skipped constructor + OrderedEqualNonSignaling, + OrderedEqualSignaling, + OrderedFalseNonSignaling, + OrderedFalseSignaling, + OrderedGreaterThanNonSignaling, + OrderedGreaterThanOrEqualNonSignaling, + OrderedGreaterThanOrEqualSignaling, + OrderedGreaterThanSignaling, + OrderedLessThanNonSignaling, + OrderedLessThanOrEqualNonSignaling, + OrderedLessThanOrEqualSignaling, + OrderedLessThanSignaling, + OrderedNonSignaling, + OrderedNotEqualNonSignaling, + OrderedNotEqualSignaling, + OrderedSignaling, + UnorderedEqualNonSignaling, + UnorderedEqualSignaling, + UnorderedNonSignaling, + UnorderedNotEqualNonSignaling, + UnorderedNotEqualSignaling, + UnorderedNotGreaterThanNonSignaling, + UnorderedNotGreaterThanOrEqualNonSignaling, + UnorderedNotGreaterThanOrEqualSignaling, + UnorderedNotGreaterThanSignaling, + UnorderedNotLessThanNonSignaling, + UnorderedNotLessThanOrEqualNonSignaling, + UnorderedNotLessThanOrEqualSignaling, + UnorderedNotLessThanSignaling, + UnorderedSignaling, + UnorderedTrueNonSignaling, + UnorderedTrueSignaling, + } + + // Generated from `System.Runtime.Intrinsics.X86.Fma` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Fma : System.Runtime.Intrinsics.X86.Avx + { + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector256 MultiplyAdd(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAdd(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAdd(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddNegated(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddNegated(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddNegated(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddNegated(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddSubtract(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplyAddSubtract(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddSubtract(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddSubtract(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtract(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtract(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtract(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtractAdd(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtractAdd(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractAdd(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractAdd(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtractNegated(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector256 MultiplySubtractNegated(System.Runtime.Intrinsics.Vector256 a, System.Runtime.Intrinsics.Vector256 b, System.Runtime.Intrinsics.Vector256 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractNegated(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractNegated(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Fma.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Avx.X64 + { + public static bool IsSupported { get => throw null; } + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Lzcnt` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Lzcnt : System.Runtime.Intrinsics.X86.X86Base + { + public static bool IsSupported { get => throw null; } + public static System.UInt32 LeadingZeroCount(System.UInt32 value) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Lzcnt.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 + { + public static bool IsSupported { get => throw null; } + public static System.UInt64 LeadingZeroCount(System.UInt64 value) => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Pclmulqdq` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Pclmulqdq : System.Runtime.Intrinsics.X86.Sse2 + { + public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static bool IsSupported { get => throw null; } + // Generated from `System.Runtime.Intrinsics.X86.Pclmulqdq.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 + { + public static bool IsSupported { get => throw null; } + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Popcnt` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Popcnt : System.Runtime.Intrinsics.X86.Sse42 + { + public static bool IsSupported { get => throw null; } + public static System.UInt32 PopCount(System.UInt32 value) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Popcnt.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse42.X64 + { + public static bool IsSupported { get => throw null; } + public static System.UInt64 PopCount(System.UInt64 value) => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Sse` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sse : System.Runtime.Intrinsics.X86.X86Base + { + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareOrdered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarOrdered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarUnordered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareUnordered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, int value) => throw null; + public static int ConvertToInt32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static int ConvertToInt32WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Divide(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DivideScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadHigh(System.Runtime.Intrinsics.Vector128 lower, float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadLow(System.Runtime.Intrinsics.Vector128 upper, float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(float* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(float* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveHighToLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveLowToHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + unsafe public static void Prefetch0(void* address) => throw null; + unsafe public static void Prefetch1(void* address) => throw null; + unsafe public static void Prefetch2(void* address) => throw null; + unsafe public static void PrefetchNonTemporal(void* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 Reciprocal(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSqrt(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSqrtScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ReciprocalSqrtScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sqrt(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SqrtScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SqrtScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + internal Sse() => throw null; + unsafe public static void Store(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + public static void StoreFence() => throw null; + unsafe public static void StoreHigh(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreLow(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreScalar(float* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Sse.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 + { + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, System.Int64 value) => throw null; + public static System.Int64 ConvertToInt64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Int64 ConvertToInt64WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.X86.Sse2` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sse2 : System.Runtime.Intrinsics.X86.Sse + { + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Add(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AndNot(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Average(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Average(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareNotLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareOrdered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarNotLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarOrdered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarOrderedNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareScalarUnordered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedGreaterThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedLessThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedLessThanOrEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool CompareScalarUnorderedNotEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareUnordered(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Double(System.Runtime.Intrinsics.Vector128 upper, int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Double(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Int32(int value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128UInt32(System.UInt32 value) => throw null; + public static int ConvertToInt32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static int ConvertToInt32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static int ConvertToInt32WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.UInt32 ConvertToUInt32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Double(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Double(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Single(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Single(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Divide(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 DivideScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.UInt16 Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.UInt16 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.Int16 data, System.Byte index) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128(System.Byte* address) => throw null; + public static void LoadFence() => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadHigh(System.Runtime.Intrinsics.Vector128 lower, double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadLow(System.Runtime.Intrinsics.Vector128 upper, double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadScalarVector128(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadVector128(System.Byte* address) => throw null; + unsafe public static void MaskMove(System.Runtime.Intrinsics.Vector128 source, System.Runtime.Intrinsics.Vector128 mask, System.SByte* address) => throw null; + unsafe public static void MaskMove(System.Runtime.Intrinsics.Vector128 source, System.Runtime.Intrinsics.Vector128 mask, System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MaxScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static void MemoryFence() => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static int MoveMask(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Or(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PackSignedSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PackSignedSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftLeftLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical(System.Runtime.Intrinsics.Vector128 value, System.Byte count) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShiftRightLogical128BitLane(System.Runtime.Intrinsics.Vector128 value, System.Byte numBytes) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShuffleHigh(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShuffleHigh(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShuffleLow(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 ShuffleLow(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sqrt(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SqrtScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 SqrtScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + internal Sse2() => throw null; + unsafe public static void Store(int* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt32* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.UInt16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.SByte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Int64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Int16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void Store(System.Byte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(int* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.UInt64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.UInt32* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.UInt16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.SByte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.Int64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.Int16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAligned(System.Byte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(int* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt32* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.UInt16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.SByte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Int64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Int16* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreAlignedNonTemporal(System.Byte* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreHigh(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreLow(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreNonTemporal(int* address, int value) => throw null; + unsafe public static void StoreNonTemporal(System.UInt32* address, System.UInt32 value) => throw null; + unsafe public static void StoreScalar(int* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreScalar(double* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreScalar(System.UInt64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreScalar(System.UInt32* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + unsafe public static void StoreScalar(System.Int64* address, System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Subtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SubtractScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 SumAbsoluteDifferences(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Sse2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse.X64 + { + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Double(System.Runtime.Intrinsics.Vector128 upper, System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Int64(System.Int64 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128UInt64(System.UInt64 value) => throw null; + public static System.Int64 ConvertToInt64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Int64 ConvertToInt64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Int64 ConvertToInt64WithTruncation(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.UInt64 ConvertToUInt64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static void StoreNonTemporal(System.UInt64* address, System.UInt64 value) => throw null; + unsafe public static void StoreNonTemporal(System.Int64* address, System.Int64 value) => throw null; + internal X64() => throw null; + } + + + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Xor(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + } + + // Generated from `System.Runtime.Intrinsics.X86.Sse3` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sse3 : System.Runtime.Intrinsics.X86.Sse2 + { + public static System.Runtime.Intrinsics.Vector128 AddSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 AddSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalAdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalAdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAndDuplicateToVector128(double* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadDquVector128(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveAndDuplicate(System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveHighAndDuplicate(System.Runtime.Intrinsics.Vector128 source) => throw null; + public static System.Runtime.Intrinsics.Vector128 MoveLowAndDuplicate(System.Runtime.Intrinsics.Vector128 source) => throw null; + internal Sse3() => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Sse3.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 + { + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Sse41` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sse41 : System.Runtime.Intrinsics.X86.Ssse3 + { + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 Blend(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 BlendVariable(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 Ceiling(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Ceiling(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CeilingScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CeilingScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CeilingScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CeilingScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 CompareEqual(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int16(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int16(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int16(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int16(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int32(System.Runtime.Intrinsics.Vector128 value) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 ConvertToVector128Int64(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProduct(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static System.Runtime.Intrinsics.Vector128 DotProduct(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; + public static int Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static float Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.UInt32 Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Byte Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Floor(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Floor(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 FloorScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 FloorScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 FloorScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 FloorScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, int data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.UInt32 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.SByte data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.Byte data, System.Byte index) => throw null; + public static bool IsSupported { get => throw null; } + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(int* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.UInt64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.UInt32* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.UInt16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.SByte* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.Int64* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.Int16* address) => throw null; + unsafe public static System.Runtime.Intrinsics.Vector128 LoadAlignedVector128NonTemporal(System.Byte* address) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Max(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Min(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MinHorizontal(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultipleSumAbsoluteDifferences(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 Multiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 PackUnsignedSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirection(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirection(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirectionScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirectionScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirectionScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundCurrentDirectionScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestInteger(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestInteger(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestIntegerScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestIntegerScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestIntegerScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNearestIntegerScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToNegativeInfinityScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinity(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToPositiveInfinityScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZero(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 RoundToZeroScalar(System.Runtime.Intrinsics.Vector128 upper, System.Runtime.Intrinsics.Vector128 value) => throw null; + internal Sse41() => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestNotZAndNotC(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Sse41.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Ssse3.X64 + { + public static System.UInt64 Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Int64 Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.UInt64 data, System.Byte index) => throw null; + public static System.Runtime.Intrinsics.Vector128 Insert(System.Runtime.Intrinsics.Vector128 value, System.Int64 data, System.Byte index) => throw null; + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Sse42` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Sse42 : System.Runtime.Intrinsics.X86.Sse41 + { + public static System.Runtime.Intrinsics.Vector128 CompareGreaterThan(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.UInt32 Crc32(System.UInt32 crc, System.UInt32 data) => throw null; + public static System.UInt32 Crc32(System.UInt32 crc, System.UInt16 data) => throw null; + public static System.UInt32 Crc32(System.UInt32 crc, System.Byte data) => throw null; + public static bool IsSupported { get => throw null; } + internal Sse42() => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Sse42.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse41.X64 + { + public static System.UInt64 Crc32(System.UInt64 crc, System.UInt64 data) => throw null; + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.Ssse3` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Ssse3 : System.Runtime.Intrinsics.X86.Sse3 + { + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 AlignRight(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalAdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalAdd(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalAddSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalSubtract(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 HorizontalSubtractSaturate(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static bool IsSupported { get => throw null; } + public static System.Runtime.Intrinsics.Vector128 MultiplyAddAdjacent(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 MultiplyHighRoundScale(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 Shuffle(System.Runtime.Intrinsics.Vector128 value, System.Runtime.Intrinsics.Vector128 mask) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sign(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sign(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + public static System.Runtime.Intrinsics.Vector128 Sign(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; + internal Ssse3() => throw null; + // Generated from `System.Runtime.Intrinsics.X86.Ssse3.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 : System.Runtime.Intrinsics.X86.Sse3.X64 + { + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + } + + // Generated from `System.Runtime.Intrinsics.X86.X86Base` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X86Base + { + public static (int, int, int, int) CpuId(int functionId, int subFunctionId) => throw null; + public static bool IsSupported { get => throw null; } + // Generated from `System.Runtime.Intrinsics.X86.X86Base.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class X64 + { + public static bool IsSupported { get => throw null; } + internal X64() => throw null; + } + + + internal X86Base() => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs new file mode 100644 index 000000000000..401d4a1f7bda --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs @@ -0,0 +1,73 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Reflection + { + namespace Metadata + { + // Generated from `System.Reflection.Metadata.AssemblyExtensions` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class AssemblyExtensions + { + unsafe public static bool TryGetRawMetadata(this System.Reflection.Assembly assembly, out System.Byte* blob, out int length) => throw null; + } + + } + } + namespace Runtime + { + namespace Loader + { + // Generated from `System.Runtime.Loader.AssemblyDependencyResolver` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyDependencyResolver + { + public AssemblyDependencyResolver(string componentAssemblyPath) => throw null; + public string ResolveAssemblyToPath(System.Reflection.AssemblyName assemblyName) => throw null; + public string ResolveUnmanagedDllToPath(string unmanagedDllName) => throw null; + } + + // Generated from `System.Runtime.Loader.AssemblyLoadContext` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyLoadContext + { + public static System.Collections.Generic.IEnumerable All { get => throw null; } + public System.Collections.Generic.IEnumerable Assemblies { get => throw null; } + public AssemblyLoadContext(string name, bool isCollectible = default(bool)) => throw null; + protected AssemblyLoadContext(bool isCollectible) => throw null; + protected AssemblyLoadContext() => throw null; + // Generated from `System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ContextualReflectionScope : System.IDisposable + { + // Stub generator skipped constructor + public void Dispose() => throw null; + } + + + public static System.Runtime.Loader.AssemblyLoadContext CurrentContextualReflectionContext { get => throw null; } + public static System.Runtime.Loader.AssemblyLoadContext Default { get => throw null; } + public static System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection(System.Reflection.Assembly activating) => throw null; + public System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection() => throw null; + public static System.Reflection.AssemblyName GetAssemblyName(string assemblyPath) => throw null; + public static System.Runtime.Loader.AssemblyLoadContext GetLoadContext(System.Reflection.Assembly assembly) => throw null; + public bool IsCollectible { get => throw null; } + protected virtual System.Reflection.Assembly Load(System.Reflection.AssemblyName assemblyName) => throw null; + public System.Reflection.Assembly LoadFromAssemblyName(System.Reflection.AssemblyName assemblyName) => throw null; + public System.Reflection.Assembly LoadFromAssemblyPath(string assemblyPath) => throw null; + public System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string assemblyPath) => throw null; + public System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly, System.IO.Stream assemblySymbols) => throw null; + public System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly) => throw null; + protected virtual System.IntPtr LoadUnmanagedDll(string unmanagedDllName) => throw null; + protected System.IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath) => throw null; + public string Name { get => throw null; } + public event System.Func Resolving; + public event System.Func ResolvingUnmanagedDll; + public void SetProfileOptimizationRoot(string directoryPath) => throw null; + public void StartProfileOptimization(string profile) => throw null; + public override string ToString() => throw null; + public void Unload() => throw null; + public event System.Action Unloading; + // ERR: Stub generator didn't handle member: ~AssemblyLoadContext + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs new file mode 100644 index 000000000000..86a0b9a2bbdf --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs @@ -0,0 +1,229 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Numerics + { + // Generated from `System.Numerics.BigInteger` in `System.Runtime.Numerics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct BigInteger : System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator !=(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator !=(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator !=(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator !=(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator %(System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor) => throw null; + public static System.Numerics.BigInteger operator &(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator *(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator +(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger operator +(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator ++(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger operator -(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger operator -(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator --(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger operator /(System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor) => throw null; + public static bool operator <(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator <(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator <(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator <(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator <(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator <<(System.Numerics.BigInteger value, int shift) => throw null; + public static bool operator <=(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator <=(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator <=(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator <=(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator <=(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator ==(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator ==(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator ==(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator ==(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator ==(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator >(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator >(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator >(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator >(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator >(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator >=(System.UInt64 left, System.Numerics.BigInteger right) => throw null; + public static bool operator >=(System.Numerics.BigInteger left, System.UInt64 right) => throw null; + public static bool operator >=(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static bool operator >=(System.Numerics.BigInteger left, System.Int64 right) => throw null; + public static bool operator >=(System.Int64 left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator >>(System.Numerics.BigInteger value, int shift) => throw null; + public static System.Numerics.BigInteger Abs(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger Add(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public BigInteger(int value) => throw null; + public BigInteger(float value) => throw null; + public BigInteger(double value) => throw null; + public BigInteger(System.UInt64 value) => throw null; + public BigInteger(System.UInt32 value) => throw null; + public BigInteger(System.ReadOnlySpan value, bool isUnsigned = default(bool), bool isBigEndian = default(bool)) => throw null; + public BigInteger(System.Int64 value) => throw null; + public BigInteger(System.Decimal value) => throw null; + public BigInteger(System.Byte[] value) => throw null; + // Stub generator skipped constructor + public static int Compare(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public int CompareTo(object obj) => throw null; + public int CompareTo(System.UInt64 other) => throw null; + public int CompareTo(System.Numerics.BigInteger other) => throw null; + public int CompareTo(System.Int64 other) => throw null; + public static System.Numerics.BigInteger DivRem(System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor, out System.Numerics.BigInteger remainder) => throw null; + public static System.Numerics.BigInteger Divide(System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.UInt64 other) => throw null; + public bool Equals(System.Numerics.BigInteger other) => throw null; + public bool Equals(System.Int64 other) => throw null; + public System.Int64 GetBitLength() => throw null; + public int GetByteCount(bool isUnsigned = default(bool)) => throw null; + public override int GetHashCode() => throw null; + public static System.Numerics.BigInteger GreatestCommonDivisor(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public bool IsEven { get => throw null; } + public bool IsOne { get => throw null; } + public bool IsPowerOfTwo { get => throw null; } + public bool IsZero { get => throw null; } + public static double Log(System.Numerics.BigInteger value, double baseValue) => throw null; + public static double Log(System.Numerics.BigInteger value) => throw null; + public static double Log10(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger Max(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger Min(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger MinusOne { get => throw null; } + public static System.Numerics.BigInteger ModPow(System.Numerics.BigInteger value, System.Numerics.BigInteger exponent, System.Numerics.BigInteger modulus) => throw null; + public static System.Numerics.BigInteger Multiply(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger Negate(System.Numerics.BigInteger value) => throw null; + public static System.Numerics.BigInteger One { get => throw null; } + public static System.Numerics.BigInteger Parse(string value, System.IFormatProvider provider) => throw null; + public static System.Numerics.BigInteger Parse(string value, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.Numerics.BigInteger Parse(string value, System.Globalization.NumberStyles style) => throw null; + public static System.Numerics.BigInteger Parse(string value) => throw null; + public static System.Numerics.BigInteger Parse(System.ReadOnlySpan value, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static System.Numerics.BigInteger Pow(System.Numerics.BigInteger value, int exponent) => throw null; + public static System.Numerics.BigInteger Remainder(System.Numerics.BigInteger dividend, System.Numerics.BigInteger divisor) => throw null; + public int Sign { get => throw null; } + public static System.Numerics.BigInteger Subtract(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public System.Byte[] ToByteArray(bool isUnsigned = default(bool), bool isBigEndian = default(bool)) => throw null; + public System.Byte[] ToByteArray() => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string value, out System.Numerics.BigInteger result) => throw null; + public static bool TryParse(string value, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Numerics.BigInteger result) => throw null; + public static bool TryParse(System.ReadOnlySpan value, out System.Numerics.BigInteger result) => throw null; + public static bool TryParse(System.ReadOnlySpan value, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Numerics.BigInteger result) => throw null; + public bool TryWriteBytes(System.Span destination, out int bytesWritten, bool isUnsigned = default(bool), bool isBigEndian = default(bool)) => throw null; + public static System.Numerics.BigInteger Zero { get => throw null; } + public static System.Numerics.BigInteger operator ^(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + public static System.Numerics.BigInteger operator |(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; + public static System.Numerics.BigInteger operator ~(System.Numerics.BigInteger value) => throw null; + } + + // Generated from `System.Numerics.Complex` in `System.Runtime.Numerics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Complex : System.IFormattable, System.IEquatable + { + public static bool operator !=(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator *(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator *(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex operator *(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator +(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator +(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex operator +(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator -(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator -(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex operator -(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex operator -(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator /(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex operator /(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex operator /(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static bool operator ==(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static double Abs(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Acos(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Add(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex Add(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex Add(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex Asin(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Atan(System.Numerics.Complex value) => throw null; + public Complex(double real, double imaginary) => throw null; + // Stub generator skipped constructor + public static System.Numerics.Complex Conjugate(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Cos(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Cosh(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Divide(double dividend, System.Numerics.Complex divisor) => throw null; + public static System.Numerics.Complex Divide(System.Numerics.Complex dividend, double divisor) => throw null; + public static System.Numerics.Complex Divide(System.Numerics.Complex dividend, System.Numerics.Complex divisor) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Exp(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex FromPolarCoordinates(double magnitude, double phase) => throw null; + public override int GetHashCode() => throw null; + public double Imaginary { get => throw null; } + public static System.Numerics.Complex ImaginaryOne; + public static System.Numerics.Complex Infinity; + public static bool IsFinite(System.Numerics.Complex value) => throw null; + public static bool IsInfinity(System.Numerics.Complex value) => throw null; + public static bool IsNaN(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Log(System.Numerics.Complex value, double baseValue) => throw null; + public static System.Numerics.Complex Log(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Log10(System.Numerics.Complex value) => throw null; + public double Magnitude { get => throw null; } + public static System.Numerics.Complex Multiply(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex Multiply(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex Multiply(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex NaN; + public static System.Numerics.Complex Negate(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex One; + public double Phase { get => throw null; } + public static System.Numerics.Complex Pow(System.Numerics.Complex value, double power) => throw null; + public static System.Numerics.Complex Pow(System.Numerics.Complex value, System.Numerics.Complex power) => throw null; + public double Real { get => throw null; } + public static System.Numerics.Complex Reciprocal(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Sin(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Sinh(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Sqrt(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Subtract(double left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex Subtract(System.Numerics.Complex left, double right) => throw null; + public static System.Numerics.Complex Subtract(System.Numerics.Complex left, System.Numerics.Complex right) => throw null; + public static System.Numerics.Complex Tan(System.Numerics.Complex value) => throw null; + public static System.Numerics.Complex Tanh(System.Numerics.Complex value) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + public static System.Numerics.Complex Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs new file mode 100644 index 000000000000..4f2f15d5d6b1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs @@ -0,0 +1,213 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + // Generated from `System.Runtime.Serialization.Formatter` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Formatter : System.Runtime.Serialization.IFormatter + { + public abstract System.Runtime.Serialization.SerializationBinder Binder { get; set; } + public abstract System.Runtime.Serialization.StreamingContext Context { get; set; } + public abstract object Deserialize(System.IO.Stream serializationStream); + protected Formatter() => throw null; + protected virtual object GetNext(out System.Int64 objID) => throw null; + protected virtual System.Int64 Schedule(object obj) => throw null; + public abstract void Serialize(System.IO.Stream serializationStream, object graph); + public abstract System.Runtime.Serialization.ISurrogateSelector SurrogateSelector { get; set; } + protected abstract void WriteArray(object obj, string name, System.Type memberType); + protected abstract void WriteBoolean(bool val, string name); + protected abstract void WriteByte(System.Byte val, string name); + protected abstract void WriteChar(System.Char val, string name); + protected abstract void WriteDateTime(System.DateTime val, string name); + protected abstract void WriteDecimal(System.Decimal val, string name); + protected abstract void WriteDouble(double val, string name); + protected abstract void WriteInt16(System.Int16 val, string name); + protected abstract void WriteInt32(int val, string name); + protected abstract void WriteInt64(System.Int64 val, string name); + protected virtual void WriteMember(string memberName, object data) => throw null; + protected abstract void WriteObjectRef(object obj, string name, System.Type memberType); + protected abstract void WriteSByte(System.SByte val, string name); + protected abstract void WriteSingle(float val, string name); + protected abstract void WriteTimeSpan(System.TimeSpan val, string name); + protected abstract void WriteUInt16(System.UInt16 val, string name); + protected abstract void WriteUInt32(System.UInt32 val, string name); + protected abstract void WriteUInt64(System.UInt64 val, string name); + protected abstract void WriteValueType(object obj, string name, System.Type memberType); + protected System.Runtime.Serialization.ObjectIDGenerator m_idGenerator; + protected System.Collections.Queue m_objectQueue; + } + + // Generated from `System.Runtime.Serialization.FormatterConverter` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FormatterConverter : System.Runtime.Serialization.IFormatterConverter + { + public object Convert(object value, System.TypeCode typeCode) => throw null; + public object Convert(object value, System.Type type) => throw null; + public FormatterConverter() => throw null; + public bool ToBoolean(object value) => throw null; + public System.Byte ToByte(object value) => throw null; + public System.Char ToChar(object value) => throw null; + public System.DateTime ToDateTime(object value) => throw null; + public System.Decimal ToDecimal(object value) => throw null; + public double ToDouble(object value) => throw null; + public System.Int16 ToInt16(object value) => throw null; + public int ToInt32(object value) => throw null; + public System.Int64 ToInt64(object value) => throw null; + public System.SByte ToSByte(object value) => throw null; + public float ToSingle(object value) => throw null; + public string ToString(object value) => throw null; + public System.UInt16 ToUInt16(object value) => throw null; + public System.UInt32 ToUInt32(object value) => throw null; + public System.UInt64 ToUInt64(object value) => throw null; + } + + // Generated from `System.Runtime.Serialization.FormatterServices` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class FormatterServices + { + public static void CheckTypeSecurity(System.Type t, System.Runtime.Serialization.Formatters.TypeFilterLevel securityLevel) => throw null; + public static object[] GetObjectData(object obj, System.Reflection.MemberInfo[] members) => throw null; + public static object GetSafeUninitializedObject(System.Type type) => throw null; + public static System.Reflection.MemberInfo[] GetSerializableMembers(System.Type type, System.Runtime.Serialization.StreamingContext context) => throw null; + public static System.Reflection.MemberInfo[] GetSerializableMembers(System.Type type) => throw null; + public static System.Runtime.Serialization.ISerializationSurrogate GetSurrogateForCyclicalReference(System.Runtime.Serialization.ISerializationSurrogate innerSurrogate) => throw null; + public static System.Type GetTypeFromAssembly(System.Reflection.Assembly assem, string name) => throw null; + public static object GetUninitializedObject(System.Type type) => throw null; + public static object PopulateObjectMembers(object obj, System.Reflection.MemberInfo[] members, object[] data) => throw null; + } + + // Generated from `System.Runtime.Serialization.IFormatter` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFormatter + { + System.Runtime.Serialization.SerializationBinder Binder { get; set; } + System.Runtime.Serialization.StreamingContext Context { get; set; } + object Deserialize(System.IO.Stream serializationStream); + void Serialize(System.IO.Stream serializationStream, object graph); + System.Runtime.Serialization.ISurrogateSelector SurrogateSelector { get; set; } + } + + // Generated from `System.Runtime.Serialization.ISerializationSurrogate` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISerializationSurrogate + { + void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); + object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector); + } + + // Generated from `System.Runtime.Serialization.ISurrogateSelector` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISurrogateSelector + { + void ChainSelector(System.Runtime.Serialization.ISurrogateSelector selector); + System.Runtime.Serialization.ISurrogateSelector GetNextSelector(); + System.Runtime.Serialization.ISerializationSurrogate GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector); + } + + // Generated from `System.Runtime.Serialization.ObjectIDGenerator` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectIDGenerator + { + public virtual System.Int64 GetId(object obj, out bool firstTime) => throw null; + public virtual System.Int64 HasId(object obj, out bool firstTime) => throw null; + public ObjectIDGenerator() => throw null; + } + + // Generated from `System.Runtime.Serialization.ObjectManager` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectManager + { + public virtual void DoFixups() => throw null; + public virtual object GetObject(System.Int64 objectID) => throw null; + public ObjectManager(System.Runtime.Serialization.ISurrogateSelector selector, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual void RaiseDeserializationEvent() => throw null; + public void RaiseOnDeserializingEvent(object obj) => throw null; + public virtual void RecordArrayElementFixup(System.Int64 arrayToBeFixed, int[] indices, System.Int64 objectRequired) => throw null; + public virtual void RecordArrayElementFixup(System.Int64 arrayToBeFixed, int index, System.Int64 objectRequired) => throw null; + public virtual void RecordDelayedFixup(System.Int64 objectToBeFixed, string memberName, System.Int64 objectRequired) => throw null; + public virtual void RecordFixup(System.Int64 objectToBeFixed, System.Reflection.MemberInfo member, System.Int64 objectRequired) => throw null; + public void RegisterObject(object obj, System.Int64 objectID, System.Runtime.Serialization.SerializationInfo info, System.Int64 idOfContainingObj, System.Reflection.MemberInfo member, int[] arrayIndex) => throw null; + public void RegisterObject(object obj, System.Int64 objectID, System.Runtime.Serialization.SerializationInfo info, System.Int64 idOfContainingObj, System.Reflection.MemberInfo member) => throw null; + public void RegisterObject(object obj, System.Int64 objectID, System.Runtime.Serialization.SerializationInfo info) => throw null; + public virtual void RegisterObject(object obj, System.Int64 objectID) => throw null; + } + + // Generated from `System.Runtime.Serialization.SerializationBinder` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SerializationBinder + { + public virtual void BindToName(System.Type serializedType, out string assemblyName, out string typeName) => throw null; + public abstract System.Type BindToType(string assemblyName, string typeName); + protected SerializationBinder() => throw null; + } + + // Generated from `System.Runtime.Serialization.SerializationObjectManager` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SerializationObjectManager + { + public void RaiseOnSerializedEvent() => throw null; + public void RegisterObject(object obj) => throw null; + public SerializationObjectManager(System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.Serialization.SurrogateSelector` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SurrogateSelector : System.Runtime.Serialization.ISurrogateSelector + { + public virtual void AddSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISerializationSurrogate surrogate) => throw null; + public virtual void ChainSelector(System.Runtime.Serialization.ISurrogateSelector selector) => throw null; + public virtual System.Runtime.Serialization.ISurrogateSelector GetNextSelector() => throw null; + public virtual System.Runtime.Serialization.ISerializationSurrogate GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector) => throw null; + public virtual void RemoveSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context) => throw null; + public SurrogateSelector() => throw null; + } + + namespace Formatters + { + // Generated from `System.Runtime.Serialization.Formatters.FormatterAssemblyStyle` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FormatterAssemblyStyle + { + // Stub generator skipped constructor + Full, + Simple, + } + + // Generated from `System.Runtime.Serialization.Formatters.FormatterTypeStyle` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FormatterTypeStyle + { + // Stub generator skipped constructor + TypesAlways, + TypesWhenNeeded, + XsdString, + } + + // Generated from `System.Runtime.Serialization.Formatters.IFieldInfo` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFieldInfo + { + string[] FieldNames { get; set; } + System.Type[] FieldTypes { get; set; } + } + + // Generated from `System.Runtime.Serialization.Formatters.TypeFilterLevel` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TypeFilterLevel + { + Full, + Low, + // Stub generator skipped constructor + } + + namespace Binary + { + // Generated from `System.Runtime.Serialization.Formatters.Binary.BinaryFormatter` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BinaryFormatter : System.Runtime.Serialization.IFormatter + { + public System.Runtime.Serialization.Formatters.FormatterAssemblyStyle AssemblyFormat { get => throw null; set => throw null; } + public BinaryFormatter(System.Runtime.Serialization.ISurrogateSelector selector, System.Runtime.Serialization.StreamingContext context) => throw null; + public BinaryFormatter() => throw null; + public System.Runtime.Serialization.SerializationBinder Binder { get => throw null; set => throw null; } + public System.Runtime.Serialization.StreamingContext Context { get => throw null; set => throw null; } + public object Deserialize(System.IO.Stream serializationStream) => throw null; + public System.Runtime.Serialization.Formatters.TypeFilterLevel FilterLevel { get => throw null; set => throw null; } + public void Serialize(System.IO.Stream serializationStream, object graph) => throw null; + public System.Runtime.Serialization.ISurrogateSelector SurrogateSelector { get => throw null; set => throw null; } + public System.Runtime.Serialization.Formatters.FormatterTypeStyle TypeFormat { get => throw null; set => throw null; } + } + + } + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs new file mode 100644 index 000000000000..c91620c5fef4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs @@ -0,0 +1,110 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + // Generated from `System.Runtime.Serialization.DateTimeFormat` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateTimeFormat + { + public DateTimeFormat(string formatString, System.IFormatProvider formatProvider) => throw null; + public DateTimeFormat(string formatString) => throw null; + public System.Globalization.DateTimeStyles DateTimeStyles { get => throw null; set => throw null; } + public System.IFormatProvider FormatProvider { get => throw null; } + public string FormatString { get => throw null; } + } + + // Generated from `System.Runtime.Serialization.EmitTypeInformation` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EmitTypeInformation + { + Always, + AsNeeded, + // Stub generator skipped constructor + Never, + } + + namespace Json + { + // Generated from `System.Runtime.Serialization.Json.DataContractJsonSerializer` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataContractJsonSerializer : System.Runtime.Serialization.XmlObjectSerializer + { + public DataContractJsonSerializer(System.Type type, string rootName, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractJsonSerializer(System.Type type, string rootName) => throw null; + public DataContractJsonSerializer(System.Type type, System.Xml.XmlDictionaryString rootName, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractJsonSerializer(System.Type type, System.Xml.XmlDictionaryString rootName) => throw null; + public DataContractJsonSerializer(System.Type type, System.Runtime.Serialization.Json.DataContractJsonSerializerSettings settings) => throw null; + public DataContractJsonSerializer(System.Type type, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractJsonSerializer(System.Type type) => throw null; + public System.Runtime.Serialization.DateTimeFormat DateTimeFormat { get => throw null; } + public System.Runtime.Serialization.EmitTypeInformation EmitTypeInformation { get => throw null; } + public bool IgnoreExtensionDataObject { get => throw null; } + public override bool IsStartObject(System.Xml.XmlReader reader) => throw null; + public override bool IsStartObject(System.Xml.XmlDictionaryReader reader) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection KnownTypes { get => throw null; } + public int MaxItemsInObjectGraph { get => throw null; } + public override object ReadObject(System.Xml.XmlReader reader, bool verifyObjectName) => throw null; + public override object ReadObject(System.Xml.XmlReader reader) => throw null; + public override object ReadObject(System.Xml.XmlDictionaryReader reader, bool verifyObjectName) => throw null; + public override object ReadObject(System.Xml.XmlDictionaryReader reader) => throw null; + public override object ReadObject(System.IO.Stream stream) => throw null; + public bool SerializeReadOnlyTypes { get => throw null; } + public bool UseSimpleDictionaryFormat { get => throw null; } + public override void WriteEndObject(System.Xml.XmlWriter writer) => throw null; + public override void WriteEndObject(System.Xml.XmlDictionaryWriter writer) => throw null; + public override void WriteObject(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteObject(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + public override void WriteObject(System.IO.Stream stream, object graph) => throw null; + public override void WriteObjectContent(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteObjectContent(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + public override void WriteStartObject(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteStartObject(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + } + + // Generated from `System.Runtime.Serialization.Json.DataContractJsonSerializerSettings` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataContractJsonSerializerSettings + { + public DataContractJsonSerializerSettings() => throw null; + public System.Runtime.Serialization.DateTimeFormat DateTimeFormat { get => throw null; set => throw null; } + public System.Runtime.Serialization.EmitTypeInformation EmitTypeInformation { get => throw null; set => throw null; } + public bool IgnoreExtensionDataObject { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable KnownTypes { get => throw null; set => throw null; } + public int MaxItemsInObjectGraph { get => throw null; set => throw null; } + public string RootName { get => throw null; set => throw null; } + public bool SerializeReadOnlyTypes { get => throw null; set => throw null; } + public bool UseSimpleDictionaryFormat { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.Json.IXmlJsonReaderInitializer` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlJsonReaderInitializer + { + void SetInput(System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose); + void SetInput(System.Byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose); + } + + // Generated from `System.Runtime.Serialization.Json.IXmlJsonWriterInitializer` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlJsonWriterInitializer + { + void SetOutput(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream); + } + + // Generated from `System.Runtime.Serialization.Json.JsonReaderWriterFactory` in `System.Runtime.Serialization.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class JsonReaderWriterFactory + { + public static System.Xml.XmlDictionaryReader CreateJsonReader(System.IO.Stream stream, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateJsonReader(System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateJsonReader(System.Byte[] buffer, int offset, int count, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateJsonReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateJsonReader(System.Byte[] buffer, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryWriter CreateJsonWriter(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream, bool indent, string indentChars) => throw null; + public static System.Xml.XmlDictionaryWriter CreateJsonWriter(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream, bool indent) => throw null; + public static System.Xml.XmlDictionaryWriter CreateJsonWriter(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream) => throw null; + public static System.Xml.XmlDictionaryWriter CreateJsonWriter(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public static System.Xml.XmlDictionaryWriter CreateJsonWriter(System.IO.Stream stream) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs new file mode 100644 index 000000000000..1efb8dc2f82e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs @@ -0,0 +1,100 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + // Generated from `System.Runtime.Serialization.CollectionDataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CollectionDataContractAttribute : System.Attribute + { + public CollectionDataContractAttribute() => throw null; + public bool IsItemNameSetExplicitly { get => throw null; } + public bool IsKeyNameSetExplicitly { get => throw null; } + public bool IsNameSetExplicitly { get => throw null; } + public bool IsNamespaceSetExplicitly { get => throw null; } + public bool IsReference { get => throw null; set => throw null; } + public bool IsReferenceSetExplicitly { get => throw null; } + public bool IsValueNameSetExplicitly { get => throw null; } + public string ItemName { get => throw null; set => throw null; } + public string KeyName { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public string ValueName { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.ContractNamespaceAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContractNamespaceAttribute : System.Attribute + { + public string ClrNamespace { get => throw null; set => throw null; } + public string ContractNamespace { get => throw null; } + public ContractNamespaceAttribute(string contractNamespace) => throw null; + } + + // Generated from `System.Runtime.Serialization.DataContractAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataContractAttribute : System.Attribute + { + public DataContractAttribute() => throw null; + public bool IsNameSetExplicitly { get => throw null; } + public bool IsNamespaceSetExplicitly { get => throw null; } + public bool IsReference { get => throw null; set => throw null; } + public bool IsReferenceSetExplicitly { get => throw null; } + public string Name { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.DataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataMemberAttribute : System.Attribute + { + public DataMemberAttribute() => throw null; + public bool EmitDefaultValue { get => throw null; set => throw null; } + public bool IsNameSetExplicitly { get => throw null; } + public bool IsRequired { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.EnumMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumMemberAttribute : System.Attribute + { + public EnumMemberAttribute() => throw null; + public bool IsValueSetExplicitly { get => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.ISerializationSurrogateProvider` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISerializationSurrogateProvider + { + object GetDeserializedObject(object obj, System.Type targetType); + object GetObjectToSerialize(object obj, System.Type targetType); + System.Type GetSurrogateType(System.Type type); + } + + // Generated from `System.Runtime.Serialization.IgnoreDataMemberAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IgnoreDataMemberAttribute : System.Attribute + { + public IgnoreDataMemberAttribute() => throw null; + } + + // Generated from `System.Runtime.Serialization.InvalidDataContractException` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidDataContractException : System.Exception + { + public InvalidDataContractException(string message, System.Exception innerException) => throw null; + public InvalidDataContractException(string message) => throw null; + public InvalidDataContractException() => throw null; + protected InvalidDataContractException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.Serialization.KnownTypeAttribute` in `System.Runtime.Serialization.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KnownTypeAttribute : System.Attribute + { + public KnownTypeAttribute(string methodName) => throw null; + public KnownTypeAttribute(System.Type type) => throw null; + public string MethodName { get => throw null; } + public System.Type Type { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs new file mode 100644 index 000000000000..cda85a202828 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs @@ -0,0 +1,482 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Runtime + { + namespace Serialization + { + // Generated from `System.Runtime.Serialization.DataContractResolver` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DataContractResolver + { + protected DataContractResolver() => throw null; + public abstract System.Type ResolveName(string typeName, string typeNamespace, System.Type declaredType, System.Runtime.Serialization.DataContractResolver knownTypeResolver); + public abstract bool TryResolveType(System.Type type, System.Type declaredType, System.Runtime.Serialization.DataContractResolver knownTypeResolver, out System.Xml.XmlDictionaryString typeName, out System.Xml.XmlDictionaryString typeNamespace); + } + + // Generated from `System.Runtime.Serialization.DataContractSerializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataContractSerializer : System.Runtime.Serialization.XmlObjectSerializer + { + public System.Runtime.Serialization.DataContractResolver DataContractResolver { get => throw null; } + public DataContractSerializer(System.Type type, string rootName, string rootNamespace, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractSerializer(System.Type type, string rootName, string rootNamespace) => throw null; + public DataContractSerializer(System.Type type, System.Xml.XmlDictionaryString rootName, System.Xml.XmlDictionaryString rootNamespace, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractSerializer(System.Type type, System.Xml.XmlDictionaryString rootName, System.Xml.XmlDictionaryString rootNamespace) => throw null; + public DataContractSerializer(System.Type type, System.Runtime.Serialization.DataContractSerializerSettings settings) => throw null; + public DataContractSerializer(System.Type type, System.Collections.Generic.IEnumerable knownTypes) => throw null; + public DataContractSerializer(System.Type type) => throw null; + public bool IgnoreExtensionDataObject { get => throw null; } + public override bool IsStartObject(System.Xml.XmlReader reader) => throw null; + public override bool IsStartObject(System.Xml.XmlDictionaryReader reader) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection KnownTypes { get => throw null; } + public int MaxItemsInObjectGraph { get => throw null; } + public bool PreserveObjectReferences { get => throw null; } + public override object ReadObject(System.Xml.XmlReader reader, bool verifyObjectName) => throw null; + public override object ReadObject(System.Xml.XmlReader reader) => throw null; + public override object ReadObject(System.Xml.XmlDictionaryReader reader, bool verifyObjectName) => throw null; + public object ReadObject(System.Xml.XmlDictionaryReader reader, bool verifyObjectName, System.Runtime.Serialization.DataContractResolver dataContractResolver) => throw null; + public bool SerializeReadOnlyTypes { get => throw null; } + public override void WriteEndObject(System.Xml.XmlWriter writer) => throw null; + public override void WriteEndObject(System.Xml.XmlDictionaryWriter writer) => throw null; + public void WriteObject(System.Xml.XmlDictionaryWriter writer, object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) => throw null; + public override void WriteObject(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteObjectContent(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteObjectContent(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + public override void WriteStartObject(System.Xml.XmlWriter writer, object graph) => throw null; + public override void WriteStartObject(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + } + + // Generated from `System.Runtime.Serialization.DataContractSerializerExtensions` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataContractSerializerExtensions + { + public static System.Runtime.Serialization.ISerializationSurrogateProvider GetSerializationSurrogateProvider(this System.Runtime.Serialization.DataContractSerializer serializer) => throw null; + public static void SetSerializationSurrogateProvider(this System.Runtime.Serialization.DataContractSerializer serializer, System.Runtime.Serialization.ISerializationSurrogateProvider provider) => throw null; + } + + // Generated from `System.Runtime.Serialization.DataContractSerializerSettings` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataContractSerializerSettings + { + public System.Runtime.Serialization.DataContractResolver DataContractResolver { get => throw null; set => throw null; } + public DataContractSerializerSettings() => throw null; + public bool IgnoreExtensionDataObject { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable KnownTypes { get => throw null; set => throw null; } + public int MaxItemsInObjectGraph { get => throw null; set => throw null; } + public bool PreserveObjectReferences { get => throw null; set => throw null; } + public System.Xml.XmlDictionaryString RootName { get => throw null; set => throw null; } + public System.Xml.XmlDictionaryString RootNamespace { get => throw null; set => throw null; } + public bool SerializeReadOnlyTypes { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.ExportOptions` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExportOptions + { + public ExportOptions() => throw null; + public System.Collections.ObjectModel.Collection KnownTypes { get => throw null; } + } + + // Generated from `System.Runtime.Serialization.ExtensionDataObject` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExtensionDataObject + { + } + + // Generated from `System.Runtime.Serialization.IExtensibleDataObject` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IExtensibleDataObject + { + System.Runtime.Serialization.ExtensionDataObject ExtensionData { get; set; } + } + + // Generated from `System.Runtime.Serialization.XPathQueryGenerator` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class XPathQueryGenerator + { + public static string CreateFromDataContractSerializer(System.Type type, System.Reflection.MemberInfo[] pathToMember, out System.Xml.XmlNamespaceManager namespaces) => throw null; + public static string CreateFromDataContractSerializer(System.Type type, System.Reflection.MemberInfo[] pathToMember, System.Text.StringBuilder rootElementXpath, out System.Xml.XmlNamespaceManager namespaces) => throw null; + } + + // Generated from `System.Runtime.Serialization.XmlObjectSerializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlObjectSerializer + { + public virtual bool IsStartObject(System.Xml.XmlReader reader) => throw null; + public abstract bool IsStartObject(System.Xml.XmlDictionaryReader reader); + public virtual object ReadObject(System.Xml.XmlReader reader, bool verifyObjectName) => throw null; + public virtual object ReadObject(System.Xml.XmlReader reader) => throw null; + public virtual object ReadObject(System.Xml.XmlDictionaryReader reader) => throw null; + public virtual object ReadObject(System.IO.Stream stream) => throw null; + public abstract object ReadObject(System.Xml.XmlDictionaryReader reader, bool verifyObjectName); + public virtual void WriteEndObject(System.Xml.XmlWriter writer) => throw null; + public abstract void WriteEndObject(System.Xml.XmlDictionaryWriter writer); + public virtual void WriteObject(System.Xml.XmlWriter writer, object graph) => throw null; + public virtual void WriteObject(System.Xml.XmlDictionaryWriter writer, object graph) => throw null; + public virtual void WriteObject(System.IO.Stream stream, object graph) => throw null; + public virtual void WriteObjectContent(System.Xml.XmlWriter writer, object graph) => throw null; + public abstract void WriteObjectContent(System.Xml.XmlDictionaryWriter writer, object graph); + public virtual void WriteStartObject(System.Xml.XmlWriter writer, object graph) => throw null; + public abstract void WriteStartObject(System.Xml.XmlDictionaryWriter writer, object graph); + protected XmlObjectSerializer() => throw null; + } + + // Generated from `System.Runtime.Serialization.XmlSerializableServices` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class XmlSerializableServices + { + public static void AddDefaultSchema(System.Xml.Schema.XmlSchemaSet schemas, System.Xml.XmlQualifiedName typeQName) => throw null; + public static System.Xml.XmlNode[] ReadNodes(System.Xml.XmlReader xmlReader) => throw null; + public static void WriteNodes(System.Xml.XmlWriter xmlWriter, System.Xml.XmlNode[] nodes) => throw null; + } + + // Generated from `System.Runtime.Serialization.XsdDataContractExporter` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XsdDataContractExporter + { + public bool CanExport(System.Type type) => throw null; + public bool CanExport(System.Collections.Generic.ICollection types) => throw null; + public bool CanExport(System.Collections.Generic.ICollection assemblies) => throw null; + public void Export(System.Type type) => throw null; + public void Export(System.Collections.Generic.ICollection types) => throw null; + public void Export(System.Collections.Generic.ICollection assemblies) => throw null; + public System.Xml.XmlQualifiedName GetRootElementName(System.Type type) => throw null; + public System.Xml.Schema.XmlSchemaType GetSchemaType(System.Type type) => throw null; + public System.Xml.XmlQualifiedName GetSchemaTypeName(System.Type type) => throw null; + public System.Runtime.Serialization.ExportOptions Options { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaSet Schemas { get => throw null; } + public XsdDataContractExporter(System.Xml.Schema.XmlSchemaSet schemas) => throw null; + public XsdDataContractExporter() => throw null; + } + + } + } + namespace Xml + { + // Generated from `System.Xml.IFragmentCapableXmlDictionaryWriter` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFragmentCapableXmlDictionaryWriter + { + bool CanFragment { get; } + void EndFragment(); + void StartFragment(System.IO.Stream stream, bool generateSelfContainedTextFragment); + void WriteFragment(System.Byte[] buffer, int offset, int count); + } + + // Generated from `System.Xml.IStreamProvider` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStreamProvider + { + System.IO.Stream GetStream(); + void ReleaseStream(System.IO.Stream stream); + } + + // Generated from `System.Xml.IXmlBinaryReaderInitializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlBinaryReaderInitializer + { + void SetInput(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session, System.Xml.OnXmlDictionaryReaderClose onClose); + void SetInput(System.Byte[] buffer, int offset, int count, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session, System.Xml.OnXmlDictionaryReaderClose onClose); + } + + // Generated from `System.Xml.IXmlBinaryWriterInitializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlBinaryWriterInitializer + { + void SetOutput(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlBinaryWriterSession session, bool ownsStream); + } + + // Generated from `System.Xml.IXmlDictionary` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlDictionary + { + bool TryLookup(string value, out System.Xml.XmlDictionaryString result); + bool TryLookup(int key, out System.Xml.XmlDictionaryString result); + bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString result); + } + + // Generated from `System.Xml.IXmlTextReaderInitializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlTextReaderInitializer + { + void SetInput(System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose); + void SetInput(System.Byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose); + } + + // Generated from `System.Xml.IXmlTextWriterInitializer` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlTextWriterInitializer + { + void SetOutput(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream); + } + + // Generated from `System.Xml.OnXmlDictionaryReaderClose` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void OnXmlDictionaryReaderClose(System.Xml.XmlDictionaryReader reader); + + // Generated from `System.Xml.UniqueId` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UniqueId + { + public static bool operator !=(System.Xml.UniqueId id1, System.Xml.UniqueId id2) => throw null; + public static bool operator ==(System.Xml.UniqueId id1, System.Xml.UniqueId id2) => throw null; + public int CharArrayLength { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsGuid { get => throw null; } + public int ToCharArray(System.Char[] chars, int offset) => throw null; + public override string ToString() => throw null; + public bool TryGetGuid(out System.Guid guid) => throw null; + public bool TryGetGuid(System.Byte[] buffer, int offset) => throw null; + public UniqueId(string value) => throw null; + public UniqueId(System.Guid guid) => throw null; + public UniqueId(System.Char[] chars, int offset, int count) => throw null; + public UniqueId(System.Byte[] guid, int offset) => throw null; + public UniqueId(System.Byte[] guid) => throw null; + public UniqueId() => throw null; + } + + // Generated from `System.Xml.XmlBinaryReaderSession` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlBinaryReaderSession : System.Xml.IXmlDictionary + { + public System.Xml.XmlDictionaryString Add(int id, string value) => throw null; + public void Clear() => throw null; + public bool TryLookup(string value, out System.Xml.XmlDictionaryString result) => throw null; + public bool TryLookup(int key, out System.Xml.XmlDictionaryString result) => throw null; + public bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString result) => throw null; + public XmlBinaryReaderSession() => throw null; + } + + // Generated from `System.Xml.XmlBinaryWriterSession` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlBinaryWriterSession + { + public void Reset() => throw null; + public virtual bool TryAdd(System.Xml.XmlDictionaryString value, out int key) => throw null; + public XmlBinaryWriterSession() => throw null; + } + + // Generated from `System.Xml.XmlDictionary` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDictionary : System.Xml.IXmlDictionary + { + public virtual System.Xml.XmlDictionaryString Add(string value) => throw null; + public static System.Xml.IXmlDictionary Empty { get => throw null; } + public virtual bool TryLookup(string value, out System.Xml.XmlDictionaryString result) => throw null; + public virtual bool TryLookup(int key, out System.Xml.XmlDictionaryString result) => throw null; + public virtual bool TryLookup(System.Xml.XmlDictionaryString value, out System.Xml.XmlDictionaryString result) => throw null; + public XmlDictionary(int capacity) => throw null; + public XmlDictionary() => throw null; + } + + // Generated from `System.Xml.XmlDictionaryReader` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlDictionaryReader : System.Xml.XmlReader + { + public virtual bool CanCanonicalize { get => throw null; } + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.IO.Stream stream, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.Byte[] buffer, int offset, int count, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.Byte[] buffer, int offset, int count, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.Byte[] buffer, int offset, int count, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.XmlBinaryReaderSession session) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.Byte[] buffer, int offset, int count, System.Xml.IXmlDictionary dictionary, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateBinaryReader(System.Byte[] buffer, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateDictionaryReader(System.Xml.XmlReader reader) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.IO.Stream stream, System.Text.Encoding[] encodings, string contentType, System.Xml.XmlDictionaryReaderQuotas quotas, int maxBufferSize, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.IO.Stream stream, System.Text.Encoding[] encodings, string contentType, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.IO.Stream stream, System.Text.Encoding[] encodings, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding[] encodings, string contentType, System.Xml.XmlDictionaryReaderQuotas quotas, int maxBufferSize, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding[] encodings, string contentType, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding[] encodings, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateMtomReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateTextReader(System.IO.Stream stream, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateTextReader(System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateTextReader(System.Byte[] buffer, int offset, int count, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReader CreateTextReader(System.Byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose) => throw null; + public static System.Xml.XmlDictionaryReader CreateTextReader(System.Byte[] buffer, System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public virtual void EndCanonicalization() => throw null; + public virtual string GetAttribute(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void GetNonAtomizedNames(out string localName, out string namespaceUri) => throw null; + public virtual int IndexOfLocalName(string[] localNames, string namespaceUri) => throw null; + public virtual int IndexOfLocalName(System.Xml.XmlDictionaryString[] localNames, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual bool IsLocalName(string localName) => throw null; + public virtual bool IsLocalName(System.Xml.XmlDictionaryString localName) => throw null; + public virtual bool IsNamespaceUri(string namespaceUri) => throw null; + public virtual bool IsNamespaceUri(System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual bool IsStartArray(out System.Type type) => throw null; + public virtual bool IsStartElement(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + protected bool IsTextNode(System.Xml.XmlNodeType nodeType) => throw null; + public virtual void MoveToStartElement(string name) => throw null; + public virtual void MoveToStartElement(string localName, string namespaceUri) => throw null; + public virtual void MoveToStartElement(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void MoveToStartElement() => throw null; + public virtual System.Xml.XmlDictionaryReaderQuotas Quotas { get => throw null; } + public virtual int ReadArray(string localName, string namespaceUri, int[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, float[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, double[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, bool[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.TimeSpan[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.Int64[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.Int16[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.Guid[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.Decimal[] array, int offset, int count) => throw null; + public virtual int ReadArray(string localName, string namespaceUri, System.DateTime[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, int[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, float[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, double[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, bool[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.TimeSpan[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Int64[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Int16[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Guid[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Decimal[] array, int offset, int count) => throw null; + public virtual int ReadArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.DateTime[] array, int offset, int count) => throw null; + public virtual bool[] ReadBooleanArray(string localName, string namespaceUri) => throw null; + public virtual bool[] ReadBooleanArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public override object ReadContentAs(System.Type type, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual System.Byte[] ReadContentAsBase64() => throw null; + public virtual System.Byte[] ReadContentAsBinHex() => throw null; + protected System.Byte[] ReadContentAsBinHex(int maxByteArrayContentLength) => throw null; + public virtual int ReadContentAsChars(System.Char[] chars, int offset, int count) => throw null; + public override System.Decimal ReadContentAsDecimal() => throw null; + public override float ReadContentAsFloat() => throw null; + public virtual System.Guid ReadContentAsGuid() => throw null; + public virtual void ReadContentAsQualifiedName(out string localName, out string namespaceUri) => throw null; + public virtual string ReadContentAsString(string[] strings, out int index) => throw null; + public virtual string ReadContentAsString(System.Xml.XmlDictionaryString[] strings, out int index) => throw null; + public override string ReadContentAsString() => throw null; + protected string ReadContentAsString(int maxStringContentLength) => throw null; + public virtual System.TimeSpan ReadContentAsTimeSpan() => throw null; + public virtual System.Xml.UniqueId ReadContentAsUniqueId() => throw null; + public virtual System.DateTime[] ReadDateTimeArray(string localName, string namespaceUri) => throw null; + public virtual System.DateTime[] ReadDateTimeArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual System.Decimal[] ReadDecimalArray(string localName, string namespaceUri) => throw null; + public virtual System.Decimal[] ReadDecimalArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual double[] ReadDoubleArray(string localName, string namespaceUri) => throw null; + public virtual double[] ReadDoubleArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual System.Byte[] ReadElementContentAsBase64() => throw null; + public virtual System.Byte[] ReadElementContentAsBinHex() => throw null; + public override bool ReadElementContentAsBoolean() => throw null; + public override System.DateTime ReadElementContentAsDateTime() => throw null; + public override System.Decimal ReadElementContentAsDecimal() => throw null; + public override double ReadElementContentAsDouble() => throw null; + public override float ReadElementContentAsFloat() => throw null; + public virtual System.Guid ReadElementContentAsGuid() => throw null; + public override int ReadElementContentAsInt() => throw null; + public override System.Int64 ReadElementContentAsLong() => throw null; + public override string ReadElementContentAsString() => throw null; + public virtual System.TimeSpan ReadElementContentAsTimeSpan() => throw null; + public virtual System.Xml.UniqueId ReadElementContentAsUniqueId() => throw null; + public virtual void ReadFullStartElement(string name) => throw null; + public virtual void ReadFullStartElement(string localName, string namespaceUri) => throw null; + public virtual void ReadFullStartElement(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void ReadFullStartElement() => throw null; + public virtual System.Guid[] ReadGuidArray(string localName, string namespaceUri) => throw null; + public virtual System.Guid[] ReadGuidArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual System.Int16[] ReadInt16Array(string localName, string namespaceUri) => throw null; + public virtual System.Int16[] ReadInt16Array(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual int[] ReadInt32Array(string localName, string namespaceUri) => throw null; + public virtual int[] ReadInt32Array(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual System.Int64[] ReadInt64Array(string localName, string namespaceUri) => throw null; + public virtual System.Int64[] ReadInt64Array(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual float[] ReadSingleArray(string localName, string namespaceUri) => throw null; + public virtual float[] ReadSingleArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void ReadStartElement(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public override string ReadString() => throw null; + protected string ReadString(int maxStringContentLength) => throw null; + public virtual System.TimeSpan[] ReadTimeSpanArray(string localName, string namespaceUri) => throw null; + public virtual System.TimeSpan[] ReadTimeSpanArray(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual int ReadValueAsBase64(System.Byte[] buffer, int offset, int count) => throw null; + public virtual void StartCanonicalization(System.IO.Stream stream, bool includeComments, string[] inclusivePrefixes) => throw null; + public virtual bool TryGetArrayLength(out int count) => throw null; + public virtual bool TryGetBase64ContentLength(out int length) => throw null; + public virtual bool TryGetLocalNameAsDictionaryString(out System.Xml.XmlDictionaryString localName) => throw null; + public virtual bool TryGetNamespaceUriAsDictionaryString(out System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual bool TryGetValueAsDictionaryString(out System.Xml.XmlDictionaryString value) => throw null; + protected XmlDictionaryReader() => throw null; + } + + // Generated from `System.Xml.XmlDictionaryReaderQuotaTypes` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum XmlDictionaryReaderQuotaTypes + { + MaxArrayLength, + MaxBytesPerRead, + MaxDepth, + MaxNameTableCharCount, + MaxStringContentLength, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlDictionaryReaderQuotas` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDictionaryReaderQuotas + { + public void CopyTo(System.Xml.XmlDictionaryReaderQuotas quotas) => throw null; + public static System.Xml.XmlDictionaryReaderQuotas Max { get => throw null; } + public int MaxArrayLength { get => throw null; set => throw null; } + public int MaxBytesPerRead { get => throw null; set => throw null; } + public int MaxDepth { get => throw null; set => throw null; } + public int MaxNameTableCharCount { get => throw null; set => throw null; } + public int MaxStringContentLength { get => throw null; set => throw null; } + public System.Xml.XmlDictionaryReaderQuotaTypes ModifiedQuotas { get => throw null; } + public XmlDictionaryReaderQuotas() => throw null; + } + + // Generated from `System.Xml.XmlDictionaryString` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDictionaryString + { + public System.Xml.IXmlDictionary Dictionary { get => throw null; } + public static System.Xml.XmlDictionaryString Empty { get => throw null; } + public int Key { get => throw null; } + public override string ToString() => throw null; + public string Value { get => throw null; } + public XmlDictionaryString(System.Xml.IXmlDictionary dictionary, string value, int key) => throw null; + } + + // Generated from `System.Xml.XmlDictionaryWriter` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlDictionaryWriter : System.Xml.XmlWriter + { + public virtual bool CanCanonicalize { get => throw null; } + public static System.Xml.XmlDictionaryWriter CreateBinaryWriter(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlBinaryWriterSession session, bool ownsStream) => throw null; + public static System.Xml.XmlDictionaryWriter CreateBinaryWriter(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlBinaryWriterSession session) => throw null; + public static System.Xml.XmlDictionaryWriter CreateBinaryWriter(System.IO.Stream stream, System.Xml.IXmlDictionary dictionary) => throw null; + public static System.Xml.XmlDictionaryWriter CreateBinaryWriter(System.IO.Stream stream) => throw null; + public static System.Xml.XmlDictionaryWriter CreateDictionaryWriter(System.Xml.XmlWriter writer) => throw null; + public static System.Xml.XmlDictionaryWriter CreateMtomWriter(System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo, string boundary, string startUri, bool writeMessageHeaders, bool ownsStream) => throw null; + public static System.Xml.XmlDictionaryWriter CreateMtomWriter(System.IO.Stream stream, System.Text.Encoding encoding, int maxSizeInBytes, string startInfo) => throw null; + public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream, System.Text.Encoding encoding, bool ownsStream) => throw null; + public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public static System.Xml.XmlDictionaryWriter CreateTextWriter(System.IO.Stream stream) => throw null; + public virtual void EndCanonicalization() => throw null; + public virtual void StartCanonicalization(System.IO.Stream stream, bool includeComments, string[] inclusivePrefixes) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, int[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, float[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, double[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, bool[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.TimeSpan[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.Int64[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.Int16[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.Guid[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.Decimal[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, string localName, string namespaceUri, System.DateTime[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, int[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, float[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, double[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, bool[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.TimeSpan[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Int64[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Int16[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Guid[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.Decimal[] array, int offset, int count) => throw null; + public virtual void WriteArray(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, System.DateTime[] array, int offset, int count) => throw null; + public void WriteAttributeString(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, string value) => throw null; + public void WriteAttributeString(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, string value) => throw null; + public override System.Threading.Tasks.Task WriteBase64Async(System.Byte[] buffer, int index, int count) => throw null; + public void WriteElementString(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, string value) => throw null; + public void WriteElementString(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri, string value) => throw null; + public virtual void WriteNode(System.Xml.XmlDictionaryReader reader, bool defattr) => throw null; + public override void WriteNode(System.Xml.XmlReader reader, bool defattr) => throw null; + public virtual void WriteQualifiedName(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public void WriteStartAttribute(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void WriteStartAttribute(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public void WriteStartElement(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void WriteStartElement(string prefix, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString namespaceUri) => throw null; + public virtual void WriteString(System.Xml.XmlDictionaryString value) => throw null; + protected virtual void WriteTextNode(System.Xml.XmlDictionaryReader reader, bool isAttribute) => throw null; + public virtual void WriteValue(System.Xml.XmlDictionaryString value) => throw null; + public virtual void WriteValue(System.Xml.UniqueId value) => throw null; + public virtual void WriteValue(System.Xml.IStreamProvider value) => throw null; + public virtual void WriteValue(System.TimeSpan value) => throw null; + public virtual void WriteValue(System.Guid value) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Xml.IStreamProvider value) => throw null; + public virtual void WriteXmlAttribute(string localName, string value) => throw null; + public virtual void WriteXmlAttribute(System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString value) => throw null; + public virtual void WriteXmlnsAttribute(string prefix, string namespaceUri) => throw null; + public virtual void WriteXmlnsAttribute(string prefix, System.Xml.XmlDictionaryString namespaceUri) => throw null; + protected XmlDictionaryWriter() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs new file mode 100644 index 000000000000..cecbce85034e --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs @@ -0,0 +1,12203 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CriticalHandleMinusOneIsInvalid : System.Runtime.InteropServices.CriticalHandle + { + protected CriticalHandleMinusOneIsInvalid() : base(default(System.IntPtr)) => throw null; + public override bool IsInvalid { get => throw null; } + } + + // Generated from `Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CriticalHandleZeroOrMinusOneIsInvalid : System.Runtime.InteropServices.CriticalHandle + { + protected CriticalHandleZeroOrMinusOneIsInvalid() : base(default(System.IntPtr)) => throw null; + public override bool IsInvalid { get => throw null; } + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeFileHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + public override bool IsInvalid { get => throw null; } + protected override bool ReleaseHandle() => throw null; + public SafeFileHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SafeHandleMinusOneIsInvalid : System.Runtime.InteropServices.SafeHandle + { + public override bool IsInvalid { get => throw null; } + protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(default(System.IntPtr), default(bool)) => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SafeHandleZeroOrMinusOneIsInvalid : System.Runtime.InteropServices.SafeHandle + { + public override bool IsInvalid { get => throw null; } + protected SafeHandleZeroOrMinusOneIsInvalid(bool ownsHandle) : base(default(System.IntPtr), default(bool)) => throw null; + } + + // Generated from `Microsoft.Win32.SafeHandles.SafeWaitHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeWaitHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + protected override bool ReleaseHandle() => throw null; + public SafeWaitHandle(System.IntPtr existingHandle, bool ownsHandle) : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + // Generated from `System.AccessViolationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AccessViolationException : System.SystemException + { + public AccessViolationException(string message, System.Exception innerException) => throw null; + public AccessViolationException(string message) => throw null; + public AccessViolationException() => throw null; + protected AccessViolationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Action` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(); + + // Generated from `System.Action<,,,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16); + + // Generated from `System.Action<,,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15); + + // Generated from `System.Action<,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14); + + // Generated from `System.Action<,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13); + + // Generated from `System.Action<,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12); + + // Generated from `System.Action<,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11); + + // Generated from `System.Action<,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10); + + // Generated from `System.Action<,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9); + + // Generated from `System.Action<,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8); + + // Generated from `System.Action<,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); + + // Generated from `System.Action<,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); + + // Generated from `System.Action<,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); + + // Generated from `System.Action<,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4); + + // Generated from `System.Action<,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2, T3 arg3); + + // Generated from `System.Action<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T1 arg1, T2 arg2); + + // Generated from `System.Action<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void Action(T obj); + + // Generated from `System.Activator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Activator + { + public static object CreateInstance(System.Type type, params object[] args) => throw null; + public static object CreateInstance(System.Type type, object[] args, object[] activationAttributes) => throw null; + public static object CreateInstance(System.Type type, bool nonPublic) => throw null; + public static object CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public static object CreateInstance(System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture) => throw null; + public static object CreateInstance(System.Type type) => throw null; + public static T CreateInstance() => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName, object[] activationAttributes) => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName) => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, object[] activationAttributes) => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public static System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName) => throw null; + } + + // Generated from `System.AggregateException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AggregateException : System.Exception + { + public AggregateException(string message, params System.Exception[] innerExceptions) => throw null; + public AggregateException(string message, System.Exception innerException) => throw null; + public AggregateException(string message, System.Collections.Generic.IEnumerable innerExceptions) => throw null; + public AggregateException(string message) => throw null; + public AggregateException(params System.Exception[] innerExceptions) => throw null; + public AggregateException(System.Collections.Generic.IEnumerable innerExceptions) => throw null; + public AggregateException() => throw null; + protected AggregateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.AggregateException Flatten() => throw null; + public override System.Exception GetBaseException() => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void Handle(System.Func predicate) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection InnerExceptions { get => throw null; } + public override string Message { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.AppContext` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class AppContext + { + public static string BaseDirectory { get => throw null; } + public static object GetData(string name) => throw null; + public static void SetSwitch(string switchName, bool isEnabled) => throw null; + public static string TargetFrameworkName { get => throw null; } + public static bool TryGetSwitch(string switchName, out bool isEnabled) => throw null; + } + + // Generated from `System.AppDomain` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AppDomain : System.MarshalByRefObject + { + public void AppendPrivatePath(string path) => throw null; + public string ApplyPolicy(string assemblyName) => throw null; + public event System.AssemblyLoadEventHandler AssemblyLoad; + public event System.ResolveEventHandler AssemblyResolve; + public string BaseDirectory { get => throw null; } + public void ClearPrivatePath() => throw null; + public void ClearShadowCopyPath() => throw null; + public static System.AppDomain CreateDomain(string friendlyName) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName, object[] activationAttributes) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstance(string assemblyName, string typeName) => throw null; + public object CreateInstanceAndUnwrap(string assemblyName, string typeName, object[] activationAttributes) => throw null; + public object CreateInstanceAndUnwrap(string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public object CreateInstanceAndUnwrap(string assemblyName, string typeName) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, object[] activationAttributes) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public System.Runtime.Remoting.ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName) => throw null; + public object CreateInstanceFromAndUnwrap(string assemblyFile, string typeName, object[] activationAttributes) => throw null; + public object CreateInstanceFromAndUnwrap(string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public object CreateInstanceFromAndUnwrap(string assemblyFile, string typeName) => throw null; + public static System.AppDomain CurrentDomain { get => throw null; } + public event System.EventHandler DomainUnload; + public string DynamicDirectory { get => throw null; } + public int ExecuteAssembly(string assemblyFile, string[] args, System.Byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm) => throw null; + public int ExecuteAssembly(string assemblyFile, string[] args) => throw null; + public int ExecuteAssembly(string assemblyFile) => throw null; + public int ExecuteAssemblyByName(string assemblyName, params string[] args) => throw null; + public int ExecuteAssemblyByName(string assemblyName) => throw null; + public int ExecuteAssemblyByName(System.Reflection.AssemblyName assemblyName, params string[] args) => throw null; + public event System.EventHandler FirstChanceException; + public string FriendlyName { get => throw null; } + public System.Reflection.Assembly[] GetAssemblies() => throw null; + public static int GetCurrentThreadId() => throw null; + public object GetData(string name) => throw null; + public int Id { get => throw null; } + public bool? IsCompatibilitySwitchSet(string value) => throw null; + public bool IsDefaultAppDomain() => throw null; + public bool IsFinalizingForUnload() => throw null; + public bool IsFullyTrusted { get => throw null; } + public bool IsHomogenous { get => throw null; } + public System.Reflection.Assembly Load(string assemblyString) => throw null; + public System.Reflection.Assembly Load(System.Reflection.AssemblyName assemblyRef) => throw null; + public System.Reflection.Assembly Load(System.Byte[] rawAssembly, System.Byte[] rawSymbolStore) => throw null; + public System.Reflection.Assembly Load(System.Byte[] rawAssembly) => throw null; + public static bool MonitoringIsEnabled { get => throw null; set => throw null; } + public System.Int64 MonitoringSurvivedMemorySize { get => throw null; } + public static System.Int64 MonitoringSurvivedProcessMemorySize { get => throw null; } + public System.Int64 MonitoringTotalAllocatedMemorySize { get => throw null; } + public System.TimeSpan MonitoringTotalProcessorTime { get => throw null; } + public System.Security.PermissionSet PermissionSet { get => throw null; } + public event System.EventHandler ProcessExit; + public event System.ResolveEventHandler ReflectionOnlyAssemblyResolve; + public System.Reflection.Assembly[] ReflectionOnlyGetAssemblies() => throw null; + public string RelativeSearchPath { get => throw null; } + public event System.ResolveEventHandler ResourceResolve; + public void SetCachePath(string path) => throw null; + public void SetData(string name, object data) => throw null; + public void SetDynamicBase(string path) => throw null; + public void SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy policy) => throw null; + public void SetShadowCopyFiles() => throw null; + public void SetShadowCopyPath(string path) => throw null; + public void SetThreadPrincipal(System.Security.Principal.IPrincipal principal) => throw null; + public System.AppDomainSetup SetupInformation { get => throw null; } + public bool ShadowCopyFiles { get => throw null; } + public override string ToString() => throw null; + public event System.ResolveEventHandler TypeResolve; + public event System.UnhandledExceptionEventHandler UnhandledException; + public static void Unload(System.AppDomain domain) => throw null; + } + + // Generated from `System.AppDomainSetup` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AppDomainSetup + { + public string ApplicationBase { get => throw null; } + public string TargetFrameworkName { get => throw null; } + } + + // Generated from `System.AppDomainUnloadedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AppDomainUnloadedException : System.SystemException + { + public AppDomainUnloadedException(string message, System.Exception innerException) => throw null; + public AppDomainUnloadedException(string message) => throw null; + public AppDomainUnloadedException() => throw null; + protected AppDomainUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ApplicationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ApplicationException : System.Exception + { + public ApplicationException(string message, System.Exception innerException) => throw null; + public ApplicationException(string message) => throw null; + public ApplicationException() => throw null; + protected ApplicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ApplicationId` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ApplicationId + { + public ApplicationId(System.Byte[] publicKeyToken, string name, System.Version version, string processorArchitecture, string culture) => throw null; + public System.ApplicationId Copy() => throw null; + public string Culture { get => throw null; } + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + public string ProcessorArchitecture { get => throw null; } + public System.Byte[] PublicKeyToken { get => throw null; } + public override string ToString() => throw null; + public System.Version Version { get => throw null; } + } + + // Generated from `System.ArgIterator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ArgIterator + { + unsafe public ArgIterator(System.RuntimeArgumentHandle arglist, void* ptr) => throw null; + public ArgIterator(System.RuntimeArgumentHandle arglist) => throw null; + // Stub generator skipped constructor + public void End() => throw null; + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public System.TypedReference GetNextArg(System.RuntimeTypeHandle rth) => throw null; + public System.TypedReference GetNextArg() => throw null; + public System.RuntimeTypeHandle GetNextArgType() => throw null; + public int GetRemainingCount() => throw null; + } + + // Generated from `System.ArgumentException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArgumentException : System.SystemException + { + public ArgumentException(string message, string paramName, System.Exception innerException) => throw null; + public ArgumentException(string message, string paramName) => throw null; + public ArgumentException(string message, System.Exception innerException) => throw null; + public ArgumentException(string message) => throw null; + public ArgumentException() => throw null; + protected ArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public virtual string ParamName { get => throw null; } + } + + // Generated from `System.ArgumentNullException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArgumentNullException : System.ArgumentException + { + public ArgumentNullException(string paramName, string message) => throw null; + public ArgumentNullException(string paramName) => throw null; + public ArgumentNullException(string message, System.Exception innerException) => throw null; + public ArgumentNullException() => throw null; + protected ArgumentNullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ArgumentOutOfRangeException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArgumentOutOfRangeException : System.ArgumentException + { + public virtual object ActualValue { get => throw null; } + public ArgumentOutOfRangeException(string paramName, string message) => throw null; + public ArgumentOutOfRangeException(string paramName, object actualValue, string message) => throw null; + public ArgumentOutOfRangeException(string paramName) => throw null; + public ArgumentOutOfRangeException(string message, System.Exception innerException) => throw null; + public ArgumentOutOfRangeException() => throw null; + protected ArgumentOutOfRangeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + } + + // Generated from `System.ArithmeticException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArithmeticException : System.SystemException + { + public ArithmeticException(string message, System.Exception innerException) => throw null; + public ArithmeticException(string message) => throw null; + public ArithmeticException() => throw null; + protected ArithmeticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Array` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Array : System.ICloneable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + int System.Collections.IList.Add(object value) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection AsReadOnly(T[] array) => throw null; + public static int BinarySearch(T[] array, int index, int length, T value, System.Collections.Generic.IComparer comparer) => throw null; + public static int BinarySearch(T[] array, int index, int length, T value) => throw null; + public static int BinarySearch(T[] array, T value, System.Collections.Generic.IComparer comparer) => throw null; + public static int BinarySearch(T[] array, T value) => throw null; + public static int BinarySearch(System.Array array, object value, System.Collections.IComparer comparer) => throw null; + public static int BinarySearch(System.Array array, object value) => throw null; + public static int BinarySearch(System.Array array, int index, int length, object value, System.Collections.IComparer comparer) => throw null; + public static int BinarySearch(System.Array array, int index, int length, object value) => throw null; + void System.Collections.IList.Clear() => throw null; + public static void Clear(System.Array array, int index, int length) => throw null; + public object Clone() => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public static void ConstrainedCopy(System.Array sourceArray, int sourceIndex, System.Array destinationArray, int destinationIndex, int length) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + public static TOutput[] ConvertAll(TInput[] array, System.Converter converter) => throw null; + public static void Copy(System.Array sourceArray, int sourceIndex, System.Array destinationArray, int destinationIndex, int length) => throw null; + public static void Copy(System.Array sourceArray, System.Int64 sourceIndex, System.Array destinationArray, System.Int64 destinationIndex, System.Int64 length) => throw null; + public static void Copy(System.Array sourceArray, System.Array destinationArray, int length) => throw null; + public static void Copy(System.Array sourceArray, System.Array destinationArray, System.Int64 length) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Array array, System.Int64 index) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + public static System.Array CreateInstance(System.Type elementType, params int[] lengths) => throw null; + public static System.Array CreateInstance(System.Type elementType, params System.Int64[] lengths) => throw null; + public static System.Array CreateInstance(System.Type elementType, int[] lengths, int[] lowerBounds) => throw null; + public static System.Array CreateInstance(System.Type elementType, int length1, int length2, int length3) => throw null; + public static System.Array CreateInstance(System.Type elementType, int length1, int length2) => throw null; + public static System.Array CreateInstance(System.Type elementType, int length) => throw null; + public static T[] Empty() => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public static bool Exists(T[] array, System.Predicate match) => throw null; + public static void Fill(T[] array, T value, int startIndex, int count) => throw null; + public static void Fill(T[] array, T value) => throw null; + public static T Find(T[] array, System.Predicate match) => throw null; + public static T[] FindAll(T[] array, System.Predicate match) => throw null; + public static int FindIndex(T[] array, int startIndex, int count, System.Predicate match) => throw null; + public static int FindIndex(T[] array, int startIndex, System.Predicate match) => throw null; + public static int FindIndex(T[] array, System.Predicate match) => throw null; + public static T FindLast(T[] array, System.Predicate match) => throw null; + public static int FindLastIndex(T[] array, int startIndex, int count, System.Predicate match) => throw null; + public static int FindLastIndex(T[] array, int startIndex, System.Predicate match) => throw null; + public static int FindLastIndex(T[] array, System.Predicate match) => throw null; + public static void ForEach(T[] array, System.Action action) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + public int GetLength(int dimension) => throw null; + public System.Int64 GetLongLength(int dimension) => throw null; + public int GetLowerBound(int dimension) => throw null; + public int GetUpperBound(int dimension) => throw null; + public object GetValue(params int[] indices) => throw null; + public object GetValue(params System.Int64[] indices) => throw null; + public object GetValue(int index1, int index2, int index3) => throw null; + public object GetValue(int index1, int index2) => throw null; + public object GetValue(int index) => throw null; + public object GetValue(System.Int64 index1, System.Int64 index2, System.Int64 index3) => throw null; + public object GetValue(System.Int64 index1, System.Int64 index2) => throw null; + public object GetValue(System.Int64 index) => throw null; + public static int IndexOf(T[] array, T value, int startIndex, int count) => throw null; + public static int IndexOf(T[] array, T value, int startIndex) => throw null; + public static int IndexOf(T[] array, T value) => throw null; + public static int IndexOf(System.Array array, object value, int startIndex, int count) => throw null; + public static int IndexOf(System.Array array, object value, int startIndex) => throw null; + public static int IndexOf(System.Array array, object value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + public void Initialize() => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public static int LastIndexOf(T[] array, T value, int startIndex, int count) => throw null; + public static int LastIndexOf(T[] array, T value, int startIndex) => throw null; + public static int LastIndexOf(T[] array, T value) => throw null; + public static int LastIndexOf(System.Array array, object value, int startIndex, int count) => throw null; + public static int LastIndexOf(System.Array array, object value, int startIndex) => throw null; + public static int LastIndexOf(System.Array array, object value) => throw null; + public int Length { get => throw null; } + public System.Int64 LongLength { get => throw null; } + public int Rank { get => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + public static void Resize(ref T[] array, int newSize) => throw null; + public static void Reverse(T[] array, int index, int length) => throw null; + public static void Reverse(T[] array) => throw null; + public static void Reverse(System.Array array, int index, int length) => throw null; + public static void Reverse(System.Array array) => throw null; + public void SetValue(object value, params int[] indices) => throw null; + public void SetValue(object value, params System.Int64[] indices) => throw null; + public void SetValue(object value, int index1, int index2, int index3) => throw null; + public void SetValue(object value, int index1, int index2) => throw null; + public void SetValue(object value, int index) => throw null; + public void SetValue(object value, System.Int64 index1, System.Int64 index2, System.Int64 index3) => throw null; + public void SetValue(object value, System.Int64 index1, System.Int64 index2) => throw null; + public void SetValue(object value, System.Int64 index) => throw null; + public static void Sort(TKey[] keys, TValue[] items, int index, int length, System.Collections.Generic.IComparer comparer) => throw null; + public static void Sort(TKey[] keys, TValue[] items, int index, int length) => throw null; + public static void Sort(TKey[] keys, TValue[] items, System.Collections.Generic.IComparer comparer) => throw null; + public static void Sort(TKey[] keys, TValue[] items) => throw null; + public static void Sort(T[] array, int index, int length, System.Collections.Generic.IComparer comparer) => throw null; + public static void Sort(T[] array, int index, int length) => throw null; + public static void Sort(T[] array, System.Comparison comparison) => throw null; + public static void Sort(T[] array, System.Collections.Generic.IComparer comparer) => throw null; + public static void Sort(T[] array) => throw null; + public static void Sort(System.Array keys, System.Array items, int index, int length, System.Collections.IComparer comparer) => throw null; + public static void Sort(System.Array keys, System.Array items, int index, int length) => throw null; + public static void Sort(System.Array keys, System.Array items, System.Collections.IComparer comparer) => throw null; + public static void Sort(System.Array keys, System.Array items) => throw null; + public static void Sort(System.Array array, int index, int length, System.Collections.IComparer comparer) => throw null; + public static void Sort(System.Array array, int index, int length) => throw null; + public static void Sort(System.Array array, System.Collections.IComparer comparer) => throw null; + public static void Sort(System.Array array) => throw null; + public object SyncRoot { get => throw null; } + public static bool TrueForAll(T[] array, System.Predicate match) => throw null; + } + + // Generated from `System.ArraySegment<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ArraySegment : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public static bool operator !=(System.ArraySegment a, System.ArraySegment b) => throw null; + public static bool operator ==(System.ArraySegment a, System.ArraySegment b) => throw null; + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public T[] Array { get => throw null; } + public ArraySegment(T[] array, int offset, int count) => throw null; + public ArraySegment(T[] array) => throw null; + // Stub generator skipped constructor + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.Generic.ICollection.Contains(T item) => throw null; + public void CopyTo(T[] destination, int destinationIndex) => throw null; + public void CopyTo(T[] destination) => throw null; + public void CopyTo(System.ArraySegment destination) => throw null; + public int Count { get => throw null; } + public static System.ArraySegment Empty { get => throw null; } + // Generated from `System.ArraySegment<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + // Stub generator skipped constructor + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + + public override bool Equals(object obj) => throw null; + public bool Equals(System.ArraySegment obj) => throw null; + public System.ArraySegment.Enumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + int System.Collections.Generic.IList.IndexOf(T item) => throw null; + void System.Collections.Generic.IList.Insert(int index, T item) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + T System.Collections.Generic.IReadOnlyList.this[int index] { get => throw null; } + T System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public int Offset { get => throw null; } + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public System.ArraySegment Slice(int index, int count) => throw null; + public System.ArraySegment Slice(int index) => throw null; + public T[] ToArray() => throw null; + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.ArrayTypeMismatchException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArrayTypeMismatchException : System.SystemException + { + public ArrayTypeMismatchException(string message, System.Exception innerException) => throw null; + public ArrayTypeMismatchException(string message) => throw null; + public ArrayTypeMismatchException() => throw null; + protected ArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.AssemblyLoadEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyLoadEventArgs : System.EventArgs + { + public AssemblyLoadEventArgs(System.Reflection.Assembly loadedAssembly) => throw null; + public System.Reflection.Assembly LoadedAssembly { get => throw null; } + } + + // Generated from `System.AssemblyLoadEventHandler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void AssemblyLoadEventHandler(object sender, System.AssemblyLoadEventArgs args); + + // Generated from `System.AsyncCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void AsyncCallback(System.IAsyncResult ar); + + // Generated from `System.Attribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Attribute + { + protected Attribute() => throw null; + public override bool Equals(object obj) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.Module element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.Module element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.MemberInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.MemberInfo element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.Assembly element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(System.Reflection.Assembly element, System.Type attributeType) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.ParameterInfo element) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element, System.Type attributeType) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Module element) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, System.Type type, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element, System.Type type) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.MemberInfo element) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element, System.Type attributeType) => throw null; + public static System.Attribute[] GetCustomAttributes(System.Reflection.Assembly element) => throw null; + public override int GetHashCode() => throw null; + public virtual bool IsDefaultAttribute() => throw null; + public static bool IsDefined(System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static bool IsDefined(System.Reflection.Module element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(System.Reflection.Module element, System.Type attributeType) => throw null; + public static bool IsDefined(System.Reflection.MemberInfo element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(System.Reflection.MemberInfo element, System.Type attributeType) => throw null; + public static bool IsDefined(System.Reflection.Assembly element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(System.Reflection.Assembly element, System.Type attributeType) => throw null; + public virtual bool Match(object obj) => throw null; + public virtual object TypeId { get => throw null; } + } + + // Generated from `System.AttributeTargets` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AttributeTargets + { + All, + Assembly, + // Stub generator skipped constructor + Class, + Constructor, + Delegate, + Enum, + Event, + Field, + GenericParameter, + Interface, + Method, + Module, + Parameter, + Property, + ReturnValue, + Struct, + } + + // Generated from `System.AttributeUsageAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AttributeUsageAttribute : System.Attribute + { + public bool AllowMultiple { get => throw null; set => throw null; } + public AttributeUsageAttribute(System.AttributeTargets validOn) => throw null; + public bool Inherited { get => throw null; set => throw null; } + public System.AttributeTargets ValidOn { get => throw null; } + } + + // Generated from `System.BadImageFormatException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BadImageFormatException : System.SystemException + { + public BadImageFormatException(string message, string fileName, System.Exception inner) => throw null; + public BadImageFormatException(string message, string fileName) => throw null; + public BadImageFormatException(string message, System.Exception inner) => throw null; + public BadImageFormatException(string message) => throw null; + public BadImageFormatException() => throw null; + protected BadImageFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string FileName { get => throw null; } + public string FusionLog { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Base64FormattingOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum Base64FormattingOptions + { + // Stub generator skipped constructor + InsertLineBreaks, + None, + } + + // Generated from `System.BitConverter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class BitConverter + { + public static System.Int64 DoubleToInt64Bits(double value) => throw null; + public static System.Byte[] GetBytes(int value) => throw null; + public static System.Byte[] GetBytes(float value) => throw null; + public static System.Byte[] GetBytes(double value) => throw null; + public static System.Byte[] GetBytes(bool value) => throw null; + public static System.Byte[] GetBytes(System.UInt64 value) => throw null; + public static System.Byte[] GetBytes(System.UInt32 value) => throw null; + public static System.Byte[] GetBytes(System.UInt16 value) => throw null; + public static System.Byte[] GetBytes(System.Int64 value) => throw null; + public static System.Byte[] GetBytes(System.Int16 value) => throw null; + public static System.Byte[] GetBytes(System.Char value) => throw null; + public static float Int32BitsToSingle(int value) => throw null; + public static double Int64BitsToDouble(System.Int64 value) => throw null; + public static bool IsLittleEndian; + public static int SingleToInt32Bits(float value) => throw null; + public static bool ToBoolean(System.ReadOnlySpan value) => throw null; + public static bool ToBoolean(System.Byte[] value, int startIndex) => throw null; + public static System.Char ToChar(System.ReadOnlySpan value) => throw null; + public static System.Char ToChar(System.Byte[] value, int startIndex) => throw null; + public static double ToDouble(System.ReadOnlySpan value) => throw null; + public static double ToDouble(System.Byte[] value, int startIndex) => throw null; + public static System.Int16 ToInt16(System.ReadOnlySpan value) => throw null; + public static System.Int16 ToInt16(System.Byte[] value, int startIndex) => throw null; + public static int ToInt32(System.ReadOnlySpan value) => throw null; + public static int ToInt32(System.Byte[] value, int startIndex) => throw null; + public static System.Int64 ToInt64(System.ReadOnlySpan value) => throw null; + public static System.Int64 ToInt64(System.Byte[] value, int startIndex) => throw null; + public static float ToSingle(System.ReadOnlySpan value) => throw null; + public static float ToSingle(System.Byte[] value, int startIndex) => throw null; + public static string ToString(System.Byte[] value, int startIndex, int length) => throw null; + public static string ToString(System.Byte[] value, int startIndex) => throw null; + public static string ToString(System.Byte[] value) => throw null; + public static System.UInt16 ToUInt16(System.ReadOnlySpan value) => throw null; + public static System.UInt16 ToUInt16(System.Byte[] value, int startIndex) => throw null; + public static System.UInt32 ToUInt32(System.ReadOnlySpan value) => throw null; + public static System.UInt32 ToUInt32(System.Byte[] value, int startIndex) => throw null; + public static System.UInt64 ToUInt64(System.ReadOnlySpan value) => throw null; + public static System.UInt64 ToUInt64(System.Byte[] value, int startIndex) => throw null; + public static bool TryWriteBytes(System.Span destination, int value) => throw null; + public static bool TryWriteBytes(System.Span destination, float value) => throw null; + public static bool TryWriteBytes(System.Span destination, double value) => throw null; + public static bool TryWriteBytes(System.Span destination, bool value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.UInt64 value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.UInt32 value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.UInt16 value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.Int64 value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.Int16 value) => throw null; + public static bool TryWriteBytes(System.Span destination, System.Char value) => throw null; + } + + // Generated from `System.Boolean` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Boolean : System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + // Stub generator skipped constructor + public int CompareTo(object obj) => throw null; + public int CompareTo(bool value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(bool obj) => throw null; + public static string FalseString; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public static bool Parse(string value) => throw null; + public static bool Parse(System.ReadOnlySpan value) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public static string TrueString; + public bool TryFormat(System.Span destination, out int charsWritten) => throw null; + public static bool TryParse(string value, out bool result) => throw null; + public static bool TryParse(System.ReadOnlySpan value, out bool result) => throw null; + } + + // Generated from `System.Buffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Buffer + { + public static void BlockCopy(System.Array src, int srcOffset, System.Array dst, int dstOffset, int count) => throw null; + public static int ByteLength(System.Array array) => throw null; + public static System.Byte GetByte(System.Array array, int index) => throw null; + unsafe public static void MemoryCopy(void* source, void* destination, System.UInt64 destinationSizeInBytes, System.UInt64 sourceBytesToCopy) => throw null; + unsafe public static void MemoryCopy(void* source, void* destination, System.Int64 destinationSizeInBytes, System.Int64 sourceBytesToCopy) => throw null; + public static void SetByte(System.Array array, int index, System.Byte value) => throw null; + } + + // Generated from `System.Byte` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Byte : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + // Stub generator skipped constructor + public int CompareTo(object value) => throw null; + public int CompareTo(System.Byte value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Byte obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.Byte MaxValue = default; + public const System.Byte MinValue = default; + public static System.Byte Parse(string s, System.IFormatProvider provider) => throw null; + public static System.Byte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.Byte Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.Byte Parse(string s) => throw null; + public static System.Byte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.Byte result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Byte result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Byte result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Byte result) => throw null; + } + + // Generated from `System.CLSCompliantAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CLSCompliantAttribute : System.Attribute + { + public CLSCompliantAttribute(bool isCompliant) => throw null; + public bool IsCompliant { get => throw null; } + } + + // Generated from `System.CannotUnloadAppDomainException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CannotUnloadAppDomainException : System.SystemException + { + public CannotUnloadAppDomainException(string message, System.Exception innerException) => throw null; + public CannotUnloadAppDomainException(string message) => throw null; + public CannotUnloadAppDomainException() => throw null; + protected CannotUnloadAppDomainException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Char` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Char : System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + // Stub generator skipped constructor + public int CompareTo(object value) => throw null; + public int CompareTo(System.Char value) => throw null; + public static string ConvertFromUtf32(int utf32) => throw null; + public static int ConvertToUtf32(string s, int index) => throw null; + public static int ConvertToUtf32(System.Char highSurrogate, System.Char lowSurrogate) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Char obj) => throw null; + public override int GetHashCode() => throw null; + public static double GetNumericValue(string s, int index) => throw null; + public static double GetNumericValue(System.Char c) => throw null; + public System.TypeCode GetTypeCode() => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(string s, int index) => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(System.Char c) => throw null; + public static bool IsControl(string s, int index) => throw null; + public static bool IsControl(System.Char c) => throw null; + public static bool IsDigit(string s, int index) => throw null; + public static bool IsDigit(System.Char c) => throw null; + public static bool IsHighSurrogate(string s, int index) => throw null; + public static bool IsHighSurrogate(System.Char c) => throw null; + public static bool IsLetter(string s, int index) => throw null; + public static bool IsLetter(System.Char c) => throw null; + public static bool IsLetterOrDigit(string s, int index) => throw null; + public static bool IsLetterOrDigit(System.Char c) => throw null; + public static bool IsLowSurrogate(string s, int index) => throw null; + public static bool IsLowSurrogate(System.Char c) => throw null; + public static bool IsLower(string s, int index) => throw null; + public static bool IsLower(System.Char c) => throw null; + public static bool IsNumber(string s, int index) => throw null; + public static bool IsNumber(System.Char c) => throw null; + public static bool IsPunctuation(string s, int index) => throw null; + public static bool IsPunctuation(System.Char c) => throw null; + public static bool IsSeparator(string s, int index) => throw null; + public static bool IsSeparator(System.Char c) => throw null; + public static bool IsSurrogate(string s, int index) => throw null; + public static bool IsSurrogate(System.Char c) => throw null; + public static bool IsSurrogatePair(string s, int index) => throw null; + public static bool IsSurrogatePair(System.Char highSurrogate, System.Char lowSurrogate) => throw null; + public static bool IsSymbol(string s, int index) => throw null; + public static bool IsSymbol(System.Char c) => throw null; + public static bool IsUpper(string s, int index) => throw null; + public static bool IsUpper(System.Char c) => throw null; + public static bool IsWhiteSpace(string s, int index) => throw null; + public static bool IsWhiteSpace(System.Char c) => throw null; + public const System.Char MaxValue = default; + public const System.Char MinValue = default; + public static System.Char Parse(string s) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + public static System.Char ToLower(System.Char c, System.Globalization.CultureInfo culture) => throw null; + public static System.Char ToLower(System.Char c) => throw null; + public static System.Char ToLowerInvariant(System.Char c) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public static string ToString(System.Char c) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public static System.Char ToUpper(System.Char c, System.Globalization.CultureInfo culture) => throw null; + public static System.Char ToUpper(System.Char c) => throw null; + public static System.Char ToUpperInvariant(System.Char c) => throw null; + public static bool TryParse(string s, out System.Char result) => throw null; + } + + // Generated from `System.CharEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CharEnumerator : System.IDisposable, System.ICloneable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public object Clone() => throw null; + public System.Char Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Comparison<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate int Comparison(T x, T y); + + // Generated from `System.ContextBoundObject` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ContextBoundObject : System.MarshalByRefObject + { + protected ContextBoundObject() => throw null; + } + + // Generated from `System.ContextMarshalException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContextMarshalException : System.SystemException + { + public ContextMarshalException(string message, System.Exception inner) => throw null; + public ContextMarshalException(string message) => throw null; + public ContextMarshalException() => throw null; + protected ContextMarshalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ContextStaticAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ContextStaticAttribute : System.Attribute + { + public ContextStaticAttribute() => throw null; + } + + // Generated from `System.Convert` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Convert + { + public static object ChangeType(object value, System.TypeCode typeCode, System.IFormatProvider provider) => throw null; + public static object ChangeType(object value, System.TypeCode typeCode) => throw null; + public static object ChangeType(object value, System.Type conversionType, System.IFormatProvider provider) => throw null; + public static object ChangeType(object value, System.Type conversionType) => throw null; + public static object DBNull; + public static System.Byte[] FromBase64CharArray(System.Char[] inArray, int offset, int length) => throw null; + public static System.Byte[] FromBase64String(string s) => throw null; + public static System.Byte[] FromHexString(string s) => throw null; + public static System.Byte[] FromHexString(System.ReadOnlySpan chars) => throw null; + public static System.TypeCode GetTypeCode(object value) => throw null; + public static bool IsDBNull(object value) => throw null; + public static int ToBase64CharArray(System.Byte[] inArray, int offsetIn, int length, System.Char[] outArray, int offsetOut, System.Base64FormattingOptions options) => throw null; + public static int ToBase64CharArray(System.Byte[] inArray, int offsetIn, int length, System.Char[] outArray, int offsetOut) => throw null; + public static string ToBase64String(System.ReadOnlySpan bytes, System.Base64FormattingOptions options = default(System.Base64FormattingOptions)) => throw null; + public static string ToBase64String(System.Byte[] inArray, int offset, int length, System.Base64FormattingOptions options) => throw null; + public static string ToBase64String(System.Byte[] inArray, int offset, int length) => throw null; + public static string ToBase64String(System.Byte[] inArray, System.Base64FormattingOptions options) => throw null; + public static string ToBase64String(System.Byte[] inArray) => throw null; + public static bool ToBoolean(string value, System.IFormatProvider provider) => throw null; + public static bool ToBoolean(string value) => throw null; + public static bool ToBoolean(object value, System.IFormatProvider provider) => throw null; + public static bool ToBoolean(object value) => throw null; + public static bool ToBoolean(int value) => throw null; + public static bool ToBoolean(float value) => throw null; + public static bool ToBoolean(double value) => throw null; + public static bool ToBoolean(bool value) => throw null; + public static bool ToBoolean(System.UInt64 value) => throw null; + public static bool ToBoolean(System.UInt32 value) => throw null; + public static bool ToBoolean(System.UInt16 value) => throw null; + public static bool ToBoolean(System.SByte value) => throw null; + public static bool ToBoolean(System.Int64 value) => throw null; + public static bool ToBoolean(System.Int16 value) => throw null; + public static bool ToBoolean(System.Decimal value) => throw null; + public static bool ToBoolean(System.DateTime value) => throw null; + public static bool ToBoolean(System.Char value) => throw null; + public static bool ToBoolean(System.Byte value) => throw null; + public static System.Byte ToByte(string value, int fromBase) => throw null; + public static System.Byte ToByte(string value, System.IFormatProvider provider) => throw null; + public static System.Byte ToByte(string value) => throw null; + public static System.Byte ToByte(object value, System.IFormatProvider provider) => throw null; + public static System.Byte ToByte(object value) => throw null; + public static System.Byte ToByte(int value) => throw null; + public static System.Byte ToByte(float value) => throw null; + public static System.Byte ToByte(double value) => throw null; + public static System.Byte ToByte(bool value) => throw null; + public static System.Byte ToByte(System.UInt64 value) => throw null; + public static System.Byte ToByte(System.UInt32 value) => throw null; + public static System.Byte ToByte(System.UInt16 value) => throw null; + public static System.Byte ToByte(System.SByte value) => throw null; + public static System.Byte ToByte(System.Int64 value) => throw null; + public static System.Byte ToByte(System.Int16 value) => throw null; + public static System.Byte ToByte(System.Decimal value) => throw null; + public static System.Byte ToByte(System.DateTime value) => throw null; + public static System.Byte ToByte(System.Char value) => throw null; + public static System.Byte ToByte(System.Byte value) => throw null; + public static System.Char ToChar(string value, System.IFormatProvider provider) => throw null; + public static System.Char ToChar(string value) => throw null; + public static System.Char ToChar(object value, System.IFormatProvider provider) => throw null; + public static System.Char ToChar(object value) => throw null; + public static System.Char ToChar(int value) => throw null; + public static System.Char ToChar(float value) => throw null; + public static System.Char ToChar(double value) => throw null; + public static System.Char ToChar(bool value) => throw null; + public static System.Char ToChar(System.UInt64 value) => throw null; + public static System.Char ToChar(System.UInt32 value) => throw null; + public static System.Char ToChar(System.UInt16 value) => throw null; + public static System.Char ToChar(System.SByte value) => throw null; + public static System.Char ToChar(System.Int64 value) => throw null; + public static System.Char ToChar(System.Int16 value) => throw null; + public static System.Char ToChar(System.Decimal value) => throw null; + public static System.Char ToChar(System.DateTime value) => throw null; + public static System.Char ToChar(System.Char value) => throw null; + public static System.Char ToChar(System.Byte value) => throw null; + public static System.DateTime ToDateTime(string value, System.IFormatProvider provider) => throw null; + public static System.DateTime ToDateTime(string value) => throw null; + public static System.DateTime ToDateTime(object value, System.IFormatProvider provider) => throw null; + public static System.DateTime ToDateTime(object value) => throw null; + public static System.DateTime ToDateTime(int value) => throw null; + public static System.DateTime ToDateTime(float value) => throw null; + public static System.DateTime ToDateTime(double value) => throw null; + public static System.DateTime ToDateTime(bool value) => throw null; + public static System.DateTime ToDateTime(System.UInt64 value) => throw null; + public static System.DateTime ToDateTime(System.UInt32 value) => throw null; + public static System.DateTime ToDateTime(System.UInt16 value) => throw null; + public static System.DateTime ToDateTime(System.SByte value) => throw null; + public static System.DateTime ToDateTime(System.Int64 value) => throw null; + public static System.DateTime ToDateTime(System.Int16 value) => throw null; + public static System.DateTime ToDateTime(System.Decimal value) => throw null; + public static System.DateTime ToDateTime(System.DateTime value) => throw null; + public static System.DateTime ToDateTime(System.Char value) => throw null; + public static System.DateTime ToDateTime(System.Byte value) => throw null; + public static System.Decimal ToDecimal(string value, System.IFormatProvider provider) => throw null; + public static System.Decimal ToDecimal(string value) => throw null; + public static System.Decimal ToDecimal(object value, System.IFormatProvider provider) => throw null; + public static System.Decimal ToDecimal(object value) => throw null; + public static System.Decimal ToDecimal(int value) => throw null; + public static System.Decimal ToDecimal(float value) => throw null; + public static System.Decimal ToDecimal(double value) => throw null; + public static System.Decimal ToDecimal(bool value) => throw null; + public static System.Decimal ToDecimal(System.UInt64 value) => throw null; + public static System.Decimal ToDecimal(System.UInt32 value) => throw null; + public static System.Decimal ToDecimal(System.UInt16 value) => throw null; + public static System.Decimal ToDecimal(System.SByte value) => throw null; + public static System.Decimal ToDecimal(System.Int64 value) => throw null; + public static System.Decimal ToDecimal(System.Int16 value) => throw null; + public static System.Decimal ToDecimal(System.Decimal value) => throw null; + public static System.Decimal ToDecimal(System.DateTime value) => throw null; + public static System.Decimal ToDecimal(System.Char value) => throw null; + public static System.Decimal ToDecimal(System.Byte value) => throw null; + public static double ToDouble(string value, System.IFormatProvider provider) => throw null; + public static double ToDouble(string value) => throw null; + public static double ToDouble(object value, System.IFormatProvider provider) => throw null; + public static double ToDouble(object value) => throw null; + public static double ToDouble(int value) => throw null; + public static double ToDouble(float value) => throw null; + public static double ToDouble(double value) => throw null; + public static double ToDouble(bool value) => throw null; + public static double ToDouble(System.UInt64 value) => throw null; + public static double ToDouble(System.UInt32 value) => throw null; + public static double ToDouble(System.UInt16 value) => throw null; + public static double ToDouble(System.SByte value) => throw null; + public static double ToDouble(System.Int64 value) => throw null; + public static double ToDouble(System.Int16 value) => throw null; + public static double ToDouble(System.Decimal value) => throw null; + public static double ToDouble(System.DateTime value) => throw null; + public static double ToDouble(System.Char value) => throw null; + public static double ToDouble(System.Byte value) => throw null; + public static string ToHexString(System.ReadOnlySpan bytes) => throw null; + public static string ToHexString(System.Byte[] inArray, int offset, int length) => throw null; + public static string ToHexString(System.Byte[] inArray) => throw null; + public static System.Int16 ToInt16(string value, int fromBase) => throw null; + public static System.Int16 ToInt16(string value, System.IFormatProvider provider) => throw null; + public static System.Int16 ToInt16(string value) => throw null; + public static System.Int16 ToInt16(object value, System.IFormatProvider provider) => throw null; + public static System.Int16 ToInt16(object value) => throw null; + public static System.Int16 ToInt16(int value) => throw null; + public static System.Int16 ToInt16(float value) => throw null; + public static System.Int16 ToInt16(double value) => throw null; + public static System.Int16 ToInt16(bool value) => throw null; + public static System.Int16 ToInt16(System.UInt64 value) => throw null; + public static System.Int16 ToInt16(System.UInt32 value) => throw null; + public static System.Int16 ToInt16(System.UInt16 value) => throw null; + public static System.Int16 ToInt16(System.SByte value) => throw null; + public static System.Int16 ToInt16(System.Int64 value) => throw null; + public static System.Int16 ToInt16(System.Int16 value) => throw null; + public static System.Int16 ToInt16(System.Decimal value) => throw null; + public static System.Int16 ToInt16(System.DateTime value) => throw null; + public static System.Int16 ToInt16(System.Char value) => throw null; + public static System.Int16 ToInt16(System.Byte value) => throw null; + public static int ToInt32(string value, int fromBase) => throw null; + public static int ToInt32(string value, System.IFormatProvider provider) => throw null; + public static int ToInt32(string value) => throw null; + public static int ToInt32(object value, System.IFormatProvider provider) => throw null; + public static int ToInt32(object value) => throw null; + public static int ToInt32(int value) => throw null; + public static int ToInt32(float value) => throw null; + public static int ToInt32(double value) => throw null; + public static int ToInt32(bool value) => throw null; + public static int ToInt32(System.UInt64 value) => throw null; + public static int ToInt32(System.UInt32 value) => throw null; + public static int ToInt32(System.UInt16 value) => throw null; + public static int ToInt32(System.SByte value) => throw null; + public static int ToInt32(System.Int64 value) => throw null; + public static int ToInt32(System.Int16 value) => throw null; + public static int ToInt32(System.Decimal value) => throw null; + public static int ToInt32(System.DateTime value) => throw null; + public static int ToInt32(System.Char value) => throw null; + public static int ToInt32(System.Byte value) => throw null; + public static System.Int64 ToInt64(string value, int fromBase) => throw null; + public static System.Int64 ToInt64(string value, System.IFormatProvider provider) => throw null; + public static System.Int64 ToInt64(string value) => throw null; + public static System.Int64 ToInt64(object value, System.IFormatProvider provider) => throw null; + public static System.Int64 ToInt64(object value) => throw null; + public static System.Int64 ToInt64(int value) => throw null; + public static System.Int64 ToInt64(float value) => throw null; + public static System.Int64 ToInt64(double value) => throw null; + public static System.Int64 ToInt64(bool value) => throw null; + public static System.Int64 ToInt64(System.UInt64 value) => throw null; + public static System.Int64 ToInt64(System.UInt32 value) => throw null; + public static System.Int64 ToInt64(System.UInt16 value) => throw null; + public static System.Int64 ToInt64(System.SByte value) => throw null; + public static System.Int64 ToInt64(System.Int64 value) => throw null; + public static System.Int64 ToInt64(System.Int16 value) => throw null; + public static System.Int64 ToInt64(System.Decimal value) => throw null; + public static System.Int64 ToInt64(System.DateTime value) => throw null; + public static System.Int64 ToInt64(System.Char value) => throw null; + public static System.Int64 ToInt64(System.Byte value) => throw null; + public static System.SByte ToSByte(string value, int fromBase) => throw null; + public static System.SByte ToSByte(string value, System.IFormatProvider provider) => throw null; + public static System.SByte ToSByte(string value) => throw null; + public static System.SByte ToSByte(object value, System.IFormatProvider provider) => throw null; + public static System.SByte ToSByte(object value) => throw null; + public static System.SByte ToSByte(int value) => throw null; + public static System.SByte ToSByte(float value) => throw null; + public static System.SByte ToSByte(double value) => throw null; + public static System.SByte ToSByte(bool value) => throw null; + public static System.SByte ToSByte(System.UInt64 value) => throw null; + public static System.SByte ToSByte(System.UInt32 value) => throw null; + public static System.SByte ToSByte(System.UInt16 value) => throw null; + public static System.SByte ToSByte(System.SByte value) => throw null; + public static System.SByte ToSByte(System.Int64 value) => throw null; + public static System.SByte ToSByte(System.Int16 value) => throw null; + public static System.SByte ToSByte(System.Decimal value) => throw null; + public static System.SByte ToSByte(System.DateTime value) => throw null; + public static System.SByte ToSByte(System.Char value) => throw null; + public static System.SByte ToSByte(System.Byte value) => throw null; + public static float ToSingle(string value, System.IFormatProvider provider) => throw null; + public static float ToSingle(string value) => throw null; + public static float ToSingle(object value, System.IFormatProvider provider) => throw null; + public static float ToSingle(object value) => throw null; + public static float ToSingle(int value) => throw null; + public static float ToSingle(float value) => throw null; + public static float ToSingle(double value) => throw null; + public static float ToSingle(bool value) => throw null; + public static float ToSingle(System.UInt64 value) => throw null; + public static float ToSingle(System.UInt32 value) => throw null; + public static float ToSingle(System.UInt16 value) => throw null; + public static float ToSingle(System.SByte value) => throw null; + public static float ToSingle(System.Int64 value) => throw null; + public static float ToSingle(System.Int16 value) => throw null; + public static float ToSingle(System.Decimal value) => throw null; + public static float ToSingle(System.DateTime value) => throw null; + public static float ToSingle(System.Char value) => throw null; + public static float ToSingle(System.Byte value) => throw null; + public static string ToString(string value, System.IFormatProvider provider) => throw null; + public static string ToString(string value) => throw null; + public static string ToString(object value, System.IFormatProvider provider) => throw null; + public static string ToString(object value) => throw null; + public static string ToString(int value, int toBase) => throw null; + public static string ToString(int value, System.IFormatProvider provider) => throw null; + public static string ToString(int value) => throw null; + public static string ToString(float value, System.IFormatProvider provider) => throw null; + public static string ToString(float value) => throw null; + public static string ToString(double value, System.IFormatProvider provider) => throw null; + public static string ToString(double value) => throw null; + public static string ToString(bool value, System.IFormatProvider provider) => throw null; + public static string ToString(bool value) => throw null; + public static string ToString(System.UInt64 value, System.IFormatProvider provider) => throw null; + public static string ToString(System.UInt64 value) => throw null; + public static string ToString(System.UInt32 value, System.IFormatProvider provider) => throw null; + public static string ToString(System.UInt32 value) => throw null; + public static string ToString(System.UInt16 value, System.IFormatProvider provider) => throw null; + public static string ToString(System.UInt16 value) => throw null; + public static string ToString(System.SByte value, System.IFormatProvider provider) => throw null; + public static string ToString(System.SByte value) => throw null; + public static string ToString(System.Int64 value, int toBase) => throw null; + public static string ToString(System.Int64 value, System.IFormatProvider provider) => throw null; + public static string ToString(System.Int64 value) => throw null; + public static string ToString(System.Int16 value, int toBase) => throw null; + public static string ToString(System.Int16 value, System.IFormatProvider provider) => throw null; + public static string ToString(System.Int16 value) => throw null; + public static string ToString(System.Decimal value, System.IFormatProvider provider) => throw null; + public static string ToString(System.Decimal value) => throw null; + public static string ToString(System.DateTime value, System.IFormatProvider provider) => throw null; + public static string ToString(System.DateTime value) => throw null; + public static string ToString(System.Char value, System.IFormatProvider provider) => throw null; + public static string ToString(System.Char value) => throw null; + public static string ToString(System.Byte value, int toBase) => throw null; + public static string ToString(System.Byte value, System.IFormatProvider provider) => throw null; + public static string ToString(System.Byte value) => throw null; + public static System.UInt16 ToUInt16(string value, int fromBase) => throw null; + public static System.UInt16 ToUInt16(string value, System.IFormatProvider provider) => throw null; + public static System.UInt16 ToUInt16(string value) => throw null; + public static System.UInt16 ToUInt16(object value, System.IFormatProvider provider) => throw null; + public static System.UInt16 ToUInt16(object value) => throw null; + public static System.UInt16 ToUInt16(int value) => throw null; + public static System.UInt16 ToUInt16(float value) => throw null; + public static System.UInt16 ToUInt16(double value) => throw null; + public static System.UInt16 ToUInt16(bool value) => throw null; + public static System.UInt16 ToUInt16(System.UInt64 value) => throw null; + public static System.UInt16 ToUInt16(System.UInt32 value) => throw null; + public static System.UInt16 ToUInt16(System.UInt16 value) => throw null; + public static System.UInt16 ToUInt16(System.SByte value) => throw null; + public static System.UInt16 ToUInt16(System.Int64 value) => throw null; + public static System.UInt16 ToUInt16(System.Int16 value) => throw null; + public static System.UInt16 ToUInt16(System.Decimal value) => throw null; + public static System.UInt16 ToUInt16(System.DateTime value) => throw null; + public static System.UInt16 ToUInt16(System.Char value) => throw null; + public static System.UInt16 ToUInt16(System.Byte value) => throw null; + public static System.UInt32 ToUInt32(string value, int fromBase) => throw null; + public static System.UInt32 ToUInt32(string value, System.IFormatProvider provider) => throw null; + public static System.UInt32 ToUInt32(string value) => throw null; + public static System.UInt32 ToUInt32(object value, System.IFormatProvider provider) => throw null; + public static System.UInt32 ToUInt32(object value) => throw null; + public static System.UInt32 ToUInt32(int value) => throw null; + public static System.UInt32 ToUInt32(float value) => throw null; + public static System.UInt32 ToUInt32(double value) => throw null; + public static System.UInt32 ToUInt32(bool value) => throw null; + public static System.UInt32 ToUInt32(System.UInt64 value) => throw null; + public static System.UInt32 ToUInt32(System.UInt32 value) => throw null; + public static System.UInt32 ToUInt32(System.UInt16 value) => throw null; + public static System.UInt32 ToUInt32(System.SByte value) => throw null; + public static System.UInt32 ToUInt32(System.Int64 value) => throw null; + public static System.UInt32 ToUInt32(System.Int16 value) => throw null; + public static System.UInt32 ToUInt32(System.Decimal value) => throw null; + public static System.UInt32 ToUInt32(System.DateTime value) => throw null; + public static System.UInt32 ToUInt32(System.Char value) => throw null; + public static System.UInt32 ToUInt32(System.Byte value) => throw null; + public static System.UInt64 ToUInt64(string value, int fromBase) => throw null; + public static System.UInt64 ToUInt64(string value, System.IFormatProvider provider) => throw null; + public static System.UInt64 ToUInt64(string value) => throw null; + public static System.UInt64 ToUInt64(object value, System.IFormatProvider provider) => throw null; + public static System.UInt64 ToUInt64(object value) => throw null; + public static System.UInt64 ToUInt64(int value) => throw null; + public static System.UInt64 ToUInt64(float value) => throw null; + public static System.UInt64 ToUInt64(double value) => throw null; + public static System.UInt64 ToUInt64(bool value) => throw null; + public static System.UInt64 ToUInt64(System.UInt64 value) => throw null; + public static System.UInt64 ToUInt64(System.UInt32 value) => throw null; + public static System.UInt64 ToUInt64(System.UInt16 value) => throw null; + public static System.UInt64 ToUInt64(System.SByte value) => throw null; + public static System.UInt64 ToUInt64(System.Int64 value) => throw null; + public static System.UInt64 ToUInt64(System.Int16 value) => throw null; + public static System.UInt64 ToUInt64(System.Decimal value) => throw null; + public static System.UInt64 ToUInt64(System.DateTime value) => throw null; + public static System.UInt64 ToUInt64(System.Char value) => throw null; + public static System.UInt64 ToUInt64(System.Byte value) => throw null; + public static bool TryFromBase64Chars(System.ReadOnlySpan chars, System.Span bytes, out int bytesWritten) => throw null; + public static bool TryFromBase64String(string s, System.Span bytes, out int bytesWritten) => throw null; + public static bool TryToBase64Chars(System.ReadOnlySpan bytes, System.Span chars, out int charsWritten, System.Base64FormattingOptions options = default(System.Base64FormattingOptions)) => throw null; + } + + // Generated from `System.Converter<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TOutput Converter(TInput input); + + // Generated from `System.DBNull` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DBNull : System.Runtime.Serialization.ISerializable, System.IConvertible + { + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.TypeCode GetTypeCode() => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public static System.DBNull Value; + } + + // Generated from `System.DateTime` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DateTime : System.Runtime.Serialization.ISerializable, System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public static bool operator !=(System.DateTime d1, System.DateTime d2) => throw null; + public static System.DateTime operator +(System.DateTime d, System.TimeSpan t) => throw null; + public static System.TimeSpan operator -(System.DateTime d1, System.DateTime d2) => throw null; + public static System.DateTime operator -(System.DateTime d, System.TimeSpan t) => throw null; + public static bool operator <(System.DateTime t1, System.DateTime t2) => throw null; + public static bool operator <=(System.DateTime t1, System.DateTime t2) => throw null; + public static bool operator ==(System.DateTime d1, System.DateTime d2) => throw null; + public static bool operator >(System.DateTime t1, System.DateTime t2) => throw null; + public static bool operator >=(System.DateTime t1, System.DateTime t2) => throw null; + public System.DateTime Add(System.TimeSpan value) => throw null; + public System.DateTime AddDays(double value) => throw null; + public System.DateTime AddHours(double value) => throw null; + public System.DateTime AddMilliseconds(double value) => throw null; + public System.DateTime AddMinutes(double value) => throw null; + public System.DateTime AddMonths(int months) => throw null; + public System.DateTime AddSeconds(double value) => throw null; + public System.DateTime AddTicks(System.Int64 value) => throw null; + public System.DateTime AddYears(int value) => throw null; + public static int Compare(System.DateTime t1, System.DateTime t2) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.DateTime value) => throw null; + public System.DateTime Date { get => throw null; } + public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, System.Globalization.Calendar calendar, System.DateTimeKind kind) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, System.Globalization.Calendar calendar) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, System.DateTimeKind kind) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second, System.Globalization.Calendar calendar) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second, System.DateTimeKind kind) => throw null; + public DateTime(int year, int month, int day, int hour, int minute, int second) => throw null; + public DateTime(int year, int month, int day, System.Globalization.Calendar calendar) => throw null; + public DateTime(int year, int month, int day) => throw null; + public DateTime(System.Int64 ticks, System.DateTimeKind kind) => throw null; + public DateTime(System.Int64 ticks) => throw null; + // Stub generator skipped constructor + public int Day { get => throw null; } + public System.DayOfWeek DayOfWeek { get => throw null; } + public int DayOfYear { get => throw null; } + public static int DaysInMonth(int year, int month) => throw null; + public static bool Equals(System.DateTime t1, System.DateTime t2) => throw null; + public override bool Equals(object value) => throw null; + public bool Equals(System.DateTime value) => throw null; + public static System.DateTime FromBinary(System.Int64 dateData) => throw null; + public static System.DateTime FromFileTime(System.Int64 fileTime) => throw null; + public static System.DateTime FromFileTimeUtc(System.Int64 fileTime) => throw null; + public static System.DateTime FromOADate(double d) => throw null; + public string[] GetDateTimeFormats(System.IFormatProvider provider) => throw null; + public string[] GetDateTimeFormats(System.Char format, System.IFormatProvider provider) => throw null; + public string[] GetDateTimeFormats(System.Char format) => throw null; + public string[] GetDateTimeFormats() => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.TypeCode GetTypeCode() => throw null; + public int Hour { get => throw null; } + public bool IsDaylightSavingTime() => throw null; + public static bool IsLeapYear(int year) => throw null; + public System.DateTimeKind Kind { get => throw null; } + public static System.DateTime MaxValue; + public int Millisecond { get => throw null; } + public static System.DateTime MinValue; + public int Minute { get => throw null; } + public int Month { get => throw null; } + public static System.DateTime Now { get => throw null; } + public static System.DateTime Parse(string s, System.IFormatProvider provider, System.Globalization.DateTimeStyles styles) => throw null; + public static System.DateTime Parse(string s, System.IFormatProvider provider) => throw null; + public static System.DateTime Parse(string s) => throw null; + public static System.DateTime Parse(System.ReadOnlySpan s, System.IFormatProvider provider = default(System.IFormatProvider), System.Globalization.DateTimeStyles styles = default(System.Globalization.DateTimeStyles)) => throw null; + public static System.DateTime ParseExact(string s, string[] formats, System.IFormatProvider provider, System.Globalization.DateTimeStyles style) => throw null; + public static System.DateTime ParseExact(string s, string format, System.IFormatProvider provider, System.Globalization.DateTimeStyles style) => throw null; + public static System.DateTime ParseExact(string s, string format, System.IFormatProvider provider) => throw null; + public static System.DateTime ParseExact(System.ReadOnlySpan s, string[] formats, System.IFormatProvider provider, System.Globalization.DateTimeStyles style = default(System.Globalization.DateTimeStyles)) => throw null; + public static System.DateTime ParseExact(System.ReadOnlySpan s, System.ReadOnlySpan format, System.IFormatProvider provider, System.Globalization.DateTimeStyles style = default(System.Globalization.DateTimeStyles)) => throw null; + public int Second { get => throw null; } + public static System.DateTime SpecifyKind(System.DateTime value, System.DateTimeKind kind) => throw null; + public System.TimeSpan Subtract(System.DateTime value) => throw null; + public System.DateTime Subtract(System.TimeSpan value) => throw null; + public System.Int64 Ticks { get => throw null; } + public System.TimeSpan TimeOfDay { get => throw null; } + public System.Int64 ToBinary() => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + public System.Int64 ToFileTime() => throw null; + public System.Int64 ToFileTimeUtc() => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + public System.DateTime ToLocalTime() => throw null; + public string ToLongDateString() => throw null; + public string ToLongTimeString() => throw null; + public double ToOADate() => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + public string ToShortDateString() => throw null; + public string ToShortTimeString() => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public System.DateTime ToUniversalTime() => throw null; + public static System.DateTime Today { get => throw null; } + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.DateTime result) => throw null; + public static bool TryParse(string s, System.IFormatProvider provider, System.Globalization.DateTimeStyles styles, out System.DateTime result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.DateTime result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider provider, System.Globalization.DateTimeStyles styles, out System.DateTime result) => throw null; + public static bool TryParseExact(string s, string[] formats, System.IFormatProvider provider, System.Globalization.DateTimeStyles style, out System.DateTime result) => throw null; + public static bool TryParseExact(string s, string format, System.IFormatProvider provider, System.Globalization.DateTimeStyles style, out System.DateTime result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan s, string[] formats, System.IFormatProvider provider, System.Globalization.DateTimeStyles style, out System.DateTime result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan s, System.ReadOnlySpan format, System.IFormatProvider provider, System.Globalization.DateTimeStyles style, out System.DateTime result) => throw null; + public static System.DateTime UnixEpoch; + public static System.DateTime UtcNow { get => throw null; } + public int Year { get => throw null; } + } + + // Generated from `System.DateTimeKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DateTimeKind + { + // Stub generator skipped constructor + Local, + Unspecified, + Utc, + } + + // Generated from `System.DateTimeOffset` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DateTimeOffset : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static System.DateTimeOffset operator +(System.DateTimeOffset dateTimeOffset, System.TimeSpan timeSpan) => throw null; + public static System.TimeSpan operator -(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static System.DateTimeOffset operator -(System.DateTimeOffset dateTimeOffset, System.TimeSpan timeSpan) => throw null; + public static bool operator <(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static bool operator <=(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static bool operator ==(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static bool operator >(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public static bool operator >=(System.DateTimeOffset left, System.DateTimeOffset right) => throw null; + public System.DateTimeOffset Add(System.TimeSpan timeSpan) => throw null; + public System.DateTimeOffset AddDays(double days) => throw null; + public System.DateTimeOffset AddHours(double hours) => throw null; + public System.DateTimeOffset AddMilliseconds(double milliseconds) => throw null; + public System.DateTimeOffset AddMinutes(double minutes) => throw null; + public System.DateTimeOffset AddMonths(int months) => throw null; + public System.DateTimeOffset AddSeconds(double seconds) => throw null; + public System.DateTimeOffset AddTicks(System.Int64 ticks) => throw null; + public System.DateTimeOffset AddYears(int years) => throw null; + public static int Compare(System.DateTimeOffset first, System.DateTimeOffset second) => throw null; + public int CompareTo(System.DateTimeOffset other) => throw null; + int System.IComparable.CompareTo(object obj) => throw null; + public System.DateTime Date { get => throw null; } + public System.DateTime DateTime { get => throw null; } + public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, System.TimeSpan offset) => throw null; + public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, System.Globalization.Calendar calendar, System.TimeSpan offset) => throw null; + public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, System.TimeSpan offset) => throw null; + public DateTimeOffset(System.Int64 ticks, System.TimeSpan offset) => throw null; + public DateTimeOffset(System.DateTime dateTime, System.TimeSpan offset) => throw null; + public DateTimeOffset(System.DateTime dateTime) => throw null; + // Stub generator skipped constructor + public int Day { get => throw null; } + public System.DayOfWeek DayOfWeek { get => throw null; } + public int DayOfYear { get => throw null; } + public static bool Equals(System.DateTimeOffset first, System.DateTimeOffset second) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.DateTimeOffset other) => throw null; + public bool EqualsExact(System.DateTimeOffset other) => throw null; + public static System.DateTimeOffset FromFileTime(System.Int64 fileTime) => throw null; + public static System.DateTimeOffset FromUnixTimeMilliseconds(System.Int64 milliseconds) => throw null; + public static System.DateTimeOffset FromUnixTimeSeconds(System.Int64 seconds) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int Hour { get => throw null; } + public System.DateTime LocalDateTime { get => throw null; } + public static System.DateTimeOffset MaxValue; + public int Millisecond { get => throw null; } + public static System.DateTimeOffset MinValue; + public int Minute { get => throw null; } + public int Month { get => throw null; } + public static System.DateTimeOffset Now { get => throw null; } + public System.TimeSpan Offset { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public static System.DateTimeOffset Parse(string input, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles) => throw null; + public static System.DateTimeOffset Parse(string input, System.IFormatProvider formatProvider) => throw null; + public static System.DateTimeOffset Parse(string input) => throw null; + public static System.DateTimeOffset Parse(System.ReadOnlySpan input, System.IFormatProvider formatProvider = default(System.IFormatProvider), System.Globalization.DateTimeStyles styles = default(System.Globalization.DateTimeStyles)) => throw null; + public static System.DateTimeOffset ParseExact(string input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles) => throw null; + public static System.DateTimeOffset ParseExact(string input, string format, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles) => throw null; + public static System.DateTimeOffset ParseExact(string input, string format, System.IFormatProvider formatProvider) => throw null; + public static System.DateTimeOffset ParseExact(System.ReadOnlySpan input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles = default(System.Globalization.DateTimeStyles)) => throw null; + public static System.DateTimeOffset ParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles = default(System.Globalization.DateTimeStyles)) => throw null; + public int Second { get => throw null; } + public System.TimeSpan Subtract(System.DateTimeOffset value) => throw null; + public System.DateTimeOffset Subtract(System.TimeSpan value) => throw null; + public System.Int64 Ticks { get => throw null; } + public System.TimeSpan TimeOfDay { get => throw null; } + public System.Int64 ToFileTime() => throw null; + public System.DateTimeOffset ToLocalTime() => throw null; + public System.DateTimeOffset ToOffset(System.TimeSpan offset) => throw null; + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider formatProvider) => throw null; + public override string ToString() => throw null; + public System.DateTimeOffset ToUniversalTime() => throw null; + public System.Int64 ToUnixTimeMilliseconds() => throw null; + public System.Int64 ToUnixTimeSeconds() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider formatProvider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string input, out System.DateTimeOffset result) => throw null; + public static bool TryParse(string input, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static bool TryParse(System.ReadOnlySpan input, out System.DateTimeOffset result) => throw null; + public static bool TryParse(System.ReadOnlySpan input, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static bool TryParseExact(string input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static bool TryParseExact(string input, string format, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, System.IFormatProvider formatProvider, System.Globalization.DateTimeStyles styles, out System.DateTimeOffset result) => throw null; + public static System.DateTimeOffset UnixEpoch; + public System.DateTime UtcDateTime { get => throw null; } + public static System.DateTimeOffset UtcNow { get => throw null; } + public System.Int64 UtcTicks { get => throw null; } + public int Year { get => throw null; } + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.DayOfWeek` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DayOfWeek + { + // Stub generator skipped constructor + Friday, + Monday, + Saturday, + Sunday, + Thursday, + Tuesday, + Wednesday, + } + + // Generated from `System.Decimal` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Decimal : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public static bool operator !=(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal operator %(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal operator *(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal operator +(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal operator +(System.Decimal d) => throw null; + public static System.Decimal operator ++(System.Decimal d) => throw null; + public static System.Decimal operator -(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal operator -(System.Decimal d) => throw null; + public static System.Decimal operator --(System.Decimal d) => throw null; + public static System.Decimal operator /(System.Decimal d1, System.Decimal d2) => throw null; + public static bool operator <(System.Decimal d1, System.Decimal d2) => throw null; + public static bool operator <=(System.Decimal d1, System.Decimal d2) => throw null; + public static bool operator ==(System.Decimal d1, System.Decimal d2) => throw null; + public static bool operator >(System.Decimal d1, System.Decimal d2) => throw null; + public static bool operator >=(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal Add(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal Ceiling(System.Decimal d) => throw null; + public static int Compare(System.Decimal d1, System.Decimal d2) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Decimal value) => throw null; + public Decimal(int[] bits) => throw null; + public Decimal(int value) => throw null; + public Decimal(int lo, int mid, int hi, bool isNegative, System.Byte scale) => throw null; + public Decimal(float value) => throw null; + public Decimal(double value) => throw null; + public Decimal(System.UInt64 value) => throw null; + public Decimal(System.UInt32 value) => throw null; + public Decimal(System.ReadOnlySpan bits) => throw null; + public Decimal(System.Int64 value) => throw null; + // Stub generator skipped constructor + public static System.Decimal Divide(System.Decimal d1, System.Decimal d2) => throw null; + public static bool Equals(System.Decimal d1, System.Decimal d2) => throw null; + public override bool Equals(object value) => throw null; + public bool Equals(System.Decimal value) => throw null; + public static System.Decimal Floor(System.Decimal d) => throw null; + public static System.Decimal FromOACurrency(System.Int64 cy) => throw null; + public static int[] GetBits(System.Decimal d) => throw null; + public static int GetBits(System.Decimal d, System.Span destination) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.Decimal MaxValue = default; + public const System.Decimal MinValue = default; + public const System.Decimal MinusOne = default; + public static System.Decimal Multiply(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal Negate(System.Decimal d) => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public const System.Decimal One = default; + public static System.Decimal Parse(string s, System.IFormatProvider provider) => throw null; + public static System.Decimal Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.Decimal Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.Decimal Parse(string s) => throw null; + public static System.Decimal Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static System.Decimal Remainder(System.Decimal d1, System.Decimal d2) => throw null; + public static System.Decimal Round(System.Decimal d, int decimals, System.MidpointRounding mode) => throw null; + public static System.Decimal Round(System.Decimal d, int decimals) => throw null; + public static System.Decimal Round(System.Decimal d, System.MidpointRounding mode) => throw null; + public static System.Decimal Round(System.Decimal d) => throw null; + public static System.Decimal Subtract(System.Decimal d1, System.Decimal d2) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + public static System.Byte ToByte(System.Decimal value) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + public static double ToDouble(System.Decimal d) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + public static System.Int16 ToInt16(System.Decimal value) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + public static int ToInt32(System.Decimal d) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + public static System.Int64 ToInt64(System.Decimal d) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + public static System.Int64 ToOACurrency(System.Decimal value) => throw null; + public static System.SByte ToSByte(System.Decimal value) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + public static float ToSingle(System.Decimal d) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + public static System.UInt16 ToUInt16(System.Decimal value) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + public static System.UInt32 ToUInt32(System.Decimal d) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + public static System.UInt64 ToUInt64(System.Decimal d) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public static System.Decimal Truncate(System.Decimal d) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryGetBits(System.Decimal d, System.Span destination, out int valuesWritten) => throw null; + public static bool TryParse(string s, out System.Decimal result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Decimal result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Decimal result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Decimal result) => throw null; + public const System.Decimal Zero = default; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Delegate` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Delegate : System.Runtime.Serialization.ISerializable, System.ICloneable + { + public static bool operator !=(System.Delegate d1, System.Delegate d2) => throw null; + public static bool operator ==(System.Delegate d1, System.Delegate d2) => throw null; + public virtual object Clone() => throw null; + public static System.Delegate Combine(params System.Delegate[] delegates) => throw null; + public static System.Delegate Combine(System.Delegate a, System.Delegate b) => throw null; + protected virtual System.Delegate CombineImpl(System.Delegate d) => throw null; + public static System.Delegate CreateDelegate(System.Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure) => throw null; + public static System.Delegate CreateDelegate(System.Type type, object target, string method, bool ignoreCase) => throw null; + public static System.Delegate CreateDelegate(System.Type type, object target, string method) => throw null; + public static System.Delegate CreateDelegate(System.Type type, object firstArgument, System.Reflection.MethodInfo method, bool throwOnBindFailure) => throw null; + public static System.Delegate CreateDelegate(System.Type type, object firstArgument, System.Reflection.MethodInfo method) => throw null; + public static System.Delegate CreateDelegate(System.Type type, System.Type target, string method, bool ignoreCase, bool throwOnBindFailure) => throw null; + public static System.Delegate CreateDelegate(System.Type type, System.Type target, string method, bool ignoreCase) => throw null; + public static System.Delegate CreateDelegate(System.Type type, System.Type target, string method) => throw null; + public static System.Delegate CreateDelegate(System.Type type, System.Reflection.MethodInfo method, bool throwOnBindFailure) => throw null; + public static System.Delegate CreateDelegate(System.Type type, System.Reflection.MethodInfo method) => throw null; + protected Delegate(object target, string method) => throw null; + protected Delegate(System.Type target, string method) => throw null; + public object DynamicInvoke(params object[] args) => throw null; + protected virtual object DynamicInvokeImpl(object[] args) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Delegate[] GetInvocationList() => throw null; + protected virtual System.Reflection.MethodInfo GetMethodImpl() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public static System.Delegate Remove(System.Delegate source, System.Delegate value) => throw null; + public static System.Delegate RemoveAll(System.Delegate source, System.Delegate value) => throw null; + protected virtual System.Delegate RemoveImpl(System.Delegate d) => throw null; + public object Target { get => throw null; } + } + + // Generated from `System.DivideByZeroException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DivideByZeroException : System.ArithmeticException + { + public DivideByZeroException(string message, System.Exception innerException) => throw null; + public DivideByZeroException(string message) => throw null; + public DivideByZeroException() => throw null; + protected DivideByZeroException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Double` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Double : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public static bool operator !=(double left, double right) => throw null; + public static bool operator <(double left, double right) => throw null; + public static bool operator <=(double left, double right) => throw null; + public static bool operator ==(double left, double right) => throw null; + public static bool operator >(double left, double right) => throw null; + public static bool operator >=(double left, double right) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(double value) => throw null; + // Stub generator skipped constructor + public const double Epsilon = default; + public override bool Equals(object obj) => throw null; + public bool Equals(double obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public static bool IsFinite(double d) => throw null; + public static bool IsInfinity(double d) => throw null; + public static bool IsNaN(double d) => throw null; + public static bool IsNegative(double d) => throw null; + public static bool IsNegativeInfinity(double d) => throw null; + public static bool IsNormal(double d) => throw null; + public static bool IsPositiveInfinity(double d) => throw null; + public static bool IsSubnormal(double d) => throw null; + public const double MaxValue = default; + public const double MinValue = default; + public const double NaN = default; + public const double NegativeInfinity = default; + public static double Parse(string s, System.IFormatProvider provider) => throw null; + public static double Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static double Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static double Parse(string s) => throw null; + public static double Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public const double PositiveInfinity = default; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out double result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out double result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out double result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out double result) => throw null; + } + + // Generated from `System.DuplicateWaitObjectException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DuplicateWaitObjectException : System.ArgumentException + { + public DuplicateWaitObjectException(string parameterName, string message) => throw null; + public DuplicateWaitObjectException(string parameterName) => throw null; + public DuplicateWaitObjectException(string message, System.Exception innerException) => throw null; + public DuplicateWaitObjectException() => throw null; + protected DuplicateWaitObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.EntryPointNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EntryPointNotFoundException : System.TypeLoadException + { + public EntryPointNotFoundException(string message, System.Exception inner) => throw null; + public EntryPointNotFoundException(string message) => throw null; + public EntryPointNotFoundException() => throw null; + protected EntryPointNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Enum` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Enum : System.IFormattable, System.IConvertible, System.IComparable + { + public int CompareTo(object target) => throw null; + protected Enum() => throw null; + public override bool Equals(object obj) => throw null; + public static string Format(System.Type enumType, object value, string format) => throw null; + public override int GetHashCode() => throw null; + public static string GetName(TEnum value) where TEnum : System.Enum => throw null; + public static string GetName(System.Type enumType, object value) => throw null; + public static string[] GetNames() where TEnum : System.Enum => throw null; + public static string[] GetNames(System.Type enumType) => throw null; + public System.TypeCode GetTypeCode() => throw null; + public static System.Type GetUnderlyingType(System.Type enumType) => throw null; + public static TEnum[] GetValues() where TEnum : System.Enum => throw null; + public static System.Array GetValues(System.Type enumType) => throw null; + public bool HasFlag(System.Enum flag) => throw null; + public static bool IsDefined(TEnum value) where TEnum : System.Enum => throw null; + public static bool IsDefined(System.Type enumType, object value) => throw null; + public static object Parse(System.Type enumType, string value, bool ignoreCase) => throw null; + public static object Parse(System.Type enumType, string value) => throw null; + public static TEnum Parse(string value, bool ignoreCase) where TEnum : struct => throw null; + public static TEnum Parse(string value) where TEnum : struct => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + public static object ToObject(System.Type enumType, object value) => throw null; + public static object ToObject(System.Type enumType, int value) => throw null; + public static object ToObject(System.Type enumType, System.UInt64 value) => throw null; + public static object ToObject(System.Type enumType, System.UInt32 value) => throw null; + public static object ToObject(System.Type enumType, System.UInt16 value) => throw null; + public static object ToObject(System.Type enumType, System.SByte value) => throw null; + public static object ToObject(System.Type enumType, System.Int64 value) => throw null; + public static object ToObject(System.Type enumType, System.Int16 value) => throw null; + public static object ToObject(System.Type enumType, System.Byte value) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public static bool TryParse(string value, out TEnum result) where TEnum : struct => throw null; + public static bool TryParse(string value, bool ignoreCase, out TEnum result) where TEnum : struct => throw null; + public static bool TryParse(System.Type enumType, string value, out object result) => throw null; + public static bool TryParse(System.Type enumType, string value, bool ignoreCase, out object result) => throw null; + } + + // Generated from `System.Environment` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Environment + { + public static string CommandLine { get => throw null; } + public static string CurrentDirectory { get => throw null; set => throw null; } + public static int CurrentManagedThreadId { get => throw null; } + public static void Exit(int exitCode) => throw null; + public static int ExitCode { get => throw null; set => throw null; } + public static string ExpandEnvironmentVariables(string name) => throw null; + public static void FailFast(string message, System.Exception exception) => throw null; + public static void FailFast(string message) => throw null; + public static string[] GetCommandLineArgs() => throw null; + public static string GetEnvironmentVariable(string variable, System.EnvironmentVariableTarget target) => throw null; + public static string GetEnvironmentVariable(string variable) => throw null; + public static System.Collections.IDictionary GetEnvironmentVariables(System.EnvironmentVariableTarget target) => throw null; + public static System.Collections.IDictionary GetEnvironmentVariables() => throw null; + public static string GetFolderPath(System.Environment.SpecialFolder folder, System.Environment.SpecialFolderOption option) => throw null; + public static string GetFolderPath(System.Environment.SpecialFolder folder) => throw null; + public static string[] GetLogicalDrives() => throw null; + public static bool HasShutdownStarted { get => throw null; } + public static bool Is64BitOperatingSystem { get => throw null; } + public static bool Is64BitProcess { get => throw null; } + public static string MachineName { get => throw null; } + public static string NewLine { get => throw null; } + public static System.OperatingSystem OSVersion { get => throw null; } + public static int ProcessId { get => throw null; } + public static int ProcessorCount { get => throw null; } + public static void SetEnvironmentVariable(string variable, string value, System.EnvironmentVariableTarget target) => throw null; + public static void SetEnvironmentVariable(string variable, string value) => throw null; + // Generated from `System.Environment.SpecialFolder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SpecialFolder + { + AdminTools, + ApplicationData, + CDBurning, + CommonAdminTools, + CommonApplicationData, + CommonDesktopDirectory, + CommonDocuments, + CommonMusic, + CommonOemLinks, + CommonPictures, + CommonProgramFiles, + CommonProgramFilesX86, + CommonPrograms, + CommonStartMenu, + CommonStartup, + CommonTemplates, + CommonVideos, + Cookies, + Desktop, + DesktopDirectory, + Favorites, + Fonts, + History, + InternetCache, + LocalApplicationData, + LocalizedResources, + MyComputer, + MyDocuments, + MyMusic, + MyPictures, + MyVideos, + NetworkShortcuts, + Personal, + PrinterShortcuts, + ProgramFiles, + ProgramFilesX86, + Programs, + Recent, + Resources, + SendTo, + // Stub generator skipped constructor + StartMenu, + Startup, + System, + SystemX86, + Templates, + UserProfile, + Windows, + } + + + // Generated from `System.Environment.SpecialFolderOption` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SpecialFolderOption + { + Create, + DoNotVerify, + None, + // Stub generator skipped constructor + } + + + public static string StackTrace { get => throw null; } + public static string SystemDirectory { get => throw null; } + public static int SystemPageSize { get => throw null; } + public static int TickCount { get => throw null; } + public static System.Int64 TickCount64 { get => throw null; } + public static string UserDomainName { get => throw null; } + public static bool UserInteractive { get => throw null; } + public static string UserName { get => throw null; } + public static System.Version Version { get => throw null; } + public static System.Int64 WorkingSet { get => throw null; } + } + + // Generated from `System.EnvironmentVariableTarget` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EnvironmentVariableTarget + { + // Stub generator skipped constructor + Machine, + Process, + User, + } + + // Generated from `System.EventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventArgs + { + public static System.EventArgs Empty; + public EventArgs() => throw null; + } + + // Generated from `System.EventHandler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void EventHandler(object sender, System.EventArgs e); + + // Generated from `System.EventHandler<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void EventHandler(object sender, TEventArgs e); + + // Generated from `System.Exception` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Exception : System.Runtime.Serialization.ISerializable + { + public virtual System.Collections.IDictionary Data { get => throw null; } + public Exception(string message, System.Exception innerException) => throw null; + public Exception(string message) => throw null; + public Exception() => throw null; + protected Exception(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual System.Exception GetBaseException() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Type GetType() => throw null; + public int HResult { get => throw null; set => throw null; } + public virtual string HelpLink { get => throw null; set => throw null; } + public System.Exception InnerException { get => throw null; } + public virtual string Message { get => throw null; } + protected event System.EventHandler SerializeObjectState; + public virtual string Source { get => throw null; set => throw null; } + public virtual string StackTrace { get => throw null; } + public System.Reflection.MethodBase TargetSite { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.ExecutionEngineException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExecutionEngineException : System.SystemException + { + public ExecutionEngineException(string message, System.Exception innerException) => throw null; + public ExecutionEngineException(string message) => throw null; + public ExecutionEngineException() => throw null; + } + + // Generated from `System.FieldAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FieldAccessException : System.MemberAccessException + { + public FieldAccessException(string message, System.Exception inner) => throw null; + public FieldAccessException(string message) => throw null; + public FieldAccessException() => throw null; + protected FieldAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.FileStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileStyleUriParser : System.UriParser + { + public FileStyleUriParser() => throw null; + } + + // Generated from `System.FlagsAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FlagsAttribute : System.Attribute + { + public FlagsAttribute() => throw null; + } + + // Generated from `System.FormatException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FormatException : System.SystemException + { + public FormatException(string message, System.Exception innerException) => throw null; + public FormatException(string message) => throw null; + public FormatException() => throw null; + protected FormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.FormattableString` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class FormattableString : System.IFormattable + { + public abstract int ArgumentCount { get; } + public static string CurrentCulture(System.FormattableString formattable) => throw null; + public abstract string Format { get; } + protected FormattableString() => throw null; + public abstract object GetArgument(int index); + public abstract object[] GetArguments(); + public static string Invariant(System.FormattableString formattable) => throw null; + string System.IFormattable.ToString(string ignored, System.IFormatProvider formatProvider) => throw null; + public override string ToString() => throw null; + public abstract string ToString(System.IFormatProvider formatProvider); + } + + // Generated from `System.FtpStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FtpStyleUriParser : System.UriParser + { + public FtpStyleUriParser() => throw null; + } + + // Generated from `System.Func<,,,,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16); + + // Generated from `System.Func<,,,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15); + + // Generated from `System.Func<,,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14); + + // Generated from `System.Func<,,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13); + + // Generated from `System.Func<,,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12); + + // Generated from `System.Func<,,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11); + + // Generated from `System.Func<,,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10); + + // Generated from `System.Func<,,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9); + + // Generated from `System.Func<,,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8); + + // Generated from `System.Func<,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); + + // Generated from `System.Func<,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); + + // Generated from `System.Func<,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); + + // Generated from `System.Func<,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4); + + // Generated from `System.Func<,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3); + + // Generated from `System.Func<,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T1 arg1, T2 arg2); + + // Generated from `System.Func<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(T arg); + + // Generated from `System.Func<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TResult Func(); + + // Generated from `System.GC` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class GC + { + public static void AddMemoryPressure(System.Int64 bytesAllocated) => throw null; + public static T[] AllocateArray(int length, bool pinned = default(bool)) => throw null; + public static T[] AllocateUninitializedArray(int length, bool pinned = default(bool)) => throw null; + public static void CancelFullGCNotification() => throw null; + public static void Collect(int generation, System.GCCollectionMode mode, bool blocking, bool compacting) => throw null; + public static void Collect(int generation, System.GCCollectionMode mode, bool blocking) => throw null; + public static void Collect(int generation, System.GCCollectionMode mode) => throw null; + public static void Collect(int generation) => throw null; + public static void Collect() => throw null; + public static int CollectionCount(int generation) => throw null; + public static void EndNoGCRegion() => throw null; + public static System.Int64 GetAllocatedBytesForCurrentThread() => throw null; + public static System.GCMemoryInfo GetGCMemoryInfo(System.GCKind kind) => throw null; + public static System.GCMemoryInfo GetGCMemoryInfo() => throw null; + public static int GetGeneration(object obj) => throw null; + public static int GetGeneration(System.WeakReference wo) => throw null; + public static System.Int64 GetTotalAllocatedBytes(bool precise = default(bool)) => throw null; + public static System.Int64 GetTotalMemory(bool forceFullCollection) => throw null; + public static void KeepAlive(object obj) => throw null; + public static int MaxGeneration { get => throw null; } + public static void ReRegisterForFinalize(object obj) => throw null; + public static void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold) => throw null; + public static void RemoveMemoryPressure(System.Int64 bytesAllocated) => throw null; + public static void SuppressFinalize(object obj) => throw null; + public static bool TryStartNoGCRegion(System.Int64 totalSize, bool disallowFullBlockingGC) => throw null; + public static bool TryStartNoGCRegion(System.Int64 totalSize, System.Int64 lohSize, bool disallowFullBlockingGC) => throw null; + public static bool TryStartNoGCRegion(System.Int64 totalSize, System.Int64 lohSize) => throw null; + public static bool TryStartNoGCRegion(System.Int64 totalSize) => throw null; + public static System.GCNotificationStatus WaitForFullGCApproach(int millisecondsTimeout) => throw null; + public static System.GCNotificationStatus WaitForFullGCApproach() => throw null; + public static System.GCNotificationStatus WaitForFullGCComplete(int millisecondsTimeout) => throw null; + public static System.GCNotificationStatus WaitForFullGCComplete() => throw null; + public static void WaitForPendingFinalizers() => throw null; + } + + // Generated from `System.GCCollectionMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCCollectionMode + { + Default, + Forced, + // Stub generator skipped constructor + Optimized, + } + + // Generated from `System.GCGenerationInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GCGenerationInfo + { + public System.Int64 FragmentationAfterBytes { get => throw null; } + public System.Int64 FragmentationBeforeBytes { get => throw null; } + // Stub generator skipped constructor + public System.Int64 SizeAfterBytes { get => throw null; } + public System.Int64 SizeBeforeBytes { get => throw null; } + } + + // Generated from `System.GCKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCKind + { + Any, + Background, + Ephemeral, + FullBlocking, + // Stub generator skipped constructor + } + + // Generated from `System.GCMemoryInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GCMemoryInfo + { + public bool Compacted { get => throw null; } + public bool Concurrent { get => throw null; } + public System.Int64 FinalizationPendingCount { get => throw null; } + public System.Int64 FragmentedBytes { get => throw null; } + // Stub generator skipped constructor + public int Generation { get => throw null; } + public System.ReadOnlySpan GenerationInfo { get => throw null; } + public System.Int64 HeapSizeBytes { get => throw null; } + public System.Int64 HighMemoryLoadThresholdBytes { get => throw null; } + public System.Int64 Index { get => throw null; } + public System.Int64 MemoryLoadBytes { get => throw null; } + public System.ReadOnlySpan PauseDurations { get => throw null; } + public double PauseTimePercentage { get => throw null; } + public System.Int64 PinnedObjectsCount { get => throw null; } + public System.Int64 PromotedBytes { get => throw null; } + public System.Int64 TotalAvailableMemoryBytes { get => throw null; } + public System.Int64 TotalCommittedBytes { get => throw null; } + } + + // Generated from `System.GCNotificationStatus` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCNotificationStatus + { + Canceled, + Failed, + // Stub generator skipped constructor + NotApplicable, + Succeeded, + Timeout, + } + + // Generated from `System.GenericUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GenericUriParser : System.UriParser + { + public GenericUriParser(System.GenericUriParserOptions options) => throw null; + } + + // Generated from `System.GenericUriParserOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum GenericUriParserOptions + { + AllowEmptyAuthority, + Default, + DontCompressPath, + DontConvertPathBackslashes, + DontUnescapePathDotsAndSlashes, + GenericAuthority, + // Stub generator skipped constructor + Idn, + IriParsing, + NoFragment, + NoPort, + NoQuery, + NoUserInfo, + } + + // Generated from `System.GopherStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GopherStyleUriParser : System.UriParser + { + public GopherStyleUriParser() => throw null; + } + + // Generated from `System.Guid` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Guid : System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.Guid a, System.Guid b) => throw null; + public static bool operator ==(System.Guid a, System.Guid b) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.Guid value) => throw null; + public static System.Guid Empty; + public override bool Equals(object o) => throw null; + public bool Equals(System.Guid g) => throw null; + public override int GetHashCode() => throw null; + public Guid(string g) => throw null; + public Guid(int a, System.Int16 b, System.Int16 c, System.Byte[] d) => throw null; + public Guid(int a, System.Int16 b, System.Int16 c, System.Byte d, System.Byte e, System.Byte f, System.Byte g, System.Byte h, System.Byte i, System.Byte j, System.Byte k) => throw null; + public Guid(System.UInt32 a, System.UInt16 b, System.UInt16 c, System.Byte d, System.Byte e, System.Byte f, System.Byte g, System.Byte h, System.Byte i, System.Byte j, System.Byte k) => throw null; + public Guid(System.ReadOnlySpan b) => throw null; + public Guid(System.Byte[] b) => throw null; + // Stub generator skipped constructor + public static System.Guid NewGuid() => throw null; + public static System.Guid Parse(string input) => throw null; + public static System.Guid Parse(System.ReadOnlySpan input) => throw null; + public static System.Guid ParseExact(string input, string format) => throw null; + public static System.Guid ParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format) => throw null; + public System.Byte[] ToByteArray() => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan)) => throw null; + public static bool TryParse(string input, out System.Guid result) => throw null; + public static bool TryParse(System.ReadOnlySpan input, out System.Guid result) => throw null; + public static bool TryParseExact(string input, string format, out System.Guid result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, out System.Guid result) => throw null; + public bool TryWriteBytes(System.Span destination) => throw null; + } + + // Generated from `System.Half` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Half : System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.Half left, System.Half right) => throw null; + public static bool operator <(System.Half left, System.Half right) => throw null; + public static bool operator <=(System.Half left, System.Half right) => throw null; + public static bool operator ==(System.Half left, System.Half right) => throw null; + public static bool operator >(System.Half left, System.Half right) => throw null; + public static bool operator >=(System.Half left, System.Half right) => throw null; + public int CompareTo(object obj) => throw null; + public int CompareTo(System.Half other) => throw null; + public static System.Half Epsilon { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Half other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public static bool IsFinite(System.Half value) => throw null; + public static bool IsInfinity(System.Half value) => throw null; + public static bool IsNaN(System.Half value) => throw null; + public static bool IsNegative(System.Half value) => throw null; + public static bool IsNegativeInfinity(System.Half value) => throw null; + public static bool IsNormal(System.Half value) => throw null; + public static bool IsPositiveInfinity(System.Half value) => throw null; + public static bool IsSubnormal(System.Half value) => throw null; + public static System.Half MaxValue { get => throw null; } + public static System.Half MinValue { get => throw null; } + public static System.Half NaN { get => throw null; } + public static System.Half NegativeInfinity { get => throw null; } + public static System.Half Parse(string s, System.IFormatProvider provider) => throw null; + public static System.Half Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.Half Parse(string s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static System.Half Parse(string s) => throw null; + public static System.Half Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static System.Half PositiveInfinity { get => throw null; } + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.Half result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Half result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Half result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Half result) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.HashCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct HashCode + { + public void Add(T value, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public void Add(T value) => throw null; + public static int Combine(T1 value1) => throw null; + public static int Combine(T1 value1, T2 value2) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7) => throw null; + public static int Combine(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public int ToHashCode() => throw null; + } + + // Generated from `System.HttpStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HttpStyleUriParser : System.UriParser + { + public HttpStyleUriParser() => throw null; + } + + // Generated from `System.IAsyncDisposable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAsyncDisposable + { + System.Threading.Tasks.ValueTask DisposeAsync(); + } + + // Generated from `System.IAsyncResult` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAsyncResult + { + object AsyncState { get; } + System.Threading.WaitHandle AsyncWaitHandle { get; } + bool CompletedSynchronously { get; } + bool IsCompleted { get; } + } + + // Generated from `System.ICloneable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICloneable + { + object Clone(); + } + + // Generated from `System.IComparable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComparable + { + int CompareTo(object obj); + } + + // Generated from `System.IComparable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComparable + { + int CompareTo(T other); + } + + // Generated from `System.IConvertible` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IConvertible + { + System.TypeCode GetTypeCode(); + bool ToBoolean(System.IFormatProvider provider); + System.Byte ToByte(System.IFormatProvider provider); + System.Char ToChar(System.IFormatProvider provider); + System.DateTime ToDateTime(System.IFormatProvider provider); + System.Decimal ToDecimal(System.IFormatProvider provider); + double ToDouble(System.IFormatProvider provider); + System.Int16 ToInt16(System.IFormatProvider provider); + int ToInt32(System.IFormatProvider provider); + System.Int64 ToInt64(System.IFormatProvider provider); + System.SByte ToSByte(System.IFormatProvider provider); + float ToSingle(System.IFormatProvider provider); + string ToString(System.IFormatProvider provider); + object ToType(System.Type conversionType, System.IFormatProvider provider); + System.UInt16 ToUInt16(System.IFormatProvider provider); + System.UInt32 ToUInt32(System.IFormatProvider provider); + System.UInt64 ToUInt64(System.IFormatProvider provider); + } + + // Generated from `System.ICustomFormatter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomFormatter + { + string Format(string format, object arg, System.IFormatProvider formatProvider); + } + + // Generated from `System.IDisposable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDisposable + { + void Dispose(); + } + + // Generated from `System.IEquatable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEquatable + { + bool Equals(T other); + } + + // Generated from `System.IFormatProvider` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFormatProvider + { + object GetFormat(System.Type formatType); + } + + // Generated from `System.IFormattable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFormattable + { + string ToString(string format, System.IFormatProvider formatProvider); + } + + // Generated from `System.IObservable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IObservable + { + System.IDisposable Subscribe(System.IObserver observer); + } + + // Generated from `System.IObserver<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IObserver + { + void OnCompleted(); + void OnError(System.Exception error); + void OnNext(T value); + } + + // Generated from `System.IProgress<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IProgress + { + void Report(T value); + } + + // Generated from `System.Index` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Index : System.IEquatable + { + public static System.Index End { get => throw null; } + public override bool Equals(object value) => throw null; + public bool Equals(System.Index other) => throw null; + public static System.Index FromEnd(int value) => throw null; + public static System.Index FromStart(int value) => throw null; + public override int GetHashCode() => throw null; + public int GetOffset(int length) => throw null; + public Index(int value, bool fromEnd = default(bool)) => throw null; + // Stub generator skipped constructor + public bool IsFromEnd { get => throw null; } + public static System.Index Start { get => throw null; } + public override string ToString() => throw null; + public int Value { get => throw null; } + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.IndexOutOfRangeException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IndexOutOfRangeException : System.SystemException + { + public IndexOutOfRangeException(string message, System.Exception innerException) => throw null; + public IndexOutOfRangeException(string message) => throw null; + public IndexOutOfRangeException() => throw null; + } + + // Generated from `System.InsufficientExecutionStackException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InsufficientExecutionStackException : System.SystemException + { + public InsufficientExecutionStackException(string message, System.Exception innerException) => throw null; + public InsufficientExecutionStackException(string message) => throw null; + public InsufficientExecutionStackException() => throw null; + } + + // Generated from `System.InsufficientMemoryException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InsufficientMemoryException : System.OutOfMemoryException + { + public InsufficientMemoryException(string message, System.Exception innerException) => throw null; + public InsufficientMemoryException(string message) => throw null; + public InsufficientMemoryException() => throw null; + } + + // Generated from `System.Int16` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Int16 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(System.Int16 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Int16 obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + // Stub generator skipped constructor + public const System.Int16 MaxValue = default; + public const System.Int16 MinValue = default; + public static System.Int16 Parse(string s, System.IFormatProvider provider) => throw null; + public static System.Int16 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.Int16 Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.Int16 Parse(string s) => throw null; + public static System.Int16 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.Int16 result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Int16 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Int16 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Int16 result) => throw null; + } + + // Generated from `System.Int32` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Int32 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(int value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(int obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + // Stub generator skipped constructor + public const int MaxValue = default; + public const int MinValue = default; + public static int Parse(string s, System.IFormatProvider provider) => throw null; + public static int Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static int Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static int Parse(string s) => throw null; + public static int Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out int result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out int result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out int result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out int result) => throw null; + } + + // Generated from `System.Int64` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Int64 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(System.Int64 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Int64 obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + // Stub generator skipped constructor + public const System.Int64 MaxValue = default; + public const System.Int64 MinValue = default; + public static System.Int64 Parse(string s, System.IFormatProvider provider) => throw null; + public static System.Int64 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.Int64 Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.Int64 Parse(string s) => throw null; + public static System.Int64 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.Int64 result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Int64 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.Int64 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Int64 result) => throw null; + } + + // Generated from `System.IntPtr` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct IntPtr : System.Runtime.Serialization.ISerializable, System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.IntPtr value1, System.IntPtr value2) => throw null; + public static System.IntPtr operator +(System.IntPtr pointer, int offset) => throw null; + public static System.IntPtr operator -(System.IntPtr pointer, int offset) => throw null; + public static bool operator ==(System.IntPtr value1, System.IntPtr value2) => throw null; + public static System.IntPtr Add(System.IntPtr pointer, int offset) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.IntPtr value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.IntPtr other) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + unsafe public IntPtr(void* value) => throw null; + public IntPtr(int value) => throw null; + public IntPtr(System.Int64 value) => throw null; + // Stub generator skipped constructor + public static System.IntPtr MaxValue { get => throw null; } + public static System.IntPtr MinValue { get => throw null; } + public static System.IntPtr Parse(string s, System.IFormatProvider provider) => throw null; + public static System.IntPtr Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.IntPtr Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.IntPtr Parse(string s) => throw null; + public static int Size { get => throw null; } + public static System.IntPtr Subtract(System.IntPtr pointer, int offset) => throw null; + public int ToInt32() => throw null; + public System.Int64 ToInt64() => throw null; + unsafe public void* ToPointer() => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + public static bool TryParse(string s, out System.IntPtr result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.IntPtr result) => throw null; + public static System.IntPtr Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.InvalidCastException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidCastException : System.SystemException + { + public InvalidCastException(string message, int errorCode) => throw null; + public InvalidCastException(string message, System.Exception innerException) => throw null; + public InvalidCastException(string message) => throw null; + public InvalidCastException() => throw null; + protected InvalidCastException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.InvalidOperationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidOperationException : System.SystemException + { + public InvalidOperationException(string message, System.Exception innerException) => throw null; + public InvalidOperationException(string message) => throw null; + public InvalidOperationException() => throw null; + protected InvalidOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.InvalidProgramException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidProgramException : System.SystemException + { + public InvalidProgramException(string message, System.Exception inner) => throw null; + public InvalidProgramException(string message) => throw null; + public InvalidProgramException() => throw null; + } + + // Generated from `System.InvalidTimeZoneException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidTimeZoneException : System.Exception + { + public InvalidTimeZoneException(string message, System.Exception innerException) => throw null; + public InvalidTimeZoneException(string message) => throw null; + public InvalidTimeZoneException() => throw null; + protected InvalidTimeZoneException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Lazy<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Lazy : System.Lazy + { + public Lazy(TMetadata metadata, bool isThreadSafe) => throw null; + public Lazy(TMetadata metadata, System.Threading.LazyThreadSafetyMode mode) => throw null; + public Lazy(TMetadata metadata) => throw null; + public Lazy(System.Func valueFactory, TMetadata metadata, bool isThreadSafe) => throw null; + public Lazy(System.Func valueFactory, TMetadata metadata, System.Threading.LazyThreadSafetyMode mode) => throw null; + public Lazy(System.Func valueFactory, TMetadata metadata) => throw null; + public TMetadata Metadata { get => throw null; } + } + + // Generated from `System.Lazy<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Lazy + { + public bool IsValueCreated { get => throw null; } + public Lazy(bool isThreadSafe) => throw null; + public Lazy(T value) => throw null; + public Lazy(System.Threading.LazyThreadSafetyMode mode) => throw null; + public Lazy(System.Func valueFactory, bool isThreadSafe) => throw null; + public Lazy(System.Func valueFactory, System.Threading.LazyThreadSafetyMode mode) => throw null; + public Lazy(System.Func valueFactory) => throw null; + public Lazy() => throw null; + public override string ToString() => throw null; + public T Value { get => throw null; } + } + + // Generated from `System.LdapStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LdapStyleUriParser : System.UriParser + { + public LdapStyleUriParser() => throw null; + } + + // Generated from `System.LoaderOptimization` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LoaderOptimization + { + DisallowBindings, + DomainMask, + // Stub generator skipped constructor + MultiDomain, + MultiDomainHost, + NotSpecified, + SingleDomain, + } + + // Generated from `System.LoaderOptimizationAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LoaderOptimizationAttribute : System.Attribute + { + public LoaderOptimizationAttribute(System.LoaderOptimization value) => throw null; + public LoaderOptimizationAttribute(System.Byte value) => throw null; + public System.LoaderOptimization Value { get => throw null; } + } + + // Generated from `System.MTAThreadAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MTAThreadAttribute : System.Attribute + { + public MTAThreadAttribute() => throw null; + } + + // Generated from `System.MarshalByRefObject` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MarshalByRefObject + { + public object GetLifetimeService() => throw null; + public virtual object InitializeLifetimeService() => throw null; + protected MarshalByRefObject() => throw null; + protected System.MarshalByRefObject MemberwiseClone(bool cloneIdentity) => throw null; + } + + // Generated from `System.Math` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Math + { + public static int Abs(int value) => throw null; + public static float Abs(float value) => throw null; + public static double Abs(double value) => throw null; + public static System.SByte Abs(System.SByte value) => throw null; + public static System.Int64 Abs(System.Int64 value) => throw null; + public static System.Int16 Abs(System.Int16 value) => throw null; + public static System.Decimal Abs(System.Decimal value) => throw null; + public static double Acos(double d) => throw null; + public static double Acosh(double d) => throw null; + public static double Asin(double d) => throw null; + public static double Asinh(double d) => throw null; + public static double Atan(double d) => throw null; + public static double Atan2(double y, double x) => throw null; + public static double Atanh(double d) => throw null; + public static System.UInt64 BigMul(System.UInt64 a, System.UInt64 b, out System.UInt64 low) => throw null; + public static System.Int64 BigMul(int a, int b) => throw null; + public static System.Int64 BigMul(System.Int64 a, System.Int64 b, out System.Int64 low) => throw null; + public static double BitDecrement(double x) => throw null; + public static double BitIncrement(double x) => throw null; + public static double Cbrt(double d) => throw null; + public static double Ceiling(double a) => throw null; + public static System.Decimal Ceiling(System.Decimal d) => throw null; + public static int Clamp(int value, int min, int max) => throw null; + public static float Clamp(float value, float min, float max) => throw null; + public static double Clamp(double value, double min, double max) => throw null; + public static System.UInt64 Clamp(System.UInt64 value, System.UInt64 min, System.UInt64 max) => throw null; + public static System.UInt32 Clamp(System.UInt32 value, System.UInt32 min, System.UInt32 max) => throw null; + public static System.UInt16 Clamp(System.UInt16 value, System.UInt16 min, System.UInt16 max) => throw null; + public static System.SByte Clamp(System.SByte value, System.SByte min, System.SByte max) => throw null; + public static System.Int64 Clamp(System.Int64 value, System.Int64 min, System.Int64 max) => throw null; + public static System.Int16 Clamp(System.Int16 value, System.Int16 min, System.Int16 max) => throw null; + public static System.Decimal Clamp(System.Decimal value, System.Decimal min, System.Decimal max) => throw null; + public static System.Byte Clamp(System.Byte value, System.Byte min, System.Byte max) => throw null; + public static double CopySign(double x, double y) => throw null; + public static double Cos(double d) => throw null; + public static double Cosh(double value) => throw null; + public static int DivRem(int a, int b, out int result) => throw null; + public static System.Int64 DivRem(System.Int64 a, System.Int64 b, out System.Int64 result) => throw null; + public const double E = default; + public static double Exp(double d) => throw null; + public static double Floor(double d) => throw null; + public static System.Decimal Floor(System.Decimal d) => throw null; + public static double FusedMultiplyAdd(double x, double y, double z) => throw null; + public static double IEEERemainder(double x, double y) => throw null; + public static int ILogB(double x) => throw null; + public static double Log(double d) => throw null; + public static double Log(double a, double newBase) => throw null; + public static double Log10(double d) => throw null; + public static double Log2(double x) => throw null; + public static int Max(int val1, int val2) => throw null; + public static float Max(float val1, float val2) => throw null; + public static double Max(double val1, double val2) => throw null; + public static System.UInt64 Max(System.UInt64 val1, System.UInt64 val2) => throw null; + public static System.UInt32 Max(System.UInt32 val1, System.UInt32 val2) => throw null; + public static System.UInt16 Max(System.UInt16 val1, System.UInt16 val2) => throw null; + public static System.SByte Max(System.SByte val1, System.SByte val2) => throw null; + public static System.Int64 Max(System.Int64 val1, System.Int64 val2) => throw null; + public static System.Int16 Max(System.Int16 val1, System.Int16 val2) => throw null; + public static System.Decimal Max(System.Decimal val1, System.Decimal val2) => throw null; + public static System.Byte Max(System.Byte val1, System.Byte val2) => throw null; + public static double MaxMagnitude(double x, double y) => throw null; + public static int Min(int val1, int val2) => throw null; + public static float Min(float val1, float val2) => throw null; + public static double Min(double val1, double val2) => throw null; + public static System.UInt64 Min(System.UInt64 val1, System.UInt64 val2) => throw null; + public static System.UInt32 Min(System.UInt32 val1, System.UInt32 val2) => throw null; + public static System.UInt16 Min(System.UInt16 val1, System.UInt16 val2) => throw null; + public static System.SByte Min(System.SByte val1, System.SByte val2) => throw null; + public static System.Int64 Min(System.Int64 val1, System.Int64 val2) => throw null; + public static System.Int16 Min(System.Int16 val1, System.Int16 val2) => throw null; + public static System.Decimal Min(System.Decimal val1, System.Decimal val2) => throw null; + public static System.Byte Min(System.Byte val1, System.Byte val2) => throw null; + public static double MinMagnitude(double x, double y) => throw null; + public const double PI = default; + public static double Pow(double x, double y) => throw null; + public static double Round(double value, int digits, System.MidpointRounding mode) => throw null; + public static double Round(double value, int digits) => throw null; + public static double Round(double value, System.MidpointRounding mode) => throw null; + public static double Round(double a) => throw null; + public static System.Decimal Round(System.Decimal d, int decimals, System.MidpointRounding mode) => throw null; + public static System.Decimal Round(System.Decimal d, int decimals) => throw null; + public static System.Decimal Round(System.Decimal d, System.MidpointRounding mode) => throw null; + public static System.Decimal Round(System.Decimal d) => throw null; + public static double ScaleB(double x, int n) => throw null; + public static int Sign(int value) => throw null; + public static int Sign(float value) => throw null; + public static int Sign(double value) => throw null; + public static int Sign(System.SByte value) => throw null; + public static int Sign(System.Int64 value) => throw null; + public static int Sign(System.Int16 value) => throw null; + public static int Sign(System.Decimal value) => throw null; + public static double Sin(double a) => throw null; + public static double Sinh(double value) => throw null; + public static double Sqrt(double d) => throw null; + public static double Tan(double a) => throw null; + public static double Tanh(double value) => throw null; + public const double Tau = default; + public static double Truncate(double d) => throw null; + public static System.Decimal Truncate(System.Decimal d) => throw null; + } + + // Generated from `System.MathF` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class MathF + { + public static float Abs(float x) => throw null; + public static float Acos(float x) => throw null; + public static float Acosh(float x) => throw null; + public static float Asin(float x) => throw null; + public static float Asinh(float x) => throw null; + public static float Atan(float x) => throw null; + public static float Atan2(float y, float x) => throw null; + public static float Atanh(float x) => throw null; + public static float BitDecrement(float x) => throw null; + public static float BitIncrement(float x) => throw null; + public static float Cbrt(float x) => throw null; + public static float Ceiling(float x) => throw null; + public static float CopySign(float x, float y) => throw null; + public static float Cos(float x) => throw null; + public static float Cosh(float x) => throw null; + public const float E = default; + public static float Exp(float x) => throw null; + public static float Floor(float x) => throw null; + public static float FusedMultiplyAdd(float x, float y, float z) => throw null; + public static float IEEERemainder(float x, float y) => throw null; + public static int ILogB(float x) => throw null; + public static float Log(float x, float y) => throw null; + public static float Log(float x) => throw null; + public static float Log10(float x) => throw null; + public static float Log2(float x) => throw null; + public static float Max(float x, float y) => throw null; + public static float MaxMagnitude(float x, float y) => throw null; + public static float Min(float x, float y) => throw null; + public static float MinMagnitude(float x, float y) => throw null; + public const float PI = default; + public static float Pow(float x, float y) => throw null; + public static float Round(float x, int digits, System.MidpointRounding mode) => throw null; + public static float Round(float x, int digits) => throw null; + public static float Round(float x, System.MidpointRounding mode) => throw null; + public static float Round(float x) => throw null; + public static float ScaleB(float x, int n) => throw null; + public static int Sign(float x) => throw null; + public static float Sin(float x) => throw null; + public static float Sinh(float x) => throw null; + public static float Sqrt(float x) => throw null; + public static float Tan(float x) => throw null; + public static float Tanh(float x) => throw null; + public const float Tau = default; + public static float Truncate(float x) => throw null; + } + + // Generated from `System.MemberAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemberAccessException : System.SystemException + { + public MemberAccessException(string message, System.Exception inner) => throw null; + public MemberAccessException(string message) => throw null; + public MemberAccessException() => throw null; + protected MemberAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Memory<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Memory : System.IEquatable> + { + public void CopyTo(System.Memory destination) => throw null; + public static System.Memory Empty { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Memory other) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public int Length { get => throw null; } + public Memory(T[] array, int start, int length) => throw null; + public Memory(T[] array) => throw null; + // Stub generator skipped constructor + public System.Buffers.MemoryHandle Pin() => throw null; + public System.Memory Slice(int start, int length) => throw null; + public System.Memory Slice(int start) => throw null; + public System.Span Span { get => throw null; } + public T[] ToArray() => throw null; + public override string ToString() => throw null; + public bool TryCopyTo(System.Memory destination) => throw null; + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.MethodAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodAccessException : System.MemberAccessException + { + public MethodAccessException(string message, System.Exception inner) => throw null; + public MethodAccessException(string message) => throw null; + public MethodAccessException() => throw null; + protected MethodAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.MidpointRounding` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MidpointRounding + { + AwayFromZero, + // Stub generator skipped constructor + ToEven, + ToNegativeInfinity, + ToPositiveInfinity, + ToZero, + } + + // Generated from `System.MissingFieldException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingFieldException : System.MissingMemberException, System.Runtime.Serialization.ISerializable + { + public override string Message { get => throw null; } + public MissingFieldException(string message, System.Exception inner) => throw null; + public MissingFieldException(string message) => throw null; + public MissingFieldException(string className, string fieldName) => throw null; + public MissingFieldException() => throw null; + protected MissingFieldException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.MissingMemberException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingMemberException : System.MemberAccessException, System.Runtime.Serialization.ISerializable + { + protected string ClassName; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected string MemberName; + public override string Message { get => throw null; } + public MissingMemberException(string message, System.Exception inner) => throw null; + public MissingMemberException(string message) => throw null; + public MissingMemberException(string className, string memberName) => throw null; + public MissingMemberException() => throw null; + protected MissingMemberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected System.Byte[] Signature; + } + + // Generated from `System.MissingMethodException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingMethodException : System.MissingMemberException + { + public override string Message { get => throw null; } + public MissingMethodException(string message, System.Exception inner) => throw null; + public MissingMethodException(string message) => throw null; + public MissingMethodException(string className, string methodName) => throw null; + public MissingMethodException() => throw null; + protected MissingMethodException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ModuleHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ModuleHandle + { + public static bool operator !=(System.ModuleHandle left, System.ModuleHandle right) => throw null; + public static bool operator ==(System.ModuleHandle left, System.ModuleHandle right) => throw null; + public static System.ModuleHandle EmptyHandle; + public override bool Equals(object obj) => throw null; + public bool Equals(System.ModuleHandle handle) => throw null; + public override int GetHashCode() => throw null; + public System.RuntimeFieldHandle GetRuntimeFieldHandleFromMetadataToken(int fieldToken) => throw null; + public System.RuntimeMethodHandle GetRuntimeMethodHandleFromMetadataToken(int methodToken) => throw null; + public System.RuntimeTypeHandle GetRuntimeTypeHandleFromMetadataToken(int typeToken) => throw null; + public int MDStreamVersion { get => throw null; } + // Stub generator skipped constructor + public System.RuntimeFieldHandle ResolveFieldHandle(int fieldToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) => throw null; + public System.RuntimeFieldHandle ResolveFieldHandle(int fieldToken) => throw null; + public System.RuntimeMethodHandle ResolveMethodHandle(int methodToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) => throw null; + public System.RuntimeMethodHandle ResolveMethodHandle(int methodToken) => throw null; + public System.RuntimeTypeHandle ResolveTypeHandle(int typeToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) => throw null; + public System.RuntimeTypeHandle ResolveTypeHandle(int typeToken) => throw null; + } + + // Generated from `System.MulticastDelegate` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MulticastDelegate : System.Delegate + { + public static bool operator !=(System.MulticastDelegate d1, System.MulticastDelegate d2) => throw null; + public static bool operator ==(System.MulticastDelegate d1, System.MulticastDelegate d2) => throw null; + protected override System.Delegate CombineImpl(System.Delegate follow) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override System.Delegate[] GetInvocationList() => throw null; + protected override System.Reflection.MethodInfo GetMethodImpl() => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected MulticastDelegate(object target, string method) : base(default(System.Type), default(string)) => throw null; + protected MulticastDelegate(System.Type target, string method) : base(default(System.Type), default(string)) => throw null; + protected override System.Delegate RemoveImpl(System.Delegate value) => throw null; + } + + // Generated from `System.MulticastNotSupportedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MulticastNotSupportedException : System.SystemException + { + public MulticastNotSupportedException(string message, System.Exception inner) => throw null; + public MulticastNotSupportedException(string message) => throw null; + public MulticastNotSupportedException() => throw null; + } + + // Generated from `System.NetPipeStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetPipeStyleUriParser : System.UriParser + { + public NetPipeStyleUriParser() => throw null; + } + + // Generated from `System.NetTcpStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NetTcpStyleUriParser : System.UriParser + { + public NetTcpStyleUriParser() => throw null; + } + + // Generated from `System.NewsStyleUriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NewsStyleUriParser : System.UriParser + { + public NewsStyleUriParser() => throw null; + } + + // Generated from `System.NonSerializedAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NonSerializedAttribute : System.Attribute + { + public NonSerializedAttribute() => throw null; + } + + // Generated from `System.NotFiniteNumberException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotFiniteNumberException : System.ArithmeticException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public NotFiniteNumberException(string message, double offendingNumber, System.Exception innerException) => throw null; + public NotFiniteNumberException(string message, double offendingNumber) => throw null; + public NotFiniteNumberException(string message, System.Exception innerException) => throw null; + public NotFiniteNumberException(string message) => throw null; + public NotFiniteNumberException(double offendingNumber) => throw null; + public NotFiniteNumberException() => throw null; + protected NotFiniteNumberException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public double OffendingNumber { get => throw null; } + } + + // Generated from `System.NotImplementedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotImplementedException : System.SystemException + { + public NotImplementedException(string message, System.Exception inner) => throw null; + public NotImplementedException(string message) => throw null; + public NotImplementedException() => throw null; + protected NotImplementedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.NotSupportedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NotSupportedException : System.SystemException + { + public NotSupportedException(string message, System.Exception innerException) => throw null; + public NotSupportedException(string message) => throw null; + public NotSupportedException() => throw null; + protected NotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.NullReferenceException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NullReferenceException : System.SystemException + { + public NullReferenceException(string message, System.Exception innerException) => throw null; + public NullReferenceException(string message) => throw null; + public NullReferenceException() => throw null; + protected NullReferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Nullable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Nullable + { + public static int Compare(T? n1, T? n2) where T : struct => throw null; + public static bool Equals(T? n1, T? n2) where T : struct => throw null; + public static System.Type GetUnderlyingType(System.Type nullableType) => throw null; + } + + // Generated from `System.Nullable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Nullable where T : struct + { + public override bool Equals(object other) => throw null; + public override int GetHashCode() => throw null; + public T GetValueOrDefault(T defaultValue) => throw null; + public T GetValueOrDefault() => throw null; + public bool HasValue { get => throw null; } + public Nullable(T value) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + public T Value { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Object` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Object + { + public virtual bool Equals(object obj) => throw null; + public static bool Equals(object objA, object objB) => throw null; + public virtual int GetHashCode() => throw null; + public System.Type GetType() => throw null; + protected object MemberwiseClone() => throw null; + public Object() => throw null; + public static bool ReferenceEquals(object objA, object objB) => throw null; + public virtual string ToString() => throw null; + // ERR: Stub generator didn't handle member: ~Object + } + + // Generated from `System.ObjectDisposedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectDisposedException : System.InvalidOperationException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public ObjectDisposedException(string objectName, string message) => throw null; + public ObjectDisposedException(string objectName) => throw null; + public ObjectDisposedException(string message, System.Exception innerException) => throw null; + protected ObjectDisposedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string ObjectName { get => throw null; } + } + + // Generated from `System.ObsoleteAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObsoleteAttribute : System.Attribute + { + public string DiagnosticId { get => throw null; set => throw null; } + public bool IsError { get => throw null; } + public string Message { get => throw null; } + public ObsoleteAttribute(string message, bool error) => throw null; + public ObsoleteAttribute(string message) => throw null; + public ObsoleteAttribute() => throw null; + public string UrlFormat { get => throw null; set => throw null; } + } + + // Generated from `System.OperatingSystem` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OperatingSystem : System.Runtime.Serialization.ISerializable, System.ICloneable + { + public object Clone() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static bool IsAndroid() => throw null; + public static bool IsAndroidVersionAtLeast(int major, int minor = default(int), int build = default(int), int revision = default(int)) => throw null; + public static bool IsBrowser() => throw null; + public static bool IsFreeBSD() => throw null; + public static bool IsFreeBSDVersionAtLeast(int major, int minor = default(int), int build = default(int), int revision = default(int)) => throw null; + public static bool IsIOS() => throw null; + public static bool IsIOSVersionAtLeast(int major, int minor = default(int), int build = default(int)) => throw null; + public static bool IsLinux() => throw null; + public static bool IsMacOS() => throw null; + public static bool IsMacOSVersionAtLeast(int major, int minor = default(int), int build = default(int)) => throw null; + public static bool IsOSPlatform(string platform) => throw null; + public static bool IsOSPlatformVersionAtLeast(string platform, int major, int minor = default(int), int build = default(int), int revision = default(int)) => throw null; + public static bool IsTvOS() => throw null; + public static bool IsTvOSVersionAtLeast(int major, int minor = default(int), int build = default(int)) => throw null; + public static bool IsWatchOS() => throw null; + public static bool IsWatchOSVersionAtLeast(int major, int minor = default(int), int build = default(int)) => throw null; + public static bool IsWindows() => throw null; + public static bool IsWindowsVersionAtLeast(int major, int minor = default(int), int build = default(int), int revision = default(int)) => throw null; + public OperatingSystem(System.PlatformID platform, System.Version version) => throw null; + public System.PlatformID Platform { get => throw null; } + public string ServicePack { get => throw null; } + public override string ToString() => throw null; + public System.Version Version { get => throw null; } + public string VersionString { get => throw null; } + } + + // Generated from `System.OperationCanceledException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OperationCanceledException : System.SystemException + { + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public OperationCanceledException(string message, System.Threading.CancellationToken token) => throw null; + public OperationCanceledException(string message, System.Exception innerException, System.Threading.CancellationToken token) => throw null; + public OperationCanceledException(string message, System.Exception innerException) => throw null; + public OperationCanceledException(string message) => throw null; + public OperationCanceledException(System.Threading.CancellationToken token) => throw null; + public OperationCanceledException() => throw null; + protected OperationCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.OutOfMemoryException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OutOfMemoryException : System.SystemException + { + public OutOfMemoryException(string message, System.Exception innerException) => throw null; + public OutOfMemoryException(string message) => throw null; + public OutOfMemoryException() => throw null; + protected OutOfMemoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.OverflowException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OverflowException : System.ArithmeticException + { + public OverflowException(string message, System.Exception innerException) => throw null; + public OverflowException(string message) => throw null; + public OverflowException() => throw null; + protected OverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ParamArrayAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParamArrayAttribute : System.Attribute + { + public ParamArrayAttribute() => throw null; + } + + // Generated from `System.PlatformID` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PlatformID + { + MacOSX, + Other, + // Stub generator skipped constructor + Unix, + Win32NT, + Win32S, + Win32Windows, + WinCE, + Xbox, + } + + // Generated from `System.PlatformNotSupportedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PlatformNotSupportedException : System.NotSupportedException + { + public PlatformNotSupportedException(string message, System.Exception inner) => throw null; + public PlatformNotSupportedException(string message) => throw null; + public PlatformNotSupportedException() => throw null; + protected PlatformNotSupportedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Predicate<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate bool Predicate(T obj); + + // Generated from `System.Progress<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Progress : System.IProgress + { + protected virtual void OnReport(T value) => throw null; + public Progress(System.Action handler) => throw null; + public Progress() => throw null; + public event System.EventHandler ProgressChanged; + void System.IProgress.Report(T value) => throw null; + } + + // Generated from `System.Random` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Random + { + public virtual int Next(int minValue, int maxValue) => throw null; + public virtual int Next(int maxValue) => throw null; + public virtual int Next() => throw null; + public virtual void NextBytes(System.Span buffer) => throw null; + public virtual void NextBytes(System.Byte[] buffer) => throw null; + public virtual double NextDouble() => throw null; + public Random(int Seed) => throw null; + public Random() => throw null; + protected virtual double Sample() => throw null; + } + + // Generated from `System.Range` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Range : System.IEquatable + { + public static System.Range All { get => throw null; } + public System.Index End { get => throw null; } + public static System.Range EndAt(System.Index end) => throw null; + public override bool Equals(object value) => throw null; + public bool Equals(System.Range other) => throw null; + public override int GetHashCode() => throw null; + public (int, int) GetOffsetAndLength(int length) => throw null; + public Range(System.Index start, System.Index end) => throw null; + // Stub generator skipped constructor + public System.Index Start { get => throw null; } + public static System.Range StartAt(System.Index start) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.RankException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RankException : System.SystemException + { + public RankException(string message, System.Exception innerException) => throw null; + public RankException(string message) => throw null; + public RankException() => throw null; + protected RankException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ReadOnlyMemory<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ReadOnlyMemory : System.IEquatable> + { + public void CopyTo(System.Memory destination) => throw null; + public static System.ReadOnlyMemory Empty { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.ReadOnlyMemory other) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public int Length { get => throw null; } + public System.Buffers.MemoryHandle Pin() => throw null; + public ReadOnlyMemory(T[] array, int start, int length) => throw null; + public ReadOnlyMemory(T[] array) => throw null; + // Stub generator skipped constructor + public System.ReadOnlyMemory Slice(int start, int length) => throw null; + public System.ReadOnlyMemory Slice(int start) => throw null; + public System.ReadOnlySpan Span { get => throw null; } + public T[] ToArray() => throw null; + public override string ToString() => throw null; + public bool TryCopyTo(System.Memory destination) => throw null; + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.ReadOnlySpan<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ReadOnlySpan + { + public static bool operator !=(System.ReadOnlySpan left, System.ReadOnlySpan right) => throw null; + public static bool operator ==(System.ReadOnlySpan left, System.ReadOnlySpan right) => throw null; + public void CopyTo(System.Span destination) => throw null; + public static System.ReadOnlySpan Empty { get => throw null; } + // Generated from `System.ReadOnlySpan<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public override bool Equals(object obj) => throw null; + public System.ReadOnlySpan.Enumerator GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public T GetPinnableReference() => throw null; + public bool IsEmpty { get => throw null; } + public T this[int index] { get => throw null; } + public int Length { get => throw null; } + unsafe public ReadOnlySpan(void* pointer, int length) => throw null; + public ReadOnlySpan(T[] array, int start, int length) => throw null; + public ReadOnlySpan(T[] array) => throw null; + // Stub generator skipped constructor + public System.ReadOnlySpan Slice(int start, int length) => throw null; + public System.ReadOnlySpan Slice(int start) => throw null; + public T[] ToArray() => throw null; + public override string ToString() => throw null; + public bool TryCopyTo(System.Span destination) => throw null; + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.ResolveEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResolveEventArgs : System.EventArgs + { + public string Name { get => throw null; } + public System.Reflection.Assembly RequestingAssembly { get => throw null; } + public ResolveEventArgs(string name, System.Reflection.Assembly requestingAssembly) => throw null; + public ResolveEventArgs(string name) => throw null; + } + + // Generated from `System.ResolveEventHandler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Reflection.Assembly ResolveEventHandler(object sender, System.ResolveEventArgs args); + + // Generated from `System.RuntimeArgumentHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RuntimeArgumentHandle + { + // Stub generator skipped constructor + } + + // Generated from `System.RuntimeFieldHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RuntimeFieldHandle : System.Runtime.Serialization.ISerializable + { + public static bool operator !=(System.RuntimeFieldHandle left, System.RuntimeFieldHandle right) => throw null; + public static bool operator ==(System.RuntimeFieldHandle left, System.RuntimeFieldHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.RuntimeFieldHandle handle) => throw null; + public override int GetHashCode() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + // Stub generator skipped constructor + public System.IntPtr Value { get => throw null; } + } + + // Generated from `System.RuntimeMethodHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RuntimeMethodHandle : System.Runtime.Serialization.ISerializable + { + public static bool operator !=(System.RuntimeMethodHandle left, System.RuntimeMethodHandle right) => throw null; + public static bool operator ==(System.RuntimeMethodHandle left, System.RuntimeMethodHandle right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.RuntimeMethodHandle handle) => throw null; + public System.IntPtr GetFunctionPointer() => throw null; + public override int GetHashCode() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + // Stub generator skipped constructor + public System.IntPtr Value { get => throw null; } + } + + // Generated from `System.RuntimeTypeHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RuntimeTypeHandle : System.Runtime.Serialization.ISerializable + { + public static bool operator !=(object left, System.RuntimeTypeHandle right) => throw null; + public static bool operator !=(System.RuntimeTypeHandle left, object right) => throw null; + public static bool operator ==(object left, System.RuntimeTypeHandle right) => throw null; + public static bool operator ==(System.RuntimeTypeHandle left, object right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.RuntimeTypeHandle handle) => throw null; + public override int GetHashCode() => throw null; + public System.ModuleHandle GetModuleHandle() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + // Stub generator skipped constructor + public System.IntPtr Value { get => throw null; } + } + + // Generated from `System.SByte` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SByte : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object obj) => throw null; + public int CompareTo(System.SByte value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.SByte obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.SByte MaxValue = default; + public const System.SByte MinValue = default; + public static System.SByte Parse(string s, System.IFormatProvider provider) => throw null; + public static System.SByte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.SByte Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.SByte Parse(string s) => throw null; + public static System.SByte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + // Stub generator skipped constructor + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.SByte result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.SByte result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.SByte result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.SByte result) => throw null; + } + + // Generated from `System.STAThreadAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class STAThreadAttribute : System.Attribute + { + public STAThreadAttribute() => throw null; + } + + // Generated from `System.SerializableAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SerializableAttribute : System.Attribute + { + public SerializableAttribute() => throw null; + } + + // Generated from `System.Single` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Single : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public static bool operator !=(float left, float right) => throw null; + public static bool operator <(float left, float right) => throw null; + public static bool operator <=(float left, float right) => throw null; + public static bool operator ==(float left, float right) => throw null; + public static bool operator >(float left, float right) => throw null; + public static bool operator >=(float left, float right) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(float value) => throw null; + public const float Epsilon = default; + public override bool Equals(object obj) => throw null; + public bool Equals(float obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public static bool IsFinite(float f) => throw null; + public static bool IsInfinity(float f) => throw null; + public static bool IsNaN(float f) => throw null; + public static bool IsNegative(float f) => throw null; + public static bool IsNegativeInfinity(float f) => throw null; + public static bool IsNormal(float f) => throw null; + public static bool IsPositiveInfinity(float f) => throw null; + public static bool IsSubnormal(float f) => throw null; + public const float MaxValue = default; + public const float MinValue = default; + public const float NaN = default; + public const float NegativeInfinity = default; + public static float Parse(string s, System.IFormatProvider provider) => throw null; + public static float Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static float Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static float Parse(string s) => throw null; + public static float Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public const float PositiveInfinity = default; + // Stub generator skipped constructor + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out float result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out float result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out float result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out float result) => throw null; + } + + // Generated from `System.Span<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Span + { + public static bool operator !=(System.Span left, System.Span right) => throw null; + public static bool operator ==(System.Span left, System.Span right) => throw null; + public void Clear() => throw null; + public void CopyTo(System.Span destination) => throw null; + public static System.Span Empty { get => throw null; } + // Generated from `System.Span<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + // Stub generator skipped constructor + public bool MoveNext() => throw null; + } + + + public override bool Equals(object obj) => throw null; + public void Fill(T value) => throw null; + public System.Span.Enumerator GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public T GetPinnableReference() => throw null; + public bool IsEmpty { get => throw null; } + public T this[int index] { get => throw null; } + public int Length { get => throw null; } + public System.Span Slice(int start, int length) => throw null; + public System.Span Slice(int start) => throw null; + unsafe public Span(void* pointer, int length) => throw null; + public Span(T[] array, int start, int length) => throw null; + public Span(T[] array) => throw null; + // Stub generator skipped constructor + public T[] ToArray() => throw null; + public override string ToString() => throw null; + public bool TryCopyTo(System.Span destination) => throw null; + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.StackOverflowException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StackOverflowException : System.SystemException + { + public StackOverflowException(string message, System.Exception innerException) => throw null; + public StackOverflowException(string message) => throw null; + public StackOverflowException() => throw null; + } + + // Generated from `System.String` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class String : System.IEquatable, System.IConvertible, System.IComparable, System.IComparable, System.ICloneable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public static bool operator !=(string a, string b) => throw null; + public static bool operator ==(string a, string b) => throw null; + [System.Runtime.CompilerServices.IndexerName("Chars")] + public System.Char this[int index] { get => throw null; } + public object Clone() => throw null; + public static int Compare(string strA, string strB, bool ignoreCase, System.Globalization.CultureInfo culture) => throw null; + public static int Compare(string strA, string strB, bool ignoreCase) => throw null; + public static int Compare(string strA, string strB, System.StringComparison comparisonType) => throw null; + public static int Compare(string strA, string strB, System.Globalization.CultureInfo culture, System.Globalization.CompareOptions options) => throw null; + public static int Compare(string strA, string strB) => throw null; + public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase, System.Globalization.CultureInfo culture) => throw null; + public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase) => throw null; + public static int Compare(string strA, int indexA, string strB, int indexB, int length, System.StringComparison comparisonType) => throw null; + public static int Compare(string strA, int indexA, string strB, int indexB, int length, System.Globalization.CultureInfo culture, System.Globalization.CompareOptions options) => throw null; + public static int Compare(string strA, int indexA, string strB, int indexB, int length) => throw null; + public static int CompareOrdinal(string strA, string strB) => throw null; + public static int CompareOrdinal(string strA, int indexA, string strB, int indexB, int length) => throw null; + public int CompareTo(string strB) => throw null; + public int CompareTo(object value) => throw null; + public static string Concat(System.Collections.Generic.IEnumerable values) => throw null; + public static string Concat(string str0, string str1, string str2, string str3) => throw null; + public static string Concat(string str0, string str1, string str2) => throw null; + public static string Concat(string str0, string str1) => throw null; + public static string Concat(params string[] values) => throw null; + public static string Concat(params object[] args) => throw null; + public static string Concat(object arg0, object arg1, object arg2) => throw null; + public static string Concat(object arg0, object arg1) => throw null; + public static string Concat(object arg0) => throw null; + public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1, System.ReadOnlySpan str2, System.ReadOnlySpan str3) => throw null; + public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1, System.ReadOnlySpan str2) => throw null; + public static string Concat(System.ReadOnlySpan str0, System.ReadOnlySpan str1) => throw null; + public static string Concat(System.Collections.Generic.IEnumerable values) => throw null; + public bool Contains(string value, System.StringComparison comparisonType) => throw null; + public bool Contains(string value) => throw null; + public bool Contains(System.Char value, System.StringComparison comparisonType) => throw null; + public bool Contains(System.Char value) => throw null; + public static string Copy(string str) => throw null; + public void CopyTo(int sourceIndex, System.Char[] destination, int destinationIndex, int count) => throw null; + public static string Create(int length, TState state, System.Buffers.SpanAction action) => throw null; + public static string Empty; + public bool EndsWith(string value, bool ignoreCase, System.Globalization.CultureInfo culture) => throw null; + public bool EndsWith(string value, System.StringComparison comparisonType) => throw null; + public bool EndsWith(string value) => throw null; + public bool EndsWith(System.Char value) => throw null; + public System.Text.StringRuneEnumerator EnumerateRunes() => throw null; + public static bool Equals(string a, string b, System.StringComparison comparisonType) => throw null; + public static bool Equals(string a, string b) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(string value, System.StringComparison comparisonType) => throw null; + public bool Equals(string value) => throw null; + public static string Format(string format, params object[] args) => throw null; + public static string Format(string format, object arg0, object arg1, object arg2) => throw null; + public static string Format(string format, object arg0, object arg1) => throw null; + public static string Format(string format, object arg0) => throw null; + public static string Format(System.IFormatProvider provider, string format, params object[] args) => throw null; + public static string Format(System.IFormatProvider provider, string format, object arg0, object arg1, object arg2) => throw null; + public static string Format(System.IFormatProvider provider, string format, object arg0, object arg1) => throw null; + public static string Format(System.IFormatProvider provider, string format, object arg0) => throw null; + public System.CharEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public static int GetHashCode(System.ReadOnlySpan value, System.StringComparison comparisonType) => throw null; + public static int GetHashCode(System.ReadOnlySpan value) => throw null; + public override int GetHashCode() => throw null; + public int GetHashCode(System.StringComparison comparisonType) => throw null; + public System.Char GetPinnableReference() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public int IndexOf(string value, int startIndex, int count, System.StringComparison comparisonType) => throw null; + public int IndexOf(string value, int startIndex, int count) => throw null; + public int IndexOf(string value, int startIndex, System.StringComparison comparisonType) => throw null; + public int IndexOf(string value, int startIndex) => throw null; + public int IndexOf(string value, System.StringComparison comparisonType) => throw null; + public int IndexOf(string value) => throw null; + public int IndexOf(System.Char value, int startIndex, int count) => throw null; + public int IndexOf(System.Char value, int startIndex) => throw null; + public int IndexOf(System.Char value, System.StringComparison comparisonType) => throw null; + public int IndexOf(System.Char value) => throw null; + public int IndexOfAny(System.Char[] anyOf, int startIndex, int count) => throw null; + public int IndexOfAny(System.Char[] anyOf, int startIndex) => throw null; + public int IndexOfAny(System.Char[] anyOf) => throw null; + public string Insert(int startIndex, string value) => throw null; + public static string Intern(string str) => throw null; + public static string IsInterned(string str) => throw null; + public bool IsNormalized(System.Text.NormalizationForm normalizationForm) => throw null; + public bool IsNormalized() => throw null; + public static bool IsNullOrEmpty(string value) => throw null; + public static bool IsNullOrWhiteSpace(string value) => throw null; + public static string Join(string separator, System.Collections.Generic.IEnumerable values) => throw null; + public static string Join(System.Char separator, System.Collections.Generic.IEnumerable values) => throw null; + public static string Join(string separator, string[] value, int startIndex, int count) => throw null; + public static string Join(string separator, params string[] value) => throw null; + public static string Join(string separator, params object[] values) => throw null; + public static string Join(string separator, System.Collections.Generic.IEnumerable values) => throw null; + public static string Join(System.Char separator, string[] value, int startIndex, int count) => throw null; + public static string Join(System.Char separator, params string[] value) => throw null; + public static string Join(System.Char separator, params object[] values) => throw null; + public int LastIndexOf(string value, int startIndex, int count, System.StringComparison comparisonType) => throw null; + public int LastIndexOf(string value, int startIndex, int count) => throw null; + public int LastIndexOf(string value, int startIndex, System.StringComparison comparisonType) => throw null; + public int LastIndexOf(string value, int startIndex) => throw null; + public int LastIndexOf(string value, System.StringComparison comparisonType) => throw null; + public int LastIndexOf(string value) => throw null; + public int LastIndexOf(System.Char value, int startIndex, int count) => throw null; + public int LastIndexOf(System.Char value, int startIndex) => throw null; + public int LastIndexOf(System.Char value) => throw null; + public int LastIndexOfAny(System.Char[] anyOf, int startIndex, int count) => throw null; + public int LastIndexOfAny(System.Char[] anyOf, int startIndex) => throw null; + public int LastIndexOfAny(System.Char[] anyOf) => throw null; + public int Length { get => throw null; } + public string Normalize(System.Text.NormalizationForm normalizationForm) => throw null; + public string Normalize() => throw null; + public string PadLeft(int totalWidth, System.Char paddingChar) => throw null; + public string PadLeft(int totalWidth) => throw null; + public string PadRight(int totalWidth, System.Char paddingChar) => throw null; + public string PadRight(int totalWidth) => throw null; + public string Remove(int startIndex, int count) => throw null; + public string Remove(int startIndex) => throw null; + public string Replace(string oldValue, string newValue, bool ignoreCase, System.Globalization.CultureInfo culture) => throw null; + public string Replace(string oldValue, string newValue, System.StringComparison comparisonType) => throw null; + public string Replace(string oldValue, string newValue) => throw null; + public string Replace(System.Char oldChar, System.Char newChar) => throw null; + public string[] Split(string[] separator, int count, System.StringSplitOptions options) => throw null; + public string[] Split(string[] separator, System.StringSplitOptions options) => throw null; + public string[] Split(string separator, int count, System.StringSplitOptions options = default(System.StringSplitOptions)) => throw null; + public string[] Split(string separator, System.StringSplitOptions options = default(System.StringSplitOptions)) => throw null; + public string[] Split(params System.Char[] separator) => throw null; + public string[] Split(System.Char[] separator, int count, System.StringSplitOptions options) => throw null; + public string[] Split(System.Char[] separator, int count) => throw null; + public string[] Split(System.Char[] separator, System.StringSplitOptions options) => throw null; + public string[] Split(System.Char separator, int count, System.StringSplitOptions options = default(System.StringSplitOptions)) => throw null; + public string[] Split(System.Char separator, System.StringSplitOptions options = default(System.StringSplitOptions)) => throw null; + public bool StartsWith(string value, bool ignoreCase, System.Globalization.CultureInfo culture) => throw null; + public bool StartsWith(string value, System.StringComparison comparisonType) => throw null; + public bool StartsWith(string value) => throw null; + public bool StartsWith(System.Char value) => throw null; + unsafe public String(System.SByte* value, int startIndex, int length, System.Text.Encoding enc) => throw null; + unsafe public String(System.SByte* value, int startIndex, int length) => throw null; + unsafe public String(System.SByte* value) => throw null; + unsafe public String(System.Char* value, int startIndex, int length) => throw null; + unsafe public String(System.Char* value) => throw null; + public String(System.ReadOnlySpan value) => throw null; + public String(System.Char[] value, int startIndex, int length) => throw null; + public String(System.Char[] value) => throw null; + public String(System.Char c, int count) => throw null; + public string Substring(int startIndex, int length) => throw null; + public string Substring(int startIndex) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + public System.Char[] ToCharArray(int startIndex, int length) => throw null; + public System.Char[] ToCharArray() => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + public string ToLower(System.Globalization.CultureInfo culture) => throw null; + public string ToLower() => throw null; + public string ToLowerInvariant() => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public string ToUpper(System.Globalization.CultureInfo culture) => throw null; + public string ToUpper() => throw null; + public string ToUpperInvariant() => throw null; + public string Trim(params System.Char[] trimChars) => throw null; + public string Trim(System.Char trimChar) => throw null; + public string Trim() => throw null; + public string TrimEnd(params System.Char[] trimChars) => throw null; + public string TrimEnd(System.Char trimChar) => throw null; + public string TrimEnd() => throw null; + public string TrimStart(params System.Char[] trimChars) => throw null; + public string TrimStart(System.Char trimChar) => throw null; + public string TrimStart() => throw null; + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.StringComparer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class StringComparer : System.Collections.IEqualityComparer, System.Collections.IComparer, System.Collections.Generic.IEqualityComparer, System.Collections.Generic.IComparer + { + public int Compare(object x, object y) => throw null; + public abstract int Compare(string x, string y); + public static System.StringComparer Create(System.Globalization.CultureInfo culture, bool ignoreCase) => throw null; + public static System.StringComparer Create(System.Globalization.CultureInfo culture, System.Globalization.CompareOptions options) => throw null; + public static System.StringComparer CurrentCulture { get => throw null; } + public static System.StringComparer CurrentCultureIgnoreCase { get => throw null; } + public bool Equals(object x, object y) => throw null; + public abstract bool Equals(string x, string y); + public static System.StringComparer FromComparison(System.StringComparison comparisonType) => throw null; + public int GetHashCode(object obj) => throw null; + public abstract int GetHashCode(string obj); + public static System.StringComparer InvariantCulture { get => throw null; } + public static System.StringComparer InvariantCultureIgnoreCase { get => throw null; } + public static System.StringComparer Ordinal { get => throw null; } + public static System.StringComparer OrdinalIgnoreCase { get => throw null; } + protected StringComparer() => throw null; + } + + // Generated from `System.StringComparison` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StringComparison + { + CurrentCulture, + CurrentCultureIgnoreCase, + InvariantCulture, + InvariantCultureIgnoreCase, + Ordinal, + OrdinalIgnoreCase, + // Stub generator skipped constructor + } + + // Generated from `System.StringNormalizationExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class StringNormalizationExtensions + { + public static bool IsNormalized(this string strInput, System.Text.NormalizationForm normalizationForm) => throw null; + public static bool IsNormalized(this string strInput) => throw null; + public static string Normalize(this string strInput, System.Text.NormalizationForm normalizationForm) => throw null; + public static string Normalize(this string strInput) => throw null; + } + + // Generated from `System.StringSplitOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum StringSplitOptions + { + None, + RemoveEmptyEntries, + // Stub generator skipped constructor + TrimEntries, + } + + // Generated from `System.SystemException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SystemException : System.Exception + { + public SystemException(string message, System.Exception innerException) => throw null; + public SystemException(string message) => throw null; + public SystemException() => throw null; + protected SystemException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.ThreadStaticAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadStaticAttribute : System.Attribute + { + public ThreadStaticAttribute() => throw null; + } + + // Generated from `System.TimeSpan` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TimeSpan : System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static System.TimeSpan operator *(double factor, System.TimeSpan timeSpan) => throw null; + public static System.TimeSpan operator *(System.TimeSpan timeSpan, double factor) => throw null; + public static System.TimeSpan operator +(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static System.TimeSpan operator +(System.TimeSpan t) => throw null; + public static System.TimeSpan operator -(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static System.TimeSpan operator -(System.TimeSpan t) => throw null; + public static double operator /(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static System.TimeSpan operator /(System.TimeSpan timeSpan, double divisor) => throw null; + public static bool operator <(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static bool operator <=(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static bool operator ==(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static bool operator >(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public static bool operator >=(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public System.TimeSpan Add(System.TimeSpan ts) => throw null; + public static int Compare(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.TimeSpan value) => throw null; + public int Days { get => throw null; } + public double Divide(System.TimeSpan ts) => throw null; + public System.TimeSpan Divide(double divisor) => throw null; + public System.TimeSpan Duration() => throw null; + public static bool Equals(System.TimeSpan t1, System.TimeSpan t2) => throw null; + public override bool Equals(object value) => throw null; + public bool Equals(System.TimeSpan obj) => throw null; + public static System.TimeSpan FromDays(double value) => throw null; + public static System.TimeSpan FromHours(double value) => throw null; + public static System.TimeSpan FromMilliseconds(double value) => throw null; + public static System.TimeSpan FromMinutes(double value) => throw null; + public static System.TimeSpan FromSeconds(double value) => throw null; + public static System.TimeSpan FromTicks(System.Int64 value) => throw null; + public override int GetHashCode() => throw null; + public int Hours { get => throw null; } + public static System.TimeSpan MaxValue; + public int Milliseconds { get => throw null; } + public static System.TimeSpan MinValue; + public int Minutes { get => throw null; } + public System.TimeSpan Multiply(double factor) => throw null; + public System.TimeSpan Negate() => throw null; + public static System.TimeSpan Parse(string s) => throw null; + public static System.TimeSpan Parse(string input, System.IFormatProvider formatProvider) => throw null; + public static System.TimeSpan Parse(System.ReadOnlySpan input, System.IFormatProvider formatProvider = default(System.IFormatProvider)) => throw null; + public static System.TimeSpan ParseExact(string input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles) => throw null; + public static System.TimeSpan ParseExact(string input, string[] formats, System.IFormatProvider formatProvider) => throw null; + public static System.TimeSpan ParseExact(string input, string format, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles) => throw null; + public static System.TimeSpan ParseExact(string input, string format, System.IFormatProvider formatProvider) => throw null; + public static System.TimeSpan ParseExact(System.ReadOnlySpan input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles = default(System.Globalization.TimeSpanStyles)) => throw null; + public static System.TimeSpan ParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles = default(System.Globalization.TimeSpanStyles)) => throw null; + public int Seconds { get => throw null; } + public System.TimeSpan Subtract(System.TimeSpan ts) => throw null; + public System.Int64 Ticks { get => throw null; } + public const System.Int64 TicksPerDay = default; + public const System.Int64 TicksPerHour = default; + public const System.Int64 TicksPerMillisecond = default; + public const System.Int64 TicksPerMinute = default; + public const System.Int64 TicksPerSecond = default; + public TimeSpan(int hours, int minutes, int seconds) => throw null; + public TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds) => throw null; + public TimeSpan(int days, int hours, int minutes, int seconds) => throw null; + public TimeSpan(System.Int64 ticks) => throw null; + // Stub generator skipped constructor + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public override string ToString() => throw null; + public double TotalDays { get => throw null; } + public double TotalHours { get => throw null; } + public double TotalMilliseconds { get => throw null; } + public double TotalMinutes { get => throw null; } + public double TotalSeconds { get => throw null; } + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider formatProvider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.TimeSpan result) => throw null; + public static bool TryParse(string input, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.TimeSpan result) => throw null; + public static bool TryParse(System.ReadOnlySpan input, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParseExact(string input, string[] formats, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParseExact(string input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles, out System.TimeSpan result) => throw null; + public static bool TryParseExact(string input, string format, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParseExact(string input, string format, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles, out System.TimeSpan result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, string[] formats, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, string[] formats, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles, out System.TimeSpan result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, System.IFormatProvider formatProvider, out System.TimeSpan result) => throw null; + public static bool TryParseExact(System.ReadOnlySpan input, System.ReadOnlySpan format, System.IFormatProvider formatProvider, System.Globalization.TimeSpanStyles styles, out System.TimeSpan result) => throw null; + public static System.TimeSpan Zero; + } + + // Generated from `System.TimeZone` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TimeZone + { + public static System.TimeZone CurrentTimeZone { get => throw null; } + public abstract string DaylightName { get; } + public abstract System.Globalization.DaylightTime GetDaylightChanges(int year); + public abstract System.TimeSpan GetUtcOffset(System.DateTime time); + public virtual bool IsDaylightSavingTime(System.DateTime time) => throw null; + public static bool IsDaylightSavingTime(System.DateTime time, System.Globalization.DaylightTime daylightTimes) => throw null; + public abstract string StandardName { get; } + protected TimeZone() => throw null; + public virtual System.DateTime ToLocalTime(System.DateTime time) => throw null; + public virtual System.DateTime ToUniversalTime(System.DateTime time) => throw null; + } + + // Generated from `System.TimeZoneInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimeZoneInfo : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable + { + // Generated from `System.TimeZoneInfo.AdjustmentRule` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AdjustmentRule : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable + { + public static System.TimeZoneInfo.AdjustmentRule CreateAdjustmentRule(System.DateTime dateStart, System.DateTime dateEnd, System.TimeSpan daylightDelta, System.TimeZoneInfo.TransitionTime daylightTransitionStart, System.TimeZoneInfo.TransitionTime daylightTransitionEnd) => throw null; + public System.DateTime DateEnd { get => throw null; } + public System.DateTime DateStart { get => throw null; } + public System.TimeSpan DaylightDelta { get => throw null; } + public System.TimeZoneInfo.TransitionTime DaylightTransitionEnd { get => throw null; } + public System.TimeZoneInfo.TransitionTime DaylightTransitionStart { get => throw null; } + public bool Equals(System.TimeZoneInfo.AdjustmentRule other) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + } + + + public System.TimeSpan BaseUtcOffset { get => throw null; } + public static void ClearCachedData() => throw null; + public static System.DateTimeOffset ConvertTime(System.DateTimeOffset dateTimeOffset, System.TimeZoneInfo destinationTimeZone) => throw null; + public static System.DateTime ConvertTime(System.DateTime dateTime, System.TimeZoneInfo sourceTimeZone, System.TimeZoneInfo destinationTimeZone) => throw null; + public static System.DateTime ConvertTime(System.DateTime dateTime, System.TimeZoneInfo destinationTimeZone) => throw null; + public static System.DateTimeOffset ConvertTimeBySystemTimeZoneId(System.DateTimeOffset dateTimeOffset, string destinationTimeZoneId) => throw null; + public static System.DateTime ConvertTimeBySystemTimeZoneId(System.DateTime dateTime, string sourceTimeZoneId, string destinationTimeZoneId) => throw null; + public static System.DateTime ConvertTimeBySystemTimeZoneId(System.DateTime dateTime, string destinationTimeZoneId) => throw null; + public static System.DateTime ConvertTimeFromUtc(System.DateTime dateTime, System.TimeZoneInfo destinationTimeZone) => throw null; + public static System.DateTime ConvertTimeToUtc(System.DateTime dateTime, System.TimeZoneInfo sourceTimeZone) => throw null; + public static System.DateTime ConvertTimeToUtc(System.DateTime dateTime) => throw null; + public static System.TimeZoneInfo CreateCustomTimeZone(string id, System.TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, System.TimeZoneInfo.AdjustmentRule[] adjustmentRules, bool disableDaylightSavingTime) => throw null; + public static System.TimeZoneInfo CreateCustomTimeZone(string id, System.TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, System.TimeZoneInfo.AdjustmentRule[] adjustmentRules) => throw null; + public static System.TimeZoneInfo CreateCustomTimeZone(string id, System.TimeSpan baseUtcOffset, string displayName, string standardDisplayName) => throw null; + public string DaylightName { get => throw null; } + public string DisplayName { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.TimeZoneInfo other) => throw null; + public static System.TimeZoneInfo FindSystemTimeZoneById(string id) => throw null; + public static System.TimeZoneInfo FromSerializedString(string source) => throw null; + public System.TimeZoneInfo.AdjustmentRule[] GetAdjustmentRules() => throw null; + public System.TimeSpan[] GetAmbiguousTimeOffsets(System.DateTimeOffset dateTimeOffset) => throw null; + public System.TimeSpan[] GetAmbiguousTimeOffsets(System.DateTime dateTime) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static System.Collections.ObjectModel.ReadOnlyCollection GetSystemTimeZones() => throw null; + public System.TimeSpan GetUtcOffset(System.DateTimeOffset dateTimeOffset) => throw null; + public System.TimeSpan GetUtcOffset(System.DateTime dateTime) => throw null; + public bool HasSameRules(System.TimeZoneInfo other) => throw null; + public string Id { get => throw null; } + public bool IsAmbiguousTime(System.DateTimeOffset dateTimeOffset) => throw null; + public bool IsAmbiguousTime(System.DateTime dateTime) => throw null; + public bool IsDaylightSavingTime(System.DateTimeOffset dateTimeOffset) => throw null; + public bool IsDaylightSavingTime(System.DateTime dateTime) => throw null; + public bool IsInvalidTime(System.DateTime dateTime) => throw null; + public static System.TimeZoneInfo Local { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public string StandardName { get => throw null; } + public bool SupportsDaylightSavingTime { get => throw null; } + public string ToSerializedString() => throw null; + public override string ToString() => throw null; + // Generated from `System.TimeZoneInfo.TransitionTime` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TransitionTime : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable + { + public static bool operator !=(System.TimeZoneInfo.TransitionTime t1, System.TimeZoneInfo.TransitionTime t2) => throw null; + public static bool operator ==(System.TimeZoneInfo.TransitionTime t1, System.TimeZoneInfo.TransitionTime t2) => throw null; + public static System.TimeZoneInfo.TransitionTime CreateFixedDateRule(System.DateTime timeOfDay, int month, int day) => throw null; + public static System.TimeZoneInfo.TransitionTime CreateFloatingDateRule(System.DateTime timeOfDay, int month, int week, System.DayOfWeek dayOfWeek) => throw null; + public int Day { get => throw null; } + public System.DayOfWeek DayOfWeek { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.TimeZoneInfo.TransitionTime other) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool IsFixedDateRule { get => throw null; } + public int Month { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public System.DateTime TimeOfDay { get => throw null; } + // Stub generator skipped constructor + public int Week { get => throw null; } + } + + + public static System.TimeZoneInfo Utc { get => throw null; } + } + + // Generated from `System.TimeZoneNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimeZoneNotFoundException : System.Exception + { + public TimeZoneNotFoundException(string message, System.Exception innerException) => throw null; + public TimeZoneNotFoundException(string message) => throw null; + public TimeZoneNotFoundException() => throw null; + protected TimeZoneNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.TimeoutException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TimeoutException : System.SystemException + { + public TimeoutException(string message, System.Exception innerException) => throw null; + public TimeoutException(string message) => throw null; + public TimeoutException() => throw null; + protected TimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Tuple` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Tuple + { + public static System.Tuple Create(T1 item1) => throw null; + public static System.Tuple Create(T1 item1, T2 item2) => throw null; + public static System.Tuple Create(T1 item1, T2 item2, T3 item3) => throw null; + public static System.Tuple Create(T1 item1, T2 item2, T3 item3, T4 item4) => throw null; + public static System.Tuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) => throw null; + public static System.Tuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) => throw null; + public static System.Tuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) => throw null; + public static System.Tuple> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8) => throw null; + } + + // Generated from `System.Tuple<,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + public T4 Item4 { get => throw null; } + public T5 Item5 { get => throw null; } + public T6 Item6 { get => throw null; } + public T7 Item7 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public TRest Rest { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) => throw null; + } + + // Generated from `System.Tuple<,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + public T4 Item4 { get => throw null; } + public T5 Item5 { get => throw null; } + public T6 Item6 { get => throw null; } + public T7 Item7 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) => throw null; + } + + // Generated from `System.Tuple<,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + public T4 Item4 { get => throw null; } + public T5 Item5 { get => throw null; } + public T6 Item6 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) => throw null; + } + + // Generated from `System.Tuple<,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + public T4 Item4 { get => throw null; } + public T5 Item5 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) => throw null; + } + + // Generated from `System.Tuple<,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + public T4 Item4 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3, T4 item4) => throw null; + } + + // Generated from `System.Tuple<,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + public T3 Item3 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2, T3 item3) => throw null; + } + + // Generated from `System.Tuple<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + public T2 Item2 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1, T2 item2) => throw null; + } + + // Generated from `System.Tuple<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Tuple : System.Runtime.CompilerServices.ITuple, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + int System.IComparable.CompareTo(object obj) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1 { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public Tuple(T1 item1) => throw null; + } + + // Generated from `System.TupleExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class TupleExtensions + { + public static void Deconstruct(this System.Tuple value, out T1 item1) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2, out T3 item3) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2, out T3 item3, out T4 item4) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6) => throw null; + public static void Deconstruct(this System.Tuple value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13) => throw null; + public static void Deconstruct(this System.Tuple> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20) => throw null; + public static void Deconstruct(this System.Tuple>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20, out T21 item21) => throw null; + public static System.Tuple ToTuple(this System.ValueTuple value) => throw null; + public static System.Tuple ToTuple(this (T1, T2) value) => throw null; + public static System.Tuple ToTuple(this (T1, T2, T3) value) => throw null; + public static System.Tuple ToTuple(this (T1, T2, T3, T4) value) => throw null; + public static System.Tuple ToTuple(this (T1, T2, T3, T4, T5) value) => throw null; + public static System.Tuple ToTuple(this (T1, T2, T3, T4, T5, T6) value) => throw null; + public static System.Tuple ToTuple(this (T1, T2, T3, T4, T5, T6, T7) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) value) => throw null; + public static System.Tuple> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) value) => throw null; + public static System.Tuple>> ToTuple(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) value) => throw null; + public static System.ValueTuple ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) ToValueTuple(this System.Tuple>> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8, T9) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8) ToValueTuple(this System.Tuple> value) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7) ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2, T3, T4, T5, T6) ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2, T3, T4, T5) ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2, T3, T4) ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2, T3) ToValueTuple(this System.Tuple value) => throw null; + public static (T1, T2) ToValueTuple(this System.Tuple value) => throw null; + } + + // Generated from `System.Type` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Type : System.Reflection.MemberInfo, System.Reflection.IReflect + { + public static bool operator !=(System.Type left, System.Type right) => throw null; + public static bool operator ==(System.Type left, System.Type right) => throw null; + public abstract System.Reflection.Assembly Assembly { get; } + public abstract string AssemblyQualifiedName { get; } + public System.Reflection.TypeAttributes Attributes { get => throw null; } + public abstract System.Type BaseType { get; } + public virtual bool ContainsGenericParameters { get => throw null; } + public virtual System.Reflection.MethodBase DeclaringMethod { get => throw null; } + public override System.Type DeclaringType { get => throw null; } + public static System.Reflection.Binder DefaultBinder { get => throw null; } + public static System.Char Delimiter; + public static System.Type[] EmptyTypes; + public virtual bool Equals(System.Type o) => throw null; + public override bool Equals(object o) => throw null; + public static System.Reflection.MemberFilter FilterAttribute; + public static System.Reflection.MemberFilter FilterName; + public static System.Reflection.MemberFilter FilterNameIgnoreCase; + public virtual System.Type[] FindInterfaces(System.Reflection.TypeFilter filter, object filterCriteria) => throw null; + public virtual System.Reflection.MemberInfo[] FindMembers(System.Reflection.MemberTypes memberType, System.Reflection.BindingFlags bindingAttr, System.Reflection.MemberFilter filter, object filterCriteria) => throw null; + public abstract string FullName { get; } + public abstract System.Guid GUID { get; } + public virtual System.Reflection.GenericParameterAttributes GenericParameterAttributes { get => throw null; } + public virtual int GenericParameterPosition { get => throw null; } + public virtual System.Type[] GenericTypeArguments { get => throw null; } + public virtual int GetArrayRank() => throw null; + protected abstract System.Reflection.TypeAttributes GetAttributeFlagsImpl(); + public System.Reflection.ConstructorInfo GetConstructor(System.Type[] types) => throw null; + public System.Reflection.ConstructorInfo GetConstructor(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.ConstructorInfo GetConstructor(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected abstract System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + public abstract System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr); + public System.Reflection.ConstructorInfo[] GetConstructors() => throw null; + public virtual System.Reflection.MemberInfo[] GetDefaultMembers() => throw null; + public abstract System.Type GetElementType(); + public virtual string GetEnumName(object value) => throw null; + public virtual string[] GetEnumNames() => throw null; + public virtual System.Type GetEnumUnderlyingType() => throw null; + public virtual System.Array GetEnumValues() => throw null; + public abstract System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr); + public System.Reflection.EventInfo GetEvent(string name) => throw null; + public virtual System.Reflection.EventInfo[] GetEvents() => throw null; + public abstract System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr); + public abstract System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr); + public System.Reflection.FieldInfo GetField(string name) => throw null; + public abstract System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr); + public System.Reflection.FieldInfo[] GetFields() => throw null; + public virtual System.Type[] GetGenericArguments() => throw null; + public virtual System.Type[] GetGenericParameterConstraints() => throw null; + public virtual System.Type GetGenericTypeDefinition() => throw null; + public override int GetHashCode() => throw null; + public abstract System.Type GetInterface(string name, bool ignoreCase); + public System.Type GetInterface(string name) => throw null; + public virtual System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) => throw null; + public abstract System.Type[] GetInterfaces(); + public virtual System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) => throw null; + public virtual System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public System.Reflection.MemberInfo[] GetMember(string name) => throw null; + public abstract System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr); + public System.Reflection.MemberInfo[] GetMembers() => throw null; + public System.Reflection.MethodInfo GetMethod(string name, int genericParameterCount, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, int genericParameterCount, System.Type[] types) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, int genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, int genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Type[] types) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public System.Reflection.MethodInfo GetMethod(string name) => throw null; + protected virtual System.Reflection.MethodInfo GetMethodImpl(string name, int genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected abstract System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + public abstract System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr); + public System.Reflection.MethodInfo[] GetMethods() => throw null; + public abstract System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr); + public System.Type GetNestedType(string name) => throw null; + public abstract System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr); + public System.Type[] GetNestedTypes() => throw null; + public abstract System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr); + public System.Reflection.PropertyInfo[] GetProperties() => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Type[] types) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Type returnType, System.Type[] types) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Type returnType) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public System.Reflection.PropertyInfo GetProperty(string name) => throw null; + protected abstract System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + public static System.Type GetType(string typeName, bool throwOnError, bool ignoreCase) => throw null; + public static System.Type GetType(string typeName, bool throwOnError) => throw null; + public static System.Type GetType(string typeName, System.Func assemblyResolver, System.Func typeResolver, bool throwOnError, bool ignoreCase) => throw null; + public static System.Type GetType(string typeName, System.Func assemblyResolver, System.Func typeResolver, bool throwOnError) => throw null; + public static System.Type GetType(string typeName, System.Func assemblyResolver, System.Func typeResolver) => throw null; + public static System.Type GetType(string typeName) => throw null; + public System.Type GetType() => throw null; + public static System.Type[] GetTypeArray(object[] args) => throw null; + public static System.TypeCode GetTypeCode(System.Type type) => throw null; + protected virtual System.TypeCode GetTypeCodeImpl() => throw null; + public static System.Type GetTypeFromCLSID(System.Guid clsid, string server, bool throwOnError) => throw null; + public static System.Type GetTypeFromCLSID(System.Guid clsid, string server) => throw null; + public static System.Type GetTypeFromCLSID(System.Guid clsid, bool throwOnError) => throw null; + public static System.Type GetTypeFromCLSID(System.Guid clsid) => throw null; + public static System.Type GetTypeFromHandle(System.RuntimeTypeHandle handle) => throw null; + public static System.Type GetTypeFromProgID(string progID, string server, bool throwOnError) => throw null; + public static System.Type GetTypeFromProgID(string progID, string server) => throw null; + public static System.Type GetTypeFromProgID(string progID, bool throwOnError) => throw null; + public static System.Type GetTypeFromProgID(string progID) => throw null; + public static System.RuntimeTypeHandle GetTypeHandle(object o) => throw null; + public bool HasElementType { get => throw null; } + protected abstract bool HasElementTypeImpl(); + public object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Globalization.CultureInfo culture) => throw null; + public object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args) => throw null; + public abstract object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters); + public bool IsAbstract { get => throw null; } + public bool IsAnsiClass { get => throw null; } + public bool IsArray { get => throw null; } + protected abstract bool IsArrayImpl(); + public virtual bool IsAssignableFrom(System.Type c) => throw null; + public bool IsAssignableTo(System.Type targetType) => throw null; + public bool IsAutoClass { get => throw null; } + public bool IsAutoLayout { get => throw null; } + public bool IsByRef { get => throw null; } + protected abstract bool IsByRefImpl(); + public virtual bool IsByRefLike { get => throw null; } + public bool IsCOMObject { get => throw null; } + protected abstract bool IsCOMObjectImpl(); + public bool IsClass { get => throw null; } + public virtual bool IsConstructedGenericType { get => throw null; } + public bool IsContextful { get => throw null; } + protected virtual bool IsContextfulImpl() => throw null; + public virtual bool IsEnum { get => throw null; } + public virtual bool IsEnumDefined(object value) => throw null; + public virtual bool IsEquivalentTo(System.Type other) => throw null; + public bool IsExplicitLayout { get => throw null; } + public virtual bool IsGenericMethodParameter { get => throw null; } + public virtual bool IsGenericParameter { get => throw null; } + public virtual bool IsGenericType { get => throw null; } + public virtual bool IsGenericTypeDefinition { get => throw null; } + public virtual bool IsGenericTypeParameter { get => throw null; } + public bool IsImport { get => throw null; } + public virtual bool IsInstanceOfType(object o) => throw null; + public bool IsInterface { get => throw null; } + public bool IsLayoutSequential { get => throw null; } + public bool IsMarshalByRef { get => throw null; } + protected virtual bool IsMarshalByRefImpl() => throw null; + public bool IsNested { get => throw null; } + public bool IsNestedAssembly { get => throw null; } + public bool IsNestedFamANDAssem { get => throw null; } + public bool IsNestedFamORAssem { get => throw null; } + public bool IsNestedFamily { get => throw null; } + public bool IsNestedPrivate { get => throw null; } + public bool IsNestedPublic { get => throw null; } + public bool IsNotPublic { get => throw null; } + public bool IsPointer { get => throw null; } + protected abstract bool IsPointerImpl(); + public bool IsPrimitive { get => throw null; } + protected abstract bool IsPrimitiveImpl(); + public bool IsPublic { get => throw null; } + public virtual bool IsSZArray { get => throw null; } + public bool IsSealed { get => throw null; } + public virtual bool IsSecurityCritical { get => throw null; } + public virtual bool IsSecuritySafeCritical { get => throw null; } + public virtual bool IsSecurityTransparent { get => throw null; } + public virtual bool IsSerializable { get => throw null; } + public virtual bool IsSignatureType { get => throw null; } + public bool IsSpecialName { get => throw null; } + public virtual bool IsSubclassOf(System.Type c) => throw null; + public virtual bool IsTypeDefinition { get => throw null; } + public bool IsUnicodeClass { get => throw null; } + public bool IsValueType { get => throw null; } + protected virtual bool IsValueTypeImpl() => throw null; + public virtual bool IsVariableBoundArray { get => throw null; } + public bool IsVisible { get => throw null; } + public virtual System.Type MakeArrayType(int rank) => throw null; + public virtual System.Type MakeArrayType() => throw null; + public virtual System.Type MakeByRefType() => throw null; + public static System.Type MakeGenericMethodParameter(int position) => throw null; + public static System.Type MakeGenericSignatureType(System.Type genericTypeDefinition, params System.Type[] typeArguments) => throw null; + public virtual System.Type MakeGenericType(params System.Type[] typeArguments) => throw null; + public virtual System.Type MakePointerType() => throw null; + public override System.Reflection.MemberTypes MemberType { get => throw null; } + public static object Missing; + public abstract System.Reflection.Module Module { get; } + public abstract string Namespace { get; } + public override System.Type ReflectedType { get => throw null; } + public static System.Type ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase) => throw null; + public virtual System.Runtime.InteropServices.StructLayoutAttribute StructLayoutAttribute { get => throw null; } + public override string ToString() => throw null; + protected Type() => throw null; + public virtual System.RuntimeTypeHandle TypeHandle { get => throw null; } + public System.Reflection.ConstructorInfo TypeInitializer { get => throw null; } + public abstract System.Type UnderlyingSystemType { get; } + } + + // Generated from `System.TypeAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeAccessException : System.TypeLoadException + { + public TypeAccessException(string message, System.Exception inner) => throw null; + public TypeAccessException(string message) => throw null; + public TypeAccessException() => throw null; + protected TypeAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.TypeCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TypeCode + { + Boolean, + Byte, + Char, + DBNull, + DateTime, + Decimal, + Double, + Empty, + Int16, + Int32, + Int64, + Object, + SByte, + Single, + String, + // Stub generator skipped constructor + UInt16, + UInt32, + UInt64, + } + + // Generated from `System.TypeInitializationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeInitializationException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public TypeInitializationException(string fullTypeName, System.Exception innerException) => throw null; + public string TypeName { get => throw null; } + } + + // Generated from `System.TypeLoadException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeLoadException : System.SystemException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public TypeLoadException(string message, System.Exception inner) => throw null; + public TypeLoadException(string message) => throw null; + public TypeLoadException() => throw null; + protected TypeLoadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string TypeName { get => throw null; } + } + + // Generated from `System.TypeUnloadedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeUnloadedException : System.SystemException + { + public TypeUnloadedException(string message, System.Exception innerException) => throw null; + public TypeUnloadedException(string message) => throw null; + public TypeUnloadedException() => throw null; + protected TypeUnloadedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.TypedReference` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TypedReference + { + public override bool Equals(object o) => throw null; + public override int GetHashCode() => throw null; + public static System.Type GetTargetType(System.TypedReference value) => throw null; + public static System.TypedReference MakeTypedReference(object target, System.Reflection.FieldInfo[] flds) => throw null; + public static void SetTypedReference(System.TypedReference target, object value) => throw null; + public static System.RuntimeTypeHandle TargetTypeToken(System.TypedReference value) => throw null; + public static object ToObject(System.TypedReference value) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.UInt16` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UInt16 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(System.UInt16 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.UInt16 obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.UInt16 MaxValue = default; + public const System.UInt16 MinValue = default; + public static System.UInt16 Parse(string s, System.IFormatProvider provider) => throw null; + public static System.UInt16 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.UInt16 Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.UInt16 Parse(string s) => throw null; + public static System.UInt16 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.UInt16 result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt16 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.UInt16 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt16 result) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.UInt32` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UInt32 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(System.UInt32 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.UInt32 obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.UInt32 MaxValue = default; + public const System.UInt32 MinValue = default; + public static System.UInt32 Parse(string s, System.IFormatProvider provider) => throw null; + public static System.UInt32 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.UInt32 Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.UInt32 Parse(string s) => throw null; + public static System.UInt32 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.UInt32 result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt32 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.UInt32 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt32 result) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.UInt64` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UInt64 : System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(object value) => throw null; + public int CompareTo(System.UInt64 value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.UInt64 obj) => throw null; + public override int GetHashCode() => throw null; + public System.TypeCode GetTypeCode() => throw null; + public const System.UInt64 MaxValue = default; + public const System.UInt64 MinValue = default; + public static System.UInt64 Parse(string s, System.IFormatProvider provider) => throw null; + public static System.UInt64 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.UInt64 Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.UInt64 Parse(string s) => throw null; + public static System.UInt64 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = default(System.Globalization.NumberStyles), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type type, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public bool TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider provider = default(System.IFormatProvider)) => throw null; + public static bool TryParse(string s, out System.UInt64 result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt64 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, out System.UInt64 result) => throw null; + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UInt64 result) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.UIntPtr` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct UIntPtr : System.Runtime.Serialization.ISerializable, System.IFormattable, System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.UIntPtr value1, System.UIntPtr value2) => throw null; + public static System.UIntPtr operator +(System.UIntPtr pointer, int offset) => throw null; + public static System.UIntPtr operator -(System.UIntPtr pointer, int offset) => throw null; + public static bool operator ==(System.UIntPtr value1, System.UIntPtr value2) => throw null; + public static System.UIntPtr Add(System.UIntPtr pointer, int offset) => throw null; + public int CompareTo(object value) => throw null; + public int CompareTo(System.UIntPtr value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.UIntPtr other) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static System.UIntPtr MaxValue { get => throw null; } + public static System.UIntPtr MinValue { get => throw null; } + public static System.UIntPtr Parse(string s, System.IFormatProvider provider) => throw null; + public static System.UIntPtr Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider) => throw null; + public static System.UIntPtr Parse(string s, System.Globalization.NumberStyles style) => throw null; + public static System.UIntPtr Parse(string s) => throw null; + public static int Size { get => throw null; } + public static System.UIntPtr Subtract(System.UIntPtr pointer, int offset) => throw null; + unsafe public void* ToPointer() => throw null; + public string ToString(string format, System.IFormatProvider provider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider provider) => throw null; + public override string ToString() => throw null; + public System.UInt32 ToUInt32() => throw null; + public System.UInt64 ToUInt64() => throw null; + public static bool TryParse(string s, out System.UIntPtr result) => throw null; + public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.UIntPtr result) => throw null; + unsafe public UIntPtr(void* value) => throw null; + public UIntPtr(System.UInt64 value) => throw null; + public UIntPtr(System.UInt32 value) => throw null; + // Stub generator skipped constructor + public static System.UIntPtr Zero; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.UnauthorizedAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnauthorizedAccessException : System.SystemException + { + public UnauthorizedAccessException(string message, System.Exception inner) => throw null; + public UnauthorizedAccessException(string message) => throw null; + public UnauthorizedAccessException() => throw null; + protected UnauthorizedAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.UnhandledExceptionEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnhandledExceptionEventArgs : System.EventArgs + { + public object ExceptionObject { get => throw null; } + public bool IsTerminating { get => throw null; } + public UnhandledExceptionEventArgs(object exception, bool isTerminating) => throw null; + } + + // Generated from `System.UnhandledExceptionEventHandler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void UnhandledExceptionEventHandler(object sender, System.UnhandledExceptionEventArgs e); + + // Generated from `System.Uri` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Uri : System.Runtime.Serialization.ISerializable + { + public static bool operator !=(System.Uri uri1, System.Uri uri2) => throw null; + public static bool operator ==(System.Uri uri1, System.Uri uri2) => throw null; + public string AbsolutePath { get => throw null; } + public string AbsoluteUri { get => throw null; } + public string Authority { get => throw null; } + protected virtual void Canonicalize() => throw null; + public static System.UriHostNameType CheckHostName(string name) => throw null; + public static bool CheckSchemeName(string schemeName) => throw null; + protected virtual void CheckSecurity() => throw null; + public static int Compare(System.Uri uri1, System.Uri uri2, System.UriComponents partsToCompare, System.UriFormat compareFormat, System.StringComparison comparisonType) => throw null; + public string DnsSafeHost { get => throw null; } + public override bool Equals(object comparand) => throw null; + protected virtual void Escape() => throw null; + public static string EscapeDataString(string stringToEscape) => throw null; + protected static string EscapeString(string str) => throw null; + public static string EscapeUriString(string stringToEscape) => throw null; + public string Fragment { get => throw null; } + public static int FromHex(System.Char digit) => throw null; + public string GetComponents(System.UriComponents components, System.UriFormat format) => throw null; + public override int GetHashCode() => throw null; + public string GetLeftPart(System.UriPartial part) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + protected void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public static string HexEscape(System.Char character) => throw null; + public static System.Char HexUnescape(string pattern, ref int index) => throw null; + public string Host { get => throw null; } + public System.UriHostNameType HostNameType { get => throw null; } + public string IdnHost { get => throw null; } + public bool IsAbsoluteUri { get => throw null; } + protected virtual bool IsBadFileSystemCharacter(System.Char character) => throw null; + public bool IsBaseOf(System.Uri uri) => throw null; + public bool IsDefaultPort { get => throw null; } + protected static bool IsExcludedCharacter(System.Char character) => throw null; + public bool IsFile { get => throw null; } + public static bool IsHexDigit(System.Char character) => throw null; + public static bool IsHexEncoding(string pattern, int index) => throw null; + public bool IsLoopback { get => throw null; } + protected virtual bool IsReservedCharacter(System.Char character) => throw null; + public bool IsUnc { get => throw null; } + public bool IsWellFormedOriginalString() => throw null; + public static bool IsWellFormedUriString(string uriString, System.UriKind uriKind) => throw null; + public string LocalPath { get => throw null; } + public string MakeRelative(System.Uri toUri) => throw null; + public System.Uri MakeRelativeUri(System.Uri uri) => throw null; + public string OriginalString { get => throw null; } + protected virtual void Parse() => throw null; + public string PathAndQuery { get => throw null; } + public int Port { get => throw null; } + public string Query { get => throw null; } + public string Scheme { get => throw null; } + public static string SchemeDelimiter; + public string[] Segments { get => throw null; } + public override string ToString() => throw null; + public static bool TryCreate(string uriString, System.UriKind uriKind, out System.Uri result) => throw null; + public static bool TryCreate(System.Uri baseUri, string relativeUri, out System.Uri result) => throw null; + public static bool TryCreate(System.Uri baseUri, System.Uri relativeUri, out System.Uri result) => throw null; + protected virtual string Unescape(string path) => throw null; + public static string UnescapeDataString(string stringToUnescape) => throw null; + public Uri(string uriString, bool dontEscape) => throw null; + public Uri(string uriString, System.UriKind uriKind) => throw null; + public Uri(string uriString) => throw null; + public Uri(System.Uri baseUri, string relativeUri, bool dontEscape) => throw null; + public Uri(System.Uri baseUri, string relativeUri) => throw null; + public Uri(System.Uri baseUri, System.Uri relativeUri) => throw null; + protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public static string UriSchemeFile; + public static string UriSchemeFtp; + public static string UriSchemeGopher; + public static string UriSchemeHttp; + public static string UriSchemeHttps; + public static string UriSchemeMailto; + public static string UriSchemeNetPipe; + public static string UriSchemeNetTcp; + public static string UriSchemeNews; + public static string UriSchemeNntp; + public bool UserEscaped { get => throw null; } + public string UserInfo { get => throw null; } + } + + // Generated from `System.UriBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UriBuilder + { + public override bool Equals(object rparam) => throw null; + public string Fragment { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public string Host { get => throw null; set => throw null; } + public string Password { get => throw null; set => throw null; } + public string Path { get => throw null; set => throw null; } + public int Port { get => throw null; set => throw null; } + public string Query { get => throw null; set => throw null; } + public string Scheme { get => throw null; set => throw null; } + public override string ToString() => throw null; + public System.Uri Uri { get => throw null; } + public UriBuilder(string uri) => throw null; + public UriBuilder(string schemeName, string hostName) => throw null; + public UriBuilder(string scheme, string host, int portNumber) => throw null; + public UriBuilder(string scheme, string host, int port, string pathValue) => throw null; + public UriBuilder(string scheme, string host, int port, string path, string extraValue) => throw null; + public UriBuilder(System.Uri uri) => throw null; + public UriBuilder() => throw null; + public string UserName { get => throw null; set => throw null; } + } + + // Generated from `System.UriComponents` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum UriComponents + { + AbsoluteUri, + Fragment, + Host, + HostAndPort, + HttpRequestUrl, + KeepDelimiter, + NormalizedHost, + Path, + PathAndQuery, + Port, + Query, + Scheme, + SchemeAndServer, + SerializationInfoString, + StrongAuthority, + StrongPort, + // Stub generator skipped constructor + UserInfo, + } + + // Generated from `System.UriFormat` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UriFormat + { + SafeUnescaped, + Unescaped, + UriEscaped, + // Stub generator skipped constructor + } + + // Generated from `System.UriFormatException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + public UriFormatException(string textString, System.Exception e) => throw null; + public UriFormatException(string textString) => throw null; + public UriFormatException() => throw null; + protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) => throw null; + } + + // Generated from `System.UriHostNameType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UriHostNameType + { + Basic, + Dns, + IPv4, + IPv6, + Unknown, + // Stub generator skipped constructor + } + + // Generated from `System.UriKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UriKind + { + Absolute, + Relative, + RelativeOrAbsolute, + // Stub generator skipped constructor + } + + // Generated from `System.UriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class UriParser + { + protected virtual string GetComponents(System.Uri uri, System.UriComponents components, System.UriFormat format) => throw null; + protected virtual void InitializeAndValidate(System.Uri uri, out System.UriFormatException parsingError) => throw null; + protected virtual bool IsBaseOf(System.Uri baseUri, System.Uri relativeUri) => throw null; + public static bool IsKnownScheme(string schemeName) => throw null; + protected virtual bool IsWellFormedOriginalString(System.Uri uri) => throw null; + protected virtual System.UriParser OnNewUri() => throw null; + protected virtual void OnRegister(string schemeName, int defaultPort) => throw null; + public static void Register(System.UriParser uriParser, string schemeName, int defaultPort) => throw null; + protected virtual string Resolve(System.Uri baseUri, System.Uri relativeUri, out System.UriFormatException parsingError) => throw null; + protected UriParser() => throw null; + } + + // Generated from `System.UriPartial` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UriPartial + { + Authority, + Path, + Query, + Scheme, + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable, System.IComparable, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo(System.ValueTuple other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public static System.ValueTuple Create(T1 item1) => throw null; + public static System.ValueTuple Create() => throw null; + public static (T1, T2, T3, T4, T5, T6, T7, T8) Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8) => throw null; + public static (T1, T2, T3, T4, T5, T6, T7) Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) => throw null; + public static (T1, T2, T3, T4, T5, T6) Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) => throw null; + public static (T1, T2, T3, T4, T5) Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) => throw null; + public static (T1, T2, T3, T4) Create(T1 item1, T2 item2, T3 item3, T4 item4) => throw null; + public static (T1, T2, T3) Create(T1 item1, T2 item2, T3 item3) => throw null; + public static (T1, T2) Create(T1 item1, T2 item2) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.ValueTuple other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable>, System.IComparable>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable where TRest : struct + { + public int CompareTo(System.ValueTuple other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.ValueTuple other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + public T4 Item4; + public T5 Item5; + public T6 Item6; + public T7 Item7; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public TRest Rest; + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2, T3, T4, T5, T6, T7)>, System.IComparable<(T1, T2, T3, T4, T5, T6, T7)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2, T3, T4, T5, T6, T7) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2, T3, T4, T5, T6, T7) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + public T4 Item4; + public T5 Item5; + public T6 Item6; + public T7 Item7; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2, T3, T4, T5, T6)>, System.IComparable<(T1, T2, T3, T4, T5, T6)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2, T3, T4, T5, T6) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2, T3, T4, T5, T6) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + public T4 Item4; + public T5 Item5; + public T6 Item6; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2, T3, T4, T5)>, System.IComparable<(T1, T2, T3, T4, T5)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2, T3, T4, T5) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2, T3, T4, T5) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + public T4 Item4; + public T5 Item5; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2, T3, T4)>, System.IComparable<(T1, T2, T3, T4)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2, T3, T4) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2, T3, T4) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + public T4 Item4; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2, T3)>, System.IComparable<(T1, T2, T3)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2, T3) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2, T3) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + public T3 Item3; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2, T3 item3) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable<(T1, T2)>, System.IComparable<(T1, T2)>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo((T1, T2) other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals((T1, T2) other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + public T2 Item2; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1, T2 item2) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueTuple<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTuple : System.Runtime.CompilerServices.ITuple, System.IEquatable>, System.IComparable>, System.IComparable, System.Collections.IStructuralEquatable, System.Collections.IStructuralComparable + { + public int CompareTo(System.ValueTuple other) => throw null; + int System.IComparable.CompareTo(object other) => throw null; + int System.Collections.IStructuralComparable.CompareTo(object other, System.Collections.IComparer comparer) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.ValueTuple other) => throw null; + bool System.Collections.IStructuralEquatable.Equals(object other, System.Collections.IEqualityComparer comparer) => throw null; + public override int GetHashCode() => throw null; + int System.Collections.IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer) => throw null; + object System.Runtime.CompilerServices.ITuple.this[int index] { get => throw null; } + public T1 Item1; + int System.Runtime.CompilerServices.ITuple.Length { get => throw null; } + public override string ToString() => throw null; + public ValueTuple(T1 item1) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.ValueType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ValueType + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + protected ValueType() => throw null; + } + + // Generated from `System.Version` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Version : System.IEquatable, System.IComparable, System.IComparable, System.ICloneable + { + public static bool operator !=(System.Version v1, System.Version v2) => throw null; + public static bool operator <(System.Version v1, System.Version v2) => throw null; + public static bool operator <=(System.Version v1, System.Version v2) => throw null; + public static bool operator ==(System.Version v1, System.Version v2) => throw null; + public static bool operator >(System.Version v1, System.Version v2) => throw null; + public static bool operator >=(System.Version v1, System.Version v2) => throw null; + public int Build { get => throw null; } + public object Clone() => throw null; + public int CompareTo(object version) => throw null; + public int CompareTo(System.Version value) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Version obj) => throw null; + public override int GetHashCode() => throw null; + public int Major { get => throw null; } + public System.Int16 MajorRevision { get => throw null; } + public int Minor { get => throw null; } + public System.Int16 MinorRevision { get => throw null; } + public static System.Version Parse(string input) => throw null; + public static System.Version Parse(System.ReadOnlySpan input) => throw null; + public int Revision { get => throw null; } + public string ToString(int fieldCount) => throw null; + public override string ToString() => throw null; + public bool TryFormat(System.Span destination, out int charsWritten) => throw null; + public bool TryFormat(System.Span destination, int fieldCount, out int charsWritten) => throw null; + public static bool TryParse(string input, out System.Version result) => throw null; + public static bool TryParse(System.ReadOnlySpan input, out System.Version result) => throw null; + public Version(string version) => throw null; + public Version(int major, int minor, int build, int revision) => throw null; + public Version(int major, int minor, int build) => throw null; + public Version(int major, int minor) => throw null; + public Version() => throw null; + } + + // Generated from `System.Void` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Void + { + } + + // Generated from `System.WeakReference` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WeakReference : System.Runtime.Serialization.ISerializable + { + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual bool IsAlive { get => throw null; } + public virtual object Target { get => throw null; set => throw null; } + public virtual bool TrackResurrection { get => throw null; } + public WeakReference(object target, bool trackResurrection) => throw null; + public WeakReference(object target) => throw null; + protected WeakReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + // ERR: Stub generator didn't handle member: ~WeakReference + } + + // Generated from `System.WeakReference<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WeakReference : System.Runtime.Serialization.ISerializable where T : class + { + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public void SetTarget(T target) => throw null; + public bool TryGetTarget(out T target) => throw null; + public WeakReference(T target, bool trackResurrection) => throw null; + public WeakReference(T target) => throw null; + // ERR: Stub generator didn't handle member: ~WeakReference + } + + namespace Buffers + { + // Generated from `System.Buffers.ArrayPool<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ArrayPool + { + protected ArrayPool() => throw null; + public static System.Buffers.ArrayPool Create(int maxArrayLength, int maxArraysPerBucket) => throw null; + public static System.Buffers.ArrayPool Create() => throw null; + public abstract T[] Rent(int minimumLength); + public abstract void Return(T[] array, bool clearArray = default(bool)); + public static System.Buffers.ArrayPool Shared { get => throw null; } + } + + // Generated from `System.Buffers.IMemoryOwner<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IMemoryOwner : System.IDisposable + { + System.Memory Memory { get; } + } + + // Generated from `System.Buffers.IPinnable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IPinnable + { + System.Buffers.MemoryHandle Pin(int elementIndex); + void Unpin(); + } + + // Generated from `System.Buffers.MemoryHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct MemoryHandle : System.IDisposable + { + public void Dispose() => throw null; + unsafe public MemoryHandle(void* pointer, System.Runtime.InteropServices.GCHandle handle = default(System.Runtime.InteropServices.GCHandle), System.Buffers.IPinnable pinnable = default(System.Buffers.IPinnable)) => throw null; + // Stub generator skipped constructor + unsafe public void* Pointer { get => throw null; } + } + + // Generated from `System.Buffers.MemoryManager<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MemoryManager : System.IDisposable, System.Buffers.IPinnable, System.Buffers.IMemoryOwner + { + protected System.Memory CreateMemory(int start, int length) => throw null; + protected System.Memory CreateMemory(int length) => throw null; + void System.IDisposable.Dispose() => throw null; + protected abstract void Dispose(bool disposing); + public abstract System.Span GetSpan(); + public virtual System.Memory Memory { get => throw null; } + protected MemoryManager() => throw null; + public abstract System.Buffers.MemoryHandle Pin(int elementIndex = default(int)); + protected internal virtual bool TryGetArray(out System.ArraySegment segment) => throw null; + public abstract void Unpin(); + } + + // Generated from `System.Buffers.OperationStatus` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OperationStatus + { + DestinationTooSmall, + Done, + InvalidData, + NeedMoreData, + // Stub generator skipped constructor + } + + // Generated from `System.Buffers.ReadOnlySpanAction<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ReadOnlySpanAction(System.ReadOnlySpan span, TArg arg); + + // Generated from `System.Buffers.SpanAction<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SpanAction(System.Span span, TArg arg); + + } + namespace CodeDom + { + namespace Compiler + { + // Generated from `System.CodeDom.Compiler.GeneratedCodeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GeneratedCodeAttribute : System.Attribute + { + public GeneratedCodeAttribute(string tool, string version) => throw null; + public string Tool { get => throw null; } + public string Version { get => throw null; } + } + + // Generated from `System.CodeDom.Compiler.IndentedTextWriter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IndentedTextWriter : System.IO.TextWriter + { + public override void Close() => throw null; + public const string DefaultTabString = default; + public override System.Text.Encoding Encoding { get => throw null; } + public override void Flush() => throw null; + public int Indent { get => throw null; set => throw null; } + public IndentedTextWriter(System.IO.TextWriter writer, string tabString) => throw null; + public IndentedTextWriter(System.IO.TextWriter writer) => throw null; + public System.IO.TextWriter InnerWriter { get => throw null; } + public override string NewLine { get => throw null; set => throw null; } + protected virtual void OutputTabs() => throw null; + public override void Write(string s) => throw null; + public override void Write(string format, params object[] arg) => throw null; + public override void Write(string format, object arg0, object arg1) => throw null; + public override void Write(string format, object arg0) => throw null; + public override void Write(object value) => throw null; + public override void Write(int value) => throw null; + public override void Write(float value) => throw null; + public override void Write(double value) => throw null; + public override void Write(bool value) => throw null; + public override void Write(System.Int64 value) => throw null; + public override void Write(System.Char[] buffer, int index, int count) => throw null; + public override void Write(System.Char[] buffer) => throw null; + public override void Write(System.Char value) => throw null; + public override void WriteLine(string s) => throw null; + public override void WriteLine(string format, params object[] arg) => throw null; + public override void WriteLine(string format, object arg0, object arg1) => throw null; + public override void WriteLine(string format, object arg0) => throw null; + public override void WriteLine(object value) => throw null; + public override void WriteLine(int value) => throw null; + public override void WriteLine(float value) => throw null; + public override void WriteLine(double value) => throw null; + public override void WriteLine(bool value) => throw null; + public override void WriteLine(System.UInt32 value) => throw null; + public override void WriteLine(System.Int64 value) => throw null; + public override void WriteLine(System.Char[] buffer, int index, int count) => throw null; + public override void WriteLine(System.Char[] buffer) => throw null; + public override void WriteLine(System.Char value) => throw null; + public override void WriteLine() => throw null; + public void WriteLineNoTabs(string s) => throw null; + } + + } + } + namespace Collections + { + // Generated from `System.Collections.ArrayList` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ArrayList : System.ICloneable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection + { + public static System.Collections.ArrayList Adapter(System.Collections.IList list) => throw null; + public virtual int Add(object value) => throw null; + public virtual void AddRange(System.Collections.ICollection c) => throw null; + public ArrayList(int capacity) => throw null; + public ArrayList(System.Collections.ICollection c) => throw null; + public ArrayList() => throw null; + public virtual int BinarySearch(object value, System.Collections.IComparer comparer) => throw null; + public virtual int BinarySearch(object value) => throw null; + public virtual int BinarySearch(int index, int count, object value, System.Collections.IComparer comparer) => throw null; + public virtual int Capacity { get => throw null; set => throw null; } + public virtual void Clear() => throw null; + public virtual object Clone() => throw null; + public virtual bool Contains(object item) => throw null; + public virtual void CopyTo(int index, System.Array array, int arrayIndex, int count) => throw null; + public virtual void CopyTo(System.Array array, int arrayIndex) => throw null; + public virtual void CopyTo(System.Array array) => throw null; + public virtual int Count { get => throw null; } + public static System.Collections.IList FixedSize(System.Collections.IList list) => throw null; + public static System.Collections.ArrayList FixedSize(System.Collections.ArrayList list) => throw null; + public virtual System.Collections.IEnumerator GetEnumerator(int index, int count) => throw null; + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual System.Collections.ArrayList GetRange(int index, int count) => throw null; + public virtual int IndexOf(object value, int startIndex, int count) => throw null; + public virtual int IndexOf(object value, int startIndex) => throw null; + public virtual int IndexOf(object value) => throw null; + public virtual void Insert(int index, object value) => throw null; + public virtual void InsertRange(int index, System.Collections.ICollection c) => throw null; + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public virtual bool IsSynchronized { get => throw null; } + public virtual object this[int index] { get => throw null; set => throw null; } + public virtual int LastIndexOf(object value, int startIndex, int count) => throw null; + public virtual int LastIndexOf(object value, int startIndex) => throw null; + public virtual int LastIndexOf(object value) => throw null; + public static System.Collections.IList ReadOnly(System.Collections.IList list) => throw null; + public static System.Collections.ArrayList ReadOnly(System.Collections.ArrayList list) => throw null; + public virtual void Remove(object obj) => throw null; + public virtual void RemoveAt(int index) => throw null; + public virtual void RemoveRange(int index, int count) => throw null; + public static System.Collections.ArrayList Repeat(object value, int count) => throw null; + public virtual void Reverse(int index, int count) => throw null; + public virtual void Reverse() => throw null; + public virtual void SetRange(int index, System.Collections.ICollection c) => throw null; + public virtual void Sort(int index, int count, System.Collections.IComparer comparer) => throw null; + public virtual void Sort(System.Collections.IComparer comparer) => throw null; + public virtual void Sort() => throw null; + public virtual object SyncRoot { get => throw null; } + public static System.Collections.IList Synchronized(System.Collections.IList list) => throw null; + public static System.Collections.ArrayList Synchronized(System.Collections.ArrayList list) => throw null; + public virtual object[] ToArray() => throw null; + public virtual System.Array ToArray(System.Type type) => throw null; + public virtual void TrimToSize() => throw null; + } + + // Generated from `System.Collections.Comparer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Comparer : System.Runtime.Serialization.ISerializable, System.Collections.IComparer + { + public int Compare(object a, object b) => throw null; + public Comparer(System.Globalization.CultureInfo culture) => throw null; + public static System.Collections.Comparer Default; + public static System.Collections.Comparer DefaultInvariant; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Collections.DictionaryEntry` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DictionaryEntry + { + public void Deconstruct(out object key, out object value) => throw null; + public DictionaryEntry(object key, object value) => throw null; + // Stub generator skipped constructor + public object Key { get => throw null; set => throw null; } + public object Value { get => throw null; set => throw null; } + } + + // Generated from `System.Collections.Hashtable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Hashtable : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.ICloneable, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public virtual void Add(object key, object value) => throw null; + public virtual void Clear() => throw null; + public virtual object Clone() => throw null; + public virtual bool Contains(object key) => throw null; + public virtual bool ContainsKey(object key) => throw null; + public virtual bool ContainsValue(object value) => throw null; + public virtual void CopyTo(System.Array array, int arrayIndex) => throw null; + public virtual int Count { get => throw null; } + protected System.Collections.IEqualityComparer EqualityComparer { get => throw null; } + public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + protected virtual int GetHash(object key) => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public Hashtable(int capacity, float loadFactor, System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer) => throw null; + public Hashtable(int capacity, float loadFactor, System.Collections.IEqualityComparer equalityComparer) => throw null; + public Hashtable(int capacity, float loadFactor) => throw null; + public Hashtable(int capacity, System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer) => throw null; + public Hashtable(int capacity, System.Collections.IEqualityComparer equalityComparer) => throw null; + public Hashtable(int capacity) => throw null; + public Hashtable(System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer) => throw null; + public Hashtable(System.Collections.IEqualityComparer equalityComparer) => throw null; + public Hashtable(System.Collections.IDictionary d, float loadFactor, System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer) => throw null; + public Hashtable(System.Collections.IDictionary d, float loadFactor, System.Collections.IEqualityComparer equalityComparer) => throw null; + public Hashtable(System.Collections.IDictionary d, float loadFactor) => throw null; + public Hashtable(System.Collections.IDictionary d, System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer) => throw null; + public Hashtable(System.Collections.IDictionary d, System.Collections.IEqualityComparer equalityComparer) => throw null; + public Hashtable(System.Collections.IDictionary d) => throw null; + public Hashtable() => throw null; + protected Hashtable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public virtual bool IsSynchronized { get => throw null; } + public virtual object this[object key] { get => throw null; set => throw null; } + protected virtual bool KeyEquals(object item, object key) => throw null; + public virtual System.Collections.ICollection Keys { get => throw null; } + public virtual void OnDeserialization(object sender) => throw null; + public virtual void Remove(object key) => throw null; + public virtual object SyncRoot { get => throw null; } + public static System.Collections.Hashtable Synchronized(System.Collections.Hashtable table) => throw null; + public virtual System.Collections.ICollection Values { get => throw null; } + protected System.Collections.IComparer comparer { get => throw null; set => throw null; } + protected System.Collections.IHashCodeProvider hcp { get => throw null; set => throw null; } + } + + // Generated from `System.Collections.ICollection` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICollection : System.Collections.IEnumerable + { + void CopyTo(System.Array array, int index); + int Count { get; } + bool IsSynchronized { get; } + object SyncRoot { get; } + } + + // Generated from `System.Collections.IComparer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComparer + { + int Compare(object x, object y); + } + + // Generated from `System.Collections.IDictionary` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDictionary : System.Collections.IEnumerable, System.Collections.ICollection + { + void Add(object key, object value); + void Clear(); + bool Contains(object key); + System.Collections.IDictionaryEnumerator GetEnumerator(); + bool IsFixedSize { get; } + bool IsReadOnly { get; } + object this[object key] { get; set; } + System.Collections.ICollection Keys { get; } + void Remove(object key); + System.Collections.ICollection Values { get; } + } + + // Generated from `System.Collections.IDictionaryEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDictionaryEnumerator : System.Collections.IEnumerator + { + System.Collections.DictionaryEntry Entry { get; } + object Key { get; } + object Value { get; } + } + + // Generated from `System.Collections.IEnumerable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumerable + { + System.Collections.IEnumerator GetEnumerator(); + } + + // Generated from `System.Collections.IEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumerator + { + object Current { get; } + bool MoveNext(); + void Reset(); + } + + // Generated from `System.Collections.IEqualityComparer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEqualityComparer + { + bool Equals(object x, object y); + int GetHashCode(object obj); + } + + // Generated from `System.Collections.IHashCodeProvider` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IHashCodeProvider + { + int GetHashCode(object obj); + } + + // Generated from `System.Collections.IList` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IList : System.Collections.IEnumerable, System.Collections.ICollection + { + int Add(object value); + void Clear(); + bool Contains(object value); + int IndexOf(object value); + void Insert(int index, object value); + bool IsFixedSize { get; } + bool IsReadOnly { get; } + object this[int index] { get; set; } + void Remove(object value); + void RemoveAt(int index); + } + + // Generated from `System.Collections.IStructuralComparable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStructuralComparable + { + int CompareTo(object other, System.Collections.IComparer comparer); + } + + // Generated from `System.Collections.IStructuralEquatable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStructuralEquatable + { + bool Equals(object other, System.Collections.IEqualityComparer comparer); + int GetHashCode(System.Collections.IEqualityComparer comparer); + } + + namespace Generic + { + // Generated from `System.Collections.Generic.IAsyncEnumerable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAsyncEnumerable + { + System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `System.Collections.Generic.IAsyncEnumerator<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAsyncEnumerator : System.IAsyncDisposable + { + T Current { get; } + System.Threading.Tasks.ValueTask MoveNextAsync(); + } + + // Generated from `System.Collections.Generic.ICollection<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + void Add(T item); + void Clear(); + bool Contains(T item); + void CopyTo(T[] array, int arrayIndex); + int Count { get; } + bool IsReadOnly { get; } + bool Remove(T item); + } + + // Generated from `System.Collections.Generic.IComparer<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IComparer + { + int Compare(T x, T y); + } + + // Generated from `System.Collections.Generic.IDictionary<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.ICollection> + { + void Add(TKey key, TValue value); + bool ContainsKey(TKey key); + TValue this[TKey key] { get; set; } + System.Collections.Generic.ICollection Keys { get; } + bool Remove(TKey key); + bool TryGetValue(TKey key, out TValue value); + System.Collections.Generic.ICollection Values { get; } + } + + // Generated from `System.Collections.Generic.IEnumerable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumerable : System.Collections.IEnumerable + { + System.Collections.Generic.IEnumerator GetEnumerator(); + } + + // Generated from `System.Collections.Generic.IEnumerator<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEnumerator : System.IDisposable, System.Collections.IEnumerator + { + T Current { get; } + } + + // Generated from `System.Collections.Generic.IEqualityComparer<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IEqualityComparer + { + bool Equals(T x, T y); + int GetHashCode(T obj); + } + + // Generated from `System.Collections.Generic.IList<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IList : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + int IndexOf(T item); + void Insert(int index, T item); + T this[int index] { get; set; } + void RemoveAt(int index); + } + + // Generated from `System.Collections.Generic.IReadOnlyCollection<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReadOnlyCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + int Count { get; } + } + + // Generated from `System.Collections.Generic.IReadOnlyDictionary<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReadOnlyDictionary : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable> + { + bool ContainsKey(TKey key); + TValue this[TKey key] { get; } + System.Collections.Generic.IEnumerable Keys { get; } + bool TryGetValue(TKey key, out TValue value); + System.Collections.Generic.IEnumerable Values { get; } + } + + // Generated from `System.Collections.Generic.IReadOnlyList<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReadOnlyList : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + T this[int index] { get; } + } + + // Generated from `System.Collections.Generic.IReadOnlySet<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReadOnlySet : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable + { + bool Contains(T item); + bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other); + bool IsSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsSupersetOf(System.Collections.Generic.IEnumerable other); + bool Overlaps(System.Collections.Generic.IEnumerable other); + bool SetEquals(System.Collections.Generic.IEnumerable other); + } + + // Generated from `System.Collections.Generic.ISet<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISet : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + bool Add(T item); + void ExceptWith(System.Collections.Generic.IEnumerable other); + void IntersectWith(System.Collections.Generic.IEnumerable other); + bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other); + bool IsSubsetOf(System.Collections.Generic.IEnumerable other); + bool IsSupersetOf(System.Collections.Generic.IEnumerable other); + bool Overlaps(System.Collections.Generic.IEnumerable other); + bool SetEquals(System.Collections.Generic.IEnumerable other); + void SymmetricExceptWith(System.Collections.Generic.IEnumerable other); + void UnionWith(System.Collections.Generic.IEnumerable other); + } + + // Generated from `System.Collections.Generic.KeyNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeyNotFoundException : System.SystemException + { + public KeyNotFoundException(string message, System.Exception innerException) => throw null; + public KeyNotFoundException(string message) => throw null; + public KeyNotFoundException() => throw null; + protected KeyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Collections.Generic.KeyValuePair` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class KeyValuePair + { + public static System.Collections.Generic.KeyValuePair Create(TKey key, TValue value) => throw null; + } + + // Generated from `System.Collections.Generic.KeyValuePair<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct KeyValuePair + { + public void Deconstruct(out TKey key, out TValue value) => throw null; + public TKey Key { get => throw null; } + public KeyValuePair(TKey key, TValue value) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + public TValue Value { get => throw null; } + } + + } + namespace ObjectModel + { + // Generated from `System.Collections.ObjectModel.Collection<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Collection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void Clear() => throw null; + protected virtual void ClearItems() => throw null; + public Collection(System.Collections.Generic.IList list) => throw null; + public Collection() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + protected virtual void InsertItem(int index, T item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + protected System.Collections.Generic.IList Items { get => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public void RemoveAt(int index) => throw null; + protected virtual void RemoveItem(int index) => throw null; + protected virtual void SetItem(int index, T item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Collections.ObjectModel.ReadOnlyCollection<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReadOnlyCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T value) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public bool Contains(T value) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(T[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public int IndexOf(T value) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, T value) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public T this[int index] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + T System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + protected System.Collections.Generic.IList Items { get => throw null; } + public ReadOnlyCollection(System.Collections.Generic.IList list) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + bool System.Collections.Generic.ICollection.Remove(T value) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + } + } + namespace ComponentModel + { + // Generated from `System.ComponentModel.DefaultValueAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultValueAttribute : System.Attribute + { + public DefaultValueAttribute(string value) => throw null; + public DefaultValueAttribute(object value) => throw null; + public DefaultValueAttribute(int value) => throw null; + public DefaultValueAttribute(float value) => throw null; + public DefaultValueAttribute(double value) => throw null; + public DefaultValueAttribute(bool value) => throw null; + public DefaultValueAttribute(System.UInt64 value) => throw null; + public DefaultValueAttribute(System.UInt32 value) => throw null; + public DefaultValueAttribute(System.UInt16 value) => throw null; + public DefaultValueAttribute(System.Type type, string value) => throw null; + public DefaultValueAttribute(System.SByte value) => throw null; + public DefaultValueAttribute(System.Int64 value) => throw null; + public DefaultValueAttribute(System.Int16 value) => throw null; + public DefaultValueAttribute(System.Char value) => throw null; + public DefaultValueAttribute(System.Byte value) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + protected void SetValue(object value) => throw null; + public virtual object Value { get => throw null; } + } + + // Generated from `System.ComponentModel.EditorBrowsableAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EditorBrowsableAttribute : System.Attribute + { + public EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState state) => throw null; + public EditorBrowsableAttribute() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public System.ComponentModel.EditorBrowsableState State { get => throw null; } + } + + // Generated from `System.ComponentModel.EditorBrowsableState` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EditorBrowsableState + { + Advanced, + Always, + // Stub generator skipped constructor + Never, + } + + } + namespace Configuration + { + namespace Assemblies + { + // Generated from `System.Configuration.Assemblies.AssemblyHashAlgorithm` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AssemblyHashAlgorithm + { + // Stub generator skipped constructor + MD5, + None, + SHA1, + SHA256, + SHA384, + SHA512, + } + + // Generated from `System.Configuration.Assemblies.AssemblyVersionCompatibility` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AssemblyVersionCompatibility + { + // Stub generator skipped constructor + SameDomain, + SameMachine, + SameProcess, + } + + } + } + namespace Diagnostics + { + // Generated from `System.Diagnostics.ConditionalAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConditionalAttribute : System.Attribute + { + public string ConditionString { get => throw null; } + public ConditionalAttribute(string conditionString) => throw null; + } + + // Generated from `System.Diagnostics.Debug` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Debug + { + public static void Assert(bool condition, string message, string detailMessageFormat, params object[] args) => throw null; + public static void Assert(bool condition, string message, string detailMessage) => throw null; + public static void Assert(bool condition, string message) => throw null; + public static void Assert(bool condition) => throw null; + public static bool AutoFlush { get => throw null; set => throw null; } + public static void Close() => throw null; + public static void Fail(string message, string detailMessage) => throw null; + public static void Fail(string message) => throw null; + public static void Flush() => throw null; + public static void Indent() => throw null; + public static int IndentLevel { get => throw null; set => throw null; } + public static int IndentSize { get => throw null; set => throw null; } + public static void Print(string message) => throw null; + public static void Print(string format, params object[] args) => throw null; + public static void Unindent() => throw null; + public static void Write(string message, string category) => throw null; + public static void Write(string message) => throw null; + public static void Write(object value, string category) => throw null; + public static void Write(object value) => throw null; + public static void WriteIf(bool condition, string message, string category) => throw null; + public static void WriteIf(bool condition, string message) => throw null; + public static void WriteIf(bool condition, object value, string category) => throw null; + public static void WriteIf(bool condition, object value) => throw null; + public static void WriteLine(string message, string category) => throw null; + public static void WriteLine(string message) => throw null; + public static void WriteLine(string format, params object[] args) => throw null; + public static void WriteLine(object value, string category) => throw null; + public static void WriteLine(object value) => throw null; + public static void WriteLineIf(bool condition, string message, string category) => throw null; + public static void WriteLineIf(bool condition, string message) => throw null; + public static void WriteLineIf(bool condition, object value, string category) => throw null; + public static void WriteLineIf(bool condition, object value) => throw null; + } + + // Generated from `System.Diagnostics.DebuggableAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggableAttribute : System.Attribute + { + public DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled) => throw null; + public DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes modes) => throw null; + public System.Diagnostics.DebuggableAttribute.DebuggingModes DebuggingFlags { get => throw null; } + // Generated from `System.Diagnostics.DebuggableAttribute.DebuggingModes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DebuggingModes + { + // Stub generator skipped constructor + Default, + DisableOptimizations, + EnableEditAndContinue, + IgnoreSymbolStoreSequencePoints, + None, + } + + + public bool IsJITOptimizerDisabled { get => throw null; } + public bool IsJITTrackingEnabled { get => throw null; } + } + + // Generated from `System.Diagnostics.Debugger` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Debugger + { + public static void Break() => throw null; + public static string DefaultCategory; + public static bool IsAttached { get => throw null; } + public static bool IsLogging() => throw null; + public static bool Launch() => throw null; + public static void Log(int level, string category, string message) => throw null; + public static void NotifyOfCrossThreadDependency() => throw null; + } + + // Generated from `System.Diagnostics.DebuggerBrowsableAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerBrowsableAttribute : System.Attribute + { + public DebuggerBrowsableAttribute(System.Diagnostics.DebuggerBrowsableState state) => throw null; + public System.Diagnostics.DebuggerBrowsableState State { get => throw null; } + } + + // Generated from `System.Diagnostics.DebuggerBrowsableState` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DebuggerBrowsableState + { + Collapsed, + // Stub generator skipped constructor + Never, + RootHidden, + } + + // Generated from `System.Diagnostics.DebuggerDisplayAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerDisplayAttribute : System.Attribute + { + public DebuggerDisplayAttribute(string value) => throw null; + public string Name { get => throw null; set => throw null; } + public System.Type Target { get => throw null; set => throw null; } + public string TargetTypeName { get => throw null; set => throw null; } + public string Type { get => throw null; set => throw null; } + public string Value { get => throw null; } + } + + // Generated from `System.Diagnostics.DebuggerHiddenAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerHiddenAttribute : System.Attribute + { + public DebuggerHiddenAttribute() => throw null; + } + + // Generated from `System.Diagnostics.DebuggerNonUserCodeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerNonUserCodeAttribute : System.Attribute + { + public DebuggerNonUserCodeAttribute() => throw null; + } + + // Generated from `System.Diagnostics.DebuggerStepThroughAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerStepThroughAttribute : System.Attribute + { + public DebuggerStepThroughAttribute() => throw null; + } + + // Generated from `System.Diagnostics.DebuggerStepperBoundaryAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerStepperBoundaryAttribute : System.Attribute + { + public DebuggerStepperBoundaryAttribute() => throw null; + } + + // Generated from `System.Diagnostics.DebuggerTypeProxyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerTypeProxyAttribute : System.Attribute + { + public DebuggerTypeProxyAttribute(string typeName) => throw null; + public DebuggerTypeProxyAttribute(System.Type type) => throw null; + public string ProxyTypeName { get => throw null; } + public System.Type Target { get => throw null; set => throw null; } + public string TargetTypeName { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.DebuggerVisualizerAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DebuggerVisualizerAttribute : System.Attribute + { + public DebuggerVisualizerAttribute(string visualizerTypeName, string visualizerObjectSourceTypeName) => throw null; + public DebuggerVisualizerAttribute(string visualizerTypeName, System.Type visualizerObjectSource) => throw null; + public DebuggerVisualizerAttribute(string visualizerTypeName) => throw null; + public DebuggerVisualizerAttribute(System.Type visualizer, string visualizerObjectSourceTypeName) => throw null; + public DebuggerVisualizerAttribute(System.Type visualizer, System.Type visualizerObjectSource) => throw null; + public DebuggerVisualizerAttribute(System.Type visualizer) => throw null; + public string Description { get => throw null; set => throw null; } + public System.Type Target { get => throw null; set => throw null; } + public string TargetTypeName { get => throw null; set => throw null; } + public string VisualizerObjectSourceTypeName { get => throw null; } + public string VisualizerTypeName { get => throw null; } + } + + // Generated from `System.Diagnostics.Stopwatch` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Stopwatch + { + public System.TimeSpan Elapsed { get => throw null; } + public System.Int64 ElapsedMilliseconds { get => throw null; } + public System.Int64 ElapsedTicks { get => throw null; } + public static System.Int64 Frequency; + public static System.Int64 GetTimestamp() => throw null; + public static bool IsHighResolution; + public bool IsRunning { get => throw null; } + public void Reset() => throw null; + public void Restart() => throw null; + public void Start() => throw null; + public static System.Diagnostics.Stopwatch StartNew() => throw null; + public void Stop() => throw null; + public Stopwatch() => throw null; + } + + namespace CodeAnalysis + { + // Generated from `System.Diagnostics.CodeAnalysis.AllowNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class AllowNullAttribute : System.Attribute + { + public AllowNullAttribute() => throw null; + } + + // Generated from `System.Diagnostics.CodeAnalysis.DisallowNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class DisallowNullAttribute : System.Attribute + { + public DisallowNullAttribute() => throw null; + } + + // Generated from `System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class DoesNotReturnAttribute : System.Attribute + { + public DoesNotReturnAttribute() => throw null; + } + + // Generated from `System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class DoesNotReturnIfAttribute : System.Attribute + { + public DoesNotReturnIfAttribute(bool parameterValue) => throw null; + public bool ParameterValue { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DynamicDependencyAttribute : System.Attribute + { + public string AssemblyName { get => throw null; } + public string Condition { get => throw null; set => throw null; } + public DynamicDependencyAttribute(string memberSignature, string typeName, string assemblyName) => throw null; + public DynamicDependencyAttribute(string memberSignature, System.Type type) => throw null; + public DynamicDependencyAttribute(string memberSignature) => throw null; + public DynamicDependencyAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes memberTypes, string typeName, string assemblyName) => throw null; + public DynamicDependencyAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes memberTypes, System.Type type) => throw null; + public string MemberSignature { get => throw null; } + public System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberTypes { get => throw null; } + public System.Type Type { get => throw null; } + public string TypeName { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DynamicallyAccessedMemberTypes + { + All, + // Stub generator skipped constructor + NonPublicConstructors, + NonPublicEvents, + NonPublicFields, + NonPublicMethods, + NonPublicNestedTypes, + NonPublicProperties, + None, + PublicConstructors, + PublicEvents, + PublicFields, + PublicMethods, + PublicNestedTypes, + PublicParameterlessConstructor, + PublicProperties, + } + + // Generated from `System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Hosting.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class DynamicallyAccessedMembersAttribute : System.Attribute + { + public DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes memberTypes) => throw null; + public System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberTypes { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExcludeFromCodeCoverageAttribute : System.Attribute + { + public ExcludeFromCodeCoverageAttribute() => throw null; + public string Justification { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.MaybeNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class MaybeNullAttribute : System.Attribute + { + public MaybeNullAttribute() => throw null; + } + + // Generated from `System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class MaybeNullWhenAttribute : System.Attribute + { + public MaybeNullWhenAttribute(bool returnValue) => throw null; + public bool ReturnValue { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.MemberNotNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class MemberNotNullAttribute : System.Attribute + { + public MemberNotNullAttribute(string member) => throw null; + public MemberNotNullAttribute(params string[] members) => throw null; + public string[] Members { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class MemberNotNullWhenAttribute : System.Attribute + { + public MemberNotNullWhenAttribute(bool returnValue, string member) => throw null; + public MemberNotNullWhenAttribute(bool returnValue, params string[] members) => throw null; + public string[] Members { get => throw null; } + public bool ReturnValue { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.NotNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class NotNullAttribute : System.Attribute + { + public NotNullAttribute() => throw null; + } + + // Generated from `System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class NotNullIfNotNullAttribute : System.Attribute + { + public NotNullIfNotNullAttribute(string parameterName) => throw null; + public string ParameterName { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.NotNullWhenAttribute` in `Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class NotNullWhenAttribute : System.Attribute + { + public NotNullWhenAttribute(bool returnValue) => throw null; + public bool ReturnValue { get => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RequiresUnreferencedCodeAttribute : System.Attribute + { + public string Message { get => throw null; } + public RequiresUnreferencedCodeAttribute(string message) => throw null; + public string Url { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.SuppressMessageAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SuppressMessageAttribute : System.Attribute + { + public string Category { get => throw null; } + public string CheckId { get => throw null; } + public string Justification { get => throw null; set => throw null; } + public string MessageId { get => throw null; set => throw null; } + public string Scope { get => throw null; set => throw null; } + public SuppressMessageAttribute(string category, string checkId) => throw null; + public string Target { get => throw null; set => throw null; } + } + + // Generated from `System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnconditionalSuppressMessageAttribute : System.Attribute + { + public string Category { get => throw null; } + public string CheckId { get => throw null; } + public string Justification { get => throw null; set => throw null; } + public string MessageId { get => throw null; set => throw null; } + public string Scope { get => throw null; set => throw null; } + public string Target { get => throw null; set => throw null; } + public UnconditionalSuppressMessageAttribute(string category, string checkId) => throw null; + } + + } + } + namespace Globalization + { + // Generated from `System.Globalization.Calendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Calendar : System.ICloneable + { + public virtual System.DateTime AddDays(System.DateTime time, int days) => throw null; + public virtual System.DateTime AddHours(System.DateTime time, int hours) => throw null; + public virtual System.DateTime AddMilliseconds(System.DateTime time, double milliseconds) => throw null; + public virtual System.DateTime AddMinutes(System.DateTime time, int minutes) => throw null; + public abstract System.DateTime AddMonths(System.DateTime time, int months); + public virtual System.DateTime AddSeconds(System.DateTime time, int seconds) => throw null; + public virtual System.DateTime AddWeeks(System.DateTime time, int weeks) => throw null; + public abstract System.DateTime AddYears(System.DateTime time, int years); + public virtual System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + protected Calendar() => throw null; + public virtual object Clone() => throw null; + public const int CurrentEra = default; + protected virtual int DaysInYearBeforeMinSupportedYear { get => throw null; } + public abstract int[] Eras { get; } + public abstract int GetDayOfMonth(System.DateTime time); + public abstract System.DayOfWeek GetDayOfWeek(System.DateTime time); + public abstract int GetDayOfYear(System.DateTime time); + public virtual int GetDaysInMonth(int year, int month) => throw null; + public abstract int GetDaysInMonth(int year, int month, int era); + public virtual int GetDaysInYear(int year) => throw null; + public abstract int GetDaysInYear(int year, int era); + public abstract int GetEra(System.DateTime time); + public virtual int GetHour(System.DateTime time) => throw null; + public virtual int GetLeapMonth(int year, int era) => throw null; + public virtual int GetLeapMonth(int year) => throw null; + public virtual double GetMilliseconds(System.DateTime time) => throw null; + public virtual int GetMinute(System.DateTime time) => throw null; + public abstract int GetMonth(System.DateTime time); + public virtual int GetMonthsInYear(int year) => throw null; + public abstract int GetMonthsInYear(int year, int era); + public virtual int GetSecond(System.DateTime time) => throw null; + public virtual int GetWeekOfYear(System.DateTime time, System.Globalization.CalendarWeekRule rule, System.DayOfWeek firstDayOfWeek) => throw null; + public abstract int GetYear(System.DateTime time); + public virtual bool IsLeapDay(int year, int month, int day) => throw null; + public abstract bool IsLeapDay(int year, int month, int day, int era); + public virtual bool IsLeapMonth(int year, int month) => throw null; + public abstract bool IsLeapMonth(int year, int month, int era); + public virtual bool IsLeapYear(int year) => throw null; + public abstract bool IsLeapYear(int year, int era); + public bool IsReadOnly { get => throw null; } + public virtual System.DateTime MaxSupportedDateTime { get => throw null; } + public virtual System.DateTime MinSupportedDateTime { get => throw null; } + public static System.Globalization.Calendar ReadOnly(System.Globalization.Calendar calendar) => throw null; + public virtual System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond) => throw null; + public abstract System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era); + public virtual int ToFourDigitYear(int year) => throw null; + public virtual int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.CalendarAlgorithmType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CalendarAlgorithmType + { + // Stub generator skipped constructor + LunarCalendar, + LunisolarCalendar, + SolarCalendar, + Unknown, + } + + // Generated from `System.Globalization.CalendarWeekRule` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CalendarWeekRule + { + // Stub generator skipped constructor + FirstDay, + FirstFourDayWeek, + FirstFullWeek, + } + + // Generated from `System.Globalization.CharUnicodeInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CharUnicodeInfo + { + public static int GetDecimalDigitValue(string s, int index) => throw null; + public static int GetDecimalDigitValue(System.Char ch) => throw null; + public static int GetDigitValue(string s, int index) => throw null; + public static int GetDigitValue(System.Char ch) => throw null; + public static double GetNumericValue(string s, int index) => throw null; + public static double GetNumericValue(System.Char ch) => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(string s, int index) => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(int codePoint) => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(System.Char ch) => throw null; + } + + // Generated from `System.Globalization.ChineseLunisolarCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ChineseLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar + { + public const int ChineseEra = default; + public ChineseLunisolarCalendar() => throw null; + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetEra(System.DateTime time) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + } + + // Generated from `System.Globalization.CompareInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompareInfo : System.Runtime.Serialization.IDeserializationCallback + { + public int Compare(string string1, string string2, System.Globalization.CompareOptions options) => throw null; + public int Compare(string string1, string string2) => throw null; + public int Compare(string string1, int offset1, string string2, int offset2, System.Globalization.CompareOptions options) => throw null; + public int Compare(string string1, int offset1, string string2, int offset2) => throw null; + public int Compare(string string1, int offset1, int length1, string string2, int offset2, int length2, System.Globalization.CompareOptions options) => throw null; + public int Compare(string string1, int offset1, int length1, string string2, int offset2, int length2) => throw null; + public int Compare(System.ReadOnlySpan string1, System.ReadOnlySpan string2, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public override bool Equals(object value) => throw null; + public static System.Globalization.CompareInfo GetCompareInfo(string name, System.Reflection.Assembly assembly) => throw null; + public static System.Globalization.CompareInfo GetCompareInfo(string name) => throw null; + public static System.Globalization.CompareInfo GetCompareInfo(int culture, System.Reflection.Assembly assembly) => throw null; + public static System.Globalization.CompareInfo GetCompareInfo(int culture) => throw null; + public override int GetHashCode() => throw null; + public int GetHashCode(string source, System.Globalization.CompareOptions options) => throw null; + public int GetHashCode(System.ReadOnlySpan source, System.Globalization.CompareOptions options) => throw null; + public int GetSortKey(System.ReadOnlySpan source, System.Span destination, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public System.Globalization.SortKey GetSortKey(string source, System.Globalization.CompareOptions options) => throw null; + public System.Globalization.SortKey GetSortKey(string source) => throw null; + public int GetSortKeyLength(System.ReadOnlySpan source, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public int IndexOf(string source, string value, int startIndex, int count, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, string value, int startIndex, int count) => throw null; + public int IndexOf(string source, string value, int startIndex, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, string value, int startIndex) => throw null; + public int IndexOf(string source, string value, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, string value) => throw null; + public int IndexOf(string source, System.Char value, int startIndex, int count, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, System.Char value, int startIndex, int count) => throw null; + public int IndexOf(string source, System.Char value, int startIndex, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, System.Char value, int startIndex) => throw null; + public int IndexOf(string source, System.Char value, System.Globalization.CompareOptions options) => throw null; + public int IndexOf(string source, System.Char value) => throw null; + public int IndexOf(System.ReadOnlySpan source, System.Text.Rune value, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public int IndexOf(System.ReadOnlySpan source, System.ReadOnlySpan value, System.Globalization.CompareOptions options, out int matchLength) => throw null; + public int IndexOf(System.ReadOnlySpan source, System.ReadOnlySpan value, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public bool IsPrefix(string source, string prefix, System.Globalization.CompareOptions options) => throw null; + public bool IsPrefix(string source, string prefix) => throw null; + public bool IsPrefix(System.ReadOnlySpan source, System.ReadOnlySpan prefix, System.Globalization.CompareOptions options, out int matchLength) => throw null; + public bool IsPrefix(System.ReadOnlySpan source, System.ReadOnlySpan prefix, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public static bool IsSortable(string text) => throw null; + public static bool IsSortable(System.Text.Rune value) => throw null; + public static bool IsSortable(System.ReadOnlySpan text) => throw null; + public static bool IsSortable(System.Char ch) => throw null; + public bool IsSuffix(string source, string suffix, System.Globalization.CompareOptions options) => throw null; + public bool IsSuffix(string source, string suffix) => throw null; + public bool IsSuffix(System.ReadOnlySpan source, System.ReadOnlySpan suffix, System.Globalization.CompareOptions options, out int matchLength) => throw null; + public bool IsSuffix(System.ReadOnlySpan source, System.ReadOnlySpan suffix, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public int LCID { get => throw null; } + public int LastIndexOf(string source, string value, int startIndex, int count, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, string value, int startIndex, int count) => throw null; + public int LastIndexOf(string source, string value, int startIndex, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, string value, int startIndex) => throw null; + public int LastIndexOf(string source, string value, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, string value) => throw null; + public int LastIndexOf(string source, System.Char value, int startIndex, int count, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, System.Char value, int startIndex, int count) => throw null; + public int LastIndexOf(string source, System.Char value, int startIndex, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, System.Char value, int startIndex) => throw null; + public int LastIndexOf(string source, System.Char value, System.Globalization.CompareOptions options) => throw null; + public int LastIndexOf(string source, System.Char value) => throw null; + public int LastIndexOf(System.ReadOnlySpan source, System.Text.Rune value, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public int LastIndexOf(System.ReadOnlySpan source, System.ReadOnlySpan value, System.Globalization.CompareOptions options, out int matchLength) => throw null; + public int LastIndexOf(System.ReadOnlySpan source, System.ReadOnlySpan value, System.Globalization.CompareOptions options = default(System.Globalization.CompareOptions)) => throw null; + public string Name { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public override string ToString() => throw null; + public System.Globalization.SortVersion Version { get => throw null; } + } + + // Generated from `System.Globalization.CompareOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CompareOptions + { + // Stub generator skipped constructor + IgnoreCase, + IgnoreKanaType, + IgnoreNonSpace, + IgnoreSymbols, + IgnoreWidth, + None, + Ordinal, + OrdinalIgnoreCase, + StringSort, + } + + // Generated from `System.Globalization.CultureInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CultureInfo : System.IFormatProvider, System.ICloneable + { + public virtual System.Globalization.Calendar Calendar { get => throw null; } + public void ClearCachedData() => throw null; + public virtual object Clone() => throw null; + public virtual System.Globalization.CompareInfo CompareInfo { get => throw null; } + public static System.Globalization.CultureInfo CreateSpecificCulture(string name) => throw null; + public CultureInfo(string name, bool useUserOverride) => throw null; + public CultureInfo(string name) => throw null; + public CultureInfo(int culture, bool useUserOverride) => throw null; + public CultureInfo(int culture) => throw null; + public System.Globalization.CultureTypes CultureTypes { get => throw null; } + public static System.Globalization.CultureInfo CurrentCulture { get => throw null; set => throw null; } + public static System.Globalization.CultureInfo CurrentUICulture { get => throw null; set => throw null; } + public virtual System.Globalization.DateTimeFormatInfo DateTimeFormat { get => throw null; set => throw null; } + public static System.Globalization.CultureInfo DefaultThreadCurrentCulture { get => throw null; set => throw null; } + public static System.Globalization.CultureInfo DefaultThreadCurrentUICulture { get => throw null; set => throw null; } + public virtual string DisplayName { get => throw null; } + public virtual string EnglishName { get => throw null; } + public override bool Equals(object value) => throw null; + public System.Globalization.CultureInfo GetConsoleFallbackUICulture() => throw null; + public static System.Globalization.CultureInfo GetCultureInfo(string name, string altName) => throw null; + public static System.Globalization.CultureInfo GetCultureInfo(string name, bool predefinedOnly) => throw null; + public static System.Globalization.CultureInfo GetCultureInfo(string name) => throw null; + public static System.Globalization.CultureInfo GetCultureInfo(int culture) => throw null; + public static System.Globalization.CultureInfo GetCultureInfoByIetfLanguageTag(string name) => throw null; + public static System.Globalization.CultureInfo[] GetCultures(System.Globalization.CultureTypes types) => throw null; + public virtual object GetFormat(System.Type formatType) => throw null; + public override int GetHashCode() => throw null; + public string IetfLanguageTag { get => throw null; } + public static System.Globalization.CultureInfo InstalledUICulture { get => throw null; } + public static System.Globalization.CultureInfo InvariantCulture { get => throw null; } + public virtual bool IsNeutralCulture { get => throw null; } + public bool IsReadOnly { get => throw null; } + public virtual int KeyboardLayoutId { get => throw null; } + public virtual int LCID { get => throw null; } + public virtual string Name { get => throw null; } + public virtual string NativeName { get => throw null; } + public virtual System.Globalization.NumberFormatInfo NumberFormat { get => throw null; set => throw null; } + public virtual System.Globalization.Calendar[] OptionalCalendars { get => throw null; } + public virtual System.Globalization.CultureInfo Parent { get => throw null; } + public static System.Globalization.CultureInfo ReadOnly(System.Globalization.CultureInfo ci) => throw null; + public virtual System.Globalization.TextInfo TextInfo { get => throw null; } + public virtual string ThreeLetterISOLanguageName { get => throw null; } + public virtual string ThreeLetterWindowsLanguageName { get => throw null; } + public override string ToString() => throw null; + public virtual string TwoLetterISOLanguageName { get => throw null; } + public bool UseUserOverride { get => throw null; } + } + + // Generated from `System.Globalization.CultureNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CultureNotFoundException : System.ArgumentException + { + public CultureNotFoundException(string paramName, string message) => throw null; + public CultureNotFoundException(string paramName, string invalidCultureName, string message) => throw null; + public CultureNotFoundException(string paramName, int invalidCultureId, string message) => throw null; + public CultureNotFoundException(string message, string invalidCultureName, System.Exception innerException) => throw null; + public CultureNotFoundException(string message, int invalidCultureId, System.Exception innerException) => throw null; + public CultureNotFoundException(string message, System.Exception innerException) => throw null; + public CultureNotFoundException(string message) => throw null; + public CultureNotFoundException() => throw null; + protected CultureNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual int? InvalidCultureId { get => throw null; } + public virtual string InvalidCultureName { get => throw null; } + public override string Message { get => throw null; } + } + + // Generated from `System.Globalization.CultureTypes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CultureTypes + { + AllCultures, + // Stub generator skipped constructor + FrameworkCultures, + InstalledWin32Cultures, + NeutralCultures, + ReplacementCultures, + SpecificCultures, + UserCustomCulture, + WindowsOnlyCultures, + } + + // Generated from `System.Globalization.DateTimeFormatInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateTimeFormatInfo : System.IFormatProvider, System.ICloneable + { + public string AMDesignator { get => throw null; set => throw null; } + public string[] AbbreviatedDayNames { get => throw null; set => throw null; } + public string[] AbbreviatedMonthGenitiveNames { get => throw null; set => throw null; } + public string[] AbbreviatedMonthNames { get => throw null; set => throw null; } + public System.Globalization.Calendar Calendar { get => throw null; set => throw null; } + public System.Globalization.CalendarWeekRule CalendarWeekRule { get => throw null; set => throw null; } + public object Clone() => throw null; + public static System.Globalization.DateTimeFormatInfo CurrentInfo { get => throw null; } + public string DateSeparator { get => throw null; set => throw null; } + public DateTimeFormatInfo() => throw null; + public string[] DayNames { get => throw null; set => throw null; } + public System.DayOfWeek FirstDayOfWeek { get => throw null; set => throw null; } + public string FullDateTimePattern { get => throw null; set => throw null; } + public string GetAbbreviatedDayName(System.DayOfWeek dayofweek) => throw null; + public string GetAbbreviatedEraName(int era) => throw null; + public string GetAbbreviatedMonthName(int month) => throw null; + public string[] GetAllDateTimePatterns(System.Char format) => throw null; + public string[] GetAllDateTimePatterns() => throw null; + public string GetDayName(System.DayOfWeek dayofweek) => throw null; + public int GetEra(string eraName) => throw null; + public string GetEraName(int era) => throw null; + public object GetFormat(System.Type formatType) => throw null; + public static System.Globalization.DateTimeFormatInfo GetInstance(System.IFormatProvider provider) => throw null; + public string GetMonthName(int month) => throw null; + public string GetShortestDayName(System.DayOfWeek dayOfWeek) => throw null; + public static System.Globalization.DateTimeFormatInfo InvariantInfo { get => throw null; } + public bool IsReadOnly { get => throw null; } + public string LongDatePattern { get => throw null; set => throw null; } + public string LongTimePattern { get => throw null; set => throw null; } + public string MonthDayPattern { get => throw null; set => throw null; } + public string[] MonthGenitiveNames { get => throw null; set => throw null; } + public string[] MonthNames { get => throw null; set => throw null; } + public string NativeCalendarName { get => throw null; } + public string PMDesignator { get => throw null; set => throw null; } + public string RFC1123Pattern { get => throw null; } + public static System.Globalization.DateTimeFormatInfo ReadOnly(System.Globalization.DateTimeFormatInfo dtfi) => throw null; + public void SetAllDateTimePatterns(string[] patterns, System.Char format) => throw null; + public string ShortDatePattern { get => throw null; set => throw null; } + public string ShortTimePattern { get => throw null; set => throw null; } + public string[] ShortestDayNames { get => throw null; set => throw null; } + public string SortableDateTimePattern { get => throw null; } + public string TimeSeparator { get => throw null; set => throw null; } + public string UniversalSortableDateTimePattern { get => throw null; } + public string YearMonthPattern { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.DateTimeStyles` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum DateTimeStyles + { + AdjustToUniversal, + AllowInnerWhite, + AllowLeadingWhite, + AllowTrailingWhite, + AllowWhiteSpaces, + AssumeLocal, + AssumeUniversal, + // Stub generator skipped constructor + NoCurrentDateDefault, + None, + RoundtripKind, + } + + // Generated from `System.Globalization.DaylightTime` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DaylightTime + { + public DaylightTime(System.DateTime start, System.DateTime end, System.TimeSpan delta) => throw null; + public System.TimeSpan Delta { get => throw null; } + public System.DateTime End { get => throw null; } + public System.DateTime Start { get => throw null; } + } + + // Generated from `System.Globalization.DigitShapes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DigitShapes + { + Context, + // Stub generator skipped constructor + NativeNational, + None, + } + + // Generated from `System.Globalization.EastAsianLunisolarCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EastAsianLunisolarCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + internal EastAsianLunisolarCalendar() => throw null; + public int GetCelestialStem(int sexagenaryYear) => throw null; + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public virtual int GetSexagenaryYear(System.DateTime time) => throw null; + public int GetTerrestrialBranch(int sexagenaryYear) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.GlobalizationExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class GlobalizationExtensions + { + public static System.StringComparer GetStringComparer(this System.Globalization.CompareInfo compareInfo, System.Globalization.CompareOptions options) => throw null; + } + + // Generated from `System.Globalization.GregorianCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GregorianCalendar : System.Globalization.Calendar + { + public const int ADEra = default; + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public virtual System.Globalization.GregorianCalendarTypes CalendarType { get => throw null; set => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public GregorianCalendar(System.Globalization.GregorianCalendarTypes type) => throw null; + public GregorianCalendar() => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.GregorianCalendarTypes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GregorianCalendarTypes + { + Arabic, + // Stub generator skipped constructor + Localized, + MiddleEastFrench, + TransliteratedEnglish, + TransliteratedFrench, + USEnglish, + } + + // Generated from `System.Globalization.HebrewCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HebrewCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public HebrewCalendar() => throw null; + public static int HebrewEra; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.HijriCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HijriCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public int HijriAdjustment { get => throw null; set => throw null; } + public HijriCalendar() => throw null; + public static int HijriEra; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.ISOWeek` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ISOWeek + { + public static int GetWeekOfYear(System.DateTime date) => throw null; + public static int GetWeeksInYear(int year) => throw null; + public static int GetYear(System.DateTime date) => throw null; + public static System.DateTime GetYearEnd(int year) => throw null; + public static System.DateTime GetYearStart(int year) => throw null; + public static System.DateTime ToDateTime(int year, int week, System.DayOfWeek dayOfWeek) => throw null; + } + + // Generated from `System.Globalization.IdnMapping` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IdnMapping + { + public bool AllowUnassigned { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public string GetAscii(string unicode, int index, int count) => throw null; + public string GetAscii(string unicode, int index) => throw null; + public string GetAscii(string unicode) => throw null; + public override int GetHashCode() => throw null; + public string GetUnicode(string ascii, int index, int count) => throw null; + public string GetUnicode(string ascii, int index) => throw null; + public string GetUnicode(string ascii) => throw null; + public IdnMapping() => throw null; + public bool UseStd3AsciiRules { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.JapaneseCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class JapaneseCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetWeekOfYear(System.DateTime time, System.Globalization.CalendarWeekRule rule, System.DayOfWeek firstDayOfWeek) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public JapaneseCalendar() => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.JapaneseLunisolarCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class JapaneseLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar + { + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetEra(System.DateTime time) => throw null; + public const int JapaneseEra = default; + public JapaneseLunisolarCalendar() => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + } + + // Generated from `System.Globalization.JulianCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class JulianCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public JulianCalendar() => throw null; + public static int JulianEra; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.KoreanCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KoreanCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetWeekOfYear(System.DateTime time, System.Globalization.CalendarWeekRule rule, System.DayOfWeek firstDayOfWeek) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public KoreanCalendar() => throw null; + public const int KoreanEra = default; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.KoreanLunisolarCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KoreanLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar + { + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetEra(System.DateTime time) => throw null; + public const int GregorianEra = default; + public KoreanLunisolarCalendar() => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + } + + // Generated from `System.Globalization.NumberFormatInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NumberFormatInfo : System.IFormatProvider, System.ICloneable + { + public object Clone() => throw null; + public int CurrencyDecimalDigits { get => throw null; set => throw null; } + public string CurrencyDecimalSeparator { get => throw null; set => throw null; } + public string CurrencyGroupSeparator { get => throw null; set => throw null; } + public int[] CurrencyGroupSizes { get => throw null; set => throw null; } + public int CurrencyNegativePattern { get => throw null; set => throw null; } + public int CurrencyPositivePattern { get => throw null; set => throw null; } + public string CurrencySymbol { get => throw null; set => throw null; } + public static System.Globalization.NumberFormatInfo CurrentInfo { get => throw null; } + public System.Globalization.DigitShapes DigitSubstitution { get => throw null; set => throw null; } + public object GetFormat(System.Type formatType) => throw null; + public static System.Globalization.NumberFormatInfo GetInstance(System.IFormatProvider formatProvider) => throw null; + public static System.Globalization.NumberFormatInfo InvariantInfo { get => throw null; } + public bool IsReadOnly { get => throw null; } + public string NaNSymbol { get => throw null; set => throw null; } + public string[] NativeDigits { get => throw null; set => throw null; } + public string NegativeInfinitySymbol { get => throw null; set => throw null; } + public string NegativeSign { get => throw null; set => throw null; } + public int NumberDecimalDigits { get => throw null; set => throw null; } + public string NumberDecimalSeparator { get => throw null; set => throw null; } + public NumberFormatInfo() => throw null; + public string NumberGroupSeparator { get => throw null; set => throw null; } + public int[] NumberGroupSizes { get => throw null; set => throw null; } + public int NumberNegativePattern { get => throw null; set => throw null; } + public string PerMilleSymbol { get => throw null; set => throw null; } + public int PercentDecimalDigits { get => throw null; set => throw null; } + public string PercentDecimalSeparator { get => throw null; set => throw null; } + public string PercentGroupSeparator { get => throw null; set => throw null; } + public int[] PercentGroupSizes { get => throw null; set => throw null; } + public int PercentNegativePattern { get => throw null; set => throw null; } + public int PercentPositivePattern { get => throw null; set => throw null; } + public string PercentSymbol { get => throw null; set => throw null; } + public string PositiveInfinitySymbol { get => throw null; set => throw null; } + public string PositiveSign { get => throw null; set => throw null; } + public static System.Globalization.NumberFormatInfo ReadOnly(System.Globalization.NumberFormatInfo nfi) => throw null; + } + + // Generated from `System.Globalization.NumberStyles` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum NumberStyles + { + AllowCurrencySymbol, + AllowDecimalPoint, + AllowExponent, + AllowHexSpecifier, + AllowLeadingSign, + AllowLeadingWhite, + AllowParentheses, + AllowThousands, + AllowTrailingSign, + AllowTrailingWhite, + Any, + Currency, + Float, + HexNumber, + Integer, + None, + Number, + // Stub generator skipped constructor + } + + // Generated from `System.Globalization.PersianCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PersianCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public PersianCalendar() => throw null; + public static int PersianEra; + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.RegionInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegionInfo + { + public virtual string CurrencyEnglishName { get => throw null; } + public virtual string CurrencyNativeName { get => throw null; } + public virtual string CurrencySymbol { get => throw null; } + public static System.Globalization.RegionInfo CurrentRegion { get => throw null; } + public virtual string DisplayName { get => throw null; } + public virtual string EnglishName { get => throw null; } + public override bool Equals(object value) => throw null; + public virtual int GeoId { get => throw null; } + public override int GetHashCode() => throw null; + public virtual string ISOCurrencySymbol { get => throw null; } + public virtual bool IsMetric { get => throw null; } + public virtual string Name { get => throw null; } + public virtual string NativeName { get => throw null; } + public RegionInfo(string name) => throw null; + public RegionInfo(int culture) => throw null; + public virtual string ThreeLetterISORegionName { get => throw null; } + public virtual string ThreeLetterWindowsRegionName { get => throw null; } + public override string ToString() => throw null; + public virtual string TwoLetterISORegionName { get => throw null; } + } + + // Generated from `System.Globalization.SortKey` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortKey + { + public static int Compare(System.Globalization.SortKey sortkey1, System.Globalization.SortKey sortkey2) => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public System.Byte[] KeyData { get => throw null; } + public string OriginalString { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Globalization.SortVersion` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SortVersion : System.IEquatable + { + public static bool operator !=(System.Globalization.SortVersion left, System.Globalization.SortVersion right) => throw null; + public static bool operator ==(System.Globalization.SortVersion left, System.Globalization.SortVersion right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Globalization.SortVersion other) => throw null; + public int FullVersion { get => throw null; } + public override int GetHashCode() => throw null; + public System.Guid SortId { get => throw null; } + public SortVersion(int fullVersion, System.Guid sortId) => throw null; + } + + // Generated from `System.Globalization.StringInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringInfo + { + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public static string GetNextTextElement(string str, int index) => throw null; + public static string GetNextTextElement(string str) => throw null; + public static System.Globalization.TextElementEnumerator GetTextElementEnumerator(string str, int index) => throw null; + public static System.Globalization.TextElementEnumerator GetTextElementEnumerator(string str) => throw null; + public int LengthInTextElements { get => throw null; } + public static int[] ParseCombiningCharacters(string str) => throw null; + public string String { get => throw null; set => throw null; } + public StringInfo(string value) => throw null; + public StringInfo() => throw null; + public string SubstringByTextElements(int startingTextElement, int lengthInTextElements) => throw null; + public string SubstringByTextElements(int startingTextElement) => throw null; + } + + // Generated from `System.Globalization.TaiwanCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaiwanCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetWeekOfYear(System.DateTime time, System.Globalization.CalendarWeekRule rule, System.DayOfWeek firstDayOfWeek) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public TaiwanCalendar() => throw null; + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.TaiwanLunisolarCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaiwanLunisolarCalendar : System.Globalization.EastAsianLunisolarCalendar + { + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetEra(System.DateTime time) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public TaiwanLunisolarCalendar() => throw null; + } + + // Generated from `System.Globalization.TextElementEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TextElementEnumerator : System.Collections.IEnumerator + { + public object Current { get => throw null; } + public int ElementIndex { get => throw null; } + public string GetTextElement() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Globalization.TextInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TextInfo : System.Runtime.Serialization.IDeserializationCallback, System.ICloneable + { + public int ANSICodePage { get => throw null; } + public object Clone() => throw null; + public string CultureName { get => throw null; } + public int EBCDICCodePage { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsRightToLeft { get => throw null; } + public int LCID { get => throw null; } + public string ListSeparator { get => throw null; set => throw null; } + public int MacCodePage { get => throw null; } + public int OEMCodePage { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public static System.Globalization.TextInfo ReadOnly(System.Globalization.TextInfo textInfo) => throw null; + public string ToLower(string str) => throw null; + public System.Char ToLower(System.Char c) => throw null; + public override string ToString() => throw null; + public string ToTitleCase(string str) => throw null; + public string ToUpper(string str) => throw null; + public System.Char ToUpper(System.Char c) => throw null; + } + + // Generated from `System.Globalization.ThaiBuddhistCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThaiBuddhistCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetWeekOfYear(System.DateTime time, System.Globalization.CalendarWeekRule rule, System.DayOfWeek firstDayOfWeek) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public ThaiBuddhistCalendar() => throw null; + public const int ThaiBuddhistEra = default; + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + } + + // Generated from `System.Globalization.TimeSpanStyles` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TimeSpanStyles + { + AssumeNegative, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Globalization.UmAlQuraCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UmAlQuraCalendar : System.Globalization.Calendar + { + public override System.DateTime AddMonths(System.DateTime time, int months) => throw null; + public override System.DateTime AddYears(System.DateTime time, int years) => throw null; + public override System.Globalization.CalendarAlgorithmType AlgorithmType { get => throw null; } + protected override int DaysInYearBeforeMinSupportedYear { get => throw null; } + public override int[] Eras { get => throw null; } + public override int GetDayOfMonth(System.DateTime time) => throw null; + public override System.DayOfWeek GetDayOfWeek(System.DateTime time) => throw null; + public override int GetDayOfYear(System.DateTime time) => throw null; + public override int GetDaysInMonth(int year, int month, int era) => throw null; + public override int GetDaysInYear(int year, int era) => throw null; + public override int GetEra(System.DateTime time) => throw null; + public override int GetLeapMonth(int year, int era) => throw null; + public override int GetMonth(System.DateTime time) => throw null; + public override int GetMonthsInYear(int year, int era) => throw null; + public override int GetYear(System.DateTime time) => throw null; + public override bool IsLeapDay(int year, int month, int day, int era) => throw null; + public override bool IsLeapMonth(int year, int month, int era) => throw null; + public override bool IsLeapYear(int year, int era) => throw null; + public override System.DateTime MaxSupportedDateTime { get => throw null; } + public override System.DateTime MinSupportedDateTime { get => throw null; } + public override System.DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era) => throw null; + public override int ToFourDigitYear(int year) => throw null; + public override int TwoDigitYearMax { get => throw null; set => throw null; } + public UmAlQuraCalendar() => throw null; + public const int UmAlQuraEra = default; + } + + // Generated from `System.Globalization.UnicodeCategory` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UnicodeCategory + { + ClosePunctuation, + ConnectorPunctuation, + Control, + CurrencySymbol, + DashPunctuation, + DecimalDigitNumber, + EnclosingMark, + FinalQuotePunctuation, + Format, + InitialQuotePunctuation, + LetterNumber, + LineSeparator, + LowercaseLetter, + MathSymbol, + ModifierLetter, + ModifierSymbol, + NonSpacingMark, + OpenPunctuation, + OtherLetter, + OtherNotAssigned, + OtherNumber, + OtherPunctuation, + OtherSymbol, + ParagraphSeparator, + PrivateUse, + SpaceSeparator, + SpacingCombiningMark, + Surrogate, + TitlecaseLetter, + // Stub generator skipped constructor + UppercaseLetter, + } + + } + namespace IO + { + // Generated from `System.IO.BinaryReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BinaryReader : System.IDisposable + { + public virtual System.IO.Stream BaseStream { get => throw null; } + public BinaryReader(System.IO.Stream input, System.Text.Encoding encoding, bool leaveOpen) => throw null; + public BinaryReader(System.IO.Stream input, System.Text.Encoding encoding) => throw null; + public BinaryReader(System.IO.Stream input) => throw null; + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected virtual void FillBuffer(int numBytes) => throw null; + public virtual int PeekChar() => throw null; + public virtual int Read(System.Span buffer) => throw null; + public virtual int Read(System.Span buffer) => throw null; + public virtual int Read(System.Char[] buffer, int index, int count) => throw null; + public virtual int Read(System.Byte[] buffer, int index, int count) => throw null; + public virtual int Read() => throw null; + public int Read7BitEncodedInt() => throw null; + public System.Int64 Read7BitEncodedInt64() => throw null; + public virtual bool ReadBoolean() => throw null; + public virtual System.Byte ReadByte() => throw null; + public virtual System.Byte[] ReadBytes(int count) => throw null; + public virtual System.Char ReadChar() => throw null; + public virtual System.Char[] ReadChars(int count) => throw null; + public virtual System.Decimal ReadDecimal() => throw null; + public virtual double ReadDouble() => throw null; + public virtual System.Int16 ReadInt16() => throw null; + public virtual int ReadInt32() => throw null; + public virtual System.Int64 ReadInt64() => throw null; + public virtual System.SByte ReadSByte() => throw null; + public virtual float ReadSingle() => throw null; + public virtual string ReadString() => throw null; + public virtual System.UInt16 ReadUInt16() => throw null; + public virtual System.UInt32 ReadUInt32() => throw null; + public virtual System.UInt64 ReadUInt64() => throw null; + } + + // Generated from `System.IO.BinaryWriter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BinaryWriter : System.IDisposable, System.IAsyncDisposable + { + public virtual System.IO.Stream BaseStream { get => throw null; } + public BinaryWriter(System.IO.Stream output, System.Text.Encoding encoding, bool leaveOpen) => throw null; + public BinaryWriter(System.IO.Stream output, System.Text.Encoding encoding) => throw null; + public BinaryWriter(System.IO.Stream output) => throw null; + protected BinaryWriter() => throw null; + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public virtual void Flush() => throw null; + public static System.IO.BinaryWriter Null; + protected System.IO.Stream OutStream; + public virtual System.Int64 Seek(int offset, System.IO.SeekOrigin origin) => throw null; + public virtual void Write(string value) => throw null; + public virtual void Write(int value) => throw null; + public virtual void Write(float value) => throw null; + public virtual void Write(double value) => throw null; + public virtual void Write(bool value) => throw null; + public virtual void Write(System.UInt64 value) => throw null; + public virtual void Write(System.UInt32 value) => throw null; + public virtual void Write(System.UInt16 value) => throw null; + public virtual void Write(System.SByte value) => throw null; + public virtual void Write(System.ReadOnlySpan chars) => throw null; + public virtual void Write(System.ReadOnlySpan buffer) => throw null; + public virtual void Write(System.Int64 value) => throw null; + public virtual void Write(System.Int16 value) => throw null; + public virtual void Write(System.Decimal value) => throw null; + public virtual void Write(System.Char[] chars, int index, int count) => throw null; + public virtual void Write(System.Char[] chars) => throw null; + public virtual void Write(System.Char ch) => throw null; + public virtual void Write(System.Byte[] buffer, int index, int count) => throw null; + public virtual void Write(System.Byte[] buffer) => throw null; + public virtual void Write(System.Byte value) => throw null; + public void Write7BitEncodedInt(int value) => throw null; + public void Write7BitEncodedInt64(System.Int64 value) => throw null; + } + + // Generated from `System.IO.BufferedStream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BufferedStream : System.IO.Stream + { + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public int BufferSize { get => throw null; } + public BufferedStream(System.IO.Stream stream, int bufferSize) => throw null; + public BufferedStream(System.IO.Stream stream) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override void CopyTo(System.IO.Stream destination, int bufferSize) => throw null; + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span destination) => throw null; + public override int Read(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public System.IO.Stream UnderlyingStream { get => throw null; } + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + } + + // Generated from `System.IO.DirectoryNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DirectoryNotFoundException : System.IO.IOException + { + public DirectoryNotFoundException(string message, System.Exception innerException) => throw null; + public DirectoryNotFoundException(string message) => throw null; + public DirectoryNotFoundException() => throw null; + protected DirectoryNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.EndOfStreamException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EndOfStreamException : System.IO.IOException + { + public EndOfStreamException(string message, System.Exception innerException) => throw null; + public EndOfStreamException(string message) => throw null; + public EndOfStreamException() => throw null; + protected EndOfStreamException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.FileAccess` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FileAccess + { + // Stub generator skipped constructor + Read, + ReadWrite, + Write, + } + + // Generated from `System.IO.FileAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FileAttributes + { + Archive, + Compressed, + Device, + Directory, + Encrypted, + // Stub generator skipped constructor + Hidden, + IntegrityStream, + NoScrubData, + Normal, + NotContentIndexed, + Offline, + ReadOnly, + ReparsePoint, + SparseFile, + System, + Temporary, + } + + // Generated from `System.IO.FileLoadException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileLoadException : System.IO.IOException + { + public FileLoadException(string message, string fileName, System.Exception inner) => throw null; + public FileLoadException(string message, string fileName) => throw null; + public FileLoadException(string message, System.Exception inner) => throw null; + public FileLoadException(string message) => throw null; + public FileLoadException() => throw null; + protected FileLoadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string FileName { get => throw null; } + public string FusionLog { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.IO.FileMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FileMode + { + Append, + Create, + CreateNew, + // Stub generator skipped constructor + Open, + OpenOrCreate, + Truncate, + } + + // Generated from `System.IO.FileNotFoundException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileNotFoundException : System.IO.IOException + { + public string FileName { get => throw null; } + public FileNotFoundException(string message, string fileName, System.Exception innerException) => throw null; + public FileNotFoundException(string message, string fileName) => throw null; + public FileNotFoundException(string message, System.Exception innerException) => throw null; + public FileNotFoundException(string message) => throw null; + public FileNotFoundException() => throw null; + protected FileNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string FusionLog { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.IO.FileOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FileOptions + { + Asynchronous, + DeleteOnClose, + Encrypted, + // Stub generator skipped constructor + None, + RandomAccess, + SequentialScan, + WriteThrough, + } + + // Generated from `System.IO.FileShare` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FileShare + { + Delete, + // Stub generator skipped constructor + Inheritable, + None, + Read, + ReadWrite, + Write, + } + + // Generated from `System.IO.FileStream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FileStream : System.IO.Stream + { + public override System.IAsyncResult BeginRead(System.Byte[] array, int offset, int numBytes, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] array, int offset, int numBytes, System.AsyncCallback callback, object state) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, bool useAsync) => throw null; + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options) => throw null; + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize) => throw null; + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) => throw null; + public FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access) => throw null; + public FileStream(string path, System.IO.FileMode mode) => throw null; + public FileStream(System.IntPtr handle, System.IO.FileAccess access, bool ownsHandle, int bufferSize, bool isAsync) => throw null; + public FileStream(System.IntPtr handle, System.IO.FileAccess access, bool ownsHandle, int bufferSize) => throw null; + public FileStream(System.IntPtr handle, System.IO.FileAccess access, bool ownsHandle) => throw null; + public FileStream(System.IntPtr handle, System.IO.FileAccess access) => throw null; + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize, bool isAsync) => throw null; + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access, int bufferSize) => throw null; + public FileStream(Microsoft.Win32.SafeHandles.SafeFileHandle handle, System.IO.FileAccess access) => throw null; + public virtual void Flush(bool flushToDisk) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.IntPtr Handle { get => throw null; } + public virtual bool IsAsync { get => throw null; } + public override System.Int64 Length { get => throw null; } + public virtual void Lock(System.Int64 position, System.Int64 length) => throw null; + public virtual string Name { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public virtual Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle { get => throw null; } + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public virtual void Unlock(System.Int64 position, System.Int64 length) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Byte[] array, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + // ERR: Stub generator didn't handle member: ~FileStream + } + + // Generated from `System.IO.HandleInheritability` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum HandleInheritability + { + // Stub generator skipped constructor + Inheritable, + None, + } + + // Generated from `System.IO.IOException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IOException : System.SystemException + { + public IOException(string message, int hresult) => throw null; + public IOException(string message, System.Exception innerException) => throw null; + public IOException(string message) => throw null; + public IOException() => throw null; + protected IOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.InvalidDataException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidDataException : System.SystemException + { + public InvalidDataException(string message, System.Exception innerException) => throw null; + public InvalidDataException(string message) => throw null; + public InvalidDataException() => throw null; + } + + // Generated from `System.IO.MemoryStream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemoryStream : System.IO.Stream + { + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public virtual int Capacity { get => throw null; set => throw null; } + public override void CopyTo(System.IO.Stream destination, int bufferSize) => throw null; + public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Byte[] GetBuffer() => throw null; + public override System.Int64 Length { get => throw null; } + public MemoryStream(int capacity) => throw null; + public MemoryStream(System.Byte[] buffer, int index, int count, bool writable, bool publiclyVisible) => throw null; + public MemoryStream(System.Byte[] buffer, int index, int count, bool writable) => throw null; + public MemoryStream(System.Byte[] buffer, int index, int count) => throw null; + public MemoryStream(System.Byte[] buffer, bool writable) => throw null; + public MemoryStream(System.Byte[] buffer) => throw null; + public MemoryStream() => throw null; + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Span destination) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin loc) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public virtual System.Byte[] ToArray() => throw null; + public virtual bool TryGetBuffer(out System.ArraySegment buffer) => throw null; + public override void Write(System.ReadOnlySpan source) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + public virtual void WriteTo(System.IO.Stream stream) => throw null; + } + + // Generated from `System.IO.Path` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Path + { + public static System.Char AltDirectorySeparatorChar; + public static string ChangeExtension(string path, string extension) => throw null; + public static string Combine(string path1, string path2, string path3, string path4) => throw null; + public static string Combine(string path1, string path2, string path3) => throw null; + public static string Combine(string path1, string path2) => throw null; + public static string Combine(params string[] paths) => throw null; + public static System.Char DirectorySeparatorChar; + public static bool EndsInDirectorySeparator(string path) => throw null; + public static bool EndsInDirectorySeparator(System.ReadOnlySpan path) => throw null; + public static string GetDirectoryName(string path) => throw null; + public static System.ReadOnlySpan GetDirectoryName(System.ReadOnlySpan path) => throw null; + public static string GetExtension(string path) => throw null; + public static System.ReadOnlySpan GetExtension(System.ReadOnlySpan path) => throw null; + public static string GetFileName(string path) => throw null; + public static System.ReadOnlySpan GetFileName(System.ReadOnlySpan path) => throw null; + public static string GetFileNameWithoutExtension(string path) => throw null; + public static System.ReadOnlySpan GetFileNameWithoutExtension(System.ReadOnlySpan path) => throw null; + public static string GetFullPath(string path, string basePath) => throw null; + public static string GetFullPath(string path) => throw null; + public static System.Char[] GetInvalidFileNameChars() => throw null; + public static System.Char[] GetInvalidPathChars() => throw null; + public static string GetPathRoot(string path) => throw null; + public static System.ReadOnlySpan GetPathRoot(System.ReadOnlySpan path) => throw null; + public static string GetRandomFileName() => throw null; + public static string GetRelativePath(string relativeTo, string path) => throw null; + public static string GetTempFileName() => throw null; + public static string GetTempPath() => throw null; + public static bool HasExtension(string path) => throw null; + public static bool HasExtension(System.ReadOnlySpan path) => throw null; + public static System.Char[] InvalidPathChars; + public static bool IsPathFullyQualified(string path) => throw null; + public static bool IsPathFullyQualified(System.ReadOnlySpan path) => throw null; + public static bool IsPathRooted(string path) => throw null; + public static bool IsPathRooted(System.ReadOnlySpan path) => throw null; + public static string Join(string path1, string path2, string path3, string path4) => throw null; + public static string Join(string path1, string path2, string path3) => throw null; + public static string Join(string path1, string path2) => throw null; + public static string Join(params string[] paths) => throw null; + public static string Join(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.ReadOnlySpan path3, System.ReadOnlySpan path4) => throw null; + public static string Join(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.ReadOnlySpan path3) => throw null; + public static string Join(System.ReadOnlySpan path1, System.ReadOnlySpan path2) => throw null; + public static System.Char PathSeparator; + public static string TrimEndingDirectorySeparator(string path) => throw null; + public static System.ReadOnlySpan TrimEndingDirectorySeparator(System.ReadOnlySpan path) => throw null; + public static bool TryJoin(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.Span destination, out int charsWritten) => throw null; + public static bool TryJoin(System.ReadOnlySpan path1, System.ReadOnlySpan path2, System.ReadOnlySpan path3, System.Span destination, out int charsWritten) => throw null; + public static System.Char VolumeSeparatorChar; + } + + // Generated from `System.IO.PathTooLongException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PathTooLongException : System.IO.IOException + { + public PathTooLongException(string message, System.Exception innerException) => throw null; + public PathTooLongException(string message) => throw null; + public PathTooLongException() => throw null; + protected PathTooLongException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.IO.SeekOrigin` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SeekOrigin + { + Begin, + Current, + End, + // Stub generator skipped constructor + } + + // Generated from `System.IO.Stream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Stream : System.MarshalByRefObject, System.IDisposable, System.IAsyncDisposable + { + public virtual System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public virtual System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public abstract bool CanRead { get; } + public abstract bool CanSeek { get; } + public virtual bool CanTimeout { get => throw null; } + public abstract bool CanWrite { get; } + public virtual void Close() => throw null; + public void CopyTo(System.IO.Stream destination) => throw null; + public virtual void CopyTo(System.IO.Stream destination, int bufferSize) => throw null; + public virtual System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination) => throw null; + protected virtual System.Threading.WaitHandle CreateWaitHandle() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public virtual int EndRead(System.IAsyncResult asyncResult) => throw null; + public virtual void EndWrite(System.IAsyncResult asyncResult) => throw null; + public abstract void Flush(); + public virtual System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task FlushAsync() => throw null; + public abstract System.Int64 Length { get; } + public static System.IO.Stream Null; + protected virtual void ObjectInvariant() => throw null; + public abstract System.Int64 Position { get; set; } + public virtual int Read(System.Span buffer) => throw null; + public abstract int Read(System.Byte[] buffer, int offset, int count); + public virtual System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count) => throw null; + public virtual int ReadByte() => throw null; + public virtual int ReadTimeout { get => throw null; set => throw null; } + public abstract System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin); + public abstract void SetLength(System.Int64 value); + protected Stream() => throw null; + public static System.IO.Stream Synchronized(System.IO.Stream stream) => throw null; + public virtual void Write(System.ReadOnlySpan buffer) => throw null; + public abstract void Write(System.Byte[] buffer, int offset, int count); + public virtual System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count) => throw null; + public virtual void WriteByte(System.Byte value) => throw null; + public virtual int WriteTimeout { get => throw null; set => throw null; } + } + + // Generated from `System.IO.StreamReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StreamReader : System.IO.TextReader + { + public virtual System.IO.Stream BaseStream { get => throw null; } + public override void Close() => throw null; + public virtual System.Text.Encoding CurrentEncoding { get => throw null; } + public void DiscardBufferedData() => throw null; + protected override void Dispose(bool disposing) => throw null; + public bool EndOfStream { get => throw null; } + public static System.IO.StreamReader Null; + public override int Peek() => throw null; + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Char[] buffer, int index, int count) => throw null; + public override int Read() => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Char[] buffer, int index, int count) => throw null; + public override int ReadBlock(System.Span buffer) => throw null; + public override int ReadBlock(System.Char[] buffer, int index, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadBlockAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadBlockAsync(System.Char[] buffer, int index, int count) => throw null; + public override string ReadLine() => throw null; + public override System.Threading.Tasks.Task ReadLineAsync() => throw null; + public override string ReadToEnd() => throw null; + public override System.Threading.Tasks.Task ReadToEndAsync() => throw null; + public StreamReader(string path, bool detectEncodingFromByteOrderMarks) => throw null; + public StreamReader(string path, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize) => throw null; + public StreamReader(string path, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks) => throw null; + public StreamReader(string path, System.Text.Encoding encoding) => throw null; + public StreamReader(string path) => throw null; + public StreamReader(System.IO.Stream stream, bool detectEncodingFromByteOrderMarks) => throw null; + public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize) => throw null; + public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding, bool detectEncodingFromByteOrderMarks) => throw null; + public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public StreamReader(System.IO.Stream stream, System.Text.Encoding encoding = default(System.Text.Encoding), bool detectEncodingFromByteOrderMarks = default(bool), int bufferSize = default(int), bool leaveOpen = default(bool)) => throw null; + public StreamReader(System.IO.Stream stream) => throw null; + } + + // Generated from `System.IO.StreamWriter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StreamWriter : System.IO.TextWriter + { + public virtual bool AutoFlush { get => throw null; set => throw null; } + public virtual System.IO.Stream BaseStream { get => throw null; } + public override void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override System.Text.Encoding Encoding { get => throw null; } + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync() => throw null; + public static System.IO.StreamWriter Null; + public StreamWriter(string path, bool append, System.Text.Encoding encoding, int bufferSize) => throw null; + public StreamWriter(string path, bool append, System.Text.Encoding encoding) => throw null; + public StreamWriter(string path, bool append) => throw null; + public StreamWriter(string path) => throw null; + public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding, int bufferSize) => throw null; + public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding) => throw null; + public StreamWriter(System.IO.Stream stream, System.Text.Encoding encoding = default(System.Text.Encoding), int bufferSize = default(int), bool leaveOpen = default(bool)) => throw null; + public StreamWriter(System.IO.Stream stream) => throw null; + public override void Write(string value) => throw null; + public override void Write(string format, params object[] arg) => throw null; + public override void Write(string format, object arg0, object arg1, object arg2) => throw null; + public override void Write(string format, object arg0, object arg1) => throw null; + public override void Write(string format, object arg0) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Char[] buffer, int index, int count) => throw null; + public override void Write(System.Char[] buffer) => throw null; + public override void Write(System.Char value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(string value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char[] buffer, int index, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char value) => throw null; + public override void WriteLine(string value) => throw null; + public override void WriteLine(string format, params object[] arg) => throw null; + public override void WriteLine(string format, object arg0, object arg1, object arg2) => throw null; + public override void WriteLine(string format, object arg0, object arg1) => throw null; + public override void WriteLine(string format, object arg0) => throw null; + public override void WriteLine(System.ReadOnlySpan buffer) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(string value) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.Char[] buffer, int index, int count) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.Char value) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync() => throw null; + } + + // Generated from `System.IO.StringReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringReader : System.IO.TextReader + { + public override void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int Peek() => throw null; + public override int Read(System.Span buffer) => throw null; + public override int Read(System.Char[] buffer, int index, int count) => throw null; + public override int Read() => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Char[] buffer, int index, int count) => throw null; + public override int ReadBlock(System.Span buffer) => throw null; + public override System.Threading.Tasks.ValueTask ReadBlockAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadBlockAsync(System.Char[] buffer, int index, int count) => throw null; + public override string ReadLine() => throw null; + public override System.Threading.Tasks.Task ReadLineAsync() => throw null; + public override string ReadToEnd() => throw null; + public override System.Threading.Tasks.Task ReadToEndAsync() => throw null; + public StringReader(string s) => throw null; + } + + // Generated from `System.IO.StringWriter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringWriter : System.IO.TextWriter + { + public override void Close() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Text.Encoding Encoding { get => throw null; } + public override System.Threading.Tasks.Task FlushAsync() => throw null; + public virtual System.Text.StringBuilder GetStringBuilder() => throw null; + public StringWriter(System.Text.StringBuilder sb, System.IFormatProvider formatProvider) => throw null; + public StringWriter(System.Text.StringBuilder sb) => throw null; + public StringWriter(System.IFormatProvider formatProvider) => throw null; + public StringWriter() => throw null; + public override string ToString() => throw null; + public override void Write(string value) => throw null; + public override void Write(System.Text.StringBuilder value) => throw null; + public override void Write(System.ReadOnlySpan buffer) => throw null; + public override void Write(System.Char[] buffer, int index, int count) => throw null; + public override void Write(System.Char value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(string value) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char[] buffer, int index, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Char value) => throw null; + public override void WriteLine(System.Text.StringBuilder value) => throw null; + public override void WriteLine(System.ReadOnlySpan buffer) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(string value) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.Char[] buffer, int index, int count) => throw null; + public override System.Threading.Tasks.Task WriteLineAsync(System.Char value) => throw null; + } + + // Generated from `System.IO.TextReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TextReader : System.MarshalByRefObject, System.IDisposable + { + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public static System.IO.TextReader Null; + public virtual int Peek() => throw null; + public virtual int Read(System.Span buffer) => throw null; + public virtual int Read(System.Char[] buffer, int index, int count) => throw null; + public virtual int Read() => throw null; + public virtual System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task ReadAsync(System.Char[] buffer, int index, int count) => throw null; + public virtual int ReadBlock(System.Span buffer) => throw null; + public virtual int ReadBlock(System.Char[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.ValueTask ReadBlockAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task ReadBlockAsync(System.Char[] buffer, int index, int count) => throw null; + public virtual string ReadLine() => throw null; + public virtual System.Threading.Tasks.Task ReadLineAsync() => throw null; + public virtual string ReadToEnd() => throw null; + public virtual System.Threading.Tasks.Task ReadToEndAsync() => throw null; + public static System.IO.TextReader Synchronized(System.IO.TextReader reader) => throw null; + protected TextReader() => throw null; + } + + // Generated from `System.IO.TextWriter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TextWriter : System.MarshalByRefObject, System.IDisposable, System.IAsyncDisposable + { + public virtual void Close() => throw null; + protected System.Char[] CoreNewLine; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public abstract System.Text.Encoding Encoding { get; } + public virtual void Flush() => throw null; + public virtual System.Threading.Tasks.Task FlushAsync() => throw null; + public virtual System.IFormatProvider FormatProvider { get => throw null; } + public virtual string NewLine { get => throw null; set => throw null; } + public static System.IO.TextWriter Null; + public static System.IO.TextWriter Synchronized(System.IO.TextWriter writer) => throw null; + protected TextWriter(System.IFormatProvider formatProvider) => throw null; + protected TextWriter() => throw null; + public virtual void Write(string value) => throw null; + public virtual void Write(string format, params object[] arg) => throw null; + public virtual void Write(string format, object arg0, object arg1, object arg2) => throw null; + public virtual void Write(string format, object arg0, object arg1) => throw null; + public virtual void Write(string format, object arg0) => throw null; + public virtual void Write(object value) => throw null; + public virtual void Write(int value) => throw null; + public virtual void Write(float value) => throw null; + public virtual void Write(double value) => throw null; + public virtual void Write(bool value) => throw null; + public virtual void Write(System.UInt64 value) => throw null; + public virtual void Write(System.UInt32 value) => throw null; + public virtual void Write(System.Text.StringBuilder value) => throw null; + public virtual void Write(System.ReadOnlySpan buffer) => throw null; + public virtual void Write(System.Int64 value) => throw null; + public virtual void Write(System.Decimal value) => throw null; + public virtual void Write(System.Char[] buffer, int index, int count) => throw null; + public virtual void Write(System.Char[] buffer) => throw null; + public virtual void Write(System.Char value) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(string value) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(System.Char[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task WriteAsync(System.Char value) => throw null; + public System.Threading.Tasks.Task WriteAsync(System.Char[] buffer) => throw null; + public virtual void WriteLine(string value) => throw null; + public virtual void WriteLine(string format, params object[] arg) => throw null; + public virtual void WriteLine(string format, object arg0, object arg1, object arg2) => throw null; + public virtual void WriteLine(string format, object arg0, object arg1) => throw null; + public virtual void WriteLine(string format, object arg0) => throw null; + public virtual void WriteLine(object value) => throw null; + public virtual void WriteLine(int value) => throw null; + public virtual void WriteLine(float value) => throw null; + public virtual void WriteLine(double value) => throw null; + public virtual void WriteLine(bool value) => throw null; + public virtual void WriteLine(System.UInt64 value) => throw null; + public virtual void WriteLine(System.UInt32 value) => throw null; + public virtual void WriteLine(System.Text.StringBuilder value) => throw null; + public virtual void WriteLine(System.ReadOnlySpan buffer) => throw null; + public virtual void WriteLine(System.Int64 value) => throw null; + public virtual void WriteLine(System.Decimal value) => throw null; + public virtual void WriteLine(System.Char[] buffer, int index, int count) => throw null; + public virtual void WriteLine(System.Char[] buffer) => throw null; + public virtual void WriteLine(System.Char value) => throw null; + public virtual void WriteLine() => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync(string value) => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync(System.Text.StringBuilder value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync(System.Char[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync(System.Char value) => throw null; + public virtual System.Threading.Tasks.Task WriteLineAsync() => throw null; + public System.Threading.Tasks.Task WriteLineAsync(System.Char[] buffer) => throw null; + } + + // Generated from `System.IO.UnmanagedMemoryStream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnmanagedMemoryStream : System.IO.Stream + { + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public System.Int64 Capacity { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + unsafe protected void Initialize(System.Byte* pointer, System.Int64 length, System.Int64 capacity, System.IO.FileAccess access) => throw null; + protected void Initialize(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 length, System.IO.FileAccess access) => throw null; + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + unsafe public System.Byte* PositionPointer { get => throw null; set => throw null; } + public override int Read(System.Span destination) => throw null; + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin loc) => throw null; + public override void SetLength(System.Int64 value) => throw null; + unsafe public UnmanagedMemoryStream(System.Byte* pointer, System.Int64 length, System.Int64 capacity, System.IO.FileAccess access) => throw null; + unsafe public UnmanagedMemoryStream(System.Byte* pointer, System.Int64 length) => throw null; + public UnmanagedMemoryStream(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 length, System.IO.FileAccess access) => throw null; + public UnmanagedMemoryStream(System.Runtime.InteropServices.SafeBuffer buffer, System.Int64 offset, System.Int64 length) => throw null; + protected UnmanagedMemoryStream() => throw null; + public override void Write(System.ReadOnlySpan source) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + } + + } + namespace Net + { + // Generated from `System.Net.WebUtility` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class WebUtility + { + public static void HtmlDecode(string value, System.IO.TextWriter output) => throw null; + public static string HtmlDecode(string value) => throw null; + public static void HtmlEncode(string value, System.IO.TextWriter output) => throw null; + public static string HtmlEncode(string value) => throw null; + public static string UrlDecode(string encodedValue) => throw null; + public static System.Byte[] UrlDecodeToBytes(System.Byte[] encodedValue, int offset, int count) => throw null; + public static string UrlEncode(string value) => throw null; + public static System.Byte[] UrlEncodeToBytes(System.Byte[] value, int offset, int count) => throw null; + } + + } + namespace Numerics + { + // Generated from `System.Numerics.BitOperations` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class BitOperations + { + public static int LeadingZeroCount(System.UInt64 value) => throw null; + public static int LeadingZeroCount(System.UInt32 value) => throw null; + public static int Log2(System.UInt64 value) => throw null; + public static int Log2(System.UInt32 value) => throw null; + public static int PopCount(System.UInt64 value) => throw null; + public static int PopCount(System.UInt32 value) => throw null; + public static System.UInt64 RotateLeft(System.UInt64 value, int offset) => throw null; + public static System.UInt32 RotateLeft(System.UInt32 value, int offset) => throw null; + public static System.UInt64 RotateRight(System.UInt64 value, int offset) => throw null; + public static System.UInt32 RotateRight(System.UInt32 value, int offset) => throw null; + public static int TrailingZeroCount(int value) => throw null; + public static int TrailingZeroCount(System.UInt64 value) => throw null; + public static int TrailingZeroCount(System.UInt32 value) => throw null; + public static int TrailingZeroCount(System.Int64 value) => throw null; + } + + } + namespace Reflection + { + // Generated from `System.Reflection.AmbiguousMatchException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AmbiguousMatchException : System.SystemException + { + public AmbiguousMatchException(string message, System.Exception inner) => throw null; + public AmbiguousMatchException(string message) => throw null; + public AmbiguousMatchException() => throw null; + } + + // Generated from `System.Reflection.Assembly` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Assembly : System.Runtime.Serialization.ISerializable, System.Reflection.ICustomAttributeProvider + { + public static bool operator !=(System.Reflection.Assembly left, System.Reflection.Assembly right) => throw null; + public static bool operator ==(System.Reflection.Assembly left, System.Reflection.Assembly right) => throw null; + protected Assembly() => throw null; + public virtual string CodeBase { get => throw null; } + public virtual object CreateInstance(string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, object[] args, System.Globalization.CultureInfo culture, object[] activationAttributes) => throw null; + public object CreateInstance(string typeName, bool ignoreCase) => throw null; + public object CreateInstance(string typeName) => throw null; + public static string CreateQualifiedName(string assemblyName, string typeName) => throw null; + public virtual System.Collections.Generic.IEnumerable CustomAttributes { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DefinedTypes { get => throw null; } + public virtual System.Reflection.MethodInfo EntryPoint { get => throw null; } + public override bool Equals(object o) => throw null; + public virtual string EscapedCodeBase { get => throw null; } + public virtual System.Collections.Generic.IEnumerable ExportedTypes { get => throw null; } + public virtual string FullName { get => throw null; } + public static System.Reflection.Assembly GetAssembly(System.Type type) => throw null; + public static System.Reflection.Assembly GetCallingAssembly() => throw null; + public virtual object[] GetCustomAttributes(bool inherit) => throw null; + public virtual object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public virtual System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public static System.Reflection.Assembly GetEntryAssembly() => throw null; + public static System.Reflection.Assembly GetExecutingAssembly() => throw null; + public virtual System.Type[] GetExportedTypes() => throw null; + public virtual System.IO.FileStream GetFile(string name) => throw null; + public virtual System.IO.FileStream[] GetFiles(bool getResourceModules) => throw null; + public virtual System.IO.FileStream[] GetFiles() => throw null; + public virtual System.Type[] GetForwardedTypes() => throw null; + public override int GetHashCode() => throw null; + public virtual System.Reflection.Module[] GetLoadedModules(bool getResourceModules) => throw null; + public System.Reflection.Module[] GetLoadedModules() => throw null; + public virtual System.Reflection.ManifestResourceInfo GetManifestResourceInfo(string resourceName) => throw null; + public virtual string[] GetManifestResourceNames() => throw null; + public virtual System.IO.Stream GetManifestResourceStream(string name) => throw null; + public virtual System.IO.Stream GetManifestResourceStream(System.Type type, string name) => throw null; + public virtual System.Reflection.Module GetModule(string name) => throw null; + public virtual System.Reflection.Module[] GetModules(bool getResourceModules) => throw null; + public System.Reflection.Module[] GetModules() => throw null; + public virtual System.Reflection.AssemblyName GetName(bool copiedName) => throw null; + public virtual System.Reflection.AssemblyName GetName() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual System.Reflection.AssemblyName[] GetReferencedAssemblies() => throw null; + public virtual System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture, System.Version version) => throw null; + public virtual System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture) => throw null; + public virtual System.Type GetType(string name, bool throwOnError, bool ignoreCase) => throw null; + public virtual System.Type GetType(string name, bool throwOnError) => throw null; + public virtual System.Type GetType(string name) => throw null; + public virtual System.Type[] GetTypes() => throw null; + public virtual bool GlobalAssemblyCache { get => throw null; } + public virtual System.Int64 HostContext { get => throw null; } + public virtual string ImageRuntimeVersion { get => throw null; } + public virtual bool IsCollectible { get => throw null; } + public virtual bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public virtual bool IsDynamic { get => throw null; } + public bool IsFullyTrusted { get => throw null; } + public static System.Reflection.Assembly Load(string assemblyString) => throw null; + public static System.Reflection.Assembly Load(System.Reflection.AssemblyName assemblyRef) => throw null; + public static System.Reflection.Assembly Load(System.Byte[] rawAssembly, System.Byte[] rawSymbolStore) => throw null; + public static System.Reflection.Assembly Load(System.Byte[] rawAssembly) => throw null; + public static System.Reflection.Assembly LoadFile(string path) => throw null; + public static System.Reflection.Assembly LoadFrom(string assemblyFile, System.Byte[] hashValue, System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgorithm) => throw null; + public static System.Reflection.Assembly LoadFrom(string assemblyFile) => throw null; + public virtual System.Reflection.Module LoadModule(string moduleName, System.Byte[] rawModule, System.Byte[] rawSymbolStore) => throw null; + public System.Reflection.Module LoadModule(string moduleName, System.Byte[] rawModule) => throw null; + public static System.Reflection.Assembly LoadWithPartialName(string partialName) => throw null; + public virtual string Location { get => throw null; } + public virtual System.Reflection.Module ManifestModule { get => throw null; } + public virtual event System.Reflection.ModuleResolveEventHandler ModuleResolve; + public virtual System.Collections.Generic.IEnumerable Modules { get => throw null; } + public virtual bool ReflectionOnly { get => throw null; } + public static System.Reflection.Assembly ReflectionOnlyLoad(string assemblyString) => throw null; + public static System.Reflection.Assembly ReflectionOnlyLoad(System.Byte[] rawAssembly) => throw null; + public static System.Reflection.Assembly ReflectionOnlyLoadFrom(string assemblyFile) => throw null; + public virtual System.Security.SecurityRuleSet SecurityRuleSet { get => throw null; } + public override string ToString() => throw null; + public static System.Reflection.Assembly UnsafeLoadFrom(string assemblyFile) => throw null; + } + + // Generated from `System.Reflection.AssemblyAlgorithmIdAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyAlgorithmIdAttribute : System.Attribute + { + public System.UInt32 AlgorithmId { get => throw null; } + public AssemblyAlgorithmIdAttribute(System.UInt32 algorithmId) => throw null; + public AssemblyAlgorithmIdAttribute(System.Configuration.Assemblies.AssemblyHashAlgorithm algorithmId) => throw null; + } + + // Generated from `System.Reflection.AssemblyCompanyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyCompanyAttribute : System.Attribute + { + public AssemblyCompanyAttribute(string company) => throw null; + public string Company { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyConfigurationAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyConfigurationAttribute : System.Attribute + { + public AssemblyConfigurationAttribute(string configuration) => throw null; + public string Configuration { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyContentType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum AssemblyContentType + { + // Stub generator skipped constructor + Default, + WindowsRuntime, + } + + // Generated from `System.Reflection.AssemblyCopyrightAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyCopyrightAttribute : System.Attribute + { + public AssemblyCopyrightAttribute(string copyright) => throw null; + public string Copyright { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyCultureAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyCultureAttribute : System.Attribute + { + public AssemblyCultureAttribute(string culture) => throw null; + public string Culture { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyDefaultAliasAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyDefaultAliasAttribute : System.Attribute + { + public AssemblyDefaultAliasAttribute(string defaultAlias) => throw null; + public string DefaultAlias { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyDelaySignAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyDelaySignAttribute : System.Attribute + { + public AssemblyDelaySignAttribute(bool delaySign) => throw null; + public bool DelaySign { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyDescriptionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyDescriptionAttribute : System.Attribute + { + public AssemblyDescriptionAttribute(string description) => throw null; + public string Description { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyFileVersionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyFileVersionAttribute : System.Attribute + { + public AssemblyFileVersionAttribute(string version) => throw null; + public string Version { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyFlagsAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyFlagsAttribute : System.Attribute + { + public int AssemblyFlags { get => throw null; } + public AssemblyFlagsAttribute(int assemblyFlags) => throw null; + public AssemblyFlagsAttribute(System.UInt32 flags) => throw null; + public AssemblyFlagsAttribute(System.Reflection.AssemblyNameFlags assemblyFlags) => throw null; + public System.UInt32 Flags { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyInformationalVersionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyInformationalVersionAttribute : System.Attribute + { + public AssemblyInformationalVersionAttribute(string informationalVersion) => throw null; + public string InformationalVersion { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyKeyFileAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyKeyFileAttribute : System.Attribute + { + public AssemblyKeyFileAttribute(string keyFile) => throw null; + public string KeyFile { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyKeyNameAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyKeyNameAttribute : System.Attribute + { + public AssemblyKeyNameAttribute(string keyName) => throw null; + public string KeyName { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyMetadataAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyMetadataAttribute : System.Attribute + { + public AssemblyMetadataAttribute(string key, string value) => throw null; + public string Key { get => throw null; } + public string Value { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyName` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyName : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.ICloneable + { + public AssemblyName(string assemblyName) => throw null; + public AssemblyName() => throw null; + public object Clone() => throw null; + public string CodeBase { get => throw null; set => throw null; } + public System.Reflection.AssemblyContentType ContentType { get => throw null; set => throw null; } + public System.Globalization.CultureInfo CultureInfo { get => throw null; set => throw null; } + public string CultureName { get => throw null; set => throw null; } + public string EscapedCodeBase { get => throw null; } + public System.Reflection.AssemblyNameFlags Flags { get => throw null; set => throw null; } + public string FullName { get => throw null; } + public static System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Byte[] GetPublicKey() => throw null; + public System.Byte[] GetPublicKeyToken() => throw null; + public System.Configuration.Assemblies.AssemblyHashAlgorithm HashAlgorithm { get => throw null; set => throw null; } + public System.Reflection.StrongNameKeyPair KeyPair { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public void OnDeserialization(object sender) => throw null; + public System.Reflection.ProcessorArchitecture ProcessorArchitecture { get => throw null; set => throw null; } + public static bool ReferenceMatchesDefinition(System.Reflection.AssemblyName reference, System.Reflection.AssemblyName definition) => throw null; + public void SetPublicKey(System.Byte[] publicKey) => throw null; + public void SetPublicKeyToken(System.Byte[] publicKeyToken) => throw null; + public override string ToString() => throw null; + public System.Version Version { get => throw null; set => throw null; } + public System.Configuration.Assemblies.AssemblyVersionCompatibility VersionCompatibility { get => throw null; set => throw null; } + } + + // Generated from `System.Reflection.AssemblyNameFlags` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum AssemblyNameFlags + { + // Stub generator skipped constructor + EnableJITcompileOptimizer, + EnableJITcompileTracking, + None, + PublicKey, + Retargetable, + } + + // Generated from `System.Reflection.AssemblyNameProxy` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyNameProxy : System.MarshalByRefObject + { + public AssemblyNameProxy() => throw null; + public System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) => throw null; + } + + // Generated from `System.Reflection.AssemblyProductAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyProductAttribute : System.Attribute + { + public AssemblyProductAttribute(string product) => throw null; + public string Product { get => throw null; } + } + + // Generated from `System.Reflection.AssemblySignatureKeyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblySignatureKeyAttribute : System.Attribute + { + public AssemblySignatureKeyAttribute(string publicKey, string countersignature) => throw null; + public string Countersignature { get => throw null; } + public string PublicKey { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyTitleAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyTitleAttribute : System.Attribute + { + public AssemblyTitleAttribute(string title) => throw null; + public string Title { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyTrademarkAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyTrademarkAttribute : System.Attribute + { + public AssemblyTrademarkAttribute(string trademark) => throw null; + public string Trademark { get => throw null; } + } + + // Generated from `System.Reflection.AssemblyVersionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyVersionAttribute : System.Attribute + { + public AssemblyVersionAttribute(string version) => throw null; + public string Version { get => throw null; } + } + + // Generated from `System.Reflection.Binder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Binder + { + public abstract System.Reflection.FieldInfo BindToField(System.Reflection.BindingFlags bindingAttr, System.Reflection.FieldInfo[] match, object value, System.Globalization.CultureInfo culture); + public abstract System.Reflection.MethodBase BindToMethod(System.Reflection.BindingFlags bindingAttr, System.Reflection.MethodBase[] match, ref object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] names, out object state); + protected Binder() => throw null; + public abstract object ChangeType(object value, System.Type type, System.Globalization.CultureInfo culture); + public abstract void ReorderArgumentArray(ref object[] args, object state); + public abstract System.Reflection.MethodBase SelectMethod(System.Reflection.BindingFlags bindingAttr, System.Reflection.MethodBase[] match, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + public abstract System.Reflection.PropertyInfo SelectProperty(System.Reflection.BindingFlags bindingAttr, System.Reflection.PropertyInfo[] match, System.Type returnType, System.Type[] indexes, System.Reflection.ParameterModifier[] modifiers); + } + + // Generated from `System.Reflection.BindingFlags` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum BindingFlags + { + // Stub generator skipped constructor + CreateInstance, + DeclaredOnly, + Default, + DoNotWrapExceptions, + ExactBinding, + FlattenHierarchy, + GetField, + GetProperty, + IgnoreCase, + IgnoreReturn, + Instance, + InvokeMethod, + NonPublic, + OptionalParamBinding, + Public, + PutDispProperty, + PutRefDispProperty, + SetField, + SetProperty, + Static, + SuppressChangeType, + } + + // Generated from `System.Reflection.CallingConventions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CallingConventions + { + Any, + // Stub generator skipped constructor + ExplicitThis, + HasThis, + Standard, + VarArgs, + } + + // Generated from `System.Reflection.ConstructorInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ConstructorInfo : System.Reflection.MethodBase + { + public static bool operator !=(System.Reflection.ConstructorInfo left, System.Reflection.ConstructorInfo right) => throw null; + public static bool operator ==(System.Reflection.ConstructorInfo left, System.Reflection.ConstructorInfo right) => throw null; + protected ConstructorInfo() => throw null; + public static string ConstructorName; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public object Invoke(object[] parameters) => throw null; + public abstract object Invoke(System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture); + public override System.Reflection.MemberTypes MemberType { get => throw null; } + public static string TypeConstructorName; + } + + // Generated from `System.Reflection.CustomAttributeData` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CustomAttributeData + { + public virtual System.Type AttributeType { get => throw null; } + public virtual System.Reflection.ConstructorInfo Constructor { get => throw null; } + public virtual System.Collections.Generic.IList ConstructorArguments { get => throw null; } + protected CustomAttributeData() => throw null; + public override bool Equals(object obj) => throw null; + public static System.Collections.Generic.IList GetCustomAttributes(System.Reflection.ParameterInfo target) => throw null; + public static System.Collections.Generic.IList GetCustomAttributes(System.Reflection.Module target) => throw null; + public static System.Collections.Generic.IList GetCustomAttributes(System.Reflection.MemberInfo target) => throw null; + public static System.Collections.Generic.IList GetCustomAttributes(System.Reflection.Assembly target) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Collections.Generic.IList NamedArguments { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.CustomAttributeExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CustomAttributeExtensions + { + public static T GetCustomAttribute(this System.Reflection.ParameterInfo element, bool inherit) where T : System.Attribute => throw null; + public static T GetCustomAttribute(this System.Reflection.ParameterInfo element) where T : System.Attribute => throw null; + public static T GetCustomAttribute(this System.Reflection.Module element) where T : System.Attribute => throw null; + public static T GetCustomAttribute(this System.Reflection.MemberInfo element, bool inherit) where T : System.Attribute => throw null; + public static T GetCustomAttribute(this System.Reflection.MemberInfo element) where T : System.Attribute => throw null; + public static T GetCustomAttribute(this System.Reflection.Assembly element) where T : System.Attribute => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.Module element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.MemberInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.MemberInfo element, System.Type attributeType) => throw null; + public static System.Attribute GetCustomAttribute(this System.Reflection.Assembly element, System.Type attributeType) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element, bool inherit) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Module element) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element, bool inherit) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Assembly element) where T : System.Attribute => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element, bool inherit) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.ParameterInfo element) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Module element, System.Type attributeType) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Module element) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element, bool inherit) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element, System.Type attributeType, bool inherit) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element, System.Type attributeType) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.MemberInfo element) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Assembly element, System.Type attributeType) => throw null; + public static System.Collections.Generic.IEnumerable GetCustomAttributes(this System.Reflection.Assembly element) => throw null; + public static bool IsDefined(this System.Reflection.ParameterInfo element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(this System.Reflection.ParameterInfo element, System.Type attributeType) => throw null; + public static bool IsDefined(this System.Reflection.Module element, System.Type attributeType) => throw null; + public static bool IsDefined(this System.Reflection.MemberInfo element, System.Type attributeType, bool inherit) => throw null; + public static bool IsDefined(this System.Reflection.MemberInfo element, System.Type attributeType) => throw null; + public static bool IsDefined(this System.Reflection.Assembly element, System.Type attributeType) => throw null; + } + + // Generated from `System.Reflection.CustomAttributeFormatException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CustomAttributeFormatException : System.FormatException + { + public CustomAttributeFormatException(string message, System.Exception inner) => throw null; + public CustomAttributeFormatException(string message) => throw null; + public CustomAttributeFormatException() => throw null; + protected CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Reflection.CustomAttributeNamedArgument` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeNamedArgument + { + public static bool operator !=(System.Reflection.CustomAttributeNamedArgument left, System.Reflection.CustomAttributeNamedArgument right) => throw null; + public static bool operator ==(System.Reflection.CustomAttributeNamedArgument left, System.Reflection.CustomAttributeNamedArgument right) => throw null; + public CustomAttributeNamedArgument(System.Reflection.MemberInfo memberInfo, object value) => throw null; + public CustomAttributeNamedArgument(System.Reflection.MemberInfo memberInfo, System.Reflection.CustomAttributeTypedArgument typedArgument) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsField { get => throw null; } + public System.Reflection.MemberInfo MemberInfo { get => throw null; } + public string MemberName { get => throw null; } + public override string ToString() => throw null; + public System.Reflection.CustomAttributeTypedArgument TypedValue { get => throw null; } + } + + // Generated from `System.Reflection.CustomAttributeTypedArgument` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CustomAttributeTypedArgument + { + public static bool operator !=(System.Reflection.CustomAttributeTypedArgument left, System.Reflection.CustomAttributeTypedArgument right) => throw null; + public static bool operator ==(System.Reflection.CustomAttributeTypedArgument left, System.Reflection.CustomAttributeTypedArgument right) => throw null; + public System.Type ArgumentType { get => throw null; } + public CustomAttributeTypedArgument(object value) => throw null; + public CustomAttributeTypedArgument(System.Type argumentType, object value) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public object Value { get => throw null; } + } + + // Generated from `System.Reflection.DefaultMemberAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultMemberAttribute : System.Attribute + { + public DefaultMemberAttribute(string memberName) => throw null; + public string MemberName { get => throw null; } + } + + // Generated from `System.Reflection.EventAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum EventAttributes + { + // Stub generator skipped constructor + None, + RTSpecialName, + ReservedMask, + SpecialName, + } + + // Generated from `System.Reflection.EventInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EventInfo : System.Reflection.MemberInfo + { + public static bool operator !=(System.Reflection.EventInfo left, System.Reflection.EventInfo right) => throw null; + public static bool operator ==(System.Reflection.EventInfo left, System.Reflection.EventInfo right) => throw null; + public virtual void AddEventHandler(object target, System.Delegate handler) => throw null; + public virtual System.Reflection.MethodInfo AddMethod { get => throw null; } + public abstract System.Reflection.EventAttributes Attributes { get; } + public override bool Equals(object obj) => throw null; + public virtual System.Type EventHandlerType { get => throw null; } + protected EventInfo() => throw null; + public abstract System.Reflection.MethodInfo GetAddMethod(bool nonPublic); + public System.Reflection.MethodInfo GetAddMethod() => throw null; + public override int GetHashCode() => throw null; + public virtual System.Reflection.MethodInfo[] GetOtherMethods(bool nonPublic) => throw null; + public System.Reflection.MethodInfo[] GetOtherMethods() => throw null; + public abstract System.Reflection.MethodInfo GetRaiseMethod(bool nonPublic); + public System.Reflection.MethodInfo GetRaiseMethod() => throw null; + public abstract System.Reflection.MethodInfo GetRemoveMethod(bool nonPublic); + public System.Reflection.MethodInfo GetRemoveMethod() => throw null; + public virtual bool IsMulticast { get => throw null; } + public bool IsSpecialName { get => throw null; } + public override System.Reflection.MemberTypes MemberType { get => throw null; } + public virtual System.Reflection.MethodInfo RaiseMethod { get => throw null; } + public virtual void RemoveEventHandler(object target, System.Delegate handler) => throw null; + public virtual System.Reflection.MethodInfo RemoveMethod { get => throw null; } + } + + // Generated from `System.Reflection.ExceptionHandlingClause` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExceptionHandlingClause + { + public virtual System.Type CatchType { get => throw null; } + protected ExceptionHandlingClause() => throw null; + public virtual int FilterOffset { get => throw null; } + public virtual System.Reflection.ExceptionHandlingClauseOptions Flags { get => throw null; } + public virtual int HandlerLength { get => throw null; } + public virtual int HandlerOffset { get => throw null; } + public override string ToString() => throw null; + public virtual int TryLength { get => throw null; } + public virtual int TryOffset { get => throw null; } + } + + // Generated from `System.Reflection.ExceptionHandlingClauseOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ExceptionHandlingClauseOptions + { + Clause, + // Stub generator skipped constructor + Fault, + Filter, + Finally, + } + + // Generated from `System.Reflection.FieldAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum FieldAttributes + { + Assembly, + FamANDAssem, + FamORAssem, + Family, + FieldAccessMask, + // Stub generator skipped constructor + HasDefault, + HasFieldMarshal, + HasFieldRVA, + InitOnly, + Literal, + NotSerialized, + PinvokeImpl, + Private, + PrivateScope, + Public, + RTSpecialName, + ReservedMask, + SpecialName, + Static, + } + + // Generated from `System.Reflection.FieldInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class FieldInfo : System.Reflection.MemberInfo + { + public static bool operator !=(System.Reflection.FieldInfo left, System.Reflection.FieldInfo right) => throw null; + public static bool operator ==(System.Reflection.FieldInfo left, System.Reflection.FieldInfo right) => throw null; + public abstract System.Reflection.FieldAttributes Attributes { get; } + public override bool Equals(object obj) => throw null; + public abstract System.RuntimeFieldHandle FieldHandle { get; } + protected FieldInfo() => throw null; + public abstract System.Type FieldType { get; } + public static System.Reflection.FieldInfo GetFieldFromHandle(System.RuntimeFieldHandle handle, System.RuntimeTypeHandle declaringType) => throw null; + public static System.Reflection.FieldInfo GetFieldFromHandle(System.RuntimeFieldHandle handle) => throw null; + public override int GetHashCode() => throw null; + public virtual System.Type[] GetOptionalCustomModifiers() => throw null; + public virtual object GetRawConstantValue() => throw null; + public virtual System.Type[] GetRequiredCustomModifiers() => throw null; + public abstract object GetValue(object obj); + public virtual object GetValueDirect(System.TypedReference obj) => throw null; + public bool IsAssembly { get => throw null; } + public bool IsFamily { get => throw null; } + public bool IsFamilyAndAssembly { get => throw null; } + public bool IsFamilyOrAssembly { get => throw null; } + public bool IsInitOnly { get => throw null; } + public bool IsLiteral { get => throw null; } + public bool IsNotSerialized { get => throw null; } + public bool IsPinvokeImpl { get => throw null; } + public bool IsPrivate { get => throw null; } + public bool IsPublic { get => throw null; } + public virtual bool IsSecurityCritical { get => throw null; } + public virtual bool IsSecuritySafeCritical { get => throw null; } + public virtual bool IsSecurityTransparent { get => throw null; } + public bool IsSpecialName { get => throw null; } + public bool IsStatic { get => throw null; } + public override System.Reflection.MemberTypes MemberType { get => throw null; } + public void SetValue(object obj, object value) => throw null; + public abstract void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture); + public virtual void SetValueDirect(System.TypedReference obj, object value) => throw null; + } + + // Generated from `System.Reflection.GenericParameterAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum GenericParameterAttributes + { + Contravariant, + Covariant, + DefaultConstructorConstraint, + // Stub generator skipped constructor + None, + NotNullableValueTypeConstraint, + ReferenceTypeConstraint, + SpecialConstraintMask, + VarianceMask, + } + + // Generated from `System.Reflection.ICustomAttributeProvider` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICustomAttributeProvider + { + object[] GetCustomAttributes(bool inherit); + object[] GetCustomAttributes(System.Type attributeType, bool inherit); + bool IsDefined(System.Type attributeType, bool inherit); + } + + // Generated from `System.Reflection.IReflect` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReflect + { + System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr); + System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr); + System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.BindingFlags bindingAttr); + System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr); + System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr); + System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr); + System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr); + System.Reflection.PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers); + System.Reflection.PropertyInfo GetProperty(string name, System.Reflection.BindingFlags bindingAttr); + object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters); + System.Type UnderlyingSystemType { get; } + } + + // Generated from `System.Reflection.IReflectableType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReflectableType + { + System.Reflection.TypeInfo GetTypeInfo(); + } + + // Generated from `System.Reflection.ImageFileMachine` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ImageFileMachine + { + AMD64, + ARM, + I386, + IA64, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.InterfaceMapping` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct InterfaceMapping + { + // Stub generator skipped constructor + public System.Reflection.MethodInfo[] InterfaceMethods; + public System.Type InterfaceType; + public System.Reflection.MethodInfo[] TargetMethods; + public System.Type TargetType; + } + + // Generated from `System.Reflection.IntrospectionExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IntrospectionExtensions + { + public static System.Reflection.TypeInfo GetTypeInfo(this System.Type type) => throw null; + } + + // Generated from `System.Reflection.InvalidFilterCriteriaException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidFilterCriteriaException : System.ApplicationException + { + public InvalidFilterCriteriaException(string message, System.Exception inner) => throw null; + public InvalidFilterCriteriaException(string message) => throw null; + public InvalidFilterCriteriaException() => throw null; + protected InvalidFilterCriteriaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Reflection.LocalVariableInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LocalVariableInfo + { + public virtual bool IsPinned { get => throw null; } + public virtual int LocalIndex { get => throw null; } + public virtual System.Type LocalType { get => throw null; } + protected LocalVariableInfo() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.ManifestResourceInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ManifestResourceInfo + { + public virtual string FileName { get => throw null; } + public ManifestResourceInfo(System.Reflection.Assembly containingAssembly, string containingFileName, System.Reflection.ResourceLocation resourceLocation) => throw null; + public virtual System.Reflection.Assembly ReferencedAssembly { get => throw null; } + public virtual System.Reflection.ResourceLocation ResourceLocation { get => throw null; } + } + + // Generated from `System.Reflection.MemberFilter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate bool MemberFilter(System.Reflection.MemberInfo m, object filterCriteria); + + // Generated from `System.Reflection.MemberInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MemberInfo : System.Reflection.ICustomAttributeProvider + { + public static bool operator !=(System.Reflection.MemberInfo left, System.Reflection.MemberInfo right) => throw null; + public static bool operator ==(System.Reflection.MemberInfo left, System.Reflection.MemberInfo right) => throw null; + public virtual System.Collections.Generic.IEnumerable CustomAttributes { get => throw null; } + public abstract System.Type DeclaringType { get; } + public override bool Equals(object obj) => throw null; + public abstract object[] GetCustomAttributes(bool inherit); + public abstract object[] GetCustomAttributes(System.Type attributeType, bool inherit); + public virtual System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public override int GetHashCode() => throw null; + public virtual bool HasSameMetadataDefinitionAs(System.Reflection.MemberInfo other) => throw null; + public virtual bool IsCollectible { get => throw null; } + public abstract bool IsDefined(System.Type attributeType, bool inherit); + protected MemberInfo() => throw null; + public abstract System.Reflection.MemberTypes MemberType { get; } + public virtual int MetadataToken { get => throw null; } + public virtual System.Reflection.Module Module { get => throw null; } + public abstract string Name { get; } + public abstract System.Type ReflectedType { get; } + } + + // Generated from `System.Reflection.MemberTypes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MemberTypes + { + All, + Constructor, + Custom, + Event, + Field, + // Stub generator skipped constructor + Method, + NestedType, + Property, + TypeInfo, + } + + // Generated from `System.Reflection.MethodAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MethodAttributes + { + Abstract, + Assembly, + CheckAccessOnOverride, + FamANDAssem, + FamORAssem, + Family, + Final, + HasSecurity, + HideBySig, + MemberAccessMask, + // Stub generator skipped constructor + NewSlot, + PinvokeImpl, + Private, + PrivateScope, + Public, + RTSpecialName, + RequireSecObject, + ReservedMask, + ReuseSlot, + SpecialName, + Static, + UnmanagedExport, + Virtual, + VtableLayoutMask, + } + + // Generated from `System.Reflection.MethodBase` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MethodBase : System.Reflection.MemberInfo + { + public static bool operator !=(System.Reflection.MethodBase left, System.Reflection.MethodBase right) => throw null; + public static bool operator ==(System.Reflection.MethodBase left, System.Reflection.MethodBase right) => throw null; + public abstract System.Reflection.MethodAttributes Attributes { get; } + public virtual System.Reflection.CallingConventions CallingConvention { get => throw null; } + public virtual bool ContainsGenericParameters { get => throw null; } + public override bool Equals(object obj) => throw null; + public static System.Reflection.MethodBase GetCurrentMethod() => throw null; + public virtual System.Type[] GetGenericArguments() => throw null; + public override int GetHashCode() => throw null; + public virtual System.Reflection.MethodBody GetMethodBody() => throw null; + public static System.Reflection.MethodBase GetMethodFromHandle(System.RuntimeMethodHandle handle, System.RuntimeTypeHandle declaringType) => throw null; + public static System.Reflection.MethodBase GetMethodFromHandle(System.RuntimeMethodHandle handle) => throw null; + public abstract System.Reflection.MethodImplAttributes GetMethodImplementationFlags(); + public abstract System.Reflection.ParameterInfo[] GetParameters(); + public object Invoke(object obj, object[] parameters) => throw null; + public abstract object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture); + public bool IsAbstract { get => throw null; } + public bool IsAssembly { get => throw null; } + public virtual bool IsConstructedGenericMethod { get => throw null; } + public bool IsConstructor { get => throw null; } + public bool IsFamily { get => throw null; } + public bool IsFamilyAndAssembly { get => throw null; } + public bool IsFamilyOrAssembly { get => throw null; } + public bool IsFinal { get => throw null; } + public virtual bool IsGenericMethod { get => throw null; } + public virtual bool IsGenericMethodDefinition { get => throw null; } + public bool IsHideBySig { get => throw null; } + public bool IsPrivate { get => throw null; } + public bool IsPublic { get => throw null; } + public virtual bool IsSecurityCritical { get => throw null; } + public virtual bool IsSecuritySafeCritical { get => throw null; } + public virtual bool IsSecurityTransparent { get => throw null; } + public bool IsSpecialName { get => throw null; } + public bool IsStatic { get => throw null; } + public bool IsVirtual { get => throw null; } + protected MethodBase() => throw null; + public abstract System.RuntimeMethodHandle MethodHandle { get; } + public virtual System.Reflection.MethodImplAttributes MethodImplementationFlags { get => throw null; } + } + + // Generated from `System.Reflection.MethodBody` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodBody + { + public virtual System.Collections.Generic.IList ExceptionHandlingClauses { get => throw null; } + public virtual System.Byte[] GetILAsByteArray() => throw null; + public virtual bool InitLocals { get => throw null; } + public virtual int LocalSignatureMetadataToken { get => throw null; } + public virtual System.Collections.Generic.IList LocalVariables { get => throw null; } + public virtual int MaxStackSize { get => throw null; } + protected MethodBody() => throw null; + } + + // Generated from `System.Reflection.MethodImplAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MethodImplAttributes + { + AggressiveInlining, + AggressiveOptimization, + CodeTypeMask, + ForwardRef, + IL, + InternalCall, + Managed, + ManagedMask, + MaxMethodImplVal, + // Stub generator skipped constructor + Native, + NoInlining, + NoOptimization, + OPTIL, + PreserveSig, + Runtime, + Synchronized, + Unmanaged, + } + + // Generated from `System.Reflection.MethodInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MethodInfo : System.Reflection.MethodBase + { + public static bool operator !=(System.Reflection.MethodInfo left, System.Reflection.MethodInfo right) => throw null; + public static bool operator ==(System.Reflection.MethodInfo left, System.Reflection.MethodInfo right) => throw null; + public virtual System.Delegate CreateDelegate(System.Type delegateType, object target) => throw null; + public virtual System.Delegate CreateDelegate(System.Type delegateType) => throw null; + public T CreateDelegate(object target) where T : System.Delegate => throw null; + public T CreateDelegate() where T : System.Delegate => throw null; + public override bool Equals(object obj) => throw null; + public abstract System.Reflection.MethodInfo GetBaseDefinition(); + public override System.Type[] GetGenericArguments() => throw null; + public virtual System.Reflection.MethodInfo GetGenericMethodDefinition() => throw null; + public override int GetHashCode() => throw null; + public virtual System.Reflection.MethodInfo MakeGenericMethod(params System.Type[] typeArguments) => throw null; + public override System.Reflection.MemberTypes MemberType { get => throw null; } + protected MethodInfo() => throw null; + public virtual System.Reflection.ParameterInfo ReturnParameter { get => throw null; } + public virtual System.Type ReturnType { get => throw null; } + public abstract System.Reflection.ICustomAttributeProvider ReturnTypeCustomAttributes { get; } + } + + // Generated from `System.Reflection.Missing` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Missing : System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static System.Reflection.Missing Value; + } + + // Generated from `System.Reflection.Module` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Module : System.Runtime.Serialization.ISerializable, System.Reflection.ICustomAttributeProvider + { + public static bool operator !=(System.Reflection.Module left, System.Reflection.Module right) => throw null; + public static bool operator ==(System.Reflection.Module left, System.Reflection.Module right) => throw null; + public virtual System.Reflection.Assembly Assembly { get => throw null; } + public virtual System.Collections.Generic.IEnumerable CustomAttributes { get => throw null; } + public override bool Equals(object o) => throw null; + public static System.Reflection.TypeFilter FilterTypeName; + public static System.Reflection.TypeFilter FilterTypeNameIgnoreCase; + public virtual System.Type[] FindTypes(System.Reflection.TypeFilter filter, object filterCriteria) => throw null; + public virtual string FullyQualifiedName { get => throw null; } + public virtual object[] GetCustomAttributes(bool inherit) => throw null; + public virtual object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public virtual System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public virtual System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public System.Reflection.FieldInfo GetField(string name) => throw null; + public virtual System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingFlags) => throw null; + public System.Reflection.FieldInfo[] GetFields() => throw null; + public override int GetHashCode() => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Type[] types) => throw null; + public System.Reflection.MethodInfo GetMethod(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public System.Reflection.MethodInfo GetMethod(string name) => throw null; + protected virtual System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public virtual System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags) => throw null; + public System.Reflection.MethodInfo[] GetMethods() => throw null; + public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual void GetPEKind(out System.Reflection.PortableExecutableKinds peKind, out System.Reflection.ImageFileMachine machine) => throw null; + public virtual System.Type GetType(string className, bool throwOnError, bool ignoreCase) => throw null; + public virtual System.Type GetType(string className, bool ignoreCase) => throw null; + public virtual System.Type GetType(string className) => throw null; + public virtual System.Type[] GetTypes() => throw null; + public virtual bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public virtual bool IsResource() => throw null; + public virtual int MDStreamVersion { get => throw null; } + public virtual int MetadataToken { get => throw null; } + protected Module() => throw null; + public System.ModuleHandle ModuleHandle { get => throw null; } + public virtual System.Guid ModuleVersionId { get => throw null; } + public virtual string Name { get => throw null; } + public virtual System.Reflection.FieldInfo ResolveField(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public System.Reflection.FieldInfo ResolveField(int metadataToken) => throw null; + public virtual System.Reflection.MemberInfo ResolveMember(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public System.Reflection.MemberInfo ResolveMember(int metadataToken) => throw null; + public virtual System.Reflection.MethodBase ResolveMethod(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public System.Reflection.MethodBase ResolveMethod(int metadataToken) => throw null; + public virtual System.Byte[] ResolveSignature(int metadataToken) => throw null; + public virtual string ResolveString(int metadataToken) => throw null; + public virtual System.Type ResolveType(int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) => throw null; + public System.Type ResolveType(int metadataToken) => throw null; + public virtual string ScopeName { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.ModuleResolveEventHandler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate System.Reflection.Module ModuleResolveEventHandler(object sender, System.ResolveEventArgs e); + + // Generated from `System.Reflection.ObfuscateAssemblyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObfuscateAssemblyAttribute : System.Attribute + { + public bool AssemblyIsPrivate { get => throw null; } + public ObfuscateAssemblyAttribute(bool assemblyIsPrivate) => throw null; + public bool StripAfterObfuscation { get => throw null; set => throw null; } + } + + // Generated from `System.Reflection.ObfuscationAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObfuscationAttribute : System.Attribute + { + public bool ApplyToMembers { get => throw null; set => throw null; } + public bool Exclude { get => throw null; set => throw null; } + public string Feature { get => throw null; set => throw null; } + public ObfuscationAttribute() => throw null; + public bool StripAfterObfuscation { get => throw null; set => throw null; } + } + + // Generated from `System.Reflection.ParameterAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ParameterAttributes + { + HasDefault, + HasFieldMarshal, + In, + Lcid, + None, + Optional, + Out, + // Stub generator skipped constructor + Reserved3, + Reserved4, + ReservedMask, + Retval, + } + + // Generated from `System.Reflection.ParameterInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParameterInfo : System.Runtime.Serialization.IObjectReference, System.Reflection.ICustomAttributeProvider + { + public virtual System.Reflection.ParameterAttributes Attributes { get => throw null; } + protected System.Reflection.ParameterAttributes AttrsImpl; + protected System.Type ClassImpl; + public virtual System.Collections.Generic.IEnumerable CustomAttributes { get => throw null; } + public virtual object DefaultValue { get => throw null; } + protected object DefaultValueImpl; + public virtual object[] GetCustomAttributes(bool inherit) => throw null; + public virtual object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public virtual System.Collections.Generic.IList GetCustomAttributesData() => throw null; + public virtual System.Type[] GetOptionalCustomModifiers() => throw null; + public object GetRealObject(System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual System.Type[] GetRequiredCustomModifiers() => throw null; + public virtual bool HasDefaultValue { get => throw null; } + public virtual bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public bool IsIn { get => throw null; } + public bool IsLcid { get => throw null; } + public bool IsOptional { get => throw null; } + public bool IsOut { get => throw null; } + public bool IsRetval { get => throw null; } + public virtual System.Reflection.MemberInfo Member { get => throw null; } + protected System.Reflection.MemberInfo MemberImpl; + public virtual int MetadataToken { get => throw null; } + public virtual string Name { get => throw null; } + protected string NameImpl; + protected ParameterInfo() => throw null; + public virtual System.Type ParameterType { get => throw null; } + public virtual int Position { get => throw null; } + protected int PositionImpl; + public virtual object RawDefaultValue { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Reflection.ParameterModifier` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParameterModifier + { + public bool this[int index] { get => throw null; set => throw null; } + public ParameterModifier(int parameterCount) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.Pointer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Pointer : System.Runtime.Serialization.ISerializable + { + unsafe public static object Box(void* ptr, System.Type type) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + unsafe public static void* Unbox(object ptr) => throw null; + } + + // Generated from `System.Reflection.PortableExecutableKinds` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PortableExecutableKinds + { + ILOnly, + NotAPortableExecutableImage, + PE32Plus, + // Stub generator skipped constructor + Preferred32Bit, + Required32Bit, + Unmanaged32Bit, + } + + // Generated from `System.Reflection.ProcessorArchitecture` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ProcessorArchitecture + { + Amd64, + Arm, + IA64, + MSIL, + None, + // Stub generator skipped constructor + X86, + } + + // Generated from `System.Reflection.PropertyAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum PropertyAttributes + { + HasDefault, + None, + // Stub generator skipped constructor + RTSpecialName, + Reserved2, + Reserved3, + Reserved4, + ReservedMask, + SpecialName, + } + + // Generated from `System.Reflection.PropertyInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class PropertyInfo : System.Reflection.MemberInfo + { + public static bool operator !=(System.Reflection.PropertyInfo left, System.Reflection.PropertyInfo right) => throw null; + public static bool operator ==(System.Reflection.PropertyInfo left, System.Reflection.PropertyInfo right) => throw null; + public abstract System.Reflection.PropertyAttributes Attributes { get; } + public abstract bool CanRead { get; } + public abstract bool CanWrite { get; } + public override bool Equals(object obj) => throw null; + public abstract System.Reflection.MethodInfo[] GetAccessors(bool nonPublic); + public System.Reflection.MethodInfo[] GetAccessors() => throw null; + public virtual object GetConstantValue() => throw null; + public abstract System.Reflection.MethodInfo GetGetMethod(bool nonPublic); + public System.Reflection.MethodInfo GetGetMethod() => throw null; + public override int GetHashCode() => throw null; + public abstract System.Reflection.ParameterInfo[] GetIndexParameters(); + public virtual System.Reflection.MethodInfo GetMethod { get => throw null; } + public virtual System.Type[] GetOptionalCustomModifiers() => throw null; + public virtual object GetRawConstantValue() => throw null; + public virtual System.Type[] GetRequiredCustomModifiers() => throw null; + public abstract System.Reflection.MethodInfo GetSetMethod(bool nonPublic); + public System.Reflection.MethodInfo GetSetMethod() => throw null; + public virtual object GetValue(object obj, object[] index) => throw null; + public object GetValue(object obj) => throw null; + public abstract object GetValue(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture); + public bool IsSpecialName { get => throw null; } + public override System.Reflection.MemberTypes MemberType { get => throw null; } + protected PropertyInfo() => throw null; + public abstract System.Type PropertyType { get; } + public virtual System.Reflection.MethodInfo SetMethod { get => throw null; } + public void SetValue(object obj, object value) => throw null; + public virtual void SetValue(object obj, object value, object[] index) => throw null; + public abstract void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] index, System.Globalization.CultureInfo culture); + } + + // Generated from `System.Reflection.ReflectionContext` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ReflectionContext + { + public virtual System.Reflection.TypeInfo GetTypeForObject(object value) => throw null; + public abstract System.Reflection.Assembly MapAssembly(System.Reflection.Assembly assembly); + public abstract System.Reflection.TypeInfo MapType(System.Reflection.TypeInfo type); + protected ReflectionContext() => throw null; + } + + // Generated from `System.Reflection.ReflectionTypeLoadException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReflectionTypeLoadException : System.SystemException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Exception[] LoaderExceptions { get => throw null; } + public override string Message { get => throw null; } + public ReflectionTypeLoadException(System.Type[] classes, System.Exception[] exceptions, string message) => throw null; + public ReflectionTypeLoadException(System.Type[] classes, System.Exception[] exceptions) => throw null; + public override string ToString() => throw null; + public System.Type[] Types { get => throw null; } + } + + // Generated from `System.Reflection.ResourceAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ResourceAttributes + { + Private, + Public, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.ResourceLocation` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ResourceLocation + { + ContainedInAnotherAssembly, + ContainedInManifestFile, + Embedded, + // Stub generator skipped constructor + } + + // Generated from `System.Reflection.RuntimeReflectionExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RuntimeReflectionExtensions + { + public static System.Reflection.MethodInfo GetMethodInfo(this System.Delegate del) => throw null; + public static System.Reflection.MethodInfo GetRuntimeBaseDefinition(this System.Reflection.MethodInfo method) => throw null; + public static System.Reflection.EventInfo GetRuntimeEvent(this System.Type type, string name) => throw null; + public static System.Collections.Generic.IEnumerable GetRuntimeEvents(this System.Type type) => throw null; + public static System.Reflection.FieldInfo GetRuntimeField(this System.Type type, string name) => throw null; + public static System.Collections.Generic.IEnumerable GetRuntimeFields(this System.Type type) => throw null; + public static System.Reflection.InterfaceMapping GetRuntimeInterfaceMap(this System.Reflection.TypeInfo typeInfo, System.Type interfaceType) => throw null; + public static System.Reflection.MethodInfo GetRuntimeMethod(this System.Type type, string name, System.Type[] parameters) => throw null; + public static System.Collections.Generic.IEnumerable GetRuntimeMethods(this System.Type type) => throw null; + public static System.Collections.Generic.IEnumerable GetRuntimeProperties(this System.Type type) => throw null; + public static System.Reflection.PropertyInfo GetRuntimeProperty(this System.Type type, string name) => throw null; + } + + // Generated from `System.Reflection.StrongNameKeyPair` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StrongNameKeyPair : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public System.Byte[] PublicKey { get => throw null; } + public StrongNameKeyPair(string keyPairContainer) => throw null; + public StrongNameKeyPair(System.IO.FileStream keyPairFile) => throw null; + public StrongNameKeyPair(System.Byte[] keyPairArray) => throw null; + protected StrongNameKeyPair(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Reflection.TargetException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TargetException : System.ApplicationException + { + public TargetException(string message, System.Exception inner) => throw null; + public TargetException(string message) => throw null; + public TargetException() => throw null; + protected TargetException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Reflection.TargetInvocationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TargetInvocationException : System.ApplicationException + { + public TargetInvocationException(string message, System.Exception inner) => throw null; + public TargetInvocationException(System.Exception inner) => throw null; + } + + // Generated from `System.Reflection.TargetParameterCountException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TargetParameterCountException : System.ApplicationException + { + public TargetParameterCountException(string message, System.Exception inner) => throw null; + public TargetParameterCountException(string message) => throw null; + public TargetParameterCountException() => throw null; + } + + // Generated from `System.Reflection.TypeAttributes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TypeAttributes + { + Abstract, + AnsiClass, + AutoClass, + AutoLayout, + BeforeFieldInit, + Class, + ClassSemanticsMask, + CustomFormatClass, + CustomFormatMask, + ExplicitLayout, + HasSecurity, + Import, + Interface, + LayoutMask, + NestedAssembly, + NestedFamANDAssem, + NestedFamORAssem, + NestedFamily, + NestedPrivate, + NestedPublic, + NotPublic, + Public, + RTSpecialName, + ReservedMask, + Sealed, + SequentialLayout, + Serializable, + SpecialName, + StringFormatMask, + // Stub generator skipped constructor + UnicodeClass, + VisibilityMask, + WindowsRuntime, + } + + // Generated from `System.Reflection.TypeDelegator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeDelegator : System.Reflection.TypeInfo + { + public override System.Reflection.Assembly Assembly { get => throw null; } + public override string AssemblyQualifiedName { get => throw null; } + public override System.Type BaseType { get => throw null; } + public override string FullName { get => throw null; } + public override System.Guid GUID { get => throw null; } + protected override System.Reflection.TypeAttributes GetAttributeFlagsImpl() => throw null; + protected override System.Reflection.ConstructorInfo GetConstructorImpl(System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.ConstructorInfo[] GetConstructors(System.Reflection.BindingFlags bindingAttr) => throw null; + public override object[] GetCustomAttributes(bool inherit) => throw null; + public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) => throw null; + public override System.Type GetElementType() => throw null; + public override System.Reflection.EventInfo GetEvent(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.EventInfo[] GetEvents() => throw null; + public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetInterface(string name, bool ignoreCase) => throw null; + public override System.Reflection.InterfaceMapping GetInterfaceMap(System.Type interfaceType) => throw null; + public override System.Type[] GetInterfaces() => throw null; + public override System.Reflection.MemberInfo[] GetMember(string name, System.Reflection.MemberTypes type, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.MemberInfo[] GetMembers(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type GetNestedType(string name, System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Type[] GetNestedTypes(System.Reflection.BindingFlags bindingAttr) => throw null; + public override System.Reflection.PropertyInfo[] GetProperties(System.Reflection.BindingFlags bindingAttr) => throw null; + protected override System.Reflection.PropertyInfo GetPropertyImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Type returnType, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) => throw null; + protected override bool HasElementTypeImpl() => throw null; + public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) => throw null; + protected override bool IsArrayImpl() => throw null; + public override bool IsAssignableFrom(System.Reflection.TypeInfo typeInfo) => throw null; + protected override bool IsByRefImpl() => throw null; + public override bool IsByRefLike { get => throw null; } + protected override bool IsCOMObjectImpl() => throw null; + public override bool IsCollectible { get => throw null; } + public override bool IsConstructedGenericType { get => throw null; } + public override bool IsDefined(System.Type attributeType, bool inherit) => throw null; + public override bool IsGenericMethodParameter { get => throw null; } + public override bool IsGenericTypeParameter { get => throw null; } + protected override bool IsPointerImpl() => throw null; + protected override bool IsPrimitiveImpl() => throw null; + public override bool IsSZArray { get => throw null; } + public override bool IsTypeDefinition { get => throw null; } + protected override bool IsValueTypeImpl() => throw null; + public override bool IsVariableBoundArray { get => throw null; } + public override int MetadataToken { get => throw null; } + public override System.Reflection.Module Module { get => throw null; } + public override string Name { get => throw null; } + public override string Namespace { get => throw null; } + public TypeDelegator(System.Type delegatingType) => throw null; + protected TypeDelegator() => throw null; + public override System.RuntimeTypeHandle TypeHandle { get => throw null; } + public override System.Type UnderlyingSystemType { get => throw null; } + protected System.Type typeImpl; + } + + // Generated from `System.Reflection.TypeFilter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate bool TypeFilter(System.Type m, object filterCriteria); + + // Generated from `System.Reflection.TypeInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TypeInfo : System.Type, System.Reflection.IReflectableType + { + public virtual System.Type AsType() => throw null; + public virtual System.Collections.Generic.IEnumerable DeclaredConstructors { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredEvents { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredFields { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredMembers { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredMethods { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredNestedTypes { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DeclaredProperties { get => throw null; } + public virtual System.Type[] GenericTypeParameters { get => throw null; } + public virtual System.Reflection.EventInfo GetDeclaredEvent(string name) => throw null; + public virtual System.Reflection.FieldInfo GetDeclaredField(string name) => throw null; + public virtual System.Reflection.MethodInfo GetDeclaredMethod(string name) => throw null; + public virtual System.Collections.Generic.IEnumerable GetDeclaredMethods(string name) => throw null; + public virtual System.Reflection.TypeInfo GetDeclaredNestedType(string name) => throw null; + public virtual System.Reflection.PropertyInfo GetDeclaredProperty(string name) => throw null; + System.Reflection.TypeInfo System.Reflection.IReflectableType.GetTypeInfo() => throw null; + public virtual System.Collections.Generic.IEnumerable ImplementedInterfaces { get => throw null; } + public virtual bool IsAssignableFrom(System.Reflection.TypeInfo typeInfo) => throw null; + protected TypeInfo() => throw null; + } + + } + namespace Resources + { + // Generated from `System.Resources.IResourceReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IResourceReader : System.IDisposable, System.Collections.IEnumerable + { + void Close(); + System.Collections.IDictionaryEnumerator GetEnumerator(); + } + + // Generated from `System.Resources.MissingManifestResourceException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingManifestResourceException : System.SystemException + { + public MissingManifestResourceException(string message, System.Exception inner) => throw null; + public MissingManifestResourceException(string message) => throw null; + public MissingManifestResourceException() => throw null; + protected MissingManifestResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Resources.MissingSatelliteAssemblyException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MissingSatelliteAssemblyException : System.SystemException + { + public string CultureName { get => throw null; } + public MissingSatelliteAssemblyException(string message, string cultureName) => throw null; + public MissingSatelliteAssemblyException(string message, System.Exception inner) => throw null; + public MissingSatelliteAssemblyException(string message) => throw null; + public MissingSatelliteAssemblyException() => throw null; + protected MissingSatelliteAssemblyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Resources.NeutralResourcesLanguageAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NeutralResourcesLanguageAttribute : System.Attribute + { + public string CultureName { get => throw null; } + public System.Resources.UltimateResourceFallbackLocation Location { get => throw null; } + public NeutralResourcesLanguageAttribute(string cultureName, System.Resources.UltimateResourceFallbackLocation location) => throw null; + public NeutralResourcesLanguageAttribute(string cultureName) => throw null; + } + + // Generated from `System.Resources.ResourceManager` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceManager + { + public virtual string BaseName { get => throw null; } + public static System.Resources.ResourceManager CreateFileBasedResourceManager(string baseName, string resourceDir, System.Type usingResourceSet) => throw null; + protected System.Resources.UltimateResourceFallbackLocation FallbackLocation { get => throw null; set => throw null; } + protected static System.Globalization.CultureInfo GetNeutralResourcesLanguage(System.Reflection.Assembly a) => throw null; + public virtual object GetObject(string name, System.Globalization.CultureInfo culture) => throw null; + public virtual object GetObject(string name) => throw null; + protected virtual string GetResourceFileName(System.Globalization.CultureInfo culture) => throw null; + public virtual System.Resources.ResourceSet GetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents) => throw null; + protected static System.Version GetSatelliteContractVersion(System.Reflection.Assembly a) => throw null; + public System.IO.UnmanagedMemoryStream GetStream(string name, System.Globalization.CultureInfo culture) => throw null; + public System.IO.UnmanagedMemoryStream GetStream(string name) => throw null; + public virtual string GetString(string name, System.Globalization.CultureInfo culture) => throw null; + public virtual string GetString(string name) => throw null; + public static int HeaderVersionNumber; + public virtual bool IgnoreCase { get => throw null; set => throw null; } + protected virtual System.Resources.ResourceSet InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents) => throw null; + public static int MagicNumber; + protected System.Reflection.Assembly MainAssembly; + public virtual void ReleaseAllResources() => throw null; + public ResourceManager(string baseName, System.Reflection.Assembly assembly, System.Type usingResourceSet) => throw null; + public ResourceManager(string baseName, System.Reflection.Assembly assembly) => throw null; + public ResourceManager(System.Type resourceSource) => throw null; + protected ResourceManager() => throw null; + public virtual System.Type ResourceSetType { get => throw null; } + } + + // Generated from `System.Resources.ResourceReader` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceReader : System.Resources.IResourceReader, System.IDisposable, System.Collections.IEnumerable + { + public void Close() => throw null; + public void Dispose() => throw null; + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public void GetResourceData(string resourceName, out string resourceType, out System.Byte[] resourceData) => throw null; + public ResourceReader(string fileName) => throw null; + public ResourceReader(System.IO.Stream stream) => throw null; + } + + // Generated from `System.Resources.ResourceSet` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceSet : System.IDisposable, System.Collections.IEnumerable + { + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Type GetDefaultReader() => throw null; + public virtual System.Type GetDefaultWriter() => throw null; + public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual object GetObject(string name, bool ignoreCase) => throw null; + public virtual object GetObject(string name) => throw null; + public virtual string GetString(string name, bool ignoreCase) => throw null; + public virtual string GetString(string name) => throw null; + protected virtual void ReadResources() => throw null; + public ResourceSet(string fileName) => throw null; + public ResourceSet(System.Resources.IResourceReader reader) => throw null; + public ResourceSet(System.IO.Stream stream) => throw null; + protected ResourceSet() => throw null; + } + + // Generated from `System.Resources.SatelliteContractVersionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SatelliteContractVersionAttribute : System.Attribute + { + public SatelliteContractVersionAttribute(string version) => throw null; + public string Version { get => throw null; } + } + + // Generated from `System.Resources.UltimateResourceFallbackLocation` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum UltimateResourceFallbackLocation + { + MainAssembly, + Satellite, + // Stub generator skipped constructor + } + + } + namespace Runtime + { + // Generated from `System.Runtime.AmbiguousImplementationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AmbiguousImplementationException : System.Exception + { + public AmbiguousImplementationException(string message, System.Exception innerException) => throw null; + public AmbiguousImplementationException(string message) => throw null; + public AmbiguousImplementationException() => throw null; + } + + // Generated from `System.Runtime.AssemblyTargetedPatchBandAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AssemblyTargetedPatchBandAttribute : System.Attribute + { + public AssemblyTargetedPatchBandAttribute(string targetedPatchBand) => throw null; + public string TargetedPatchBand { get => throw null; } + } + + // Generated from `System.Runtime.GCLargeObjectHeapCompactionMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCLargeObjectHeapCompactionMode + { + CompactOnce, + Default, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.GCLatencyMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCLatencyMode + { + Batch, + // Stub generator skipped constructor + Interactive, + LowLatency, + NoGCRegion, + SustainedLowLatency, + } + + // Generated from `System.Runtime.GCSettings` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class GCSettings + { + public static bool IsServerGC { get => throw null; } + public static System.Runtime.GCLargeObjectHeapCompactionMode LargeObjectHeapCompactionMode { get => throw null; set => throw null; } + public static System.Runtime.GCLatencyMode LatencyMode { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.MemoryFailPoint` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MemoryFailPoint : System.Runtime.ConstrainedExecution.CriticalFinalizerObject, System.IDisposable + { + public void Dispose() => throw null; + public MemoryFailPoint(int sizeInMegabytes) => throw null; + // ERR: Stub generator didn't handle member: ~MemoryFailPoint + } + + // Generated from `System.Runtime.ProfileOptimization` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ProfileOptimization + { + public static void SetProfileRoot(string directoryPath) => throw null; + public static void StartProfile(string profile) => throw null; + } + + // Generated from `System.Runtime.TargetedPatchingOptOutAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TargetedPatchingOptOutAttribute : System.Attribute + { + public string Reason { get => throw null; } + public TargetedPatchingOptOutAttribute(string reason) => throw null; + } + + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.AccessedThroughPropertyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AccessedThroughPropertyAttribute : System.Attribute + { + public AccessedThroughPropertyAttribute(string propertyName) => throw null; + public string PropertyName { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncIteratorMethodBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncIteratorMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void Complete() => throw null; + public static System.Runtime.CompilerServices.AsyncIteratorMethodBuilder Create() => throw null; + public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + } + + // Generated from `System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute + { + public AsyncIteratorStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.AsyncMethodBuilderAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncMethodBuilderAttribute : System.Attribute + { + public AsyncMethodBuilderAttribute(System.Type builderType) => throw null; + public System.Type BuilderType { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncStateMachineAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute + { + public AsyncStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.AsyncTaskMethodBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncTaskMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public static System.Runtime.CompilerServices.AsyncTaskMethodBuilder Create() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetResult() => throw null; + public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) => throw null; + public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public System.Threading.Tasks.Task Task { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncTaskMethodBuilder<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncTaskMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public static System.Runtime.CompilerServices.AsyncTaskMethodBuilder Create() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetResult(TResult result) => throw null; + public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) => throw null; + public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public System.Threading.Tasks.Task Task { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncValueTaskMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public static System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder Create() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetResult() => throw null; + public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) => throw null; + public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public System.Threading.Tasks.ValueTask Task { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncValueTaskMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public static System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder Create() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetResult(TResult result) => throw null; + public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) => throw null; + public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public System.Threading.Tasks.ValueTask Task { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.AsyncVoidMethodBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncVoidMethodBuilder + { + // Stub generator skipped constructor + public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.INotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : System.Runtime.CompilerServices.ICriticalNotifyCompletion where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + public static System.Runtime.CompilerServices.AsyncVoidMethodBuilder Create() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetResult() => throw null; + public void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) => throw null; + public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallConvCdecl` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallConvCdecl + { + public CallConvCdecl() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallConvFastcall` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallConvFastcall + { + public CallConvFastcall() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallConvStdcall` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallConvStdcall + { + public CallConvStdcall() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallConvThiscall` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallConvThiscall + { + public CallConvThiscall() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallerArgumentExpressionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallerArgumentExpressionAttribute : System.Attribute + { + public CallerArgumentExpressionAttribute(string parameterName) => throw null; + public string ParameterName { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.CallerFilePathAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallerFilePathAttribute : System.Attribute + { + public CallerFilePathAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallerLineNumberAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallerLineNumberAttribute : System.Attribute + { + public CallerLineNumberAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CallerMemberNameAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CallerMemberNameAttribute : System.Attribute + { + public CallerMemberNameAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CompilationRelaxations` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CompilationRelaxations + { + // Stub generator skipped constructor + NoStringInterning, + } + + // Generated from `System.Runtime.CompilerServices.CompilationRelaxationsAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompilationRelaxationsAttribute : System.Attribute + { + public int CompilationRelaxations { get => throw null; } + public CompilationRelaxationsAttribute(int relaxations) => throw null; + public CompilationRelaxationsAttribute(System.Runtime.CompilerServices.CompilationRelaxations relaxations) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CompilerGeneratedAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompilerGeneratedAttribute : System.Attribute + { + public CompilerGeneratedAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CompilerGlobalScopeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompilerGlobalScopeAttribute : System.Attribute + { + public CompilerGlobalScopeAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConditionalWeakTable<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConditionalWeakTable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> where TKey : class where TValue : class + { + public void Add(TKey key, TValue value) => throw null; + public void AddOrUpdate(TKey key, TValue value) => throw null; + public void Clear() => throw null; + public ConditionalWeakTable() => throw null; + // Generated from `System.Runtime.CompilerServices.ConditionalWeakTable<,>.CreateValueCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate TValue CreateValueCallback(TKey key); + + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public TValue GetOrCreateValue(TKey key) => throw null; + public TValue GetValue(TKey key, System.Runtime.CompilerServices.ConditionalWeakTable.CreateValueCallback createValueCallback) => throw null; + public bool Remove(TKey key) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredAsyncDisposable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredAsyncDisposable + { + // Stub generator skipped constructor + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredCancelableAsyncEnumerable + { + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(bool continueOnCapturedContext) => throw null; + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Enumerator + { + public T Current { get => throw null; } + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() => throw null; + // Stub generator skipped constructor + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable MoveNextAsync() => throw null; + } + + + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable.Enumerator GetAsyncEnumerator() => throw null; + public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredTaskAwaitable + { + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + // Stub generator skipped constructor + public void GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + + public System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter GetAwaiter() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredTaskAwaitable + { + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + // Stub generator skipped constructor + public TResult GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + + public System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter GetAwaiter() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredValueTaskAwaitable + { + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + // Stub generator skipped constructor + public void GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter GetAwaiter() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredValueTaskAwaitable + { + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>.ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + // Stub generator skipped constructor + public TResult GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter GetAwaiter() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.CustomConstantAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CustomConstantAttribute : System.Attribute + { + protected CustomConstantAttribute() => throw null; + public abstract object Value { get; } + } + + // Generated from `System.Runtime.CompilerServices.DateTimeConstantAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DateTimeConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute + { + public DateTimeConstantAttribute(System.Int64 ticks) => throw null; + public override object Value { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.DecimalConstantAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecimalConstantAttribute : System.Attribute + { + public DecimalConstantAttribute(System.Byte scale, System.Byte sign, int hi, int mid, int low) => throw null; + public DecimalConstantAttribute(System.Byte scale, System.Byte sign, System.UInt32 hi, System.UInt32 mid, System.UInt32 low) => throw null; + public System.Decimal Value { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.DefaultDependencyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DefaultDependencyAttribute : System.Attribute + { + public DefaultDependencyAttribute(System.Runtime.CompilerServices.LoadHint loadHintArgument) => throw null; + public System.Runtime.CompilerServices.LoadHint LoadHint { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.DependencyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DependencyAttribute : System.Attribute + { + public DependencyAttribute(string dependentAssemblyArgument, System.Runtime.CompilerServices.LoadHint loadHintArgument) => throw null; + public string DependentAssembly { get => throw null; } + public System.Runtime.CompilerServices.LoadHint LoadHint { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.DisablePrivateReflectionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DisablePrivateReflectionAttribute : System.Attribute + { + public DisablePrivateReflectionAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.DiscardableAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DiscardableAttribute : System.Attribute + { + public DiscardableAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.EnumeratorCancellationAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EnumeratorCancellationAttribute : System.Attribute + { + public EnumeratorCancellationAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ExtensionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExtensionAttribute : System.Attribute + { + public ExtensionAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.FixedAddressValueTypeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FixedAddressValueTypeAttribute : System.Attribute + { + public FixedAddressValueTypeAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.FixedBufferAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FixedBufferAttribute : System.Attribute + { + public System.Type ElementType { get => throw null; } + public FixedBufferAttribute(System.Type elementType, int length) => throw null; + public int Length { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.FormattableStringFactory` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class FormattableStringFactory + { + public static System.FormattableString Create(string format, params object[] arguments) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.IAsyncStateMachine` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IAsyncStateMachine + { + void MoveNext(); + void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine stateMachine); + } + + // Generated from `System.Runtime.CompilerServices.ICriticalNotifyCompletion` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICriticalNotifyCompletion : System.Runtime.CompilerServices.INotifyCompletion + { + void UnsafeOnCompleted(System.Action continuation); + } + + // Generated from `System.Runtime.CompilerServices.INotifyCompletion` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface INotifyCompletion + { + void OnCompleted(System.Action continuation); + } + + // Generated from `System.Runtime.CompilerServices.IStrongBox` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStrongBox + { + object Value { get; set; } + } + + // Generated from `System.Runtime.CompilerServices.ITuple` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITuple + { + object this[int index] { get; } + int Length { get; } + } + + // Generated from `System.Runtime.CompilerServices.IndexerNameAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IndexerNameAttribute : System.Attribute + { + public IndexerNameAttribute(string indexerName) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.InternalsVisibleToAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InternalsVisibleToAttribute : System.Attribute + { + public bool AllInternalsVisible { get => throw null; set => throw null; } + public string AssemblyName { get => throw null; } + public InternalsVisibleToAttribute(string assemblyName) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.IsByRefLikeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IsByRefLikeAttribute : System.Attribute + { + public IsByRefLikeAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.IsConst` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsConst + { + } + + // Generated from `System.Runtime.CompilerServices.IsExternalInit` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsExternalInit + { + } + + // Generated from `System.Runtime.CompilerServices.IsReadOnlyAttribute` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.IO.Pipelines, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public partial class IsReadOnlyAttribute : System.Attribute + { + public IsReadOnlyAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.IsVolatile` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class IsVolatile + { + } + + // Generated from `System.Runtime.CompilerServices.IteratorStateMachineAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute + { + public IteratorStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.LoadHint` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LoadHint + { + Always, + Default, + // Stub generator skipped constructor + Sometimes, + } + + // Generated from `System.Runtime.CompilerServices.MethodCodeType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum MethodCodeType + { + IL, + // Stub generator skipped constructor + Native, + OPTIL, + Runtime, + } + + // Generated from `System.Runtime.CompilerServices.MethodImplAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MethodImplAttribute : System.Attribute + { + public System.Runtime.CompilerServices.MethodCodeType MethodCodeType; + public MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions methodImplOptions) => throw null; + public MethodImplAttribute(System.Int16 value) => throw null; + public MethodImplAttribute() => throw null; + public System.Runtime.CompilerServices.MethodImplOptions Value { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.MethodImplOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum MethodImplOptions + { + AggressiveInlining, + AggressiveOptimization, + ForwardRef, + InternalCall, + // Stub generator skipped constructor + NoInlining, + NoOptimization, + PreserveSig, + Synchronized, + Unmanaged, + } + + // Generated from `System.Runtime.CompilerServices.ModuleInitializerAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ModuleInitializerAttribute : System.Attribute + { + public ModuleInitializerAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.PreserveBaseOverridesAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PreserveBaseOverridesAttribute : System.Attribute + { + public PreserveBaseOverridesAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ReferenceAssemblyAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReferenceAssemblyAttribute : System.Attribute + { + public string Description { get => throw null; } + public ReferenceAssemblyAttribute(string description) => throw null; + public ReferenceAssemblyAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.RuntimeCompatibilityAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuntimeCompatibilityAttribute : System.Attribute + { + public RuntimeCompatibilityAttribute() => throw null; + public bool WrapNonExceptionThrows { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.RuntimeFeature` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RuntimeFeature + { + public const string CovariantReturnsOfClasses = default; + public const string DefaultImplementationsOfInterfaces = default; + public static bool IsDynamicCodeCompiled { get => throw null; } + public static bool IsDynamicCodeSupported { get => throw null; } + public static bool IsSupported(string feature) => throw null; + public const string PortablePdb = default; + public const string UnmanagedSignatureCallingConvention = default; + } + + // Generated from `System.Runtime.CompilerServices.RuntimeHelpers` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RuntimeHelpers + { + public static System.IntPtr AllocateTypeAssociatedMemory(System.Type type, int size) => throw null; + // Generated from `System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void CleanupCode(object userData, bool exceptionThrown); + + + public static void EnsureSufficientExecutionStack() => throw null; + public static bool Equals(object o1, object o2) => throw null; + public static void ExecuteCodeWithGuaranteedCleanup(System.Runtime.CompilerServices.RuntimeHelpers.TryCode code, System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode backoutCode, object userData) => throw null; + public static int GetHashCode(object o) => throw null; + public static object GetObjectValue(object obj) => throw null; + public static T[] GetSubArray(T[] array, System.Range range) => throw null; + public static object GetUninitializedObject(System.Type type) => throw null; + public static void InitializeArray(System.Array array, System.RuntimeFieldHandle fldHandle) => throw null; + public static bool IsReferenceOrContainsReferences() => throw null; + public static int OffsetToStringData { get => throw null; } + public static void PrepareConstrainedRegions() => throw null; + public static void PrepareConstrainedRegionsNoOP() => throw null; + public static void PrepareContractedDelegate(System.Delegate d) => throw null; + public static void PrepareDelegate(System.Delegate d) => throw null; + public static void PrepareMethod(System.RuntimeMethodHandle method, System.RuntimeTypeHandle[] instantiation) => throw null; + public static void PrepareMethod(System.RuntimeMethodHandle method) => throw null; + public static void ProbeForSufficientStack() => throw null; + public static void RunClassConstructor(System.RuntimeTypeHandle type) => throw null; + public static void RunModuleConstructor(System.ModuleHandle module) => throw null; + // Generated from `System.Runtime.CompilerServices.RuntimeHelpers.TryCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void TryCode(object userData); + + + public static bool TryEnsureSufficientExecutionStack() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.RuntimeWrappedException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RuntimeWrappedException : System.Exception + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public RuntimeWrappedException(object thrownObject) => throw null; + public object WrappedException { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.SkipLocalsInitAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SkipLocalsInitAttribute : System.Attribute + { + public SkipLocalsInitAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.SpecialNameAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SpecialNameAttribute : System.Attribute + { + public SpecialNameAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.StateMachineAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StateMachineAttribute : System.Attribute + { + public StateMachineAttribute(System.Type stateMachineType) => throw null; + public System.Type StateMachineType { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.StringFreezingAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringFreezingAttribute : System.Attribute + { + public StringFreezingAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.StrongBox<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StrongBox : System.Runtime.CompilerServices.IStrongBox + { + public StrongBox(T value) => throw null; + public StrongBox() => throw null; + public T Value; + object System.Runtime.CompilerServices.IStrongBox.Value { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.SuppressIldasmAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SuppressIldasmAttribute : System.Attribute + { + public SuppressIldasmAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.SwitchExpressionException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SwitchExpressionException : System.InvalidOperationException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public SwitchExpressionException(string message, System.Exception innerException) => throw null; + public SwitchExpressionException(string message) => throw null; + public SwitchExpressionException(object unmatchedValue) => throw null; + public SwitchExpressionException(System.Exception innerException) => throw null; + public SwitchExpressionException() => throw null; + public object UnmatchedValue { get => throw null; } + } + + // Generated from `System.Runtime.CompilerServices.TaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + public void GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + // Stub generator skipped constructor + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.TaskAwaiter<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct TaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + public TResult GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + // Stub generator skipped constructor + public void UnsafeOnCompleted(System.Action continuation) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.TupleElementNamesAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TupleElementNamesAttribute : System.Attribute + { + public System.Collections.Generic.IList TransformNames { get => throw null; } + public TupleElementNamesAttribute(string[] transformNames) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.TypeForwardedFromAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeForwardedFromAttribute : System.Attribute + { + public string AssemblyFullName { get => throw null; } + public TypeForwardedFromAttribute(string assemblyFullName) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.TypeForwardedToAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TypeForwardedToAttribute : System.Attribute + { + public System.Type Destination { get => throw null; } + public TypeForwardedToAttribute(System.Type destination) => throw null; + } + + // Generated from `System.Runtime.CompilerServices.UnsafeValueTypeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnsafeValueTypeAttribute : System.Attribute + { + public UnsafeValueTypeAttribute() => throw null; + } + + // Generated from `System.Runtime.CompilerServices.ValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + public void GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.CompilerServices.ValueTaskAwaiter<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + public TResult GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.CompilerServices.YieldAwaitable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct YieldAwaitable + { + public System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter GetAwaiter() => throw null; + // Stub generator skipped constructor + // Generated from `System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct YieldAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion + { + public void GetResult() => throw null; + public bool IsCompleted { get => throw null; } + public void OnCompleted(System.Action continuation) => throw null; + public void UnsafeOnCompleted(System.Action continuation) => throw null; + // Stub generator skipped constructor + } + + + } + + } + namespace ConstrainedExecution + { + // Generated from `System.Runtime.ConstrainedExecution.Cer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Cer + { + // Stub generator skipped constructor + MayFail, + None, + Success, + } + + // Generated from `System.Runtime.ConstrainedExecution.Consistency` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Consistency + { + // Stub generator skipped constructor + MayCorruptAppDomain, + MayCorruptInstance, + MayCorruptProcess, + WillNotCorruptState, + } + + // Generated from `System.Runtime.ConstrainedExecution.CriticalFinalizerObject` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CriticalFinalizerObject + { + protected CriticalFinalizerObject() => throw null; + // ERR: Stub generator didn't handle member: ~CriticalFinalizerObject + } + + // Generated from `System.Runtime.ConstrainedExecution.PrePrepareMethodAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PrePrepareMethodAttribute : System.Attribute + { + public PrePrepareMethodAttribute() => throw null; + } + + // Generated from `System.Runtime.ConstrainedExecution.ReliabilityContractAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReliabilityContractAttribute : System.Attribute + { + public System.Runtime.ConstrainedExecution.Cer Cer { get => throw null; } + public System.Runtime.ConstrainedExecution.Consistency ConsistencyGuarantee { get => throw null; } + public ReliabilityContractAttribute(System.Runtime.ConstrainedExecution.Consistency consistencyGuarantee, System.Runtime.ConstrainedExecution.Cer cer) => throw null; + } + + } + namespace ExceptionServices + { + // Generated from `System.Runtime.ExceptionServices.ExceptionDispatchInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExceptionDispatchInfo + { + public static System.Runtime.ExceptionServices.ExceptionDispatchInfo Capture(System.Exception source) => throw null; + public static System.Exception SetCurrentStackTrace(System.Exception source) => throw null; + public System.Exception SourceException { get => throw null; } + public void Throw() => throw null; + public static void Throw(System.Exception source) => throw null; + } + + // Generated from `System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FirstChanceExceptionEventArgs : System.EventArgs + { + public System.Exception Exception { get => throw null; } + public FirstChanceExceptionEventArgs(System.Exception exception) => throw null; + } + + // Generated from `System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HandleProcessCorruptedStateExceptionsAttribute : System.Attribute + { + public HandleProcessCorruptedStateExceptionsAttribute() => throw null; + } + + } + namespace InteropServices + { + // Generated from `System.Runtime.InteropServices.CharSet` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CharSet + { + Ansi, + Auto, + // Stub generator skipped constructor + None, + Unicode, + } + + // Generated from `System.Runtime.InteropServices.ComVisibleAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComVisibleAttribute : System.Attribute + { + public ComVisibleAttribute(bool visibility) => throw null; + public bool Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.CriticalHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CriticalHandle : System.Runtime.ConstrainedExecution.CriticalFinalizerObject, System.IDisposable + { + public void Close() => throw null; + protected CriticalHandle(System.IntPtr invalidHandleValue) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsClosed { get => throw null; } + public abstract bool IsInvalid { get; } + protected abstract bool ReleaseHandle(); + protected void SetHandle(System.IntPtr handle) => throw null; + public void SetHandleAsInvalid() => throw null; + protected System.IntPtr handle; + // ERR: Stub generator didn't handle member: ~CriticalHandle + } + + // Generated from `System.Runtime.InteropServices.ExternalException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExternalException : System.SystemException + { + public virtual int ErrorCode { get => throw null; } + public ExternalException(string message, int errorCode) => throw null; + public ExternalException(string message, System.Exception inner) => throw null; + public ExternalException(string message) => throw null; + public ExternalException() => throw null; + protected ExternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Runtime.InteropServices.FieldOffsetAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FieldOffsetAttribute : System.Attribute + { + public FieldOffsetAttribute(int offset) => throw null; + public int Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.GCHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct GCHandle + { + public static bool operator !=(System.Runtime.InteropServices.GCHandle a, System.Runtime.InteropServices.GCHandle b) => throw null; + public static bool operator ==(System.Runtime.InteropServices.GCHandle a, System.Runtime.InteropServices.GCHandle b) => throw null; + public System.IntPtr AddrOfPinnedObject() => throw null; + public static System.Runtime.InteropServices.GCHandle Alloc(object value, System.Runtime.InteropServices.GCHandleType type) => throw null; + public static System.Runtime.InteropServices.GCHandle Alloc(object value) => throw null; + public override bool Equals(object o) => throw null; + public void Free() => throw null; + public static System.Runtime.InteropServices.GCHandle FromIntPtr(System.IntPtr value) => throw null; + // Stub generator skipped constructor + public override int GetHashCode() => throw null; + public bool IsAllocated { get => throw null; } + public object Target { get => throw null; set => throw null; } + public static System.IntPtr ToIntPtr(System.Runtime.InteropServices.GCHandle value) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Runtime.InteropServices.GCHandleType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum GCHandleType + { + // Stub generator skipped constructor + Normal, + Pinned, + Weak, + WeakTrackResurrection, + } + + // Generated from `System.Runtime.InteropServices.InAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InAttribute : System.Attribute + { + public InAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.LayoutKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LayoutKind + { + Auto, + Explicit, + // Stub generator skipped constructor + Sequential, + } + + // Generated from `System.Runtime.InteropServices.OutAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OutAttribute : System.Attribute + { + public OutAttribute() => throw null; + } + + // Generated from `System.Runtime.InteropServices.SafeBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SafeBuffer : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + unsafe public void AcquirePointer(ref System.Byte* pointer) => throw null; + public System.UInt64 ByteLength { get => throw null; } + public void Initialize(System.UInt32 numElements) where T : struct => throw null; + public void Initialize(System.UInt64 numBytes) => throw null; + public void Initialize(System.UInt32 numElements, System.UInt32 sizeOfEachElement) => throw null; + public T Read(System.UInt64 byteOffset) where T : struct => throw null; + public void ReadArray(System.UInt64 byteOffset, T[] array, int index, int count) where T : struct => throw null; + public void ReleasePointer() => throw null; + protected SafeBuffer(bool ownsHandle) : base(default(bool)) => throw null; + public void Write(System.UInt64 byteOffset, T value) where T : struct => throw null; + public void WriteArray(System.UInt64 byteOffset, T[] array, int index, int count) where T : struct => throw null; + } + + // Generated from `System.Runtime.InteropServices.SafeHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SafeHandle : System.Runtime.ConstrainedExecution.CriticalFinalizerObject, System.IDisposable + { + public void Close() => throw null; + public void DangerousAddRef(ref bool success) => throw null; + public System.IntPtr DangerousGetHandle() => throw null; + public void DangerousRelease() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsClosed { get => throw null; } + public abstract bool IsInvalid { get; } + protected abstract bool ReleaseHandle(); + protected SafeHandle(System.IntPtr invalidHandleValue, bool ownsHandle) => throw null; + protected void SetHandle(System.IntPtr handle) => throw null; + public void SetHandleAsInvalid() => throw null; + protected System.IntPtr handle; + // ERR: Stub generator didn't handle member: ~SafeHandle + } + + // Generated from `System.Runtime.InteropServices.StructLayoutAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StructLayoutAttribute : System.Attribute + { + public System.Runtime.InteropServices.CharSet CharSet; + public int Pack; + public int Size; + public StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind layoutKind) => throw null; + public StructLayoutAttribute(System.Int16 layoutKind) => throw null; + public System.Runtime.InteropServices.LayoutKind Value { get => throw null; } + } + + // Generated from `System.Runtime.InteropServices.SuppressGCTransitionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SuppressGCTransitionAttribute : System.Attribute + { + public SuppressGCTransitionAttribute() => throw null; + } + + } + namespace Remoting + { + // Generated from `System.Runtime.Remoting.ObjectHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ObjectHandle : System.MarshalByRefObject + { + public ObjectHandle(object o) => throw null; + public object Unwrap() => throw null; + } + + } + namespace Serialization + { + // Generated from `System.Runtime.Serialization.IDeserializationCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDeserializationCallback + { + void OnDeserialization(object sender); + } + + // Generated from `System.Runtime.Serialization.IFormatterConverter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IFormatterConverter + { + object Convert(object value, System.TypeCode typeCode); + object Convert(object value, System.Type type); + bool ToBoolean(object value); + System.Byte ToByte(object value); + System.Char ToChar(object value); + System.DateTime ToDateTime(object value); + System.Decimal ToDecimal(object value); + double ToDouble(object value); + System.Int16 ToInt16(object value); + int ToInt32(object value); + System.Int64 ToInt64(object value); + System.SByte ToSByte(object value); + float ToSingle(object value); + string ToString(object value); + System.UInt16 ToUInt16(object value); + System.UInt32 ToUInt32(object value); + System.UInt64 ToUInt64(object value); + } + + // Generated from `System.Runtime.Serialization.IObjectReference` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IObjectReference + { + object GetRealObject(System.Runtime.Serialization.StreamingContext context); + } + + // Generated from `System.Runtime.Serialization.ISafeSerializationData` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISafeSerializationData + { + void CompleteDeserialization(object deserialized); + } + + // Generated from `System.Runtime.Serialization.ISerializable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISerializable + { + void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); + } + + // Generated from `System.Runtime.Serialization.OnDeserializedAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OnDeserializedAttribute : System.Attribute + { + public OnDeserializedAttribute() => throw null; + } + + // Generated from `System.Runtime.Serialization.OnDeserializingAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OnDeserializingAttribute : System.Attribute + { + public OnDeserializingAttribute() => throw null; + } + + // Generated from `System.Runtime.Serialization.OnSerializedAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OnSerializedAttribute : System.Attribute + { + public OnSerializedAttribute() => throw null; + } + + // Generated from `System.Runtime.Serialization.OnSerializingAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OnSerializingAttribute : System.Attribute + { + public OnSerializingAttribute() => throw null; + } + + // Generated from `System.Runtime.Serialization.OptionalFieldAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OptionalFieldAttribute : System.Attribute + { + public OptionalFieldAttribute() => throw null; + public int VersionAdded { get => throw null; set => throw null; } + } + + // Generated from `System.Runtime.Serialization.SafeSerializationEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeSerializationEventArgs : System.EventArgs + { + public void AddSerializedState(System.Runtime.Serialization.ISafeSerializationData serializedState) => throw null; + public System.Runtime.Serialization.StreamingContext StreamingContext { get => throw null; } + } + + // Generated from `System.Runtime.Serialization.SerializationEntry` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SerializationEntry + { + public string Name { get => throw null; } + public System.Type ObjectType { get => throw null; } + // Stub generator skipped constructor + public object Value { get => throw null; } + } + + // Generated from `System.Runtime.Serialization.SerializationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SerializationException : System.SystemException + { + public SerializationException(string message, System.Exception innerException) => throw null; + public SerializationException(string message) => throw null; + public SerializationException() => throw null; + protected SerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Runtime.Serialization.SerializationInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SerializationInfo + { + public void AddValue(string name, object value, System.Type type) => throw null; + public void AddValue(string name, object value) => throw null; + public void AddValue(string name, int value) => throw null; + public void AddValue(string name, float value) => throw null; + public void AddValue(string name, double value) => throw null; + public void AddValue(string name, bool value) => throw null; + public void AddValue(string name, System.UInt64 value) => throw null; + public void AddValue(string name, System.UInt32 value) => throw null; + public void AddValue(string name, System.UInt16 value) => throw null; + public void AddValue(string name, System.SByte value) => throw null; + public void AddValue(string name, System.Int64 value) => throw null; + public void AddValue(string name, System.Int16 value) => throw null; + public void AddValue(string name, System.Decimal value) => throw null; + public void AddValue(string name, System.DateTime value) => throw null; + public void AddValue(string name, System.Char value) => throw null; + public void AddValue(string name, System.Byte value) => throw null; + public string AssemblyName { get => throw null; set => throw null; } + public string FullTypeName { get => throw null; set => throw null; } + public bool GetBoolean(string name) => throw null; + public System.Byte GetByte(string name) => throw null; + public System.Char GetChar(string name) => throw null; + public System.DateTime GetDateTime(string name) => throw null; + public System.Decimal GetDecimal(string name) => throw null; + public double GetDouble(string name) => throw null; + public System.Runtime.Serialization.SerializationInfoEnumerator GetEnumerator() => throw null; + public System.Int16 GetInt16(string name) => throw null; + public int GetInt32(string name) => throw null; + public System.Int64 GetInt64(string name) => throw null; + public System.SByte GetSByte(string name) => throw null; + public float GetSingle(string name) => throw null; + public string GetString(string name) => throw null; + public System.UInt16 GetUInt16(string name) => throw null; + public System.UInt32 GetUInt32(string name) => throw null; + public System.UInt64 GetUInt64(string name) => throw null; + public object GetValue(string name, System.Type type) => throw null; + public bool IsAssemblyNameSetExplicit { get => throw null; } + public bool IsFullTypeNameSetExplicit { get => throw null; } + public int MemberCount { get => throw null; } + public System.Type ObjectType { get => throw null; } + public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust) => throw null; + public SerializationInfo(System.Type type, System.Runtime.Serialization.IFormatterConverter converter) => throw null; + public void SetType(System.Type type) => throw null; + } + + // Generated from `System.Runtime.Serialization.SerializationInfoEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SerializationInfoEnumerator : System.Collections.IEnumerator + { + public System.Runtime.Serialization.SerializationEntry Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public string Name { get => throw null; } + public System.Type ObjectType { get => throw null; } + public void Reset() => throw null; + public object Value { get => throw null; } + } + + // Generated from `System.Runtime.Serialization.StreamingContext` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct StreamingContext + { + public object Context { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public System.Runtime.Serialization.StreamingContextStates State { get => throw null; } + public StreamingContext(System.Runtime.Serialization.StreamingContextStates state, object additional) => throw null; + public StreamingContext(System.Runtime.Serialization.StreamingContextStates state) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.Serialization.StreamingContextStates` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum StreamingContextStates + { + All, + Clone, + CrossAppDomain, + CrossMachine, + CrossProcess, + File, + Other, + Persistence, + Remoting, + // Stub generator skipped constructor + } + + } + namespace Versioning + { + // Generated from `System.Runtime.Versioning.ComponentGuaranteesAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ComponentGuaranteesAttribute : System.Attribute + { + public ComponentGuaranteesAttribute(System.Runtime.Versioning.ComponentGuaranteesOptions guarantees) => throw null; + public System.Runtime.Versioning.ComponentGuaranteesOptions Guarantees { get => throw null; } + } + + // Generated from `System.Runtime.Versioning.ComponentGuaranteesOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ComponentGuaranteesOptions + { + // Stub generator skipped constructor + Exchange, + None, + SideBySide, + Stable, + } + + // Generated from `System.Runtime.Versioning.FrameworkName` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FrameworkName : System.IEquatable + { + public static bool operator !=(System.Runtime.Versioning.FrameworkName left, System.Runtime.Versioning.FrameworkName right) => throw null; + public static bool operator ==(System.Runtime.Versioning.FrameworkName left, System.Runtime.Versioning.FrameworkName right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Runtime.Versioning.FrameworkName other) => throw null; + public FrameworkName(string identifier, System.Version version, string profile) => throw null; + public FrameworkName(string identifier, System.Version version) => throw null; + public FrameworkName(string frameworkName) => throw null; + public string FullName { get => throw null; } + public override int GetHashCode() => throw null; + public string Identifier { get => throw null; } + public string Profile { get => throw null; } + public override string ToString() => throw null; + public System.Version Version { get => throw null; } + } + + // Generated from `System.Runtime.Versioning.OSPlatformAttribute` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract partial class OSPlatformAttribute : System.Attribute + { + protected private OSPlatformAttribute(string platformName) => throw null; + public string PlatformName { get => throw null; } + } + + // Generated from `System.Runtime.Versioning.ResourceConsumptionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceConsumptionAttribute : System.Attribute + { + public System.Runtime.Versioning.ResourceScope ConsumptionScope { get => throw null; } + public ResourceConsumptionAttribute(System.Runtime.Versioning.ResourceScope resourceScope, System.Runtime.Versioning.ResourceScope consumptionScope) => throw null; + public ResourceConsumptionAttribute(System.Runtime.Versioning.ResourceScope resourceScope) => throw null; + public System.Runtime.Versioning.ResourceScope ResourceScope { get => throw null; } + } + + // Generated from `System.Runtime.Versioning.ResourceExposureAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ResourceExposureAttribute : System.Attribute + { + public ResourceExposureAttribute(System.Runtime.Versioning.ResourceScope exposureLevel) => throw null; + public System.Runtime.Versioning.ResourceScope ResourceExposureLevel { get => throw null; } + } + + // Generated from `System.Runtime.Versioning.ResourceScope` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ResourceScope + { + AppDomain, + Assembly, + Library, + Machine, + None, + Private, + Process, + // Stub generator skipped constructor + } + + // Generated from `System.Runtime.Versioning.SupportedOSPlatformAttribute` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public partial class SupportedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute + { + public SupportedOSPlatformAttribute(string platformName) : base(default(string)) => throw null; + } + + // Generated from `System.Runtime.Versioning.TargetFrameworkAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TargetFrameworkAttribute : System.Attribute + { + public string FrameworkDisplayName { get => throw null; set => throw null; } + public string FrameworkName { get => throw null; } + public TargetFrameworkAttribute(string frameworkName) => throw null; + } + + // Generated from `System.Runtime.Versioning.TargetPlatformAttribute` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public partial class TargetPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute + { + public TargetPlatformAttribute(string platformName) : base(default(string)) => throw null; + } + + // Generated from `System.Runtime.Versioning.UnsupportedOSPlatformAttribute` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public partial class UnsupportedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute + { + public UnsupportedOSPlatformAttribute(string platformName) : base(default(string)) => throw null; + } + + // Generated from `System.Runtime.Versioning.VersioningHelper` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class VersioningHelper + { + public static string MakeVersionSafeName(string name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to, System.Type type) => throw null; + public static string MakeVersionSafeName(string name, System.Runtime.Versioning.ResourceScope from, System.Runtime.Versioning.ResourceScope to) => throw null; + } + + } + } + namespace Security + { + // Generated from `System.Security.AllowPartiallyTrustedCallersAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AllowPartiallyTrustedCallersAttribute : System.Attribute + { + public AllowPartiallyTrustedCallersAttribute() => throw null; + public System.Security.PartialTrustVisibilityLevel PartialTrustVisibilityLevel { get => throw null; set => throw null; } + } + + // Generated from `System.Security.IPermission` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IPermission : System.Security.ISecurityEncodable + { + System.Security.IPermission Copy(); + void Demand(); + System.Security.IPermission Intersect(System.Security.IPermission target); + bool IsSubsetOf(System.Security.IPermission target); + System.Security.IPermission Union(System.Security.IPermission target); + } + + // Generated from `System.Security.ISecurityEncodable` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISecurityEncodable + { + void FromXml(System.Security.SecurityElement e); + System.Security.SecurityElement ToXml(); + } + + // Generated from `System.Security.IStackWalk` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IStackWalk + { + void Assert(); + void Demand(); + void Deny(); + void PermitOnly(); + } + + // Generated from `System.Security.PartialTrustVisibilityLevel` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PartialTrustVisibilityLevel + { + NotVisibleByDefault, + // Stub generator skipped constructor + VisibleToAllHosts, + } + + // Generated from `System.Security.PermissionSet` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PermissionSet : System.Security.IStackWalk, System.Security.ISecurityEncodable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.ICollection + { + public System.Security.IPermission AddPermission(System.Security.IPermission perm) => throw null; + protected virtual System.Security.IPermission AddPermissionImpl(System.Security.IPermission perm) => throw null; + public void Assert() => throw null; + public bool ContainsNonCodeAccessPermissions() => throw null; + public static System.Byte[] ConvertPermissionSet(string inFormat, System.Byte[] inData, string outFormat) => throw null; + public virtual System.Security.PermissionSet Copy() => throw null; + public virtual void CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public void Demand() => throw null; + public void Deny() => throw null; + public override bool Equals(object o) => throw null; + public virtual void FromXml(System.Security.SecurityElement et) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + protected virtual System.Collections.IEnumerator GetEnumeratorImpl() => throw null; + public override int GetHashCode() => throw null; + public System.Security.IPermission GetPermission(System.Type permClass) => throw null; + protected virtual System.Security.IPermission GetPermissionImpl(System.Type permClass) => throw null; + public System.Security.PermissionSet Intersect(System.Security.PermissionSet other) => throw null; + public bool IsEmpty() => throw null; + public virtual bool IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Security.PermissionSet target) => throw null; + public virtual bool IsSynchronized { get => throw null; } + public bool IsUnrestricted() => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public PermissionSet(System.Security.Permissions.PermissionState state) => throw null; + public PermissionSet(System.Security.PermissionSet permSet) => throw null; + public void PermitOnly() => throw null; + public System.Security.IPermission RemovePermission(System.Type permClass) => throw null; + protected virtual System.Security.IPermission RemovePermissionImpl(System.Type permClass) => throw null; + public static void RevertAssert() => throw null; + public System.Security.IPermission SetPermission(System.Security.IPermission perm) => throw null; + protected virtual System.Security.IPermission SetPermissionImpl(System.Security.IPermission perm) => throw null; + public virtual object SyncRoot { get => throw null; } + public override string ToString() => throw null; + public virtual System.Security.SecurityElement ToXml() => throw null; + public System.Security.PermissionSet Union(System.Security.PermissionSet other) => throw null; + } + + // Generated from `System.Security.SecurityCriticalAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityCriticalAttribute : System.Attribute + { + public System.Security.SecurityCriticalScope Scope { get => throw null; } + public SecurityCriticalAttribute(System.Security.SecurityCriticalScope scope) => throw null; + public SecurityCriticalAttribute() => throw null; + } + + // Generated from `System.Security.SecurityCriticalScope` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SecurityCriticalScope + { + Everything, + Explicit, + // Stub generator skipped constructor + } + + // Generated from `System.Security.SecurityElement` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityElement + { + public void AddAttribute(string name, string value) => throw null; + public void AddChild(System.Security.SecurityElement child) => throw null; + public string Attribute(string name) => throw null; + public System.Collections.Hashtable Attributes { get => throw null; set => throw null; } + public System.Collections.ArrayList Children { get => throw null; set => throw null; } + public System.Security.SecurityElement Copy() => throw null; + public bool Equal(System.Security.SecurityElement other) => throw null; + public static string Escape(string str) => throw null; + public static System.Security.SecurityElement FromString(string xml) => throw null; + public static bool IsValidAttributeName(string name) => throw null; + public static bool IsValidAttributeValue(string value) => throw null; + public static bool IsValidTag(string tag) => throw null; + public static bool IsValidText(string text) => throw null; + public System.Security.SecurityElement SearchForChildByTag(string tag) => throw null; + public string SearchForTextOfTag(string tag) => throw null; + public SecurityElement(string tag, string text) => throw null; + public SecurityElement(string tag) => throw null; + public string Tag { get => throw null; set => throw null; } + public string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.SecurityException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityException : System.SystemException + { + public object Demanded { get => throw null; set => throw null; } + public object DenySetInstance { get => throw null; set => throw null; } + public System.Reflection.AssemblyName FailedAssemblyInfo { get => throw null; set => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string GrantedSet { get => throw null; set => throw null; } + public System.Reflection.MethodInfo Method { get => throw null; set => throw null; } + public string PermissionState { get => throw null; set => throw null; } + public System.Type PermissionType { get => throw null; set => throw null; } + public object PermitOnlySetInstance { get => throw null; set => throw null; } + public string RefusedSet { get => throw null; set => throw null; } + public SecurityException(string message, System.Type type, string state) => throw null; + public SecurityException(string message, System.Type type) => throw null; + public SecurityException(string message, System.Exception inner) => throw null; + public SecurityException(string message) => throw null; + public SecurityException() => throw null; + protected SecurityException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string ToString() => throw null; + public string Url { get => throw null; set => throw null; } + } + + // Generated from `System.Security.SecurityRuleSet` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SecurityRuleSet + { + Level1, + Level2, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Security.SecurityRulesAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityRulesAttribute : System.Attribute + { + public System.Security.SecurityRuleSet RuleSet { get => throw null; } + public SecurityRulesAttribute(System.Security.SecurityRuleSet ruleSet) => throw null; + public bool SkipVerificationInFullTrust { get => throw null; set => throw null; } + } + + // Generated from `System.Security.SecuritySafeCriticalAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecuritySafeCriticalAttribute : System.Attribute + { + public SecuritySafeCriticalAttribute() => throw null; + } + + // Generated from `System.Security.SecurityTransparentAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityTransparentAttribute : System.Attribute + { + public SecurityTransparentAttribute() => throw null; + } + + // Generated from `System.Security.SecurityTreatAsSafeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityTreatAsSafeAttribute : System.Attribute + { + public SecurityTreatAsSafeAttribute() => throw null; + } + + // Generated from `System.Security.SuppressUnmanagedCodeSecurityAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SuppressUnmanagedCodeSecurityAttribute : System.Attribute + { + public SuppressUnmanagedCodeSecurityAttribute() => throw null; + } + + // Generated from `System.Security.UnverifiableCodeAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnverifiableCodeAttribute : System.Attribute + { + public UnverifiableCodeAttribute() => throw null; + } + + // Generated from `System.Security.VerificationException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class VerificationException : System.SystemException + { + public VerificationException(string message, System.Exception innerException) => throw null; + public VerificationException(string message) => throw null; + public VerificationException() => throw null; + protected VerificationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + namespace Cryptography + { + // Generated from `System.Security.Cryptography.CryptographicException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CryptographicException : System.SystemException + { + public CryptographicException(string message, System.Exception inner) => throw null; + public CryptographicException(string message) => throw null; + public CryptographicException(string format, string insert) => throw null; + public CryptographicException(int hr) => throw null; + public CryptographicException() => throw null; + protected CryptographicException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + namespace Permissions + { + // Generated from `System.Security.Permissions.CodeAccessSecurityAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class CodeAccessSecurityAttribute : System.Security.Permissions.SecurityAttribute + { + protected CodeAccessSecurityAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + } + + // Generated from `System.Security.Permissions.PermissionState` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PermissionState + { + None, + // Stub generator skipped constructor + Unrestricted, + } + + // Generated from `System.Security.Permissions.SecurityAction` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SecurityAction + { + Assert, + Demand, + Deny, + InheritanceDemand, + LinkDemand, + PermitOnly, + RequestMinimum, + RequestOptional, + RequestRefuse, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Permissions.SecurityAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SecurityAttribute : System.Attribute + { + public System.Security.Permissions.SecurityAction Action { get => throw null; set => throw null; } + public abstract System.Security.IPermission CreatePermission(); + protected SecurityAttribute(System.Security.Permissions.SecurityAction action) => throw null; + public bool Unrestricted { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.SecurityPermissionAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SecurityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute + { + public bool Assertion { get => throw null; set => throw null; } + public bool BindingRedirects { get => throw null; set => throw null; } + public bool ControlAppDomain { get => throw null; set => throw null; } + public bool ControlDomainPolicy { get => throw null; set => throw null; } + public bool ControlEvidence { get => throw null; set => throw null; } + public bool ControlPolicy { get => throw null; set => throw null; } + public bool ControlPrincipal { get => throw null; set => throw null; } + public bool ControlThread { get => throw null; set => throw null; } + public override System.Security.IPermission CreatePermission() => throw null; + public bool Execution { get => throw null; set => throw null; } + public System.Security.Permissions.SecurityPermissionFlag Flags { get => throw null; set => throw null; } + public bool Infrastructure { get => throw null; set => throw null; } + public bool RemotingConfiguration { get => throw null; set => throw null; } + public SecurityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; + public bool SerializationFormatter { get => throw null; set => throw null; } + public bool SkipVerification { get => throw null; set => throw null; } + public bool UnmanagedCode { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Permissions.SecurityPermissionFlag` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SecurityPermissionFlag + { + AllFlags, + Assertion, + BindingRedirects, + ControlAppDomain, + ControlDomainPolicy, + ControlEvidence, + ControlPolicy, + ControlPrincipal, + ControlThread, + Execution, + Infrastructure, + NoFlags, + RemotingConfiguration, + // Stub generator skipped constructor + SerializationFormatter, + SkipVerification, + UnmanagedCode, + } + + } + namespace Principal + { + // Generated from `System.Security.Principal.IIdentity` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IIdentity + { + string AuthenticationType { get; } + bool IsAuthenticated { get; } + string Name { get; } + } + + // Generated from `System.Security.Principal.IPrincipal` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IPrincipal + { + System.Security.Principal.IIdentity Identity { get; } + bool IsInRole(string role); + } + + // Generated from `System.Security.Principal.PrincipalPolicy` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PrincipalPolicy + { + NoPrincipal, + // Stub generator skipped constructor + UnauthenticatedPrincipal, + WindowsPrincipal, + } + + // Generated from `System.Security.Principal.TokenImpersonationLevel` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TokenImpersonationLevel + { + Anonymous, + Delegation, + Identification, + Impersonation, + None, + // Stub generator skipped constructor + } + + } + } + namespace Text + { + // Generated from `System.Text.Decoder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Decoder + { + unsafe public virtual void Convert(System.Byte* bytes, int byteCount, System.Char* chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) => throw null; + public virtual void Convert(System.ReadOnlySpan bytes, System.Span chars, bool flush, out int bytesUsed, out int charsUsed, out bool completed) => throw null; + public virtual void Convert(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) => throw null; + protected Decoder() => throw null; + public System.Text.DecoderFallback Fallback { get => throw null; set => throw null; } + public System.Text.DecoderFallbackBuffer FallbackBuffer { get => throw null; } + unsafe public virtual int GetCharCount(System.Byte* bytes, int count, bool flush) => throw null; + public virtual int GetCharCount(System.ReadOnlySpan bytes, bool flush) => throw null; + public virtual int GetCharCount(System.Byte[] bytes, int index, int count, bool flush) => throw null; + public abstract int GetCharCount(System.Byte[] bytes, int index, int count); + unsafe public virtual int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount, bool flush) => throw null; + public virtual int GetChars(System.ReadOnlySpan bytes, System.Span chars, bool flush) => throw null; + public virtual int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex, bool flush) => throw null; + public abstract int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex); + public virtual void Reset() => throw null; + } + + // Generated from `System.Text.DecoderExceptionFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecoderExceptionFallback : System.Text.DecoderFallback + { + public override System.Text.DecoderFallbackBuffer CreateFallbackBuffer() => throw null; + public DecoderExceptionFallback() => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public override int MaxCharCount { get => throw null; } + } + + // Generated from `System.Text.DecoderExceptionFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecoderExceptionFallbackBuffer : System.Text.DecoderFallbackBuffer + { + public DecoderExceptionFallbackBuffer() => throw null; + public override bool Fallback(System.Byte[] bytesUnknown, int index) => throw null; + public override System.Char GetNextChar() => throw null; + public override bool MovePrevious() => throw null; + public override int Remaining { get => throw null; } + } + + // Generated from `System.Text.DecoderFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DecoderFallback + { + public abstract System.Text.DecoderFallbackBuffer CreateFallbackBuffer(); + protected DecoderFallback() => throw null; + public static System.Text.DecoderFallback ExceptionFallback { get => throw null; } + public abstract int MaxCharCount { get; } + public static System.Text.DecoderFallback ReplacementFallback { get => throw null; } + } + + // Generated from `System.Text.DecoderFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DecoderFallbackBuffer + { + protected DecoderFallbackBuffer() => throw null; + public abstract bool Fallback(System.Byte[] bytesUnknown, int index); + public abstract System.Char GetNextChar(); + public abstract bool MovePrevious(); + public abstract int Remaining { get; } + public virtual void Reset() => throw null; + } + + // Generated from `System.Text.DecoderFallbackException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecoderFallbackException : System.ArgumentException + { + public System.Byte[] BytesUnknown { get => throw null; } + public DecoderFallbackException(string message, System.Exception innerException) => throw null; + public DecoderFallbackException(string message, System.Byte[] bytesUnknown, int index) => throw null; + public DecoderFallbackException(string message) => throw null; + public DecoderFallbackException() => throw null; + public int Index { get => throw null; } + } + + // Generated from `System.Text.DecoderReplacementFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecoderReplacementFallback : System.Text.DecoderFallback + { + public override System.Text.DecoderFallbackBuffer CreateFallbackBuffer() => throw null; + public DecoderReplacementFallback(string replacement) => throw null; + public DecoderReplacementFallback() => throw null; + public string DefaultString { get => throw null; } + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public override int MaxCharCount { get => throw null; } + } + + // Generated from `System.Text.DecoderReplacementFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DecoderReplacementFallbackBuffer : System.Text.DecoderFallbackBuffer + { + public DecoderReplacementFallbackBuffer(System.Text.DecoderReplacementFallback fallback) => throw null; + public override bool Fallback(System.Byte[] bytesUnknown, int index) => throw null; + public override System.Char GetNextChar() => throw null; + public override bool MovePrevious() => throw null; + public override int Remaining { get => throw null; } + public override void Reset() => throw null; + } + + // Generated from `System.Text.Encoder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Encoder + { + unsafe public virtual void Convert(System.Char* chars, int charCount, System.Byte* bytes, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) => throw null; + public virtual void Convert(System.ReadOnlySpan chars, System.Span bytes, bool flush, out int charsUsed, out int bytesUsed, out bool completed) => throw null; + public virtual void Convert(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) => throw null; + protected Encoder() => throw null; + public System.Text.EncoderFallback Fallback { get => throw null; set => throw null; } + public System.Text.EncoderFallbackBuffer FallbackBuffer { get => throw null; } + unsafe public virtual int GetByteCount(System.Char* chars, int count, bool flush) => throw null; + public virtual int GetByteCount(System.ReadOnlySpan chars, bool flush) => throw null; + public abstract int GetByteCount(System.Char[] chars, int index, int count, bool flush); + unsafe public virtual int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount, bool flush) => throw null; + public virtual int GetBytes(System.ReadOnlySpan chars, System.Span bytes, bool flush) => throw null; + public abstract int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex, bool flush); + public virtual void Reset() => throw null; + } + + // Generated from `System.Text.EncoderExceptionFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncoderExceptionFallback : System.Text.EncoderFallback + { + public override System.Text.EncoderFallbackBuffer CreateFallbackBuffer() => throw null; + public EncoderExceptionFallback() => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public override int MaxCharCount { get => throw null; } + } + + // Generated from `System.Text.EncoderExceptionFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncoderExceptionFallbackBuffer : System.Text.EncoderFallbackBuffer + { + public EncoderExceptionFallbackBuffer() => throw null; + public override bool Fallback(System.Char charUnknownHigh, System.Char charUnknownLow, int index) => throw null; + public override bool Fallback(System.Char charUnknown, int index) => throw null; + public override System.Char GetNextChar() => throw null; + public override bool MovePrevious() => throw null; + public override int Remaining { get => throw null; } + } + + // Generated from `System.Text.EncoderFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EncoderFallback + { + public abstract System.Text.EncoderFallbackBuffer CreateFallbackBuffer(); + protected EncoderFallback() => throw null; + public static System.Text.EncoderFallback ExceptionFallback { get => throw null; } + public abstract int MaxCharCount { get; } + public static System.Text.EncoderFallback ReplacementFallback { get => throw null; } + } + + // Generated from `System.Text.EncoderFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EncoderFallbackBuffer + { + protected EncoderFallbackBuffer() => throw null; + public abstract bool Fallback(System.Char charUnknownHigh, System.Char charUnknownLow, int index); + public abstract bool Fallback(System.Char charUnknown, int index); + public abstract System.Char GetNextChar(); + public abstract bool MovePrevious(); + public abstract int Remaining { get; } + public virtual void Reset() => throw null; + } + + // Generated from `System.Text.EncoderFallbackException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncoderFallbackException : System.ArgumentException + { + public System.Char CharUnknown { get => throw null; } + public System.Char CharUnknownHigh { get => throw null; } + public System.Char CharUnknownLow { get => throw null; } + public EncoderFallbackException(string message, System.Exception innerException) => throw null; + public EncoderFallbackException(string message) => throw null; + public EncoderFallbackException() => throw null; + public int Index { get => throw null; } + public bool IsUnknownSurrogate() => throw null; + } + + // Generated from `System.Text.EncoderReplacementFallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncoderReplacementFallback : System.Text.EncoderFallback + { + public override System.Text.EncoderFallbackBuffer CreateFallbackBuffer() => throw null; + public string DefaultString { get => throw null; } + public EncoderReplacementFallback(string replacement) => throw null; + public EncoderReplacementFallback() => throw null; + public override bool Equals(object value) => throw null; + public override int GetHashCode() => throw null; + public override int MaxCharCount { get => throw null; } + } + + // Generated from `System.Text.EncoderReplacementFallbackBuffer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncoderReplacementFallbackBuffer : System.Text.EncoderFallbackBuffer + { + public EncoderReplacementFallbackBuffer(System.Text.EncoderReplacementFallback fallback) => throw null; + public override bool Fallback(System.Char charUnknownHigh, System.Char charUnknownLow, int index) => throw null; + public override bool Fallback(System.Char charUnknown, int index) => throw null; + public override System.Char GetNextChar() => throw null; + public override bool MovePrevious() => throw null; + public override int Remaining { get => throw null; } + public override void Reset() => throw null; + } + + // Generated from `System.Text.Encoding` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Encoding : System.ICloneable + { + public static System.Text.Encoding ASCII { get => throw null; } + public static System.Text.Encoding BigEndianUnicode { get => throw null; } + public virtual string BodyName { get => throw null; } + public virtual object Clone() => throw null; + public virtual int CodePage { get => throw null; } + public static System.Byte[] Convert(System.Text.Encoding srcEncoding, System.Text.Encoding dstEncoding, System.Byte[] bytes, int index, int count) => throw null; + public static System.Byte[] Convert(System.Text.Encoding srcEncoding, System.Text.Encoding dstEncoding, System.Byte[] bytes) => throw null; + public static System.IO.Stream CreateTranscodingStream(System.IO.Stream innerStream, System.Text.Encoding innerStreamEncoding, System.Text.Encoding outerStreamEncoding, bool leaveOpen = default(bool)) => throw null; + public System.Text.DecoderFallback DecoderFallback { get => throw null; set => throw null; } + public static System.Text.Encoding Default { get => throw null; } + public System.Text.EncoderFallback EncoderFallback { get => throw null; set => throw null; } + protected Encoding(int codePage, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) => throw null; + protected Encoding(int codePage) => throw null; + protected Encoding() => throw null; + public virtual string EncodingName { get => throw null; } + public override bool Equals(object value) => throw null; + unsafe public virtual int GetByteCount(System.Char* chars, int count) => throw null; + public virtual int GetByteCount(string s) => throw null; + public virtual int GetByteCount(System.ReadOnlySpan chars) => throw null; + public virtual int GetByteCount(System.Char[] chars) => throw null; + public int GetByteCount(string s, int index, int count) => throw null; + public abstract int GetByteCount(System.Char[] chars, int index, int count); + unsafe public virtual int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public virtual int GetBytes(string s, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public virtual int GetBytes(System.ReadOnlySpan chars, System.Span bytes) => throw null; + public virtual System.Byte[] GetBytes(string s) => throw null; + public virtual System.Byte[] GetBytes(System.Char[] chars, int index, int count) => throw null; + public virtual System.Byte[] GetBytes(System.Char[] chars) => throw null; + public abstract int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex); + public System.Byte[] GetBytes(string s, int index, int count) => throw null; + unsafe public virtual int GetCharCount(System.Byte* bytes, int count) => throw null; + public virtual int GetCharCount(System.ReadOnlySpan bytes) => throw null; + public virtual int GetCharCount(System.Byte[] bytes) => throw null; + public abstract int GetCharCount(System.Byte[] bytes, int index, int count); + unsafe public virtual int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public virtual int GetChars(System.ReadOnlySpan bytes, System.Span chars) => throw null; + public virtual System.Char[] GetChars(System.Byte[] bytes, int index, int count) => throw null; + public virtual System.Char[] GetChars(System.Byte[] bytes) => throw null; + public abstract int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex); + public virtual System.Text.Decoder GetDecoder() => throw null; + public virtual System.Text.Encoder GetEncoder() => throw null; + public static System.Text.Encoding GetEncoding(string name, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) => throw null; + public static System.Text.Encoding GetEncoding(string name) => throw null; + public static System.Text.Encoding GetEncoding(int codepage, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) => throw null; + public static System.Text.Encoding GetEncoding(int codepage) => throw null; + public static System.Text.EncodingInfo[] GetEncodings() => throw null; + public override int GetHashCode() => throw null; + public abstract int GetMaxByteCount(int charCount); + public abstract int GetMaxCharCount(int byteCount); + public virtual System.Byte[] GetPreamble() => throw null; + unsafe public string GetString(System.Byte* bytes, int byteCount) => throw null; + public virtual string GetString(System.Byte[] bytes, int index, int count) => throw null; + public virtual string GetString(System.Byte[] bytes) => throw null; + public string GetString(System.ReadOnlySpan bytes) => throw null; + public virtual string HeaderName { get => throw null; } + public virtual bool IsAlwaysNormalized(System.Text.NormalizationForm form) => throw null; + public bool IsAlwaysNormalized() => throw null; + public virtual bool IsBrowserDisplay { get => throw null; } + public virtual bool IsBrowserSave { get => throw null; } + public virtual bool IsMailNewsDisplay { get => throw null; } + public virtual bool IsMailNewsSave { get => throw null; } + public bool IsReadOnly { get => throw null; } + public virtual bool IsSingleByte { get => throw null; } + public static System.Text.Encoding Latin1 { get => throw null; } + public virtual System.ReadOnlySpan Preamble { get => throw null; } + public static void RegisterProvider(System.Text.EncodingProvider provider) => throw null; + public static System.Text.Encoding UTF32 { get => throw null; } + public static System.Text.Encoding UTF7 { get => throw null; } + public static System.Text.Encoding UTF8 { get => throw null; } + public static System.Text.Encoding Unicode { get => throw null; } + public virtual string WebName { get => throw null; } + public virtual int WindowsCodePage { get => throw null; } + } + + // Generated from `System.Text.EncodingInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EncodingInfo + { + public int CodePage { get => throw null; } + public string DisplayName { get => throw null; } + public EncodingInfo(System.Text.EncodingProvider provider, int codePage, string name, string displayName) => throw null; + public override bool Equals(object value) => throw null; + public System.Text.Encoding GetEncoding() => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.Text.EncodingProvider` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class EncodingProvider + { + public EncodingProvider() => throw null; + public virtual System.Text.Encoding GetEncoding(string name, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) => throw null; + public virtual System.Text.Encoding GetEncoding(int codepage, System.Text.EncoderFallback encoderFallback, System.Text.DecoderFallback decoderFallback) => throw null; + public abstract System.Text.Encoding GetEncoding(string name); + public abstract System.Text.Encoding GetEncoding(int codepage); + public virtual System.Collections.Generic.IEnumerable GetEncodings() => throw null; + } + + // Generated from `System.Text.NormalizationForm` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NormalizationForm + { + FormC, + FormD, + FormKC, + FormKD, + // Stub generator skipped constructor + } + + // Generated from `System.Text.Rune` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Rune : System.IEquatable, System.IComparable, System.IComparable + { + public static bool operator !=(System.Text.Rune left, System.Text.Rune right) => throw null; + public static bool operator <(System.Text.Rune left, System.Text.Rune right) => throw null; + public static bool operator <=(System.Text.Rune left, System.Text.Rune right) => throw null; + public static bool operator ==(System.Text.Rune left, System.Text.Rune right) => throw null; + public static bool operator >(System.Text.Rune left, System.Text.Rune right) => throw null; + public static bool operator >=(System.Text.Rune left, System.Text.Rune right) => throw null; + public int CompareTo(System.Text.Rune other) => throw null; + int System.IComparable.CompareTo(object obj) => throw null; + public static System.Buffers.OperationStatus DecodeFromUtf16(System.ReadOnlySpan source, out System.Text.Rune result, out int charsConsumed) => throw null; + public static System.Buffers.OperationStatus DecodeFromUtf8(System.ReadOnlySpan source, out System.Text.Rune result, out int bytesConsumed) => throw null; + public static System.Buffers.OperationStatus DecodeLastFromUtf16(System.ReadOnlySpan source, out System.Text.Rune result, out int charsConsumed) => throw null; + public static System.Buffers.OperationStatus DecodeLastFromUtf8(System.ReadOnlySpan source, out System.Text.Rune value, out int bytesConsumed) => throw null; + public int EncodeToUtf16(System.Span destination) => throw null; + public int EncodeToUtf8(System.Span destination) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Text.Rune other) => throw null; + public override int GetHashCode() => throw null; + public static double GetNumericValue(System.Text.Rune value) => throw null; + public static System.Text.Rune GetRuneAt(string input, int index) => throw null; + public static System.Globalization.UnicodeCategory GetUnicodeCategory(System.Text.Rune value) => throw null; + public bool IsAscii { get => throw null; } + public bool IsBmp { get => throw null; } + public static bool IsControl(System.Text.Rune value) => throw null; + public static bool IsDigit(System.Text.Rune value) => throw null; + public static bool IsLetter(System.Text.Rune value) => throw null; + public static bool IsLetterOrDigit(System.Text.Rune value) => throw null; + public static bool IsLower(System.Text.Rune value) => throw null; + public static bool IsNumber(System.Text.Rune value) => throw null; + public static bool IsPunctuation(System.Text.Rune value) => throw null; + public static bool IsSeparator(System.Text.Rune value) => throw null; + public static bool IsSymbol(System.Text.Rune value) => throw null; + public static bool IsUpper(System.Text.Rune value) => throw null; + public static bool IsValid(int value) => throw null; + public static bool IsValid(System.UInt32 value) => throw null; + public static bool IsWhiteSpace(System.Text.Rune value) => throw null; + public int Plane { get => throw null; } + public static System.Text.Rune ReplacementChar { get => throw null; } + public Rune(int value) => throw null; + public Rune(System.UInt32 value) => throw null; + public Rune(System.Char highSurrogate, System.Char lowSurrogate) => throw null; + public Rune(System.Char ch) => throw null; + // Stub generator skipped constructor + public static System.Text.Rune ToLower(System.Text.Rune value, System.Globalization.CultureInfo culture) => throw null; + public static System.Text.Rune ToLowerInvariant(System.Text.Rune value) => throw null; + public override string ToString() => throw null; + public static System.Text.Rune ToUpper(System.Text.Rune value, System.Globalization.CultureInfo culture) => throw null; + public static System.Text.Rune ToUpperInvariant(System.Text.Rune value) => throw null; + public static bool TryCreate(int value, out System.Text.Rune result) => throw null; + public static bool TryCreate(System.UInt32 value, out System.Text.Rune result) => throw null; + public static bool TryCreate(System.Char highSurrogate, System.Char lowSurrogate, out System.Text.Rune result) => throw null; + public static bool TryCreate(System.Char ch, out System.Text.Rune result) => throw null; + public bool TryEncodeToUtf16(System.Span destination, out int charsWritten) => throw null; + public bool TryEncodeToUtf8(System.Span destination, out int bytesWritten) => throw null; + public static bool TryGetRuneAt(string input, int index, out System.Text.Rune value) => throw null; + public int Utf16SequenceLength { get => throw null; } + public int Utf8SequenceLength { get => throw null; } + public int Value { get => throw null; } + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Text.StringBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class StringBuilder : System.Runtime.Serialization.ISerializable + { + unsafe public System.Text.StringBuilder Append(System.Char* value, int valueCount) => throw null; + public System.Text.StringBuilder Append(string value, int startIndex, int count) => throw null; + public System.Text.StringBuilder Append(string value) => throw null; + public System.Text.StringBuilder Append(object value) => throw null; + public System.Text.StringBuilder Append(int value) => throw null; + public System.Text.StringBuilder Append(float value) => throw null; + public System.Text.StringBuilder Append(double value) => throw null; + public System.Text.StringBuilder Append(bool value) => throw null; + public System.Text.StringBuilder Append(System.UInt64 value) => throw null; + public System.Text.StringBuilder Append(System.UInt32 value) => throw null; + public System.Text.StringBuilder Append(System.UInt16 value) => throw null; + public System.Text.StringBuilder Append(System.Text.StringBuilder value, int startIndex, int count) => throw null; + public System.Text.StringBuilder Append(System.Text.StringBuilder value) => throw null; + public System.Text.StringBuilder Append(System.SByte value) => throw null; + public System.Text.StringBuilder Append(System.ReadOnlySpan value) => throw null; + public System.Text.StringBuilder Append(System.ReadOnlyMemory value) => throw null; + public System.Text.StringBuilder Append(System.Int64 value) => throw null; + public System.Text.StringBuilder Append(System.Int16 value) => throw null; + public System.Text.StringBuilder Append(System.Decimal value) => throw null; + public System.Text.StringBuilder Append(System.Char[] value, int startIndex, int charCount) => throw null; + public System.Text.StringBuilder Append(System.Char[] value) => throw null; + public System.Text.StringBuilder Append(System.Char value, int repeatCount) => throw null; + public System.Text.StringBuilder Append(System.Char value) => throw null; + public System.Text.StringBuilder Append(System.Byte value) => throw null; + public System.Text.StringBuilder AppendFormat(string format, params object[] args) => throw null; + public System.Text.StringBuilder AppendFormat(string format, object arg0, object arg1, object arg2) => throw null; + public System.Text.StringBuilder AppendFormat(string format, object arg0, object arg1) => throw null; + public System.Text.StringBuilder AppendFormat(string format, object arg0) => throw null; + public System.Text.StringBuilder AppendFormat(System.IFormatProvider provider, string format, params object[] args) => throw null; + public System.Text.StringBuilder AppendFormat(System.IFormatProvider provider, string format, object arg0, object arg1, object arg2) => throw null; + public System.Text.StringBuilder AppendFormat(System.IFormatProvider provider, string format, object arg0, object arg1) => throw null; + public System.Text.StringBuilder AppendFormat(System.IFormatProvider provider, string format, object arg0) => throw null; + public System.Text.StringBuilder AppendJoin(string separator, System.Collections.Generic.IEnumerable values) => throw null; + public System.Text.StringBuilder AppendJoin(System.Char separator, System.Collections.Generic.IEnumerable values) => throw null; + public System.Text.StringBuilder AppendJoin(string separator, params string[] values) => throw null; + public System.Text.StringBuilder AppendJoin(string separator, params object[] values) => throw null; + public System.Text.StringBuilder AppendJoin(System.Char separator, params string[] values) => throw null; + public System.Text.StringBuilder AppendJoin(System.Char separator, params object[] values) => throw null; + public System.Text.StringBuilder AppendLine(string value) => throw null; + public System.Text.StringBuilder AppendLine() => throw null; + public int Capacity { get => throw null; set => throw null; } + [System.Runtime.CompilerServices.IndexerName("Chars")] + public System.Char this[int index] { get => throw null; set => throw null; } + // Generated from `System.Text.StringBuilder.ChunkEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ChunkEnumerator + { + // Stub generator skipped constructor + public System.ReadOnlyMemory Current { get => throw null; } + public System.Text.StringBuilder.ChunkEnumerator GetEnumerator() => throw null; + public bool MoveNext() => throw null; + } + + + public System.Text.StringBuilder Clear() => throw null; + public void CopyTo(int sourceIndex, System.Span destination, int count) => throw null; + public void CopyTo(int sourceIndex, System.Char[] destination, int destinationIndex, int count) => throw null; + public int EnsureCapacity(int capacity) => throw null; + public bool Equals(System.Text.StringBuilder sb) => throw null; + public bool Equals(System.ReadOnlySpan span) => throw null; + public System.Text.StringBuilder.ChunkEnumerator GetChunks() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Text.StringBuilder Insert(int index, string value, int count) => throw null; + public System.Text.StringBuilder Insert(int index, string value) => throw null; + public System.Text.StringBuilder Insert(int index, object value) => throw null; + public System.Text.StringBuilder Insert(int index, int value) => throw null; + public System.Text.StringBuilder Insert(int index, float value) => throw null; + public System.Text.StringBuilder Insert(int index, double value) => throw null; + public System.Text.StringBuilder Insert(int index, bool value) => throw null; + public System.Text.StringBuilder Insert(int index, System.UInt64 value) => throw null; + public System.Text.StringBuilder Insert(int index, System.UInt32 value) => throw null; + public System.Text.StringBuilder Insert(int index, System.UInt16 value) => throw null; + public System.Text.StringBuilder Insert(int index, System.SByte value) => throw null; + public System.Text.StringBuilder Insert(int index, System.ReadOnlySpan value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Int64 value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Int16 value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Decimal value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Char[] value, int startIndex, int charCount) => throw null; + public System.Text.StringBuilder Insert(int index, System.Char[] value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Char value) => throw null; + public System.Text.StringBuilder Insert(int index, System.Byte value) => throw null; + public int Length { get => throw null; set => throw null; } + public int MaxCapacity { get => throw null; } + public System.Text.StringBuilder Remove(int startIndex, int length) => throw null; + public System.Text.StringBuilder Replace(string oldValue, string newValue, int startIndex, int count) => throw null; + public System.Text.StringBuilder Replace(string oldValue, string newValue) => throw null; + public System.Text.StringBuilder Replace(System.Char oldChar, System.Char newChar, int startIndex, int count) => throw null; + public System.Text.StringBuilder Replace(System.Char oldChar, System.Char newChar) => throw null; + public StringBuilder(string value, int startIndex, int length, int capacity) => throw null; + public StringBuilder(string value, int capacity) => throw null; + public StringBuilder(string value) => throw null; + public StringBuilder(int capacity, int maxCapacity) => throw null; + public StringBuilder(int capacity) => throw null; + public StringBuilder() => throw null; + public string ToString(int startIndex, int length) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Text.StringRuneEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct StringRuneEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable + { + public System.Text.Rune Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + void System.IDisposable.Dispose() => throw null; + public System.Text.StringRuneEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + // Stub generator skipped constructor + } + + namespace Unicode + { + // Generated from `System.Text.Unicode.Utf8` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Utf8 + { + public static System.Buffers.OperationStatus FromUtf16(System.ReadOnlySpan source, System.Span destination, out int charsRead, out int bytesWritten, bool replaceInvalidSequences = default(bool), bool isFinalBlock = default(bool)) => throw null; + public static System.Buffers.OperationStatus ToUtf16(System.ReadOnlySpan source, System.Span destination, out int bytesRead, out int charsWritten, bool replaceInvalidSequences = default(bool), bool isFinalBlock = default(bool)) => throw null; + } + + } + } + namespace Threading + { + // Generated from `System.Threading.CancellationToken` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CancellationToken + { + public static bool operator !=(System.Threading.CancellationToken left, System.Threading.CancellationToken right) => throw null; + public static bool operator ==(System.Threading.CancellationToken left, System.Threading.CancellationToken right) => throw null; + public bool CanBeCanceled { get => throw null; } + public CancellationToken(bool canceled) => throw null; + // Stub generator skipped constructor + public override bool Equals(object other) => throw null; + public bool Equals(System.Threading.CancellationToken other) => throw null; + public override int GetHashCode() => throw null; + public bool IsCancellationRequested { get => throw null; } + public static System.Threading.CancellationToken None { get => throw null; } + public System.Threading.CancellationTokenRegistration Register(System.Action callback, object state, bool useSynchronizationContext) => throw null; + public System.Threading.CancellationTokenRegistration Register(System.Action callback, object state) => throw null; + public System.Threading.CancellationTokenRegistration Register(System.Action callback, bool useSynchronizationContext) => throw null; + public System.Threading.CancellationTokenRegistration Register(System.Action callback) => throw null; + public void ThrowIfCancellationRequested() => throw null; + public System.Threading.CancellationTokenRegistration UnsafeRegister(System.Action callback, object state) => throw null; + public System.Threading.WaitHandle WaitHandle { get => throw null; } + } + + // Generated from `System.Threading.CancellationTokenRegistration` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct CancellationTokenRegistration : System.IEquatable, System.IDisposable, System.IAsyncDisposable + { + public static bool operator !=(System.Threading.CancellationTokenRegistration left, System.Threading.CancellationTokenRegistration right) => throw null; + public static bool operator ==(System.Threading.CancellationTokenRegistration left, System.Threading.CancellationTokenRegistration right) => throw null; + // Stub generator skipped constructor + public void Dispose() => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.CancellationTokenRegistration other) => throw null; + public override int GetHashCode() => throw null; + public System.Threading.CancellationToken Token { get => throw null; } + public bool Unregister() => throw null; + } + + // Generated from `System.Threading.CancellationTokenSource` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CancellationTokenSource : System.IDisposable + { + public void Cancel(bool throwOnFirstException) => throw null; + public void Cancel() => throw null; + public void CancelAfter(int millisecondsDelay) => throw null; + public void CancelAfter(System.TimeSpan delay) => throw null; + public CancellationTokenSource(int millisecondsDelay) => throw null; + public CancellationTokenSource(System.TimeSpan delay) => throw null; + public CancellationTokenSource() => throw null; + public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(params System.Threading.CancellationToken[] tokens) => throw null; + public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(System.Threading.CancellationToken token1, System.Threading.CancellationToken token2) => throw null; + public static System.Threading.CancellationTokenSource CreateLinkedTokenSource(System.Threading.CancellationToken token) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsCancellationRequested { get => throw null; } + public System.Threading.CancellationToken Token { get => throw null; } + } + + // Generated from `System.Threading.LazyThreadSafetyMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LazyThreadSafetyMode + { + ExecutionAndPublication, + // Stub generator skipped constructor + None, + PublicationOnly, + } + + // Generated from `System.Threading.Timeout` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Timeout + { + public const int Infinite = default; + public static System.TimeSpan InfiniteTimeSpan; + } + + // Generated from `System.Threading.Timer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Timer : System.MarshalByRefObject, System.IDisposable, System.IAsyncDisposable + { + public static System.Int64 ActiveCount { get => throw null; } + public bool Change(int dueTime, int period) => throw null; + public bool Change(System.UInt32 dueTime, System.UInt32 period) => throw null; + public bool Change(System.TimeSpan dueTime, System.TimeSpan period) => throw null; + public bool Change(System.Int64 dueTime, System.Int64 period) => throw null; + public void Dispose() => throw null; + public bool Dispose(System.Threading.WaitHandle notifyObject) => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public Timer(System.Threading.TimerCallback callback, object state, int dueTime, int period) => throw null; + public Timer(System.Threading.TimerCallback callback, object state, System.UInt32 dueTime, System.UInt32 period) => throw null; + public Timer(System.Threading.TimerCallback callback, object state, System.TimeSpan dueTime, System.TimeSpan period) => throw null; + public Timer(System.Threading.TimerCallback callback, object state, System.Int64 dueTime, System.Int64 period) => throw null; + public Timer(System.Threading.TimerCallback callback) => throw null; + } + + // Generated from `System.Threading.TimerCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void TimerCallback(object state); + + // Generated from `System.Threading.WaitHandle` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class WaitHandle : System.MarshalByRefObject, System.IDisposable + { + public virtual void Close() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool explicitDisposing) => throw null; + public virtual System.IntPtr Handle { get => throw null; set => throw null; } + protected static System.IntPtr InvalidHandle; + public Microsoft.Win32.SafeHandles.SafeWaitHandle SafeWaitHandle { get => throw null; set => throw null; } + public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) => throw null; + public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn, System.TimeSpan timeout, bool exitContext) => throw null; + public static bool SignalAndWait(System.Threading.WaitHandle toSignal, System.Threading.WaitHandle toWaitOn) => throw null; + public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => throw null; + public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout) => throw null; + public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout, bool exitContext) => throw null; + public static bool WaitAll(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout) => throw null; + public static bool WaitAll(System.Threading.WaitHandle[] waitHandles) => throw null; + public static int WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) => throw null; + public static int WaitAny(System.Threading.WaitHandle[] waitHandles, int millisecondsTimeout) => throw null; + public static int WaitAny(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout, bool exitContext) => throw null; + public static int WaitAny(System.Threading.WaitHandle[] waitHandles, System.TimeSpan timeout) => throw null; + public static int WaitAny(System.Threading.WaitHandle[] waitHandles) => throw null; + protected WaitHandle() => throw null; + public virtual bool WaitOne(int millisecondsTimeout, bool exitContext) => throw null; + public virtual bool WaitOne(int millisecondsTimeout) => throw null; + public virtual bool WaitOne(System.TimeSpan timeout, bool exitContext) => throw null; + public virtual bool WaitOne(System.TimeSpan timeout) => throw null; + public virtual bool WaitOne() => throw null; + public const int WaitTimeout = default; + } + + // Generated from `System.Threading.WaitHandleExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class WaitHandleExtensions + { + public static Microsoft.Win32.SafeHandles.SafeWaitHandle GetSafeWaitHandle(this System.Threading.WaitHandle waitHandle) => throw null; + public static void SetSafeWaitHandle(this System.Threading.WaitHandle waitHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle value) => throw null; + } + + namespace Tasks + { + // Generated from `System.Threading.Tasks.ConcurrentExclusiveSchedulerPair` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ConcurrentExclusiveSchedulerPair + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + public ConcurrentExclusiveSchedulerPair(System.Threading.Tasks.TaskScheduler taskScheduler, int maxConcurrencyLevel, int maxItemsPerTask) => throw null; + public ConcurrentExclusiveSchedulerPair(System.Threading.Tasks.TaskScheduler taskScheduler, int maxConcurrencyLevel) => throw null; + public ConcurrentExclusiveSchedulerPair(System.Threading.Tasks.TaskScheduler taskScheduler) => throw null; + public ConcurrentExclusiveSchedulerPair() => throw null; + public System.Threading.Tasks.TaskScheduler ConcurrentScheduler { get => throw null; } + public System.Threading.Tasks.TaskScheduler ExclusiveScheduler { get => throw null; } + } + + // Generated from `System.Threading.Tasks.Task` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Task : System.IDisposable, System.IAsyncResult + { + public object AsyncState { get => throw null; } + System.Threading.WaitHandle System.IAsyncResult.AsyncWaitHandle { get => throw null; } + bool System.IAsyncResult.CompletedSynchronously { get => throw null; } + public static System.Threading.Tasks.Task CompletedTask { get => throw null; } + public System.Runtime.CompilerServices.ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, object state, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, object state, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, object state) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, object state, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, object state, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action continuationAction, object state) => throw null; + public System.Threading.Tasks.TaskCreationOptions CreationOptions { get => throw null; } + public static int? CurrentId { get => throw null; } + public static System.Threading.Tasks.Task Delay(int millisecondsDelay, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Delay(int millisecondsDelay) => throw null; + public static System.Threading.Tasks.Task Delay(System.TimeSpan delay, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Delay(System.TimeSpan delay) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.AggregateException Exception { get => throw null; } + public static System.Threading.Tasks.TaskFactory Factory { get => throw null; } + public static System.Threading.Tasks.Task FromCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task FromCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task FromException(System.Exception exception) => throw null; + public static System.Threading.Tasks.Task FromException(System.Exception exception) => throw null; + public static System.Threading.Tasks.Task FromResult(TResult result) => throw null; + public System.Runtime.CompilerServices.TaskAwaiter GetAwaiter() => throw null; + public int Id { get => throw null; } + public bool IsCanceled { get => throw null; } + public bool IsCompleted { get => throw null; } + public bool IsCompletedSuccessfully { get => throw null; } + public bool IsFaulted { get => throw null; } + public static System.Threading.Tasks.Task Run(System.Func function, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Run(System.Func function) => throw null; + public static System.Threading.Tasks.Task Run(System.Func> function, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Run(System.Func> function) => throw null; + public static System.Threading.Tasks.Task Run(System.Func function, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Run(System.Func function) => throw null; + public static System.Threading.Tasks.Task Run(System.Action action, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task Run(System.Action action) => throw null; + public void RunSynchronously(System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public void RunSynchronously() => throw null; + public void Start(System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public void Start() => throw null; + public System.Threading.Tasks.TaskStatus Status { get => throw null; } + public Task(System.Action action, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public Task(System.Action action, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public Task(System.Action action, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public Task(System.Action action, object state) => throw null; + public Task(System.Action action, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public Task(System.Action action, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public Task(System.Action action, System.Threading.CancellationToken cancellationToken) => throw null; + public Task(System.Action action) => throw null; + public void Wait(System.Threading.CancellationToken cancellationToken) => throw null; + public void Wait() => throw null; + public bool Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(int millisecondsTimeout) => throw null; + public bool Wait(System.TimeSpan timeout) => throw null; + public static void WaitAll(params System.Threading.Tasks.Task[] tasks) => throw null; + public static void WaitAll(System.Threading.Tasks.Task[] tasks, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool WaitAll(System.Threading.Tasks.Task[] tasks, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool WaitAll(System.Threading.Tasks.Task[] tasks, int millisecondsTimeout) => throw null; + public static bool WaitAll(System.Threading.Tasks.Task[] tasks, System.TimeSpan timeout) => throw null; + public static int WaitAny(params System.Threading.Tasks.Task[] tasks) => throw null; + public static int WaitAny(System.Threading.Tasks.Task[] tasks, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static int WaitAny(System.Threading.Tasks.Task[] tasks, int millisecondsTimeout) => throw null; + public static int WaitAny(System.Threading.Tasks.Task[] tasks, System.TimeSpan timeout) => throw null; + public static int WaitAny(System.Threading.Tasks.Task[] tasks, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task WhenAll(params System.Threading.Tasks.Task[] tasks) => throw null; + public static System.Threading.Tasks.Task WhenAll(System.Collections.Generic.IEnumerable> tasks) => throw null; + public static System.Threading.Tasks.Task WhenAll(params System.Threading.Tasks.Task[] tasks) => throw null; + public static System.Threading.Tasks.Task WhenAll(System.Collections.Generic.IEnumerable tasks) => throw null; + public static System.Threading.Tasks.Task WhenAny(params System.Threading.Tasks.Task[] tasks) => throw null; + public static System.Threading.Tasks.Task WhenAny(System.Threading.Tasks.Task task1, System.Threading.Tasks.Task task2) => throw null; + public static System.Threading.Tasks.Task WhenAny(System.Collections.Generic.IEnumerable tasks) => throw null; + public static System.Threading.Tasks.Task> WhenAny(params System.Threading.Tasks.Task[] tasks) => throw null; + public static System.Threading.Tasks.Task> WhenAny(System.Threading.Tasks.Task task1, System.Threading.Tasks.Task task2) => throw null; + public static System.Threading.Tasks.Task> WhenAny(System.Collections.Generic.IEnumerable> tasks) => throw null; + public static System.Runtime.CompilerServices.YieldAwaitable Yield() => throw null; + } + + // Generated from `System.Threading.Tasks.Task<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Task : System.Threading.Tasks.Task + { + public System.Runtime.CompilerServices.ConfiguredTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, object, TNewResult> continuationFunction, object state, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, object, TNewResult> continuationFunction, object state, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, object, TNewResult> continuationFunction, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, object, TNewResult> continuationFunction, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, object, TNewResult> continuationFunction, object state) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, TNewResult> continuationFunction, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, TNewResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, TNewResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, TNewResult> continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Func, TNewResult> continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action> continuationAction, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action> continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action> continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action> continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action> continuationAction) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action, object> continuationAction, object state, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action, object> continuationAction, object state, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action, object> continuationAction, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action, object> continuationAction, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWith(System.Action, object> continuationAction, object state) => throw null; + public static System.Threading.Tasks.TaskFactory Factory { get => throw null; } + public System.Runtime.CompilerServices.TaskAwaiter GetAwaiter() => throw null; + public TResult Result { get => throw null; } + public Task(System.Func function, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) : base(default(System.Action)) => throw null; + public Task(System.Func function, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions) : base(default(System.Action)) => throw null; + public Task(System.Func function, object state, System.Threading.CancellationToken cancellationToken) : base(default(System.Action)) => throw null; + public Task(System.Func function, object state) : base(default(System.Action)) => throw null; + public Task(System.Func function, System.Threading.Tasks.TaskCreationOptions creationOptions) : base(default(System.Action)) => throw null; + public Task(System.Func function, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions) : base(default(System.Action)) => throw null; + public Task(System.Func function, System.Threading.CancellationToken cancellationToken) : base(default(System.Action)) => throw null; + public Task(System.Func function) : base(default(System.Action)) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskAsyncEnumerableExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class TaskAsyncEnumerableExtensions + { + public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(this System.Collections.Generic.IAsyncEnumerable source, bool continueOnCapturedContext) => throw null; + public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait(this System.IAsyncDisposable source, bool continueOnCapturedContext) => throw null; + public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable WithCancellation(this System.Collections.Generic.IAsyncEnumerable source, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskCanceledException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskCanceledException : System.OperationCanceledException + { + public System.Threading.Tasks.Task Task { get => throw null; } + public TaskCanceledException(string message, System.Exception innerException, System.Threading.CancellationToken token) => throw null; + public TaskCanceledException(string message, System.Exception innerException) => throw null; + public TaskCanceledException(string message) => throw null; + public TaskCanceledException(System.Threading.Tasks.Task task) => throw null; + public TaskCanceledException() => throw null; + protected TaskCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskCompletionSource` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskCompletionSource + { + public void SetCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public void SetCanceled() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetException(System.Collections.Generic.IEnumerable exceptions) => throw null; + public void SetResult() => throw null; + public System.Threading.Tasks.Task Task { get => throw null; } + public TaskCompletionSource(object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public TaskCompletionSource(object state) => throw null; + public TaskCompletionSource(System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public TaskCompletionSource() => throw null; + public bool TrySetCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public bool TrySetCanceled() => throw null; + public bool TrySetException(System.Exception exception) => throw null; + public bool TrySetException(System.Collections.Generic.IEnumerable exceptions) => throw null; + public bool TrySetResult() => throw null; + } + + // Generated from `System.Threading.Tasks.TaskCompletionSource<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskCompletionSource + { + public void SetCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public void SetCanceled() => throw null; + public void SetException(System.Exception exception) => throw null; + public void SetException(System.Collections.Generic.IEnumerable exceptions) => throw null; + public void SetResult(TResult result) => throw null; + public System.Threading.Tasks.Task Task { get => throw null; } + public TaskCompletionSource(object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public TaskCompletionSource(object state) => throw null; + public TaskCompletionSource(System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public TaskCompletionSource() => throw null; + public bool TrySetCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public bool TrySetCanceled() => throw null; + public bool TrySetException(System.Exception exception) => throw null; + public bool TrySetException(System.Collections.Generic.IEnumerable exceptions) => throw null; + public bool TrySetResult(TResult result) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskContinuationOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TaskContinuationOptions + { + AttachedToParent, + DenyChildAttach, + ExecuteSynchronously, + HideScheduler, + LazyCancellation, + LongRunning, + None, + NotOnCanceled, + NotOnFaulted, + NotOnRanToCompletion, + OnlyOnCanceled, + OnlyOnFaulted, + OnlyOnRanToCompletion, + PreferFairness, + RunContinuationsAsynchronously, + // Stub generator skipped constructor + } + + // Generated from `System.Threading.Tasks.TaskCreationOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum TaskCreationOptions + { + AttachedToParent, + DenyChildAttach, + HideScheduler, + LongRunning, + None, + PreferFairness, + RunContinuationsAsynchronously, + // Stub generator skipped constructor + } + + // Generated from `System.Threading.Tasks.TaskExtensions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static partial class TaskExtensions + { + public static System.Threading.Tasks.Task Unwrap(this System.Threading.Tasks.Task> task) => throw null; + public static System.Threading.Tasks.Task Unwrap(this System.Threading.Tasks.Task task) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskFactory` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskFactory + { + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public System.Threading.Tasks.TaskContinuationOptions ContinuationOptions { get => throw null; } + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action[]> continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action[]> continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action[]> continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action[]> continuationAction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Action continuationAction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action> continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action> continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action> continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action> continuationAction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action continuationAction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Action continuationAction) => throw null; + public System.Threading.Tasks.TaskCreationOptions CreationOptions { get => throw null; } + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, TArg2 arg2, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, TArg2 arg2, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Action endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Action endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Action endMethod) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Action endMethod, object state) => throw null; + public System.Threading.Tasks.TaskScheduler Scheduler { get => throw null; } + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, object state) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Action action) => throw null; + public TaskFactory(System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public TaskFactory(System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public TaskFactory(System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public TaskFactory(System.Threading.CancellationToken cancellationToken) => throw null; + public TaskFactory() => throw null; + } + + // Generated from `System.Threading.Tasks.TaskFactory<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskFactory + { + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public System.Threading.Tasks.TaskContinuationOptions ContinuationOptions { get => throw null; } + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func[], TResult> continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAll(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func, TResult> continuationFunction) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ContinueWhenAny(System.Threading.Tasks.Task[] tasks, System.Func continuationFunction) => throw null; + public System.Threading.Tasks.TaskCreationOptions CreationOptions { get => throw null; } + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object state) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.IAsyncResult asyncResult, System.Func endMethod) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task FromAsync(System.Func beginMethod, System.Func endMethod, object state) => throw null; + public System.Threading.Tasks.TaskScheduler Scheduler { get => throw null; } + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, object state) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.Tasks.TaskCreationOptions creationOptions) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task StartNew(System.Func function) => throw null; + public TaskFactory(System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public TaskFactory(System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskContinuationOptions continuationOptions) => throw null; + public TaskFactory(System.Threading.CancellationToken cancellationToken, System.Threading.Tasks.TaskCreationOptions creationOptions, System.Threading.Tasks.TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) => throw null; + public TaskFactory(System.Threading.CancellationToken cancellationToken) => throw null; + public TaskFactory() => throw null; + } + + // Generated from `System.Threading.Tasks.TaskScheduler` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TaskScheduler + { + public static System.Threading.Tasks.TaskScheduler Current { get => throw null; } + public static System.Threading.Tasks.TaskScheduler Default { get => throw null; } + public static System.Threading.Tasks.TaskScheduler FromCurrentSynchronizationContext() => throw null; + protected abstract System.Collections.Generic.IEnumerable GetScheduledTasks(); + public int Id { get => throw null; } + public virtual int MaximumConcurrencyLevel { get => throw null; } + protected internal abstract void QueueTask(System.Threading.Tasks.Task task); + protected TaskScheduler() => throw null; + protected internal virtual bool TryDequeue(System.Threading.Tasks.Task task) => throw null; + protected bool TryExecuteTask(System.Threading.Tasks.Task task) => throw null; + protected abstract bool TryExecuteTaskInline(System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued); + public static event System.EventHandler UnobservedTaskException; + } + + // Generated from `System.Threading.Tasks.TaskSchedulerException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TaskSchedulerException : System.Exception + { + public TaskSchedulerException(string message, System.Exception innerException) => throw null; + public TaskSchedulerException(string message) => throw null; + public TaskSchedulerException(System.Exception innerException) => throw null; + public TaskSchedulerException() => throw null; + protected TaskSchedulerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.Tasks.TaskStatus` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum TaskStatus + { + Canceled, + Created, + Faulted, + RanToCompletion, + Running, + // Stub generator skipped constructor + WaitingForActivation, + WaitingForChildrenToComplete, + WaitingToRun, + } + + // Generated from `System.Threading.Tasks.UnobservedTaskExceptionEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnobservedTaskExceptionEventArgs : System.EventArgs + { + public System.AggregateException Exception { get => throw null; } + public bool Observed { get => throw null; } + public void SetObserved() => throw null; + public UnobservedTaskExceptionEventArgs(System.AggregateException exception) => throw null; + } + + // Generated from `System.Threading.Tasks.ValueTask` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTask : System.IEquatable + { + public static bool operator !=(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) => throw null; + public static bool operator ==(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) => throw null; + public System.Threading.Tasks.Task AsTask() => throw null; + public static System.Threading.Tasks.ValueTask CompletedTask { get => throw null; } + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.Tasks.ValueTask other) => throw null; + public static System.Threading.Tasks.ValueTask FromCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.ValueTask FromCanceled(System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.ValueTask FromException(System.Exception exception) => throw null; + public static System.Threading.Tasks.ValueTask FromException(System.Exception exception) => throw null; + public static System.Threading.Tasks.ValueTask FromResult(TResult result) => throw null; + public System.Runtime.CompilerServices.ValueTaskAwaiter GetAwaiter() => throw null; + public override int GetHashCode() => throw null; + public bool IsCanceled { get => throw null; } + public bool IsCompleted { get => throw null; } + public bool IsCompletedSuccessfully { get => throw null; } + public bool IsFaulted { get => throw null; } + public System.Threading.Tasks.ValueTask Preserve() => throw null; + public ValueTask(System.Threading.Tasks.Task task) => throw null; + public ValueTask(System.Threading.Tasks.Sources.IValueTaskSource source, System.Int16 token) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Threading.Tasks.ValueTask<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ValueTask : System.IEquatable> + { + public static bool operator !=(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) => throw null; + public static bool operator ==(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right) => throw null; + public System.Threading.Tasks.Task AsTask() => throw null; + public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable ConfigureAwait(bool continueOnCapturedContext) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.Tasks.ValueTask other) => throw null; + public System.Runtime.CompilerServices.ValueTaskAwaiter GetAwaiter() => throw null; + public override int GetHashCode() => throw null; + public bool IsCanceled { get => throw null; } + public bool IsCompleted { get => throw null; } + public bool IsCompletedSuccessfully { get => throw null; } + public bool IsFaulted { get => throw null; } + public System.Threading.Tasks.ValueTask Preserve() => throw null; + public TResult Result { get => throw null; } + public override string ToString() => throw null; + public ValueTask(TResult result) => throw null; + public ValueTask(System.Threading.Tasks.Task task) => throw null; + public ValueTask(System.Threading.Tasks.Sources.IValueTaskSource source, System.Int16 token) => throw null; + // Stub generator skipped constructor + } + + namespace Sources + { + // Generated from `System.Threading.Tasks.Sources.IValueTaskSource` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IValueTaskSource + { + void GetResult(System.Int16 token); + System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(System.Int16 token); + void OnCompleted(System.Action continuation, object state, System.Int16 token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags); + } + + // Generated from `System.Threading.Tasks.Sources.IValueTaskSource<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IValueTaskSource + { + TResult GetResult(System.Int16 token); + System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(System.Int16 token); + void OnCompleted(System.Action continuation, object state, System.Int16 token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags); + } + + // Generated from `System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ManualResetValueTaskSourceCore + { + public TResult GetResult(System.Int16 token) => throw null; + public System.Threading.Tasks.Sources.ValueTaskSourceStatus GetStatus(System.Int16 token) => throw null; + // Stub generator skipped constructor + public void OnCompleted(System.Action continuation, object state, System.Int16 token, System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags flags) => throw null; + public void Reset() => throw null; + public bool RunContinuationsAsynchronously { get => throw null; set => throw null; } + public void SetException(System.Exception error) => throw null; + public void SetResult(TResult result) => throw null; + public System.Int16 Version { get => throw null; } + } + + // Generated from `System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ValueTaskSourceOnCompletedFlags + { + FlowExecutionContext, + None, + UseSchedulingContext, + // Stub generator skipped constructor + } + + // Generated from `System.Threading.Tasks.Sources.ValueTaskSourceStatus` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ValueTaskSourceStatus + { + Canceled, + Faulted, + Pending, + Succeeded, + // Stub generator skipped constructor + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs new file mode 100644 index 000000000000..5e4ffccc3ea3 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs @@ -0,0 +1,231 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Security + { + namespace Claims + { + // Generated from `System.Security.Claims.Claim` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Claim + { + public Claim(string type, string value, string valueType, string issuer, string originalIssuer, System.Security.Claims.ClaimsIdentity subject) => throw null; + public Claim(string type, string value, string valueType, string issuer, string originalIssuer) => throw null; + public Claim(string type, string value, string valueType, string issuer) => throw null; + public Claim(string type, string value, string valueType) => throw null; + public Claim(string type, string value) => throw null; + public Claim(System.IO.BinaryReader reader, System.Security.Claims.ClaimsIdentity subject) => throw null; + public Claim(System.IO.BinaryReader reader) => throw null; + protected Claim(System.Security.Claims.Claim other, System.Security.Claims.ClaimsIdentity subject) => throw null; + protected Claim(System.Security.Claims.Claim other) => throw null; + public virtual System.Security.Claims.Claim Clone(System.Security.Claims.ClaimsIdentity identity) => throw null; + public virtual System.Security.Claims.Claim Clone() => throw null; + protected virtual System.Byte[] CustomSerializationData { get => throw null; } + public string Issuer { get => throw null; } + public string OriginalIssuer { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public System.Security.Claims.ClaimsIdentity Subject { get => throw null; } + public override string ToString() => throw null; + public string Type { get => throw null; } + public string Value { get => throw null; } + public string ValueType { get => throw null; } + public virtual void WriteTo(System.IO.BinaryWriter writer) => throw null; + protected virtual void WriteTo(System.IO.BinaryWriter writer, System.Byte[] userData) => throw null; + } + + // Generated from `System.Security.Claims.ClaimTypes` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ClaimTypes + { + public const string Actor = default; + public const string Anonymous = default; + public const string Authentication = default; + public const string AuthenticationInstant = default; + public const string AuthenticationMethod = default; + public const string AuthorizationDecision = default; + public const string CookiePath = default; + public const string Country = default; + public const string DateOfBirth = default; + public const string DenyOnlyPrimaryGroupSid = default; + public const string DenyOnlyPrimarySid = default; + public const string DenyOnlySid = default; + public const string DenyOnlyWindowsDeviceGroup = default; + public const string Dns = default; + public const string Dsa = default; + public const string Email = default; + public const string Expiration = default; + public const string Expired = default; + public const string Gender = default; + public const string GivenName = default; + public const string GroupSid = default; + public const string Hash = default; + public const string HomePhone = default; + public const string IsPersistent = default; + public const string Locality = default; + public const string MobilePhone = default; + public const string Name = default; + public const string NameIdentifier = default; + public const string OtherPhone = default; + public const string PostalCode = default; + public const string PrimaryGroupSid = default; + public const string PrimarySid = default; + public const string Role = default; + public const string Rsa = default; + public const string SerialNumber = default; + public const string Sid = default; + public const string Spn = default; + public const string StateOrProvince = default; + public const string StreetAddress = default; + public const string Surname = default; + public const string System = default; + public const string Thumbprint = default; + public const string Upn = default; + public const string Uri = default; + public const string UserData = default; + public const string Version = default; + public const string Webpage = default; + public const string WindowsAccountName = default; + public const string WindowsDeviceClaim = default; + public const string WindowsDeviceGroup = default; + public const string WindowsFqbnVersion = default; + public const string WindowsSubAuthority = default; + public const string WindowsUserClaim = default; + public const string X500DistinguishedName = default; + } + + // Generated from `System.Security.Claims.ClaimValueTypes` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ClaimValueTypes + { + public const string Base64Binary = default; + public const string Base64Octet = default; + public const string Boolean = default; + public const string Date = default; + public const string DateTime = default; + public const string DaytimeDuration = default; + public const string DnsName = default; + public const string Double = default; + public const string DsaKeyValue = default; + public const string Email = default; + public const string Fqbn = default; + public const string HexBinary = default; + public const string Integer = default; + public const string Integer32 = default; + public const string Integer64 = default; + public const string KeyInfo = default; + public const string Rfc822Name = default; + public const string Rsa = default; + public const string RsaKeyValue = default; + public const string Sid = default; + public const string String = default; + public const string Time = default; + public const string UInteger32 = default; + public const string UInteger64 = default; + public const string UpnName = default; + public const string X500Name = default; + public const string YearMonthDuration = default; + } + + // Generated from `System.Security.Claims.ClaimsIdentity` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ClaimsIdentity : System.Security.Principal.IIdentity + { + public System.Security.Claims.ClaimsIdentity Actor { get => throw null; set => throw null; } + public virtual void AddClaim(System.Security.Claims.Claim claim) => throw null; + public virtual void AddClaims(System.Collections.Generic.IEnumerable claims) => throw null; + public virtual string AuthenticationType { get => throw null; } + public object BootstrapContext { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IEnumerable Claims { get => throw null; } + public ClaimsIdentity(string authenticationType, string nameType, string roleType) => throw null; + public ClaimsIdentity(string authenticationType) => throw null; + public ClaimsIdentity(System.Security.Principal.IIdentity identity, System.Collections.Generic.IEnumerable claims, string authenticationType, string nameType, string roleType) => throw null; + public ClaimsIdentity(System.Security.Principal.IIdentity identity, System.Collections.Generic.IEnumerable claims) => throw null; + public ClaimsIdentity(System.Security.Principal.IIdentity identity) => throw null; + public ClaimsIdentity(System.IO.BinaryReader reader) => throw null; + public ClaimsIdentity(System.Collections.Generic.IEnumerable claims, string authenticationType, string nameType, string roleType) => throw null; + public ClaimsIdentity(System.Collections.Generic.IEnumerable claims, string authenticationType) => throw null; + public ClaimsIdentity(System.Collections.Generic.IEnumerable claims) => throw null; + public ClaimsIdentity() => throw null; + protected ClaimsIdentity(System.Security.Claims.ClaimsIdentity other) => throw null; + protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected ClaimsIdentity(System.Runtime.Serialization.SerializationInfo info) => throw null; + public virtual System.Security.Claims.ClaimsIdentity Clone() => throw null; + protected virtual System.Security.Claims.Claim CreateClaim(System.IO.BinaryReader reader) => throw null; + protected virtual System.Byte[] CustomSerializationData { get => throw null; } + public const string DefaultIssuer = default; + public const string DefaultNameClaimType = default; + public const string DefaultRoleClaimType = default; + public virtual System.Collections.Generic.IEnumerable FindAll(string type) => throw null; + public virtual System.Collections.Generic.IEnumerable FindAll(System.Predicate match) => throw null; + public virtual System.Security.Claims.Claim FindFirst(string type) => throw null; + public virtual System.Security.Claims.Claim FindFirst(System.Predicate match) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual bool HasClaim(string type, string value) => throw null; + public virtual bool HasClaim(System.Predicate match) => throw null; + public virtual bool IsAuthenticated { get => throw null; } + public string Label { get => throw null; set => throw null; } + public virtual string Name { get => throw null; } + public string NameClaimType { get => throw null; } + public virtual void RemoveClaim(System.Security.Claims.Claim claim) => throw null; + public string RoleClaimType { get => throw null; } + public virtual bool TryRemoveClaim(System.Security.Claims.Claim claim) => throw null; + public virtual void WriteTo(System.IO.BinaryWriter writer) => throw null; + protected virtual void WriteTo(System.IO.BinaryWriter writer, System.Byte[] userData) => throw null; + } + + // Generated from `System.Security.Claims.ClaimsPrincipal` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ClaimsPrincipal : System.Security.Principal.IPrincipal + { + public virtual void AddIdentities(System.Collections.Generic.IEnumerable identities) => throw null; + public virtual void AddIdentity(System.Security.Claims.ClaimsIdentity identity) => throw null; + public virtual System.Collections.Generic.IEnumerable Claims { get => throw null; } + public ClaimsPrincipal(System.Security.Principal.IPrincipal principal) => throw null; + public ClaimsPrincipal(System.Security.Principal.IIdentity identity) => throw null; + public ClaimsPrincipal(System.IO.BinaryReader reader) => throw null; + public ClaimsPrincipal(System.Collections.Generic.IEnumerable identities) => throw null; + public ClaimsPrincipal() => throw null; + protected ClaimsPrincipal(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static System.Func ClaimsPrincipalSelector { get => throw null; set => throw null; } + public virtual System.Security.Claims.ClaimsPrincipal Clone() => throw null; + protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity(System.IO.BinaryReader reader) => throw null; + public static System.Security.Claims.ClaimsPrincipal Current { get => throw null; } + protected virtual System.Byte[] CustomSerializationData { get => throw null; } + public virtual System.Collections.Generic.IEnumerable FindAll(string type) => throw null; + public virtual System.Collections.Generic.IEnumerable FindAll(System.Predicate match) => throw null; + public virtual System.Security.Claims.Claim FindFirst(string type) => throw null; + public virtual System.Security.Claims.Claim FindFirst(System.Predicate match) => throw null; + protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual bool HasClaim(string type, string value) => throw null; + public virtual bool HasClaim(System.Predicate match) => throw null; + public virtual System.Collections.Generic.IEnumerable Identities { get => throw null; } + public virtual System.Security.Principal.IIdentity Identity { get => throw null; } + public virtual bool IsInRole(string role) => throw null; + public static System.Func, System.Security.Claims.ClaimsIdentity> PrimaryIdentitySelector { get => throw null; set => throw null; } + public virtual void WriteTo(System.IO.BinaryWriter writer) => throw null; + protected virtual void WriteTo(System.IO.BinaryWriter writer, System.Byte[] userData) => throw null; + } + + } + namespace Principal + { + // Generated from `System.Security.Principal.GenericIdentity` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GenericIdentity : System.Security.Claims.ClaimsIdentity + { + public override string AuthenticationType { get => throw null; } + public override System.Collections.Generic.IEnumerable Claims { get => throw null; } + public override System.Security.Claims.ClaimsIdentity Clone() => throw null; + public GenericIdentity(string name, string type) => throw null; + public GenericIdentity(string name) => throw null; + protected GenericIdentity(System.Security.Principal.GenericIdentity identity) => throw null; + public override bool IsAuthenticated { get => throw null; } + public override string Name { get => throw null; } + } + + // Generated from `System.Security.Principal.GenericPrincipal` in `System.Security.Claims, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GenericPrincipal : System.Security.Claims.ClaimsPrincipal + { + public GenericPrincipal(System.Security.Principal.IIdentity identity, string[] roles) => throw null; + public override System.Security.Principal.IIdentity Identity { get => throw null; } + public override bool IsInRole(string role) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs new file mode 100644 index 000000000000..a10221628873 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs @@ -0,0 +1,955 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Security + { + namespace Cryptography + { + // Generated from `System.Security.Cryptography.Aes` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Aes : System.Security.Cryptography.SymmetricAlgorithm + { + protected Aes() => throw null; + public static System.Security.Cryptography.Aes Create(string algorithmName) => throw null; + public static System.Security.Cryptography.Aes Create() => throw null; + } + + // Generated from `System.Security.Cryptography.AesCcm` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AesCcm : System.IDisposable + { + public AesCcm(System.ReadOnlySpan key) => throw null; + public AesCcm(System.Byte[] key) => throw null; + public void Decrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan ciphertext, System.ReadOnlySpan tag, System.Span plaintext, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) => throw null; + public void Decrypt(System.Byte[] nonce, System.Byte[] ciphertext, System.Byte[] tag, System.Byte[] plaintext, System.Byte[] associatedData = default(System.Byte[])) => throw null; + public void Dispose() => throw null; + public void Encrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan plaintext, System.Span ciphertext, System.Span tag, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) => throw null; + public void Encrypt(System.Byte[] nonce, System.Byte[] plaintext, System.Byte[] ciphertext, System.Byte[] tag, System.Byte[] associatedData = default(System.Byte[])) => throw null; + public static System.Security.Cryptography.KeySizes NonceByteSizes { get => throw null; } + public static System.Security.Cryptography.KeySizes TagByteSizes { get => throw null; } + } + + // Generated from `System.Security.Cryptography.AesGcm` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AesGcm : System.IDisposable + { + public AesGcm(System.ReadOnlySpan key) => throw null; + public AesGcm(System.Byte[] key) => throw null; + public void Decrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan ciphertext, System.ReadOnlySpan tag, System.Span plaintext, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) => throw null; + public void Decrypt(System.Byte[] nonce, System.Byte[] ciphertext, System.Byte[] tag, System.Byte[] plaintext, System.Byte[] associatedData = default(System.Byte[])) => throw null; + public void Dispose() => throw null; + public void Encrypt(System.ReadOnlySpan nonce, System.ReadOnlySpan plaintext, System.Span ciphertext, System.Span tag, System.ReadOnlySpan associatedData = default(System.ReadOnlySpan)) => throw null; + public void Encrypt(System.Byte[] nonce, System.Byte[] plaintext, System.Byte[] ciphertext, System.Byte[] tag, System.Byte[] associatedData = default(System.Byte[])) => throw null; + public static System.Security.Cryptography.KeySizes NonceByteSizes { get => throw null; } + public static System.Security.Cryptography.KeySizes TagByteSizes { get => throw null; } + } + + // Generated from `System.Security.Cryptography.AesManaged` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AesManaged : System.Security.Cryptography.Aes + { + public AesManaged() => throw null; + public override int BlockSize { get => throw null; set => throw null; } + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int FeedbackSize { get => throw null; set => throw null; } + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] IV { get => throw null; set => throw null; } + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalBlockSizes { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public override System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + public override System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.AsymmetricKeyExchangeDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AsymmetricKeyExchangeDeformatter + { + protected AsymmetricKeyExchangeDeformatter() => throw null; + public abstract System.Byte[] DecryptKeyExchange(System.Byte[] rgb); + public abstract string Parameters { get; set; } + public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key); + } + + // Generated from `System.Security.Cryptography.AsymmetricKeyExchangeFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AsymmetricKeyExchangeFormatter + { + protected AsymmetricKeyExchangeFormatter() => throw null; + public abstract System.Byte[] CreateKeyExchange(System.Byte[] data, System.Type symAlgType); + public abstract System.Byte[] CreateKeyExchange(System.Byte[] data); + public abstract string Parameters { get; } + public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key); + } + + // Generated from `System.Security.Cryptography.AsymmetricSignatureDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AsymmetricSignatureDeformatter + { + protected AsymmetricSignatureDeformatter() => throw null; + public abstract void SetHashAlgorithm(string strName); + public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key); + public virtual bool VerifySignature(System.Security.Cryptography.HashAlgorithm hash, System.Byte[] rgbSignature) => throw null; + public abstract bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature); + } + + // Generated from `System.Security.Cryptography.AsymmetricSignatureFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AsymmetricSignatureFormatter + { + protected AsymmetricSignatureFormatter() => throw null; + public virtual System.Byte[] CreateSignature(System.Security.Cryptography.HashAlgorithm hash) => throw null; + public abstract System.Byte[] CreateSignature(System.Byte[] rgbHash); + public abstract void SetHashAlgorithm(string strName); + public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key); + } + + // Generated from `System.Security.Cryptography.CryptoConfig` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CryptoConfig + { + public static void AddAlgorithm(System.Type algorithm, params string[] names) => throw null; + public static void AddOID(string oid, params string[] names) => throw null; + public static bool AllowOnlyFipsAlgorithms { get => throw null; } + public static object CreateFromName(string name, params object[] args) => throw null; + public static object CreateFromName(string name) => throw null; + public CryptoConfig() => throw null; + public static System.Byte[] EncodeOID(string str) => throw null; + public static string MapNameToOID(string name) => throw null; + } + + // Generated from `System.Security.Cryptography.DES` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DES : System.Security.Cryptography.SymmetricAlgorithm + { + public static System.Security.Cryptography.DES Create(string algName) => throw null; + public static System.Security.Cryptography.DES Create() => throw null; + protected DES() => throw null; + public static bool IsSemiWeakKey(System.Byte[] rgbKey) => throw null; + public static bool IsWeakKey(System.Byte[] rgbKey) => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.DSA` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DSA : System.Security.Cryptography.AsymmetricAlgorithm + { + public static System.Security.Cryptography.DSA Create(string algName) => throw null; + public static System.Security.Cryptography.DSA Create(int keySizeInBits) => throw null; + public static System.Security.Cryptography.DSA Create(System.Security.Cryptography.DSAParameters parameters) => throw null; + public static System.Security.Cryptography.DSA Create() => throw null; + public abstract System.Byte[] CreateSignature(System.Byte[] rgbHash); + public System.Byte[] CreateSignature(System.Byte[] rgbHash, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] CreateSignatureCore(System.ReadOnlySpan hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected DSA() => throw null; + public abstract System.Security.Cryptography.DSAParameters ExportParameters(bool includePrivateParameters); + public override void FromXmlString(string xmlString) => throw null; + public int GetMaxSignatureSize(System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) => throw null; + public override void ImportFromPem(System.ReadOnlySpan input) => throw null; + public abstract void ImportParameters(System.Security.Cryptography.DSAParameters parameters); + public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual System.Byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual System.Byte[] SignData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public System.Byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public System.Byte[] SignData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual System.Byte[] SignDataCore(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public override string ToXmlString(bool includePrivateParameters) => throw null; + public virtual bool TryCreateSignature(System.ReadOnlySpan hash, System.Span destination, out int bytesWritten) => throw null; + public bool TryCreateSignature(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + protected virtual bool TryCreateSignatureCore(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) => throw null; + protected virtual bool TryHashData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) => throw null; + public virtual bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) => throw null; + public bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + protected virtual bool TrySignDataCore(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + public virtual bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual bool VerifyData(System.IO.Stream data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.IO.Stream data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public virtual bool VerifySignature(System.ReadOnlySpan hash, System.ReadOnlySpan signature) => throw null; + public bool VerifySignature(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public abstract bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature); + protected virtual bool VerifySignatureCore(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + } + + // Generated from `System.Security.Cryptography.DSAParameters` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DSAParameters + { + public int Counter; + // Stub generator skipped constructor + public System.Byte[] G; + public System.Byte[] J; + public System.Byte[] P; + public System.Byte[] Q; + public System.Byte[] Seed; + public System.Byte[] X; + public System.Byte[] Y; + } + + // Generated from `System.Security.Cryptography.DSASignatureDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DSASignatureDeformatter : System.Security.Cryptography.AsymmetricSignatureDeformatter + { + public DSASignatureDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public DSASignatureDeformatter() => throw null; + public override void SetHashAlgorithm(string strName) => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public override bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature) => throw null; + } + + // Generated from `System.Security.Cryptography.DSASignatureFormat` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DSASignatureFormat + { + // Stub generator skipped constructor + IeeeP1363FixedFieldConcatenation, + Rfc3279DerSequence, + } + + // Generated from `System.Security.Cryptography.DSASignatureFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DSASignatureFormatter : System.Security.Cryptography.AsymmetricSignatureFormatter + { + public override System.Byte[] CreateSignature(System.Byte[] rgbHash) => throw null; + public DSASignatureFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public DSASignatureFormatter() => throw null; + public override void SetHashAlgorithm(string strName) => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.DeriveBytes` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class DeriveBytes : System.IDisposable + { + protected DeriveBytes() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public abstract System.Byte[] GetBytes(int cb); + public abstract void Reset(); + } + + // Generated from `System.Security.Cryptography.ECCurve` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ECCurve + { + public System.Byte[] A; + public System.Byte[] B; + public System.Byte[] Cofactor; + public static System.Security.Cryptography.ECCurve CreateFromFriendlyName(string oidFriendlyName) => throw null; + public static System.Security.Cryptography.ECCurve CreateFromOid(System.Security.Cryptography.Oid curveOid) => throw null; + public static System.Security.Cryptography.ECCurve CreateFromValue(string oidValue) => throw null; + public System.Security.Cryptography.ECCurve.ECCurveType CurveType; + // Stub generator skipped constructor + // Generated from `System.Security.Cryptography.ECCurve.ECCurveType` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ECCurveType + { + Characteristic2, + // Stub generator skipped constructor + Implicit, + Named, + PrimeMontgomery, + PrimeShortWeierstrass, + PrimeTwistedEdwards, + } + + + public System.Security.Cryptography.ECPoint G; + public System.Security.Cryptography.HashAlgorithmName? Hash; + public bool IsCharacteristic2 { get => throw null; } + public bool IsExplicit { get => throw null; } + public bool IsNamed { get => throw null; } + public bool IsPrime { get => throw null; } + // Generated from `System.Security.Cryptography.ECCurve.NamedCurves` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class NamedCurves + { + public static System.Security.Cryptography.ECCurve brainpoolP160r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP160t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP192r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP192t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP224r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP224t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP256r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP256t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP320r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP320t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP384r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP384t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP512r1 { get => throw null; } + public static System.Security.Cryptography.ECCurve brainpoolP512t1 { get => throw null; } + public static System.Security.Cryptography.ECCurve nistP256 { get => throw null; } + public static System.Security.Cryptography.ECCurve nistP384 { get => throw null; } + public static System.Security.Cryptography.ECCurve nistP521 { get => throw null; } + } + + + public System.Security.Cryptography.Oid Oid { get => throw null; } + public System.Byte[] Order; + public System.Byte[] Polynomial; + public System.Byte[] Prime; + public System.Byte[] Seed; + public void Validate() => throw null; + } + + // Generated from `System.Security.Cryptography.ECDiffieHellman` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ECDiffieHellman : System.Security.Cryptography.AsymmetricAlgorithm + { + public static System.Security.Cryptography.ECDiffieHellman Create(string algorithm) => throw null; + public static System.Security.Cryptography.ECDiffieHellman Create(System.Security.Cryptography.ECParameters parameters) => throw null; + public static System.Security.Cryptography.ECDiffieHellman Create(System.Security.Cryptography.ECCurve curve) => throw null; + public static System.Security.Cryptography.ECDiffieHellman Create() => throw null; + public virtual System.Byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] secretPrepend, System.Byte[] secretAppend) => throw null; + public System.Byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual System.Byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] hmacKey, System.Byte[] secretPrepend, System.Byte[] secretAppend) => throw null; + public System.Byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] hmacKey) => throw null; + public virtual System.Byte[] DeriveKeyMaterial(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey) => throw null; + public virtual System.Byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Byte[] prfLabel, System.Byte[] prfSeed) => throw null; + protected ECDiffieHellman() => throw null; + public virtual System.Byte[] ExportECPrivateKey() => throw null; + public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) => throw null; + public virtual System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) => throw null; + public override void FromXmlString(string xmlString) => throw null; + public virtual void GenerateKey(System.Security.Cryptography.ECCurve curve) => throw null; + public virtual void ImportECPrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) => throw null; + public override void ImportFromPem(System.ReadOnlySpan input) => throw null; + public virtual void ImportParameters(System.Security.Cryptography.ECParameters parameters) => throw null; + public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override string KeyExchangeAlgorithm { get => throw null; } + public abstract System.Security.Cryptography.ECDiffieHellmanPublicKey PublicKey { get; } + public override string SignatureAlgorithm { get => throw null; } + public override string ToXmlString(bool includePrivateParameters) => throw null; + public virtual bool TryExportECPrivateKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.ECDiffieHellmanPublicKey` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ECDiffieHellmanPublicKey : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected ECDiffieHellmanPublicKey(System.Byte[] keyBlob) => throw null; + protected ECDiffieHellmanPublicKey() => throw null; + public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters() => throw null; + public virtual System.Security.Cryptography.ECParameters ExportParameters() => throw null; + public virtual System.Byte[] ToByteArray() => throw null; + public virtual string ToXmlString() => throw null; + } + + // Generated from `System.Security.Cryptography.ECDsa` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class ECDsa : System.Security.Cryptography.AsymmetricAlgorithm + { + public static System.Security.Cryptography.ECDsa Create(string algorithm) => throw null; + public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECParameters parameters) => throw null; + public static System.Security.Cryptography.ECDsa Create(System.Security.Cryptography.ECCurve curve) => throw null; + public static System.Security.Cryptography.ECDsa Create() => throw null; + protected ECDsa() => throw null; + public virtual System.Byte[] ExportECPrivateKey() => throw null; + public virtual System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) => throw null; + public virtual System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) => throw null; + public override void FromXmlString(string xmlString) => throw null; + public virtual void GenerateKey(System.Security.Cryptography.ECCurve curve) => throw null; + public int GetMaxSignatureSize(System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual void ImportECPrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) => throw null; + public override void ImportFromPem(System.ReadOnlySpan input) => throw null; + public virtual void ImportParameters(System.Security.Cryptography.ECParameters parameters) => throw null; + public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override string KeyExchangeAlgorithm { get => throw null; } + public virtual System.Byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual System.Byte[] SignData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public System.Byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public System.Byte[] SignData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] SignDataCore(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] SignDataCore(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public abstract System.Byte[] SignHash(System.Byte[] hash); + public System.Byte[] SignHash(System.Byte[] hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual System.Byte[] SignHashCore(System.ReadOnlySpan hash, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public override string SignatureAlgorithm { get => throw null; } + public override string ToXmlString(bool includePrivateParameters) => throw null; + public virtual bool TryExportECPrivateKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) => throw null; + protected virtual bool TryHashData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) => throw null; + public virtual bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) => throw null; + public bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + protected virtual bool TrySignDataCore(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + public virtual bool TrySignHash(System.ReadOnlySpan hash, System.Span destination, out int bytesWritten) => throw null; + public bool TrySignHash(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + protected virtual bool TrySignHashCore(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten) => throw null; + public virtual bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.IO.Stream data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.IO.Stream data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual bool VerifyDataCore(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + protected virtual bool VerifyDataCore(System.IO.Stream data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public virtual bool VerifyHash(System.ReadOnlySpan hash, System.ReadOnlySpan signature) => throw null; + public bool VerifyHash(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public bool VerifyHash(System.Byte[] hash, System.Byte[] signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + public abstract bool VerifyHash(System.Byte[] hash, System.Byte[] signature); + protected virtual bool VerifyHashCore(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.DSASignatureFormat signatureFormat) => throw null; + } + + // Generated from `System.Security.Cryptography.ECParameters` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ECParameters + { + public System.Security.Cryptography.ECCurve Curve; + public System.Byte[] D; + // Stub generator skipped constructor + public System.Security.Cryptography.ECPoint Q; + public void Validate() => throw null; + } + + // Generated from `System.Security.Cryptography.ECPoint` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ECPoint + { + // Stub generator skipped constructor + public System.Byte[] X; + public System.Byte[] Y; + } + + // Generated from `System.Security.Cryptography.HKDF` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class HKDF + { + public static void DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan ikm, System.Span output, System.ReadOnlySpan salt, System.ReadOnlySpan info) => throw null; + public static System.Byte[] DeriveKey(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.Byte[] ikm, int outputLength, System.Byte[] salt = default(System.Byte[]), System.Byte[] info = default(System.Byte[])) => throw null; + public static void Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan prk, System.Span output, System.ReadOnlySpan info) => throw null; + public static System.Byte[] Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.Byte[] prk, int outputLength, System.Byte[] info = default(System.Byte[])) => throw null; + public static int Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.ReadOnlySpan ikm, System.ReadOnlySpan salt, System.Span prk) => throw null; + public static System.Byte[] Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, System.Byte[] ikm, System.Byte[] salt = default(System.Byte[])) => throw null; + } + + // Generated from `System.Security.Cryptography.HMACMD5` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HMACMD5 : System.Security.Cryptography.HMAC + { + protected override void Dispose(bool disposing) => throw null; + public HMACMD5(System.Byte[] key) => throw null; + public HMACMD5() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HMACSHA1` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HMACSHA1 : System.Security.Cryptography.HMAC + { + protected override void Dispose(bool disposing) => throw null; + public HMACSHA1(System.Byte[] key, bool useManagedSha1) => throw null; + public HMACSHA1(System.Byte[] key) => throw null; + public HMACSHA1() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HMACSHA256` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HMACSHA256 : System.Security.Cryptography.HMAC + { + protected override void Dispose(bool disposing) => throw null; + public HMACSHA256(System.Byte[] key) => throw null; + public HMACSHA256() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HMACSHA384` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HMACSHA384 : System.Security.Cryptography.HMAC + { + protected override void Dispose(bool disposing) => throw null; + public HMACSHA384(System.Byte[] key) => throw null; + public HMACSHA384() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + public bool ProduceLegacyHmacValues { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HMACSHA512` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HMACSHA512 : System.Security.Cryptography.HMAC + { + protected override void Dispose(bool disposing) => throw null; + public HMACSHA512(System.Byte[] key) => throw null; + public HMACSHA512() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + public bool ProduceLegacyHmacValues { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.IncrementalHash` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class IncrementalHash : System.IDisposable + { + public System.Security.Cryptography.HashAlgorithmName AlgorithmName { get => throw null; } + public void AppendData(System.ReadOnlySpan data) => throw null; + public void AppendData(System.Byte[] data, int offset, int count) => throw null; + public void AppendData(System.Byte[] data) => throw null; + public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.ReadOnlySpan key) => throw null; + public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Byte[] key) => throw null; + public static System.Security.Cryptography.IncrementalHash CreateHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public void Dispose() => throw null; + public int GetCurrentHash(System.Span destination) => throw null; + public System.Byte[] GetCurrentHash() => throw null; + public int GetHashAndReset(System.Span destination) => throw null; + public System.Byte[] GetHashAndReset() => throw null; + public int HashLengthInBytes { get => throw null; } + public bool TryGetCurrentHash(System.Span destination, out int bytesWritten) => throw null; + public bool TryGetHashAndReset(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.MD5` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MD5 : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.MD5 Create(string algName) => throw null; + public static System.Security.Cryptography.MD5 Create() => throw null; + public static int HashData(System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Byte[] HashData(System.ReadOnlySpan source) => throw null; + public static System.Byte[] HashData(System.Byte[] source) => throw null; + protected MD5() => throw null; + public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.MaskGenerationMethod` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class MaskGenerationMethod + { + public abstract System.Byte[] GenerateMask(System.Byte[] rgbSeed, int cbReturn); + protected MaskGenerationMethod() => throw null; + } + + // Generated from `System.Security.Cryptography.PKCS1MaskGenerationMethod` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PKCS1MaskGenerationMethod : System.Security.Cryptography.MaskGenerationMethod + { + public override System.Byte[] GenerateMask(System.Byte[] rgbSeed, int cbReturn) => throw null; + public string HashName { get => throw null; set => throw null; } + public PKCS1MaskGenerationMethod() => throw null; + } + + // Generated from `System.Security.Cryptography.RC2` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class RC2 : System.Security.Cryptography.SymmetricAlgorithm + { + public static System.Security.Cryptography.RC2 Create(string AlgName) => throw null; + public static System.Security.Cryptography.RC2 Create() => throw null; + public virtual int EffectiveKeySize { get => throw null; set => throw null; } + protected int EffectiveKeySizeValue; + public override int KeySize { get => throw null; set => throw null; } + protected RC2() => throw null; + } + + // Generated from `System.Security.Cryptography.RSA` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class RSA : System.Security.Cryptography.AsymmetricAlgorithm + { + public static System.Security.Cryptography.RSA Create(string algName) => throw null; + public static System.Security.Cryptography.RSA Create(int keySizeInBits) => throw null; + public static System.Security.Cryptography.RSA Create(System.Security.Cryptography.RSAParameters parameters) => throw null; + public static System.Security.Cryptography.RSA Create() => throw null; + public virtual System.Byte[] Decrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + public virtual System.Byte[] DecryptValue(System.Byte[] rgb) => throw null; + public virtual System.Byte[] Encrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + public virtual System.Byte[] EncryptValue(System.Byte[] rgb) => throw null; + public abstract System.Security.Cryptography.RSAParameters ExportParameters(bool includePrivateParameters); + public virtual System.Byte[] ExportRSAPrivateKey() => throw null; + public virtual System.Byte[] ExportRSAPublicKey() => throw null; + public override void FromXmlString(string xmlString) => throw null; + protected virtual System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected virtual System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) => throw null; + public override void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) => throw null; + public override void ImportFromPem(System.ReadOnlySpan input) => throw null; + public abstract void ImportParameters(System.Security.Cryptography.RSAParameters parameters); + public override void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual void ImportRSAPrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual void ImportRSAPublicKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) => throw null; + public override string KeyExchangeAlgorithm { get => throw null; } + protected RSA() => throw null; + public virtual System.Byte[] SignData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public virtual System.Byte[] SignData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public virtual System.Byte[] SignHash(System.Byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public override string SignatureAlgorithm { get => throw null; } + public override string ToXmlString(bool includePrivateParameters) => throw null; + public virtual bool TryDecrypt(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.RSAEncryptionPadding padding, out int bytesWritten) => throw null; + public virtual bool TryEncrypt(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.RSAEncryptionPadding padding, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) => throw null; + public virtual bool TryExportRSAPrivateKey(System.Span destination, out int bytesWritten) => throw null; + public virtual bool TryExportRSAPublicKey(System.Span destination, out int bytesWritten) => throw null; + public override bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) => throw null; + protected virtual bool TryHashData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten) => throw null; + public virtual bool TrySignData(System.ReadOnlySpan data, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten) => throw null; + public virtual bool TrySignHash(System.ReadOnlySpan hash, System.Span destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding, out int bytesWritten) => throw null; + public virtual bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public virtual bool VerifyData(System.Byte[] data, int offset, int count, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public bool VerifyData(System.IO.Stream data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public bool VerifyData(System.Byte[] data, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public virtual bool VerifyHash(System.ReadOnlySpan hash, System.ReadOnlySpan signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public virtual bool VerifyHash(System.Byte[] hash, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAEncryptionPadding` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAEncryptionPadding : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.RSAEncryptionPadding left, System.Security.Cryptography.RSAEncryptionPadding right) => throw null; + public static bool operator ==(System.Security.Cryptography.RSAEncryptionPadding left, System.Security.Cryptography.RSAEncryptionPadding right) => throw null; + public static System.Security.Cryptography.RSAEncryptionPadding CreateOaep(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.RSAEncryptionPadding other) => throw null; + public override int GetHashCode() => throw null; + public System.Security.Cryptography.RSAEncryptionPaddingMode Mode { get => throw null; } + public System.Security.Cryptography.HashAlgorithmName OaepHashAlgorithm { get => throw null; } + public static System.Security.Cryptography.RSAEncryptionPadding OaepSHA1 { get => throw null; } + public static System.Security.Cryptography.RSAEncryptionPadding OaepSHA256 { get => throw null; } + public static System.Security.Cryptography.RSAEncryptionPadding OaepSHA384 { get => throw null; } + public static System.Security.Cryptography.RSAEncryptionPadding OaepSHA512 { get => throw null; } + public static System.Security.Cryptography.RSAEncryptionPadding Pkcs1 { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.RSAEncryptionPaddingMode` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RSAEncryptionPaddingMode + { + Oaep, + Pkcs1, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAOAEPKeyExchangeDeformatter : System.Security.Cryptography.AsymmetricKeyExchangeDeformatter + { + public override System.Byte[] DecryptKeyExchange(System.Byte[] rgbData) => throw null; + public override string Parameters { get => throw null; set => throw null; } + public RSAOAEPKeyExchangeDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAOAEPKeyExchangeDeformatter() => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAOAEPKeyExchangeFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAOAEPKeyExchangeFormatter : System.Security.Cryptography.AsymmetricKeyExchangeFormatter + { + public override System.Byte[] CreateKeyExchange(System.Byte[] rgbData, System.Type symAlgType) => throw null; + public override System.Byte[] CreateKeyExchange(System.Byte[] rgbData) => throw null; + public System.Byte[] Parameter { get => throw null; set => throw null; } + public override string Parameters { get => throw null; } + public RSAOAEPKeyExchangeFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAOAEPKeyExchangeFormatter() => throw null; + public System.Security.Cryptography.RandomNumberGenerator Rng { get => throw null; set => throw null; } + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAPKCS1KeyExchangeDeformatter : System.Security.Cryptography.AsymmetricKeyExchangeDeformatter + { + public override System.Byte[] DecryptKeyExchange(System.Byte[] rgbIn) => throw null; + public override string Parameters { get => throw null; set => throw null; } + public System.Security.Cryptography.RandomNumberGenerator RNG { get => throw null; set => throw null; } + public RSAPKCS1KeyExchangeDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAPKCS1KeyExchangeDeformatter() => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAPKCS1KeyExchangeFormatter : System.Security.Cryptography.AsymmetricKeyExchangeFormatter + { + public override System.Byte[] CreateKeyExchange(System.Byte[] rgbData, System.Type symAlgType) => throw null; + public override System.Byte[] CreateKeyExchange(System.Byte[] rgbData) => throw null; + public override string Parameters { get => throw null; } + public RSAPKCS1KeyExchangeFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAPKCS1KeyExchangeFormatter() => throw null; + public System.Security.Cryptography.RandomNumberGenerator Rng { get => throw null; set => throw null; } + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAPKCS1SignatureDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAPKCS1SignatureDeformatter : System.Security.Cryptography.AsymmetricSignatureDeformatter + { + public RSAPKCS1SignatureDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAPKCS1SignatureDeformatter() => throw null; + public override void SetHashAlgorithm(string strName) => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public override bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAPKCS1SignatureFormatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSAPKCS1SignatureFormatter : System.Security.Cryptography.AsymmetricSignatureFormatter + { + public override System.Byte[] CreateSignature(System.Byte[] rgbHash) => throw null; + public RSAPKCS1SignatureFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public RSAPKCS1SignatureFormatter() => throw null; + public override void SetHashAlgorithm(string strName) => throw null; + public override void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + } + + // Generated from `System.Security.Cryptography.RSAParameters` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct RSAParameters + { + public System.Byte[] D; + public System.Byte[] DP; + public System.Byte[] DQ; + public System.Byte[] Exponent; + public System.Byte[] InverseQ; + public System.Byte[] Modulus; + public System.Byte[] P; + public System.Byte[] Q; + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.RSASignaturePadding` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSASignaturePadding : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.RSASignaturePadding left, System.Security.Cryptography.RSASignaturePadding right) => throw null; + public static bool operator ==(System.Security.Cryptography.RSASignaturePadding left, System.Security.Cryptography.RSASignaturePadding right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.RSASignaturePadding other) => throw null; + public override int GetHashCode() => throw null; + public System.Security.Cryptography.RSASignaturePaddingMode Mode { get => throw null; } + public static System.Security.Cryptography.RSASignaturePadding Pkcs1 { get => throw null; } + public static System.Security.Cryptography.RSASignaturePadding Pss { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Security.Cryptography.RSASignaturePaddingMode` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RSASignaturePaddingMode + { + Pkcs1, + Pss, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.RandomNumberGenerator` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class RandomNumberGenerator : System.IDisposable + { + public static System.Security.Cryptography.RandomNumberGenerator Create(string rngName) => throw null; + public static System.Security.Cryptography.RandomNumberGenerator Create() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public static void Fill(System.Span data) => throw null; + public virtual void GetBytes(System.Span data) => throw null; + public virtual void GetBytes(System.Byte[] data, int offset, int count) => throw null; + public abstract void GetBytes(System.Byte[] data); + public static int GetInt32(int toExclusive) => throw null; + public static int GetInt32(int fromInclusive, int toExclusive) => throw null; + public virtual void GetNonZeroBytes(System.Span data) => throw null; + public virtual void GetNonZeroBytes(System.Byte[] data) => throw null; + protected RandomNumberGenerator() => throw null; + } + + // Generated from `System.Security.Cryptography.Rfc2898DeriveBytes` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Rfc2898DeriveBytes : System.Security.Cryptography.DeriveBytes + { + public System.Byte[] CryptDeriveKey(string algname, string alghashname, int keySize, System.Byte[] rgbIV) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Byte[] GetBytes(int cb) => throw null; + public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get => throw null; } + public int IterationCount { get => throw null; set => throw null; } + public override void Reset() => throw null; + public Rfc2898DeriveBytes(string password, int saltSize, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public Rfc2898DeriveBytes(string password, int saltSize, int iterations) => throw null; + public Rfc2898DeriveBytes(string password, int saltSize) => throw null; + public Rfc2898DeriveBytes(string password, System.Byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public Rfc2898DeriveBytes(string password, System.Byte[] salt, int iterations) => throw null; + public Rfc2898DeriveBytes(string password, System.Byte[] salt) => throw null; + public Rfc2898DeriveBytes(System.Byte[] password, System.Byte[] salt, int iterations, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public Rfc2898DeriveBytes(System.Byte[] password, System.Byte[] salt, int iterations) => throw null; + public System.Byte[] Salt { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.Rijndael` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class Rijndael : System.Security.Cryptography.SymmetricAlgorithm + { + public static System.Security.Cryptography.Rijndael Create(string algName) => throw null; + public static System.Security.Cryptography.Rijndael Create() => throw null; + protected Rijndael() => throw null; + } + + // Generated from `System.Security.Cryptography.RijndaelManaged` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RijndaelManaged : System.Security.Cryptography.Rijndael + { + public override int BlockSize { get => throw null; set => throw null; } + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] IV { get => throw null; set => throw null; } + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public override System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + public override System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + public RijndaelManaged() => throw null; + } + + // Generated from `System.Security.Cryptography.SHA1` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SHA1 : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.SHA1 Create(string hashName) => throw null; + public static System.Security.Cryptography.SHA1 Create() => throw null; + public static int HashData(System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Byte[] HashData(System.ReadOnlySpan source) => throw null; + public static System.Byte[] HashData(System.Byte[] source) => throw null; + protected SHA1() => throw null; + public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA1Managed` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA1Managed : System.Security.Cryptography.SHA1 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA1Managed() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA256` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SHA256 : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.SHA256 Create(string hashName) => throw null; + public static System.Security.Cryptography.SHA256 Create() => throw null; + public static int HashData(System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Byte[] HashData(System.ReadOnlySpan source) => throw null; + public static System.Byte[] HashData(System.Byte[] source) => throw null; + protected SHA256() => throw null; + public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA256Managed` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA256Managed : System.Security.Cryptography.SHA256 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA256Managed() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA384` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SHA384 : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.SHA384 Create(string hashName) => throw null; + public static System.Security.Cryptography.SHA384 Create() => throw null; + public static int HashData(System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Byte[] HashData(System.ReadOnlySpan source) => throw null; + public static System.Byte[] HashData(System.Byte[] source) => throw null; + protected SHA384() => throw null; + public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA384Managed` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA384Managed : System.Security.Cryptography.SHA384 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA384Managed() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA512` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SHA512 : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.SHA512 Create(string hashName) => throw null; + public static System.Security.Cryptography.SHA512 Create() => throw null; + public static int HashData(System.ReadOnlySpan source, System.Span destination) => throw null; + public static System.Byte[] HashData(System.ReadOnlySpan source) => throw null; + public static System.Byte[] HashData(System.Byte[] source) => throw null; + protected SHA512() => throw null; + public static bool TryHashData(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA512Managed` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA512Managed : System.Security.Cryptography.SHA512 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA512Managed() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SignatureDescription` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SignatureDescription + { + public virtual System.Security.Cryptography.AsymmetricSignatureDeformatter CreateDeformatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public virtual System.Security.Cryptography.HashAlgorithm CreateDigest() => throw null; + public virtual System.Security.Cryptography.AsymmetricSignatureFormatter CreateFormatter(System.Security.Cryptography.AsymmetricAlgorithm key) => throw null; + public string DeformatterAlgorithm { get => throw null; set => throw null; } + public string DigestAlgorithm { get => throw null; set => throw null; } + public string FormatterAlgorithm { get => throw null; set => throw null; } + public string KeyAlgorithm { get => throw null; set => throw null; } + public SignatureDescription(System.Security.SecurityElement el) => throw null; + public SignatureDescription() => throw null; + } + + // Generated from `System.Security.Cryptography.TripleDES` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class TripleDES : System.Security.Cryptography.SymmetricAlgorithm + { + public static System.Security.Cryptography.TripleDES Create(string str) => throw null; + public static System.Security.Cryptography.TripleDES Create() => throw null; + public static bool IsWeakKey(System.Byte[] rgbKey) => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + protected TripleDES() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs new file mode 100644 index 000000000000..5c7eaf44e9e2 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs @@ -0,0 +1,310 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Security + { + namespace Cryptography + { + // Generated from `System.Security.Cryptography.AesCryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AesCryptoServiceProvider : System.Security.Cryptography.Aes + { + public AesCryptoServiceProvider() => throw null; + public override int BlockSize { get => throw null; set => throw null; } + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int FeedbackSize { get => throw null; set => throw null; } + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] IV { get => throw null; set => throw null; } + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalBlockSizes { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public override System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + public override System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.CspKeyContainerInfo` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CspKeyContainerInfo + { + public bool Accessible { get => throw null; } + public CspKeyContainerInfo(System.Security.Cryptography.CspParameters parameters) => throw null; + public bool Exportable { get => throw null; } + public bool HardwareDevice { get => throw null; } + public string KeyContainerName { get => throw null; } + public System.Security.Cryptography.KeyNumber KeyNumber { get => throw null; } + public bool MachineKeyStore { get => throw null; } + public bool Protected { get => throw null; } + public string ProviderName { get => throw null; } + public int ProviderType { get => throw null; } + public bool RandomlyGenerated { get => throw null; } + public bool Removable { get => throw null; } + public string UniqueKeyContainerName { get => throw null; } + } + + // Generated from `System.Security.Cryptography.CspParameters` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CspParameters + { + public CspParameters(int dwTypeIn, string strProviderNameIn, string strContainerNameIn) => throw null; + public CspParameters(int dwTypeIn, string strProviderNameIn) => throw null; + public CspParameters(int dwTypeIn) => throw null; + public CspParameters() => throw null; + public System.Security.Cryptography.CspProviderFlags Flags { get => throw null; set => throw null; } + public string KeyContainerName; + public int KeyNumber; + public System.Security.SecureString KeyPassword { get => throw null; set => throw null; } + public System.IntPtr ParentWindowHandle { get => throw null; set => throw null; } + public string ProviderName; + public int ProviderType; + } + + // Generated from `System.Security.Cryptography.CspProviderFlags` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CspProviderFlags + { + CreateEphemeralKey, + // Stub generator skipped constructor + NoFlags, + NoPrompt, + UseArchivableKey, + UseDefaultKeyContainer, + UseExistingKey, + UseMachineKeyStore, + UseNonExportableKey, + UseUserProtectedKey, + } + + // Generated from `System.Security.Cryptography.DESCryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DESCryptoServiceProvider : System.Security.Cryptography.DES + { + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + public DESCryptoServiceProvider() => throw null; + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + } + + // Generated from `System.Security.Cryptography.DSACryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DSACryptoServiceProvider : System.Security.Cryptography.DSA, System.Security.Cryptography.ICspAsymmetricAlgorithm + { + public override System.Byte[] CreateSignature(System.Byte[] rgbHash) => throw null; + public System.Security.Cryptography.CspKeyContainerInfo CspKeyContainerInfo { get => throw null; } + public DSACryptoServiceProvider(int dwKeySize, System.Security.Cryptography.CspParameters parameters) => throw null; + public DSACryptoServiceProvider(int dwKeySize) => throw null; + public DSACryptoServiceProvider(System.Security.Cryptography.CspParameters parameters) => throw null; + public DSACryptoServiceProvider() => throw null; + protected override void Dispose(bool disposing) => throw null; + public System.Byte[] ExportCspBlob(bool includePrivateParameters) => throw null; + public override System.Security.Cryptography.DSAParameters ExportParameters(bool includePrivateParameters) => throw null; + protected override System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected override System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public void ImportCspBlob(System.Byte[] keyBlob) => throw null; + public override void ImportParameters(System.Security.Cryptography.DSAParameters parameters) => throw null; + public override string KeyExchangeAlgorithm { get => throw null; } + public override int KeySize { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public bool PersistKeyInCsp { get => throw null; set => throw null; } + public bool PublicOnly { get => throw null; } + public System.Byte[] SignData(System.IO.Stream inputStream) => throw null; + public System.Byte[] SignData(System.Byte[] buffer, int offset, int count) => throw null; + public System.Byte[] SignData(System.Byte[] buffer) => throw null; + public System.Byte[] SignHash(System.Byte[] rgbHash, string str) => throw null; + public override string SignatureAlgorithm { get => throw null; } + public static bool UseMachineKeyStore { get => throw null; set => throw null; } + public bool VerifyData(System.Byte[] rgbData, System.Byte[] rgbSignature) => throw null; + public bool VerifyHash(System.Byte[] rgbHash, string str, System.Byte[] rgbSignature) => throw null; + public override bool VerifySignature(System.Byte[] rgbHash, System.Byte[] rgbSignature) => throw null; + } + + // Generated from `System.Security.Cryptography.ICspAsymmetricAlgorithm` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICspAsymmetricAlgorithm + { + System.Security.Cryptography.CspKeyContainerInfo CspKeyContainerInfo { get; } + System.Byte[] ExportCspBlob(bool includePrivateParameters); + void ImportCspBlob(System.Byte[] rawData); + } + + // Generated from `System.Security.Cryptography.KeyNumber` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum KeyNumber + { + Exchange, + // Stub generator skipped constructor + Signature, + } + + // Generated from `System.Security.Cryptography.MD5CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MD5CryptoServiceProvider : System.Security.Cryptography.MD5 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public MD5CryptoServiceProvider() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.PasswordDeriveBytes` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PasswordDeriveBytes : System.Security.Cryptography.DeriveBytes + { + public System.Byte[] CryptDeriveKey(string algname, string alghashname, int keySize, System.Byte[] rgbIV) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Byte[] GetBytes(int cb) => throw null; + public string HashName { get => throw null; set => throw null; } + public int IterationCount { get => throw null; set => throw null; } + public PasswordDeriveBytes(string strPassword, System.Byte[] rgbSalt, string strHashName, int iterations, System.Security.Cryptography.CspParameters cspParams) => throw null; + public PasswordDeriveBytes(string strPassword, System.Byte[] rgbSalt, string strHashName, int iterations) => throw null; + public PasswordDeriveBytes(string strPassword, System.Byte[] rgbSalt, System.Security.Cryptography.CspParameters cspParams) => throw null; + public PasswordDeriveBytes(string strPassword, System.Byte[] rgbSalt) => throw null; + public PasswordDeriveBytes(System.Byte[] password, System.Byte[] salt, string hashName, int iterations, System.Security.Cryptography.CspParameters cspParams) => throw null; + public PasswordDeriveBytes(System.Byte[] password, System.Byte[] salt, string hashName, int iterations) => throw null; + public PasswordDeriveBytes(System.Byte[] password, System.Byte[] salt, System.Security.Cryptography.CspParameters cspParams) => throw null; + public PasswordDeriveBytes(System.Byte[] password, System.Byte[] salt) => throw null; + public override void Reset() => throw null; + public System.Byte[] Salt { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.RC2CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RC2CryptoServiceProvider : System.Security.Cryptography.RC2 + { + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override int EffectiveKeySize { get => throw null; set => throw null; } + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public RC2CryptoServiceProvider() => throw null; + public bool UseSalt { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.RNGCryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RNGCryptoServiceProvider : System.Security.Cryptography.RandomNumberGenerator + { + protected override void Dispose(bool disposing) => throw null; + public override void GetBytes(System.Span data) => throw null; + public override void GetBytes(System.Byte[] data, int offset, int count) => throw null; + public override void GetBytes(System.Byte[] data) => throw null; + public override void GetNonZeroBytes(System.Span data) => throw null; + public override void GetNonZeroBytes(System.Byte[] data) => throw null; + public RNGCryptoServiceProvider(string str) => throw null; + public RNGCryptoServiceProvider(System.Security.Cryptography.CspParameters cspParams) => throw null; + public RNGCryptoServiceProvider(System.Byte[] rgb) => throw null; + public RNGCryptoServiceProvider() => throw null; + } + + // Generated from `System.Security.Cryptography.RSACryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RSACryptoServiceProvider : System.Security.Cryptography.RSA, System.Security.Cryptography.ICspAsymmetricAlgorithm + { + public System.Security.Cryptography.CspKeyContainerInfo CspKeyContainerInfo { get => throw null; } + public override System.Byte[] Decrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + public System.Byte[] Decrypt(System.Byte[] rgb, bool fOAEP) => throw null; + public override System.Byte[] DecryptValue(System.Byte[] rgb) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Byte[] Encrypt(System.Byte[] data, System.Security.Cryptography.RSAEncryptionPadding padding) => throw null; + public System.Byte[] Encrypt(System.Byte[] rgb, bool fOAEP) => throw null; + public override System.Byte[] EncryptValue(System.Byte[] rgb) => throw null; + public System.Byte[] ExportCspBlob(bool includePrivateParameters) => throw null; + public override System.Security.Cryptography.RSAParameters ExportParameters(bool includePrivateParameters) => throw null; + protected override System.Byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + protected override System.Byte[] HashData(System.Byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public void ImportCspBlob(System.Byte[] keyBlob) => throw null; + public override void ImportParameters(System.Security.Cryptography.RSAParameters parameters) => throw null; + public override string KeyExchangeAlgorithm { get => throw null; } + public override int KeySize { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public bool PersistKeyInCsp { get => throw null; set => throw null; } + public bool PublicOnly { get => throw null; } + public RSACryptoServiceProvider(int dwKeySize, System.Security.Cryptography.CspParameters parameters) => throw null; + public RSACryptoServiceProvider(int dwKeySize) => throw null; + public RSACryptoServiceProvider(System.Security.Cryptography.CspParameters parameters) => throw null; + public RSACryptoServiceProvider() => throw null; + public System.Byte[] SignData(System.IO.Stream inputStream, object halg) => throw null; + public System.Byte[] SignData(System.Byte[] buffer, object halg) => throw null; + public System.Byte[] SignData(System.Byte[] buffer, int offset, int count, object halg) => throw null; + public override System.Byte[] SignHash(System.Byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public System.Byte[] SignHash(System.Byte[] rgbHash, string str) => throw null; + public override string SignatureAlgorithm { get => throw null; } + public static bool UseMachineKeyStore { get => throw null; set => throw null; } + public bool VerifyData(System.Byte[] buffer, object halg, System.Byte[] signature) => throw null; + public override bool VerifyHash(System.Byte[] hash, System.Byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public bool VerifyHash(System.Byte[] rgbHash, string str, System.Byte[] rgbSignature) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA1CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA1CryptoServiceProvider : System.Security.Cryptography.SHA1 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA1CryptoServiceProvider() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA256CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA256CryptoServiceProvider : System.Security.Cryptography.SHA256 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA256CryptoServiceProvider() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA384CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA384CryptoServiceProvider : System.Security.Cryptography.SHA384 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA384CryptoServiceProvider() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.SHA512CryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SHA512CryptoServiceProvider : System.Security.Cryptography.SHA512 + { + protected override void Dispose(bool disposing) => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] array, int ibStart, int cbSize) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public override void Initialize() => throw null; + public SHA512CryptoServiceProvider() => throw null; + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.TripleDESCryptoServiceProvider` in `System.Security.Cryptography.Csp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TripleDESCryptoServiceProvider : System.Security.Cryptography.TripleDES + { + public override int BlockSize { get => throw null; set => throw null; } + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV) => throw null; + public override System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + protected override void Dispose(bool disposing) => throw null; + public override int FeedbackSize { get => throw null; set => throw null; } + public override void GenerateIV() => throw null; + public override void GenerateKey() => throw null; + public override System.Byte[] IV { get => throw null; set => throw null; } + public override System.Byte[] Key { get => throw null; set => throw null; } + public override int KeySize { get => throw null; set => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalBlockSizes { get => throw null; } + public override System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + public override System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + public override System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + public TripleDESCryptoServiceProvider() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs new file mode 100644 index 000000000000..181203d5331f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs @@ -0,0 +1,170 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Security + { + namespace Cryptography + { + // Generated from `System.Security.Cryptography.AsnEncodedData` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsnEncodedData + { + public AsnEncodedData(string oid, System.ReadOnlySpan rawData) => throw null; + public AsnEncodedData(string oid, System.Byte[] rawData) => throw null; + public AsnEncodedData(System.Security.Cryptography.Oid oid, System.ReadOnlySpan rawData) => throw null; + public AsnEncodedData(System.Security.Cryptography.Oid oid, System.Byte[] rawData) => throw null; + public AsnEncodedData(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public AsnEncodedData(System.ReadOnlySpan rawData) => throw null; + public AsnEncodedData(System.Byte[] rawData) => throw null; + protected AsnEncodedData() => throw null; + public virtual void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public virtual string Format(bool multiLine) => throw null; + public System.Security.Cryptography.Oid Oid { get => throw null; set => throw null; } + public System.Byte[] RawData { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.AsnEncodedDataCollection` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsnEncodedDataCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public AsnEncodedDataCollection(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public AsnEncodedDataCollection() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.Cryptography.AsnEncodedData[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Cryptography.AsnEncodedDataEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.AsnEncodedData this[int index] { get => throw null; } + public void Remove(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.AsnEncodedDataEnumerator` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsnEncodedDataEnumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.AsnEncodedData Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Cryptography.FromBase64Transform` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class FromBase64Transform : System.Security.Cryptography.ICryptoTransform, System.IDisposable + { + public virtual bool CanReuseTransform { get => throw null; } + public bool CanTransformMultipleBlocks { get => throw null; } + public void Clear() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public FromBase64Transform(System.Security.Cryptography.FromBase64TransformMode whitespaces) => throw null; + public FromBase64Transform() => throw null; + public int InputBlockSize { get => throw null; } + public int OutputBlockSize { get => throw null; } + public int TransformBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount, System.Byte[] outputBuffer, int outputOffset) => throw null; + public System.Byte[] TransformFinalBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount) => throw null; + // ERR: Stub generator didn't handle member: ~FromBase64Transform + } + + // Generated from `System.Security.Cryptography.FromBase64TransformMode` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum FromBase64TransformMode + { + DoNotIgnoreWhiteSpaces, + // Stub generator skipped constructor + IgnoreWhiteSpaces, + } + + // Generated from `System.Security.Cryptography.Oid` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Oid + { + public string FriendlyName { get => throw null; set => throw null; } + public static System.Security.Cryptography.Oid FromFriendlyName(string friendlyName, System.Security.Cryptography.OidGroup group) => throw null; + public static System.Security.Cryptography.Oid FromOidValue(string oidValue, System.Security.Cryptography.OidGroup group) => throw null; + public Oid(string value, string friendlyName) => throw null; + public Oid(string oid) => throw null; + public Oid(System.Security.Cryptography.Oid oid) => throw null; + public Oid() => throw null; + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Security.Cryptography.OidCollection` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OidCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Cryptography.Oid oid) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.Cryptography.Oid[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Cryptography.OidEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.Oid this[string oid] { get => throw null; } + public System.Security.Cryptography.Oid this[int index] { get => throw null; } + public OidCollection() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.OidEnumerator` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OidEnumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.Oid Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Cryptography.OidGroup` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum OidGroup + { + All, + Attribute, + EncryptionAlgorithm, + EnhancedKeyUsage, + ExtensionOrAttribute, + HashAlgorithm, + KeyDerivationFunction, + // Stub generator skipped constructor + Policy, + PublicKeyAlgorithm, + SignatureAlgorithm, + Template, + } + + // Generated from `System.Security.Cryptography.PemEncoding` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class PemEncoding + { + public static System.Security.Cryptography.PemFields Find(System.ReadOnlySpan pemData) => throw null; + public static int GetEncodedSize(int labelLength, int dataLength) => throw null; + public static bool TryFind(System.ReadOnlySpan pemData, out System.Security.Cryptography.PemFields fields) => throw null; + public static bool TryWrite(System.ReadOnlySpan label, System.ReadOnlySpan data, System.Span destination, out int charsWritten) => throw null; + public static System.Char[] Write(System.ReadOnlySpan label, System.ReadOnlySpan data) => throw null; + } + + // Generated from `System.Security.Cryptography.PemFields` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct PemFields + { + public System.Range Base64Data { get => throw null; } + public int DecodedDataLength { get => throw null; } + public System.Range Label { get => throw null; } + public System.Range Location { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.ToBase64Transform` in `System.Security.Cryptography.Encoding, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ToBase64Transform : System.Security.Cryptography.ICryptoTransform, System.IDisposable + { + public virtual bool CanReuseTransform { get => throw null; } + public bool CanTransformMultipleBlocks { get => throw null; } + public void Clear() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public int InputBlockSize { get => throw null; } + public int OutputBlockSize { get => throw null; } + public ToBase64Transform() => throw null; + public int TransformBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount, System.Byte[] outputBuffer, int outputOffset) => throw null; + public System.Byte[] TransformFinalBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount) => throw null; + // ERR: Stub generator didn't handle member: ~ToBase64Transform + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs new file mode 100644 index 000000000000..dda7db7ca873 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs @@ -0,0 +1,281 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Security + { + namespace Cryptography + { + // Generated from `System.Security.Cryptography.AsymmetricAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class AsymmetricAlgorithm : System.IDisposable + { + protected AsymmetricAlgorithm() => throw null; + public void Clear() => throw null; + public static System.Security.Cryptography.AsymmetricAlgorithm Create(string algName) => throw null; + public static System.Security.Cryptography.AsymmetricAlgorithm Create() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) => throw null; + public virtual System.Byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) => throw null; + public virtual System.Byte[] ExportPkcs8PrivateKey() => throw null; + public virtual System.Byte[] ExportSubjectPublicKeyInfo() => throw null; + public virtual void FromXmlString(string xmlString) => throw null; + public virtual void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual void ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan password) => throw null; + public virtual void ImportFromEncryptedPem(System.ReadOnlySpan input, System.ReadOnlySpan passwordBytes) => throw null; + public virtual void ImportFromPem(System.ReadOnlySpan input) => throw null; + public virtual void ImportPkcs8PrivateKey(System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual void ImportSubjectPublicKeyInfo(System.ReadOnlySpan source, out int bytesRead) => throw null; + public virtual string KeyExchangeAlgorithm { get => throw null; } + public virtual int KeySize { get => throw null; set => throw null; } + protected int KeySizeValue; + public virtual System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + protected System.Security.Cryptography.KeySizes[] LegalKeySizesValue; + public virtual string SignatureAlgorithm { get => throw null; } + public virtual string ToXmlString(bool includePrivateParameters) => throw null; + public virtual bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public virtual bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) => throw null; + public virtual bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) => throw null; + public virtual bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.CipherMode` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CipherMode + { + CBC, + CFB, + CTS, + // Stub generator skipped constructor + ECB, + OFB, + } + + // Generated from `System.Security.Cryptography.CryptoStream` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CryptoStream : System.IO.Stream, System.IDisposable + { + public override System.IAsyncResult BeginRead(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override System.IAsyncResult BeginWrite(System.Byte[] buffer, int offset, int count, System.AsyncCallback callback, object state) => throw null; + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public void Clear() => throw null; + public CryptoStream(System.IO.Stream stream, System.Security.Cryptography.ICryptoTransform transform, System.Security.Cryptography.CryptoStreamMode mode, bool leaveOpen) => throw null; + public CryptoStream(System.IO.Stream stream, System.Security.Cryptography.ICryptoTransform transform, System.Security.Cryptography.CryptoStreamMode mode) => throw null; + protected override void Dispose(bool disposing) => throw null; + public override System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public override int EndRead(System.IAsyncResult asyncResult) => throw null; + public override void EndWrite(System.IAsyncResult asyncResult) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void FlushFinalBlock() => throw null; + public System.Threading.Tasks.ValueTask FlushFinalBlockAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public bool HasFlushedFinalBlock { get => throw null; } + public override System.Int64 Length { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ReadByte() => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Threading.Tasks.Task WriteAsync(System.Byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteByte(System.Byte value) => throw null; + } + + // Generated from `System.Security.Cryptography.CryptoStreamMode` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum CryptoStreamMode + { + // Stub generator skipped constructor + Read, + Write, + } + + // Generated from `System.Security.Cryptography.CryptographicOperations` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class CryptographicOperations + { + public static bool FixedTimeEquals(System.ReadOnlySpan left, System.ReadOnlySpan right) => throw null; + public static void ZeroMemory(System.Span buffer) => throw null; + } + + // Generated from `System.Security.Cryptography.CryptographicUnexpectedOperationException` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CryptographicUnexpectedOperationException : System.Security.Cryptography.CryptographicException + { + public CryptographicUnexpectedOperationException(string message, System.Exception inner) => throw null; + public CryptographicUnexpectedOperationException(string message) => throw null; + public CryptographicUnexpectedOperationException(string format, string insert) => throw null; + public CryptographicUnexpectedOperationException() => throw null; + protected CryptographicUnexpectedOperationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Security.Cryptography.HMAC` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class HMAC : System.Security.Cryptography.KeyedHashAlgorithm + { + protected int BlockSizeValue { get => throw null; set => throw null; } + public static System.Security.Cryptography.HMAC Create(string algorithmName) => throw null; + public static System.Security.Cryptography.HMAC Create() => throw null; + protected override void Dispose(bool disposing) => throw null; + protected HMAC() => throw null; + protected override void HashCore(System.ReadOnlySpan source) => throw null; + protected override void HashCore(System.Byte[] rgb, int ib, int cb) => throw null; + protected override System.Byte[] HashFinal() => throw null; + public string HashName { get => throw null; set => throw null; } + public override void Initialize() => throw null; + public override System.Byte[] Key { get => throw null; set => throw null; } + protected override bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HashAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class HashAlgorithm : System.Security.Cryptography.ICryptoTransform, System.IDisposable + { + public virtual bool CanReuseTransform { get => throw null; } + public virtual bool CanTransformMultipleBlocks { get => throw null; } + public void Clear() => throw null; + public System.Byte[] ComputeHash(System.IO.Stream inputStream) => throw null; + public System.Byte[] ComputeHash(System.Byte[] buffer, int offset, int count) => throw null; + public System.Byte[] ComputeHash(System.Byte[] buffer) => throw null; + public System.Threading.Tasks.Task ComputeHashAsync(System.IO.Stream inputStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Security.Cryptography.HashAlgorithm Create(string hashName) => throw null; + public static System.Security.Cryptography.HashAlgorithm Create() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual System.Byte[] Hash { get => throw null; } + protected HashAlgorithm() => throw null; + protected virtual void HashCore(System.ReadOnlySpan source) => throw null; + protected abstract void HashCore(System.Byte[] array, int ibStart, int cbSize); + protected abstract System.Byte[] HashFinal(); + public virtual int HashSize { get => throw null; } + protected int HashSizeValue; + protected internal System.Byte[] HashValue; + public abstract void Initialize(); + public virtual int InputBlockSize { get => throw null; } + public virtual int OutputBlockSize { get => throw null; } + protected int State; + public int TransformBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount, System.Byte[] outputBuffer, int outputOffset) => throw null; + public System.Byte[] TransformFinalBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount) => throw null; + public bool TryComputeHash(System.ReadOnlySpan source, System.Span destination, out int bytesWritten) => throw null; + protected virtual bool TryHashFinal(System.Span destination, out int bytesWritten) => throw null; + } + + // Generated from `System.Security.Cryptography.HashAlgorithmName` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct HashAlgorithmName : System.IEquatable + { + public static bool operator !=(System.Security.Cryptography.HashAlgorithmName left, System.Security.Cryptography.HashAlgorithmName right) => throw null; + public static bool operator ==(System.Security.Cryptography.HashAlgorithmName left, System.Security.Cryptography.HashAlgorithmName right) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Security.Cryptography.HashAlgorithmName other) => throw null; + public static System.Security.Cryptography.HashAlgorithmName FromOid(string oidValue) => throw null; + public override int GetHashCode() => throw null; + public HashAlgorithmName(string name) => throw null; + // Stub generator skipped constructor + public static System.Security.Cryptography.HashAlgorithmName MD5 { get => throw null; } + public string Name { get => throw null; } + public static System.Security.Cryptography.HashAlgorithmName SHA1 { get => throw null; } + public static System.Security.Cryptography.HashAlgorithmName SHA256 { get => throw null; } + public static System.Security.Cryptography.HashAlgorithmName SHA384 { get => throw null; } + public static System.Security.Cryptography.HashAlgorithmName SHA512 { get => throw null; } + public override string ToString() => throw null; + public static bool TryFromOid(string oidValue, out System.Security.Cryptography.HashAlgorithmName value) => throw null; + } + + // Generated from `System.Security.Cryptography.ICryptoTransform` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ICryptoTransform : System.IDisposable + { + bool CanReuseTransform { get; } + bool CanTransformMultipleBlocks { get; } + int InputBlockSize { get; } + int OutputBlockSize { get; } + int TransformBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount, System.Byte[] outputBuffer, int outputOffset); + System.Byte[] TransformFinalBlock(System.Byte[] inputBuffer, int inputOffset, int inputCount); + } + + // Generated from `System.Security.Cryptography.KeySizes` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class KeySizes + { + public KeySizes(int minSize, int maxSize, int skipSize) => throw null; + public int MaxSize { get => throw null; } + public int MinSize { get => throw null; } + public int SkipSize { get => throw null; } + } + + // Generated from `System.Security.Cryptography.KeyedHashAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class KeyedHashAlgorithm : System.Security.Cryptography.HashAlgorithm + { + public static System.Security.Cryptography.KeyedHashAlgorithm Create(string algName) => throw null; + public static System.Security.Cryptography.KeyedHashAlgorithm Create() => throw null; + protected override void Dispose(bool disposing) => throw null; + public virtual System.Byte[] Key { get => throw null; set => throw null; } + protected System.Byte[] KeyValue; + protected KeyedHashAlgorithm() => throw null; + } + + // Generated from `System.Security.Cryptography.PaddingMode` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PaddingMode + { + ANSIX923, + ISO10126, + None, + PKCS7, + // Stub generator skipped constructor + Zeros, + } + + // Generated from `System.Security.Cryptography.PbeEncryptionAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PbeEncryptionAlgorithm + { + Aes128Cbc, + Aes192Cbc, + Aes256Cbc, + // Stub generator skipped constructor + TripleDes3KeyPkcs12, + Unknown, + } + + // Generated from `System.Security.Cryptography.PbeParameters` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PbeParameters + { + public System.Security.Cryptography.PbeEncryptionAlgorithm EncryptionAlgorithm { get => throw null; } + public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get => throw null; } + public int IterationCount { get => throw null; } + public PbeParameters(System.Security.Cryptography.PbeEncryptionAlgorithm encryptionAlgorithm, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) => throw null; + } + + // Generated from `System.Security.Cryptography.SymmetricAlgorithm` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SymmetricAlgorithm : System.IDisposable + { + public virtual int BlockSize { get => throw null; set => throw null; } + protected int BlockSizeValue; + public void Clear() => throw null; + public static System.Security.Cryptography.SymmetricAlgorithm Create(string algName) => throw null; + public static System.Security.Cryptography.SymmetricAlgorithm Create() => throw null; + public virtual System.Security.Cryptography.ICryptoTransform CreateDecryptor() => throw null; + public abstract System.Security.Cryptography.ICryptoTransform CreateDecryptor(System.Byte[] rgbKey, System.Byte[] rgbIV); + public virtual System.Security.Cryptography.ICryptoTransform CreateEncryptor() => throw null; + public abstract System.Security.Cryptography.ICryptoTransform CreateEncryptor(System.Byte[] rgbKey, System.Byte[] rgbIV); + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual int FeedbackSize { get => throw null; set => throw null; } + protected int FeedbackSizeValue; + public abstract void GenerateIV(); + public abstract void GenerateKey(); + public virtual System.Byte[] IV { get => throw null; set => throw null; } + protected System.Byte[] IVValue; + public virtual System.Byte[] Key { get => throw null; set => throw null; } + public virtual int KeySize { get => throw null; set => throw null; } + protected int KeySizeValue; + protected System.Byte[] KeyValue; + public virtual System.Security.Cryptography.KeySizes[] LegalBlockSizes { get => throw null; } + protected System.Security.Cryptography.KeySizes[] LegalBlockSizesValue; + public virtual System.Security.Cryptography.KeySizes[] LegalKeySizes { get => throw null; } + protected System.Security.Cryptography.KeySizes[] LegalKeySizesValue; + public virtual System.Security.Cryptography.CipherMode Mode { get => throw null; set => throw null; } + protected System.Security.Cryptography.CipherMode ModeValue; + public virtual System.Security.Cryptography.PaddingMode Padding { get => throw null; set => throw null; } + protected System.Security.Cryptography.PaddingMode PaddingValue; + protected SymmetricAlgorithm() => throw null; + public bool ValidKeySize(int bitLength) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs new file mode 100644 index 000000000000..5737a17b12f7 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs @@ -0,0 +1,730 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace Win32 + { + namespace SafeHandles + { + // Generated from `Microsoft.Win32.SafeHandles.SafeX509ChainHandle` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SafeX509ChainHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid + { + protected override void Dispose(bool disposing) => throw null; + protected override bool ReleaseHandle() => throw null; + internal SafeX509ChainHandle() : base(default(bool)) => throw null; + } + + } + } +} +namespace System +{ + namespace Security + { + namespace Cryptography + { + namespace X509Certificates + { + // Generated from `System.Security.Cryptography.X509Certificates.CertificateRequest` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CertificateRequest + { + public System.Collections.ObjectModel.Collection CertificateExtensions { get => throw null; } + public CertificateRequest(string subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public CertificateRequest(string subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.X509Certificates.PublicKey publicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.RSA key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) => throw null; + public CertificateRequest(System.Security.Cryptography.X509Certificates.X500DistinguishedName subjectName, System.Security.Cryptography.ECDsa key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 Create(System.Security.Cryptography.X509Certificates.X509Certificate2 issuerCertificate, System.DateTimeOffset notBefore, System.DateTimeOffset notAfter, System.ReadOnlySpan serialNumber) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 Create(System.Security.Cryptography.X509Certificates.X509Certificate2 issuerCertificate, System.DateTimeOffset notBefore, System.DateTimeOffset notAfter, System.Byte[] serialNumber) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 Create(System.Security.Cryptography.X509Certificates.X500DistinguishedName issuerName, System.Security.Cryptography.X509Certificates.X509SignatureGenerator generator, System.DateTimeOffset notBefore, System.DateTimeOffset notAfter, System.ReadOnlySpan serialNumber) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 Create(System.Security.Cryptography.X509Certificates.X500DistinguishedName issuerName, System.Security.Cryptography.X509Certificates.X509SignatureGenerator generator, System.DateTimeOffset notBefore, System.DateTimeOffset notAfter, System.Byte[] serialNumber) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 CreateSelfSigned(System.DateTimeOffset notBefore, System.DateTimeOffset notAfter) => throw null; + public System.Byte[] CreateSigningRequest(System.Security.Cryptography.X509Certificates.X509SignatureGenerator signatureGenerator) => throw null; + public System.Byte[] CreateSigningRequest() => throw null; + public System.Security.Cryptography.HashAlgorithmName HashAlgorithm { get => throw null; } + public System.Security.Cryptography.X509Certificates.PublicKey PublicKey { get => throw null; } + public System.Security.Cryptography.X509Certificates.X500DistinguishedName SubjectName { get => throw null; } + } + + // Generated from `System.Security.Cryptography.X509Certificates.DSACertificateExtensions` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DSACertificateExtensions + { + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.DSA privateKey) => throw null; + public static System.Security.Cryptography.DSA GetDSAPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static System.Security.Cryptography.DSA GetDSAPublicKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ECDsaCertificateExtensions + { + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.ECDsa privateKey) => throw null; + public static System.Security.Cryptography.ECDsa GetECDsaPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static System.Security.Cryptography.ECDsa GetECDsaPublicKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.OpenFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum OpenFlags + { + IncludeArchived, + MaxAllowed, + OpenExistingOnly, + // Stub generator skipped constructor + ReadOnly, + ReadWrite, + } + + // Generated from `System.Security.Cryptography.X509Certificates.PublicKey` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PublicKey + { + public System.Security.Cryptography.AsnEncodedData EncodedKeyValue { get => throw null; } + public System.Security.Cryptography.AsnEncodedData EncodedParameters { get => throw null; } + public System.Security.Cryptography.AsymmetricAlgorithm Key { get => throw null; } + public System.Security.Cryptography.Oid Oid { get => throw null; } + public PublicKey(System.Security.Cryptography.Oid oid, System.Security.Cryptography.AsnEncodedData parameters, System.Security.Cryptography.AsnEncodedData keyValue) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.RSACertificateExtensions` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class RSACertificateExtensions + { + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSA privateKey) => throw null; + public static System.Security.Cryptography.RSA GetRSAPrivateKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public static System.Security.Cryptography.RSA GetRSAPublicKey(this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.StoreLocation` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StoreLocation + { + CurrentUser, + LocalMachine, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.StoreName` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum StoreName + { + AddressBook, + AuthRoot, + CertificateAuthority, + Disallowed, + My, + Root, + // Stub generator skipped constructor + TrustedPeople, + TrustedPublisher, + } + + // Generated from `System.Security.Cryptography.X509Certificates.SubjectAlternativeNameBuilder` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SubjectAlternativeNameBuilder + { + public void AddDnsName(string dnsName) => throw null; + public void AddEmailAddress(string emailAddress) => throw null; + public void AddIpAddress(System.Net.IPAddress ipAddress) => throw null; + public void AddUri(System.Uri uri) => throw null; + public void AddUserPrincipalName(string upn) => throw null; + public System.Security.Cryptography.X509Certificates.X509Extension Build(bool critical = default(bool)) => throw null; + public SubjectAlternativeNameBuilder() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X500DistinguishedName` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X500DistinguishedName : System.Security.Cryptography.AsnEncodedData + { + public string Decode(System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags flag) => throw null; + public override string Format(bool multiLine) => throw null; + public string Name { get => throw null; } + public X500DistinguishedName(string distinguishedName, System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags flag) => throw null; + public X500DistinguishedName(string distinguishedName) => throw null; + public X500DistinguishedName(System.Security.Cryptography.X509Certificates.X500DistinguishedName distinguishedName) => throw null; + public X500DistinguishedName(System.Security.Cryptography.AsnEncodedData encodedDistinguishedName) => throw null; + public X500DistinguishedName(System.ReadOnlySpan encodedDistinguishedName) => throw null; + public X500DistinguishedName(System.Byte[] encodedDistinguishedName) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum X500DistinguishedNameFlags + { + DoNotUsePlusSign, + DoNotUseQuotes, + ForceUTF8Encoding, + None, + Reversed, + UseCommas, + UseNewLines, + UseSemicolons, + UseT61Encoding, + UseUTF8Encoding, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509BasicConstraintsExtension : System.Security.Cryptography.X509Certificates.X509Extension + { + public bool CertificateAuthority { get => throw null; } + public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public bool HasPathLengthConstraint { get => throw null; } + public int PathLengthConstraint { get => throw null; } + public X509BasicConstraintsExtension(bool certificateAuthority, bool hasPathLengthConstraint, int pathLengthConstraint, bool critical) => throw null; + public X509BasicConstraintsExtension(System.Security.Cryptography.AsnEncodedData encodedBasicConstraints, bool critical) => throw null; + public X509BasicConstraintsExtension() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Certificate` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Certificate : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable + { + public static System.Security.Cryptography.X509Certificates.X509Certificate CreateFromCertFile(string filename) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate CreateFromSignedFile(string filename) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public virtual bool Equals(System.Security.Cryptography.X509Certificates.X509Certificate other) => throw null; + public override bool Equals(object obj) => throw null; + public virtual System.Byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, string password) => throw null; + public virtual System.Byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, System.Security.SecureString password) => throw null; + public virtual System.Byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType) => throw null; + protected static string FormatDate(System.DateTime date) => throw null; + public virtual System.Byte[] GetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual System.Byte[] GetCertHash() => throw null; + public virtual string GetCertHashString(System.Security.Cryptography.HashAlgorithmName hashAlgorithm) => throw null; + public virtual string GetCertHashString() => throw null; + public virtual string GetEffectiveDateString() => throw null; + public virtual string GetExpirationDateString() => throw null; + public virtual string GetFormat() => throw null; + public override int GetHashCode() => throw null; + public virtual string GetIssuerName() => throw null; + public virtual string GetKeyAlgorithm() => throw null; + public virtual System.Byte[] GetKeyAlgorithmParameters() => throw null; + public virtual string GetKeyAlgorithmParametersString() => throw null; + public virtual string GetName() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual System.Byte[] GetPublicKey() => throw null; + public virtual string GetPublicKeyString() => throw null; + public virtual System.Byte[] GetRawCertData() => throw null; + public virtual string GetRawCertDataString() => throw null; + public virtual System.Byte[] GetSerialNumber() => throw null; + public virtual string GetSerialNumberString() => throw null; + public System.IntPtr Handle { get => throw null; } + public virtual void Import(string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public virtual void Import(string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public virtual void Import(string fileName) => throw null; + public virtual void Import(System.Byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public virtual void Import(System.Byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public virtual void Import(System.Byte[] rawData) => throw null; + public string Issuer { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public virtual void Reset() => throw null; + public string Subject { get => throw null; } + public virtual string ToString(bool fVerbose) => throw null; + public override string ToString() => throw null; + public virtual bool TryGetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Span destination, out int bytesWritten) => throw null; + public X509Certificate(string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate(string fileName, string password) => throw null; + public X509Certificate(string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate(string fileName, System.Security.SecureString password) => throw null; + public X509Certificate(string fileName) => throw null; + public X509Certificate(System.Security.Cryptography.X509Certificates.X509Certificate cert) => throw null; + public X509Certificate(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public X509Certificate(System.IntPtr handle) => throw null; + public X509Certificate(System.Byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate(System.Byte[] rawData, string password) => throw null; + public X509Certificate(System.Byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate(System.Byte[] rawData, System.Security.SecureString password) => throw null; + public X509Certificate(System.Byte[] data) => throw null; + public X509Certificate() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Certificate2` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Certificate2 : System.Security.Cryptography.X509Certificates.X509Certificate + { + public bool Archived { get => throw null; set => throw null; } + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateFromEncryptedPem(System.ReadOnlySpan certPem, System.ReadOnlySpan keyPem, System.ReadOnlySpan password) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateFromEncryptedPemFile(string certPemFilePath, System.ReadOnlySpan password, string keyPemFilePath = default(string)) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateFromPem(System.ReadOnlySpan certPem, System.ReadOnlySpan keyPem) => throw null; + public static System.Security.Cryptography.X509Certificates.X509Certificate2 CreateFromPemFile(string certPemFilePath, string keyPemFilePath = default(string)) => throw null; + public System.Security.Cryptography.X509Certificates.X509ExtensionCollection Extensions { get => throw null; } + public string FriendlyName { get => throw null; set => throw null; } + public static System.Security.Cryptography.X509Certificates.X509ContentType GetCertContentType(string fileName) => throw null; + public static System.Security.Cryptography.X509Certificates.X509ContentType GetCertContentType(System.ReadOnlySpan rawData) => throw null; + public static System.Security.Cryptography.X509Certificates.X509ContentType GetCertContentType(System.Byte[] rawData) => throw null; + public string GetNameInfo(System.Security.Cryptography.X509Certificates.X509NameType nameType, bool forIssuer) => throw null; + public bool HasPrivateKey { get => throw null; } + public override void Import(string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public override void Import(string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public override void Import(string fileName) => throw null; + public override void Import(System.Byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public override void Import(System.Byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public override void Import(System.Byte[] rawData) => throw null; + public System.Security.Cryptography.X509Certificates.X500DistinguishedName IssuerName { get => throw null; } + public System.DateTime NotAfter { get => throw null; } + public System.DateTime NotBefore { get => throw null; } + public System.Security.Cryptography.AsymmetricAlgorithm PrivateKey { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.PublicKey PublicKey { get => throw null; } + public System.Byte[] RawData { get => throw null; } + public override void Reset() => throw null; + public string SerialNumber { get => throw null; } + public System.Security.Cryptography.Oid SignatureAlgorithm { get => throw null; } + public System.Security.Cryptography.X509Certificates.X500DistinguishedName SubjectName { get => throw null; } + public string Thumbprint { get => throw null; } + public override string ToString(bool verbose) => throw null; + public override string ToString() => throw null; + public bool Verify() => throw null; + public int Version { get => throw null; } + public X509Certificate2(string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate2(string fileName, string password) => throw null; + public X509Certificate2(string fileName, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate2(string fileName, System.Security.SecureString password) => throw null; + public X509Certificate2(string fileName, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public X509Certificate2(string fileName) => throw null; + public X509Certificate2(System.Security.Cryptography.X509Certificates.X509Certificate certificate) => throw null; + public X509Certificate2(System.ReadOnlySpan rawData, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public X509Certificate2(System.ReadOnlySpan rawData) => throw null; + public X509Certificate2(System.IntPtr handle) => throw null; + public X509Certificate2(System.Byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate2(System.Byte[] rawData, string password) => throw null; + public X509Certificate2(System.Byte[] rawData, System.Security.SecureString password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) => throw null; + public X509Certificate2(System.Byte[] rawData, System.Security.SecureString password) => throw null; + public X509Certificate2(System.Byte[] rawData) => throw null; + public X509Certificate2() => throw null; + protected X509Certificate2(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Certificate2Collection` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Certificate2Collection : System.Security.Cryptography.X509Certificates.X509CertificateCollection + { + public int Add(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public void AddRange(System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) => throw null; + public void AddRange(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null; + public bool Contains(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public System.Byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType, string password) => throw null; + public System.Byte[] Export(System.Security.Cryptography.X509Certificates.X509ContentType contentType) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Find(System.Security.Cryptography.X509Certificates.X509FindType findType, object findValue, bool validOnly) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2Enumerator GetEnumerator() => throw null; + public void Import(string fileName, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public void Import(string fileName, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public void Import(string fileName) => throw null; + public void Import(System.ReadOnlySpan rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public void Import(System.ReadOnlySpan rawData, System.ReadOnlySpan password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public void Import(System.ReadOnlySpan rawData) => throw null; + public void Import(System.Byte[] rawData, string password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags = default(System.Security.Cryptography.X509Certificates.X509KeyStorageFlags)) => throw null; + public void Import(System.Byte[] rawData) => throw null; + public void ImportFromPem(System.ReadOnlySpan certPem) => throw null; + public void ImportFromPemFile(string certPemFilePath) => throw null; + public void Insert(int index, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2 this[int index] { get => throw null; set => throw null; } + public void Remove(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public void RemoveRange(System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) => throw null; + public void RemoveRange(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null; + public X509Certificate2Collection(System.Security.Cryptography.X509Certificates.X509Certificate2[] certificates) => throw null; + public X509Certificate2Collection(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null; + public X509Certificate2Collection(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public X509Certificate2Collection() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Certificate2Enumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Certificate2Enumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.X509Certificates.X509Certificate2 Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + bool System.Collections.IEnumerator.MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509CertificateCollection` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509CertificateCollection : System.Collections.CollectionBase + { + public int Add(System.Security.Cryptography.X509Certificates.X509Certificate value) => throw null; + public void AddRange(System.Security.Cryptography.X509Certificates.X509Certificate[] value) => throw null; + public void AddRange(System.Security.Cryptography.X509Certificates.X509CertificateCollection value) => throw null; + public bool Contains(System.Security.Cryptography.X509Certificates.X509Certificate value) => throw null; + public void CopyTo(System.Security.Cryptography.X509Certificates.X509Certificate[] array, int index) => throw null; + public System.Security.Cryptography.X509Certificates.X509CertificateCollection.X509CertificateEnumerator GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public int IndexOf(System.Security.Cryptography.X509Certificates.X509Certificate value) => throw null; + public void Insert(int index, System.Security.Cryptography.X509Certificates.X509Certificate value) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate this[int index] { get => throw null; set => throw null; } + protected override void OnValidate(object value) => throw null; + public void Remove(System.Security.Cryptography.X509Certificates.X509Certificate value) => throw null; + public X509CertificateCollection(System.Security.Cryptography.X509Certificates.X509Certificate[] value) => throw null; + public X509CertificateCollection(System.Security.Cryptography.X509Certificates.X509CertificateCollection value) => throw null; + public X509CertificateCollection() => throw null; + // Generated from `System.Security.Cryptography.X509Certificates.X509CertificateCollection.X509CertificateEnumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509CertificateEnumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.X509Certificates.X509Certificate Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + bool System.Collections.IEnumerator.MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + public void Reset() => throw null; + public X509CertificateEnumerator(System.Security.Cryptography.X509Certificates.X509CertificateCollection mappings) => throw null; + } + + + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Chain` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Chain : System.IDisposable + { + public bool Build(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public System.IntPtr ChainContext { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainElementCollection ChainElements { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainPolicy ChainPolicy { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainStatus[] ChainStatus { get => throw null; } + public static System.Security.Cryptography.X509Certificates.X509Chain Create() => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public void Reset() => throw null; + public Microsoft.Win32.SafeHandles.SafeX509ChainHandle SafeHandle { get => throw null; } + public X509Chain(bool useMachineContext) => throw null; + public X509Chain(System.IntPtr chainContext) => throw null; + public X509Chain() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainElement` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ChainElement + { + public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainStatus[] ChainElementStatus { get => throw null; } + public string Information { get => throw null; } + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainElementCollection` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ChainElementCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.Cryptography.X509Certificates.X509ChainElement[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainElementEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainElement this[int index] { get => throw null; } + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainElementEnumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ChainElementEnumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.X509Certificates.X509ChainElement Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainPolicy` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ChainPolicy + { + public System.Security.Cryptography.OidCollection ApplicationPolicy { get => throw null; } + public System.Security.Cryptography.OidCollection CertificatePolicy { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate2Collection CustomTrustStore { get => throw null; } + public bool DisableCertificateDownloads { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509Certificate2Collection ExtraStore { get => throw null; } + public void Reset() => throw null; + public System.Security.Cryptography.X509Certificates.X509RevocationFlag RevocationFlag { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509RevocationMode RevocationMode { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509ChainTrustMode TrustMode { get => throw null; set => throw null; } + public System.TimeSpan UrlRetrievalTimeout { get => throw null; set => throw null; } + public System.Security.Cryptography.X509Certificates.X509VerificationFlags VerificationFlags { get => throw null; set => throw null; } + public System.DateTime VerificationTime { get => throw null; set => throw null; } + public X509ChainPolicy() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainStatus` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct X509ChainStatus + { + public System.Security.Cryptography.X509Certificates.X509ChainStatusFlags Status { get => throw null; set => throw null; } + public string StatusInformation { get => throw null; set => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainStatusFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum X509ChainStatusFlags + { + CtlNotSignatureValid, + CtlNotTimeValid, + CtlNotValidForUsage, + Cyclic, + ExplicitDistrust, + HasExcludedNameConstraint, + HasNotDefinedNameConstraint, + HasNotPermittedNameConstraint, + HasNotSupportedCriticalExtension, + HasNotSupportedNameConstraint, + HasWeakSignature, + InvalidBasicConstraints, + InvalidExtension, + InvalidNameConstraints, + InvalidPolicyConstraints, + NoError, + NoIssuanceChainPolicy, + NotSignatureValid, + NotTimeNested, + NotTimeValid, + NotValidForUsage, + OfflineRevocation, + PartialChain, + RevocationStatusUnknown, + Revoked, + UntrustedRoot, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ChainTrustMode` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509ChainTrustMode + { + CustomRootTrust, + System, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ContentType` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509ContentType + { + Authenticode, + Cert, + Pfx, + Pkcs12, + Pkcs7, + SerializedCert, + SerializedStore, + Unknown, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509EnhancedKeyUsageExtension : System.Security.Cryptography.X509Certificates.X509Extension + { + public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public System.Security.Cryptography.OidCollection EnhancedKeyUsages { get => throw null; } + public X509EnhancedKeyUsageExtension(System.Security.Cryptography.OidCollection enhancedKeyUsages, bool critical) => throw null; + public X509EnhancedKeyUsageExtension(System.Security.Cryptography.AsnEncodedData encodedEnhancedKeyUsages, bool critical) => throw null; + public X509EnhancedKeyUsageExtension() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Extension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Extension : System.Security.Cryptography.AsnEncodedData + { + public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public bool Critical { get => throw null; set => throw null; } + public X509Extension(string oid, System.ReadOnlySpan rawData, bool critical) => throw null; + public X509Extension(string oid, System.Byte[] rawData, bool critical) => throw null; + public X509Extension(System.Security.Cryptography.Oid oid, System.ReadOnlySpan rawData, bool critical) => throw null; + public X509Extension(System.Security.Cryptography.Oid oid, System.Byte[] rawData, bool critical) => throw null; + public X509Extension(System.Security.Cryptography.AsnEncodedData encodedExtension, bool critical) => throw null; + protected X509Extension() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ExtensionCollection` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ExtensionCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public int Add(System.Security.Cryptography.X509Certificates.X509Extension extension) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Security.Cryptography.X509Certificates.X509Extension[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509ExtensionEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509Extension this[string oid] { get => throw null; } + public System.Security.Cryptography.X509Certificates.X509Extension this[int index] { get => throw null; } + public object SyncRoot { get => throw null; } + public X509ExtensionCollection() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509ExtensionEnumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509ExtensionEnumerator : System.Collections.IEnumerator + { + public System.Security.Cryptography.X509Certificates.X509Extension Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509FindType` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509FindType + { + FindByApplicationPolicy, + FindByCertificatePolicy, + FindByExtension, + FindByIssuerDistinguishedName, + FindByIssuerName, + FindByKeyUsage, + FindBySerialNumber, + FindBySubjectDistinguishedName, + FindBySubjectKeyIdentifier, + FindBySubjectName, + FindByTemplateName, + FindByThumbprint, + FindByTimeExpired, + FindByTimeNotYetValid, + FindByTimeValid, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509IncludeOption` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509IncludeOption + { + EndCertOnly, + ExcludeRoot, + None, + WholeChain, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509KeyStorageFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum X509KeyStorageFlags + { + DefaultKeySet, + EphemeralKeySet, + Exportable, + MachineKeySet, + PersistKeySet, + UserKeySet, + UserProtected, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509KeyUsageExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509KeyUsageExtension : System.Security.Cryptography.X509Certificates.X509Extension + { + public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public System.Security.Cryptography.X509Certificates.X509KeyUsageFlags KeyUsages { get => throw null; } + public X509KeyUsageExtension(System.Security.Cryptography.X509Certificates.X509KeyUsageFlags keyUsages, bool critical) => throw null; + public X509KeyUsageExtension(System.Security.Cryptography.AsnEncodedData encodedKeyUsage, bool critical) => throw null; + public X509KeyUsageExtension() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509KeyUsageFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum X509KeyUsageFlags + { + CrlSign, + DataEncipherment, + DecipherOnly, + DigitalSignature, + EncipherOnly, + KeyAgreement, + KeyCertSign, + KeyEncipherment, + NonRepudiation, + None, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509NameType` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509NameType + { + DnsFromAlternativeName, + DnsName, + EmailName, + SimpleName, + UpnName, + UrlName, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509RevocationFlag` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509RevocationFlag + { + EndCertificateOnly, + EntireChain, + ExcludeRoot, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509RevocationMode` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509RevocationMode + { + NoCheck, + Offline, + Online, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509SignatureGenerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class X509SignatureGenerator + { + protected abstract System.Security.Cryptography.X509Certificates.PublicKey BuildPublicKey(); + public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForECDsa(System.Security.Cryptography.ECDsa key) => throw null; + public static System.Security.Cryptography.X509Certificates.X509SignatureGenerator CreateForRSA(System.Security.Cryptography.RSA key, System.Security.Cryptography.RSASignaturePadding signaturePadding) => throw null; + public abstract System.Byte[] GetSignatureAlgorithmIdentifier(System.Security.Cryptography.HashAlgorithmName hashAlgorithm); + public System.Security.Cryptography.X509Certificates.PublicKey PublicKey { get => throw null; } + public abstract System.Byte[] SignData(System.Byte[] data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm); + protected X509SignatureGenerator() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509Store` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509Store : System.IDisposable + { + public void Add(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public void AddRange(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null; + public System.Security.Cryptography.X509Certificates.X509Certificate2Collection Certificates { get => throw null; } + public void Close() => throw null; + public void Dispose() => throw null; + public bool IsOpen { get => throw null; } + public System.Security.Cryptography.X509Certificates.StoreLocation Location { get => throw null; } + public string Name { get => throw null; } + public void Open(System.Security.Cryptography.X509Certificates.OpenFlags flags) => throw null; + public void Remove(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) => throw null; + public void RemoveRange(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates) => throw null; + public System.IntPtr StoreHandle { get => throw null; } + public X509Store(string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, System.Security.Cryptography.X509Certificates.OpenFlags flags) => throw null; + public X509Store(string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation) => throw null; + public X509Store(string storeName) => throw null; + public X509Store(System.Security.Cryptography.X509Certificates.StoreName storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, System.Security.Cryptography.X509Certificates.OpenFlags flags) => throw null; + public X509Store(System.Security.Cryptography.X509Certificates.StoreName storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation) => throw null; + public X509Store(System.Security.Cryptography.X509Certificates.StoreName storeName) => throw null; + public X509Store(System.Security.Cryptography.X509Certificates.StoreLocation storeLocation) => throw null; + public X509Store(System.IntPtr storeHandle) => throw null; + public X509Store() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class X509SubjectKeyIdentifierExtension : System.Security.Cryptography.X509Certificates.X509Extension + { + public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) => throw null; + public string SubjectKeyIdentifier { get => throw null; } + public X509SubjectKeyIdentifierExtension(string subjectKeyIdentifier, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension(System.Security.Cryptography.X509Certificates.PublicKey key, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension(System.Security.Cryptography.X509Certificates.PublicKey key, System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierHashAlgorithm algorithm, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension(System.Security.Cryptography.AsnEncodedData encodedSubjectKeyIdentifier, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension(System.ReadOnlySpan subjectKeyIdentifier, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension(System.Byte[] subjectKeyIdentifier, bool critical) => throw null; + public X509SubjectKeyIdentifierExtension() => throw null; + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierHashAlgorithm` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum X509SubjectKeyIdentifierHashAlgorithm + { + CapiSha1, + Sha1, + ShortSha1, + // Stub generator skipped constructor + } + + // Generated from `System.Security.Cryptography.X509Certificates.X509VerificationFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum X509VerificationFlags + { + AllFlags, + AllowUnknownCertificateAuthority, + IgnoreCertificateAuthorityRevocationUnknown, + IgnoreCtlNotTimeValid, + IgnoreCtlSignerRevocationUnknown, + IgnoreEndRevocationUnknown, + IgnoreInvalidBasicConstraints, + IgnoreInvalidName, + IgnoreInvalidPolicy, + IgnoreNotTimeNested, + IgnoreNotTimeValid, + IgnoreRootRevocationUnknown, + IgnoreWrongUsage, + NoFlag, + // Stub generator skipped constructor + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs new file mode 100644 index 000000000000..630aff0444ea --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs @@ -0,0 +1,17 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Text + { + // Generated from `System.Text.CodePagesEncodingProvider` in `System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CodePagesEncodingProvider : System.Text.EncodingProvider + { + public override System.Text.Encoding GetEncoding(string name) => throw null; + public override System.Text.Encoding GetEncoding(int codepage) => throw null; + public override System.Collections.Generic.IEnumerable GetEncodings() => throw null; + public static System.Text.EncodingProvider Instance { get => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs new file mode 100644 index 000000000000..b4ca1ec44430 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs @@ -0,0 +1,144 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Text + { + // Generated from `System.Text.ASCIIEncoding` in `System.Text.Encoding.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ASCIIEncoding : System.Text.Encoding + { + public ASCIIEncoding() => throw null; + unsafe public override int GetByteCount(System.Char* chars, int count) => throw null; + public override int GetByteCount(string chars) => throw null; + public override int GetByteCount(System.ReadOnlySpan chars) => throw null; + public override int GetByteCount(System.Char[] chars, int index, int count) => throw null; + unsafe public override int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public override int GetBytes(string chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public override int GetBytes(System.ReadOnlySpan chars, System.Span bytes) => throw null; + public override int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + unsafe public override int GetCharCount(System.Byte* bytes, int count) => throw null; + public override int GetCharCount(System.ReadOnlySpan bytes) => throw null; + public override int GetCharCount(System.Byte[] bytes, int index, int count) => throw null; + unsafe public override int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public override int GetChars(System.ReadOnlySpan bytes, System.Span chars) => throw null; + public override int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex) => throw null; + public override System.Text.Decoder GetDecoder() => throw null; + public override System.Text.Encoder GetEncoder() => throw null; + public override int GetMaxByteCount(int charCount) => throw null; + public override int GetMaxCharCount(int byteCount) => throw null; + public override string GetString(System.Byte[] bytes, int byteIndex, int byteCount) => throw null; + public override bool IsSingleByte { get => throw null; } + } + + // Generated from `System.Text.UTF32Encoding` in `System.Text.Encoding.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UTF32Encoding : System.Text.Encoding + { + public override bool Equals(object value) => throw null; + unsafe public override int GetByteCount(System.Char* chars, int count) => throw null; + public override int GetByteCount(string s) => throw null; + public override int GetByteCount(System.Char[] chars, int index, int count) => throw null; + unsafe public override int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public override int GetBytes(string s, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public override int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + unsafe public override int GetCharCount(System.Byte* bytes, int count) => throw null; + public override int GetCharCount(System.Byte[] bytes, int index, int count) => throw null; + unsafe public override int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public override int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex) => throw null; + public override System.Text.Decoder GetDecoder() => throw null; + public override System.Text.Encoder GetEncoder() => throw null; + public override int GetHashCode() => throw null; + public override int GetMaxByteCount(int charCount) => throw null; + public override int GetMaxCharCount(int byteCount) => throw null; + public override System.Byte[] GetPreamble() => throw null; + public override string GetString(System.Byte[] bytes, int index, int count) => throw null; + public override System.ReadOnlySpan Preamble { get => throw null; } + public UTF32Encoding(bool bigEndian, bool byteOrderMark, bool throwOnInvalidCharacters) => throw null; + public UTF32Encoding(bool bigEndian, bool byteOrderMark) => throw null; + public UTF32Encoding() => throw null; + } + + // Generated from `System.Text.UTF7Encoding` in `System.Text.Encoding.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UTF7Encoding : System.Text.Encoding + { + public override bool Equals(object value) => throw null; + unsafe public override int GetByteCount(System.Char* chars, int count) => throw null; + public override int GetByteCount(string s) => throw null; + public override int GetByteCount(System.Char[] chars, int index, int count) => throw null; + unsafe public override int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public override int GetBytes(string s, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public override int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + unsafe public override int GetCharCount(System.Byte* bytes, int count) => throw null; + public override int GetCharCount(System.Byte[] bytes, int index, int count) => throw null; + unsafe public override int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public override int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex) => throw null; + public override System.Text.Decoder GetDecoder() => throw null; + public override System.Text.Encoder GetEncoder() => throw null; + public override int GetHashCode() => throw null; + public override int GetMaxByteCount(int charCount) => throw null; + public override int GetMaxCharCount(int byteCount) => throw null; + public override string GetString(System.Byte[] bytes, int index, int count) => throw null; + public UTF7Encoding(bool allowOptionals) => throw null; + public UTF7Encoding() => throw null; + } + + // Generated from `System.Text.UTF8Encoding` in `System.Text.Encoding.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UTF8Encoding : System.Text.Encoding + { + public override bool Equals(object value) => throw null; + unsafe public override int GetByteCount(System.Char* chars, int count) => throw null; + public override int GetByteCount(string chars) => throw null; + public override int GetByteCount(System.ReadOnlySpan chars) => throw null; + public override int GetByteCount(System.Char[] chars, int index, int count) => throw null; + unsafe public override int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public override int GetBytes(string s, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public override int GetBytes(System.ReadOnlySpan chars, System.Span bytes) => throw null; + public override int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + unsafe public override int GetCharCount(System.Byte* bytes, int count) => throw null; + public override int GetCharCount(System.ReadOnlySpan bytes) => throw null; + public override int GetCharCount(System.Byte[] bytes, int index, int count) => throw null; + unsafe public override int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public override int GetChars(System.ReadOnlySpan bytes, System.Span chars) => throw null; + public override int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex) => throw null; + public override System.Text.Decoder GetDecoder() => throw null; + public override System.Text.Encoder GetEncoder() => throw null; + public override int GetHashCode() => throw null; + public override int GetMaxByteCount(int charCount) => throw null; + public override int GetMaxCharCount(int byteCount) => throw null; + public override System.Byte[] GetPreamble() => throw null; + public override string GetString(System.Byte[] bytes, int index, int count) => throw null; + public override System.ReadOnlySpan Preamble { get => throw null; } + public UTF8Encoding(bool encoderShouldEmitUTF8Identifier, bool throwOnInvalidBytes) => throw null; + public UTF8Encoding(bool encoderShouldEmitUTF8Identifier) => throw null; + public UTF8Encoding() => throw null; + } + + // Generated from `System.Text.UnicodeEncoding` in `System.Text.Encoding.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnicodeEncoding : System.Text.Encoding + { + public const int CharSize = default; + public override bool Equals(object value) => throw null; + unsafe public override int GetByteCount(System.Char* chars, int count) => throw null; + public override int GetByteCount(string s) => throw null; + public override int GetByteCount(System.Char[] chars, int index, int count) => throw null; + unsafe public override int GetBytes(System.Char* chars, int charCount, System.Byte* bytes, int byteCount) => throw null; + public override int GetBytes(string s, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + public override int GetBytes(System.Char[] chars, int charIndex, int charCount, System.Byte[] bytes, int byteIndex) => throw null; + unsafe public override int GetCharCount(System.Byte* bytes, int count) => throw null; + public override int GetCharCount(System.Byte[] bytes, int index, int count) => throw null; + unsafe public override int GetChars(System.Byte* bytes, int byteCount, System.Char* chars, int charCount) => throw null; + public override int GetChars(System.Byte[] bytes, int byteIndex, int byteCount, System.Char[] chars, int charIndex) => throw null; + public override System.Text.Decoder GetDecoder() => throw null; + public override System.Text.Encoder GetEncoder() => throw null; + public override int GetHashCode() => throw null; + public override int GetMaxByteCount(int charCount) => throw null; + public override int GetMaxCharCount(int byteCount) => throw null; + public override System.Byte[] GetPreamble() => throw null; + public override string GetString(System.Byte[] bytes, int index, int count) => throw null; + public override System.ReadOnlySpan Preamble { get => throw null; } + public UnicodeEncoding(bool bigEndian, bool byteOrderMark, bool throwOnInvalidBytes) => throw null; + public UnicodeEncoding(bool bigEndian, bool byteOrderMark) => throw null; + public UnicodeEncoding() => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs new file mode 100644 index 000000000000..b460599bd682 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs @@ -0,0 +1,256 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Text + { + namespace Encodings + { + namespace Web + { + // Generated from `System.Text.Encodings.Web.HtmlEncoder` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class HtmlEncoder : System.Text.Encodings.Web.TextEncoder + { + public static System.Text.Encodings.Web.HtmlEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) => throw null; + public static System.Text.Encodings.Web.HtmlEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) => throw null; + public static System.Text.Encodings.Web.HtmlEncoder Default { get => throw null; } + protected HtmlEncoder() => throw null; + } + + // Generated from `System.Text.Encodings.Web.JavaScriptEncoder` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JavaScriptEncoder : System.Text.Encodings.Web.TextEncoder + { + public static System.Text.Encodings.Web.JavaScriptEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) => throw null; + public static System.Text.Encodings.Web.JavaScriptEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) => throw null; + public static System.Text.Encodings.Web.JavaScriptEncoder Default { get => throw null; } + protected JavaScriptEncoder() => throw null; + public static System.Text.Encodings.Web.JavaScriptEncoder UnsafeRelaxedJsonEscaping { get => throw null; } + } + + // Generated from `System.Text.Encodings.Web.TextEncoder` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class TextEncoder + { + public void Encode(System.IO.TextWriter output, string value) => throw null; + public virtual void Encode(System.IO.TextWriter output, string value, int startIndex, int characterCount) => throw null; + public virtual void Encode(System.IO.TextWriter output, System.Char[] value, int startIndex, int characterCount) => throw null; + public virtual string Encode(string value) => throw null; + public virtual System.Buffers.OperationStatus Encode(System.ReadOnlySpan source, System.Span destination, out int charsConsumed, out int charsWritten, bool isFinalBlock = default(bool)) => throw null; + public virtual System.Buffers.OperationStatus EncodeUtf8(System.ReadOnlySpan utf8Source, System.Span utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = default(bool)) => throw null; + unsafe public abstract int FindFirstCharacterToEncode(System.Char* text, int textLength); + public virtual int FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan utf8Text) => throw null; + public abstract int MaxOutputCharactersPerInputCharacter { get; } + protected TextEncoder() => throw null; + unsafe public abstract bool TryEncodeUnicodeScalar(int unicodeScalar, System.Char* buffer, int bufferLength, out int numberOfCharactersWritten); + public abstract bool WillEncode(int unicodeScalar); + } + + // Generated from `System.Text.Encodings.Web.TextEncoderSettings` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TextEncoderSettings + { + public virtual void AllowCharacter(System.Char character) => throw null; + public virtual void AllowCharacters(params System.Char[] characters) => throw null; + public virtual void AllowCodePoints(System.Collections.Generic.IEnumerable codePoints) => throw null; + public virtual void AllowRange(System.Text.Unicode.UnicodeRange range) => throw null; + public virtual void AllowRanges(params System.Text.Unicode.UnicodeRange[] ranges) => throw null; + public virtual void Clear() => throw null; + public virtual void ForbidCharacter(System.Char character) => throw null; + public virtual void ForbidCharacters(params System.Char[] characters) => throw null; + public virtual void ForbidRange(System.Text.Unicode.UnicodeRange range) => throw null; + public virtual void ForbidRanges(params System.Text.Unicode.UnicodeRange[] ranges) => throw null; + public virtual System.Collections.Generic.IEnumerable GetAllowedCodePoints() => throw null; + public TextEncoderSettings(params System.Text.Unicode.UnicodeRange[] allowedRanges) => throw null; + public TextEncoderSettings(System.Text.Encodings.Web.TextEncoderSettings other) => throw null; + public TextEncoderSettings() => throw null; + } + + // Generated from `System.Text.Encodings.Web.UrlEncoder` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class UrlEncoder : System.Text.Encodings.Web.TextEncoder + { + public static System.Text.Encodings.Web.UrlEncoder Create(params System.Text.Unicode.UnicodeRange[] allowedRanges) => throw null; + public static System.Text.Encodings.Web.UrlEncoder Create(System.Text.Encodings.Web.TextEncoderSettings settings) => throw null; + public static System.Text.Encodings.Web.UrlEncoder Default { get => throw null; } + protected UrlEncoder() => throw null; + } + + } + } + namespace Unicode + { + // Generated from `System.Text.Unicode.UnicodeRange` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UnicodeRange + { + public static System.Text.Unicode.UnicodeRange Create(System.Char firstCharacter, System.Char lastCharacter) => throw null; + public int FirstCodePoint { get => throw null; } + public int Length { get => throw null; } + public UnicodeRange(int firstCodePoint, int length) => throw null; + } + + // Generated from `System.Text.Unicode.UnicodeRanges` in `System.Text.Encodings.Web, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class UnicodeRanges + { + public static System.Text.Unicode.UnicodeRange All { get => throw null; } + public static System.Text.Unicode.UnicodeRange AlphabeticPresentationForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange Arabic { get => throw null; } + public static System.Text.Unicode.UnicodeRange ArabicExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange ArabicPresentationFormsA { get => throw null; } + public static System.Text.Unicode.UnicodeRange ArabicPresentationFormsB { get => throw null; } + public static System.Text.Unicode.UnicodeRange ArabicSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange Armenian { get => throw null; } + public static System.Text.Unicode.UnicodeRange Arrows { get => throw null; } + public static System.Text.Unicode.UnicodeRange Balinese { get => throw null; } + public static System.Text.Unicode.UnicodeRange Bamum { get => throw null; } + public static System.Text.Unicode.UnicodeRange BasicLatin { get => throw null; } + public static System.Text.Unicode.UnicodeRange Batak { get => throw null; } + public static System.Text.Unicode.UnicodeRange Bengali { get => throw null; } + public static System.Text.Unicode.UnicodeRange BlockElements { get => throw null; } + public static System.Text.Unicode.UnicodeRange Bopomofo { get => throw null; } + public static System.Text.Unicode.UnicodeRange BopomofoExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange BoxDrawing { get => throw null; } + public static System.Text.Unicode.UnicodeRange BraillePatterns { get => throw null; } + public static System.Text.Unicode.UnicodeRange Buginese { get => throw null; } + public static System.Text.Unicode.UnicodeRange Buhid { get => throw null; } + public static System.Text.Unicode.UnicodeRange Cham { get => throw null; } + public static System.Text.Unicode.UnicodeRange Cherokee { get => throw null; } + public static System.Text.Unicode.UnicodeRange CherokeeSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkCompatibility { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkCompatibilityForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkCompatibilityIdeographs { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkRadicalsSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkStrokes { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkSymbolsandPunctuation { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkUnifiedIdeographs { get => throw null; } + public static System.Text.Unicode.UnicodeRange CjkUnifiedIdeographsExtensionA { get => throw null; } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarks { get => throw null; } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange CombiningDiacriticalMarksforSymbols { get => throw null; } + public static System.Text.Unicode.UnicodeRange CombiningHalfMarks { get => throw null; } + public static System.Text.Unicode.UnicodeRange CommonIndicNumberForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange ControlPictures { get => throw null; } + public static System.Text.Unicode.UnicodeRange Coptic { get => throw null; } + public static System.Text.Unicode.UnicodeRange CurrencySymbols { get => throw null; } + public static System.Text.Unicode.UnicodeRange Cyrillic { get => throw null; } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedB { get => throw null; } + public static System.Text.Unicode.UnicodeRange CyrillicExtendedC { get => throw null; } + public static System.Text.Unicode.UnicodeRange CyrillicSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange Devanagari { get => throw null; } + public static System.Text.Unicode.UnicodeRange DevanagariExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange Dingbats { get => throw null; } + public static System.Text.Unicode.UnicodeRange EnclosedAlphanumerics { get => throw null; } + public static System.Text.Unicode.UnicodeRange EnclosedCjkLettersandMonths { get => throw null; } + public static System.Text.Unicode.UnicodeRange Ethiopic { get => throw null; } + public static System.Text.Unicode.UnicodeRange EthiopicExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange EthiopicExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange EthiopicSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange GeneralPunctuation { get => throw null; } + public static System.Text.Unicode.UnicodeRange GeometricShapes { get => throw null; } + public static System.Text.Unicode.UnicodeRange Georgian { get => throw null; } + public static System.Text.Unicode.UnicodeRange GeorgianExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange GeorgianSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange Glagolitic { get => throw null; } + public static System.Text.Unicode.UnicodeRange GreekExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange GreekandCoptic { get => throw null; } + public static System.Text.Unicode.UnicodeRange Gujarati { get => throw null; } + public static System.Text.Unicode.UnicodeRange Gurmukhi { get => throw null; } + public static System.Text.Unicode.UnicodeRange HalfwidthandFullwidthForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange HangulCompatibilityJamo { get => throw null; } + public static System.Text.Unicode.UnicodeRange HangulJamo { get => throw null; } + public static System.Text.Unicode.UnicodeRange HangulJamoExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange HangulJamoExtendedB { get => throw null; } + public static System.Text.Unicode.UnicodeRange HangulSyllables { get => throw null; } + public static System.Text.Unicode.UnicodeRange Hanunoo { get => throw null; } + public static System.Text.Unicode.UnicodeRange Hebrew { get => throw null; } + public static System.Text.Unicode.UnicodeRange Hiragana { get => throw null; } + public static System.Text.Unicode.UnicodeRange IdeographicDescriptionCharacters { get => throw null; } + public static System.Text.Unicode.UnicodeRange IpaExtensions { get => throw null; } + public static System.Text.Unicode.UnicodeRange Javanese { get => throw null; } + public static System.Text.Unicode.UnicodeRange Kanbun { get => throw null; } + public static System.Text.Unicode.UnicodeRange KangxiRadicals { get => throw null; } + public static System.Text.Unicode.UnicodeRange Kannada { get => throw null; } + public static System.Text.Unicode.UnicodeRange Katakana { get => throw null; } + public static System.Text.Unicode.UnicodeRange KatakanaPhoneticExtensions { get => throw null; } + public static System.Text.Unicode.UnicodeRange KayahLi { get => throw null; } + public static System.Text.Unicode.UnicodeRange Khmer { get => throw null; } + public static System.Text.Unicode.UnicodeRange KhmerSymbols { get => throw null; } + public static System.Text.Unicode.UnicodeRange Lao { get => throw null; } + public static System.Text.Unicode.UnicodeRange Latin1Supplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedAdditional { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedB { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedC { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedD { get => throw null; } + public static System.Text.Unicode.UnicodeRange LatinExtendedE { get => throw null; } + public static System.Text.Unicode.UnicodeRange Lepcha { get => throw null; } + public static System.Text.Unicode.UnicodeRange LetterlikeSymbols { get => throw null; } + public static System.Text.Unicode.UnicodeRange Limbu { get => throw null; } + public static System.Text.Unicode.UnicodeRange Lisu { get => throw null; } + public static System.Text.Unicode.UnicodeRange Malayalam { get => throw null; } + public static System.Text.Unicode.UnicodeRange Mandaic { get => throw null; } + public static System.Text.Unicode.UnicodeRange MathematicalOperators { get => throw null; } + public static System.Text.Unicode.UnicodeRange MeeteiMayek { get => throw null; } + public static System.Text.Unicode.UnicodeRange MeeteiMayekExtensions { get => throw null; } + public static System.Text.Unicode.UnicodeRange MiscellaneousMathematicalSymbolsA { get => throw null; } + public static System.Text.Unicode.UnicodeRange MiscellaneousMathematicalSymbolsB { get => throw null; } + public static System.Text.Unicode.UnicodeRange MiscellaneousSymbols { get => throw null; } + public static System.Text.Unicode.UnicodeRange MiscellaneousSymbolsandArrows { get => throw null; } + public static System.Text.Unicode.UnicodeRange MiscellaneousTechnical { get => throw null; } + public static System.Text.Unicode.UnicodeRange ModifierToneLetters { get => throw null; } + public static System.Text.Unicode.UnicodeRange Mongolian { get => throw null; } + public static System.Text.Unicode.UnicodeRange Myanmar { get => throw null; } + public static System.Text.Unicode.UnicodeRange MyanmarExtendedA { get => throw null; } + public static System.Text.Unicode.UnicodeRange MyanmarExtendedB { get => throw null; } + public static System.Text.Unicode.UnicodeRange NKo { get => throw null; } + public static System.Text.Unicode.UnicodeRange NewTaiLue { get => throw null; } + public static System.Text.Unicode.UnicodeRange None { get => throw null; } + public static System.Text.Unicode.UnicodeRange NumberForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange Ogham { get => throw null; } + public static System.Text.Unicode.UnicodeRange OlChiki { get => throw null; } + public static System.Text.Unicode.UnicodeRange OpticalCharacterRecognition { get => throw null; } + public static System.Text.Unicode.UnicodeRange Oriya { get => throw null; } + public static System.Text.Unicode.UnicodeRange Phagspa { get => throw null; } + public static System.Text.Unicode.UnicodeRange PhoneticExtensions { get => throw null; } + public static System.Text.Unicode.UnicodeRange PhoneticExtensionsSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange Rejang { get => throw null; } + public static System.Text.Unicode.UnicodeRange Runic { get => throw null; } + public static System.Text.Unicode.UnicodeRange Samaritan { get => throw null; } + public static System.Text.Unicode.UnicodeRange Saurashtra { get => throw null; } + public static System.Text.Unicode.UnicodeRange Sinhala { get => throw null; } + public static System.Text.Unicode.UnicodeRange SmallFormVariants { get => throw null; } + public static System.Text.Unicode.UnicodeRange SpacingModifierLetters { get => throw null; } + public static System.Text.Unicode.UnicodeRange Specials { get => throw null; } + public static System.Text.Unicode.UnicodeRange Sundanese { get => throw null; } + public static System.Text.Unicode.UnicodeRange SundaneseSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange SuperscriptsandSubscripts { get => throw null; } + public static System.Text.Unicode.UnicodeRange SupplementalArrowsA { get => throw null; } + public static System.Text.Unicode.UnicodeRange SupplementalArrowsB { get => throw null; } + public static System.Text.Unicode.UnicodeRange SupplementalMathematicalOperators { get => throw null; } + public static System.Text.Unicode.UnicodeRange SupplementalPunctuation { get => throw null; } + public static System.Text.Unicode.UnicodeRange SylotiNagri { get => throw null; } + public static System.Text.Unicode.UnicodeRange Syriac { get => throw null; } + public static System.Text.Unicode.UnicodeRange SyriacSupplement { get => throw null; } + public static System.Text.Unicode.UnicodeRange Tagalog { get => throw null; } + public static System.Text.Unicode.UnicodeRange Tagbanwa { get => throw null; } + public static System.Text.Unicode.UnicodeRange TaiLe { get => throw null; } + public static System.Text.Unicode.UnicodeRange TaiTham { get => throw null; } + public static System.Text.Unicode.UnicodeRange TaiViet { get => throw null; } + public static System.Text.Unicode.UnicodeRange Tamil { get => throw null; } + public static System.Text.Unicode.UnicodeRange Telugu { get => throw null; } + public static System.Text.Unicode.UnicodeRange Thaana { get => throw null; } + public static System.Text.Unicode.UnicodeRange Thai { get => throw null; } + public static System.Text.Unicode.UnicodeRange Tibetan { get => throw null; } + public static System.Text.Unicode.UnicodeRange Tifinagh { get => throw null; } + public static System.Text.Unicode.UnicodeRange UnifiedCanadianAboriginalSyllabics { get => throw null; } + public static System.Text.Unicode.UnicodeRange UnifiedCanadianAboriginalSyllabicsExtended { get => throw null; } + public static System.Text.Unicode.UnicodeRange Vai { get => throw null; } + public static System.Text.Unicode.UnicodeRange VariationSelectors { get => throw null; } + public static System.Text.Unicode.UnicodeRange VedicExtensions { get => throw null; } + public static System.Text.Unicode.UnicodeRange VerticalForms { get => throw null; } + public static System.Text.Unicode.UnicodeRange YiRadicals { get => throw null; } + public static System.Text.Unicode.UnicodeRange YiSyllables { get => throw null; } + public static System.Text.Unicode.UnicodeRange YijingHexagramSymbols { get => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs new file mode 100644 index 000000000000..a93a893b62cd --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs @@ -0,0 +1,611 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Text + { + namespace Json + { + // Generated from `System.Text.Json.JsonCommentHandling` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum JsonCommentHandling + { + Allow, + Disallow, + // Stub generator skipped constructor + Skip, + } + + // Generated from `System.Text.Json.JsonDocument` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonDocument : System.IDisposable + { + public void Dispose() => throw null; + public static System.Text.Json.JsonDocument Parse(string json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions)) => throw null; + public static System.Text.Json.JsonDocument Parse(System.ReadOnlyMemory json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions)) => throw null; + public static System.Text.Json.JsonDocument Parse(System.ReadOnlyMemory utf8Json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions)) => throw null; + public static System.Text.Json.JsonDocument Parse(System.IO.Stream utf8Json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions)) => throw null; + public static System.Text.Json.JsonDocument Parse(System.Buffers.ReadOnlySequence utf8Json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions)) => throw null; + public static System.Threading.Tasks.Task ParseAsync(System.IO.Stream utf8Json, System.Text.Json.JsonDocumentOptions options = default(System.Text.Json.JsonDocumentOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Text.Json.JsonDocument ParseValue(ref System.Text.Json.Utf8JsonReader reader) => throw null; + public System.Text.Json.JsonElement RootElement { get => throw null; } + public static bool TryParseValue(ref System.Text.Json.Utf8JsonReader reader, out System.Text.Json.JsonDocument document) => throw null; + public void WriteTo(System.Text.Json.Utf8JsonWriter writer) => throw null; + } + + // Generated from `System.Text.Json.JsonDocumentOptions` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonDocumentOptions + { + public bool AllowTrailingCommas { get => throw null; set => throw null; } + public System.Text.Json.JsonCommentHandling CommentHandling { get => throw null; set => throw null; } + // Stub generator skipped constructor + public int MaxDepth { get => throw null; set => throw null; } + } + + // Generated from `System.Text.Json.JsonElement` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonElement + { + // Generated from `System.Text.Json.JsonElement.ArrayEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ArrayEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable + { + // Stub generator skipped constructor + public System.Text.Json.JsonElement Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public System.Text.Json.JsonElement.ArrayEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + + public System.Text.Json.JsonElement Clone() => throw null; + public System.Text.Json.JsonElement.ArrayEnumerator EnumerateArray() => throw null; + public System.Text.Json.JsonElement.ObjectEnumerator EnumerateObject() => throw null; + public int GetArrayLength() => throw null; + public bool GetBoolean() => throw null; + public System.Byte GetByte() => throw null; + public System.Byte[] GetBytesFromBase64() => throw null; + public System.DateTime GetDateTime() => throw null; + public System.DateTimeOffset GetDateTimeOffset() => throw null; + public System.Decimal GetDecimal() => throw null; + public double GetDouble() => throw null; + public System.Guid GetGuid() => throw null; + public System.Int16 GetInt16() => throw null; + public int GetInt32() => throw null; + public System.Int64 GetInt64() => throw null; + public System.Text.Json.JsonElement GetProperty(string propertyName) => throw null; + public System.Text.Json.JsonElement GetProperty(System.ReadOnlySpan propertyName) => throw null; + public System.Text.Json.JsonElement GetProperty(System.ReadOnlySpan utf8PropertyName) => throw null; + public string GetRawText() => throw null; + public System.SByte GetSByte() => throw null; + public float GetSingle() => throw null; + public string GetString() => throw null; + public System.UInt16 GetUInt16() => throw null; + public System.UInt32 GetUInt32() => throw null; + public System.UInt64 GetUInt64() => throw null; + public System.Text.Json.JsonElement this[int index] { get => throw null; } + // Stub generator skipped constructor + // Generated from `System.Text.Json.JsonElement.ObjectEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct ObjectEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable + { + public System.Text.Json.JsonProperty Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public System.Text.Json.JsonElement.ObjectEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public bool MoveNext() => throw null; + // Stub generator skipped constructor + public void Reset() => throw null; + } + + + public override string ToString() => throw null; + public bool TryGetByte(out System.Byte value) => throw null; + public bool TryGetBytesFromBase64(out System.Byte[] value) => throw null; + public bool TryGetDateTime(out System.DateTime value) => throw null; + public bool TryGetDateTimeOffset(out System.DateTimeOffset value) => throw null; + public bool TryGetDecimal(out System.Decimal value) => throw null; + public bool TryGetDouble(out double value) => throw null; + public bool TryGetGuid(out System.Guid value) => throw null; + public bool TryGetInt16(out System.Int16 value) => throw null; + public bool TryGetInt32(out int value) => throw null; + public bool TryGetInt64(out System.Int64 value) => throw null; + public bool TryGetProperty(string propertyName, out System.Text.Json.JsonElement value) => throw null; + public bool TryGetProperty(System.ReadOnlySpan propertyName, out System.Text.Json.JsonElement value) => throw null; + public bool TryGetProperty(System.ReadOnlySpan utf8PropertyName, out System.Text.Json.JsonElement value) => throw null; + public bool TryGetSByte(out System.SByte value) => throw null; + public bool TryGetSingle(out float value) => throw null; + public bool TryGetUInt16(out System.UInt16 value) => throw null; + public bool TryGetUInt32(out System.UInt32 value) => throw null; + public bool TryGetUInt64(out System.UInt64 value) => throw null; + public bool ValueEquals(string text) => throw null; + public bool ValueEquals(System.ReadOnlySpan text) => throw null; + public bool ValueEquals(System.ReadOnlySpan utf8Text) => throw null; + public System.Text.Json.JsonValueKind ValueKind { get => throw null; } + public void WriteTo(System.Text.Json.Utf8JsonWriter writer) => throw null; + } + + // Generated from `System.Text.Json.JsonEncodedText` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonEncodedText : System.IEquatable + { + public static System.Text.Json.JsonEncodedText Encode(string value, System.Text.Encodings.Web.JavaScriptEncoder encoder = default(System.Text.Encodings.Web.JavaScriptEncoder)) => throw null; + public static System.Text.Json.JsonEncodedText Encode(System.ReadOnlySpan value, System.Text.Encodings.Web.JavaScriptEncoder encoder = default(System.Text.Encodings.Web.JavaScriptEncoder)) => throw null; + public static System.Text.Json.JsonEncodedText Encode(System.ReadOnlySpan utf8Value, System.Text.Encodings.Web.JavaScriptEncoder encoder = default(System.Text.Encodings.Web.JavaScriptEncoder)) => throw null; + public System.ReadOnlySpan EncodedUtf8Bytes { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(System.Text.Json.JsonEncodedText other) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + } + + // Generated from `System.Text.Json.JsonException` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonException : System.Exception + { + public System.Int64? BytePositionInLine { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonException(string message, string path, System.Int64? lineNumber, System.Int64? bytePositionInLine, System.Exception innerException) => throw null; + public JsonException(string message, string path, System.Int64? lineNumber, System.Int64? bytePositionInLine) => throw null; + public JsonException(string message, System.Exception innerException) => throw null; + public JsonException(string message) => throw null; + public JsonException() => throw null; + protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Int64? LineNumber { get => throw null; } + public override string Message { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `System.Text.Json.JsonNamingPolicy` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JsonNamingPolicy + { + public static System.Text.Json.JsonNamingPolicy CamelCase { get => throw null; } + public abstract string ConvertName(string name); + protected JsonNamingPolicy() => throw null; + } + + // Generated from `System.Text.Json.JsonProperty` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonProperty + { + // Stub generator skipped constructor + public string Name { get => throw null; } + public bool NameEquals(string text) => throw null; + public bool NameEquals(System.ReadOnlySpan text) => throw null; + public bool NameEquals(System.ReadOnlySpan utf8Text) => throw null; + public override string ToString() => throw null; + public System.Text.Json.JsonElement Value { get => throw null; } + public void WriteTo(System.Text.Json.Utf8JsonWriter writer) => throw null; + } + + // Generated from `System.Text.Json.JsonReaderOptions` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonReaderOptions + { + public bool AllowTrailingCommas { get => throw null; set => throw null; } + public System.Text.Json.JsonCommentHandling CommentHandling { get => throw null; set => throw null; } + // Stub generator skipped constructor + public int MaxDepth { get => throw null; set => throw null; } + } + + // Generated from `System.Text.Json.JsonReaderState` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonReaderState + { + public JsonReaderState(System.Text.Json.JsonReaderOptions options = default(System.Text.Json.JsonReaderOptions)) => throw null; + // Stub generator skipped constructor + public System.Text.Json.JsonReaderOptions Options { get => throw null; } + } + + // Generated from `System.Text.Json.JsonSerializer` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class JsonSerializer + { + public static object Deserialize(string json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static object Deserialize(ref System.Text.Json.Utf8JsonReader reader, System.Type returnType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static object Deserialize(System.ReadOnlySpan utf8Json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static TValue Deserialize(string json, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static TValue Deserialize(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static TValue Deserialize(System.ReadOnlySpan utf8Json, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static System.Threading.Tasks.ValueTask DeserializeAsync(System.IO.Stream utf8Json, System.Type returnType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.ValueTask DeserializeAsync(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void Serialize(System.Text.Json.Utf8JsonWriter writer, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static void Serialize(System.Text.Json.Utf8JsonWriter writer, object value, System.Type inputType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static string Serialize(TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static string Serialize(object value, System.Type inputType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static System.Threading.Tasks.Task SerializeAsync(System.IO.Stream utf8Json, TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SerializeAsync(System.IO.Stream utf8Json, object value, System.Type inputType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Byte[] SerializeToUtf8Bytes(TValue value, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + public static System.Byte[] SerializeToUtf8Bytes(object value, System.Type inputType, System.Text.Json.JsonSerializerOptions options = default(System.Text.Json.JsonSerializerOptions)) => throw null; + } + + // Generated from `System.Text.Json.JsonSerializerDefaults` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum JsonSerializerDefaults + { + General, + // Stub generator skipped constructor + Web, + } + + // Generated from `System.Text.Json.JsonSerializerOptions` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonSerializerOptions + { + public bool AllowTrailingCommas { get => throw null; set => throw null; } + public System.Collections.Generic.IList Converters { get => throw null; } + public int DefaultBufferSize { get => throw null; set => throw null; } + public System.Text.Json.Serialization.JsonIgnoreCondition DefaultIgnoreCondition { get => throw null; set => throw null; } + public System.Text.Json.JsonNamingPolicy DictionaryKeyPolicy { get => throw null; set => throw null; } + public System.Text.Encodings.Web.JavaScriptEncoder Encoder { get => throw null; set => throw null; } + public System.Text.Json.Serialization.JsonConverter GetConverter(System.Type typeToConvert) => throw null; + public bool IgnoreNullValues { get => throw null; set => throw null; } + public bool IgnoreReadOnlyFields { get => throw null; set => throw null; } + public bool IgnoreReadOnlyProperties { get => throw null; set => throw null; } + public bool IncludeFields { get => throw null; set => throw null; } + public JsonSerializerOptions(System.Text.Json.JsonSerializerOptions options) => throw null; + public JsonSerializerOptions(System.Text.Json.JsonSerializerDefaults defaults) => throw null; + public JsonSerializerOptions() => throw null; + public int MaxDepth { get => throw null; set => throw null; } + public System.Text.Json.Serialization.JsonNumberHandling NumberHandling { get => throw null; set => throw null; } + public bool PropertyNameCaseInsensitive { get => throw null; set => throw null; } + public System.Text.Json.JsonNamingPolicy PropertyNamingPolicy { get => throw null; set => throw null; } + public System.Text.Json.JsonCommentHandling ReadCommentHandling { get => throw null; set => throw null; } + public System.Text.Json.Serialization.ReferenceHandler ReferenceHandler { get => throw null; set => throw null; } + public bool WriteIndented { get => throw null; set => throw null; } + } + + // Generated from `System.Text.Json.JsonTokenType` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum JsonTokenType + { + Comment, + EndArray, + EndObject, + False, + // Stub generator skipped constructor + None, + Null, + Number, + PropertyName, + StartArray, + StartObject, + String, + True, + } + + // Generated from `System.Text.Json.JsonValueKind` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum JsonValueKind + { + Array, + False, + // Stub generator skipped constructor + Null, + Number, + Object, + String, + True, + Undefined, + } + + // Generated from `System.Text.Json.JsonWriterOptions` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct JsonWriterOptions + { + public System.Text.Encodings.Web.JavaScriptEncoder Encoder { get => throw null; set => throw null; } + public bool Indented { get => throw null; set => throw null; } + // Stub generator skipped constructor + public bool SkipValidation { get => throw null; set => throw null; } + } + + // Generated from `System.Text.Json.Utf8JsonReader` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct Utf8JsonReader + { + public System.Int64 BytesConsumed { get => throw null; } + public int CurrentDepth { get => throw null; } + public System.Text.Json.JsonReaderState CurrentState { get => throw null; } + public bool GetBoolean() => throw null; + public System.Byte GetByte() => throw null; + public System.Byte[] GetBytesFromBase64() => throw null; + public string GetComment() => throw null; + public System.DateTime GetDateTime() => throw null; + public System.DateTimeOffset GetDateTimeOffset() => throw null; + public System.Decimal GetDecimal() => throw null; + public double GetDouble() => throw null; + public System.Guid GetGuid() => throw null; + public System.Int16 GetInt16() => throw null; + public int GetInt32() => throw null; + public System.Int64 GetInt64() => throw null; + public System.SByte GetSByte() => throw null; + public float GetSingle() => throw null; + public string GetString() => throw null; + public System.UInt16 GetUInt16() => throw null; + public System.UInt32 GetUInt32() => throw null; + public System.UInt64 GetUInt64() => throw null; + public bool HasValueSequence { get => throw null; } + public bool IsFinalBlock { get => throw null; } + public System.SequencePosition Position { get => throw null; } + public bool Read() => throw null; + public void Skip() => throw null; + public System.Int64 TokenStartIndex { get => throw null; } + public System.Text.Json.JsonTokenType TokenType { get => throw null; } + public bool TryGetByte(out System.Byte value) => throw null; + public bool TryGetBytesFromBase64(out System.Byte[] value) => throw null; + public bool TryGetDateTime(out System.DateTime value) => throw null; + public bool TryGetDateTimeOffset(out System.DateTimeOffset value) => throw null; + public bool TryGetDecimal(out System.Decimal value) => throw null; + public bool TryGetDouble(out double value) => throw null; + public bool TryGetGuid(out System.Guid value) => throw null; + public bool TryGetInt16(out System.Int16 value) => throw null; + public bool TryGetInt32(out int value) => throw null; + public bool TryGetInt64(out System.Int64 value) => throw null; + public bool TryGetSByte(out System.SByte value) => throw null; + public bool TryGetSingle(out float value) => throw null; + public bool TryGetUInt16(out System.UInt16 value) => throw null; + public bool TryGetUInt32(out System.UInt32 value) => throw null; + public bool TryGetUInt64(out System.UInt64 value) => throw null; + public bool TrySkip() => throw null; + public Utf8JsonReader(System.ReadOnlySpan jsonData, bool isFinalBlock, System.Text.Json.JsonReaderState state) => throw null; + public Utf8JsonReader(System.ReadOnlySpan jsonData, System.Text.Json.JsonReaderOptions options = default(System.Text.Json.JsonReaderOptions)) => throw null; + public Utf8JsonReader(System.Buffers.ReadOnlySequence jsonData, bool isFinalBlock, System.Text.Json.JsonReaderState state) => throw null; + public Utf8JsonReader(System.Buffers.ReadOnlySequence jsonData, System.Text.Json.JsonReaderOptions options = default(System.Text.Json.JsonReaderOptions)) => throw null; + // Stub generator skipped constructor + public System.Buffers.ReadOnlySequence ValueSequence { get => throw null; } + public System.ReadOnlySpan ValueSpan { get => throw null; } + public bool ValueTextEquals(string text) => throw null; + public bool ValueTextEquals(System.ReadOnlySpan text) => throw null; + public bool ValueTextEquals(System.ReadOnlySpan utf8Text) => throw null; + } + + // Generated from `System.Text.Json.Utf8JsonWriter` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Utf8JsonWriter : System.IDisposable, System.IAsyncDisposable + { + public System.Int64 BytesCommitted { get => throw null; } + public int BytesPending { get => throw null; } + public int CurrentDepth { get => throw null; } + public void Dispose() => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + public void Flush() => throw null; + public System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Text.Json.JsonWriterOptions Options { get => throw null; } + public void Reset(System.IO.Stream utf8Json) => throw null; + public void Reset(System.Buffers.IBufferWriter bufferWriter) => throw null; + public void Reset() => throw null; + public Utf8JsonWriter(System.IO.Stream utf8Json, System.Text.Json.JsonWriterOptions options = default(System.Text.Json.JsonWriterOptions)) => throw null; + public Utf8JsonWriter(System.Buffers.IBufferWriter bufferWriter, System.Text.Json.JsonWriterOptions options = default(System.Text.Json.JsonWriterOptions)) => throw null; + public void WriteBase64String(string propertyName, System.ReadOnlySpan bytes) => throw null; + public void WriteBase64String(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan bytes) => throw null; + public void WriteBase64String(System.ReadOnlySpan propertyName, System.ReadOnlySpan bytes) => throw null; + public void WriteBase64String(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan bytes) => throw null; + public void WriteBase64StringValue(System.ReadOnlySpan bytes) => throw null; + public void WriteBoolean(string propertyName, bool value) => throw null; + public void WriteBoolean(System.Text.Json.JsonEncodedText propertyName, bool value) => throw null; + public void WriteBoolean(System.ReadOnlySpan propertyName, bool value) => throw null; + public void WriteBoolean(System.ReadOnlySpan utf8PropertyName, bool value) => throw null; + public void WriteBooleanValue(bool value) => throw null; + public void WriteCommentValue(string value) => throw null; + public void WriteCommentValue(System.ReadOnlySpan value) => throw null; + public void WriteCommentValue(System.ReadOnlySpan utf8Value) => throw null; + public void WriteEndArray() => throw null; + public void WriteEndObject() => throw null; + public void WriteNull(string propertyName) => throw null; + public void WriteNull(System.Text.Json.JsonEncodedText propertyName) => throw null; + public void WriteNull(System.ReadOnlySpan propertyName) => throw null; + public void WriteNull(System.ReadOnlySpan utf8PropertyName) => throw null; + public void WriteNullValue() => throw null; + public void WriteNumber(string propertyName, int value) => throw null; + public void WriteNumber(string propertyName, float value) => throw null; + public void WriteNumber(string propertyName, double value) => throw null; + public void WriteNumber(string propertyName, System.UInt64 value) => throw null; + public void WriteNumber(string propertyName, System.UInt32 value) => throw null; + public void WriteNumber(string propertyName, System.Int64 value) => throw null; + public void WriteNumber(string propertyName, System.Decimal value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, int value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, float value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, double value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, System.UInt64 value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, System.UInt32 value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, System.Int64 value) => throw null; + public void WriteNumber(System.Text.Json.JsonEncodedText propertyName, System.Decimal value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, int value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, float value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, double value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, System.UInt64 value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, System.UInt32 value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, System.Int64 value) => throw null; + public void WriteNumber(System.ReadOnlySpan propertyName, System.Decimal value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, int value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, float value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, double value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, System.UInt64 value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, System.UInt32 value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, System.Int64 value) => throw null; + public void WriteNumber(System.ReadOnlySpan utf8PropertyName, System.Decimal value) => throw null; + public void WriteNumberValue(int value) => throw null; + public void WriteNumberValue(float value) => throw null; + public void WriteNumberValue(double value) => throw null; + public void WriteNumberValue(System.UInt64 value) => throw null; + public void WriteNumberValue(System.UInt32 value) => throw null; + public void WriteNumberValue(System.Int64 value) => throw null; + public void WriteNumberValue(System.Decimal value) => throw null; + public void WritePropertyName(string propertyName) => throw null; + public void WritePropertyName(System.Text.Json.JsonEncodedText propertyName) => throw null; + public void WritePropertyName(System.ReadOnlySpan propertyName) => throw null; + public void WritePropertyName(System.ReadOnlySpan utf8PropertyName) => throw null; + public void WriteStartArray(string propertyName) => throw null; + public void WriteStartArray(System.Text.Json.JsonEncodedText propertyName) => throw null; + public void WriteStartArray(System.ReadOnlySpan propertyName) => throw null; + public void WriteStartArray(System.ReadOnlySpan utf8PropertyName) => throw null; + public void WriteStartArray() => throw null; + public void WriteStartObject(string propertyName) => throw null; + public void WriteStartObject(System.Text.Json.JsonEncodedText propertyName) => throw null; + public void WriteStartObject(System.ReadOnlySpan propertyName) => throw null; + public void WriteStartObject(System.ReadOnlySpan utf8PropertyName) => throw null; + public void WriteStartObject() => throw null; + public void WriteString(string propertyName, string value) => throw null; + public void WriteString(string propertyName, System.Text.Json.JsonEncodedText value) => throw null; + public void WriteString(string propertyName, System.ReadOnlySpan value) => throw null; + public void WriteString(string propertyName, System.ReadOnlySpan utf8Value) => throw null; + public void WriteString(string propertyName, System.Guid value) => throw null; + public void WriteString(string propertyName, System.DateTimeOffset value) => throw null; + public void WriteString(string propertyName, System.DateTime value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, string value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.Text.Json.JsonEncodedText value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.ReadOnlySpan utf8Value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.Guid value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.DateTimeOffset value) => throw null; + public void WriteString(System.Text.Json.JsonEncodedText propertyName, System.DateTime value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, string value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.Text.Json.JsonEncodedText value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.ReadOnlySpan value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.ReadOnlySpan utf8Value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.Guid value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.DateTimeOffset value) => throw null; + public void WriteString(System.ReadOnlySpan propertyName, System.DateTime value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, string value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.Text.Json.JsonEncodedText value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.ReadOnlySpan utf8Value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.Guid value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.DateTimeOffset value) => throw null; + public void WriteString(System.ReadOnlySpan utf8PropertyName, System.DateTime value) => throw null; + public void WriteStringValue(string value) => throw null; + public void WriteStringValue(System.Text.Json.JsonEncodedText value) => throw null; + public void WriteStringValue(System.ReadOnlySpan value) => throw null; + public void WriteStringValue(System.ReadOnlySpan utf8Value) => throw null; + public void WriteStringValue(System.Guid value) => throw null; + public void WriteStringValue(System.DateTimeOffset value) => throw null; + public void WriteStringValue(System.DateTime value) => throw null; + } + + namespace Serialization + { + // Generated from `System.Text.Json.Serialization.JsonAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JsonAttribute : System.Attribute + { + protected JsonAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonConstructorAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonConstructorAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonConstructorAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonConverter` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JsonConverter + { + public abstract bool CanConvert(System.Type typeToConvert); + internal JsonConverter() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonConverter<>` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JsonConverter : System.Text.Json.Serialization.JsonConverter + { + public override bool CanConvert(System.Type typeToConvert) => throw null; + public virtual bool HandleNull { get => throw null; } + protected internal JsonConverter() => throw null; + public abstract T Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options); + public abstract void Write(System.Text.Json.Utf8JsonWriter writer, T value, System.Text.Json.JsonSerializerOptions options); + } + + // Generated from `System.Text.Json.Serialization.JsonConverterAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonConverterAttribute : System.Text.Json.Serialization.JsonAttribute + { + public System.Type ConverterType { get => throw null; } + public virtual System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert) => throw null; + public JsonConverterAttribute(System.Type converterType) => throw null; + protected JsonConverterAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonConverterFactory` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class JsonConverterFactory : System.Text.Json.Serialization.JsonConverter + { + public abstract System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options); + protected JsonConverterFactory() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonExtensionDataAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonExtensionDataAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonExtensionDataAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonIgnoreAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonIgnoreAttribute : System.Text.Json.Serialization.JsonAttribute + { + public System.Text.Json.Serialization.JsonIgnoreCondition Condition { get => throw null; set => throw null; } + public JsonIgnoreAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonIgnoreCondition` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum JsonIgnoreCondition + { + Always, + // Stub generator skipped constructor + Never, + WhenWritingDefault, + WhenWritingNull, + } + + // Generated from `System.Text.Json.Serialization.JsonIncludeAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonIncludeAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonIncludeAttribute() => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonNumberHandling` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum JsonNumberHandling + { + AllowNamedFloatingPointLiterals, + AllowReadingFromString, + // Stub generator skipped constructor + Strict, + WriteAsString, + } + + // Generated from `System.Text.Json.Serialization.JsonNumberHandlingAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonNumberHandlingAttribute : System.Text.Json.Serialization.JsonAttribute + { + public System.Text.Json.Serialization.JsonNumberHandling Handling { get => throw null; } + public JsonNumberHandlingAttribute(System.Text.Json.Serialization.JsonNumberHandling handling) => throw null; + } + + // Generated from `System.Text.Json.Serialization.JsonPropertyNameAttribute` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute + { + public JsonPropertyNameAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `System.Text.Json.Serialization.JsonStringEnumConverter` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory + { + public override bool CanConvert(System.Type typeToConvert) => throw null; + public override System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) => throw null; + public JsonStringEnumConverter(System.Text.Json.JsonNamingPolicy namingPolicy = default(System.Text.Json.JsonNamingPolicy), bool allowIntegerValues = default(bool)) => throw null; + public JsonStringEnumConverter() => throw null; + } + + // Generated from `System.Text.Json.Serialization.ReferenceHandler` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ReferenceHandler + { + public abstract System.Text.Json.Serialization.ReferenceResolver CreateResolver(); + public static System.Text.Json.Serialization.ReferenceHandler Preserve { get => throw null; } + protected ReferenceHandler() => throw null; + } + + // Generated from `System.Text.Json.Serialization.ReferenceHandler<>` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ReferenceHandler : System.Text.Json.Serialization.ReferenceHandler where T : System.Text.Json.Serialization.ReferenceResolver, new() + { + public override System.Text.Json.Serialization.ReferenceResolver CreateResolver() => throw null; + public ReferenceHandler() => throw null; + } + + // Generated from `System.Text.Json.Serialization.ReferenceResolver` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ReferenceResolver + { + public abstract void AddReference(string referenceId, object value); + public abstract string GetReference(object value, out bool alreadyExists); + protected ReferenceResolver() => throw null; + public abstract object ResolveReference(string referenceId); + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs new file mode 100644 index 000000000000..69891d14b45f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs @@ -0,0 +1,357 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Text + { + namespace RegularExpressions + { + // Generated from `System.Text.RegularExpressions.Capture` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Capture + { + internal Capture() => throw null; + public int Index { get => throw null; } + public int Length { get => throw null; } + public override string ToString() => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Text.RegularExpressions.CaptureCollection` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CaptureCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(System.Text.RegularExpressions.Capture item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + bool System.Collections.Generic.ICollection.Contains(System.Text.RegularExpressions.Capture item) => throw null; + public void CopyTo(System.Text.RegularExpressions.Capture[] array, int arrayIndex) => throw null; + public void CopyTo(System.Array array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + int System.Collections.Generic.IList.IndexOf(System.Text.RegularExpressions.Capture item) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, System.Text.RegularExpressions.Capture item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public System.Text.RegularExpressions.Capture this[int i] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + System.Text.RegularExpressions.Capture System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + bool System.Collections.Generic.ICollection.Remove(System.Text.RegularExpressions.Capture item) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Text.RegularExpressions.Group` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Group : System.Text.RegularExpressions.Capture + { + public System.Text.RegularExpressions.CaptureCollection Captures { get => throw null; } + internal Group() => throw null; + public string Name { get => throw null; } + public bool Success { get => throw null; } + public static System.Text.RegularExpressions.Group Synchronized(System.Text.RegularExpressions.Group inner) => throw null; + } + + // Generated from `System.Text.RegularExpressions.GroupCollection` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GroupCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(System.Text.RegularExpressions.Group item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + bool System.Collections.Generic.ICollection.Contains(System.Text.RegularExpressions.Group item) => throw null; + public bool ContainsKey(string key) => throw null; + public void CopyTo(System.Text.RegularExpressions.Group[] array, int arrayIndex) => throw null; + public void CopyTo(System.Array array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + int System.Collections.Generic.IList.IndexOf(System.Text.RegularExpressions.Group item) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, System.Text.RegularExpressions.Group item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public System.Text.RegularExpressions.Group this[string groupname] { get => throw null; } + public System.Text.RegularExpressions.Group this[int groupnum] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + System.Text.RegularExpressions.Group System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Keys { get => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + bool System.Collections.Generic.ICollection.Remove(System.Text.RegularExpressions.Group item) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public object SyncRoot { get => throw null; } + public bool TryGetValue(string key, out System.Text.RegularExpressions.Group value) => throw null; + public System.Collections.Generic.IEnumerable Values { get => throw null; } + } + + // Generated from `System.Text.RegularExpressions.Match` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Match : System.Text.RegularExpressions.Group + { + public static System.Text.RegularExpressions.Match Empty { get => throw null; } + public virtual System.Text.RegularExpressions.GroupCollection Groups { get => throw null; } + public System.Text.RegularExpressions.Match NextMatch() => throw null; + public virtual string Result(string replacement) => throw null; + public static System.Text.RegularExpressions.Match Synchronized(System.Text.RegularExpressions.Match inner) => throw null; + } + + // Generated from `System.Text.RegularExpressions.MatchCollection` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class MatchCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(System.Text.RegularExpressions.Match item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + bool System.Collections.Generic.ICollection.Contains(System.Text.RegularExpressions.Match item) => throw null; + public void CopyTo(System.Text.RegularExpressions.Match[] array, int arrayIndex) => throw null; + public void CopyTo(System.Array array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + int System.Collections.Generic.IList.IndexOf(System.Text.RegularExpressions.Match item) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, System.Text.RegularExpressions.Match item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public virtual System.Text.RegularExpressions.Match this[int i] { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + System.Text.RegularExpressions.Match System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + void System.Collections.IList.Remove(object value) => throw null; + bool System.Collections.Generic.ICollection.Remove(System.Text.RegularExpressions.Match item) => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Text.RegularExpressions.MatchEvaluator` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate string MatchEvaluator(System.Text.RegularExpressions.Match match); + + // Generated from `System.Text.RegularExpressions.Regex` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Regex : System.Runtime.Serialization.ISerializable + { + public static int CacheSize { get => throw null; set => throw null; } + protected System.Collections.IDictionary CapNames { get => throw null; set => throw null; } + protected System.Collections.IDictionary Caps { get => throw null; set => throw null; } + public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[] attributes, string resourceFile) => throw null; + public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[] attributes) => throw null; + public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname) => throw null; + public static string Escape(string str) => throw null; + public string[] GetGroupNames() => throw null; + public int[] GetGroupNumbers() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null; + public string GroupNameFromNumber(int i) => throw null; + public int GroupNumberFromName(string name) => throw null; + public static System.TimeSpan InfiniteMatchTimeout; + protected void InitializeReferences() => throw null; + public static bool IsMatch(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static bool IsMatch(string input, string pattern, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static bool IsMatch(string input, string pattern) => throw null; + public bool IsMatch(string input, int startat) => throw null; + public bool IsMatch(string input) => throw null; + public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static System.Text.RegularExpressions.Match Match(string input, string pattern, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static System.Text.RegularExpressions.Match Match(string input, string pattern) => throw null; + public System.Text.RegularExpressions.Match Match(string input, int startat) => throw null; + public System.Text.RegularExpressions.Match Match(string input, int beginning, int length) => throw null; + public System.Text.RegularExpressions.Match Match(string input) => throw null; + public System.TimeSpan MatchTimeout { get => throw null; } + public static System.Text.RegularExpressions.MatchCollection Matches(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static System.Text.RegularExpressions.MatchCollection Matches(string input, string pattern, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static System.Text.RegularExpressions.MatchCollection Matches(string input, string pattern) => throw null; + public System.Text.RegularExpressions.MatchCollection Matches(string input, int startat) => throw null; + public System.Text.RegularExpressions.MatchCollection Matches(string input) => throw null; + public System.Text.RegularExpressions.RegexOptions Options { get => throw null; } + public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public Regex(string pattern, System.Text.RegularExpressions.RegexOptions options) => throw null; + public Regex(string pattern) => throw null; + protected Regex(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected Regex() => throw null; + public string Replace(string input, string replacement, int count, int startat) => throw null; + public string Replace(string input, string replacement, int count) => throw null; + public string Replace(string input, string replacement) => throw null; + public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator, int count, int startat) => throw null; + public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator, int count) => throw null; + public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator) => throw null; + public static string Replace(string input, string pattern, string replacement, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static string Replace(string input, string pattern, string replacement, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static string Replace(string input, string pattern, string replacement) => throw null; + public static string Replace(string input, string pattern, System.Text.RegularExpressions.MatchEvaluator evaluator, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static string Replace(string input, string pattern, System.Text.RegularExpressions.MatchEvaluator evaluator, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static string Replace(string input, string pattern, System.Text.RegularExpressions.MatchEvaluator evaluator) => throw null; + public bool RightToLeft { get => throw null; } + public string[] Split(string input, int count, int startat) => throw null; + public string[] Split(string input, int count) => throw null; + public string[] Split(string input) => throw null; + public static string[] Split(string input, string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout) => throw null; + public static string[] Split(string input, string pattern, System.Text.RegularExpressions.RegexOptions options) => throw null; + public static string[] Split(string input, string pattern) => throw null; + public override string ToString() => throw null; + public static string Unescape(string str) => throw null; + protected bool UseOptionC() => throw null; + protected internal bool UseOptionR() => throw null; + protected internal static void ValidateMatchTimeout(System.TimeSpan matchTimeout) => throw null; + protected internal System.Collections.Hashtable capnames; + protected internal System.Collections.Hashtable caps; + protected internal int capsize; + protected internal string[] capslist; + protected internal System.Text.RegularExpressions.RegexRunnerFactory factory; + protected internal System.TimeSpan internalMatchTimeout; + protected internal string pattern; + protected internal System.Text.RegularExpressions.RegexOptions roptions; + } + + // Generated from `System.Text.RegularExpressions.RegexCompilationInfo` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegexCompilationInfo + { + public bool IsPublic { get => throw null; set => throw null; } + public System.TimeSpan MatchTimeout { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public System.Text.RegularExpressions.RegexOptions Options { get => throw null; set => throw null; } + public string Pattern { get => throw null; set => throw null; } + public RegexCompilationInfo(string pattern, System.Text.RegularExpressions.RegexOptions options, string name, string fullnamespace, bool ispublic, System.TimeSpan matchTimeout) => throw null; + public RegexCompilationInfo(string pattern, System.Text.RegularExpressions.RegexOptions options, string name, string fullnamespace, bool ispublic) => throw null; + } + + // Generated from `System.Text.RegularExpressions.RegexMatchTimeoutException` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegexMatchTimeoutException : System.TimeoutException, System.Runtime.Serialization.ISerializable + { + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string Input { get => throw null; } + public System.TimeSpan MatchTimeout { get => throw null; } + public string Pattern { get => throw null; } + public RegexMatchTimeoutException(string regexInput, string regexPattern, System.TimeSpan matchTimeout) => throw null; + public RegexMatchTimeoutException(string message, System.Exception inner) => throw null; + public RegexMatchTimeoutException(string message) => throw null; + public RegexMatchTimeoutException() => throw null; + protected RegexMatchTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Text.RegularExpressions.RegexOptions` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum RegexOptions + { + Compiled, + CultureInvariant, + ECMAScript, + ExplicitCapture, + IgnoreCase, + IgnorePatternWhitespace, + Multiline, + None, + // Stub generator skipped constructor + RightToLeft, + Singleline, + } + + // Generated from `System.Text.RegularExpressions.RegexParseError` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum RegexParseError + { + AlternationHasComment, + AlternationHasMalformedCondition, + AlternationHasMalformedReference, + AlternationHasNamedCapture, + AlternationHasTooManyConditions, + AlternationHasUndefinedReference, + CaptureGroupNameInvalid, + CaptureGroupOfZero, + ExclusionGroupNotLast, + InsufficientClosingParentheses, + InsufficientOpeningParentheses, + InsufficientOrInvalidHexDigits, + InvalidGroupingConstruct, + InvalidUnicodePropertyEscape, + MalformedNamedReference, + MalformedUnicodePropertyEscape, + MissingControlCharacter, + NestedQuantifiersNotParenthesized, + QuantifierAfterNothing, + QuantifierOrCaptureGroupOutOfRange, + // Stub generator skipped constructor + ReversedCharacterRange, + ReversedQuantifierRange, + ShorthandClassInCharacterRange, + UndefinedNamedReference, + UndefinedNumberedReference, + UnescapedEndingBackslash, + Unknown, + UnrecognizedControlCharacter, + UnrecognizedEscape, + UnrecognizedUnicodeProperty, + UnterminatedBracket, + UnterminatedComment, + } + + // Generated from `System.Text.RegularExpressions.RegexParseException` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegexParseException : System.ArgumentException + { + public System.Text.RegularExpressions.RegexParseError Error { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int Offset { get => throw null; } + } + + // Generated from `System.Text.RegularExpressions.RegexRunner` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class RegexRunner + { + protected void Capture(int capnum, int start, int end) => throw null; + protected static bool CharInClass(System.Char ch, string charClass) => throw null; + protected static bool CharInSet(System.Char ch, string set, string category) => throw null; + protected void CheckTimeout() => throw null; + protected void Crawl(int i) => throw null; + protected int Crawlpos() => throw null; + protected void DoubleCrawl() => throw null; + protected void DoubleStack() => throw null; + protected void DoubleTrack() => throw null; + protected void EnsureStorage() => throw null; + protected abstract bool FindFirstChar(); + protected abstract void Go(); + protected abstract void InitTrackCount(); + protected bool IsBoundary(int index, int startpos, int endpos) => throw null; + protected bool IsECMABoundary(int index, int startpos, int endpos) => throw null; + protected bool IsMatched(int cap) => throw null; + protected int MatchIndex(int cap) => throw null; + protected int MatchLength(int cap) => throw null; + protected int Popcrawl() => throw null; + protected internal RegexRunner() => throw null; + protected internal System.Text.RegularExpressions.Match Scan(System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, System.TimeSpan timeout) => throw null; + protected internal System.Text.RegularExpressions.Match Scan(System.Text.RegularExpressions.Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick) => throw null; + protected void TransferCapture(int capnum, int uncapnum, int start, int end) => throw null; + protected void Uncapture() => throw null; + protected internal int[] runcrawl; + protected internal int runcrawlpos; + protected internal System.Text.RegularExpressions.Match runmatch; + protected internal System.Text.RegularExpressions.Regex runregex; + protected internal int[] runstack; + protected internal int runstackpos; + protected internal string runtext; + protected internal int runtextbeg; + protected internal int runtextend; + protected internal int runtextpos; + protected internal int runtextstart; + protected internal int[] runtrack; + protected internal int runtrackcount; + protected internal int runtrackpos; + } + + // Generated from `System.Text.RegularExpressions.RegexRunnerFactory` in `System.Text.RegularExpressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class RegexRunnerFactory + { + protected internal abstract System.Text.RegularExpressions.RegexRunner CreateInstance(); + protected RegexRunnerFactory() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs new file mode 100644 index 000000000000..25e341f1ff54 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs @@ -0,0 +1,103 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Threading + { + namespace Channels + { + // Generated from `System.Threading.Channels.BoundedChannelFullMode` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum BoundedChannelFullMode + { + // Stub generator skipped constructor + DropNewest, + DropOldest, + DropWrite, + Wait, + } + + // Generated from `System.Threading.Channels.BoundedChannelOptions` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class BoundedChannelOptions : System.Threading.Channels.ChannelOptions + { + public BoundedChannelOptions(int capacity) => throw null; + public int Capacity { get => throw null; set => throw null; } + public System.Threading.Channels.BoundedChannelFullMode FullMode { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.Channels.Channel` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class Channel + { + public static System.Threading.Channels.Channel CreateBounded(int capacity) => throw null; + public static System.Threading.Channels.Channel CreateBounded(System.Threading.Channels.BoundedChannelOptions options) => throw null; + public static System.Threading.Channels.Channel CreateUnbounded(System.Threading.Channels.UnboundedChannelOptions options) => throw null; + public static System.Threading.Channels.Channel CreateUnbounded() => throw null; + } + + // Generated from `System.Threading.Channels.Channel<,>` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Channel + { + protected Channel() => throw null; + public System.Threading.Channels.ChannelReader Reader { get => throw null; set => throw null; } + public System.Threading.Channels.ChannelWriter Writer { get => throw null; set => throw null; } + // Stub generator skipped operator: implicit conversion + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Threading.Channels.Channel<>` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class Channel : System.Threading.Channels.Channel + { + protected Channel() => throw null; + } + + // Generated from `System.Threading.Channels.ChannelClosedException` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ChannelClosedException : System.InvalidOperationException + { + public ChannelClosedException(string message, System.Exception innerException) => throw null; + public ChannelClosedException(string message) => throw null; + public ChannelClosedException(System.Exception innerException) => throw null; + public ChannelClosedException() => throw null; + protected ChannelClosedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.Channels.ChannelOptions` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ChannelOptions + { + public bool AllowSynchronousContinuations { get => throw null; set => throw null; } + protected ChannelOptions() => throw null; + public bool SingleReader { get => throw null; set => throw null; } + public bool SingleWriter { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.Channels.ChannelReader<>` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ChannelReader + { + public virtual bool CanCount { get => throw null; } + protected ChannelReader() => throw null; + public virtual System.Threading.Tasks.Task Completion { get => throw null; } + public virtual int Count { get => throw null; } + public virtual System.Collections.Generic.IAsyncEnumerable ReadAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public abstract bool TryRead(out T item); + public abstract System.Threading.Tasks.ValueTask WaitToReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `System.Threading.Channels.ChannelWriter<>` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ChannelWriter + { + protected ChannelWriter() => throw null; + public void Complete(System.Exception error = default(System.Exception)) => throw null; + public virtual bool TryComplete(System.Exception error = default(System.Exception)) => throw null; + public abstract bool TryWrite(T item); + public abstract System.Threading.Tasks.ValueTask WaitToWriteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public virtual System.Threading.Tasks.ValueTask WriteAsync(T item, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `System.Threading.Channels.UnboundedChannelOptions` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UnboundedChannelOptions : System.Threading.Channels.ChannelOptions + { + public UnboundedChannelOptions() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs new file mode 100644 index 000000000000..51233a7a2f64 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs @@ -0,0 +1,61 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Threading + { + // Generated from `System.Threading.IOCompletionCallback` in `System.Threading.Overlapped, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + unsafe public delegate void IOCompletionCallback(System.UInt32 errorCode, System.UInt32 numBytes, System.Threading.NativeOverlapped* pOVERLAP); + + // Generated from `System.Threading.NativeOverlapped` in `System.Threading.Overlapped, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct NativeOverlapped + { + public System.IntPtr EventHandle; + public System.IntPtr InternalHigh; + public System.IntPtr InternalLow; + // Stub generator skipped constructor + public int OffsetHigh; + public int OffsetLow; + } + + // Generated from `System.Threading.Overlapped` in `System.Threading.Overlapped, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Overlapped + { + public System.IAsyncResult AsyncResult { get => throw null; set => throw null; } + public int EventHandle { get => throw null; set => throw null; } + public System.IntPtr EventHandleIntPtr { get => throw null; set => throw null; } + unsafe public static void Free(System.Threading.NativeOverlapped* nativeOverlappedPtr) => throw null; + public int OffsetHigh { get => throw null; set => throw null; } + public int OffsetLow { get => throw null; set => throw null; } + public Overlapped(int offsetLo, int offsetHi, int hEvent, System.IAsyncResult ar) => throw null; + public Overlapped(int offsetLo, int offsetHi, System.IntPtr hEvent, System.IAsyncResult ar) => throw null; + public Overlapped() => throw null; + unsafe public System.Threading.NativeOverlapped* Pack(System.Threading.IOCompletionCallback iocb, object userData) => throw null; + unsafe public System.Threading.NativeOverlapped* Pack(System.Threading.IOCompletionCallback iocb) => throw null; + unsafe public static System.Threading.Overlapped Unpack(System.Threading.NativeOverlapped* nativeOverlappedPtr) => throw null; + unsafe public System.Threading.NativeOverlapped* UnsafePack(System.Threading.IOCompletionCallback iocb, object userData) => throw null; + unsafe public System.Threading.NativeOverlapped* UnsafePack(System.Threading.IOCompletionCallback iocb) => throw null; + } + + // Generated from `System.Threading.PreAllocatedOverlapped` in `System.Threading.Overlapped, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class PreAllocatedOverlapped : System.IDisposable + { + public void Dispose() => throw null; + public PreAllocatedOverlapped(System.Threading.IOCompletionCallback callback, object state, object pinData) => throw null; + // ERR: Stub generator didn't handle member: ~PreAllocatedOverlapped + } + + // Generated from `System.Threading.ThreadPoolBoundHandle` in `System.Threading.Overlapped, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadPoolBoundHandle : System.IDisposable + { + unsafe public System.Threading.NativeOverlapped* AllocateNativeOverlapped(System.Threading.PreAllocatedOverlapped preAllocated) => throw null; + unsafe public System.Threading.NativeOverlapped* AllocateNativeOverlapped(System.Threading.IOCompletionCallback callback, object state, object pinData) => throw null; + public static System.Threading.ThreadPoolBoundHandle BindHandle(System.Runtime.InteropServices.SafeHandle handle) => throw null; + public void Dispose() => throw null; + unsafe public void FreeNativeOverlapped(System.Threading.NativeOverlapped* overlapped) => throw null; + unsafe public static object GetNativeOverlappedState(System.Threading.NativeOverlapped* overlapped) => throw null; + public System.Runtime.InteropServices.SafeHandle Handle { get => throw null; } + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs new file mode 100644 index 000000000000..f4daca6105e4 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs @@ -0,0 +1,398 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DisallowNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MaybeNullWhenAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'MemberNotNullWhenAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullIfNotNullAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. */ + + } + } + namespace Threading + { + namespace Tasks + { + namespace Dataflow + { + // Generated from `System.Threading.Tasks.Dataflow.ActionBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ActionBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public ActionBlock(System.Func action, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public ActionBlock(System.Func action) => throw null; + public ActionBlock(System.Action action, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public ActionBlock(System.Action action) => throw null; + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public int InputCount { get => throw null; } + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, TInput messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + public bool Post(TInput item) => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.BatchBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BatchBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public BatchBlock(int batchSize, System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions) => throw null; + public BatchBlock(int batchSize) => throw null; + public int BatchSize { get => throw null; } + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + T[] System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, T messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public void TriggerBatch() => throw null; + public bool TryReceive(System.Predicate filter, out T[] item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.BatchedJoinBlock<,,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BatchedJoinBlock : System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>>, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>>, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public int BatchSize { get => throw null; } + public BatchedJoinBlock(int batchSize, System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions) => throw null; + public BatchedJoinBlock(int batchSize) => throw null; + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + System.Tuple, System.Collections.Generic.IList, System.Collections.Generic.IList> System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>>.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>> target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>>.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>> target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>>.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList, System.Collections.Generic.IList>> target) => throw null; + public System.Threading.Tasks.Dataflow.ITargetBlock Target1 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target2 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target3 { get => throw null; } + public override string ToString() => throw null; + public bool TryReceive(System.Predicate, System.Collections.Generic.IList, System.Collections.Generic.IList>> filter, out System.Tuple, System.Collections.Generic.IList, System.Collections.Generic.IList> item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList, System.Collections.Generic.IList, System.Collections.Generic.IList>> items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.BatchedJoinBlock<,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BatchedJoinBlock : System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList>>, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Collections.Generic.IList>>, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public int BatchSize { get => throw null; } + public BatchedJoinBlock(int batchSize, System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions) => throw null; + public BatchedJoinBlock(int batchSize) => throw null; + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + System.Tuple, System.Collections.Generic.IList> System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList>>.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList>> target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList>> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList>>.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList>> target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock, System.Collections.Generic.IList>>.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock, System.Collections.Generic.IList>> target) => throw null; + public System.Threading.Tasks.Dataflow.ITargetBlock Target1 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target2 { get => throw null; } + public override string ToString() => throw null; + public bool TryReceive(System.Predicate, System.Collections.Generic.IList>> filter, out System.Tuple, System.Collections.Generic.IList> item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList, System.Collections.Generic.IList>> items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.BroadcastBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BroadcastBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public BroadcastBlock(System.Func cloningFunction, System.Threading.Tasks.Dataflow.DataflowBlockOptions dataflowBlockOptions) => throw null; + public BroadcastBlock(System.Func cloningFunction) => throw null; + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + T System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, T messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public bool TryReceive(System.Predicate filter, out T item) => throw null; + bool System.Threading.Tasks.Dataflow.IReceivableSourceBlock.TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.BufferBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BufferBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public BufferBlock(System.Threading.Tasks.Dataflow.DataflowBlockOptions dataflowBlockOptions) => throw null; + public BufferBlock() => throw null; + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + T System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + public int Count { get => throw null; } + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, T messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public bool TryReceive(System.Predicate filter, out T item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.DataflowBlock` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class DataflowBlock + { + public static System.IObservable AsObservable(this System.Threading.Tasks.Dataflow.ISourceBlock source) => throw null; + public static System.IObserver AsObserver(this System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public static System.Threading.Tasks.Task Choose(System.Threading.Tasks.Dataflow.ISourceBlock source1, System.Action action1, System.Threading.Tasks.Dataflow.ISourceBlock source2, System.Action action2, System.Threading.Tasks.Dataflow.DataflowBlockOptions dataflowBlockOptions) => throw null; + public static System.Threading.Tasks.Task Choose(System.Threading.Tasks.Dataflow.ISourceBlock source1, System.Action action1, System.Threading.Tasks.Dataflow.ISourceBlock source2, System.Action action2) => throw null; + public static System.Threading.Tasks.Task Choose(System.Threading.Tasks.Dataflow.ISourceBlock source1, System.Action action1, System.Threading.Tasks.Dataflow.ISourceBlock source2, System.Action action2, System.Threading.Tasks.Dataflow.ISourceBlock source3, System.Action action3, System.Threading.Tasks.Dataflow.DataflowBlockOptions dataflowBlockOptions) => throw null; + public static System.Threading.Tasks.Task Choose(System.Threading.Tasks.Dataflow.ISourceBlock source1, System.Action action1, System.Threading.Tasks.Dataflow.ISourceBlock source2, System.Action action2, System.Threading.Tasks.Dataflow.ISourceBlock source3, System.Action action3) => throw null; + public static System.Threading.Tasks.Dataflow.IPropagatorBlock Encapsulate(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.ISourceBlock source) => throw null; + public static System.IDisposable LinkTo(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions, System.Predicate predicate) => throw null; + public static System.IDisposable LinkTo(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.Tasks.Dataflow.ITargetBlock target, System.Predicate predicate) => throw null; + public static System.IDisposable LinkTo(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public static System.Threading.Tasks.Dataflow.ITargetBlock NullTarget() => throw null; + public static System.Threading.Tasks.Task OutputAvailableAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task OutputAvailableAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source) => throw null; + public static bool Post(this System.Threading.Tasks.Dataflow.ITargetBlock target, TInput item) => throw null; + public static TOutput Receive(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static TOutput Receive(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.TimeSpan timeout) => throw null; + public static TOutput Receive(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.CancellationToken cancellationToken) => throw null; + public static TOutput Receive(this System.Threading.Tasks.Dataflow.ISourceBlock source) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.TimeSpan timeout) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task ReceiveAsync(this System.Threading.Tasks.Dataflow.ISourceBlock source) => throw null; + public static System.Threading.Tasks.Task SendAsync(this System.Threading.Tasks.Dataflow.ITargetBlock target, TInput item, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task SendAsync(this System.Threading.Tasks.Dataflow.ITargetBlock target, TInput item) => throw null; + public static bool TryReceive(this System.Threading.Tasks.Dataflow.IReceivableSourceBlock source, out TOutput item) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.DataflowBlockOptions` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataflowBlockOptions + { + public int BoundedCapacity { get => throw null; set => throw null; } + public System.Threading.CancellationToken CancellationToken { get => throw null; set => throw null; } + public DataflowBlockOptions() => throw null; + public bool EnsureOrdered { get => throw null; set => throw null; } + public int MaxMessagesPerTask { get => throw null; set => throw null; } + public string NameFormat { get => throw null; set => throw null; } + public System.Threading.Tasks.TaskScheduler TaskScheduler { get => throw null; set => throw null; } + public const int Unbounded = default; + } + + // Generated from `System.Threading.Tasks.Dataflow.DataflowLinkOptions` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class DataflowLinkOptions + { + public bool Append { get => throw null; set => throw null; } + public DataflowLinkOptions() => throw null; + public int MaxMessages { get => throw null; set => throw null; } + public bool PropagateCompletion { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.Tasks.Dataflow.DataflowMessageHeader` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct DataflowMessageHeader : System.IEquatable + { + public static bool operator !=(System.Threading.Tasks.Dataflow.DataflowMessageHeader left, System.Threading.Tasks.Dataflow.DataflowMessageHeader right) => throw null; + public static bool operator ==(System.Threading.Tasks.Dataflow.DataflowMessageHeader left, System.Threading.Tasks.Dataflow.DataflowMessageHeader right) => throw null; + public DataflowMessageHeader(System.Int64 id) => throw null; + // Stub generator skipped constructor + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.Tasks.Dataflow.DataflowMessageHeader other) => throw null; + public override int GetHashCode() => throw null; + public System.Int64 Id { get => throw null; } + public bool IsValid { get => throw null; } + } + + // Generated from `System.Threading.Tasks.Dataflow.DataflowMessageStatus` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataflowMessageStatus + { + Accepted, + // Stub generator skipped constructor + Declined, + DecliningPermanently, + NotAvailable, + Postponed, + } + + // Generated from `System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExecutionDataflowBlockOptions : System.Threading.Tasks.Dataflow.DataflowBlockOptions + { + public ExecutionDataflowBlockOptions() => throw null; + public int MaxDegreeOfParallelism { get => throw null; set => throw null; } + public bool SingleProducerConstrained { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class GroupingDataflowBlockOptions : System.Threading.Tasks.Dataflow.DataflowBlockOptions + { + public bool Greedy { get => throw null; set => throw null; } + public GroupingDataflowBlockOptions() => throw null; + public System.Int64 MaxNumberOfGroups { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.Tasks.Dataflow.IDataflowBlock` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IDataflowBlock + { + void Complete(); + System.Threading.Tasks.Task Completion { get; } + void Fault(System.Exception exception); + } + + // Generated from `System.Threading.Tasks.Dataflow.IPropagatorBlock<,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IPropagatorBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + } + + // Generated from `System.Threading.Tasks.Dataflow.IReceivableSourceBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IReceivableSourceBlock : System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + bool TryReceive(System.Predicate filter, out TOutput item); + bool TryReceiveAll(out System.Collections.Generic.IList items); + } + + // Generated from `System.Threading.Tasks.Dataflow.ISourceBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ISourceBlock : System.Threading.Tasks.Dataflow.IDataflowBlock + { + TOutput ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed); + System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions); + void ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target); + bool ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target); + } + + // Generated from `System.Threading.Tasks.Dataflow.ITargetBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface ITargetBlock : System.Threading.Tasks.Dataflow.IDataflowBlock + { + System.Threading.Tasks.Dataflow.DataflowMessageStatus OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, TInput messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept); + } + + // Generated from `System.Threading.Tasks.Dataflow.JoinBlock<,,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class JoinBlock : System.Threading.Tasks.Dataflow.ISourceBlock>, System.Threading.Tasks.Dataflow.IReceivableSourceBlock>, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + System.Tuple System.Threading.Tasks.Dataflow.ISourceBlock>.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public JoinBlock(System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions) => throw null; + public JoinBlock() => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock>.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock>.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target) => throw null; + public System.Threading.Tasks.Dataflow.ITargetBlock Target1 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target2 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target3 { get => throw null; } + public override string ToString() => throw null; + public bool TryReceive(System.Predicate> filter, out System.Tuple item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList> items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.JoinBlock<,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class JoinBlock : System.Threading.Tasks.Dataflow.ISourceBlock>, System.Threading.Tasks.Dataflow.IReceivableSourceBlock>, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + System.Tuple System.Threading.Tasks.Dataflow.ISourceBlock>.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public JoinBlock(System.Threading.Tasks.Dataflow.GroupingDataflowBlockOptions dataflowBlockOptions) => throw null; + public JoinBlock() => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock> target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock>.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock>.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock> target) => throw null; + public System.Threading.Tasks.Dataflow.ITargetBlock Target1 { get => throw null; } + public System.Threading.Tasks.Dataflow.ITargetBlock Target2 { get => throw null; } + public override string ToString() => throw null; + public bool TryReceive(System.Predicate> filter, out System.Tuple item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList> items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.TransformBlock<,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TransformBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + TOutput System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public int InputCount { get => throw null; } + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, TInput messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public TransformBlock(System.Func transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public TransformBlock(System.Func transform) => throw null; + public TransformBlock(System.Func> transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public TransformBlock(System.Func> transform) => throw null; + public bool TryReceive(System.Predicate filter, out TOutput item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.TransformManyBlock<,>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class TransformManyBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + TOutput System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public int InputCount { get => throw null; } + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, TInput messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + public int OutputCount { get => throw null; } + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public TransformManyBlock(System.Func>> transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public TransformManyBlock(System.Func>> transform) => throw null; + public TransformManyBlock(System.Func> transform, System.Threading.Tasks.Dataflow.ExecutionDataflowBlockOptions dataflowBlockOptions) => throw null; + public TransformManyBlock(System.Func> transform) => throw null; + public bool TryReceive(System.Predicate filter, out TOutput item) => throw null; + public bool TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + } + + // Generated from `System.Threading.Tasks.Dataflow.WriteOnceBlock<>` in `System.Threading.Tasks.Dataflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WriteOnceBlock : System.Threading.Tasks.Dataflow.ITargetBlock, System.Threading.Tasks.Dataflow.ISourceBlock, System.Threading.Tasks.Dataflow.IReceivableSourceBlock, System.Threading.Tasks.Dataflow.IPropagatorBlock, System.Threading.Tasks.Dataflow.IDataflowBlock + { + public void Complete() => throw null; + public System.Threading.Tasks.Task Completion { get => throw null; } + T System.Threading.Tasks.Dataflow.ISourceBlock.ConsumeMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target, out bool messageConsumed) => throw null; + void System.Threading.Tasks.Dataflow.IDataflowBlock.Fault(System.Exception exception) => throw null; + public System.IDisposable LinkTo(System.Threading.Tasks.Dataflow.ITargetBlock target, System.Threading.Tasks.Dataflow.DataflowLinkOptions linkOptions) => throw null; + System.Threading.Tasks.Dataflow.DataflowMessageStatus System.Threading.Tasks.Dataflow.ITargetBlock.OfferMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, T messageValue, System.Threading.Tasks.Dataflow.ISourceBlock source, bool consumeToAccept) => throw null; + void System.Threading.Tasks.Dataflow.ISourceBlock.ReleaseReservation(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + bool System.Threading.Tasks.Dataflow.ISourceBlock.ReserveMessage(System.Threading.Tasks.Dataflow.DataflowMessageHeader messageHeader, System.Threading.Tasks.Dataflow.ITargetBlock target) => throw null; + public override string ToString() => throw null; + public bool TryReceive(System.Predicate filter, out T item) => throw null; + bool System.Threading.Tasks.Dataflow.IReceivableSourceBlock.TryReceiveAll(out System.Collections.Generic.IList items) => throw null; + public WriteOnceBlock(System.Func cloningFunction, System.Threading.Tasks.Dataflow.DataflowBlockOptions dataflowBlockOptions) => throw null; + public WriteOnceBlock(System.Func cloningFunction) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs new file mode 100644 index 000000000000..482d8db0e023 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs @@ -0,0 +1,78 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Threading + { + namespace Tasks + { + // Generated from `System.Threading.Tasks.Parallel` in `System.Threading.Tasks.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Parallel + { + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(int fromInclusive, int toExclusive, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult For(System.Int64 fromInclusive, System.Int64 toExclusive, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.OrderablePartitioner source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.OrderablePartitioner source, System.Action body) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Generic.IEnumerable source, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.Partitioner source, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.OrderablePartitioner source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static System.Threading.Tasks.ParallelLoopResult ForEach(System.Collections.Concurrent.OrderablePartitioner source, System.Func localInit, System.Func body, System.Action localFinally) => throw null; + public static void Invoke(params System.Action[] actions) => throw null; + public static void Invoke(System.Threading.Tasks.ParallelOptions parallelOptions, params System.Action[] actions) => throw null; + } + + // Generated from `System.Threading.Tasks.ParallelLoopResult` in `System.Threading.Tasks.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct ParallelLoopResult + { + public bool IsCompleted { get => throw null; } + public System.Int64? LowestBreakIteration { get => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Threading.Tasks.ParallelLoopState` in `System.Threading.Tasks.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParallelLoopState + { + public void Break() => throw null; + public bool IsExceptional { get => throw null; } + public bool IsStopped { get => throw null; } + public System.Int64? LowestBreakIteration { get => throw null; } + public bool ShouldExitCurrentIteration { get => throw null; } + public void Stop() => throw null; + } + + // Generated from `System.Threading.Tasks.ParallelOptions` in `System.Threading.Tasks.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ParallelOptions + { + public System.Threading.CancellationToken CancellationToken { get => throw null; set => throw null; } + public int MaxDegreeOfParallelism { get => throw null; set => throw null; } + public ParallelOptions() => throw null; + public System.Threading.Tasks.TaskScheduler TaskScheduler { get => throw null; set => throw null; } + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs new file mode 100644 index 000000000000..16bcb08d5ab8 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs @@ -0,0 +1,191 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.LocalDataStoreSlot` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LocalDataStoreSlot + { + // ERR: Stub generator didn't handle member: ~LocalDataStoreSlot + } + + namespace Threading + { + // Generated from `System.Threading.ApartmentState` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ApartmentState + { + // Stub generator skipped constructor + MTA, + STA, + Unknown, + } + + // Generated from `System.Threading.CompressedStack` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CompressedStack : System.Runtime.Serialization.ISerializable + { + public static System.Threading.CompressedStack Capture() => throw null; + public System.Threading.CompressedStack CreateCopy() => throw null; + public static System.Threading.CompressedStack GetCompressedStack() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static void Run(System.Threading.CompressedStack compressedStack, System.Threading.ContextCallback callback, object state) => throw null; + } + + // Generated from `System.Threading.ParameterizedThreadStart` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ParameterizedThreadStart(object obj); + + // Generated from `System.Threading.Thread` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Thread : System.Runtime.ConstrainedExecution.CriticalFinalizerObject + { + public void Abort(object stateInfo) => throw null; + public void Abort() => throw null; + public static System.LocalDataStoreSlot AllocateDataSlot() => throw null; + public static System.LocalDataStoreSlot AllocateNamedDataSlot(string name) => throw null; + public System.Threading.ApartmentState ApartmentState { get => throw null; set => throw null; } + public static void BeginCriticalRegion() => throw null; + public static void BeginThreadAffinity() => throw null; + public System.Globalization.CultureInfo CurrentCulture { get => throw null; set => throw null; } + public static System.Security.Principal.IPrincipal CurrentPrincipal { get => throw null; set => throw null; } + public static System.Threading.Thread CurrentThread { get => throw null; } + public System.Globalization.CultureInfo CurrentUICulture { get => throw null; set => throw null; } + public void DisableComObjectEagerCleanup() => throw null; + public static void EndCriticalRegion() => throw null; + public static void EndThreadAffinity() => throw null; + public System.Threading.ExecutionContext ExecutionContext { get => throw null; } + public static void FreeNamedDataSlot(string name) => throw null; + public System.Threading.ApartmentState GetApartmentState() => throw null; + public System.Threading.CompressedStack GetCompressedStack() => throw null; + public static int GetCurrentProcessorId() => throw null; + public static object GetData(System.LocalDataStoreSlot slot) => throw null; + public static System.AppDomain GetDomain() => throw null; + public static int GetDomainID() => throw null; + public override int GetHashCode() => throw null; + public static System.LocalDataStoreSlot GetNamedDataSlot(string name) => throw null; + public void Interrupt() => throw null; + public bool IsAlive { get => throw null; } + public bool IsBackground { get => throw null; set => throw null; } + public bool IsThreadPoolThread { get => throw null; } + public void Join() => throw null; + public bool Join(int millisecondsTimeout) => throw null; + public bool Join(System.TimeSpan timeout) => throw null; + public int ManagedThreadId { get => throw null; } + public static void MemoryBarrier() => throw null; + public string Name { get => throw null; set => throw null; } + public System.Threading.ThreadPriority Priority { get => throw null; set => throw null; } + public static void ResetAbort() => throw null; + public void Resume() => throw null; + public void SetApartmentState(System.Threading.ApartmentState state) => throw null; + public void SetCompressedStack(System.Threading.CompressedStack stack) => throw null; + public static void SetData(System.LocalDataStoreSlot slot, object data) => throw null; + public static void Sleep(int millisecondsTimeout) => throw null; + public static void Sleep(System.TimeSpan timeout) => throw null; + public static void SpinWait(int iterations) => throw null; + public void Start(object parameter) => throw null; + public void Start() => throw null; + public void Suspend() => throw null; + public Thread(System.Threading.ThreadStart start, int maxStackSize) => throw null; + public Thread(System.Threading.ThreadStart start) => throw null; + public Thread(System.Threading.ParameterizedThreadStart start, int maxStackSize) => throw null; + public Thread(System.Threading.ParameterizedThreadStart start) => throw null; + public System.Threading.ThreadState ThreadState { get => throw null; } + public bool TrySetApartmentState(System.Threading.ApartmentState state) => throw null; + public static object VolatileRead(ref object address) => throw null; + public static int VolatileRead(ref int address) => throw null; + public static float VolatileRead(ref float address) => throw null; + public static double VolatileRead(ref double address) => throw null; + public static System.UIntPtr VolatileRead(ref System.UIntPtr address) => throw null; + public static System.UInt64 VolatileRead(ref System.UInt64 address) => throw null; + public static System.UInt32 VolatileRead(ref System.UInt32 address) => throw null; + public static System.UInt16 VolatileRead(ref System.UInt16 address) => throw null; + public static System.SByte VolatileRead(ref System.SByte address) => throw null; + public static System.IntPtr VolatileRead(ref System.IntPtr address) => throw null; + public static System.Int64 VolatileRead(ref System.Int64 address) => throw null; + public static System.Int16 VolatileRead(ref System.Int16 address) => throw null; + public static System.Byte VolatileRead(ref System.Byte address) => throw null; + public static void VolatileWrite(ref object address, object value) => throw null; + public static void VolatileWrite(ref int address, int value) => throw null; + public static void VolatileWrite(ref float address, float value) => throw null; + public static void VolatileWrite(ref double address, double value) => throw null; + public static void VolatileWrite(ref System.UIntPtr address, System.UIntPtr value) => throw null; + public static void VolatileWrite(ref System.UInt64 address, System.UInt64 value) => throw null; + public static void VolatileWrite(ref System.UInt32 address, System.UInt32 value) => throw null; + public static void VolatileWrite(ref System.UInt16 address, System.UInt16 value) => throw null; + public static void VolatileWrite(ref System.SByte address, System.SByte value) => throw null; + public static void VolatileWrite(ref System.IntPtr address, System.IntPtr value) => throw null; + public static void VolatileWrite(ref System.Int64 address, System.Int64 value) => throw null; + public static void VolatileWrite(ref System.Int16 address, System.Int16 value) => throw null; + public static void VolatileWrite(ref System.Byte address, System.Byte value) => throw null; + public static bool Yield() => throw null; + // ERR: Stub generator didn't handle member: ~Thread + } + + // Generated from `System.Threading.ThreadAbortException` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadAbortException : System.SystemException + { + public object ExceptionState { get => throw null; } + } + + // Generated from `System.Threading.ThreadExceptionEventArgs` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadExceptionEventArgs : System.EventArgs + { + public System.Exception Exception { get => throw null; } + public ThreadExceptionEventArgs(System.Exception t) => throw null; + } + + // Generated from `System.Threading.ThreadExceptionEventHandler` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ThreadExceptionEventHandler(object sender, System.Threading.ThreadExceptionEventArgs e); + + // Generated from `System.Threading.ThreadInterruptedException` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadInterruptedException : System.SystemException + { + public ThreadInterruptedException(string message, System.Exception innerException) => throw null; + public ThreadInterruptedException(string message) => throw null; + public ThreadInterruptedException() => throw null; + protected ThreadInterruptedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.ThreadPriority` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ThreadPriority + { + AboveNormal, + BelowNormal, + Highest, + Lowest, + Normal, + // Stub generator skipped constructor + } + + // Generated from `System.Threading.ThreadStart` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ThreadStart(); + + // Generated from `System.Threading.ThreadStartException` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadStartException : System.SystemException + { + } + + // Generated from `System.Threading.ThreadState` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ThreadState + { + AbortRequested, + Aborted, + Background, + Running, + StopRequested, + Stopped, + SuspendRequested, + Suspended, + // Stub generator skipped constructor + Unstarted, + WaitSleepJoin, + } + + // Generated from `System.Threading.ThreadStateException` in `System.Threading.Thread, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadStateException : System.SystemException + { + public ThreadStateException(string message, System.Exception innerException) => throw null; + public ThreadStateException(string message) => throw null; + public ThreadStateException() => throw null; + protected ThreadStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs new file mode 100644 index 000000000000..4af185ae9b3f --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs @@ -0,0 +1,56 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Threading + { + // Generated from `System.Threading.IThreadPoolWorkItem` in `System.Threading.ThreadPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IThreadPoolWorkItem + { + void Execute(); + } + + // Generated from `System.Threading.RegisteredWaitHandle` in `System.Threading.ThreadPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class RegisteredWaitHandle : System.MarshalByRefObject + { + public bool Unregister(System.Threading.WaitHandle waitObject) => throw null; + } + + // Generated from `System.Threading.ThreadPool` in `System.Threading.ThreadPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class ThreadPool + { + public static bool BindHandle(System.Runtime.InteropServices.SafeHandle osHandle) => throw null; + public static bool BindHandle(System.IntPtr osHandle) => throw null; + public static System.Int64 CompletedWorkItemCount { get => throw null; } + public static void GetAvailableThreads(out int workerThreads, out int completionPortThreads) => throw null; + public static void GetMaxThreads(out int workerThreads, out int completionPortThreads) => throw null; + public static void GetMinThreads(out int workerThreads, out int completionPortThreads) => throw null; + public static System.Int64 PendingWorkItemCount { get => throw null; } + public static bool QueueUserWorkItem(System.Action callBack, TState state, bool preferLocal) => throw null; + public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack, object state) => throw null; + public static bool QueueUserWorkItem(System.Threading.WaitCallback callBack) => throw null; + public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.UInt32 millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.TimeSpan timeout, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle RegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.Int64 millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + public static bool SetMaxThreads(int workerThreads, int completionPortThreads) => throw null; + public static bool SetMinThreads(int workerThreads, int completionPortThreads) => throw null; + public static int ThreadCount { get => throw null; } + unsafe public static bool UnsafeQueueNativeOverlapped(System.Threading.NativeOverlapped* overlapped) => throw null; + public static bool UnsafeQueueUserWorkItem(System.Action callBack, TState state, bool preferLocal) => throw null; + public static bool UnsafeQueueUserWorkItem(System.Threading.WaitCallback callBack, object state) => throw null; + public static bool UnsafeQueueUserWorkItem(System.Threading.IThreadPoolWorkItem callBack, bool preferLocal) => throw null; + public static System.Threading.RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, int millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.UInt32 millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.TimeSpan timeout, bool executeOnlyOnce) => throw null; + public static System.Threading.RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle waitObject, System.Threading.WaitOrTimerCallback callBack, object state, System.Int64 millisecondsTimeOutInterval, bool executeOnlyOnce) => throw null; + } + + // Generated from `System.Threading.WaitCallback` in `System.Threading.ThreadPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void WaitCallback(object state); + + // Generated from `System.Threading.WaitOrTimerCallback` in `System.Threading.ThreadPool, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void WaitOrTimerCallback(object state, bool timedOut); + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs new file mode 100644 index 000000000000..e352e7996a62 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs @@ -0,0 +1,535 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Threading + { + // Generated from `System.Threading.AbandonedMutexException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AbandonedMutexException : System.SystemException + { + public AbandonedMutexException(string message, int location, System.Threading.WaitHandle handle) => throw null; + public AbandonedMutexException(string message, System.Exception inner, int location, System.Threading.WaitHandle handle) => throw null; + public AbandonedMutexException(string message, System.Exception inner) => throw null; + public AbandonedMutexException(string message) => throw null; + public AbandonedMutexException(int location, System.Threading.WaitHandle handle) => throw null; + public AbandonedMutexException() => throw null; + protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Threading.Mutex Mutex { get => throw null; } + public int MutexIndex { get => throw null; } + } + + // Generated from `System.Threading.AsyncFlowControl` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncFlowControl : System.IDisposable + { + public static bool operator !=(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) => throw null; + public static bool operator ==(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) => throw null; + // Stub generator skipped constructor + public void Dispose() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.AsyncFlowControl obj) => throw null; + public override int GetHashCode() => throw null; + public void Undo() => throw null; + } + + // Generated from `System.Threading.AsyncLocal<>` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AsyncLocal + { + public AsyncLocal(System.Action> valueChangedHandler) => throw null; + public AsyncLocal() => throw null; + public T Value { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.AsyncLocalValueChangedArgs<>` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct AsyncLocalValueChangedArgs + { + // Stub generator skipped constructor + public T CurrentValue { get => throw null; } + public T PreviousValue { get => throw null; } + public bool ThreadContextChanged { get => throw null; } + } + + // Generated from `System.Threading.AutoResetEvent` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class AutoResetEvent : System.Threading.EventWaitHandle + { + public AutoResetEvent(bool initialState) : base(default(bool), default(System.Threading.EventResetMode)) => throw null; + } + + // Generated from `System.Threading.Barrier` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Barrier : System.IDisposable + { + public System.Int64 AddParticipant() => throw null; + public System.Int64 AddParticipants(int participantCount) => throw null; + public Barrier(int participantCount, System.Action postPhaseAction) => throw null; + public Barrier(int participantCount) => throw null; + public System.Int64 CurrentPhaseNumber { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public int ParticipantCount { get => throw null; } + public int ParticipantsRemaining { get => throw null; } + public void RemoveParticipant() => throw null; + public void RemoveParticipants(int participantCount) => throw null; + public void SignalAndWait(System.Threading.CancellationToken cancellationToken) => throw null; + public void SignalAndWait() => throw null; + public bool SignalAndWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool SignalAndWait(int millisecondsTimeout) => throw null; + public bool SignalAndWait(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool SignalAndWait(System.TimeSpan timeout) => throw null; + } + + // Generated from `System.Threading.BarrierPostPhaseException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class BarrierPostPhaseException : System.Exception + { + public BarrierPostPhaseException(string message, System.Exception innerException) => throw null; + public BarrierPostPhaseException(string message) => throw null; + public BarrierPostPhaseException(System.Exception innerException) => throw null; + public BarrierPostPhaseException() => throw null; + protected BarrierPostPhaseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.ContextCallback` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ContextCallback(object state); + + // Generated from `System.Threading.CountdownEvent` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CountdownEvent : System.IDisposable + { + public void AddCount(int signalCount) => throw null; + public void AddCount() => throw null; + public CountdownEvent(int initialCount) => throw null; + public int CurrentCount { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public int InitialCount { get => throw null; } + public bool IsSet { get => throw null; } + public void Reset(int count) => throw null; + public void Reset() => throw null; + public bool Signal(int signalCount) => throw null; + public bool Signal() => throw null; + public bool TryAddCount(int signalCount) => throw null; + public bool TryAddCount() => throw null; + public void Wait(System.Threading.CancellationToken cancellationToken) => throw null; + public void Wait() => throw null; + public bool Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(int millisecondsTimeout) => throw null; + public bool Wait(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(System.TimeSpan timeout) => throw null; + public System.Threading.WaitHandle WaitHandle { get => throw null; } + } + + // Generated from `System.Threading.EventResetMode` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EventResetMode + { + AutoReset, + // Stub generator skipped constructor + ManualReset, + } + + // Generated from `System.Threading.EventWaitHandle` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class EventWaitHandle : System.Threading.WaitHandle + { + public EventWaitHandle(bool initialState, System.Threading.EventResetMode mode, string name, out bool createdNew) => throw null; + public EventWaitHandle(bool initialState, System.Threading.EventResetMode mode, string name) => throw null; + public EventWaitHandle(bool initialState, System.Threading.EventResetMode mode) => throw null; + public static System.Threading.EventWaitHandle OpenExisting(string name) => throw null; + public bool Reset() => throw null; + public bool Set() => throw null; + public static bool TryOpenExisting(string name, out System.Threading.EventWaitHandle result) => throw null; + } + + // Generated from `System.Threading.ExecutionContext` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ExecutionContext : System.Runtime.Serialization.ISerializable, System.IDisposable + { + public static System.Threading.ExecutionContext Capture() => throw null; + public System.Threading.ExecutionContext CreateCopy() => throw null; + public void Dispose() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static bool IsFlowSuppressed() => throw null; + public static void Restore(System.Threading.ExecutionContext executionContext) => throw null; + public static void RestoreFlow() => throw null; + public static void Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) => throw null; + public static System.Threading.AsyncFlowControl SuppressFlow() => throw null; + } + + // Generated from `System.Threading.HostExecutionContext` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HostExecutionContext : System.IDisposable + { + public virtual System.Threading.HostExecutionContext CreateCopy() => throw null; + public void Dispose() => throw null; + public virtual void Dispose(bool disposing) => throw null; + public HostExecutionContext(object state) => throw null; + public HostExecutionContext() => throw null; + protected internal object State { get => throw null; set => throw null; } + } + + // Generated from `System.Threading.HostExecutionContextManager` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class HostExecutionContextManager + { + public virtual System.Threading.HostExecutionContext Capture() => throw null; + public HostExecutionContextManager() => throw null; + public virtual void Revert(object previousState) => throw null; + public virtual object SetHostExecutionContext(System.Threading.HostExecutionContext hostExecutionContext) => throw null; + } + + // Generated from `System.Threading.Interlocked` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Interlocked + { + public static int Add(ref int location1, int value) => throw null; + public static System.UInt64 Add(ref System.UInt64 location1, System.UInt64 value) => throw null; + public static System.UInt32 Add(ref System.UInt32 location1, System.UInt32 value) => throw null; + public static System.Int64 Add(ref System.Int64 location1, System.Int64 value) => throw null; + public static int And(ref int location1, int value) => throw null; + public static System.UInt64 And(ref System.UInt64 location1, System.UInt64 value) => throw null; + public static System.UInt32 And(ref System.UInt32 location1, System.UInt32 value) => throw null; + public static System.Int64 And(ref System.Int64 location1, System.Int64 value) => throw null; + public static object CompareExchange(ref object location1, object value, object comparand) => throw null; + public static int CompareExchange(ref int location1, int value, int comparand) => throw null; + public static float CompareExchange(ref float location1, float value, float comparand) => throw null; + public static double CompareExchange(ref double location1, double value, double comparand) => throw null; + public static T CompareExchange(ref T location1, T value, T comparand) where T : class => throw null; + public static System.UInt64 CompareExchange(ref System.UInt64 location1, System.UInt64 value, System.UInt64 comparand) => throw null; + public static System.UInt32 CompareExchange(ref System.UInt32 location1, System.UInt32 value, System.UInt32 comparand) => throw null; + public static System.IntPtr CompareExchange(ref System.IntPtr location1, System.IntPtr value, System.IntPtr comparand) => throw null; + public static System.Int64 CompareExchange(ref System.Int64 location1, System.Int64 value, System.Int64 comparand) => throw null; + public static int Decrement(ref int location) => throw null; + public static System.UInt64 Decrement(ref System.UInt64 location) => throw null; + public static System.UInt32 Decrement(ref System.UInt32 location) => throw null; + public static System.Int64 Decrement(ref System.Int64 location) => throw null; + public static object Exchange(ref object location1, object value) => throw null; + public static int Exchange(ref int location1, int value) => throw null; + public static float Exchange(ref float location1, float value) => throw null; + public static double Exchange(ref double location1, double value) => throw null; + public static T Exchange(ref T location1, T value) where T : class => throw null; + public static System.UInt64 Exchange(ref System.UInt64 location1, System.UInt64 value) => throw null; + public static System.UInt32 Exchange(ref System.UInt32 location1, System.UInt32 value) => throw null; + public static System.IntPtr Exchange(ref System.IntPtr location1, System.IntPtr value) => throw null; + public static System.Int64 Exchange(ref System.Int64 location1, System.Int64 value) => throw null; + public static int Increment(ref int location) => throw null; + public static System.UInt64 Increment(ref System.UInt64 location) => throw null; + public static System.UInt32 Increment(ref System.UInt32 location) => throw null; + public static System.Int64 Increment(ref System.Int64 location) => throw null; + public static void MemoryBarrier() => throw null; + public static void MemoryBarrierProcessWide() => throw null; + public static int Or(ref int location1, int value) => throw null; + public static System.UInt64 Or(ref System.UInt64 location1, System.UInt64 value) => throw null; + public static System.UInt32 Or(ref System.UInt32 location1, System.UInt32 value) => throw null; + public static System.Int64 Or(ref System.Int64 location1, System.Int64 value) => throw null; + public static System.UInt64 Read(ref System.UInt64 location) => throw null; + public static System.Int64 Read(ref System.Int64 location) => throw null; + } + + // Generated from `System.Threading.LazyInitializer` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class LazyInitializer + { + public static T EnsureInitialized(ref T target, ref object syncLock, System.Func valueFactory) where T : class => throw null; + public static T EnsureInitialized(ref T target, ref bool initialized, ref object syncLock, System.Func valueFactory) => throw null; + public static T EnsureInitialized(ref T target, ref bool initialized, ref object syncLock) => throw null; + public static T EnsureInitialized(ref T target, System.Func valueFactory) where T : class => throw null; + public static T EnsureInitialized(ref T target) where T : class => throw null; + } + + // Generated from `System.Threading.LockCookie` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct LockCookie + { + public static bool operator !=(System.Threading.LockCookie a, System.Threading.LockCookie b) => throw null; + public static bool operator ==(System.Threading.LockCookie a, System.Threading.LockCookie b) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(System.Threading.LockCookie obj) => throw null; + public override int GetHashCode() => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Threading.LockRecursionException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class LockRecursionException : System.Exception + { + public LockRecursionException(string message, System.Exception innerException) => throw null; + public LockRecursionException(string message) => throw null; + public LockRecursionException() => throw null; + protected LockRecursionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.LockRecursionPolicy` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum LockRecursionPolicy + { + // Stub generator skipped constructor + NoRecursion, + SupportsRecursion, + } + + // Generated from `System.Threading.ManualResetEvent` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ManualResetEvent : System.Threading.EventWaitHandle + { + public ManualResetEvent(bool initialState) : base(default(bool), default(System.Threading.EventResetMode)) => throw null; + } + + // Generated from `System.Threading.ManualResetEventSlim` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ManualResetEventSlim : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsSet { get => throw null; } + public ManualResetEventSlim(bool initialState, int spinCount) => throw null; + public ManualResetEventSlim(bool initialState) => throw null; + public ManualResetEventSlim() => throw null; + public void Reset() => throw null; + public void Set() => throw null; + public int SpinCount { get => throw null; } + public void Wait(System.Threading.CancellationToken cancellationToken) => throw null; + public void Wait() => throw null; + public bool Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(int millisecondsTimeout) => throw null; + public bool Wait(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(System.TimeSpan timeout) => throw null; + public System.Threading.WaitHandle WaitHandle { get => throw null; } + } + + // Generated from `System.Threading.Monitor` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Monitor + { + public static void Enter(object obj, ref bool lockTaken) => throw null; + public static void Enter(object obj) => throw null; + public static void Exit(object obj) => throw null; + public static bool IsEntered(object obj) => throw null; + public static System.Int64 LockContentionCount { get => throw null; } + public static void Pulse(object obj) => throw null; + public static void PulseAll(object obj) => throw null; + public static void TryEnter(object obj, ref bool lockTaken) => throw null; + public static void TryEnter(object obj, int millisecondsTimeout, ref bool lockTaken) => throw null; + public static void TryEnter(object obj, System.TimeSpan timeout, ref bool lockTaken) => throw null; + public static bool TryEnter(object obj, int millisecondsTimeout) => throw null; + public static bool TryEnter(object obj, System.TimeSpan timeout) => throw null; + public static bool TryEnter(object obj) => throw null; + public static bool Wait(object obj, int millisecondsTimeout, bool exitContext) => throw null; + public static bool Wait(object obj, int millisecondsTimeout) => throw null; + public static bool Wait(object obj, System.TimeSpan timeout, bool exitContext) => throw null; + public static bool Wait(object obj, System.TimeSpan timeout) => throw null; + public static bool Wait(object obj) => throw null; + } + + // Generated from `System.Threading.Mutex` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Mutex : System.Threading.WaitHandle + { + public Mutex(bool initiallyOwned, string name, out bool createdNew) => throw null; + public Mutex(bool initiallyOwned, string name) => throw null; + public Mutex(bool initiallyOwned) => throw null; + public Mutex() => throw null; + public static System.Threading.Mutex OpenExisting(string name) => throw null; + public void ReleaseMutex() => throw null; + public static bool TryOpenExisting(string name, out System.Threading.Mutex result) => throw null; + } + + // Generated from `System.Threading.ReaderWriterLock` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReaderWriterLock : System.Runtime.ConstrainedExecution.CriticalFinalizerObject + { + public void AcquireReaderLock(int millisecondsTimeout) => throw null; + public void AcquireReaderLock(System.TimeSpan timeout) => throw null; + public void AcquireWriterLock(int millisecondsTimeout) => throw null; + public void AcquireWriterLock(System.TimeSpan timeout) => throw null; + public bool AnyWritersSince(int seqNum) => throw null; + public void DowngradeFromWriterLock(ref System.Threading.LockCookie lockCookie) => throw null; + public bool IsReaderLockHeld { get => throw null; } + public bool IsWriterLockHeld { get => throw null; } + public ReaderWriterLock() => throw null; + public System.Threading.LockCookie ReleaseLock() => throw null; + public void ReleaseReaderLock() => throw null; + public void ReleaseWriterLock() => throw null; + public void RestoreLock(ref System.Threading.LockCookie lockCookie) => throw null; + public System.Threading.LockCookie UpgradeToWriterLock(int millisecondsTimeout) => throw null; + public System.Threading.LockCookie UpgradeToWriterLock(System.TimeSpan timeout) => throw null; + public int WriterSeqNum { get => throw null; } + } + + // Generated from `System.Threading.ReaderWriterLockSlim` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ReaderWriterLockSlim : System.IDisposable + { + public int CurrentReadCount { get => throw null; } + public void Dispose() => throw null; + public void EnterReadLock() => throw null; + public void EnterUpgradeableReadLock() => throw null; + public void EnterWriteLock() => throw null; + public void ExitReadLock() => throw null; + public void ExitUpgradeableReadLock() => throw null; + public void ExitWriteLock() => throw null; + public bool IsReadLockHeld { get => throw null; } + public bool IsUpgradeableReadLockHeld { get => throw null; } + public bool IsWriteLockHeld { get => throw null; } + public ReaderWriterLockSlim(System.Threading.LockRecursionPolicy recursionPolicy) => throw null; + public ReaderWriterLockSlim() => throw null; + public System.Threading.LockRecursionPolicy RecursionPolicy { get => throw null; } + public int RecursiveReadCount { get => throw null; } + public int RecursiveUpgradeCount { get => throw null; } + public int RecursiveWriteCount { get => throw null; } + public bool TryEnterReadLock(int millisecondsTimeout) => throw null; + public bool TryEnterReadLock(System.TimeSpan timeout) => throw null; + public bool TryEnterUpgradeableReadLock(int millisecondsTimeout) => throw null; + public bool TryEnterUpgradeableReadLock(System.TimeSpan timeout) => throw null; + public bool TryEnterWriteLock(int millisecondsTimeout) => throw null; + public bool TryEnterWriteLock(System.TimeSpan timeout) => throw null; + public int WaitingReadCount { get => throw null; } + public int WaitingUpgradeCount { get => throw null; } + public int WaitingWriteCount { get => throw null; } + } + + // Generated from `System.Threading.Semaphore` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class Semaphore : System.Threading.WaitHandle + { + public static System.Threading.Semaphore OpenExisting(string name) => throw null; + public int Release(int releaseCount) => throw null; + public int Release() => throw null; + public Semaphore(int initialCount, int maximumCount, string name, out bool createdNew) => throw null; + public Semaphore(int initialCount, int maximumCount, string name) => throw null; + public Semaphore(int initialCount, int maximumCount) => throw null; + public static bool TryOpenExisting(string name, out System.Threading.Semaphore result) => throw null; + } + + // Generated from `System.Threading.SemaphoreFullException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SemaphoreFullException : System.SystemException + { + public SemaphoreFullException(string message, System.Exception innerException) => throw null; + public SemaphoreFullException(string message) => throw null; + public SemaphoreFullException() => throw null; + protected SemaphoreFullException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.SemaphoreSlim` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SemaphoreSlim : System.IDisposable + { + public System.Threading.WaitHandle AvailableWaitHandle { get => throw null; } + public int CurrentCount { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public int Release(int releaseCount) => throw null; + public int Release() => throw null; + public SemaphoreSlim(int initialCount, int maxCount) => throw null; + public SemaphoreSlim(int initialCount) => throw null; + public void Wait(System.Threading.CancellationToken cancellationToken) => throw null; + public void Wait() => throw null; + public bool Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(int millisecondsTimeout) => throw null; + public bool Wait(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Wait(System.TimeSpan timeout) => throw null; + public System.Threading.Tasks.Task WaitAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WaitAsync(int millisecondsTimeout) => throw null; + public System.Threading.Tasks.Task WaitAsync(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WaitAsync(System.TimeSpan timeout) => throw null; + public System.Threading.Tasks.Task WaitAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WaitAsync() => throw null; + } + + // Generated from `System.Threading.SendOrPostCallback` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SendOrPostCallback(object state); + + // Generated from `System.Threading.SpinLock` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SpinLock + { + public void Enter(ref bool lockTaken) => throw null; + public void Exit(bool useMemoryBarrier) => throw null; + public void Exit() => throw null; + public bool IsHeld { get => throw null; } + public bool IsHeldByCurrentThread { get => throw null; } + public bool IsThreadOwnerTrackingEnabled { get => throw null; } + public SpinLock(bool enableThreadOwnerTracking) => throw null; + // Stub generator skipped constructor + public void TryEnter(ref bool lockTaken) => throw null; + public void TryEnter(int millisecondsTimeout, ref bool lockTaken) => throw null; + public void TryEnter(System.TimeSpan timeout, ref bool lockTaken) => throw null; + } + + // Generated from `System.Threading.SpinWait` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct SpinWait + { + public int Count { get => throw null; } + public bool NextSpinWillYield { get => throw null; } + public void Reset() => throw null; + public void SpinOnce(int sleep1Threshold) => throw null; + public void SpinOnce() => throw null; + public static void SpinUntil(System.Func condition) => throw null; + public static bool SpinUntil(System.Func condition, int millisecondsTimeout) => throw null; + public static bool SpinUntil(System.Func condition, System.TimeSpan timeout) => throw null; + // Stub generator skipped constructor + } + + // Generated from `System.Threading.SynchronizationContext` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SynchronizationContext + { + public virtual System.Threading.SynchronizationContext CreateCopy() => throw null; + public static System.Threading.SynchronizationContext Current { get => throw null; } + public bool IsWaitNotificationRequired() => throw null; + public virtual void OperationCompleted() => throw null; + public virtual void OperationStarted() => throw null; + public virtual void Post(System.Threading.SendOrPostCallback d, object state) => throw null; + public virtual void Send(System.Threading.SendOrPostCallback d, object state) => throw null; + public static void SetSynchronizationContext(System.Threading.SynchronizationContext syncContext) => throw null; + protected void SetWaitNotificationRequired() => throw null; + public SynchronizationContext() => throw null; + public virtual int Wait(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) => throw null; + protected static int WaitHelper(System.IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) => throw null; + } + + // Generated from `System.Threading.SynchronizationLockException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SynchronizationLockException : System.SystemException + { + public SynchronizationLockException(string message, System.Exception innerException) => throw null; + public SynchronizationLockException(string message) => throw null; + public SynchronizationLockException() => throw null; + protected SynchronizationLockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Threading.ThreadLocal<>` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ThreadLocal : System.IDisposable + { + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsValueCreated { get => throw null; } + public ThreadLocal(bool trackAllValues) => throw null; + public ThreadLocal(System.Func valueFactory, bool trackAllValues) => throw null; + public ThreadLocal(System.Func valueFactory) => throw null; + public ThreadLocal() => throw null; + public override string ToString() => throw null; + public T Value { get => throw null; set => throw null; } + public System.Collections.Generic.IList Values { get => throw null; } + // ERR: Stub generator didn't handle member: ~ThreadLocal + } + + // Generated from `System.Threading.Volatile` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Volatile + { + public static int Read(ref int location) => throw null; + public static float Read(ref float location) => throw null; + public static double Read(ref double location) => throw null; + public static bool Read(ref bool location) => throw null; + public static T Read(ref T location) where T : class => throw null; + public static System.UIntPtr Read(ref System.UIntPtr location) => throw null; + public static System.UInt64 Read(ref System.UInt64 location) => throw null; + public static System.UInt32 Read(ref System.UInt32 location) => throw null; + public static System.UInt16 Read(ref System.UInt16 location) => throw null; + public static System.SByte Read(ref System.SByte location) => throw null; + public static System.IntPtr Read(ref System.IntPtr location) => throw null; + public static System.Int64 Read(ref System.Int64 location) => throw null; + public static System.Int16 Read(ref System.Int16 location) => throw null; + public static System.Byte Read(ref System.Byte location) => throw null; + public static void Write(ref T location, T value) where T : class => throw null; + public static void Write(ref int location, int value) => throw null; + public static void Write(ref float location, float value) => throw null; + public static void Write(ref double location, double value) => throw null; + public static void Write(ref bool location, bool value) => throw null; + public static void Write(ref System.UIntPtr location, System.UIntPtr value) => throw null; + public static void Write(ref System.UInt64 location, System.UInt64 value) => throw null; + public static void Write(ref System.UInt32 location, System.UInt32 value) => throw null; + public static void Write(ref System.UInt16 location, System.UInt16 value) => throw null; + public static void Write(ref System.SByte location, System.SByte value) => throw null; + public static void Write(ref System.IntPtr location, System.IntPtr value) => throw null; + public static void Write(ref System.Int64 location, System.Int64 value) => throw null; + public static void Write(ref System.Int16 location, System.Int16 value) => throw null; + public static void Write(ref System.Byte location, System.Byte value) => throw null; + } + + // Generated from `System.Threading.WaitHandleCannotBeOpenedException` in `System.Threading, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class WaitHandleCannotBeOpenedException : System.ApplicationException + { + public WaitHandleCannotBeOpenedException(string message, System.Exception innerException) => throw null; + public WaitHandleCannotBeOpenedException(string message) => throw null; + public WaitHandleCannotBeOpenedException() => throw null; + protected WaitHandleCannotBeOpenedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs new file mode 100644 index 000000000000..1d3b4282b542 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs @@ -0,0 +1,327 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Transactions + { + // Generated from `System.Transactions.CommittableTransaction` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CommittableTransaction : System.Transactions.Transaction, System.IAsyncResult + { + object System.IAsyncResult.AsyncState { get => throw null; } + System.Threading.WaitHandle System.IAsyncResult.AsyncWaitHandle { get => throw null; } + public System.IAsyncResult BeginCommit(System.AsyncCallback asyncCallback, object asyncState) => throw null; + public void Commit() => throw null; + public CommittableTransaction(System.Transactions.TransactionOptions options) => throw null; + public CommittableTransaction(System.TimeSpan timeout) => throw null; + public CommittableTransaction() => throw null; + bool System.IAsyncResult.CompletedSynchronously { get => throw null; } + public void EndCommit(System.IAsyncResult asyncResult) => throw null; + bool System.IAsyncResult.IsCompleted { get => throw null; } + } + + // Generated from `System.Transactions.DependentCloneOption` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum DependentCloneOption + { + BlockCommitUntilComplete, + // Stub generator skipped constructor + RollbackIfNotComplete, + } + + // Generated from `System.Transactions.DependentTransaction` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DependentTransaction : System.Transactions.Transaction + { + public void Complete() => throw null; + } + + // Generated from `System.Transactions.Enlistment` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Enlistment + { + public void Done() => throw null; + internal Enlistment() => throw null; + } + + // Generated from `System.Transactions.EnlistmentOptions` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum EnlistmentOptions + { + EnlistDuringPrepareRequired, + // Stub generator skipped constructor + None, + } + + // Generated from `System.Transactions.EnterpriseServicesInteropOption` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum EnterpriseServicesInteropOption + { + Automatic, + // Stub generator skipped constructor + Full, + None, + } + + // Generated from `System.Transactions.HostCurrentTransactionCallback` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate System.Transactions.Transaction HostCurrentTransactionCallback(); + + // Generated from `System.Transactions.IDtcTransaction` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IDtcTransaction + { + void Abort(System.IntPtr reason, int retaining, int async); + void Commit(int retaining, int commitType, int reserved); + void GetTransactionInfo(System.IntPtr transactionInformation); + } + + // Generated from `System.Transactions.IEnlistmentNotification` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IEnlistmentNotification + { + void Commit(System.Transactions.Enlistment enlistment); + void InDoubt(System.Transactions.Enlistment enlistment); + void Prepare(System.Transactions.PreparingEnlistment preparingEnlistment); + void Rollback(System.Transactions.Enlistment enlistment); + } + + // Generated from `System.Transactions.IPromotableSinglePhaseNotification` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IPromotableSinglePhaseNotification : System.Transactions.ITransactionPromoter + { + void Initialize(); + void Rollback(System.Transactions.SinglePhaseEnlistment singlePhaseEnlistment); + void SinglePhaseCommit(System.Transactions.SinglePhaseEnlistment singlePhaseEnlistment); + } + + // Generated from `System.Transactions.ISimpleTransactionSuperior` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface ISimpleTransactionSuperior : System.Transactions.ITransactionPromoter + { + void Rollback(); + } + + // Generated from `System.Transactions.ISinglePhaseNotification` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface ISinglePhaseNotification : System.Transactions.IEnlistmentNotification + { + void SinglePhaseCommit(System.Transactions.SinglePhaseEnlistment singlePhaseEnlistment); + } + + // Generated from `System.Transactions.ITransactionPromoter` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface ITransactionPromoter + { + System.Byte[] Promote(); + } + + // Generated from `System.Transactions.IsolationLevel` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum IsolationLevel + { + Chaos, + // Stub generator skipped constructor + ReadCommitted, + ReadUncommitted, + RepeatableRead, + Serializable, + Snapshot, + Unspecified, + } + + // Generated from `System.Transactions.PreparingEnlistment` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PreparingEnlistment : System.Transactions.Enlistment + { + public void ForceRollback(System.Exception e) => throw null; + public void ForceRollback() => throw null; + public void Prepared() => throw null; + public System.Byte[] RecoveryInformation() => throw null; + } + + // Generated from `System.Transactions.SinglePhaseEnlistment` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SinglePhaseEnlistment : System.Transactions.Enlistment + { + public void Aborted(System.Exception e) => throw null; + public void Aborted() => throw null; + public void Committed() => throw null; + public void InDoubt(System.Exception e) => throw null; + public void InDoubt() => throw null; + } + + // Generated from `System.Transactions.SubordinateTransaction` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SubordinateTransaction : System.Transactions.Transaction + { + public SubordinateTransaction(System.Transactions.IsolationLevel isoLevel, System.Transactions.ISimpleTransactionSuperior superior) => throw null; + } + + // Generated from `System.Transactions.Transaction` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Transaction : System.Runtime.Serialization.ISerializable, System.IDisposable + { + public static bool operator !=(System.Transactions.Transaction x, System.Transactions.Transaction y) => throw null; + public static bool operator ==(System.Transactions.Transaction x, System.Transactions.Transaction y) => throw null; + public System.Transactions.Transaction Clone() => throw null; + public static System.Transactions.Transaction Current { get => throw null; set => throw null; } + public System.Transactions.DependentTransaction DependentClone(System.Transactions.DependentCloneOption cloneOption) => throw null; + public void Dispose() => throw null; + public System.Transactions.Enlistment EnlistDurable(System.Guid resourceManagerIdentifier, System.Transactions.ISinglePhaseNotification singlePhaseNotification, System.Transactions.EnlistmentOptions enlistmentOptions) => throw null; + public System.Transactions.Enlistment EnlistDurable(System.Guid resourceManagerIdentifier, System.Transactions.IEnlistmentNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions) => throw null; + public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification, System.Guid promoterType) => throw null; + public bool EnlistPromotableSinglePhase(System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification) => throw null; + public System.Transactions.Enlistment EnlistVolatile(System.Transactions.ISinglePhaseNotification singlePhaseNotification, System.Transactions.EnlistmentOptions enlistmentOptions) => throw null; + public System.Transactions.Enlistment EnlistVolatile(System.Transactions.IEnlistmentNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Byte[] GetPromotedToken() => throw null; + public System.Transactions.IsolationLevel IsolationLevel { get => throw null; } + public System.Transactions.Enlistment PromoteAndEnlistDurable(System.Guid resourceManagerIdentifier, System.Transactions.IPromotableSinglePhaseNotification promotableNotification, System.Transactions.ISinglePhaseNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions) => throw null; + public System.Guid PromoterType { get => throw null; } + public void Rollback(System.Exception e) => throw null; + public void Rollback() => throw null; + public void SetDistributedTransactionIdentifier(System.Transactions.IPromotableSinglePhaseNotification promotableNotification, System.Guid distributedTransactionIdentifier) => throw null; + internal Transaction() => throw null; + public event System.Transactions.TransactionCompletedEventHandler TransactionCompleted; + public System.Transactions.TransactionInformation TransactionInformation { get => throw null; } + } + + // Generated from `System.Transactions.TransactionAbortedException` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionAbortedException : System.Transactions.TransactionException + { + public TransactionAbortedException(string message, System.Exception innerException) => throw null; + public TransactionAbortedException(string message) => throw null; + public TransactionAbortedException() => throw null; + protected TransactionAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Transactions.TransactionCompletedEventHandler` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void TransactionCompletedEventHandler(object sender, System.Transactions.TransactionEventArgs e); + + // Generated from `System.Transactions.TransactionEventArgs` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionEventArgs : System.EventArgs + { + public System.Transactions.Transaction Transaction { get => throw null; } + public TransactionEventArgs() => throw null; + } + + // Generated from `System.Transactions.TransactionException` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionException : System.SystemException + { + public TransactionException(string message, System.Exception innerException) => throw null; + public TransactionException(string message) => throw null; + public TransactionException() => throw null; + protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Transactions.TransactionInDoubtException` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionInDoubtException : System.Transactions.TransactionException + { + public TransactionInDoubtException(string message, System.Exception innerException) => throw null; + public TransactionInDoubtException(string message) => throw null; + public TransactionInDoubtException() => throw null; + protected TransactionInDoubtException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Transactions.TransactionInformation` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionInformation + { + public System.DateTime CreationTime { get => throw null; } + public System.Guid DistributedIdentifier { get => throw null; } + public string LocalIdentifier { get => throw null; } + public System.Transactions.TransactionStatus Status { get => throw null; } + } + + // Generated from `System.Transactions.TransactionInterop` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class TransactionInterop + { + public static System.Transactions.IDtcTransaction GetDtcTransaction(System.Transactions.Transaction transaction) => throw null; + public static System.Byte[] GetExportCookie(System.Transactions.Transaction transaction, System.Byte[] whereabouts) => throw null; + public static System.Transactions.Transaction GetTransactionFromDtcTransaction(System.Transactions.IDtcTransaction transactionNative) => throw null; + public static System.Transactions.Transaction GetTransactionFromExportCookie(System.Byte[] cookie) => throw null; + public static System.Transactions.Transaction GetTransactionFromTransmitterPropagationToken(System.Byte[] propagationToken) => throw null; + public static System.Byte[] GetTransmitterPropagationToken(System.Transactions.Transaction transaction) => throw null; + public static System.Byte[] GetWhereabouts() => throw null; + public static System.Guid PromoterTypeDtc; + } + + // Generated from `System.Transactions.TransactionManager` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class TransactionManager + { + public static System.TimeSpan DefaultTimeout { get => throw null; } + public static event System.Transactions.TransactionStartedEventHandler DistributedTransactionStarted; + public static System.Transactions.HostCurrentTransactionCallback HostCurrentCallback { get => throw null; set => throw null; } + public static System.TimeSpan MaximumTimeout { get => throw null; } + public static void RecoveryComplete(System.Guid resourceManagerIdentifier) => throw null; + public static System.Transactions.Enlistment Reenlist(System.Guid resourceManagerIdentifier, System.Byte[] recoveryInformation, System.Transactions.IEnlistmentNotification enlistmentNotification) => throw null; + } + + // Generated from `System.Transactions.TransactionManagerCommunicationException` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionManagerCommunicationException : System.Transactions.TransactionException + { + public TransactionManagerCommunicationException(string message, System.Exception innerException) => throw null; + public TransactionManagerCommunicationException(string message) => throw null; + public TransactionManagerCommunicationException() => throw null; + protected TransactionManagerCommunicationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Transactions.TransactionOptions` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public struct TransactionOptions + { + public static bool operator !=(System.Transactions.TransactionOptions x, System.Transactions.TransactionOptions y) => throw null; + public static bool operator ==(System.Transactions.TransactionOptions x, System.Transactions.TransactionOptions y) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public System.Transactions.IsolationLevel IsolationLevel { get => throw null; set => throw null; } + public System.TimeSpan Timeout { get => throw null; set => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Transactions.TransactionPromotionException` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionPromotionException : System.Transactions.TransactionException + { + public TransactionPromotionException(string message, System.Exception innerException) => throw null; + public TransactionPromotionException(string message) => throw null; + public TransactionPromotionException() => throw null; + protected TransactionPromotionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Transactions.TransactionScope` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TransactionScope : System.IDisposable + { + public void Complete() => throw null; + public void Dispose() => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.Transactions.TransactionOptions transactionOptions, System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.Transactions.TransactionOptions transactionOptions, System.Transactions.EnterpriseServicesInteropOption interopOption) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.Transactions.TransactionOptions transactionOptions) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.TimeSpan scopeTimeout, System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption, System.TimeSpan scopeTimeout) => throw null; + public TransactionScope(System.Transactions.TransactionScopeOption scopeOption) => throw null; + public TransactionScope(System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.Transaction transactionToUse, System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.Transaction transactionToUse, System.TimeSpan scopeTimeout, System.Transactions.TransactionScopeAsyncFlowOption asyncFlowOption) => throw null; + public TransactionScope(System.Transactions.Transaction transactionToUse, System.TimeSpan scopeTimeout, System.Transactions.EnterpriseServicesInteropOption interopOption) => throw null; + public TransactionScope(System.Transactions.Transaction transactionToUse, System.TimeSpan scopeTimeout) => throw null; + public TransactionScope(System.Transactions.Transaction transactionToUse) => throw null; + public TransactionScope() => throw null; + } + + // Generated from `System.Transactions.TransactionScopeAsyncFlowOption` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TransactionScopeAsyncFlowOption + { + Enabled, + Suppress, + // Stub generator skipped constructor + } + + // Generated from `System.Transactions.TransactionScopeOption` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TransactionScopeOption + { + Required, + RequiresNew, + Suppress, + // Stub generator skipped constructor + } + + // Generated from `System.Transactions.TransactionStartedEventHandler` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void TransactionStartedEventHandler(object sender, System.Transactions.TransactionEventArgs e); + + // Generated from `System.Transactions.TransactionStatus` in `System.Transactions.Local, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum TransactionStatus + { + Aborted, + Active, + Committed, + InDoubt, + // Stub generator skipped constructor + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs new file mode 100644 index 000000000000..198e9843ee46 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs @@ -0,0 +1,44 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Web + { + // Generated from `System.Web.HttpUtility` in `System.Web.HttpUtility, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class HttpUtility + { + public static void HtmlAttributeEncode(string s, System.IO.TextWriter output) => throw null; + public static string HtmlAttributeEncode(string s) => throw null; + public static void HtmlDecode(string s, System.IO.TextWriter output) => throw null; + public static string HtmlDecode(string s) => throw null; + public static void HtmlEncode(string s, System.IO.TextWriter output) => throw null; + public static string HtmlEncode(string s) => throw null; + public static string HtmlEncode(object value) => throw null; + public HttpUtility() => throw null; + public static string JavaScriptStringEncode(string value, bool addDoubleQuotes) => throw null; + public static string JavaScriptStringEncode(string value) => throw null; + public static System.Collections.Specialized.NameValueCollection ParseQueryString(string query, System.Text.Encoding encoding) => throw null; + public static System.Collections.Specialized.NameValueCollection ParseQueryString(string query) => throw null; + public static string UrlDecode(string str, System.Text.Encoding e) => throw null; + public static string UrlDecode(string str) => throw null; + public static string UrlDecode(System.Byte[] bytes, int offset, int count, System.Text.Encoding e) => throw null; + public static string UrlDecode(System.Byte[] bytes, System.Text.Encoding e) => throw null; + public static System.Byte[] UrlDecodeToBytes(string str, System.Text.Encoding e) => throw null; + public static System.Byte[] UrlDecodeToBytes(string str) => throw null; + public static System.Byte[] UrlDecodeToBytes(System.Byte[] bytes, int offset, int count) => throw null; + public static System.Byte[] UrlDecodeToBytes(System.Byte[] bytes) => throw null; + public static string UrlEncode(string str, System.Text.Encoding e) => throw null; + public static string UrlEncode(string str) => throw null; + public static string UrlEncode(System.Byte[] bytes, int offset, int count) => throw null; + public static string UrlEncode(System.Byte[] bytes) => throw null; + public static System.Byte[] UrlEncodeToBytes(string str, System.Text.Encoding e) => throw null; + public static System.Byte[] UrlEncodeToBytes(string str) => throw null; + public static System.Byte[] UrlEncodeToBytes(System.Byte[] bytes, int offset, int count) => throw null; + public static System.Byte[] UrlEncodeToBytes(System.Byte[] bytes) => throw null; + public static string UrlEncodeUnicode(string str) => throw null; + public static System.Byte[] UrlEncodeUnicodeToBytes(string str) => throw null; + public static string UrlPathEncode(string str) => throw null; + } + + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs new file mode 100644 index 000000000000..b4026bb4a1a1 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs @@ -0,0 +1,2938 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Xml + { + // Generated from `System.Xml.ConformanceLevel` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ConformanceLevel + { + Auto, + // Stub generator skipped constructor + Document, + Fragment, + } + + // Generated from `System.Xml.DtdProcessing` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DtdProcessing + { + // Stub generator skipped constructor + Ignore, + Parse, + Prohibit, + } + + // Generated from `System.Xml.EntityHandling` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum EntityHandling + { + // Stub generator skipped constructor + ExpandCharEntities, + ExpandEntities, + } + + // Generated from `System.Xml.Formatting` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Formatting + { + // Stub generator skipped constructor + Indented, + None, + } + + // Generated from `System.Xml.IApplicationResourceStreamResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IApplicationResourceStreamResolver + { + System.IO.Stream GetApplicationResourceStream(System.Uri relativeUri); + } + + // Generated from `System.Xml.IHasXmlNode` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IHasXmlNode + { + System.Xml.XmlNode GetNode(); + } + + // Generated from `System.Xml.IXmlLineInfo` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlLineInfo + { + bool HasLineInfo(); + int LineNumber { get; } + int LinePosition { get; } + } + + // Generated from `System.Xml.IXmlNamespaceResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlNamespaceResolver + { + System.Collections.Generic.IDictionary GetNamespacesInScope(System.Xml.XmlNamespaceScope scope); + string LookupNamespace(string prefix); + string LookupPrefix(string namespaceName); + } + + // Generated from `System.Xml.NameTable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class NameTable : System.Xml.XmlNameTable + { + public override string Add(string key) => throw null; + public override string Add(System.Char[] key, int start, int len) => throw null; + public override string Get(string value) => throw null; + public override string Get(System.Char[] key, int start, int len) => throw null; + public NameTable() => throw null; + } + + // Generated from `System.Xml.NamespaceHandling` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum NamespaceHandling + { + Default, + // Stub generator skipped constructor + OmitDuplicates, + } + + // Generated from `System.Xml.NewLineHandling` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum NewLineHandling + { + Entitize, + // Stub generator skipped constructor + None, + Replace, + } + + // Generated from `System.Xml.ReadState` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ReadState + { + Closed, + EndOfFile, + Error, + Initial, + Interactive, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.ValidationType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ValidationType + { + Auto, + DTD, + None, + Schema, + // Stub generator skipped constructor + XDR, + } + + // Generated from `System.Xml.WhitespaceHandling` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WhitespaceHandling + { + All, + None, + Significant, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.WriteState` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum WriteState + { + Attribute, + Closed, + Content, + Element, + Error, + Prolog, + Start, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttribute : System.Xml.XmlNode + { + public override System.Xml.XmlNode AppendChild(System.Xml.XmlNode newChild) => throw null; + public override string BaseURI { get => throw null; } + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string InnerText { set => throw null; } + public override string InnerXml { set => throw null; } + public override System.Xml.XmlNode InsertAfter(System.Xml.XmlNode newChild, System.Xml.XmlNode refChild) => throw null; + public override System.Xml.XmlNode InsertBefore(System.Xml.XmlNode newChild, System.Xml.XmlNode refChild) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override string NamespaceURI { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlDocument OwnerDocument { get => throw null; } + public virtual System.Xml.XmlElement OwnerElement { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override string Prefix { get => throw null; set => throw null; } + public override System.Xml.XmlNode PrependChild(System.Xml.XmlNode newChild) => throw null; + public override System.Xml.XmlNode RemoveChild(System.Xml.XmlNode oldChild) => throw null; + public override System.Xml.XmlNode ReplaceChild(System.Xml.XmlNode newChild, System.Xml.XmlNode oldChild) => throw null; + public override System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public virtual bool Specified { get => throw null; } + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlAttribute(string prefix, string localName, string namespaceURI, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlAttributeCollection` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttributeCollection : System.Xml.XmlNamedNodeMap, System.Collections.IEnumerable, System.Collections.ICollection + { + public System.Xml.XmlAttribute Append(System.Xml.XmlAttribute node) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Xml.XmlAttribute[] array, int index) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + public System.Xml.XmlAttribute InsertAfter(System.Xml.XmlAttribute newNode, System.Xml.XmlAttribute refNode) => throw null; + public System.Xml.XmlAttribute InsertBefore(System.Xml.XmlAttribute newNode, System.Xml.XmlAttribute refNode) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public System.Xml.XmlAttribute this[string name] { get => throw null; } + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public System.Xml.XmlAttribute this[string localName, string namespaceURI] { get => throw null; } + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public System.Xml.XmlAttribute this[int i] { get => throw null; } + public System.Xml.XmlAttribute Prepend(System.Xml.XmlAttribute node) => throw null; + public System.Xml.XmlAttribute Remove(System.Xml.XmlAttribute node) => throw null; + public void RemoveAll() => throw null; + public System.Xml.XmlAttribute RemoveAt(int i) => throw null; + public override System.Xml.XmlNode SetNamedItem(System.Xml.XmlNode node) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Xml.XmlCDataSection` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlCDataSection : System.Xml.XmlCharacterData + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override System.Xml.XmlNode PreviousText { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlCDataSection(string data, System.Xml.XmlDocument doc) : base(default(string), default(System.Xml.XmlDocument)) => throw null; + } + + // Generated from `System.Xml.XmlCharacterData` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlCharacterData : System.Xml.XmlLinkedNode + { + public virtual void AppendData(string strData) => throw null; + public virtual string Data { get => throw null; set => throw null; } + public virtual void DeleteData(int offset, int count) => throw null; + public override string InnerText { get => throw null; set => throw null; } + public virtual void InsertData(int offset, string strData) => throw null; + public virtual int Length { get => throw null; } + public virtual void ReplaceData(int offset, int count, string strData) => throw null; + public virtual string Substring(int offset, int count) => throw null; + public override string Value { get => throw null; set => throw null; } + protected internal XmlCharacterData(string data, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlComment` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlComment : System.Xml.XmlCharacterData + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlComment(string comment, System.Xml.XmlDocument doc) : base(default(string), default(System.Xml.XmlDocument)) => throw null; + } + + // Generated from `System.Xml.XmlConvert` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlConvert + { + public static string DecodeName(string name) => throw null; + public static string EncodeLocalName(string name) => throw null; + public static string EncodeName(string name) => throw null; + public static string EncodeNmToken(string name) => throw null; + public static bool IsNCNameChar(System.Char ch) => throw null; + public static bool IsPublicIdChar(System.Char ch) => throw null; + public static bool IsStartNCNameChar(System.Char ch) => throw null; + public static bool IsWhitespaceChar(System.Char ch) => throw null; + public static bool IsXmlChar(System.Char ch) => throw null; + public static bool IsXmlSurrogatePair(System.Char lowChar, System.Char highChar) => throw null; + public static bool ToBoolean(string s) => throw null; + public static System.Byte ToByte(string s) => throw null; + public static System.Char ToChar(string s) => throw null; + public static System.DateTime ToDateTime(string s, string[] formats) => throw null; + public static System.DateTime ToDateTime(string s, string format) => throw null; + public static System.DateTime ToDateTime(string s, System.Xml.XmlDateTimeSerializationMode dateTimeOption) => throw null; + public static System.DateTime ToDateTime(string s) => throw null; + public static System.DateTimeOffset ToDateTimeOffset(string s, string[] formats) => throw null; + public static System.DateTimeOffset ToDateTimeOffset(string s, string format) => throw null; + public static System.DateTimeOffset ToDateTimeOffset(string s) => throw null; + public static System.Decimal ToDecimal(string s) => throw null; + public static double ToDouble(string s) => throw null; + public static System.Guid ToGuid(string s) => throw null; + public static System.Int16 ToInt16(string s) => throw null; + public static int ToInt32(string s) => throw null; + public static System.Int64 ToInt64(string s) => throw null; + public static System.SByte ToSByte(string s) => throw null; + public static float ToSingle(string s) => throw null; + public static string ToString(int value) => throw null; + public static string ToString(float value) => throw null; + public static string ToString(double value) => throw null; + public static string ToString(bool value) => throw null; + public static string ToString(System.UInt64 value) => throw null; + public static string ToString(System.UInt32 value) => throw null; + public static string ToString(System.UInt16 value) => throw null; + public static string ToString(System.TimeSpan value) => throw null; + public static string ToString(System.SByte value) => throw null; + public static string ToString(System.Int64 value) => throw null; + public static string ToString(System.Int16 value) => throw null; + public static string ToString(System.Guid value) => throw null; + public static string ToString(System.Decimal value) => throw null; + public static string ToString(System.DateTimeOffset value, string format) => throw null; + public static string ToString(System.DateTimeOffset value) => throw null; + public static string ToString(System.DateTime value, string format) => throw null; + public static string ToString(System.DateTime value, System.Xml.XmlDateTimeSerializationMode dateTimeOption) => throw null; + public static string ToString(System.DateTime value) => throw null; + public static string ToString(System.Char value) => throw null; + public static string ToString(System.Byte value) => throw null; + public static System.TimeSpan ToTimeSpan(string s) => throw null; + public static System.UInt16 ToUInt16(string s) => throw null; + public static System.UInt32 ToUInt32(string s) => throw null; + public static System.UInt64 ToUInt64(string s) => throw null; + public static string VerifyNCName(string name) => throw null; + public static string VerifyNMTOKEN(string name) => throw null; + public static string VerifyName(string name) => throw null; + public static string VerifyPublicId(string publicId) => throw null; + public static string VerifyTOKEN(string token) => throw null; + public static string VerifyWhitespace(string content) => throw null; + public static string VerifyXmlChars(string content) => throw null; + public XmlConvert() => throw null; + } + + // Generated from `System.Xml.XmlDateTimeSerializationMode` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlDateTimeSerializationMode + { + Local, + RoundtripKind, + Unspecified, + Utc, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlDeclaration` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDeclaration : System.Xml.XmlLinkedNode + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public string Encoding { get => throw null; set => throw null; } + public override string InnerText { get => throw null; set => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string Standalone { get => throw null; set => throw null; } + public override string Value { get => throw null; set => throw null; } + public string Version { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlDeclaration(string version, string encoding, string standalone, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlDocument` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDocument : System.Xml.XmlNode + { + public override string BaseURI { get => throw null; } + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public virtual System.Xml.XmlAttribute CreateAttribute(string prefix, string localName, string namespaceURI) => throw null; + public System.Xml.XmlAttribute CreateAttribute(string qualifiedName, string namespaceURI) => throw null; + public System.Xml.XmlAttribute CreateAttribute(string name) => throw null; + public virtual System.Xml.XmlCDataSection CreateCDataSection(string data) => throw null; + public virtual System.Xml.XmlComment CreateComment(string data) => throw null; + protected internal virtual System.Xml.XmlAttribute CreateDefaultAttribute(string prefix, string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlDocumentFragment CreateDocumentFragment() => throw null; + public virtual System.Xml.XmlDocumentType CreateDocumentType(string name, string publicId, string systemId, string internalSubset) => throw null; + public virtual System.Xml.XmlElement CreateElement(string prefix, string localName, string namespaceURI) => throw null; + public System.Xml.XmlElement CreateElement(string qualifiedName, string namespaceURI) => throw null; + public System.Xml.XmlElement CreateElement(string name) => throw null; + public virtual System.Xml.XmlEntityReference CreateEntityReference(string name) => throw null; + public override System.Xml.XPath.XPathNavigator CreateNavigator() => throw null; + protected internal virtual System.Xml.XPath.XPathNavigator CreateNavigator(System.Xml.XmlNode node) => throw null; + public virtual System.Xml.XmlNode CreateNode(string nodeTypeString, string name, string namespaceURI) => throw null; + public virtual System.Xml.XmlNode CreateNode(System.Xml.XmlNodeType type, string prefix, string name, string namespaceURI) => throw null; + public virtual System.Xml.XmlNode CreateNode(System.Xml.XmlNodeType type, string name, string namespaceURI) => throw null; + public virtual System.Xml.XmlProcessingInstruction CreateProcessingInstruction(string target, string data) => throw null; + public virtual System.Xml.XmlSignificantWhitespace CreateSignificantWhitespace(string text) => throw null; + public virtual System.Xml.XmlText CreateTextNode(string text) => throw null; + public virtual System.Xml.XmlWhitespace CreateWhitespace(string text) => throw null; + public virtual System.Xml.XmlDeclaration CreateXmlDeclaration(string version, string encoding, string standalone) => throw null; + public System.Xml.XmlElement DocumentElement { get => throw null; } + public virtual System.Xml.XmlDocumentType DocumentType { get => throw null; } + public virtual System.Xml.XmlElement GetElementById(string elementId) => throw null; + public virtual System.Xml.XmlNodeList GetElementsByTagName(string name) => throw null; + public virtual System.Xml.XmlNodeList GetElementsByTagName(string localName, string namespaceURI) => throw null; + public System.Xml.XmlImplementation Implementation { get => throw null; } + public virtual System.Xml.XmlNode ImportNode(System.Xml.XmlNode node, bool deep) => throw null; + public override string InnerText { set => throw null; } + public override string InnerXml { get => throw null; set => throw null; } + public override bool IsReadOnly { get => throw null; } + public virtual void Load(string filename) => throw null; + public virtual void Load(System.Xml.XmlReader reader) => throw null; + public virtual void Load(System.IO.TextReader txtReader) => throw null; + public virtual void Load(System.IO.Stream inStream) => throw null; + public virtual void LoadXml(string xml) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public System.Xml.XmlNameTable NameTable { get => throw null; } + public event System.Xml.XmlNodeChangedEventHandler NodeChanged; + public event System.Xml.XmlNodeChangedEventHandler NodeChanging; + public event System.Xml.XmlNodeChangedEventHandler NodeInserted; + public event System.Xml.XmlNodeChangedEventHandler NodeInserting; + public event System.Xml.XmlNodeChangedEventHandler NodeRemoved; + public event System.Xml.XmlNodeChangedEventHandler NodeRemoving; + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlDocument OwnerDocument { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public bool PreserveWhitespace { get => throw null; set => throw null; } + public virtual System.Xml.XmlNode ReadNode(System.Xml.XmlReader reader) => throw null; + public virtual void Save(string filename) => throw null; + public virtual void Save(System.Xml.XmlWriter w) => throw null; + public virtual void Save(System.IO.TextWriter writer) => throw null; + public virtual void Save(System.IO.Stream outStream) => throw null; + public override System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public System.Xml.Schema.XmlSchemaSet Schemas { get => throw null; set => throw null; } + public void Validate(System.Xml.Schema.ValidationEventHandler validationEventHandler, System.Xml.XmlNode nodeToValidate) => throw null; + public void Validate(System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public override void WriteContentTo(System.Xml.XmlWriter xw) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + public XmlDocument(System.Xml.XmlNameTable nt) => throw null; + public XmlDocument() => throw null; + protected internal XmlDocument(System.Xml.XmlImplementation imp) => throw null; + public virtual System.Xml.XmlResolver XmlResolver { set => throw null; } + } + + // Generated from `System.Xml.XmlDocumentFragment` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDocumentFragment : System.Xml.XmlNode + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string InnerXml { get => throw null; set => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlDocument OwnerDocument { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlDocumentFragment(System.Xml.XmlDocument ownerDocument) => throw null; + } + + // Generated from `System.Xml.XmlDocumentType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlDocumentType : System.Xml.XmlLinkedNode + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public System.Xml.XmlNamedNodeMap Entities { get => throw null; } + public string InternalSubset { get => throw null; } + public override bool IsReadOnly { get => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public System.Xml.XmlNamedNodeMap Notations { get => throw null; } + public string PublicId { get => throw null; } + public string SystemId { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlDocumentType(string name, string publicId, string systemId, string internalSubset, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlElement` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlElement : System.Xml.XmlLinkedNode + { + public override System.Xml.XmlAttributeCollection Attributes { get => throw null; } + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public virtual string GetAttribute(string name) => throw null; + public virtual string GetAttribute(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlAttribute GetAttributeNode(string name) => throw null; + public virtual System.Xml.XmlAttribute GetAttributeNode(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlNodeList GetElementsByTagName(string name) => throw null; + public virtual System.Xml.XmlNodeList GetElementsByTagName(string localName, string namespaceURI) => throw null; + public virtual bool HasAttribute(string name) => throw null; + public virtual bool HasAttribute(string localName, string namespaceURI) => throw null; + public virtual bool HasAttributes { get => throw null; } + public override string InnerText { get => throw null; set => throw null; } + public override string InnerXml { get => throw null; set => throw null; } + public bool IsEmpty { get => throw null; set => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override string NamespaceURI { get => throw null; } + public override System.Xml.XmlNode NextSibling { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlDocument OwnerDocument { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override string Prefix { get => throw null; set => throw null; } + public override void RemoveAll() => throw null; + public virtual void RemoveAllAttributes() => throw null; + public virtual void RemoveAttribute(string name) => throw null; + public virtual void RemoveAttribute(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlNode RemoveAttributeAt(int i) => throw null; + public virtual System.Xml.XmlAttribute RemoveAttributeNode(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlAttribute RemoveAttributeNode(System.Xml.XmlAttribute oldAttr) => throw null; + public override System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public virtual void SetAttribute(string name, string value) => throw null; + public virtual string SetAttribute(string localName, string namespaceURI, string value) => throw null; + public virtual System.Xml.XmlAttribute SetAttributeNode(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlAttribute SetAttributeNode(System.Xml.XmlAttribute newAttr) => throw null; + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlElement(string prefix, string localName, string namespaceURI, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlEntity` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlEntity : System.Xml.XmlNode + { + public override string BaseURI { get => throw null; } + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string InnerText { get => throw null; set => throw null; } + public override string InnerXml { get => throw null; set => throw null; } + public override bool IsReadOnly { get => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string NotationName { get => throw null; } + public override string OuterXml { get => throw null; } + public string PublicId { get => throw null; } + public string SystemId { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + } + + // Generated from `System.Xml.XmlEntityReference` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlEntityReference : System.Xml.XmlLinkedNode + { + public override string BaseURI { get => throw null; } + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override bool IsReadOnly { get => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlEntityReference(string name, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public override string Message { get => throw null; } + public string SourceUri { get => throw null; } + public XmlException(string message, System.Exception innerException, int lineNumber, int linePosition) => throw null; + public XmlException(string message, System.Exception innerException) => throw null; + public XmlException(string message) => throw null; + public XmlException() => throw null; + protected XmlException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.XmlImplementation` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlImplementation + { + public virtual System.Xml.XmlDocument CreateDocument() => throw null; + public bool HasFeature(string strFeature, string strVersion) => throw null; + public XmlImplementation(System.Xml.XmlNameTable nt) => throw null; + public XmlImplementation() => throw null; + } + + // Generated from `System.Xml.XmlLinkedNode` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlLinkedNode : System.Xml.XmlNode + { + public override System.Xml.XmlNode NextSibling { get => throw null; } + public override System.Xml.XmlNode PreviousSibling { get => throw null; } + internal XmlLinkedNode() => throw null; + } + + // Generated from `System.Xml.XmlNameTable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlNameTable + { + public abstract string Add(string array); + public abstract string Add(System.Char[] array, int offset, int length); + public abstract string Get(string array); + public abstract string Get(System.Char[] array, int offset, int length); + protected XmlNameTable() => throw null; + } + + // Generated from `System.Xml.XmlNamedNodeMap` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNamedNodeMap : System.Collections.IEnumerable + { + public virtual int Count { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual System.Xml.XmlNode GetNamedItem(string name) => throw null; + public virtual System.Xml.XmlNode GetNamedItem(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlNode Item(int index) => throw null; + public virtual System.Xml.XmlNode RemoveNamedItem(string name) => throw null; + public virtual System.Xml.XmlNode RemoveNamedItem(string localName, string namespaceURI) => throw null; + public virtual System.Xml.XmlNode SetNamedItem(System.Xml.XmlNode node) => throw null; + internal XmlNamedNodeMap() => throw null; + } + + // Generated from `System.Xml.XmlNamespaceManager` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNamespaceManager : System.Xml.IXmlNamespaceResolver, System.Collections.IEnumerable + { + public virtual void AddNamespace(string prefix, string uri) => throw null; + public virtual string DefaultNamespace { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public virtual System.Collections.Generic.IDictionary GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + public virtual bool HasNamespace(string prefix) => throw null; + public virtual string LookupNamespace(string prefix) => throw null; + public virtual string LookupPrefix(string uri) => throw null; + public virtual System.Xml.XmlNameTable NameTable { get => throw null; } + public virtual bool PopScope() => throw null; + public virtual void PushScope() => throw null; + public virtual void RemoveNamespace(string prefix, string uri) => throw null; + public XmlNamespaceManager(System.Xml.XmlNameTable nameTable) => throw null; + } + + // Generated from `System.Xml.XmlNamespaceScope` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlNamespaceScope + { + All, + ExcludeXml, + Local, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlNode` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlNode : System.Xml.XPath.IXPathNavigable, System.ICloneable, System.Collections.IEnumerable + { + public virtual System.Xml.XmlNode AppendChild(System.Xml.XmlNode newChild) => throw null; + public virtual System.Xml.XmlAttributeCollection Attributes { get => throw null; } + public virtual string BaseURI { get => throw null; } + public virtual System.Xml.XmlNodeList ChildNodes { get => throw null; } + public virtual System.Xml.XmlNode Clone() => throw null; + object System.ICloneable.Clone() => throw null; + public abstract System.Xml.XmlNode CloneNode(bool deep); + public virtual System.Xml.XPath.XPathNavigator CreateNavigator() => throw null; + public virtual System.Xml.XmlNode FirstChild { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual string GetNamespaceOfPrefix(string prefix) => throw null; + public virtual string GetPrefixOfNamespace(string namespaceURI) => throw null; + public virtual bool HasChildNodes { get => throw null; } + public virtual string InnerText { get => throw null; set => throw null; } + public virtual string InnerXml { get => throw null; set => throw null; } + public virtual System.Xml.XmlNode InsertAfter(System.Xml.XmlNode newChild, System.Xml.XmlNode refChild) => throw null; + public virtual System.Xml.XmlNode InsertBefore(System.Xml.XmlNode newChild, System.Xml.XmlNode refChild) => throw null; + public virtual bool IsReadOnly { get => throw null; } + public virtual System.Xml.XmlElement this[string name] { get => throw null; } + public virtual System.Xml.XmlElement this[string localname, string ns] { get => throw null; } + public virtual System.Xml.XmlNode LastChild { get => throw null; } + public abstract string LocalName { get; } + public abstract string Name { get; } + public virtual string NamespaceURI { get => throw null; } + public virtual System.Xml.XmlNode NextSibling { get => throw null; } + public abstract System.Xml.XmlNodeType NodeType { get; } + public virtual void Normalize() => throw null; + public virtual string OuterXml { get => throw null; } + public virtual System.Xml.XmlDocument OwnerDocument { get => throw null; } + public virtual System.Xml.XmlNode ParentNode { get => throw null; } + public virtual string Prefix { get => throw null; set => throw null; } + public virtual System.Xml.XmlNode PrependChild(System.Xml.XmlNode newChild) => throw null; + public virtual System.Xml.XmlNode PreviousSibling { get => throw null; } + public virtual System.Xml.XmlNode PreviousText { get => throw null; } + public virtual void RemoveAll() => throw null; + public virtual System.Xml.XmlNode RemoveChild(System.Xml.XmlNode oldChild) => throw null; + public virtual System.Xml.XmlNode ReplaceChild(System.Xml.XmlNode newChild, System.Xml.XmlNode oldChild) => throw null; + public virtual System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public System.Xml.XmlNodeList SelectNodes(string xpath, System.Xml.XmlNamespaceManager nsmgr) => throw null; + public System.Xml.XmlNodeList SelectNodes(string xpath) => throw null; + public System.Xml.XmlNode SelectSingleNode(string xpath, System.Xml.XmlNamespaceManager nsmgr) => throw null; + public System.Xml.XmlNode SelectSingleNode(string xpath) => throw null; + public virtual bool Supports(string feature, string version) => throw null; + public virtual string Value { get => throw null; set => throw null; } + public abstract void WriteContentTo(System.Xml.XmlWriter w); + public abstract void WriteTo(System.Xml.XmlWriter w); + internal XmlNode() => throw null; + } + + // Generated from `System.Xml.XmlNodeChangedAction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlNodeChangedAction + { + Change, + Insert, + Remove, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlNodeChangedEventArgs` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNodeChangedEventArgs : System.EventArgs + { + public System.Xml.XmlNodeChangedAction Action { get => throw null; } + public System.Xml.XmlNode NewParent { get => throw null; } + public string NewValue { get => throw null; } + public System.Xml.XmlNode Node { get => throw null; } + public System.Xml.XmlNode OldParent { get => throw null; } + public string OldValue { get => throw null; } + public XmlNodeChangedEventArgs(System.Xml.XmlNode node, System.Xml.XmlNode oldParent, System.Xml.XmlNode newParent, string oldValue, string newValue, System.Xml.XmlNodeChangedAction action) => throw null; + } + + // Generated from `System.Xml.XmlNodeChangedEventHandler` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlNodeChangedEventHandler(object sender, System.Xml.XmlNodeChangedEventArgs e); + + // Generated from `System.Xml.XmlNodeList` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlNodeList : System.IDisposable, System.Collections.IEnumerable + { + public abstract int Count { get; } + void System.IDisposable.Dispose() => throw null; + public abstract System.Collections.IEnumerator GetEnumerator(); + public abstract System.Xml.XmlNode Item(int index); + [System.Runtime.CompilerServices.IndexerName("ItemOf")] + public virtual System.Xml.XmlNode this[int i] { get => throw null; } + protected virtual void PrivateDisposeNodeList() => throw null; + protected XmlNodeList() => throw null; + } + + // Generated from `System.Xml.XmlNodeOrder` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlNodeOrder + { + After, + Before, + Same, + Unknown, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlNodeReader` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNodeReader : System.Xml.XmlReader, System.Xml.IXmlNamespaceResolver + { + public override int AttributeCount { get => throw null; } + public override string BaseURI { get => throw null; } + public override bool CanReadBinaryContent { get => throw null; } + public override bool CanResolveEntity { get => throw null; } + public override void Close() => throw null; + public override int Depth { get => throw null; } + public override bool EOF { get => throw null; } + public override string GetAttribute(string name, string namespaceURI) => throw null; + public override string GetAttribute(string name) => throw null; + public override string GetAttribute(int attributeIndex) => throw null; + System.Collections.Generic.IDictionary System.Xml.IXmlNamespaceResolver.GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + public override bool HasAttributes { get => throw null; } + public override bool HasValue { get => throw null; } + public override bool IsDefault { get => throw null; } + public override bool IsEmptyElement { get => throw null; } + public override string LocalName { get => throw null; } + string System.Xml.IXmlNamespaceResolver.LookupNamespace(string prefix) => throw null; + public override string LookupNamespace(string prefix) => throw null; + string System.Xml.IXmlNamespaceResolver.LookupPrefix(string namespaceName) => throw null; + public override void MoveToAttribute(int attributeIndex) => throw null; + public override bool MoveToAttribute(string name, string namespaceURI) => throw null; + public override bool MoveToAttribute(string name) => throw null; + public override bool MoveToElement() => throw null; + public override bool MoveToFirstAttribute() => throw null; + public override bool MoveToNextAttribute() => throw null; + public override string Name { get => throw null; } + public override System.Xml.XmlNameTable NameTable { get => throw null; } + public override string NamespaceURI { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override string Prefix { get => throw null; } + public override bool Read() => throw null; + public override bool ReadAttributeValue() => throw null; + public override int ReadContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override System.Xml.ReadState ReadState { get => throw null; } + public override string ReadString() => throw null; + public override void ResolveEntity() => throw null; + public override System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public override void Skip() => throw null; + public override string Value { get => throw null; } + public override string XmlLang { get => throw null; } + public XmlNodeReader(System.Xml.XmlNode node) => throw null; + public override System.Xml.XmlSpace XmlSpace { get => throw null; } + } + + // Generated from `System.Xml.XmlNodeType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlNodeType + { + Attribute, + CDATA, + Comment, + Document, + DocumentFragment, + DocumentType, + Element, + EndElement, + EndEntity, + Entity, + EntityReference, + None, + Notation, + ProcessingInstruction, + SignificantWhitespace, + Text, + Whitespace, + XmlDeclaration, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlNotation` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNotation : System.Xml.XmlNode + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string InnerXml { get => throw null; set => throw null; } + public override bool IsReadOnly { get => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override string OuterXml { get => throw null; } + public string PublicId { get => throw null; } + public string SystemId { get => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + } + + // Generated from `System.Xml.XmlOutputMethod` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlOutputMethod + { + AutoDetect, + Html, + Text, + Xml, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlParserContext` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlParserContext + { + public string BaseURI { get => throw null; set => throw null; } + public string DocTypeName { get => throw null; set => throw null; } + public System.Text.Encoding Encoding { get => throw null; set => throw null; } + public string InternalSubset { get => throw null; set => throw null; } + public System.Xml.XmlNameTable NameTable { get => throw null; set => throw null; } + public System.Xml.XmlNamespaceManager NamespaceManager { get => throw null; set => throw null; } + public string PublicId { get => throw null; set => throw null; } + public string SystemId { get => throw null; set => throw null; } + public string XmlLang { get => throw null; set => throw null; } + public XmlParserContext(System.Xml.XmlNameTable nt, System.Xml.XmlNamespaceManager nsMgr, string xmlLang, System.Xml.XmlSpace xmlSpace, System.Text.Encoding enc) => throw null; + public XmlParserContext(System.Xml.XmlNameTable nt, System.Xml.XmlNamespaceManager nsMgr, string xmlLang, System.Xml.XmlSpace xmlSpace) => throw null; + public XmlParserContext(System.Xml.XmlNameTable nt, System.Xml.XmlNamespaceManager nsMgr, string docTypeName, string pubId, string sysId, string internalSubset, string baseURI, string xmlLang, System.Xml.XmlSpace xmlSpace, System.Text.Encoding enc) => throw null; + public XmlParserContext(System.Xml.XmlNameTable nt, System.Xml.XmlNamespaceManager nsMgr, string docTypeName, string pubId, string sysId, string internalSubset, string baseURI, string xmlLang, System.Xml.XmlSpace xmlSpace) => throw null; + public System.Xml.XmlSpace XmlSpace { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.XmlProcessingInstruction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlProcessingInstruction : System.Xml.XmlLinkedNode + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public string Data { get => throw null; set => throw null; } + public override string InnerText { get => throw null; set => throw null; } + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string Target { get => throw null; } + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlProcessingInstruction(string target, string data, System.Xml.XmlDocument doc) => throw null; + } + + // Generated from `System.Xml.XmlQualifiedName` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlQualifiedName + { + public static bool operator !=(System.Xml.XmlQualifiedName a, System.Xml.XmlQualifiedName b) => throw null; + public static bool operator ==(System.Xml.XmlQualifiedName a, System.Xml.XmlQualifiedName b) => throw null; + public static System.Xml.XmlQualifiedName Empty; + public override bool Equals(object other) => throw null; + public override int GetHashCode() => throw null; + public bool IsEmpty { get => throw null; } + public string Name { get => throw null; } + public string Namespace { get => throw null; } + public static string ToString(string name, string ns) => throw null; + public override string ToString() => throw null; + public XmlQualifiedName(string name, string ns) => throw null; + public XmlQualifiedName(string name) => throw null; + public XmlQualifiedName() => throw null; + } + + // Generated from `System.Xml.XmlReader` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlReader : System.IDisposable + { + public abstract int AttributeCount { get; } + public abstract string BaseURI { get; } + public virtual bool CanReadBinaryContent { get => throw null; } + public virtual bool CanReadValueChunk { get => throw null; } + public virtual bool CanResolveEntity { get => throw null; } + public virtual void Close() => throw null; + public static System.Xml.XmlReader Create(string inputUri, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext inputContext) => throw null; + public static System.Xml.XmlReader Create(string inputUri, System.Xml.XmlReaderSettings settings) => throw null; + public static System.Xml.XmlReader Create(string inputUri) => throw null; + public static System.Xml.XmlReader Create(System.Xml.XmlReader reader, System.Xml.XmlReaderSettings settings) => throw null; + public static System.Xml.XmlReader Create(System.IO.TextReader input, System.Xml.XmlReaderSettings settings, string baseUri) => throw null; + public static System.Xml.XmlReader Create(System.IO.TextReader input, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext inputContext) => throw null; + public static System.Xml.XmlReader Create(System.IO.TextReader input, System.Xml.XmlReaderSettings settings) => throw null; + public static System.Xml.XmlReader Create(System.IO.TextReader input) => throw null; + public static System.Xml.XmlReader Create(System.IO.Stream input, System.Xml.XmlReaderSettings settings, string baseUri) => throw null; + public static System.Xml.XmlReader Create(System.IO.Stream input, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext inputContext) => throw null; + public static System.Xml.XmlReader Create(System.IO.Stream input, System.Xml.XmlReaderSettings settings) => throw null; + public static System.Xml.XmlReader Create(System.IO.Stream input) => throw null; + public abstract int Depth { get; } + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public abstract bool EOF { get; } + public abstract string GetAttribute(string name, string namespaceURI); + public abstract string GetAttribute(string name); + public abstract string GetAttribute(int i); + public virtual System.Threading.Tasks.Task GetValueAsync() => throw null; + public virtual bool HasAttributes { get => throw null; } + public virtual bool HasValue { get => throw null; } + public virtual bool IsDefault { get => throw null; } + public abstract bool IsEmptyElement { get; } + public static bool IsName(string str) => throw null; + public static bool IsNameToken(string str) => throw null; + public virtual bool IsStartElement(string name) => throw null; + public virtual bool IsStartElement(string localname, string ns) => throw null; + public virtual bool IsStartElement() => throw null; + public virtual string this[string name] { get => throw null; } + public virtual string this[string name, string namespaceURI] { get => throw null; } + public virtual string this[int i] { get => throw null; } + public abstract string LocalName { get; } + public abstract string LookupNamespace(string prefix); + public virtual void MoveToAttribute(int i) => throw null; + public abstract bool MoveToAttribute(string name, string ns); + public abstract bool MoveToAttribute(string name); + public virtual System.Xml.XmlNodeType MoveToContent() => throw null; + public virtual System.Threading.Tasks.Task MoveToContentAsync() => throw null; + public abstract bool MoveToElement(); + public abstract bool MoveToFirstAttribute(); + public abstract bool MoveToNextAttribute(); + public virtual string Name { get => throw null; } + public abstract System.Xml.XmlNameTable NameTable { get; } + public abstract string NamespaceURI { get; } + public abstract System.Xml.XmlNodeType NodeType { get; } + public abstract string Prefix { get; } + public virtual System.Char QuoteChar { get => throw null; } + public abstract bool Read(); + public virtual System.Threading.Tasks.Task ReadAsync() => throw null; + public abstract bool ReadAttributeValue(); + public virtual object ReadContentAs(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual System.Threading.Tasks.Task ReadContentAsAsync(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual int ReadContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task ReadContentAsBase64Async(System.Byte[] buffer, int index, int count) => throw null; + public virtual int ReadContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task ReadContentAsBinHexAsync(System.Byte[] buffer, int index, int count) => throw null; + public virtual bool ReadContentAsBoolean() => throw null; + public virtual System.DateTime ReadContentAsDateTime() => throw null; + public virtual System.DateTimeOffset ReadContentAsDateTimeOffset() => throw null; + public virtual System.Decimal ReadContentAsDecimal() => throw null; + public virtual double ReadContentAsDouble() => throw null; + public virtual float ReadContentAsFloat() => throw null; + public virtual int ReadContentAsInt() => throw null; + public virtual System.Int64 ReadContentAsLong() => throw null; + public virtual object ReadContentAsObject() => throw null; + public virtual System.Threading.Tasks.Task ReadContentAsObjectAsync() => throw null; + public virtual string ReadContentAsString() => throw null; + public virtual System.Threading.Tasks.Task ReadContentAsStringAsync() => throw null; + public virtual object ReadElementContentAs(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver, string localName, string namespaceURI) => throw null; + public virtual object ReadElementContentAs(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual System.Threading.Tasks.Task ReadElementContentAsAsync(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual int ReadElementContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task ReadElementContentAsBase64Async(System.Byte[] buffer, int index, int count) => throw null; + public virtual int ReadElementContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task ReadElementContentAsBinHexAsync(System.Byte[] buffer, int index, int count) => throw null; + public virtual bool ReadElementContentAsBoolean(string localName, string namespaceURI) => throw null; + public virtual bool ReadElementContentAsBoolean() => throw null; + public virtual System.DateTime ReadElementContentAsDateTime(string localName, string namespaceURI) => throw null; + public virtual System.DateTime ReadElementContentAsDateTime() => throw null; + public virtual System.Decimal ReadElementContentAsDecimal(string localName, string namespaceURI) => throw null; + public virtual System.Decimal ReadElementContentAsDecimal() => throw null; + public virtual double ReadElementContentAsDouble(string localName, string namespaceURI) => throw null; + public virtual double ReadElementContentAsDouble() => throw null; + public virtual float ReadElementContentAsFloat(string localName, string namespaceURI) => throw null; + public virtual float ReadElementContentAsFloat() => throw null; + public virtual int ReadElementContentAsInt(string localName, string namespaceURI) => throw null; + public virtual int ReadElementContentAsInt() => throw null; + public virtual System.Int64 ReadElementContentAsLong(string localName, string namespaceURI) => throw null; + public virtual System.Int64 ReadElementContentAsLong() => throw null; + public virtual object ReadElementContentAsObject(string localName, string namespaceURI) => throw null; + public virtual object ReadElementContentAsObject() => throw null; + public virtual System.Threading.Tasks.Task ReadElementContentAsObjectAsync() => throw null; + public virtual string ReadElementContentAsString(string localName, string namespaceURI) => throw null; + public virtual string ReadElementContentAsString() => throw null; + public virtual System.Threading.Tasks.Task ReadElementContentAsStringAsync() => throw null; + public virtual string ReadElementString(string name) => throw null; + public virtual string ReadElementString(string localname, string ns) => throw null; + public virtual string ReadElementString() => throw null; + public virtual void ReadEndElement() => throw null; + public virtual string ReadInnerXml() => throw null; + public virtual System.Threading.Tasks.Task ReadInnerXmlAsync() => throw null; + public virtual string ReadOuterXml() => throw null; + public virtual System.Threading.Tasks.Task ReadOuterXmlAsync() => throw null; + public virtual void ReadStartElement(string name) => throw null; + public virtual void ReadStartElement(string localname, string ns) => throw null; + public virtual void ReadStartElement() => throw null; + public abstract System.Xml.ReadState ReadState { get; } + public virtual string ReadString() => throw null; + public virtual System.Xml.XmlReader ReadSubtree() => throw null; + public virtual bool ReadToDescendant(string name) => throw null; + public virtual bool ReadToDescendant(string localName, string namespaceURI) => throw null; + public virtual bool ReadToFollowing(string name) => throw null; + public virtual bool ReadToFollowing(string localName, string namespaceURI) => throw null; + public virtual bool ReadToNextSibling(string name) => throw null; + public virtual bool ReadToNextSibling(string localName, string namespaceURI) => throw null; + public virtual int ReadValueChunk(System.Char[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task ReadValueChunkAsync(System.Char[] buffer, int index, int count) => throw null; + public abstract void ResolveEntity(); + public virtual System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public virtual System.Xml.XmlReaderSettings Settings { get => throw null; } + public virtual void Skip() => throw null; + public virtual System.Threading.Tasks.Task SkipAsync() => throw null; + public abstract string Value { get; } + public virtual System.Type ValueType { get => throw null; } + public virtual string XmlLang { get => throw null; } + protected XmlReader() => throw null; + public virtual System.Xml.XmlSpace XmlSpace { get => throw null; } + } + + // Generated from `System.Xml.XmlReaderSettings` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlReaderSettings + { + public bool Async { get => throw null; set => throw null; } + public bool CheckCharacters { get => throw null; set => throw null; } + public System.Xml.XmlReaderSettings Clone() => throw null; + public bool CloseInput { get => throw null; set => throw null; } + public System.Xml.ConformanceLevel ConformanceLevel { get => throw null; set => throw null; } + public System.Xml.DtdProcessing DtdProcessing { get => throw null; set => throw null; } + public bool IgnoreComments { get => throw null; set => throw null; } + public bool IgnoreProcessingInstructions { get => throw null; set => throw null; } + public bool IgnoreWhitespace { get => throw null; set => throw null; } + public int LineNumberOffset { get => throw null; set => throw null; } + public int LinePositionOffset { get => throw null; set => throw null; } + public System.Int64 MaxCharactersFromEntities { get => throw null; set => throw null; } + public System.Int64 MaxCharactersInDocument { get => throw null; set => throw null; } + public System.Xml.XmlNameTable NameTable { get => throw null; set => throw null; } + public bool ProhibitDtd { get => throw null; set => throw null; } + public void Reset() => throw null; + public System.Xml.Schema.XmlSchemaSet Schemas { get => throw null; set => throw null; } + public event System.Xml.Schema.ValidationEventHandler ValidationEventHandler; + public System.Xml.Schema.XmlSchemaValidationFlags ValidationFlags { get => throw null; set => throw null; } + public System.Xml.ValidationType ValidationType { get => throw null; set => throw null; } + public XmlReaderSettings() => throw null; + public System.Xml.XmlResolver XmlResolver { set => throw null; } + } + + // Generated from `System.Xml.XmlResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlResolver + { + public virtual System.Net.ICredentials Credentials { set => throw null; } + public abstract object GetEntity(System.Uri absoluteUri, string role, System.Type ofObjectToReturn); + public virtual System.Threading.Tasks.Task GetEntityAsync(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public virtual System.Uri ResolveUri(System.Uri baseUri, string relativeUri) => throw null; + public virtual bool SupportsType(System.Uri absoluteUri, System.Type type) => throw null; + protected XmlResolver() => throw null; + } + + // Generated from `System.Xml.XmlSecureResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSecureResolver : System.Xml.XmlResolver + { + public override System.Net.ICredentials Credentials { set => throw null; } + public override object GetEntity(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public override System.Threading.Tasks.Task GetEntityAsync(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public override System.Uri ResolveUri(System.Uri baseUri, string relativeUri) => throw null; + public XmlSecureResolver(System.Xml.XmlResolver resolver, string securityUrl) => throw null; + } + + // Generated from `System.Xml.XmlSignificantWhitespace` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSignificantWhitespace : System.Xml.XmlCharacterData + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override System.Xml.XmlNode PreviousText { get => throw null; } + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlSignificantWhitespace(string strData, System.Xml.XmlDocument doc) : base(default(string), default(System.Xml.XmlDocument)) => throw null; + } + + // Generated from `System.Xml.XmlSpace` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSpace + { + Default, + None, + Preserve, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlText` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlText : System.Xml.XmlCharacterData + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override System.Xml.XmlNode PreviousText { get => throw null; } + public virtual System.Xml.XmlText SplitText(int offset) => throw null; + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlText(string strData, System.Xml.XmlDocument doc) : base(default(string), default(System.Xml.XmlDocument)) => throw null; + } + + // Generated from `System.Xml.XmlTextReader` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlTextReader : System.Xml.XmlReader, System.Xml.IXmlNamespaceResolver, System.Xml.IXmlLineInfo + { + public override int AttributeCount { get => throw null; } + public override string BaseURI { get => throw null; } + public override bool CanReadBinaryContent { get => throw null; } + public override bool CanReadValueChunk { get => throw null; } + public override bool CanResolveEntity { get => throw null; } + public override void Close() => throw null; + public override int Depth { get => throw null; } + public System.Xml.DtdProcessing DtdProcessing { get => throw null; set => throw null; } + public override bool EOF { get => throw null; } + public System.Text.Encoding Encoding { get => throw null; } + public System.Xml.EntityHandling EntityHandling { get => throw null; set => throw null; } + public override string GetAttribute(string name) => throw null; + public override string GetAttribute(string localName, string namespaceURI) => throw null; + public override string GetAttribute(int i) => throw null; + public System.Collections.Generic.IDictionary GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + System.Collections.Generic.IDictionary System.Xml.IXmlNamespaceResolver.GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + public System.IO.TextReader GetRemainder() => throw null; + public bool HasLineInfo() => throw null; + public override bool HasValue { get => throw null; } + public override bool IsDefault { get => throw null; } + public override bool IsEmptyElement { get => throw null; } + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public override string LocalName { get => throw null; } + string System.Xml.IXmlNamespaceResolver.LookupNamespace(string prefix) => throw null; + public override string LookupNamespace(string prefix) => throw null; + string System.Xml.IXmlNamespaceResolver.LookupPrefix(string namespaceName) => throw null; + public override void MoveToAttribute(int i) => throw null; + public override bool MoveToAttribute(string name) => throw null; + public override bool MoveToAttribute(string localName, string namespaceURI) => throw null; + public override bool MoveToElement() => throw null; + public override bool MoveToFirstAttribute() => throw null; + public override bool MoveToNextAttribute() => throw null; + public override string Name { get => throw null; } + public override System.Xml.XmlNameTable NameTable { get => throw null; } + public override string NamespaceURI { get => throw null; } + public bool Namespaces { get => throw null; set => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public bool Normalization { get => throw null; set => throw null; } + public override string Prefix { get => throw null; } + public bool ProhibitDtd { get => throw null; set => throw null; } + public override System.Char QuoteChar { get => throw null; } + public override bool Read() => throw null; + public override bool ReadAttributeValue() => throw null; + public int ReadBase64(System.Byte[] array, int offset, int len) => throw null; + public int ReadBinHex(System.Byte[] array, int offset, int len) => throw null; + public int ReadChars(System.Char[] buffer, int index, int count) => throw null; + public override int ReadContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override System.Xml.ReadState ReadState { get => throw null; } + public override string ReadString() => throw null; + public void ResetState() => throw null; + public override void ResolveEntity() => throw null; + public override void Skip() => throw null; + public override string Value { get => throw null; } + public System.Xml.WhitespaceHandling WhitespaceHandling { get => throw null; set => throw null; } + public override string XmlLang { get => throw null; } + public System.Xml.XmlResolver XmlResolver { set => throw null; } + public override System.Xml.XmlSpace XmlSpace { get => throw null; } + public XmlTextReader(string xmlFragment, System.Xml.XmlNodeType fragType, System.Xml.XmlParserContext context) => throw null; + public XmlTextReader(string url, System.Xml.XmlNameTable nt) => throw null; + public XmlTextReader(string url, System.IO.TextReader input, System.Xml.XmlNameTable nt) => throw null; + public XmlTextReader(string url, System.IO.TextReader input) => throw null; + public XmlTextReader(string url, System.IO.Stream input, System.Xml.XmlNameTable nt) => throw null; + public XmlTextReader(string url, System.IO.Stream input) => throw null; + public XmlTextReader(string url) => throw null; + public XmlTextReader(System.IO.TextReader input, System.Xml.XmlNameTable nt) => throw null; + public XmlTextReader(System.IO.TextReader input) => throw null; + public XmlTextReader(System.IO.Stream xmlFragment, System.Xml.XmlNodeType fragType, System.Xml.XmlParserContext context) => throw null; + public XmlTextReader(System.IO.Stream input, System.Xml.XmlNameTable nt) => throw null; + public XmlTextReader(System.IO.Stream input) => throw null; + protected XmlTextReader(System.Xml.XmlNameTable nt) => throw null; + protected XmlTextReader() => throw null; + } + + // Generated from `System.Xml.XmlTextWriter` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlTextWriter : System.Xml.XmlWriter + { + public System.IO.Stream BaseStream { get => throw null; } + public override void Close() => throw null; + public override void Flush() => throw null; + public System.Xml.Formatting Formatting { get => throw null; set => throw null; } + public System.Char IndentChar { get => throw null; set => throw null; } + public int Indentation { get => throw null; set => throw null; } + public override string LookupPrefix(string ns) => throw null; + public bool Namespaces { get => throw null; set => throw null; } + public System.Char QuoteChar { get => throw null; set => throw null; } + public override void WriteBase64(System.Byte[] buffer, int index, int count) => throw null; + public override void WriteBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override void WriteCData(string text) => throw null; + public override void WriteCharEntity(System.Char ch) => throw null; + public override void WriteChars(System.Char[] buffer, int index, int count) => throw null; + public override void WriteComment(string text) => throw null; + public override void WriteDocType(string name, string pubid, string sysid, string subset) => throw null; + public override void WriteEndAttribute() => throw null; + public override void WriteEndDocument() => throw null; + public override void WriteEndElement() => throw null; + public override void WriteEntityRef(string name) => throw null; + public override void WriteFullEndElement() => throw null; + public override void WriteName(string name) => throw null; + public override void WriteNmToken(string name) => throw null; + public override void WriteProcessingInstruction(string name, string text) => throw null; + public override void WriteQualifiedName(string localName, string ns) => throw null; + public override void WriteRaw(string data) => throw null; + public override void WriteRaw(System.Char[] buffer, int index, int count) => throw null; + public override void WriteStartAttribute(string prefix, string localName, string ns) => throw null; + public override void WriteStartDocument(bool standalone) => throw null; + public override void WriteStartDocument() => throw null; + public override void WriteStartElement(string prefix, string localName, string ns) => throw null; + public override System.Xml.WriteState WriteState { get => throw null; } + public override void WriteString(string text) => throw null; + public override void WriteSurrogateCharEntity(System.Char lowChar, System.Char highChar) => throw null; + public override void WriteWhitespace(string ws) => throw null; + public override string XmlLang { get => throw null; } + public override System.Xml.XmlSpace XmlSpace { get => throw null; } + public XmlTextWriter(string filename, System.Text.Encoding encoding) => throw null; + public XmlTextWriter(System.IO.TextWriter w) => throw null; + public XmlTextWriter(System.IO.Stream w, System.Text.Encoding encoding) => throw null; + } + + // Generated from `System.Xml.XmlTokenizedType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlTokenizedType + { + CDATA, + ENTITIES, + ENTITY, + ENUMERATION, + ID, + IDREF, + IDREFS, + NCName, + NMTOKEN, + NMTOKENS, + NOTATION, + None, + QName, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XmlUrlResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlUrlResolver : System.Xml.XmlResolver + { + public System.Net.Cache.RequestCachePolicy CachePolicy { set => throw null; } + public override System.Net.ICredentials Credentials { set => throw null; } + public override object GetEntity(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public override System.Threading.Tasks.Task GetEntityAsync(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public System.Net.IWebProxy Proxy { set => throw null; } + public override System.Uri ResolveUri(System.Uri baseUri, string relativeUri) => throw null; + public XmlUrlResolver() => throw null; + } + + // Generated from `System.Xml.XmlValidatingReader` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlValidatingReader : System.Xml.XmlReader, System.Xml.IXmlNamespaceResolver, System.Xml.IXmlLineInfo + { + public override int AttributeCount { get => throw null; } + public override string BaseURI { get => throw null; } + public override bool CanReadBinaryContent { get => throw null; } + public override bool CanResolveEntity { get => throw null; } + public override void Close() => throw null; + public override int Depth { get => throw null; } + public override bool EOF { get => throw null; } + public System.Text.Encoding Encoding { get => throw null; } + public System.Xml.EntityHandling EntityHandling { get => throw null; set => throw null; } + public override string GetAttribute(string name) => throw null; + public override string GetAttribute(string localName, string namespaceURI) => throw null; + public override string GetAttribute(int i) => throw null; + System.Collections.Generic.IDictionary System.Xml.IXmlNamespaceResolver.GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + public bool HasLineInfo() => throw null; + public override bool HasValue { get => throw null; } + public override bool IsDefault { get => throw null; } + public override bool IsEmptyElement { get => throw null; } + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public override string LocalName { get => throw null; } + string System.Xml.IXmlNamespaceResolver.LookupNamespace(string prefix) => throw null; + public override string LookupNamespace(string prefix) => throw null; + string System.Xml.IXmlNamespaceResolver.LookupPrefix(string namespaceName) => throw null; + public override void MoveToAttribute(int i) => throw null; + public override bool MoveToAttribute(string name) => throw null; + public override bool MoveToAttribute(string localName, string namespaceURI) => throw null; + public override bool MoveToElement() => throw null; + public override bool MoveToFirstAttribute() => throw null; + public override bool MoveToNextAttribute() => throw null; + public override string Name { get => throw null; } + public override System.Xml.XmlNameTable NameTable { get => throw null; } + public override string NamespaceURI { get => throw null; } + public bool Namespaces { get => throw null; set => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override string Prefix { get => throw null; } + public override System.Char QuoteChar { get => throw null; } + public override bool Read() => throw null; + public override bool ReadAttributeValue() => throw null; + public override int ReadContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBase64(System.Byte[] buffer, int index, int count) => throw null; + public override int ReadElementContentAsBinHex(System.Byte[] buffer, int index, int count) => throw null; + public override System.Xml.ReadState ReadState { get => throw null; } + public override string ReadString() => throw null; + public object ReadTypedValue() => throw null; + public System.Xml.XmlReader Reader { get => throw null; } + public override void ResolveEntity() => throw null; + public object SchemaType { get => throw null; } + public System.Xml.Schema.XmlSchemaCollection Schemas { get => throw null; } + public event System.Xml.Schema.ValidationEventHandler ValidationEventHandler; + public System.Xml.ValidationType ValidationType { get => throw null; set => throw null; } + public override string Value { get => throw null; } + public override string XmlLang { get => throw null; } + public System.Xml.XmlResolver XmlResolver { set => throw null; } + public override System.Xml.XmlSpace XmlSpace { get => throw null; } + public XmlValidatingReader(string xmlFragment, System.Xml.XmlNodeType fragType, System.Xml.XmlParserContext context) => throw null; + public XmlValidatingReader(System.Xml.XmlReader reader) => throw null; + public XmlValidatingReader(System.IO.Stream xmlFragment, System.Xml.XmlNodeType fragType, System.Xml.XmlParserContext context) => throw null; + } + + // Generated from `System.Xml.XmlWhitespace` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlWhitespace : System.Xml.XmlCharacterData + { + public override System.Xml.XmlNode CloneNode(bool deep) => throw null; + public override string LocalName { get => throw null; } + public override string Name { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override System.Xml.XmlNode ParentNode { get => throw null; } + public override System.Xml.XmlNode PreviousText { get => throw null; } + public override string Value { get => throw null; set => throw null; } + public override void WriteContentTo(System.Xml.XmlWriter w) => throw null; + public override void WriteTo(System.Xml.XmlWriter w) => throw null; + protected internal XmlWhitespace(string strData, System.Xml.XmlDocument doc) : base(default(string), default(System.Xml.XmlDocument)) => throw null; + } + + // Generated from `System.Xml.XmlWriter` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlWriter : System.IDisposable, System.IAsyncDisposable + { + public virtual void Close() => throw null; + public static System.Xml.XmlWriter Create(string outputFileName, System.Xml.XmlWriterSettings settings) => throw null; + public static System.Xml.XmlWriter Create(string outputFileName) => throw null; + public static System.Xml.XmlWriter Create(System.Xml.XmlWriter output, System.Xml.XmlWriterSettings settings) => throw null; + public static System.Xml.XmlWriter Create(System.Xml.XmlWriter output) => throw null; + public static System.Xml.XmlWriter Create(System.Text.StringBuilder output, System.Xml.XmlWriterSettings settings) => throw null; + public static System.Xml.XmlWriter Create(System.Text.StringBuilder output) => throw null; + public static System.Xml.XmlWriter Create(System.IO.TextWriter output, System.Xml.XmlWriterSettings settings) => throw null; + public static System.Xml.XmlWriter Create(System.IO.TextWriter output) => throw null; + public static System.Xml.XmlWriter Create(System.IO.Stream output, System.Xml.XmlWriterSettings settings) => throw null; + public static System.Xml.XmlWriter Create(System.IO.Stream output) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public System.Threading.Tasks.ValueTask DisposeAsync() => throw null; + protected virtual System.Threading.Tasks.ValueTask DisposeAsyncCore() => throw null; + public abstract void Flush(); + public virtual System.Threading.Tasks.Task FlushAsync() => throw null; + public abstract string LookupPrefix(string ns); + public virtual System.Xml.XmlWriterSettings Settings { get => throw null; } + public void WriteAttributeString(string prefix, string localName, string ns, string value) => throw null; + public void WriteAttributeString(string localName, string value) => throw null; + public void WriteAttributeString(string localName, string ns, string value) => throw null; + public System.Threading.Tasks.Task WriteAttributeStringAsync(string prefix, string localName, string ns, string value) => throw null; + public virtual void WriteAttributes(System.Xml.XmlReader reader, bool defattr) => throw null; + public virtual System.Threading.Tasks.Task WriteAttributesAsync(System.Xml.XmlReader reader, bool defattr) => throw null; + public abstract void WriteBase64(System.Byte[] buffer, int index, int count); + public virtual System.Threading.Tasks.Task WriteBase64Async(System.Byte[] buffer, int index, int count) => throw null; + public virtual void WriteBinHex(System.Byte[] buffer, int index, int count) => throw null; + public virtual System.Threading.Tasks.Task WriteBinHexAsync(System.Byte[] buffer, int index, int count) => throw null; + public abstract void WriteCData(string text); + public virtual System.Threading.Tasks.Task WriteCDataAsync(string text) => throw null; + public abstract void WriteCharEntity(System.Char ch); + public virtual System.Threading.Tasks.Task WriteCharEntityAsync(System.Char ch) => throw null; + public abstract void WriteChars(System.Char[] buffer, int index, int count); + public virtual System.Threading.Tasks.Task WriteCharsAsync(System.Char[] buffer, int index, int count) => throw null; + public abstract void WriteComment(string text); + public virtual System.Threading.Tasks.Task WriteCommentAsync(string text) => throw null; + public abstract void WriteDocType(string name, string pubid, string sysid, string subset); + public virtual System.Threading.Tasks.Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) => throw null; + public void WriteElementString(string prefix, string localName, string ns, string value) => throw null; + public void WriteElementString(string localName, string value) => throw null; + public void WriteElementString(string localName, string ns, string value) => throw null; + public System.Threading.Tasks.Task WriteElementStringAsync(string prefix, string localName, string ns, string value) => throw null; + public abstract void WriteEndAttribute(); + protected internal virtual System.Threading.Tasks.Task WriteEndAttributeAsync() => throw null; + public abstract void WriteEndDocument(); + public virtual System.Threading.Tasks.Task WriteEndDocumentAsync() => throw null; + public abstract void WriteEndElement(); + public virtual System.Threading.Tasks.Task WriteEndElementAsync() => throw null; + public abstract void WriteEntityRef(string name); + public virtual System.Threading.Tasks.Task WriteEntityRefAsync(string name) => throw null; + public abstract void WriteFullEndElement(); + public virtual System.Threading.Tasks.Task WriteFullEndElementAsync() => throw null; + public virtual void WriteName(string name) => throw null; + public virtual System.Threading.Tasks.Task WriteNameAsync(string name) => throw null; + public virtual void WriteNmToken(string name) => throw null; + public virtual System.Threading.Tasks.Task WriteNmTokenAsync(string name) => throw null; + public virtual void WriteNode(System.Xml.XmlReader reader, bool defattr) => throw null; + public virtual void WriteNode(System.Xml.XPath.XPathNavigator navigator, bool defattr) => throw null; + public virtual System.Threading.Tasks.Task WriteNodeAsync(System.Xml.XmlReader reader, bool defattr) => throw null; + public virtual System.Threading.Tasks.Task WriteNodeAsync(System.Xml.XPath.XPathNavigator navigator, bool defattr) => throw null; + public abstract void WriteProcessingInstruction(string name, string text); + public virtual System.Threading.Tasks.Task WriteProcessingInstructionAsync(string name, string text) => throw null; + public virtual void WriteQualifiedName(string localName, string ns) => throw null; + public virtual System.Threading.Tasks.Task WriteQualifiedNameAsync(string localName, string ns) => throw null; + public abstract void WriteRaw(string data); + public abstract void WriteRaw(System.Char[] buffer, int index, int count); + public virtual System.Threading.Tasks.Task WriteRawAsync(string data) => throw null; + public virtual System.Threading.Tasks.Task WriteRawAsync(System.Char[] buffer, int index, int count) => throw null; + public void WriteStartAttribute(string localName, string ns) => throw null; + public void WriteStartAttribute(string localName) => throw null; + public abstract void WriteStartAttribute(string prefix, string localName, string ns); + protected internal virtual System.Threading.Tasks.Task WriteStartAttributeAsync(string prefix, string localName, string ns) => throw null; + public abstract void WriteStartDocument(bool standalone); + public abstract void WriteStartDocument(); + public virtual System.Threading.Tasks.Task WriteStartDocumentAsync(bool standalone) => throw null; + public virtual System.Threading.Tasks.Task WriteStartDocumentAsync() => throw null; + public void WriteStartElement(string localName, string ns) => throw null; + public void WriteStartElement(string localName) => throw null; + public abstract void WriteStartElement(string prefix, string localName, string ns); + public virtual System.Threading.Tasks.Task WriteStartElementAsync(string prefix, string localName, string ns) => throw null; + public abstract System.Xml.WriteState WriteState { get; } + public abstract void WriteString(string text); + public virtual System.Threading.Tasks.Task WriteStringAsync(string text) => throw null; + public abstract void WriteSurrogateCharEntity(System.Char lowChar, System.Char highChar); + public virtual System.Threading.Tasks.Task WriteSurrogateCharEntityAsync(System.Char lowChar, System.Char highChar) => throw null; + public virtual void WriteValue(string value) => throw null; + public virtual void WriteValue(object value) => throw null; + public virtual void WriteValue(int value) => throw null; + public virtual void WriteValue(float value) => throw null; + public virtual void WriteValue(double value) => throw null; + public virtual void WriteValue(bool value) => throw null; + public virtual void WriteValue(System.Int64 value) => throw null; + public virtual void WriteValue(System.Decimal value) => throw null; + public virtual void WriteValue(System.DateTimeOffset value) => throw null; + public virtual void WriteValue(System.DateTime value) => throw null; + public abstract void WriteWhitespace(string ws); + public virtual System.Threading.Tasks.Task WriteWhitespaceAsync(string ws) => throw null; + public virtual string XmlLang { get => throw null; } + public virtual System.Xml.XmlSpace XmlSpace { get => throw null; } + protected XmlWriter() => throw null; + } + + // Generated from `System.Xml.XmlWriterSettings` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlWriterSettings + { + public bool Async { get => throw null; set => throw null; } + public bool CheckCharacters { get => throw null; set => throw null; } + public System.Xml.XmlWriterSettings Clone() => throw null; + public bool CloseOutput { get => throw null; set => throw null; } + public System.Xml.ConformanceLevel ConformanceLevel { get => throw null; set => throw null; } + public bool DoNotEscapeUriAttributes { get => throw null; set => throw null; } + public System.Text.Encoding Encoding { get => throw null; set => throw null; } + public bool Indent { get => throw null; set => throw null; } + public string IndentChars { get => throw null; set => throw null; } + public System.Xml.NamespaceHandling NamespaceHandling { get => throw null; set => throw null; } + public string NewLineChars { get => throw null; set => throw null; } + public System.Xml.NewLineHandling NewLineHandling { get => throw null; set => throw null; } + public bool NewLineOnAttributes { get => throw null; set => throw null; } + public bool OmitXmlDeclaration { get => throw null; set => throw null; } + public System.Xml.XmlOutputMethod OutputMethod { get => throw null; } + public void Reset() => throw null; + public bool WriteEndDocumentOnClose { get => throw null; set => throw null; } + public XmlWriterSettings() => throw null; + } + + namespace Resolvers + { + // Generated from `System.Xml.Resolvers.XmlKnownDtds` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum XmlKnownDtds + { + All, + None, + Rss091, + Xhtml10, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Resolvers.XmlPreloadedResolver` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlPreloadedResolver : System.Xml.XmlResolver + { + public void Add(System.Uri uri, string value) => throw null; + public void Add(System.Uri uri, System.IO.Stream value) => throw null; + public void Add(System.Uri uri, System.Byte[] value, int offset, int count) => throw null; + public void Add(System.Uri uri, System.Byte[] value) => throw null; + public override System.Net.ICredentials Credentials { set => throw null; } + public override object GetEntity(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public override System.Threading.Tasks.Task GetEntityAsync(System.Uri absoluteUri, string role, System.Type ofObjectToReturn) => throw null; + public System.Collections.Generic.IEnumerable PreloadedUris { get => throw null; } + public void Remove(System.Uri uri) => throw null; + public override System.Uri ResolveUri(System.Uri baseUri, string relativeUri) => throw null; + public override bool SupportsType(System.Uri absoluteUri, System.Type type) => throw null; + public XmlPreloadedResolver(System.Xml.XmlResolver fallbackResolver, System.Xml.Resolvers.XmlKnownDtds preloadedDtds, System.Collections.Generic.IEqualityComparer uriComparer) => throw null; + public XmlPreloadedResolver(System.Xml.XmlResolver fallbackResolver, System.Xml.Resolvers.XmlKnownDtds preloadedDtds) => throw null; + public XmlPreloadedResolver(System.Xml.XmlResolver fallbackResolver) => throw null; + public XmlPreloadedResolver(System.Xml.Resolvers.XmlKnownDtds preloadedDtds) => throw null; + public XmlPreloadedResolver() => throw null; + } + + } + namespace Schema + { + // Generated from `System.Xml.Schema.IXmlSchemaInfo` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlSchemaInfo + { + bool IsDefault { get; } + bool IsNil { get; } + System.Xml.Schema.XmlSchemaSimpleType MemberType { get; } + System.Xml.Schema.XmlSchemaAttribute SchemaAttribute { get; } + System.Xml.Schema.XmlSchemaElement SchemaElement { get; } + System.Xml.Schema.XmlSchemaType SchemaType { get; } + System.Xml.Schema.XmlSchemaValidity Validity { get; } + } + + // Generated from `System.Xml.Schema.ValidationEventArgs` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ValidationEventArgs : System.EventArgs + { + public System.Xml.Schema.XmlSchemaException Exception { get => throw null; } + public string Message { get => throw null; } + public System.Xml.Schema.XmlSeverityType Severity { get => throw null; } + } + + // Generated from `System.Xml.Schema.ValidationEventHandler` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e); + + // Generated from `System.Xml.Schema.XmlAtomicValue` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAtomicValue : System.Xml.XPath.XPathItem, System.ICloneable + { + public System.Xml.Schema.XmlAtomicValue Clone() => throw null; + object System.ICloneable.Clone() => throw null; + public override bool IsNode { get => throw null; } + public override string ToString() => throw null; + public override object TypedValue { get => throw null; } + public override string Value { get => throw null; } + public override object ValueAs(System.Type type, System.Xml.IXmlNamespaceResolver nsResolver) => throw null; + public override bool ValueAsBoolean { get => throw null; } + public override System.DateTime ValueAsDateTime { get => throw null; } + public override double ValueAsDouble { get => throw null; } + public override int ValueAsInt { get => throw null; } + public override System.Int64 ValueAsLong { get => throw null; } + public override System.Type ValueType { get => throw null; } + public override System.Xml.Schema.XmlSchemaType XmlType { get => throw null; } + } + + // Generated from `System.Xml.Schema.XmlSchema` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchema : System.Xml.Schema.XmlSchemaObject + { + public System.Xml.Schema.XmlSchemaForm AttributeFormDefault { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable AttributeGroups { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable Attributes { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod BlockDefault { get => throw null; set => throw null; } + public void Compile(System.Xml.Schema.ValidationEventHandler validationEventHandler, System.Xml.XmlResolver resolver) => throw null; + public void Compile(System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public System.Xml.Schema.XmlSchemaForm ElementFormDefault { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable Elements { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod FinalDefault { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable Groups { get => throw null; } + public string Id { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Includes { get => throw null; } + public const string InstanceNamespace = default; + public bool IsCompiled { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public const string Namespace = default; + public System.Xml.Schema.XmlSchemaObjectTable Notations { get => throw null; } + public static System.Xml.Schema.XmlSchema Read(System.Xml.XmlReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public static System.Xml.Schema.XmlSchema Read(System.IO.TextReader reader, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public static System.Xml.Schema.XmlSchema Read(System.IO.Stream stream, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public System.Xml.Schema.XmlSchemaObjectTable SchemaTypes { get => throw null; } + public string TargetNamespace { get => throw null; set => throw null; } + public System.Xml.XmlAttribute[] UnhandledAttributes { get => throw null; set => throw null; } + public string Version { get => throw null; set => throw null; } + public void Write(System.Xml.XmlWriter writer, System.Xml.XmlNamespaceManager namespaceManager) => throw null; + public void Write(System.Xml.XmlWriter writer) => throw null; + public void Write(System.IO.TextWriter writer, System.Xml.XmlNamespaceManager namespaceManager) => throw null; + public void Write(System.IO.TextWriter writer) => throw null; + public void Write(System.IO.Stream stream, System.Xml.XmlNamespaceManager namespaceManager) => throw null; + public void Write(System.IO.Stream stream) => throw null; + public XmlSchema() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAll` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAll : System.Xml.Schema.XmlSchemaGroupBase + { + public override System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public XmlSchemaAll() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAnnotated` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAnnotated : System.Xml.Schema.XmlSchemaObject + { + public System.Xml.Schema.XmlSchemaAnnotation Annotation { get => throw null; set => throw null; } + public string Id { get => throw null; set => throw null; } + public System.Xml.XmlAttribute[] UnhandledAttributes { get => throw null; set => throw null; } + public XmlSchemaAnnotated() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAnnotation` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAnnotation : System.Xml.Schema.XmlSchemaObject + { + public string Id { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public System.Xml.XmlAttribute[] UnhandledAttributes { get => throw null; set => throw null; } + public XmlSchemaAnnotation() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAny` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAny : System.Xml.Schema.XmlSchemaParticle + { + public string Namespace { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaContentProcessing ProcessContents { get => throw null; set => throw null; } + public XmlSchemaAny() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAnyAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAnyAttribute : System.Xml.Schema.XmlSchemaAnnotated + { + public string Namespace { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaContentProcessing ProcessContents { get => throw null; set => throw null; } + public XmlSchemaAnyAttribute() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAppInfo` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAppInfo : System.Xml.Schema.XmlSchemaObject + { + public System.Xml.XmlNode[] Markup { get => throw null; set => throw null; } + public string Source { get => throw null; set => throw null; } + public XmlSchemaAppInfo() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAttribute : System.Xml.Schema.XmlSchemaAnnotated + { + public System.Xml.Schema.XmlSchemaSimpleType AttributeSchemaType { get => throw null; } + public object AttributeType { get => throw null; } + public string DefaultValue { get => throw null; set => throw null; } + public string FixedValue { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public System.Xml.XmlQualifiedName RefName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaSimpleType SchemaType { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName SchemaTypeName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaUse Use { get => throw null; set => throw null; } + public XmlSchemaAttribute() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAttributeGroup` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAttributeGroup : System.Xml.Schema.XmlSchemaAnnotated + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public System.Xml.Schema.XmlSchemaAttributeGroup RedefinedAttributeGroup { get => throw null; } + public XmlSchemaAttributeGroup() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaAttributeGroupRef` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaAttributeGroupRef : System.Xml.Schema.XmlSchemaAnnotated + { + public System.Xml.XmlQualifiedName RefName { get => throw null; set => throw null; } + public XmlSchemaAttributeGroupRef() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaChoice` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaChoice : System.Xml.Schema.XmlSchemaGroupBase + { + public override System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public XmlSchemaChoice() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaCollection` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(System.Xml.Schema.XmlSchemaCollection schema) => throw null; + public System.Xml.Schema.XmlSchema Add(string ns, string uri) => throw null; + public System.Xml.Schema.XmlSchema Add(string ns, System.Xml.XmlReader reader, System.Xml.XmlResolver resolver) => throw null; + public System.Xml.Schema.XmlSchema Add(string ns, System.Xml.XmlReader reader) => throw null; + public System.Xml.Schema.XmlSchema Add(System.Xml.Schema.XmlSchema schema, System.Xml.XmlResolver resolver) => throw null; + public System.Xml.Schema.XmlSchema Add(System.Xml.Schema.XmlSchema schema) => throw null; + public bool Contains(string ns) => throw null; + public bool Contains(System.Xml.Schema.XmlSchema schema) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Xml.Schema.XmlSchema[] array, int index) => throw null; + public int Count { get => throw null; } + int System.Collections.ICollection.Count { get => throw null; } + public System.Xml.Schema.XmlSchemaCollectionEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Xml.Schema.XmlSchema this[string ns] { get => throw null; } + public System.Xml.XmlNameTable NameTable { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public event System.Xml.Schema.ValidationEventHandler ValidationEventHandler; + public XmlSchemaCollection(System.Xml.XmlNameTable nametable) => throw null; + public XmlSchemaCollection() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaCollectionEnumerator` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaCollectionEnumerator : System.Collections.IEnumerator + { + public System.Xml.Schema.XmlSchema Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + bool System.Collections.IEnumerator.MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaCompilationSettings` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaCompilationSettings + { + public bool EnableUpaCheck { get => throw null; set => throw null; } + public XmlSchemaCompilationSettings() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaComplexContent` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaComplexContent : System.Xml.Schema.XmlSchemaContentModel + { + public override System.Xml.Schema.XmlSchemaContent Content { get => throw null; set => throw null; } + public bool IsMixed { get => throw null; set => throw null; } + public XmlSchemaComplexContent() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaComplexContentExtension` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaComplexContentExtension : System.Xml.Schema.XmlSchemaContent + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public System.Xml.XmlQualifiedName BaseTypeName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaParticle Particle { get => throw null; set => throw null; } + public XmlSchemaComplexContentExtension() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaComplexContentRestriction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaComplexContentRestriction : System.Xml.Schema.XmlSchemaContent + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public System.Xml.XmlQualifiedName BaseTypeName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaParticle Particle { get => throw null; set => throw null; } + public XmlSchemaComplexContentRestriction() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaComplexType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaComplexType : System.Xml.Schema.XmlSchemaType + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable AttributeUses { get => throw null; } + public System.Xml.Schema.XmlSchemaAnyAttribute AttributeWildcard { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod Block { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod BlockResolved { get => throw null; } + public System.Xml.Schema.XmlSchemaContentModel ContentModel { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaContentType ContentType { get => throw null; } + public System.Xml.Schema.XmlSchemaParticle ContentTypeParticle { get => throw null; } + public bool IsAbstract { get => throw null; set => throw null; } + public override bool IsMixed { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaParticle Particle { get => throw null; set => throw null; } + public XmlSchemaComplexType() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaContent` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaContent : System.Xml.Schema.XmlSchemaAnnotated + { + protected XmlSchemaContent() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaContentModel` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaContentModel : System.Xml.Schema.XmlSchemaAnnotated + { + public abstract System.Xml.Schema.XmlSchemaContent Content { get; set; } + protected XmlSchemaContentModel() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaContentProcessing` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaContentProcessing + { + Lax, + None, + Skip, + Strict, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaContentType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaContentType + { + ElementOnly, + Empty, + Mixed, + TextOnly, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaDatatype` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaDatatype + { + public virtual object ChangeType(object value, System.Type targetType, System.Xml.IXmlNamespaceResolver namespaceResolver) => throw null; + public virtual object ChangeType(object value, System.Type targetType) => throw null; + public virtual bool IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype datatype) => throw null; + public abstract object ParseValue(string s, System.Xml.XmlNameTable nameTable, System.Xml.IXmlNamespaceResolver nsmgr); + public abstract System.Xml.XmlTokenizedType TokenizedType { get; } + public virtual System.Xml.Schema.XmlTypeCode TypeCode { get => throw null; } + public abstract System.Type ValueType { get; } + public virtual System.Xml.Schema.XmlSchemaDatatypeVariety Variety { get => throw null; } + } + + // Generated from `System.Xml.Schema.XmlSchemaDatatypeVariety` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaDatatypeVariety + { + Atomic, + List, + Union, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaDerivationMethod` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum XmlSchemaDerivationMethod + { + All, + Empty, + Extension, + List, + None, + Restriction, + Substitution, + Union, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaDocumentation` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaDocumentation : System.Xml.Schema.XmlSchemaObject + { + public string Language { get => throw null; set => throw null; } + public System.Xml.XmlNode[] Markup { get => throw null; set => throw null; } + public string Source { get => throw null; set => throw null; } + public XmlSchemaDocumentation() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaElement` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaElement : System.Xml.Schema.XmlSchemaParticle + { + public System.Xml.Schema.XmlSchemaDerivationMethod Block { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod BlockResolved { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Constraints { get => throw null; } + public string DefaultValue { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaType ElementSchemaType { get => throw null; } + public object ElementType { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod Final { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod FinalResolved { get => throw null; } + public string FixedValue { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public bool IsAbstract { get => throw null; set => throw null; } + public bool IsNillable { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public System.Xml.XmlQualifiedName RefName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaType SchemaType { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName SchemaTypeName { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName SubstitutionGroup { get => throw null; set => throw null; } + public XmlSchemaElement() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaEnumerationFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaEnumerationFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaEnumerationFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public override string Message { get => throw null; } + public System.Xml.Schema.XmlSchemaObject SourceSchemaObject { get => throw null; } + public string SourceUri { get => throw null; } + public XmlSchemaException(string message, System.Exception innerException, int lineNumber, int linePosition) => throw null; + public XmlSchemaException(string message, System.Exception innerException) => throw null; + public XmlSchemaException(string message) => throw null; + public XmlSchemaException() => throw null; + protected XmlSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaExternal` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaExternal : System.Xml.Schema.XmlSchemaObject + { + public string Id { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchema Schema { get => throw null; set => throw null; } + public string SchemaLocation { get => throw null; set => throw null; } + public System.Xml.XmlAttribute[] UnhandledAttributes { get => throw null; set => throw null; } + protected XmlSchemaExternal() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaFacet : System.Xml.Schema.XmlSchemaAnnotated + { + public virtual bool IsFixed { get => throw null; set => throw null; } + public string Value { get => throw null; set => throw null; } + protected XmlSchemaFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaForm` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaForm + { + None, + Qualified, + Unqualified, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaFractionDigitsFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaFractionDigitsFacet : System.Xml.Schema.XmlSchemaNumericFacet + { + public XmlSchemaFractionDigitsFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaGroup` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaGroup : System.Xml.Schema.XmlSchemaAnnotated + { + public string Name { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaGroupBase Particle { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public XmlSchemaGroup() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaGroupBase` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaGroupBase : System.Xml.Schema.XmlSchemaParticle + { + public abstract System.Xml.Schema.XmlSchemaObjectCollection Items { get; } + internal XmlSchemaGroupBase() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaGroupRef` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaGroupRef : System.Xml.Schema.XmlSchemaParticle + { + public System.Xml.Schema.XmlSchemaGroupBase Particle { get => throw null; } + public System.Xml.XmlQualifiedName RefName { get => throw null; set => throw null; } + public XmlSchemaGroupRef() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaIdentityConstraint` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaIdentityConstraint : System.Xml.Schema.XmlSchemaAnnotated + { + public System.Xml.Schema.XmlSchemaObjectCollection Fields { get => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public System.Xml.Schema.XmlSchemaXPath Selector { get => throw null; set => throw null; } + public XmlSchemaIdentityConstraint() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaImport` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaImport : System.Xml.Schema.XmlSchemaExternal + { + public System.Xml.Schema.XmlSchemaAnnotation Annotation { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public XmlSchemaImport() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaInclude` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaInclude : System.Xml.Schema.XmlSchemaExternal + { + public System.Xml.Schema.XmlSchemaAnnotation Annotation { get => throw null; set => throw null; } + public XmlSchemaInclude() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaInference` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaInference + { + public System.Xml.Schema.XmlSchemaSet InferSchema(System.Xml.XmlReader instanceDocument, System.Xml.Schema.XmlSchemaSet schemas) => throw null; + public System.Xml.Schema.XmlSchemaSet InferSchema(System.Xml.XmlReader instanceDocument) => throw null; + // Generated from `System.Xml.Schema.XmlSchemaInference.InferenceOption` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum InferenceOption + { + // Stub generator skipped constructor + Relaxed, + Restricted, + } + + + public System.Xml.Schema.XmlSchemaInference.InferenceOption Occurrence { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaInference.InferenceOption TypeInference { get => throw null; set => throw null; } + public XmlSchemaInference() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaInferenceException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaInferenceException : System.Xml.Schema.XmlSchemaException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public XmlSchemaInferenceException(string message, System.Exception innerException, int lineNumber, int linePosition) => throw null; + public XmlSchemaInferenceException(string message, System.Exception innerException) => throw null; + public XmlSchemaInferenceException(string message) => throw null; + public XmlSchemaInferenceException() => throw null; + protected XmlSchemaInferenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaInfo` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaInfo : System.Xml.Schema.IXmlSchemaInfo + { + public System.Xml.Schema.XmlSchemaContentType ContentType { get => throw null; set => throw null; } + public bool IsDefault { get => throw null; set => throw null; } + public bool IsNil { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaSimpleType MemberType { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaAttribute SchemaAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaElement SchemaElement { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaType SchemaType { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaValidity Validity { get => throw null; set => throw null; } + public XmlSchemaInfo() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaKey` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaKey : System.Xml.Schema.XmlSchemaIdentityConstraint + { + public XmlSchemaKey() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaKeyref` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaKeyref : System.Xml.Schema.XmlSchemaIdentityConstraint + { + public System.Xml.XmlQualifiedName Refer { get => throw null; set => throw null; } + public XmlSchemaKeyref() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaLengthFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaLengthFacet : System.Xml.Schema.XmlSchemaNumericFacet + { + public XmlSchemaLengthFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMaxExclusiveFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMaxExclusiveFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaMaxExclusiveFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMaxInclusiveFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMaxInclusiveFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaMaxInclusiveFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMaxLengthFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMaxLengthFacet : System.Xml.Schema.XmlSchemaNumericFacet + { + public XmlSchemaMaxLengthFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMinExclusiveFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMinExclusiveFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaMinExclusiveFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMinInclusiveFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMinInclusiveFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaMinInclusiveFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaMinLengthFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaMinLengthFacet : System.Xml.Schema.XmlSchemaNumericFacet + { + public XmlSchemaMinLengthFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaNotation` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaNotation : System.Xml.Schema.XmlSchemaAnnotated + { + public string Name { get => throw null; set => throw null; } + public string Public { get => throw null; set => throw null; } + public string System { get => throw null; set => throw null; } + public XmlSchemaNotation() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaNumericFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaNumericFacet : System.Xml.Schema.XmlSchemaFacet + { + protected XmlSchemaNumericFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaObject` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaObject + { + public int LineNumber { get => throw null; set => throw null; } + public int LinePosition { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlSerializerNamespaces Namespaces { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObject Parent { get => throw null; set => throw null; } + public string SourceUri { get => throw null; set => throw null; } + protected XmlSchemaObject() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaObjectCollection` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaObjectCollection : System.Collections.CollectionBase + { + public int Add(System.Xml.Schema.XmlSchemaObject item) => throw null; + public bool Contains(System.Xml.Schema.XmlSchemaObject item) => throw null; + public void CopyTo(System.Xml.Schema.XmlSchemaObject[] array, int index) => throw null; + public System.Xml.Schema.XmlSchemaObjectEnumerator GetEnumerator() => throw null; + public int IndexOf(System.Xml.Schema.XmlSchemaObject item) => throw null; + public void Insert(int index, System.Xml.Schema.XmlSchemaObject item) => throw null; + public virtual System.Xml.Schema.XmlSchemaObject this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object item) => throw null; + protected override void OnRemove(int index, object item) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + public void Remove(System.Xml.Schema.XmlSchemaObject item) => throw null; + public XmlSchemaObjectCollection(System.Xml.Schema.XmlSchemaObject parent) => throw null; + public XmlSchemaObjectCollection() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaObjectEnumerator` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaObjectEnumerator : System.Collections.IEnumerator + { + public System.Xml.Schema.XmlSchemaObject Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public bool MoveNext() => throw null; + bool System.Collections.IEnumerator.MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + public void Reset() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaObjectTable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaObjectTable + { + public bool Contains(System.Xml.XmlQualifiedName name) => throw null; + public int Count { get => throw null; } + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + public System.Xml.Schema.XmlSchemaObject this[System.Xml.XmlQualifiedName name] { get => throw null; } + public System.Collections.ICollection Names { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `System.Xml.Schema.XmlSchemaParticle` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaParticle : System.Xml.Schema.XmlSchemaAnnotated + { + public System.Decimal MaxOccurs { get => throw null; set => throw null; } + public string MaxOccursString { get => throw null; set => throw null; } + public System.Decimal MinOccurs { get => throw null; set => throw null; } + public string MinOccursString { get => throw null; set => throw null; } + protected XmlSchemaParticle() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaPatternFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaPatternFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaPatternFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaRedefine` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaRedefine : System.Xml.Schema.XmlSchemaExternal + { + public System.Xml.Schema.XmlSchemaObjectTable AttributeGroups { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable Groups { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable SchemaTypes { get => throw null; } + public XmlSchemaRedefine() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSequence` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSequence : System.Xml.Schema.XmlSchemaGroupBase + { + public override System.Xml.Schema.XmlSchemaObjectCollection Items { get => throw null; } + public XmlSchemaSequence() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSet + { + public void Add(System.Xml.Schema.XmlSchemaSet schemas) => throw null; + public System.Xml.Schema.XmlSchema Add(string targetNamespace, string schemaUri) => throw null; + public System.Xml.Schema.XmlSchema Add(string targetNamespace, System.Xml.XmlReader schemaDocument) => throw null; + public System.Xml.Schema.XmlSchema Add(System.Xml.Schema.XmlSchema schema) => throw null; + public System.Xml.Schema.XmlSchemaCompilationSettings CompilationSettings { get => throw null; set => throw null; } + public void Compile() => throw null; + public bool Contains(string targetNamespace) => throw null; + public bool Contains(System.Xml.Schema.XmlSchema schema) => throw null; + public void CopyTo(System.Xml.Schema.XmlSchema[] schemas, int index) => throw null; + public int Count { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable GlobalAttributes { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable GlobalElements { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectTable GlobalTypes { get => throw null; } + public bool IsCompiled { get => throw null; } + public System.Xml.XmlNameTable NameTable { get => throw null; } + public System.Xml.Schema.XmlSchema Remove(System.Xml.Schema.XmlSchema schema) => throw null; + public bool RemoveRecursive(System.Xml.Schema.XmlSchema schemaToRemove) => throw null; + public System.Xml.Schema.XmlSchema Reprocess(System.Xml.Schema.XmlSchema schema) => throw null; + public System.Collections.ICollection Schemas(string targetNamespace) => throw null; + public System.Collections.ICollection Schemas() => throw null; + public event System.Xml.Schema.ValidationEventHandler ValidationEventHandler; + public System.Xml.XmlResolver XmlResolver { set => throw null; } + public XmlSchemaSet(System.Xml.XmlNameTable nameTable) => throw null; + public XmlSchemaSet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleContent` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleContent : System.Xml.Schema.XmlSchemaContentModel + { + public override System.Xml.Schema.XmlSchemaContent Content { get => throw null; set => throw null; } + public XmlSchemaSimpleContent() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleContentExtension` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleContentExtension : System.Xml.Schema.XmlSchemaContent + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public System.Xml.XmlQualifiedName BaseTypeName { get => throw null; set => throw null; } + public XmlSchemaSimpleContentExtension() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleContentRestriction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleContentRestriction : System.Xml.Schema.XmlSchemaContent + { + public System.Xml.Schema.XmlSchemaAnyAttribute AnyAttribute { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Attributes { get => throw null; } + public System.Xml.Schema.XmlSchemaSimpleType BaseType { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName BaseTypeName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Facets { get => throw null; } + public XmlSchemaSimpleContentRestriction() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleType : System.Xml.Schema.XmlSchemaType + { + public System.Xml.Schema.XmlSchemaSimpleTypeContent Content { get => throw null; set => throw null; } + public XmlSchemaSimpleType() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleTypeContent` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSchemaSimpleTypeContent : System.Xml.Schema.XmlSchemaAnnotated + { + protected XmlSchemaSimpleTypeContent() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleTypeList` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleTypeList : System.Xml.Schema.XmlSchemaSimpleTypeContent + { + public System.Xml.Schema.XmlSchemaSimpleType BaseItemType { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaSimpleType ItemType { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName ItemTypeName { get => throw null; set => throw null; } + public XmlSchemaSimpleTypeList() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleTypeRestriction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleTypeRestriction : System.Xml.Schema.XmlSchemaSimpleTypeContent + { + public System.Xml.Schema.XmlSchemaSimpleType BaseType { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName BaseTypeName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection Facets { get => throw null; } + public XmlSchemaSimpleTypeRestriction() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaSimpleTypeUnion` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaSimpleTypeUnion : System.Xml.Schema.XmlSchemaSimpleTypeContent + { + public System.Xml.Schema.XmlSchemaSimpleType[] BaseMemberTypes { get => throw null; } + public System.Xml.Schema.XmlSchemaObjectCollection BaseTypes { get => throw null; } + public System.Xml.XmlQualifiedName[] MemberTypes { get => throw null; set => throw null; } + public XmlSchemaSimpleTypeUnion() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaTotalDigitsFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaTotalDigitsFacet : System.Xml.Schema.XmlSchemaNumericFacet + { + public XmlSchemaTotalDigitsFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaType : System.Xml.Schema.XmlSchemaAnnotated + { + public object BaseSchemaType { get => throw null; } + public System.Xml.Schema.XmlSchemaType BaseXmlSchemaType { get => throw null; } + public System.Xml.Schema.XmlSchemaDatatype Datatype { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod DerivedBy { get => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod Final { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaDerivationMethod FinalResolved { get => throw null; } + public static System.Xml.Schema.XmlSchemaComplexType GetBuiltInComplexType(System.Xml.XmlQualifiedName qualifiedName) => throw null; + public static System.Xml.Schema.XmlSchemaComplexType GetBuiltInComplexType(System.Xml.Schema.XmlTypeCode typeCode) => throw null; + public static System.Xml.Schema.XmlSchemaSimpleType GetBuiltInSimpleType(System.Xml.XmlQualifiedName qualifiedName) => throw null; + public static System.Xml.Schema.XmlSchemaSimpleType GetBuiltInSimpleType(System.Xml.Schema.XmlTypeCode typeCode) => throw null; + public static bool IsDerivedFrom(System.Xml.Schema.XmlSchemaType derivedType, System.Xml.Schema.XmlSchemaType baseType, System.Xml.Schema.XmlSchemaDerivationMethod except) => throw null; + public virtual bool IsMixed { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName QualifiedName { get => throw null; } + public System.Xml.Schema.XmlTypeCode TypeCode { get => throw null; } + public XmlSchemaType() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaUnique` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaUnique : System.Xml.Schema.XmlSchemaIdentityConstraint + { + public XmlSchemaUnique() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaUse` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaUse + { + None, + Optional, + Prohibited, + Required, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaValidationException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaValidationException : System.Xml.Schema.XmlSchemaException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected internal void SetSourceObject(object sourceObject) => throw null; + public object SourceObject { get => throw null; } + public XmlSchemaValidationException(string message, System.Exception innerException, int lineNumber, int linePosition) => throw null; + public XmlSchemaValidationException(string message, System.Exception innerException) => throw null; + public XmlSchemaValidationException(string message) => throw null; + public XmlSchemaValidationException() => throw null; + protected XmlSchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaValidationFlags` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum XmlSchemaValidationFlags + { + AllowXmlAttributes, + None, + ProcessIdentityConstraints, + ProcessInlineSchema, + ProcessSchemaLocation, + ReportValidationWarnings, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaValidator` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaValidator + { + public void AddSchema(System.Xml.Schema.XmlSchema schema) => throw null; + public void EndValidation() => throw null; + public System.Xml.Schema.XmlSchemaAttribute[] GetExpectedAttributes() => throw null; + public System.Xml.Schema.XmlSchemaParticle[] GetExpectedParticles() => throw null; + public void GetUnspecifiedDefaultAttributes(System.Collections.ArrayList defaultAttributes) => throw null; + public void Initialize(System.Xml.Schema.XmlSchemaObject partialValidationType) => throw null; + public void Initialize() => throw null; + public System.Xml.IXmlLineInfo LineInfoProvider { get => throw null; set => throw null; } + public void SkipToEndElement(System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public System.Uri SourceUri { get => throw null; set => throw null; } + public object ValidateAttribute(string localName, string namespaceUri, string attributeValue, System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public object ValidateAttribute(string localName, string namespaceUri, System.Xml.Schema.XmlValueGetter attributeValue, System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public void ValidateElement(string localName, string namespaceUri, System.Xml.Schema.XmlSchemaInfo schemaInfo, string xsiType, string xsiNil, string xsiSchemaLocation, string xsiNoNamespaceSchemaLocation) => throw null; + public void ValidateElement(string localName, string namespaceUri, System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public object ValidateEndElement(System.Xml.Schema.XmlSchemaInfo schemaInfo, object typedValue) => throw null; + public object ValidateEndElement(System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public void ValidateEndOfAttributes(System.Xml.Schema.XmlSchemaInfo schemaInfo) => throw null; + public void ValidateText(string elementValue) => throw null; + public void ValidateText(System.Xml.Schema.XmlValueGetter elementValue) => throw null; + public void ValidateWhitespace(string elementValue) => throw null; + public void ValidateWhitespace(System.Xml.Schema.XmlValueGetter elementValue) => throw null; + public event System.Xml.Schema.ValidationEventHandler ValidationEventHandler; + public object ValidationEventSender { get => throw null; set => throw null; } + public System.Xml.XmlResolver XmlResolver { set => throw null; } + public XmlSchemaValidator(System.Xml.XmlNameTable nameTable, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.IXmlNamespaceResolver namespaceResolver, System.Xml.Schema.XmlSchemaValidationFlags validationFlags) => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaValidity` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSchemaValidity + { + Invalid, + NotKnown, + Valid, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlSchemaWhiteSpaceFacet` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaWhiteSpaceFacet : System.Xml.Schema.XmlSchemaFacet + { + public XmlSchemaWhiteSpaceFacet() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSchemaXPath` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaXPath : System.Xml.Schema.XmlSchemaAnnotated + { + public string XPath { get => throw null; set => throw null; } + public XmlSchemaXPath() => throw null; + } + + // Generated from `System.Xml.Schema.XmlSeverityType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSeverityType + { + Error, + Warning, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Schema.XmlTypeCode` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlTypeCode + { + AnyAtomicType, + AnyUri, + Attribute, + Base64Binary, + Boolean, + Byte, + Comment, + Date, + DateTime, + DayTimeDuration, + Decimal, + Document, + Double, + Duration, + Element, + Entity, + Float, + GDay, + GMonth, + GMonthDay, + GYear, + GYearMonth, + HexBinary, + Id, + Idref, + Int, + Integer, + Item, + Language, + Long, + NCName, + Name, + Namespace, + NegativeInteger, + NmToken, + Node, + NonNegativeInteger, + NonPositiveInteger, + None, + NormalizedString, + Notation, + PositiveInteger, + ProcessingInstruction, + QName, + Short, + String, + Text, + Time, + Token, + UnsignedByte, + UnsignedInt, + UnsignedLong, + UnsignedShort, + UntypedAtomic, + // Stub generator skipped constructor + YearMonthDuration, + } + + // Generated from `System.Xml.Schema.XmlValueGetter` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate object XmlValueGetter(); + + } + namespace Serialization + { + // Generated from `System.Xml.Serialization.IXmlSerializable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlSerializable + { + System.Xml.Schema.XmlSchema GetSchema(); + void ReadXml(System.Xml.XmlReader reader); + void WriteXml(System.Xml.XmlWriter writer); + } + + // Generated from `System.Xml.Serialization.XmlAnyAttributeAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAnyAttributeAttribute : System.Attribute + { + public XmlAnyAttributeAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlAnyElementAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAnyElementAttribute : System.Attribute + { + public string Name { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public XmlAnyElementAttribute(string name, string ns) => throw null; + public XmlAnyElementAttribute(string name) => throw null; + public XmlAnyElementAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlAttributeAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttributeAttribute : System.Attribute + { + public string AttributeName { get => throw null; set => throw null; } + public string DataType { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + public XmlAttributeAttribute(string attributeName, System.Type type) => throw null; + public XmlAttributeAttribute(string attributeName) => throw null; + public XmlAttributeAttribute(System.Type type) => throw null; + public XmlAttributeAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlElementAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlElementAttribute : System.Attribute + { + public string DataType { get => throw null; set => throw null; } + public string ElementName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + public XmlElementAttribute(string elementName, System.Type type) => throw null; + public XmlElementAttribute(string elementName) => throw null; + public XmlElementAttribute(System.Type type) => throw null; + public XmlElementAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlEnumAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlEnumAttribute : System.Attribute + { + public string Name { get => throw null; set => throw null; } + public XmlEnumAttribute(string name) => throw null; + public XmlEnumAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlIgnoreAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlIgnoreAttribute : System.Attribute + { + public XmlIgnoreAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlNamespaceDeclarationsAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNamespaceDeclarationsAttribute : System.Attribute + { + public XmlNamespaceDeclarationsAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlRootAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlRootAttribute : System.Attribute + { + public string DataType { get => throw null; set => throw null; } + public string ElementName { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public XmlRootAttribute(string elementName) => throw null; + public XmlRootAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSchemaProviderAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaProviderAttribute : System.Attribute + { + public bool IsAny { get => throw null; set => throw null; } + public string MethodName { get => throw null; } + public XmlSchemaProviderAttribute(string methodName) => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializerNamespaces` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSerializerNamespaces + { + public void Add(string prefix, string ns) => throw null; + public int Count { get => throw null; } + public System.Xml.XmlQualifiedName[] ToArray() => throw null; + public XmlSerializerNamespaces(System.Xml.XmlQualifiedName[] namespaces) => throw null; + public XmlSerializerNamespaces(System.Xml.Serialization.XmlSerializerNamespaces namespaces) => throw null; + public XmlSerializerNamespaces() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlTextAttribute` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlTextAttribute : System.Attribute + { + public string DataType { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + public XmlTextAttribute(System.Type type) => throw null; + public XmlTextAttribute() => throw null; + } + + } + namespace XPath + { + // Generated from `System.Xml.XPath.IXPathNavigable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXPathNavigable + { + System.Xml.XPath.XPathNavigator CreateNavigator(); + } + + // Generated from `System.Xml.XPath.XPathExpression` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XPathExpression + { + public abstract void AddSort(object expr, System.Xml.XPath.XmlSortOrder order, System.Xml.XPath.XmlCaseOrder caseOrder, string lang, System.Xml.XPath.XmlDataType dataType); + public abstract void AddSort(object expr, System.Collections.IComparer comparer); + public abstract System.Xml.XPath.XPathExpression Clone(); + public static System.Xml.XPath.XPathExpression Compile(string xpath, System.Xml.IXmlNamespaceResolver nsResolver) => throw null; + public static System.Xml.XPath.XPathExpression Compile(string xpath) => throw null; + public abstract string Expression { get; } + public abstract System.Xml.XPath.XPathResultType ReturnType { get; } + public abstract void SetContext(System.Xml.XmlNamespaceManager nsManager); + public abstract void SetContext(System.Xml.IXmlNamespaceResolver nsResolver); + } + + // Generated from `System.Xml.XPath.XPathItem` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XPathItem + { + public abstract bool IsNode { get; } + public abstract object TypedValue { get; } + public abstract string Value { get; } + public virtual object ValueAs(System.Type returnType) => throw null; + public abstract object ValueAs(System.Type returnType, System.Xml.IXmlNamespaceResolver nsResolver); + public abstract bool ValueAsBoolean { get; } + public abstract System.DateTime ValueAsDateTime { get; } + public abstract double ValueAsDouble { get; } + public abstract int ValueAsInt { get; } + public abstract System.Int64 ValueAsLong { get; } + public abstract System.Type ValueType { get; } + protected XPathItem() => throw null; + public abstract System.Xml.Schema.XmlSchemaType XmlType { get; } + } + + // Generated from `System.Xml.XPath.XPathNamespaceScope` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XPathNamespaceScope + { + All, + ExcludeXml, + Local, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XPath.XPathNavigator` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XPathNavigator : System.Xml.XPath.XPathItem, System.Xml.XPath.IXPathNavigable, System.Xml.IXmlNamespaceResolver, System.ICloneable + { + public virtual void AppendChild(string newChild) => throw null; + public virtual void AppendChild(System.Xml.XmlReader newChild) => throw null; + public virtual void AppendChild(System.Xml.XPath.XPathNavigator newChild) => throw null; + public virtual System.Xml.XmlWriter AppendChild() => throw null; + public virtual void AppendChildElement(string prefix, string localName, string namespaceURI, string value) => throw null; + public abstract string BaseURI { get; } + public virtual bool CanEdit { get => throw null; } + public virtual bool CheckValidity(System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public abstract System.Xml.XPath.XPathNavigator Clone(); + object System.ICloneable.Clone() => throw null; + public virtual System.Xml.XmlNodeOrder ComparePosition(System.Xml.XPath.XPathNavigator nav) => throw null; + public virtual System.Xml.XPath.XPathExpression Compile(string xpath) => throw null; + public virtual void CreateAttribute(string prefix, string localName, string namespaceURI, string value) => throw null; + public virtual System.Xml.XmlWriter CreateAttributes() => throw null; + public virtual System.Xml.XPath.XPathNavigator CreateNavigator() => throw null; + public virtual void DeleteRange(System.Xml.XPath.XPathNavigator lastSiblingToDelete) => throw null; + public virtual void DeleteSelf() => throw null; + public virtual object Evaluate(string xpath, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public virtual object Evaluate(string xpath) => throw null; + public virtual object Evaluate(System.Xml.XPath.XPathExpression expr, System.Xml.XPath.XPathNodeIterator context) => throw null; + public virtual object Evaluate(System.Xml.XPath.XPathExpression expr) => throw null; + public virtual string GetAttribute(string localName, string namespaceURI) => throw null; + public virtual string GetNamespace(string name) => throw null; + public virtual System.Collections.Generic.IDictionary GetNamespacesInScope(System.Xml.XmlNamespaceScope scope) => throw null; + public virtual bool HasAttributes { get => throw null; } + public virtual bool HasChildren { get => throw null; } + public virtual string InnerXml { get => throw null; set => throw null; } + public virtual void InsertAfter(string newSibling) => throw null; + public virtual void InsertAfter(System.Xml.XmlReader newSibling) => throw null; + public virtual void InsertAfter(System.Xml.XPath.XPathNavigator newSibling) => throw null; + public virtual System.Xml.XmlWriter InsertAfter() => throw null; + public virtual void InsertBefore(string newSibling) => throw null; + public virtual void InsertBefore(System.Xml.XmlReader newSibling) => throw null; + public virtual void InsertBefore(System.Xml.XPath.XPathNavigator newSibling) => throw null; + public virtual System.Xml.XmlWriter InsertBefore() => throw null; + public virtual void InsertElementAfter(string prefix, string localName, string namespaceURI, string value) => throw null; + public virtual void InsertElementBefore(string prefix, string localName, string namespaceURI, string value) => throw null; + public virtual bool IsDescendant(System.Xml.XPath.XPathNavigator nav) => throw null; + public abstract bool IsEmptyElement { get; } + public override bool IsNode { get => throw null; } + public abstract bool IsSamePosition(System.Xml.XPath.XPathNavigator other); + public abstract string LocalName { get; } + public virtual string LookupNamespace(string prefix) => throw null; + public virtual string LookupPrefix(string namespaceURI) => throw null; + public virtual bool Matches(string xpath) => throw null; + public virtual bool Matches(System.Xml.XPath.XPathExpression expr) => throw null; + public abstract bool MoveTo(System.Xml.XPath.XPathNavigator other); + public virtual bool MoveToAttribute(string localName, string namespaceURI) => throw null; + public virtual bool MoveToChild(string localName, string namespaceURI) => throw null; + public virtual bool MoveToChild(System.Xml.XPath.XPathNodeType type) => throw null; + public virtual bool MoveToFirst() => throw null; + public abstract bool MoveToFirstAttribute(); + public abstract bool MoveToFirstChild(); + public bool MoveToFirstNamespace() => throw null; + public abstract bool MoveToFirstNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope); + public virtual bool MoveToFollowing(string localName, string namespaceURI, System.Xml.XPath.XPathNavigator end) => throw null; + public virtual bool MoveToFollowing(string localName, string namespaceURI) => throw null; + public virtual bool MoveToFollowing(System.Xml.XPath.XPathNodeType type, System.Xml.XPath.XPathNavigator end) => throw null; + public virtual bool MoveToFollowing(System.Xml.XPath.XPathNodeType type) => throw null; + public abstract bool MoveToId(string id); + public virtual bool MoveToNamespace(string name) => throw null; + public virtual bool MoveToNext(string localName, string namespaceURI) => throw null; + public virtual bool MoveToNext(System.Xml.XPath.XPathNodeType type) => throw null; + public abstract bool MoveToNext(); + public abstract bool MoveToNextAttribute(); + public bool MoveToNextNamespace() => throw null; + public abstract bool MoveToNextNamespace(System.Xml.XPath.XPathNamespaceScope namespaceScope); + public abstract bool MoveToParent(); + public abstract bool MoveToPrevious(); + public virtual void MoveToRoot() => throw null; + public abstract string Name { get; } + public abstract System.Xml.XmlNameTable NameTable { get; } + public abstract string NamespaceURI { get; } + public static System.Collections.IEqualityComparer NavigatorComparer { get => throw null; } + public abstract System.Xml.XPath.XPathNodeType NodeType { get; } + public virtual string OuterXml { get => throw null; set => throw null; } + public abstract string Prefix { get; } + public virtual void PrependChild(string newChild) => throw null; + public virtual void PrependChild(System.Xml.XmlReader newChild) => throw null; + public virtual void PrependChild(System.Xml.XPath.XPathNavigator newChild) => throw null; + public virtual System.Xml.XmlWriter PrependChild() => throw null; + public virtual void PrependChildElement(string prefix, string localName, string namespaceURI, string value) => throw null; + public virtual System.Xml.XmlReader ReadSubtree() => throw null; + public virtual System.Xml.XmlWriter ReplaceRange(System.Xml.XPath.XPathNavigator lastSiblingToReplace) => throw null; + public virtual void ReplaceSelf(string newNode) => throw null; + public virtual void ReplaceSelf(System.Xml.XmlReader newNode) => throw null; + public virtual void ReplaceSelf(System.Xml.XPath.XPathNavigator newNode) => throw null; + public virtual System.Xml.Schema.IXmlSchemaInfo SchemaInfo { get => throw null; } + public virtual System.Xml.XPath.XPathNodeIterator Select(string xpath, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator Select(string xpath) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator Select(System.Xml.XPath.XPathExpression expr) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectAncestors(string name, string namespaceURI, bool matchSelf) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectAncestors(System.Xml.XPath.XPathNodeType type, bool matchSelf) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectChildren(string name, string namespaceURI) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectChildren(System.Xml.XPath.XPathNodeType type) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectDescendants(string name, string namespaceURI, bool matchSelf) => throw null; + public virtual System.Xml.XPath.XPathNodeIterator SelectDescendants(System.Xml.XPath.XPathNodeType type, bool matchSelf) => throw null; + public virtual System.Xml.XPath.XPathNavigator SelectSingleNode(string xpath, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public virtual System.Xml.XPath.XPathNavigator SelectSingleNode(string xpath) => throw null; + public virtual System.Xml.XPath.XPathNavigator SelectSingleNode(System.Xml.XPath.XPathExpression expression) => throw null; + public virtual void SetTypedValue(object typedValue) => throw null; + public virtual void SetValue(string value) => throw null; + public override string ToString() => throw null; + public override object TypedValue { get => throw null; } + public virtual object UnderlyingObject { get => throw null; } + public override object ValueAs(System.Type returnType, System.Xml.IXmlNamespaceResolver nsResolver) => throw null; + public override bool ValueAsBoolean { get => throw null; } + public override System.DateTime ValueAsDateTime { get => throw null; } + public override double ValueAsDouble { get => throw null; } + public override int ValueAsInt { get => throw null; } + public override System.Int64 ValueAsLong { get => throw null; } + public override System.Type ValueType { get => throw null; } + public virtual void WriteSubtree(System.Xml.XmlWriter writer) => throw null; + protected XPathNavigator() => throw null; + public virtual string XmlLang { get => throw null; } + public override System.Xml.Schema.XmlSchemaType XmlType { get => throw null; } + } + + // Generated from `System.Xml.XPath.XPathNodeIterator` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XPathNodeIterator : System.ICloneable, System.Collections.IEnumerable + { + public abstract System.Xml.XPath.XPathNodeIterator Clone(); + object System.ICloneable.Clone() => throw null; + public virtual int Count { get => throw null; } + public abstract System.Xml.XPath.XPathNavigator Current { get; } + public abstract int CurrentPosition { get; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + public abstract bool MoveNext(); + protected XPathNodeIterator() => throw null; + } + + // Generated from `System.Xml.XPath.XPathNodeType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XPathNodeType + { + All, + Attribute, + Comment, + Element, + Namespace, + ProcessingInstruction, + Root, + SignificantWhitespace, + Text, + Whitespace, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XPath.XPathResultType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XPathResultType + { + Any, + Boolean, + Error, + Navigator, + NodeSet, + Number, + String, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XPath.XmlCaseOrder` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlCaseOrder + { + LowerFirst, + None, + UpperFirst, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XPath.XmlDataType` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlDataType + { + Number, + Text, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.XPath.XmlSortOrder` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XmlSortOrder + { + Ascending, + Descending, + // Stub generator skipped constructor + } + + } + namespace Xsl + { + // Generated from `System.Xml.Xsl.IXsltContextFunction` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXsltContextFunction + { + System.Xml.XPath.XPathResultType[] ArgTypes { get; } + object Invoke(System.Xml.Xsl.XsltContext xsltContext, object[] args, System.Xml.XPath.XPathNavigator docContext); + int Maxargs { get; } + int Minargs { get; } + System.Xml.XPath.XPathResultType ReturnType { get; } + } + + // Generated from `System.Xml.Xsl.IXsltContextVariable` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXsltContextVariable + { + object Evaluate(System.Xml.Xsl.XsltContext xsltContext); + bool IsLocal { get; } + bool IsParam { get; } + System.Xml.XPath.XPathResultType VariableType { get; } + } + + // Generated from `System.Xml.Xsl.XslCompiledTransform` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XslCompiledTransform + { + public void Load(string stylesheetUri, System.Xml.Xsl.XsltSettings settings, System.Xml.XmlResolver stylesheetResolver) => throw null; + public void Load(string stylesheetUri) => throw null; + public void Load(System.Xml.XmlReader stylesheet, System.Xml.Xsl.XsltSettings settings, System.Xml.XmlResolver stylesheetResolver) => throw null; + public void Load(System.Xml.XmlReader stylesheet) => throw null; + public void Load(System.Xml.XPath.IXPathNavigable stylesheet, System.Xml.Xsl.XsltSettings settings, System.Xml.XmlResolver stylesheetResolver) => throw null; + public void Load(System.Xml.XPath.IXPathNavigable stylesheet) => throw null; + public void Load(System.Type compiledStylesheet) => throw null; + public void Load(System.Reflection.MethodInfo executeMethod, System.Byte[] queryData, System.Type[] earlyBoundTypes) => throw null; + public System.Xml.XmlWriterSettings OutputSettings { get => throw null; } + public void Transform(string inputUri, string resultsFile) => throw null; + public void Transform(string inputUri, System.Xml.Xsl.XsltArgumentList arguments, System.Xml.XmlWriter results) => throw null; + public void Transform(string inputUri, System.Xml.Xsl.XsltArgumentList arguments, System.IO.TextWriter results) => throw null; + public void Transform(string inputUri, System.Xml.Xsl.XsltArgumentList arguments, System.IO.Stream results) => throw null; + public void Transform(string inputUri, System.Xml.XmlWriter results) => throw null; + public void Transform(System.Xml.XmlReader input, System.Xml.Xsl.XsltArgumentList arguments, System.Xml.XmlWriter results, System.Xml.XmlResolver documentResolver) => throw null; + public void Transform(System.Xml.XmlReader input, System.Xml.Xsl.XsltArgumentList arguments, System.Xml.XmlWriter results) => throw null; + public void Transform(System.Xml.XmlReader input, System.Xml.Xsl.XsltArgumentList arguments, System.IO.TextWriter results) => throw null; + public void Transform(System.Xml.XmlReader input, System.Xml.Xsl.XsltArgumentList arguments, System.IO.Stream results) => throw null; + public void Transform(System.Xml.XmlReader input, System.Xml.XmlWriter results) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList arguments, System.Xml.XmlWriter results, System.Xml.XmlResolver documentResolver) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList arguments, System.Xml.XmlWriter results) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList arguments, System.IO.TextWriter results) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList arguments, System.IO.Stream results) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.XmlWriter results) => throw null; + public XslCompiledTransform(bool enableDebug) => throw null; + public XslCompiledTransform() => throw null; + } + + // Generated from `System.Xml.Xsl.XslTransform` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XslTransform + { + public void Load(string url, System.Xml.XmlResolver resolver) => throw null; + public void Load(string url) => throw null; + public void Load(System.Xml.XmlReader stylesheet, System.Xml.XmlResolver resolver) => throw null; + public void Load(System.Xml.XmlReader stylesheet) => throw null; + public void Load(System.Xml.XPath.XPathNavigator stylesheet, System.Xml.XmlResolver resolver) => throw null; + public void Load(System.Xml.XPath.XPathNavigator stylesheet) => throw null; + public void Load(System.Xml.XPath.IXPathNavigable stylesheet, System.Xml.XmlResolver resolver) => throw null; + public void Load(System.Xml.XPath.IXPathNavigable stylesheet) => throw null; + public void Transform(string inputfile, string outputfile, System.Xml.XmlResolver resolver) => throw null; + public void Transform(string inputfile, string outputfile) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlWriter output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlWriter output) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.IO.Stream output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.IO.Stream output) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlWriter output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlWriter output) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.IO.TextWriter output) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.IO.Stream output, System.Xml.XmlResolver resolver) => throw null; + public void Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.IO.Stream output) => throw null; + public System.Xml.XmlReader Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlResolver resolver) => throw null; + public System.Xml.XmlReader Transform(System.Xml.XPath.XPathNavigator input, System.Xml.Xsl.XsltArgumentList args) => throw null; + public System.Xml.XmlReader Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args, System.Xml.XmlResolver resolver) => throw null; + public System.Xml.XmlReader Transform(System.Xml.XPath.IXPathNavigable input, System.Xml.Xsl.XsltArgumentList args) => throw null; + public System.Xml.XmlResolver XmlResolver { set => throw null; } + public XslTransform() => throw null; + } + + // Generated from `System.Xml.Xsl.XsltArgumentList` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XsltArgumentList + { + public void AddExtensionObject(string namespaceUri, object extension) => throw null; + public void AddParam(string name, string namespaceUri, object parameter) => throw null; + public void Clear() => throw null; + public object GetExtensionObject(string namespaceUri) => throw null; + public object GetParam(string name, string namespaceUri) => throw null; + public object RemoveExtensionObject(string namespaceUri) => throw null; + public object RemoveParam(string name, string namespaceUri) => throw null; + public XsltArgumentList() => throw null; + public event System.Xml.Xsl.XsltMessageEncounteredEventHandler XsltMessageEncountered; + } + + // Generated from `System.Xml.Xsl.XsltCompileException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XsltCompileException : System.Xml.Xsl.XsltException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public XsltCompileException(string message, System.Exception innerException) => throw null; + public XsltCompileException(string message) => throw null; + public XsltCompileException(System.Exception inner, string sourceUri, int lineNumber, int linePosition) => throw null; + public XsltCompileException() => throw null; + protected XsltCompileException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.Xsl.XsltContext` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XsltContext : System.Xml.XmlNamespaceManager + { + public abstract int CompareDocument(string baseUri, string nextbaseUri); + public abstract bool PreserveWhitespace(System.Xml.XPath.XPathNavigator node); + public abstract System.Xml.Xsl.IXsltContextFunction ResolveFunction(string prefix, string name, System.Xml.XPath.XPathResultType[] ArgTypes); + public abstract System.Xml.Xsl.IXsltContextVariable ResolveVariable(string prefix, string name); + public abstract bool Whitespace { get; } + protected XsltContext(System.Xml.NameTable table) : base(default(System.Xml.XmlNameTable)) => throw null; + protected XsltContext() : base(default(System.Xml.XmlNameTable)) => throw null; + } + + // Generated from `System.Xml.Xsl.XsltException` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XsltException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual int LineNumber { get => throw null; } + public virtual int LinePosition { get => throw null; } + public override string Message { get => throw null; } + public virtual string SourceUri { get => throw null; } + public XsltException(string message, System.Exception innerException) => throw null; + public XsltException(string message) => throw null; + public XsltException() => throw null; + protected XsltException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Xml.Xsl.XsltMessageEncounteredEventArgs` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XsltMessageEncounteredEventArgs : System.EventArgs + { + public abstract string Message { get; } + protected XsltMessageEncounteredEventArgs() => throw null; + } + + // Generated from `System.Xml.Xsl.XsltMessageEncounteredEventHandler` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XsltMessageEncounteredEventHandler(object sender, System.Xml.Xsl.XsltMessageEncounteredEventArgs e); + + // Generated from `System.Xml.Xsl.XsltSettings` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XsltSettings + { + public static System.Xml.Xsl.XsltSettings Default { get => throw null; } + public bool EnableDocumentFunction { get => throw null; set => throw null; } + public bool EnableScript { get => throw null; set => throw null; } + public static System.Xml.Xsl.XsltSettings TrustedXslt { get => throw null; } + public XsltSettings(bool enableDocumentFunction, bool enableScript) => throw null; + public XsltSettings() => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs new file mode 100644 index 000000000000..622bd014a856 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs @@ -0,0 +1,499 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Xml + { + namespace Linq + { + // Generated from `System.Xml.Linq.Extensions` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Extensions + { + public static System.Collections.Generic.IEnumerable Ancestors(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) where T : System.Xml.Linq.XNode => throw null; + public static System.Collections.Generic.IEnumerable Ancestors(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XNode => throw null; + public static System.Collections.Generic.IEnumerable AncestorsAndSelf(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) => throw null; + public static System.Collections.Generic.IEnumerable AncestorsAndSelf(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Attributes(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) => throw null; + public static System.Collections.Generic.IEnumerable Attributes(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable DescendantNodes(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XContainer => throw null; + public static System.Collections.Generic.IEnumerable DescendantNodesAndSelf(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Descendants(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) where T : System.Xml.Linq.XContainer => throw null; + public static System.Collections.Generic.IEnumerable Descendants(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XContainer => throw null; + public static System.Collections.Generic.IEnumerable DescendantsAndSelf(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) => throw null; + public static System.Collections.Generic.IEnumerable DescendantsAndSelf(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Elements(this System.Collections.Generic.IEnumerable source, System.Xml.Linq.XName name) where T : System.Xml.Linq.XContainer => throw null; + public static System.Collections.Generic.IEnumerable Elements(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XContainer => throw null; + public static System.Collections.Generic.IEnumerable InDocumentOrder(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XNode => throw null; + public static System.Collections.Generic.IEnumerable Nodes(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XContainer => throw null; + public static void Remove(this System.Collections.Generic.IEnumerable source) where T : System.Xml.Linq.XNode => throw null; + public static void Remove(this System.Collections.Generic.IEnumerable source) => throw null; + } + + // Generated from `System.Xml.Linq.LoadOptions` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum LoadOptions + { + // Stub generator skipped constructor + None, + PreserveWhitespace, + SetBaseUri, + SetLineInfo, + } + + // Generated from `System.Xml.Linq.ReaderOptions` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum ReaderOptions + { + None, + OmitDuplicateNamespaces, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Linq.SaveOptions` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SaveOptions + { + DisableFormatting, + None, + OmitDuplicateNamespaces, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Linq.XAttribute` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XAttribute : System.Xml.Linq.XObject + { + public static System.Collections.Generic.IEnumerable EmptySequence { get => throw null; } + public bool IsNamespaceDeclaration { get => throw null; } + public System.Xml.Linq.XName Name { get => throw null; } + public System.Xml.Linq.XAttribute NextAttribute { get => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public System.Xml.Linq.XAttribute PreviousAttribute { get => throw null; } + public void Remove() => throw null; + public void SetValue(object value) => throw null; + public override string ToString() => throw null; + public string Value { get => throw null; set => throw null; } + public XAttribute(System.Xml.Linq.XName name, object value) => throw null; + public XAttribute(System.Xml.Linq.XAttribute other) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Xml.Linq.XCData` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XCData : System.Xml.Linq.XText + { + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XCData(string value) : base(default(System.Xml.Linq.XText)) => throw null; + public XCData(System.Xml.Linq.XCData other) : base(default(System.Xml.Linq.XText)) => throw null; + } + + // Generated from `System.Xml.Linq.XComment` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XComment : System.Xml.Linq.XNode + { + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string Value { get => throw null; set => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XComment(string value) => throw null; + public XComment(System.Xml.Linq.XComment other) => throw null; + } + + // Generated from `System.Xml.Linq.XContainer` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XContainer : System.Xml.Linq.XNode + { + public void Add(params object[] content) => throw null; + public void Add(object content) => throw null; + public void AddFirst(params object[] content) => throw null; + public void AddFirst(object content) => throw null; + public System.Xml.XmlWriter CreateWriter() => throw null; + public System.Collections.Generic.IEnumerable DescendantNodes() => throw null; + public System.Collections.Generic.IEnumerable Descendants(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Descendants() => throw null; + public System.Xml.Linq.XElement Element(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Elements(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Elements() => throw null; + public System.Xml.Linq.XNode FirstNode { get => throw null; } + public System.Xml.Linq.XNode LastNode { get => throw null; } + public System.Collections.Generic.IEnumerable Nodes() => throw null; + public void RemoveNodes() => throw null; + public void ReplaceNodes(params object[] content) => throw null; + public void ReplaceNodes(object content) => throw null; + internal XContainer() => throw null; + } + + // Generated from `System.Xml.Linq.XDeclaration` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XDeclaration + { + public string Encoding { get => throw null; set => throw null; } + public string Standalone { get => throw null; set => throw null; } + public override string ToString() => throw null; + public string Version { get => throw null; set => throw null; } + public XDeclaration(string version, string encoding, string standalone) => throw null; + public XDeclaration(System.Xml.Linq.XDeclaration other) => throw null; + } + + // Generated from `System.Xml.Linq.XDocument` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XDocument : System.Xml.Linq.XContainer + { + public System.Xml.Linq.XDeclaration Declaration { get => throw null; set => throw null; } + public System.Xml.Linq.XDocumentType DocumentType { get => throw null; } + public static System.Xml.Linq.XDocument Load(string uri, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XDocument Load(string uri) => throw null; + public static System.Xml.Linq.XDocument Load(System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XDocument Load(System.Xml.XmlReader reader) => throw null; + public static System.Xml.Linq.XDocument Load(System.IO.TextReader textReader, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XDocument Load(System.IO.TextReader textReader) => throw null; + public static System.Xml.Linq.XDocument Load(System.IO.Stream stream, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XDocument Load(System.IO.Stream stream) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.IO.TextReader textReader, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.IO.Stream stream, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public static System.Xml.Linq.XDocument Parse(string text, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XDocument Parse(string text) => throw null; + public System.Xml.Linq.XElement Root { get => throw null; } + public void Save(string fileName, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(string fileName) => throw null; + public void Save(System.Xml.XmlWriter writer) => throw null; + public void Save(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.TextWriter textWriter) => throw null; + public void Save(System.IO.Stream stream, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.Stream stream) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.IO.Stream stream, System.Xml.Linq.SaveOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XDocument(params object[] content) => throw null; + public XDocument(System.Xml.Linq.XDocument other) => throw null; + public XDocument(System.Xml.Linq.XDeclaration declaration, params object[] content) => throw null; + public XDocument() => throw null; + } + + // Generated from `System.Xml.Linq.XDocumentType` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XDocumentType : System.Xml.Linq.XNode + { + public string InternalSubset { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string PublicId { get => throw null; set => throw null; } + public string SystemId { get => throw null; set => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XDocumentType(string name, string publicId, string systemId, string internalSubset) => throw null; + public XDocumentType(System.Xml.Linq.XDocumentType other) => throw null; + } + + // Generated from `System.Xml.Linq.XElement` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XElement : System.Xml.Linq.XContainer, System.Xml.Serialization.IXmlSerializable + { + public System.Collections.Generic.IEnumerable AncestorsAndSelf(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable AncestorsAndSelf() => throw null; + public System.Xml.Linq.XAttribute Attribute(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Attributes(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Attributes() => throw null; + public System.Collections.Generic.IEnumerable DescendantNodesAndSelf() => throw null; + public System.Collections.Generic.IEnumerable DescendantsAndSelf(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable DescendantsAndSelf() => throw null; + public static System.Collections.Generic.IEnumerable EmptySequence { get => throw null; } + public System.Xml.Linq.XAttribute FirstAttribute { get => throw null; } + public System.Xml.Linq.XNamespace GetDefaultNamespace() => throw null; + public System.Xml.Linq.XNamespace GetNamespaceOfPrefix(string prefix) => throw null; + public string GetPrefixOfNamespace(System.Xml.Linq.XNamespace ns) => throw null; + System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() => throw null; + public bool HasAttributes { get => throw null; } + public bool HasElements { get => throw null; } + public bool IsEmpty { get => throw null; } + public System.Xml.Linq.XAttribute LastAttribute { get => throw null; } + public static System.Xml.Linq.XElement Load(string uri, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XElement Load(string uri) => throw null; + public static System.Xml.Linq.XElement Load(System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XElement Load(System.Xml.XmlReader reader) => throw null; + public static System.Xml.Linq.XElement Load(System.IO.TextReader textReader, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XElement Load(System.IO.TextReader textReader) => throw null; + public static System.Xml.Linq.XElement Load(System.IO.Stream stream, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XElement Load(System.IO.Stream stream) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.IO.TextReader textReader, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task LoadAsync(System.IO.Stream stream, System.Xml.Linq.LoadOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Xml.Linq.XName Name { get => throw null; set => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public static System.Xml.Linq.XElement Parse(string text, System.Xml.Linq.LoadOptions options) => throw null; + public static System.Xml.Linq.XElement Parse(string text) => throw null; + void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) => throw null; + public void RemoveAll() => throw null; + public void RemoveAttributes() => throw null; + public void ReplaceAll(params object[] content) => throw null; + public void ReplaceAll(object content) => throw null; + public void ReplaceAttributes(params object[] content) => throw null; + public void ReplaceAttributes(object content) => throw null; + public void Save(string fileName, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(string fileName) => throw null; + public void Save(System.Xml.XmlWriter writer) => throw null; + public void Save(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.TextWriter textWriter) => throw null; + public void Save(System.IO.Stream stream, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.Stream stream) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task SaveAsync(System.IO.Stream stream, System.Xml.Linq.SaveOptions options, System.Threading.CancellationToken cancellationToken) => throw null; + public void SetAttributeValue(System.Xml.Linq.XName name, object value) => throw null; + public void SetElementValue(System.Xml.Linq.XName name, object value) => throw null; + public void SetValue(object value) => throw null; + public string Value { get => throw null; set => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; + public XElement(System.Xml.Linq.XStreamingElement other) => throw null; + public XElement(System.Xml.Linq.XName name, params object[] content) => throw null; + public XElement(System.Xml.Linq.XName name, object content) => throw null; + public XElement(System.Xml.Linq.XName name) => throw null; + public XElement(System.Xml.Linq.XElement other) => throw null; + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + // Stub generator skipped operator: explicit conversion + } + + // Generated from `System.Xml.Linq.XName` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XName : System.Runtime.Serialization.ISerializable, System.IEquatable + { + public static bool operator !=(System.Xml.Linq.XName left, System.Xml.Linq.XName right) => throw null; + public static bool operator ==(System.Xml.Linq.XName left, System.Xml.Linq.XName right) => throw null; + public override bool Equals(object obj) => throw null; + bool System.IEquatable.Equals(System.Xml.Linq.XName other) => throw null; + public static System.Xml.Linq.XName Get(string localName, string namespaceName) => throw null; + public static System.Xml.Linq.XName Get(string expandedName) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string LocalName { get => throw null; } + public System.Xml.Linq.XNamespace Namespace { get => throw null; } + public string NamespaceName { get => throw null; } + public override string ToString() => throw null; + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Xml.Linq.XNamespace` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XNamespace + { + public static bool operator !=(System.Xml.Linq.XNamespace left, System.Xml.Linq.XNamespace right) => throw null; + public static System.Xml.Linq.XName operator +(System.Xml.Linq.XNamespace ns, string localName) => throw null; + public static bool operator ==(System.Xml.Linq.XNamespace left, System.Xml.Linq.XNamespace right) => throw null; + public override bool Equals(object obj) => throw null; + public static System.Xml.Linq.XNamespace Get(string namespaceName) => throw null; + public override int GetHashCode() => throw null; + public System.Xml.Linq.XName GetName(string localName) => throw null; + public string NamespaceName { get => throw null; } + public static System.Xml.Linq.XNamespace None { get => throw null; } + public override string ToString() => throw null; + public static System.Xml.Linq.XNamespace Xml { get => throw null; } + public static System.Xml.Linq.XNamespace Xmlns { get => throw null; } + // Stub generator skipped operator: implicit conversion + } + + // Generated from `System.Xml.Linq.XNode` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XNode : System.Xml.Linq.XObject + { + public void AddAfterSelf(params object[] content) => throw null; + public void AddAfterSelf(object content) => throw null; + public void AddBeforeSelf(params object[] content) => throw null; + public void AddBeforeSelf(object content) => throw null; + public System.Collections.Generic.IEnumerable Ancestors(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable Ancestors() => throw null; + public static int CompareDocumentOrder(System.Xml.Linq.XNode n1, System.Xml.Linq.XNode n2) => throw null; + public System.Xml.XmlReader CreateReader(System.Xml.Linq.ReaderOptions readerOptions) => throw null; + public System.Xml.XmlReader CreateReader() => throw null; + public static bool DeepEquals(System.Xml.Linq.XNode n1, System.Xml.Linq.XNode n2) => throw null; + public static System.Xml.Linq.XNodeDocumentOrderComparer DocumentOrderComparer { get => throw null; } + public System.Collections.Generic.IEnumerable ElementsAfterSelf(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable ElementsAfterSelf() => throw null; + public System.Collections.Generic.IEnumerable ElementsBeforeSelf(System.Xml.Linq.XName name) => throw null; + public System.Collections.Generic.IEnumerable ElementsBeforeSelf() => throw null; + public static System.Xml.Linq.XNodeEqualityComparer EqualityComparer { get => throw null; } + public bool IsAfter(System.Xml.Linq.XNode node) => throw null; + public bool IsBefore(System.Xml.Linq.XNode node) => throw null; + public System.Xml.Linq.XNode NextNode { get => throw null; } + public System.Collections.Generic.IEnumerable NodesAfterSelf() => throw null; + public System.Collections.Generic.IEnumerable NodesBeforeSelf() => throw null; + public System.Xml.Linq.XNode PreviousNode { get => throw null; } + public static System.Xml.Linq.XNode ReadFrom(System.Xml.XmlReader reader) => throw null; + public static System.Threading.Tasks.Task ReadFromAsync(System.Xml.XmlReader reader, System.Threading.CancellationToken cancellationToken) => throw null; + public void Remove() => throw null; + public void ReplaceWith(params object[] content) => throw null; + public void ReplaceWith(object content) => throw null; + public string ToString(System.Xml.Linq.SaveOptions options) => throw null; + public override string ToString() => throw null; + public abstract void WriteTo(System.Xml.XmlWriter writer); + public abstract System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken); + internal XNode() => throw null; + } + + // Generated from `System.Xml.Linq.XNodeDocumentOrderComparer` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XNodeDocumentOrderComparer : System.Collections.IComparer, System.Collections.Generic.IComparer + { + public int Compare(System.Xml.Linq.XNode x, System.Xml.Linq.XNode y) => throw null; + int System.Collections.IComparer.Compare(object x, object y) => throw null; + public XNodeDocumentOrderComparer() => throw null; + } + + // Generated from `System.Xml.Linq.XNodeEqualityComparer` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XNodeEqualityComparer : System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer + { + public bool Equals(System.Xml.Linq.XNode x, System.Xml.Linq.XNode y) => throw null; + bool System.Collections.IEqualityComparer.Equals(object x, object y) => throw null; + public int GetHashCode(System.Xml.Linq.XNode obj) => throw null; + int System.Collections.IEqualityComparer.GetHashCode(object obj) => throw null; + public XNodeEqualityComparer() => throw null; + } + + // Generated from `System.Xml.Linq.XObject` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XObject : System.Xml.IXmlLineInfo + { + public void AddAnnotation(object annotation) => throw null; + public object Annotation(System.Type type) => throw null; + public T Annotation() where T : class => throw null; + public System.Collections.Generic.IEnumerable Annotations(System.Type type) => throw null; + public System.Collections.Generic.IEnumerable Annotations() where T : class => throw null; + public string BaseUri { get => throw null; } + public event System.EventHandler Changed; + public event System.EventHandler Changing; + public System.Xml.Linq.XDocument Document { get => throw null; } + bool System.Xml.IXmlLineInfo.HasLineInfo() => throw null; + int System.Xml.IXmlLineInfo.LineNumber { get => throw null; } + int System.Xml.IXmlLineInfo.LinePosition { get => throw null; } + public abstract System.Xml.XmlNodeType NodeType { get; } + public System.Xml.Linq.XElement Parent { get => throw null; } + public void RemoveAnnotations() where T : class => throw null; + public void RemoveAnnotations(System.Type type) => throw null; + internal XObject() => throw null; + } + + // Generated from `System.Xml.Linq.XObjectChange` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum XObjectChange + { + Add, + Name, + Remove, + Value, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Linq.XObjectChangeEventArgs` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XObjectChangeEventArgs : System.EventArgs + { + public static System.Xml.Linq.XObjectChangeEventArgs Add; + public static System.Xml.Linq.XObjectChangeEventArgs Name; + public System.Xml.Linq.XObjectChange ObjectChange { get => throw null; } + public static System.Xml.Linq.XObjectChangeEventArgs Remove; + public static System.Xml.Linq.XObjectChangeEventArgs Value; + public XObjectChangeEventArgs(System.Xml.Linq.XObjectChange objectChange) => throw null; + } + + // Generated from `System.Xml.Linq.XProcessingInstruction` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XProcessingInstruction : System.Xml.Linq.XNode + { + public string Data { get => throw null; set => throw null; } + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string Target { get => throw null; set => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XProcessingInstruction(string target, string data) => throw null; + public XProcessingInstruction(System.Xml.Linq.XProcessingInstruction other) => throw null; + } + + // Generated from `System.Xml.Linq.XStreamingElement` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XStreamingElement + { + public void Add(params object[] content) => throw null; + public void Add(object content) => throw null; + public System.Xml.Linq.XName Name { get => throw null; set => throw null; } + public void Save(string fileName, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(string fileName) => throw null; + public void Save(System.Xml.XmlWriter writer) => throw null; + public void Save(System.IO.TextWriter textWriter, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.TextWriter textWriter) => throw null; + public void Save(System.IO.Stream stream, System.Xml.Linq.SaveOptions options) => throw null; + public void Save(System.IO.Stream stream) => throw null; + public string ToString(System.Xml.Linq.SaveOptions options) => throw null; + public override string ToString() => throw null; + public void WriteTo(System.Xml.XmlWriter writer) => throw null; + public XStreamingElement(System.Xml.Linq.XName name, params object[] content) => throw null; + public XStreamingElement(System.Xml.Linq.XName name, object content) => throw null; + public XStreamingElement(System.Xml.Linq.XName name) => throw null; + } + + // Generated from `System.Xml.Linq.XText` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XText : System.Xml.Linq.XNode + { + public override System.Xml.XmlNodeType NodeType { get => throw null; } + public string Value { get => throw null; set => throw null; } + public override void WriteTo(System.Xml.XmlWriter writer) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(System.Xml.XmlWriter writer, System.Threading.CancellationToken cancellationToken) => throw null; + public XText(string value) => throw null; + public XText(System.Xml.Linq.XText other) => throw null; + } + + } + namespace Schema + { + // Generated from `System.Xml.Schema.Extensions` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Extensions + { + public static System.Xml.Schema.IXmlSchemaInfo GetSchemaInfo(this System.Xml.Linq.XElement source) => throw null; + public static System.Xml.Schema.IXmlSchemaInfo GetSchemaInfo(this System.Xml.Linq.XAttribute source) => throw null; + public static void Validate(this System.Xml.Linq.XElement source, System.Xml.Schema.XmlSchemaObject partialValidationType, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler, bool addSchemaInfo) => throw null; + public static void Validate(this System.Xml.Linq.XElement source, System.Xml.Schema.XmlSchemaObject partialValidationType, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public static void Validate(this System.Xml.Linq.XDocument source, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler, bool addSchemaInfo) => throw null; + public static void Validate(this System.Xml.Linq.XDocument source, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + public static void Validate(this System.Xml.Linq.XAttribute source, System.Xml.Schema.XmlSchemaObject partialValidationType, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler, bool addSchemaInfo) => throw null; + public static void Validate(this System.Xml.Linq.XAttribute source, System.Xml.Schema.XmlSchemaObject partialValidationType, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.ValidationEventHandler validationEventHandler) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs new file mode 100644 index 000000000000..e1f429da8b87 --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs @@ -0,0 +1,30 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Xml + { + namespace XPath + { + // Generated from `System.Xml.XPath.Extensions` in `System.Xml.XPath.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class Extensions + { + public static System.Xml.XPath.XPathNavigator CreateNavigator(this System.Xml.Linq.XNode node, System.Xml.XmlNameTable nameTable) => throw null; + public static System.Xml.XPath.XPathNavigator CreateNavigator(this System.Xml.Linq.XNode node) => throw null; + public static object XPathEvaluate(this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public static object XPathEvaluate(this System.Xml.Linq.XNode node, string expression) => throw null; + public static System.Xml.Linq.XElement XPathSelectElement(this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public static System.Xml.Linq.XElement XPathSelectElement(this System.Xml.Linq.XNode node, string expression) => throw null; + public static System.Collections.Generic.IEnumerable XPathSelectElements(this System.Xml.Linq.XNode node, string expression, System.Xml.IXmlNamespaceResolver resolver) => throw null; + public static System.Collections.Generic.IEnumerable XPathSelectElements(this System.Xml.Linq.XNode node, string expression) => throw null; + } + + // Generated from `System.Xml.XPath.XDocumentExtensions` in `System.Xml.XPath.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class XDocumentExtensions + { + public static System.Xml.XPath.IXPathNavigable ToXPathNavigable(this System.Xml.Linq.XNode node) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs new file mode 100644 index 000000000000..8420947d7bfb --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs @@ -0,0 +1,34 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Xml + { + namespace XPath + { + // Generated from `System.Xml.XPath.XPathDocument` in `System.Xml.XPath, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XPathDocument : System.Xml.XPath.IXPathNavigable + { + public System.Xml.XPath.XPathNavigator CreateNavigator() => throw null; + public XPathDocument(string uri, System.Xml.XmlSpace space) => throw null; + public XPathDocument(string uri) => throw null; + public XPathDocument(System.Xml.XmlReader reader, System.Xml.XmlSpace space) => throw null; + public XPathDocument(System.Xml.XmlReader reader) => throw null; + public XPathDocument(System.IO.TextReader textReader) => throw null; + public XPathDocument(System.IO.Stream stream) => throw null; + } + + // Generated from `System.Xml.XPath.XPathException` in `System.Xml.XPath, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XPathException : System.SystemException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public XPathException(string message, System.Exception innerException) => throw null; + public XPathException(string message) => throw null; + public XPathException() => throw null; + protected XPathException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs new file mode 100644 index 000000000000..4c12a1e9b26b --- /dev/null +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs @@ -0,0 +1,823 @@ +// This file contains auto-generated code. + +namespace System +{ + namespace Xml + { + namespace Serialization + { + // Generated from `System.Xml.Serialization.CodeGenerationOptions` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum CodeGenerationOptions + { + // Stub generator skipped constructor + EnableDataBinding, + GenerateNewAsync, + GenerateOldAsync, + GenerateOrder, + GenerateProperties, + None, + } + + // Generated from `System.Xml.Serialization.CodeIdentifier` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CodeIdentifier + { + public CodeIdentifier() => throw null; + public static string MakeCamel(string identifier) => throw null; + public static string MakePascal(string identifier) => throw null; + public static string MakeValid(string identifier) => throw null; + } + + // Generated from `System.Xml.Serialization.CodeIdentifiers` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class CodeIdentifiers + { + public void Add(string identifier, object value) => throw null; + public void AddReserved(string identifier) => throw null; + public string AddUnique(string identifier, object value) => throw null; + public void Clear() => throw null; + public CodeIdentifiers(bool caseSensitive) => throw null; + public CodeIdentifiers() => throw null; + public bool IsInUse(string identifier) => throw null; + public string MakeRightCase(string identifier) => throw null; + public string MakeUnique(string identifier) => throw null; + public void Remove(string identifier) => throw null; + public void RemoveReserved(string identifier) => throw null; + public object ToArray(System.Type type) => throw null; + public bool UseCamelCasing { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.Serialization.IXmlTextParser` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IXmlTextParser + { + bool Normalized { get; set; } + System.Xml.WhitespaceHandling WhitespaceHandling { get; set; } + } + + // Generated from `System.Xml.Serialization.ImportContext` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class ImportContext + { + public ImportContext(System.Xml.Serialization.CodeIdentifiers identifiers, bool shareTypes) => throw null; + public bool ShareTypes { get => throw null; } + public System.Xml.Serialization.CodeIdentifiers TypeIdentifiers { get => throw null; } + public System.Collections.Specialized.StringCollection Warnings { get => throw null; } + } + + // Generated from `System.Xml.Serialization.SchemaImporter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class SchemaImporter + { + internal SchemaImporter() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapAttributeAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapAttributeAttribute : System.Attribute + { + public string AttributeName { get => throw null; set => throw null; } + public string DataType { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public SoapAttributeAttribute(string attributeName) => throw null; + public SoapAttributeAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapAttributeOverrides` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapAttributeOverrides + { + public void Add(System.Type type, string member, System.Xml.Serialization.SoapAttributes attributes) => throw null; + public void Add(System.Type type, System.Xml.Serialization.SoapAttributes attributes) => throw null; + public System.Xml.Serialization.SoapAttributes this[System.Type type] { get => throw null; } + public System.Xml.Serialization.SoapAttributes this[System.Type type, string member] { get => throw null; } + public SoapAttributeOverrides() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapAttributes` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapAttributes + { + public System.Xml.Serialization.SoapAttributeAttribute SoapAttribute { get => throw null; set => throw null; } + public SoapAttributes(System.Reflection.ICustomAttributeProvider provider) => throw null; + public SoapAttributes() => throw null; + public object SoapDefaultValue { get => throw null; set => throw null; } + public System.Xml.Serialization.SoapElementAttribute SoapElement { get => throw null; set => throw null; } + public System.Xml.Serialization.SoapEnumAttribute SoapEnum { get => throw null; set => throw null; } + public bool SoapIgnore { get => throw null; set => throw null; } + public System.Xml.Serialization.SoapTypeAttribute SoapType { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.Serialization.SoapElementAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapElementAttribute : System.Attribute + { + public string DataType { get => throw null; set => throw null; } + public string ElementName { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public SoapElementAttribute(string elementName) => throw null; + public SoapElementAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapEnumAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapEnumAttribute : System.Attribute + { + public string Name { get => throw null; set => throw null; } + public SoapEnumAttribute(string name) => throw null; + public SoapEnumAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapIgnoreAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapIgnoreAttribute : System.Attribute + { + public SoapIgnoreAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapIncludeAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapIncludeAttribute : System.Attribute + { + public SoapIncludeAttribute(System.Type type) => throw null; + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.Serialization.SoapReflectionImporter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapReflectionImporter + { + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool writeAccessors, bool validate, System.Xml.Serialization.XmlMappingAccess access) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool writeAccessors, bool validate) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool writeAccessors) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type, string defaultNamespace) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type) => throw null; + public void IncludeType(System.Type type) => throw null; + public void IncludeTypes(System.Reflection.ICustomAttributeProvider provider) => throw null; + public SoapReflectionImporter(string defaultNamespace) => throw null; + public SoapReflectionImporter(System.Xml.Serialization.SoapAttributeOverrides attributeOverrides, string defaultNamespace) => throw null; + public SoapReflectionImporter(System.Xml.Serialization.SoapAttributeOverrides attributeOverrides) => throw null; + public SoapReflectionImporter() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapSchemaMember` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapSchemaMember + { + public string MemberName { get => throw null; set => throw null; } + public System.Xml.XmlQualifiedName MemberType { get => throw null; set => throw null; } + public SoapSchemaMember() => throw null; + } + + // Generated from `System.Xml.Serialization.SoapTypeAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SoapTypeAttribute : System.Attribute + { + public bool IncludeInSchema { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public SoapTypeAttribute(string typeName, string ns) => throw null; + public SoapTypeAttribute(string typeName) => throw null; + public SoapTypeAttribute() => throw null; + public string TypeName { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.Serialization.UnreferencedObjectEventArgs` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class UnreferencedObjectEventArgs : System.EventArgs + { + public string UnreferencedId { get => throw null; } + public object UnreferencedObject { get => throw null; } + public UnreferencedObjectEventArgs(object o, string id) => throw null; + } + + // Generated from `System.Xml.Serialization.UnreferencedObjectEventHandler` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void UnreferencedObjectEventHandler(object sender, System.Xml.Serialization.UnreferencedObjectEventArgs e); + + // Generated from `System.Xml.Serialization.XmlAnyElementAttributes` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAnyElementAttributes : System.Collections.CollectionBase + { + public int Add(System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; + public bool Contains(System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; + public void CopyTo(System.Xml.Serialization.XmlAnyElementAttribute[] array, int index) => throw null; + public int IndexOf(System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; + public void Insert(int index, System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; + public System.Xml.Serialization.XmlAnyElementAttribute this[int index] { get => throw null; set => throw null; } + public void Remove(System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; + public XmlAnyElementAttributes() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlArrayAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlArrayAttribute : System.Attribute + { + public string ElementName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public XmlArrayAttribute(string elementName) => throw null; + public XmlArrayAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlArrayItemAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlArrayItemAttribute : System.Attribute + { + public string DataType { get => throw null; set => throw null; } + public string ElementName { get => throw null; set => throw null; } + public System.Xml.Schema.XmlSchemaForm Form { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public int NestingLevel { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + public XmlArrayItemAttribute(string elementName, System.Type type) => throw null; + public XmlArrayItemAttribute(string elementName) => throw null; + public XmlArrayItemAttribute(System.Type type) => throw null; + public XmlArrayItemAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlArrayItemAttributes` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlArrayItemAttributes : System.Collections.CollectionBase + { + public int Add(System.Xml.Serialization.XmlArrayItemAttribute attribute) => throw null; + public bool Contains(System.Xml.Serialization.XmlArrayItemAttribute attribute) => throw null; + public void CopyTo(System.Xml.Serialization.XmlArrayItemAttribute[] array, int index) => throw null; + public int IndexOf(System.Xml.Serialization.XmlArrayItemAttribute attribute) => throw null; + public void Insert(int index, System.Xml.Serialization.XmlArrayItemAttribute attribute) => throw null; + public System.Xml.Serialization.XmlArrayItemAttribute this[int index] { get => throw null; set => throw null; } + public void Remove(System.Xml.Serialization.XmlArrayItemAttribute attribute) => throw null; + public XmlArrayItemAttributes() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlAttributeEventArgs` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttributeEventArgs : System.EventArgs + { + public System.Xml.XmlAttribute Attr { get => throw null; } + public string ExpectedAttributes { get => throw null; } + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public object ObjectBeingDeserialized { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlAttributeEventHandler` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlAttributeEventHandler(object sender, System.Xml.Serialization.XmlAttributeEventArgs e); + + // Generated from `System.Xml.Serialization.XmlAttributeOverrides` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttributeOverrides + { + public void Add(System.Type type, string member, System.Xml.Serialization.XmlAttributes attributes) => throw null; + public void Add(System.Type type, System.Xml.Serialization.XmlAttributes attributes) => throw null; + public System.Xml.Serialization.XmlAttributes this[System.Type type] { get => throw null; } + public System.Xml.Serialization.XmlAttributes this[System.Type type, string member] { get => throw null; } + public XmlAttributeOverrides() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlAttributes` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlAttributes + { + public System.Xml.Serialization.XmlAnyAttributeAttribute XmlAnyAttribute { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlAnyElementAttributes XmlAnyElements { get => throw null; } + public System.Xml.Serialization.XmlArrayAttribute XmlArray { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlArrayItemAttributes XmlArrayItems { get => throw null; } + public System.Xml.Serialization.XmlAttributeAttribute XmlAttribute { get => throw null; set => throw null; } + public XmlAttributes(System.Reflection.ICustomAttributeProvider provider) => throw null; + public XmlAttributes() => throw null; + public System.Xml.Serialization.XmlChoiceIdentifierAttribute XmlChoiceIdentifier { get => throw null; } + public object XmlDefaultValue { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlElementAttributes XmlElements { get => throw null; } + public System.Xml.Serialization.XmlEnumAttribute XmlEnum { get => throw null; set => throw null; } + public bool XmlIgnore { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlRootAttribute XmlRoot { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlTextAttribute XmlText { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlTypeAttribute XmlType { get => throw null; set => throw null; } + public bool Xmlns { get => throw null; set => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlChoiceIdentifierAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlChoiceIdentifierAttribute : System.Attribute + { + public string MemberName { get => throw null; set => throw null; } + public XmlChoiceIdentifierAttribute(string name) => throw null; + public XmlChoiceIdentifierAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlDeserializationEvents` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct XmlDeserializationEvents + { + public System.Xml.Serialization.XmlAttributeEventHandler OnUnknownAttribute { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlElementEventHandler OnUnknownElement { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlNodeEventHandler OnUnknownNode { get => throw null; set => throw null; } + public System.Xml.Serialization.UnreferencedObjectEventHandler OnUnreferencedObject { get => throw null; set => throw null; } + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Serialization.XmlElementAttributes` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlElementAttributes : System.Collections.CollectionBase + { + public int Add(System.Xml.Serialization.XmlElementAttribute attribute) => throw null; + public bool Contains(System.Xml.Serialization.XmlElementAttribute attribute) => throw null; + public void CopyTo(System.Xml.Serialization.XmlElementAttribute[] array, int index) => throw null; + public int IndexOf(System.Xml.Serialization.XmlElementAttribute attribute) => throw null; + public void Insert(int index, System.Xml.Serialization.XmlElementAttribute attribute) => throw null; + public System.Xml.Serialization.XmlElementAttribute this[int index] { get => throw null; set => throw null; } + public void Remove(System.Xml.Serialization.XmlElementAttribute attribute) => throw null; + public XmlElementAttributes() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlElementEventArgs` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlElementEventArgs : System.EventArgs + { + public System.Xml.XmlElement Element { get => throw null; } + public string ExpectedElements { get => throw null; } + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public object ObjectBeingDeserialized { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlElementEventHandler` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlElementEventHandler(object sender, System.Xml.Serialization.XmlElementEventArgs e); + + // Generated from `System.Xml.Serialization.XmlIncludeAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlIncludeAttribute : System.Attribute + { + public System.Type Type { get => throw null; set => throw null; } + public XmlIncludeAttribute(System.Type type) => throw null; + } + + // Generated from `System.Xml.Serialization.XmlMapping` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlMapping + { + public string ElementName { get => throw null; } + public string Namespace { get => throw null; } + public void SetKey(string key) => throw null; + internal XmlMapping() => throw null; + public string XsdElementName { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlMappingAccess` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum XmlMappingAccess + { + None, + Read, + Write, + // Stub generator skipped constructor + } + + // Generated from `System.Xml.Serialization.XmlMemberMapping` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlMemberMapping + { + public bool Any { get => throw null; } + public bool CheckSpecified { get => throw null; } + public string ElementName { get => throw null; } + public string MemberName { get => throw null; } + public string Namespace { get => throw null; } + public string TypeFullName { get => throw null; } + public string TypeName { get => throw null; } + public string TypeNamespace { get => throw null; } + public string XsdElementName { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlMembersMapping` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlMembersMapping : System.Xml.Serialization.XmlMapping + { + public int Count { get => throw null; } + public System.Xml.Serialization.XmlMemberMapping this[int index] { get => throw null; } + public string TypeName { get => throw null; } + public string TypeNamespace { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlNodeEventArgs` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlNodeEventArgs : System.EventArgs + { + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public string LocalName { get => throw null; } + public string Name { get => throw null; } + public string NamespaceURI { get => throw null; } + public System.Xml.XmlNodeType NodeType { get => throw null; } + public object ObjectBeingDeserialized { get => throw null; } + public string Text { get => throw null; } + } + + // Generated from `System.Xml.Serialization.XmlNodeEventHandler` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlNodeEventHandler(object sender, System.Xml.Serialization.XmlNodeEventArgs e); + + // Generated from `System.Xml.Serialization.XmlReflectionImporter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlReflectionImporter + { + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool rpc, bool openModel, System.Xml.Serialization.XmlMappingAccess access) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool rpc, bool openModel) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement, bool rpc) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string elementName, string ns, System.Xml.Serialization.XmlReflectionMember[] members, bool hasWrapperElement) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type, string defaultNamespace) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type, System.Xml.Serialization.XmlRootAttribute root) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Type type) => throw null; + public void IncludeType(System.Type type) => throw null; + public void IncludeTypes(System.Reflection.ICustomAttributeProvider provider) => throw null; + public XmlReflectionImporter(string defaultNamespace) => throw null; + public XmlReflectionImporter(System.Xml.Serialization.XmlAttributeOverrides attributeOverrides, string defaultNamespace) => throw null; + public XmlReflectionImporter(System.Xml.Serialization.XmlAttributeOverrides attributeOverrides) => throw null; + public XmlReflectionImporter() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlReflectionMember` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlReflectionMember + { + public bool IsReturnValue { get => throw null; set => throw null; } + public string MemberName { get => throw null; set => throw null; } + public System.Type MemberType { get => throw null; set => throw null; } + public bool OverrideIsNullable { get => throw null; set => throw null; } + public System.Xml.Serialization.SoapAttributes SoapAttributes { get => throw null; set => throw null; } + public System.Xml.Serialization.XmlAttributes XmlAttributes { get => throw null; set => throw null; } + public XmlReflectionMember() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSchemaEnumerator` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public System.Xml.Schema.XmlSchema Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + void System.Collections.IEnumerator.Reset() => throw null; + public XmlSchemaEnumerator(System.Xml.Serialization.XmlSchemas list) => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSchemaExporter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaExporter + { + public string ExportAnyType(string ns) => throw null; + public string ExportAnyType(System.Xml.Serialization.XmlMembersMapping members) => throw null; + public void ExportMembersMapping(System.Xml.Serialization.XmlMembersMapping xmlMembersMapping, bool exportEnclosingType) => throw null; + public void ExportMembersMapping(System.Xml.Serialization.XmlMembersMapping xmlMembersMapping) => throw null; + public void ExportTypeMapping(System.Xml.Serialization.XmlTypeMapping xmlTypeMapping) => throw null; + public System.Xml.XmlQualifiedName ExportTypeMapping(System.Xml.Serialization.XmlMembersMapping xmlMembersMapping) => throw null; + public XmlSchemaExporter(System.Xml.Serialization.XmlSchemas schemas) => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSchemaImporter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemaImporter : System.Xml.Serialization.SchemaImporter + { + public System.Xml.Serialization.XmlMembersMapping ImportAnyType(System.Xml.XmlQualifiedName typeName, string elementName) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportDerivedTypeMapping(System.Xml.XmlQualifiedName name, System.Type baseType, bool baseTypeCanBeIndirect) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportDerivedTypeMapping(System.Xml.XmlQualifiedName name, System.Type baseType) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(string name, string ns, System.Xml.Serialization.SoapSchemaMember[] members) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(System.Xml.XmlQualifiedName[] names, System.Type baseType, bool baseTypeCanBeIndirect) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(System.Xml.XmlQualifiedName[] names) => throw null; + public System.Xml.Serialization.XmlMembersMapping ImportMembersMapping(System.Xml.XmlQualifiedName name) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportSchemaType(System.Xml.XmlQualifiedName typeName, System.Type baseType, bool baseTypeCanBeIndirect) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportSchemaType(System.Xml.XmlQualifiedName typeName, System.Type baseType) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportSchemaType(System.Xml.XmlQualifiedName typeName) => throw null; + public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping(System.Xml.XmlQualifiedName name) => throw null; + public XmlSchemaImporter(System.Xml.Serialization.XmlSchemas schemas, System.Xml.Serialization.CodeIdentifiers typeIdentifiers) => throw null; + public XmlSchemaImporter(System.Xml.Serialization.XmlSchemas schemas) => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSchemas` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSchemas : System.Collections.CollectionBase, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public void Add(System.Xml.Serialization.XmlSchemas schemas) => throw null; + public int Add(System.Xml.Schema.XmlSchema schema, System.Uri baseUri) => throw null; + public int Add(System.Xml.Schema.XmlSchema schema) => throw null; + public void AddReference(System.Xml.Schema.XmlSchema schema) => throw null; + public void Compile(System.Xml.Schema.ValidationEventHandler handler, bool fullCompile) => throw null; + public bool Contains(string targetNamespace) => throw null; + public bool Contains(System.Xml.Schema.XmlSchema schema) => throw null; + public void CopyTo(System.Xml.Schema.XmlSchema[] array, int index) => throw null; + public object Find(System.Xml.XmlQualifiedName name, System.Type type) => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.IList GetSchemas(string ns) => throw null; + public int IndexOf(System.Xml.Schema.XmlSchema schema) => throw null; + public void Insert(int index, System.Xml.Schema.XmlSchema schema) => throw null; + public bool IsCompiled { get => throw null; } + public static bool IsDataSet(System.Xml.Schema.XmlSchema schema) => throw null; + public System.Xml.Schema.XmlSchema this[string ns] { get => throw null; } + public System.Xml.Schema.XmlSchema this[int index] { get => throw null; set => throw null; } + protected override void OnClear() => throw null; + protected override void OnInsert(int index, object value) => throw null; + protected override void OnRemove(int index, object value) => throw null; + protected override void OnSet(int index, object oldValue, object newValue) => throw null; + public void Remove(System.Xml.Schema.XmlSchema schema) => throw null; + public XmlSchemas() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializationCollectionFixupCallback` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlSerializationCollectionFixupCallback(object collection, object collectionItems); + + // Generated from `System.Xml.Serialization.XmlSerializationFixupCallback` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlSerializationFixupCallback(object fixup); + + // Generated from `System.Xml.Serialization.XmlSerializationGeneratedCode` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSerializationGeneratedCode + { + protected XmlSerializationGeneratedCode() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializationReadCallback` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate object XmlSerializationReadCallback(); + + // Generated from `System.Xml.Serialization.XmlSerializationReader` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSerializationReader : System.Xml.Serialization.XmlSerializationGeneratedCode + { + protected void AddFixup(System.Xml.Serialization.XmlSerializationReader.Fixup fixup) => throw null; + protected void AddFixup(System.Xml.Serialization.XmlSerializationReader.CollectionFixup fixup) => throw null; + protected void AddReadCallback(string name, string ns, System.Type type, System.Xml.Serialization.XmlSerializationReadCallback read) => throw null; + protected void AddTarget(string id, object o) => throw null; + protected void CheckReaderCount(ref int whileIterations, ref int readerCount) => throw null; + protected string CollapseWhitespace(string value) => throw null; + // Generated from `System.Xml.Serialization.XmlSerializationReader.CollectionFixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected class CollectionFixup + { + public System.Xml.Serialization.XmlSerializationCollectionFixupCallback Callback { get => throw null; } + public object Collection { get => throw null; } + public CollectionFixup(object collection, System.Xml.Serialization.XmlSerializationCollectionFixupCallback callback, object collectionItems) => throw null; + public object CollectionItems { get => throw null; } + } + + + protected System.Exception CreateAbstractTypeException(string name, string ns) => throw null; + protected System.Exception CreateBadDerivationException(string xsdDerived, string nsDerived, string xsdBase, string nsBase, string clrDerived, string clrBase) => throw null; + protected System.Exception CreateCtorHasSecurityException(string typeName) => throw null; + protected System.Exception CreateInaccessibleConstructorException(string typeName) => throw null; + protected System.Exception CreateInvalidCastException(System.Type type, object value, string id) => throw null; + protected System.Exception CreateInvalidCastException(System.Type type, object value) => throw null; + protected System.Exception CreateMissingIXmlSerializableType(string name, string ns, string clrType) => throw null; + protected System.Exception CreateReadOnlyCollectionException(string name) => throw null; + protected System.Exception CreateUnknownConstantException(string value, System.Type enumType) => throw null; + protected System.Exception CreateUnknownNodeException() => throw null; + protected System.Exception CreateUnknownTypeException(System.Xml.XmlQualifiedName type) => throw null; + protected bool DecodeName { get => throw null; set => throw null; } + protected System.Xml.XmlDocument Document { get => throw null; } + protected System.Array EnsureArrayIndex(System.Array a, int index, System.Type elementType) => throw null; + // Generated from `System.Xml.Serialization.XmlSerializationReader.Fixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + protected class Fixup + { + public System.Xml.Serialization.XmlSerializationFixupCallback Callback { get => throw null; } + public Fixup(object o, System.Xml.Serialization.XmlSerializationFixupCallback callback, string[] ids) => throw null; + public Fixup(object o, System.Xml.Serialization.XmlSerializationFixupCallback callback, int count) => throw null; + public string[] Ids { get => throw null; } + public object Source { get => throw null; set => throw null; } + } + + + protected void FixupArrayRefs(object fixup) => throw null; + protected int GetArrayLength(string name, string ns) => throw null; + protected bool GetNullAttr() => throw null; + protected object GetTarget(string id) => throw null; + protected System.Xml.XmlQualifiedName GetXsiType() => throw null; + protected abstract void InitCallbacks(); + protected abstract void InitIDs(); + protected bool IsReturnValue { get => throw null; set => throw null; } + protected bool IsXmlnsAttribute(string name) => throw null; + protected void ParseWsdlArrayType(System.Xml.XmlAttribute attr) => throw null; + protected System.Xml.XmlQualifiedName ReadElementQualifiedName() => throw null; + protected void ReadEndElement() => throw null; + protected bool ReadNull() => throw null; + protected System.Xml.XmlQualifiedName ReadNullableQualifiedName() => throw null; + protected string ReadNullableString() => throw null; + protected bool ReadReference(out string fixupReference) => throw null; + protected object ReadReferencedElement(string name, string ns) => throw null; + protected object ReadReferencedElement() => throw null; + protected void ReadReferencedElements() => throw null; + protected object ReadReferencingElement(string name, string ns, out string fixupReference) => throw null; + protected object ReadReferencingElement(string name, string ns, bool elementCanBeType, out string fixupReference) => throw null; + protected object ReadReferencingElement(out string fixupReference) => throw null; + protected System.Xml.Serialization.IXmlSerializable ReadSerializable(System.Xml.Serialization.IXmlSerializable serializable, bool wrappedAny) => throw null; + protected System.Xml.Serialization.IXmlSerializable ReadSerializable(System.Xml.Serialization.IXmlSerializable serializable) => throw null; + protected string ReadString(string value, bool trim) => throw null; + protected string ReadString(string value) => throw null; + protected object ReadTypedNull(System.Xml.XmlQualifiedName type) => throw null; + protected object ReadTypedPrimitive(System.Xml.XmlQualifiedName type) => throw null; + protected System.Xml.XmlDocument ReadXmlDocument(bool wrapped) => throw null; + protected System.Xml.XmlNode ReadXmlNode(bool wrapped) => throw null; + protected System.Xml.XmlReader Reader { get => throw null; } + protected int ReaderCount { get => throw null; } + protected void Referenced(object o) => throw null; + protected static System.Reflection.Assembly ResolveDynamicAssembly(string assemblyFullName) => throw null; + protected System.Array ShrinkArray(System.Array a, int length, System.Type elementType, bool isNullable) => throw null; + protected static System.Byte[] ToByteArrayBase64(string value) => throw null; + protected System.Byte[] ToByteArrayBase64(bool isNull) => throw null; + protected static System.Byte[] ToByteArrayHex(string value) => throw null; + protected System.Byte[] ToByteArrayHex(bool isNull) => throw null; + protected static System.Char ToChar(string value) => throw null; + protected static System.DateTime ToDate(string value) => throw null; + protected static System.DateTime ToDateTime(string value) => throw null; + protected static System.Int64 ToEnum(string value, System.Collections.Hashtable h, string typeName) => throw null; + protected static System.DateTime ToTime(string value) => throw null; + protected static string ToXmlNCName(string value) => throw null; + protected static string ToXmlName(string value) => throw null; + protected static string ToXmlNmToken(string value) => throw null; + protected static string ToXmlNmTokens(string value) => throw null; + protected System.Xml.XmlQualifiedName ToXmlQualifiedName(string value) => throw null; + protected void UnknownAttribute(object o, System.Xml.XmlAttribute attr, string qnames) => throw null; + protected void UnknownAttribute(object o, System.Xml.XmlAttribute attr) => throw null; + protected void UnknownElement(object o, System.Xml.XmlElement elem, string qnames) => throw null; + protected void UnknownElement(object o, System.Xml.XmlElement elem) => throw null; + protected void UnknownNode(object o, string qnames) => throw null; + protected void UnknownNode(object o) => throw null; + protected void UnreferencedObject(string id, object o) => throw null; + protected XmlSerializationReader() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializationWriteCallback` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void XmlSerializationWriteCallback(object o); + + // Generated from `System.Xml.Serialization.XmlSerializationWriter` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSerializationWriter : System.Xml.Serialization.XmlSerializationGeneratedCode + { + protected void AddWriteCallback(System.Type type, string typeName, string typeNs, System.Xml.Serialization.XmlSerializationWriteCallback callback) => throw null; + protected System.Exception CreateChoiceIdentifierValueException(string value, string identifier, string name, string ns) => throw null; + protected System.Exception CreateInvalidAnyTypeException(object o) => throw null; + protected System.Exception CreateInvalidAnyTypeException(System.Type type) => throw null; + protected System.Exception CreateInvalidChoiceIdentifierValueException(string type, string identifier) => throw null; + protected System.Exception CreateInvalidEnumValueException(object value, string typeName) => throw null; + protected System.Exception CreateMismatchChoiceException(string value, string elementName, string enumValue) => throw null; + protected System.Exception CreateUnknownAnyElementException(string name, string ns) => throw null; + protected System.Exception CreateUnknownTypeException(object o) => throw null; + protected System.Exception CreateUnknownTypeException(System.Type type) => throw null; + protected bool EscapeName { get => throw null; set => throw null; } + protected static System.Byte[] FromByteArrayBase64(System.Byte[] value) => throw null; + protected static string FromByteArrayHex(System.Byte[] value) => throw null; + protected static string FromChar(System.Char value) => throw null; + protected static string FromDate(System.DateTime value) => throw null; + protected static string FromDateTime(System.DateTime value) => throw null; + protected static string FromEnum(System.Int64 value, string[] values, System.Int64[] ids, string typeName) => throw null; + protected static string FromEnum(System.Int64 value, string[] values, System.Int64[] ids) => throw null; + protected static string FromTime(System.DateTime value) => throw null; + protected static string FromXmlNCName(string ncName) => throw null; + protected static string FromXmlName(string name) => throw null; + protected static string FromXmlNmToken(string nmToken) => throw null; + protected static string FromXmlNmTokens(string nmTokens) => throw null; + protected string FromXmlQualifiedName(System.Xml.XmlQualifiedName xmlQualifiedName, bool ignoreEmpty) => throw null; + protected string FromXmlQualifiedName(System.Xml.XmlQualifiedName xmlQualifiedName) => throw null; + protected abstract void InitCallbacks(); + protected System.Collections.ArrayList Namespaces { get => throw null; set => throw null; } + protected static System.Reflection.Assembly ResolveDynamicAssembly(string assemblyFullName) => throw null; + protected void TopLevelElement() => throw null; + protected void WriteAttribute(string prefix, string localName, string ns, string value) => throw null; + protected void WriteAttribute(string localName, string value) => throw null; + protected void WriteAttribute(string localName, string ns, string value) => throw null; + protected void WriteAttribute(string localName, string ns, System.Byte[] value) => throw null; + protected void WriteAttribute(string localName, System.Byte[] value) => throw null; + protected void WriteElementEncoded(System.Xml.XmlNode node, string name, string ns, bool isNullable, bool any) => throw null; + protected void WriteElementLiteral(System.Xml.XmlNode node, string name, string ns, bool isNullable, bool any) => throw null; + protected void WriteElementQualifiedName(string localName, string ns, System.Xml.XmlQualifiedName value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementQualifiedName(string localName, string ns, System.Xml.XmlQualifiedName value) => throw null; + protected void WriteElementQualifiedName(string localName, System.Xml.XmlQualifiedName value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementQualifiedName(string localName, System.Xml.XmlQualifiedName value) => throw null; + protected void WriteElementString(string localName, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementString(string localName, string value) => throw null; + protected void WriteElementString(string localName, string ns, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementString(string localName, string ns, string value) => throw null; + protected void WriteElementStringRaw(string localName, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementStringRaw(string localName, string value) => throw null; + protected void WriteElementStringRaw(string localName, string ns, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementStringRaw(string localName, string ns, string value) => throw null; + protected void WriteElementStringRaw(string localName, string ns, System.Byte[] value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementStringRaw(string localName, string ns, System.Byte[] value) => throw null; + protected void WriteElementStringRaw(string localName, System.Byte[] value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteElementStringRaw(string localName, System.Byte[] value) => throw null; + protected void WriteEmptyTag(string name, string ns) => throw null; + protected void WriteEmptyTag(string name) => throw null; + protected void WriteEndElement(object o) => throw null; + protected void WriteEndElement() => throw null; + protected void WriteId(object o) => throw null; + protected void WriteNamespaceDeclarations(System.Xml.Serialization.XmlSerializerNamespaces xmlns) => throw null; + protected void WriteNullTagEncoded(string name, string ns) => throw null; + protected void WriteNullTagEncoded(string name) => throw null; + protected void WriteNullTagLiteral(string name, string ns) => throw null; + protected void WriteNullTagLiteral(string name) => throw null; + protected void WriteNullableQualifiedNameEncoded(string name, string ns, System.Xml.XmlQualifiedName value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteNullableQualifiedNameLiteral(string name, string ns, System.Xml.XmlQualifiedName value) => throw null; + protected void WriteNullableStringEncoded(string name, string ns, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteNullableStringEncodedRaw(string name, string ns, string value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteNullableStringEncodedRaw(string name, string ns, System.Byte[] value, System.Xml.XmlQualifiedName xsiType) => throw null; + protected void WriteNullableStringLiteral(string name, string ns, string value) => throw null; + protected void WriteNullableStringLiteralRaw(string name, string ns, string value) => throw null; + protected void WriteNullableStringLiteralRaw(string name, string ns, System.Byte[] value) => throw null; + protected void WritePotentiallyReferencingElement(string n, string ns, object o, System.Type ambientType, bool suppressReference, bool isNullable) => throw null; + protected void WritePotentiallyReferencingElement(string n, string ns, object o, System.Type ambientType, bool suppressReference) => throw null; + protected void WritePotentiallyReferencingElement(string n, string ns, object o, System.Type ambientType) => throw null; + protected void WritePotentiallyReferencingElement(string n, string ns, object o) => throw null; + protected void WriteReferencedElements() => throw null; + protected void WriteReferencingElement(string n, string ns, object o, bool isNullable) => throw null; + protected void WriteReferencingElement(string n, string ns, object o) => throw null; + protected void WriteRpcResult(string name, string ns) => throw null; + protected void WriteSerializable(System.Xml.Serialization.IXmlSerializable serializable, string name, string ns, bool isNullable, bool wrapped) => throw null; + protected void WriteSerializable(System.Xml.Serialization.IXmlSerializable serializable, string name, string ns, bool isNullable) => throw null; + protected void WriteStartDocument() => throw null; + protected void WriteStartElement(string name, string ns, object o, bool writePrefixed, System.Xml.Serialization.XmlSerializerNamespaces xmlns) => throw null; + protected void WriteStartElement(string name, string ns, object o, bool writePrefixed) => throw null; + protected void WriteStartElement(string name, string ns, object o) => throw null; + protected void WriteStartElement(string name, string ns, bool writePrefixed) => throw null; + protected void WriteStartElement(string name, string ns) => throw null; + protected void WriteStartElement(string name) => throw null; + protected void WriteTypedPrimitive(string name, string ns, object o, bool xsiType) => throw null; + protected void WriteValue(string value) => throw null; + protected void WriteValue(System.Byte[] value) => throw null; + protected void WriteXmlAttribute(System.Xml.XmlNode node, object container) => throw null; + protected void WriteXmlAttribute(System.Xml.XmlNode node) => throw null; + protected void WriteXsiType(string name, string ns) => throw null; + protected System.Xml.XmlWriter Writer { get => throw null; set => throw null; } + protected XmlSerializationWriter() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializer` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSerializer + { + public virtual bool CanDeserialize(System.Xml.XmlReader xmlReader) => throw null; + protected virtual System.Xml.Serialization.XmlSerializationReader CreateReader() => throw null; + protected virtual System.Xml.Serialization.XmlSerializationWriter CreateWriter() => throw null; + public object Deserialize(System.Xml.XmlReader xmlReader, string encodingStyle, System.Xml.Serialization.XmlDeserializationEvents events) => throw null; + public object Deserialize(System.Xml.XmlReader xmlReader, string encodingStyle) => throw null; + public object Deserialize(System.Xml.XmlReader xmlReader, System.Xml.Serialization.XmlDeserializationEvents events) => throw null; + public object Deserialize(System.Xml.XmlReader xmlReader) => throw null; + public object Deserialize(System.IO.TextReader textReader) => throw null; + public object Deserialize(System.IO.Stream stream) => throw null; + protected virtual object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) => throw null; + public static System.Xml.Serialization.XmlSerializer[] FromMappings(System.Xml.Serialization.XmlMapping[] mappings, System.Type type) => throw null; + public static System.Xml.Serialization.XmlSerializer[] FromMappings(System.Xml.Serialization.XmlMapping[] mappings) => throw null; + public static System.Xml.Serialization.XmlSerializer[] FromTypes(System.Type[] types) => throw null; + public static string GetXmlSerializerAssemblyName(System.Type type, string defaultNamespace) => throw null; + public static string GetXmlSerializerAssemblyName(System.Type type) => throw null; + public void Serialize(System.Xml.XmlWriter xmlWriter, object o, System.Xml.Serialization.XmlSerializerNamespaces namespaces, string encodingStyle, string id) => throw null; + public void Serialize(System.Xml.XmlWriter xmlWriter, object o, System.Xml.Serialization.XmlSerializerNamespaces namespaces, string encodingStyle) => throw null; + public void Serialize(System.Xml.XmlWriter xmlWriter, object o, System.Xml.Serialization.XmlSerializerNamespaces namespaces) => throw null; + public void Serialize(System.Xml.XmlWriter xmlWriter, object o) => throw null; + public void Serialize(System.IO.TextWriter textWriter, object o, System.Xml.Serialization.XmlSerializerNamespaces namespaces) => throw null; + public void Serialize(System.IO.TextWriter textWriter, object o) => throw null; + public void Serialize(System.IO.Stream stream, object o, System.Xml.Serialization.XmlSerializerNamespaces namespaces) => throw null; + public void Serialize(System.IO.Stream stream, object o) => throw null; + protected virtual void Serialize(object o, System.Xml.Serialization.XmlSerializationWriter writer) => throw null; + public event System.Xml.Serialization.XmlAttributeEventHandler UnknownAttribute; + public event System.Xml.Serialization.XmlElementEventHandler UnknownElement; + public event System.Xml.Serialization.XmlNodeEventHandler UnknownNode; + public event System.Xml.Serialization.UnreferencedObjectEventHandler UnreferencedObject; + public XmlSerializer(System.Xml.Serialization.XmlTypeMapping xmlTypeMapping) => throw null; + public XmlSerializer(System.Type type, string defaultNamespace) => throw null; + public XmlSerializer(System.Type type, System.Xml.Serialization.XmlRootAttribute root) => throw null; + public XmlSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace, string location) => throw null; + public XmlSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace) => throw null; + public XmlSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides) => throw null; + public XmlSerializer(System.Type type, System.Type[] extraTypes) => throw null; + public XmlSerializer(System.Type type) => throw null; + protected XmlSerializer() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializerAssemblyAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSerializerAssemblyAttribute : System.Attribute + { + public string AssemblyName { get => throw null; set => throw null; } + public string CodeBase { get => throw null; set => throw null; } + public XmlSerializerAssemblyAttribute(string assemblyName, string codeBase) => throw null; + public XmlSerializerAssemblyAttribute(string assemblyName) => throw null; + public XmlSerializerAssemblyAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializerFactory` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSerializerFactory + { + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Xml.Serialization.XmlTypeMapping xmlTypeMapping) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, string defaultNamespace) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, System.Xml.Serialization.XmlRootAttribute root) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace, string location) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type, System.Type[] extraTypes) => throw null; + public System.Xml.Serialization.XmlSerializer CreateSerializer(System.Type type) => throw null; + public XmlSerializerFactory() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializerImplementation` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public abstract class XmlSerializerImplementation + { + public virtual bool CanSerialize(System.Type type) => throw null; + public virtual System.Xml.Serialization.XmlSerializer GetSerializer(System.Type type) => throw null; + public virtual System.Collections.Hashtable ReadMethods { get => throw null; } + public virtual System.Xml.Serialization.XmlSerializationReader Reader { get => throw null; } + public virtual System.Collections.Hashtable TypedSerializers { get => throw null; } + public virtual System.Collections.Hashtable WriteMethods { get => throw null; } + public virtual System.Xml.Serialization.XmlSerializationWriter Writer { get => throw null; } + protected XmlSerializerImplementation() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlSerializerVersionAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlSerializerVersionAttribute : System.Attribute + { + public string Namespace { get => throw null; set => throw null; } + public string ParentAssemblyId { get => throw null; set => throw null; } + public System.Type Type { get => throw null; set => throw null; } + public string Version { get => throw null; set => throw null; } + public XmlSerializerVersionAttribute(System.Type type) => throw null; + public XmlSerializerVersionAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlTypeAttribute` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlTypeAttribute : System.Attribute + { + public bool AnonymousType { get => throw null; set => throw null; } + public bool IncludeInSchema { get => throw null; set => throw null; } + public string Namespace { get => throw null; set => throw null; } + public string TypeName { get => throw null; set => throw null; } + public XmlTypeAttribute(string typeName) => throw null; + public XmlTypeAttribute() => throw null; + } + + // Generated from `System.Xml.Serialization.XmlTypeMapping` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class XmlTypeMapping : System.Xml.Serialization.XmlMapping + { + public string TypeFullName { get => throw null; } + public string TypeName { get => throw null; } + public string XsdTypeName { get => throw null; } + public string XsdTypeNamespace { get => throw null; } + } + + } + } +} From 405c008b47cf2c6fc15e3ad6457b99ad8f797c5b Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 11:41:20 +0200 Subject: [PATCH 1573/1662] Fix conversion operator stubbing + reduce skipped ctor noise in stubs --- csharp/ql/src/Stubs/Stubs.qll | 24 +- .../Microsoft.AspNetCore.Components.Web.cs | 1 - .../Microsoft.AspNetCore.Components.cs | 4 +- ...oft.AspNetCore.Connections.Abstractions.cs | 2 - .../Microsoft.AspNetCore.CookiePolicy.cs | 1 - ...t.AspNetCore.Cryptography.KeyDerivation.cs | 1 - .../Microsoft.AspNetCore.DataProtection.cs | 3 - .../Microsoft.AspNetCore.Http.Abstractions.cs | 5 +- ...soft.AspNetCore.Http.Connections.Common.cs | 1 - .../Microsoft.AspNetCore.Http.Features.cs | 2 - .../Microsoft.AspNetCore.HttpOverrides.cs | 1 - .../Microsoft.AspNetCore.Mvc.Abstractions.cs | 8 +- .../Microsoft.AspNetCore.Mvc.Core.cs | 9 +- .../Microsoft.AspNetCore.Mvc.Razor.cs | 1 - .../Microsoft.AspNetCore.Mvc.TagHelpers.cs | 1 - .../Microsoft.AspNetCore.Mvc.ViewFeatures.cs | 6 - .../Microsoft.AspNetCore.Razor.cs | 3 - .../Microsoft.AspNetCore.Rewrite.cs | 1 - ...crosoft.AspNetCore.Routing.Abstractions.cs | 1 - .../Microsoft.AspNetCore.Routing.cs | 2 - .../Microsoft.AspNetCore.Server.HttpSys.cs | 4 - ...icrosoft.AspNetCore.Server.Kestrel.Core.cs | 5 - ...crosoft.Extensions.Caching.Abstractions.cs | 2 - ...nsions.DependencyInjection.Abstractions.cs | 1 - ...s.Diagnostics.HealthChecks.Abstractions.cs | 1 - ...osoft.Extensions.FileProviders.Physical.cs | 1 - .../Microsoft.Extensions.Identity.Core.cs | 2 - ...ft.Extensions.Localization.Abstractions.cs | 2 +- ...crosoft.Extensions.Logging.Abstractions.cs | 3 +- .../Microsoft.Extensions.Logging.Console.cs | 2 - .../Microsoft.Extensions.Logging.cs | 1 - .../Microsoft.Extensions.Primitives.cs | 14 +- .../Microsoft.JSInterop.cs | 1 - .../Microsoft.Net.Http.Headers.cs | 1 - .../Microsoft.Win32.Registry.cs | 7 - .../System.Diagnostics.EventLog.cs | 11 - .../System.Security.AccessControl.cs | 15 - .../System.Security.Cryptography.Cng.cs | 9 - .../System.Security.Permissions.cs | 34 -- .../System.Security.Principal.Windows.cs | 4 - .../System.Windows.Extensions.cs | 1 - .../Microsoft.NETCore.App/Microsoft.CSharp.cs | 2 - .../Microsoft.VisualBasic.Core.cs | 23 -- .../System.Collections.Concurrent.cs | 1 - .../System.ComponentModel.Annotations.cs | 2 - .../System.ComponentModel.Primitives.cs | 2 - .../System.ComponentModel.TypeConverter.cs | 15 - .../Microsoft.NETCore.App/System.Console.cs | 4 - .../System.Data.Common.cs | 294 +++++++--------- .../System.Diagnostics.Contracts.cs | 1 - .../System.Diagnostics.DiagnosticSource.cs | 4 - .../System.Diagnostics.Process.cs | 5 - .../System.Diagnostics.StackTrace.cs | 1 - .../System.Diagnostics.TraceSource.cs | 4 - .../System.Diagnostics.Tracing.cs | 12 - .../System.Drawing.Primitives.cs | 13 +- .../System.Formats.Asn1.cs | 3 - .../System.IO.Compression.cs | 3 - .../System.IO.FileSystem.DriveInfo.cs | 1 - .../System.IO.FileSystem.Watcher.cs | 2 - .../System.IO.FileSystem.cs | 3 - .../System.IO.IsolatedStorage.cs | 1 - .../System.IO.MemoryMappedFiles.cs | 3 - .../Microsoft.NETCore.App/System.IO.Pipes.cs | 3 - .../System.Linq.Expressions.cs | 3 - .../System.Linq.Parallel.cs | 2 - .../Microsoft.NETCore.App/System.Memory.cs | 2 +- .../Microsoft.NETCore.App/System.Net.Http.cs | 4 - .../Microsoft.NETCore.App/System.Net.Mail.cs | 6 - .../System.Net.NetworkInformation.cs | 9 - .../Microsoft.NETCore.App/System.Net.Ping.cs | 1 - .../System.Net.Primitives.cs | 13 - .../System.Net.Requests.cs | 4 - .../System.Net.Security.cs | 5 - .../System.Net.ServicePoint.cs | 1 - .../System.Net.Sockets.cs | 13 - .../System.Net.WebHeaderCollection.cs | 2 - .../System.Net.WebSockets.cs | 4 - .../System.Numerics.Vectors.cs | 20 +- .../System.ObjectModel.cs | 1 - .../System.Reflection.Emit.cs | 1 - .../System.Reflection.Metadata.cs | 324 ++++++++---------- .../System.Reflection.Primitives.cs | 5 - ...time.InteropServices.RuntimeInformation.cs | 1 - .../System.Runtime.InteropServices.cs | 34 +- .../System.Runtime.Intrinsics.cs | 1 - .../System.Runtime.Numerics.cs | 68 ++-- ...System.Runtime.Serialization.Formatters.cs | 3 - .../System.Runtime.Serialization.Json.cs | 1 - .../System.Runtime.Serialization.Xml.cs | 1 - .../Microsoft.NETCore.App/System.Runtime.cs | 213 ++++-------- ...System.Security.Cryptography.Algorithms.cs | 4 - .../System.Security.Cryptography.Csp.cs | 2 - .../System.Security.Cryptography.Encoding.cs | 2 - ...System.Security.Cryptography.Primitives.cs | 4 - ....Security.Cryptography.X509Certificates.cs | 16 - .../Microsoft.NETCore.App/System.Text.Json.cs | 6 - .../System.Text.RegularExpressions.cs | 2 - .../System.Threading.Channels.cs | 5 +- .../System.Threading.Tasks.Dataflow.cs | 1 - .../System.Threading.Thread.cs | 3 - .../Microsoft.NETCore.App/System.Threading.cs | 2 - .../System.Transactions.Local.cs | 7 - .../System.Xml.ReaderWriter.cs | 36 -- .../System.Xml.XDocument.cs | 108 +++--- .../System.Xml.XmlSerializer.cs | 2 - 106 files changed, 464 insertions(+), 1078 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 3c6036d6c3f6..f8d01ff97c6a 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -744,11 +744,9 @@ private string stubMember(Member m, Assembly assembly) { stubParameters(m) + ")" + stubTypeParametersConstraints(m) + stubImplementation(m) + ";\n" else result = " // Stub generator skipped method: " + m.getName() + "\n" else - if m instanceof Operator + if m instanceof Operator and not m instanceof ConversionOperator then - if - not m.getDeclaringType() instanceof Enum and - not m instanceof ConversionOperator + if not m.getDeclaringType() instanceof Enum then result = " " + stubModifiers(m) + stubClassName(m.(Operator).getReturnType()) + " operator " + @@ -774,17 +772,17 @@ private string stubMember(Member m, Assembly assembly) { else if m instanceof Constructor then - if - not m.getDeclaringType() instanceof Enum and - ( + if m.getDeclaringType() instanceof Enum + then result = "" + else + if not m.getDeclaringType() instanceof StructEx or m.(Constructor).getNumberOfParameters() > 0 - ) - then - result = - " " + stubModifiers(m) + m.getName() + "(" + stubParameters(m) + ")" + - stubConstructorInitializer(m) + " => throw null;\n" - else result = " // Stub generator skipped constructor \n" + then + result = + " " + stubModifiers(m) + m.getName() + "(" + stubParameters(m) + ")" + + stubConstructorInitializer(m) + " => throw null;\n" + else result = " // Stub generator skipped constructor \n" else if m instanceof Indexer then diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs index b7c27b517c04..6f141ce88a54 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs @@ -268,7 +268,6 @@ public class NavLink : Microsoft.AspNetCore.Components.ComponentBase, System.IDi public enum NavLinkMatch { All, - // Stub generator skipped constructor Prefix, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs index 3423139a4e89..0625b781e4ec 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs @@ -325,7 +325,7 @@ public struct MarkupString // Stub generator skipped constructor public override string ToString() => throw null; public string Value { get => throw null; } - // Stub generator skipped operator: explicit conversion + public static explicit operator Microsoft.AspNetCore.Components.MarkupString(string value) => throw null; } // Generated from `Microsoft.AspNetCore.Components.NavigationException` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -528,7 +528,6 @@ public enum RenderTreeEditType PrependFrame, RemoveAttribute, RemoveFrame, - // Stub generator skipped constructor SetAttribute, StepIn, StepOut, @@ -575,7 +574,6 @@ public enum RenderTreeFrameType Markup, None, Region, - // Stub generator skipped constructor Text, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs index fb80daef77ed..effa56644804 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs @@ -134,7 +134,6 @@ public class FileHandleEndPoint : System.Net.EndPoint public enum FileHandleType { Auto, - // Stub generator skipped constructor Pipe, Tcp, } @@ -173,7 +172,6 @@ public enum TransferFormat { Binary, Text, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Connections.UriEndPoint` in `Microsoft.AspNetCore.Connections.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs index b8c919788926..d620630756a6 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs @@ -67,7 +67,6 @@ public class DeleteCookieContext public enum HttpOnlyPolicy { Always, - // Stub generator skipped constructor None, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs index 2922e1c65be6..c225da7db899 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs @@ -20,7 +20,6 @@ public enum KeyDerivationPrf HMACSHA1, HMACSHA256, HMACSHA512, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs index 842803c672fe..f202f4674d43 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs @@ -118,7 +118,6 @@ public enum EncryptionAlgorithm AES_192_GCM, AES_256_CBC, AES_256_GCM, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor` in `Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -146,7 +145,6 @@ public enum ValidationAlgorithm { HMACSHA256, HMACSHA512, - // Stub generator skipped constructor } namespace ConfigurationModel @@ -458,7 +456,6 @@ public class CertificateXmlEncryptor : Microsoft.AspNetCore.DataProtection.XmlEn [System.Flags] public enum DpapiNGProtectionDescriptorFlags { - // Stub generator skipped constructor MachineKey, NamedDescriptor, None, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs index 3d65ff497596..2098027ba782 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs @@ -176,7 +176,6 @@ public class CookieBuilder public enum CookieSecurePolicy { Always, - // Stub generator skipped constructor None, SameAsRequest, } @@ -445,8 +444,8 @@ public struct PathString : System.IEquatable throw null; public string ToUriComponent() => throw null; public string Value { get => throw null; } - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator string(Microsoft.AspNetCore.Http.PathString path) => throw null; + public static implicit operator Microsoft.AspNetCore.Http.PathString(string s) => throw null; } // Generated from `Microsoft.AspNetCore.Http.QueryString` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs index 2d0d0b1821ae..0ba5cb988223 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs @@ -20,7 +20,6 @@ public class AvailableTransport [System.Flags] public enum HttpTransportType { - // Stub generator skipped constructor LongPolling, None, ServerSentEvents, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs index 35413e0766d5..cadb1e9668ed 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs @@ -108,7 +108,6 @@ public enum SameSiteMode { Lax, None, - // Stub generator skipped constructor Strict, Unspecified, } @@ -165,7 +164,6 @@ public enum HttpsCompressionMode Compress, Default, DoNotCompress, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Http.Features.IFeatureCollection` in `Microsoft.AspNetCore.Http.Features, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs index ef3eee26e56b..57a34e8bdc56 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs @@ -74,7 +74,6 @@ public class CertificateForwardingOptions public enum ForwardedHeaders { All, - // Stub generator skipped constructor None, XForwardedFor, XForwardedHost, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs index f95d7845da55..8bd3fb00a966 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs @@ -554,7 +554,6 @@ public class InputFormatterException : System.Exception public enum InputFormatterExceptionPolicy { AllExceptions, - // Stub generator skipped constructor MalformedInputExceptions, } @@ -650,7 +649,6 @@ public enum EmptyBodyBehavior Allow, Default, Disallow, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.EnumGroupAndName` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -1031,7 +1029,6 @@ public abstract class ModelStateEntry public enum ModelValidationState { Invalid, - // Stub generator skipped constructor Skipped, Unvalidated, Valid, @@ -1077,8 +1074,8 @@ public struct ValueProviderResult : System.IEquatable throw null; // Stub generator skipped constructor public Microsoft.Extensions.Primitives.StringValues Values { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator string[](Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult result) => throw null; + public static explicit operator string(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult result) => throw null; } namespace Metadata @@ -1126,7 +1123,6 @@ public struct ModelMetadataIdentity : System.IEquatable : Microsoft.AspNetCore.Mvc.Infrastructure.ICon Microsoft.AspNetCore.Mvc.IActionResult Microsoft.AspNetCore.Mvc.Infrastructure.IConvertToActionResult.Convert() => throw null; public Microsoft.AspNetCore.Mvc.ActionResult Result { get => throw null; } public TValue Value { get => throw null; } - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator Microsoft.AspNetCore.Mvc.ActionResult(TValue value) => throw null; + public static implicit operator Microsoft.AspNetCore.Mvc.ActionResult(Microsoft.AspNetCore.Mvc.ActionResult result) => throw null; } // Generated from `Microsoft.AspNetCore.Mvc.AntiforgeryValidationFailedResult` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -264,7 +264,6 @@ public class ClientErrorData // Generated from `Microsoft.AspNetCore.Mvc.CompatibilityVersion` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum CompatibilityVersion { - // Stub generator skipped constructor Latest, Version_2_0, Version_2_1, @@ -1081,7 +1080,6 @@ public enum ResponseCacheLocation Any, Client, None, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Mvc.RouteAttribute` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -1276,7 +1274,6 @@ public class ApiConventionNameMatchAttribute : System.Attribute public enum ApiConventionNameMatchBehavior { Any, - // Stub generator skipped constructor Exact, Prefix, Suffix, @@ -1300,7 +1297,6 @@ public class ApiConventionTypeMatchAttribute : System.Attribute public enum ApiConventionTypeMatchBehavior { Any, - // Stub generator skipped constructor AssignableFrom, } @@ -2774,7 +2770,6 @@ public class BindRequiredAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.Bindi // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum BindingBehavior { - // Stub generator skipped constructor Never, Optional, Required, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs index 1a25df2f720d..a03b124b5140 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs @@ -147,7 +147,6 @@ public class LanguageViewLocationExpander : Microsoft.AspNetCore.Mvc.Razor.IView // Generated from `Microsoft.AspNetCore.Mvc.Razor.LanguageViewLocationExpanderFormat` in `Microsoft.AspNetCore.Mvc.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum LanguageViewLocationExpanderFormat { - // Stub generator skipped constructor SubFolder, Suffix, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs index 224e240c4f96..f010b6845b7f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs @@ -14,7 +14,6 @@ public enum ValidationSummary All, ModelOnly, None, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs index bc8ba05326d1..0daca7740b72 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs @@ -342,7 +342,6 @@ namespace Rendering // Generated from `Microsoft.AspNetCore.Mvc.Rendering.CheckBoxHiddenInputRenderMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum CheckBoxHiddenInputRenderMode { - // Stub generator skipped constructor EndOfForm, Inline, None, @@ -351,7 +350,6 @@ public enum CheckBoxHiddenInputRenderMode // Generated from `Microsoft.AspNetCore.Mvc.Rendering.FormMethod` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum FormMethod { - // Stub generator skipped constructor Get, Post, } @@ -360,7 +358,6 @@ public enum FormMethod public enum Html5DateRenderingMode { CurrentCulture, - // Stub generator skipped constructor Rfc3339, } @@ -691,7 +688,6 @@ public class MvcForm : System.IDisposable // Generated from `Microsoft.AspNetCore.Mvc.Rendering.RenderMode` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum RenderMode { - // Stub generator skipped constructor Server, ServerPrerendered, Static, @@ -763,7 +759,6 @@ public enum TagRenderMode Normal, SelfClosing, StartTag, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Mvc.Rendering.ViewComponentHelperExtensions` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -1352,7 +1347,6 @@ public enum InputType { CheckBox, Hidden, - // Stub generator skipped constructor Password, Radio, Text, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs index 08c4bca21382..69c0b944ed5d 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs @@ -46,7 +46,6 @@ public class HtmlAttributeNotBoundAttribute : System.Attribute public enum HtmlAttributeValueStyle { DoubleQuotes, - // Stub generator skipped constructor Minimized, NoQuotes, SingleQuotes, @@ -243,14 +242,12 @@ public enum TagMode SelfClosing, StartTagAndEndTag, StartTagOnly, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Razor.TagHelpers.TagStructure` in `Microsoft.AspNetCore.Razor, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum TagStructure { NormalOrSelfClosing, - // Stub generator skipped constructor Unspecified, WithoutEndTag, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs index 14e774ca4950..29d501f8291e 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs @@ -92,7 +92,6 @@ public enum RuleResult { ContinueRules, EndResponse, - // Stub generator skipped constructor SkipRemainingRules, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs index f2a826065453..cb910d9aa2fe 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs @@ -95,7 +95,6 @@ public struct RouteDataSnapshot public enum RouteDirection { IncomingRequest, - // Stub generator skipped constructor UrlGeneration, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs index 6334032f5314..d767df1585e3 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs @@ -837,7 +837,6 @@ public enum RoutePatternParameterKind { CatchAll, Optional, - // Stub generator skipped constructor Standard, } @@ -877,7 +876,6 @@ public enum RoutePatternPartKind { Literal, Parameter, - // Stub generator skipped constructor Separator, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs index bd29b98713e1..4ef927c7968a 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs @@ -31,7 +31,6 @@ public class AuthenticationManager [System.Flags] public enum AuthenticationSchemes { - // Stub generator skipped constructor Basic, Kerberos, NTLM, @@ -44,7 +43,6 @@ public enum ClientCertificateMethod { AllowCertificate, AllowRenegotation, - // Stub generator skipped constructor NoCertificate, } @@ -61,7 +59,6 @@ public enum Http503VerbosityLevel { Basic, Full, - // Stub generator skipped constructor Limited, } @@ -122,7 +119,6 @@ public enum RequestQueueMode Attach, Create, CreateOrAttach, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Server.HttpSys.TimeoutManager` in `Microsoft.AspNetCore.Server.HttpSys, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs index 874d89cb6ff9..549044d42434 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs @@ -115,7 +115,6 @@ public enum HttpProtocols Http1AndHttp2AndHttp3, Http2, Http3, - // Stub generator skipped constructor None, } @@ -261,7 +260,6 @@ public enum HttpMethod Delete, Get, Head, - // Stub generator skipped constructor None, Options, Patch, @@ -283,7 +281,6 @@ public class HttpParser where TRequestHandler : Microsoft.AspNe public enum HttpScheme { Http, - // Stub generator skipped constructor Https, Unknown, } @@ -295,7 +292,6 @@ public enum HttpVersion Http11, Http2, Http3, - // Stub generator skipped constructor Unknown, } @@ -359,7 +355,6 @@ public static class CertificateLoader public enum ClientCertificateMode { AllowCertificate, - // Stub generator skipped constructor NoCertificate, RequireCertificate, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs index 4ff388f2cf5f..bd270b12d78f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs @@ -87,7 +87,6 @@ public static class CacheExtensions // Generated from `Microsoft.Extensions.Caching.Memory.CacheItemPriority` in `Microsoft.Extensions.Caching.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum CacheItemPriority { - // Stub generator skipped constructor High, Low, NeverRemove, @@ -98,7 +97,6 @@ public enum CacheItemPriority public enum EvictionReason { Capacity, - // Stub generator skipped constructor Expired, None, Removed, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs index bb5ab498a83e..f117555dc325 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs @@ -120,7 +120,6 @@ public class ServiceDescriptor public enum ServiceLifetime { Scoped, - // Stub generator skipped constructor Singleton, Transient, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs index e0589af0aafc..188828cbaa9f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs @@ -71,7 +71,6 @@ public struct HealthReportEntry public enum HealthStatus { Degraded, - // Stub generator skipped constructor Healthy, Unhealthy, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs index b7d265c87dec..42bdf681ff7c 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs @@ -42,7 +42,6 @@ namespace Physical public enum ExclusionFilters { DotPrefixed, - // Stub generator skipped constructor Hidden, None, Sensitive, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs index ca58895ac701..d0a44577a047 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs @@ -391,7 +391,6 @@ public enum PasswordHasherCompatibilityMode { IdentityV2, IdentityV3, - // Stub generator skipped constructor } // Generated from `Microsoft.AspNetCore.Identity.PasswordHasherOptions` in `Microsoft.Extensions.Identity.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -430,7 +429,6 @@ public class PasswordValidator : Microsoft.AspNetCore.Identity.IPasswordV public enum PasswordVerificationResult { Failed, - // Stub generator skipped constructor Success, SuccessRehashNeeded, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs index 782704a521ec..80ed5c2540cd 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs @@ -37,7 +37,7 @@ public class LocalizedString public string SearchedLocation { get => throw null; } public override string ToString() => throw null; public string Value { get => throw null; } - // Stub generator skipped operator: implicit conversion + public static implicit operator string(Microsoft.Extensions.Localization.LocalizedString localizedString) => throw null; } // Generated from `Microsoft.Extensions.Localization.StringLocalizer<>` in `Microsoft.Extensions.Localization.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs index 620c616aaa78..315431f58717 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs @@ -19,7 +19,7 @@ public struct EventId public int Id { get => throw null; } public string Name { get => throw null; } public override string ToString() => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator Microsoft.Extensions.Logging.EventId(int i) => throw null; } // Generated from `Microsoft.Extensions.Logging.IExternalScopeProvider` in `Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -68,7 +68,6 @@ public enum LogLevel Debug, Error, Information, - // Stub generator skipped constructor None, Trace, Warning, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs index 62d523966edb..63b781f6907c 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs @@ -51,7 +51,6 @@ public class ConsoleFormatterOptions // Generated from `Microsoft.Extensions.Logging.Console.ConsoleLoggerFormat` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public enum ConsoleLoggerFormat { - // Stub generator skipped constructor Default, Systemd, } @@ -92,7 +91,6 @@ public enum LoggerColorBehavior Default, Disabled, Enabled, - // Stub generator skipped constructor } // Generated from `Microsoft.Extensions.Logging.Console.SimpleConsoleFormatterOptions` in `Microsoft.Extensions.Logging.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs index b1ba2ef19880..655e40c2d900 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs @@ -20,7 +20,6 @@ namespace Logging [System.Flags] public enum ActivityTrackingOptions { - // Stub generator skipped constructor None, ParentId, SpanId, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs index 30be4b497fa2..3fc940b844e7 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs @@ -90,9 +90,9 @@ public struct StringSegment : System.IEquatable, System.IEquatable throw null; public Microsoft.Extensions.Primitives.StringSegment TrimStart() => throw null; public string Value { get => throw null; } - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ReadOnlySpan(Microsoft.Extensions.Primitives.StringSegment segment) => throw null; + public static implicit operator System.ReadOnlyMemory(Microsoft.Extensions.Primitives.StringSegment segment) => throw null; + public static implicit operator Microsoft.Extensions.Primitives.StringSegment(string value) => throw null; } // Generated from `Microsoft.Extensions.Primitives.StringSegmentComparer` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` @@ -194,10 +194,10 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S // Stub generator skipped constructor public string[] ToArray() => throw null; public override string ToString() => throw null; - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator string[](Microsoft.Extensions.Primitives.StringValues value) => throw null; + public static implicit operator string(Microsoft.Extensions.Primitives.StringValues values) => throw null; + public static implicit operator Microsoft.Extensions.Primitives.StringValues(string[] values) => throw null; + public static implicit operator Microsoft.Extensions.Primitives.StringValues(string value) => throw null; } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs index 4ba01faec0e0..4804d2fe5528 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs @@ -65,7 +65,6 @@ public interface IJSUnmarshalledRuntime public enum JSCallResultType { Default, - // Stub generator skipped constructor JSObjectReference, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs index 49469ae691e2..c28d2d89612a 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs @@ -360,7 +360,6 @@ public enum SameSiteMode { Lax, None, - // Stub generator skipped constructor Strict, Unspecified, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs index 22f20a410ae9..c3b204d7377f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs @@ -26,7 +26,6 @@ public enum RegistryHive CurrentUser, LocalMachine, PerformanceData, - // Stub generator skipped constructor Users, } @@ -84,7 +83,6 @@ public enum RegistryKeyPermissionCheck Default, ReadSubTree, ReadWriteSubTree, - // Stub generator skipped constructor } // Generated from `Microsoft.Win32.RegistryOptions` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -92,7 +90,6 @@ public enum RegistryKeyPermissionCheck public enum RegistryOptions { None, - // Stub generator skipped constructor Volatile, } @@ -105,7 +102,6 @@ public enum RegistryValueKind MultiString, None, QWord, - // Stub generator skipped constructor String, Unknown, } @@ -116,7 +112,6 @@ public enum RegistryValueOptions { DoNotExpandEnvironmentNames, None, - // Stub generator skipped constructor } // Generated from `Microsoft.Win32.RegistryView` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -125,7 +120,6 @@ public enum RegistryView Default, Registry32, Registry64, - // Stub generator skipped constructor } namespace SafeHandles @@ -221,7 +215,6 @@ public enum RegistryRights QueryValues, ReadKey, ReadPermissions, - // Stub generator skipped constructor SetValue, TakeOwnership, WriteKey, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs index acbd76504c8e..5bc5e4332edb 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs @@ -117,7 +117,6 @@ public class EventLogEntryCollection : System.Collections.IEnumerable, System.Co public enum EventLogEntryType { Error, - // Stub generator skipped constructor FailureAudit, Information, SuccessAudit, @@ -159,7 +158,6 @@ public class EventSourceCreationData public enum OverflowAction { DoNotOverwrite, - // Stub generator skipped constructor OverwriteAsNeeded, OverwriteOlder, } @@ -256,7 +254,6 @@ public enum EventLogIsolation { Application, Custom, - // Stub generator skipped constructor System, } @@ -273,7 +270,6 @@ public enum EventLogMode { AutoBackup, Circular, - // Stub generator skipped constructor Retain, } @@ -411,7 +407,6 @@ public enum EventLogType Administrative, Analytical, Debug, - // Stub generator skipped constructor Operational, } @@ -512,7 +507,6 @@ public enum PathType { FilePath, LogName, - // Stub generator skipped constructor } // Generated from `System.Diagnostics.Eventing.Reader.ProviderMetadata` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` @@ -544,7 +538,6 @@ public enum SessionAuthentication Kerberos, Negotiate, Ntlm, - // Stub generator skipped constructor } // Generated from `System.Diagnostics.Eventing.Reader.StandardEventKeywords` in `System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` @@ -559,7 +552,6 @@ public enum StandardEventKeywords None, ResponseTime, Sqm, - // Stub generator skipped constructor WdiContext, WdiDiagnostic, } @@ -571,7 +563,6 @@ public enum StandardEventLevel Error, Informational, LogAlways, - // Stub generator skipped constructor Verbose, Warning, } @@ -587,7 +578,6 @@ public enum StandardEventOpcode Reply, Resume, Send, - // Stub generator skipped constructor Start, Stop, Suspend, @@ -597,7 +587,6 @@ public enum StandardEventOpcode public enum StandardEventTask { None, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs index 3daf16967265..1a7d2e075f88 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs @@ -52,7 +52,6 @@ namespace AccessControl [System.Flags] public enum AccessControlActions { - // Stub generator skipped constructor Change, None, View, @@ -61,7 +60,6 @@ public enum AccessControlActions // Generated from `System.Security.AccessControl.AccessControlModification` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AccessControlModification { - // Stub generator skipped constructor Add, Remove, RemoveAll, @@ -75,7 +73,6 @@ public enum AccessControlModification public enum AccessControlSections { Access, - // Stub generator skipped constructor All, Audit, Group, @@ -86,7 +83,6 @@ public enum AccessControlSections // Generated from `System.Security.AccessControl.AccessControlType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AccessControlType { - // Stub generator skipped constructor Allow, Deny, } @@ -121,7 +117,6 @@ public class AceEnumerator : System.Collections.IEnumerator [System.Flags] public enum AceFlags { - // Stub generator skipped constructor AuditFlags, ContainerInherit, FailedAccess, @@ -139,7 +134,6 @@ public enum AceQualifier { AccessAllowed, AccessDenied, - // Stub generator skipped constructor SystemAlarm, SystemAudit, } @@ -156,7 +150,6 @@ public enum AceType AccessDeniedCallback, AccessDeniedCallbackObject, AccessDeniedObject, - // Stub generator skipped constructor MaxDefinedAceType, SystemAlarm, SystemAlarmCallback, @@ -172,7 +165,6 @@ public enum AceType [System.Flags] public enum AuditFlags { - // Stub generator skipped constructor Failure, None, Success, @@ -297,7 +289,6 @@ public class CompoundAce : System.Security.AccessControl.KnownAce // Generated from `System.Security.AccessControl.CompoundAceType` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CompoundAceType { - // Stub generator skipped constructor Impersonation, } @@ -305,7 +296,6 @@ public enum CompoundAceType [System.Flags] public enum ControlFlags { - // Stub generator skipped constructor DiscretionaryAclAutoInheritRequired, DiscretionaryAclAutoInherited, DiscretionaryAclDefaulted, @@ -416,7 +406,6 @@ public abstract class GenericSecurityDescriptor public enum InheritanceFlags { ContainerInherit, - // Stub generator skipped constructor None, ObjectInherit, } @@ -475,7 +464,6 @@ public enum ObjectAceFlags { InheritedObjectAceTypePresent, None, - // Stub generator skipped constructor ObjectAceTypePresent, } @@ -583,7 +571,6 @@ public enum PropagationFlags InheritOnly, NoPropagateInherit, None, - // Stub generator skipped constructor } // Generated from `System.Security.AccessControl.QualifiedAce` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -638,7 +625,6 @@ public enum ResourceType ProviderDefined, RegistryKey, RegistryWow6432Key, - // Stub generator skipped constructor Service, Unknown, WindowObject, @@ -652,7 +638,6 @@ public enum SecurityInfos DiscretionaryAcl, Group, Owner, - // Stub generator skipped constructor SystemAcl, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs index 8b7c3d7c9958..a07eefffc895 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs @@ -132,7 +132,6 @@ public enum CngExportPolicies AllowExport, AllowPlaintextArchiving, AllowPlaintextExport, - // Stub generator skipped constructor None, } @@ -198,7 +197,6 @@ public class CngKeyBlobFormat : System.IEquatable : System.Collections.IEnumerable, System.Collect [System.Flags] public enum EnumerablePartitionerOptions { - // Stub generator skipped constructor NoBuffering, None, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs index 7dde4f19e0d1..2d8273fc924c 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs @@ -66,7 +66,6 @@ public enum DataType CreditCard, Currency, Custom, - // Stub generator skipped constructor Date, DateTime, Duration, @@ -410,7 +409,6 @@ public class DatabaseGeneratedAttribute : System.Attribute public enum DatabaseGeneratedOption { Computed, - // Stub generator skipped constructor Identity, None, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs index 88658c4c621c..872f96c3bf62 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs @@ -130,7 +130,6 @@ public class DesignerCategoryAttribute : System.Attribute public enum DesignerSerializationVisibility { Content, - // Stub generator skipped constructor Hidden, Visible, } @@ -336,7 +335,6 @@ public enum RefreshProperties { All, None, - // Stub generator skipped constructor Repaint, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs index e1a3502f4c81..00315ed15290 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs @@ -118,7 +118,6 @@ public class BindableAttribute : System.Attribute // Generated from `System.ComponentModel.BindableSupport` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum BindableSupport { - // Stub generator skipped constructor Default, No, Yes, @@ -127,7 +126,6 @@ public enum BindableSupport // Generated from `System.ComponentModel.BindingDirection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum BindingDirection { - // Stub generator skipped constructor OneWay, TwoWay, } @@ -215,7 +213,6 @@ public class CharConverter : System.ComponentModel.TypeConverter public enum CollectionChangeAction { Add, - // Stub generator skipped constructor Refresh, Remove, } @@ -379,7 +376,6 @@ public class DataObjectMethodAttribute : System.Attribute // Generated from `System.ComponentModel.DataObjectMethodType` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DataObjectMethodType { - // Stub generator skipped constructor Delete, Fill, Insert, @@ -739,7 +735,6 @@ public class InheritanceAttribute : System.Attribute // Generated from `System.ComponentModel.InheritanceLevel` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum InheritanceLevel { - // Stub generator skipped constructor Inherited, InheritedReadOnly, NotInherited, @@ -860,7 +855,6 @@ public class LicenseProviderAttribute : System.Attribute public enum LicenseUsageMode { Designtime, - // Stub generator skipped constructor Runtime, } @@ -901,7 +895,6 @@ public enum ListChangedType ItemChanged, ItemDeleted, ItemMoved, - // Stub generator skipped constructor PropertyDescriptorAdded, PropertyDescriptorChanged, PropertyDescriptorDeleted, @@ -944,7 +937,6 @@ public enum ListSortDirection { Ascending, Descending, - // Stub generator skipped constructor } // Generated from `System.ComponentModel.LookupBindingPropertiesAttribute` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1071,7 +1063,6 @@ public enum MaskedTextResultHint DigitExpected, InvalidInput, LetterExpected, - // Stub generator skipped constructor NoEffect, NonEditPosition, PositionOutOfRange, @@ -1275,7 +1266,6 @@ public enum PropertyTabScope Component, Document, Global, - // Stub generator skipped constructor Static, } @@ -1427,7 +1417,6 @@ public enum ToolboxItemFilterType Custom, Prevent, Require, - // Stub generator skipped constructor } // Generated from `System.ComponentModel.TypeConverter` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1874,7 +1863,6 @@ public class DesigntimeLicenseContextSerializer public enum HelpContextType { Ambient, - // Stub generator skipped constructor Selection, ToolWindowSelection, Window, @@ -1899,7 +1887,6 @@ public enum HelpKeywordType F1Keyword, FilterKeyword, GeneralKeyword, - // Stub generator skipped constructor } // Generated from `System.ComponentModel.Design.IComponentChangeService` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2177,7 +2164,6 @@ public enum SelectionTypes Primary, Remove, Replace, - // Stub generator skipped constructor Toggle, Valid, } @@ -2290,7 +2276,6 @@ public enum ViewTechnology { Default, Passthrough, - // Stub generator skipped constructor WindowsForms, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs index 75567dd31438..e912e9c42337 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs @@ -109,7 +109,6 @@ public enum ConsoleColor { Black, Blue, - // Stub generator skipped constructor Cyan, DarkBlue, DarkCyan, @@ -144,7 +143,6 @@ public enum ConsoleKey BrowserStop, C, Clear, - // Stub generator skipped constructor CrSel, D, D0, @@ -296,7 +294,6 @@ public struct ConsoleKeyInfo : System.IEquatable public enum ConsoleModifiers { Alt, - // Stub generator skipped constructor Control, Shift, } @@ -304,7 +301,6 @@ public enum ConsoleModifiers // Generated from `System.ConsoleSpecialKey` in `System.Console, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum ConsoleSpecialKey { - // Stub generator skipped constructor ControlBreak, ControlC, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs index 09619994dba7..345336f61250 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs @@ -7,7 +7,6 @@ namespace Data // Generated from `System.Data.AcceptRejectRule` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AcceptRejectRule { - // Stub generator skipped constructor Cascade, None, } @@ -17,7 +16,6 @@ public enum AcceptRejectRule public enum CommandBehavior { CloseConnection, - // Stub generator skipped constructor Default, KeyInfo, SchemaOnly, @@ -29,7 +27,6 @@ public enum CommandBehavior // Generated from `System.Data.CommandType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CommandType { - // Stub generator skipped constructor StoredProcedure, TableDirect, Text, @@ -40,7 +37,6 @@ public enum ConflictOption { CompareAllSearchableValues, CompareRowVersion, - // Stub generator skipped constructor OverwriteChanges, } @@ -51,7 +47,6 @@ public enum ConnectionState Broken, Closed, Connecting, - // Stub generator skipped constructor Executing, Fetching, Open, @@ -346,7 +341,6 @@ public enum DataRowAction ChangeCurrentAndOriginal, ChangeOriginal, Commit, - // Stub generator skipped constructor Delete, Nothing, Rollback, @@ -422,7 +416,6 @@ public static class DataRowExtensions public enum DataRowState { Added, - // Stub generator skipped constructor Deleted, Detached, Modified, @@ -433,7 +426,6 @@ public enum DataRowState public enum DataRowVersion { Current, - // Stub generator skipped constructor Default, Original, Proposed, @@ -583,7 +575,6 @@ public class DataSet : System.ComponentModel.MarshalByValueComponent, System.Xml // Generated from `System.Data.DataSetDateTime` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DataSetDateTime { - // Stub generator skipped constructor Local, Unspecified, UnspecifiedLocal, @@ -962,7 +953,6 @@ public enum DataViewRowState { Added, CurrentRows, - // Stub generator skipped constructor Deleted, ModifiedCurrent, ModifiedOriginal, @@ -1010,7 +1000,6 @@ public enum DbType DateTime, DateTime2, DateTimeOffset, - // Stub generator skipped constructor Decimal, Double, Guid, @@ -1337,7 +1326,6 @@ public class InvalidExpressionException : System.Data.DataException public enum IsolationLevel { Chaos, - // Stub generator skipped constructor ReadCommitted, ReadUncommitted, RepeatableRead, @@ -1350,14 +1338,12 @@ public enum IsolationLevel public enum KeyRestrictionBehavior { AllowOnly, - // Stub generator skipped constructor PreventUsage, } // Generated from `System.Data.LoadOption` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum LoadOption { - // Stub generator skipped constructor OverwriteChanges, PreserveChanges, Upsert, @@ -1369,7 +1355,6 @@ public enum MappingType Attribute, Element, Hidden, - // Stub generator skipped constructor SimpleContent, } @@ -1389,7 +1374,6 @@ public enum MissingMappingAction { Error, Ignore, - // Stub generator skipped constructor Passthrough, } @@ -1409,7 +1393,6 @@ public enum MissingSchemaAction AddWithKey, Error, Ignore, - // Stub generator skipped constructor } // Generated from `System.Data.NoNullAllowedException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1432,7 +1415,6 @@ public enum ParameterDirection Input, InputOutput, Output, - // Stub generator skipped constructor ReturnValue, } @@ -1467,7 +1449,6 @@ public enum Rule { Cascade, None, - // Stub generator skipped constructor SetDefault, SetNull, } @@ -1477,14 +1458,12 @@ public enum SchemaSerializationMode { ExcludeSchema, IncludeSchema, - // Stub generator skipped constructor } // Generated from `System.Data.SchemaType` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum SchemaType { Mapped, - // Stub generator skipped constructor Source, } @@ -1492,7 +1471,6 @@ public enum SchemaType public enum SerializationFormat { Binary, - // Stub generator skipped constructor Xml, } @@ -1519,7 +1497,6 @@ public enum SqlDbType SmallDateTime, SmallInt, SmallMoney, - // Stub generator skipped constructor Structured, Text, Time, @@ -1561,7 +1538,6 @@ public enum StatementType Delete, Insert, Select, - // Stub generator skipped constructor Update, } @@ -1632,7 +1608,6 @@ public enum UpdateRowSource FirstReturnedRecord, None, OutputParameters, - // Stub generator skipped constructor } // Generated from `System.Data.UpdateStatus` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1642,7 +1617,6 @@ public enum UpdateStatus ErrorsOccurred, SkipAllRemainingRows, SkipCurrentRow, - // Stub generator skipped constructor } // Generated from `System.Data.VersionNotFoundException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1664,7 +1638,6 @@ public enum XmlReadMode InferSchema, InferTypedSchema, ReadSchema, - // Stub generator skipped constructor } // Generated from `System.Data.XmlWriteMode` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1673,7 +1646,6 @@ public enum XmlWriteMode DiffGram, IgnoreSchema, WriteSchema, - // Stub generator skipped constructor } namespace Common @@ -1681,7 +1653,6 @@ namespace Common // Generated from `System.Data.Common.CatalogLocation` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CatalogLocation { - // Stub generator skipped constructor End, Start, } @@ -2398,7 +2369,6 @@ public abstract class DbTransaction : System.MarshalByRefObject, System.IDisposa public enum GroupByBehavior { ExactMatch, - // Stub generator skipped constructor MustContainAll, NotSupported, Unknown, @@ -2414,7 +2384,6 @@ public interface IDbColumnSchemaGenerator // Generated from `System.Data.Common.IdentifierCase` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum IdentifierCase { - // Stub generator skipped constructor Insensitive, Sensitive, Unknown, @@ -2499,7 +2468,6 @@ public enum SupportedJoinOperators LeftOuter, None, RightOuter, - // Stub generator skipped constructor } } @@ -2554,9 +2522,9 @@ public struct SqlBinary : System.Xml.Serialization.IXmlSerializable, System.ICom public override string ToString() => throw null; public System.Byte[] Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Data.SqlTypes.SqlBinary(System.Data.SqlTypes.SqlGuid x) => throw null; + public static explicit operator System.Byte[](System.Data.SqlTypes.SqlBinary x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlBinary(System.Byte[] x) => throw null; } // Generated from `System.Data.SqlTypes.SqlBoolean` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2613,18 +2581,18 @@ public struct SqlBoolean : System.Xml.Serialization.IXmlSerializable, System.ICo public static System.Data.SqlTypes.SqlBoolean Xor(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; public static System.Data.SqlTypes.SqlBoolean Zero; public static System.Data.SqlTypes.SqlBoolean operator ^(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator bool(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBoolean(System.Data.SqlTypes.SqlByte x) => throw null; public static bool operator false(System.Data.SqlTypes.SqlBoolean x) => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Data.SqlTypes.SqlBoolean(bool x) => throw null; public static bool operator true(System.Data.SqlTypes.SqlBoolean x) => throw null; public static System.Data.SqlTypes.SqlBoolean operator |(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) => throw null; public static System.Data.SqlTypes.SqlBoolean operator ~(System.Data.SqlTypes.SqlBoolean x) => throw null; @@ -2689,17 +2657,17 @@ public struct SqlByte : System.Xml.Serialization.IXmlSerializable, System.ICompa public static System.Data.SqlTypes.SqlByte Xor(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; public static System.Data.SqlTypes.SqlByte Zero; public static System.Data.SqlTypes.SqlByte operator ^(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlByte(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static explicit operator System.Byte(System.Data.SqlTypes.SqlByte x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlByte(System.Byte x) => throw null; public static System.Data.SqlTypes.SqlByte operator |(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) => throw null; public static System.Data.SqlTypes.SqlByte operator ~(System.Data.SqlTypes.SqlByte x) => throw null; } @@ -2730,8 +2698,8 @@ public class SqlBytes : System.Xml.Serialization.IXmlSerializable, System.Runtim public System.Byte[] Value { get => throw null; } public void Write(System.Int64 offset, System.Byte[] buffer, int offsetInBuffer, int count) => throw null; void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Data.SqlTypes.SqlBytes(System.Data.SqlTypes.SqlBinary value) => throw null; + public static explicit operator System.Data.SqlTypes.SqlBinary(System.Data.SqlTypes.SqlBytes value) => throw null; } // Generated from `System.Data.SqlTypes.SqlChars` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2758,8 +2726,8 @@ public class SqlChars : System.Xml.Serialization.IXmlSerializable, System.Runtim public System.Char[] Value { get => throw null; } public void Write(System.Int64 offset, System.Char[] buffer, int offsetInBuffer, int count) => throw null; void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlChars value) => throw null; + public static explicit operator System.Data.SqlTypes.SqlChars(System.Data.SqlTypes.SqlString value) => throw null; } // Generated from `System.Data.SqlTypes.SqlCompareOptions` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2773,7 +2741,6 @@ public enum SqlCompareOptions IgnoreNonSpace, IgnoreWidth, None, - // Stub generator skipped constructor } // Generated from `System.Data.SqlTypes.SqlDateTime` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2823,9 +2790,9 @@ public struct SqlDateTime : System.Xml.Serialization.IXmlSerializable, System.IC public override string ToString() => throw null; public System.DateTime Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.DateTime(System.Data.SqlTypes.SqlDateTime x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDateTime(System.Data.SqlTypes.SqlString x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDateTime(System.DateTime value) => throw null; } // Generated from `System.Data.SqlTypes.SqlDecimal` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2900,19 +2867,19 @@ public struct SqlDecimal : System.Xml.Serialization.IXmlSerializable, System.ICo public static System.Data.SqlTypes.SqlDecimal Truncate(System.Data.SqlTypes.SqlDecimal n, int position) => throw null; public System.Decimal Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Decimal(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDecimal(double x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Int64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Decimal x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlMoney x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDecimal(System.Data.SqlTypes.SqlByte x) => throw null; } // Generated from `System.Data.SqlTypes.SqlDouble` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2966,17 +2933,17 @@ public struct SqlDouble : System.Xml.Serialization.IXmlSerializable, System.ICom public double Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; public static System.Data.SqlTypes.SqlDouble Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator double(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(double x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlSingle x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlMoney x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlDouble(System.Data.SqlTypes.SqlByte x) => throw null; } // Generated from `System.Data.SqlTypes.SqlGuid` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3015,10 +2982,10 @@ public struct SqlGuid : System.Xml.Serialization.IXmlSerializable, System.ICompa public override string ToString() => throw null; public System.Guid Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Guid(System.Data.SqlTypes.SqlGuid x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlGuid(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlGuid(System.Data.SqlTypes.SqlBinary x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlGuid(System.Guid x) => throw null; } // Generated from `System.Data.SqlTypes.SqlInt16` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3081,17 +3048,17 @@ public struct SqlInt16 : System.Xml.Serialization.IXmlSerializable, System.IComp public static System.Data.SqlTypes.SqlInt16 Xor(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; public static System.Data.SqlTypes.SqlInt16 Zero; public static System.Data.SqlTypes.SqlInt16 operator ^(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Int16(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt16(System.Int16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt16(System.Data.SqlTypes.SqlByte x) => throw null; public static System.Data.SqlTypes.SqlInt16 operator |(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) => throw null; public static System.Data.SqlTypes.SqlInt16 operator ~(System.Data.SqlTypes.SqlInt16 x) => throw null; } @@ -3156,17 +3123,17 @@ public struct SqlInt32 : System.Xml.Serialization.IXmlSerializable, System.IComp public static System.Data.SqlTypes.SqlInt32 Xor(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; public static System.Data.SqlTypes.SqlInt32 Zero; public static System.Data.SqlTypes.SqlInt32 operator ^(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator int(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt32(int x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt32(System.Data.SqlTypes.SqlByte x) => throw null; public static System.Data.SqlTypes.SqlInt32 operator |(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) => throw null; public static System.Data.SqlTypes.SqlInt32 operator ~(System.Data.SqlTypes.SqlInt32 x) => throw null; } @@ -3231,17 +3198,17 @@ public struct SqlInt64 : System.Xml.Serialization.IXmlSerializable, System.IComp public static System.Data.SqlTypes.SqlInt64 Xor(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; public static System.Data.SqlTypes.SqlInt64 Zero; public static System.Data.SqlTypes.SqlInt64 operator ^(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Int64(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt64(System.Int64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlInt64(System.Data.SqlTypes.SqlByte x) => throw null; public static System.Data.SqlTypes.SqlInt64 operator |(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) => throw null; public static System.Data.SqlTypes.SqlInt64 operator ~(System.Data.SqlTypes.SqlInt64 x) => throw null; } @@ -3304,19 +3271,19 @@ public struct SqlMoney : System.Xml.Serialization.IXmlSerializable, System.IComp public System.Decimal Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; public static System.Data.SqlTypes.SqlMoney Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Decimal(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(double x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Int64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Decimal x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlMoney(System.Data.SqlTypes.SqlByte x) => throw null; } // Generated from `System.Data.SqlTypes.SqlNotFilledException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3387,17 +3354,17 @@ public struct SqlSingle : System.Xml.Serialization.IXmlSerializable, System.ICom public float Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; public static System.Data.SqlTypes.SqlSingle Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator float(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(float x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlMoney x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlSingle(System.Data.SqlTypes.SqlByte x) => throw null; } // Generated from `System.Data.SqlTypes.SqlString` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3463,19 +3430,19 @@ public struct SqlString : System.Xml.Serialization.IXmlSerializable, System.ICom public override string ToString() => throw null; public string Value { get => throw null; } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator string(System.Data.SqlTypes.SqlString x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlSingle x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlMoney x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlInt64 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlInt32 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlInt16 x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlGuid x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlDouble x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlDecimal x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlDateTime x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlByte x) => throw null; + public static explicit operator System.Data.SqlTypes.SqlString(System.Data.SqlTypes.SqlBoolean x) => throw null; + public static implicit operator System.Data.SqlTypes.SqlString(string x) => throw null; } // Generated from `System.Data.SqlTypes.SqlTruncateException` in `System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3515,7 +3482,6 @@ public class SqlXml : System.Xml.Serialization.IXmlSerializable, System.Data.Sql public enum StorageState { Buffer, - // Stub generator skipped constructor Stream, UnmanagedBuffer, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs index 85e35f970f45..f8cf69160f2f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs @@ -79,7 +79,6 @@ public enum ContractFailureKind { Assert, Assume, - // Stub generator skipped constructor Invariant, Postcondition, PostconditionOnException, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs index 508c3a234867..8a4bad1dfded 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs @@ -101,7 +101,6 @@ public struct ActivityEvent // Generated from `System.Diagnostics.ActivityIdFormat` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum ActivityIdFormat { - // Stub generator skipped constructor Hierarchical, Unknown, W3C, @@ -110,7 +109,6 @@ public enum ActivityIdFormat // Generated from `System.Diagnostics.ActivityKind` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum ActivityKind { - // Stub generator skipped constructor Client, Consumer, Internal, @@ -147,7 +145,6 @@ public class ActivityListener : System.IDisposable // Generated from `System.Diagnostics.ActivitySamplingResult` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum ActivitySamplingResult { - // Stub generator skipped constructor AllData, AllDataAndRecorded, None, @@ -226,7 +223,6 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S [System.Flags] public enum ActivityTraceFlags { - // Stub generator skipped constructor None, Recorded, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs index 2853030e0674..c94ddf235f88 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs @@ -159,7 +159,6 @@ public enum ProcessPriorityClass High, Idle, Normal, - // Stub generator skipped constructor RealTime, } @@ -236,7 +235,6 @@ public enum ProcessWindowStyle Maximized, Minimized, Normal, - // Stub generator skipped constructor } // Generated from `System.Diagnostics.ThreadPriorityLevel` in `System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -248,7 +246,6 @@ public enum ThreadPriorityLevel Idle, Lowest, Normal, - // Stub generator skipped constructor TimeCritical, } @@ -260,7 +257,6 @@ public enum ThreadState Running, Standby, Terminated, - // Stub generator skipped constructor Transition, Unknown, Wait, @@ -280,7 +276,6 @@ public enum ThreadWaitReason PageOut, Suspended, SystemAllocation, - // Stub generator skipped constructor Unknown, UserRequest, VirtualMemory, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs index 7063ea929410..856a75ca357f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs @@ -191,7 +191,6 @@ public enum SymAddressKind NativeRegisterStack, NativeSectionOffset, NativeStackRegister, - // Stub generator skipped constructor } // Generated from `System.Diagnostics.SymbolStore.SymDocumentType` in `System.Diagnostics.StackTrace, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs index a026c25d7525..6b979e77eeee 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs @@ -61,7 +61,6 @@ public enum SourceLevels Error, Information, Off, - // Stub generator skipped constructor Verbose, Warning, } @@ -173,7 +172,6 @@ public enum TraceEventType Start, Stop, Suspend, - // Stub generator skipped constructor Transfer, Verbose, Warning, @@ -192,7 +190,6 @@ public enum TraceLevel Error, Info, Off, - // Stub generator skipped constructor Verbose, Warning, } @@ -276,7 +273,6 @@ public enum TraceOptions ProcessId, ThreadId, Timestamp, - // Stub generator skipped constructor } // Generated from `System.Diagnostics.TraceSource` in `System.Diagnostics.TraceSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs index df631a1d61ab..07722cc9af3a 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs @@ -24,7 +24,6 @@ public enum EventActivityOptions { Detachable, Disable, - // Stub generator skipped constructor None, Recursive, } @@ -51,7 +50,6 @@ public enum EventChannel Admin, Analytic, Debug, - // Stub generator skipped constructor None, Operational, } @@ -61,7 +59,6 @@ public enum EventCommand { Disable, Enable, - // Stub generator skipped constructor SendManifest, Update, } @@ -104,7 +101,6 @@ public enum EventFieldFormat { Boolean, Default, - // Stub generator skipped constructor HResult, Hexadecimal, Json, @@ -116,7 +112,6 @@ public enum EventFieldFormat [System.Flags] public enum EventFieldTags { - // Stub generator skipped constructor None, } @@ -134,7 +129,6 @@ public enum EventKeywords AuditFailure, AuditSuccess, CorrelationHint, - // Stub generator skipped constructor EventLogClassic, MicrosoftTelemetry, None, @@ -148,7 +142,6 @@ public enum EventLevel { Critical, Error, - // Stub generator skipped constructor Informational, LogAlways, Verbose, @@ -177,7 +170,6 @@ public enum EventManifestOptions { AllCultures, AllowEventSourceOverride, - // Stub generator skipped constructor None, OnlyIfNeededForRegistration, Strict, @@ -188,7 +180,6 @@ public enum EventOpcode { DataCollectionStart, DataCollectionStop, - // Stub generator skipped constructor Extension, Info, Receive, @@ -314,7 +305,6 @@ public enum EventSourceSettings Default, EtwManifestEventFormat, EtwSelfDescribingEventFormat, - // Stub generator skipped constructor ThrowOnEventWriteErrors, } @@ -322,14 +312,12 @@ public enum EventSourceSettings [System.Flags] public enum EventTags { - // Stub generator skipped constructor None, } // Generated from `System.Diagnostics.Tracing.EventTask` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum EventTask { - // Stub generator skipped constructor None, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs index bd82b4a1921f..1322df99639d 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs @@ -276,7 +276,6 @@ public enum KnownColor InfoText, Ivory, Khaki, - // Stub generator skipped constructor Lavender, LavenderBlush, LawnGreen, @@ -395,8 +394,8 @@ public struct Point : System.IEquatable public static System.Drawing.Point Truncate(System.Drawing.PointF value) => throw null; public int X { get => throw null; set => throw null; } public int Y { get => throw null; set => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Drawing.Size(System.Drawing.Point p) => throw null; + public static implicit operator System.Drawing.PointF(System.Drawing.Point p) => throw null; } // Generated from `System.Drawing.PointF` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -503,7 +502,7 @@ public struct RectangleF : System.IEquatable public float Width { get => throw null; set => throw null; } public float X { get => throw null; set => throw null; } public float Y { get => throw null; set => throw null; } - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Drawing.RectangleF(System.Drawing.Rectangle r) => throw null; } // Generated from `System.Drawing.Size` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -535,8 +534,8 @@ public struct Size : System.IEquatable public override string ToString() => throw null; public static System.Drawing.Size Truncate(System.Drawing.SizeF value) => throw null; public int Width { get => throw null; set => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Drawing.Point(System.Drawing.Size size) => throw null; + public static implicit operator System.Drawing.SizeF(System.Drawing.Size p) => throw null; } // Generated from `System.Drawing.SizeF` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -565,7 +564,7 @@ public struct SizeF : System.IEquatable public System.Drawing.Size ToSize() => throw null; public override string ToString() => throw null; public float Width { get => throw null; set => throw null; } - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Drawing.PointF(System.Drawing.SizeF size) => throw null; } // Generated from `System.Drawing.SystemColors` in `System.Drawing.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs index 60fe85fa264c..1ceee09d74d7 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs @@ -120,7 +120,6 @@ public static class AsnDecoder // Generated from `System.Formats.Asn1.AsnEncodingRules` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum AsnEncodingRules { - // Stub generator skipped constructor BER, CER, DER, @@ -235,7 +234,6 @@ public enum TagClass Application, ContextSpecific, Private, - // Stub generator skipped constructor Universal, } @@ -279,7 +277,6 @@ public enum UniversalTagNumber TimeOfDay, UTF8String, UniversalString, - // Stub generator skipped constructor UnrestrictedCharacterString, UtcTime, VideotexString, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs index 6e00d357f34d..9724272ecba5 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs @@ -9,7 +9,6 @@ namespace Compression // Generated from `System.IO.Compression.CompressionLevel` in `System.IO.Compression, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089` public enum CompressionLevel { - // Stub generator skipped constructor Fastest, NoCompression, Optimal, @@ -19,7 +18,6 @@ public enum CompressionLevel public enum CompressionMode { Compress, - // Stub generator skipped constructor Decompress, } @@ -133,7 +131,6 @@ public enum ZipArchiveMode Create, Read, Update, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs index 889cf3027043..498a131d17eb 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs @@ -35,7 +35,6 @@ public class DriveNotFoundException : System.IO.IOException public enum DriveType { CDRom, - // Stub generator skipped constructor Fixed, Network, NoRootDirectory, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs index a5fd93fb6b88..4ec0868d1f66 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs @@ -77,7 +77,6 @@ public enum NotifyFilters FileName, LastAccess, LastWrite, - // Stub generator skipped constructor Security, Size, } @@ -112,7 +111,6 @@ public enum WatcherChangeTypes Created, Deleted, Renamed, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs index d0c65750cf5b..aaf1dc5a9810 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs @@ -240,14 +240,12 @@ public enum MatchCasing { CaseInsensitive, CaseSensitive, - // Stub generator skipped constructor PlatformDefault, } // Generated from `System.IO.MatchType` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum MatchType { - // Stub generator skipped constructor Simple, Win32, } @@ -256,7 +254,6 @@ public enum MatchType public enum SearchOption { AllDirectories, - // Stub generator skipped constructor TopDirectoryOnly, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs index 26f1139e33d3..8f7edb8364e0 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs @@ -141,7 +141,6 @@ public enum IsolatedStorageScope Application, Assembly, Domain, - // Stub generator skipped constructor Machine, None, Roaming, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs index a9814a4f36e5..84e140d563c0 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs @@ -63,7 +63,6 @@ public class MemoryMappedFile : System.IDisposable public enum MemoryMappedFileAccess { CopyOnWrite, - // Stub generator skipped constructor Read, ReadExecute, ReadWrite, @@ -76,7 +75,6 @@ public enum MemoryMappedFileAccess public enum MemoryMappedFileOptions { DelayAllocatePages, - // Stub generator skipped constructor None, } @@ -90,7 +88,6 @@ public enum MemoryMappedFileRights Delete, Execute, FullControl, - // Stub generator skipped constructor Read, ReadExecute, ReadPermissions, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs index f659ecd18c35..356d156bface 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs @@ -100,7 +100,6 @@ public enum PipeDirection In, InOut, Out, - // Stub generator skipped constructor } // Generated from `System.IO.Pipes.PipeOptions` in `System.IO.Pipes, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -110,7 +109,6 @@ public enum PipeOptions Asynchronous, CurrentUserOnly, None, - // Stub generator skipped constructor WriteThrough, } @@ -167,7 +165,6 @@ public enum PipeTransmissionMode { Byte, Message, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs index 0615c93a8c6c..a62309b32e3e 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs @@ -790,7 +790,6 @@ public enum ExpressionType Equal, ExclusiveOr, ExclusiveOrAssign, - // Stub generator skipped constructor Extension, Goto, GreaterThan, @@ -915,7 +914,6 @@ public enum GotoExpressionKind Break, Continue, Goto, - // Stub generator skipped constructor Return, } @@ -1044,7 +1042,6 @@ public enum MemberBindingType Assignment, ListBinding, MemberBinding, - // Stub generator skipped constructor } // Generated from `System.Linq.Expressions.MemberExpression` in `System.Linq.Expressions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs index 58d8e98e05f6..32cffda1ecb2 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs @@ -223,7 +223,6 @@ public enum ParallelExecutionMode { Default, ForceParallelism, - // Stub generator skipped constructor } // Generated from `System.Linq.ParallelMergeOptions` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -233,7 +232,6 @@ public enum ParallelMergeOptions Default, FullyBuffered, NotBuffered, - // Stub generator skipped constructor } // Generated from `System.Linq.ParallelQuery` in `System.Linq.Parallel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs index 6afedec4626f..f89ad1046a1d 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs @@ -320,7 +320,7 @@ public struct StandardFormat : System.IEquatable public System.Char Symbol { get => throw null; } public override string ToString() => throw null; public static bool TryParse(System.ReadOnlySpan format, out System.Buffers.StandardFormat result) => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Buffers.StandardFormat(System.Char symbol) => throw null; } namespace Binary diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs index 0a71057fd2ac..cda086a35dd5 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs @@ -23,7 +23,6 @@ public class ByteArrayContent : System.Net.Http.HttpContent public enum ClientCertificateOption { Automatic, - // Stub generator skipped constructor Manual, } @@ -145,7 +144,6 @@ public class HttpClientHandler : System.Net.Http.HttpMessageHandler // Generated from `System.Net.Http.HttpCompletionOption` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum HttpCompletionOption { - // Stub generator skipped constructor ResponseContentRead, ResponseHeadersRead, } @@ -185,7 +183,6 @@ public abstract class HttpContent : System.IDisposable public enum HttpKeepAlivePingPolicy { Always, - // Stub generator skipped constructor WithActiveRequests, } @@ -314,7 +311,6 @@ public class HttpResponseMessage : System.IDisposable // Generated from `System.Net.Http.HttpVersionPolicy` in `System.Net.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum HttpVersionPolicy { - // Stub generator skipped constructor RequestVersionExact, RequestVersionOrHigher, RequestVersionOrLower, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs index 44855a298019..037e9d56e93a 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs @@ -82,7 +82,6 @@ public class AttachmentCollection : System.Collections.ObjectModel.Collection : System.IFormattable, System.IEquatable Zero { get => throw null; } public static System.Numerics.Vector operator ^(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; + public static explicit operator System.Numerics.Vector(System.Numerics.Vector value) => throw null; public static System.Numerics.Vector operator |(System.Numerics.Vector left, System.Numerics.Vector right) => throw null; public static System.Numerics.Vector operator ~(System.Numerics.Vector value) => throw null; } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs index 01b254d1c807..97a251797d6c 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs @@ -150,7 +150,6 @@ public enum NotifyCollectionChangedAction { Add, Move, - // Stub generator skipped constructor Remove, Replace, Reset, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs index 4375122e3acc..10b8bf1ffe22 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs @@ -52,7 +52,6 @@ public class AssemblyBuilder : System.Reflection.Assembly [System.Flags] public enum AssemblyBuilderAccess { - // Stub generator skipped constructor Run, RunAndCollect, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs index a493559199f5..c4bf2cd15613 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs @@ -8,7 +8,6 @@ namespace Reflection [System.Flags] public enum AssemblyFlags { - // Stub generator skipped constructor ContentTypeMask, DisableJitCompileOptimizer, EnableJitCompileTracking, @@ -20,7 +19,6 @@ public enum AssemblyFlags // Generated from `System.Reflection.AssemblyHashAlgorithm` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AssemblyHashAlgorithm { - // Stub generator skipped constructor MD5, None, Sha1, @@ -33,7 +31,6 @@ public enum AssemblyHashAlgorithm public enum DeclarativeSecurityAction { Assert, - // Stub generator skipped constructor Demand, Deny, InheritanceDemand, @@ -49,7 +46,6 @@ public enum DeclarativeSecurityAction [System.Flags] public enum ManifestResourceAttributes { - // Stub generator skipped constructor Private, Public, VisibilityMask, @@ -73,7 +69,6 @@ public enum MethodImportAttributes CharSetMask, CharSetUnicode, ExactSpelling, - // Stub generator skipped constructor None, SetLastError, ThrowOnUnmappableCharDisable, @@ -87,7 +82,6 @@ public enum MethodSemanticsAttributes { Adder, Getter, - // Stub generator skipped constructor Other, Raiser, Remover, @@ -131,10 +125,10 @@ public struct AssemblyDefinitionHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.AssemblyDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.AssemblyDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.AssemblyDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.AssemblyDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.AssemblyFile` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -157,10 +151,10 @@ public struct AssemblyFileHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.AssemblyFileHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.AssemblyFileHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.AssemblyFileHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.AssemblyFileHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.AssemblyFileHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -209,10 +203,10 @@ public struct AssemblyReferenceHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.AssemblyReferenceHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.AssemblyReferenceHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.AssemblyReferenceHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.AssemblyReferenceHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.AssemblyReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -352,8 +346,8 @@ public struct BlobHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.BlobHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.BlobHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.BlobReader` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -477,10 +471,10 @@ public struct ConstantHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ConstantHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ConstantHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ConstantHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ConstantHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ConstantTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -489,7 +483,6 @@ public enum ConstantTypeCode Boolean, Byte, Char, - // Stub generator skipped constructor Double, Int16, Int32, @@ -524,10 +517,10 @@ public struct CustomAttributeHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.CustomAttributeHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.CustomAttributeHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.CustomAttributeHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.CustomAttributeHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.CustomAttributeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -566,7 +559,6 @@ public struct CustomAttributeNamedArgument // Generated from `System.Reflection.Metadata.CustomAttributeNamedArgumentKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CustomAttributeNamedArgumentKind { - // Stub generator skipped constructor Field, Property, } @@ -608,10 +600,10 @@ public struct CustomDebugInformationHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.CustomDebugInformationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.CustomDebugInformationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.CustomDebugInformationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.CustomDebugInformationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.CustomDebugInformationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -663,10 +655,10 @@ public struct DeclarativeSecurityAttributeHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.DeclarativeSecurityAttributeHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.DeclarativeSecurityAttributeHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.DeclarativeSecurityAttributeHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -711,10 +703,10 @@ public struct DocumentHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.DocumentHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.DocumentHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.DocumentHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.DocumentHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.DocumentHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -749,8 +741,8 @@ public struct DocumentNameBlobHandle : System.IEquatable throw null; public override int GetHashCode() => throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.DocumentNameBlobHandle(System.Reflection.Metadata.BlobHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.BlobHandle(System.Reflection.Metadata.DocumentNameBlobHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.EntityHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -766,8 +758,8 @@ public struct EntityHandle : System.IEquatable throw null; } public System.Reflection.Metadata.HandleKind Kind { get => throw null; } public static System.Reflection.Metadata.ModuleDefinitionHandle ModuleDefinition; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.EntityHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.EventAccessors` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -801,10 +793,10 @@ public struct EventDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.EventDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.EventDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.EventDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.EventDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.EventDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -846,7 +838,6 @@ public struct ExceptionRegion public enum ExceptionRegionKind { Catch, - // Stub generator skipped constructor Fault, Filter, Finally, @@ -875,10 +866,10 @@ public struct ExportedTypeHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ExportedTypeHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ExportedTypeHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ExportedTypeHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ExportedTypeHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ExportedTypeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -929,10 +920,10 @@ public struct FieldDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.FieldDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.FieldDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.FieldDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.FieldDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.FieldDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -988,10 +979,10 @@ public struct GenericParameterConstraintHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.GenericParameterConstraintHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.GenericParameterConstraintHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.GenericParameterConstraintHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.GenericParameterConstraintHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1027,10 +1018,10 @@ public struct GenericParameterHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.GenericParameterHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.GenericParameterHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.GenericParameterHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.GenericParameterHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.GenericParameterHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1066,8 +1057,8 @@ public struct GuidHandle : System.IEquatable throw null; // Stub generator skipped constructor public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.GuidHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.GuidHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.Handle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1115,7 +1106,6 @@ public enum HandleKind GenericParameter, GenericParameterConstraint, Guid, - // Stub generator skipped constructor ImportScope, InterfaceImplementation, LocalConstant, @@ -1245,7 +1235,6 @@ public enum ILOpCode Dup, Endfilter, Endfinally, - // Stub generator skipped constructor Initblk, Initobj, Isinst, @@ -1466,7 +1455,6 @@ public enum ImportDefinitionKind AliasType, ImportAssemblyNamespace, ImportAssemblyReferenceAlias, - // Stub generator skipped constructor ImportNamespace, ImportType, ImportXmlNamespace, @@ -1513,10 +1501,10 @@ public struct ImportScopeHandle : System.IEquatable throw null; // Stub generator skipped constructor public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ImportScopeHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ImportScopeHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ImportScopeHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ImportScopeHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.InterfaceImplementation` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1537,10 +1525,10 @@ public struct InterfaceImplementationHandle : System.IEquatable throw null; // Stub generator skipped constructor public bool IsNil { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.InterfaceImplementationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.InterfaceImplementationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.InterfaceImplementationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.InterfaceImplementationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.InterfaceImplementationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1583,10 +1571,10 @@ public struct LocalConstantHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.LocalConstantHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.LocalConstantHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.LocalConstantHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.LocalConstantHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.LocalConstantHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1635,10 +1623,10 @@ public struct LocalScopeHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.LocalScopeHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.LocalScopeHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.LocalScopeHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.LocalScopeHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1689,7 +1677,6 @@ public struct LocalVariable public enum LocalVariableAttributes { DebuggerHidden, - // Stub generator skipped constructor None, } @@ -1703,10 +1690,10 @@ public struct LocalVariableHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.LocalVariableHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.LocalVariableHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.LocalVariableHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.LocalVariableHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.LocalVariableHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1752,10 +1739,10 @@ public struct ManifestResourceHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ManifestResourceHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ManifestResourceHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ManifestResourceHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ManifestResourceHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ManifestResourceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1803,10 +1790,10 @@ public struct MemberReferenceHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.MemberReferenceHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.MemberReferenceHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.MemberReferenceHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.MemberReferenceHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.MemberReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1835,7 +1822,6 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S public enum MemberReferenceKind { Field, - // Stub generator skipped constructor Method, } @@ -1844,7 +1830,6 @@ public enum MetadataKind { Ecma335, ManagedWindowsMetadata, - // Stub generator skipped constructor WindowsMetadata, } @@ -1939,7 +1924,6 @@ public enum MetadataReaderOptions { ApplyWindowsRuntimeProjections, Default, - // Stub generator skipped constructor None, } @@ -1962,7 +1946,6 @@ public enum MetadataStreamOptions { Default, LeaveOpen, - // Stub generator skipped constructor PrefetchMetadata, } @@ -2025,10 +2008,10 @@ public struct MethodDebugInformationHandle : System.IEquatable throw null; } // Stub generator skipped constructor public System.Reflection.Metadata.MethodDefinitionHandle ToDefinitionHandle() => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.MethodDebugInformationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.MethodDebugInformationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.MethodDebugInformationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.MethodDebugInformationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.MethodDebugInformationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2082,10 +2065,10 @@ public struct MethodDefinitionHandle : System.IEquatable throw null; } // Stub generator skipped constructor public System.Reflection.Metadata.MethodDebugInformationHandle ToDebugInformationHandle() => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.MethodDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.MethodDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.MethodDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.MethodDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.MethodDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2130,10 +2113,10 @@ public struct MethodImplementationHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.MethodImplementationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.MethodImplementationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.MethodImplementationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.MethodImplementationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.MethodImplementationHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2199,10 +2182,10 @@ public struct MethodSpecificationHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.MethodSpecificationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.MethodSpecificationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.MethodSpecificationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.MethodSpecificationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ModuleDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2227,10 +2210,10 @@ public struct ModuleDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ModuleDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ModuleDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ModuleDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ModuleDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ModuleReference` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2251,10 +2234,10 @@ public struct ModuleReferenceHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ModuleReferenceHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ModuleReferenceHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ModuleReferenceHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ModuleReferenceHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.NamespaceDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2278,8 +2261,8 @@ public struct NamespaceDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.NamespaceDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.NamespaceDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.PEReaderExtensions` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2313,10 +2296,10 @@ public struct ParameterHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.ParameterHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.ParameterHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.ParameterHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.ParameterHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.ParameterHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2351,7 +2334,6 @@ public enum PrimitiveSerializationTypeCode Int16, Int32, Int64, - // Stub generator skipped constructor SByte, Single, String, @@ -2372,7 +2354,6 @@ public enum PrimitiveTypeCode Int64, IntPtr, Object, - // Stub generator skipped constructor SByte, Single, String, @@ -2416,10 +2397,10 @@ public struct PropertyDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.PropertyDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.PropertyDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.PropertyDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.PropertyDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.PropertyDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2505,7 +2486,6 @@ public enum SerializationTypeCode Invalid, SByte, SZArray, - // Stub generator skipped constructor Single, String, TaggedObject, @@ -2523,7 +2503,6 @@ public enum SignatureAttributes Generic, Instance, None, - // Stub generator skipped constructor } // Generated from `System.Reflection.Metadata.SignatureCallingConvention` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2532,7 +2511,6 @@ public enum SignatureCallingConvention CDecl, Default, FastCall, - // Stub generator skipped constructor StdCall, ThisCall, Unmanaged, @@ -2569,7 +2547,6 @@ public enum SignatureKind Method, MethodSpecification, Property, - // Stub generator skipped constructor } // Generated from `System.Reflection.Metadata.SignatureTypeCode` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2598,7 +2575,6 @@ public enum SignatureTypeCode SByte, SZArray, Sentinel, - // Stub generator skipped constructor Single, String, TypeHandle, @@ -2614,7 +2590,6 @@ public enum SignatureTypeCode public enum SignatureTypeKind { Class, - // Stub generator skipped constructor Unknown, ValueType, } @@ -2640,10 +2615,10 @@ public struct StandaloneSignatureHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.StandaloneSignatureHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.StandaloneSignatureHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.StandaloneSignatureHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.StandaloneSignatureHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.StandaloneSignatureKind` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2651,7 +2626,6 @@ public enum StandaloneSignatureKind { LocalVariables, Method, - // Stub generator skipped constructor } // Generated from `System.Reflection.Metadata.StringHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2664,8 +2638,8 @@ public struct StringHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.StringHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.StringHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.TypeDefinition` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2702,10 +2676,10 @@ public struct TypeDefinitionHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.TypeDefinitionHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.TypeDefinitionHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.TypeDefinitionHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.TypeDefinitionHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.TypeDefinitionHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2759,10 +2733,10 @@ public struct TypeReferenceHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.TypeReferenceHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.TypeReferenceHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.TypeReferenceHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.TypeReferenceHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.TypeReferenceHandleCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2806,10 +2780,10 @@ public struct TypeSpecificationHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.TypeSpecificationHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static explicit operator System.Reflection.Metadata.TypeSpecificationHandle(System.Reflection.Metadata.EntityHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.TypeSpecificationHandle handle) => throw null; + public static implicit operator System.Reflection.Metadata.EntityHandle(System.Reflection.Metadata.TypeSpecificationHandle handle) => throw null; } // Generated from `System.Reflection.Metadata.UserStringHandle` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2822,8 +2796,8 @@ public struct UserStringHandle : System.IEquatable throw null; public bool IsNil { get => throw null; } // Stub generator skipped constructor - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Reflection.Metadata.UserStringHandle(System.Reflection.Metadata.Handle handle) => throw null; + public static implicit operator System.Reflection.Metadata.Handle(System.Reflection.Metadata.UserStringHandle handle) => throw null; } namespace Ecma335 @@ -2958,7 +2932,6 @@ public enum EditAndContinueOperation AddParameter, AddProperty, Default, - // Stub generator skipped constructor } // Generated from `System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2994,7 +2967,6 @@ public struct FixedArgumentsEncoder // Generated from `System.Reflection.Metadata.Ecma335.FunctionPointerAttributes` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum FunctionPointerAttributes { - // Stub generator skipped constructor HasExplicitThis, HasThis, None, @@ -3014,7 +2986,6 @@ public enum HeapIndex { Blob, Guid, - // Stub generator skipped constructor String, UserString, } @@ -3283,7 +3254,6 @@ public static class MetadataTokens public enum MethodBodyAttributes { InitLocals, - // Stub generator skipped constructor None, } @@ -3516,7 +3486,6 @@ public enum TableIndex PropertyPtr, StandAloneSig, StateMachineMethod, - // Stub generator skipped constructor TypeDef, TypeRef, TypeSpec, @@ -3543,7 +3512,6 @@ public enum Characteristics Bit32Machine, BytesReversedHi, BytesReversedLo, - // Stub generator skipped constructor DebugStripped, Dll, ExecutableImage, @@ -3582,7 +3550,6 @@ public class CoffHeader [System.Flags] public enum CorFlags { - // Stub generator skipped constructor ILLibrary, ILOnly, NativeEntryPoint, @@ -3640,7 +3607,6 @@ public enum DebugDirectoryEntryType { CodeView, Coff, - // Stub generator skipped constructor EmbeddedPortablePdb, PdbChecksum, Reproducible, @@ -3661,7 +3627,6 @@ public struct DirectoryEntry public enum DllCharacteristics { AppContainer, - // Stub generator skipped constructor DynamicBase, HighEntropyVirtualAddressSpace, NoBind, @@ -3691,7 +3656,6 @@ public enum Machine IA64, M32R, MIPS16, - // Stub generator skipped constructor MipsFpu, MipsFpu16, PowerPC, @@ -3867,7 +3831,6 @@ public enum PEMagic { PE32, PE32Plus, - // Stub generator skipped constructor } // Generated from `System.Reflection.PortableExecutable.PEMemoryBlock` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3914,7 +3877,6 @@ public enum PEStreamOptions Default, IsLoadedImage, LeaveOpen, - // Stub generator skipped constructor PrefetchEntireImage, PrefetchMetadata, } @@ -3977,7 +3939,6 @@ public enum SectionCharacteristics MemSysheap, MemWrite, NoDeferSpecExc, - // Stub generator skipped constructor TypeCopy, TypeDSect, TypeGroup, @@ -4023,7 +3984,6 @@ public enum Subsystem NativeWindows, OS2Cui, PosixCui, - // Stub generator skipped constructor Unknown, WindowsBootApplication, WindowsCEGui, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs index 18aafc27ab45..bb1d7efd0054 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs @@ -13,7 +13,6 @@ public enum FlowControl Break, Call, Cond_Branch, - // Stub generator skipped constructor Meta, Next, Phi, @@ -48,7 +47,6 @@ public enum OpCodeType Macro, Nternal, Objmodel, - // Stub generator skipped constructor Prefix, Primitive, } @@ -302,7 +300,6 @@ public enum OperandType InlineTok, InlineType, InlineVar, - // Stub generator skipped constructor ShortInlineBrTarget, ShortInlineI, ShortInlineR, @@ -312,7 +309,6 @@ public enum OperandType // Generated from `System.Reflection.Emit.PackingSize` in `System.Reflection.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum PackingSize { - // Stub generator skipped constructor Size1, Size128, Size16, @@ -354,7 +350,6 @@ public enum StackBehaviour Pushr4, Pushr8, Pushref, - // Stub generator skipped constructor Varpop, Varpush, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs index 21d418a0c014..dbff0f7c0181 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs @@ -9,7 +9,6 @@ namespace InteropServices // Generated from `System.Runtime.InteropServices.Architecture` in `System.Runtime.InteropServices.RuntimeInformation, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum Architecture { - // Stub generator skipped constructor Arm, Arm64, Wasm, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs index fae91efe5fbd..c9029f5758b4 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs @@ -145,7 +145,6 @@ public class COMException : System.Runtime.InteropServices.ExternalException // Generated from `System.Runtime.InteropServices.CallingConvention` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CallingConvention { - // Stub generator skipped constructor Cdecl, FastCall, StdCall, @@ -166,7 +165,6 @@ public enum ClassInterfaceType { AutoDispatch, AutoDual, - // Stub generator skipped constructor None, } @@ -259,7 +257,6 @@ public class ComImportAttribute : System.Attribute // Generated from `System.Runtime.InteropServices.ComInterfaceType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum ComInterfaceType { - // Stub generator skipped constructor InterfaceIsDual, InterfaceIsIDispatch, InterfaceIsIInspectable, @@ -269,7 +266,6 @@ public enum ComInterfaceType // Generated from `System.Runtime.InteropServices.ComMemberType` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum ComMemberType { - // Stub generator skipped constructor Method, PropGet, PropSet, @@ -336,7 +332,6 @@ public struct ComInterfaceEntry public enum CreateComInterfaceFlags { CallerDefinedIUnknown, - // Stub generator skipped constructor None, TrackerSupport, } @@ -345,7 +340,6 @@ public enum CreateComInterfaceFlags [System.Flags] public enum CreateObjectFlags { - // Stub generator skipped constructor None, TrackerObject, UniqueInstance, @@ -363,14 +357,12 @@ public class CurrencyWrapper public enum CustomQueryInterfaceMode { Allow, - // Stub generator skipped constructor Ignore, } // Generated from `System.Runtime.InteropServices.CustomQueryInterfaceResult` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CustomQueryInterfaceResult { - // Stub generator skipped constructor Failed, Handled, NotHandled, @@ -435,7 +427,6 @@ public enum DllImportSearchPath { ApplicationDirectory, AssemblyDirectory, - // Stub generator skipped constructor LegacyBehavior, SafeDirectories, System32, @@ -486,7 +477,7 @@ public struct HandleRef // Stub generator skipped constructor public static System.IntPtr ToIntPtr(System.Runtime.InteropServices.HandleRef value) => throw null; public object Wrapper { get => throw null; } - // Stub generator skipped operator: explicit conversion + public static explicit operator System.IntPtr(System.Runtime.InteropServices.HandleRef value) => throw null; } // Generated from `System.Runtime.InteropServices.ICustomAdapter` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -878,7 +869,6 @@ public enum TypeLibFuncFlags FSource, FUiDefault, FUsesGetLastError, - // Stub generator skipped constructor } // Generated from `System.Runtime.InteropServices.TypeLibImportClassAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -914,7 +904,6 @@ public enum TypeLibTypeFlags FReplaceable, FRestricted, FReverseBind, - // Stub generator skipped constructor } // Generated from `System.Runtime.InteropServices.TypeLibVarAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -942,7 +931,6 @@ public enum TypeLibVarFlags FRestricted, FSource, FUiDefault, - // Stub generator skipped constructor } // Generated from `System.Runtime.InteropServices.TypeLibVersionAttribute` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1018,7 +1006,6 @@ public enum UnmanagedType U2, U4, U8, - // Stub generator skipped constructor VBByRefStr, VariantBool, } @@ -1070,7 +1057,6 @@ public enum VarEnum VT_VARIANT, VT_VECTOR, VT_VOID, - // Stub generator skipped constructor } // Generated from `System.Runtime.InteropServices.VariantWrapper` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1086,7 +1072,6 @@ namespace ComTypes [System.Flags] public enum ADVF { - // Stub generator skipped constructor ADVFCACHE_FORCEBUILTIN, ADVFCACHE_NOHANDLER, ADVFCACHE_ONSAVE, @@ -1118,7 +1103,6 @@ public struct BIND_OPTS // Generated from `System.Runtime.InteropServices.ComTypes.CALLCONV` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CALLCONV { - // Stub generator skipped constructor CC_CDECL, CC_MACPASCAL, CC_MAX, @@ -1142,7 +1126,6 @@ public struct CONNECTDATA // Generated from `System.Runtime.InteropServices.ComTypes.DATADIR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DATADIR { - // Stub generator skipped constructor DATADIR_GET, DATADIR_SET, } @@ -1150,7 +1133,6 @@ public enum DATADIR // Generated from `System.Runtime.InteropServices.ComTypes.DESCKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DESCKIND { - // Stub generator skipped constructor DESCKIND_FUNCDESC, DESCKIND_IMPLICITAPPOBJ, DESCKIND_MAX, @@ -1173,7 +1155,6 @@ public struct DISPPARAMS [System.Flags] public enum DVASPECT { - // Stub generator skipped constructor DVASPECT_CONTENT, DVASPECT_DOCPRINT, DVASPECT_ICON, @@ -1253,7 +1234,6 @@ public struct FUNCDESC [System.Flags] public enum FUNCFLAGS { - // Stub generator skipped constructor FUNCFLAG_FBINDABLE, FUNCFLAG_FDEFAULTBIND, FUNCFLAG_FDEFAULTCOLLELEM, @@ -1272,7 +1252,6 @@ public enum FUNCFLAGS // Generated from `System.Runtime.InteropServices.ComTypes.FUNCKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum FUNCKIND { - // Stub generator skipped constructor FUNC_DISPATCH, FUNC_NONVIRTUAL, FUNC_PUREVIRTUAL, @@ -1334,7 +1313,6 @@ public struct IDLDESC [System.Flags] public enum IDLFLAG { - // Stub generator skipped constructor IDLFLAG_FIN, IDLFLAG_FLCID, IDLFLAG_FOUT, @@ -1423,7 +1401,6 @@ public interface IEnumVARIANT [System.Flags] public enum IMPLTYPEFLAGS { - // Stub generator skipped constructor IMPLTYPEFLAG_FDEFAULT, IMPLTYPEFLAG_FDEFAULTVTABLE, IMPLTYPEFLAG_FRESTRICTED, @@ -1459,7 +1436,6 @@ public interface IMoniker [System.Flags] public enum INVOKEKIND { - // Stub generator skipped constructor INVOKE_FUNC, INVOKE_PROPERTYGET, INVOKE_PROPERTYPUT, @@ -1613,7 +1589,6 @@ public interface ITypeLib2 : System.Runtime.InteropServices.ComTypes.ITypeLib [System.Flags] public enum LIBFLAGS { - // Stub generator skipped constructor LIBFLAG_FCONTROL, LIBFLAG_FHASDISKIMAGE, LIBFLAG_FHIDDEN, @@ -1632,7 +1607,6 @@ public struct PARAMDESC [System.Flags] public enum PARAMFLAG { - // Stub generator skipped constructor PARAMFLAG_FHASCUSTDATA, PARAMFLAG_FHASDEFAULT, PARAMFLAG_FIN, @@ -1682,7 +1656,6 @@ public struct STGMEDIUM // Generated from `System.Runtime.InteropServices.ComTypes.SYSKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum SYSKIND { - // Stub generator skipped constructor SYS_MAC, SYS_WIN16, SYS_WIN32, @@ -1693,7 +1666,6 @@ public enum SYSKIND [System.Flags] public enum TYMED { - // Stub generator skipped constructor TYMED_ENHMF, TYMED_FILE, TYMED_GDI, @@ -1741,7 +1713,6 @@ public struct TYPEDESC [System.Flags] public enum TYPEFLAGS { - // Stub generator skipped constructor TYPEFLAG_FAGGREGATABLE, TYPEFLAG_FAPPOBJECT, TYPEFLAG_FCANCREATE, @@ -1771,7 +1742,6 @@ public enum TYPEKIND TKIND_MODULE, TKIND_RECORD, TKIND_UNION, - // Stub generator skipped constructor } // Generated from `System.Runtime.InteropServices.ComTypes.TYPELIBATTR` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1811,7 +1781,6 @@ public struct DESCUNION [System.Flags] public enum VARFLAGS { - // Stub generator skipped constructor VARFLAG_FBINDABLE, VARFLAG_FDEFAULTBIND, VARFLAG_FDEFAULTCOLLELEM, @@ -1830,7 +1799,6 @@ public enum VARFLAGS // Generated from `System.Runtime.InteropServices.ComTypes.VARKIND` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum VARKIND { - // Stub generator skipped constructor VAR_CONST, VAR_DISPATCH, VAR_PERINSTANCE, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs index 3ae6b9115e27..31e91127450f 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs @@ -3392,7 +3392,6 @@ public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 // Generated from `System.Runtime.Intrinsics.X86.FloatComparisonMode` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum FloatComparisonMode { - // Stub generator skipped constructor OrderedEqualNonSignaling, OrderedEqualSignaling, OrderedFalseNonSignaling, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs index 86a0b9a2bbdf..2ed755aff307 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs @@ -113,28 +113,28 @@ public struct BigInteger : System.IFormattable, System.IEquatable destination, out int bytesWritten, bool isUnsigned = default(bool), bool isBigEndian = default(bool)) => throw null; public static System.Numerics.BigInteger Zero { get => throw null; } public static System.Numerics.BigInteger operator ^(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator int(System.Numerics.BigInteger value) => throw null; + public static explicit operator float(System.Numerics.BigInteger value) => throw null; + public static explicit operator double(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.UInt64(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.UInt32(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.UInt16(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.SByte(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.Numerics.BigInteger(float value) => throw null; + public static explicit operator System.Numerics.BigInteger(double value) => throw null; + public static explicit operator System.Numerics.BigInteger(System.Decimal value) => throw null; + public static explicit operator System.Int64(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.Int16(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.Decimal(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.Byte(System.Numerics.BigInteger value) => throw null; + public static implicit operator System.Numerics.BigInteger(int value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.UInt64 value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.UInt32 value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.UInt16 value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.SByte value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.Int64 value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.Int16 value) => throw null; + public static implicit operator System.Numerics.BigInteger(System.Byte value) => throw null; public static System.Numerics.BigInteger operator |(System.Numerics.BigInteger left, System.Numerics.BigInteger right) => throw null; public static System.Numerics.BigInteger operator ~(System.Numerics.BigInteger value) => throw null; } @@ -211,18 +211,18 @@ public struct Complex : System.IFormattable, System.IEquatable throw null; public override string ToString() => throw null; public static System.Numerics.Complex Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator System.Numerics.Complex(System.Numerics.BigInteger value) => throw null; + public static explicit operator System.Numerics.Complex(System.Decimal value) => throw null; + public static implicit operator System.Numerics.Complex(int value) => throw null; + public static implicit operator System.Numerics.Complex(float value) => throw null; + public static implicit operator System.Numerics.Complex(double value) => throw null; + public static implicit operator System.Numerics.Complex(System.UInt64 value) => throw null; + public static implicit operator System.Numerics.Complex(System.UInt32 value) => throw null; + public static implicit operator System.Numerics.Complex(System.UInt16 value) => throw null; + public static implicit operator System.Numerics.Complex(System.SByte value) => throw null; + public static implicit operator System.Numerics.Complex(System.Int64 value) => throw null; + public static implicit operator System.Numerics.Complex(System.Int16 value) => throw null; + public static implicit operator System.Numerics.Complex(System.Byte value) => throw null; } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs index 4f2f15d5d6b1..ef29b7ef7058 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs @@ -160,7 +160,6 @@ namespace Formatters // Generated from `System.Runtime.Serialization.Formatters.FormatterAssemblyStyle` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum FormatterAssemblyStyle { - // Stub generator skipped constructor Full, Simple, } @@ -168,7 +167,6 @@ public enum FormatterAssemblyStyle // Generated from `System.Runtime.Serialization.Formatters.FormatterTypeStyle` in `System.Runtime.Serialization.Formatters, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum FormatterTypeStyle { - // Stub generator skipped constructor TypesAlways, TypesWhenNeeded, XsdString, @@ -186,7 +184,6 @@ public enum TypeFilterLevel { Full, Low, - // Stub generator skipped constructor } namespace Binary diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs index c91620c5fef4..c90693636fd7 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs @@ -21,7 +21,6 @@ public enum EmitTypeInformation { Always, AsNeeded, - // Stub generator skipped constructor Never, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs index cda85a202828..a29a489e4380 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs @@ -387,7 +387,6 @@ public enum XmlDictionaryReaderQuotaTypes MaxDepth, MaxNameTableCharCount, MaxStringContentLength, - // Stub generator skipped constructor } // Generated from `System.Xml.XmlDictionaryReaderQuotas` in `System.Runtime.Serialization.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs index cecbce85034e..ff6531ccaf09 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs @@ -504,7 +504,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S public System.ArraySegment Slice(int index, int count) => throw null; public System.ArraySegment Slice(int index) => throw null; public T[] ToArray() => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ArraySegment(T[] array) => throw null; } // Generated from `System.ArrayTypeMismatchException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -578,7 +578,6 @@ public enum AttributeTargets { All, Assembly, - // Stub generator skipped constructor Class, Constructor, Delegate, @@ -624,7 +623,6 @@ public class BadImageFormatException : System.SystemException [System.Flags] public enum Base64FormattingOptions { - // Stub generator skipped constructor InsertLineBreaks, None, } @@ -1380,7 +1378,6 @@ public struct DateTime : System.Runtime.Serialization.ISerializable, System.IFor // Generated from `System.DateTimeKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DateTimeKind { - // Stub generator skipped constructor Local, Unspecified, Utc, @@ -1479,13 +1476,12 @@ public struct DateTimeOffset : System.Runtime.Serialization.ISerializable, Syste public static System.DateTimeOffset UtcNow { get => throw null; } public System.Int64 UtcTicks { get => throw null; } public int Year { get => throw null; } - // Stub generator skipped operator: implicit conversion + public static implicit operator System.DateTimeOffset(System.DateTime dateTime) => throw null; } // Generated from `System.DayOfWeek` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DayOfWeek { - // Stub generator skipped constructor Friday, Monday, Saturday, @@ -1595,28 +1591,28 @@ public struct Decimal : System.Runtime.Serialization.ISerializable, System.Runti public static bool TryParse(System.ReadOnlySpan s, out System.Decimal result) => throw null; public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Decimal result) => throw null; public const System.Decimal Zero = default; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator int(System.Decimal value) => throw null; + public static explicit operator float(System.Decimal value) => throw null; + public static explicit operator double(System.Decimal value) => throw null; + public static explicit operator System.UInt64(System.Decimal value) => throw null; + public static explicit operator System.UInt32(System.Decimal value) => throw null; + public static explicit operator System.UInt16(System.Decimal value) => throw null; + public static explicit operator System.SByte(System.Decimal value) => throw null; + public static explicit operator System.Int64(System.Decimal value) => throw null; + public static explicit operator System.Int16(System.Decimal value) => throw null; + public static explicit operator System.Decimal(float value) => throw null; + public static explicit operator System.Decimal(double value) => throw null; + public static explicit operator System.Char(System.Decimal value) => throw null; + public static explicit operator System.Byte(System.Decimal value) => throw null; + public static implicit operator System.Decimal(int value) => throw null; + public static implicit operator System.Decimal(System.UInt64 value) => throw null; + public static implicit operator System.Decimal(System.UInt32 value) => throw null; + public static implicit operator System.Decimal(System.UInt16 value) => throw null; + public static implicit operator System.Decimal(System.SByte value) => throw null; + public static implicit operator System.Decimal(System.Int64 value) => throw null; + public static implicit operator System.Decimal(System.Int16 value) => throw null; + public static implicit operator System.Decimal(System.Char value) => throw null; + public static implicit operator System.Decimal(System.Byte value) => throw null; } // Generated from `System.Delegate` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -1872,7 +1868,6 @@ public enum SpecialFolder Recent, Resources, SendTo, - // Stub generator skipped constructor StartMenu, Startup, System, @@ -1889,7 +1884,6 @@ public enum SpecialFolderOption Create, DoNotVerify, None, - // Stub generator skipped constructor } @@ -1908,7 +1902,6 @@ public enum SpecialFolderOption // Generated from `System.EnvironmentVariableTarget` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum EnvironmentVariableTarget { - // Stub generator skipped constructor Machine, Process, User, @@ -2102,7 +2095,6 @@ public enum GCCollectionMode { Default, Forced, - // Stub generator skipped constructor Optimized, } @@ -2123,7 +2115,6 @@ public enum GCKind Background, Ephemeral, FullBlocking, - // Stub generator skipped constructor } // Generated from `System.GCMemoryInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2153,7 +2144,6 @@ public enum GCNotificationStatus { Canceled, Failed, - // Stub generator skipped constructor NotApplicable, Succeeded, Timeout, @@ -2175,7 +2165,6 @@ public enum GenericUriParserOptions DontConvertPathBackslashes, DontUnescapePathDotsAndSlashes, GenericAuthority, - // Stub generator skipped constructor Idn, IriParsing, NoFragment, @@ -2268,10 +2257,10 @@ public struct Half : System.IFormattable, System.IEquatable, System public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Half result) => throw null; public static bool TryParse(System.ReadOnlySpan s, out System.Half result) => throw null; public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.Half result) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator float(System.Half value) => throw null; + public static explicit operator double(System.Half value) => throw null; + public static explicit operator System.Half(float value) => throw null; + public static explicit operator System.Half(double value) => throw null; } // Generated from `System.HashCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2420,7 +2409,7 @@ public struct Index : System.IEquatable public static System.Index Start { get => throw null; } public override string ToString() => throw null; public int Value { get => throw null; } - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Index(int value) => throw null; } // Generated from `System.IndexOutOfRangeException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2612,12 +2601,12 @@ public struct IntPtr : System.Runtime.Serialization.ISerializable, System.IForma public static bool TryParse(string s, out System.IntPtr result) => throw null; public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider provider, out System.IntPtr result) => throw null; public static System.IntPtr Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + unsafe public static explicit operator void*(System.IntPtr value) => throw null; + unsafe public static explicit operator System.IntPtr(void* value) => throw null; + public static explicit operator int(System.IntPtr value) => throw null; + public static explicit operator System.IntPtr(int value) => throw null; + public static explicit operator System.IntPtr(System.Int64 value) => throw null; + public static explicit operator System.Int64(System.IntPtr value) => throw null; } // Generated from `System.InvalidCastException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2694,7 +2683,6 @@ public enum LoaderOptimization { DisallowBindings, DomainMask, - // Stub generator skipped constructor MultiDomain, MultiDomainHost, NotSpecified, @@ -2906,9 +2894,9 @@ public struct Memory : System.IEquatable> public T[] ToArray() => throw null; public override string ToString() => throw null; public bool TryCopyTo(System.Memory destination) => throw null; - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ReadOnlyMemory(System.Memory memory) => throw null; + public static implicit operator System.Memory(T[] array) => throw null; + public static implicit operator System.Memory(System.ArraySegment segment) => throw null; } // Generated from `System.MethodAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -2924,7 +2912,6 @@ public class MethodAccessException : System.MemberAccessException public enum MidpointRounding { AwayFromZero, - // Stub generator skipped constructor ToEven, ToNegativeInfinity, ToPositiveInfinity, @@ -3099,8 +3086,8 @@ public struct Nullable where T : struct // Stub generator skipped constructor public override string ToString() => throw null; public T Value { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: implicit conversion + public static explicit operator T(System.Nullable value) => throw null; + public static implicit operator System.Nullable(T value) => throw null; } // Generated from `System.Object` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3214,7 +3201,6 @@ public enum PlatformID { MacOSX, Other, - // Stub generator skipped constructor Unix, Win32NT, Win32S, @@ -3305,8 +3291,8 @@ public struct ReadOnlyMemory : System.IEquatable> public T[] ToArray() => throw null; public override string ToString() => throw null; public bool TryCopyTo(System.Memory destination) => throw null; - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ReadOnlyMemory(T[] array) => throw null; + public static implicit operator System.ReadOnlyMemory(System.ArraySegment segment) => throw null; } // Generated from `System.ReadOnlySpan<>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3341,8 +3327,8 @@ public struct Enumerator public T[] ToArray() => throw null; public override string ToString() => throw null; public bool TryCopyTo(System.Span destination) => throw null; - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ReadOnlySpan(T[] array) => throw null; + public static implicit operator System.ReadOnlySpan(System.ArraySegment segment) => throw null; } // Generated from `System.ResolveEventArgs` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3556,9 +3542,9 @@ public struct Enumerator public T[] ToArray() => throw null; public override string ToString() => throw null; public bool TryCopyTo(System.Span destination) => throw null; - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Span(T[] array) => throw null; + public static implicit operator System.Span(System.ArraySegment segment) => throw null; + public static implicit operator System.ReadOnlySpan(System.Span span) => throw null; } // Generated from `System.StackOverflowException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3752,7 +3738,7 @@ public class String : System.IEquatable, System.IConvertible, System.ICo public string TrimStart(params System.Char[] trimChars) => throw null; public string TrimStart(System.Char trimChar) => throw null; public string TrimStart() => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator System.ReadOnlySpan(string value) => throw null; } // Generated from `System.StringComparer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3785,7 +3771,6 @@ public enum StringComparison InvariantCultureIgnoreCase, Ordinal, OrdinalIgnoreCase, - // Stub generator skipped constructor } // Generated from `System.StringNormalizationExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -3803,7 +3788,6 @@ public enum StringSplitOptions { None, RemoveEmptyEntries, - // Stub generator skipped constructor TrimEntries, } @@ -4488,7 +4472,6 @@ public enum TypeCode SByte, Single, String, - // Stub generator skipped constructor UInt16, UInt32, UInt64, @@ -4701,12 +4684,12 @@ public struct UIntPtr : System.Runtime.Serialization.ISerializable, System.IForm public UIntPtr(System.UInt32 value) => throw null; // Stub generator skipped constructor public static System.UIntPtr Zero; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + unsafe public static explicit operator void*(System.UIntPtr value) => throw null; + unsafe public static explicit operator System.UIntPtr(void* value) => throw null; + public static explicit operator System.UIntPtr(System.UInt64 value) => throw null; + public static explicit operator System.UIntPtr(System.UInt32 value) => throw null; + public static explicit operator System.UInt64(System.UIntPtr value) => throw null; + public static explicit operator System.UInt32(System.UIntPtr value) => throw null; } // Generated from `System.UnauthorizedAccessException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -4855,7 +4838,6 @@ public enum UriComponents SerializationInfoString, StrongAuthority, StrongPort, - // Stub generator skipped constructor UserInfo, } @@ -4865,7 +4847,6 @@ public enum UriFormat SafeUnescaped, Unescaped, UriEscaped, - // Stub generator skipped constructor } // Generated from `System.UriFormatException` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -4886,7 +4867,6 @@ public enum UriHostNameType IPv4, IPv6, Unknown, - // Stub generator skipped constructor } // Generated from `System.UriKind` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -4895,7 +4875,6 @@ public enum UriKind Absolute, Relative, RelativeOrAbsolute, - // Stub generator skipped constructor } // Generated from `System.UriParser` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -4920,7 +4899,6 @@ public enum UriPartial Path, Query, Scheme, - // Stub generator skipped constructor } // Generated from `System.ValueTuple` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -5260,7 +5238,6 @@ public enum OperationStatus Done, InvalidData, NeedMoreData, - // Stub generator skipped constructor } // Generated from `System.Buffers.ReadOnlySpanAction<,>` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -5812,7 +5789,6 @@ public enum EditorBrowsableState { Advanced, Always, - // Stub generator skipped constructor Never, } @@ -5824,7 +5800,6 @@ namespace Assemblies // Generated from `System.Configuration.Assemblies.AssemblyHashAlgorithm` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AssemblyHashAlgorithm { - // Stub generator skipped constructor MD5, None, SHA1, @@ -5836,7 +5811,6 @@ public enum AssemblyHashAlgorithm // Generated from `System.Configuration.Assemblies.AssemblyVersionCompatibility` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AssemblyVersionCompatibility { - // Stub generator skipped constructor SameDomain, SameMachine, SameProcess, @@ -5900,7 +5874,6 @@ public class DebuggableAttribute : System.Attribute [System.Flags] public enum DebuggingModes { - // Stub generator skipped constructor Default, DisableOptimizations, EnableEditAndContinue, @@ -5936,7 +5909,6 @@ public class DebuggerBrowsableAttribute : System.Attribute public enum DebuggerBrowsableState { Collapsed, - // Stub generator skipped constructor Never, RootHidden, } @@ -6068,7 +6040,6 @@ public class DynamicDependencyAttribute : System.Attribute public enum DynamicallyAccessedMemberTypes { All, - // Stub generator skipped constructor NonPublicConstructors, NonPublicEvents, NonPublicFields, @@ -6240,7 +6211,6 @@ public abstract class Calendar : System.ICloneable // Generated from `System.Globalization.CalendarAlgorithmType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CalendarAlgorithmType { - // Stub generator skipped constructor LunarCalendar, LunisolarCalendar, SolarCalendar, @@ -6250,7 +6220,6 @@ public enum CalendarAlgorithmType // Generated from `System.Globalization.CalendarWeekRule` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CalendarWeekRule { - // Stub generator skipped constructor FirstDay, FirstFourDayWeek, FirstFullWeek, @@ -6357,7 +6326,6 @@ public class CompareInfo : System.Runtime.Serialization.IDeserializationCallback [System.Flags] public enum CompareOptions { - // Stub generator skipped constructor IgnoreCase, IgnoreKanaType, IgnoreNonSpace, @@ -6443,7 +6411,6 @@ public class CultureNotFoundException : System.ArgumentException public enum CultureTypes { AllCultures, - // Stub generator skipped constructor FrameworkCultures, InstalledWin32Cultures, NeutralCultures, @@ -6513,7 +6480,6 @@ public enum DateTimeStyles AllowWhiteSpaces, AssumeLocal, AssumeUniversal, - // Stub generator skipped constructor NoCurrentDateDefault, None, RoundtripKind, @@ -6532,7 +6498,6 @@ public class DaylightTime public enum DigitShapes { Context, - // Stub generator skipped constructor NativeNational, None, } @@ -6605,7 +6570,6 @@ public class GregorianCalendar : System.Globalization.Calendar public enum GregorianCalendarTypes { Arabic, - // Stub generator skipped constructor Localized, MiddleEastFrench, TransliteratedEnglish, @@ -6873,7 +6837,6 @@ public enum NumberStyles Integer, None, Number, - // Stub generator skipped constructor } // Generated from `System.Globalization.PersianCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -7082,7 +7045,6 @@ public enum TimeSpanStyles { AssumeNegative, None, - // Stub generator skipped constructor } // Generated from `System.Globalization.UmAlQuraCalendar` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -7147,7 +7109,6 @@ public enum UnicodeCategory SpacingCombiningMark, Surrogate, TitlecaseLetter, - // Stub generator skipped constructor UppercaseLetter, } @@ -7289,7 +7250,6 @@ public class EndOfStreamException : System.IO.IOException [System.Flags] public enum FileAccess { - // Stub generator skipped constructor Read, ReadWrite, Write, @@ -7304,7 +7264,6 @@ public enum FileAttributes Device, Directory, Encrypted, - // Stub generator skipped constructor Hidden, IntegrityStream, NoScrubData, @@ -7340,7 +7299,6 @@ public enum FileMode Append, Create, CreateNew, - // Stub generator skipped constructor Open, OpenOrCreate, Truncate, @@ -7369,7 +7327,6 @@ public enum FileOptions Asynchronous, DeleteOnClose, Encrypted, - // Stub generator skipped constructor None, RandomAccess, SequentialScan, @@ -7381,7 +7338,6 @@ public enum FileOptions public enum FileShare { Delete, - // Stub generator skipped constructor Inheritable, None, Read, @@ -7444,7 +7400,6 @@ public class FileStream : System.IO.Stream // Generated from `System.IO.HandleInheritability` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum HandleInheritability { - // Stub generator skipped constructor Inheritable, None, } @@ -7577,7 +7532,6 @@ public enum SeekOrigin Begin, Current, End, - // Stub generator skipped constructor } // Generated from `System.IO.Stream` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -8049,7 +8003,6 @@ public class AssemblyConfigurationAttribute : System.Attribute // Generated from `System.Reflection.AssemblyContentType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum AssemblyContentType { - // Stub generator skipped constructor Default, WindowsRuntime, } @@ -8169,7 +8122,6 @@ public class AssemblyName : System.Runtime.Serialization.ISerializable, System.R [System.Flags] public enum AssemblyNameFlags { - // Stub generator skipped constructor EnableJITcompileOptimizer, EnableJITcompileTracking, None, @@ -8236,7 +8188,6 @@ public abstract class Binder [System.Flags] public enum BindingFlags { - // Stub generator skipped constructor CreateInstance, DeclaredOnly, Default, @@ -8265,7 +8216,6 @@ public enum BindingFlags public enum CallingConventions { Any, - // Stub generator skipped constructor ExplicitThis, HasThis, Standard, @@ -8397,7 +8347,6 @@ public class DefaultMemberAttribute : System.Attribute [System.Flags] public enum EventAttributes { - // Stub generator skipped constructor None, RTSpecialName, ReservedMask, @@ -8451,7 +8400,6 @@ public class ExceptionHandlingClause public enum ExceptionHandlingClauseOptions { Clause, - // Stub generator skipped constructor Fault, Filter, Finally, @@ -8466,7 +8414,6 @@ public enum FieldAttributes FamORAssem, Family, FieldAccessMask, - // Stub generator skipped constructor HasDefault, HasFieldMarshal, HasFieldRVA, @@ -8529,7 +8476,6 @@ public enum GenericParameterAttributes Contravariant, Covariant, DefaultConstructorConstraint, - // Stub generator skipped constructor None, NotNullableValueTypeConstraint, ReferenceTypeConstraint, @@ -8575,7 +8521,6 @@ public enum ImageFileMachine ARM, I386, IA64, - // Stub generator skipped constructor } // Generated from `System.Reflection.InterfaceMapping` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -8657,7 +8602,6 @@ public enum MemberTypes Custom, Event, Field, - // Stub generator skipped constructor Method, NestedType, Property, @@ -8678,7 +8622,6 @@ public enum MethodAttributes HasSecurity, HideBySig, MemberAccessMask, - // Stub generator skipped constructor NewSlot, PinvokeImpl, Private, @@ -8762,7 +8705,6 @@ public enum MethodImplAttributes Managed, ManagedMask, MaxMethodImplVal, - // Stub generator skipped constructor Native, NoInlining, NoOptimization, @@ -8888,7 +8830,6 @@ public enum ParameterAttributes None, Optional, Out, - // Stub generator skipped constructor Reserved3, Reserved4, ReservedMask, @@ -8953,7 +8894,6 @@ public enum PortableExecutableKinds ILOnly, NotAPortableExecutableImage, PE32Plus, - // Stub generator skipped constructor Preferred32Bit, Required32Bit, Unmanaged32Bit, @@ -8967,7 +8907,6 @@ public enum ProcessorArchitecture IA64, MSIL, None, - // Stub generator skipped constructor X86, } @@ -8977,7 +8916,6 @@ public enum PropertyAttributes { HasDefault, None, - // Stub generator skipped constructor RTSpecialName, Reserved2, Reserved3, @@ -9048,7 +8986,6 @@ public enum ResourceAttributes { Private, Public, - // Stub generator skipped constructor } // Generated from `System.Reflection.ResourceLocation` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -9058,7 +8995,6 @@ public enum ResourceLocation ContainedInAnotherAssembly, ContainedInManifestFile, Embedded, - // Stub generator skipped constructor } // Generated from `System.Reflection.RuntimeReflectionExtensions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -9146,7 +9082,6 @@ public enum TypeAttributes Serializable, SpecialName, StringFormatMask, - // Stub generator skipped constructor UnicodeClass, VisibilityMask, WindowsRuntime, @@ -9351,7 +9286,6 @@ public enum UltimateResourceFallbackLocation { MainAssembly, Satellite, - // Stub generator skipped constructor } } @@ -9377,14 +9311,12 @@ public enum GCLargeObjectHeapCompactionMode { CompactOnce, Default, - // Stub generator skipped constructor } // Generated from `System.Runtime.GCLatencyMode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum GCLatencyMode { Batch, - // Stub generator skipped constructor Interactive, LowLatency, NoGCRegion, @@ -9582,7 +9514,6 @@ public class CallerMemberNameAttribute : System.Attribute [System.Flags] public enum CompilationRelaxations { - // Stub generator skipped constructor NoStringInterning, } @@ -9888,7 +9819,6 @@ public enum LoadHint { Always, Default, - // Stub generator skipped constructor Sometimes, } @@ -9896,7 +9826,6 @@ public enum LoadHint public enum MethodCodeType { IL, - // Stub generator skipped constructor Native, OPTIL, Runtime, @@ -9920,7 +9849,6 @@ public enum MethodImplOptions AggressiveOptimization, ForwardRef, InternalCall, - // Stub generator skipped constructor NoInlining, NoOptimization, PreserveSig, @@ -10153,7 +10081,6 @@ namespace ConstrainedExecution // Generated from `System.Runtime.ConstrainedExecution.Cer` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum Cer { - // Stub generator skipped constructor MayFail, None, Success, @@ -10162,7 +10089,6 @@ public enum Cer // Generated from `System.Runtime.ConstrainedExecution.Consistency` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum Consistency { - // Stub generator skipped constructor MayCorruptAppDomain, MayCorruptInstance, MayCorruptProcess, @@ -10224,7 +10150,6 @@ public enum CharSet { Ansi, Auto, - // Stub generator skipped constructor None, Unicode, } @@ -10287,14 +10212,13 @@ public struct GCHandle public bool IsAllocated { get => throw null; } public object Target { get => throw null; set => throw null; } public static System.IntPtr ToIntPtr(System.Runtime.InteropServices.GCHandle value) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Runtime.InteropServices.GCHandle(System.IntPtr value) => throw null; + public static explicit operator System.IntPtr(System.Runtime.InteropServices.GCHandle value) => throw null; } // Generated from `System.Runtime.InteropServices.GCHandleType` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum GCHandleType { - // Stub generator skipped constructor Normal, Pinned, Weak, @@ -10312,7 +10236,6 @@ public enum LayoutKind { Auto, Explicit, - // Stub generator skipped constructor Sequential, } @@ -10573,7 +10496,6 @@ public enum StreamingContextStates Other, Persistence, Remoting, - // Stub generator skipped constructor } } @@ -10590,7 +10512,6 @@ public class ComponentGuaranteesAttribute : System.Attribute [System.Flags] public enum ComponentGuaranteesOptions { - // Stub generator skipped constructor Exchange, None, SideBySide, @@ -10649,7 +10570,6 @@ public enum ResourceScope None, Private, Process, - // Stub generator skipped constructor } // Generated from `System.Runtime.Versioning.SupportedOSPlatformAttribute` in `Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Diagnostics.EventLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Security.Cryptography.Xml, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51; System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; System.Windows.Extensions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` @@ -10726,7 +10646,6 @@ public interface IStackWalk public enum PartialTrustVisibilityLevel { NotVisibleByDefault, - // Stub generator skipped constructor VisibleToAllHosts, } @@ -10784,7 +10703,6 @@ public enum SecurityCriticalScope { Everything, Explicit, - // Stub generator skipped constructor } // Generated from `System.Security.SecurityElement` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -10841,7 +10759,6 @@ public enum SecurityRuleSet Level1, Level2, None, - // Stub generator skipped constructor } // Generated from `System.Security.SecurityRulesAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -10917,7 +10834,6 @@ public abstract class CodeAccessSecurityAttribute : System.Security.Permissions. public enum PermissionState { None, - // Stub generator skipped constructor Unrestricted, } @@ -10933,7 +10849,6 @@ public enum SecurityAction RequestMinimum, RequestOptional, RequestRefuse, - // Stub generator skipped constructor } // Generated from `System.Security.Permissions.SecurityAttribute` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -10984,7 +10899,6 @@ public enum SecurityPermissionFlag Infrastructure, NoFlags, RemotingConfiguration, - // Stub generator skipped constructor SerializationFormatter, SkipVerification, UnmanagedCode, @@ -11012,7 +10926,6 @@ public interface IPrincipal public enum PrincipalPolicy { NoPrincipal, - // Stub generator skipped constructor UnauthenticatedPrincipal, WindowsPrincipal, } @@ -11025,7 +10938,6 @@ public enum TokenImpersonationLevel Identification, Impersonation, None, - // Stub generator skipped constructor } } @@ -11332,7 +11244,6 @@ public enum NormalizationForm FormD, FormKC, FormKD, - // Stub generator skipped constructor } // Generated from `System.Text.Rune` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -11395,9 +11306,9 @@ public struct Rune : System.IEquatable, System.IComparable throw null; } public int Utf8SequenceLength { get => throw null; } public int Value { get => throw null; } - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator System.Text.Rune(int value) => throw null; + public static explicit operator System.Text.Rune(System.UInt32 value) => throw null; + public static explicit operator System.Text.Rune(System.Char ch) => throw null; } // Generated from `System.Text.StringBuilder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -11587,7 +11498,6 @@ public class CancellationTokenSource : System.IDisposable public enum LazyThreadSafetyMode { ExecutionAndPublication, - // Stub generator skipped constructor None, PublicationOnly, } @@ -11887,7 +11797,6 @@ public enum TaskContinuationOptions OnlyOnRanToCompletion, PreferFairness, RunContinuationsAsynchronously, - // Stub generator skipped constructor } // Generated from `System.Threading.Tasks.TaskCreationOptions` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -11901,7 +11810,6 @@ public enum TaskCreationOptions None, PreferFairness, RunContinuationsAsynchronously, - // Stub generator skipped constructor } // Generated from `System.Threading.Tasks.TaskExtensions` in `Microsoft.AspNetCore.Http.Connections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60; System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -12079,7 +11987,6 @@ public enum TaskStatus Faulted, RanToCompletion, Running, - // Stub generator skipped constructor WaitingForActivation, WaitingForChildrenToComplete, WaitingToRun, @@ -12184,7 +12091,6 @@ public enum ValueTaskSourceOnCompletedFlags FlowExecutionContext, None, UseSchedulingContext, - // Stub generator skipped constructor } // Generated from `System.Threading.Tasks.Sources.ValueTaskSourceStatus` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -12194,7 +12100,6 @@ public enum ValueTaskSourceStatus Faulted, Pending, Succeeded, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs index a10221628873..05089afa6a79 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs @@ -215,7 +215,6 @@ public class DSASignatureDeformatter : System.Security.Cryptography.AsymmetricSi // Generated from `System.Security.Cryptography.DSASignatureFormat` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum DSASignatureFormat { - // Stub generator skipped constructor IeeeP1363FixedFieldConcatenation, Rfc3279DerSequence, } @@ -255,7 +254,6 @@ public struct ECCurve public enum ECCurveType { Characteristic2, - // Stub generator skipped constructor Implicit, Named, PrimeMontgomery, @@ -659,7 +657,6 @@ public enum RSAEncryptionPaddingMode { Oaep, Pkcs1, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -761,7 +758,6 @@ public enum RSASignaturePaddingMode { Pkcs1, Pss, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.RandomNumberGenerator` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs index 5c7eaf44e9e2..08efec98ecb2 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs @@ -67,7 +67,6 @@ public class CspParameters public enum CspProviderFlags { CreateEphemeralKey, - // Stub generator skipped constructor NoFlags, NoPrompt, UseArchivableKey, @@ -134,7 +133,6 @@ public interface ICspAsymmetricAlgorithm public enum KeyNumber { Exchange, - // Stub generator skipped constructor Signature, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs index 181203d5331f..648a9376e076 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs @@ -70,7 +70,6 @@ public class FromBase64Transform : System.Security.Cryptography.ICryptoTransform public enum FromBase64TransformMode { DoNotIgnoreWhiteSpaces, - // Stub generator skipped constructor IgnoreWhiteSpaces, } @@ -122,7 +121,6 @@ public enum OidGroup ExtensionOrAttribute, HashAlgorithm, KeyDerivationFunction, - // Stub generator skipped constructor Policy, PublicKeyAlgorithm, SignatureAlgorithm, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs index dda7db7ca873..133e860419df 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs @@ -46,7 +46,6 @@ public enum CipherMode CBC, CFB, CTS, - // Stub generator skipped constructor ECB, OFB, } @@ -86,7 +85,6 @@ public class CryptoStream : System.IO.Stream, System.IDisposable // Generated from `System.Security.Cryptography.CryptoStreamMode` in `System.Security.Cryptography.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum CryptoStreamMode { - // Stub generator skipped constructor Read, Write, } @@ -216,7 +214,6 @@ public enum PaddingMode ISO10126, None, PKCS7, - // Stub generator skipped constructor Zeros, } @@ -226,7 +223,6 @@ public enum PbeEncryptionAlgorithm Aes128Cbc, Aes192Cbc, Aes256Cbc, - // Stub generator skipped constructor TripleDes3KeyPkcs12, Unknown, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs index 5737a17b12f7..d57451214841 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs @@ -69,7 +69,6 @@ public enum OpenFlags IncludeArchived, MaxAllowed, OpenExistingOnly, - // Stub generator skipped constructor ReadOnly, ReadWrite, } @@ -97,7 +96,6 @@ public enum StoreLocation { CurrentUser, LocalMachine, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.StoreName` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -109,7 +107,6 @@ public enum StoreName Disallowed, My, Root, - // Stub generator skipped constructor TrustedPeople, TrustedPublisher, } @@ -154,7 +151,6 @@ public enum X500DistinguishedNameFlags UseSemicolons, UseT61Encoding, UseUTF8Encoding, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -467,7 +463,6 @@ public enum X509ChainStatusFlags RevocationStatusUnknown, Revoked, UntrustedRoot, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509ChainTrustMode` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -475,7 +470,6 @@ public enum X509ChainTrustMode { CustomRootTrust, System, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509ContentType` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -489,7 +483,6 @@ public enum X509ContentType SerializedCert, SerializedStore, Unknown, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -558,7 +551,6 @@ public enum X509FindType FindByTimeExpired, FindByTimeNotYetValid, FindByTimeValid, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509IncludeOption` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -568,7 +560,6 @@ public enum X509IncludeOption ExcludeRoot, None, WholeChain, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509KeyStorageFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -582,7 +573,6 @@ public enum X509KeyStorageFlags PersistKeySet, UserKeySet, UserProtected, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509KeyUsageExtension` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -609,7 +599,6 @@ public enum X509KeyUsageFlags KeyEncipherment, NonRepudiation, None, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509NameType` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -621,7 +610,6 @@ public enum X509NameType SimpleName, UpnName, UrlName, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509RevocationFlag` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -630,7 +618,6 @@ public enum X509RevocationFlag EndCertificateOnly, EntireChain, ExcludeRoot, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509RevocationMode` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -639,7 +626,6 @@ public enum X509RevocationMode NoCheck, Offline, Online, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509SignatureGenerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -700,7 +686,6 @@ public enum X509SubjectKeyIdentifierHashAlgorithm CapiSha1, Sha1, ShortSha1, - // Stub generator skipped constructor } // Generated from `System.Security.Cryptography.X509Certificates.X509VerificationFlags` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -721,7 +706,6 @@ public enum X509VerificationFlags IgnoreRootRevocationUnknown, IgnoreWrongUsage, NoFlag, - // Stub generator skipped constructor } } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs index a93a893b62cd..7e2cb9f416e1 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs @@ -11,7 +11,6 @@ public enum JsonCommentHandling { Allow, Disallow, - // Stub generator skipped constructor Skip, } @@ -219,7 +218,6 @@ public static class JsonSerializer public enum JsonSerializerDefaults { General, - // Stub generator skipped constructor Web, } @@ -256,7 +254,6 @@ public enum JsonTokenType EndArray, EndObject, False, - // Stub generator skipped constructor None, Null, Number, @@ -272,7 +269,6 @@ public enum JsonValueKind { Array, False, - // Stub generator skipped constructor Null, Number, Object, @@ -535,7 +531,6 @@ public class JsonIgnoreAttribute : System.Text.Json.Serialization.JsonAttribute public enum JsonIgnoreCondition { Always, - // Stub generator skipped constructor Never, WhenWritingDefault, WhenWritingNull, @@ -553,7 +548,6 @@ public enum JsonNumberHandling { AllowNamedFloatingPointLiterals, AllowReadingFromString, - // Stub generator skipped constructor Strict, WriteAsString, } diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs index 69891d14b45f..4cafdc0e4695 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs @@ -251,7 +251,6 @@ public enum RegexOptions IgnorePatternWhitespace, Multiline, None, - // Stub generator skipped constructor RightToLeft, Singleline, } @@ -279,7 +278,6 @@ public enum RegexParseError NestedQuantifiersNotParenthesized, QuantifierAfterNothing, QuantifierOrCaptureGroupOutOfRange, - // Stub generator skipped constructor ReversedCharacterRange, ReversedQuantifierRange, ShorthandClassInCharacterRange, diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs index 25e341f1ff54..e26d09f40a60 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs @@ -9,7 +9,6 @@ namespace Channels // Generated from `System.Threading.Channels.BoundedChannelFullMode` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public enum BoundedChannelFullMode { - // Stub generator skipped constructor DropNewest, DropOldest, DropWrite, @@ -39,8 +38,8 @@ public abstract class Channel protected Channel() => throw null; public System.Threading.Channels.ChannelReader Reader { get => throw null; set => throw null; } public System.Threading.Channels.ChannelWriter Writer { get => throw null; set => throw null; } - // Stub generator skipped operator: implicit conversion - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Threading.Channels.ChannelWriter(System.Threading.Channels.Channel channel) => throw null; + public static implicit operator System.Threading.Channels.ChannelReader(System.Threading.Channels.Channel channel) => throw null; } // Generated from `System.Threading.Channels.Channel<>` in `System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs index f4daca6105e4..7895e85d77fd 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs @@ -231,7 +231,6 @@ public struct DataflowMessageHeader : System.IEquatable throw null; set => throw null; } public XAttribute(System.Xml.Linq.XName name, object value) => throw null; public XAttribute(System.Xml.Linq.XAttribute other) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator string(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator int?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator int(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator float?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator float(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator double?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator double(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator bool?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator bool(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.UInt64?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.UInt64(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.UInt32?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.UInt32(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.TimeSpan?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.TimeSpan(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Int64?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Int64(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Guid?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Guid(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Decimal?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.Decimal(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.DateTimeOffset?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.DateTimeOffset(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.DateTime?(System.Xml.Linq.XAttribute attribute) => throw null; + public static explicit operator System.DateTime(System.Xml.Linq.XAttribute attribute) => throw null; } // Generated from `System.Xml.Linq.XCData` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -273,31 +270,31 @@ public class XElement : System.Xml.Linq.XContainer, System.Xml.Serialization.IXm public XElement(System.Xml.Linq.XName name, object content) => throw null; public XElement(System.Xml.Linq.XName name) => throw null; public XElement(System.Xml.Linq.XElement other) => throw null; - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion - // Stub generator skipped operator: explicit conversion + public static explicit operator string(System.Xml.Linq.XElement element) => throw null; + public static explicit operator int?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator int(System.Xml.Linq.XElement element) => throw null; + public static explicit operator float?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator float(System.Xml.Linq.XElement element) => throw null; + public static explicit operator double?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator double(System.Xml.Linq.XElement element) => throw null; + public static explicit operator bool?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator bool(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.UInt64?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.UInt64(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.UInt32?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.UInt32(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.TimeSpan?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.TimeSpan(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Int64?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Int64(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Guid?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Guid(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Decimal?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.Decimal(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.DateTimeOffset?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.DateTimeOffset(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.DateTime?(System.Xml.Linq.XElement element) => throw null; + public static explicit operator System.DateTime(System.Xml.Linq.XElement element) => throw null; } // Generated from `System.Xml.Linq.XName` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -315,7 +312,7 @@ public class XName : System.Runtime.Serialization.ISerializable, System.IEquatab public System.Xml.Linq.XNamespace Namespace { get => throw null; } public string NamespaceName { get => throw null; } public override string ToString() => throw null; - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Xml.Linq.XName(string expandedName) => throw null; } // Generated from `System.Xml.Linq.XNamespace` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -333,7 +330,7 @@ public class XNamespace public override string ToString() => throw null; public static System.Xml.Linq.XNamespace Xml { get => throw null; } public static System.Xml.Linq.XNamespace Xmlns { get => throw null; } - // Stub generator skipped operator: implicit conversion + public static implicit operator System.Xml.Linq.XNamespace(string namespaceName) => throw null; } // Generated from `System.Xml.Linq.XNode` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` @@ -420,7 +417,6 @@ public enum XObjectChange Name, Remove, Value, - // Stub generator skipped constructor } // Generated from `System.Xml.Linq.XObjectChangeEventArgs` in `System.Xml.XDocument, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs index 4c12a1e9b26b..747f007c7987 100644 --- a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs +++ b/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs @@ -10,7 +10,6 @@ namespace Serialization [System.Flags] public enum CodeGenerationOptions { - // Stub generator skipped constructor EnableDataBinding, GenerateNewAsync, GenerateOldAsync, @@ -345,7 +344,6 @@ public enum XmlMappingAccess None, Read, Write, - // Stub generator skipped constructor } // Generated from `System.Xml.Serialization.XmlMemberMapping` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` From 026bcc72f24327eab74d94feebb3ed422b7434f5 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 22 Jun 2021 11:22:00 +0200 Subject: [PATCH 1574/1662] C#: Improve performance of stubbing library --- csharp/ql/src/Stubs/Stubs.qll | 208 +++++++++++++++++++++------------- 1 file changed, 132 insertions(+), 76 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index f8d01ff97c6a..47721f600db8 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -126,6 +126,7 @@ abstract private class GeneratedType extends Type, GeneratedElement { } /** Gets the entire C# stub code for this type. */ + pragma[nomagic] final string getStub(Assembly assembly) { if this.isDuplicate(assembly) then @@ -176,8 +177,8 @@ abstract private class GeneratedType extends Type, GeneratedElement { language[monotonicAggregates] private string stubMembers(Assembly assembly) { result = - concat(Member m | - m = this.getAGeneratedMember() and m.getALocation() = assembly + concat(GeneratedMember m | + m = this.getAGeneratedMember(assembly) | stubMember(m, assembly) order by m.getName() ) @@ -201,6 +202,11 @@ abstract private class GeneratedType extends Type, GeneratedElement { private GeneratedMember getAGeneratedMember() { result.getDeclaringType() = this } + pragma[noinline] + private GeneratedMember getAGeneratedMember(Assembly assembly) { + result = this.getAGeneratedMember() and assembly = result.getALocation() + } + final Type getAGeneratedType() { result = getAnInterestingBaseType() or @@ -733,85 +739,135 @@ private string stubExplicitImplementation(Member c) { else result = "" } -private string stubMember(Member m, Assembly assembly) { - if m instanceof Method +pragma[noinline] +private string stubMethod(Method m, Assembly assembly) { + m instanceof GeneratedMember and + m.getALocation() = assembly and + if not m.getDeclaringType() instanceof Enum + then + result = + " " + stubModifiers(m) + stubClassName(m.(Method).getReturnType()) + " " + + stubExplicitImplementation(m) + m.getName() + stubGenericMethodParams(m) + "(" + + stubParameters(m) + ")" + stubTypeParametersConstraints(m) + stubImplementation(m) + ";\n" + else result = " // Stub generator skipped method: " + m.getName() + "\n" +} + +pragma[noinline] +private string stubOperator(Operator o, Assembly assembly) { + o instanceof GeneratedMember and + o.getALocation() = assembly and + if o instanceof ConversionOperator then - if not m.getDeclaringType() instanceof Enum + result = + " " + stubModifiers(o) + stubExplicit(o) + "operator " + stubClassName(o.getReturnType()) + + "(" + stubParameters(o) + ") => throw null;\n" + else + if not o.getDeclaringType() instanceof Enum then result = - " " + stubModifiers(m) + stubClassName(m.(Method).getReturnType()) + " " + - stubExplicitImplementation(m) + m.getName() + stubGenericMethodParams(m) + "(" + - stubParameters(m) + ")" + stubTypeParametersConstraints(m) + stubImplementation(m) + ";\n" - else result = " // Stub generator skipped method: " + m.getName() + "\n" + " " + stubModifiers(o) + stubClassName(o.getReturnType()) + " operator " + o.getName() + + "(" + stubParameters(o) + ") => throw null;\n" + else result = " // Stub generator skipped operator: " + o.getName() + "\n" +} + +pragma[noinline] +private string stubEnumConstant(EnumConstant ec, Assembly assembly) { + ec instanceof GeneratedMember and + ec.getALocation() = assembly and + result = " " + ec.getName() + ",\n" +} + +pragma[noinline] +private string stubProperty(Property p, Assembly assembly) { + p instanceof GeneratedMember and + p.getALocation() = assembly and + result = + " " + stubModifiers(p) + stubClassName(p.getType()) + " " + stubExplicitImplementation(p) + + p.getName() + " { " + stubGetter(p) + stubSetter(p) + "}\n" +} + +pragma[noinline] +private string stubConstructor(Constructor c, Assembly assembly) { + c instanceof GeneratedMember and + c.getALocation() = assembly and + if c.getDeclaringType() instanceof Enum + then result = "" else - if m instanceof Operator and not m instanceof ConversionOperator + if + not c.getDeclaringType() instanceof StructEx or + c.getNumberOfParameters() > 0 then - if not m.getDeclaringType() instanceof Enum - then - result = - " " + stubModifiers(m) + stubClassName(m.(Operator).getReturnType()) + " operator " + - m.getName() + "(" + stubParameters(m) + ") => throw null;\n" - else result = " // Stub generator skipped operator: " + m.getName() + "\n" - else - if m instanceof ConversionOperator - then - result = - " " + stubModifiers(m) + stubExplicit(m) + "operator " + - stubClassName(m.(ConversionOperator).getReturnType()) + "(" + stubParameters(m) + - ") => throw null;\n" - else - if m instanceof EnumConstant - then result = " " + m.(EnumConstant).getName() + ",\n" - else - if m instanceof Property - then - result = - " " + stubModifiers(m) + stubClassName(m.(Property).getType()) + " " + - stubExplicitImplementation(m) + m.getName() + " { " + stubGetter(m) + stubSetter(m) + - "}\n" - else - if m instanceof Constructor - then - if m.getDeclaringType() instanceof Enum - then result = "" - else - if - not m.getDeclaringType() instanceof StructEx or - m.(Constructor).getNumberOfParameters() > 0 - then - result = - " " + stubModifiers(m) + m.getName() + "(" + stubParameters(m) + ")" + - stubConstructorInitializer(m) + " => throw null;\n" - else result = " // Stub generator skipped constructor \n" - else - if m instanceof Indexer - then - result = - " " + stubIndexerNameAttribute(m) + stubModifiers(m) + - stubClassName(m.(Indexer).getType()) + " " + stubExplicitImplementation(m) + - "this[" + stubParameters(m) + "] { " + stubGetter(m) + stubSetter(m) + "}\n" - else - if m instanceof Field // EnumConstants are already stubbed - then - exists(string impl | - (if m.(Field).isConst() then impl = " = default" else impl = "") and - result = - " " + stubModifiers(m) + stubClassName(m.(Field).getType()) + " " + - escapeIfKeyword(m.(Field).getName()) + impl + ";\n" - ) - else - if m instanceof Event - then - result = - " " + stubModifiers(m) + "event " + stubClassName(m.(Event).getType()) + - " " + stubExplicitImplementation(m) + m.getName() + stubEventAccessors(m) + - "\n" - else - if m instanceof GeneratedType - then result = m.(GeneratedType).getStub(assembly) + "\n" - else - result = - " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" + result = + " " + stubModifiers(c) + c.getName() + "(" + stubParameters(c) + ")" + + stubConstructorInitializer(c) + " => throw null;\n" + else result = " // Stub generator skipped constructor \n" +} + +pragma[noinline] +private string stubIndexer(Indexer i, Assembly assembly) { + i instanceof GeneratedMember and + i.getALocation() = assembly and + result = + " " + stubIndexerNameAttribute(i) + stubModifiers(i) + stubClassName(i.getType()) + " " + + stubExplicitImplementation(i) + "this[" + stubParameters(i) + "] { " + stubGetter(i) + + stubSetter(i) + "}\n" +} + +pragma[noinline] +private string stubField(Field f, Assembly assembly) { + f instanceof GeneratedMember and + f.getALocation() = assembly and + not f instanceof EnumConstant and // EnumConstants are already stubbed + exists(string impl | + (if f.isConst() then impl = " = default" else impl = "") and + result = + " " + stubModifiers(f) + stubClassName(f.getType()) + " " + escapeIfKeyword(f.getName()) + + impl + ";\n" + ) +} + +pragma[noinline] +private string stubEvent(Event e, Assembly assembly) { + e instanceof GeneratedMember and + e.getALocation() = assembly and + result = + " " + stubModifiers(e) + "event " + stubClassName(e.getType()) + " " + + stubExplicitImplementation(e) + e.getName() + stubEventAccessors(e) + "\n" +} + +pragma[nomagic] +private string stubMember(GeneratedMember m, Assembly assembly) { + result = stubMethod(m, assembly) + or + result = stubOperator(m, assembly) + or + result = stubEnumConstant(m, assembly) + or + result = stubProperty(m, assembly) + or + result = stubConstructor(m, assembly) + or + result = stubIndexer(m, assembly) + or + result = stubField(m, assembly) + or + result = stubEvent(m, assembly) + or + not m instanceof Method and + not m instanceof Operator and + not m instanceof EnumConstant and + not m instanceof Property and + not m instanceof Constructor and + not m instanceof Indexer and + not m instanceof Field and + not m instanceof Event and + m.getALocation() = assembly and + ( + result = m.(GeneratedType).getStub(assembly) + "\n" + or + not m instanceof GeneratedType and + result = " // ERR: Stub generator didn't handle member: " + m.getName() + "\n" + ) } private string stubIndexerNameAttribute(Indexer i) { From 5b2be8ce2d7d75cd794c184f732c4d7c7bf9eb0c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 14:06:56 +0200 Subject: [PATCH 1575/1662] Fix code review findings --- csharp/ql/src/Stubs/Stubs.qll | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 47721f600db8..e3bdae12136d 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -13,7 +13,6 @@ import csharp private import semmle.code.csharp.frameworks.System -private import semmle.code.dotnet.DotNet as DotNet /** An element that should be in the generated code. */ abstract class GeneratedElement extends Element { } @@ -22,8 +21,8 @@ abstract class GeneratedElement extends Element { } abstract class GeneratedMember extends Member, GeneratedElement { } /** Class representing all `struct`s, such as user defined ones and built-in ones, like `int`. */ -private class StructEx extends Type { - StructEx() { +private class StructExt extends Type { + StructExt() { this instanceof Struct or this instanceof SimpleType or this instanceof VoidType or @@ -39,7 +38,7 @@ abstract private class GeneratedType extends Type, GeneratedElement { or this instanceof Class or - this instanceof StructEx + this instanceof StructExt or this instanceof Enum or @@ -88,7 +87,7 @@ abstract private class GeneratedType extends Type, GeneratedElement { private string stubKeyword() { this instanceof Interface and result = "interface" or - this instanceof StructEx and result = "struct" + this instanceof StructExt and result = "struct" or this instanceof Class and result = "class" or @@ -333,7 +332,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { } private predicate isInAssembly(Assembly assembly) { - any(GeneratedType gt | gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this) + any(GeneratedType gt | gt.(ValueOrRefType).getDeclaringNamespace() = this) .isInAssembly(assembly) or this.getChildNamespace(_).isInAssembly(assembly) @@ -354,7 +353,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { this.isInAssembly(assembly) and result = concat(GeneratedType gt | - gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly) + gt.(ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly) | gt.getStub(assembly) order by gt.getName() ) @@ -794,7 +793,7 @@ private string stubConstructor(Constructor c, Assembly assembly) { then result = "" else if - not c.getDeclaringType() instanceof StructEx or + not c.getDeclaringType() instanceof StructExt or c.getNumberOfParameters() > 0 then result = From b40b6f40b6d300b322e0f73db60e9065b17a040a Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Tue, 22 Jun 2021 14:11:00 +0200 Subject: [PATCH 1576/1662] Change frameworks folder to _frameworks --- csharp/ql/src/Stubs/make_stubs_nuget.py | 2 +- .../test/query-tests/Stubs/References/Test.cs | 2 +- .../Stubs/References/files.expected | 464 +++++++++--------- .../Microsoft.AspNetCore.Antiforgery.cs | 0 .../Microsoft.AspNetCore.App.csproj | 0 ....AspNetCore.Authentication.Abstractions.cs | 0 ...osoft.AspNetCore.Authentication.Cookies.cs | 0 ...icrosoft.AspNetCore.Authentication.Core.cs | 0 ...crosoft.AspNetCore.Authentication.OAuth.cs | 0 .../Microsoft.AspNetCore.Authentication.cs | 0 ...crosoft.AspNetCore.Authorization.Policy.cs | 0 .../Microsoft.AspNetCore.Authorization.cs | 0 ...oft.AspNetCore.Components.Authorization.cs | 0 .../Microsoft.AspNetCore.Components.Forms.cs | 0 .../Microsoft.AspNetCore.Components.Server.cs | 0 .../Microsoft.AspNetCore.Components.Web.cs | 0 .../Microsoft.AspNetCore.Components.cs | 0 ...oft.AspNetCore.Connections.Abstractions.cs | 0 .../Microsoft.AspNetCore.CookiePolicy.cs | 0 .../Microsoft.AspNetCore.Cors.cs | 0 ...t.AspNetCore.Cryptography.KeyDerivation.cs | 0 ....AspNetCore.DataProtection.Abstractions.cs | 0 ...ft.AspNetCore.DataProtection.Extensions.cs | 0 .../Microsoft.AspNetCore.DataProtection.cs | 0 ...oft.AspNetCore.Diagnostics.Abstractions.cs | 0 ...oft.AspNetCore.Diagnostics.HealthChecks.cs | 0 .../Microsoft.AspNetCore.Diagnostics.cs | 0 .../Microsoft.AspNetCore.HostFiltering.cs | 0 ...crosoft.AspNetCore.Hosting.Abstractions.cs | 0 ....AspNetCore.Hosting.Server.Abstractions.cs | 0 .../Microsoft.AspNetCore.Hosting.cs | 0 .../Microsoft.AspNetCore.Html.Abstractions.cs | 0 .../Microsoft.AspNetCore.Http.Abstractions.cs | 0 ...soft.AspNetCore.Http.Connections.Common.cs | 0 .../Microsoft.AspNetCore.Http.Connections.cs | 0 .../Microsoft.AspNetCore.Http.Extensions.cs | 0 .../Microsoft.AspNetCore.Http.Features.cs | 0 .../Microsoft.AspNetCore.Http.cs | 0 .../Microsoft.AspNetCore.HttpOverrides.cs | 0 .../Microsoft.AspNetCore.HttpsPolicy.cs | 0 .../Microsoft.AspNetCore.Identity.cs | 0 ...crosoft.AspNetCore.Localization.Routing.cs | 0 .../Microsoft.AspNetCore.Localization.cs | 0 .../Microsoft.AspNetCore.Metadata.cs | 0 .../Microsoft.AspNetCore.Mvc.Abstractions.cs | 0 .../Microsoft.AspNetCore.Mvc.ApiExplorer.cs | 0 .../Microsoft.AspNetCore.Mvc.Core.cs | 0 .../Microsoft.AspNetCore.Mvc.Cors.cs | 0 ...icrosoft.AspNetCore.Mvc.DataAnnotations.cs | 0 ...Microsoft.AspNetCore.Mvc.Formatters.Xml.cs | 0 .../Microsoft.AspNetCore.Mvc.Localization.cs | 0 .../Microsoft.AspNetCore.Mvc.Razor.cs | 0 .../Microsoft.AspNetCore.Mvc.RazorPages.cs | 0 .../Microsoft.AspNetCore.Mvc.TagHelpers.cs | 0 .../Microsoft.AspNetCore.Mvc.ViewFeatures.cs | 0 .../Microsoft.AspNetCore.Mvc.cs | 0 .../Microsoft.AspNetCore.Razor.Runtime.cs | 0 .../Microsoft.AspNetCore.Razor.cs | 0 ...AspNetCore.ResponseCaching.Abstractions.cs | 0 .../Microsoft.AspNetCore.ResponseCaching.cs | 0 ...icrosoft.AspNetCore.ResponseCompression.cs | 0 .../Microsoft.AspNetCore.Rewrite.cs | 0 ...crosoft.AspNetCore.Routing.Abstractions.cs | 0 .../Microsoft.AspNetCore.Routing.cs | 0 .../Microsoft.AspNetCore.Server.HttpSys.cs | 0 .../Microsoft.AspNetCore.Server.IIS.cs | 0 ...rosoft.AspNetCore.Server.IISIntegration.cs | 0 ...icrosoft.AspNetCore.Server.Kestrel.Core.cs | 0 ...etCore.Server.Kestrel.Transport.Sockets.cs | 0 .../Microsoft.AspNetCore.Server.Kestrel.cs | 0 .../Microsoft.AspNetCore.Session.cs | 0 .../Microsoft.AspNetCore.SignalR.Common.cs | 0 .../Microsoft.AspNetCore.SignalR.Core.cs | 0 ...osoft.AspNetCore.SignalR.Protocols.Json.cs | 0 .../Microsoft.AspNetCore.SignalR.cs | 0 .../Microsoft.AspNetCore.StaticFiles.cs | 0 .../Microsoft.AspNetCore.WebSockets.cs | 0 .../Microsoft.AspNetCore.WebUtilities.cs | 0 .../Microsoft.AspNetCore.cs | 0 ...crosoft.Extensions.Caching.Abstractions.cs | 0 .../Microsoft.Extensions.Caching.Memory.cs | 0 ...t.Extensions.Configuration.Abstractions.cs | 0 ...crosoft.Extensions.Configuration.Binder.cs | 0 ...ft.Extensions.Configuration.CommandLine.cs | 0 ...ions.Configuration.EnvironmentVariables.cs | 0 ...Extensions.Configuration.FileExtensions.cs | 0 .../Microsoft.Extensions.Configuration.Ini.cs | 0 ...Microsoft.Extensions.Configuration.Json.cs | 0 ...oft.Extensions.Configuration.KeyPerFile.cs | 0 ...ft.Extensions.Configuration.UserSecrets.cs | 0 .../Microsoft.Extensions.Configuration.Xml.cs | 0 .../Microsoft.Extensions.Configuration.cs | 0 ...nsions.DependencyInjection.Abstractions.cs | 0 ...icrosoft.Extensions.DependencyInjection.cs | 0 ...s.Diagnostics.HealthChecks.Abstractions.cs | 0 ...oft.Extensions.Diagnostics.HealthChecks.cs | 0 ...t.Extensions.FileProviders.Abstractions.cs | 0 ...soft.Extensions.FileProviders.Composite.cs | 0 ...osoft.Extensions.FileProviders.Embedded.cs | 0 ...osoft.Extensions.FileProviders.Physical.cs | 0 ...Microsoft.Extensions.FileSystemGlobbing.cs | 0 ...crosoft.Extensions.Hosting.Abstractions.cs | 0 .../Microsoft.Extensions.Hosting.cs | 0 .../Microsoft.Extensions.Http.cs | 0 .../Microsoft.Extensions.Identity.Core.cs | 0 .../Microsoft.Extensions.Identity.Stores.cs | 0 ...ft.Extensions.Localization.Abstractions.cs | 0 .../Microsoft.Extensions.Localization.cs | 0 ...crosoft.Extensions.Logging.Abstractions.cs | 0 ...rosoft.Extensions.Logging.Configuration.cs | 0 .../Microsoft.Extensions.Logging.Console.cs | 0 .../Microsoft.Extensions.Logging.Debug.cs | 0 .../Microsoft.Extensions.Logging.EventLog.cs | 0 ...icrosoft.Extensions.Logging.EventSource.cs | 0 ...icrosoft.Extensions.Logging.TraceSource.cs | 0 .../Microsoft.Extensions.Logging.cs | 0 .../Microsoft.Extensions.ObjectPool.cs | 0 ...ensions.Options.ConfigurationExtensions.cs | 0 ...soft.Extensions.Options.DataAnnotations.cs | 0 .../Microsoft.Extensions.Options.cs | 0 .../Microsoft.Extensions.Primitives.cs | 0 .../Microsoft.Extensions.WebEncoders.cs | 0 .../Microsoft.JSInterop.cs | 0 .../Microsoft.Net.Http.Headers.cs | 0 .../Microsoft.Win32.Registry.cs | 0 .../System.Diagnostics.EventLog.cs | 0 .../System.IO.Pipelines.cs | 0 .../System.Security.AccessControl.cs | 0 .../System.Security.Cryptography.Cng.cs | 0 .../System.Security.Cryptography.Xml.cs | 0 .../System.Security.Permissions.cs | 0 .../System.Security.Principal.Windows.cs | 0 .../System.Windows.Extensions.cs | 0 .../Microsoft.NETCore.App/Microsoft.CSharp.cs | 0 .../Microsoft.NETCore.App.csproj | 0 .../Microsoft.VisualBasic.Core.cs | 0 .../Microsoft.Win32.Primitives.cs | 0 .../System.Collections.Concurrent.cs | 0 .../System.Collections.Immutable.cs | 0 .../System.Collections.NonGeneric.cs | 0 .../System.Collections.Specialized.cs | 0 .../System.Collections.cs | 0 .../System.ComponentModel.Annotations.cs | 0 .../System.ComponentModel.EventBasedAsync.cs | 0 .../System.ComponentModel.Primitives.cs | 0 .../System.ComponentModel.TypeConverter.cs | 0 .../System.ComponentModel.cs | 0 .../Microsoft.NETCore.App/System.Console.cs | 0 .../System.Data.Common.cs | 0 .../System.Diagnostics.Contracts.cs | 0 .../System.Diagnostics.DiagnosticSource.cs | 0 .../System.Diagnostics.FileVersionInfo.cs | 0 .../System.Diagnostics.Process.cs | 0 .../System.Diagnostics.StackTrace.cs | 0 ...tem.Diagnostics.TextWriterTraceListener.cs | 0 .../System.Diagnostics.TraceSource.cs | 0 .../System.Diagnostics.Tracing.cs | 0 .../System.Drawing.Primitives.cs | 0 .../System.Formats.Asn1.cs | 0 .../System.IO.Compression.Brotli.cs | 0 .../System.IO.Compression.ZipFile.cs | 0 .../System.IO.Compression.cs | 0 .../System.IO.FileSystem.DriveInfo.cs | 0 .../System.IO.FileSystem.Watcher.cs | 0 .../System.IO.FileSystem.cs | 0 .../System.IO.IsolatedStorage.cs | 0 .../System.IO.MemoryMappedFiles.cs | 0 .../Microsoft.NETCore.App/System.IO.Pipes.cs | 0 .../System.Linq.Expressions.cs | 0 .../System.Linq.Parallel.cs | 0 .../System.Linq.Queryable.cs | 0 .../Microsoft.NETCore.App/System.Linq.cs | 0 .../Microsoft.NETCore.App/System.Memory.cs | 0 .../System.Net.Http.Json.cs | 0 .../Microsoft.NETCore.App/System.Net.Http.cs | 0 .../System.Net.HttpListener.cs | 0 .../Microsoft.NETCore.App/System.Net.Mail.cs | 0 .../System.Net.NameResolution.cs | 0 .../System.Net.NetworkInformation.cs | 0 .../Microsoft.NETCore.App/System.Net.Ping.cs | 0 .../System.Net.Primitives.cs | 0 .../System.Net.Requests.cs | 0 .../System.Net.Security.cs | 0 .../System.Net.ServicePoint.cs | 0 .../System.Net.Sockets.cs | 0 .../System.Net.WebClient.cs | 0 .../System.Net.WebHeaderCollection.cs | 0 .../System.Net.WebProxy.cs | 0 .../System.Net.WebSockets.Client.cs | 0 .../System.Net.WebSockets.cs | 0 .../System.Numerics.Vectors.cs | 0 .../System.ObjectModel.cs | 0 .../System.Reflection.DispatchProxy.cs | 0 .../System.Reflection.Emit.ILGeneration.cs | 0 .../System.Reflection.Emit.Lightweight.cs | 0 .../System.Reflection.Emit.cs | 0 .../System.Reflection.Metadata.cs | 0 .../System.Reflection.Primitives.cs | 0 .../System.Reflection.TypeExtensions.cs | 0 .../System.Resources.Writer.cs | 0 .../System.Runtime.CompilerServices.Unsafe.cs | 0 ...System.Runtime.CompilerServices.VisualC.cs | 0 ...time.InteropServices.RuntimeInformation.cs | 0 .../System.Runtime.InteropServices.cs | 0 .../System.Runtime.Intrinsics.cs | 0 .../System.Runtime.Loader.cs | 0 .../System.Runtime.Numerics.cs | 0 ...System.Runtime.Serialization.Formatters.cs | 0 .../System.Runtime.Serialization.Json.cs | 0 ...System.Runtime.Serialization.Primitives.cs | 0 .../System.Runtime.Serialization.Xml.cs | 0 .../Microsoft.NETCore.App/System.Runtime.cs | 0 .../System.Security.Claims.cs | 0 ...System.Security.Cryptography.Algorithms.cs | 0 .../System.Security.Cryptography.Csp.cs | 0 .../System.Security.Cryptography.Encoding.cs | 0 ...System.Security.Cryptography.Primitives.cs | 0 ....Security.Cryptography.X509Certificates.cs | 0 .../System.Text.Encoding.CodePages.cs | 0 .../System.Text.Encoding.Extensions.cs | 0 .../System.Text.Encodings.Web.cs | 0 .../Microsoft.NETCore.App/System.Text.Json.cs | 0 .../System.Text.RegularExpressions.cs | 0 .../System.Threading.Channels.cs | 0 .../System.Threading.Overlapped.cs | 0 .../System.Threading.Tasks.Dataflow.cs | 0 .../System.Threading.Tasks.Parallel.cs | 0 .../System.Threading.Thread.cs | 0 .../System.Threading.ThreadPool.cs | 0 .../Microsoft.NETCore.App/System.Threading.cs | 0 .../System.Transactions.Local.cs | 0 .../System.Web.HttpUtility.cs | 0 .../System.Xml.ReaderWriter.cs | 0 .../System.Xml.XDocument.cs | 0 .../System.Xml.XPath.XDocument.cs | 0 .../Microsoft.NETCore.App/System.Xml.XPath.cs | 0 .../System.Xml.XmlSerializer.cs | 0 237 files changed, 234 insertions(+), 234 deletions(-) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.IO.Pipelines.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Security.AccessControl.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Security.Permissions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.AspNetCore.App/System.Windows.Extensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/Microsoft.CSharp.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Collections.Concurrent.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Collections.Immutable.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Collections.NonGeneric.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Collections.Specialized.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Collections.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ComponentModel.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Console.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Data.Common.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.Process.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Drawing.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Formats.Asn1.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.Compression.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.FileSystem.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.IO.Pipes.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Linq.Expressions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Linq.Parallel.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Linq.Queryable.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Linq.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Memory.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Http.Json.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Http.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.HttpListener.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Mail.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.NameResolution.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.NetworkInformation.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Ping.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Requests.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Security.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.ServicePoint.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.Sockets.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.WebClient.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.WebProxy.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Net.WebSockets.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Numerics.Vectors.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.ObjectModel.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.Emit.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.Metadata.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Resources.Writer.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.InteropServices.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Loader.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Numerics.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Runtime.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Claims.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Text.Encodings.Web.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Text.Json.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Text.RegularExpressions.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.Channels.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.Overlapped.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.Thread.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.ThreadPool.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Threading.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Transactions.Local.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Web.HttpUtility.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Xml.XDocument.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Xml.XPath.cs (100%) rename csharp/ql/test/resources/stubs/{frameworks => _frameworks}/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs (100%) diff --git a/csharp/ql/src/Stubs/make_stubs_nuget.py b/csharp/ql/src/Stubs/make_stubs_nuget.py index 7497d79f4234..a0acd38f8411 100644 --- a/csharp/ql/src/Stubs/make_stubs_nuget.py +++ b/csharp/ql/src/Stubs/make_stubs_nuget.py @@ -111,7 +111,7 @@ def write_csproj_prefix(ioWrapper): stubsDir = os.path.join(outputDir, stubsDirName) os.makedirs(stubsDir) -frameworksDirName = 'frameworks' +frameworksDirName = '_frameworks' frameworksDir = os.path.join(stubsDir, frameworksDirName) frameworks = set() diff --git a/csharp/ql/test/query-tests/Stubs/References/Test.cs b/csharp/ql/test/query-tests/Stubs/References/Test.cs index 5a1a4b548fa9..616d6e1ee8db 100644 --- a/csharp/ql/test/query-tests/Stubs/References/Test.cs +++ b/csharp/ql/test/query-tests/Stubs/References/Test.cs @@ -1,4 +1,4 @@ -// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj +// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj // semmle-extractor-options: /nostdlib // semmle-extractor-options: /noconfig diff --git a/csharp/ql/test/query-tests/Stubs/References/files.expected b/csharp/ql/test/query-tests/Stubs/References/files.expected index af75fc41f1e9..f1d3e948d8df 100644 --- a/csharp/ql/test/query-tests/Stubs/References/files.expected +++ b/csharp/ql/test/query-tests/Stubs/References/files.expected @@ -1,233 +1,233 @@ -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs | -| ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs | -| ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs:0:0:0:0 | ../../../resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs | +| ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Console.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Console.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Ping.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Ping.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Security.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Security.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Claims.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Claims.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs | +| ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs:0:0:0:0 | ../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs | | Test.cs:0:0:0:0 | Test.cs | diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.Policy.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Authorization.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Server.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Connections.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.CookiePolicy.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cryptography.KeyDerivation.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.Extensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.DataProtection.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.HealthChecks.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Diagnostics.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HostFiltering.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Server.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.Common.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Connections.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Features.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpOverrides.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.HttpsPolicy.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Identity.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.Routing.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Localization.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Metadata.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ApiExplorer.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Cors.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Formatters.Xml.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Localization.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.TagHelpers.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCaching.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.ResponseCompression.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Rewrite.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.HttpSys.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IIS.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.IISIntegration.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Server.Kestrel.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Session.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Common.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Protocols.Json.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.StaticFiles.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebSockets.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.WebUtilities.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Caching.Memory.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Binder.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.CommandLine.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.EnvironmentVariables.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.FileExtensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Ini.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Json.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.KeyPerFile.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Xml.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Diagnostics.HealthChecks.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Composite.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Embedded.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileProviders.Physical.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Hosting.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Http.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Stores.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Configuration.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Console.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Debug.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventLog.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.TraceSource.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.ObjectPool.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.ConfigurationExtensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.DataAnnotations.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Options.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.WebEncoders.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Net.Http.Headers.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Win32.Registry.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Diagnostics.EventLog.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.IO.Pipelines.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Cng.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Cryptography.Xml.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Permissions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.Principal.Windows.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Windows.Extensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.CSharp.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.Win32.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Concurrent.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.NonGeneric.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Collections.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.EventBasedAsync.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ComponentModel.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Console.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Console.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Console.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Data.Common.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.FileVersionInfo.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.StackTrace.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TextWriterTraceListener.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Drawing.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.Brotli.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.ZipFile.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Compression.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Compression.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.DriveInfo.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.Watcher.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.IsolatedStorage.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.MemoryMappedFiles.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.Pipes.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Parallel.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Queryable.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Linq.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Memory.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.Json.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Http.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Http.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Mail.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NameResolution.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.NetworkInformation.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Ping.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Ping.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Ping.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Requests.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Security.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Security.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Security.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.ServicePoint.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Sockets.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebClient.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebHeaderCollection.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebProxy.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.Client.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.WebSockets.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Numerics.Vectors.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.ObjectModel.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.DispatchProxy.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.ILGeneration.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.Lightweight.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Emit.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.TypeExtensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Resources.Writer.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.Unsafe.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.RuntimeInformation.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Numerics.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Formatters.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Json.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Xml.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Runtime.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Claims.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Claims.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Claims.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Csp.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Encoding.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Primitives.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.CodePages.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encoding.Extensions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Encodings.Web.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.Json.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Channels.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Overlapped.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Dataflow.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Tasks.Parallel.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.Thread.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.ThreadPool.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Threading.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Threading.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Transactions.Local.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Web.HttpUtility.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XDocument.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.XDocument.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XPath.cs diff --git a/csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs similarity index 100% rename from csharp/ql/test/resources/stubs/frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs rename to csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs From 9ba1529f193594afc9bf1d77cce638f8a81e8e49 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 23 Jun 2021 09:38:29 +0200 Subject: [PATCH 1577/1662] Fix nested class names in comments of stubs expected test file --- csharp/ql/test/query-tests/Stubs/All/AllStubs.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected index 4c6f0df14138..05b680907480 100644 --- a/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected +++ b/csharp/ql/test/query-tests/Stubs/All/AllStubs.expected @@ -1 +1 @@ -| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:146:18:146:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C1\n{\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:153:22:153:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C2\n{\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:159:18:159:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C3\n{\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:169:18:169:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C4\n{\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:166:22:166:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class D4\n{\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:5:18:5:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class1\n{\n// Generated from `Test.Class1.Class11` in `Test.cs:34:22:34:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1.Class12` in `Test.cs:51:22:51:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class12 : Test.Class1.Class11\n{\n}\n\n\n// Generated from `Test.Class1.Class13` in `Test.cs:63:31:63:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class13\n{\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1.Class14` in `Test.cs:70:31:70:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1.Delegate1<>` in `Test.cs:47:30:47:41; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1.GenericType<>` in `Test.cs:56:22:56:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class GenericType\n{\n// Generated from `Test.Class1.GenericType<>.X` in `Test.cs:58:26:58:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class X\n{\n}\n\n\n}\n\n\n// Generated from `Test.Class1.Interface1` in `Test.cs:18:26:18:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1.Interface2` in `Test.cs:23:38:23:47; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1.Struct1` in `Test.cs:7:23:7:29; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n public int i;\n public static int j = default;\n public System.ValueTuple t1;\n public (int,int) t2;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:84:18:84:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class3\n{\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:91:18:91:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class4\n{\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:102:18:102:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class5 : Test.IInterface1\n{\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:107:18:107:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class6 where T: class, Test.IInterface1\n{\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:114:18:114:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class7 : Test.Class6\n{\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:121:18:121:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class8\n{\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:126:18:126:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class9\n{\n// Generated from `Test.Class9.Nested` in `Test.cs:130:22:130:27; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Nested : Test.Class9\n{\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:96:22:96:32; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | +| // This file contains auto-generated code.\n\nnamespace A1\n{\n// Generated from `A1.C1` in `Test.cs:146:18:146:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C1\n{\n}\n\n}\nnamespace A2\n{\nnamespace B2\n{\n// Generated from `A2.B2.C2` in `Test.cs:153:22:153:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C2\n{\n}\n\n}\n}\nnamespace A3\n{\n// Generated from `A3.C3` in `Test.cs:159:18:159:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C3\n{\n}\n\n}\nnamespace A4\n{\n// Generated from `A4.C4` in `Test.cs:169:18:169:19; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class C4\n{\n}\n\nnamespace B4\n{\n// Generated from `A4.B4.D4` in `Test.cs:166:22:166:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class D4\n{\n}\n\n}\n}\nnamespace Test\n{\n// Generated from `Test.Class1` in `Test.cs:5:18:5:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class1\n{\n// Generated from `Test.Class1+Class11` in `Test.cs:34:22:34:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class11 : Test.Class1.Interface2, Test.Class1.Interface1\n{\n int Test.Class1.Interface2.this[int i] { get => throw null; }\n public void Method1() => throw null;\n void Test.Class1.Interface2.Method2() => throw null;\n}\n\n\n// Generated from `Test.Class1+Class12` in `Test.cs:51:22:51:28; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class12 : Test.Class1.Class11\n{\n}\n\n\n// Generated from `Test.Class1+Class13` in `Test.cs:63:31:63:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class13\n{\n protected internal virtual void M() => throw null;\n public virtual void M1() where T: Test.Class1.Class13 => throw null;\n public abstract void M2();\n}\n\n\n// Generated from `Test.Class1+Class14` in `Test.cs:70:31:70:37; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic abstract class Class14 : Test.Class1.Class13\n{\n protected internal override void M() => throw null;\n public override void M1() => throw null;\n public abstract override void M2();\n}\n\n\n// Generated from `Test.Class1+Delegate1<>` in `Test.cs:47:30:47:41; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic delegate void Delegate1(T i, int j);\n\n\n public event Test.Class1.Delegate1 Event1;\n// Generated from `Test.Class1+GenericType<>` in `Test.cs:56:22:56:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class GenericType\n{\n// Generated from `Test.Class1+GenericType<>+X` in `Test.cs:58:26:58:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class X\n{\n}\n\n\n}\n\n\n// Generated from `Test.Class1+Interface1` in `Test.cs:18:26:18:35; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface Interface1\n{\n void Method1();\n}\n\n\n// Generated from `Test.Class1+Interface2` in `Test.cs:23:38:23:47; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\nprotected internal interface Interface2\n{\n int this[int i] { get; }\n void Method2();\n}\n\n\n public Test.Class1.GenericType.X Prop { get => throw null; }\n// Generated from `Test.Class1+Struct1` in `Test.cs:7:23:7:29; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic struct Struct1\n{\n public void Method(Test.Class1.Struct1 s = default(Test.Class1.Struct1)) => throw null;\n public int i;\n public static int j = default;\n public System.ValueTuple t1;\n public (int,int) t2;\n}\n\n\n}\n\n// Generated from `Test.Class3` in `Test.cs:84:18:84:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class3\n{\n public object Item { get => throw null; set => throw null; }\n [System.Runtime.CompilerServices.IndexerName("MyItem")]\n public object this[string index] { get => throw null; set => throw null; }\n}\n\n// Generated from `Test.Class4` in `Test.cs:91:18:91:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class4\n{\n unsafe public void M(int* p) => throw null;\n}\n\n// Generated from `Test.Class5` in `Test.cs:102:18:102:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class5 : Test.IInterface1\n{\n public void M2() => throw null;\n}\n\n// Generated from `Test.Class6<>` in `Test.cs:107:18:107:26; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class6 where T: class, Test.IInterface1\n{\n public virtual void M1() where T: class, Test.IInterface1, new() => throw null;\n}\n\n// Generated from `Test.Class7` in `Test.cs:114:18:114:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class7 : Test.Class6\n{\n public override void M1() where T: class => throw null;\n}\n\n// Generated from `Test.Class8` in `Test.cs:121:18:121:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class8\n{\n public static int @this = default;\n}\n\n// Generated from `Test.Class9` in `Test.cs:126:18:126:23; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Class9\n{\n// Generated from `Test.Class9+Nested` in `Test.cs:130:22:130:27; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic class Nested : Test.Class9\n{\n}\n\n\n public Test.Class9.Nested NestedInstance { get => throw null; }\n}\n\n// Generated from `Test.IInterface1` in `Test.cs:96:22:96:32; Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null`\npublic interface IInterface1\n{\n void M1() => throw null;\n void M2();\n}\n\n}\n\n\n | From 133d7606592fef51e6e0abc1fec3735838884ce4 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 23 Jun 2021 09:53:39 +0200 Subject: [PATCH 1578/1662] Regenerate stubs to update nested class names in comments --- .../Microsoft.AspNetCore.Components.cs | 2 +- .../Microsoft.AspNetCore.Http.Abstractions.cs | 4 +- .../Microsoft.AspNetCore.Http.cs | 6 +- .../Microsoft.AspNetCore.Mvc.Abstractions.cs | 14 ++--- .../Microsoft.AspNetCore.Mvc.Core.cs | 6 +- .../Microsoft.AspNetCore.Mvc.ViewFeatures.cs | 2 +- ...crosoft.AspNetCore.Routing.Abstractions.cs | 2 +- .../Microsoft.AspNetCore.SignalR.Core.cs | 2 +- ...Microsoft.Extensions.FileSystemGlobbing.cs | 4 +- ...icrosoft.Extensions.Logging.EventSource.cs | 2 +- .../Microsoft.Extensions.Primitives.cs | 4 +- .../System.Security.AccessControl.cs | 2 +- .../Microsoft.VisualBasic.Core.cs | 2 +- .../System.Collections.Immutable.cs | 28 ++++----- .../System.Collections.Specialized.cs | 4 +- .../System.Collections.cs | 32 +++++----- .../System.ComponentModel.TypeConverter.cs | 6 +- .../System.Diagnostics.DiagnosticSource.cs | 2 +- .../System.Diagnostics.Tracing.cs | 2 +- .../System.Formats.Asn1.cs | 2 +- .../System.IO.FileSystem.cs | 4 +- .../Microsoft.NETCore.App/System.Memory.cs | 2 +- .../System.Net.HttpListener.cs | 2 +- .../Microsoft.NETCore.App/System.Net.Mail.cs | 6 +- .../System.Net.Requests.cs | 6 +- .../System.ObjectModel.cs | 4 +- .../System.Reflection.Metadata.cs | 62 +++++++++---------- .../System.Runtime.InteropServices.cs | 8 +-- .../System.Runtime.Intrinsics.cs | 48 +++++++------- .../System.Runtime.Loader.cs | 2 +- .../Microsoft.NETCore.App/System.Runtime.cs | 41 ++++++------ ...System.Security.Cryptography.Algorithms.cs | 4 +- ....Security.Cryptography.X509Certificates.cs | 2 +- .../Microsoft.NETCore.App/System.Text.Json.cs | 4 +- .../System.Xml.ReaderWriter.cs | 2 +- .../System.Xml.XmlSerializer.cs | 4 +- 36 files changed, 162 insertions(+), 167 deletions(-) diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs index 0625b781e4ec..cf18277a5efb 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs @@ -388,7 +388,7 @@ public struct ParameterValue public struct ParameterView { public static Microsoft.AspNetCore.Components.ParameterView Empty { get => throw null; } - // Generated from `Microsoft.AspNetCore.Components.ParameterView.Enumerator` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Components.ParameterView+Enumerator` in `Microsoft.AspNetCore.Components, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator { public Microsoft.AspNetCore.Components.ParameterValue Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs index 2098027ba782..2d03d06a3e03 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs @@ -204,7 +204,7 @@ public class EndpointMetadataCollection : System.Collections.IEnumerable, System public static Microsoft.AspNetCore.Http.EndpointMetadataCollection Empty; public EndpointMetadataCollection(params object[] items) => throw null; public EndpointMetadataCollection(System.Collections.Generic.IEnumerable items) => throw null; - // Generated from `Microsoft.AspNetCore.Http.EndpointMetadataCollection.Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Http.EndpointMetadataCollection+Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public object Current { get => throw null; } @@ -602,7 +602,7 @@ public class RouteValueDictionary : System.Collections.IEnumerable, System.Colle public bool ContainsKey(string key) => throw null; void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } - // Generated from `Microsoft.AspNetCore.Routing.RouteValueDictionary.Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Routing.RouteValueDictionary+Enumerator` in `Microsoft.AspNetCore.Http.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs index b07116c946ec..e1ac5d557ae6 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.cs @@ -68,7 +68,7 @@ public class FormCollection : System.Collections.IEnumerable, System.Collections public bool ContainsKey(string key) => throw null; public int Count { get => throw null; } public static Microsoft.AspNetCore.Http.FormCollection Empty; - // Generated from `Microsoft.AspNetCore.Http.FormCollection.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Http.FormCollection+Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -125,7 +125,7 @@ public class HeaderDictionary : System.Collections.IEnumerable, System.Collectio public System.Int64? ContentLength { get => throw null; set => throw null; } public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } - // Generated from `Microsoft.AspNetCore.Http.HeaderDictionary.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Http.HeaderDictionary+Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -194,7 +194,7 @@ public class QueryCollection : System.Collections.IEnumerable, System.Collection public bool ContainsKey(string key) => throw null; public int Count { get => throw null; } public static Microsoft.AspNetCore.Http.QueryCollection Empty; - // Generated from `Microsoft.AspNetCore.Http.QueryCollection.Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Http.QueryCollection+Enumerator` in `Microsoft.AspNetCore.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs index 8bd3fb00a966..c6fae81ab183 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Abstractions.cs @@ -759,7 +759,7 @@ public abstract class ModelBindingContext public abstract string ModelName { get; set; } public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get; set; } public virtual System.Type ModelType { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.NestedScope` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext+NestedScope` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct NestedScope : System.IDisposable { public void Dispose() => throw null; @@ -907,7 +907,7 @@ public class ModelStateDictionary : System.Collections.IEnumerable, System.Colle public bool ContainsKey(string key) => throw null; public int Count { get => throw null; } public static int DefaultMaxAllowedErrors; - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+Enumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -930,7 +930,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S public bool HasReachedMaxErrors { get => throw null; } public bool IsValid { get => throw null; } public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry this[string key] { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+KeyEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct KeyEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable { public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator GetEnumerator() => throw null; @@ -941,7 +941,7 @@ public struct KeyEnumerable : System.Collections.IEnumerable, System.Collections } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.KeyEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+KeyEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct KeyEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public string Current { get => throw null; } @@ -963,7 +963,7 @@ public struct KeyEnumerator : System.IDisposable, System.Collections.IEnumerator public ModelStateDictionary(int maxAllowedErrors) => throw null; public ModelStateDictionary(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary dictionary) => throw null; public ModelStateDictionary() => throw null; - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.PrefixEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+PrefixEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct PrefixEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable> { public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Enumerator GetEnumerator() => throw null; @@ -984,7 +984,7 @@ public struct PrefixEnumerable : System.Collections.IEnumerable, System.Collecti public bool TryAddModelException(string key, System.Exception exception) => throw null; public bool TryGetValue(string key, out Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry value) => throw null; public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState ValidationState { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+ValueEnumerable` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct ValueEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable { public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerator GetEnumerator() => throw null; @@ -995,7 +995,7 @@ public struct ValueEnumerable : System.Collections.IEnumerable, System.Collectio } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.ValueEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary+ValueEnumerator` in `Microsoft.AspNetCore.Mvc.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct ValueEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs index 44593ef425b9..bd4671c23cf5 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs @@ -2182,7 +2182,7 @@ public abstract class EventData : System.Collections.IEnumerable, System.Collect { protected abstract int Count { get; } int System.Collections.Generic.IReadOnlyCollection>.Count { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.EventData.Enumerator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.Diagnostics.EventData+Enumerator` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -2691,7 +2691,7 @@ public abstract class OutputFormatterSelector public class PhysicalFileResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructure.FileResultExecutorBase, Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultExecutor { public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.PhysicalFileResult result) => throw null; - // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor.FileMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.Infrastructure.PhysicalFileResultExecutor+FileMetadata` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` protected class FileMetadata { public bool Exists { get => throw null; set => throw null; } @@ -3723,7 +3723,7 @@ public class ValidationVisitor protected Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider MetadataProvider { get => throw null; } protected object Model { get => throw null; set => throw null; } protected Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary ModelState { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.StateManager` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor+StateManager` in `Microsoft.AspNetCore.Mvc.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` protected struct StateManager : System.IDisposable { public void Dispose() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs index 0daca7740b72..08c549efa6aa 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs @@ -1043,7 +1043,7 @@ public class AttributeDictionary : System.Collections.IEnumerable, System.Collec public bool ContainsKey(string key) => throw null; public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } - // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary.Enumerator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Mvc.ViewFeatures.AttributeDictionary+Enumerator` in `Microsoft.AspNetCore.Mvc.ViewFeatures, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs index cb910d9aa2fe..990c0bba646d 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.Abstractions.cs @@ -78,7 +78,7 @@ public class RouteData public RouteData(Microsoft.AspNetCore.Routing.RouteValueDictionary values) => throw null; public RouteData(Microsoft.AspNetCore.Routing.RouteData other) => throw null; public RouteData() => throw null; - // Generated from `Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.Routing.RouteData+RouteDataSnapshot` in `Microsoft.AspNetCore.Routing.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct RouteDataSnapshot { public void Restore() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs index d2803a95fe8a..5182626beb7d 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs @@ -195,7 +195,7 @@ public class HubConnectionStore { public void Add(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) => throw null; public int Count { get => throw null; } - // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionStore.Enumerator` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.AspNetCore.SignalR.HubConnectionStore+Enumerator` in `Microsoft.AspNetCore.SignalR.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public Microsoft.AspNetCore.SignalR.HubConnectionContext Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs index 735adebf356b..11da37799344 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.FileSystemGlobbing.cs @@ -237,7 +237,7 @@ public abstract class PatternContext : Microsoft.Extensions.FileSystemGl public abstract class PatternContextLinear : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContext { protected string CalculateStem(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase matchedFile) => throw null; - // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear.FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextLinear+FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct FrameData { // Stub generator skipped constructor @@ -276,7 +276,7 @@ public class PatternContextLinearInclude : Microsoft.Extensions.FileSystemGlobbi public abstract class PatternContextRagged : Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContext { protected string CalculateStem(Microsoft.Extensions.FileSystemGlobbing.Abstractions.FileInfoBase matchedFile) => throw null; - // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged.FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.Extensions.FileSystemGlobbing.Internal.PatternContexts.PatternContextRagged+FrameData` in `Microsoft.Extensions.FileSystemGlobbing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct FrameData { public int BacktrackAvailable; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs index aeb96d57b5a3..54da58dd585c 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.EventSource.cs @@ -25,7 +25,7 @@ public class EventSourceLoggerProvider : System.IDisposable, Microsoft.Extension // Generated from `Microsoft.Extensions.Logging.EventSource.LoggingEventSource` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public class LoggingEventSource : System.Diagnostics.Tracing.EventSource { - // Generated from `Microsoft.Extensions.Logging.EventSource.LoggingEventSource.Keywords` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.Extensions.Logging.EventSource.LoggingEventSource+Keywords` in `Microsoft.Extensions.Logging.EventSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public static class Keywords { public const System.Diagnostics.Tracing.EventKeywords FormattedMessage = default; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs index 3fc940b844e7..669c9934ad43 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Primitives.cs @@ -108,7 +108,7 @@ public class StringSegmentComparer : System.Collections.Generic.IEqualityCompare // Generated from `Microsoft.Extensions.Primitives.StringTokenizer` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct StringTokenizer : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable { - // Generated from `Microsoft.Extensions.Primitives.StringTokenizer.Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.Extensions.Primitives.StringTokenizer+Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public Microsoft.Extensions.Primitives.StringSegment Current { get => throw null; } @@ -155,7 +155,7 @@ public struct StringValues : System.IEquatable, System.IEquatable.CopyTo(string[] array, int arrayIndex) => throw null; public int Count { get => throw null; } public static Microsoft.Extensions.Primitives.StringValues Empty; - // Generated from `Microsoft.Extensions.Primitives.StringValues.Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` + // Generated from `Microsoft.Extensions.Primitives.StringValues+Enumerator` in `Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public string Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs index 1a7d2e075f88..f9e76db5298a 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/System.Security.AccessControl.cs @@ -421,7 +421,7 @@ public abstract class KnownAce : System.Security.AccessControl.GenericAce // Generated from `System.Security.AccessControl.NativeObjectSecurity` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public abstract class NativeObjectSecurity : System.Security.AccessControl.CommonObjectSecurity { - // Generated from `System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Security.AccessControl.NativeObjectSecurity+ExceptionFromErrorCode` in `System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected internal delegate System.Exception ExceptionFromErrorCode(int errorCode, string name, System.Runtime.InteropServices.SafeHandle handle, object context); diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs index c6828c9648ff..1eadc534ea88 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs @@ -931,7 +931,7 @@ public class NewLateBinding public class ObjectFlowControl { public static void CheckForSyncLockOnValueType(object Expression) => throw null; - // Generated from `Microsoft.VisualBasic.CompilerServices.ObjectFlowControl.ForLoopControl` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `Microsoft.VisualBasic.CompilerServices.ObjectFlowControl+ForLoopControl` in `Microsoft.VisualBasic.Core, Version=10.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class ForLoopControl { public static bool ForLoopInitObj(object Counter, object Start, object Limit, object StepValue, ref object LoopForResult, ref object CounterResult) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs index 7bdc9c57e3ee..2fb1159df212 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Immutable.cs @@ -122,7 +122,7 @@ public struct ImmutableArray : System.IEquatable As() where TOther : class => throw null; public System.ReadOnlyMemory AsMemory() => throw null; public System.ReadOnlySpan AsSpan() => throw null; - // Generated from `System.Collections.Immutable.ImmutableArray<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableArray<>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { public void Add(T item) => throw null; @@ -185,7 +185,7 @@ public class Builder : System.Collections.IEnumerable, System.Collections.Generi int System.Collections.Generic.IReadOnlyCollection.Count { get => throw null; } int System.Collections.Generic.ICollection.Count { get => throw null; } public static System.Collections.Immutable.ImmutableArray Empty; - // Generated from `System.Collections.Immutable.ImmutableArray<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableArray<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } @@ -301,7 +301,7 @@ public class ImmutableDictionary : System.Collections.Immutable.II System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Add(TKey key, TValue value) => throw null; public System.Collections.Immutable.ImmutableDictionary AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; - // Generated from `System.Collections.Immutable.ImmutableDictionary<,>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableDictionary<,>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> { void System.Collections.IDictionary.Add(object key, object value) => throw null; @@ -359,7 +359,7 @@ public class Builder : System.Collections.IEnumerable, System.Collections.IDicti void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } public static System.Collections.Immutable.ImmutableDictionary Empty; - // Generated from `System.Collections.Immutable.ImmutableDictionary<,>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableDictionary<,>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -435,7 +435,7 @@ public class ImmutableHashSet : System.Collections.Immutable.IImmutableSet public System.Collections.Immutable.ImmutableHashSet Add(T item) => throw null; bool System.Collections.Generic.ISet.Add(T item) => throw null; System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Add(T item) => throw null; - // Generated from `System.Collections.Immutable.ImmutableHashSet<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableHashSet<>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(T item) => throw null; @@ -473,7 +473,7 @@ public class Builder : System.Collections.IEnumerable, System.Collections.Generi void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; public int Count { get => throw null; } public static System.Collections.Immutable.ImmutableHashSet Empty; - // Generated from `System.Collections.Immutable.ImmutableHashSet<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableHashSet<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -578,7 +578,7 @@ public class ImmutableList : System.Collections.Immutable.IImmutableList, public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer comparer) => throw null; public int BinarySearch(T item, System.Collections.Generic.IComparer comparer) => throw null; public int BinarySearch(T item) => throw null; - // Generated from `System.Collections.Immutable.ImmutableList<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableList<>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { public void Add(T item) => throw null; @@ -660,7 +660,7 @@ public class Builder : System.Collections.IList, System.Collections.IEnumerable, public void CopyTo(T[] array) => throw null; public int Count { get => throw null; } public static System.Collections.Immutable.ImmutableList Empty; - // Generated from `System.Collections.Immutable.ImmutableList<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableList<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -759,7 +759,7 @@ public class ImmutableQueue : System.Collections.Immutable.IImmutableQueue public static System.Collections.Immutable.ImmutableQueue Empty { get => throw null; } public System.Collections.Immutable.ImmutableQueue Enqueue(T value) => throw null; System.Collections.Immutable.IImmutableQueue System.Collections.Immutable.IImmutableQueue.Enqueue(T value) => throw null; - // Generated from `System.Collections.Immutable.ImmutableQueue<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableQueue<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } @@ -807,7 +807,7 @@ public class ImmutableSortedDictionary : System.Collections.Immuta System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.Add(TKey key, TValue value) => throw null; public System.Collections.Immutable.ImmutableSortedDictionary AddRange(System.Collections.Generic.IEnumerable> items) => throw null; System.Collections.Immutable.IImmutableDictionary System.Collections.Immutable.IImmutableDictionary.AddRange(System.Collections.Generic.IEnumerable> pairs) => throw null; - // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> { void System.Collections.IDictionary.Add(object key, object value) => throw null; @@ -866,7 +866,7 @@ public class Builder : System.Collections.IEnumerable, System.Collections.IDicti void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } public static System.Collections.Immutable.ImmutableSortedDictionary Empty; - // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableSortedDictionary<,>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -944,7 +944,7 @@ public class ImmutableSortedSet : System.Collections.Immutable.IImmutableSet< int System.Collections.IList.Add(object value) => throw null; bool System.Collections.Generic.ISet.Add(T item) => throw null; System.Collections.Immutable.IImmutableSet System.Collections.Immutable.IImmutableSet.Add(T value) => throw null; - // Generated from `System.Collections.Immutable.ImmutableSortedSet<>.Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableSortedSet<>+Builder` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class Builder : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(T item) => throw null; @@ -992,7 +992,7 @@ public class Builder : System.Collections.IEnumerable, System.Collections.IColle void System.Collections.Generic.ICollection.CopyTo(T[] array, int arrayIndex) => throw null; public int Count { get => throw null; } public static System.Collections.Immutable.ImmutableSortedSet Empty; - // Generated from `System.Collections.Immutable.ImmutableSortedSet<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableSortedSet<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -1070,7 +1070,7 @@ public class ImmutableStack : System.Collections.Immutable.IImmutableStack public System.Collections.Immutable.ImmutableStack Clear() => throw null; System.Collections.Immutable.IImmutableStack System.Collections.Immutable.IImmutableStack.Clear() => throw null; public static System.Collections.Immutable.ImmutableStack Empty { get => throw null; } - // Generated from `System.Collections.Immutable.ImmutableStack<>.Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Immutable.ImmutableStack<>+Enumerator` in `System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs index 5bdaf60125a3..4daa41a4a18a 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.Specialized.cs @@ -21,7 +21,7 @@ public struct BitVector32 public override int GetHashCode() => throw null; public int this[System.Collections.Specialized.BitVector32.Section section] { get => throw null; set => throw null; } public bool this[int bit] { get => throw null; set => throw null; } - // Generated from `System.Collections.Specialized.BitVector32.Section` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Specialized.BitVector32+Section` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Section { public static bool operator !=(System.Collections.Specialized.BitVector32.Section a, System.Collections.Specialized.BitVector32.Section b) => throw null; @@ -119,7 +119,7 @@ public abstract class NameObjectCollectionBase : System.Runtime.Serialization.IS protected bool IsReadOnly { get => throw null; set => throw null; } bool System.Collections.ICollection.IsSynchronized { get => throw null; } public virtual System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get => throw null; } - // Generated from `System.Collections.Specialized.NameObjectCollectionBase.KeysCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Specialized.NameObjectCollectionBase+KeysCollection` in `System.Collections.Specialized, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class KeysCollection : System.Collections.IEnumerable, System.Collections.ICollection { void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs index 02ecbc46267b..d38139ea15fc 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Collections.cs @@ -86,7 +86,7 @@ public class Dictionary : System.Runtime.Serialization.ISerializab public Dictionary() => throw null; protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; public int EnsureCapacity(int capacity) => throw null; - // Generated from `System.Collections.Generic.Dictionary<,>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Dictionary<,>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IDictionaryEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -112,7 +112,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S bool System.Collections.ICollection.IsSynchronized { get => throw null; } public TValue this[TKey key] { get => throw null; set => throw null; } object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } - // Generated from `System.Collections.Generic.Dictionary<,>.KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Dictionary<,>+KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TKey item) => throw null; @@ -121,7 +121,7 @@ public class KeyCollection : System.Collections.IEnumerable, System.Collections. void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(TKey[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.Dictionary<,>.KeyCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Dictionary<,>+KeyCollection+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public TKey Current { get => throw null; } @@ -158,7 +158,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S public void TrimExcess() => throw null; public bool TryAdd(TKey key, TValue value) => throw null; public bool TryGetValue(TKey key, out TValue value) => throw null; - // Generated from `System.Collections.Generic.Dictionary<,>.ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Dictionary<,>+ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TValue item) => throw null; @@ -167,7 +167,7 @@ public class ValueCollection : System.Collections.IEnumerable, System.Collection void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(TValue[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.Dictionary<,>.ValueCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Dictionary<,>+ValueCollection+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public TValue Current { get => throw null; } @@ -221,7 +221,7 @@ public class HashSet : System.Runtime.Serialization.ISerializable, System.Run public int Count { get => throw null; } public static System.Collections.Generic.IEqualityComparer> CreateSetComparer() => throw null; public int EnsureCapacity(int capacity) => throw null; - // Generated from `System.Collections.Generic.HashSet<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.HashSet<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -279,7 +279,7 @@ public class LinkedList : System.Runtime.Serialization.ISerializable, System. void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(T[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.LinkedList<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.LinkedList<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -345,7 +345,7 @@ public class List : System.Collections.IList, System.Collections.IEnumerable, public void CopyTo(T[] array, int arrayIndex) => throw null; public void CopyTo(T[] array) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.List<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.List<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -418,7 +418,7 @@ public class Queue : System.Collections.IEnumerable, System.Collections.IColl public int Count { get => throw null; } public T Dequeue() => throw null; public void Enqueue(T item) => throw null; - // Generated from `System.Collections.Generic.Queue<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Queue<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -468,7 +468,7 @@ public class SortedDictionary : System.Collections.IEnumerable, Sy void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.SortedDictionary<,>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedDictionary<,>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IDictionaryEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } @@ -493,7 +493,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S bool System.Collections.ICollection.IsSynchronized { get => throw null; } public TValue this[TKey key] { get => throw null; set => throw null; } object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } - // Generated from `System.Collections.Generic.SortedDictionary<,>.KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedDictionary<,>+KeyCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TKey item) => throw null; @@ -502,7 +502,7 @@ public class KeyCollection : System.Collections.IEnumerable, System.Collections. void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(TKey[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.SortedDictionary<,>.KeyCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedDictionary<,>+KeyCollection+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public TKey Current { get => throw null; } @@ -538,7 +538,7 @@ public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, S public SortedDictionary() => throw null; object System.Collections.ICollection.SyncRoot { get => throw null; } public bool TryGetValue(TKey key, out TValue value) => throw null; - // Generated from `System.Collections.Generic.SortedDictionary<,>.ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedDictionary<,>+ValueCollection` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TValue item) => throw null; @@ -547,7 +547,7 @@ public class ValueCollection : System.Collections.IEnumerable, System.Collection void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; public void CopyTo(TValue[] array, int index) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.SortedDictionary<,>.ValueCollection.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedDictionary<,>+ValueCollection+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public TValue Current { get => throw null; } @@ -642,7 +642,7 @@ public class SortedSet : System.Runtime.Serialization.ISerializable, System.R public int Count { get => throw null; } public static System.Collections.Generic.IEqualityComparer> CreateSetComparer(System.Collections.Generic.IEqualityComparer memberEqualityComparer) => throw null; public static System.Collections.Generic.IEqualityComparer> CreateSetComparer() => throw null; - // Generated from `System.Collections.Generic.SortedSet<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.SortedSet<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -698,7 +698,7 @@ public class Stack : System.Collections.IEnumerable, System.Collections.IColl void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; public void CopyTo(T[] array, int arrayIndex) => throw null; public int Count { get => throw null; } - // Generated from `System.Collections.Generic.Stack<>.Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.Generic.Stack<>+Enumerator` in `System.Collections, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs index 00315ed15290..6ab5ae2f5f05 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs @@ -1459,7 +1459,7 @@ public class TypeConverter public bool GetStandardValuesSupported() => throw null; public virtual bool IsValid(System.ComponentModel.ITypeDescriptorContext context, object value) => throw null; public bool IsValid(object value) => throw null; - // Generated from `System.ComponentModel.TypeConverter.SimplePropertyDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.ComponentModel.TypeConverter+SimplePropertyDescriptor` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected abstract class SimplePropertyDescriptor : System.ComponentModel.PropertyDescriptor { public override bool CanResetValue(object component) => throw null; @@ -1474,7 +1474,7 @@ protected abstract class SimplePropertyDescriptor : System.ComponentModel.Proper protected System.ComponentModel.PropertyDescriptorCollection SortProperties(System.ComponentModel.PropertyDescriptorCollection props, string[] names) => throw null; - // Generated from `System.ComponentModel.TypeConverter.StandardValuesCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.ComponentModel.TypeConverter+StandardValuesCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class StandardValuesCollection : System.Collections.IEnumerable, System.Collections.ICollection { public void CopyTo(System.Array array, int index) => throw null; @@ -1748,7 +1748,7 @@ public class DesignerEventArgs : System.EventArgs public abstract class DesignerOptionService : System.ComponentModel.Design.IDesignerOptionService { protected System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection CreateOptionCollection(System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection parent, string name, object value) => throw null; - // Generated from `System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection` in `System.ComponentModel.TypeConverter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class DesignerOptionCollection : System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection { int System.Collections.IList.Add(object value) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs index 8a4bad1dfded..928aaa079745 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.DiagnosticSource.cs @@ -195,7 +195,7 @@ public class ActivityTagsCollection : System.Collections.IEnumerable, System.Col public bool ContainsKey(string key) => throw null; public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; public int Count { get => throw null; } - // Generated from `System.Diagnostics.ActivityTagsCollection.Enumerator` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Diagnostics.ActivityTagsCollection+Enumerator` in `System.Diagnostics.DiagnosticSource, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator> { public System.Collections.Generic.KeyValuePair Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs index 07722cc9af3a..bb18403be983 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs @@ -199,7 +199,7 @@ public class EventSource : System.IDisposable public void Dispose() => throw null; protected virtual void Dispose(bool disposing) => throw null; public event System.EventHandler EventCommandExecuted; - // Generated from `System.Diagnostics.Tracing.EventSource.EventData` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Diagnostics.Tracing.EventSource+EventData` in `System.Diagnostics.Tracing, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected internal struct EventData { public System.IntPtr DataPointer { get => throw null; set => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs index 1ceee09d74d7..e72ad40208e0 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Formats.Asn1.cs @@ -195,7 +195,7 @@ public class AsnWriter public System.Formats.Asn1.AsnWriter.Scope PushSetOf(System.Formats.Asn1.Asn1Tag? tag = default(System.Formats.Asn1.Asn1Tag?)) => throw null; public void Reset() => throw null; public System.Formats.Asn1.AsnEncodingRules RuleSet { get => throw null; } - // Generated from `System.Formats.Asn1.AsnWriter.Scope` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Formats.Asn1.AsnWriter+Scope` in `System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct Scope : System.IDisposable { public void Dispose() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs index aaf1dc5a9810..9311202aecee 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.IO.FileSystem.cs @@ -283,11 +283,11 @@ public struct FileSystemEntry public class FileSystemEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable { public FileSystemEnumerable(string directory, System.IO.Enumeration.FileSystemEnumerable.FindTransform transform, System.IO.EnumerationOptions options = default(System.IO.EnumerationOptions)) => throw null; - // Generated from `System.IO.Enumeration.FileSystemEnumerable<>.FindPredicate` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.IO.Enumeration.FileSystemEnumerable<>+FindPredicate` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public delegate bool FindPredicate(ref System.IO.Enumeration.FileSystemEntry entry); - // Generated from `System.IO.Enumeration.FileSystemEnumerable<>.FindTransform` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.IO.Enumeration.FileSystemEnumerable<>+FindTransform` in `System.IO.FileSystem, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public delegate TResult FindTransform(ref System.IO.Enumeration.FileSystemEntry entry); diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs index f89ad1046a1d..0594c0ce8ae3 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Memory.cs @@ -201,7 +201,7 @@ public struct ReadOnlySequence { public static System.Buffers.ReadOnlySequence Empty; public System.SequencePosition End { get => throw null; } - // Generated from `System.Buffers.ReadOnlySequence<>.Enumerator` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Buffers.ReadOnlySequence<>+Enumerator` in `System.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct Enumerator { public System.ReadOnlyMemory Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs index 4e01cda03e44..8721e7964fa1 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.HttpListener.cs @@ -19,7 +19,7 @@ public class HttpListener : System.IDisposable void System.IDisposable.Dispose() => throw null; public System.Net.HttpListenerContext EndGetContext(System.IAsyncResult asyncResult) => throw null; public System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy ExtendedProtectionPolicy { get => throw null; set => throw null; } - // Generated from `System.Net.HttpListener.ExtendedProtectionSelector` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Net.HttpListener+ExtendedProtectionSelector` in `System.Net.HttpListener, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public delegate System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy ExtendedProtectionSelector(System.Net.HttpListenerRequest request); diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs index 037e9d56e93a..636a3258dab3 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Mail.cs @@ -348,7 +348,7 @@ public static class DispositionTypeNames // Generated from `System.Net.Mime.MediaTypeNames` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public static class MediaTypeNames { - // Generated from `System.Net.Mime.MediaTypeNames.Application` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Net.Mime.MediaTypeNames+Application` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public static class Application { public const string Json = default; @@ -361,7 +361,7 @@ public static class Application } - // Generated from `System.Net.Mime.MediaTypeNames.Image` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Net.Mime.MediaTypeNames+Image` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public static class Image { public const string Gif = default; @@ -370,7 +370,7 @@ public static class Image } - // Generated from `System.Net.Mime.MediaTypeNames.Text` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Net.Mime.MediaTypeNames+Text` in `System.Net.Mail, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public static class Text { public const string Html = default; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs index 02e311957e78..ab23e1cf2a38 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Net.Requests.cs @@ -390,7 +390,7 @@ public abstract class WebRequest : System.MarshalByRefObject, System.Runtime.Ser // Generated from `System.Net.WebRequestMethods` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public static class WebRequestMethods { - // Generated from `System.Net.WebRequestMethods.File` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Net.WebRequestMethods+File` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public static class File { public const string DownloadFile = default; @@ -398,7 +398,7 @@ public static class File } - // Generated from `System.Net.WebRequestMethods.Ftp` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Net.WebRequestMethods+Ftp` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public static class Ftp { public const string AppendFile = default; @@ -417,7 +417,7 @@ public static class Ftp } - // Generated from `System.Net.WebRequestMethods.Http` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Net.WebRequestMethods+Http` in `System.Net.Requests, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public static class Http { public const string Connect = default; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs index 97a251797d6c..4dc775601fdd 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs @@ -72,7 +72,7 @@ public class ReadOnlyDictionary : System.Collections.IEnumerable, public TValue this[TKey key] { get => throw null; } object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } TValue System.Collections.Generic.IDictionary.this[TKey key] { get => throw null; set => throw null; } - // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>.KeyCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class KeyCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TKey item) => throw null; @@ -100,7 +100,7 @@ public class KeyCollection : System.Collections.IEnumerable, System.Collections. bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; object System.Collections.ICollection.SyncRoot { get => throw null; } public bool TryGetValue(TKey key, out TValue value) => throw null; - // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>.ValueCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection` in `System.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class ValueCollection : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection { void System.Collections.Generic.ICollection.Add(TValue item) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs index c4bf2cd15613..69f474e9c630 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Reflection.Metadata.cs @@ -162,7 +162,7 @@ public struct AssemblyFileHandleCollection : System.Collections.IEnumerable, Sys { // Stub generator skipped constructor public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.AssemblyFileHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.AssemblyFileHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.AssemblyFileHandle Current { get => throw null; } @@ -214,7 +214,7 @@ public struct AssemblyReferenceHandleCollection : System.Collections.IEnumerable { // Stub generator skipped constructor public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.AssemblyReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.AssemblyReferenceHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.AssemblyReferenceHandle Current { get => throw null; } @@ -246,7 +246,7 @@ public class BlobBuilder public void Align(int alignment) => throw null; protected virtual System.Reflection.Metadata.BlobBuilder AllocateChunk(int minimalSize) => throw null; public BlobBuilder(int capacity = default(int)) => throw null; - // Generated from `System.Reflection.Metadata.BlobBuilder.Blobs` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.BlobBuilder+Blobs` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Blobs : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable { // Stub generator skipped constructor @@ -528,7 +528,7 @@ public struct CustomAttributeHandleCollection : System.Collections.IEnumerable, { public int Count { get => throw null; } // Stub generator skipped constructor - // Generated from `System.Reflection.Metadata.CustomAttributeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.CustomAttributeHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.CustomAttributeHandle Current { get => throw null; } @@ -611,7 +611,7 @@ public struct CustomDebugInformationHandleCollection : System.Collections.IEnume { public int Count { get => throw null; } // Stub generator skipped constructor - // Generated from `System.Reflection.Metadata.CustomDebugInformationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.CustomDebugInformationHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.CustomDebugInformationHandle Current { get => throw null; } @@ -666,7 +666,7 @@ public struct DeclarativeSecurityAttributeHandleCollection : System.Collections. { public int Count { get => throw null; } // Stub generator skipped constructor - // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.DeclarativeSecurityAttributeHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.DeclarativeSecurityAttributeHandle Current { get => throw null; } @@ -714,7 +714,7 @@ public struct DocumentHandleCollection : System.Collections.IEnumerable, System. { public int Count { get => throw null; } // Stub generator skipped constructor - // Generated from `System.Reflection.Metadata.DocumentHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.DocumentHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.DocumentHandle Current { get => throw null; } @@ -803,7 +803,7 @@ public struct EventDefinitionHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.EventDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.EventDefinitionHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.EventDefinitionHandle Current { get => throw null; } @@ -876,7 +876,7 @@ public struct ExportedTypeHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.ExportedTypeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.ExportedTypeHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.ExportedTypeHandle Current { get => throw null; } @@ -930,7 +930,7 @@ public struct FieldDefinitionHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.FieldDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.FieldDefinitionHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.FieldDefinitionHandle Current { get => throw null; } @@ -989,7 +989,7 @@ public struct GenericParameterConstraintHandle : System.IEquatable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.GenericParameterConstraintHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.GenericParameterConstraintHandle Current { get => throw null; } @@ -1028,7 +1028,7 @@ public struct GenericParameterHandle : System.IEquatable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.GenericParameterHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.GenericParameterHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.GenericParameterHandle Current { get => throw null; } @@ -1428,7 +1428,7 @@ public struct ImportDefinition // Generated from `System.Reflection.Metadata.ImportDefinitionCollection` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ImportDefinitionCollection : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable { - // Generated from `System.Reflection.Metadata.ImportDefinitionCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.ImportDefinitionCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.ImportDefinition Current { get => throw null; } @@ -1473,7 +1473,7 @@ public struct ImportScope public struct ImportScopeCollection : System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.ImportScopeCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.ImportScopeCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.ImportScopeHandle Current { get => throw null; } @@ -1535,7 +1535,7 @@ public struct InterfaceImplementationHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.InterfaceImplementationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.InterfaceImplementationHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.InterfaceImplementationHandle Current { get => throw null; } @@ -1581,7 +1581,7 @@ public struct LocalConstantHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.LocalConstantHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.LocalConstantHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.LocalConstantHandle Current { get => throw null; } @@ -1632,7 +1632,7 @@ public struct LocalScopeHandle : System.IEquatable, System.Collections.Generic.IEnumerable { - // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection.ChildrenEnumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection+ChildrenEnumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ChildrenEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { // Stub generator skipped constructor @@ -1645,7 +1645,7 @@ public struct ChildrenEnumerator : System.IDisposable, System.Collections.IEnume public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.LocalScopeHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.LocalScopeHandle Current { get => throw null; } @@ -1700,7 +1700,7 @@ public struct LocalVariableHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.LocalVariableHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.LocalVariableHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.LocalVariableHandle Current { get => throw null; } @@ -1749,7 +1749,7 @@ public struct ManifestResourceHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.ManifestResourceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.ManifestResourceHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.ManifestResourceHandle Current { get => throw null; } @@ -1800,7 +1800,7 @@ public struct MemberReferenceHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.MemberReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.MemberReferenceHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.MemberReferenceHandle Current { get => throw null; } @@ -2018,7 +2018,7 @@ public struct MethodDebugInformationHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.MethodDebugInformationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.MethodDebugInformationHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.MethodDebugInformationHandle Current { get => throw null; } @@ -2075,7 +2075,7 @@ public struct MethodDefinitionHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.MethodDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.MethodDefinitionHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.MethodDefinitionHandle Current { get => throw null; } @@ -2123,7 +2123,7 @@ public struct MethodImplementationHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.MethodImplementationHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.MethodImplementationHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.MethodImplementationHandle Current { get => throw null; } @@ -2306,7 +2306,7 @@ public struct ParameterHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.ParameterHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.ParameterHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.ParameterHandle Current { get => throw null; } @@ -2407,7 +2407,7 @@ public struct PropertyDefinitionHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.PropertyDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.PropertyDefinitionHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.PropertyDefinitionHandle Current { get => throw null; } @@ -2454,7 +2454,7 @@ public struct SequencePoint : System.IEquatable { - // Generated from `System.Reflection.Metadata.SequencePointCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.SequencePointCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.SequencePoint Current { get => throw null; } @@ -2686,7 +2686,7 @@ public struct TypeDefinitionHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.TypeDefinitionHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.TypeDefinitionHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.TypeDefinitionHandle Current { get => throw null; } @@ -2743,7 +2743,7 @@ public struct TypeReferenceHandle : System.IEquatable, System.Collections.Generic.IEnumerable { public int Count { get => throw null; } - // Generated from `System.Reflection.Metadata.TypeReferenceHandleCollection.Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.TypeReferenceHandleCollection+Enumerator` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public System.Reflection.Metadata.TypeReferenceHandle Current { get => throw null; } @@ -3265,7 +3265,7 @@ public struct MethodBodyStreamEncoder public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody(int codeSize, int maxStack, int exceptionRegionCount, bool hasSmallExceptionRegions, System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature, System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes) => throw null; public System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody AddMethodBody(int codeSize, int maxStack = default(int), int exceptionRegionCount = default(int), bool hasSmallExceptionRegions = default(bool), System.Reflection.Metadata.StandaloneSignatureHandle localVariablesSignature = default(System.Reflection.Metadata.StandaloneSignatureHandle), System.Reflection.Metadata.Ecma335.MethodBodyAttributes attributes = default(System.Reflection.Metadata.Ecma335.MethodBodyAttributes), bool hasDynamicStackAllocation = default(bool)) => throw null; public System.Reflection.Metadata.BlobBuilder Builder { get => throw null; } - // Generated from `System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder.MethodBody` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.Metadata.Ecma335.MethodBodyStreamEncoder+MethodBody` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct MethodBody { public System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder ExceptionRegions { get => throw null; } @@ -3693,7 +3693,7 @@ public abstract class PEBuilder public System.Func, System.Reflection.Metadata.BlobContentId> IdProvider { get => throw null; } public bool IsDeterministic { get => throw null; } protected PEBuilder(System.Reflection.PortableExecutable.PEHeaderBuilder header, System.Func, System.Reflection.Metadata.BlobContentId> deterministicIdProvider) => throw null; - // Generated from `System.Reflection.PortableExecutable.PEBuilder.Section` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Reflection.PortableExecutable.PEBuilder+Section` in `System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected struct Section { public System.Reflection.PortableExecutable.SectionCharacteristics Characteristics; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs index c9029f5758b4..567533a8f143 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs @@ -297,7 +297,7 @@ public class ComUnregisterFunctionAttribute : System.Attribute // Generated from `System.Runtime.InteropServices.ComWrappers` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public abstract class ComWrappers { - // Generated from `System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.InteropServices.ComWrappers+ComInterfaceDispatch` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ComInterfaceDispatch { // Stub generator skipped constructor @@ -306,7 +306,7 @@ public struct ComInterfaceDispatch } - // Generated from `System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.InteropServices.ComWrappers+ComInterfaceEntry` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ComInterfaceEntry { // Stub generator skipped constructor @@ -1164,7 +1164,7 @@ public enum DVASPECT // Generated from `System.Runtime.InteropServices.ComTypes.ELEMDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ELEMDESC { - // Generated from `System.Runtime.InteropServices.ComTypes.ELEMDESC.DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.InteropServices.ComTypes.ELEMDESC+DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct DESCUNION { // Stub generator skipped constructor @@ -1759,7 +1759,7 @@ public struct TYPELIBATTR // Generated from `System.Runtime.InteropServices.ComTypes.VARDESC` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct VARDESC { - // Generated from `System.Runtime.InteropServices.ComTypes.VARDESC.DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.InteropServices.ComTypes.VARDESC+DESCUNION` in `System.Runtime.InteropServices, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct DESCUNION { // Stub generator skipped constructor diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs index 31e91127450f..c2e0fbe5fbc6 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Intrinsics.cs @@ -473,7 +473,7 @@ public abstract class AdvSimd : System.Runtime.Intrinsics.Arm.ArmBase public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 And(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; - // Generated from `System.Runtime.Intrinsics.Arm.AdvSimd.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.AdvSimd+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 { public static System.Runtime.Intrinsics.Vector128 Abs(System.Runtime.Intrinsics.Vector128 value) => throw null; @@ -2479,7 +2479,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Aes` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Aes : System.Runtime.Intrinsics.Arm.ArmBase { - // Generated from `System.Runtime.Intrinsics.Arm.Aes.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Aes+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 { public static bool IsSupported { get => throw null; } @@ -2500,7 +2500,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.ArmBase` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class ArmBase { - // Generated from `System.Runtime.Intrinsics.Arm.ArmBase.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.ArmBase+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 { internal Arm64() => throw null; @@ -2525,7 +2525,7 @@ public abstract class Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Crc32` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Crc32 : System.Runtime.Intrinsics.Arm.ArmBase { - // Generated from `System.Runtime.Intrinsics.Arm.Crc32.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Crc32+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 { public static System.UInt32 ComputeCrc32(System.UInt32 crc, System.UInt64 data) => throw null; @@ -2546,7 +2546,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Dp` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Dp : System.Runtime.Intrinsics.Arm.AdvSimd { - // Generated from `System.Runtime.Intrinsics.Arm.Dp.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Dp+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 { public static bool IsSupported { get => throw null; } @@ -2571,7 +2571,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Rdm` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Rdm : System.Runtime.Intrinsics.Arm.AdvSimd { - // Generated from `System.Runtime.Intrinsics.Arm.Rdm.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Rdm+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 { public static bool IsSupported { get => throw null; } @@ -2620,7 +2620,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.AdvSimd.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Sha1` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Sha1 : System.Runtime.Intrinsics.Arm.ArmBase { - // Generated from `System.Runtime.Intrinsics.Arm.Sha1.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Sha1+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 { public static bool IsSupported { get => throw null; } @@ -2639,7 +2639,7 @@ public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 // Generated from `System.Runtime.Intrinsics.Arm.Sha256` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Sha256 : System.Runtime.Intrinsics.Arm.ArmBase { - // Generated from `System.Runtime.Intrinsics.Arm.Sha256.Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.Arm.Sha256+Arm64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class Arm64 : System.Runtime.Intrinsics.Arm.ArmBase.Arm64 { public static bool IsSupported { get => throw null; } @@ -2666,7 +2666,7 @@ public abstract class Aes : System.Runtime.Intrinsics.X86.Sse2 public static System.Runtime.Intrinsics.Vector128 InverseMixColumns(System.Runtime.Intrinsics.Vector128 value) => throw null; public static bool IsSupported { get => throw null; } public static System.Runtime.Intrinsics.Vector128 KeygenAssist(System.Runtime.Intrinsics.Vector128 value, System.Byte control) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Aes.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Aes+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 { public static bool IsSupported { get => throw null; } @@ -2921,7 +2921,7 @@ public abstract class Avx : System.Runtime.Intrinsics.X86.Sse42 public static System.Runtime.Intrinsics.Vector256 UnpackHigh(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Avx.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Avx+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse42.X64 { public static bool IsSupported { get => throw null; } @@ -3322,7 +3322,7 @@ public abstract class Avx2 : System.Runtime.Intrinsics.X86.Avx public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; public static System.Runtime.Intrinsics.Vector256 UnpackLow(System.Runtime.Intrinsics.Vector256 left, System.Runtime.Intrinsics.Vector256 right) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Avx2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Avx2+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Avx.X64 { public static bool IsSupported { get => throw null; } @@ -3350,7 +3350,7 @@ public abstract class Bmi1 : System.Runtime.Intrinsics.X86.X86Base public static bool IsSupported { get => throw null; } public static System.UInt32 ResetLowestSetBit(System.UInt32 value) => throw null; public static System.UInt32 TrailingZeroCount(System.UInt32 value) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Bmi1.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Bmi1+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 { public static System.UInt64 AndNot(System.UInt64 left, System.UInt64 right) => throw null; @@ -3374,7 +3374,7 @@ public abstract class Bmi2 : System.Runtime.Intrinsics.X86.X86Base public static System.UInt32 MultiplyNoFlags(System.UInt32 left, System.UInt32 right) => throw null; public static System.UInt32 ParallelBitDeposit(System.UInt32 value, System.UInt32 mask) => throw null; public static System.UInt32 ParallelBitExtract(System.UInt32 value, System.UInt32 mask) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Bmi2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Bmi2+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 { public static bool IsSupported { get => throw null; } @@ -3462,7 +3462,7 @@ public abstract class Fma : System.Runtime.Intrinsics.X86.Avx public static System.Runtime.Intrinsics.Vector128 MultiplySubtractNegatedScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; public static System.Runtime.Intrinsics.Vector128 MultiplySubtractScalar(System.Runtime.Intrinsics.Vector128 a, System.Runtime.Intrinsics.Vector128 b, System.Runtime.Intrinsics.Vector128 c) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Fma.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Fma+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Avx.X64 { public static bool IsSupported { get => throw null; } @@ -3476,7 +3476,7 @@ public abstract class Lzcnt : System.Runtime.Intrinsics.X86.X86Base { public static bool IsSupported { get => throw null; } public static System.UInt32 LeadingZeroCount(System.UInt32 value) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Lzcnt.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Lzcnt+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 { public static bool IsSupported { get => throw null; } @@ -3492,7 +3492,7 @@ public abstract class Pclmulqdq : System.Runtime.Intrinsics.X86.Sse2 public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; public static System.Runtime.Intrinsics.Vector128 CarrylessMultiply(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right, System.Byte control) => throw null; public static bool IsSupported { get => throw null; } - // Generated from `System.Runtime.Intrinsics.X86.Pclmulqdq.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Pclmulqdq+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 { public static bool IsSupported { get => throw null; } @@ -3506,7 +3506,7 @@ public abstract class Popcnt : System.Runtime.Intrinsics.X86.Sse42 { public static bool IsSupported { get => throw null; } public static System.UInt32 PopCount(System.UInt32 value) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Popcnt.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Popcnt+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse42.X64 { public static bool IsSupported { get => throw null; } @@ -3607,7 +3607,7 @@ public abstract class Sse : System.Runtime.Intrinsics.X86.X86Base public static System.Runtime.Intrinsics.Vector128 SubtractScalar(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 UnpackHigh(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Sse.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Sse+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.X86Base.X64 { public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Single(System.Runtime.Intrinsics.Vector128 upper, System.Int64 value) => throw null; @@ -3916,7 +3916,7 @@ public abstract class Sse2 : System.Runtime.Intrinsics.X86.Sse public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 UnpackLow(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Sse2.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Sse2+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse.X64 { public static System.Runtime.Intrinsics.Vector128 ConvertScalarToVector128Double(System.Runtime.Intrinsics.Vector128 upper, System.Int64 value) => throw null; @@ -3967,7 +3967,7 @@ public abstract class Sse3 : System.Runtime.Intrinsics.X86.Sse2 public static System.Runtime.Intrinsics.Vector128 MoveHighAndDuplicate(System.Runtime.Intrinsics.Vector128 source) => throw null; public static System.Runtime.Intrinsics.Vector128 MoveLowAndDuplicate(System.Runtime.Intrinsics.Vector128 source) => throw null; internal Sse3() => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Sse3.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Sse3+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse2.X64 { public static bool IsSupported { get => throw null; } @@ -4121,7 +4121,7 @@ public abstract class Sse41 : System.Runtime.Intrinsics.X86.Ssse3 public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static bool TestZ(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Sse41.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Sse41+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Ssse3.X64 { public static System.UInt64 Extract(System.Runtime.Intrinsics.Vector128 value, System.Byte index) => throw null; @@ -4144,7 +4144,7 @@ public abstract class Sse42 : System.Runtime.Intrinsics.X86.Sse41 public static System.UInt32 Crc32(System.UInt32 crc, System.Byte data) => throw null; public static bool IsSupported { get => throw null; } internal Sse42() => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Sse42.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Sse42+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse41.X64 { public static System.UInt64 Crc32(System.UInt64 crc, System.UInt64 data) => throw null; @@ -4184,7 +4184,7 @@ public abstract class Ssse3 : System.Runtime.Intrinsics.X86.Sse3 public static System.Runtime.Intrinsics.Vector128 Sign(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; public static System.Runtime.Intrinsics.Vector128 Sign(System.Runtime.Intrinsics.Vector128 left, System.Runtime.Intrinsics.Vector128 right) => throw null; internal Ssse3() => throw null; - // Generated from `System.Runtime.Intrinsics.X86.Ssse3.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.Ssse3+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 : System.Runtime.Intrinsics.X86.Sse3.X64 { public static bool IsSupported { get => throw null; } @@ -4199,7 +4199,7 @@ public abstract class X86Base { public static (int, int, int, int) CpuId(int functionId, int subFunctionId) => throw null; public static bool IsSupported { get => throw null; } - // Generated from `System.Runtime.Intrinsics.X86.X86Base.X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Runtime.Intrinsics.X86.X86Base+X64` in `System.Runtime.Intrinsics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public abstract class X64 { public static bool IsSupported { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs index 401d4a1f7bda..d040d6a916c1 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs @@ -34,7 +34,7 @@ public class AssemblyLoadContext public AssemblyLoadContext(string name, bool isCollectible = default(bool)) => throw null; protected AssemblyLoadContext(bool isCollectible) => throw null; protected AssemblyLoadContext() => throw null; - // Generated from `System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.Loader.AssemblyLoadContext+ContextualReflectionScope` in `System.Runtime.Loader, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ContextualReflectionScope : System.IDisposable { // Stub generator skipped constructor diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs index ff6531ccaf09..9f2d7023a888 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs @@ -474,7 +474,7 @@ public struct ArraySegment : System.Collections.IEnumerable, System.Collectio public void CopyTo(System.ArraySegment destination) => throw null; public int Count { get => throw null; } public static System.ArraySegment Empty { get => throw null; } - // Generated from `System.ArraySegment<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.ArraySegment<>+Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator { public T Current { get => throw null; } @@ -1825,7 +1825,7 @@ public static class Environment public static int ProcessorCount { get => throw null; } public static void SetEnvironmentVariable(string variable, string value, System.EnvironmentVariableTarget target) => throw null; public static void SetEnvironmentVariable(string variable, string value) => throw null; - // Generated from `System.Environment.SpecialFolder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Environment+SpecialFolder` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum SpecialFolder { AdminTools, @@ -1878,7 +1878,7 @@ public enum SpecialFolder } - // Generated from `System.Environment.SpecialFolderOption` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Environment+SpecialFolderOption` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum SpecialFolderOption { Create, @@ -3302,7 +3302,7 @@ public struct ReadOnlySpan public static bool operator ==(System.ReadOnlySpan left, System.ReadOnlySpan right) => throw null; public void CopyTo(System.Span destination) => throw null; public static System.ReadOnlySpan Empty { get => throw null; } - // Generated from `System.ReadOnlySpan<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.ReadOnlySpan<>+Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } @@ -3516,7 +3516,7 @@ public struct Span public void Clear() => throw null; public void CopyTo(System.Span destination) => throw null; public static System.Span Empty { get => throw null; } - // Generated from `System.Span<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Span<>+Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } @@ -3912,7 +3912,7 @@ public abstract class TimeZone // Generated from `System.TimeZoneInfo` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class TimeZoneInfo : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable { - // Generated from `System.TimeZoneInfo.AdjustmentRule` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.TimeZoneInfo+AdjustmentRule` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class AdjustmentRule : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable { public static System.TimeZoneInfo.AdjustmentRule CreateAdjustmentRule(System.DateTime dateStart, System.DateTime dateEnd, System.TimeSpan daylightDelta, System.TimeZoneInfo.TransitionTime daylightTransitionStart, System.TimeZoneInfo.TransitionTime daylightTransitionEnd) => throw null; @@ -3969,7 +3969,7 @@ public class AdjustmentRule : System.Runtime.Serialization.ISerializable, System public bool SupportsDaylightSavingTime { get => throw null; } public string ToSerializedString() => throw null; public override string ToString() => throw null; - // Generated from `System.TimeZoneInfo.TransitionTime` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.TimeZoneInfo+TransitionTime` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct TransitionTime : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable { public static bool operator !=(System.TimeZoneInfo.TransitionTime t1, System.TimeZoneInfo.TransitionTime t2) => throw null; @@ -5152,11 +5152,6 @@ public class Version : System.IEquatable, System.IComparable throw null; } - // Generated from `System.Void` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` - public struct Void - { - } - // Generated from `System.WeakReference` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class WeakReference : System.Runtime.Serialization.ISerializable { @@ -5870,7 +5865,7 @@ public class DebuggableAttribute : System.Attribute public DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled) => throw null; public DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes modes) => throw null; public System.Diagnostics.DebuggableAttribute.DebuggingModes DebuggingFlags { get => throw null; } - // Generated from `System.Diagnostics.DebuggableAttribute.DebuggingModes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Diagnostics.DebuggableAttribute+DebuggingModes` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` [System.Flags] public enum DebuggingModes { @@ -9544,7 +9539,7 @@ public class ConditionalWeakTable : System.Collections.IEnumerable public void AddOrUpdate(TKey key, TValue value) => throw null; public void Clear() => throw null; public ConditionalWeakTable() => throw null; - // Generated from `System.Runtime.CompilerServices.ConditionalWeakTable<,>.CreateValueCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConditionalWeakTable<,>+CreateValueCallback` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public delegate TValue CreateValueCallback(TKey key); @@ -9568,7 +9563,7 @@ public struct ConfiguredCancelableAsyncEnumerable { public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable ConfigureAwait(bool continueOnCapturedContext) => throw null; // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>.Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>+Enumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct Enumerator { public T Current { get => throw null; } @@ -9586,7 +9581,7 @@ public struct Enumerator public struct ConfiguredTaskAwaitable { // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion { // Stub generator skipped constructor @@ -9604,7 +9599,7 @@ public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCom public struct ConfiguredTaskAwaitable { // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>+ConfiguredTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion { // Stub generator skipped constructor @@ -9622,7 +9617,7 @@ public struct ConfiguredTaskAwaiter : System.Runtime.CompilerServices.INotifyCom public struct ConfiguredValueTaskAwaitable { // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable+ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion { // Stub generator skipped constructor @@ -9640,7 +9635,7 @@ public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.INoti public struct ConfiguredValueTaskAwaitable { // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>.ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>+ConfiguredValueTaskAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion { // Stub generator skipped constructor @@ -9899,7 +9894,7 @@ public static class RuntimeFeature public static class RuntimeHelpers { public static System.IntPtr AllocateTypeAssociatedMemory(System.Type type, int size) => throw null; - // Generated from `System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.RuntimeHelpers+CleanupCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public delegate void CleanupCode(object userData, bool exceptionThrown); @@ -9922,7 +9917,7 @@ public static class RuntimeHelpers public static void ProbeForSufficientStack() => throw null; public static void RunClassConstructor(System.RuntimeTypeHandle type) => throw null; public static void RunModuleConstructor(System.ModuleHandle module) => throw null; - // Generated from `System.Runtime.CompilerServices.RuntimeHelpers.TryCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.RuntimeHelpers+TryCode` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public delegate void TryCode(object userData); @@ -10062,7 +10057,7 @@ public struct YieldAwaitable { public System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter GetAwaiter() => throw null; // Stub generator skipped constructor - // Generated from `System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Runtime.CompilerServices.YieldAwaitable+YieldAwaiter` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct YieldAwaiter : System.Runtime.CompilerServices.INotifyCompletion, System.Runtime.CompilerServices.ICriticalNotifyCompletion { public void GetResult() => throw null; @@ -11357,7 +11352,7 @@ public class StringBuilder : System.Runtime.Serialization.ISerializable public int Capacity { get => throw null; set => throw null; } [System.Runtime.CompilerServices.IndexerName("Chars")] public System.Char this[int index] { get => throw null; set => throw null; } - // Generated from `System.Text.StringBuilder.ChunkEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Text.StringBuilder+ChunkEnumerator` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public struct ChunkEnumerator { // Stub generator skipped constructor diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs index 05089afa6a79..b7a4806a65e7 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.Algorithms.cs @@ -250,7 +250,7 @@ public struct ECCurve public static System.Security.Cryptography.ECCurve CreateFromValue(string oidValue) => throw null; public System.Security.Cryptography.ECCurve.ECCurveType CurveType; // Stub generator skipped constructor - // Generated from `System.Security.Cryptography.ECCurve.ECCurveType` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Security.Cryptography.ECCurve+ECCurveType` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum ECCurveType { Characteristic2, @@ -268,7 +268,7 @@ public enum ECCurveType public bool IsExplicit { get => throw null; } public bool IsNamed { get => throw null; } public bool IsPrime { get => throw null; } - // Generated from `System.Security.Cryptography.ECCurve.NamedCurves` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Security.Cryptography.ECCurve+NamedCurves` in `System.Security.Cryptography.Algorithms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public static class NamedCurves { public static System.Security.Cryptography.ECCurve brainpoolP160r1 { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs index d57451214841..086fc1fdf064 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Security.Cryptography.X509Certificates.cs @@ -344,7 +344,7 @@ public class X509CertificateCollection : System.Collections.CollectionBase public X509CertificateCollection(System.Security.Cryptography.X509Certificates.X509Certificate[] value) => throw null; public X509CertificateCollection(System.Security.Cryptography.X509Certificates.X509CertificateCollection value) => throw null; public X509CertificateCollection() => throw null; - // Generated from `System.Security.Cryptography.X509Certificates.X509CertificateCollection.X509CertificateEnumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Security.Cryptography.X509Certificates.X509CertificateCollection+X509CertificateEnumerator` in `System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class X509CertificateEnumerator : System.Collections.IEnumerator { public System.Security.Cryptography.X509Certificates.X509Certificate Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs index 7e2cb9f416e1..d76c64e19db1 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs @@ -42,7 +42,7 @@ public struct JsonDocumentOptions // Generated from `System.Text.Json.JsonElement` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct JsonElement { - // Generated from `System.Text.Json.JsonElement.ArrayEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Text.Json.JsonElement+ArrayEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct ArrayEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable { // Stub generator skipped constructor @@ -84,7 +84,7 @@ public struct ArrayEnumerator : System.IDisposable, System.Collections.IEnumerat public System.UInt64 GetUInt64() => throw null; public System.Text.Json.JsonElement this[int index] { get => throw null; } // Stub generator skipped constructor - // Generated from `System.Text.Json.JsonElement.ObjectEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + // Generated from `System.Text.Json.JsonElement+ObjectEnumerator` in `System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` public struct ObjectEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable, System.Collections.Generic.IEnumerator, System.Collections.Generic.IEnumerable { public System.Text.Json.JsonProperty Current { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs index c0bf9c185606..0e7a081e6eb2 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs @@ -1913,7 +1913,7 @@ public class XmlSchemaInference { public System.Xml.Schema.XmlSchemaSet InferSchema(System.Xml.XmlReader instanceDocument, System.Xml.Schema.XmlSchemaSet schemas) => throw null; public System.Xml.Schema.XmlSchemaSet InferSchema(System.Xml.XmlReader instanceDocument) => throw null; - // Generated from `System.Xml.Schema.XmlSchemaInference.InferenceOption` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Xml.Schema.XmlSchemaInference+InferenceOption` in `System.Xml.ReaderWriter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public enum InferenceOption { Relaxed, diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs index 747f007c7987..96777bd9a0b2 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs @@ -509,7 +509,7 @@ public abstract class XmlSerializationReader : System.Xml.Serialization.XmlSeria protected void AddTarget(string id, object o) => throw null; protected void CheckReaderCount(ref int whileIterations, ref int readerCount) => throw null; protected string CollapseWhitespace(string value) => throw null; - // Generated from `System.Xml.Serialization.XmlSerializationReader.CollectionFixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Xml.Serialization.XmlSerializationReader+CollectionFixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected class CollectionFixup { public System.Xml.Serialization.XmlSerializationCollectionFixupCallback Callback { get => throw null; } @@ -533,7 +533,7 @@ protected class CollectionFixup protected bool DecodeName { get => throw null; set => throw null; } protected System.Xml.XmlDocument Document { get => throw null; } protected System.Array EnsureArrayIndex(System.Array a, int index, System.Type elementType) => throw null; - // Generated from `System.Xml.Serialization.XmlSerializationReader.Fixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + // Generated from `System.Xml.Serialization.XmlSerializationReader+Fixup` in `System.Xml.XmlSerializer, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` protected class Fixup { public System.Xml.Serialization.XmlSerializationFixupCallback Callback { get => throw null; } From 14e724bce6cf3642699404c46bcc4ed98a63c457 Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 23 Jun 2021 09:53:47 +0200 Subject: [PATCH 1579/1662] Added sinks for RmiBasedExporter and HessianExporter --- .../CWE/CWE-502/UnsafeSpringExporterLib.qll | 4 ++- .../UnsafeSpringExporterQuery.inc.qhelp | 26 ++++++++----------- .../SpringExporterUnsafeDeserialization.java | 20 ++++++++++++++ ...pringExporterInConfigurationClass.expected | 10 ++++--- ...eSpringExporterInXMLConfiguration.expected | 2 ++ .../query-tests/security/CWE-502/beans.xml | 11 ++++++++ .../remoting/caucho/HessianExporter.java | 8 ++++++ .../caucho/HessianServiceExporter.java | 3 +++ .../remoting/rmi/RmiBasedExporter.java | 12 +++++++++ .../remoting/rmi/RmiServiceExporter.java | 3 +++ 10 files changed, 79 insertions(+), 20 deletions(-) create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianExporter.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianServiceExporter.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiBasedExporter.java create mode 100644 java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiServiceExporter.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterLib.qll b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterLib.qll index f49ee44304fd..414f9d21b518 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterLib.qll +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterLib.qll @@ -5,5 +5,7 @@ import java */ predicate isRemoteInvocationSerializingExporter(RefType type) { type.getASupertype*() - .hasQualifiedName("org.springframework.remoting.rmi", "RemoteInvocationSerializingExporter") + .hasQualifiedName("org.springframework.remoting.rmi", + ["RemoteInvocationSerializingExporter", "RmiBasedExporter"]) or + type.getASupertype*().hasQualifiedName("org.springframework.remoting.caucho", "HessianExporter") } diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp index 732c5c7e545e..f7acc417dc84 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp @@ -5,22 +5,20 @@

    -The Spring Framework provides an abstract base class RemoteInvocationSerializingExporter -for creating remote service exporters. -A Spring exporter, which is based on this class, deserializes incoming data using ObjectInputStream. +The Spring Framework provides several classes for creating remote service exporters. +Under the hood, the exporters use various deserialization mechanisms +such as ObjectInputStream or Hessian. Deserializing untrusted data is easily exploitable and in many cases allows an attacker -to execute arbitrary code. -

    -

    -The Spring Framework also provides HttpInvokerServiceExporter -and SimpleHttpInvokerServiceExporter classes -that extend RemoteInvocationSerializingExporter. +to execute arbitrary code. If a remote attacker can reach endpoints created by the exporters, +it results in remote code execution in the worst case.

    +

    -These classes export specified beans as HTTP endpoints that deserialize data from an HTTP request -using unsafe ObjectInputStream. If a remote attacker can reach such endpoints, -it results in remote code execution in the worst case. +Here are examples of unsafe exporters: HttpInvokerServiceExporter, +SimpleHttpInvokerServiceExporter, RmiServiceExporter, +HessianServiceExporter.

    +

    CVE-2016-1000027 has been assigned to this issue in the Spring Framework. It is regarded as a design limitation, and can be mitigated but not fixed outright. @@ -29,9 +27,7 @@ It is regarded as a design limitation, and can be mitigated but not fixed outrig

    -Avoid using HttpInvokerServiceExporter, SimpleHttpInvokerServiceExporter -and any other exporter that is based on RemoteInvocationSerializingExporter. -Instead, use other message formats for API endpoints (for example, JSON), +Avoid using unsafe service exporters. Instead, use other message formats for API endpoints (for example, JSON), but make sure that the underlying deserialization mechanism is properly configured so that deserialization attacks are not possible. If the vulnerable exporters can not be replaced, consider using global deserialization filters introduced in JEP 290. diff --git a/java/ql/test/experimental/query-tests/security/CWE-502/SpringExporterUnsafeDeserialization.java b/java/ql/test/experimental/query-tests/security/CWE-502/SpringExporterUnsafeDeserialization.java index 2bca24ee370e..f1b2453ea151 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-502/SpringExporterUnsafeDeserialization.java +++ b/java/ql/test/experimental/query-tests/security/CWE-502/SpringExporterUnsafeDeserialization.java @@ -2,12 +2,32 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.remoting.caucho.HessianServiceExporter; import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter; import org.springframework.remoting.rmi.RemoteInvocationSerializingExporter; +import org.springframework.remoting.rmi.RmiServiceExporter; @Configuration public class SpringExporterUnsafeDeserialization { + @Bean(name = "/unsafeRmiServiceExporter") + RmiServiceExporter unsafeRmiServiceExporter() { + RmiServiceExporter exporter = new RmiServiceExporter(); + exporter.setServiceInterface(AccountService.class); + exporter.setService(new AccountServiceImpl()); + exporter.setServiceName(AccountService.class.getSimpleName()); + exporter.setRegistryPort(1099); + return exporter; + } + + @Bean(name = "/unsafeHessianServiceExporter") + HessianServiceExporter unsafeHessianServiceExporter() { + HessianServiceExporter exporter = new HessianServiceExporter(); + exporter.setService(new AccountServiceImpl()); + exporter.setServiceInterface(AccountService.class); + return exporter; + } + @Bean(name = "/unsafeHttpInvokerServiceExporter") HttpInvokerServiceExporter unsafeHttpInvokerServiceExporter() { HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter(); diff --git a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInConfigurationClass.expected b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInConfigurationClass.expected index 2155d805e80a..0c266dfaf7e4 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInConfigurationClass.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInConfigurationClass.expected @@ -1,4 +1,6 @@ -| SpringExporterUnsafeDeserialization.java:12:32:12:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | -| SpringExporterUnsafeDeserialization.java:20:41:20:88 | unsafeCustomeRemoteInvocationSerializingExporter | Unsafe deserialization in a Spring exporter bean '/unsafeCustomeRemoteInvocationSerializingExporter' | -| SpringExporterUnsafeDeserialization.java:36:32:36:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | -| SpringExporterUnsafeDeserialization.java:48:32:48:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | +| SpringExporterUnsafeDeserialization.java:14:24:14:47 | unsafeRmiServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeRmiServiceExporter' | +| SpringExporterUnsafeDeserialization.java:24:28:24:55 | unsafeHessianServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHessianServiceExporter' | +| SpringExporterUnsafeDeserialization.java:32:32:32:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | +| SpringExporterUnsafeDeserialization.java:40:41:40:88 | unsafeCustomeRemoteInvocationSerializingExporter | Unsafe deserialization in a Spring exporter bean '/unsafeCustomeRemoteInvocationSerializingExporter' | +| SpringExporterUnsafeDeserialization.java:56:32:56:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | +| SpringExporterUnsafeDeserialization.java:68:32:68:63 | unsafeHttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean '/unsafeHttpInvokerServiceExporter' | diff --git a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInXMLConfiguration.expected b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInXMLConfiguration.expected index edcb3668557b..ec7a06f8bfcf 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInXMLConfiguration.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-502/UnsafeSpringExporterInXMLConfiguration.expected @@ -1,2 +1,4 @@ | beans.xml:10:5:13:12 | /unsafeBooking | Unsafe deserialization in a Spring exporter bean '/unsafeBooking' | | beans.xml:15:5:18:12 | org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter | Unsafe deserialization in a Spring exporter bean 'org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter' | +| beans.xml:20:5:24:12 | org.springframework.remoting.rmi.RmiServiceExporter | Unsafe deserialization in a Spring exporter bean 'org.springframework.remoting.rmi.RmiServiceExporter' | +| beans.xml:26:5:29:12 | org.springframework.remoting.caucho.HessianServiceExporter | Unsafe deserialization in a Spring exporter bean 'org.springframework.remoting.caucho.HessianServiceExporter' | diff --git a/java/ql/test/experimental/query-tests/security/CWE-502/beans.xml b/java/ql/test/experimental/query-tests/security/CWE-502/beans.xml index bdb4e5fa6515..fbb936d901db 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-502/beans.xml +++ b/java/ql/test/experimental/query-tests/security/CWE-502/beans.xml @@ -16,4 +16,15 @@ + + + + + + + + + + + diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianExporter.java new file mode 100644 index 000000000000..a3e81497850c --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianExporter.java @@ -0,0 +1,8 @@ +package org.springframework.remoting.caucho; + +public class HessianExporter { + + public void setService(Object service) {} + + public void setServiceInterface(Class clazz) {} +} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianServiceExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianServiceExporter.java new file mode 100644 index 000000000000..9acc2093032c --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/caucho/HessianServiceExporter.java @@ -0,0 +1,3 @@ +package org.springframework.remoting.caucho; + +public class HessianServiceExporter extends HessianExporter {} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiBasedExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiBasedExporter.java new file mode 100644 index 000000000000..80135404e157 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiBasedExporter.java @@ -0,0 +1,12 @@ +package org.springframework.remoting.rmi; + +public abstract class RmiBasedExporter { + + public void setService(Object service) {} + + public void setServiceInterface(Class clazz) {} + + public void setServiceName(String name) {} + + public void setRegistryPort(int port) {} +} \ No newline at end of file diff --git a/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiServiceExporter.java b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiServiceExporter.java new file mode 100644 index 000000000000..f5d5f8856356 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.2.3/org/springframework/remoting/rmi/RmiServiceExporter.java @@ -0,0 +1,3 @@ +package org.springframework.remoting.rmi; + +public class RmiServiceExporter extends RmiBasedExporter {} \ No newline at end of file From 8b5c285ac887804c2de7b9859ee429369882d701 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Tue, 22 Jun 2021 21:39:16 +0200 Subject: [PATCH 1580/1662] add support for the `chokidar` library --- javascript/change-notes/2021-06-22-chokidar.md | 5 +++++ .../src/semmle/javascript/frameworks/Files.qll | 18 ++++++++++++++++++ .../frameworks/Concepts/tests.expected | 4 ++++ .../frameworks/Concepts/tst-file-names.js | 14 +++++++++++++- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 javascript/change-notes/2021-06-22-chokidar.md diff --git a/javascript/change-notes/2021-06-22-chokidar.md b/javascript/change-notes/2021-06-22-chokidar.md new file mode 100644 index 000000000000..418e67abe4b0 --- /dev/null +++ b/javascript/change-notes/2021-06-22-chokidar.md @@ -0,0 +1,5 @@ +lgtm,codescanning +* Support for `chokidar` has improved. The `js/tainted-path` query recognized calls to `chokidar.watch`, + and the security queries recognize the filenames returned by the library. + Affected packages are + [chokidar](https://npmjs.com/package/chokidar) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Files.qll b/javascript/ql/src/semmle/javascript/frameworks/Files.qll index 3f8f4ee7419c..725b6a04c8c1 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Files.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Files.qll @@ -452,3 +452,21 @@ private class LibraryAccess extends FileSystemAccess, DataFlow::InvokeNode { override DataFlow::Node getAPathArgument() { result = getArgument(pathArgument) } } + +/** + * A call to the library [`chokidar`](https://www.npmjs.com/package/chokidar), where a call to `on` receives file names. + */ +class Chokidar extends FileNameProducer, FileSystemAccess, API::CallNode { + Chokidar() { this = API::moduleImport("chokidar").getMember("watch").getACall() } + + override DataFlow::Node getAPathArgument() { result = getArgument(0) } + + override DataFlow::Node getAFileName() { + exists(DataFlow::CallNode onCall, int pathIndex | + onCall = getAChainedMethodCall("on") and + if onCall.getArgument(0).mayHaveStringValue("all") then pathIndex = 1 else pathIndex = 0 + | + result = onCall.getCallback(1).getParameter(pathIndex) + ) + } +} diff --git a/javascript/ql/test/library-tests/frameworks/Concepts/tests.expected b/javascript/ql/test/library-tests/frameworks/Concepts/tests.expected index 11da080fd6ff..e8a82f9ef058 100644 --- a/javascript/ql/test/library-tests/frameworks/Concepts/tests.expected +++ b/javascript/ql/test/library-tests/frameworks/Concepts/tests.expected @@ -34,6 +34,7 @@ getPathArgument | tst-file-names.js:44:12:44:49 | globule ... o.js"]) | tst-file-names.js:44:39:44:48 | ["foo.js"] | | tst-file-names.js:46:12:46:51 | globule ... .js"]}) | tst-file-names.js:46:34:46:49 | ["a.js", "b.js"] | | tst-file-names.js:47:12:47:52 | globule ... b.js"]) | tst-file-names.js:47:28:47:51 | ["foo/a ... /b.js"] | +| tst-file-names.js:55:1:55:19 | chokidar.watch('.') | tst-file-names.js:55:16:55:18 | '.' | getReadNode | file-access.js:25:1:25:59 | jsonfil ... bj) {}) | file-access.js:25:52:25:54 | obj | | file-access.js:26:1:26:39 | jsonfil ... .json') | file-access.js:26:1:26:39 | jsonfil ... .json') | @@ -78,6 +79,9 @@ fileNameSource | tst-file-names.js:46:12:46:51 | globule ... .js"]}) | | tst-file-names.js:47:12:47:52 | globule ... b.js"]) | | tst-file-names.js:51:15:51:23 | await foo | +| tst-file-names.js:56:22:56:25 | path | +| tst-file-names.js:59:17:59:20 | path | +| tst-file-names.js:62:16:62:19 | path | persistentReadAccess_getAWrite | persistence.js:3:5:3:33 | localSt ... prop1') | persistence.js:2:5:2:37 | localSt ... 1', v1) | | persistence.js:6:5:6:35 | session ... prop2') | persistence.js:5:5:5:39 | session ... 2', v2) | diff --git a/javascript/ql/test/library-tests/frameworks/Concepts/tst-file-names.js b/javascript/ql/test/library-tests/frameworks/Concepts/tst-file-names.js index c0cfa35e9989..e6b75fca72f3 100644 --- a/javascript/ql/test/library-tests/frameworks/Concepts/tst-file-names.js +++ b/javascript/ql/test/library-tests/frameworks/Concepts/tst-file-names.js @@ -49,4 +49,16 @@ var map3 = globule.mapping(["foo/a.js", "foo/b.js"]) async function bar() { var foo = globby(_); var files = await foo; -} \ No newline at end of file +} + +const chokidar = require('chokidar'); +chokidar.watch('.') + .on('all', (event, path) => { + console.log(event, path); + }) + .on('change', path => { + console.log(path); + }) + .on('ready', path => { + console.log(path); + }); \ No newline at end of file From a611e76ed206ed3593a1e50a9642c003761593c9 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 23 Jun 2021 10:28:00 +0200 Subject: [PATCH 1581/1662] C++: Respond to review comments. --- cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index 6b9801a5fb22..5bd9d3244021 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -59,12 +59,14 @@ predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr operand2) } /** - * Holds if `e` is an operand of an operation that greatly reduces the range of possible values. + * Holds if `e` is an arithmetic expression that cannot overflow, or if `e` is an operand of an + * operation that may greatly reduces the range of possible values. */ predicate bounded(Expr e) { ( e instanceof UnaryArithmeticOperation or - e instanceof BinaryArithmeticOperation + e instanceof BinaryArithmeticOperation or + e instanceof AssignArithmeticOperation ) and not convertedExprMightOverflow(e) or @@ -90,7 +92,7 @@ predicate bounded(Expr e) { boundedBitwiseAnd(e, andExpr, andExpr.getAnOperand(), andExpr.getAnOperand()) ) or - // Optimitically assume that a division always yields a much smaller value. + // Optimitically assume that a division or right shift always yields a much smaller value. boundedDiv(e, any(DivExpr div).getLeftOperand()) or boundedDiv(e, any(AssignDivExpr div).getLValue()) From 700dfcc3a75b850a956104e8b8ea21cd9380cc10 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 23 Jun 2021 10:39:56 +0200 Subject: [PATCH 1582/1662] add comment about why `colors/safe` is not safe Co-authored-by: Esben Sparre Andreasen --- javascript/ql/src/semmle/javascript/frameworks/Logging.qll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index d8c34c4ca2ca..393b49133d90 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -221,7 +221,8 @@ class AnsiColorsStep extends TaintTracking::SharedTaintStep { class ColorsStep extends TaintTracking::SharedTaintStep { override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { exists(API::CallNode call | - call = API::moduleImport(["colors", "colors/safe"]).getAMember*().getACall() + + call = API::moduleImport(["colors", "colors/safe" /* this variant avoids modifying the prototype methods */ ]).getAMember*().getACall() | pred = call.getArgument(0) and succ = call From 6cf275bb36c4b0a32f98868de289ed1305395fa9 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 23 Jun 2021 10:42:26 +0200 Subject: [PATCH 1583/1662] update change-note Co-authored-by: Esben Sparre Andreasen --- javascript/change-notes/2021-06-22-chokidar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/change-notes/2021-06-22-chokidar.md b/javascript/change-notes/2021-06-22-chokidar.md index 418e67abe4b0..19f1d26cd1bc 100644 --- a/javascript/change-notes/2021-06-22-chokidar.md +++ b/javascript/change-notes/2021-06-22-chokidar.md @@ -1,5 +1,5 @@ lgtm,codescanning -* Support for `chokidar` has improved. The `js/tainted-path` query recognized calls to `chokidar.watch`, +* Support for `chokidar` has improved. The `js/tainted-path` query now recognizes calls to `chokidar.watch`, and the security queries recognize the filenames returned by the library. Affected packages are [chokidar](https://npmjs.com/package/chokidar) From d698f0ae27355f39db66f70b4daafa9a41da9757 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 23 Jun 2021 11:30:47 +0200 Subject: [PATCH 1584/1662] Fix VoidType handling --- csharp/ql/src/Stubs/Stubs.qll | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index e3bdae12136d..55eb5724cd8e 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -13,6 +13,7 @@ import csharp private import semmle.code.csharp.frameworks.System +private import semmle.code.dotnet.DotNet as DotNet // added to handle VoidType as a ValueOrRefType /** An element that should be in the generated code. */ abstract class GeneratedElement extends Element { } @@ -332,7 +333,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { } private predicate isInAssembly(Assembly assembly) { - any(GeneratedType gt | gt.(ValueOrRefType).getDeclaringNamespace() = this) + any(GeneratedType gt | gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this) .isInAssembly(assembly) or this.getChildNamespace(_).isInAssembly(assembly) @@ -353,7 +354,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement { this.isInAssembly(assembly) and result = concat(GeneratedType gt | - gt.(ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly) + gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly) | gt.getStub(assembly) order by gt.getName() ) From 09dd615c6bbe83135dd221ef881f75c6ab4a526c Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 23 Jun 2021 11:38:41 +0200 Subject: [PATCH 1585/1662] Regenerate stubs (add System.Void struct) --- .../_frameworks/Microsoft.NETCore.App/System.Runtime.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs index 9f2d7023a888..1c2028e876d5 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs @@ -5152,6 +5152,11 @@ public class Version : System.IEquatable, System.IComparable throw null; } + // Generated from `System.Void` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public struct Void + { + } + // Generated from `System.WeakReference` in `System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` public class WeakReference : System.Runtime.Serialization.ISerializable { From 0dfb869c5b74cd8547443b24c0cc592df9e9438e Mon Sep 17 00:00:00 2001 From: Artem Smotrakov Date: Wed, 23 Jun 2021 13:23:54 +0200 Subject: [PATCH 1586/1662] Apply suggestions from code review Co-authored-by: Chris Smowton --- .../Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp index f7acc417dc84..977a7fac3d95 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-502/UnsafeSpringExporterQuery.inc.qhelp @@ -14,11 +14,10 @@ it results in remote code execution in the worst case.

    -Here are examples of unsafe exporters: HttpInvokerServiceExporter, +Examples of unsafe exporters include: HttpInvokerServiceExporter, SimpleHttpInvokerServiceExporter, RmiServiceExporter, HessianServiceExporter.

    -

    CVE-2016-1000027 has been assigned to this issue in the Spring Framework. It is regarded as a design limitation, and can be mitigated but not fixed outright. @@ -34,4 +33,4 @@ consider using global deserialization filters introduced in JEP 290.

    - \ No newline at end of file + From 447099a1df4baf31e2da1f4c9f6977f05fb8c89d Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 23 Jun 2021 13:32:19 +0200 Subject: [PATCH 1587/1662] Python: Update jmespath tests --- .../library-tests/frameworks/jmespath/taint_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/ql/test/library-tests/frameworks/jmespath/taint_test.py b/python/ql/test/library-tests/frameworks/jmespath/taint_test.py index 2a22ac16d76e..001602724761 100644 --- a/python/ql/test/library-tests/frameworks/jmespath/taint_test.py +++ b/python/ql/test/library-tests/frameworks/jmespath/taint_test.py @@ -1,16 +1,16 @@ import jmespath def test_taint(): - data = TAINTED_DICT + untrusted_data = TAINTED_DICT - expression = jmespath.compile("foo.bar") + safe_expression = jmespath.compile("foo.bar") ensure_tainted( - jmespath.search("foo.bar", data), # $ tainted - jmespath.search("foo.bar", data=data), # $ tainted + jmespath.search("foo.bar", untrusted_data), # $ tainted + jmespath.search("foo.bar", data=untrusted_data), # $ tainted - expression.search(data), # $ tainted - expression.search(value=data) # $ tainted + safe_expression.search(untrusted_data), # $ tainted + safe_expression.search(value=untrusted_data) # $ tainted ) # since ```jmespath.search("{wat: `foo`}", {})``` works (and outputs a dictionary), From 0774e985cef208fec2d4650097b11795249a5dd6 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 23 Jun 2021 13:37:38 +0200 Subject: [PATCH 1588/1662] Python: Apply suggestions from code review Co-authored-by: yoff --- python/ql/src/semmle/python/frameworks/Rsa.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ql/src/semmle/python/frameworks/Rsa.qll b/python/ql/src/semmle/python/frameworks/Rsa.qll index 926959b8bbce..68d1786c89ee 100644 --- a/python/ql/src/semmle/python/frameworks/Rsa.qll +++ b/python/ql/src/semmle/python/frameworks/Rsa.qll @@ -71,7 +71,7 @@ private module Rsa { // hashing part exists(StrConst str, DataFlow::Node hashNameArg | hashNameArg in [this.getArg(2), this.getArgByName("hash_method")] and - DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(hashNameArg) and + DataFlow::exprNode(str) = hashNameArg.getALocalSource() and result.matchesName(str.getText()) ) } @@ -114,7 +114,7 @@ private module Rsa { override Cryptography::CryptographicAlgorithm getAlgorithm() { exists(StrConst str, DataFlow::Node hashNameArg | hashNameArg in [this.getArg(1), this.getArgByName("method_name")] and - DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(hashNameArg) and + DataFlow::exprNode(str) = hashNameArg.getALocalSource() and result.matchesName(str.getText()) ) } From e200ecde4afef7a45c215de5cfd5c98bfb215f15 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 11:20:24 +0200 Subject: [PATCH 1589/1662] C#: Change Newtonsoft.Json stub to nuget-based one --- .../library-tests/frameworks/JsonNET/Json.cs | 8 +- .../frameworks/JsonNET/Json.expected | 2 +- csharp/ql/test/resources/stubs/JsonNET.cs | 56 - .../Newtonsoft.Json/13.0.1/Newtonsoft.Json.cs | 2326 +++++++++++++++++ .../13.0.1/Newtonsoft.Json.csproj | 12 + 5 files changed, 2343 insertions(+), 61 deletions(-) delete mode 100644 csharp/ql/test/resources/stubs/JsonNET.cs create mode 100644 csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.cs create mode 100644 csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj diff --git a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs index 613f5e9a811c..bcbfc9a15d13 100644 --- a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs +++ b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs @@ -1,4 +1,4 @@ -// semmle-extractor-options: ${testdir}/../../../resources/stubs/JsonNET.cs /r:System.Linq.dll +// semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -47,14 +47,14 @@ void F() Sink((string)jobject["1"]["2"]); // Linq JToken tests - Sink(jobject.First(i => true)); + Sink(jobject.First((JToken i) => true)); Sink(jobject["2"].First(i => true)); Sink(jobject["2"]["3"].First(i => true)); Sink(jobject.SelectToken("Manufacturers[0].Name")); JObject untaintedJObject = JObject.Parse(u); Sink(untaintedJObject); - Sink(untaintedJObject.First(i => true)); + Sink(untaintedJObject.First((JToken i) => true)); } public class Object @@ -64,7 +64,7 @@ public class Object [JsonIgnore] public int untainted; - public Dictionary taintedValues; + public Dictionary taintedValues; public string[] taintedArray; } diff --git a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected index 5cf53964af1a..21bc0ed919d0 100644 --- a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected +++ b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected @@ -9,7 +9,7 @@ | Json.cs:18:24:18:32 | "tainted" | Json.cs:45:18:45:29 | access to indexer | | Json.cs:18:24:18:32 | "tainted" | Json.cs:46:18:46:34 | access to indexer | | Json.cs:18:24:18:32 | "tainted" | Json.cs:47:18:47:42 | call to operator explicit conversion | -| Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:41 | call to method First | +| Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:50 | call to method First | | Json.cs:18:24:18:32 | "tainted" | Json.cs:51:18:51:46 | call to method First | | Json.cs:18:24:18:32 | "tainted" | Json.cs:52:18:52:51 | call to method First | | Json.cs:18:24:18:32 | "tainted" | Json.cs:53:18:53:61 | call to method SelectToken | diff --git a/csharp/ql/test/resources/stubs/JsonNET.cs b/csharp/ql/test/resources/stubs/JsonNET.cs deleted file mode 100644 index 707ba3583147..000000000000 --- a/csharp/ql/test/resources/stubs/JsonNET.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Newtonsoft.Json -{ - public static class JsonConvert - { - public static string ToString(int x) => null; - public static T DeserializeObject(string s) => default(T); - public static string SerializeObject(object obj) => null; - public static void PopulateObject(string s, object obj) { } - } - - public class JsonIgnoreAttribute : Attribute - { - } - - public class JsonRequiredAttribute : Attribute - { - } - - public class JsonLoadSettings { } - - public enum MemberSerialization { OptOut, OptIn, Fields } - - public class JsonObjectAttribute : Attribute - { - public JsonObjectAttribute() { } - public JsonObjectAttribute(MemberSerialization ms) { } - } -} - -namespace Newtonsoft.Json.Linq -{ - public class JToken : IEnumerable, IEnumerable - { - public virtual JToken this[object key] => null; - public virtual JToken this[string key] => null; - - public IEnumerator GetEnumerator() => null; - IEnumerator IEnumerable.GetEnumerator() => null; - - public static explicit operator string(JToken t) => null; - - public IEnumerable SelectToken(string s) => null; - } - - public class JObject : JToken - { - public static JObject Parse(string str) => null; - public static JObject Parse(string str, JsonLoadSettings settings) => null; - public JToken this[object key] => null; - public JToken this[string key] => null; - } -} diff --git a/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.cs b/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.cs new file mode 100644 index 000000000000..040a752ebbfb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.cs @@ -0,0 +1,2326 @@ +// This file contains auto-generated code. + +namespace Newtonsoft +{ + namespace Json + { + // Generated from `Newtonsoft.Json.ConstructorHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum ConstructorHandling + { + AllowNonPublicDefaultConstructor, + Default, + } + + // Generated from `Newtonsoft.Json.DateFormatHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum DateFormatHandling + { + IsoDateFormat, + MicrosoftDateFormat, + } + + // Generated from `Newtonsoft.Json.DateParseHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum DateParseHandling + { + DateTime, + DateTimeOffset, + None, + } + + // Generated from `Newtonsoft.Json.DateTimeZoneHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum DateTimeZoneHandling + { + Local, + RoundtripKind, + Unspecified, + Utc, + } + + // Generated from `Newtonsoft.Json.DefaultJsonNameTable` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DefaultJsonNameTable : Newtonsoft.Json.JsonNameTable + { + public string Add(string key) => throw null; + public DefaultJsonNameTable() => throw null; + public override string Get(System.Char[] key, int start, int length) => throw null; + } + + // Generated from `Newtonsoft.Json.DefaultValueHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + [System.Flags] + public enum DefaultValueHandling + { + Ignore, + IgnoreAndPopulate, + Include, + Populate, + } + + // Generated from `Newtonsoft.Json.FloatFormatHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum FloatFormatHandling + { + DefaultValue, + String, + Symbol, + } + + // Generated from `Newtonsoft.Json.FloatParseHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum FloatParseHandling + { + Decimal, + Double, + } + + // Generated from `Newtonsoft.Json.Formatting` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum Formatting + { + Indented, + None, + } + + // Generated from `Newtonsoft.Json.IArrayPool<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IArrayPool + { + T[] Rent(int minimumLength); + void Return(T[] array); + } + + // Generated from `Newtonsoft.Json.IJsonLineInfo` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IJsonLineInfo + { + bool HasLineInfo(); + int LineNumber { get; } + int LinePosition { get; } + } + + // Generated from `Newtonsoft.Json.JsonArrayAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonArrayAttribute : Newtonsoft.Json.JsonContainerAttribute + { + public bool AllowNullItems { get => throw null; set => throw null; } + public JsonArrayAttribute(string id) => throw null; + public JsonArrayAttribute(bool allowNullItems) => throw null; + public JsonArrayAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonConstructorAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonConstructorAttribute : System.Attribute + { + public JsonConstructorAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonContainerAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonContainerAttribute : System.Attribute + { + public string Description { get => throw null; set => throw null; } + public string Id { get => throw null; set => throw null; } + public bool IsReference { get => throw null; set => throw null; } + public object[] ItemConverterParameters { get => throw null; set => throw null; } + public System.Type ItemConverterType { get => throw null; set => throw null; } + public bool ItemIsReference { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling ItemReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling ItemTypeNameHandling { get => throw null; set => throw null; } + protected JsonContainerAttribute(string id) => throw null; + protected JsonContainerAttribute() => throw null; + public object[] NamingStrategyParameters { get => throw null; set => throw null; } + public System.Type NamingStrategyType { get => throw null; set => throw null; } + public string Title { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonConvert` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public static class JsonConvert + { + public static System.Func DefaultSettings { get => throw null; set => throw null; } + public static T DeserializeAnonymousType(string value, T anonymousTypeObject, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static T DeserializeAnonymousType(string value, T anonymousTypeObject) => throw null; + public static object DeserializeObject(string value, System.Type type, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public static object DeserializeObject(string value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static object DeserializeObject(string value, System.Type type) => throw null; + public static object DeserializeObject(string value, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static object DeserializeObject(string value) => throw null; + public static T DeserializeObject(string value, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public static T DeserializeObject(string value, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static T DeserializeObject(string value) => throw null; + public static System.Xml.Linq.XDocument DeserializeXNode(string value, string deserializeRootElementName, bool writeArrayAttribute, bool encodeSpecialCharacters) => throw null; + public static System.Xml.Linq.XDocument DeserializeXNode(string value, string deserializeRootElementName, bool writeArrayAttribute) => throw null; + public static System.Xml.Linq.XDocument DeserializeXNode(string value, string deserializeRootElementName) => throw null; + public static System.Xml.Linq.XDocument DeserializeXNode(string value) => throw null; + public static System.Xml.XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName, bool writeArrayAttribute, bool encodeSpecialCharacters) => throw null; + public static System.Xml.XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName, bool writeArrayAttribute) => throw null; + public static System.Xml.XmlDocument DeserializeXmlNode(string value, string deserializeRootElementName) => throw null; + public static System.Xml.XmlDocument DeserializeXmlNode(string value) => throw null; + public static string False; + public static string NaN; + public static string NegativeInfinity; + public static string Null; + public static void PopulateObject(string value, object target, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static void PopulateObject(string value, object target) => throw null; + public static string PositiveInfinity; + public static string SerializeObject(object value, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public static string SerializeObject(object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static string SerializeObject(object value, System.Type type, Newtonsoft.Json.Formatting formatting, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static string SerializeObject(object value, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static string SerializeObject(object value, Newtonsoft.Json.Formatting formatting, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public static string SerializeObject(object value, Newtonsoft.Json.Formatting formatting, Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static string SerializeObject(object value, Newtonsoft.Json.Formatting formatting) => throw null; + public static string SerializeObject(object value) => throw null; + public static string SerializeXNode(System.Xml.Linq.XObject node, Newtonsoft.Json.Formatting formatting, bool omitRootObject) => throw null; + public static string SerializeXNode(System.Xml.Linq.XObject node, Newtonsoft.Json.Formatting formatting) => throw null; + public static string SerializeXNode(System.Xml.Linq.XObject node) => throw null; + public static string SerializeXmlNode(System.Xml.XmlNode node, Newtonsoft.Json.Formatting formatting, bool omitRootObject) => throw null; + public static string SerializeXmlNode(System.Xml.XmlNode node, Newtonsoft.Json.Formatting formatting) => throw null; + public static string SerializeXmlNode(System.Xml.XmlNode node) => throw null; + public static string ToString(string value, System.Char delimiter, Newtonsoft.Json.StringEscapeHandling stringEscapeHandling) => throw null; + public static string ToString(string value, System.Char delimiter) => throw null; + public static string ToString(string value) => throw null; + public static string ToString(object value) => throw null; + public static string ToString(int value) => throw null; + public static string ToString(float value) => throw null; + public static string ToString(double value) => throw null; + public static string ToString(bool value) => throw null; + public static string ToString(System.Uri value) => throw null; + public static string ToString(System.UInt64 value) => throw null; + public static string ToString(System.UInt32 value) => throw null; + public static string ToString(System.UInt16 value) => throw null; + public static string ToString(System.TimeSpan value) => throw null; + public static string ToString(System.SByte value) => throw null; + public static string ToString(System.Int64 value) => throw null; + public static string ToString(System.Int16 value) => throw null; + public static string ToString(System.Guid value) => throw null; + public static string ToString(System.Enum value) => throw null; + public static string ToString(System.Decimal value) => throw null; + public static string ToString(System.DateTimeOffset value, Newtonsoft.Json.DateFormatHandling format) => throw null; + public static string ToString(System.DateTimeOffset value) => throw null; + public static string ToString(System.DateTime value, Newtonsoft.Json.DateFormatHandling format, Newtonsoft.Json.DateTimeZoneHandling timeZoneHandling) => throw null; + public static string ToString(System.DateTime value) => throw null; + public static string ToString(System.Char value) => throw null; + public static string ToString(System.Byte value) => throw null; + public static string True; + public static string Undefined; + } + + // Generated from `Newtonsoft.Json.JsonConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonConverter + { + public abstract bool CanConvert(System.Type objectType); + public virtual bool CanRead { get => throw null; } + public virtual bool CanWrite { get => throw null; } + protected JsonConverter() => throw null; + public abstract object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer); + public abstract void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer); + } + + // Generated from `Newtonsoft.Json.JsonConverter<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + protected JsonConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public abstract T ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, T existingValue, bool hasExistingValue, Newtonsoft.Json.JsonSerializer serializer); + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public abstract void WriteJson(Newtonsoft.Json.JsonWriter writer, T value, Newtonsoft.Json.JsonSerializer serializer); + } + + // Generated from `Newtonsoft.Json.JsonConverterAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonConverterAttribute : System.Attribute + { + public object[] ConverterParameters { get => throw null; } + public System.Type ConverterType { get => throw null; } + public JsonConverterAttribute(System.Type converterType, params object[] converterParameters) => throw null; + public JsonConverterAttribute(System.Type converterType) => throw null; + } + + // Generated from `Newtonsoft.Json.JsonConverterCollection` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonConverterCollection : System.Collections.ObjectModel.Collection + { + public JsonConverterCollection() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonDictionaryAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonDictionaryAttribute : Newtonsoft.Json.JsonContainerAttribute + { + public JsonDictionaryAttribute(string id) => throw null; + public JsonDictionaryAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonException` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonException : System.Exception + { + public JsonException(string message, System.Exception innerException) => throw null; + public JsonException(string message) => throw null; + public JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonException() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonExtensionDataAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonExtensionDataAttribute : System.Attribute + { + public JsonExtensionDataAttribute() => throw null; + public bool ReadData { get => throw null; set => throw null; } + public bool WriteData { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonIgnoreAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonIgnoreAttribute : System.Attribute + { + public JsonIgnoreAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonNameTable` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonNameTable + { + public abstract string Get(System.Char[] key, int start, int length); + protected JsonNameTable() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonObjectAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonObjectAttribute : Newtonsoft.Json.JsonContainerAttribute + { + public Newtonsoft.Json.NullValueHandling ItemNullValueHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Required ItemRequired { get => throw null; set => throw null; } + public JsonObjectAttribute(string id) => throw null; + public JsonObjectAttribute(Newtonsoft.Json.MemberSerialization memberSerialization) => throw null; + public JsonObjectAttribute() => throw null; + public Newtonsoft.Json.MemberSerialization MemberSerialization { get => throw null; set => throw null; } + public Newtonsoft.Json.MissingMemberHandling MissingMemberHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonPropertyAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonPropertyAttribute : System.Attribute + { + public Newtonsoft.Json.DefaultValueHandling DefaultValueHandling { get => throw null; set => throw null; } + public bool IsReference { get => throw null; set => throw null; } + public object[] ItemConverterParameters { get => throw null; set => throw null; } + public System.Type ItemConverterType { get => throw null; set => throw null; } + public bool ItemIsReference { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling ItemReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling ItemTypeNameHandling { get => throw null; set => throw null; } + public JsonPropertyAttribute(string propertyName) => throw null; + public JsonPropertyAttribute() => throw null; + public object[] NamingStrategyParameters { get => throw null; set => throw null; } + public System.Type NamingStrategyType { get => throw null; set => throw null; } + public Newtonsoft.Json.NullValueHandling NullValueHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.ObjectCreationHandling ObjectCreationHandling { get => throw null; set => throw null; } + public int Order { get => throw null; set => throw null; } + public string PropertyName { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling ReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Required Required { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling TypeNameHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonReader` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonReader : System.IDisposable + { + public virtual void Close() => throw null; + public bool CloseInput { get => throw null; set => throw null; } + public System.Globalization.CultureInfo Culture { get => throw null; set => throw null; } + protected Newtonsoft.Json.JsonReader.State CurrentState { get => throw null; } + public string DateFormatString { get => throw null; set => throw null; } + public Newtonsoft.Json.DateParseHandling DateParseHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.DateTimeZoneHandling DateTimeZoneHandling { get => throw null; set => throw null; } + public virtual int Depth { get => throw null; } + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Newtonsoft.Json.FloatParseHandling FloatParseHandling { get => throw null; set => throw null; } + protected JsonReader() => throw null; + public int? MaxDepth { get => throw null; set => throw null; } + public virtual string Path { get => throw null; } + public virtual System.Char QuoteChar { get => throw null; set => throw null; } + public abstract bool Read(); + public virtual bool? ReadAsBoolean() => throw null; + public virtual System.Threading.Tasks.Task ReadAsBooleanAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Byte[] ReadAsBytes() => throw null; + public virtual System.Threading.Tasks.Task ReadAsBytesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.DateTime? ReadAsDateTime() => throw null; + public virtual System.Threading.Tasks.Task ReadAsDateTimeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.DateTimeOffset? ReadAsDateTimeOffset() => throw null; + public virtual System.Threading.Tasks.Task ReadAsDateTimeOffsetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Decimal? ReadAsDecimal() => throw null; + public virtual System.Threading.Tasks.Task ReadAsDecimalAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual double? ReadAsDouble() => throw null; + public virtual System.Threading.Tasks.Task ReadAsDoubleAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual int? ReadAsInt32() => throw null; + public virtual System.Threading.Tasks.Task ReadAsInt32Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual string ReadAsString() => throw null; + public virtual System.Threading.Tasks.Task ReadAsStringAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected void SetStateBasedOnCurrent() => throw null; + protected void SetToken(Newtonsoft.Json.JsonToken newToken, object value, bool updateIndex) => throw null; + protected void SetToken(Newtonsoft.Json.JsonToken newToken, object value) => throw null; + protected void SetToken(Newtonsoft.Json.JsonToken newToken) => throw null; + public void Skip() => throw null; + public System.Threading.Tasks.Task SkipAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + // Generated from `Newtonsoft.Json.JsonReader+State` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + protected internal enum State + { + Array, + ArrayStart, + Closed, + Complete, + Constructor, + ConstructorStart, + Error, + Finished, + Object, + ObjectStart, + PostValue, + Property, + Start, + } + + + public bool SupportMultipleContent { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.JsonToken TokenType { get => throw null; } + public virtual object Value { get => throw null; } + public virtual System.Type ValueType { get => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonReaderException` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonReaderException : Newtonsoft.Json.JsonException + { + public JsonReaderException(string message, string path, int lineNumber, int linePosition, System.Exception innerException) => throw null; + public JsonReaderException(string message, System.Exception innerException) => throw null; + public JsonReaderException(string message) => throw null; + public JsonReaderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonReaderException() => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonRequiredAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonRequiredAttribute : System.Attribute + { + public JsonRequiredAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.JsonSerializationException` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSerializationException : Newtonsoft.Json.JsonException + { + public JsonSerializationException(string message, string path, int lineNumber, int linePosition, System.Exception innerException) => throw null; + public JsonSerializationException(string message, System.Exception innerException) => throw null; + public JsonSerializationException(string message) => throw null; + public JsonSerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonSerializationException() => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonSerializer` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSerializer + { + public virtual System.Runtime.Serialization.SerializationBinder Binder { get => throw null; set => throw null; } + public virtual bool CheckAdditionalContent { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.ConstructorHandling ConstructorHandling { get => throw null; set => throw null; } + public virtual System.Runtime.Serialization.StreamingContext Context { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Serialization.IContractResolver ContractResolver { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.JsonConverterCollection Converters { get => throw null; } + public static Newtonsoft.Json.JsonSerializer Create(Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static Newtonsoft.Json.JsonSerializer Create() => throw null; + public static Newtonsoft.Json.JsonSerializer CreateDefault(Newtonsoft.Json.JsonSerializerSettings settings) => throw null; + public static Newtonsoft.Json.JsonSerializer CreateDefault() => throw null; + public virtual System.Globalization.CultureInfo Culture { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.DateFormatHandling DateFormatHandling { get => throw null; set => throw null; } + public virtual string DateFormatString { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.DateParseHandling DateParseHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.DateTimeZoneHandling DateTimeZoneHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.DefaultValueHandling DefaultValueHandling { get => throw null; set => throw null; } + public object Deserialize(System.IO.TextReader reader, System.Type objectType) => throw null; + public object Deserialize(Newtonsoft.Json.JsonReader reader, System.Type objectType) => throw null; + public object Deserialize(Newtonsoft.Json.JsonReader reader) => throw null; + public T Deserialize(Newtonsoft.Json.JsonReader reader) => throw null; + public virtual System.Collections.IEqualityComparer EqualityComparer { get => throw null; set => throw null; } + public virtual event System.EventHandler Error; + public virtual Newtonsoft.Json.FloatFormatHandling FloatFormatHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.FloatParseHandling FloatParseHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Formatting Formatting { get => throw null; set => throw null; } + public JsonSerializer() => throw null; + public virtual int? MaxDepth { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.MetadataPropertyHandling MetadataPropertyHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.MissingMemberHandling MissingMemberHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.NullValueHandling NullValueHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.ObjectCreationHandling ObjectCreationHandling { get => throw null; set => throw null; } + public void Populate(System.IO.TextReader reader, object target) => throw null; + public void Populate(Newtonsoft.Json.JsonReader reader, object target) => throw null; + public virtual Newtonsoft.Json.PreserveReferencesHandling PreserveReferencesHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.ReferenceLoopHandling ReferenceLoopHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Serialization.IReferenceResolver ReferenceResolver { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Serialization.ISerializationBinder SerializationBinder { get => throw null; set => throw null; } + public void Serialize(System.IO.TextWriter textWriter, object value, System.Type objectType) => throw null; + public void Serialize(System.IO.TextWriter textWriter, object value) => throw null; + public void Serialize(Newtonsoft.Json.JsonWriter jsonWriter, object value, System.Type objectType) => throw null; + public void Serialize(Newtonsoft.Json.JsonWriter jsonWriter, object value) => throw null; + public virtual Newtonsoft.Json.StringEscapeHandling StringEscapeHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Serialization.ITraceWriter TraceWriter { get => throw null; set => throw null; } + public virtual System.Runtime.Serialization.Formatters.FormatterAssemblyStyle TypeNameAssemblyFormat { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.TypeNameHandling TypeNameHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonSerializerSettings` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSerializerSettings + { + public System.Runtime.Serialization.SerializationBinder Binder { get => throw null; set => throw null; } + public bool CheckAdditionalContent { get => throw null; set => throw null; } + public Newtonsoft.Json.ConstructorHandling ConstructorHandling { get => throw null; set => throw null; } + public System.Runtime.Serialization.StreamingContext Context { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.IContractResolver ContractResolver { get => throw null; set => throw null; } + public System.Collections.Generic.IList Converters { get => throw null; set => throw null; } + public System.Globalization.CultureInfo Culture { get => throw null; set => throw null; } + public Newtonsoft.Json.DateFormatHandling DateFormatHandling { get => throw null; set => throw null; } + public string DateFormatString { get => throw null; set => throw null; } + public Newtonsoft.Json.DateParseHandling DateParseHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.DateTimeZoneHandling DateTimeZoneHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.DefaultValueHandling DefaultValueHandling { get => throw null; set => throw null; } + public System.Collections.IEqualityComparer EqualityComparer { get => throw null; set => throw null; } + public System.EventHandler Error { get => throw null; set => throw null; } + public Newtonsoft.Json.FloatFormatHandling FloatFormatHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.FloatParseHandling FloatParseHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Formatting Formatting { get => throw null; set => throw null; } + public JsonSerializerSettings() => throw null; + public int? MaxDepth { get => throw null; set => throw null; } + public Newtonsoft.Json.MetadataPropertyHandling MetadataPropertyHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.MissingMemberHandling MissingMemberHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.NullValueHandling NullValueHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.ObjectCreationHandling ObjectCreationHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.PreserveReferencesHandling PreserveReferencesHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling ReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.IReferenceResolver ReferenceResolver { get => throw null; set => throw null; } + public System.Func ReferenceResolverProvider { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.ISerializationBinder SerializationBinder { get => throw null; set => throw null; } + public Newtonsoft.Json.StringEscapeHandling StringEscapeHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.ITraceWriter TraceWriter { get => throw null; set => throw null; } + public System.Runtime.Serialization.Formatters.FormatterAssemblyStyle TypeNameAssemblyFormat { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling TypeNameHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonTextReader` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonTextReader : Newtonsoft.Json.JsonReader, Newtonsoft.Json.IJsonLineInfo + { + public Newtonsoft.Json.IArrayPool ArrayPool { get => throw null; set => throw null; } + public override void Close() => throw null; + public bool HasLineInfo() => throw null; + public JsonTextReader(System.IO.TextReader reader) => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public Newtonsoft.Json.JsonNameTable PropertyNameTable { get => throw null; set => throw null; } + public override bool Read() => throw null; + public override bool? ReadAsBoolean() => throw null; + public override System.Threading.Tasks.Task ReadAsBooleanAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Byte[] ReadAsBytes() => throw null; + public override System.Threading.Tasks.Task ReadAsBytesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.DateTime? ReadAsDateTime() => throw null; + public override System.Threading.Tasks.Task ReadAsDateTimeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.DateTimeOffset? ReadAsDateTimeOffset() => throw null; + public override System.Threading.Tasks.Task ReadAsDateTimeOffsetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Decimal? ReadAsDecimal() => throw null; + public override System.Threading.Tasks.Task ReadAsDecimalAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override double? ReadAsDouble() => throw null; + public override System.Threading.Tasks.Task ReadAsDoubleAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override int? ReadAsInt32() => throw null; + public override System.Threading.Tasks.Task ReadAsInt32Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override string ReadAsString() => throw null; + public override System.Threading.Tasks.Task ReadAsStringAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Newtonsoft.Json.JsonTextWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonTextWriter : Newtonsoft.Json.JsonWriter + { + public Newtonsoft.Json.IArrayPool ArrayPool { get => throw null; set => throw null; } + public override void Close() => throw null; + public override System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Char IndentChar { get => throw null; set => throw null; } + public int Indentation { get => throw null; set => throw null; } + public JsonTextWriter(System.IO.TextWriter textWriter) => throw null; + public System.Char QuoteChar { get => throw null; set => throw null; } + public bool QuoteName { get => throw null; set => throw null; } + public override void WriteComment(string text) => throw null; + public override System.Threading.Tasks.Task WriteCommentAsync(string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected override void WriteEnd(Newtonsoft.Json.JsonToken token) => throw null; + public override System.Threading.Tasks.Task WriteEndArrayAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteEndAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected override System.Threading.Tasks.Task WriteEndAsync(Newtonsoft.Json.JsonToken token, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task WriteEndConstructorAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteEndObjectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected override void WriteIndent() => throw null; + protected override System.Threading.Tasks.Task WriteIndentAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected override void WriteIndentSpace() => throw null; + protected override System.Threading.Tasks.Task WriteIndentSpaceAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteNull() => throw null; + public override System.Threading.Tasks.Task WriteNullAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WritePropertyName(string name, bool escape) => throw null; + public override void WritePropertyName(string name) => throw null; + public override System.Threading.Tasks.Task WritePropertyNameAsync(string name, bool escape, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WritePropertyNameAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteRaw(string json) => throw null; + public override System.Threading.Tasks.Task WriteRawAsync(string json, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteRawValueAsync(string json, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteStartArray() => throw null; + public override System.Threading.Tasks.Task WriteStartArrayAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteStartConstructor(string name) => throw null; + public override System.Threading.Tasks.Task WriteStartConstructorAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteStartObject() => throw null; + public override System.Threading.Tasks.Task WriteStartObjectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteUndefined() => throw null; + public override System.Threading.Tasks.Task WriteUndefinedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override void WriteValue(string value) => throw null; + public override void WriteValue(object value) => throw null; + public override void WriteValue(int value) => throw null; + public override void WriteValue(float? value) => throw null; + public override void WriteValue(float value) => throw null; + public override void WriteValue(double? value) => throw null; + public override void WriteValue(double value) => throw null; + public override void WriteValue(bool value) => throw null; + public override void WriteValue(System.Uri value) => throw null; + public override void WriteValue(System.UInt64 value) => throw null; + public override void WriteValue(System.UInt32 value) => throw null; + public override void WriteValue(System.UInt16 value) => throw null; + public override void WriteValue(System.TimeSpan value) => throw null; + public override void WriteValue(System.SByte value) => throw null; + public override void WriteValue(System.Int64 value) => throw null; + public override void WriteValue(System.Int16 value) => throw null; + public override void WriteValue(System.Guid value) => throw null; + public override void WriteValue(System.Decimal value) => throw null; + public override void WriteValue(System.DateTimeOffset value) => throw null; + public override void WriteValue(System.DateTime value) => throw null; + public override void WriteValue(System.Char value) => throw null; + public override void WriteValue(System.Byte[] value) => throw null; + public override void WriteValue(System.Byte value) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(object value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(int? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(int value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(float? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(float value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(double? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(double value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(bool? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(bool value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Uri value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt64? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt64 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt32? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt32 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt16? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.UInt16 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.TimeSpan? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.TimeSpan value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.SByte? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.SByte value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Int64? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Int64 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Int16? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Int16 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Guid? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Guid value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Decimal? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Decimal value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.DateTimeOffset? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.DateTimeOffset value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.DateTime? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.DateTime value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Char? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Char value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Byte[] value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Byte? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task WriteValueAsync(System.Byte value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected override void WriteValueDelimiter() => throw null; + protected override System.Threading.Tasks.Task WriteValueDelimiterAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void WriteWhitespace(string ws) => throw null; + public override System.Threading.Tasks.Task WriteWhitespaceAsync(string ws, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Newtonsoft.Json.JsonToken` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum JsonToken + { + Boolean, + Bytes, + Comment, + Date, + EndArray, + EndConstructor, + EndObject, + Float, + Integer, + None, + Null, + PropertyName, + Raw, + StartArray, + StartConstructor, + StartObject, + String, + Undefined, + } + + // Generated from `Newtonsoft.Json.JsonValidatingReader` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonValidatingReader : Newtonsoft.Json.JsonReader, Newtonsoft.Json.IJsonLineInfo + { + public override void Close() => throw null; + public override int Depth { get => throw null; } + bool Newtonsoft.Json.IJsonLineInfo.HasLineInfo() => throw null; + public JsonValidatingReader(Newtonsoft.Json.JsonReader reader) => throw null; + int Newtonsoft.Json.IJsonLineInfo.LineNumber { get => throw null; } + int Newtonsoft.Json.IJsonLineInfo.LinePosition { get => throw null; } + public override string Path { get => throw null; } + public override System.Char QuoteChar { get => throw null; set => throw null; } + public override bool Read() => throw null; + public override bool? ReadAsBoolean() => throw null; + public override System.Byte[] ReadAsBytes() => throw null; + public override System.DateTime? ReadAsDateTime() => throw null; + public override System.DateTimeOffset? ReadAsDateTimeOffset() => throw null; + public override System.Decimal? ReadAsDecimal() => throw null; + public override double? ReadAsDouble() => throw null; + public override int? ReadAsInt32() => throw null; + public override string ReadAsString() => throw null; + public Newtonsoft.Json.JsonReader Reader { get => throw null; } + public Newtonsoft.Json.Schema.JsonSchema Schema { get => throw null; set => throw null; } + public override Newtonsoft.Json.JsonToken TokenType { get => throw null; } + public event Newtonsoft.Json.Schema.ValidationEventHandler ValidationEventHandler; + public override object Value { get => throw null; } + public override System.Type ValueType { get => throw null; } + } + + // Generated from `Newtonsoft.Json.JsonWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonWriter : System.IDisposable + { + public bool AutoCompleteOnClose { get => throw null; set => throw null; } + public virtual void Close() => throw null; + public virtual System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public bool CloseOutput { get => throw null; set => throw null; } + public System.Globalization.CultureInfo Culture { get => throw null; set => throw null; } + public Newtonsoft.Json.DateFormatHandling DateFormatHandling { get => throw null; set => throw null; } + public string DateFormatString { get => throw null; set => throw null; } + public Newtonsoft.Json.DateTimeZoneHandling DateTimeZoneHandling { get => throw null; set => throw null; } + void System.IDisposable.Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public Newtonsoft.Json.FloatFormatHandling FloatFormatHandling { get => throw null; set => throw null; } + public abstract void Flush(); + public virtual System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public Newtonsoft.Json.Formatting Formatting { get => throw null; set => throw null; } + protected JsonWriter() => throw null; + public string Path { get => throw null; } + protected void SetWriteState(Newtonsoft.Json.JsonToken token, object value) => throw null; + protected System.Threading.Tasks.Task SetWriteStateAsync(Newtonsoft.Json.JsonToken token, object value, System.Threading.CancellationToken cancellationToken) => throw null; + public Newtonsoft.Json.StringEscapeHandling StringEscapeHandling { get => throw null; set => throw null; } + protected internal int Top { get => throw null; } + public virtual void WriteComment(string text) => throw null; + public virtual System.Threading.Tasks.Task WriteCommentAsync(string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteEnd() => throw null; + protected virtual void WriteEnd(Newtonsoft.Json.JsonToken token) => throw null; + public virtual void WriteEndArray() => throw null; + public virtual System.Threading.Tasks.Task WriteEndArrayAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteEndAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual System.Threading.Tasks.Task WriteEndAsync(Newtonsoft.Json.JsonToken token, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void WriteEndConstructor() => throw null; + public virtual System.Threading.Tasks.Task WriteEndConstructorAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteEndObject() => throw null; + public virtual System.Threading.Tasks.Task WriteEndObjectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual void WriteIndent() => throw null; + protected virtual System.Threading.Tasks.Task WriteIndentAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void WriteIndentSpace() => throw null; + protected virtual System.Threading.Tasks.Task WriteIndentSpaceAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void WriteNull() => throw null; + public virtual System.Threading.Tasks.Task WriteNullAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WritePropertyName(string name, bool escape) => throw null; + public virtual void WritePropertyName(string name) => throw null; + public virtual System.Threading.Tasks.Task WritePropertyNameAsync(string name, bool escape, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WritePropertyNameAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteRaw(string json) => throw null; + public virtual System.Threading.Tasks.Task WriteRawAsync(string json, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteRawValue(string json) => throw null; + public virtual System.Threading.Tasks.Task WriteRawValueAsync(string json, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteStartArray() => throw null; + public virtual System.Threading.Tasks.Task WriteStartArrayAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteStartConstructor(string name) => throw null; + public virtual System.Threading.Tasks.Task WriteStartConstructorAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteStartObject() => throw null; + public virtual System.Threading.Tasks.Task WriteStartObjectAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public Newtonsoft.Json.WriteState WriteState { get => throw null; } + public void WriteToken(Newtonsoft.Json.JsonToken token, object value) => throw null; + public void WriteToken(Newtonsoft.Json.JsonToken token) => throw null; + public void WriteToken(Newtonsoft.Json.JsonReader reader, bool writeChildren) => throw null; + public void WriteToken(Newtonsoft.Json.JsonReader reader) => throw null; + public System.Threading.Tasks.Task WriteTokenAsync(Newtonsoft.Json.JsonToken token, object value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task WriteTokenAsync(Newtonsoft.Json.JsonToken token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task WriteTokenAsync(Newtonsoft.Json.JsonReader reader, bool writeChildren, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task WriteTokenAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteUndefined() => throw null; + public virtual System.Threading.Tasks.Task WriteUndefinedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual void WriteValue(string value) => throw null; + public virtual void WriteValue(object value) => throw null; + public virtual void WriteValue(int? value) => throw null; + public virtual void WriteValue(int value) => throw null; + public virtual void WriteValue(float? value) => throw null; + public virtual void WriteValue(float value) => throw null; + public virtual void WriteValue(double? value) => throw null; + public virtual void WriteValue(double value) => throw null; + public virtual void WriteValue(bool? value) => throw null; + public virtual void WriteValue(bool value) => throw null; + public virtual void WriteValue(System.Uri value) => throw null; + public virtual void WriteValue(System.UInt64? value) => throw null; + public virtual void WriteValue(System.UInt64 value) => throw null; + public virtual void WriteValue(System.UInt32? value) => throw null; + public virtual void WriteValue(System.UInt32 value) => throw null; + public virtual void WriteValue(System.UInt16? value) => throw null; + public virtual void WriteValue(System.UInt16 value) => throw null; + public virtual void WriteValue(System.TimeSpan? value) => throw null; + public virtual void WriteValue(System.TimeSpan value) => throw null; + public virtual void WriteValue(System.SByte? value) => throw null; + public virtual void WriteValue(System.SByte value) => throw null; + public virtual void WriteValue(System.Int64? value) => throw null; + public virtual void WriteValue(System.Int64 value) => throw null; + public virtual void WriteValue(System.Int16? value) => throw null; + public virtual void WriteValue(System.Int16 value) => throw null; + public virtual void WriteValue(System.Guid? value) => throw null; + public virtual void WriteValue(System.Guid value) => throw null; + public virtual void WriteValue(System.Decimal? value) => throw null; + public virtual void WriteValue(System.Decimal value) => throw null; + public virtual void WriteValue(System.DateTimeOffset? value) => throw null; + public virtual void WriteValue(System.DateTimeOffset value) => throw null; + public virtual void WriteValue(System.DateTime? value) => throw null; + public virtual void WriteValue(System.DateTime value) => throw null; + public virtual void WriteValue(System.Char? value) => throw null; + public virtual void WriteValue(System.Char value) => throw null; + public virtual void WriteValue(System.Byte[] value) => throw null; + public virtual void WriteValue(System.Byte? value) => throw null; + public virtual void WriteValue(System.Byte value) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(object value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(int? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(int value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(float? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(float value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(double? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(double value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(bool? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(bool value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Uri value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt64? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt64 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt32? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt32 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt16? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.UInt16 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.TimeSpan? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.TimeSpan value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.SByte? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.SByte value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Int64? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Int64 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Int16? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Int16 value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Guid? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Guid value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Decimal? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Decimal value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.DateTimeOffset? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.DateTimeOffset value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.DateTime? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.DateTime value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Char? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Char value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Byte[] value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Byte? value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual System.Threading.Tasks.Task WriteValueAsync(System.Byte value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual void WriteValueDelimiter() => throw null; + protected virtual System.Threading.Tasks.Task WriteValueDelimiterAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void WriteWhitespace(string ws) => throw null; + public virtual System.Threading.Tasks.Task WriteWhitespaceAsync(string ws, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `Newtonsoft.Json.JsonWriterException` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonWriterException : Newtonsoft.Json.JsonException + { + public JsonWriterException(string message, string path, System.Exception innerException) => throw null; + public JsonWriterException(string message, System.Exception innerException) => throw null; + public JsonWriterException(string message) => throw null; + public JsonWriterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonWriterException() => throw null; + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.MemberSerialization` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum MemberSerialization + { + Fields, + OptIn, + OptOut, + } + + // Generated from `Newtonsoft.Json.MetadataPropertyHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum MetadataPropertyHandling + { + Default, + Ignore, + ReadAhead, + } + + // Generated from `Newtonsoft.Json.MissingMemberHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum MissingMemberHandling + { + Error, + Ignore, + } + + // Generated from `Newtonsoft.Json.NullValueHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum NullValueHandling + { + Ignore, + Include, + } + + // Generated from `Newtonsoft.Json.ObjectCreationHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum ObjectCreationHandling + { + Auto, + Replace, + Reuse, + } + + // Generated from `Newtonsoft.Json.PreserveReferencesHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + [System.Flags] + public enum PreserveReferencesHandling + { + All, + Arrays, + None, + Objects, + } + + // Generated from `Newtonsoft.Json.ReferenceLoopHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum ReferenceLoopHandling + { + Error, + Ignore, + Serialize, + } + + // Generated from `Newtonsoft.Json.Required` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum Required + { + AllowNull, + Always, + Default, + DisallowNull, + } + + // Generated from `Newtonsoft.Json.StringEscapeHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum StringEscapeHandling + { + Default, + EscapeHtml, + EscapeNonAscii, + } + + // Generated from `Newtonsoft.Json.TypeNameAssemblyFormatHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum TypeNameAssemblyFormatHandling + { + Full, + Simple, + } + + // Generated from `Newtonsoft.Json.TypeNameHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + [System.Flags] + public enum TypeNameHandling + { + All, + Arrays, + Auto, + None, + Objects, + } + + // Generated from `Newtonsoft.Json.WriteState` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum WriteState + { + Array, + Closed, + Constructor, + Error, + Object, + Property, + Start, + } + + namespace Bson + { + // Generated from `Newtonsoft.Json.Bson.BsonObjectId` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class BsonObjectId + { + public BsonObjectId(System.Byte[] value) => throw null; + public System.Byte[] Value { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Bson.BsonReader` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class BsonReader : Newtonsoft.Json.JsonReader + { + public BsonReader(System.IO.Stream stream, bool readRootValueAsArray, System.DateTimeKind dateTimeKindHandling) => throw null; + public BsonReader(System.IO.Stream stream) => throw null; + public BsonReader(System.IO.BinaryReader reader, bool readRootValueAsArray, System.DateTimeKind dateTimeKindHandling) => throw null; + public BsonReader(System.IO.BinaryReader reader) => throw null; + public override void Close() => throw null; + public System.DateTimeKind DateTimeKindHandling { get => throw null; set => throw null; } + public bool JsonNet35BinaryCompatibility { get => throw null; set => throw null; } + public override bool Read() => throw null; + public bool ReadRootValueAsArray { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Bson.BsonWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class BsonWriter : Newtonsoft.Json.JsonWriter + { + public BsonWriter(System.IO.Stream stream) => throw null; + public BsonWriter(System.IO.BinaryWriter writer) => throw null; + public override void Close() => throw null; + public System.DateTimeKind DateTimeKindHandling { get => throw null; set => throw null; } + public override void Flush() => throw null; + public override void WriteComment(string text) => throw null; + protected override void WriteEnd(Newtonsoft.Json.JsonToken token) => throw null; + public override void WriteNull() => throw null; + public void WriteObjectId(System.Byte[] value) => throw null; + public override void WritePropertyName(string name) => throw null; + public override void WriteRaw(string json) => throw null; + public override void WriteRawValue(string json) => throw null; + public void WriteRegex(string pattern, string options) => throw null; + public override void WriteStartArray() => throw null; + public override void WriteStartConstructor(string name) => throw null; + public override void WriteStartObject() => throw null; + public override void WriteUndefined() => throw null; + public override void WriteValue(string value) => throw null; + public override void WriteValue(object value) => throw null; + public override void WriteValue(int value) => throw null; + public override void WriteValue(float value) => throw null; + public override void WriteValue(double value) => throw null; + public override void WriteValue(bool value) => throw null; + public override void WriteValue(System.Uri value) => throw null; + public override void WriteValue(System.UInt64 value) => throw null; + public override void WriteValue(System.UInt32 value) => throw null; + public override void WriteValue(System.UInt16 value) => throw null; + public override void WriteValue(System.TimeSpan value) => throw null; + public override void WriteValue(System.SByte value) => throw null; + public override void WriteValue(System.Int64 value) => throw null; + public override void WriteValue(System.Int16 value) => throw null; + public override void WriteValue(System.Guid value) => throw null; + public override void WriteValue(System.Decimal value) => throw null; + public override void WriteValue(System.DateTimeOffset value) => throw null; + public override void WriteValue(System.DateTime value) => throw null; + public override void WriteValue(System.Char value) => throw null; + public override void WriteValue(System.Byte[] value) => throw null; + public override void WriteValue(System.Byte value) => throw null; + } + + } + namespace Converters + { + // Generated from `Newtonsoft.Json.Converters.BinaryConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class BinaryConverter : Newtonsoft.Json.JsonConverter + { + public BinaryConverter() => throw null; + public override bool CanConvert(System.Type objectType) => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.BsonObjectIdConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class BsonObjectIdConverter : Newtonsoft.Json.JsonConverter + { + public BsonObjectIdConverter() => throw null; + public override bool CanConvert(System.Type objectType) => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.CustomCreationConverter<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class CustomCreationConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public override bool CanWrite { get => throw null; } + public abstract T Create(System.Type objectType); + protected CustomCreationConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.DataSetConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DataSetConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type valueType) => throw null; + public DataSetConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.DataTableConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DataTableConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type valueType) => throw null; + public DataTableConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.DateTimeConverterBase` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class DateTimeConverterBase : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + protected DateTimeConverterBase() => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.DiscriminatedUnionConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DiscriminatedUnionConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public DiscriminatedUnionConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.EntityKeyMemberConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class EntityKeyMemberConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public EntityKeyMemberConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.ExpandoObjectConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ExpandoObjectConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public override bool CanWrite { get => throw null; } + public ExpandoObjectConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.IsoDateTimeConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class IsoDateTimeConverter : Newtonsoft.Json.Converters.DateTimeConverterBase + { + public System.Globalization.CultureInfo Culture { get => throw null; set => throw null; } + public string DateTimeFormat { get => throw null; set => throw null; } + public System.Globalization.DateTimeStyles DateTimeStyles { get => throw null; set => throw null; } + public IsoDateTimeConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.JavaScriptDateTimeConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JavaScriptDateTimeConverter : Newtonsoft.Json.Converters.DateTimeConverterBase + { + public JavaScriptDateTimeConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.KeyValuePairConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class KeyValuePairConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public KeyValuePairConverter() => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.RegexConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class RegexConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public RegexConverter() => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.StringEnumConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class StringEnumConverter : Newtonsoft.Json.JsonConverter + { + public bool AllowIntegerValues { get => throw null; set => throw null; } + public bool CamelCaseText { get => throw null; set => throw null; } + public override bool CanConvert(System.Type objectType) => throw null; + public Newtonsoft.Json.Serialization.NamingStrategy NamingStrategy { get => throw null; set => throw null; } + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public StringEnumConverter(bool camelCaseText) => throw null; + public StringEnumConverter(System.Type namingStrategyType, object[] namingStrategyParameters, bool allowIntegerValues) => throw null; + public StringEnumConverter(System.Type namingStrategyType, object[] namingStrategyParameters) => throw null; + public StringEnumConverter(System.Type namingStrategyType) => throw null; + public StringEnumConverter(Newtonsoft.Json.Serialization.NamingStrategy namingStrategy, bool allowIntegerValues = default(bool)) => throw null; + public StringEnumConverter() => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.UnixDateTimeConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class UnixDateTimeConverter : Newtonsoft.Json.Converters.DateTimeConverterBase + { + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public UnixDateTimeConverter() => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.VersionConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class VersionConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type objectType) => throw null; + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public VersionConverter() => throw null; + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + } + + // Generated from `Newtonsoft.Json.Converters.XmlNodeConverter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class XmlNodeConverter : Newtonsoft.Json.JsonConverter + { + public override bool CanConvert(System.Type valueType) => throw null; + public string DeserializeRootElementName { get => throw null; set => throw null; } + public bool EncodeSpecialCharacters { get => throw null; set => throw null; } + public bool OmitRootObject { get => throw null; set => throw null; } + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public bool WriteArrayAttribute { get => throw null; set => throw null; } + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) => throw null; + public XmlNodeConverter() => throw null; + } + + } + namespace Linq + { + // Generated from `Newtonsoft.Json.Linq.CommentHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum CommentHandling + { + Ignore, + Load, + } + + // Generated from `Newtonsoft.Json.Linq.DuplicatePropertyNameHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum DuplicatePropertyNameHandling + { + Error, + Ignore, + Replace, + } + + // Generated from `Newtonsoft.Json.Linq.Extensions` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public static class Extensions + { + public static Newtonsoft.Json.Linq.IJEnumerable Ancestors(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable AncestorsAndSelf(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable AsJEnumerable(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable AsJEnumerable(this System.Collections.Generic.IEnumerable source) => throw null; + public static System.Collections.Generic.IEnumerable Children(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable Children(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable Descendants(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JContainer => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable DescendantsAndSelf(this System.Collections.Generic.IEnumerable source) where T : Newtonsoft.Json.Linq.JContainer => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable Properties(this System.Collections.Generic.IEnumerable source) => throw null; + public static U Value(this System.Collections.Generic.IEnumerable value) => throw null; + public static U Value(this System.Collections.Generic.IEnumerable value) where T : Newtonsoft.Json.Linq.JToken => throw null; + public static System.Collections.Generic.IEnumerable Values(this System.Collections.Generic.IEnumerable source, object key) => throw null; + public static System.Collections.Generic.IEnumerable Values(this System.Collections.Generic.IEnumerable source) => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable Values(this System.Collections.Generic.IEnumerable source, object key) => throw null; + public static Newtonsoft.Json.Linq.IJEnumerable Values(this System.Collections.Generic.IEnumerable source) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.IJEnumerable<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IJEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable where T : Newtonsoft.Json.Linq.JToken + { + Newtonsoft.Json.Linq.IJEnumerable this[object key] { get; } + } + + // Generated from `Newtonsoft.Json.Linq.JArray` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JArray : Newtonsoft.Json.Linq.JContainer, System.Collections.IEnumerable, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(Newtonsoft.Json.Linq.JToken item) => throw null; + protected override System.Collections.Generic.IList ChildrenTokens { get => throw null; } + public void Clear() => throw null; + public bool Contains(Newtonsoft.Json.Linq.JToken item) => throw null; + public void CopyTo(Newtonsoft.Json.Linq.JToken[] array, int arrayIndex) => throw null; + public static Newtonsoft.Json.Linq.JArray FromObject(object o, Newtonsoft.Json.JsonSerializer jsonSerializer) => throw null; + public static Newtonsoft.Json.Linq.JArray FromObject(object o) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + public int IndexOf(Newtonsoft.Json.Linq.JToken item) => throw null; + public void Insert(int index, Newtonsoft.Json.Linq.JToken item) => throw null; + public bool IsReadOnly { get => throw null; } + public override Newtonsoft.Json.Linq.JToken this[object key] { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.JToken this[int index] { get => throw null; set => throw null; } + public JArray(params object[] content) => throw null; + public JArray(object content) => throw null; + public JArray(Newtonsoft.Json.Linq.JArray other) => throw null; + public JArray() => throw null; + public static Newtonsoft.Json.Linq.JArray Load(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JArray Load(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static Newtonsoft.Json.Linq.JArray Parse(string json, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JArray Parse(string json) => throw null; + public bool Remove(Newtonsoft.Json.Linq.JToken item) => throw null; + public void RemoveAt(int index) => throw null; + public override Newtonsoft.Json.Linq.JTokenType Type { get => throw null; } + public override void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JConstructor` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JConstructor : Newtonsoft.Json.Linq.JContainer + { + protected override System.Collections.Generic.IList ChildrenTokens { get => throw null; } + public override Newtonsoft.Json.Linq.JToken this[object key] { get => throw null; set => throw null; } + public JConstructor(string name, params object[] content) => throw null; + public JConstructor(string name, object content) => throw null; + public JConstructor(string name) => throw null; + public JConstructor(Newtonsoft.Json.Linq.JConstructor other) => throw null; + public JConstructor() => throw null; + public static Newtonsoft.Json.Linq.JConstructor Load(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JConstructor Load(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public string Name { get => throw null; set => throw null; } + public override Newtonsoft.Json.Linq.JTokenType Type { get => throw null; } + public override void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JContainer` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JContainer : Newtonsoft.Json.Linq.JToken, System.ComponentModel.ITypedList, System.ComponentModel.IBindingList, System.Collections.Specialized.INotifyCollectionChanged, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(Newtonsoft.Json.Linq.JToken item) => throw null; + public virtual void Add(object content) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public void AddFirst(object content) => throw null; + void System.ComponentModel.IBindingList.AddIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + object System.ComponentModel.IBindingList.AddNew() => throw null; + public event System.ComponentModel.AddingNewEventHandler AddingNew; + bool System.ComponentModel.IBindingList.AllowEdit { get => throw null; } + bool System.ComponentModel.IBindingList.AllowNew { get => throw null; } + bool System.ComponentModel.IBindingList.AllowRemove { get => throw null; } + void System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction) => throw null; + public override Newtonsoft.Json.Linq.JEnumerable Children() => throw null; + protected abstract System.Collections.Generic.IList ChildrenTokens { get; } + void System.Collections.IList.Clear() => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged; + bool System.Collections.IList.Contains(object value) => throw null; + bool System.Collections.Generic.ICollection.Contains(Newtonsoft.Json.Linq.JToken item) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection.CopyTo(Newtonsoft.Json.Linq.JToken[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public Newtonsoft.Json.JsonWriter CreateWriter() => throw null; + public System.Collections.Generic.IEnumerable Descendants() => throw null; + public System.Collections.Generic.IEnumerable DescendantsAndSelf() => throw null; + int System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor property, object key) => throw null; + public override Newtonsoft.Json.Linq.JToken First { get => throw null; } + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + string System.ComponentModel.ITypedList.GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors) => throw null; + public override bool HasValues { get => throw null; } + int System.Collections.IList.IndexOf(object value) => throw null; + int System.Collections.Generic.IList.IndexOf(Newtonsoft.Json.Linq.JToken item) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + void System.Collections.Generic.IList.Insert(int index, Newtonsoft.Json.Linq.JToken item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + bool System.ComponentModel.IBindingList.IsSorted { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + Newtonsoft.Json.Linq.JToken System.Collections.Generic.IList.this[int index] { get => throw null; set => throw null; } + internal JContainer() => throw null; + public override Newtonsoft.Json.Linq.JToken Last { get => throw null; } + public event System.ComponentModel.ListChangedEventHandler ListChanged; + public void Merge(object content, Newtonsoft.Json.Linq.JsonMergeSettings settings) => throw null; + public void Merge(object content) => throw null; + protected virtual void OnAddingNew(System.ComponentModel.AddingNewEventArgs e) => throw null; + protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) => throw null; + protected virtual void OnListChanged(System.ComponentModel.ListChangedEventArgs e) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + bool System.Collections.Generic.ICollection.Remove(Newtonsoft.Json.Linq.JToken item) => throw null; + public void RemoveAll() => throw null; + void System.Collections.IList.RemoveAt(int index) => throw null; + void System.Collections.Generic.IList.RemoveAt(int index) => throw null; + void System.ComponentModel.IBindingList.RemoveIndex(System.ComponentModel.PropertyDescriptor property) => throw null; + void System.ComponentModel.IBindingList.RemoveSort() => throw null; + public void ReplaceAll(object content) => throw null; + System.ComponentModel.ListSortDirection System.ComponentModel.IBindingList.SortDirection { get => throw null; } + System.ComponentModel.PropertyDescriptor System.ComponentModel.IBindingList.SortProperty { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsChangeNotification { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSearching { get => throw null; } + bool System.ComponentModel.IBindingList.SupportsSorting { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public override System.Collections.Generic.IEnumerable Values() => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JEnumerable<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public struct JEnumerable : System.IEquatable>, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, Newtonsoft.Json.Linq.IJEnumerable where T : Newtonsoft.Json.Linq.JToken + { + public static Newtonsoft.Json.Linq.JEnumerable Empty; + public override bool Equals(object obj) => throw null; + public bool Equals(Newtonsoft.Json.Linq.JEnumerable other) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public Newtonsoft.Json.Linq.IJEnumerable this[object key] { get => throw null; } + public JEnumerable(System.Collections.Generic.IEnumerable enumerable) => throw null; + // Stub generator skipped constructor + } + + // Generated from `Newtonsoft.Json.Linq.JObject` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JObject : Newtonsoft.Json.Linq.JContainer, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.ICustomTypeDescriptor, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Add(string propertyName, Newtonsoft.Json.Linq.JToken value) => throw null; + protected override System.Collections.Generic.IList ChildrenTokens { get => throw null; } + void System.Collections.Generic.ICollection>.Clear() => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(string propertyName) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public static Newtonsoft.Json.Linq.JObject FromObject(object o, Newtonsoft.Json.JsonSerializer jsonSerializer) => throw null; + public static Newtonsoft.Json.Linq.JObject FromObject(object o) => throw null; + System.ComponentModel.AttributeCollection System.ComponentModel.ICustomTypeDescriptor.GetAttributes() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetClassName() => throw null; + string System.ComponentModel.ICustomTypeDescriptor.GetComponentName() => throw null; + System.ComponentModel.TypeConverter System.ComponentModel.ICustomTypeDescriptor.GetConverter() => throw null; + System.ComponentModel.EventDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultEvent() => throw null; + System.ComponentModel.PropertyDescriptor System.ComponentModel.ICustomTypeDescriptor.GetDefaultProperty() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetEditor(System.Type editorBaseType) => throw null; + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents(System.Attribute[] attributes) => throw null; + System.ComponentModel.EventDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetEvents() => throw null; + protected override System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties(System.Attribute[] attributes) => throw null; + System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.ICustomTypeDescriptor.GetProperties() => throw null; + object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; + public Newtonsoft.Json.Linq.JToken GetValue(string propertyName, System.StringComparison comparison) => throw null; + public Newtonsoft.Json.Linq.JToken GetValue(string propertyName) => throw null; + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + public override Newtonsoft.Json.Linq.JToken this[object key] { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.JToken this[string propertyName] { get => throw null; set => throw null; } + public JObject(params object[] content) => throw null; + public JObject(object content) => throw null; + public JObject(Newtonsoft.Json.Linq.JObject other) => throw null; + public JObject() => throw null; + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + public static Newtonsoft.Json.Linq.JObject Load(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JObject Load(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual void OnPropertyChanged(string propertyName) => throw null; + protected virtual void OnPropertyChanging(string propertyName) => throw null; + public static Newtonsoft.Json.Linq.JObject Parse(string json, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JObject Parse(string json) => throw null; + public System.Collections.Generic.IEnumerable Properties() => throw null; + public Newtonsoft.Json.Linq.JProperty Property(string name, System.StringComparison comparison) => throw null; + public Newtonsoft.Json.Linq.JProperty Property(string name) => throw null; + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging; + public Newtonsoft.Json.Linq.JEnumerable PropertyValues() => throw null; + public bool Remove(string propertyName) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(string propertyName, out Newtonsoft.Json.Linq.JToken value) => throw null; + public bool TryGetValue(string propertyName, System.StringComparison comparison, out Newtonsoft.Json.Linq.JToken value) => throw null; + public override Newtonsoft.Json.Linq.JTokenType Type { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + public override void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JProperty` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JProperty : Newtonsoft.Json.Linq.JContainer + { + protected override System.Collections.Generic.IList ChildrenTokens { get => throw null; } + public JProperty(string name, params object[] content) => throw null; + public JProperty(string name, object content) => throw null; + public JProperty(Newtonsoft.Json.Linq.JProperty other) => throw null; + public static Newtonsoft.Json.Linq.JProperty Load(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JProperty Load(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public string Name { get => throw null; } + public override Newtonsoft.Json.Linq.JTokenType Type { get => throw null; } + public Newtonsoft.Json.Linq.JToken Value { get => throw null; set => throw null; } + public override void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JPropertyDescriptor` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JPropertyDescriptor : System.ComponentModel.PropertyDescriptor + { + public override bool CanResetValue(object component) => throw null; + public override System.Type ComponentType { get => throw null; } + public override object GetValue(object component) => throw null; + public override bool IsReadOnly { get => throw null; } + public JPropertyDescriptor(string name) : base(default(System.ComponentModel.MemberDescriptor)) => throw null; + protected override int NameHashCode { get => throw null; } + public override System.Type PropertyType { get => throw null; } + public override void ResetValue(object component) => throw null; + public override void SetValue(object component, object value) => throw null; + public override bool ShouldSerializeValue(object component) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JRaw` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JRaw : Newtonsoft.Json.Linq.JValue + { + public static Newtonsoft.Json.Linq.JRaw Create(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task CreateAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public JRaw(object rawJson) : base(default(Newtonsoft.Json.Linq.JValue)) => throw null; + public JRaw(Newtonsoft.Json.Linq.JRaw other) : base(default(Newtonsoft.Json.Linq.JValue)) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JToken` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JToken : System.ICloneable, System.Dynamic.IDynamicMetaObjectProvider, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, Newtonsoft.Json.Linq.IJEnumerable, Newtonsoft.Json.IJsonLineInfo + { + public void AddAfterSelf(object content) => throw null; + public void AddAnnotation(object annotation) => throw null; + public void AddBeforeSelf(object content) => throw null; + public System.Collections.Generic.IEnumerable AfterSelf() => throw null; + public System.Collections.Generic.IEnumerable Ancestors() => throw null; + public System.Collections.Generic.IEnumerable AncestorsAndSelf() => throw null; + public object Annotation(System.Type type) => throw null; + public T Annotation() where T : class => throw null; + public System.Collections.Generic.IEnumerable Annotations(System.Type type) => throw null; + public System.Collections.Generic.IEnumerable Annotations() where T : class => throw null; + public System.Collections.Generic.IEnumerable BeforeSelf() => throw null; + public virtual Newtonsoft.Json.Linq.JEnumerable Children() => throw null; + public Newtonsoft.Json.Linq.JEnumerable Children() where T : Newtonsoft.Json.Linq.JToken => throw null; + object System.ICloneable.Clone() => throw null; + public Newtonsoft.Json.JsonReader CreateReader() => throw null; + public Newtonsoft.Json.Linq.JToken DeepClone() => throw null; + public static bool DeepEquals(Newtonsoft.Json.Linq.JToken t1, Newtonsoft.Json.Linq.JToken t2) => throw null; + public static Newtonsoft.Json.Linq.JTokenEqualityComparer EqualityComparer { get => throw null; } + public virtual Newtonsoft.Json.Linq.JToken First { get => throw null; } + public static Newtonsoft.Json.Linq.JToken FromObject(object o, Newtonsoft.Json.JsonSerializer jsonSerializer) => throw null; + public static Newtonsoft.Json.Linq.JToken FromObject(object o) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + protected virtual System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + System.Dynamic.DynamicMetaObject System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + bool Newtonsoft.Json.IJsonLineInfo.HasLineInfo() => throw null; + public abstract bool HasValues { get; } + public virtual Newtonsoft.Json.Linq.JToken this[object key] { get => throw null; set => throw null; } + Newtonsoft.Json.Linq.IJEnumerable Newtonsoft.Json.Linq.IJEnumerable.this[object key] { get => throw null; } + internal JToken() => throw null; + public virtual Newtonsoft.Json.Linq.JToken Last { get => throw null; } + int Newtonsoft.Json.IJsonLineInfo.LineNumber { get => throw null; } + int Newtonsoft.Json.IJsonLineInfo.LinePosition { get => throw null; } + public static Newtonsoft.Json.Linq.JToken Load(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JToken Load(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LoadAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public Newtonsoft.Json.Linq.JToken Next { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.JContainer Parent { get => throw null; set => throw null; } + public static Newtonsoft.Json.Linq.JToken Parse(string json, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JToken Parse(string json) => throw null; + public string Path { get => throw null; } + public Newtonsoft.Json.Linq.JToken Previous { get => throw null; set => throw null; } + public static Newtonsoft.Json.Linq.JToken ReadFrom(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) => throw null; + public static Newtonsoft.Json.Linq.JToken ReadFrom(Newtonsoft.Json.JsonReader reader) => throw null; + public static System.Threading.Tasks.Task ReadFromAsync(Newtonsoft.Json.JsonReader reader, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task ReadFromAsync(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Remove() => throw null; + public void RemoveAnnotations() where T : class => throw null; + public void RemoveAnnotations(System.Type type) => throw null; + public void Replace(Newtonsoft.Json.Linq.JToken value) => throw null; + public Newtonsoft.Json.Linq.JToken Root { get => throw null; } + public Newtonsoft.Json.Linq.JToken SelectToken(string path, bool errorWhenNoMatch) => throw null; + public Newtonsoft.Json.Linq.JToken SelectToken(string path, Newtonsoft.Json.Linq.JsonSelectSettings settings) => throw null; + public Newtonsoft.Json.Linq.JToken SelectToken(string path) => throw null; + public System.Collections.Generic.IEnumerable SelectTokens(string path, bool errorWhenNoMatch) => throw null; + public System.Collections.Generic.IEnumerable SelectTokens(string path, Newtonsoft.Json.Linq.JsonSelectSettings settings) => throw null; + public System.Collections.Generic.IEnumerable SelectTokens(string path) => throw null; + public object ToObject(System.Type objectType, Newtonsoft.Json.JsonSerializer jsonSerializer) => throw null; + public object ToObject(System.Type objectType) => throw null; + public T ToObject(Newtonsoft.Json.JsonSerializer jsonSerializer) => throw null; + public T ToObject() => throw null; + public string ToString(Newtonsoft.Json.Formatting formatting, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override string ToString() => throw null; + public abstract Newtonsoft.Json.Linq.JTokenType Type { get; } + public virtual T Value(object key) => throw null; + public virtual System.Collections.Generic.IEnumerable Values() => throw null; + public abstract void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters); + public virtual System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public static explicit operator string(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator int?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator int(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator float?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator float(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator double?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator double(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator bool?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator bool(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Uri(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt64?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt64(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt32?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt32(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt16?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.UInt16(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.TimeSpan?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.TimeSpan(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.SByte?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.SByte(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Int64?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Int64(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Int16?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Int16(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Guid?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Guid(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Decimal?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Decimal(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.DateTimeOffset?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.DateTimeOffset(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.DateTime?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.DateTime(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Char?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Char(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Byte[](Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Byte?(Newtonsoft.Json.Linq.JToken value) => throw null; + public static explicit operator System.Byte(Newtonsoft.Json.Linq.JToken value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(string value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(int? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(int value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(float? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(float value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(double? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(double value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(bool? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(bool value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Uri value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt64? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt64 value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt32? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt32 value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt16? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.UInt16 value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.TimeSpan? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.TimeSpan value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.SByte? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.SByte value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Int64? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Int64 value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Int16? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Int16 value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Guid? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Guid value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Decimal? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Decimal value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.DateTimeOffset? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.DateTimeOffset value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.DateTime? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.DateTime value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Byte[] value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Byte? value) => throw null; + public static implicit operator Newtonsoft.Json.Linq.JToken(System.Byte value) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JTokenEqualityComparer` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JTokenEqualityComparer : System.Collections.Generic.IEqualityComparer + { + public bool Equals(Newtonsoft.Json.Linq.JToken x, Newtonsoft.Json.Linq.JToken y) => throw null; + public int GetHashCode(Newtonsoft.Json.Linq.JToken obj) => throw null; + public JTokenEqualityComparer() => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JTokenReader` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JTokenReader : Newtonsoft.Json.JsonReader, Newtonsoft.Json.IJsonLineInfo + { + public Newtonsoft.Json.Linq.JToken CurrentToken { get => throw null; } + bool Newtonsoft.Json.IJsonLineInfo.HasLineInfo() => throw null; + public JTokenReader(Newtonsoft.Json.Linq.JToken token, string initialPath) => throw null; + public JTokenReader(Newtonsoft.Json.Linq.JToken token) => throw null; + int Newtonsoft.Json.IJsonLineInfo.LineNumber { get => throw null; } + int Newtonsoft.Json.IJsonLineInfo.LinePosition { get => throw null; } + public override string Path { get => throw null; } + public override bool Read() => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JTokenType` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum JTokenType + { + Array, + Boolean, + Bytes, + Comment, + Constructor, + Date, + Float, + Guid, + Integer, + None, + Null, + Object, + Property, + Raw, + String, + TimeSpan, + Undefined, + Uri, + } + + // Generated from `Newtonsoft.Json.Linq.JTokenWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JTokenWriter : Newtonsoft.Json.JsonWriter + { + public override void Close() => throw null; + public Newtonsoft.Json.Linq.JToken CurrentToken { get => throw null; } + public override void Flush() => throw null; + public JTokenWriter(Newtonsoft.Json.Linq.JContainer container) => throw null; + public JTokenWriter() => throw null; + public Newtonsoft.Json.Linq.JToken Token { get => throw null; } + public override void WriteComment(string text) => throw null; + protected override void WriteEnd(Newtonsoft.Json.JsonToken token) => throw null; + public override void WriteNull() => throw null; + public override void WritePropertyName(string name) => throw null; + public override void WriteRaw(string json) => throw null; + public override void WriteStartArray() => throw null; + public override void WriteStartConstructor(string name) => throw null; + public override void WriteStartObject() => throw null; + public override void WriteUndefined() => throw null; + public override void WriteValue(string value) => throw null; + public override void WriteValue(object value) => throw null; + public override void WriteValue(int value) => throw null; + public override void WriteValue(float value) => throw null; + public override void WriteValue(double value) => throw null; + public override void WriteValue(bool value) => throw null; + public override void WriteValue(System.Uri value) => throw null; + public override void WriteValue(System.UInt64 value) => throw null; + public override void WriteValue(System.UInt32 value) => throw null; + public override void WriteValue(System.UInt16 value) => throw null; + public override void WriteValue(System.TimeSpan value) => throw null; + public override void WriteValue(System.SByte value) => throw null; + public override void WriteValue(System.Int64 value) => throw null; + public override void WriteValue(System.Int16 value) => throw null; + public override void WriteValue(System.Guid value) => throw null; + public override void WriteValue(System.Decimal value) => throw null; + public override void WriteValue(System.DateTimeOffset value) => throw null; + public override void WriteValue(System.DateTime value) => throw null; + public override void WriteValue(System.Char value) => throw null; + public override void WriteValue(System.Byte[] value) => throw null; + public override void WriteValue(System.Byte value) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JValue` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JValue : Newtonsoft.Json.Linq.JToken, System.IFormattable, System.IEquatable, System.IConvertible, System.IComparable, System.IComparable + { + public int CompareTo(Newtonsoft.Json.Linq.JValue obj) => throw null; + int System.IComparable.CompareTo(object obj) => throw null; + public static Newtonsoft.Json.Linq.JValue CreateComment(string value) => throw null; + public static Newtonsoft.Json.Linq.JValue CreateNull() => throw null; + public static Newtonsoft.Json.Linq.JValue CreateString(string value) => throw null; + public static Newtonsoft.Json.Linq.JValue CreateUndefined() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(Newtonsoft.Json.Linq.JValue other) => throw null; + public override int GetHashCode() => throw null; + protected override System.Dynamic.DynamicMetaObject GetMetaObject(System.Linq.Expressions.Expression parameter) => throw null; + System.TypeCode System.IConvertible.GetTypeCode() => throw null; + public override bool HasValues { get => throw null; } + public JValue(string value) => throw null; + public JValue(object value) => throw null; + public JValue(float value) => throw null; + public JValue(double value) => throw null; + public JValue(bool value) => throw null; + public JValue(System.Uri value) => throw null; + public JValue(System.UInt64 value) => throw null; + public JValue(System.TimeSpan value) => throw null; + public JValue(System.Int64 value) => throw null; + public JValue(System.Guid value) => throw null; + public JValue(System.Decimal value) => throw null; + public JValue(System.DateTimeOffset value) => throw null; + public JValue(System.DateTime value) => throw null; + public JValue(System.Char value) => throw null; + public JValue(Newtonsoft.Json.Linq.JValue other) => throw null; + bool System.IConvertible.ToBoolean(System.IFormatProvider provider) => throw null; + System.Byte System.IConvertible.ToByte(System.IFormatProvider provider) => throw null; + System.Char System.IConvertible.ToChar(System.IFormatProvider provider) => throw null; + System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider) => throw null; + System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider) => throw null; + double System.IConvertible.ToDouble(System.IFormatProvider provider) => throw null; + System.Int16 System.IConvertible.ToInt16(System.IFormatProvider provider) => throw null; + int System.IConvertible.ToInt32(System.IFormatProvider provider) => throw null; + System.Int64 System.IConvertible.ToInt64(System.IFormatProvider provider) => throw null; + System.SByte System.IConvertible.ToSByte(System.IFormatProvider provider) => throw null; + float System.IConvertible.ToSingle(System.IFormatProvider provider) => throw null; + public string ToString(string format, System.IFormatProvider formatProvider) => throw null; + public string ToString(string format) => throw null; + public string ToString(System.IFormatProvider formatProvider) => throw null; + public override string ToString() => throw null; + object System.IConvertible.ToType(System.Type conversionType, System.IFormatProvider provider) => throw null; + System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider provider) => throw null; + System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider provider) => throw null; + System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider provider) => throw null; + public override Newtonsoft.Json.Linq.JTokenType Type { get => throw null; } + public object Value { get => throw null; set => throw null; } + public override void WriteTo(Newtonsoft.Json.JsonWriter writer, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + public override System.Threading.Tasks.Task WriteToAsync(Newtonsoft.Json.JsonWriter writer, System.Threading.CancellationToken cancellationToken, params Newtonsoft.Json.JsonConverter[] converters) => throw null; + } + + // Generated from `Newtonsoft.Json.Linq.JsonLoadSettings` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonLoadSettings + { + public Newtonsoft.Json.Linq.CommentHandling CommentHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.DuplicatePropertyNameHandling DuplicatePropertyNameHandling { get => throw null; set => throw null; } + public JsonLoadSettings() => throw null; + public Newtonsoft.Json.Linq.LineInfoHandling LineInfoHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Linq.JsonMergeSettings` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonMergeSettings + { + public JsonMergeSettings() => throw null; + public Newtonsoft.Json.Linq.MergeArrayHandling MergeArrayHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.MergeNullValueHandling MergeNullValueHandling { get => throw null; set => throw null; } + public System.StringComparison PropertyNameComparison { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Linq.JsonSelectSettings` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSelectSettings + { + public bool ErrorWhenNoMatch { get => throw null; set => throw null; } + public JsonSelectSettings() => throw null; + public System.TimeSpan? RegexMatchTimeout { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Linq.LineInfoHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum LineInfoHandling + { + Ignore, + Load, + } + + // Generated from `Newtonsoft.Json.Linq.MergeArrayHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum MergeArrayHandling + { + Concat, + Merge, + Replace, + Union, + } + + // Generated from `Newtonsoft.Json.Linq.MergeNullValueHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + [System.Flags] + public enum MergeNullValueHandling + { + Ignore, + Merge, + } + + } + namespace Schema + { + // Generated from `Newtonsoft.Json.Schema.Extensions` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public static class Extensions + { + public static bool IsValid(this Newtonsoft.Json.Linq.JToken source, Newtonsoft.Json.Schema.JsonSchema schema, out System.Collections.Generic.IList errorMessages) => throw null; + public static bool IsValid(this Newtonsoft.Json.Linq.JToken source, Newtonsoft.Json.Schema.JsonSchema schema) => throw null; + public static void Validate(this Newtonsoft.Json.Linq.JToken source, Newtonsoft.Json.Schema.JsonSchema schema, Newtonsoft.Json.Schema.ValidationEventHandler validationEventHandler) => throw null; + public static void Validate(this Newtonsoft.Json.Linq.JToken source, Newtonsoft.Json.Schema.JsonSchema schema) => throw null; + } + + // Generated from `Newtonsoft.Json.Schema.JsonSchema` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSchema + { + public Newtonsoft.Json.Schema.JsonSchema AdditionalItems { get => throw null; set => throw null; } + public Newtonsoft.Json.Schema.JsonSchema AdditionalProperties { get => throw null; set => throw null; } + public bool AllowAdditionalItems { get => throw null; set => throw null; } + public bool AllowAdditionalProperties { get => throw null; set => throw null; } + public Newtonsoft.Json.Linq.JToken Default { get => throw null; set => throw null; } + public string Description { get => throw null; set => throw null; } + public Newtonsoft.Json.Schema.JsonSchemaType? Disallow { get => throw null; set => throw null; } + public double? DivisibleBy { get => throw null; set => throw null; } + public System.Collections.Generic.IList Enum { get => throw null; set => throw null; } + public bool? ExclusiveMaximum { get => throw null; set => throw null; } + public bool? ExclusiveMinimum { get => throw null; set => throw null; } + public System.Collections.Generic.IList Extends { get => throw null; set => throw null; } + public string Format { get => throw null; set => throw null; } + public bool? Hidden { get => throw null; set => throw null; } + public string Id { get => throw null; set => throw null; } + public System.Collections.Generic.IList Items { get => throw null; set => throw null; } + public JsonSchema() => throw null; + public double? Maximum { get => throw null; set => throw null; } + public int? MaximumItems { get => throw null; set => throw null; } + public int? MaximumLength { get => throw null; set => throw null; } + public double? Minimum { get => throw null; set => throw null; } + public int? MinimumItems { get => throw null; set => throw null; } + public int? MinimumLength { get => throw null; set => throw null; } + public static Newtonsoft.Json.Schema.JsonSchema Parse(string json, Newtonsoft.Json.Schema.JsonSchemaResolver resolver) => throw null; + public static Newtonsoft.Json.Schema.JsonSchema Parse(string json) => throw null; + public string Pattern { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary PatternProperties { get => throw null; set => throw null; } + public bool PositionalItemsValidation { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; set => throw null; } + public static Newtonsoft.Json.Schema.JsonSchema Read(Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Schema.JsonSchemaResolver resolver) => throw null; + public static Newtonsoft.Json.Schema.JsonSchema Read(Newtonsoft.Json.JsonReader reader) => throw null; + public bool? ReadOnly { get => throw null; set => throw null; } + public bool? Required { get => throw null; set => throw null; } + public string Requires { get => throw null; set => throw null; } + public string Title { get => throw null; set => throw null; } + public override string ToString() => throw null; + public bool? Transient { get => throw null; set => throw null; } + public Newtonsoft.Json.Schema.JsonSchemaType? Type { get => throw null; set => throw null; } + public bool UniqueItems { get => throw null; set => throw null; } + public void WriteTo(Newtonsoft.Json.JsonWriter writer, Newtonsoft.Json.Schema.JsonSchemaResolver resolver) => throw null; + public void WriteTo(Newtonsoft.Json.JsonWriter writer) => throw null; + } + + // Generated from `Newtonsoft.Json.Schema.JsonSchemaException` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSchemaException : Newtonsoft.Json.JsonException + { + public JsonSchemaException(string message, System.Exception innerException) => throw null; + public JsonSchemaException(string message) => throw null; + public JsonSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public JsonSchemaException() => throw null; + public int LineNumber { get => throw null; } + public int LinePosition { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Schema.JsonSchemaGenerator` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSchemaGenerator + { + public Newtonsoft.Json.Serialization.IContractResolver ContractResolver { get => throw null; set => throw null; } + public Newtonsoft.Json.Schema.JsonSchema Generate(System.Type type, bool rootSchemaNullable) => throw null; + public Newtonsoft.Json.Schema.JsonSchema Generate(System.Type type, Newtonsoft.Json.Schema.JsonSchemaResolver resolver, bool rootSchemaNullable) => throw null; + public Newtonsoft.Json.Schema.JsonSchema Generate(System.Type type, Newtonsoft.Json.Schema.JsonSchemaResolver resolver) => throw null; + public Newtonsoft.Json.Schema.JsonSchema Generate(System.Type type) => throw null; + public JsonSchemaGenerator() => throw null; + public Newtonsoft.Json.Schema.UndefinedSchemaIdHandling UndefinedSchemaIdHandling { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Schema.JsonSchemaResolver` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonSchemaResolver + { + public virtual Newtonsoft.Json.Schema.JsonSchema GetSchema(string reference) => throw null; + public JsonSchemaResolver() => throw null; + public System.Collections.Generic.IList LoadedSchemas { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Schema.JsonSchemaType` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + [System.Flags] + public enum JsonSchemaType + { + Any, + Array, + Boolean, + Float, + Integer, + None, + Null, + Object, + String, + } + + // Generated from `Newtonsoft.Json.Schema.UndefinedSchemaIdHandling` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public enum UndefinedSchemaIdHandling + { + None, + UseAssemblyQualifiedName, + UseTypeName, + } + + // Generated from `Newtonsoft.Json.Schema.ValidationEventArgs` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ValidationEventArgs : System.EventArgs + { + public Newtonsoft.Json.Schema.JsonSchemaException Exception { get => throw null; } + public string Message { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Schema.ValidationEventHandler` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate void ValidationEventHandler(object sender, Newtonsoft.Json.Schema.ValidationEventArgs e); + + } + namespace Serialization + { + // Generated from `Newtonsoft.Json.Serialization.CamelCaseNamingStrategy` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class CamelCaseNamingStrategy : Newtonsoft.Json.Serialization.NamingStrategy + { + public CamelCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames, bool processExtensionDataNames) => throw null; + public CamelCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames) => throw null; + public CamelCaseNamingStrategy() => throw null; + protected override string ResolvePropertyName(string name) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class CamelCasePropertyNamesContractResolver : Newtonsoft.Json.Serialization.DefaultContractResolver + { + public CamelCasePropertyNamesContractResolver() => throw null; + public override Newtonsoft.Json.Serialization.JsonContract ResolveContract(System.Type type) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.DefaultContractResolver` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DefaultContractResolver : Newtonsoft.Json.Serialization.IContractResolver + { + protected virtual Newtonsoft.Json.Serialization.JsonArrayContract CreateArrayContract(System.Type objectType) => throw null; + protected virtual System.Collections.Generic.IList CreateConstructorParameters(System.Reflection.ConstructorInfo constructor, Newtonsoft.Json.Serialization.JsonPropertyCollection memberProperties) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonContract CreateContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonDictionaryContract CreateDictionaryContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonDynamicContract CreateDynamicContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonISerializableContract CreateISerializableContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonLinqContract CreateLinqContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.IValueProvider CreateMemberValueProvider(System.Reflection.MemberInfo member) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonObjectContract CreateObjectContract(System.Type objectType) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonPrimitiveContract CreatePrimitiveContract(System.Type objectType) => throw null; + protected virtual System.Collections.Generic.IList CreateProperties(System.Type type, Newtonsoft.Json.MemberSerialization memberSerialization) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonProperty CreateProperty(System.Reflection.MemberInfo member, Newtonsoft.Json.MemberSerialization memberSerialization) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonProperty CreatePropertyFromConstructorParameter(Newtonsoft.Json.Serialization.JsonProperty matchingMemberProperty, System.Reflection.ParameterInfo parameterInfo) => throw null; + protected virtual Newtonsoft.Json.Serialization.JsonStringContract CreateStringContract(System.Type objectType) => throw null; + public DefaultContractResolver() => throw null; + public System.Reflection.BindingFlags DefaultMembersSearchFlags { get => throw null; set => throw null; } + public bool DynamicCodeGeneration { get => throw null; } + public string GetResolvedPropertyName(string propertyName) => throw null; + protected virtual System.Collections.Generic.List GetSerializableMembers(System.Type objectType) => throw null; + public bool IgnoreIsSpecifiedMembers { get => throw null; set => throw null; } + public bool IgnoreSerializableAttribute { get => throw null; set => throw null; } + public bool IgnoreSerializableInterface { get => throw null; set => throw null; } + public bool IgnoreShouldSerializeMembers { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.NamingStrategy NamingStrategy { get => throw null; set => throw null; } + public virtual Newtonsoft.Json.Serialization.JsonContract ResolveContract(System.Type type) => throw null; + protected virtual Newtonsoft.Json.JsonConverter ResolveContractConverter(System.Type objectType) => throw null; + protected virtual string ResolveDictionaryKey(string dictionaryKey) => throw null; + protected virtual string ResolveExtensionDataName(string extensionDataName) => throw null; + protected virtual string ResolvePropertyName(string propertyName) => throw null; + public bool SerializeCompilerGeneratedMembers { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.DefaultNamingStrategy` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DefaultNamingStrategy : Newtonsoft.Json.Serialization.NamingStrategy + { + public DefaultNamingStrategy() => throw null; + protected override string ResolvePropertyName(string name) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.DefaultSerializationBinder` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DefaultSerializationBinder : System.Runtime.Serialization.SerializationBinder, Newtonsoft.Json.Serialization.ISerializationBinder + { + public override void BindToName(System.Type serializedType, out string assemblyName, out string typeName) => throw null; + public override System.Type BindToType(string assemblyName, string typeName) => throw null; + public DefaultSerializationBinder() => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.DiagnosticsTraceWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class DiagnosticsTraceWriter : Newtonsoft.Json.Serialization.ITraceWriter + { + public DiagnosticsTraceWriter() => throw null; + public System.Diagnostics.TraceLevel LevelFilter { get => throw null; set => throw null; } + public void Trace(System.Diagnostics.TraceLevel level, string message, System.Exception ex) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.ErrorContext` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ErrorContext + { + public System.Exception Error { get => throw null; } + public bool Handled { get => throw null; set => throw null; } + public object Member { get => throw null; } + public object OriginalObject { get => throw null; } + public string Path { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.ErrorEventArgs` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ErrorEventArgs : System.EventArgs + { + public object CurrentObject { get => throw null; } + public Newtonsoft.Json.Serialization.ErrorContext ErrorContext { get => throw null; } + public ErrorEventArgs(object currentObject, Newtonsoft.Json.Serialization.ErrorContext errorContext) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.ExpressionValueProvider` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ExpressionValueProvider : Newtonsoft.Json.Serialization.IValueProvider + { + public ExpressionValueProvider(System.Reflection.MemberInfo memberInfo) => throw null; + public object GetValue(object target) => throw null; + public void SetValue(object target, object value) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.ExtensionDataGetter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate System.Collections.Generic.IEnumerable> ExtensionDataGetter(object o); + + // Generated from `Newtonsoft.Json.Serialization.ExtensionDataSetter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate void ExtensionDataSetter(object o, string key, object value); + + // Generated from `Newtonsoft.Json.Serialization.IAttributeProvider` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IAttributeProvider + { + System.Collections.Generic.IList GetAttributes(bool inherit); + System.Collections.Generic.IList GetAttributes(System.Type attributeType, bool inherit); + } + + // Generated from `Newtonsoft.Json.Serialization.IContractResolver` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IContractResolver + { + Newtonsoft.Json.Serialization.JsonContract ResolveContract(System.Type type); + } + + // Generated from `Newtonsoft.Json.Serialization.IReferenceResolver` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IReferenceResolver + { + void AddReference(object context, string reference, object value); + string GetReference(object context, object value); + bool IsReferenced(object context, object value); + object ResolveReference(object context, string reference); + } + + // Generated from `Newtonsoft.Json.Serialization.ISerializationBinder` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface ISerializationBinder + { + void BindToName(System.Type serializedType, out string assemblyName, out string typeName); + System.Type BindToType(string assemblyName, string typeName); + } + + // Generated from `Newtonsoft.Json.Serialization.ITraceWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface ITraceWriter + { + System.Diagnostics.TraceLevel LevelFilter { get; } + void Trace(System.Diagnostics.TraceLevel level, string message, System.Exception ex); + } + + // Generated from `Newtonsoft.Json.Serialization.IValueProvider` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public interface IValueProvider + { + object GetValue(object target); + void SetValue(object target, object value); + } + + // Generated from `Newtonsoft.Json.Serialization.JsonArrayContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonArrayContract : Newtonsoft.Json.Serialization.JsonContainerContract + { + public System.Type CollectionItemType { get => throw null; } + public bool HasParameterizedCreator { get => throw null; set => throw null; } + public bool IsMultidimensionalArray { get => throw null; } + public JsonArrayContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + public Newtonsoft.Json.Serialization.ObjectConstructor OverrideCreator { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonContainerContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonContainerContract : Newtonsoft.Json.Serialization.JsonContract + { + public Newtonsoft.Json.JsonConverter ItemConverter { get => throw null; set => throw null; } + public bool? ItemIsReference { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling? ItemReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling? ItemTypeNameHandling { get => throw null; set => throw null; } + internal JsonContainerContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.JsonContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class JsonContract + { + public Newtonsoft.Json.JsonConverter Converter { get => throw null; set => throw null; } + public System.Type CreatedType { get => throw null; set => throw null; } + public System.Func DefaultCreator { get => throw null; set => throw null; } + public bool DefaultCreatorNonPublic { get => throw null; set => throw null; } + public Newtonsoft.Json.JsonConverter InternalConverter { get => throw null; set => throw null; } + public bool? IsReference { get => throw null; set => throw null; } + internal JsonContract(System.Type underlyingType) => throw null; + public System.Collections.Generic.IList OnDeserializedCallbacks { get => throw null; } + public System.Collections.Generic.IList OnDeserializingCallbacks { get => throw null; } + public System.Collections.Generic.IList OnErrorCallbacks { get => throw null; } + public System.Collections.Generic.IList OnSerializedCallbacks { get => throw null; } + public System.Collections.Generic.IList OnSerializingCallbacks { get => throw null; } + public System.Type UnderlyingType { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonDictionaryContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonDictionaryContract : Newtonsoft.Json.Serialization.JsonContainerContract + { + public System.Func DictionaryKeyResolver { get => throw null; set => throw null; } + public System.Type DictionaryKeyType { get => throw null; } + public System.Type DictionaryValueType { get => throw null; } + public bool HasParameterizedCreator { get => throw null; set => throw null; } + public JsonDictionaryContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + public Newtonsoft.Json.Serialization.ObjectConstructor OverrideCreator { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonDynamicContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonDynamicContract : Newtonsoft.Json.Serialization.JsonContainerContract + { + public JsonDynamicContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + public Newtonsoft.Json.Serialization.JsonPropertyCollection Properties { get => throw null; } + public System.Func PropertyNameResolver { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonISerializableContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonISerializableContract : Newtonsoft.Json.Serialization.JsonContainerContract + { + public Newtonsoft.Json.Serialization.ObjectConstructor ISerializableCreator { get => throw null; set => throw null; } + public JsonISerializableContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.JsonLinqContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonLinqContract : Newtonsoft.Json.Serialization.JsonContract + { + public JsonLinqContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.JsonObjectContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonObjectContract : Newtonsoft.Json.Serialization.JsonContainerContract + { + public Newtonsoft.Json.Serialization.JsonPropertyCollection CreatorParameters { get => throw null; } + public Newtonsoft.Json.Serialization.ExtensionDataGetter ExtensionDataGetter { get => throw null; set => throw null; } + public System.Func ExtensionDataNameResolver { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.ExtensionDataSetter ExtensionDataSetter { get => throw null; set => throw null; } + public System.Type ExtensionDataValueType { get => throw null; set => throw null; } + public Newtonsoft.Json.NullValueHandling? ItemNullValueHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Required? ItemRequired { get => throw null; set => throw null; } + public JsonObjectContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + public Newtonsoft.Json.MemberSerialization MemberSerialization { get => throw null; set => throw null; } + public Newtonsoft.Json.MissingMemberHandling? MissingMemberHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.ObjectConstructor OverrideCreator { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.JsonPropertyCollection Properties { get => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonPrimitiveContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonPrimitiveContract : Newtonsoft.Json.Serialization.JsonContract + { + public JsonPrimitiveContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.JsonProperty` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonProperty + { + public Newtonsoft.Json.Serialization.IAttributeProvider AttributeProvider { get => throw null; set => throw null; } + public Newtonsoft.Json.JsonConverter Converter { get => throw null; set => throw null; } + public System.Type DeclaringType { get => throw null; set => throw null; } + public object DefaultValue { get => throw null; set => throw null; } + public Newtonsoft.Json.DefaultValueHandling? DefaultValueHandling { get => throw null; set => throw null; } + public System.Predicate GetIsSpecified { get => throw null; set => throw null; } + public bool HasMemberAttribute { get => throw null; set => throw null; } + public bool Ignored { get => throw null; set => throw null; } + public bool? IsReference { get => throw null; set => throw null; } + public bool IsRequiredSpecified { get => throw null; } + public Newtonsoft.Json.JsonConverter ItemConverter { get => throw null; set => throw null; } + public bool? ItemIsReference { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling? ItemReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.TypeNameHandling? ItemTypeNameHandling { get => throw null; set => throw null; } + public JsonProperty() => throw null; + public Newtonsoft.Json.JsonConverter MemberConverter { get => throw null; set => throw null; } + public Newtonsoft.Json.NullValueHandling? NullValueHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.ObjectCreationHandling? ObjectCreationHandling { get => throw null; set => throw null; } + public int? Order { get => throw null; set => throw null; } + public string PropertyName { get => throw null; set => throw null; } + public System.Type PropertyType { get => throw null; set => throw null; } + public bool Readable { get => throw null; set => throw null; } + public Newtonsoft.Json.ReferenceLoopHandling? ReferenceLoopHandling { get => throw null; set => throw null; } + public Newtonsoft.Json.Required Required { get => throw null; set => throw null; } + public System.Action SetIsSpecified { get => throw null; set => throw null; } + public System.Predicate ShouldDeserialize { get => throw null; set => throw null; } + public System.Predicate ShouldSerialize { get => throw null; set => throw null; } + public override string ToString() => throw null; + public Newtonsoft.Json.TypeNameHandling? TypeNameHandling { get => throw null; set => throw null; } + public string UnderlyingName { get => throw null; set => throw null; } + public Newtonsoft.Json.Serialization.IValueProvider ValueProvider { get => throw null; set => throw null; } + public bool Writable { get => throw null; set => throw null; } + } + + // Generated from `Newtonsoft.Json.Serialization.JsonPropertyCollection` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonPropertyCollection : System.Collections.ObjectModel.KeyedCollection + { + public void AddProperty(Newtonsoft.Json.Serialization.JsonProperty property) => throw null; + public Newtonsoft.Json.Serialization.JsonProperty GetClosestMatchProperty(string propertyName) => throw null; + protected override string GetKeyForItem(Newtonsoft.Json.Serialization.JsonProperty item) => throw null; + public Newtonsoft.Json.Serialization.JsonProperty GetProperty(string propertyName, System.StringComparison comparisonType) => throw null; + public JsonPropertyCollection(System.Type type) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.JsonStringContract` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class JsonStringContract : Newtonsoft.Json.Serialization.JsonPrimitiveContract + { + public JsonStringContract(System.Type underlyingType) : base(default(System.Type)) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.KebabCaseNamingStrategy` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class KebabCaseNamingStrategy : Newtonsoft.Json.Serialization.NamingStrategy + { + public KebabCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames, bool processExtensionDataNames) => throw null; + public KebabCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames) => throw null; + public KebabCaseNamingStrategy() => throw null; + protected override string ResolvePropertyName(string name) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.MemoryTraceWriter` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class MemoryTraceWriter : Newtonsoft.Json.Serialization.ITraceWriter + { + public System.Collections.Generic.IEnumerable GetTraceMessages() => throw null; + public System.Diagnostics.TraceLevel LevelFilter { get => throw null; set => throw null; } + public MemoryTraceWriter() => throw null; + public override string ToString() => throw null; + public void Trace(System.Diagnostics.TraceLevel level, string message, System.Exception ex) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.NamingStrategy` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public abstract class NamingStrategy + { + public override bool Equals(object obj) => throw null; + protected bool Equals(Newtonsoft.Json.Serialization.NamingStrategy other) => throw null; + public virtual string GetDictionaryKey(string key) => throw null; + public virtual string GetExtensionDataName(string name) => throw null; + public override int GetHashCode() => throw null; + public virtual string GetPropertyName(string name, bool hasSpecifiedName) => throw null; + protected NamingStrategy() => throw null; + public bool OverrideSpecifiedNames { get => throw null; set => throw null; } + public bool ProcessDictionaryKeys { get => throw null; set => throw null; } + public bool ProcessExtensionDataNames { get => throw null; set => throw null; } + protected abstract string ResolvePropertyName(string name); + } + + // Generated from `Newtonsoft.Json.Serialization.ObjectConstructor<>` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate object ObjectConstructor(params object[] args); + + // Generated from `Newtonsoft.Json.Serialization.OnErrorAttribute` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class OnErrorAttribute : System.Attribute + { + public OnErrorAttribute() => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.ReflectionAttributeProvider` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ReflectionAttributeProvider : Newtonsoft.Json.Serialization.IAttributeProvider + { + public System.Collections.Generic.IList GetAttributes(bool inherit) => throw null; + public System.Collections.Generic.IList GetAttributes(System.Type attributeType, bool inherit) => throw null; + public ReflectionAttributeProvider(object attributeProvider) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.ReflectionValueProvider` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class ReflectionValueProvider : Newtonsoft.Json.Serialization.IValueProvider + { + public object GetValue(object target) => throw null; + public ReflectionValueProvider(System.Reflection.MemberInfo memberInfo) => throw null; + public void SetValue(object target, object value) => throw null; + } + + // Generated from `Newtonsoft.Json.Serialization.SerializationCallback` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate void SerializationCallback(object o, System.Runtime.Serialization.StreamingContext context); + + // Generated from `Newtonsoft.Json.Serialization.SerializationErrorCallback` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public delegate void SerializationErrorCallback(object o, System.Runtime.Serialization.StreamingContext context, Newtonsoft.Json.Serialization.ErrorContext errorContext); + + // Generated from `Newtonsoft.Json.Serialization.SnakeCaseNamingStrategy` in `Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed` + public class SnakeCaseNamingStrategy : Newtonsoft.Json.Serialization.NamingStrategy + { + protected override string ResolvePropertyName(string name) => throw null; + public SnakeCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames, bool processExtensionDataNames) => throw null; + public SnakeCaseNamingStrategy(bool processDictionaryKeys, bool overrideSpecifiedNames) => throw null; + public SnakeCaseNamingStrategy() => throw null; + } + + } + } +} +namespace System +{ + namespace Diagnostics + { + namespace CodeAnalysis + { + /* Duplicate type 'AllowNullAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + /* Duplicate type 'DoesNotReturnIfAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + /* Duplicate type 'MaybeNullAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + /* Duplicate type 'NotNullAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + /* Duplicate type 'NotNullWhenAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + } + } + namespace Runtime + { + namespace CompilerServices + { + /* Duplicate type 'IsReadOnlyAttribute' is not stubbed in this assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj b/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + From 1188e1b67868ca2612fd837778249403244f0244 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 15:55:17 +0200 Subject: [PATCH 1590/1662] Fix extra constructor stubbing --- csharp/ql/src/Stubs/Stubs.qll | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/csharp/ql/src/Stubs/Stubs.qll b/csharp/ql/src/Stubs/Stubs.qll index 55eb5724cd8e..4a178980a523 100644 --- a/csharp/ql/src/Stubs/Stubs.qll +++ b/csharp/ql/src/Stubs/Stubs.qll @@ -186,13 +186,23 @@ abstract private class GeneratedType extends Type, GeneratedElement { string stubPrivateConstructor() { if - this instanceof Interface or - this.isStatic() or - this.isAbstract() or - exists(this.(ValueOrRefType).getAConstructor()) or - not exists(this.getAnInterestingBaseType()) or - not exists(this.getAnInterestingBaseType().getAConstructor()) or - this.getAnInterestingBaseType().getAConstructor().getNumberOfParameters() = 0 + this instanceof Interface + or + this.isStatic() + or + this.isAbstract() + or + exists(this.(ValueOrRefType).getAConstructor()) + or + not exists(this.getAnInterestingBaseType()) + or + not exists(this.getAnInterestingBaseType().getAConstructor()) + or + exists(Constructor bc | + bc = this.getAnInterestingBaseType().getAConstructor() and + bc.getNumberOfParameters() = 0 and + not bc.isStatic() + ) then result = "" else result = @@ -287,7 +297,9 @@ private class ExtraGeneratedConstructor extends GeneratedMember, Constructor { ( // if the base class has no 0 parameter constructor not exists(Constructor c | - c = this.getDeclaringType().getBaseClass().getAMember() and c.getNumberOfParameters() = 0 + c = this.getDeclaringType().getBaseClass().getAMember() and + c.getNumberOfParameters() = 0 and + not c.isStatic() ) or // if this constructor might be called from a (generic) derived class From f352bcb0a3448254c8adea55de42fb5879a1b2d6 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 16:09:24 +0200 Subject: [PATCH 1591/1662] C#: Change nHibernate stub to nuget-based one --- .../frameworks/NHibernate/DataFlow.expected | 4 +- .../frameworks/NHibernate/SqlExprs.expected | 4 +- .../frameworks/NHibernate/SqlExprs.ql | 1 + .../NHibernate/StoredFlowSources.expected | 12 +- .../NHibernate/StoredFlowSources.ql | 1 + .../frameworks/NHibernate/nhibernate.cs | 104 +- .../Antlr3.Runtime/3.5.1/Antlr3.Runtime.cs | 1610 + .../3.5.1/Antlr3.Runtime.csproj | 12 + .../4.0.4/Iesi.Collections.cs | 90 + .../4.0.4/Iesi.Collections.csproj | 12 + csharp/ql/test/resources/stubs/NHibernate.cs | 18 - .../stubs/NHibernate/5.3.8/NHibernate.cs | 34502 ++++++++++++++++ .../stubs/NHibernate/5.3.8/NHibernate.csproj | 17 + .../2.2.0/Remotion.Linq.EagerFetching.cs | 128 + .../2.2.0/Remotion.Linq.EagerFetching.csproj | 13 + .../Remotion.Linq/2.2.0/Remotion.Linq.cs | 1954 + .../Remotion.Linq/2.2.0/Remotion.Linq.csproj | 12 + ...stem.Configuration.ConfigurationManager.cs | 1827 + ....Configuration.ConfigurationManager.csproj | 12 + 19 files changed, 40253 insertions(+), 80 deletions(-) create mode 100644 csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.cs create mode 100644 csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.csproj create mode 100644 csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.cs create mode 100644 csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.csproj delete mode 100644 csharp/ql/test/resources/stubs/NHibernate.cs create mode 100644 csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.cs create mode 100644 csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.csproj create mode 100644 csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.cs create mode 100644 csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.csproj create mode 100644 csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.cs create mode 100644 csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.csproj create mode 100644 csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.cs create mode 100644 csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.csproj diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/DataFlow.expected b/csharp/ql/test/library-tests/frameworks/NHibernate/DataFlow.expected index 25a09e76d8f3..879d22da0f3d 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/DataFlow.expected +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/DataFlow.expected @@ -1,2 +1,2 @@ -| nhibernate.cs:50:14:50:19 | access to property Name | Data flow from $@. | nhibernate.cs:45:24:45:32 | "tainted" | "tainted" | -| nhibernate.cs:55:14:55:23 | access to property Address | Data flow from $@. | nhibernate.cs:45:24:45:32 | "tainted" | "tainted" | +| nhibernate.cs:50:18:50:23 | access to property Name | Data flow from $@. | nhibernate.cs:45:28:45:36 | "tainted" | "tainted" | +| nhibernate.cs:55:18:55:27 | access to property Address | Data flow from $@. | nhibernate.cs:45:28:45:36 | "tainted" | "tainted" | diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.expected b/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.expected index 1310d018b215..2b88a955b2a6 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.expected +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.expected @@ -1,2 +1,2 @@ -| nhibernate.cs:16:9:16:26 | object creation of type SqlString | -| nhibernate.cs:17:9:17:27 | call to method Delete | +| nhibernate.cs:16:13:16:30 | object creation of type SqlString | +| nhibernate.cs:17:13:17:31 | call to method Delete | diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.ql b/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.ql index 76f687618375..47d024b7b934 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.ql +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/SqlExprs.ql @@ -2,4 +2,5 @@ import csharp import semmle.code.csharp.frameworks.Sql from SqlExpr e +where not e.getFile().getAbsolutePath().matches("%/resources/stubs/%") select e diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.expected b/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.expected index ff8a937f1a14..eda30f404a0a 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.expected +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.expected @@ -1,6 +1,6 @@ -| nhibernate.cs:49:14:49:17 | access to property Id | -| nhibernate.cs:50:14:50:19 | access to property Name | -| nhibernate.cs:51:14:51:22 | access to property Address | -| nhibernate.cs:53:14:53:18 | access to property Id | -| nhibernate.cs:54:14:54:19 | access to property Age | -| nhibernate.cs:55:14:55:23 | access to property Address | +| nhibernate.cs:49:18:49:21 | access to property Id | +| nhibernate.cs:50:18:50:23 | access to property Name | +| nhibernate.cs:51:18:51:26 | access to property Address | +| nhibernate.cs:53:18:53:22 | access to property Id | +| nhibernate.cs:54:18:54:23 | access to property Age | +| nhibernate.cs:55:18:55:27 | access to property Address | diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.ql b/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.ql index 66889c3e6f05..0bc82b1fdeb7 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.ql +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/StoredFlowSources.ql @@ -2,4 +2,5 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.Stored from StoredFlowSource source +where not source.getLocation().getFile().getAbsolutePath().matches("%/resources/stubs/%") select source diff --git a/csharp/ql/test/library-tests/frameworks/NHibernate/nhibernate.cs b/csharp/ql/test/library-tests/frameworks/NHibernate/nhibernate.cs index 879764500aec..14afb25638bb 100644 --- a/csharp/ql/test/library-tests/frameworks/NHibernate/nhibernate.cs +++ b/csharp/ql/test/library-tests/frameworks/NHibernate/nhibernate.cs @@ -1,4 +1,4 @@ -// semmle-extractor-options: /r:System.Data.dll /r:System.ComponentModel.Primitives.dll ${testdir}/../../../resources/stubs/NHibernate.cs ${testdir}/../../../resources/stubs/System.Data.cs /r:System.ComponentModel.TypeConverter.dll /r:System.Data.Common.dll +// semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project:../../../resources/stubs/NHibernate/5.3.8/NHibernate.csproj using NHibernate; @@ -6,57 +6,57 @@ namespace NHibernateTest { - class Test - { - ISession session; - - void SqlExprs() - { - var sql = "sql"; - new SqlString(sql); // SQL expression - session.Delete(sql); // SQL expression - } - - class Person - { - public int Id { get; set; } - public string Name { get; set; } - public string Address { get; set; } - } - - class Person2 - { - public int Id { get; set; } - public int Age { get; set; } - public string Address { get; set; } - } - - void FlowSources() - { - session.Query(); - session.Save(new Person2()); - } - - void DataFlow() - { - var p = new Person(); - var p2 = new Person2(); - - string taint = "tainted"; - p.Name = taint; - p2.Address = taint; - - Sink(p.Id); // Not tainted - Sink(p.Name); // Tainted - Sink(p.Address); // Not tainted - - Sink(p2.Id); // Not tainted - Sink(p2.Age); // Not tainted - Sink(p2.Address); // Tainted - } - - void Sink(object sink) + class Test { + ISession session; + + void SqlExprs() + { + var sql = "sql"; + new SqlString(sql); // SQL expression + session.Delete(sql); // SQL expression + } + + class Person + { + public int Id { get; set; } + public string Name { get; set; } + public string Address { get; set; } + } + + class Person2 + { + public int Id { get; set; } + public int Age { get; set; } + public string Address { get; set; } + } + + void FlowSources() + { + session.Query(); + session.Save(new Person2()); + } + + void DataFlow() + { + var p = new Person(); + var p2 = new Person2(); + + string taint = "tainted"; + p.Name = taint; + p2.Address = taint; + + Sink(p.Id); // Not tainted + Sink(p.Name); // Tainted + Sink(p.Address); // Not tainted + + Sink(p2.Id); // Not tainted + Sink(p2.Age); // Not tainted + Sink(p2.Address); // Tainted + } + + void Sink(object sink) + { + } } - } } \ No newline at end of file diff --git a/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.cs b/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.cs new file mode 100644 index 000000000000..6f83dad6003e --- /dev/null +++ b/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.cs @@ -0,0 +1,1610 @@ +// This file contains auto-generated code. + +namespace Antlr +{ + namespace Runtime + { + // Generated from `Antlr.Runtime.ANTLRInputStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ANTLRInputStream : Antlr.Runtime.ANTLRReaderStream + { + public ANTLRInputStream(System.IO.Stream input, int size, int readBufferSize, System.Text.Encoding encoding) : base(default(System.IO.TextReader)) => throw null; + public ANTLRInputStream(System.IO.Stream input, int size, System.Text.Encoding encoding) : base(default(System.IO.TextReader)) => throw null; + public ANTLRInputStream(System.IO.Stream input, int size) : base(default(System.IO.TextReader)) => throw null; + public ANTLRInputStream(System.IO.Stream input, System.Text.Encoding encoding) : base(default(System.IO.TextReader)) => throw null; + public ANTLRInputStream(System.IO.Stream input) : base(default(System.IO.TextReader)) => throw null; + } + + // Generated from `Antlr.Runtime.ANTLRReaderStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ANTLRReaderStream : Antlr.Runtime.ANTLRStringStream + { + public ANTLRReaderStream(System.IO.TextReader r, int size, int readChunkSize) => throw null; + public ANTLRReaderStream(System.IO.TextReader r, int size) => throw null; + public ANTLRReaderStream(System.IO.TextReader r) => throw null; + public const int InitialBufferSize = default; + public virtual void Load(System.IO.TextReader r, int size, int readChunkSize) => throw null; + public const int ReadBufferSize = default; + } + + // Generated from `Antlr.Runtime.ANTLRStringStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ANTLRStringStream : Antlr.Runtime.IIntStream, Antlr.Runtime.ICharStream + { + public ANTLRStringStream(string input, string sourceName) => throw null; + public ANTLRStringStream(string input) => throw null; + public ANTLRStringStream(System.Char[] data, int numberOfActualCharsInArray, string sourceName) => throw null; + public ANTLRStringStream(System.Char[] data, int numberOfActualCharsInArray) => throw null; + protected ANTLRStringStream() => throw null; + public virtual int CharPositionInLine { get => throw null; set => throw null; } + public virtual void Consume() => throw null; + public virtual int Count { get => throw null; } + public virtual int Index { get => throw null; } + public virtual int LA(int i) => throw null; + public virtual int LT(int i) => throw null; + public virtual int Line { get => throw null; set => throw null; } + public virtual int Mark() => throw null; + public virtual void Release(int marker) => throw null; + public virtual void Reset() => throw null; + public virtual void Rewind(int m) => throw null; + public virtual void Rewind() => throw null; + public virtual void Seek(int index) => throw null; + public virtual string SourceName { get => throw null; } + public virtual string Substring(int start, int length) => throw null; + public override string ToString() => throw null; + protected System.Char[] data; + protected int lastMarker; + protected int markDepth; + protected System.Collections.Generic.IList markers; + protected int n; + public string name; + protected int p; + } + + // Generated from `Antlr.Runtime.AstParserRuleReturnScope<,>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class AstParserRuleReturnScope : Antlr.Runtime.ParserRuleReturnScope, Antlr.Runtime.IRuleReturnScope, Antlr.Runtime.IAstRuleReturnScope, Antlr.Runtime.IAstRuleReturnScope + { + public AstParserRuleReturnScope() => throw null; + public TTree Tree { get => throw null; set => throw null; } + object Antlr.Runtime.IAstRuleReturnScope.Tree { get => throw null; } + } + + // Generated from `Antlr.Runtime.BaseRecognizer` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class BaseRecognizer + { + public virtual bool AlreadyParsedRule(Antlr.Runtime.IIntStream input, int ruleIndex) => throw null; + public virtual int BacktrackingLevel { get => throw null; set => throw null; } + public BaseRecognizer(Antlr.Runtime.RecognizerSharedState state) => throw null; + public BaseRecognizer() => throw null; + public virtual void BeginResync() => throw null; + protected virtual Antlr.Runtime.BitSet CombineFollows(bool exact) => throw null; + protected virtual Antlr.Runtime.BitSet ComputeContextSensitiveRuleFOLLOW() => throw null; + protected virtual Antlr.Runtime.BitSet ComputeErrorRecoverySet() => throw null; + public virtual void ConsumeUntil(Antlr.Runtime.IIntStream input, int tokenType) => throw null; + public virtual void ConsumeUntil(Antlr.Runtime.IIntStream input, Antlr.Runtime.BitSet set) => throw null; + protected virtual void DebugBeginBacktrack(int level) => throw null; + protected virtual void DebugEndBacktrack(int level, bool successful) => throw null; + protected virtual void DebugEnterAlt(int alt) => throw null; + protected virtual void DebugEnterDecision(int decisionNumber, bool couldBacktrack) => throw null; + protected virtual void DebugEnterRule(string grammarFileName, string ruleName) => throw null; + protected virtual void DebugEnterSubRule(int decisionNumber) => throw null; + protected virtual void DebugExitDecision(int decisionNumber) => throw null; + protected virtual void DebugExitRule(string grammarFileName, string ruleName) => throw null; + protected virtual void DebugExitSubRule(int decisionNumber) => throw null; + public virtual Antlr.Runtime.Debug.IDebugEventListener DebugListener { get => throw null; } + protected virtual void DebugLocation(int line, int charPositionInLine) => throw null; + protected virtual void DebugRecognitionException(Antlr.Runtime.RecognitionException ex) => throw null; + protected virtual void DebugSemanticPredicate(bool result, string predicate) => throw null; + public const int DefaultTokenChannel = default; + public virtual void DisplayRecognitionError(string[] tokenNames, Antlr.Runtime.RecognitionException e) => throw null; + public virtual void EmitErrorMessage(string msg) => throw null; + public virtual void EndResync() => throw null; + public virtual bool Failed { get => throw null; } + protected virtual object GetCurrentInputSymbol(Antlr.Runtime.IIntStream input) => throw null; + public virtual string GetErrorHeader(Antlr.Runtime.RecognitionException e) => throw null; + public virtual string GetErrorMessage(Antlr.Runtime.RecognitionException e, string[] tokenNames) => throw null; + protected virtual object GetMissingSymbol(Antlr.Runtime.IIntStream input, Antlr.Runtime.RecognitionException e, int expectedTokenType, Antlr.Runtime.BitSet follow) => throw null; + public virtual int GetRuleMemoization(int ruleIndex, int ruleStartIndex) => throw null; + public virtual int GetRuleMemoizationCacheSize() => throw null; + public virtual string GetTokenErrorDisplay(Antlr.Runtime.IToken t) => throw null; + public virtual string GrammarFileName { get => throw null; } + public const int Hidden = default; + protected virtual void InitDFAs() => throw null; + public const int InitialFollowStackSize = default; + public virtual object Match(Antlr.Runtime.IIntStream input, int ttype, Antlr.Runtime.BitSet follow) => throw null; + public virtual void MatchAny(Antlr.Runtime.IIntStream input) => throw null; + public const int MemoRuleFailed = default; + public const int MemoRuleUnknown = default; + public virtual void Memoize(Antlr.Runtime.IIntStream input, int ruleIndex, int ruleStartIndex) => throw null; + public virtual bool MismatchIsMissingToken(Antlr.Runtime.IIntStream input, Antlr.Runtime.BitSet follow) => throw null; + public virtual bool MismatchIsUnwantedToken(Antlr.Runtime.IIntStream input, int ttype) => throw null; + public const string NextTokenRuleName = default; + public virtual int NumberOfSyntaxErrors { get => throw null; } + protected void PopFollow() => throw null; + protected void PushFollow(Antlr.Runtime.BitSet fset) => throw null; + public virtual void Recover(Antlr.Runtime.IIntStream input, Antlr.Runtime.RecognitionException re) => throw null; + public virtual object RecoverFromMismatchedSet(Antlr.Runtime.IIntStream input, Antlr.Runtime.RecognitionException e, Antlr.Runtime.BitSet follow) => throw null; + protected virtual object RecoverFromMismatchedToken(Antlr.Runtime.IIntStream input, int ttype, Antlr.Runtime.BitSet follow) => throw null; + public virtual void ReportError(Antlr.Runtime.RecognitionException e) => throw null; + public virtual void Reset() => throw null; + public virtual void SetState(Antlr.Runtime.RecognizerSharedState value) => throw null; + public abstract string SourceName { get; } + public virtual System.Collections.Generic.List ToStrings(System.Collections.Generic.ICollection tokens) => throw null; + public virtual string[] TokenNames { get => throw null; } + public System.IO.TextWriter TraceDestination { get => throw null; set => throw null; } + public virtual void TraceIn(string ruleName, int ruleIndex, object inputSymbol) => throw null; + public virtual void TraceOut(string ruleName, int ruleIndex, object inputSymbol) => throw null; + protected internal Antlr.Runtime.RecognizerSharedState state; + } + + // Generated from `Antlr.Runtime.BitSet` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class BitSet : System.ICloneable + { + public void Add(int el) => throw null; + public BitSet(int nbits) => throw null; + public BitSet(System.UInt64[] bits) => throw null; + public BitSet(System.Collections.Generic.IEnumerable items) => throw null; + public BitSet() => throw null; + public object Clone() => throw null; + public override bool Equals(object other) => throw null; + public override int GetHashCode() => throw null; + public void GrowToInclude(int bit) => throw null; + public bool IsNil() => throw null; + public int LengthInLongWords() => throw null; + public bool Member(int el) => throw null; + public int NumBits() => throw null; + public static Antlr.Runtime.BitSet Of(int el) => throw null; + public static Antlr.Runtime.BitSet Of(int a, int b, int c, int d) => throw null; + public static Antlr.Runtime.BitSet Of(int a, int b, int c) => throw null; + public static Antlr.Runtime.BitSet Of(int a, int b) => throw null; + public Antlr.Runtime.BitSet Or(Antlr.Runtime.BitSet a) => throw null; + public void OrInPlace(Antlr.Runtime.BitSet a) => throw null; + public void Remove(int el) => throw null; + public int Size() => throw null; + public int[] ToArray() => throw null; + public string ToString(string[] tokenNames) => throw null; + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.BufferedTokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class BufferedTokenStream : Antlr.Runtime.ITokenStreamInformation, Antlr.Runtime.ITokenStream, Antlr.Runtime.IIntStream + { + public BufferedTokenStream(Antlr.Runtime.ITokenSource tokenSource) => throw null; + public BufferedTokenStream() => throw null; + public virtual void Consume() => throw null; + public virtual int Count { get => throw null; } + protected virtual void Fetch(int n) => throw null; + public virtual void Fill() => throw null; + public virtual Antlr.Runtime.IToken Get(int i) => throw null; + public virtual System.Collections.Generic.List GetTokens(int start, int stop, int ttype) => throw null; + public virtual System.Collections.Generic.List GetTokens(int start, int stop, System.Collections.Generic.IEnumerable types) => throw null; + public virtual System.Collections.Generic.List GetTokens(int start, int stop, Antlr.Runtime.BitSet types) => throw null; + public virtual System.Collections.Generic.List GetTokens(int start, int stop) => throw null; + public virtual System.Collections.Generic.List GetTokens() => throw null; + public virtual int Index { get => throw null; } + public virtual int LA(int i) => throw null; + protected virtual Antlr.Runtime.IToken LB(int k) => throw null; + public virtual Antlr.Runtime.IToken LT(int k) => throw null; + public virtual Antlr.Runtime.IToken LastRealToken { get => throw null; } + public virtual Antlr.Runtime.IToken LastToken { get => throw null; } + public virtual int Mark() => throw null; + public virtual int MaxLookBehind { get => throw null; } + public virtual int Range { get => throw null; set => throw null; } + public virtual void Release(int marker) => throw null; + public virtual void Reset() => throw null; + public virtual void Rewind(int marker) => throw null; + public virtual void Rewind() => throw null; + public virtual void Seek(int index) => throw null; + protected virtual void Setup() => throw null; + public virtual string SourceName { get => throw null; } + protected virtual void Sync(int i) => throw null; + public virtual string ToString(int start, int stop) => throw null; + public virtual string ToString(Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop) => throw null; + public override string ToString() => throw null; + public virtual Antlr.Runtime.ITokenSource TokenSource { get => throw null; set => throw null; } + protected int _p; + protected System.Collections.Generic.List _tokens; + } + + // Generated from `Antlr.Runtime.CharStreamConstants` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public static class CharStreamConstants + { + public const int EndOfFile = default; + } + + // Generated from `Antlr.Runtime.CharStreamState` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CharStreamState + { + public CharStreamState() => throw null; + public int charPositionInLine; + public int line; + public int p; + } + + // Generated from `Antlr.Runtime.ClassicToken` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ClassicToken : Antlr.Runtime.IToken + { + public int Channel { get => throw null; set => throw null; } + public int CharPositionInLine { get => throw null; set => throw null; } + public ClassicToken(int type, string text, int channel) => throw null; + public ClassicToken(int type, string text) => throw null; + public ClassicToken(int type) => throw null; + public ClassicToken(Antlr.Runtime.IToken oldToken) => throw null; + public Antlr.Runtime.ICharStream InputStream { get => throw null; set => throw null; } + public int Line { get => throw null; set => throw null; } + public int StartIndex { get => throw null; set => throw null; } + public int StopIndex { get => throw null; set => throw null; } + public string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + public int TokenIndex { get => throw null; set => throw null; } + public int Type { get => throw null; set => throw null; } + } + + // Generated from `Antlr.Runtime.CommonToken` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonToken : Antlr.Runtime.IToken + { + public int Channel { get => throw null; set => throw null; } + public int CharPositionInLine { get => throw null; set => throw null; } + public CommonToken(int type, string text) => throw null; + public CommonToken(int type) => throw null; + public CommonToken(Antlr.Runtime.IToken oldToken) => throw null; + public CommonToken(Antlr.Runtime.ICharStream input, int type, int channel, int start, int stop) => throw null; + public CommonToken() => throw null; + public Antlr.Runtime.ICharStream InputStream { get => throw null; set => throw null; } + public int Line { get => throw null; set => throw null; } + public int StartIndex { get => throw null; set => throw null; } + public int StopIndex { get => throw null; set => throw null; } + public string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + public int TokenIndex { get => throw null; set => throw null; } + public int Type { get => throw null; set => throw null; } + } + + // Generated from `Antlr.Runtime.CommonTokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonTokenStream : Antlr.Runtime.BufferedTokenStream + { + public int Channel { get => throw null; } + public CommonTokenStream(Antlr.Runtime.ITokenSource tokenSource, int channel) => throw null; + public CommonTokenStream(Antlr.Runtime.ITokenSource tokenSource) => throw null; + public CommonTokenStream() => throw null; + public override void Consume() => throw null; + protected override Antlr.Runtime.IToken LB(int k) => throw null; + public override Antlr.Runtime.IToken LT(int k) => throw null; + public override void Reset() => throw null; + protected override void Setup() => throw null; + protected virtual int SkipOffTokenChannels(int i) => throw null; + protected virtual int SkipOffTokenChannelsReverse(int i) => throw null; + public override Antlr.Runtime.ITokenSource TokenSource { get => throw null; set => throw null; } + } + + // Generated from `Antlr.Runtime.DFA` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class DFA + { + public DFA(Antlr.Runtime.SpecialStateTransitionHandler specialStateTransition) => throw null; + public DFA() => throw null; + protected virtual void DebugRecognitionException(Antlr.Runtime.RecognitionException ex) => throw null; + public virtual string Description { get => throw null; } + public virtual void Error(Antlr.Runtime.NoViableAltException nvae) => throw null; + protected virtual void NoViableAlt(int s, Antlr.Runtime.IIntStream input) => throw null; + public virtual int Predict(Antlr.Runtime.IIntStream input) => throw null; + public Antlr.Runtime.SpecialStateTransitionHandler SpecialStateTransition { get => throw null; set => throw null; } + public static System.Int16[] UnpackEncodedString(string encodedString) => throw null; + public static System.Char[] UnpackEncodedStringToUnsignedChars(string encodedString) => throw null; + protected System.Int16[] accept; + public bool debug; + protected int decisionNumber; + protected System.Int16[] eof; + protected System.Int16[] eot; + protected System.Char[] max; + protected System.Char[] min; + protected Antlr.Runtime.BaseRecognizer recognizer; + protected System.Int16[] special; + protected System.Int16[][] transition; + } + + // Generated from `Antlr.Runtime.EarlyExitException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class EarlyExitException : Antlr.Runtime.RecognitionException + { + public int DecisionNumber { get => throw null; } + public EarlyExitException(string message, int decisionNumber, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public EarlyExitException(string message, int decisionNumber, Antlr.Runtime.IIntStream input) => throw null; + public EarlyExitException(string message, System.Exception innerException) => throw null; + public EarlyExitException(string message) => throw null; + public EarlyExitException(int decisionNumber, Antlr.Runtime.IIntStream input) => throw null; + public EarlyExitException() => throw null; + } + + // Generated from `Antlr.Runtime.FailedPredicateException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class FailedPredicateException : Antlr.Runtime.RecognitionException + { + public FailedPredicateException(string message, System.Exception innerException) => throw null; + public FailedPredicateException(string message, Antlr.Runtime.IIntStream input, string ruleName, string predicateText, System.Exception innerException) => throw null; + public FailedPredicateException(string message, Antlr.Runtime.IIntStream input, string ruleName, string predicateText) => throw null; + public FailedPredicateException(string message) => throw null; + public FailedPredicateException(Antlr.Runtime.IIntStream input, string ruleName, string predicateText) => throw null; + public FailedPredicateException() => throw null; + public string PredicateText { get => throw null; } + public string RuleName { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.GrammarRuleAttribute` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class GrammarRuleAttribute : System.Attribute + { + public GrammarRuleAttribute(string name) => throw null; + public string Name { get => throw null; } + } + + // Generated from `Antlr.Runtime.IAstRuleReturnScope` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IAstRuleReturnScope : Antlr.Runtime.IRuleReturnScope + { + object Tree { get; } + } + + // Generated from `Antlr.Runtime.IAstRuleReturnScope<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IAstRuleReturnScope : Antlr.Runtime.IRuleReturnScope, Antlr.Runtime.IAstRuleReturnScope + { + TAstLabel Tree { get; } + } + + // Generated from `Antlr.Runtime.ICharStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ICharStream : Antlr.Runtime.IIntStream + { + int CharPositionInLine { get; set; } + int LT(int i); + int Line { get; set; } + string Substring(int start, int length); + } + + // Generated from `Antlr.Runtime.IIntStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IIntStream + { + void Consume(); + int Count { get; } + int Index { get; } + int LA(int i); + int Mark(); + void Release(int marker); + void Rewind(int marker); + void Rewind(); + void Seek(int index); + string SourceName { get; } + } + + // Generated from `Antlr.Runtime.IRuleReturnScope` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IRuleReturnScope + { + object Start { get; } + object Stop { get; } + } + + // Generated from `Antlr.Runtime.IRuleReturnScope<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IRuleReturnScope : Antlr.Runtime.IRuleReturnScope + { + TLabel Start { get; } + TLabel Stop { get; } + } + + // Generated from `Antlr.Runtime.ITemplateRuleReturnScope` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITemplateRuleReturnScope + { + object Template { get; } + } + + // Generated from `Antlr.Runtime.ITemplateRuleReturnScope<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITemplateRuleReturnScope : Antlr.Runtime.ITemplateRuleReturnScope + { + TTemplate Template { get; } + } + + // Generated from `Antlr.Runtime.IToken` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IToken + { + int Channel { get; set; } + int CharPositionInLine { get; set; } + Antlr.Runtime.ICharStream InputStream { get; set; } + int Line { get; set; } + int StartIndex { get; set; } + int StopIndex { get; set; } + string Text { get; set; } + int TokenIndex { get; set; } + int Type { get; set; } + } + + // Generated from `Antlr.Runtime.ITokenSource` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITokenSource + { + Antlr.Runtime.IToken NextToken(); + string SourceName { get; } + string[] TokenNames { get; } + } + + // Generated from `Antlr.Runtime.ITokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITokenStream : Antlr.Runtime.IIntStream + { + Antlr.Runtime.IToken Get(int i); + Antlr.Runtime.IToken LT(int k); + int Range { get; } + string ToString(int start, int stop); + string ToString(Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop); + Antlr.Runtime.ITokenSource TokenSource { get; } + } + + // Generated from `Antlr.Runtime.ITokenStreamInformation` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITokenStreamInformation + { + Antlr.Runtime.IToken LastRealToken { get; } + Antlr.Runtime.IToken LastToken { get; } + int MaxLookBehind { get; } + } + + // Generated from `Antlr.Runtime.LegacyCommonTokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class LegacyCommonTokenStream : Antlr.Runtime.ITokenStream, Antlr.Runtime.IIntStream + { + public virtual void Consume() => throw null; + public virtual int Count { get => throw null; } + public virtual void DiscardTokenType(int ttype) => throw null; + public virtual void FillBuffer() => throw null; + public virtual Antlr.Runtime.IToken Get(int i) => throw null; + public virtual System.Collections.Generic.IList GetTokens(int start, int stop, int ttype) => throw null; + public virtual System.Collections.Generic.IList GetTokens(int start, int stop, System.Collections.Generic.IList types) => throw null; + public virtual System.Collections.Generic.IList GetTokens(int start, int stop, Antlr.Runtime.BitSet types) => throw null; + public virtual System.Collections.Generic.IList GetTokens(int start, int stop) => throw null; + public virtual System.Collections.Generic.IList GetTokens() => throw null; + public virtual int Index { get => throw null; } + public virtual int LA(int i) => throw null; + protected virtual Antlr.Runtime.IToken LB(int k) => throw null; + public virtual Antlr.Runtime.IToken LT(int k) => throw null; + public LegacyCommonTokenStream(Antlr.Runtime.ITokenSource tokenSource, int channel) => throw null; + public LegacyCommonTokenStream(Antlr.Runtime.ITokenSource tokenSource) => throw null; + public LegacyCommonTokenStream() => throw null; + public virtual int Mark() => throw null; + public virtual int Range { get => throw null; set => throw null; } + public virtual void Release(int marker) => throw null; + public virtual void Reset() => throw null; + public virtual void Rewind(int marker) => throw null; + public virtual void Rewind() => throw null; + public virtual void Seek(int index) => throw null; + public virtual void SetDiscardOffChannelTokens(bool discardOffChannelTokens) => throw null; + public virtual void SetTokenSource(Antlr.Runtime.ITokenSource tokenSource) => throw null; + public virtual void SetTokenTypeChannel(int ttype, int channel) => throw null; + protected virtual int SkipOffTokenChannels(int i) => throw null; + protected virtual int SkipOffTokenChannelsReverse(int i) => throw null; + public virtual string SourceName { get => throw null; } + public virtual string ToString(int start, int stop) => throw null; + public virtual string ToString(Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop) => throw null; + public override string ToString() => throw null; + public virtual Antlr.Runtime.ITokenSource TokenSource { get => throw null; } + protected int channel; + protected System.Collections.Generic.IDictionary channelOverrideMap; + protected bool discardOffChannelTokens; + protected System.Collections.Generic.List discardSet; + protected int lastMarker; + protected int p; + protected System.Collections.Generic.List tokens; + } + + // Generated from `Antlr.Runtime.Lexer` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class Lexer : Antlr.Runtime.BaseRecognizer, Antlr.Runtime.ITokenSource + { + public virtual int CharIndex { get => throw null; } + public int CharPositionInLine { get => throw null; set => throw null; } + public virtual Antlr.Runtime.ICharStream CharStream { get => throw null; set => throw null; } + public virtual void Emit(Antlr.Runtime.IToken token) => throw null; + public virtual Antlr.Runtime.IToken Emit() => throw null; + public virtual string GetCharErrorDisplay(int c) => throw null; + public virtual Antlr.Runtime.IToken GetEndOfFileToken() => throw null; + public override string GetErrorMessage(Antlr.Runtime.RecognitionException e, string[] tokenNames) => throw null; + public Lexer(Antlr.Runtime.ICharStream input, Antlr.Runtime.RecognizerSharedState state) => throw null; + public Lexer(Antlr.Runtime.ICharStream input) => throw null; + public Lexer() => throw null; + public int Line { get => throw null; set => throw null; } + public virtual void Match(string s) => throw null; + public virtual void Match(int c) => throw null; + public virtual void MatchAny() => throw null; + public virtual void MatchRange(int a, int b) => throw null; + public virtual Antlr.Runtime.IToken NextToken() => throw null; + protected virtual void ParseNextToken() => throw null; + public virtual void Recover(Antlr.Runtime.RecognitionException re) => throw null; + public override void ReportError(Antlr.Runtime.RecognitionException e) => throw null; + public override void Reset() => throw null; + public virtual void Skip() => throw null; + public override string SourceName { get => throw null; } + public string Text { get => throw null; set => throw null; } + public virtual void TraceIn(string ruleName, int ruleIndex) => throw null; + public virtual void TraceOut(string ruleName, int ruleIndex) => throw null; + protected Antlr.Runtime.ICharStream input; + public abstract void mTokens(); + } + + // Generated from `Antlr.Runtime.MismatchedNotSetException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MismatchedNotSetException : Antlr.Runtime.MismatchedSetException + { + public MismatchedNotSetException(string message, System.Exception innerException) => throw null; + public MismatchedNotSetException(string message, Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public MismatchedNotSetException(string message, Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedNotSetException(string message) => throw null; + public MismatchedNotSetException(Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedNotSetException() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.MismatchedRangeException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MismatchedRangeException : Antlr.Runtime.RecognitionException + { + public int A { get => throw null; } + public int B { get => throw null; } + public MismatchedRangeException(string message, int a, int b, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public MismatchedRangeException(string message, int a, int b, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedRangeException(string message, System.Exception innerException) => throw null; + public MismatchedRangeException(string message) => throw null; + public MismatchedRangeException(int a, int b, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedRangeException() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.MismatchedSetException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MismatchedSetException : Antlr.Runtime.RecognitionException + { + public Antlr.Runtime.BitSet Expecting { get => throw null; } + public MismatchedSetException(string message, System.Exception innerException) => throw null; + public MismatchedSetException(string message, Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public MismatchedSetException(string message, Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedSetException(string message) => throw null; + public MismatchedSetException(Antlr.Runtime.BitSet expecting, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedSetException() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.MismatchedTokenException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MismatchedTokenException : Antlr.Runtime.RecognitionException + { + public int Expecting { get => throw null; } + public MismatchedTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames, System.Exception innerException) => throw null; + public MismatchedTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames) => throw null; + public MismatchedTokenException(string message, System.Exception innerException) => throw null; + public MismatchedTokenException(string message) => throw null; + public MismatchedTokenException(int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames) => throw null; + public MismatchedTokenException(int expecting, Antlr.Runtime.IIntStream input) => throw null; + public MismatchedTokenException() => throw null; + public override string ToString() => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection TokenNames { get => throw null; } + } + + // Generated from `Antlr.Runtime.MismatchedTreeNodeException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MismatchedTreeNodeException : Antlr.Runtime.RecognitionException + { + public int Expecting { get => throw null; } + public MismatchedTreeNodeException(string message, int expecting, Antlr.Runtime.Tree.ITreeNodeStream input, System.Exception innerException) => throw null; + public MismatchedTreeNodeException(string message, int expecting, Antlr.Runtime.Tree.ITreeNodeStream input) => throw null; + public MismatchedTreeNodeException(string message, System.Exception innerException) => throw null; + public MismatchedTreeNodeException(string message) => throw null; + public MismatchedTreeNodeException(int expecting, Antlr.Runtime.Tree.ITreeNodeStream input) => throw null; + public MismatchedTreeNodeException() => throw null; + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.MissingTokenException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class MissingTokenException : Antlr.Runtime.MismatchedTokenException + { + public MissingTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, object inserted, System.Collections.Generic.IList tokenNames, System.Exception innerException) => throw null; + public MissingTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, object inserted, System.Collections.Generic.IList tokenNames) => throw null; + public MissingTokenException(string message, System.Exception innerException) => throw null; + public MissingTokenException(string message) => throw null; + public MissingTokenException(int expecting, Antlr.Runtime.IIntStream input, object inserted, System.Collections.Generic.IList tokenNames) => throw null; + public MissingTokenException(int expecting, Antlr.Runtime.IIntStream input, object inserted) => throw null; + public MissingTokenException() => throw null; + public virtual int MissingType { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.NoViableAltException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class NoViableAltException : Antlr.Runtime.RecognitionException + { + public int DecisionNumber { get => throw null; } + public string GrammarDecisionDescription { get => throw null; } + public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input, int k, System.Exception innerException) => throw null; + public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input, int k) => throw null; + public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input) => throw null; + public NoViableAltException(string message, string grammarDecisionDescription, System.Exception innerException) => throw null; + public NoViableAltException(string message, string grammarDecisionDescription) => throw null; + public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input, int k) => throw null; + public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, Antlr.Runtime.IIntStream input) => throw null; + public NoViableAltException(string grammarDecisionDescription) => throw null; + public NoViableAltException() => throw null; + public int StateNumber { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.Parser` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class Parser : Antlr.Runtime.BaseRecognizer + { + protected override object GetCurrentInputSymbol(Antlr.Runtime.IIntStream input) => throw null; + protected override object GetMissingSymbol(Antlr.Runtime.IIntStream input, Antlr.Runtime.RecognitionException e, int expectedTokenType, Antlr.Runtime.BitSet follow) => throw null; + public Parser(Antlr.Runtime.ITokenStream input, Antlr.Runtime.RecognizerSharedState state) => throw null; + public Parser(Antlr.Runtime.ITokenStream input) => throw null; + public override void Reset() => throw null; + public override string SourceName { get => throw null; } + public virtual Antlr.Runtime.ITokenStream TokenStream { get => throw null; set => throw null; } + public virtual void TraceIn(string ruleName, int ruleIndex) => throw null; + public virtual void TraceOut(string ruleName, int ruleIndex) => throw null; + public Antlr.Runtime.ITokenStream input; + } + + // Generated from `Antlr.Runtime.ParserRuleReturnScope<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ParserRuleReturnScope : Antlr.Runtime.IRuleReturnScope, Antlr.Runtime.IRuleReturnScope + { + public ParserRuleReturnScope() => throw null; + public TToken Start { get => throw null; set => throw null; } + object Antlr.Runtime.IRuleReturnScope.Start { get => throw null; } + public TToken Stop { get => throw null; set => throw null; } + object Antlr.Runtime.IRuleReturnScope.Stop { get => throw null; } + } + + // Generated from `Antlr.Runtime.RecognitionException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RecognitionException : System.Exception + { + public bool ApproximateLineInfo { get => throw null; set => throw null; } + public int CharPositionInLine { get => throw null; set => throw null; } + public int Character { get => throw null; set => throw null; } + protected virtual void ExtractInformationFromTreeNodeStream(Antlr.Runtime.Tree.ITreeNodeStream input, int k) => throw null; + protected virtual void ExtractInformationFromTreeNodeStream(Antlr.Runtime.Tree.ITreeNodeStream input) => throw null; + public int Index { get => throw null; set => throw null; } + public Antlr.Runtime.IIntStream Input { get => throw null; set => throw null; } + public int Line { get => throw null; set => throw null; } + public int Lookahead { get => throw null; } + public object Node { get => throw null; set => throw null; } + public RecognitionException(string message, System.Exception innerException) => throw null; + public RecognitionException(string message, Antlr.Runtime.IIntStream input, int k, System.Exception innerException) => throw null; + public RecognitionException(string message, Antlr.Runtime.IIntStream input, int k) => throw null; + public RecognitionException(string message, Antlr.Runtime.IIntStream input, System.Exception innerException) => throw null; + public RecognitionException(string message, Antlr.Runtime.IIntStream input) => throw null; + public RecognitionException(string message) => throw null; + public RecognitionException(Antlr.Runtime.IIntStream input, int k) => throw null; + public RecognitionException(Antlr.Runtime.IIntStream input) => throw null; + public RecognitionException() => throw null; + public Antlr.Runtime.IToken Token { get => throw null; set => throw null; } + public virtual int UnexpectedType { get => throw null; } + } + + // Generated from `Antlr.Runtime.RecognizerSharedState` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RecognizerSharedState + { + public RecognizerSharedState(Antlr.Runtime.RecognizerSharedState state) => throw null; + public RecognizerSharedState() => throw null; + public int _fsp; + public int backtracking; + public int channel; + public bool errorRecovery; + public bool failed; + public Antlr.Runtime.BitSet[] following; + public int lastErrorIndex; + public System.Collections.Generic.IDictionary[] ruleMemo; + public int syntaxErrors; + public string text; + public Antlr.Runtime.IToken token; + public int tokenStartCharIndex; + public int tokenStartCharPositionInLine; + public int tokenStartLine; + public int type; + } + + // Generated from `Antlr.Runtime.SpecialStateTransitionHandler` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public delegate int SpecialStateTransitionHandler(Antlr.Runtime.DFA dfa, int s, Antlr.Runtime.IIntStream input); + + // Generated from `Antlr.Runtime.TemplateParserRuleReturnScope<,>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TemplateParserRuleReturnScope : Antlr.Runtime.ParserRuleReturnScope, Antlr.Runtime.ITemplateRuleReturnScope, Antlr.Runtime.ITemplateRuleReturnScope + { + public TTemplate Template { get => throw null; set => throw null; } + object Antlr.Runtime.ITemplateRuleReturnScope.Template { get => throw null; } + public TemplateParserRuleReturnScope() => throw null; + } + + // Generated from `Antlr.Runtime.TokenChannels` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public static class TokenChannels + { + public const int Default = default; + public const int Hidden = default; + } + + // Generated from `Antlr.Runtime.TokenRewriteStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TokenRewriteStream : Antlr.Runtime.CommonTokenStream + { + protected virtual string CatOpText(object a, object b) => throw null; + public const string DEFAULT_PROGRAM_NAME = default; + public virtual void Delete(string programName, int from, int to) => throw null; + public virtual void Delete(string programName, Antlr.Runtime.IToken from, Antlr.Runtime.IToken to) => throw null; + public virtual void Delete(int index) => throw null; + public virtual void Delete(int from, int to) => throw null; + public virtual void Delete(Antlr.Runtime.IToken indexT) => throw null; + public virtual void Delete(Antlr.Runtime.IToken from, Antlr.Runtime.IToken to) => throw null; + public virtual void DeleteProgram(string programName) => throw null; + public virtual void DeleteProgram() => throw null; + protected virtual System.Collections.Generic.IList GetKindOfOps(System.Collections.Generic.IList rewrites, System.Type kind, int before) => throw null; + protected virtual System.Collections.Generic.IList GetKindOfOps(System.Collections.Generic.IList rewrites, System.Type kind) => throw null; + public virtual int GetLastRewriteTokenIndex() => throw null; + protected virtual int GetLastRewriteTokenIndex(string programName) => throw null; + protected virtual System.Collections.Generic.IList GetProgram(string name) => throw null; + protected void Init() => throw null; + public virtual void InsertAfter(string programName, int index, object text) => throw null; + public virtual void InsertAfter(string programName, Antlr.Runtime.IToken t, object text) => throw null; + public virtual void InsertAfter(int index, object text) => throw null; + public virtual void InsertAfter(Antlr.Runtime.IToken t, object text) => throw null; + public virtual void InsertBefore(string programName, int index, object text) => throw null; + public virtual void InsertBefore(string programName, Antlr.Runtime.IToken t, object text) => throw null; + public virtual void InsertBefore(int index, object text) => throw null; + public virtual void InsertBefore(Antlr.Runtime.IToken t, object text) => throw null; + public const int MIN_TOKEN_INDEX = default; + public const int PROGRAM_INIT_SIZE = default; + protected virtual System.Collections.Generic.IDictionary ReduceToSingleOperationPerIndex(System.Collections.Generic.IList rewrites) => throw null; + public virtual void Replace(string programName, int from, int to, object text) => throw null; + public virtual void Replace(string programName, Antlr.Runtime.IToken from, Antlr.Runtime.IToken to, object text) => throw null; + public virtual void Replace(int index, object text) => throw null; + public virtual void Replace(int from, int to, object text) => throw null; + public virtual void Replace(Antlr.Runtime.IToken indexT, object text) => throw null; + public virtual void Replace(Antlr.Runtime.IToken from, Antlr.Runtime.IToken to, object text) => throw null; + // Generated from `Antlr.Runtime.TokenRewriteStream+RewriteOperation` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + protected class RewriteOperation + { + public virtual int Execute(System.Text.StringBuilder buf) => throw null; + protected RewriteOperation(Antlr.Runtime.TokenRewriteStream stream, int index, object text) => throw null; + protected RewriteOperation(Antlr.Runtime.TokenRewriteStream stream, int index) => throw null; + public override string ToString() => throw null; + public int index; + public int instructionIndex; + protected Antlr.Runtime.TokenRewriteStream stream; + public object text; + } + + + public virtual void Rollback(string programName, int instructionIndex) => throw null; + public virtual void Rollback(int instructionIndex) => throw null; + protected virtual void SetLastRewriteTokenIndex(string programName, int i) => throw null; + public virtual string ToDebugString(int start, int end) => throw null; + public virtual string ToDebugString() => throw null; + public virtual string ToOriginalString(int start, int end) => throw null; + public virtual string ToOriginalString() => throw null; + public virtual string ToString(string programName, int start, int end) => throw null; + public virtual string ToString(string programName) => throw null; + public override string ToString(int start, int end) => throw null; + public override string ToString() => throw null; + public TokenRewriteStream(Antlr.Runtime.ITokenSource tokenSource, int channel) => throw null; + public TokenRewriteStream(Antlr.Runtime.ITokenSource tokenSource) => throw null; + public TokenRewriteStream() => throw null; + protected System.Collections.Generic.IDictionary lastRewriteTokenIndexes; + protected System.Collections.Generic.IDictionary> programs; + } + + // Generated from `Antlr.Runtime.TokenTypes` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public static class TokenTypes + { + public const int Down = default; + public const int EndOfFile = default; + public const int EndOfRule = default; + public const int Invalid = default; + public const int Min = default; + public const int Up = default; + } + + // Generated from `Antlr.Runtime.Tokens` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public static class Tokens + { + public static Antlr.Runtime.IToken Skip; + } + + // Generated from `Antlr.Runtime.UnbufferedTokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class UnbufferedTokenStream : Antlr.Runtime.Misc.LookaheadStream, Antlr.Runtime.ITokenStreamInformation, Antlr.Runtime.ITokenStream, Antlr.Runtime.IIntStream + { + public override void Clear() => throw null; + public override void Consume() => throw null; + public Antlr.Runtime.IToken Get(int i) => throw null; + public override bool IsEndOfFile(Antlr.Runtime.IToken o) => throw null; + public int LA(int i) => throw null; + public Antlr.Runtime.IToken LastRealToken { get => throw null; } + public Antlr.Runtime.IToken LastToken { get => throw null; } + public override int Mark() => throw null; + public int MaxLookBehind { get => throw null; } + public override Antlr.Runtime.IToken NextElement() => throw null; + public override void Release(int marker) => throw null; + public string SourceName { get => throw null; } + public string ToString(int start, int stop) => throw null; + public string ToString(Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop) => throw null; + public Antlr.Runtime.ITokenSource TokenSource { get => throw null; } + public UnbufferedTokenStream(Antlr.Runtime.ITokenSource tokenSource) => throw null; + protected int channel; + protected int tokenIndex; + protected Antlr.Runtime.ITokenSource tokenSource; + } + + // Generated from `Antlr.Runtime.UnwantedTokenException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class UnwantedTokenException : Antlr.Runtime.MismatchedTokenException + { + public override string ToString() => throw null; + public virtual Antlr.Runtime.IToken UnexpectedToken { get => throw null; } + public UnwantedTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames, System.Exception innerException) => throw null; + public UnwantedTokenException(string message, int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames) => throw null; + public UnwantedTokenException(string message, System.Exception innerException) => throw null; + public UnwantedTokenException(string message) => throw null; + public UnwantedTokenException(int expecting, Antlr.Runtime.IIntStream input, System.Collections.Generic.IList tokenNames) => throw null; + public UnwantedTokenException(int expecting, Antlr.Runtime.IIntStream input) => throw null; + public UnwantedTokenException() => throw null; + } + + namespace Debug + { + // Generated from `Antlr.Runtime.Debug.IDebugEventListener` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IDebugEventListener + { + void AddChild(object root, object child); + void BecomeRoot(object newRoot, object oldRoot); + void BeginBacktrack(int level); + void BeginResync(); + void Commence(); + void ConsumeHiddenToken(Antlr.Runtime.IToken t); + void ConsumeNode(object t); + void ConsumeToken(Antlr.Runtime.IToken t); + void CreateNode(object t); + void CreateNode(object node, Antlr.Runtime.IToken token); + void EndBacktrack(int level, bool successful); + void EndResync(); + void EnterAlt(int alt); + void EnterDecision(int decisionNumber, bool couldBacktrack); + void EnterRule(string grammarFileName, string ruleName); + void EnterSubRule(int decisionNumber); + void ErrorNode(object t); + void ExitDecision(int decisionNumber); + void ExitRule(string grammarFileName, string ruleName); + void ExitSubRule(int decisionNumber); + void Initialize(); + void LT(int i, object t); + void LT(int i, Antlr.Runtime.IToken t); + void Location(int line, int pos); + void Mark(int marker); + void NilNode(object t); + void RecognitionException(Antlr.Runtime.RecognitionException e); + void Rewind(int marker); + void Rewind(); + void SemanticPredicate(bool result, string predicate); + void SetTokenBoundaries(object t, int tokenStartIndex, int tokenStopIndex); + void Terminate(); + } + + } + namespace Misc + { + // Generated from `Antlr.Runtime.Misc.Action` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public delegate void Action(); + + // Generated from `Antlr.Runtime.Misc.FastQueue<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class FastQueue + { + public virtual void Clear() => throw null; + public virtual int Count { get => throw null; } + public virtual T Dequeue() => throw null; + public virtual void Enqueue(T o) => throw null; + public FastQueue() => throw null; + public virtual T this[int i] { get => throw null; } + public virtual T Peek() => throw null; + public virtual int Range { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Antlr.Runtime.Misc.Func<,>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public delegate TResult Func(T arg); + + // Generated from `Antlr.Runtime.Misc.Func<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public delegate TResult Func(); + + // Generated from `Antlr.Runtime.Misc.ListStack<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ListStack : System.Collections.Generic.List + { + public ListStack() => throw null; + public T Peek(int depth) => throw null; + public T Peek() => throw null; + public T Pop() => throw null; + public void Push(T item) => throw null; + public bool TryPeek(out T item) => throw null; + public bool TryPeek(int depth, out T item) => throw null; + public bool TryPop(out T item) => throw null; + } + + // Generated from `Antlr.Runtime.Misc.LookaheadStream<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class LookaheadStream : Antlr.Runtime.Misc.FastQueue where T : class + { + public virtual void Consume() => throw null; + public override int Count { get => throw null; } + public override T Dequeue() => throw null; + public T EndOfFile { get => throw null; set => throw null; } + public virtual void Fill(int n) => throw null; + public virtual int Index { get => throw null; } + public abstract bool IsEndOfFile(T o); + protected virtual T LB(int k) => throw null; + public virtual T LT(int k) => throw null; + protected LookaheadStream() => throw null; + public virtual int Mark() => throw null; + public abstract T NextElement(); + public T PreviousElement { get => throw null; } + public virtual void Release(int marker) => throw null; + public virtual void Reset() => throw null; + public virtual void Rewind(int marker) => throw null; + public virtual void Rewind() => throw null; + public virtual void Seek(int index) => throw null; + protected virtual void SyncAhead(int need) => throw null; + } + + } + namespace Tree + { + // Generated from `Antlr.Runtime.Tree.AstTreeRuleReturnScope<,>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class AstTreeRuleReturnScope : Antlr.Runtime.Tree.TreeRuleReturnScope, Antlr.Runtime.IRuleReturnScope, Antlr.Runtime.IAstRuleReturnScope, Antlr.Runtime.IAstRuleReturnScope + { + public AstTreeRuleReturnScope() => throw null; + public TOutputTree Tree { get => throw null; set => throw null; } + object Antlr.Runtime.IAstRuleReturnScope.Tree { get => throw null; } + } + + // Generated from `Antlr.Runtime.Tree.BaseTree` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class BaseTree : Antlr.Runtime.Tree.ITree + { + public virtual void AddChild(Antlr.Runtime.Tree.ITree t) => throw null; + public virtual void AddChildren(System.Collections.Generic.IEnumerable kids) => throw null; + public BaseTree(Antlr.Runtime.Tree.ITree node) => throw null; + public BaseTree() => throw null; + public virtual int CharPositionInLine { get => throw null; set => throw null; } + public virtual int ChildCount { get => throw null; } + public virtual int ChildIndex { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IList Children { get => throw null; set => throw null; } + protected virtual System.Collections.Generic.IList CreateChildrenList() => throw null; + public virtual object DeleteChild(int i) => throw null; + public abstract Antlr.Runtime.Tree.ITree DupNode(); + public virtual void FreshenParentAndChildIndexes(int offset) => throw null; + public virtual void FreshenParentAndChildIndexes() => throw null; + public virtual void FreshenParentAndChildIndexesDeeply(int offset) => throw null; + public virtual void FreshenParentAndChildIndexesDeeply() => throw null; + public virtual Antlr.Runtime.Tree.ITree GetAncestor(int ttype) => throw null; + public virtual System.Collections.Generic.IList GetAncestors() => throw null; + public virtual Antlr.Runtime.Tree.ITree GetChild(int i) => throw null; + public virtual Antlr.Runtime.Tree.ITree GetFirstChildWithType(int type) => throw null; + public virtual bool HasAncestor(int ttype) => throw null; + public virtual void InsertChild(int i, Antlr.Runtime.Tree.ITree t) => throw null; + public virtual bool IsNil { get => throw null; } + public virtual int Line { get => throw null; set => throw null; } + public virtual Antlr.Runtime.Tree.ITree Parent { get => throw null; set => throw null; } + public virtual void ReplaceChildren(int startChildIndex, int stopChildIndex, object t) => throw null; + public virtual void SanityCheckParentAndChildIndexes(Antlr.Runtime.Tree.ITree parent, int i) => throw null; + public virtual void SanityCheckParentAndChildIndexes() => throw null; + public virtual void SetChild(int i, Antlr.Runtime.Tree.ITree t) => throw null; + public abstract string Text { get; set; } + public abstract override string ToString(); + public virtual string ToStringTree() => throw null; + public abstract int TokenStartIndex { get; set; } + public abstract int TokenStopIndex { get; set; } + public abstract int Type { get; set; } + } + + // Generated from `Antlr.Runtime.Tree.BaseTreeAdaptor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class BaseTreeAdaptor : Antlr.Runtime.Tree.ITreeAdaptor + { + public virtual void AddChild(object t, object child) => throw null; + protected BaseTreeAdaptor() => throw null; + public virtual object BecomeRoot(object newRoot, object oldRoot) => throw null; + public virtual object BecomeRoot(Antlr.Runtime.IToken newRoot, object oldRoot) => throw null; + public virtual object Create(int tokenType, string text) => throw null; + public virtual object Create(int tokenType, Antlr.Runtime.IToken fromToken, string text) => throw null; + public virtual object Create(int tokenType, Antlr.Runtime.IToken fromToken) => throw null; + public virtual object Create(Antlr.Runtime.IToken fromToken, string text) => throw null; + public abstract object Create(Antlr.Runtime.IToken payload); + public abstract Antlr.Runtime.IToken CreateToken(int tokenType, string text); + public abstract Antlr.Runtime.IToken CreateToken(Antlr.Runtime.IToken fromToken); + public virtual object DeleteChild(object t, int i) => throw null; + public virtual object DupNode(object treeNode, string text) => throw null; + public virtual object DupNode(object treeNode) => throw null; + public virtual object DupNode(int type, object treeNode, string text) => throw null; + public virtual object DupNode(int type, object treeNode) => throw null; + public virtual object DupTree(object tree) => throw null; + public virtual object DupTree(object t, object parent) => throw null; + public virtual object ErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e) => throw null; + public virtual object GetChild(object t, int i) => throw null; + public virtual int GetChildCount(object t) => throw null; + public virtual int GetChildIndex(object t) => throw null; + public virtual object GetParent(object t) => throw null; + public virtual string GetText(object t) => throw null; + public abstract Antlr.Runtime.IToken GetToken(object t); + public virtual int GetTokenStartIndex(object t) => throw null; + public virtual int GetTokenStopIndex(object t) => throw null; + protected virtual Antlr.Runtime.Tree.ITree GetTree(object t) => throw null; + public virtual int GetType(object t) => throw null; + public virtual int GetUniqueID(object node) => throw null; + public virtual bool IsNil(object tree) => throw null; + public virtual object Nil() => throw null; + public virtual void ReplaceChildren(object parent, int startChildIndex, int stopChildIndex, object t) => throw null; + public virtual object RulePostProcessing(object root) => throw null; + public virtual void SetChild(object t, int i, object child) => throw null; + public virtual void SetChildIndex(object t, int index) => throw null; + public virtual void SetParent(object t, object parent) => throw null; + public virtual void SetText(object t, string text) => throw null; + public virtual void SetTokenBoundaries(object t, Antlr.Runtime.IToken startToken, Antlr.Runtime.IToken stopToken) => throw null; + public virtual void SetType(object t, int type) => throw null; + protected System.Collections.Generic.IDictionary treeToUniqueIDMap; + protected int uniqueNodeID; + } + + // Generated from `Antlr.Runtime.Tree.BufferedTreeNodeStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class BufferedTreeNodeStream : Antlr.Runtime.Tree.ITreeNodeStream, Antlr.Runtime.ITokenStreamInformation, Antlr.Runtime.IIntStream + { + protected virtual void AddNavigationNode(int ttype) => throw null; + public BufferedTreeNodeStream(object tree) => throw null; + public BufferedTreeNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, object tree, int initialBufferSize) => throw null; + public BufferedTreeNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, object tree) => throw null; + public virtual void Consume() => throw null; + public virtual int Count { get => throw null; } + public const int DEFAULT_INITIAL_BUFFER_SIZE = default; + public virtual void FillBuffer(object t) => throw null; + protected virtual void FillBuffer() => throw null; + public virtual object GetCurrentSymbol() => throw null; + protected virtual int GetNodeIndex(object node) => throw null; + public const int INITIAL_CALL_STACK_SIZE = default; + public virtual int Index { get => throw null; } + public virtual object this[int i] { get => throw null; } + public virtual System.Collections.Generic.IEnumerator Iterator() => throw null; + public virtual int LA(int i) => throw null; + protected virtual object LB(int k) => throw null; + public virtual object LT(int k) => throw null; + public virtual Antlr.Runtime.IToken LastRealToken { get => throw null; } + public virtual Antlr.Runtime.IToken LastToken { get => throw null; } + public virtual int Mark() => throw null; + public virtual int MaxLookBehind { get => throw null; } + public virtual int Pop() => throw null; + public virtual void Push(int index) => throw null; + public virtual void Release(int marker) => throw null; + public virtual void ReplaceChildren(object parent, int startChildIndex, int stopChildIndex, object t) => throw null; + public virtual void Reset() => throw null; + public virtual void Rewind(int marker) => throw null; + public virtual void Rewind() => throw null; + public virtual void Seek(int index) => throw null; + public virtual string SourceName { get => throw null; } + // Generated from `Antlr.Runtime.Tree.BufferedTreeNodeStream+StreamIterator` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + protected class StreamIterator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public object Current { get => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + public StreamIterator(Antlr.Runtime.Tree.BufferedTreeNodeStream outer) => throw null; + } + + + public virtual string ToString(object start, object stop) => throw null; + public virtual string ToTokenString(int start, int stop) => throw null; + public virtual string ToTokenTypeString() => throw null; + public virtual Antlr.Runtime.ITokenStream TokenStream { get => throw null; set => throw null; } + public virtual Antlr.Runtime.Tree.ITreeAdaptor TreeAdaptor { get => throw null; set => throw null; } + public virtual object TreeSource { get => throw null; } + public virtual bool UniqueNavigationNodes { get => throw null; set => throw null; } + protected System.Collections.Generic.Stack calls; + protected object down; + protected object eof; + protected int lastMarker; + protected System.Collections.IList nodes; + protected int p; + protected object root; + protected Antlr.Runtime.ITokenStream tokens; + protected object up; + } + + // Generated from `Antlr.Runtime.Tree.CommonErrorNode` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonErrorNode : Antlr.Runtime.Tree.CommonTree + { + public CommonErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e) => throw null; + public override bool IsNil { get => throw null; } + public override string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override int Type { get => throw null; set => throw null; } + public Antlr.Runtime.IIntStream input; + public Antlr.Runtime.IToken start; + public Antlr.Runtime.IToken stop; + public Antlr.Runtime.RecognitionException trappedException; + } + + // Generated from `Antlr.Runtime.Tree.CommonTree` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonTree : Antlr.Runtime.Tree.BaseTree + { + public override int CharPositionInLine { get => throw null; set => throw null; } + public override int ChildIndex { get => throw null; set => throw null; } + public CommonTree(Antlr.Runtime.Tree.CommonTree node) => throw null; + public CommonTree(Antlr.Runtime.IToken t) => throw null; + public CommonTree() => throw null; + public override Antlr.Runtime.Tree.ITree DupNode() => throw null; + public override bool IsNil { get => throw null; } + public override int Line { get => throw null; set => throw null; } + public override Antlr.Runtime.Tree.ITree Parent { get => throw null; set => throw null; } + public virtual void SetUnknownTokenBoundaries() => throw null; + public override string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + public Antlr.Runtime.IToken Token { get => throw null; set => throw null; } + public override int TokenStartIndex { get => throw null; set => throw null; } + public override int TokenStopIndex { get => throw null; set => throw null; } + public override int Type { get => throw null; set => throw null; } + protected int startIndex; + protected int stopIndex; + } + + // Generated from `Antlr.Runtime.Tree.CommonTreeAdaptor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonTreeAdaptor : Antlr.Runtime.Tree.BaseTreeAdaptor + { + public CommonTreeAdaptor() => throw null; + public override object Create(Antlr.Runtime.IToken payload) => throw null; + public override Antlr.Runtime.IToken CreateToken(int tokenType, string text) => throw null; + public override Antlr.Runtime.IToken CreateToken(Antlr.Runtime.IToken fromToken) => throw null; + public override Antlr.Runtime.IToken GetToken(object t) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.CommonTreeNodeStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class CommonTreeNodeStream : Antlr.Runtime.Misc.LookaheadStream, Antlr.Runtime.Tree.ITreeNodeStream, Antlr.Runtime.Tree.IPositionTrackingStream, Antlr.Runtime.IIntStream + { + public CommonTreeNodeStream(object tree) => throw null; + public CommonTreeNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, object tree) => throw null; + public const int DEFAULT_INITIAL_BUFFER_SIZE = default; + public override object Dequeue() => throw null; + public object GetKnownPositionElement(bool allowApproximateLocation) => throw null; + public bool HasPositionInformation(object node) => throw null; + public const int INITIAL_CALL_STACK_SIZE = default; + public override bool IsEndOfFile(object o) => throw null; + public virtual int LA(int i) => throw null; + public override object NextElement() => throw null; + public virtual int Pop() => throw null; + public virtual void Push(int index) => throw null; + public virtual void ReplaceChildren(object parent, int startChildIndex, int stopChildIndex, object t) => throw null; + public override void Reset() => throw null; + public virtual string SourceName { get => throw null; } + public virtual string ToString(object start, object stop) => throw null; + public virtual string ToTokenTypeString() => throw null; + public virtual Antlr.Runtime.ITokenStream TokenStream { get => throw null; set => throw null; } + public virtual Antlr.Runtime.Tree.ITreeAdaptor TreeAdaptor { get => throw null; set => throw null; } + public virtual object TreeSource { get => throw null; } + public virtual bool UniqueNavigationNodes { get => throw null; set => throw null; } + protected Antlr.Runtime.ITokenStream tokens; + } + + // Generated from `Antlr.Runtime.Tree.DotTreeGenerator` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class DotTreeGenerator + { + protected virtual System.Collections.Generic.IEnumerable DefineEdges(object tree, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + protected virtual System.Collections.Generic.IEnumerable DefineNodes(object tree, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public DotTreeGenerator() => throw null; + protected virtual string FixString(string text) => throw null; + protected virtual int GetNodeNumber(object t) => throw null; + protected virtual string GetNodeText(Antlr.Runtime.Tree.ITreeAdaptor adaptor, object t) => throw null; + public virtual string ToDot(object tree, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public virtual string ToDot(Antlr.Runtime.Tree.ITree tree) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.IPositionTrackingStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IPositionTrackingStream + { + object GetKnownPositionElement(bool allowApproximateLocation); + bool HasPositionInformation(object element); + } + + // Generated from `Antlr.Runtime.Tree.ITree` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITree + { + void AddChild(Antlr.Runtime.Tree.ITree t); + int CharPositionInLine { get; } + int ChildCount { get; } + int ChildIndex { get; set; } + object DeleteChild(int i); + Antlr.Runtime.Tree.ITree DupNode(); + void FreshenParentAndChildIndexes(); + Antlr.Runtime.Tree.ITree GetAncestor(int ttype); + System.Collections.Generic.IList GetAncestors(); + Antlr.Runtime.Tree.ITree GetChild(int i); + bool HasAncestor(int ttype); + bool IsNil { get; } + int Line { get; } + Antlr.Runtime.Tree.ITree Parent { get; set; } + void ReplaceChildren(int startChildIndex, int stopChildIndex, object t); + void SetChild(int i, Antlr.Runtime.Tree.ITree t); + string Text { get; } + string ToString(); + string ToStringTree(); + int TokenStartIndex { get; set; } + int TokenStopIndex { get; set; } + int Type { get; } + } + + // Generated from `Antlr.Runtime.Tree.ITreeAdaptor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITreeAdaptor + { + void AddChild(object t, object child); + object BecomeRoot(object newRoot, object oldRoot); + object BecomeRoot(Antlr.Runtime.IToken newRoot, object oldRoot); + object Create(int tokenType, string text); + object Create(int tokenType, Antlr.Runtime.IToken fromToken, string text); + object Create(int tokenType, Antlr.Runtime.IToken fromToken); + object Create(Antlr.Runtime.IToken payload); + object Create(Antlr.Runtime.IToken fromToken, string text); + object DeleteChild(object t, int i); + object DupNode(object treeNode, string text); + object DupNode(object treeNode); + object DupNode(int type, object treeNode, string text); + object DupNode(int type, object treeNode); + object DupTree(object tree); + object ErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e); + object GetChild(object t, int i); + int GetChildCount(object t); + int GetChildIndex(object t); + object GetParent(object t); + string GetText(object t); + Antlr.Runtime.IToken GetToken(object t); + int GetTokenStartIndex(object t); + int GetTokenStopIndex(object t); + int GetType(object t); + int GetUniqueID(object node); + bool IsNil(object tree); + object Nil(); + void ReplaceChildren(object parent, int startChildIndex, int stopChildIndex, object t); + object RulePostProcessing(object root); + void SetChild(object t, int i, object child); + void SetChildIndex(object t, int index); + void SetParent(object t, object parent); + void SetText(object t, string text); + void SetTokenBoundaries(object t, Antlr.Runtime.IToken startToken, Antlr.Runtime.IToken stopToken); + void SetType(object t, int type); + } + + // Generated from `Antlr.Runtime.Tree.ITreeNodeStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITreeNodeStream : Antlr.Runtime.IIntStream + { + object this[int i] { get; } + object LT(int k); + void ReplaceChildren(object parent, int startChildIndex, int stopChildIndex, object t); + string ToString(object start, object stop); + Antlr.Runtime.ITokenStream TokenStream { get; } + Antlr.Runtime.Tree.ITreeAdaptor TreeAdaptor { get; } + object TreeSource { get; } + bool UniqueNavigationNodes { get; set; } + } + + // Generated from `Antlr.Runtime.Tree.ITreeVisitorAction` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface ITreeVisitorAction + { + object Post(object t); + object Pre(object t); + } + + // Generated from `Antlr.Runtime.Tree.ParseTree` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class ParseTree : Antlr.Runtime.Tree.BaseTree + { + public override Antlr.Runtime.Tree.ITree DupNode() => throw null; + public ParseTree(object label) => throw null; + public override string Text { get => throw null; set => throw null; } + public virtual string ToInputString() => throw null; + public override string ToString() => throw null; + protected virtual void ToStringLeaves(System.Text.StringBuilder buf) => throw null; + public virtual string ToStringWithHiddenTokens() => throw null; + public override int TokenStartIndex { get => throw null; set => throw null; } + public override int TokenStopIndex { get => throw null; set => throw null; } + public override int Type { get => throw null; set => throw null; } + public System.Collections.Generic.List hiddenTokens; + public object payload; + } + + // Generated from `Antlr.Runtime.Tree.RewriteCardinalityException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteCardinalityException : System.Exception + { + public RewriteCardinalityException(string message, string elementDescription, System.Exception innerException) => throw null; + public RewriteCardinalityException(string message, string elementDescription) => throw null; + public RewriteCardinalityException(string elementDescription, System.Exception innerException) => throw null; + public RewriteCardinalityException(string elementDescription) => throw null; + public RewriteCardinalityException() => throw null; + } + + // Generated from `Antlr.Runtime.Tree.RewriteEarlyExitException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteEarlyExitException : Antlr.Runtime.Tree.RewriteCardinalityException + { + public RewriteEarlyExitException(string message, string elementDescription, System.Exception innerException) => throw null; + public RewriteEarlyExitException(string message, string elementDescription) => throw null; + public RewriteEarlyExitException(string elementDescription, System.Exception innerException) => throw null; + public RewriteEarlyExitException(string elementDescription) => throw null; + public RewriteEarlyExitException() => throw null; + } + + // Generated from `Antlr.Runtime.Tree.RewriteEmptyStreamException` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteEmptyStreamException : Antlr.Runtime.Tree.RewriteCardinalityException + { + public RewriteEmptyStreamException(string message, string elementDescription, System.Exception innerException) => throw null; + public RewriteEmptyStreamException(string message, string elementDescription) => throw null; + public RewriteEmptyStreamException(string elementDescription, System.Exception innerException) => throw null; + public RewriteEmptyStreamException(string elementDescription) => throw null; + public RewriteEmptyStreamException() => throw null; + } + + // Generated from `Antlr.Runtime.Tree.RewriteRuleElementStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class RewriteRuleElementStream + { + public virtual void Add(object el) => throw null; + public virtual int Count { get => throw null; } + public virtual string Description { get => throw null; } + protected abstract object Dup(object el); + public virtual bool HasNext { get => throw null; } + protected virtual object NextCore() => throw null; + public virtual object NextTree() => throw null; + public virtual void Reset() => throw null; + public RewriteRuleElementStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, object oneElement) => throw null; + public RewriteRuleElementStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, System.Collections.IList elements) => throw null; + public RewriteRuleElementStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription) => throw null; + protected virtual object ToTree(object el) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor adaptor; + protected int cursor; + protected bool dirty; + protected string elementDescription; + protected System.Collections.IList elements; + protected object singleElement; + } + + // Generated from `Antlr.Runtime.Tree.RewriteRuleNodeStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteRuleNodeStream : Antlr.Runtime.Tree.RewriteRuleElementStream + { + protected override object Dup(object el) => throw null; + public virtual object NextNode() => throw null; + public RewriteRuleNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, object oneElement) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, System.Collections.IList elements) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleNodeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + protected override object ToTree(object el) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.RewriteRuleSubtreeStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteRuleSubtreeStream : Antlr.Runtime.Tree.RewriteRuleElementStream + { + protected override object Dup(object el) => throw null; + public virtual object NextNode() => throw null; + public RewriteRuleSubtreeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, object oneElement) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleSubtreeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, System.Collections.IList elements) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleSubtreeStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.RewriteRuleTokenStream` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class RewriteRuleTokenStream : Antlr.Runtime.Tree.RewriteRuleElementStream + { + protected override object Dup(object el) => throw null; + public virtual object NextNode() => throw null; + public virtual Antlr.Runtime.IToken NextToken() => throw null; + public RewriteRuleTokenStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, object oneElement) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleTokenStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription, System.Collections.IList elements) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + public RewriteRuleTokenStream(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string elementDescription) : base(default(Antlr.Runtime.Tree.ITreeAdaptor), default(string)) => throw null; + protected override object ToTree(object el) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.TemplateTreeRuleReturnScope<,>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TemplateTreeRuleReturnScope : Antlr.Runtime.Tree.TreeRuleReturnScope, Antlr.Runtime.ITemplateRuleReturnScope, Antlr.Runtime.ITemplateRuleReturnScope + { + public TTemplate Template { get => throw null; set => throw null; } + object Antlr.Runtime.ITemplateRuleReturnScope.Template { get => throw null; } + public TemplateTreeRuleReturnScope() => throw null; + } + + // Generated from `Antlr.Runtime.Tree.TreeFilter` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeFilter : Antlr.Runtime.Tree.TreeParser + { + public virtual void ApplyOnce(object t, Antlr.Runtime.Misc.Action whichRule) => throw null; + protected virtual void Bottomup() => throw null; + public virtual void Downup(object t) => throw null; + protected virtual void Topdown() => throw null; + public TreeFilter(Antlr.Runtime.Tree.ITreeNodeStream input, Antlr.Runtime.RecognizerSharedState state) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public TreeFilter(Antlr.Runtime.Tree.ITreeNodeStream input) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor originalAdaptor; + protected Antlr.Runtime.ITokenStream originalTokenStream; + } + + // Generated from `Antlr.Runtime.Tree.TreeIterator` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeIterator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public object Current { get => throw null; set => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + public TreeIterator(Antlr.Runtime.Tree.ITreeAdaptor adaptor, object tree) => throw null; + public TreeIterator(Antlr.Runtime.Tree.CommonTree tree) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor adaptor; + public object down; + public object eof; + protected bool firstTime; + protected System.Collections.Generic.Queue nodes; + protected object root; + protected object tree; + public object up; + } + + // Generated from `Antlr.Runtime.Tree.TreeParser` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeParser : Antlr.Runtime.BaseRecognizer + { + public const int DOWN = default; + protected override object GetCurrentInputSymbol(Antlr.Runtime.IIntStream input) => throw null; + public override string GetErrorHeader(Antlr.Runtime.RecognitionException e) => throw null; + public override string GetErrorMessage(Antlr.Runtime.RecognitionException e, string[] tokenNames) => throw null; + protected override object GetMissingSymbol(Antlr.Runtime.IIntStream input, Antlr.Runtime.RecognitionException e, int expectedTokenType, Antlr.Runtime.BitSet follow) => throw null; + public virtual Antlr.Runtime.Tree.ITreeNodeStream GetTreeNodeStream() => throw null; + public override void MatchAny(Antlr.Runtime.IIntStream ignore) => throw null; + protected override object RecoverFromMismatchedToken(Antlr.Runtime.IIntStream input, int ttype, Antlr.Runtime.BitSet follow) => throw null; + public override void Reset() => throw null; + public virtual void SetTreeNodeStream(Antlr.Runtime.Tree.ITreeNodeStream input) => throw null; + public override string SourceName { get => throw null; } + public virtual void TraceIn(string ruleName, int ruleIndex) => throw null; + public virtual void TraceOut(string ruleName, int ruleIndex) => throw null; + public TreeParser(Antlr.Runtime.Tree.ITreeNodeStream input, Antlr.Runtime.RecognizerSharedState state) => throw null; + public TreeParser(Antlr.Runtime.Tree.ITreeNodeStream input) => throw null; + public const int UP = default; + protected Antlr.Runtime.Tree.ITreeNodeStream input; + } + + // Generated from `Antlr.Runtime.Tree.TreePatternLexer` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreePatternLexer + { + public const int Arg = default; + public const int Begin = default; + public const int Colon = default; + protected virtual void Consume() => throw null; + public const int Dot = default; + public const int End = default; + public const int Id = default; + public virtual int NextToken() => throw null; + public const int Percent = default; + public TreePatternLexer(string pattern) => throw null; + protected int c; + public bool error; + protected int n; + protected int p; + protected string pattern; + public System.Text.StringBuilder sval; + } + + // Generated from `Antlr.Runtime.Tree.TreePatternParser` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreePatternParser + { + public virtual object ParseNode() => throw null; + public virtual object ParseTree() => throw null; + public virtual object Pattern() => throw null; + public TreePatternParser(Antlr.Runtime.Tree.TreePatternLexer tokenizer, Antlr.Runtime.Tree.TreeWizard wizard, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor adaptor; + protected Antlr.Runtime.Tree.TreePatternLexer tokenizer; + protected int ttype; + protected Antlr.Runtime.Tree.TreeWizard wizard; + } + + // Generated from `Antlr.Runtime.Tree.TreeRewriter` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeRewriter : Antlr.Runtime.Tree.TreeParser + { + public virtual object ApplyOnce(object t, Antlr.Runtime.Misc.Func whichRule) => throw null; + public virtual object ApplyRepeatedly(object t, Antlr.Runtime.Misc.Func whichRule) => throw null; + protected virtual Antlr.Runtime.IAstRuleReturnScope Bottomup() => throw null; + public virtual object Downup(object t, bool showTransformations) => throw null; + public virtual object Downup(object t) => throw null; + protected virtual void ReportTransformation(object oldTree, object newTree) => throw null; + protected virtual Antlr.Runtime.IAstRuleReturnScope Topdown() => throw null; + public TreeRewriter(Antlr.Runtime.Tree.ITreeNodeStream input, Antlr.Runtime.RecognizerSharedState state) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public TreeRewriter(Antlr.Runtime.Tree.ITreeNodeStream input) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor originalAdaptor; + protected Antlr.Runtime.ITokenStream originalTokenStream; + protected bool showTransformations; + } + + // Generated from `Antlr.Runtime.Tree.TreeRuleReturnScope<>` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeRuleReturnScope : Antlr.Runtime.IRuleReturnScope, Antlr.Runtime.IRuleReturnScope + { + public TTree Start { get => throw null; set => throw null; } + object Antlr.Runtime.IRuleReturnScope.Start { get => throw null; } + object Antlr.Runtime.IRuleReturnScope.Stop { get => throw null; } + TTree Antlr.Runtime.IRuleReturnScope.Stop { get => throw null; } + public TreeRuleReturnScope() => throw null; + } + + // Generated from `Antlr.Runtime.Tree.TreeVisitor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeVisitor + { + public TreeVisitor(Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public TreeVisitor() => throw null; + public object Visit(object t, Antlr.Runtime.Tree.ITreeVisitorAction action) => throw null; + public object Visit(object t, Antlr.Runtime.Misc.Func preAction, Antlr.Runtime.Misc.Func postAction) => throw null; + protected Antlr.Runtime.Tree.ITreeAdaptor adaptor; + } + + // Generated from `Antlr.Runtime.Tree.TreeVisitorAction` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeVisitorAction : Antlr.Runtime.Tree.ITreeVisitorAction + { + public object Post(object t) => throw null; + public object Pre(object t) => throw null; + public TreeVisitorAction(Antlr.Runtime.Misc.Func preAction, Antlr.Runtime.Misc.Func postAction) => throw null; + } + + // Generated from `Antlr.Runtime.Tree.TreeWizard` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreeWizard + { + public virtual System.Collections.Generic.IDictionary ComputeTokenTypes(string[] tokenNames) => throw null; + public virtual object Create(string pattern) => throw null; + public static bool Equals(object t1, object t2, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public bool Equals(object t1, object t2) => throw null; + protected static bool EqualsCore(object t1, object t2, Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public virtual System.Collections.IList Find(object t, string pattern) => throw null; + public virtual System.Collections.IList Find(object t, int ttype) => throw null; + public virtual object FindFirst(object t, string pattern) => throw null; + public virtual object FindFirst(object t, int ttype) => throw null; + public virtual int GetTokenType(string tokenName) => throw null; + // Generated from `Antlr.Runtime.Tree.TreeWizard+IContextVisitor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public interface IContextVisitor + { + void Visit(object t, object parent, int childIndex, System.Collections.Generic.IDictionary labels); + } + + + public System.Collections.Generic.IDictionary Index(object t) => throw null; + protected virtual void IndexCore(object t, System.Collections.Generic.IDictionary m) => throw null; + public bool Parse(object t, string pattern, System.Collections.Generic.IDictionary labels) => throw null; + public bool Parse(object t, string pattern) => throw null; + protected virtual bool ParseCore(object t1, Antlr.Runtime.Tree.TreeWizard.TreePattern tpattern, System.Collections.Generic.IDictionary labels) => throw null; + // Generated from `Antlr.Runtime.Tree.TreeWizard+TreePattern` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreePattern : Antlr.Runtime.Tree.CommonTree + { + public override string ToString() => throw null; + public TreePattern(Antlr.Runtime.IToken payload) => throw null; + public bool hasTextArg; + public string label; + } + + + // Generated from `Antlr.Runtime.Tree.TreeWizard+TreePatternTreeAdaptor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class TreePatternTreeAdaptor : Antlr.Runtime.Tree.CommonTreeAdaptor + { + public override object Create(Antlr.Runtime.IToken payload) => throw null; + public TreePatternTreeAdaptor() => throw null; + } + + + public TreeWizard(string[] tokenNames) => throw null; + public TreeWizard(Antlr.Runtime.Tree.ITreeAdaptor adaptor, string[] tokenNames) => throw null; + public TreeWizard(Antlr.Runtime.Tree.ITreeAdaptor adaptor, System.Collections.Generic.IDictionary tokenNameToTypeMap) => throw null; + public TreeWizard(Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public void Visit(object t, string pattern, Antlr.Runtime.Tree.TreeWizard.IContextVisitor visitor) => throw null; + public void Visit(object t, int ttype, System.Action action) => throw null; + public void Visit(object t, int ttype, Antlr.Runtime.Tree.TreeWizard.IContextVisitor visitor) => throw null; + protected virtual void VisitCore(object t, object parent, int childIndex, int ttype, Antlr.Runtime.Tree.TreeWizard.IContextVisitor visitor) => throw null; + // Generated from `Antlr.Runtime.Tree.TreeWizard+Visitor` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public abstract class Visitor : Antlr.Runtime.Tree.TreeWizard.IContextVisitor + { + public virtual void Visit(object t, object parent, int childIndex, System.Collections.Generic.IDictionary labels) => throw null; + public abstract void Visit(object t); + protected Visitor() => throw null; + } + + + // Generated from `Antlr.Runtime.Tree.TreeWizard+WildcardTreePattern` in `Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f` + public class WildcardTreePattern : Antlr.Runtime.Tree.TreeWizard.TreePattern + { + public WildcardTreePattern(Antlr.Runtime.IToken payload) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + + protected Antlr.Runtime.Tree.ITreeAdaptor adaptor; + protected System.Collections.Generic.IDictionary tokenNameToTypeMap; + } + + } + } +} +namespace System +{ + /* Duplicate type 'ICloneable' is not stubbed in this assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f'. */ + + /* Duplicate type 'NonSerializedAttribute' is not stubbed in this assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f'. */ + + /* Duplicate type 'SerializableAttribute' is not stubbed in this assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f'. */ + + namespace Runtime + { + namespace Serialization + { + /* Duplicate type 'OnSerializingAttribute' is not stubbed in this assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f'. */ + + /* Duplicate type 'StreamingContext' is not stubbed in this assembly 'Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f'. */ + + } + } +} diff --git a/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.csproj b/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Antlr3.Runtime/3.5.1/Antlr3.Runtime.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + diff --git a/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.cs b/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.cs new file mode 100644 index 000000000000..92d7db311f32 --- /dev/null +++ b/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.cs @@ -0,0 +1,90 @@ +// This file contains auto-generated code. + +namespace Iesi +{ + namespace Collections + { + namespace Generic + { + // Generated from `Iesi.Collections.Generic.LinkedHashSet<>` in `Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LinkedHashSet : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public LinkedHashSet(System.Collections.Generic.IEnumerable initialValues) => throw null; + public LinkedHashSet() => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + // Generated from `Iesi.Collections.Generic.ReadOnlySet<>` in `Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReadOnlySet : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + bool System.Collections.Generic.ISet.Add(T item) => throw null; + void System.Collections.Generic.ICollection.Clear() => throw null; + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + void System.Collections.Generic.ISet.ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + void System.Collections.Generic.ISet.IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public ReadOnlySet(System.Collections.Generic.ISet basisSet) => throw null; + bool System.Collections.Generic.ICollection.Remove(T item) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + void System.Collections.Generic.ISet.UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + // Generated from `Iesi.Collections.Generic.SynchronizedSet<>` in `Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SynchronizedSet : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T item) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(T item) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public SynchronizedSet(System.Collections.Generic.ISet basisSet) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.csproj b/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Iesi.Collections/4.0.4/Iesi.Collections.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + diff --git a/csharp/ql/test/resources/stubs/NHibernate.cs b/csharp/ql/test/resources/stubs/NHibernate.cs deleted file mode 100644 index 7956dc8f2bc5..000000000000 --- a/csharp/ql/test/resources/stubs/NHibernate.cs +++ /dev/null @@ -1,18 +0,0 @@ - -namespace NHibernate -{ - public interface ISession - { - void Delete(string query); - T Query(); - void Save(object obj); - } - - namespace SqlCommand - { - public class SqlString - { - public SqlString(string sql) { } - } - } -} diff --git a/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.cs b/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.cs new file mode 100644 index 000000000000..a7577c91b061 --- /dev/null +++ b/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.cs @@ -0,0 +1,34502 @@ +// This file contains auto-generated code. + +namespace NHibernate +{ + // Generated from `NHibernate.ADOException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ADOException : NHibernate.HibernateException + { + public ADOException(string message, System.Exception innerException, string sql) => throw null; + public ADOException(string message, System.Exception innerException) => throw null; + public ADOException() => throw null; + protected ADOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string SqlString { get => throw null; } + } + + // Generated from `NHibernate.AssertionFailure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AssertionFailure : System.Exception + { + public AssertionFailure(string message, System.Exception innerException) => throw null; + public AssertionFailure(string message) => throw null; + public AssertionFailure() => throw null; + protected AssertionFailure(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.CacheMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + [System.Flags] + public enum CacheMode + { + Get, + Ignore, + Normal, + Put, + Refresh, + } + + // Generated from `NHibernate.CallbackException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CallbackException : NHibernate.HibernateException + { + public CallbackException(string message, System.Exception innerException) => throw null; + public CallbackException(string message) => throw null; + public CallbackException(System.Exception innerException) => throw null; + protected CallbackException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.ConnectionReleaseMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum ConnectionReleaseMode + { + AfterStatement, + AfterTransaction, + OnClose, + } + + // Generated from `NHibernate.ConnectionReleaseModeParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ConnectionReleaseModeParser + { + public static NHibernate.ConnectionReleaseMode Convert(string value) => throw null; + public static string ToString(NHibernate.ConnectionReleaseMode value) => throw null; + } + + // Generated from `NHibernate.CriteriaTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CriteriaTransformer + { + public static NHibernate.ICriteria Clone(NHibernate.ICriteria criteria) => throw null; + public static NHibernate.Criterion.DetachedCriteria Clone(NHibernate.Criterion.DetachedCriteria criteria) => throw null; + public static NHibernate.ICriteria TransformToRowCount(NHibernate.ICriteria criteria) => throw null; + public static NHibernate.Criterion.DetachedCriteria TransformToRowCount(NHibernate.Criterion.DetachedCriteria criteria) => throw null; + } + + // Generated from `NHibernate.DuplicateMappingException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DuplicateMappingException : NHibernate.MappingException + { + public DuplicateMappingException(string type, string name) : base(default(System.Exception)) => throw null; + public DuplicateMappingException(string customMessage, string type, string name) : base(default(System.Exception)) => throw null; + public DuplicateMappingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Exception)) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string Name { get => throw null; } + public string Type { get => throw null; } + } + + // Generated from `NHibernate.EmptyInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmptyInterceptor : NHibernate.IInterceptor + { + public virtual void AfterTransactionBegin(NHibernate.ITransaction tx) => throw null; + public virtual void AfterTransactionCompletion(NHibernate.ITransaction tx) => throw null; + public virtual void BeforeTransactionCompletion(NHibernate.ITransaction tx) => throw null; + public EmptyInterceptor() => throw null; + public virtual int[] FindDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types) => throw null; + public virtual object GetEntity(string entityName, object id) => throw null; + public virtual string GetEntityName(object entity) => throw null; + public static NHibernate.EmptyInterceptor Instance; + public virtual object Instantiate(string clazz, object id) => throw null; + public virtual bool? IsTransient(object entity) => throw null; + public virtual void OnCollectionRecreate(object collection, object key) => throw null; + public virtual void OnCollectionRemove(object collection, object key) => throw null; + public virtual void OnCollectionUpdate(object collection, object key) => throw null; + public virtual void OnDelete(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types) => throw null; + public virtual bool OnFlushDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types) => throw null; + public virtual bool OnLoad(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types) => throw null; + public virtual NHibernate.SqlCommand.SqlString OnPrepareStatement(NHibernate.SqlCommand.SqlString sql) => throw null; + public virtual bool OnSave(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types) => throw null; + public virtual void PostFlush(System.Collections.ICollection entities) => throw null; + public virtual void PreFlush(System.Collections.ICollection entitites) => throw null; + public virtual void SetSession(NHibernate.ISession session) => throw null; + } + + // Generated from `NHibernate.EntityJoinExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EntityJoinExtensions + { + public static NHibernate.ICriteria CreateEntityAlias(this NHibernate.ICriteria criteria, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + public static NHibernate.ICriteria CreateEntityAlias(this NHibernate.ICriteria criteria, string alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName) => throw null; + public static NHibernate.ICriteria CreateEntityCriteria(this NHibernate.ICriteria criteria, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + public static NHibernate.ICriteria CreateEntityCriteria(this NHibernate.ICriteria criteria, string alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName) => throw null; + public static TThis JoinEntityAlias(this TThis queryOver, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) where TThis : NHibernate.IQueryOver => throw null; + public static TThis JoinEntityAlias(this TThis queryOver, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) where TThis : NHibernate.IQueryOver => throw null; + public static NHibernate.IQueryOver JoinEntityQueryOver(this NHibernate.IQueryOver queryOver, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + public static NHibernate.IQueryOver JoinEntityQueryOver(this NHibernate.IQueryOver queryOver, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + } + + // Generated from `NHibernate.EntityMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum EntityMode + { + Map, + Poco, + } + + // Generated from `NHibernate.FKUnmatchingColumnsException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FKUnmatchingColumnsException : NHibernate.MappingException + { + public FKUnmatchingColumnsException(string message, System.Exception innerException) : base(default(System.Exception)) => throw null; + public FKUnmatchingColumnsException(string message) : base(default(System.Exception)) => throw null; + protected FKUnmatchingColumnsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Exception)) => throw null; + } + + // Generated from `NHibernate.FetchMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum FetchMode + { + Default, + Eager, + Join, + Lazy, + Select, + } + + // Generated from `NHibernate.FlushMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum FlushMode + { + Always, + Auto, + Commit, + Manual, + Never, + Unspecified, + } + + // Generated from `NHibernate.HibernateException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HibernateException : System.Exception + { + public HibernateException(string message, System.Exception innerException) => throw null; + public HibernateException(string message) => throw null; + public HibernateException(System.Exception innerException) => throw null; + public HibernateException() => throw null; + protected HibernateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.ICacheableQueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface ICacheableQueryExpression + { + bool CanCachePlan { get; } + } + + // Generated from `NHibernate.ICriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICriteria : System.ICloneable + { + NHibernate.ICriteria Add(NHibernate.Criterion.ICriterion expression); + NHibernate.ICriteria AddOrder(NHibernate.Criterion.Order order); + string Alias { get; } + void ClearOrders(); + NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.ICriteria CreateAlias(string associationPath, string alias); + NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.ICriteria CreateCriteria(string associationPath, string alias); + NHibernate.ICriteria CreateCriteria(string associationPath, NHibernate.SqlCommand.JoinType joinType); + NHibernate.ICriteria CreateCriteria(string associationPath); + NHibernate.IFutureEnumerable Future(); + NHibernate.IFutureValue FutureValue(); + NHibernate.ICriteria GetCriteriaByAlias(string alias); + NHibernate.ICriteria GetCriteriaByPath(string path); + System.Type GetRootEntityTypeIfAvailable(); + bool IsReadOnly { get; } + bool IsReadOnlyInitialized { get; } + void List(System.Collections.IList results); + System.Collections.IList List(); + System.Collections.Generic.IList List(); + System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.ICriteria SetCacheMode(NHibernate.CacheMode cacheMode); + NHibernate.ICriteria SetCacheRegion(string cacheRegion); + NHibernate.ICriteria SetCacheable(bool cacheable); + NHibernate.ICriteria SetComment(string comment); + NHibernate.ICriteria SetFetchMode(string associationPath, NHibernate.FetchMode mode); + NHibernate.ICriteria SetFetchSize(int fetchSize); + NHibernate.ICriteria SetFirstResult(int firstResult); + NHibernate.ICriteria SetFlushMode(NHibernate.FlushMode flushMode); + NHibernate.ICriteria SetLockMode(string alias, NHibernate.LockMode lockMode); + NHibernate.ICriteria SetLockMode(NHibernate.LockMode lockMode); + NHibernate.ICriteria SetMaxResults(int maxResults); + NHibernate.ICriteria SetProjection(params NHibernate.Criterion.IProjection[] projection); + NHibernate.ICriteria SetReadOnly(bool readOnly); + NHibernate.ICriteria SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer); + NHibernate.ICriteria SetTimeout(int timeout); + object UniqueResult(); + T UniqueResult(); + System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `NHibernate.IDatabinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDatabinder + { + NHibernate.IDatabinder Bind(object obj); + NHibernate.IDatabinder BindAll(System.Collections.ICollection objs); + bool InitializeLazy { get; set; } + string ToGenericXml(); + System.Xml.XmlDocument ToGenericXmlDocument(); + string ToXML(); + System.Xml.XmlDocument ToXmlDocument(); + } + + // Generated from `NHibernate.IDetachedQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDetachedQuery + { + NHibernate.IQuery GetExecutableQuery(NHibernate.ISession session); + NHibernate.IDetachedQuery SetAnsiString(string name, string val); + NHibernate.IDetachedQuery SetAnsiString(int position, string val); + NHibernate.IDetachedQuery SetBinary(string name, System.Byte[] val); + NHibernate.IDetachedQuery SetBinary(int position, System.Byte[] val); + NHibernate.IDetachedQuery SetBoolean(string name, bool val); + NHibernate.IDetachedQuery SetBoolean(int position, bool val); + NHibernate.IDetachedQuery SetByte(string name, System.Byte val); + NHibernate.IDetachedQuery SetByte(int position, System.Byte val); + NHibernate.IDetachedQuery SetCacheMode(NHibernate.CacheMode cacheMode); + NHibernate.IDetachedQuery SetCacheRegion(string cacheRegion); + NHibernate.IDetachedQuery SetCacheable(bool cacheable); + NHibernate.IDetachedQuery SetCharacter(string name, System.Char val); + NHibernate.IDetachedQuery SetCharacter(int position, System.Char val); + NHibernate.IDetachedQuery SetComment(string comment); + NHibernate.IDetachedQuery SetDateTime(string name, System.DateTime val); + NHibernate.IDetachedQuery SetDateTime(int position, System.DateTime val); + NHibernate.IDetachedQuery SetDateTimeNoMs(string name, System.DateTime val); + NHibernate.IDetachedQuery SetDateTimeNoMs(int position, System.DateTime val); + NHibernate.IDetachedQuery SetDecimal(string name, System.Decimal val); + NHibernate.IDetachedQuery SetDecimal(int position, System.Decimal val); + NHibernate.IDetachedQuery SetDouble(string name, double val); + NHibernate.IDetachedQuery SetDouble(int position, double val); + NHibernate.IDetachedQuery SetEntity(string name, object val); + NHibernate.IDetachedQuery SetEntity(int position, object val); + NHibernate.IDetachedQuery SetEnum(string name, System.Enum val); + NHibernate.IDetachedQuery SetEnum(int position, System.Enum val); + NHibernate.IDetachedQuery SetFetchSize(int fetchSize); + NHibernate.IDetachedQuery SetFirstResult(int firstResult); + NHibernate.IDetachedQuery SetFlushMode(NHibernate.FlushMode flushMode); + NHibernate.IDetachedQuery SetGuid(string name, System.Guid val); + NHibernate.IDetachedQuery SetGuid(int position, System.Guid val); + NHibernate.IDetachedQuery SetIgnoreUknownNamedParameters(bool ignoredUnknownNamedParameters); + NHibernate.IDetachedQuery SetInt16(string name, System.Int16 val); + NHibernate.IDetachedQuery SetInt16(int position, System.Int16 val); + NHibernate.IDetachedQuery SetInt32(string name, int val); + NHibernate.IDetachedQuery SetInt32(int position, int val); + NHibernate.IDetachedQuery SetInt64(string name, System.Int64 val); + NHibernate.IDetachedQuery SetInt64(int position, System.Int64 val); + void SetLockMode(string alias, NHibernate.LockMode lockMode); + NHibernate.IDetachedQuery SetMaxResults(int maxResults); + NHibernate.IDetachedQuery SetParameter(string name, object val, NHibernate.Type.IType type); + NHibernate.IDetachedQuery SetParameter(string name, object val); + NHibernate.IDetachedQuery SetParameter(int position, object val, NHibernate.Type.IType type); + NHibernate.IDetachedQuery SetParameter(int position, object val); + NHibernate.IDetachedQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type); + NHibernate.IDetachedQuery SetParameterList(string name, System.Collections.IEnumerable vals); + NHibernate.IDetachedQuery SetProperties(object obj); + NHibernate.IDetachedQuery SetReadOnly(bool readOnly); + NHibernate.IDetachedQuery SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer); + NHibernate.IDetachedQuery SetSingle(string name, float val); + NHibernate.IDetachedQuery SetSingle(int position, float val); + NHibernate.IDetachedQuery SetString(string name, string val); + NHibernate.IDetachedQuery SetString(int position, string val); + NHibernate.IDetachedQuery SetTime(string name, System.DateTime val); + NHibernate.IDetachedQuery SetTime(int position, System.DateTime val); + NHibernate.IDetachedQuery SetTimeout(int timeout); + NHibernate.IDetachedQuery SetTimestamp(string name, System.DateTime val); + NHibernate.IDetachedQuery SetTimestamp(int position, System.DateTime val); + } + + // Generated from `NHibernate.IFilter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFilter + { + NHibernate.Engine.FilterDefinition FilterDefinition { get; } + string Name { get; } + NHibernate.IFilter SetParameter(string name, object value); + NHibernate.IFilter SetParameterList(string name, System.Collections.Generic.ICollection values); + void Validate(); + } + + // Generated from `NHibernate.IFutureEnumerable<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFutureEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + System.Collections.Generic.IEnumerable GetEnumerable(); + System.Threading.Tasks.Task> GetEnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Collections.Generic.IEnumerator GetEnumerator(); + } + + // Generated from `NHibernate.IFutureValue<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFutureValue + { + System.Threading.Tasks.Task GetValueAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + T Value { get; } + } + + // Generated from `NHibernate.IInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInterceptor + { + void AfterTransactionBegin(NHibernate.ITransaction tx); + void AfterTransactionCompletion(NHibernate.ITransaction tx); + void BeforeTransactionCompletion(NHibernate.ITransaction tx); + int[] FindDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types); + object GetEntity(string entityName, object id); + string GetEntityName(object entity); + object Instantiate(string entityName, object id); + bool? IsTransient(object entity); + void OnCollectionRecreate(object collection, object key); + void OnCollectionRemove(object collection, object key); + void OnCollectionUpdate(object collection, object key); + void OnDelete(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types); + bool OnFlushDirty(object entity, object id, object[] currentState, object[] previousState, string[] propertyNames, NHibernate.Type.IType[] types); + bool OnLoad(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types); + NHibernate.SqlCommand.SqlString OnPrepareStatement(NHibernate.SqlCommand.SqlString sql); + bool OnSave(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types); + void PostFlush(System.Collections.ICollection entities); + void PreFlush(System.Collections.ICollection entities); + void SetSession(NHibernate.ISession session); + } + + // Generated from `NHibernate.IInternalLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInternalLogger + { + void Debug(object message, System.Exception exception); + void Debug(object message); + void DebugFormat(string format, params object[] args); + void Error(object message, System.Exception exception); + void Error(object message); + void ErrorFormat(string format, params object[] args); + void Fatal(object message, System.Exception exception); + void Fatal(object message); + void Info(object message, System.Exception exception); + void Info(object message); + void InfoFormat(string format, params object[] args); + bool IsDebugEnabled { get; } + bool IsErrorEnabled { get; } + bool IsFatalEnabled { get; } + bool IsInfoEnabled { get; } + bool IsWarnEnabled { get; } + void Warn(object message, System.Exception exception); + void Warn(object message); + void WarnFormat(string format, params object[] args); + } + + // Generated from `NHibernate.ILoggerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILoggerFactory + { + NHibernate.IInternalLogger LoggerFor(string keyName); + NHibernate.IInternalLogger LoggerFor(System.Type type); + } + + // Generated from `NHibernate.IMultiCriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMultiCriteria + { + NHibernate.IMultiCriteria Add(string key, NHibernate.IQueryOver queryOver); + NHibernate.IMultiCriteria Add(NHibernate.IQueryOver queryOver); + NHibernate.IMultiCriteria Add(string key, NHibernate.IQueryOver queryOver); + NHibernate.IMultiCriteria Add(string key, NHibernate.ICriteria criteria); + NHibernate.IMultiCriteria Add(string key, NHibernate.Criterion.DetachedCriteria detachedCriteria); + NHibernate.IMultiCriteria Add(NHibernate.IQueryOver queryOver); + NHibernate.IMultiCriteria Add(NHibernate.ICriteria criteria); + NHibernate.IMultiCriteria Add(NHibernate.Criterion.DetachedCriteria detachedCriteria); + NHibernate.IMultiCriteria Add(string key, NHibernate.ICriteria criteria); + NHibernate.IMultiCriteria Add(string key, NHibernate.Criterion.DetachedCriteria detachedCriteria); + NHibernate.IMultiCriteria Add(System.Type resultGenericListType, NHibernate.IQueryOver queryOver); + NHibernate.IMultiCriteria Add(System.Type resultGenericListType, NHibernate.ICriteria criteria); + NHibernate.IMultiCriteria Add(NHibernate.ICriteria criteria); + NHibernate.IMultiCriteria Add(NHibernate.Criterion.DetachedCriteria detachedCriteria); + NHibernate.IMultiCriteria ForceCacheRefresh(bool forceRefresh); + object GetResult(string key); + System.Threading.Tasks.Task GetResultAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Collections.IList List(); + System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IMultiCriteria SetCacheRegion(string region); + NHibernate.IMultiCriteria SetCacheable(bool cachable); + NHibernate.IMultiCriteria SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer); + } + + // Generated from `NHibernate.IMultiQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMultiQuery + { + NHibernate.IMultiQuery Add(string key, string hql); + NHibernate.IMultiQuery Add(string key, NHibernate.IQuery query); + NHibernate.IMultiQuery Add(string hql); + NHibernate.IMultiQuery Add(NHibernate.IQuery query); + NHibernate.IMultiQuery Add(string key, string hql); + NHibernate.IMultiQuery Add(string key, NHibernate.IQuery query); + NHibernate.IMultiQuery Add(string hql); + NHibernate.IMultiQuery Add(System.Type resultGenericListType, NHibernate.IQuery query); + NHibernate.IMultiQuery Add(NHibernate.IQuery query); + NHibernate.IMultiQuery AddNamedQuery(string queryName); + NHibernate.IMultiQuery AddNamedQuery(string key, string queryName); + NHibernate.IMultiQuery AddNamedQuery(string queryName); + NHibernate.IMultiQuery AddNamedQuery(string key, string queryName); + object GetResult(string key); + System.Threading.Tasks.Task GetResultAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Collections.IList List(); + System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IMultiQuery SetAnsiString(string name, string val); + NHibernate.IMultiQuery SetBinary(string name, System.Byte[] val); + NHibernate.IMultiQuery SetBoolean(string name, bool val); + NHibernate.IMultiQuery SetByte(string name, System.Byte val); + NHibernate.IMultiQuery SetCacheRegion(string region); + NHibernate.IMultiQuery SetCacheable(bool cacheable); + NHibernate.IMultiQuery SetCharacter(string name, System.Char val); + NHibernate.IMultiQuery SetDateTime(string name, System.DateTime val); + NHibernate.IMultiQuery SetDateTime2(string name, System.DateTime val); + NHibernate.IMultiQuery SetDateTimeNoMs(string name, System.DateTime val); + NHibernate.IMultiQuery SetDateTimeOffset(string name, System.DateTimeOffset val); + NHibernate.IMultiQuery SetDecimal(string name, System.Decimal val); + NHibernate.IMultiQuery SetDouble(string name, double val); + NHibernate.IMultiQuery SetEntity(string name, object val); + NHibernate.IMultiQuery SetEnum(string name, System.Enum val); + NHibernate.IMultiQuery SetFlushMode(NHibernate.FlushMode mode); + NHibernate.IMultiQuery SetForceCacheRefresh(bool forceCacheRefresh); + NHibernate.IMultiQuery SetGuid(string name, System.Guid val); + NHibernate.IMultiQuery SetInt16(string name, System.Int16 val); + NHibernate.IMultiQuery SetInt32(string name, int val); + NHibernate.IMultiQuery SetInt64(string name, System.Int64 val); + NHibernate.IMultiQuery SetParameter(string name, object val, NHibernate.Type.IType type); + NHibernate.IMultiQuery SetParameter(string name, object val); + NHibernate.IMultiQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type); + NHibernate.IMultiQuery SetParameterList(string name, System.Collections.IEnumerable vals); + NHibernate.IMultiQuery SetResultTransformer(NHibernate.Transform.IResultTransformer transformer); + NHibernate.IMultiQuery SetSingle(string name, float val); + NHibernate.IMultiQuery SetString(string name, string val); + NHibernate.IMultiQuery SetTime(string name, System.DateTime val); + NHibernate.IMultiQuery SetTimeAsTimeSpan(string name, System.TimeSpan val); + NHibernate.IMultiQuery SetTimeSpan(string name, System.TimeSpan val); + NHibernate.IMultiQuery SetTimeout(int timeout); + NHibernate.IMultiQuery SetTimestamp(string name, System.DateTime val); + } + + // Generated from `NHibernate.INHibernateLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INHibernateLogger + { + bool IsEnabled(NHibernate.NHibernateLogLevel logLevel); + void Log(NHibernate.NHibernateLogLevel logLevel, NHibernate.NHibernateLogValues state, System.Exception exception); + } + + // Generated from `NHibernate.INHibernateLoggerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INHibernateLoggerFactory + { + NHibernate.INHibernateLogger LoggerFor(string keyName); + NHibernate.INHibernateLogger LoggerFor(System.Type type); + } + + // Generated from `NHibernate.IQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQuery + { + System.Collections.IEnumerable Enumerable(); + System.Collections.Generic.IEnumerable Enumerable(); + System.Threading.Tasks.Task EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + int ExecuteUpdate(); + System.Threading.Tasks.Task ExecuteUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IFutureEnumerable Future(); + NHibernate.IFutureValue FutureValue(); + bool IsReadOnly { get; } + void List(System.Collections.IList results); + System.Collections.IList List(); + System.Collections.Generic.IList List(); + System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + string[] NamedParameters { get; } + string QueryString { get; } + string[] ReturnAliases { get; } + NHibernate.Type.IType[] ReturnTypes { get; } + NHibernate.IQuery SetAnsiString(string name, string val); + NHibernate.IQuery SetAnsiString(int position, string val); + NHibernate.IQuery SetBinary(string name, System.Byte[] val); + NHibernate.IQuery SetBinary(int position, System.Byte[] val); + NHibernate.IQuery SetBoolean(string name, bool val); + NHibernate.IQuery SetBoolean(int position, bool val); + NHibernate.IQuery SetByte(string name, System.Byte val); + NHibernate.IQuery SetByte(int position, System.Byte val); + NHibernate.IQuery SetCacheMode(NHibernate.CacheMode cacheMode); + NHibernate.IQuery SetCacheRegion(string cacheRegion); + NHibernate.IQuery SetCacheable(bool cacheable); + NHibernate.IQuery SetCharacter(string name, System.Char val); + NHibernate.IQuery SetCharacter(int position, System.Char val); + NHibernate.IQuery SetComment(string comment); + NHibernate.IQuery SetDateTime(string name, System.DateTime val); + NHibernate.IQuery SetDateTime(int position, System.DateTime val); + NHibernate.IQuery SetDateTime2(string name, System.DateTime val); + NHibernate.IQuery SetDateTime2(int position, System.DateTime val); + NHibernate.IQuery SetDateTimeNoMs(string name, System.DateTime val); + NHibernate.IQuery SetDateTimeNoMs(int position, System.DateTime val); + NHibernate.IQuery SetDateTimeOffset(string name, System.DateTimeOffset val); + NHibernate.IQuery SetDateTimeOffset(int position, System.DateTimeOffset val); + NHibernate.IQuery SetDecimal(string name, System.Decimal val); + NHibernate.IQuery SetDecimal(int position, System.Decimal val); + NHibernate.IQuery SetDouble(string name, double val); + NHibernate.IQuery SetDouble(int position, double val); + NHibernate.IQuery SetEntity(string name, object val); + NHibernate.IQuery SetEntity(int position, object val); + NHibernate.IQuery SetEnum(string name, System.Enum val); + NHibernate.IQuery SetEnum(int position, System.Enum val); + NHibernate.IQuery SetFetchSize(int fetchSize); + NHibernate.IQuery SetFirstResult(int firstResult); + NHibernate.IQuery SetFlushMode(NHibernate.FlushMode flushMode); + NHibernate.IQuery SetGuid(string name, System.Guid val); + NHibernate.IQuery SetGuid(int position, System.Guid val); + NHibernate.IQuery SetInt16(string name, System.Int16 val); + NHibernate.IQuery SetInt16(int position, System.Int16 val); + NHibernate.IQuery SetInt32(string name, int val); + NHibernate.IQuery SetInt32(int position, int val); + NHibernate.IQuery SetInt64(string name, System.Int64 val); + NHibernate.IQuery SetInt64(int position, System.Int64 val); + NHibernate.IQuery SetLockMode(string alias, NHibernate.LockMode lockMode); + NHibernate.IQuery SetMaxResults(int maxResults); + NHibernate.IQuery SetParameter(string name, T val); + NHibernate.IQuery SetParameter(int position, T val); + NHibernate.IQuery SetParameter(string name, object val, NHibernate.Type.IType type); + NHibernate.IQuery SetParameter(string name, object val); + NHibernate.IQuery SetParameter(int position, object val, NHibernate.Type.IType type); + NHibernate.IQuery SetParameter(int position, object val); + NHibernate.IQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type); + NHibernate.IQuery SetParameterList(string name, System.Collections.IEnumerable vals); + NHibernate.IQuery SetProperties(object obj); + NHibernate.IQuery SetReadOnly(bool readOnly); + NHibernate.IQuery SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer); + NHibernate.IQuery SetSingle(string name, float val); + NHibernate.IQuery SetSingle(int position, float val); + NHibernate.IQuery SetString(string name, string val); + NHibernate.IQuery SetString(int position, string val); + NHibernate.IQuery SetTime(string name, System.DateTime val); + NHibernate.IQuery SetTime(int position, System.DateTime val); + NHibernate.IQuery SetTimeAsTimeSpan(string name, System.TimeSpan val); + NHibernate.IQuery SetTimeAsTimeSpan(int position, System.TimeSpan val); + NHibernate.IQuery SetTimeSpan(string name, System.TimeSpan val); + NHibernate.IQuery SetTimeSpan(int position, System.TimeSpan val); + NHibernate.IQuery SetTimeout(int timeout); + NHibernate.IQuery SetTimestamp(string name, System.DateTime val); + NHibernate.IQuery SetTimestamp(int position, System.DateTime val); + object UniqueResult(); + T UniqueResult(); + System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `NHibernate.IQueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryExpression + { + string Key { get; } + System.Collections.Generic.IList ParameterDescriptors { get; } + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Translate(NHibernate.Engine.ISessionFactoryImplementor sessionFactory, bool filter); + System.Type Type { get; } + } + + // Generated from `NHibernate.IQueryOver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryOver + { + NHibernate.ICriteria RootCriteria { get; } + NHibernate.ICriteria UnderlyingCriteria { get; } + } + + // Generated from `NHibernate.IQueryOver<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryOver : NHibernate.IQueryOver, NHibernate.IQueryOver + { + NHibernate.IQueryOver And(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver And(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver And(NHibernate.Criterion.ICriterion expression); + NHibernate.IQueryOver AndNot(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver AndNot(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver AndNot(NHibernate.Criterion.ICriterion expression); + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder AndRestrictionOn(System.Linq.Expressions.Expression> expression); + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder AndRestrictionOn(System.Linq.Expressions.Expression> expression); + NHibernate.Criterion.Lambda.IQueryOverFetchBuilder Fetch(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder Full { get; } + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder Inner { get; } + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType); + NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path); + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder Left { get; } + NHibernate.Criterion.Lambda.IQueryOverLockBuilder Lock(System.Linq.Expressions.Expression> alias); + NHibernate.Criterion.Lambda.IQueryOverLockBuilder Lock(); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder OrderBy(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder OrderBy(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder OrderBy(NHibernate.Criterion.IProjection projection); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder OrderByAlias(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder Right { get; } + NHibernate.IQueryOver Select(params System.Linq.Expressions.Expression>[] projections); + NHibernate.IQueryOver Select(params NHibernate.Criterion.IProjection[] projections); + NHibernate.IQueryOver SelectList(System.Func, NHibernate.Criterion.Lambda.QueryOverProjectionBuilder> list); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder ThenBy(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder ThenBy(System.Linq.Expressions.Expression> path); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder ThenBy(NHibernate.Criterion.IProjection projection); + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder ThenByAlias(System.Linq.Expressions.Expression> path); + NHibernate.IQueryOver TransformUsing(NHibernate.Transform.IResultTransformer resultTransformer); + NHibernate.IQueryOver Where(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver Where(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver Where(NHibernate.Criterion.ICriterion expression); + NHibernate.IQueryOver WhereNot(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver WhereNot(System.Linq.Expressions.Expression> expression); + NHibernate.IQueryOver WhereNot(NHibernate.Criterion.ICriterion expression); + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder WhereRestrictionOn(System.Linq.Expressions.Expression> expression); + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder WhereRestrictionOn(System.Linq.Expressions.Expression> expression); + NHibernate.Criterion.Lambda.IQueryOverSubqueryBuilder WithSubquery { get; } + } + + // Generated from `NHibernate.IQueryOver<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryOver : NHibernate.IQueryOver + { + NHibernate.IQueryOver CacheMode(NHibernate.CacheMode cacheMode); + NHibernate.IQueryOver CacheRegion(string cacheRegion); + NHibernate.IQueryOver Cacheable(); + NHibernate.IQueryOver ClearOrders(); + NHibernate.IQueryOver Clone(); + NHibernate.IFutureEnumerable Future(); + NHibernate.IFutureEnumerable Future(); + NHibernate.IFutureValue FutureValue(); + NHibernate.IFutureValue FutureValue(); + System.Collections.Generic.IList List(); + System.Collections.Generic.IList List(); + System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IQueryOver ReadOnly(); + int RowCount(); + System.Threading.Tasks.Task RowCountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Int64 RowCountInt64(); + System.Threading.Tasks.Task RowCountInt64Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + U SingleOrDefault(); + TRoot SingleOrDefault(); + System.Threading.Tasks.Task SingleOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SingleOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IQueryOver Skip(int firstResult); + NHibernate.IQueryOver Take(int maxResults); + NHibernate.IQueryOver ToRowCountInt64Query(); + NHibernate.IQueryOver ToRowCountQuery(); + } + + // Generated from `NHibernate.ISQLQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISQLQuery : NHibernate.IQuery + { + NHibernate.ISQLQuery AddEntity(string entityName); + NHibernate.ISQLQuery AddEntity(string alias, string entityName, NHibernate.LockMode lockMode); + NHibernate.ISQLQuery AddEntity(string alias, string entityName); + NHibernate.ISQLQuery AddEntity(string alias, System.Type entityClass, NHibernate.LockMode lockMode); + NHibernate.ISQLQuery AddEntity(string alias, System.Type entityClass); + NHibernate.ISQLQuery AddEntity(System.Type entityClass); + NHibernate.ISQLQuery AddJoin(string alias, string path, NHibernate.LockMode lockMode); + NHibernate.ISQLQuery AddJoin(string alias, string path); + NHibernate.ISQLQuery AddScalar(string columnAlias, NHibernate.Type.IType type); + NHibernate.ISQLQuery SetResultSetMapping(string name); + } + + // Generated from `NHibernate.ISession` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISession : System.IDisposable + { + NHibernate.ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel); + NHibernate.ITransaction BeginTransaction(); + NHibernate.CacheMode CacheMode { get; set; } + void CancelQuery(); + void Clear(); + System.Data.Common.DbConnection Close(); + System.Data.Common.DbConnection Connection { get; } + bool Contains(object obj); + NHibernate.ICriteria CreateCriteria(string alias) where T : class; + NHibernate.ICriteria CreateCriteria() where T : class; + NHibernate.ICriteria CreateCriteria(string entityName, string alias); + NHibernate.ICriteria CreateCriteria(string entityName); + NHibernate.ICriteria CreateCriteria(System.Type persistentClass, string alias); + NHibernate.ICriteria CreateCriteria(System.Type persistentClass); + NHibernate.IQuery CreateFilter(object collection, string queryString); + System.Threading.Tasks.Task CreateFilterAsync(object collection, string queryString, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IMultiCriteria CreateMultiCriteria(); + NHibernate.IMultiQuery CreateMultiQuery(); + NHibernate.IQuery CreateQuery(string queryString); + NHibernate.ISQLQuery CreateSQLQuery(string queryString); + bool DefaultReadOnly { get; set; } + void Delete(string entityName, object obj); + void Delete(object obj); + int Delete(string query, object[] values, NHibernate.Type.IType[] types); + int Delete(string query, object value, NHibernate.Type.IType type); + int Delete(string query); + System.Threading.Tasks.Task DeleteAsync(string query, object[] values, NHibernate.Type.IType[] types, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAsync(string query, object value, NHibernate.Type.IType type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAsync(string query, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void DisableFilter(string filterName); + System.Data.Common.DbConnection Disconnect(); + NHibernate.IFilter EnableFilter(string filterName); + void Evict(object obj); + System.Threading.Tasks.Task EvictAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Flush(); + System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.FlushMode FlushMode { get; set; } + object Get(string entityName, object id); + object Get(System.Type clazz, object id, NHibernate.LockMode lockMode); + object Get(System.Type clazz, object id); + T Get(object id, NHibernate.LockMode lockMode); + T Get(object id); + System.Threading.Tasks.Task GetAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(System.Type clazz, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(System.Type clazz, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.LockMode GetCurrentLockMode(object obj); + NHibernate.IFilter GetEnabledFilter(string filterName); + string GetEntityName(object obj); + System.Threading.Tasks.Task GetEntityNameAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + object GetIdentifier(object obj); + NHibernate.IQuery GetNamedQuery(string queryName); + NHibernate.ISession GetSession(NHibernate.EntityMode entityMode); + NHibernate.Engine.ISessionImplementor GetSessionImplementation(); + bool IsConnected { get; } + bool IsDirty(); + System.Threading.Tasks.Task IsDirtyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + bool IsOpen { get; } + bool IsReadOnly(object entityOrProxy); + void JoinTransaction(); + void Load(object obj, object id); + object Load(string entityName, object id, NHibernate.LockMode lockMode); + object Load(string entityName, object id); + object Load(System.Type theType, object id, NHibernate.LockMode lockMode); + object Load(System.Type theType, object id); + T Load(object id, NHibernate.LockMode lockMode); + T Load(object id); + System.Threading.Tasks.Task LoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(System.Type theType, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(System.Type theType, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LoadAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Lock(string entityName, object obj, NHibernate.LockMode lockMode); + void Lock(object obj, NHibernate.LockMode lockMode); + System.Threading.Tasks.Task LockAsync(string entityName, object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task LockAsync(object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + object Merge(string entityName, object obj); + object Merge(object obj); + T Merge(string entityName, T entity) where T : class; + T Merge(T entity) where T : class; + System.Threading.Tasks.Task MergeAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MergeAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task MergeAsync(string entityName, T entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class; + System.Threading.Tasks.Task MergeAsync(T entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class; + void Persist(string entityName, object obj); + void Persist(object obj); + System.Threading.Tasks.Task PersistAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task PersistAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Linq.IQueryable Query(string entityName); + System.Linq.IQueryable Query(); + NHibernate.IQueryOver QueryOver(string entityName, System.Linq.Expressions.Expression> alias) where T : class; + NHibernate.IQueryOver QueryOver(string entityName) where T : class; + NHibernate.IQueryOver QueryOver(System.Linq.Expressions.Expression> alias) where T : class; + NHibernate.IQueryOver QueryOver() where T : class; + void Reconnect(System.Data.Common.DbConnection connection); + void Reconnect(); + void Refresh(object obj, NHibernate.LockMode lockMode); + void Refresh(object obj); + System.Threading.Tasks.Task RefreshAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RefreshAsync(object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Replicate(string entityName, object obj, NHibernate.ReplicationMode replicationMode); + void Replicate(object obj, NHibernate.ReplicationMode replicationMode); + System.Threading.Tasks.Task ReplicateAsync(string entityName, object obj, NHibernate.ReplicationMode replicationMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ReplicateAsync(object obj, NHibernate.ReplicationMode replicationMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Save(string entityName, object obj, object id); + void Save(object obj, object id); + object Save(string entityName, object obj); + object Save(object obj); + System.Threading.Tasks.Task SaveAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SaveAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SaveAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SaveAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void SaveOrUpdate(string entityName, object obj, object id); + void SaveOrUpdate(string entityName, object obj); + void SaveOrUpdate(object obj); + System.Threading.Tasks.Task SaveOrUpdateAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SaveOrUpdateAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SaveOrUpdateAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.ISessionFactory SessionFactory { get; } + NHibernate.ISharedSessionBuilder SessionWithOptions(); + NHibernate.ISession SetBatchSize(int batchSize); + void SetReadOnly(object entityOrProxy, bool readOnly); + NHibernate.Stat.ISessionStatistics Statistics { get; } + NHibernate.ITransaction Transaction { get; } + void Update(string entityName, object obj, object id); + void Update(string entityName, object obj); + void Update(object obj, object id); + void Update(object obj); + System.Threading.Tasks.Task UpdateAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `NHibernate.ISessionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionBuilder : NHibernate.ISessionBuilder + { + } + + // Generated from `NHibernate.ISessionBuilder<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionBuilder where T : NHibernate.ISessionBuilder + { + T AutoClose(bool autoClose); + T AutoJoinTransaction(bool autoJoinTransaction); + T Connection(System.Data.Common.DbConnection connection); + T ConnectionReleaseMode(NHibernate.ConnectionReleaseMode connectionReleaseMode); + T FlushMode(NHibernate.FlushMode flushMode); + T Interceptor(NHibernate.IInterceptor interceptor); + T NoInterceptor(); + NHibernate.ISession OpenSession(); + } + + // Generated from `NHibernate.ISessionFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionFactory : System.IDisposable + { + void Close(); + System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Collections.Generic.ICollection DefinedFilterNames { get; } + void Evict(System.Type persistentClass, object id); + void Evict(System.Type persistentClass); + System.Threading.Tasks.Task EvictAsync(System.Type persistentClass, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EvictAsync(System.Type persistentClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void EvictCollection(string roleName, object id); + void EvictCollection(string roleName); + System.Threading.Tasks.Task EvictCollectionAsync(string roleName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EvictCollectionAsync(string roleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void EvictEntity(string entityName, object id); + void EvictEntity(string entityName); + System.Threading.Tasks.Task EvictEntityAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EvictEntityAsync(string entityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void EvictQueries(string cacheRegion); + void EvictQueries(); + System.Threading.Tasks.Task EvictQueriesAsync(string cacheRegion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task EvictQueriesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Collections.Generic.IDictionary GetAllClassMetadata(); + System.Collections.Generic.IDictionary GetAllCollectionMetadata(); + NHibernate.Metadata.IClassMetadata GetClassMetadata(string entityName); + NHibernate.Metadata.IClassMetadata GetClassMetadata(System.Type persistentClass); + NHibernate.Metadata.ICollectionMetadata GetCollectionMetadata(string roleName); + NHibernate.ISession GetCurrentSession(); + NHibernate.Engine.FilterDefinition GetFilterDefinition(string filterName); + bool IsClosed { get; } + NHibernate.ISession OpenSession(System.Data.Common.DbConnection connection); + NHibernate.ISession OpenSession(System.Data.Common.DbConnection conn, NHibernate.IInterceptor sessionLocalInterceptor); + NHibernate.ISession OpenSession(NHibernate.IInterceptor sessionLocalInterceptor); + NHibernate.ISession OpenSession(); + NHibernate.IStatelessSession OpenStatelessSession(System.Data.Common.DbConnection connection); + NHibernate.IStatelessSession OpenStatelessSession(); + NHibernate.Stat.IStatistics Statistics { get; } + NHibernate.ISessionBuilder WithOptions(); + NHibernate.IStatelessSessionBuilder WithStatelessOptions(); + } + + // Generated from `NHibernate.ISharedSessionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISharedSessionBuilder : NHibernate.ISessionBuilder + { + NHibernate.ISharedSessionBuilder AutoClose(); + NHibernate.ISharedSessionBuilder AutoJoinTransaction(); + NHibernate.ISharedSessionBuilder Connection(); + NHibernate.ISharedSessionBuilder ConnectionReleaseMode(); + NHibernate.ISharedSessionBuilder FlushMode(); + NHibernate.ISharedSessionBuilder Interceptor(); + } + + // Generated from `NHibernate.ISharedStatelessSessionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISharedStatelessSessionBuilder : NHibernate.IStatelessSessionBuilder + { + NHibernate.ISharedStatelessSessionBuilder AutoJoinTransaction(bool autoJoinTransaction); + NHibernate.ISharedStatelessSessionBuilder AutoJoinTransaction(); + NHibernate.ISharedStatelessSessionBuilder Connection(System.Data.Common.DbConnection connection); + NHibernate.ISharedStatelessSessionBuilder Connection(); + } + + // Generated from `NHibernate.IStatelessSession` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatelessSession : System.IDisposable + { + NHibernate.ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel); + NHibernate.ITransaction BeginTransaction(); + void Close(); + System.Data.Common.DbConnection Connection { get; } + NHibernate.ICriteria CreateCriteria(string alias) where T : class; + NHibernate.ICriteria CreateCriteria() where T : class; + NHibernate.ICriteria CreateCriteria(string entityName, string alias); + NHibernate.ICriteria CreateCriteria(string entityName); + NHibernate.ICriteria CreateCriteria(System.Type entityType, string alias); + NHibernate.ICriteria CreateCriteria(System.Type entityType); + NHibernate.IQuery CreateQuery(string queryString); + NHibernate.ISQLQuery CreateSQLQuery(string queryString); + void Delete(string entityName, object entity); + void Delete(object entity); + System.Threading.Tasks.Task DeleteAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeleteAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + object Get(string entityName, object id, NHibernate.LockMode lockMode); + object Get(string entityName, object id); + T Get(object id, NHibernate.LockMode lockMode); + T Get(object id); + System.Threading.Tasks.Task GetAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IQuery GetNamedQuery(string queryName); + NHibernate.Engine.ISessionImplementor GetSessionImplementation(); + object Insert(string entityName, object entity); + object Insert(object entity); + System.Threading.Tasks.Task InsertAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task InsertAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + bool IsConnected { get; } + bool IsOpen { get; } + void JoinTransaction(); + System.Linq.IQueryable Query(string entityName); + System.Linq.IQueryable Query(); + NHibernate.IQueryOver QueryOver(System.Linq.Expressions.Expression> alias) where T : class; + NHibernate.IQueryOver QueryOver() where T : class; + void Refresh(string entityName, object entity, NHibernate.LockMode lockMode); + void Refresh(string entityName, object entity); + void Refresh(object entity, NHibernate.LockMode lockMode); + void Refresh(object entity); + System.Threading.Tasks.Task RefreshAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RefreshAsync(string entityName, object entity, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RefreshAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task RefreshAsync(object entity, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + NHibernate.IStatelessSession SetBatchSize(int batchSize); + NHibernate.ITransaction Transaction { get; } + void Update(string entityName, object entity); + void Update(object entity); + System.Threading.Tasks.Task UpdateAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } + + // Generated from `NHibernate.IStatelessSessionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatelessSessionBuilder + { + NHibernate.IStatelessSessionBuilder AutoJoinTransaction(bool autoJoinTransaction); + NHibernate.IStatelessSessionBuilder Connection(System.Data.Common.DbConnection connection); + NHibernate.IStatelessSession OpenStatelessSession(); + } + + // Generated from `NHibernate.ISupportSelectModeCriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportSelectModeCriteria + { + NHibernate.ICriteria Fetch(NHibernate.SelectMode selectMode, string associationPath, string alias); + } + + // Generated from `NHibernate.ISynchronizableQuery<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISynchronizableQuery where T : NHibernate.ISynchronizableQuery + { + T AddSynchronizedEntityClass(System.Type entityType); + T AddSynchronizedEntityName(string entityName); + T AddSynchronizedQuerySpace(string querySpace); + System.Collections.Generic.IReadOnlyCollection GetSynchronizedQuerySpaces(); + } + + // Generated from `NHibernate.ISynchronizableSQLQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISynchronizableSQLQuery : NHibernate.ISynchronizableQuery, NHibernate.ISQLQuery, NHibernate.IQuery + { + } + + // Generated from `NHibernate.ITransaction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITransaction : System.IDisposable + { + void Begin(System.Data.IsolationLevel isolationLevel); + void Begin(); + void Commit(); + System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + void Enlist(System.Data.Common.DbCommand command); + bool IsActive { get; } + void RegisterSynchronization(NHibernate.Transaction.ISynchronization synchronization); + void Rollback(); + System.Threading.Tasks.Task RollbackAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + bool WasCommitted { get; } + bool WasRolledBack { get; } + } + + // Generated from `NHibernate.IdentityEqualityComparer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentityEqualityComparer : System.Collections.IEqualityComparer, System.Collections.Generic.IEqualityComparer + { + public bool Equals(object x, object y) => throw null; + public int GetHashCode(object obj) => throw null; + public IdentityEqualityComparer() => throw null; + } + + // Generated from `NHibernate.InstantiationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InstantiationException : NHibernate.HibernateException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public InstantiationException(string message, System.Type type) => throw null; + public InstantiationException(string message, System.Exception innerException, System.Type type) => throw null; + protected InstantiationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public System.Type PersistentType { get => throw null; } + } + + // Generated from `NHibernate.InvalidProxyTypeException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InvalidProxyTypeException : NHibernate.MappingException + { + public System.Collections.Generic.ICollection Errors { get => throw null; set => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public InvalidProxyTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Exception)) => throw null; + public InvalidProxyTypeException(System.Collections.Generic.ICollection errors) : base(default(System.Exception)) => throw null; + } + + // Generated from `NHibernate.LazyInitializationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LazyInitializationException : NHibernate.HibernateException + { + public object EntityId { get => throw null; } + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public LazyInitializationException(string message, System.Exception innerException) => throw null; + public LazyInitializationException(string message) => throw null; + public LazyInitializationException(string entityName, object entityId, string message) => throw null; + public LazyInitializationException(System.Exception innerException) => throw null; + protected LazyInitializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.LockMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LockMode + { + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.LockMode other) => throw null; + public static NHibernate.LockMode Force; + public override int GetHashCode() => throw null; + public bool GreaterThan(NHibernate.LockMode mode) => throw null; + public bool LessThan(NHibernate.LockMode mode) => throw null; + public static NHibernate.LockMode None; + public static NHibernate.LockMode Read; + public override string ToString() => throw null; + public static NHibernate.LockMode Upgrade; + public static NHibernate.LockMode UpgradeNoWait; + public static NHibernate.LockMode Write; + } + + // Generated from `NHibernate.Log4NetLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Log4NetLogger : NHibernate.IInternalLogger + { + public void Debug(object message, System.Exception exception) => throw null; + public void Debug(object message) => throw null; + public void DebugFormat(string format, params object[] args) => throw null; + public void Error(object message, System.Exception exception) => throw null; + public void Error(object message) => throw null; + public void ErrorFormat(string format, params object[] args) => throw null; + public void Fatal(object message, System.Exception exception) => throw null; + public void Fatal(object message) => throw null; + public void Info(object message, System.Exception exception) => throw null; + public void Info(object message) => throw null; + public void InfoFormat(string format, params object[] args) => throw null; + public bool IsDebugEnabled { get => throw null; } + public bool IsErrorEnabled { get => throw null; } + public bool IsFatalEnabled { get => throw null; } + public bool IsInfoEnabled { get => throw null; } + public bool IsWarnEnabled { get => throw null; } + public Log4NetLogger(object logger) => throw null; + public void Warn(object message, System.Exception exception) => throw null; + public void Warn(object message) => throw null; + public void WarnFormat(string format, params object[] args) => throw null; + } + + // Generated from `NHibernate.Log4NetLoggerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Log4NetLoggerFactory : NHibernate.ILoggerFactory + { + public Log4NetLoggerFactory() => throw null; + public NHibernate.IInternalLogger LoggerFor(string keyName) => throw null; + public NHibernate.IInternalLogger LoggerFor(System.Type type) => throw null; + } + + // Generated from `NHibernate.LoggerProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LoggerProvider + { + public static NHibernate.IInternalLogger LoggerFor(string keyName) => throw null; + public static NHibernate.IInternalLogger LoggerFor(System.Type type) => throw null; + public LoggerProvider() => throw null; + public static void SetLoggersFactory(NHibernate.ILoggerFactory loggerFactory) => throw null; + } + + // Generated from `NHibernate.MappingException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingException : NHibernate.HibernateException + { + public MappingException(string message, System.Exception innerException) => throw null; + public MappingException(string message) => throw null; + public MappingException(System.Exception innerException) => throw null; + protected MappingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.MultiCriteriaExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class MultiCriteriaExtensions + { + public static NHibernate.IMultiCriteria SetTimeout(this NHibernate.IMultiCriteria multiCriteria, int timeout) => throw null; + } + + // Generated from `NHibernate.NHibernateLogLevel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum NHibernateLogLevel + { + Debug, + Error, + Fatal, + Info, + None, + Trace, + Warn, + } + + // Generated from `NHibernate.NHibernateLogValues` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct NHibernateLogValues + { + public object[] Args { get => throw null; } + public string Format { get => throw null; } + public NHibernateLogValues(string format, object[] args) => throw null; + // Stub generator skipped constructor + public override string ToString() => throw null; + } + + // Generated from `NHibernate.NHibernateLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NHibernateLogger + { + public static NHibernate.INHibernateLogger For(string keyName) => throw null; + public static NHibernate.INHibernateLogger For(System.Type type) => throw null; + public static void SetLoggersFactory(NHibernate.INHibernateLoggerFactory loggerFactory) => throw null; + } + + // Generated from `NHibernate.NHibernateLoggerExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NHibernateLoggerExtensions + { + public static void Debug(this NHibernate.INHibernateLogger logger, string message, System.Exception ex) => throw null; + public static void Debug(this NHibernate.INHibernateLogger logger, string message) => throw null; + public static void Debug(this NHibernate.INHibernateLogger logger, string format, params object[] args) => throw null; + public static void Debug(this NHibernate.INHibernateLogger logger, System.Exception exception, string message) => throw null; + public static void Debug(this NHibernate.INHibernateLogger logger, System.Exception exception, string format, params object[] args) => throw null; + public static void Error(this NHibernate.INHibernateLogger logger, string message, System.Exception ex) => throw null; + public static void Error(this NHibernate.INHibernateLogger logger, string message) => throw null; + public static void Error(this NHibernate.INHibernateLogger logger, string format, params object[] args) => throw null; + public static void Error(this NHibernate.INHibernateLogger logger, System.Exception exception, string message) => throw null; + public static void Error(this NHibernate.INHibernateLogger logger, System.Exception exception, string format, params object[] args) => throw null; + public static void Fatal(this NHibernate.INHibernateLogger logger, string message, System.Exception ex) => throw null; + public static void Fatal(this NHibernate.INHibernateLogger logger, string message) => throw null; + public static void Fatal(this NHibernate.INHibernateLogger logger, string format, params object[] args) => throw null; + public static void Fatal(this NHibernate.INHibernateLogger logger, System.Exception exception, string message) => throw null; + public static void Fatal(this NHibernate.INHibernateLogger logger, System.Exception exception, string format, params object[] args) => throw null; + public static void Info(this NHibernate.INHibernateLogger logger, string message, System.Exception ex) => throw null; + public static void Info(this NHibernate.INHibernateLogger logger, string message) => throw null; + public static void Info(this NHibernate.INHibernateLogger logger, string format, params object[] args) => throw null; + public static void Info(this NHibernate.INHibernateLogger logger, System.Exception exception, string message) => throw null; + public static void Info(this NHibernate.INHibernateLogger logger, System.Exception exception, string format, params object[] args) => throw null; + public static bool IsDebugEnabled(this NHibernate.INHibernateLogger logger) => throw null; + public static bool IsErrorEnabled(this NHibernate.INHibernateLogger logger) => throw null; + public static bool IsFatalEnabled(this NHibernate.INHibernateLogger logger) => throw null; + public static bool IsInfoEnabled(this NHibernate.INHibernateLogger logger) => throw null; + public static bool IsWarnEnabled(this NHibernate.INHibernateLogger logger) => throw null; + public static void Warn(this NHibernate.INHibernateLogger logger, string message, System.Exception ex) => throw null; + public static void Warn(this NHibernate.INHibernateLogger logger, string message) => throw null; + public static void Warn(this NHibernate.INHibernateLogger logger, string format, params object[] args) => throw null; + public static void Warn(this NHibernate.INHibernateLogger logger, System.Exception exception, string message) => throw null; + public static void Warn(this NHibernate.INHibernateLogger logger, System.Exception exception, string format, params object[] args) => throw null; + } + + // Generated from `NHibernate.NHibernateUtil` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NHibernateUtil + { + public static NHibernate.Type.AnsiCharType AnsiChar; + public static NHibernate.Type.AnsiStringType AnsiString; + public static NHibernate.Type.IType Any(NHibernate.Type.IType metaType, NHibernate.Type.IType identifierType) => throw null; + public static NHibernate.Type.BinaryType Binary; + public static NHibernate.Type.BinaryBlobType BinaryBlob; + public static NHibernate.Type.BooleanType Boolean; + public static NHibernate.Type.ByteType Byte; + public static NHibernate.Type.CharType Character; + public static NHibernate.Type.TypeType Class; + public static NHibernate.Type.ClassMetaType ClassMetaType; + public static void Close(System.Collections.IEnumerator enumerator) => throw null; + public static void Close(System.Collections.IEnumerable enumerable) => throw null; + public static NHibernate.Type.CultureInfoType CultureInfo; + public static NHibernate.Type.CurrencyType Currency; + public static NHibernate.Type.IType Custom(System.Type userTypeClass) => throw null; + public static NHibernate.Type.DateType Date; + public static NHibernate.Type.DateTimeType DateTime; + public static NHibernate.Type.DateTime2Type DateTime2; + public static NHibernate.Type.DateTimeNoMsType DateTimeNoMs; + public static NHibernate.Type.DateTimeOffsetType DateTimeOffset; + public static NHibernate.Type.DbTimestampType DbTimestamp; + public static NHibernate.Type.DecimalType Decimal; + public static NHibernate.Type.DoubleType Double; + public static NHibernate.Type.IType Entity(string entityName) => throw null; + public static NHibernate.Type.IType Entity(System.Type persistentClass) => throw null; + public static NHibernate.Type.IType Enum(System.Type enumClass) => throw null; + public static System.Type GetClass(object proxy) => throw null; + public static System.Threading.Tasks.Task GetClassAsync(object proxy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.Type.IType GetSerializable(System.Type serializableClass) => throw null; + public static NHibernate.Type.IType GuessType(object obj) => throw null; + public static NHibernate.Type.IType GuessType(System.Type type) => throw null; + public static NHibernate.Type.GuidType Guid; + public static void Initialize(object proxy) => throw null; + public static System.Threading.Tasks.Task InitializeAsync(object proxy, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.Type.Int16Type Int16; + public static NHibernate.Type.Int32Type Int32; + public static NHibernate.Type.Int64Type Int64; + public static bool IsInitialized(object proxy) => throw null; + public static bool IsPropertyInitialized(object proxy, string propertyName) => throw null; + public static NHibernate.Type.DateType LocalDate; + public static NHibernate.Type.LocalDateTimeType LocalDateTime; + public static NHibernate.Type.LocalDateTimeNoMsType LocalDateTimeNoMs; + public static NHibernate.Type.MetaType MetaType; + public static NHibernate.Type.AnyType Object; + public static NHibernate.Type.SByteType SByte; + public static NHibernate.Type.SerializableType Serializable; + public static NHibernate.Type.SingleType Single; + public static NHibernate.Type.StringType String; + public static NHibernate.Type.StringClobType StringClob; + public static NHibernate.Type.TicksType Ticks; + public static NHibernate.Type.TimeType Time; + public static NHibernate.Type.TimeAsTimeSpanType TimeAsTimeSpan; + public static NHibernate.Type.TimeSpanType TimeSpan; + public static NHibernate.Type.TimestampType Timestamp; + public static NHibernate.Type.TrueFalseType TrueFalse; + public static NHibernate.Type.UInt16Type UInt16; + public static NHibernate.Type.UInt32Type UInt32; + public static NHibernate.Type.UInt64Type UInt64; + public static NHibernate.Type.UriType Uri; + public static NHibernate.Type.UtcDateTimeType UtcDateTime; + public static NHibernate.Type.UtcDateTimeNoMsType UtcDateTimeNoMs; + public static NHibernate.Type.UtcDbTimestampType UtcDbTimestamp; + public static NHibernate.Type.UtcTicksType UtcTicks; + public static NHibernate.Type.XDocType XDoc; + public static NHibernate.Type.XmlDocType XmlDoc; + public static NHibernate.Type.YesNoType YesNo; + } + + // Generated from `NHibernate.NoLoggingInternalLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoLoggingInternalLogger : NHibernate.IInternalLogger + { + public void Debug(object message, System.Exception exception) => throw null; + public void Debug(object message) => throw null; + public void DebugFormat(string format, params object[] args) => throw null; + public void Error(object message, System.Exception exception) => throw null; + public void Error(object message) => throw null; + public void ErrorFormat(string format, params object[] args) => throw null; + public void Fatal(object message, System.Exception exception) => throw null; + public void Fatal(object message) => throw null; + public void Info(object message, System.Exception exception) => throw null; + public void Info(object message) => throw null; + public void InfoFormat(string format, params object[] args) => throw null; + public bool IsDebugEnabled { get => throw null; } + public bool IsErrorEnabled { get => throw null; } + public bool IsFatalEnabled { get => throw null; } + public bool IsInfoEnabled { get => throw null; } + public bool IsWarnEnabled { get => throw null; } + public NoLoggingInternalLogger() => throw null; + public void Warn(object message, System.Exception exception) => throw null; + public void Warn(object message) => throw null; + public void WarnFormat(string format, params object[] args) => throw null; + } + + // Generated from `NHibernate.NoLoggingLoggerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoLoggingLoggerFactory : NHibernate.ILoggerFactory + { + public NHibernate.IInternalLogger LoggerFor(string keyName) => throw null; + public NHibernate.IInternalLogger LoggerFor(System.Type type) => throw null; + public NoLoggingLoggerFactory() => throw null; + } + + // Generated from `NHibernate.NonUniqueObjectException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonUniqueObjectException : NHibernate.HibernateException + { + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Identifier { get => throw null; } + public override string Message { get => throw null; } + public NonUniqueObjectException(string message, object id, string entityName) => throw null; + public NonUniqueObjectException(object id, string entityName) => throw null; + protected NonUniqueObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.NonUniqueResultException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonUniqueResultException : NHibernate.HibernateException + { + public NonUniqueResultException(int resultCount) => throw null; + protected NonUniqueResultException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.ObjectDeletedException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ObjectDeletedException : NHibernate.UnresolvableObjectException + { + public ObjectDeletedException(string message, object identifier, string clazz) : base(default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) => throw null; + protected ObjectDeletedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) => throw null; + } + + // Generated from `NHibernate.ObjectNotFoundByUniqueKeyException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ObjectNotFoundByUniqueKeyException : NHibernate.HibernateException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Key { get => throw null; } + public ObjectNotFoundByUniqueKeyException(string entityName, string propertyName, object key) => throw null; + protected ObjectNotFoundByUniqueKeyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string PropertyName { get => throw null; } + } + + // Generated from `NHibernate.ObjectNotFoundException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ObjectNotFoundException : NHibernate.UnresolvableObjectException + { + public ObjectNotFoundException(object identifier, string entityName) : base(default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) => throw null; + public ObjectNotFoundException(object identifier, System.Type type) : base(default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) => throw null; + protected ObjectNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Runtime.Serialization.SerializationInfo), default(System.Runtime.Serialization.StreamingContext)) => throw null; + } + + // Generated from `NHibernate.PersistentObjectException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentObjectException : NHibernate.HibernateException + { + public PersistentObjectException(string message) => throw null; + protected PersistentObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.PropertyAccessException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyAccessException : NHibernate.HibernateException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public System.Type PersistentType { get => throw null; } + public PropertyAccessException(System.Exception innerException, string message, bool wasSetter, System.Type persistentType, string propertyName) => throw null; + public PropertyAccessException(System.Exception innerException, string message, bool wasSetter, System.Type persistentType) => throw null; + protected PropertyAccessException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.PropertyNotFoundException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyNotFoundException : NHibernate.MappingException + { + public string AccessorType { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string PropertyName { get => throw null; } + public PropertyNotFoundException(string propertyName, string fieldName, System.Type targetType) : base(default(System.Exception)) => throw null; + public PropertyNotFoundException(System.Type targetType, string propertyName, string accessorType) : base(default(System.Exception)) => throw null; + public PropertyNotFoundException(System.Type targetType, string propertyName) : base(default(System.Exception)) => throw null; + protected PropertyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Exception)) => throw null; + public System.Type TargetType { get => throw null; } + } + + // Generated from `NHibernate.PropertyValueException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyValueException : NHibernate.HibernateException + { + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public string PropertyName { get => throw null; } + public PropertyValueException(string message, string entityName, string propertyName, System.Exception innerException) => throw null; + public PropertyValueException(string message, string entityName, string propertyName) => throw null; + protected PropertyValueException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.QueryException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryException : NHibernate.HibernateException, System.Runtime.Serialization.ISerializable + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public QueryException(string message, string queryString, System.Exception innerException) => throw null; + public QueryException(string message, string queryString) => throw null; + public QueryException(string message, System.Exception innerException) => throw null; + public QueryException(string message) => throw null; + public QueryException(System.Exception innerException) => throw null; + protected QueryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected QueryException() => throw null; + public string QueryString { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.QueryOverExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class QueryOverExtensions + { + public static TQueryOver SetComment(this TQueryOver queryOver, string comment) where TQueryOver : NHibernate.IQueryOver => throw null; + public static TQueryOver SetFetchSize(this TQueryOver queryOver, int fetchSize) where TQueryOver : NHibernate.IQueryOver => throw null; + public static TQueryOver SetFlushMode(this TQueryOver queryOver, NHibernate.FlushMode flushMode) where TQueryOver : NHibernate.IQueryOver => throw null; + public static TQueryOver SetTimeout(this TQueryOver queryOver, int timeout) where TQueryOver : NHibernate.IQueryOver => throw null; + } + + // Generated from `NHibernate.QueryParameterException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryParameterException : NHibernate.QueryException + { + public QueryParameterException(string message, System.Exception inner) => throw null; + public QueryParameterException(string message) => throw null; + protected QueryParameterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.ReplicationMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ReplicationMode + { + public static NHibernate.ReplicationMode Exception; + public static NHibernate.ReplicationMode Ignore; + public static NHibernate.ReplicationMode LatestVersion; + public static NHibernate.ReplicationMode Overwrite; + protected ReplicationMode(string name) => throw null; + public abstract bool ShouldOverwriteCurrentVersion(object entity, object currentVersion, object newVersion, NHibernate.Type.IVersionType versionType); + public override string ToString() => throw null; + } + + // Generated from `NHibernate.SQLQueryExtension` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SQLQueryExtension + { + public static NHibernate.ISQLQuery AddSynchronizedEntityClass(this NHibernate.ISQLQuery sqlQuery, System.Type entityType) => throw null; + public static NHibernate.ISQLQuery AddSynchronizedEntityName(this NHibernate.ISQLQuery sqlQuery, string entityName) => throw null; + public static NHibernate.ISQLQuery AddSynchronizedQuerySpace(this NHibernate.ISQLQuery sqlQuery, string querySpace) => throw null; + public static System.Collections.Generic.IReadOnlyCollection GetSynchronizedQuerySpaces(this NHibernate.ISQLQuery sqlQuery) => throw null; + } + + // Generated from `NHibernate.SchemaValidationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SchemaValidationException : NHibernate.HibernateException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public SchemaValidationException(string msg, System.Collections.Generic.IList validationErrors) => throw null; + protected SchemaValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection ValidationErrors { get => throw null; } + } + + // Generated from `NHibernate.SelectMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum SelectMode + { + ChildFetch, + Fetch, + FetchLazyProperties, + FetchLazyPropertyGroup, + JoinOnly, + Skip, + Undefined, + } + + // Generated from `NHibernate.SelectModeExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SelectModeExtensions + { + public static TThis Fetch(this TThis queryOver, NHibernate.SelectMode mode, params System.Linq.Expressions.Expression>[] aliasedAssociationPaths) where TThis : NHibernate.IQueryOver => throw null; + public static NHibernate.IQueryOver Fetch(this NHibernate.IQueryOver queryOver, params System.Linq.Expressions.Expression>[] associationPaths) => throw null; + public static NHibernate.IQueryOver Fetch(this NHibernate.IQueryOver queryOver, NHibernate.SelectMode mode, params System.Linq.Expressions.Expression>[] associationPaths) => throw null; + public static NHibernate.ICriteria Fetch(this NHibernate.ICriteria criteria, string associationPath, string alias = default(string)) => throw null; + public static NHibernate.ICriteria Fetch(this NHibernate.ICriteria criteria, NHibernate.SelectMode mode, string associationPath, string alias = default(string)) => throw null; + public static NHibernate.Criterion.QueryOver Fetch(this NHibernate.Criterion.QueryOver queryOver, params System.Linq.Expressions.Expression>[] associationPaths) => throw null; + public static NHibernate.Criterion.QueryOver Fetch(this NHibernate.Criterion.QueryOver queryOver, NHibernate.SelectMode mode, params System.Linq.Expressions.Expression>[] associationPaths) => throw null; + public static NHibernate.Criterion.DetachedCriteria Fetch(this NHibernate.Criterion.DetachedCriteria criteria, string associationPath, string alias = default(string)) => throw null; + public static NHibernate.Criterion.DetachedCriteria Fetch(this NHibernate.Criterion.DetachedCriteria criteria, NHibernate.SelectMode mode, string associationPath, string alias = default(string)) => throw null; + } + + // Generated from `NHibernate.SessionBuilderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SessionBuilderExtensions + { + public static T Tenant(this T builder, string tenantIdentifier) where T : NHibernate.ISessionBuilder => throw null; + public static T Tenant(this T builder, NHibernate.MultiTenancy.TenantConfiguration tenantConfig) where T : NHibernate.ISessionBuilder => throw null; + } + + // Generated from `NHibernate.SessionException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionException : NHibernate.HibernateException + { + public SessionException(string message) => throw null; + protected SessionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.SessionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SessionExtensions + { + public static NHibernate.Multi.IQueryBatch CreateQueryBatch(this NHibernate.ISession session) => throw null; + public static object Get(this NHibernate.ISession session, string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public static T Get(this NHibernate.ISession session, string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public static T Get(this NHibernate.ISession session, string entityName, object id) => throw null; + public static System.Threading.Tasks.Task GetAsync(this NHibernate.ISession session, string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetAsync(this NHibernate.ISession session, string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetAsync(this NHibernate.ISession session, string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.ITransaction GetCurrentTransaction(this NHibernate.ISession session) => throw null; + public static NHibernate.ISharedStatelessSessionBuilder StatelessSessionWithOptions(this NHibernate.ISession session) => throw null; + } + + // Generated from `NHibernate.SessionFactoryExtension` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SessionFactoryExtension + { + public static void Evict(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable persistentClasses) => throw null; + public static System.Threading.Tasks.Task EvictAsync(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable persistentClasses, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void EvictCollection(this NHibernate.ISessionFactory factory, string roleName, object id, string tenantIdentifier) => throw null; + public static void EvictCollection(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable roleNames) => throw null; + public static System.Threading.Tasks.Task EvictCollectionAsync(this NHibernate.ISessionFactory factory, string roleName, object id, string tenantIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task EvictCollectionAsync(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable roleNames, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void EvictEntity(this NHibernate.ISessionFactory factory, string entityName, object id, string tenantIdentifier) => throw null; + public static void EvictEntity(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable entityNames) => throw null; + public static System.Threading.Tasks.Task EvictEntityAsync(this NHibernate.ISessionFactory factory, string entityName, object id, string tenantIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task EvictEntityAsync(this NHibernate.ISessionFactory factory, System.Collections.Generic.IEnumerable entityNames, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `NHibernate.StaleObjectStateException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StaleObjectStateException : NHibernate.StaleStateException + { + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Identifier { get => throw null; } + public override string Message { get => throw null; } + public StaleObjectStateException(string entityName, object identifier, System.Exception innerException) : base(default(string)) => throw null; + public StaleObjectStateException(string entityName, object identifier) : base(default(string)) => throw null; + protected StaleObjectStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.StaleStateException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StaleStateException : NHibernate.HibernateException + { + public StaleStateException(string message, System.Exception innerException) => throw null; + public StaleStateException(string message) => throw null; + protected StaleStateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.StatelessSessionBuilderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class StatelessSessionBuilderExtensions + { + public static T Tenant(this T builder, string tenantIdentifier) where T : NHibernate.ISessionBuilder => throw null; + public static NHibernate.IStatelessSessionBuilder Tenant(this NHibernate.IStatelessSessionBuilder builder, NHibernate.MultiTenancy.TenantConfiguration tenantConfig) => throw null; + } + + // Generated from `NHibernate.StatelessSessionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class StatelessSessionExtensions + { + public static NHibernate.Multi.IQueryBatch CreateQueryBatch(this NHibernate.IStatelessSession session) => throw null; + public static T Get(this NHibernate.IStatelessSession session, string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public static T Get(this NHibernate.IStatelessSession session, string entityName, object id) => throw null; + public static System.Threading.Tasks.Task GetAsync(this NHibernate.IStatelessSession session, string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task GetAsync(this NHibernate.IStatelessSession session, string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.ITransaction GetCurrentTransaction(this NHibernate.IStatelessSession session) => throw null; + } + + // Generated from `NHibernate.TransactionException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TransactionException : NHibernate.HibernateException + { + public TransactionException(string message, System.Exception innerException) => throw null; + public TransactionException(string message) => throw null; + protected TransactionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.TransactionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TransactionExtensions + { + public static void RegisterSynchronization(this NHibernate.ITransaction transaction, NHibernate.Transaction.ITransactionCompletionSynchronization synchronization) => throw null; + } + + // Generated from `NHibernate.TransientObjectException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TransientObjectException : NHibernate.HibernateException + { + public TransientObjectException(string message) => throw null; + protected TransientObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.TypeMismatchException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeMismatchException : NHibernate.HibernateException + { + public TypeMismatchException(string message, System.Exception inner) => throw null; + public TypeMismatchException(string message) => throw null; + protected TypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.UnresolvableObjectException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnresolvableObjectException : NHibernate.HibernateException + { + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Identifier { get => throw null; } + public override string Message { get => throw null; } + public System.Type PersistentClass { get => throw null; } + public static void ThrowIfNull(object o, object id, string entityName) => throw null; + public static void ThrowIfNull(object o, object id, System.Type clazz) => throw null; + public UnresolvableObjectException(string message, object identifier, string entityName) => throw null; + public UnresolvableObjectException(string message, object identifier, System.Type clazz) => throw null; + public UnresolvableObjectException(object identifier, string entityName) => throw null; + public UnresolvableObjectException(object identifier, System.Type clazz) => throw null; + protected UnresolvableObjectException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.WrongClassException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WrongClassException : NHibernate.HibernateException, System.Runtime.Serialization.ISerializable + { + public string EntityName { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Identifier { get => throw null; } + public override string Message { get => throw null; } + public WrongClassException(string message, object identifier, string entityName) => throw null; + protected WrongClassException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + namespace Action + { + // Generated from `NHibernate.Action.AbstractEntityInsertAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEntityInsertAction : NHibernate.Action.EntityAction + { + protected internal AbstractEntityInsertAction(object id, object[] state, object instance, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Engine.ISessionImplementor), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public object[] State { get => throw null; } + } + + // Generated from `NHibernate.Action.AfterTransactionCompletionProcessDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void AfterTransactionCompletionProcessDelegate(bool success); + + // Generated from `NHibernate.Action.BeforeTransactionCompletionProcessDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void BeforeTransactionCompletionProcessDelegate(); + + // Generated from `NHibernate.Action.BulkOperationCleanupAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BulkOperationCleanupAction : NHibernate.Action.IExecutable, NHibernate.Action.IAsyncExecutable, NHibernate.Action.IAfterTransactionCompletionProcess + { + public NHibernate.Action.AfterTransactionCompletionProcessDelegate AfterTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IAfterTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.AfterTransactionCompletionProcess { get => throw null; } + public void BeforeExecutions() => throw null; + public System.Threading.Tasks.Task BeforeExecutionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Action.BeforeTransactionCompletionProcessDelegate BeforeTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IBeforeTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.BeforeTransactionCompletionProcess { get => throw null; } + public BulkOperationCleanupAction(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.ISet querySpaces) => throw null; + public BulkOperationCleanupAction(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Entity.IQueryable[] affectedQueryables) => throw null; + public void Execute() => throw null; + public void ExecuteAfterTransactionCompletion(bool success) => throw null; + public System.Threading.Tasks.Task ExecuteAfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void Init() => throw null; + public virtual System.Threading.Tasks.Task InitAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public string[] PropertySpaces { get => throw null; } + } + + // Generated from `NHibernate.Action.CollectionAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CollectionAction : System.Runtime.Serialization.IDeserializationCallback, System.IComparable, NHibernate.Action.IExecutable, NHibernate.Action.IAsyncExecutable, NHibernate.Action.IAfterTransactionCompletionProcess + { + public virtual NHibernate.Action.AfterTransactionCompletionProcessDelegate AfterTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IAfterTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.AfterTransactionCompletionProcess { get => throw null; } + public virtual void BeforeExecutions() => throw null; + public virtual System.Threading.Tasks.Task BeforeExecutionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.Action.BeforeTransactionCompletionProcessDelegate BeforeTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IBeforeTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.BeforeTransactionCompletionProcess { get => throw null; } + protected internal NHibernate.Collection.IPersistentCollection Collection { get => throw null; } + protected CollectionAction(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual int CompareTo(NHibernate.Action.CollectionAction other) => throw null; + protected internal void Evict() => throw null; + protected internal System.Threading.Tasks.Task EvictAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public abstract void Execute(); + public virtual void ExecuteAfterTransactionCompletion(bool success) => throw null; + public virtual System.Threading.Tasks.Task ExecuteAfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken); + protected object GetKey() => throw null; + protected System.Threading.Tasks.Task GetKeyAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected internal object Key { get => throw null; } + public NHibernate.Cache.Access.ISoftLock Lock { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + protected internal NHibernate.Persister.Collection.ICollectionPersister Persister { get => throw null; } + public string[] PropertySpaces { get => throw null; } + protected internal NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Action.CollectionRecreateAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionRecreateAction : NHibernate.Action.CollectionAction + { + public CollectionRecreateAction(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, object key, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Action.CollectionRemoveAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionRemoveAction : NHibernate.Action.CollectionAction + { + public CollectionRemoveAction(object affectedOwner, NHibernate.Persister.Collection.ICollectionPersister persister, object id, bool emptySnapshot, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public CollectionRemoveAction(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, object id, bool emptySnapshot, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override int CompareTo(NHibernate.Action.CollectionAction other) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Action.CollectionUpdateAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionUpdateAction : NHibernate.Action.CollectionAction + { + public CollectionUpdateAction(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, object key, bool emptySnapshot, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override void Execute() => throw null; + public override void ExecuteAfterTransactionCompletion(bool success) => throw null; + public override System.Threading.Tasks.Task ExecuteAfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Action.DelayedPostInsertIdentifier` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DelayedPostInsertIdentifier + { + public object ActualId { get => throw null; set => throw null; } + public DelayedPostInsertIdentifier() => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Action.DelayedPostInsertIdentifier that) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Action.EntityAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class EntityAction : System.Runtime.Serialization.IDeserializationCallback, System.IComparable, NHibernate.Action.IExecutable, NHibernate.Action.IBeforeTransactionCompletionProcess, NHibernate.Action.IAsyncExecutable, NHibernate.Action.IAfterTransactionCompletionProcess + { + public virtual NHibernate.Action.AfterTransactionCompletionProcessDelegate AfterTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IAfterTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.AfterTransactionCompletionProcess { get => throw null; } + protected virtual void AfterTransactionCompletionProcessImpl(bool success) => throw null; + protected virtual System.Threading.Tasks.Task AfterTransactionCompletionProcessImplAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public void BeforeExecutions() => throw null; + public System.Threading.Tasks.Task BeforeExecutionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.Action.BeforeTransactionCompletionProcessDelegate BeforeTransactionCompletionProcess { get => throw null; } + NHibernate.Action.IBeforeTransactionCompletionProcess NHibernate.Action.IAsyncExecutable.BeforeTransactionCompletionProcess { get => throw null; } + protected virtual void BeforeTransactionCompletionProcessImpl() => throw null; + protected virtual System.Threading.Tasks.Task BeforeTransactionCompletionProcessImplAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual int CompareTo(NHibernate.Action.EntityAction other) => throw null; + protected internal EntityAction(NHibernate.Engine.ISessionImplementor session, object id, object instance, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public string EntityName { get => throw null; } + public abstract void Execute(); + public void ExecuteAfterTransactionCompletion(bool success) => throw null; + public System.Threading.Tasks.Task ExecuteAfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken); + public void ExecuteBeforeTransactionCompletion() => throw null; + public System.Threading.Tasks.Task ExecuteBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected internal abstract bool HasPostCommitEventListeners { get; } + public object Id { get => throw null; } + public object Instance { get => throw null; } + protected virtual bool NeedsAfterTransactionCompletion() => throw null; + protected virtual bool NeedsBeforeTransactionCompletion() => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; } + public string[] PropertySpaces { get => throw null; } + public NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Action.EntityDeleteAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityDeleteAction : NHibernate.Action.EntityAction + { + protected override void AfterTransactionCompletionProcessImpl(bool success) => throw null; + protected override System.Threading.Tasks.Task AfterTransactionCompletionProcessImplAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public override int CompareTo(NHibernate.Action.EntityAction other) => throw null; + public EntityDeleteAction(object id, object[] state, object version, object instance, NHibernate.Persister.Entity.IEntityPersister persister, bool isCascadeDeleteEnabled, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Engine.ISessionImplementor), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override bool HasPostCommitEventListeners { get => throw null; } + } + + // Generated from `NHibernate.Action.EntityIdentityInsertAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityIdentityInsertAction : NHibernate.Action.AbstractEntityInsertAction + { + protected override void AfterTransactionCompletionProcessImpl(bool success) => throw null; + protected override System.Threading.Tasks.Task AfterTransactionCompletionProcessImplAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Engine.EntityKey DelayedEntityKey { get => throw null; } + public EntityIdentityInsertAction(object[] state, object instance, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor session, bool isDelayed) : base(default(object), default(object[]), default(object), default(NHibernate.Persister.Entity.IEntityPersister), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public object GeneratedId { get => throw null; } + protected internal override bool HasPostCommitEventListeners { get => throw null; } + } + + // Generated from `NHibernate.Action.EntityInsertAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityInsertAction : NHibernate.Action.AbstractEntityInsertAction + { + protected override void AfterTransactionCompletionProcessImpl(bool success) => throw null; + protected override System.Threading.Tasks.Task AfterTransactionCompletionProcessImplAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public override int CompareTo(NHibernate.Action.EntityAction other) => throw null; + public EntityInsertAction(object id, object[] state, object instance, object version, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor session) : base(default(object), default(object[]), default(object), default(NHibernate.Persister.Entity.IEntityPersister), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override bool HasPostCommitEventListeners { get => throw null; } + } + + // Generated from `NHibernate.Action.EntityUpdateAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityUpdateAction : NHibernate.Action.EntityAction + { + protected override void AfterTransactionCompletionProcessImpl(bool success) => throw null; + protected override System.Threading.Tasks.Task AfterTransactionCompletionProcessImplAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public EntityUpdateAction(object id, object[] state, int[] dirtyProperties, bool hasDirtyCollection, object[] previousState, object previousVersion, object nextVersion, object instance, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor session) : base(default(NHibernate.Engine.ISessionImplementor), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public override void Execute() => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override bool HasPostCommitEventListeners { get => throw null; } + } + + // Generated from `NHibernate.Action.IAfterTransactionCompletionProcess` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAfterTransactionCompletionProcess + { + void ExecuteAfterTransactionCompletion(bool success); + System.Threading.Tasks.Task ExecuteAfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Action.IAsyncExecutable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAsyncExecutable : NHibernate.Action.IExecutable + { + NHibernate.Action.IAfterTransactionCompletionProcess AfterTransactionCompletionProcess { get; } + NHibernate.Action.IBeforeTransactionCompletionProcess BeforeTransactionCompletionProcess { get; } + } + + // Generated from `NHibernate.Action.IBeforeTransactionCompletionProcess` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBeforeTransactionCompletionProcess + { + void ExecuteBeforeTransactionCompletion(); + System.Threading.Tasks.Task ExecuteBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Action.IExecutable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IExecutable + { + NHibernate.Action.AfterTransactionCompletionProcessDelegate AfterTransactionCompletionProcess { get; } + void BeforeExecutions(); + System.Threading.Tasks.Task BeforeExecutionsAsync(System.Threading.CancellationToken cancellationToken); + NHibernate.Action.BeforeTransactionCompletionProcessDelegate BeforeTransactionCompletionProcess { get; } + void Execute(); + System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken); + string[] PropertySpaces { get; } + } + + } + namespace AdoNet + { + // Generated from `NHibernate.AdoNet.AbstractBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractBatcher : System.IDisposable, NHibernate.Engine.IBatcher + { + public void AbortBatch(System.Exception e) => throw null; + protected AbstractBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public abstract void AddToBatch(NHibernate.AdoNet.IExpectation expectation); + public abstract System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken); + public abstract int BatchSize { get; set; } + public void CancelLastQuery() => throw null; + protected void CheckReaders() => throw null; + protected System.Threading.Tasks.Task CheckReadersAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void CloseCommand(System.Data.Common.DbCommand st, System.Data.Common.DbDataReader reader) => throw null; + public virtual void CloseCommands() => throw null; + public void CloseReader(System.Data.Common.DbDataReader reader) => throw null; + protected NHibernate.AdoNet.ConnectionManager ConnectionManager { get => throw null; } + protected System.Exception Convert(System.Exception sqlException, string message) => throw null; + protected abstract int CountOfStatementsInCurrentBatch { get; } + protected System.Data.Common.DbCommand CurrentCommand { get => throw null; } + protected NHibernate.SqlTypes.SqlType[] CurrentCommandParameterTypes { get => throw null; } + protected NHibernate.SqlCommand.SqlString CurrentCommandSql { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool isDisposing) => throw null; + protected abstract void DoExecuteBatch(System.Data.Common.DbCommand ps); + protected abstract System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken); + protected NHibernate.Driver.IDriver Driver { get => throw null; } + public void ExecuteBatch() => throw null; + public System.Threading.Tasks.Task ExecuteBatchAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected void ExecuteBatchWithTiming(System.Data.Common.DbCommand ps) => throw null; + protected System.Threading.Tasks.Task ExecuteBatchWithTimingAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public int ExecuteNonQuery(System.Data.Common.DbCommand cmd) => throw null; + public System.Threading.Tasks.Task ExecuteNonQueryAsync(System.Data.Common.DbCommand cmd, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Data.Common.DbDataReader ExecuteReader(System.Data.Common.DbCommand cmd) => throw null; + public virtual System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.Common.DbCommand cmd, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public System.Data.Common.DbCommand Generate(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + protected NHibernate.SqlCommand.SqlString GetSQL(NHibernate.SqlCommand.SqlString sql) => throw null; + public bool HasOpenResources { get => throw null; } + protected static NHibernate.INHibernateLogger Log; + protected void LogCommand(System.Data.Common.DbCommand command) => throw null; + protected virtual void OnPreparedCommand() => throw null; + protected virtual System.Threading.Tasks.Task OnPreparedCommandAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected void Prepare(System.Data.Common.DbCommand cmd) => throw null; + protected System.Threading.Tasks.Task PrepareAsync(System.Data.Common.DbCommand cmd, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Data.Common.DbCommand PrepareBatchCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + public virtual System.Threading.Tasks.Task PrepareBatchCommandAsync(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Data.Common.DbCommand PrepareCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + public System.Threading.Tasks.Task PrepareCommandAsync(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Data.Common.DbCommand PrepareQueryCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + // ERR: Stub generator didn't handle member: ~AbstractBatcher + } + + // Generated from `NHibernate.AdoNet.ColumnNameCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnNameCache + { + public ColumnNameCache(int columnCount) => throw null; + public int GetIndexForColumnName(string columnName, NHibernate.AdoNet.ResultSetWrapper rs) => throw null; + } + + // Generated from `NHibernate.AdoNet.ConnectionManager` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConnectionManager : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback + { + public void AddDependentSession(NHibernate.Engine.ISessionImplementor session) => throw null; + public void AfterNonTransactionalQuery(bool success) => throw null; + public void AfterStatement() => throw null; + public void AfterTransaction() => throw null; + public NHibernate.Engine.IBatcher Batcher { get => throw null; } + public System.IDisposable BeginProcessingFromSystemTransaction(bool allowConnectionUsage) => throw null; + public NHibernate.ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) => throw null; + public NHibernate.ITransaction BeginTransaction() => throw null; + public System.Data.Common.DbConnection Close() => throw null; + public ConnectionManager(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection suppliedConnection, NHibernate.ConnectionReleaseMode connectionReleaseMode, NHibernate.IInterceptor interceptor, bool shouldAutoJoinTransaction, NHibernate.Connection.IConnectionAccess connectionAccess) => throw null; + public ConnectionManager(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection suppliedConnection, NHibernate.ConnectionReleaseMode connectionReleaseMode, NHibernate.IInterceptor interceptor, bool shouldAutoJoinTransaction) => throw null; + public System.Data.Common.DbCommand CreateCommand() => throw null; + public System.Threading.Tasks.Task CreateCommandAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.ITransaction CurrentTransaction { get => throw null; } + public System.Collections.Generic.IReadOnlyCollection DependentSessions { get => throw null; } + public System.Data.Common.DbConnection Disconnect() => throw null; + public void EnlistIfRequired(System.Transactions.Transaction transaction) => throw null; + public void EnlistInTransaction(System.Data.Common.DbCommand command) => throw null; + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public void FlushBeginning() => throw null; + public void FlushEnding() => throw null; + public System.Data.Common.DbConnection GetConnection() => throw null; + public System.Threading.Tasks.Task GetConnectionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public bool IsConnected { get => throw null; } + public bool IsInActiveExplicitTransaction { get => throw null; } + public bool IsInActiveTransaction { get => throw null; } + public bool IsReadyForSerialization { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public bool ProcessingFromSystemTransaction { get => throw null; } + public void Reconnect(System.Data.Common.DbConnection suppliedConnection) => throw null; + public void Reconnect() => throw null; + public void RemoveDependentSession(NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public bool ShouldAutoJoinTransaction { get => throw null; } + public NHibernate.ITransaction Transaction { get => throw null; } + } + + // Generated from `NHibernate.AdoNet.Expectations` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Expectations + { + public static NHibernate.AdoNet.IExpectation AppropriateExpectation(NHibernate.Engine.ExecuteUpdateResultCheckStyle style) => throw null; + public static NHibernate.AdoNet.IExpectation Basic; + // Generated from `NHibernate.AdoNet.Expectations+BasicExpectation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicExpectation : NHibernate.AdoNet.IExpectation + { + public BasicExpectation(int expectedRowCount) => throw null; + public virtual bool CanBeBatched { get => throw null; } + protected virtual int DetermineRowCount(int reportedRowCount, System.Data.Common.DbCommand statement) => throw null; + public virtual int ExpectedRowCount { get => throw null; } + public void VerifyOutcomeNonBatched(int rowCount, System.Data.Common.DbCommand statement) => throw null; + } + + + public static NHibernate.AdoNet.IExpectation None; + // Generated from `NHibernate.AdoNet.Expectations+NoneExpectation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoneExpectation : NHibernate.AdoNet.IExpectation + { + public bool CanBeBatched { get => throw null; } + public int ExpectedRowCount { get => throw null; } + public NoneExpectation() => throw null; + public void VerifyOutcomeNonBatched(int rowCount, System.Data.Common.DbCommand statement) => throw null; + } + + + public static void VerifyOutcomeBatched(int expectedRowCount, int rowCount, System.Data.Common.DbCommand statement) => throw null; + public static void VerifyOutcomeBatched(int expectedRowCount, int rowCount) => throw null; + } + + // Generated from `NHibernate.AdoNet.GenericBatchingBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericBatchingBatcher : NHibernate.AdoNet.AbstractBatcher + { + public override void AddToBatch(NHibernate.AdoNet.IExpectation expectation) => throw null; + public override System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken) => throw null; + public override int BatchSize { get => throw null; set => throw null; } + public override void CloseCommands() => throw null; + protected override int CountOfStatementsInCurrentBatch { get => throw null; } + protected override void Dispose(bool isDisposing) => throw null; + protected override void DoExecuteBatch(System.Data.Common.DbCommand ps) => throw null; + protected override System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public GenericBatchingBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) : base(default(NHibernate.AdoNet.ConnectionManager), default(NHibernate.IInterceptor)) => throw null; + } + + // Generated from `NHibernate.AdoNet.GenericBatchingBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericBatchingBatcherFactory : NHibernate.AdoNet.IBatcherFactory + { + public virtual NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public GenericBatchingBatcherFactory() => throw null; + } + + // Generated from `NHibernate.AdoNet.HanaBatchingBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaBatchingBatcher : NHibernate.AdoNet.AbstractBatcher + { + public override void AddToBatch(NHibernate.AdoNet.IExpectation expectation) => throw null; + public override System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken) => throw null; + public override int BatchSize { get => throw null; set => throw null; } + public override void CloseCommands() => throw null; + protected override int CountOfStatementsInCurrentBatch { get => throw null; } + protected override void Dispose(bool isDisposing) => throw null; + protected override void DoExecuteBatch(System.Data.Common.DbCommand ps) => throw null; + protected override System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public HanaBatchingBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) : base(default(NHibernate.AdoNet.ConnectionManager), default(NHibernate.IInterceptor)) => throw null; + } + + // Generated from `NHibernate.AdoNet.HanaBatchingBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaBatchingBatcherFactory : NHibernate.AdoNet.IBatcherFactory + { + public virtual NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public HanaBatchingBatcherFactory() => throw null; + } + + // Generated from `NHibernate.AdoNet.IBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBatcherFactory + { + NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor); + } + + // Generated from `NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEmbeddedBatcherFactoryProvider + { + System.Type BatcherFactoryClass { get; } + } + + // Generated from `NHibernate.AdoNet.IExpectation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IExpectation + { + bool CanBeBatched { get; } + int ExpectedRowCount { get; } + void VerifyOutcomeNonBatched(int rowCount, System.Data.Common.DbCommand statement); + } + + // Generated from `NHibernate.AdoNet.IParameterAdjuster` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParameterAdjuster + { + void AdjustParameterForValue(System.Data.Common.DbParameter parameter, NHibernate.SqlTypes.SqlType sqlType, object value); + } + + // Generated from `NHibernate.AdoNet.MySqlClientBatchingBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySqlClientBatchingBatcher : NHibernate.AdoNet.AbstractBatcher + { + public override void AddToBatch(NHibernate.AdoNet.IExpectation expectation) => throw null; + public override System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken) => throw null; + public override int BatchSize { get => throw null; set => throw null; } + public override void CloseCommands() => throw null; + protected override int CountOfStatementsInCurrentBatch { get => throw null; } + protected override void Dispose(bool isDisposing) => throw null; + protected override void DoExecuteBatch(System.Data.Common.DbCommand ps) => throw null; + protected override System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public MySqlClientBatchingBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) : base(default(NHibernate.AdoNet.ConnectionManager), default(NHibernate.IInterceptor)) => throw null; + } + + // Generated from `NHibernate.AdoNet.MySqlClientBatchingBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySqlClientBatchingBatcherFactory : NHibernate.AdoNet.IBatcherFactory + { + public virtual NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public MySqlClientBatchingBatcherFactory() => throw null; + } + + // Generated from `NHibernate.AdoNet.MySqlClientSqlCommandSet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySqlClientSqlCommandSet : System.IDisposable + { + public void Append(System.Data.Common.DbCommand command) => throw null; + public int CountOfCommands { get => throw null; } + public void Dispose() => throw null; + public int ExecuteNonQuery() => throw null; + public MySqlClientSqlCommandSet(int batchSize) => throw null; + } + + // Generated from `NHibernate.AdoNet.NonBatchingBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonBatchingBatcher : NHibernate.AdoNet.AbstractBatcher + { + public override void AddToBatch(NHibernate.AdoNet.IExpectation expectation) => throw null; + public override System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken) => throw null; + public override int BatchSize { get => throw null; set => throw null; } + protected override int CountOfStatementsInCurrentBatch { get => throw null; } + protected override void DoExecuteBatch(System.Data.Common.DbCommand ps) => throw null; + protected override System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public NonBatchingBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) : base(default(NHibernate.AdoNet.ConnectionManager), default(NHibernate.IInterceptor)) => throw null; + } + + // Generated from `NHibernate.AdoNet.NonBatchingBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonBatchingBatcherFactory : NHibernate.AdoNet.IBatcherFactory + { + public virtual NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public NonBatchingBatcherFactory() => throw null; + } + + // Generated from `NHibernate.AdoNet.OracleDataClientBatchingBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleDataClientBatchingBatcher : NHibernate.AdoNet.AbstractBatcher + { + public override void AddToBatch(NHibernate.AdoNet.IExpectation expectation) => throw null; + public override System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken) => throw null; + public override int BatchSize { get => throw null; set => throw null; } + protected override int CountOfStatementsInCurrentBatch { get => throw null; } + protected override void DoExecuteBatch(System.Data.Common.DbCommand ps) => throw null; + protected override System.Threading.Tasks.Task DoExecuteBatchAsync(System.Data.Common.DbCommand ps, System.Threading.CancellationToken cancellationToken) => throw null; + public OracleDataClientBatchingBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) : base(default(NHibernate.AdoNet.ConnectionManager), default(NHibernate.IInterceptor)) => throw null; + } + + // Generated from `NHibernate.AdoNet.OracleDataClientBatchingBatcherFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleDataClientBatchingBatcherFactory : NHibernate.AdoNet.IBatcherFactory + { + public virtual NHibernate.Engine.IBatcher CreateBatcher(NHibernate.AdoNet.ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) => throw null; + public OracleDataClientBatchingBatcherFactory() => throw null; + } + + // Generated from `NHibernate.AdoNet.ResultSetWrapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultSetWrapper : System.Data.Common.DbDataReader + { + public override void Close() => throw null; + public override int Depth { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override bool Equals(object obj) => throw null; + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int i) => throw null; + public override System.Byte GetByte(int i) => throw null; + public override System.Int64 GetBytes(int i, System.Int64 fieldOffset, System.Byte[] buffer, int bufferoffset, int length) => throw null; + public override System.Char GetChar(int i) => throw null; + public override System.Int64 GetChars(int i, System.Int64 fieldoffset, System.Char[] buffer, int bufferoffset, int length) => throw null; + public override string GetDataTypeName(int i) => throw null; + public override System.DateTime GetDateTime(int i) => throw null; + protected override System.Data.Common.DbDataReader GetDbDataReader(int ordinal) => throw null; + public override System.Decimal GetDecimal(int i) => throw null; + public override double GetDouble(int i) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int i) => throw null; + public override float GetFloat(int i) => throw null; + public override System.Guid GetGuid(int i) => throw null; + public override int GetHashCode() => throw null; + public override System.Int16 GetInt16(int i) => throw null; + public override int GetInt32(int i) => throw null; + public override System.Int64 GetInt64(int i) => throw null; + public override string GetName(int i) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public override string GetString(int i) => throw null; + public override object GetValue(int i) => throw null; + public override int GetValues(object[] values) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + public override bool IsDBNull(int i) => throw null; + public override System.Threading.Tasks.Task IsDBNullAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public override object this[string name] { get => throw null; } + public override object this[int i] { get => throw null; } + public override bool NextResult() => throw null; + public override System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Read() => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override int RecordsAffected { get => throw null; } + public ResultSetWrapper(System.Data.Common.DbDataReader resultSet, NHibernate.AdoNet.ColumnNameCache columnNameCache) => throw null; + } + + // Generated from `NHibernate.AdoNet.TooManyRowsAffectedException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TooManyRowsAffectedException : NHibernate.HibernateException + { + public int ActualRowCount { get => throw null; } + public int ExpectedRowCount { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public TooManyRowsAffectedException(string message, int expectedRowCount, int actualRowCount) => throw null; + protected TooManyRowsAffectedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + namespace Util + { + // Generated from `NHibernate.AdoNet.Util.BasicFormatter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicFormatter : NHibernate.AdoNet.Util.IFormatter + { + public BasicFormatter() => throw null; + public virtual string Format(string source) => throw null; + protected const string IndentString = default; + protected const string Initial = default; + protected static System.Collections.Generic.HashSet beginClauses; + protected static System.Collections.Generic.HashSet dml; + protected static System.Collections.Generic.HashSet endClauses; + protected static System.Collections.Generic.HashSet logical; + protected static System.Collections.Generic.HashSet misc; + protected static System.Collections.Generic.HashSet quantifiers; + } + + // Generated from `NHibernate.AdoNet.Util.DdlFormatter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DdlFormatter : NHibernate.AdoNet.Util.IFormatter + { + public DdlFormatter() => throw null; + public virtual string Format(string sql) => throw null; + protected virtual string FormatAlterTable(string sql) => throw null; + protected virtual string FormatCommentOn(string sql) => throw null; + protected virtual string FormatCreateTable(string sql) => throw null; + } + + // Generated from `NHibernate.AdoNet.Util.FormatStyle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FormatStyle + { + public static NHibernate.AdoNet.Util.FormatStyle Basic; + public static NHibernate.AdoNet.Util.FormatStyle Ddl; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.AdoNet.Util.FormatStyle other) => throw null; + public NHibernate.AdoNet.Util.IFormatter Formatter { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public string Name { get => throw null; set => throw null; } + public static NHibernate.AdoNet.Util.FormatStyle None; + } + + // Generated from `NHibernate.AdoNet.Util.IFormatter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFormatter + { + string Format(string source); + } + + // Generated from `NHibernate.AdoNet.Util.SqlStatementLogger` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlStatementLogger + { + public NHibernate.AdoNet.Util.FormatStyle DetermineActualStyle(NHibernate.AdoNet.Util.FormatStyle style) => throw null; + public bool FormatSql { get => throw null; set => throw null; } + public string GetCommandLineWithParameters(System.Data.Common.DbCommand command) => throw null; + public string GetParameterLoggableValue(System.Data.Common.DbParameter parameter) => throw null; + public bool IsDebugEnabled { get => throw null; } + public void LogBatchCommand(string batchCommand) => throw null; + public virtual void LogCommand(string message, System.Data.Common.DbCommand command, NHibernate.AdoNet.Util.FormatStyle style) => throw null; + public virtual void LogCommand(System.Data.Common.DbCommand command, NHibernate.AdoNet.Util.FormatStyle style) => throw null; + public bool LogToStdout { get => throw null; set => throw null; } + public SqlStatementLogger(bool logToStdout, bool formatSql) => throw null; + public SqlStatementLogger() => throw null; + } + + } + } + namespace Bytecode + { + // Generated from `NHibernate.Bytecode.AbstractBytecodeProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractBytecodeProvider : NHibernate.Bytecode.IInjectableProxyFactoryFactory, NHibernate.Bytecode.IInjectableCollectionTypeFactoryClass, NHibernate.Bytecode.IBytecodeProvider + { + protected AbstractBytecodeProvider() => throw null; + public virtual NHibernate.Bytecode.ICollectionTypeFactory CollectionTypeFactory { get => throw null; } + public abstract NHibernate.Bytecode.IReflectionOptimizer GetReflectionOptimizer(System.Type clazz, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters); + public virtual NHibernate.Bytecode.IObjectsFactory ObjectsFactory { get => throw null; } + public virtual NHibernate.Bytecode.IProxyFactoryFactory ProxyFactoryFactory { get => throw null; } + public void SetCollectionTypeFactoryClass(string typeAssemblyQualifiedName) => throw null; + public void SetCollectionTypeFactoryClass(System.Type type) => throw null; + public virtual void SetProxyFactoryFactory(string typeName) => throw null; + protected System.Type proxyFactoryFactory; + } + + // Generated from `NHibernate.Bytecode.AccessOptimizerExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class AccessOptimizerExtensions + { + public static object GetPropertyValue(this NHibernate.Bytecode.IAccessOptimizer optimizer, object target, int i) => throw null; + public static void SetPropertyValue(this NHibernate.Bytecode.IAccessOptimizer optimizer, object target, int i, object value) => throw null; + } + + // Generated from `NHibernate.Bytecode.ActivatorObjectsFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ActivatorObjectsFactory : NHibernate.Bytecode.IObjectsFactory + { + public ActivatorObjectsFactory() => throw null; + public object CreateInstance(System.Type type, params object[] ctorArgs) => throw null; + public object CreateInstance(System.Type type, bool nonPublic) => throw null; + public object CreateInstance(System.Type type) => throw null; + } + + // Generated from `NHibernate.Bytecode.BytecodeProviderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class BytecodeProviderExtensions + { + public static NHibernate.Bytecode.IReflectionOptimizer GetReflectionOptimizer(this NHibernate.Bytecode.IBytecodeProvider bytecodeProvider, System.Type clazz, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters, NHibernate.Properties.IGetter specializedGetter, NHibernate.Properties.ISetter specializedSetter) => throw null; + } + + // Generated from `NHibernate.Bytecode.DefaultProxyFactoryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory + { + public NHibernate.Proxy.IProxyFactory BuildProxyFactory() => throw null; + public DefaultProxyFactoryFactory() => throw null; + public bool IsInstrumented(System.Type entityClass) => throw null; + public bool IsProxy(object entity) => throw null; + public NHibernate.Proxy.IProxyValidator ProxyValidator { get => throw null; } + } + + // Generated from `NHibernate.Bytecode.HibernateByteCodeException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HibernateByteCodeException : NHibernate.HibernateException + { + public HibernateByteCodeException(string message, System.Exception inner) => throw null; + public HibernateByteCodeException(string message) => throw null; + public HibernateByteCodeException() => throw null; + protected HibernateByteCodeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Bytecode.HibernateObjectsFactoryException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HibernateObjectsFactoryException : NHibernate.HibernateException + { + public HibernateObjectsFactoryException(string message, System.Exception inner) => throw null; + public HibernateObjectsFactoryException(string message) => throw null; + public HibernateObjectsFactoryException() => throw null; + protected HibernateObjectsFactoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Bytecode.IAccessOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAccessOptimizer + { + object[] GetPropertyValues(object target); + void SetPropertyValues(object target, object[] values); + } + + // Generated from `NHibernate.Bytecode.IBytecodeEnhancementMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBytecodeEnhancementMetadata + { + bool EnhancedForLazyLoading { get; } + string EntityName { get; } + NHibernate.Intercept.IFieldInterceptor ExtractInterceptor(object entity); + System.Collections.Generic.ISet GetUninitializedLazyProperties(object[] entityState); + System.Collections.Generic.ISet GetUninitializedLazyProperties(object entity); + bool HasAnyUninitializedLazyProperties(object entity); + NHibernate.Intercept.IFieldInterceptor InjectInterceptor(object entity, NHibernate.Engine.ISessionImplementor session); + NHibernate.Bytecode.LazyPropertiesMetadata LazyPropertiesMetadata { get; } + NHibernate.Bytecode.UnwrapProxyPropertiesMetadata UnwrapProxyPropertiesMetadata { get; } + } + + // Generated from `NHibernate.Bytecode.IBytecodeProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBytecodeProvider + { + NHibernate.Bytecode.ICollectionTypeFactory CollectionTypeFactory { get; } + NHibernate.Bytecode.IReflectionOptimizer GetReflectionOptimizer(System.Type clazz, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters); + NHibernate.Bytecode.IObjectsFactory ObjectsFactory { get; } + NHibernate.Bytecode.IProxyFactoryFactory ProxyFactoryFactory { get; } + } + + // Generated from `NHibernate.Bytecode.ICollectionTypeFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionTypeFactory + { + NHibernate.Type.CollectionType Array(string role, string propertyRef, System.Type elementClass); + NHibernate.Type.CollectionType Bag(string role, string propertyRef); + NHibernate.Type.CollectionType IdBag(string role, string propertyRef); + NHibernate.Type.CollectionType List(string role, string propertyRef); + NHibernate.Type.CollectionType Map(string role, string propertyRef); + NHibernate.Type.CollectionType OrderedSet(string role, string propertyRef); + NHibernate.Type.CollectionType Set(string role, string propertyRef); + NHibernate.Type.CollectionType SortedDictionary(string role, string propertyRef, System.Collections.Generic.IComparer comparer); + NHibernate.Type.CollectionType SortedList(string role, string propertyRef, System.Collections.Generic.IComparer comparer); + NHibernate.Type.CollectionType SortedSet(string role, string propertyRef, System.Collections.Generic.IComparer comparer); + } + + // Generated from `NHibernate.Bytecode.IInjectableCollectionTypeFactoryClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInjectableCollectionTypeFactoryClass + { + void SetCollectionTypeFactoryClass(string typeAssemblyQualifiedName); + void SetCollectionTypeFactoryClass(System.Type type); + } + + // Generated from `NHibernate.Bytecode.IInjectableProxyFactoryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInjectableProxyFactoryFactory + { + void SetProxyFactoryFactory(string typeName); + } + + // Generated from `NHibernate.Bytecode.IInstantiationOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInstantiationOptimizer + { + object CreateInstance(); + } + + // Generated from `NHibernate.Bytecode.IObjectsFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IObjectsFactory + { + object CreateInstance(System.Type type, params object[] ctorArgs); + object CreateInstance(System.Type type, bool nonPublic); + object CreateInstance(System.Type type); + } + + // Generated from `NHibernate.Bytecode.IProxyFactoryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyFactoryFactory + { + NHibernate.Proxy.IProxyFactory BuildProxyFactory(); + bool IsInstrumented(System.Type entityClass); + bool IsProxy(object entity); + NHibernate.Proxy.IProxyValidator ProxyValidator { get; } + } + + // Generated from `NHibernate.Bytecode.IReflectionOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IReflectionOptimizer + { + NHibernate.Bytecode.IAccessOptimizer AccessOptimizer { get; } + NHibernate.Bytecode.IInstantiationOptimizer InstantiationOptimizer { get; } + } + + // Generated from `NHibernate.Bytecode.LazyPropertiesMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LazyPropertiesMetadata + { + public string EntityName { get => throw null; } + public System.Collections.Generic.ISet FetchGroupNames { get => throw null; } + public static NHibernate.Bytecode.LazyPropertiesMetadata From(string entityName, System.Collections.Generic.IEnumerable lazyPropertyDescriptors) => throw null; + public string GetFetchGroupName(string propertyName) => throw null; + public System.Collections.Generic.IEnumerable GetFetchGroupPropertyDescriptors(string groupName) => throw null; + public NHibernate.Bytecode.LazyPropertyDescriptor GetLazyPropertyDescriptor(string propertyName) => throw null; + public System.Collections.Generic.ISet GetPropertiesInFetchGroup(string groupName) => throw null; + public bool HasLazyProperties { get => throw null; } + public LazyPropertiesMetadata(string entityName, System.Collections.Generic.IDictionary lazyPropertyDescriptors, System.Collections.Generic.IDictionary> fetchGroups) => throw null; + public System.Collections.Generic.IEnumerable LazyPropertyDescriptors { get => throw null; } + public System.Collections.Generic.ISet LazyPropertyNames { get => throw null; } + public static NHibernate.Bytecode.LazyPropertiesMetadata NonEnhanced(string entityName) => throw null; + } + + // Generated from `NHibernate.Bytecode.LazyPropertyDescriptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LazyPropertyDescriptor + { + public string FetchGroupName { get => throw null; } + public static NHibernate.Bytecode.LazyPropertyDescriptor From(NHibernate.Mapping.Property property, int propertyIndex, int lazyIndex) => throw null; + public int LazyIndex { get => throw null; } + public string Name { get => throw null; } + public int PropertyIndex { get => throw null; } + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Bytecode.NotInstrumentedException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NotInstrumentedException : NHibernate.HibernateException + { + public NotInstrumentedException(string message) => throw null; + protected NotInstrumentedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Bytecode.NullBytecodeProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NullBytecodeProvider : NHibernate.Bytecode.AbstractBytecodeProvider + { + public override NHibernate.Bytecode.IReflectionOptimizer GetReflectionOptimizer(System.Type clazz, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters) => throw null; + public NullBytecodeProvider() => throw null; + } + + // Generated from `NHibernate.Bytecode.StaticProxyFactoryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StaticProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory + { + public NHibernate.Proxy.IProxyFactory BuildProxyFactory() => throw null; + public bool IsInstrumented(System.Type entityClass) => throw null; + public bool IsProxy(object entity) => throw null; + public NHibernate.Proxy.IProxyValidator ProxyValidator { get => throw null; } + public StaticProxyFactoryFactory() => throw null; + } + + // Generated from `NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnableToLoadProxyFactoryFactoryException : NHibernate.Bytecode.HibernateByteCodeException + { + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override string Message { get => throw null; } + public string TypeName { get => throw null; } + public UnableToLoadProxyFactoryFactoryException(string typeName, System.Exception inner) => throw null; + protected UnableToLoadProxyFactoryFactoryException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Bytecode.UnwrapProxyPropertiesMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnwrapProxyPropertiesMetadata + { + public string EntityName { get => throw null; } + public static NHibernate.Bytecode.UnwrapProxyPropertiesMetadata From(string entityName, System.Collections.Generic.IEnumerable unwrapProxyPropertyDescriptors) => throw null; + public int GetUnwrapProxyPropertyIndex(string propertyName) => throw null; + public bool HasUnwrapProxyProperties { get => throw null; } + public static NHibernate.Bytecode.UnwrapProxyPropertiesMetadata NonEnhanced(string entityName) => throw null; + public UnwrapProxyPropertiesMetadata(string entityName, System.Collections.Generic.IDictionary unwrapProxyPropertyDescriptors) => throw null; + public System.Collections.Generic.IEnumerable UnwrapProxyPropertyDescriptors { get => throw null; } + public System.Collections.Generic.ISet UnwrapProxyPropertyNames { get => throw null; } + } + + // Generated from `NHibernate.Bytecode.UnwrapProxyPropertyDescriptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnwrapProxyPropertyDescriptor + { + public static NHibernate.Bytecode.UnwrapProxyPropertyDescriptor From(NHibernate.Mapping.Property property, int propertyIndex) => throw null; + public string Name { get => throw null; } + public int PropertyIndex { get => throw null; } + public NHibernate.Type.IType Type { get => throw null; } + } + + namespace Lightweight + { + // Generated from `NHibernate.Bytecode.Lightweight.AccessOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AccessOptimizer : NHibernate.Bytecode.IAccessOptimizer + { + public AccessOptimizer(NHibernate.Bytecode.Lightweight.GetPropertyValuesInvoker getDelegate, NHibernate.Bytecode.Lightweight.SetPropertyValuesInvoker setDelegate, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters) => throw null; + public AccessOptimizer(NHibernate.Bytecode.Lightweight.GetPropertyValuesInvoker getDelegate, NHibernate.Bytecode.Lightweight.SetPropertyValuesInvoker setDelegate, NHibernate.Bytecode.Lightweight.GetPropertyValueInvoker[] getters, NHibernate.Bytecode.Lightweight.SetPropertyValueInvoker[] setters, NHibernate.Bytecode.Lightweight.GetPropertyValueInvoker specializedGetter, NHibernate.Bytecode.Lightweight.SetPropertyValueInvoker specializedSetter) => throw null; + public object GetPropertyValue(object target, int i) => throw null; + public object[] GetPropertyValues(object target) => throw null; + public void SetPropertyValue(object target, int i, object value) => throw null; + public void SetPropertyValues(object target, object[] values) => throw null; + } + + // Generated from `NHibernate.Bytecode.Lightweight.BytecodeProviderImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BytecodeProviderImpl : NHibernate.Bytecode.AbstractBytecodeProvider + { + public BytecodeProviderImpl() => throw null; + public override NHibernate.Bytecode.IReflectionOptimizer GetReflectionOptimizer(System.Type mappedClass, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters) => throw null; + } + + // Generated from `NHibernate.Bytecode.Lightweight.CreateInstanceInvoker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object CreateInstanceInvoker(); + + // Generated from `NHibernate.Bytecode.Lightweight.GetPropertyValueInvoker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object GetPropertyValueInvoker(object obj); + + // Generated from `NHibernate.Bytecode.Lightweight.GetPropertyValuesInvoker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object[] GetPropertyValuesInvoker(object obj, NHibernate.Bytecode.Lightweight.GetterCallback callback); + + // Generated from `NHibernate.Bytecode.Lightweight.GetterCallback` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object GetterCallback(object obj, int index); + + // Generated from `NHibernate.Bytecode.Lightweight.ReflectionOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReflectionOptimizer : NHibernate.Bytecode.IReflectionOptimizer, NHibernate.Bytecode.IInstantiationOptimizer + { + public NHibernate.Bytecode.IAccessOptimizer AccessOptimizer { get => throw null; } + protected virtual NHibernate.Bytecode.Lightweight.CreateInstanceInvoker CreateCreateInstanceMethod(System.Type type) => throw null; + protected System.Reflection.Emit.DynamicMethod CreateDynamicMethod(System.Type returnType, System.Type[] argumentTypes) => throw null; + public virtual object CreateInstance() => throw null; + public NHibernate.Bytecode.IInstantiationOptimizer InstantiationOptimizer { get => throw null; } + public ReflectionOptimizer(System.Type mappedType, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters, NHibernate.Properties.IGetter specializedGetter, NHibernate.Properties.ISetter specializedSetter) => throw null; + public ReflectionOptimizer(System.Type mappedType, NHibernate.Properties.IGetter[] getters, NHibernate.Properties.ISetter[] setters) => throw null; + protected virtual void ThrowExceptionForNoDefaultCtor(System.Type type) => throw null; + protected System.Type mappedType; + } + + // Generated from `NHibernate.Bytecode.Lightweight.SetPropertyValueInvoker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SetPropertyValueInvoker(object obj, object value); + + // Generated from `NHibernate.Bytecode.Lightweight.SetPropertyValuesInvoker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SetPropertyValuesInvoker(object obj, object[] values, NHibernate.Bytecode.Lightweight.SetterCallback callback); + + // Generated from `NHibernate.Bytecode.Lightweight.SetterCallback` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SetterCallback(object obj, int index, object value); + + } + } + namespace Cache + { + // Generated from `NHibernate.Cache.CacheBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CacheBase : NHibernate.Cache.ICache + { + protected CacheBase() => throw null; + public abstract void Clear(); + public virtual System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public abstract void Destroy(); + public abstract object Get(object key); + public virtual System.Threading.Tasks.Task GetAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object[] GetMany(object[] keys) => throw null; + public virtual System.Threading.Tasks.Task GetManyAsync(object[] keys, System.Threading.CancellationToken cancellationToken) => throw null; + void NHibernate.Cache.ICache.Lock(object key) => throw null; + public abstract object Lock(object key); + public virtual System.Threading.Tasks.Task LockAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + System.Threading.Tasks.Task NHibernate.Cache.ICache.LockAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object LockMany(object[] keys) => throw null; + public virtual System.Threading.Tasks.Task LockManyAsync(object[] keys, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Int64 NextTimestamp(); + public virtual bool PreferMultipleGet { get => throw null; } + public abstract void Put(object key, object value); + public virtual System.Threading.Tasks.Task PutAsync(object key, object value, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void PutMany(object[] keys, object[] values) => throw null; + public virtual System.Threading.Tasks.Task PutManyAsync(object[] keys, object[] values, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract string RegionName { get; } + public abstract void Remove(object key); + public virtual System.Threading.Tasks.Task RemoveAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract int Timeout { get; } + void NHibernate.Cache.ICache.Unlock(object key) => throw null; + public abstract void Unlock(object key, object lockValue); + public virtual System.Threading.Tasks.Task UnlockAsync(object key, object lockValue, System.Threading.CancellationToken cancellationToken) => throw null; + System.Threading.Tasks.Task NHibernate.Cache.ICache.UnlockAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void UnlockMany(object[] keys, object lockValue) => throw null; + public virtual System.Threading.Tasks.Task UnlockManyAsync(object[] keys, object lockValue, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.CacheBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheBatcher + { + } + + // Generated from `NHibernate.Cache.CacheException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheException : NHibernate.HibernateException + { + public CacheException(string message, System.Exception innerException) => throw null; + public CacheException(string message) => throw null; + public CacheException(System.Exception innerException) => throw null; + public CacheException() => throw null; + protected CacheException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Cache.CacheFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CacheFactory + { + public static NHibernate.Cache.ICacheConcurrencyStrategy CreateCache(string usage, string name, bool mutable, NHibernate.Cfg.Settings settings, System.Collections.Generic.IDictionary properties) => throw null; + public static NHibernate.Cache.ICacheConcurrencyStrategy CreateCache(string usage, NHibernate.Cache.CacheBase cache) => throw null; + public const string NonstrictReadWrite = default; + public const string ReadOnly = default; + public const string ReadWrite = default; + public const string Transactional = default; + } + + // Generated from `NHibernate.Cache.CacheKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheKey : System.Runtime.Serialization.IDeserializationCallback + { + public CacheKey(object id, NHibernate.Type.IType type, string entityOrRoleName, NHibernate.Engine.ISessionFactoryImplementor factory, string tenantIdentifier) => throw null; + public CacheKey(object id, NHibernate.Type.IType type, string entityOrRoleName, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public string EntityOrRoleName { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public object Key { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cache.CacheLock` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheLock : NHibernate.Cache.ReadWriteCache.ILockable, NHibernate.Cache.Access.ISoftLock + { + public CacheLock(System.Int64 timeout, int id, object version) => throw null; + public CacheLock() => throw null; + public int Id { get => throw null; set => throw null; } + public bool IsGettable(System.Int64 txTimestamp) => throw null; + public bool IsLock { get => throw null; } + public bool IsPuttable(System.Int64 txTimestamp, object newVersion, System.Collections.IComparer comparator) => throw null; + public NHibernate.Cache.CacheLock Lock(System.Int64 timeout, int id) => throw null; + public int Multiplicity { get => throw null; set => throw null; } + public System.Int64 Timeout { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void Unlock(System.Int64 currentTimestamp) => throw null; + public System.Int64 UnlockTimestamp { get => throw null; set => throw null; } + public object Version { get => throw null; set => throw null; } + public bool WasLockedConcurrently { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cache.CachedItem` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CachedItem : NHibernate.Cache.ReadWriteCache.ILockable + { + public CachedItem(object value, System.Int64 currentTimestamp, object version) => throw null; + public CachedItem() => throw null; + public System.Int64 FreshTimestamp { get => throw null; set => throw null; } + public bool IsGettable(System.Int64 txTimestamp) => throw null; + public bool IsLock { get => throw null; } + public bool IsPuttable(System.Int64 txTimestamp, object newVersion, System.Collections.IComparer comparator) => throw null; + public NHibernate.Cache.CacheLock Lock(System.Int64 timeout, int id) => throw null; + public override string ToString() => throw null; + public object Value { get => throw null; set => throw null; } + public object Version { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cache.FakeCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FakeCache : NHibernate.Cache.CacheBase + { + public override void Clear() => throw null; + public override System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void Destroy() => throw null; + public FakeCache(string regionName) => throw null; + public override object Get(object key) => throw null; + public override System.Threading.Tasks.Task GetAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Lock(object key) => throw null; + public override System.Threading.Tasks.Task LockAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 NextTimestamp() => throw null; + public override bool PreferMultipleGet { get => throw null; } + public override void Put(object key, object value) => throw null; + public override System.Threading.Tasks.Task PutAsync(object key, object value, System.Threading.CancellationToken cancellationToken) => throw null; + public override string RegionName { get => throw null; } + public override void Remove(object key) => throw null; + public override System.Threading.Tasks.Task RemoveAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Timeout { get => throw null; } + public override void Unlock(object key, object lockValue) => throw null; + public override System.Threading.Tasks.Task UnlockAsync(object key, object lockValue, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.FilterKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterKey + { + public static System.Collections.Generic.ISet CreateFilterKeys(System.Collections.Generic.IDictionary enabledFilters) => throw null; + public override bool Equals(object other) => throw null; + public FilterKey(string name, System.Collections.Generic.IEnumerable> @params, System.Collections.Generic.IDictionary types) => throw null; + public FilterKey(NHibernate.Impl.FilterImpl filter) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cache.HashtableCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HashtableCache : NHibernate.Cache.CacheBase + { + public override void Clear() => throw null; + public override System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void Destroy() => throw null; + public override object Get(object key) => throw null; + public override System.Threading.Tasks.Task GetAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public HashtableCache(string regionName) => throw null; + public override object Lock(object key) => throw null; + public override System.Threading.Tasks.Task LockAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 NextTimestamp() => throw null; + public override bool PreferMultipleGet { get => throw null; } + public override void Put(object key, object value) => throw null; + public override System.Threading.Tasks.Task PutAsync(object key, object value, System.Threading.CancellationToken cancellationToken) => throw null; + public override string RegionName { get => throw null; } + public override void Remove(object key) => throw null; + public override System.Threading.Tasks.Task RemoveAsync(object key, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Timeout { get => throw null; } + public override void Unlock(object key, object lockValue) => throw null; + public override System.Threading.Tasks.Task UnlockAsync(object key, object lockValue, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.HashtableCacheProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HashtableCacheProvider : NHibernate.Cache.ICacheProvider + { + public NHibernate.Cache.CacheBase BuildCache(string regionName, System.Collections.Generic.IDictionary properties) => throw null; + NHibernate.Cache.ICache NHibernate.Cache.ICacheProvider.BuildCache(string regionName, System.Collections.Generic.IDictionary properties) => throw null; + public HashtableCacheProvider() => throw null; + public System.Int64 NextTimestamp() => throw null; + public void Start(System.Collections.Generic.IDictionary properties) => throw null; + public void Stop() => throw null; + } + + // Generated from `NHibernate.Cache.IBatchableCacheConcurrencyStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBatchableCacheConcurrencyStrategy : NHibernate.Cache.ICacheConcurrencyStrategy + { + NHibernate.Cache.CacheBase Cache { get; set; } + object[] GetMany(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp); + System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken); + bool[] PutMany(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts); + System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Cache.IBatchableQueryCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBatchableQueryCache : NHibernate.Cache.IQueryCache + { + System.Collections.IList Get(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetAsync(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Collections.IList[] GetMany(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.Generic.ISet[] spaces, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.Generic.ISet[] spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool Put(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task PutAsync(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool[] PutMany(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.IList[] results, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.IList[] results, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Cache.ICache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICache + { + void Clear(); + System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken); + void Destroy(); + object Get(object key); + System.Threading.Tasks.Task GetAsync(object key, System.Threading.CancellationToken cancellationToken); + void Lock(object key); + System.Threading.Tasks.Task LockAsync(object key, System.Threading.CancellationToken cancellationToken); + System.Int64 NextTimestamp(); + void Put(object key, object value); + System.Threading.Tasks.Task PutAsync(object key, object value, System.Threading.CancellationToken cancellationToken); + string RegionName { get; } + void Remove(object key); + System.Threading.Tasks.Task RemoveAsync(object key, System.Threading.CancellationToken cancellationToken); + int Timeout { get; } + void Unlock(object key); + System.Threading.Tasks.Task UnlockAsync(object key, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Cache.ICacheConcurrencyStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheConcurrencyStrategy + { + bool AfterInsert(NHibernate.Cache.CacheKey key, object value, object version); + System.Threading.Tasks.Task AfterInsertAsync(NHibernate.Cache.CacheKey key, object value, object version, System.Threading.CancellationToken cancellationToken); + bool AfterUpdate(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock); + System.Threading.Tasks.Task AfterUpdateAsync(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken); + NHibernate.Cache.ICache Cache { get; set; } + void Clear(); + System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken); + void Destroy(); + void Evict(NHibernate.Cache.CacheKey key); + System.Threading.Tasks.Task EvictAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken); + object Get(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp); + System.Threading.Tasks.Task GetAsync(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp, System.Threading.CancellationToken cancellationToken); + bool Insert(NHibernate.Cache.CacheKey key, object value, object currentVersion); + NHibernate.Cache.Access.ISoftLock Lock(NHibernate.Cache.CacheKey key, object version); + System.Threading.Tasks.Task LockAsync(NHibernate.Cache.CacheKey key, object version, System.Threading.CancellationToken cancellationToken); + bool Put(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparer, bool minimalPut); + System.Threading.Tasks.Task PutAsync(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparer, bool minimalPut, System.Threading.CancellationToken cancellationToken); + string RegionName { get; } + void Release(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock); + System.Threading.Tasks.Task ReleaseAsync(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken); + void Remove(NHibernate.Cache.CacheKey key); + System.Threading.Tasks.Task RemoveAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken); + bool Update(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion); + System.Threading.Tasks.Task UpdateAsync(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Cache.ICacheProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheProvider + { + NHibernate.Cache.ICache BuildCache(string regionName, System.Collections.Generic.IDictionary properties); + System.Int64 NextTimestamp(); + void Start(System.Collections.Generic.IDictionary properties); + void Stop(); + } + + // Generated from `NHibernate.Cache.IOptimisticCacheSource` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOptimisticCacheSource + { + bool IsVersioned { get; } + System.Collections.IComparer VersionComparator { get; } + } + + // Generated from `NHibernate.Cache.IQueryCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryCache + { + NHibernate.Cache.ICache Cache { get; } + void Clear(); + System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken); + void Destroy(); + System.Collections.IList Get(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, bool isNaturalKeyLookup, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetAsync(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, bool isNaturalKeyLookup, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool Put(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, bool isNaturalKeyLookup, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task PutAsync(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, bool isNaturalKeyLookup, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + string RegionName { get; } + } + + // Generated from `NHibernate.Cache.IQueryCacheFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryCacheFactory + { + NHibernate.Cache.IQueryCache GetQueryCache(string regionName, NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, NHibernate.Cfg.Settings settings, System.Collections.Generic.IDictionary props); + } + + // Generated from `NHibernate.Cache.NoCacheProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoCacheProvider : NHibernate.Cache.ICacheProvider + { + public NHibernate.Cache.CacheBase BuildCache(string regionName, System.Collections.Generic.IDictionary properties) => throw null; + NHibernate.Cache.ICache NHibernate.Cache.ICacheProvider.BuildCache(string regionName, System.Collections.Generic.IDictionary properties) => throw null; + public System.Int64 NextTimestamp() => throw null; + public NoCacheProvider() => throw null; + public void Start(System.Collections.Generic.IDictionary properties) => throw null; + public void Stop() => throw null; + public const string WarnMessage = default; + } + + // Generated from `NHibernate.Cache.NonstrictReadWriteCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonstrictReadWriteCache : NHibernate.Cache.ICacheConcurrencyStrategy, NHibernate.Cache.IBatchableCacheConcurrencyStrategy + { + public bool AfterInsert(NHibernate.Cache.CacheKey key, object value, object version) => throw null; + public System.Threading.Tasks.Task AfterInsertAsync(NHibernate.Cache.CacheKey key, object value, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public bool AfterUpdate(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock) => throw null; + public System.Threading.Tasks.Task AfterUpdateAsync(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.ICache Cache { get => throw null; set => throw null; } + NHibernate.Cache.CacheBase NHibernate.Cache.IBatchableCacheConcurrencyStrategy.Cache { get => throw null; set => throw null; } + public void Clear() => throw null; + public System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Destroy() => throw null; + public void Evict(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task EvictAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public object Get(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp) => throw null; + public System.Threading.Tasks.Task GetAsync(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetMany(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp) => throw null; + public System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Insert(NHibernate.Cache.CacheKey key, object value, object currentVersion) => throw null; + public NHibernate.Cache.Access.ISoftLock Lock(NHibernate.Cache.CacheKey key, object version) => throw null; + public System.Threading.Tasks.Task LockAsync(NHibernate.Cache.CacheKey key, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public NonstrictReadWriteCache() => throw null; + public bool Put(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut) => throw null; + public System.Threading.Tasks.Task PutAsync(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut, System.Threading.CancellationToken cancellationToken) => throw null; + public bool[] PutMany(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts) => throw null; + public System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts, System.Threading.CancellationToken cancellationToken) => throw null; + public string RegionName { get => throw null; } + public void Release(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock) => throw null; + public System.Threading.Tasks.Task ReleaseAsync(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken) => throw null; + public void Remove(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task RemoveAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Update(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion) => throw null; + public System.Threading.Tasks.Task UpdateAsync(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.QueryCacheFactoryExtension` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class QueryCacheFactoryExtension + { + public static NHibernate.Cache.IQueryCache GetQueryCache(this NHibernate.Cache.IQueryCacheFactory factory, NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, System.Collections.Generic.IDictionary props, NHibernate.Cache.CacheBase regionCache) => throw null; + } + + // Generated from `NHibernate.Cache.QueryCacheResultBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryCacheResultBuilder + { + public static bool IsCacheWithFetches(NHibernate.Loader.Loader loader) => throw null; + } + + // Generated from `NHibernate.Cache.QueryKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryKey : System.Runtime.Serialization.IDeserializationCallback, System.IEquatable + { + public int ComputeHashCode() => throw null; + public override bool Equals(object other) => throw null; + public bool Equals(NHibernate.Cache.QueryKey other) => throw null; + public override int GetHashCode() => throw null; + public void OnDeserialization(object sender) => throw null; + public QueryKey(NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.SqlCommand.SqlString queryString, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet filters, NHibernate.Transform.CacheableResultTransformer customTransformer, string tenantIdentifier) => throw null; + public QueryKey(NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.SqlCommand.SqlString queryString, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet filters, NHibernate.Transform.CacheableResultTransformer customTransformer) => throw null; + public NHibernate.Transform.CacheableResultTransformer ResultTransformer { get => throw null; } + public NHibernate.Cache.QueryKey SetFirstRows(int[] firstRows) => throw null; + public NHibernate.Cache.QueryKey SetMaxRows(int[] maxRows) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cache.ReadOnlyCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReadOnlyCache : NHibernate.Cache.ICacheConcurrencyStrategy, NHibernate.Cache.IBatchableCacheConcurrencyStrategy + { + public bool AfterInsert(NHibernate.Cache.CacheKey key, object value, object version) => throw null; + public System.Threading.Tasks.Task AfterInsertAsync(NHibernate.Cache.CacheKey key, object value, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public bool AfterUpdate(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock) => throw null; + public System.Threading.Tasks.Task AfterUpdateAsync(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.ICache Cache { get => throw null; set => throw null; } + NHibernate.Cache.CacheBase NHibernate.Cache.IBatchableCacheConcurrencyStrategy.Cache { get => throw null; set => throw null; } + public void Clear() => throw null; + public System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Destroy() => throw null; + public void Evict(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task EvictAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public object Get(NHibernate.Cache.CacheKey key, System.Int64 timestamp) => throw null; + public System.Threading.Tasks.Task GetAsync(NHibernate.Cache.CacheKey key, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetMany(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp) => throw null; + public System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Insert(NHibernate.Cache.CacheKey key, object value, object currentVersion) => throw null; + public NHibernate.Cache.Access.ISoftLock Lock(NHibernate.Cache.CacheKey key, object version) => throw null; + public System.Threading.Tasks.Task LockAsync(NHibernate.Cache.CacheKey key, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Put(NHibernate.Cache.CacheKey key, object value, System.Int64 timestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut) => throw null; + public System.Threading.Tasks.Task PutAsync(NHibernate.Cache.CacheKey key, object value, System.Int64 timestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut, System.Threading.CancellationToken cancellationToken) => throw null; + public bool[] PutMany(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts) => throw null; + public System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts, System.Threading.CancellationToken cancellationToken) => throw null; + public ReadOnlyCache() => throw null; + public string RegionName { get => throw null; } + public void Release(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock) => throw null; + public System.Threading.Tasks.Task ReleaseAsync(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock @lock, System.Threading.CancellationToken cancellationToken) => throw null; + public void Remove(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task RemoveAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Update(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion) => throw null; + public System.Threading.Tasks.Task UpdateAsync(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.ReadWriteCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReadWriteCache : NHibernate.Cache.ICacheConcurrencyStrategy, NHibernate.Cache.IBatchableCacheConcurrencyStrategy + { + public bool AfterInsert(NHibernate.Cache.CacheKey key, object value, object version) => throw null; + public System.Threading.Tasks.Task AfterInsertAsync(NHibernate.Cache.CacheKey key, object value, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public bool AfterUpdate(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock clientLock) => throw null; + public System.Threading.Tasks.Task AfterUpdateAsync(NHibernate.Cache.CacheKey key, object value, object version, NHibernate.Cache.Access.ISoftLock clientLock, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.ICache Cache { get => throw null; set => throw null; } + NHibernate.Cache.CacheBase NHibernate.Cache.IBatchableCacheConcurrencyStrategy.Cache { get => throw null; set => throw null; } + public void Clear() => throw null; + public System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Destroy() => throw null; + public void Evict(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task EvictAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public object Get(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp) => throw null; + public System.Threading.Tasks.Task GetAsync(NHibernate.Cache.CacheKey key, System.Int64 txTimestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetMany(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp) => throw null; + public System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.CacheKey[] keys, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Cache.ReadWriteCache+ILockable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILockable + { + bool IsGettable(System.Int64 txTimestamp); + bool IsLock { get; } + bool IsPuttable(System.Int64 txTimestamp, object newVersion, System.Collections.IComparer comparator); + NHibernate.Cache.CacheLock Lock(System.Int64 timeout, int id); + } + + + public bool Insert(NHibernate.Cache.CacheKey key, object value, object currentVersion) => throw null; + public NHibernate.Cache.Access.ISoftLock Lock(NHibernate.Cache.CacheKey key, object version) => throw null; + public System.Threading.Tasks.Task LockAsync(NHibernate.Cache.CacheKey key, object version, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Put(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut) => throw null; + public System.Threading.Tasks.Task PutAsync(NHibernate.Cache.CacheKey key, object value, System.Int64 txTimestamp, object version, System.Collections.IComparer versionComparator, bool minimalPut, System.Threading.CancellationToken cancellationToken) => throw null; + public bool[] PutMany(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts) => throw null; + public System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.CacheKey[] keys, object[] values, System.Int64 timestamp, object[] versions, System.Collections.IComparer[] versionComparers, bool[] minimalPuts, System.Threading.CancellationToken cancellationToken) => throw null; + public ReadWriteCache() => throw null; + public string RegionName { get => throw null; } + public void Release(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock clientLock) => throw null; + public System.Threading.Tasks.Task ReleaseAsync(NHibernate.Cache.CacheKey key, NHibernate.Cache.Access.ISoftLock clientLock, System.Threading.CancellationToken cancellationToken) => throw null; + public void Remove(NHibernate.Cache.CacheKey key) => throw null; + public System.Threading.Tasks.Task RemoveAsync(NHibernate.Cache.CacheKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Update(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion) => throw null; + public System.Threading.Tasks.Task UpdateAsync(NHibernate.Cache.CacheKey key, object value, object currentVersion, object previousVersion, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Cache.StandardQueryCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardQueryCache : NHibernate.Cache.IQueryCache, NHibernate.Cache.IBatchableQueryCache + { + public NHibernate.Cache.ICache Cache { get => throw null; } + public void Clear() => throw null; + public System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Destroy() => throw null; + public System.Collections.IList Get(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, bool isNaturalKeyLookup, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Collections.IList Get(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetAsync(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, bool isNaturalKeyLookup, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.Generic.ISet spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.IList[] GetMany(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.Generic.ISet[] spaces, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetManyAsync(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.Generic.ISet[] spaces, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool IsUpToDate(System.Collections.Generic.ISet spaces, System.Int64 timestamp) => throw null; + protected virtual System.Threading.Tasks.Task IsUpToDateAsync(System.Collections.Generic.ISet spaces, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Put(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, bool isNaturalKeyLookup, NHibernate.Engine.ISessionImplementor session) => throw null; + public bool Put(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task PutAsync(NHibernate.Cache.QueryKey key, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, bool isNaturalKeyLookup, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PutAsync(NHibernate.Cache.QueryKey key, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Type.ICacheAssembler[] returnTypes, System.Collections.IList result, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool[] PutMany(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.IList[] results, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task PutManyAsync(NHibernate.Cache.QueryKey[] keys, NHibernate.Engine.QueryParameters[] queryParameters, NHibernate.Type.ICacheAssembler[][] returnTypes, System.Collections.IList[] results, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string RegionName { get => throw null; } + public StandardQueryCache(NHibernate.Cfg.Settings settings, System.Collections.Generic.IDictionary props, NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, string regionName) => throw null; + public StandardQueryCache(NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, NHibernate.Cache.CacheBase regionCache) => throw null; + } + + // Generated from `NHibernate.Cache.StandardQueryCacheFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardQueryCacheFactory : NHibernate.Cache.IQueryCacheFactory + { + public virtual NHibernate.Cache.IQueryCache GetQueryCache(NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, System.Collections.Generic.IDictionary props, NHibernate.Cache.CacheBase regionCache) => throw null; + public NHibernate.Cache.IQueryCache GetQueryCache(string regionName, NHibernate.Cache.UpdateTimestampsCache updateTimestampsCache, NHibernate.Cfg.Settings settings, System.Collections.Generic.IDictionary props) => throw null; + public StandardQueryCacheFactory() => throw null; + } + + // Generated from `NHibernate.Cache.Timestamper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Timestamper + { + public static System.Int64 Next() => throw null; + public const System.Int16 OneMs = default; + } + + // Generated from `NHibernate.Cache.UpdateTimestampsCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UpdateTimestampsCache + { + public virtual bool[] AreUpToDate(System.Collections.Generic.ISet[] spaces, System.Int64[] timestamps) => throw null; + public virtual System.Threading.Tasks.Task AreUpToDateAsync(System.Collections.Generic.ISet[] spaces, System.Int64[] timestamps, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void Clear() => throw null; + public virtual System.Threading.Tasks.Task ClearAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void Destroy() => throw null; + public void Invalidate(object[] spaces) => throw null; + public virtual void Invalidate(System.Collections.Generic.IReadOnlyCollection spaces) => throw null; + public virtual System.Threading.Tasks.Task InvalidateAsync(System.Collections.Generic.IReadOnlyCollection spaces, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task InvalidateAsync(object[] spaces, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual bool IsUpToDate(System.Collections.Generic.ISet spaces, System.Int64 timestamp) => throw null; + public virtual System.Threading.Tasks.Task IsUpToDateAsync(System.Collections.Generic.ISet spaces, System.Int64 timestamp, System.Threading.CancellationToken cancellationToken) => throw null; + public void PreInvalidate(object[] spaces) => throw null; + public virtual void PreInvalidate(System.Collections.Generic.IReadOnlyCollection spaces) => throw null; + public virtual System.Threading.Tasks.Task PreInvalidateAsync(System.Collections.Generic.IReadOnlyCollection spaces, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PreInvalidateAsync(object[] spaces, System.Threading.CancellationToken cancellationToken) => throw null; + public UpdateTimestampsCache(NHibernate.Cfg.Settings settings, System.Collections.Generic.IDictionary props) => throw null; + public UpdateTimestampsCache(NHibernate.Cache.CacheBase cache) => throw null; + } + + namespace Access + { + // Generated from `NHibernate.Cache.Access.ISoftLock` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISoftLock + { + } + + } + namespace Entry + { + // Generated from `NHibernate.Cache.Entry.CacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheEntry + { + public bool AreLazyPropertiesUnfetched { get => throw null; set => throw null; } + public object[] Assemble(object instance, object id, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.IInterceptor interceptor, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task AssembleAsync(object instance, object id, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.IInterceptor interceptor, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public CacheEntry(object[] state, NHibernate.Persister.Entity.IEntityPersister persister, bool unfetched, object version, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public CacheEntry() => throw null; + public static NHibernate.Cache.Entry.CacheEntry Create(object[] state, NHibernate.Persister.Entity.IEntityPersister persister, object version, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public static NHibernate.Cache.Entry.CacheEntry Create(object[] state, NHibernate.Persister.Entity.IEntityPersister persister, bool unfetched, object version, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public static System.Threading.Tasks.Task CreateAsync(object[] state, NHibernate.Persister.Entity.IEntityPersister persister, object version, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task CreateAsync(object[] state, NHibernate.Persister.Entity.IEntityPersister persister, bool unfetched, object version, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] DisassembledState { get => throw null; set => throw null; } + public string Subclass { get => throw null; set => throw null; } + public object Version { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cache.Entry.CollectionCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionCacheEntry + { + public virtual void Assemble(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, object owner) => throw null; + public virtual System.Threading.Tasks.Task AssembleAsync(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public CollectionCacheEntry(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public CollectionCacheEntry() => throw null; + public static NHibernate.Cache.Entry.CollectionCacheEntry Create(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public static System.Threading.Tasks.Task CreateAsync(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object[] State { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cache.Entry.ICacheEntryStructure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheEntryStructure + { + object Destructure(object map, NHibernate.Engine.ISessionFactoryImplementor factory); + object Structure(object item); + } + + // Generated from `NHibernate.Cache.Entry.StructuredCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StructuredCacheEntry : NHibernate.Cache.Entry.ICacheEntryStructure + { + public object Destructure(object item, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public object Structure(object item) => throw null; + public StructuredCacheEntry(NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + } + + // Generated from `NHibernate.Cache.Entry.StructuredCollectionCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StructuredCollectionCacheEntry : NHibernate.Cache.Entry.ICacheEntryStructure + { + public virtual object Destructure(object item, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual object Structure(object item) => throw null; + public StructuredCollectionCacheEntry() => throw null; + } + + // Generated from `NHibernate.Cache.Entry.StructuredMapCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StructuredMapCacheEntry : NHibernate.Cache.Entry.ICacheEntryStructure + { + public object Destructure(object item, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public object Structure(object item) => throw null; + public StructuredMapCacheEntry() => throw null; + } + + // Generated from `NHibernate.Cache.Entry.UnstructuredCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnstructuredCacheEntry : NHibernate.Cache.Entry.ICacheEntryStructure + { + public object Destructure(object map, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public object Structure(object item) => throw null; + public UnstructuredCacheEntry() => throw null; + } + + } + } + namespace Cfg + { + // Generated from `NHibernate.Cfg.AppSettings` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class AppSettings + { + public const string LoggerFactoryClassName = default; + } + + // Generated from `NHibernate.Cfg.BindMappingEventArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BindMappingEventArgs : System.EventArgs + { + public BindMappingEventArgs(NHibernate.Dialect.Dialect dialect, NHibernate.Cfg.MappingSchema.HbmMapping mapping, string fileName) => throw null; + public BindMappingEventArgs(NHibernate.Cfg.MappingSchema.HbmMapping mapping, string fileName) => throw null; + public NHibernate.Dialect.Dialect Dialect { get => throw null; } + public string FileName { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmMapping Mapping { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ClassExtractor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassExtractor + { + // Generated from `NHibernate.Cfg.ClassExtractor+ClassEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassEntry + { + public ClassEntry(string extends, string className, string entityName, string assembly, string @namespace) => throw null; + public string EntityName { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Cfg.ClassExtractor.ClassEntry obj) => throw null; + public string ExtendsEntityName { get => throw null; } + public NHibernate.Util.AssemblyQualifiedTypeName FullClassName { get => throw null; } + public NHibernate.Util.AssemblyQualifiedTypeName FullExtends { get => throw null; } + public override int GetHashCode() => throw null; + } + + + public ClassExtractor() => throw null; + public static System.Collections.Generic.ICollection GetClassEntries(NHibernate.Cfg.MappingSchema.HbmMapping document) => throw null; + } + + // Generated from `NHibernate.Cfg.Configuration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Configuration : System.Runtime.Serialization.ISerializable + { + public NHibernate.Cfg.Configuration AddAssembly(string assemblyName) => throw null; + public NHibernate.Cfg.Configuration AddAssembly(System.Reflection.Assembly assembly) => throw null; + public void AddAuxiliaryDatabaseObject(NHibernate.Mapping.IAuxiliaryDatabaseObject obj) => throw null; + public NHibernate.Cfg.Configuration AddClass(System.Type persistentClass) => throw null; + public void AddDeserializedMapping(NHibernate.Cfg.MappingSchema.HbmMapping mappingDocument, string documentFileName) => throw null; + public NHibernate.Cfg.Configuration AddDirectory(System.IO.DirectoryInfo dir) => throw null; + public NHibernate.Cfg.Configuration AddDocument(System.Xml.XmlDocument doc, string name) => throw null; + public NHibernate.Cfg.Configuration AddDocument(System.Xml.XmlDocument doc) => throw null; + public NHibernate.Cfg.Configuration AddFile(string xmlFile) => throw null; + public NHibernate.Cfg.Configuration AddFile(System.IO.FileInfo xmlFile) => throw null; + public void AddFilterDefinition(NHibernate.Engine.FilterDefinition definition) => throw null; + public NHibernate.Cfg.Configuration AddInputStream(System.IO.Stream xmlInputStream, string name) => throw null; + public NHibernate.Cfg.Configuration AddInputStream(System.IO.Stream xmlInputStream) => throw null; + public void AddMapping(NHibernate.Cfg.MappingSchema.HbmMapping mappingDocument) => throw null; + public NHibernate.Cfg.Configuration AddNamedQuery(string queryIdentifier, System.Action namedQueryDefinition) => throw null; + public NHibernate.Cfg.Configuration AddProperties(System.Collections.Generic.IDictionary additionalProperties) => throw null; + public NHibernate.Cfg.Configuration AddResource(string path, System.Reflection.Assembly assembly) => throw null; + public NHibernate.Cfg.Configuration AddResources(System.Collections.Generic.IEnumerable paths, System.Reflection.Assembly assembly) => throw null; + public void AddSqlFunction(string functionName, NHibernate.Dialect.Function.ISQLFunction sqlFunction) => throw null; + public NHibernate.Cfg.Configuration AddUrl(string url) => throw null; + public NHibernate.Cfg.Configuration AddUrl(System.Uri url) => throw null; + public NHibernate.Cfg.Configuration AddXml(string xml, string name) => throw null; + public NHibernate.Cfg.Configuration AddXml(string xml) => throw null; + public NHibernate.Cfg.Configuration AddXmlFile(string xmlFile) => throw null; + public NHibernate.Cfg.Configuration AddXmlReader(System.Xml.XmlReader hbmReader, string name) => throw null; + public NHibernate.Cfg.Configuration AddXmlReader(System.Xml.XmlReader hbmReader) => throw null; + public NHibernate.Cfg.Configuration AddXmlString(string xml) => throw null; + public event System.EventHandler AfterBindMapping; + public void AppendListeners(NHibernate.Event.ListenerType type, object[] listeners) => throw null; + public event System.EventHandler BeforeBindMapping; + public virtual NHibernate.Engine.IMapping BuildMapping() => throw null; + public virtual void BuildMappings() => throw null; + public NHibernate.ISessionFactory BuildSessionFactory() => throw null; + public NHibernate.Cfg.Configuration Cache(System.Action cacheProperties) => throw null; + public System.Collections.Generic.ICollection ClassMappings { get => throw null; } + public System.Collections.Generic.ICollection CollectionMappings { get => throw null; } + public NHibernate.Cfg.Configuration CollectionTypeFactory() => throw null; + public Configuration(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public Configuration() => throw null; + protected Configuration(NHibernate.Cfg.SettingsFactory settingsFactory) => throw null; + public NHibernate.Cfg.Configuration Configure(string fileName) => throw null; + public NHibernate.Cfg.Configuration Configure(System.Xml.XmlReader textReader) => throw null; + public NHibernate.Cfg.Configuration Configure(System.Reflection.Assembly assembly, string resourceName) => throw null; + public NHibernate.Cfg.Configuration Configure() => throw null; + protected virtual void ConfigureProxyFactoryFactory() => throw null; + public NHibernate.Cfg.Mappings CreateMappings(NHibernate.Dialect.Dialect dialect) => throw null; + public NHibernate.Cfg.Mappings CreateMappings() => throw null; + public NHibernate.Cfg.Configuration CurrentSessionContext() where TCurrentSessionContext : NHibernate.Context.ICurrentSessionContext => throw null; + public NHibernate.Cfg.Configuration DataBaseIntegration(System.Action dataBaseIntegration) => throw null; + public const string DefaultHibernateCfgFileName = default; + protected NHibernate.Cfg.Configuration DoConfigure(NHibernate.Cfg.ISessionFactoryConfiguration factoryConfiguration) => throw null; + public NHibernate.Cfg.Configuration EntityCache(System.Action> entityCacheConfiguration) where TEntity : class => throw null; + public NHibernate.Proxy.IEntityNotFoundDelegate EntityNotFoundDelegate { get => throw null; set => throw null; } + public NHibernate.Event.EventListeners EventListeners { get => throw null; } + public System.Collections.Generic.IDictionary FilterDefinitions { get => throw null; set => throw null; } + public string[] GenerateDropSchemaScript(NHibernate.Dialect.Dialect dialect) => throw null; + public string[] GenerateSchemaCreationScript(NHibernate.Dialect.Dialect dialect) => throw null; + public string[] GenerateSchemaUpdateScript(NHibernate.Dialect.Dialect dialect, NHibernate.Tool.hbm2ddl.IDatabaseMetadata databaseMetadata) => throw null; + public NHibernate.Mapping.PersistentClass GetClassMapping(string entityName) => throw null; + public NHibernate.Mapping.PersistentClass GetClassMapping(System.Type persistentClass) => throw null; + public NHibernate.Mapping.Collection GetCollectionMapping(string role) => throw null; + protected virtual string GetDefaultConfigurationFilePath() => throw null; + public System.Collections.Generic.IDictionary GetDerivedProperties() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public string GetProperty(string name) => throw null; + public NHibernate.Cfg.Configuration HqlQueryTranslator() where TQueryTranslator : NHibernate.Hql.IQueryTranslatorFactory => throw null; + public System.Collections.Generic.IDictionary Imports { get => throw null; set => throw null; } + public static bool IncludeAction(NHibernate.Mapping.SchemaAction actionsSource, NHibernate.Mapping.SchemaAction includedAction) => throw null; + public NHibernate.IInterceptor Interceptor { get => throw null; set => throw null; } + public NHibernate.Cfg.Configuration LinqQueryProvider() where TQueryProvider : NHibernate.Linq.INhQueryProvider => throw null; + public NHibernate.Cfg.Configuration LinqToHqlGeneratorsRegistry() where TLinqToHqlGeneratorsRegistry : NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry => throw null; + public NHibernate.Cfg.NamedXmlDocument LoadMappingDocument(System.Xml.XmlReader hbmReader, string name) => throw null; + public NHibernate.Cfg.Configuration Mappings(System.Action mappingsProperties) => throw null; + public System.Collections.Generic.IDictionary NamedQueries { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary NamedSQLQueries { get => throw null; set => throw null; } + public NHibernate.Cfg.INamingStrategy NamingStrategy { get => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; set => throw null; } + public NHibernate.Cfg.Configuration Proxy(System.Action proxyProperties) => throw null; + protected void Reset() => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration SessionFactory() => throw null; + public NHibernate.Cfg.Configuration SessionFactory(System.Action configure) => throw null; + public NHibernate.Cfg.Configuration SessionFactoryName(string sessionFactoryName) => throw null; + public void SetCacheConcurrencyStrategy(string clazz, string concurrencyStrategy, string region) => throw null; + public NHibernate.Cfg.Configuration SetCacheConcurrencyStrategy(string clazz, string concurrencyStrategy) => throw null; + public NHibernate.Cfg.Configuration SetCollectionCacheConcurrencyStrategy(string collectionRole, string concurrencyStrategy) => throw null; + public NHibernate.Cfg.Configuration SetDefaultAssembly(string newDefaultAssembly) => throw null; + public NHibernate.Cfg.Configuration SetDefaultNamespace(string newDefaultNamespace) => throw null; + public NHibernate.Cfg.Configuration SetInterceptor(NHibernate.IInterceptor newInterceptor) => throw null; + public void SetListener(NHibernate.Event.ListenerType type, object listener) => throw null; + public void SetListeners(NHibernate.Event.ListenerType type, string[] listenerClasses) => throw null; + public void SetListeners(NHibernate.Event.ListenerType type, object[] listeners) => throw null; + public NHibernate.Cfg.Configuration SetNamingStrategy(NHibernate.Cfg.INamingStrategy newNamingStrategy) => throw null; + public NHibernate.Cfg.Configuration SetProperties(System.Collections.Generic.IDictionary newProperties) => throw null; + public NHibernate.Cfg.Configuration SetProperty(string name, string value) => throw null; + public System.Collections.Generic.IDictionary SqlFunctions { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary SqlResultSetMappings { get => throw null; set => throw null; } + public NHibernate.Cfg.Configuration TypeDefinition(System.Action typeDefConfiguration) where TDef : class => throw null; + public void ValidateSchema(NHibernate.Dialect.Dialect dialect, NHibernate.Tool.hbm2ddl.IDatabaseMetadata databaseMetadata) => throw null; + protected System.Collections.Generic.IList auxiliaryDatabaseObjects; + protected System.Collections.Generic.IDictionary classes; + protected System.Collections.Generic.IDictionary collections; + protected System.Collections.Generic.IDictionary columnNameBindingPerTable; + protected System.Collections.Generic.ISet extendsQueue; + protected System.Collections.Generic.Queue filtersSecondPasses; + protected System.Collections.Generic.IList propertyReferences; + protected System.Collections.Generic.IList secondPasses; + protected internal NHibernate.Cfg.SettingsFactory settingsFactory; + protected System.Collections.Generic.IDictionary tableNameBinding; + protected System.Collections.Generic.IDictionary tables; + protected System.Collections.Generic.IDictionary typeDefs; + } + + // Generated from `NHibernate.Cfg.ConfigurationExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ConfigurationExtensions + { + public static NHibernate.Cfg.Configuration AddNamedQuery(this NHibernate.Cfg.Configuration configuration, string queryIdentifier, System.Action namedQueryDefinition) => throw null; + public static NHibernate.Cfg.Configuration Cache(this NHibernate.Cfg.Configuration configuration, System.Action cacheProperties) => throw null; + public static NHibernate.Cfg.Configuration CollectionTypeFactory(this NHibernate.Cfg.Configuration configuration) => throw null; + public static NHibernate.Cfg.Configuration CurrentSessionContext(this NHibernate.Cfg.Configuration configuration) where TCurrentSessionContext : NHibernate.Context.ICurrentSessionContext => throw null; + public static NHibernate.Cfg.Configuration DataBaseIntegration(this NHibernate.Cfg.Configuration configuration, System.Action dataBaseIntegration) => throw null; + public static NHibernate.Cfg.Configuration EntityCache(this NHibernate.Cfg.Configuration configuration, System.Action> entityCacheConfiguration) where TEntity : class => throw null; + public static NHibernate.Cfg.Configuration HqlQueryTranslator(this NHibernate.Cfg.Configuration configuration) where TQueryTranslator : NHibernate.Hql.IQueryTranslatorFactory => throw null; + public static NHibernate.Cfg.Configuration LinqQueryProvider(this NHibernate.Cfg.Configuration configuration) where TQueryProvider : NHibernate.Linq.INhQueryProvider => throw null; + public static NHibernate.Cfg.Configuration LinqToHqlGeneratorsRegistry(this NHibernate.Cfg.Configuration configuration) where TLinqToHqlGeneratorsRegistry : NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry => throw null; + public static NHibernate.Cfg.Configuration Mappings(this NHibernate.Cfg.Configuration configuration, System.Action mappingsProperties) => throw null; + public static NHibernate.Cfg.Configuration Proxy(this NHibernate.Cfg.Configuration configuration, System.Action proxyProperties) => throw null; + public static NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration SessionFactory(this NHibernate.Cfg.Configuration configuration) => throw null; + public static NHibernate.Cfg.Configuration SessionFactoryName(this NHibernate.Cfg.Configuration configuration, string sessionFactoryName) => throw null; + public static NHibernate.Cfg.Configuration TypeDefinition(this NHibernate.Cfg.Configuration configuration, System.Action typeDefConfiguration) where TDef : class => throw null; + } + + // Generated from `NHibernate.Cfg.ConfigurationProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ConfigurationProvider + { + protected ConfigurationProvider() => throw null; + public static NHibernate.Cfg.ConfigurationProvider Current { get => throw null; set => throw null; } + public abstract NHibernate.Cfg.IHibernateConfiguration GetConfiguration(); + public abstract string GetLoggerFactoryClassName(); + public abstract string GetNamedConnectionString(string name); + } + + // Generated from `NHibernate.Cfg.ConfigurationSectionHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConfigurationSectionHandler : System.Configuration.IConfigurationSectionHandler + { + public ConfigurationSectionHandler() => throw null; + object System.Configuration.IConfigurationSectionHandler.Create(object parent, object configContext, System.Xml.XmlNode section) => throw null; + } + + // Generated from `NHibernate.Cfg.DefaultNamingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultNamingStrategy : NHibernate.Cfg.INamingStrategy + { + public string ClassToTableName(string className) => throw null; + public string ColumnName(string columnName) => throw null; + public static NHibernate.Cfg.INamingStrategy Instance; + public string LogicalColumnName(string columnName, string propertyName) => throw null; + public string PropertyToColumnName(string propertyName) => throw null; + public string PropertyToTableName(string className, string propertyName) => throw null; + public string TableName(string tableName) => throw null; + } + + // Generated from `NHibernate.Cfg.EntityCacheUsage` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum EntityCacheUsage + { + NonStrictReadWrite, + ReadWrite, + Readonly, + Transactional, + } + + // Generated from `NHibernate.Cfg.EntityCacheUsageParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EntityCacheUsageParser + { + public static NHibernate.Cfg.EntityCacheUsage Parse(string value) => throw null; + public static string ToString(NHibernate.Cfg.EntityCacheUsage value) => throw null; + } + + // Generated from `NHibernate.Cfg.Environment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Environment + { + public const string AutoJoinTransaction = default; + public const string BatchSize = default; + public const string BatchStrategy = default; + public const string BatchVersionedData = default; + public static NHibernate.Bytecode.IBytecodeProvider BuildBytecodeProvider(System.Collections.Generic.IDictionary properties) => throw null; + public static NHibernate.Bytecode.IObjectsFactory BuildObjectsFactory(System.Collections.Generic.IDictionary properties) => throw null; + public static NHibernate.Bytecode.IBytecodeProvider BytecodeProvider { get => throw null; set => throw null; } + public const string CacheDefaultExpiration = default; + public const string CacheProvider = default; + public const string CacheRegionPrefix = default; + public const string CollectionTypeFactoryClass = default; + public const string CommandTimeout = default; + public const string ConnectionDriver = default; + public const string ConnectionProvider = default; + public const string ConnectionString = default; + public const string ConnectionStringName = default; + public const string CurrentSessionContextClass = default; + public const string DefaultBatchFetchSize = default; + public const string DefaultCatalog = default; + public const string DefaultEntityMode = default; + public const string DefaultFlushMode = default; + public const string DefaultSchema = default; + public const string Dialect = default; + public const string FirebirdDisableParameterCasting = default; + public const string FormatSql = default; + public const string GenerateStatistics = default; + public const string Hbm2ddlAuto = default; + public const string Hbm2ddlKeyWords = default; + public const string Hbm2ddlThrowOnUpdate = default; + public static void InitializeGlobalProperties(NHibernate.Cfg.IHibernateConfiguration config) => throw null; + public const string Isolation = default; + public const string LinqToHqlFallbackOnPreEvaluation = default; + public const string LinqToHqlGeneratorsRegistry = default; + public const string LinqToHqlLegacyPreEvaluation = default; + public const string MaxFetchDepth = default; + public const string MultiTenancy = default; + public const string MultiTenancyConnectionProvider = default; + public static NHibernate.Bytecode.IObjectsFactory ObjectsFactory { get => throw null; set => throw null; } + public const string OdbcDateTimeScale = default; + public const string OracleUseBinaryFloatingPointTypes = default; + public const string OracleUseNPrefixedTypesForUnicode = default; + public const string OrderInserts = default; + public const string OrderUpdates = default; + public const string OutputStylesheet = default; + public const string PreTransformerRegistrar = default; + public const string PreferPooledValuesLo = default; + public const string PrepareSql = default; + public static System.Collections.Generic.IDictionary Properties { get => throw null; } + public const string PropertyBytecodeProvider = default; + public const string PropertyObjectsFactory = default; + public const string PropertyUseReflectionOptimizer = default; + public const string ProxyFactoryFactoryClass = default; + public const string QueryCacheFactory = default; + public const string QueryDefaultCastLength = default; + public const string QueryDefaultCastPrecision = default; + public const string QueryDefaultCastScale = default; + public const string QueryImports = default; + public const string QueryLinqProvider = default; + public const string QueryModelRewriterFactory = default; + public const string QueryStartupChecking = default; + public const string QuerySubstitutions = default; + public const string QueryTranslator = default; + public const string ReleaseConnections = default; + public const string SessionFactoryName = default; + public const string ShowSql = default; + public const string SqlExceptionConverter = default; + public const string SqlTypesKeepDateTime = default; + public const string SqliteBinaryGuid = default; + public const string StatementFetchSize = default; + public const string SystemTransactionCompletionLockTimeout = default; + public const string TrackSessionId = default; + public const string TransactionManagerStrategy = default; + public const string TransactionStrategy = default; + public const string UseConnectionOnSystemTransactionPrepare = default; + public const string UseGetGeneratedKeys = default; + public const string UseIdentifierRollBack = default; + public const string UseMinimalPuts = default; + public const string UseProxyValidator = default; + public const string UseQueryCache = default; + public static bool UseReflectionOptimizer { get => throw null; set => throw null; } + public const string UseSecondLevelCache = default; + public const string UseSqlComments = default; + public static void VerifyProperties(System.Collections.Generic.IDictionary props) => throw null; + public static string Version { get => throw null; } + public const string WrapResultSets = default; + } + + // Generated from `NHibernate.Cfg.ExtendsQueueEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExtendsQueueEntry + { + public System.Xml.XmlDocument Document { get => throw null; } + public string ExplicitName { get => throw null; } + public ExtendsQueueEntry(string explicitName, string mappingPackage, System.Xml.XmlDocument document) => throw null; + public string MappingPackage { get => throw null; } + } + + // Generated from `NHibernate.Cfg.FilterSecondPassArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterSecondPassArgs + { + public string FilterName { get => throw null; set => throw null; } + public FilterSecondPassArgs(NHibernate.Mapping.IFilterable filterable, string filterName) => throw null; + public NHibernate.Mapping.IFilterable Filterable { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cfg.Hbm2DDLKeyWords` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Hbm2DDLKeyWords + { + public static bool operator !=(string a, NHibernate.Cfg.Hbm2DDLKeyWords b) => throw null; + public static bool operator !=(NHibernate.Cfg.Hbm2DDLKeyWords a, string b) => throw null; + public static bool operator ==(string a, NHibernate.Cfg.Hbm2DDLKeyWords b) => throw null; + public static bool operator ==(NHibernate.Cfg.Hbm2DDLKeyWords a, string b) => throw null; + public static NHibernate.Cfg.Hbm2DDLKeyWords AutoQuote; + public override bool Equals(object obj) => throw null; + public bool Equals(string other) => throw null; + public bool Equals(NHibernate.Cfg.Hbm2DDLKeyWords other) => throw null; + public override int GetHashCode() => throw null; + public static NHibernate.Cfg.Hbm2DDLKeyWords Keywords; + public static NHibernate.Cfg.Hbm2DDLKeyWords None; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cfg.HbmConstants` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmConstants + { + public HbmConstants() => throw null; + public const string nsClass = default; + public const string nsCollectionId = default; + public const string nsColumn = default; + public const string nsCreate = default; + public const string nsDatabaseObject = default; + public const string nsDefinition = default; + public const string nsDialectScope = default; + public const string nsDrop = default; + public const string nsFilter = default; + public const string nsFilterDef = default; + public const string nsFilterParam = default; + public const string nsFormula = default; + public const string nsGenerator = default; + public const string nsImport = default; + public const string nsIndex = default; + public const string nsJoinedSubclass = default; + public const string nsKey = default; + public const string nsListIndex = default; + public const string nsLoader = default; + public const string nsMeta = default; + public const string nsMetaValue = default; + public const string nsOneToMany = default; + public const string nsParam = default; + public const string nsPrefix = default; + public const string nsQuery = default; + public const string nsQueryParam = default; + public const string nsResultset = default; + public const string nsReturnColumn = default; + public const string nsReturnDiscriminator = default; + public const string nsReturnProperty = default; + public const string nsSqlDelete = default; + public const string nsSqlDeleteAll = default; + public const string nsSqlInsert = default; + public const string nsSqlQuery = default; + public const string nsSqlUpdate = default; + public const string nsSubclass = default; + public const string nsSynchronize = default; + public const string nsTuplizer = default; + public const string nsType = default; + public const string nsUnionSubclass = default; + } + + // Generated from `NHibernate.Cfg.HibernateConfigException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HibernateConfigException : NHibernate.MappingException + { + public HibernateConfigException(string message, System.Exception innerException) : base(default(System.Exception)) => throw null; + public HibernateConfigException(string message) : base(default(System.Exception)) => throw null; + public HibernateConfigException(System.Exception innerException) : base(default(System.Exception)) => throw null; + public HibernateConfigException() : base(default(System.Exception)) => throw null; + protected HibernateConfigException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(System.Exception)) => throw null; + } + + // Generated from `NHibernate.Cfg.IHibernateConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IHibernateConfiguration + { + string ByteCodeProviderType { get; } + NHibernate.Cfg.ISessionFactoryConfiguration SessionFactory { get; } + bool UseReflectionOptimizer { get; } + } + + // Generated from `NHibernate.Cfg.INamingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INamingStrategy + { + string ClassToTableName(string className); + string ColumnName(string columnName); + string LogicalColumnName(string columnName, string propertyName); + string PropertyToColumnName(string propertyName); + string PropertyToTableName(string className, string propertyName); + string TableName(string tableName); + } + + // Generated from `NHibernate.Cfg.ISessionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionFactoryConfiguration + { + System.Collections.Generic.IList ClassesCache { get; } + System.Collections.Generic.IList CollectionsCache { get; } + System.Collections.Generic.IList Events { get; } + System.Collections.Generic.IList Listeners { get; } + System.Collections.Generic.IList Mappings { get; } + string Name { get; } + System.Collections.Generic.IDictionary Properties { get; } + } + + // Generated from `NHibernate.Cfg.ImprovedNamingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ImprovedNamingStrategy : NHibernate.Cfg.INamingStrategy + { + public string ClassToTableName(string className) => throw null; + public string ColumnName(string columnName) => throw null; + public static NHibernate.Cfg.INamingStrategy Instance; + public string LogicalColumnName(string columnName, string propertyName) => throw null; + public string PropertyToColumnName(string propertyName) => throw null; + public string PropertyToTableName(string className, string propertyName) => throw null; + public string TableName(string tableName) => throw null; + } + + // Generated from `NHibernate.Cfg.Mappings` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Mappings + { + public void AddAuxiliaryDatabaseObject(NHibernate.Mapping.IAuxiliaryDatabaseObject auxiliaryDatabaseObject) => throw null; + public void AddClass(NHibernate.Mapping.PersistentClass persistentClass) => throw null; + public void AddCollection(NHibernate.Mapping.Collection collection) => throw null; + public void AddColumnBinding(string logicalName, NHibernate.Mapping.Column finalColumn, NHibernate.Mapping.Table table) => throw null; + public NHibernate.Mapping.Table AddDenormalizedTable(string schema, string catalog, string name, bool isAbstract, string subselect, NHibernate.Mapping.Table includedTable) => throw null; + public void AddFilterDefinition(NHibernate.Engine.FilterDefinition definition) => throw null; + public void AddImport(string className, string rename) => throw null; + public void AddPropertyReference(string referencedClass, string propertyName) => throw null; + public void AddQuery(string name, NHibernate.Engine.NamedQueryDefinition query) => throw null; + public void AddResultSetMapping(NHibernate.Engine.ResultSetMappingDefinition sqlResultSetMapping) => throw null; + public void AddSQLQuery(string name, NHibernate.Engine.NamedSQLQueryDefinition query) => throw null; + public void AddSecondPass(NHibernate.Cfg.SecondPassCommand command, bool onTopOfTheQueue) => throw null; + public void AddSecondPass(NHibernate.Cfg.SecondPassCommand command) => throw null; + public NHibernate.Mapping.Table AddTable(string schema, string catalog, string name, string subselect, bool isAbstract, string schemaAction) => throw null; + public void AddTableBinding(string schema, string catalog, string logicalName, string physicalName, NHibernate.Mapping.Table denormalizedSuperTable) => throw null; + public void AddToExtendsQueue(NHibernate.Cfg.ExtendsQueueEntry entry) => throw null; + public void AddTypeDef(string typeName, string typeClass, System.Collections.Generic.IDictionary paramMap) => throw null; + public void AddUniquePropertyReference(string referencedClass, string propertyName) => throw null; + public string CatalogName { get => throw null; set => throw null; } + // Generated from `NHibernate.Cfg.Mappings+ColumnNames` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnNames + { + public ColumnNames() => throw null; + public System.Collections.Generic.IDictionary logicalToPhysical; + public System.Collections.Generic.IDictionary physicalToLogical; + } + + + public string DefaultAccess { get => throw null; set => throw null; } + public string DefaultAssembly { get => throw null; set => throw null; } + public string DefaultCascade { get => throw null; set => throw null; } + public string DefaultCatalog { get => throw null; set => throw null; } + public bool DefaultLazy { get => throw null; set => throw null; } + public string DefaultNamespace { get => throw null; set => throw null; } + public string DefaultSchema { get => throw null; set => throw null; } + public NHibernate.Dialect.Dialect Dialect { get => throw null; } + public void ExpectedFilterDefinition(NHibernate.Mapping.IFilterable filterable, string filterName, string condition) => throw null; + public System.Collections.Generic.IDictionary FilterDefinitions { get => throw null; } + public NHibernate.Mapping.PersistentClass GetClass(string className) => throw null; + public NHibernate.Mapping.Collection GetCollection(string role) => throw null; + public NHibernate.Engine.FilterDefinition GetFilterDefinition(string name) => throw null; + public string GetLogicalColumnName(string physicalName, NHibernate.Mapping.Table table) => throw null; + public string GetLogicalTableName(NHibernate.Mapping.Table table) => throw null; + public string GetPhysicalColumnName(string logicalName, NHibernate.Mapping.Table table) => throw null; + public NHibernate.Engine.NamedQueryDefinition GetQuery(string name) => throw null; + public NHibernate.Engine.ResultSetMappingDefinition GetResultSetMapping(string name) => throw null; + public NHibernate.Mapping.Table GetTable(string schema, string catalog, string name) => throw null; + public NHibernate.Mapping.TypeDef GetTypeDef(string typeName) => throw null; + public bool IsAutoImport { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable IterateCollections { get => throw null; } + public System.Collections.Generic.IEnumerable IterateTables { get => throw null; } + public NHibernate.Mapping.PersistentClass LocatePersistentClassByEntityName(string entityName) => throw null; + protected internal Mappings(System.Collections.Generic.IDictionary classes, System.Collections.Generic.IDictionary collections, System.Collections.Generic.IDictionary tables, System.Collections.Generic.IDictionary queries, System.Collections.Generic.IDictionary sqlqueries, System.Collections.Generic.IDictionary resultSetMappings, System.Collections.Generic.IDictionary imports, System.Collections.Generic.IList secondPasses, System.Collections.Generic.Queue filtersSecondPasses, System.Collections.Generic.IList propertyReferences, NHibernate.Cfg.INamingStrategy namingStrategy, System.Collections.Generic.IDictionary typeDefs, System.Collections.Generic.IDictionary filterDefinitions, System.Collections.Generic.ISet extendsQueue, System.Collections.Generic.IList auxiliaryDatabaseObjects, System.Collections.Generic.IDictionary tableNameBinding, System.Collections.Generic.IDictionary columnNameBindingPerTable, string defaultAssembly, string defaultNamespace, string defaultCatalog, string defaultSchema, string preferPooledValuesLo, NHibernate.Dialect.Dialect dialect) => throw null; + protected internal Mappings(System.Collections.Generic.IDictionary classes, System.Collections.Generic.IDictionary collections, System.Collections.Generic.IDictionary tables, System.Collections.Generic.IDictionary queries, System.Collections.Generic.IDictionary sqlqueries, System.Collections.Generic.IDictionary resultSetMappings, System.Collections.Generic.IDictionary imports, System.Collections.Generic.IList secondPasses, System.Collections.Generic.Queue filtersSecondPasses, System.Collections.Generic.IList propertyReferences, NHibernate.Cfg.INamingStrategy namingStrategy, System.Collections.Generic.IDictionary typeDefs, System.Collections.Generic.IDictionary filterDefinitions, System.Collections.Generic.ISet extendsQueue, System.Collections.Generic.IList auxiliaryDatabaseObjects, System.Collections.Generic.IDictionary tableNameBinding, System.Collections.Generic.IDictionary columnNameBindingPerTable, string defaultAssembly, string defaultNamespace, string defaultCatalog, string defaultSchema, string preferPooledValuesLo) => throw null; + public NHibernate.Cfg.INamingStrategy NamingStrategy { get => throw null; } + public string PreferPooledValuesLo { get => throw null; set => throw null; } + // Generated from `NHibernate.Cfg.Mappings+PropertyReference` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyReference + { + public PropertyReference() => throw null; + public string propertyName; + public string referencedClass; + public bool unique; + } + + + public string SchemaName { get => throw null; set => throw null; } + // Generated from `NHibernate.Cfg.Mappings+TableDescription` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableDescription + { + public TableDescription(string logicalName, NHibernate.Mapping.Table denormalizedSupertable) => throw null; + public NHibernate.Mapping.Table denormalizedSupertable; + public string logicalName; + } + + + protected internal System.Collections.Generic.IDictionary columnNameBindingPerTable; + protected internal System.Collections.Generic.ISet extendsQueue; + protected internal System.Collections.Generic.IDictionary tableNameBinding; + protected internal System.Collections.Generic.IDictionary typeDefs; + } + + // Generated from `NHibernate.Cfg.MappingsQueue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingsQueue + { + public void AddDocument(NHibernate.Cfg.NamedXmlDocument document) => throw null; + public void CheckNoUnavailableEntries() => throw null; + public NHibernate.Cfg.NamedXmlDocument GetNextAvailableResource() => throw null; + public MappingsQueue() => throw null; + } + + // Generated from `NHibernate.Cfg.MappingsQueueEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingsQueueEntry + { + public System.Collections.Generic.ICollection ContainedClassNames { get => throw null; } + public NHibernate.Cfg.NamedXmlDocument Document { get => throw null; } + public MappingsQueueEntry(NHibernate.Cfg.NamedXmlDocument document, System.Collections.Generic.IEnumerable classEntries) => throw null; + public System.Collections.Generic.ICollection RequiredClassNames { get => throw null; } + // Generated from `NHibernate.Cfg.MappingsQueueEntry+RequiredEntityName` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RequiredEntityName + { + public string EntityName { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Cfg.MappingsQueueEntry.RequiredEntityName obj) => throw null; + public string FullClassName { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public RequiredEntityName(string entityName, string fullClassName) => throw null; + public override string ToString() => throw null; + } + + + } + + // Generated from `NHibernate.Cfg.NamedXmlDocument` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedXmlDocument + { + public NHibernate.Cfg.MappingSchema.HbmMapping Document { get => throw null; } + public string Name { get => throw null; } + public NamedXmlDocument(string name, System.Xml.XmlDocument document, System.Xml.Serialization.XmlSerializer serializer) => throw null; + public NamedXmlDocument(string name, System.Xml.XmlDocument document) => throw null; + } + + // Generated from `NHibernate.Cfg.SchemaAutoAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SchemaAutoAction + { + public static bool operator !=(string a, NHibernate.Cfg.SchemaAutoAction b) => throw null; + public static bool operator !=(NHibernate.Cfg.SchemaAutoAction a, string b) => throw null; + public static bool operator ==(string a, NHibernate.Cfg.SchemaAutoAction b) => throw null; + public static bool operator ==(NHibernate.Cfg.SchemaAutoAction a, string b) => throw null; + public static NHibernate.Cfg.SchemaAutoAction Create; + public override bool Equals(object obj) => throw null; + public bool Equals(string other) => throw null; + public bool Equals(NHibernate.Cfg.SchemaAutoAction other) => throw null; + public override int GetHashCode() => throw null; + public static NHibernate.Cfg.SchemaAutoAction Recreate; + public override string ToString() => throw null; + public static NHibernate.Cfg.SchemaAutoAction Update; + public static NHibernate.Cfg.SchemaAutoAction Validate; + } + + // Generated from `NHibernate.Cfg.SecondPassCommand` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SecondPassCommand(System.Collections.Generic.IDictionary persistentClasses); + + // Generated from `NHibernate.Cfg.SessionFactoryConfigurationBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionFactoryConfigurationBase : NHibernate.Cfg.ISessionFactoryConfiguration + { + public System.Collections.Generic.IList ClassesCache { get => throw null; } + public System.Collections.Generic.IList CollectionsCache { get => throw null; } + public System.Collections.Generic.IList Events { get => throw null; } + public System.Collections.Generic.IList Listeners { get => throw null; } + public System.Collections.Generic.IList Mappings { get => throw null; } + public string Name { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary Properties { get => throw null; } + public SessionFactoryConfigurationBase() => throw null; + } + + // Generated from `NHibernate.Cfg.Settings` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Settings + { + public int AdoBatchSize { get => throw null; set => throw null; } + public bool AutoJoinTransaction { get => throw null; set => throw null; } + public NHibernate.AdoNet.IBatcherFactory BatcherFactory { get => throw null; set => throw null; } + public NHibernate.Cache.ICacheProvider CacheProvider { get => throw null; set => throw null; } + public string CacheRegionPrefix { get => throw null; set => throw null; } + public NHibernate.Connection.IConnectionProvider ConnectionProvider { get => throw null; set => throw null; } + public NHibernate.ConnectionReleaseMode ConnectionReleaseMode { get => throw null; set => throw null; } + public int DefaultBatchFetchSize { get => throw null; set => throw null; } + public string DefaultCatalogName { get => throw null; set => throw null; } + public NHibernate.FlushMode DefaultFlushMode { get => throw null; set => throw null; } + public string DefaultSchemaName { get => throw null; set => throw null; } + public NHibernate.Dialect.Dialect Dialect { get => throw null; set => throw null; } + public bool IsAutoCloseSessionEnabled { get => throw null; set => throw null; } + public bool IsAutoCreateSchema { get => throw null; set => throw null; } + public bool IsAutoDropSchema { get => throw null; set => throw null; } + public bool IsAutoQuoteEnabled { get => throw null; set => throw null; } + public bool IsAutoUpdateSchema { get => throw null; set => throw null; } + public bool IsAutoValidateSchema { get => throw null; set => throw null; } + public bool IsBatchVersionedDataEnabled { get => throw null; set => throw null; } + public bool IsCommentsEnabled { get => throw null; set => throw null; } + public bool IsDataDefinitionImplicitCommit { get => throw null; set => throw null; } + public bool IsDataDefinitionInTransactionSupported { get => throw null; set => throw null; } + public bool IsFlushBeforeCompletionEnabled { get => throw null; set => throw null; } + public bool IsGetGeneratedKeysEnabled { get => throw null; set => throw null; } + public bool IsIdentifierRollbackEnabled { get => throw null; set => throw null; } + public bool IsKeywordsImportEnabled { get => throw null; set => throw null; } + public bool IsMinimalPutsEnabled { get => throw null; set => throw null; } + public bool IsNamedQueryStartupCheckingEnabled { get => throw null; set => throw null; } + public bool IsOrderInsertsEnabled { get => throw null; set => throw null; } + public bool IsOrderUpdatesEnabled { get => throw null; set => throw null; } + public bool IsOuterJoinFetchEnabled { get => throw null; set => throw null; } + public bool IsQueryCacheEnabled { get => throw null; set => throw null; } + public bool IsScrollableResultSetsEnabled { get => throw null; set => throw null; } + public bool IsSecondLevelCacheEnabled { get => throw null; set => throw null; } + public bool IsStatisticsEnabled { get => throw null; set => throw null; } + public bool IsStructuredCacheEntriesEnabled { get => throw null; set => throw null; } + public bool IsWrapResultSetsEnabled { get => throw null; set => throw null; } + public System.Data.IsolationLevel IsolationLevel { get => throw null; set => throw null; } + public System.Type LinqQueryProviderType { get => throw null; set => throw null; } + public bool LinqToHqlFallbackOnPreEvaluation { get => throw null; set => throw null; } + public NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry LinqToHqlGeneratorsRegistry { get => throw null; set => throw null; } + public bool LinqToHqlLegacyPreEvaluation { get => throw null; set => throw null; } + public int MaximumFetchDepth { get => throw null; set => throw null; } + public NHibernate.MultiTenancy.IMultiTenancyConnectionProvider MultiTenancyConnectionProvider { get => throw null; set => throw null; } + public NHibernate.MultiTenancy.MultiTenancyStrategy MultiTenancyStrategy { get => throw null; set => throw null; } + public NHibernate.Linq.Visitors.IExpressionTransformerRegistrar PreTransformerRegistrar { get => throw null; set => throw null; } + public NHibernate.Cache.IQueryCacheFactory QueryCacheFactory { get => throw null; set => throw null; } + public NHibernate.Linq.Visitors.IQueryModelRewriterFactory QueryModelRewriterFactory { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary QuerySubstitutions { get => throw null; set => throw null; } + public NHibernate.Hql.IQueryTranslatorFactory QueryTranslatorFactory { get => throw null; set => throw null; } + public string SessionFactoryName { get => throw null; set => throw null; } + public Settings() => throw null; + public NHibernate.Exceptions.ISQLExceptionConverter SqlExceptionConverter { get => throw null; set => throw null; } + public NHibernate.AdoNet.Util.SqlStatementLogger SqlStatementLogger { get => throw null; set => throw null; } + public bool ThrowOnSchemaUpdate { get => throw null; set => throw null; } + public bool TrackSessionId { get => throw null; set => throw null; } + public NHibernate.Transaction.ITransactionFactory TransactionFactory { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cfg.SettingsFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SettingsFactory + { + public NHibernate.Cfg.Settings BuildSettings(System.Collections.Generic.IDictionary properties) => throw null; + public SettingsFactory() => throw null; + } + + // Generated from `NHibernate.Cfg.SystemConfigurationProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SystemConfigurationProvider : NHibernate.Cfg.ConfigurationProvider + { + public override NHibernate.Cfg.IHibernateConfiguration GetConfiguration() => throw null; + public override string GetLoggerFactoryClassName() => throw null; + public override string GetNamedConnectionString(string name) => throw null; + public SystemConfigurationProvider(System.Configuration.Configuration configuration) => throw null; + } + + namespace ConfigurationSchema + { + // Generated from `NHibernate.Cfg.ConfigurationSchema.BytecodeProviderType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum BytecodeProviderType + { + Lcg, + Null, + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.CfgXmlHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CfgXmlHelper + { + public static System.Xml.XPath.XPathExpression ByteCodeProviderExpression; + public const string CfgNamespacePrefix = default; + public const string CfgSchemaXMLNS = default; + public const string CfgSectionName = default; + public static NHibernate.Cfg.ConfigurationSchema.ClassCacheInclude ClassCacheIncludeConvertFrom(string include) => throw null; + public static NHibernate.Event.ListenerType ListenerTypeConvertFrom(string listenerType) => throw null; + public static System.Xml.XPath.XPathExpression ObjectsFactoryExpression; + public static System.Xml.XPath.XPathExpression ReflectionOptimizerExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryClassesCacheExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryCollectionsCacheExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryEventsExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryListenersExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryMappingsExpression; + public static System.Xml.XPath.XPathExpression SessionFactoryPropertiesExpression; + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.ClassCacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassCacheConfiguration + { + public string Class { get => throw null; } + public ClassCacheConfiguration(string clazz, NHibernate.Cfg.EntityCacheUsage usage, string region) => throw null; + public ClassCacheConfiguration(string clazz, NHibernate.Cfg.EntityCacheUsage usage, NHibernate.Cfg.ConfigurationSchema.ClassCacheInclude include, string region) => throw null; + public ClassCacheConfiguration(string clazz, NHibernate.Cfg.EntityCacheUsage usage, NHibernate.Cfg.ConfigurationSchema.ClassCacheInclude include) => throw null; + public ClassCacheConfiguration(string clazz, NHibernate.Cfg.EntityCacheUsage usage) => throw null; + public NHibernate.Cfg.ConfigurationSchema.ClassCacheInclude Include { get => throw null; } + public string Region { get => throw null; } + public NHibernate.Cfg.EntityCacheUsage Usage { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.ClassCacheInclude` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum ClassCacheInclude + { + All, + NonLazy, + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.CollectionCacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionCacheConfiguration + { + public string Collection { get => throw null; } + public CollectionCacheConfiguration(string collection, NHibernate.Cfg.EntityCacheUsage usage, string region) => throw null; + public CollectionCacheConfiguration(string collection, NHibernate.Cfg.EntityCacheUsage usage) => throw null; + public string Region { get => throw null; } + public NHibernate.Cfg.EntityCacheUsage Usage { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.EventConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EventConfiguration + { + public EventConfiguration(NHibernate.Cfg.ConfigurationSchema.ListenerConfiguration listener, NHibernate.Event.ListenerType type) => throw null; + public System.Collections.Generic.IList Listeners { get => throw null; } + public NHibernate.Event.ListenerType Type { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HibernateConfiguration : NHibernate.Cfg.IHibernateConfiguration + { + public string ByteCodeProviderType { get => throw null; } + public static NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration FromAppConfig(string xml) => throw null; + public static NHibernate.Cfg.ConfigurationSchema.HibernateConfiguration FromAppConfig(System.Xml.XmlNode node) => throw null; + public HibernateConfiguration(System.Xml.XmlReader hbConfigurationReader) => throw null; + public string ObjectsFactoryType { get => throw null; set => throw null; } + public NHibernate.Cfg.ISessionFactoryConfiguration SessionFactory { get => throw null; } + public bool UseReflectionOptimizer { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.ListenerConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ListenerConfiguration + { + public string Class { get => throw null; } + public ListenerConfiguration(string clazz, NHibernate.Event.ListenerType type) => throw null; + public ListenerConfiguration(string clazz) => throw null; + public NHibernate.Event.ListenerType Type { get => throw null; } + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.MappingConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingConfiguration : System.IEquatable + { + public string Assembly { get => throw null; } + public bool Equals(NHibernate.Cfg.ConfigurationSchema.MappingConfiguration other) => throw null; + public string File { get => throw null; } + public bool IsEmpty() => throw null; + public MappingConfiguration(string file) => throw null; + public MappingConfiguration(string assembly, string resource) => throw null; + public string Resource { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Cfg.ConfigurationSchema.SessionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionFactoryConfiguration : NHibernate.Cfg.SessionFactoryConfigurationBase + { + public SessionFactoryConfiguration(string name) => throw null; + } + + } + namespace Loquacious + { + // Generated from `NHibernate.Cfg.Loquacious.BatcherConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BatcherConfiguration : NHibernate.Cfg.Loquacious.IBatcherConfiguration + { + public BatcherConfiguration(NHibernate.Cfg.Loquacious.DbIntegrationConfiguration dbc) => throw null; + public NHibernate.Cfg.Loquacious.BatcherConfiguration DisablingInsertsOrdering() => throw null; + NHibernate.Cfg.Loquacious.IBatcherConfiguration NHibernate.Cfg.Loquacious.IBatcherConfiguration.DisablingInsertsOrdering() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Each(System.Int16 batchSize) => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IBatcherConfiguration.Each(System.Int16 batchSize) => throw null; + public NHibernate.Cfg.Loquacious.BatcherConfiguration OrderingInserts() => throw null; + NHibernate.Cfg.Loquacious.IBatcherConfiguration NHibernate.Cfg.Loquacious.IBatcherConfiguration.OrderingInserts() => throw null; + public NHibernate.Cfg.Loquacious.BatcherConfiguration Through() where TBatcher : NHibernate.AdoNet.IBatcherFactory => throw null; + NHibernate.Cfg.Loquacious.IBatcherConfiguration NHibernate.Cfg.Loquacious.IBatcherConfiguration.Through() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.CacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheConfiguration : NHibernate.Cfg.Loquacious.ICacheConfiguration + { + public CacheConfiguration(NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration parent) => throw null; + public NHibernate.Cfg.Loquacious.CacheConfiguration PrefixingRegionsWith(string regionPrefix) => throw null; + NHibernate.Cfg.Loquacious.ICacheConfiguration NHibernate.Cfg.Loquacious.ICacheConfiguration.PrefixingRegionsWith(string regionPrefix) => throw null; + public NHibernate.Cfg.Loquacious.QueryCacheConfiguration Queries { get => throw null; } + NHibernate.Cfg.Loquacious.IQueryCacheConfiguration NHibernate.Cfg.Loquacious.ICacheConfiguration.Queries { get => throw null; } + public NHibernate.Cfg.Loquacious.CacheConfiguration Through() where TProvider : NHibernate.Cache.ICacheProvider => throw null; + NHibernate.Cfg.Loquacious.ICacheConfiguration NHibernate.Cfg.Loquacious.ICacheConfiguration.Through() => throw null; + public NHibernate.Cfg.Loquacious.CacheConfiguration UsingMinimalPuts() => throw null; + NHibernate.Cfg.Loquacious.ICacheConfiguration NHibernate.Cfg.Loquacious.ICacheConfiguration.UsingMinimalPuts() => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration WithDefaultExpiration(int seconds) => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.ICacheConfiguration.WithDefaultExpiration(int seconds) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.CacheConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheConfigurationProperties : NHibernate.Cfg.Loquacious.ICacheConfigurationProperties + { + public CacheConfigurationProperties(NHibernate.Cfg.Configuration cfg) => throw null; + public int DefaultExpiration { set => throw null; } + public void Provider() where TProvider : NHibernate.Cache.ICacheProvider => throw null; + public void QueryCache() where TFactory : NHibernate.Cache.IQueryCache => throw null; + public void QueryCacheFactory() where TFactory : NHibernate.Cache.IQueryCacheFactory => throw null; + public string RegionsPrefix { set => throw null; } + public bool UseMinimalPuts { set => throw null; } + public bool UseQueryCache { set => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.CacheConfigurationPropertiesExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CacheConfigurationPropertiesExtensions + { + public static void QueryCacheFactory(this NHibernate.Cfg.Loquacious.ICacheConfigurationProperties config) where TFactory : NHibernate.Cache.IQueryCacheFactory => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.CollectionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionFactoryConfiguration : NHibernate.Cfg.Loquacious.ICollectionFactoryConfiguration + { + public CollectionFactoryConfiguration(NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration parent) => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration Through() where TCollectionsFactory : NHibernate.Bytecode.ICollectionTypeFactory => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.ICollectionFactoryConfiguration.Through() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.CommandsConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CommandsConfiguration : NHibernate.Cfg.Loquacious.ICommandsConfiguration + { + public NHibernate.Cfg.Loquacious.CommandsConfiguration AutoCommentingSql() => throw null; + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.AutoCommentingSql() => throw null; + public CommandsConfiguration(NHibernate.Cfg.Loquacious.DbIntegrationConfiguration dbc) => throw null; + public NHibernate.Cfg.Loquacious.CommandsConfiguration ConvertingExceptionsThrough() where TExceptionConverter : NHibernate.Exceptions.ISQLExceptionConverter => throw null; + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.ConvertingExceptionsThrough() => throw null; + public NHibernate.Cfg.Loquacious.CommandsConfiguration Preparing() => throw null; + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.Preparing() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration WithDefaultHqlToSqlSubstitutions() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.WithDefaultHqlToSqlSubstitutions() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration WithHqlToSqlSubstitutions(string csvQuerySubstitutions) => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.WithHqlToSqlSubstitutions(string csvQuerySubstitutions) => throw null; + public NHibernate.Cfg.Loquacious.CommandsConfiguration WithMaximumDepthOfOuterJoinFetching(System.Byte maxFetchDepth) => throw null; + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.WithMaximumDepthOfOuterJoinFetching(System.Byte maxFetchDepth) => throw null; + public NHibernate.Cfg.Loquacious.CommandsConfiguration WithTimeout(System.Byte seconds) => throw null; + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.ICommandsConfiguration.WithTimeout(System.Byte seconds) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.ConnectionConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConnectionConfiguration : NHibernate.Cfg.Loquacious.IConnectionConfiguration + { + public NHibernate.Cfg.Loquacious.ConnectionConfiguration By() where TDriver : NHibernate.Driver.IDriver => throw null; + NHibernate.Cfg.Loquacious.IConnectionConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.By() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration ByAppConfing(string connectionStringName) => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.ByAppConfing(string connectionStringName) => throw null; + public ConnectionConfiguration(NHibernate.Cfg.Loquacious.DbIntegrationConfiguration dbc) => throw null; + public NHibernate.Cfg.Loquacious.ConnectionConfiguration Releasing(NHibernate.ConnectionReleaseMode releaseMode) => throw null; + NHibernate.Cfg.Loquacious.IConnectionConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.Releasing(NHibernate.ConnectionReleaseMode releaseMode) => throw null; + public NHibernate.Cfg.Loquacious.ConnectionConfiguration Through() where TProvider : NHibernate.Connection.IConnectionProvider => throw null; + NHibernate.Cfg.Loquacious.IConnectionConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.Through() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Using(string connectionString) => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Using(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder) => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.Using(string connectionString) => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.Using(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder) => throw null; + public NHibernate.Cfg.Loquacious.ConnectionConfiguration With(System.Data.IsolationLevel level) => throw null; + NHibernate.Cfg.Loquacious.IConnectionConfiguration NHibernate.Cfg.Loquacious.IConnectionConfiguration.With(System.Data.IsolationLevel level) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.DbIntegrationConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DbIntegrationConfiguration : NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration + { + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration AutoQuoteKeywords() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.AutoQuoteKeywords() => throw null; + public NHibernate.Cfg.Loquacious.BatcherConfiguration BatchingQueries { get => throw null; } + NHibernate.Cfg.Loquacious.IBatcherConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.BatchingQueries { get => throw null; } + public NHibernate.Cfg.Configuration Configuration { get => throw null; } + public NHibernate.Cfg.Loquacious.ConnectionConfiguration Connected { get => throw null; } + NHibernate.Cfg.Loquacious.IConnectionConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.Connected { get => throw null; } + public NHibernate.Cfg.Loquacious.CommandsConfiguration CreateCommands { get => throw null; } + NHibernate.Cfg.Loquacious.ICommandsConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.CreateCommands { get => throw null; } + public DbIntegrationConfiguration(NHibernate.Cfg.Configuration configuration) => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration DisableKeywordsAutoImport() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.DisableKeywordsAutoImport() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration EnableLogFormattedSql() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.EnableLogFormattedSql() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration LogSqlInConsole() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.LogSqlInConsole() => throw null; + public NHibernate.Cfg.Loquacious.DbSchemaIntegrationConfiguration Schema { get => throw null; } + NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.Schema { get => throw null; } + public NHibernate.Cfg.Loquacious.TransactionConfiguration Transactions { get => throw null; } + NHibernate.Cfg.Loquacious.ITransactionConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.Transactions { get => throw null; } + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Using() where TDialect : NHibernate.Dialect.Dialect => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration.Using() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.DbIntegrationConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DbIntegrationConfigurationProperties : NHibernate.Cfg.Loquacious.IDbIntegrationConfigurationProperties + { + public bool AutoCommentSql { set => throw null; } + public System.Int16 BatchSize { set => throw null; } + public void Batcher() where TBatcher : NHibernate.AdoNet.IBatcherFactory => throw null; + public void ConnectionProvider() where TProvider : NHibernate.Connection.IConnectionProvider => throw null; + public NHibernate.ConnectionReleaseMode ConnectionReleaseMode { set => throw null; } + public string ConnectionString { set => throw null; } + public string ConnectionStringName { set => throw null; } + public DbIntegrationConfigurationProperties(NHibernate.Cfg.Configuration configuration) => throw null; + public void Dialect() where TDialect : NHibernate.Dialect.Dialect => throw null; + public void Driver() where TDriver : NHibernate.Driver.IDriver => throw null; + public void ExceptionConverter() where TExceptionConverter : NHibernate.Exceptions.ISQLExceptionConverter => throw null; + public string HqlToSqlSubstitutions { set => throw null; } + public System.Data.IsolationLevel IsolationLevel { set => throw null; } + public NHibernate.Cfg.Hbm2DDLKeyWords KeywordsAutoImport { set => throw null; } + public bool LogFormattedSql { set => throw null; } + public bool LogSqlInConsole { set => throw null; } + public System.Byte MaximumDepthOfOuterJoinFetching { set => throw null; } + public NHibernate.MultiTenancy.MultiTenancyStrategy MultiTenancy { set => throw null; } + public void MultiTenancyConnectionProvider() where TProvider : NHibernate.MultiTenancy.IMultiTenancyConnectionProvider => throw null; + public bool OrderInserts { set => throw null; } + public void PreTransformerRegistrar() where TRegistrar : NHibernate.Linq.Visitors.IExpressionTransformerRegistrar => throw null; + public bool PrepareCommands { set => throw null; } + public void QueryModelRewriterFactory() where TFactory : NHibernate.Linq.Visitors.IQueryModelRewriterFactory => throw null; + public NHibernate.Cfg.SchemaAutoAction SchemaAction { set => throw null; } + public bool ThrowOnSchemaUpdate { set => throw null; } + public System.Byte Timeout { set => throw null; } + public void TransactionFactory() where TFactory : NHibernate.Transaction.ITransactionFactory => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.DbSchemaIntegrationConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DbSchemaIntegrationConfiguration : NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration + { + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Creating() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration.Creating() => throw null; + public DbSchemaIntegrationConfiguration(NHibernate.Cfg.Loquacious.DbIntegrationConfiguration dbc) => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Recreating() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration.Recreating() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration ThrowOnSchemaUpdate(bool @throw) => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Updating() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration.Updating() => throw null; + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Validating() => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration.Validating() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.EntityCacheConfigurationProperties<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityCacheConfigurationProperties : NHibernate.Cfg.Loquacious.IEntityCacheConfigurationProperties where TEntity : class + { + void NHibernate.Cfg.Loquacious.IEntityCacheConfigurationProperties.Collection(System.Linq.Expressions.Expression> collectionProperty, System.Action collectionCacheConfiguration) => throw null; + public void Collection(System.Linq.Expressions.Expression> collectionProperty, System.Action collectionCacheConfiguration) where TCollection : System.Collections.IEnumerable => throw null; + public EntityCacheConfigurationProperties() => throw null; + public string RegionName { get => throw null; set => throw null; } + public NHibernate.Cfg.EntityCacheUsage? Strategy { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.EntityCollectionCacheConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityCollectionCacheConfigurationProperties : NHibernate.Cfg.Loquacious.IEntityCollectionCacheConfigurationProperties + { + public EntityCollectionCacheConfigurationProperties() => throw null; + public string RegionName { get => throw null; set => throw null; } + public NHibernate.Cfg.EntityCacheUsage Strategy { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FluentSessionFactoryConfiguration : NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration + { + public NHibernate.Cfg.Loquacious.CacheConfiguration Caching { get => throw null; } + NHibernate.Cfg.Loquacious.ICacheConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.Caching { get => throw null; } + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration DefaultFlushMode(NHibernate.FlushMode flushMode) => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.DefaultFlushMode(NHibernate.FlushMode flushMode) => throw null; + public FluentSessionFactoryConfiguration(NHibernate.Cfg.Configuration configuration) => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration GenerateStatistics() => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.GenerateStatistics() => throw null; + public NHibernate.Cfg.Loquacious.CollectionFactoryConfiguration GeneratingCollections { get => throw null; } + NHibernate.Cfg.Loquacious.ICollectionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.GeneratingCollections { get => throw null; } + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Integrate { get => throw null; } + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.Integrate { get => throw null; } + public NHibernate.Cfg.Loquacious.MappingsConfiguration Mapping { get => throw null; } + NHibernate.Cfg.Loquacious.IMappingsConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.Mapping { get => throw null; } + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration Named(string sessionFactoryName) => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.Named(string sessionFactoryName) => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration ParsingHqlThrough() where TQueryTranslator : NHibernate.Hql.IQueryTranslatorFactory => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.ParsingHqlThrough() => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration ParsingLinqThrough() where TQueryProvider : NHibernate.Linq.INhQueryProvider => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.ParsingLinqThrough() => throw null; + public NHibernate.Cfg.Loquacious.ProxyConfiguration Proxy { get => throw null; } + NHibernate.Cfg.Loquacious.IProxyConfiguration NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration.Proxy { get => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IBatcherConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBatcherConfiguration + { + NHibernate.Cfg.Loquacious.IBatcherConfiguration DisablingInsertsOrdering(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Each(System.Int16 batchSize); + NHibernate.Cfg.Loquacious.IBatcherConfiguration OrderingInserts(); + NHibernate.Cfg.Loquacious.IBatcherConfiguration Through() where TBatcher : NHibernate.AdoNet.IBatcherFactory; + } + + // Generated from `NHibernate.Cfg.Loquacious.ICacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheConfiguration + { + NHibernate.Cfg.Loquacious.ICacheConfiguration PrefixingRegionsWith(string regionPrefix); + NHibernate.Cfg.Loquacious.IQueryCacheConfiguration Queries { get; } + NHibernate.Cfg.Loquacious.ICacheConfiguration Through() where TProvider : NHibernate.Cache.ICacheProvider; + NHibernate.Cfg.Loquacious.ICacheConfiguration UsingMinimalPuts(); + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration WithDefaultExpiration(int seconds); + } + + // Generated from `NHibernate.Cfg.Loquacious.ICacheConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheConfigurationProperties + { + int DefaultExpiration { set; } + void Provider() where TProvider : NHibernate.Cache.ICacheProvider; + void QueryCache() where TFactory : NHibernate.Cache.IQueryCache; + string RegionsPrefix { set; } + bool UseMinimalPuts { set; } + bool UseQueryCache { set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.ICollectionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionFactoryConfiguration + { + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration Through() where TCollecionsFactory : NHibernate.Bytecode.ICollectionTypeFactory; + } + + // Generated from `NHibernate.Cfg.Loquacious.ICommandsConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICommandsConfiguration + { + NHibernate.Cfg.Loquacious.ICommandsConfiguration AutoCommentingSql(); + NHibernate.Cfg.Loquacious.ICommandsConfiguration ConvertingExceptionsThrough() where TExceptionConverter : NHibernate.Exceptions.ISQLExceptionConverter; + NHibernate.Cfg.Loquacious.ICommandsConfiguration Preparing(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration WithDefaultHqlToSqlSubstitutions(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration WithHqlToSqlSubstitutions(string csvQuerySubstitutions); + NHibernate.Cfg.Loquacious.ICommandsConfiguration WithMaximumDepthOfOuterJoinFetching(System.Byte maxFetchDepth); + NHibernate.Cfg.Loquacious.ICommandsConfiguration WithTimeout(System.Byte seconds); + } + + // Generated from `NHibernate.Cfg.Loquacious.IConnectionConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConnectionConfiguration + { + NHibernate.Cfg.Loquacious.IConnectionConfiguration By() where TDriver : NHibernate.Driver.IDriver; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration ByAppConfing(string connectionStringName); + NHibernate.Cfg.Loquacious.IConnectionConfiguration Releasing(NHibernate.ConnectionReleaseMode releaseMode); + NHibernate.Cfg.Loquacious.IConnectionConfiguration Through() where TProvider : NHibernate.Connection.IConnectionProvider; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Using(string connectionString); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Using(System.Data.Common.DbConnectionStringBuilder connectionStringBuilder); + NHibernate.Cfg.Loquacious.IConnectionConfiguration With(System.Data.IsolationLevel level); + } + + // Generated from `NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDbIntegrationConfiguration + { + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration AutoQuoteKeywords(); + NHibernate.Cfg.Loquacious.IBatcherConfiguration BatchingQueries { get; } + NHibernate.Cfg.Loquacious.IConnectionConfiguration Connected { get; } + NHibernate.Cfg.Loquacious.ICommandsConfiguration CreateCommands { get; } + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration DisableKeywordsAutoImport(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration EnableLogFormattedSql(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration LogSqlInConsole(); + NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration Schema { get; } + NHibernate.Cfg.Loquacious.ITransactionConfiguration Transactions { get; } + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Using() where TDialect : NHibernate.Dialect.Dialect; + } + + // Generated from `NHibernate.Cfg.Loquacious.IDbIntegrationConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDbIntegrationConfigurationProperties + { + bool AutoCommentSql { set; } + System.Int16 BatchSize { set; } + void Batcher() where TBatcher : NHibernate.AdoNet.IBatcherFactory; + void ConnectionProvider() where TProvider : NHibernate.Connection.IConnectionProvider; + NHibernate.ConnectionReleaseMode ConnectionReleaseMode { set; } + string ConnectionString { set; } + string ConnectionStringName { set; } + void Dialect() where TDialect : NHibernate.Dialect.Dialect; + void Driver() where TDriver : NHibernate.Driver.IDriver; + void ExceptionConverter() where TExceptionConverter : NHibernate.Exceptions.ISQLExceptionConverter; + string HqlToSqlSubstitutions { set; } + System.Data.IsolationLevel IsolationLevel { set; } + NHibernate.Cfg.Hbm2DDLKeyWords KeywordsAutoImport { set; } + bool LogFormattedSql { set; } + bool LogSqlInConsole { set; } + System.Byte MaximumDepthOfOuterJoinFetching { set; } + bool OrderInserts { set; } + bool PrepareCommands { set; } + void QueryModelRewriterFactory() where TFactory : NHibernate.Linq.Visitors.IQueryModelRewriterFactory; + NHibernate.Cfg.SchemaAutoAction SchemaAction { set; } + System.Byte Timeout { set; } + void TransactionFactory() where TFactory : NHibernate.Transaction.ITransactionFactory; + } + + // Generated from `NHibernate.Cfg.Loquacious.IDbSchemaIntegrationConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDbSchemaIntegrationConfiguration + { + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Creating(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Recreating(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Updating(); + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Validating(); + } + + // Generated from `NHibernate.Cfg.Loquacious.IEntityCacheConfigurationProperties<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityCacheConfigurationProperties where TEntity : class + { + void Collection(System.Linq.Expressions.Expression> collectionProperty, System.Action collectionCacheConfiguration) where TCollection : System.Collections.IEnumerable; + string RegionName { get; set; } + NHibernate.Cfg.EntityCacheUsage? Strategy { get; set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IEntityCollectionCacheConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityCollectionCacheConfigurationProperties + { + string RegionName { get; set; } + NHibernate.Cfg.EntityCacheUsage Strategy { get; set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFluentSessionFactoryConfiguration + { + NHibernate.Cfg.Loquacious.ICacheConfiguration Caching { get; } + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration DefaultFlushMode(NHibernate.FlushMode flushMode); + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration GenerateStatistics(); + NHibernate.Cfg.Loquacious.ICollectionFactoryConfiguration GeneratingCollections { get; } + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Integrate { get; } + NHibernate.Cfg.Loquacious.IMappingsConfiguration Mapping { get; } + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration Named(string sessionFactoryName); + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration ParsingHqlThrough() where TQueryTranslator : NHibernate.Hql.IQueryTranslatorFactory; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration ParsingLinqThrough() where TQueryProvider : NHibernate.Linq.INhQueryProvider; + NHibernate.Cfg.Loquacious.IProxyConfiguration Proxy { get; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IMappingsConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMappingsConfiguration + { + NHibernate.Cfg.Loquacious.IMappingsConfiguration UsingDefaultCatalog(string defaultCatalogName); + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration UsingDefaultSchema(string defaultSchemaName); + } + + // Generated from `NHibernate.Cfg.Loquacious.IMappingsConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMappingsConfigurationProperties + { + string DefaultCatalog { set; } + string DefaultSchema { set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.INamedQueryDefinitionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INamedQueryDefinitionBuilder + { + NHibernate.CacheMode? CacheMode { get; set; } + string CacheRegion { get; set; } + string Comment { get; set; } + int FetchSize { get; set; } + NHibernate.FlushMode FlushMode { get; set; } + bool IsCacheable { get; set; } + bool IsReadOnly { get; set; } + string Query { get; set; } + int Timeout { get; set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IProxyConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyConfiguration + { + NHibernate.Cfg.Loquacious.IProxyConfiguration DisableValidation(); + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration Through() where TProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory; + } + + // Generated from `NHibernate.Cfg.Loquacious.IProxyConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyConfigurationProperties + { + void ProxyFactoryFactory() where TProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory; + bool Validation { set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.IQueryCacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryCacheConfiguration + { + NHibernate.Cfg.Loquacious.ICacheConfiguration Through(); + } + + // Generated from `NHibernate.Cfg.Loquacious.ITransactionConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITransactionConfiguration + { + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration Through() where TFactory : NHibernate.Transaction.ITransactionFactory; + } + + // Generated from `NHibernate.Cfg.Loquacious.ITypeDefConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITypeDefConfigurationProperties + { + string Alias { get; set; } + object Properties { get; set; } + } + + // Generated from `NHibernate.Cfg.Loquacious.MappingsConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingsConfiguration : NHibernate.Cfg.Loquacious.IMappingsConfiguration + { + public MappingsConfiguration(NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration parent) => throw null; + public NHibernate.Cfg.Loquacious.MappingsConfiguration UsingDefaultCatalog(string defaultCatalogName) => throw null; + NHibernate.Cfg.Loquacious.IMappingsConfiguration NHibernate.Cfg.Loquacious.IMappingsConfiguration.UsingDefaultCatalog(string defaultCatalogName) => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration UsingDefaultSchema(string defaultSchemaName) => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IMappingsConfiguration.UsingDefaultSchema(string defaultSchemaName) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.MappingsConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingsConfigurationProperties : NHibernate.Cfg.Loquacious.IMappingsConfigurationProperties + { + public string DefaultCatalog { set => throw null; } + public string DefaultSchema { set => throw null; } + public MappingsConfigurationProperties(NHibernate.Cfg.Configuration configuration) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.NamedQueryDefinitionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedQueryDefinitionBuilder : NHibernate.Cfg.Loquacious.INamedQueryDefinitionBuilder + { + public NHibernate.CacheMode? CacheMode { get => throw null; set => throw null; } + public string CacheRegion { get => throw null; set => throw null; } + public string Comment { get => throw null; set => throw null; } + public int FetchSize { get => throw null; set => throw null; } + public NHibernate.FlushMode FlushMode { get => throw null; set => throw null; } + public bool IsCacheable { get => throw null; set => throw null; } + public bool IsReadOnly { get => throw null; set => throw null; } + public NamedQueryDefinitionBuilder() => throw null; + public string Query { get => throw null; set => throw null; } + public int Timeout { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.ProxyConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyConfiguration : NHibernate.Cfg.Loquacious.IProxyConfiguration + { + public NHibernate.Cfg.Loquacious.ProxyConfiguration DisableValidation() => throw null; + NHibernate.Cfg.Loquacious.IProxyConfiguration NHibernate.Cfg.Loquacious.IProxyConfiguration.DisableValidation() => throw null; + public ProxyConfiguration(NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration parent) => throw null; + public NHibernate.Cfg.Loquacious.FluentSessionFactoryConfiguration Through() where TProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory => throw null; + NHibernate.Cfg.Loquacious.IFluentSessionFactoryConfiguration NHibernate.Cfg.Loquacious.IProxyConfiguration.Through() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.ProxyConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyConfigurationProperties : NHibernate.Cfg.Loquacious.IProxyConfigurationProperties + { + public ProxyConfigurationProperties(NHibernate.Cfg.Configuration configuration) => throw null; + public void ProxyFactoryFactory() where TProxyFactoryFactory : NHibernate.Bytecode.IProxyFactoryFactory => throw null; + public bool Validation { set => throw null; } + } + + // Generated from `NHibernate.Cfg.Loquacious.QueryCacheConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryCacheConfiguration : NHibernate.Cfg.Loquacious.IQueryCacheConfiguration + { + public QueryCacheConfiguration(NHibernate.Cfg.Loquacious.CacheConfiguration cc) => throw null; + public NHibernate.Cfg.Loquacious.CacheConfiguration Through() => throw null; + NHibernate.Cfg.Loquacious.ICacheConfiguration NHibernate.Cfg.Loquacious.IQueryCacheConfiguration.Through() => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.TransactionConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TransactionConfiguration : NHibernate.Cfg.Loquacious.ITransactionConfiguration + { + public NHibernate.Cfg.Loquacious.DbIntegrationConfiguration Through() where TFactory : NHibernate.Transaction.ITransactionFactory => throw null; + NHibernate.Cfg.Loquacious.IDbIntegrationConfiguration NHibernate.Cfg.Loquacious.ITransactionConfiguration.Through() => throw null; + public TransactionConfiguration(NHibernate.Cfg.Loquacious.DbIntegrationConfiguration dbc) => throw null; + } + + // Generated from `NHibernate.Cfg.Loquacious.TypeDefConfigurationProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeDefConfigurationProperties : NHibernate.Cfg.Loquacious.ITypeDefConfigurationProperties + { + public string Alias { get => throw null; set => throw null; } + public object Properties { get => throw null; set => throw null; } + public TypeDefConfigurationProperties() => throw null; + } + + } + namespace MappingSchema + { + // Generated from `NHibernate.Cfg.MappingSchema.AbstractDecoratable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractDecoratable : NHibernate.Cfg.MappingSchema.IDecoratable + { + protected AbstractDecoratable() => throw null; + protected void CreateMappedMetadata(NHibernate.Cfg.MappingSchema.HbmMeta[] metadatas) => throw null; + public System.Collections.Generic.IDictionary InheritableMetaData { get => throw null; } + public virtual System.Collections.Generic.IDictionary MappedMetaData { get => throw null; } + protected abstract NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.EndsWithHbmXmlFilter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EndsWithHbmXmlFilter : NHibernate.Cfg.MappingSchema.IAssemblyResourceFilter + { + public EndsWithHbmXmlFilter() => throw null; + public bool ShouldParse(string resourceName) => throw null; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmAny` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmAny : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping, NHibernate.Cfg.MappingSchema.IAnyMapping + { + public string Access { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmAny() => throw null; + public bool IsLazyProperty { get => throw null; } + public string MetaType { get => throw null; } + public System.Collections.Generic.ICollection MetaValues { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string access; + public string cascade; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string idtype; + public string index; + public bool insert; + public bool lazy; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string metatype; + public NHibernate.Cfg.MappingSchema.HbmMetaValue[] metavalue; + public string name; + public string node; + public bool optimisticlock; + public bool update; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmArray` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmArray : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IIndexedCollectionMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmArray() => throw null; + public NHibernate.Cfg.MappingSchema.HbmIndex Index { get => throw null; } + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public object Item1; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmListIndex ListIndex { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public string elementclass; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmBag` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmBag : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmBag() => throw null; + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool generic; + public bool genericSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HbmBase + { + protected static T Find(object[] array) => throw null; + protected static T[] FindAll(object[] array) => throw null; + protected HbmBase() => throw null; + protected static string JoinString(string[] text) => throw null; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCache + { + public HbmCache() => throw null; + public NHibernate.Cfg.MappingSchema.HbmCacheInclude include; + public string region; + public NHibernate.Cfg.MappingSchema.HbmCacheUsage usage; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCacheInclude` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCacheInclude + { + All, + NonLazy, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCacheMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCacheMode + { + Get, + Ignore, + Normal, + Put, + Refresh, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCacheUsage` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCacheUsage + { + NonstrictReadWrite, + ReadOnly, + ReadWrite, + Transactional, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmClass : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping, NHibernate.Cfg.MappingSchema.IEntityMapping, NHibernate.Cfg.MappingSchema.IEntityDiscriminableMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCompositeId CompositeId { get => throw null; } + public string DiscriminatorValue { get => throw null; } + public bool DynamicInsert { get => throw null; } + public bool DynamicUpdate { get => throw null; } + public string EntityName { get => throw null; } + public HbmClass() => throw null; + public NHibernate.Cfg.MappingSchema.HbmId Id { get => throw null; } + public bool? IsAbstract { get => throw null; } + public object Item; + public object Item1; + public object[] Items; + public object[] Items1; + public object[] Items2; + public System.Collections.Generic.IEnumerable JoinedSubclasses { get => throw null; } + public System.Collections.Generic.IEnumerable Joins { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public string Node { get => throw null; } + public string Persister { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string Proxy { get => throw null; } + public bool SelectBeforeUpdate { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public System.Collections.Generic.IEnumerable Subclasses { get => throw null; } + public string Subselect { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] Synchronize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTimestamp Timestamp { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] Tuplizers { get => throw null; } + public System.Collections.Generic.IEnumerable UnionSubclasses { get => throw null; } + public bool? UseLazy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmVersion Version { get => throw null; } + public bool @abstract; + public bool abstractSpecified; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string catalog; + public string check; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmDiscriminator discriminator; + public string discriminatorvalue; + public bool dynamicinsert; + public bool dynamicupdate; + public string entityname; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public NHibernate.Cfg.MappingSchema.HbmNaturalId naturalid; + public string node; + public NHibernate.Cfg.MappingSchema.HbmOptimisticLockMode optimisticlock; + public string persister; + public NHibernate.Cfg.MappingSchema.HbmPolymorphismType polymorphism; + public string proxy; + public NHibernate.Cfg.MappingSchema.HbmResultSet[] resultset; + public string rowid; + public string schema; + public string schemaaction; + public bool selectbeforeupdate; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] tuplizer; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCollectionFetchMode + { + Join, + Select, + Subselect, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCollectionId` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCollectionId : NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmCollectionId() => throw null; + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public NHibernate.Cfg.MappingSchema.HbmGenerator generator; + public string length; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCollectionLazy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCollectionLazy + { + Extra, + False, + True, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmColumn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmColumn + { + public HbmColumn() => throw null; + public string check; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public string @default; + public string index; + public string length; + public string name; + public bool notnull; + public bool notnullSpecified; + public string precision; + public string scale; + public string sqltype; + public bool unique; + public bool uniqueSpecified; + public string uniquekey; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmComment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmComment + { + public HbmComment() => throw null; + public string[] Text; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmComponent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmComponent : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmComponent() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string access; + public string @class; + public bool insert; + public bool lazy; + public string lazygroup; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public bool optimisticlock; + public NHibernate.Cfg.MappingSchema.HbmParent parent; + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] tuplizer; + public bool unique; + public bool update; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCompositeElement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCompositeElement : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmCompositeElement() => throw null; + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string @class; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string node; + public NHibernate.Cfg.MappingSchema.HbmParent parent; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCompositeId` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCompositeId + { + public HbmCompositeId() => throw null; + public object[] Items; + public string access; + public string @class; + public bool mapped; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmUnsavedValueType unsavedvalue; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCompositeIndex` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCompositeIndex : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmCompositeIndex() => throw null; + public object[] Items; + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string @class; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCompositeMapKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCompositeMapKey : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmCompositeMapKey() => throw null; + public object[] Items; + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string @class; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCreate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCreate + { + public HbmCreate() => throw null; + public string[] Text; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCustomSQL` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmCustomSQL + { + public HbmCustomSQL() => throw null; + public string[] Text; + public bool callable; + public bool callableSpecified; + public NHibernate.Cfg.MappingSchema.HbmCustomSQLCheck check; + public bool checkSpecified; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmCustomSQLCheck` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmCustomSQLCheck + { + None, + Param, + Rowcount, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDatabaseObject` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDatabaseObject : NHibernate.Cfg.MappingSchema.HbmBase + { + public string FindCreateText() => throw null; + public NHibernate.Cfg.MappingSchema.HbmDefinition FindDefinition() => throw null; + public System.Collections.Generic.IList FindDialectScopeNames() => throw null; + public string FindDropText() => throw null; + public bool HasDefinition() => throw null; + public HbmDatabaseObject() => throw null; + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmDialectScope[] dialectscope; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDefinition : NHibernate.Cfg.MappingSchema.HbmBase + { + public System.Collections.Generic.IDictionary FindParameterValues() => throw null; + public HbmDefinition() => throw null; + public string @class; + public NHibernate.Cfg.MappingSchema.HbmParam[] param; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDialectScope` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDialectScope + { + public HbmDialectScope() => throw null; + public string[] Text; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDiscriminator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDiscriminator : NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmDiscriminator() => throw null; + public object Item; + public string column; + public bool force; + public string formula; + public bool insert; + public string length; + public bool notnull; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDrop` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDrop + { + public HbmDrop() => throw null; + public string[] Text; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmDynamicComponent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmDynamicComponent : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmDynamicComponent() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string access; + public bool insert; + public string name; + public string node; + public bool optimisticlock; + public bool unique; + public bool update; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmElement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmElement : NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmElement() => throw null; + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public string column; + public string formula; + public string length; + public string node; + public bool notnull; + public string precision; + public string scale; + public NHibernate.Cfg.MappingSchema.HbmType type; + public string type1; + public bool unique; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class HbmExtensions + { + public static string JoinString(this string[] source) => throw null; + public static string ToCacheConcurrencyStrategy(this NHibernate.Cfg.MappingSchema.HbmCacheUsage cacheUsage) => throw null; + public static NHibernate.CacheMode? ToCacheMode(this NHibernate.Cfg.MappingSchema.HbmCacheMode cacheMode) => throw null; + public static string ToNullValue(this NHibernate.Cfg.MappingSchema.HbmUnsavedValueType unsavedValueType) => throw null; + public static NHibernate.Engine.Versioning.OptimisticLock ToOptimisticLock(this NHibernate.Cfg.MappingSchema.HbmOptimisticLockMode hbmOptimisticLockMode) => throw null; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFetchMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmFetchMode + { + Join, + Select, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFilter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmFilter + { + public HbmFilter() => throw null; + public string[] Text; + public string condition; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFilterDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmFilterDef : NHibernate.Cfg.MappingSchema.HbmBase + { + public string GetDefaultCondition() => throw null; + public HbmFilterDef() => throw null; + public NHibernate.Cfg.MappingSchema.HbmFilterParam[] Items; + public NHibernate.Cfg.MappingSchema.HbmFilterParam[] ListParameters() => throw null; + public string[] Text; + public string condition; + public string name; + public bool usemanytoone; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFilterParam` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmFilterParam + { + public HbmFilterParam() => throw null; + public string name; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFlushMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmFlushMode + { + Always, + Auto, + Manual, + Never, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmFormula` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmFormula + { + public HbmFormula() => throw null; + public string[] Text; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmGenerator + { + public HbmGenerator() => throw null; + public string @class; + public NHibernate.Cfg.MappingSchema.HbmParam[] param; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmId` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmId : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmId() => throw null; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public string access; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public NHibernate.Cfg.MappingSchema.HbmGenerator generator; + public string generator1; + public string length; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmType type; + public string type1; + public string unsavedvalue; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmIdbag` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmIdbag : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmIdbag() => throw null; + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public NHibernate.Cfg.MappingSchema.HbmCollectionId collectionid; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool generic; + public bool genericSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmImport` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmImport + { + public HbmImport() => throw null; + public string @class; + public string rename; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmIndex` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmIndex : NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmIndex() => throw null; + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string length; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmIndexManyToAny` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmIndexManyToAny : NHibernate.Cfg.MappingSchema.IColumnsMapping, NHibernate.Cfg.MappingSchema.IAnyMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmIndexManyToAny() => throw null; + public string MetaType { get => throw null; } + public System.Collections.Generic.ICollection MetaValues { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string idtype; + public string metatype; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmIndexManyToMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmIndexManyToMany : NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Class { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public string EntityName { get => throw null; } + public HbmIndexManyToMany() => throw null; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public string @class; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string entityname; + public string foreignkey; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmJoin : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping + { + public HbmJoin() => throw null; + public object[] Items; + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string catalog; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmJoinFetch fetch; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public bool optional; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public string table; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmJoinFetch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmJoinFetch + { + Join, + Select, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmJoinedSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmJoinedSubclass : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping, NHibernate.Cfg.MappingSchema.IEntityMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + public int? BatchSize { get => throw null; } + public bool DynamicInsert { get => throw null; } + public bool DynamicUpdate { get => throw null; } + public string EntityName { get => throw null; } + public HbmJoinedSubclass() => throw null; + public bool? IsAbstract { get => throw null; } + public object[] Items; + public object[] Items1; + public System.Collections.Generic.IEnumerable JoinedSubclasses { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public string Node { get => throw null; } + public string Persister { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string Proxy { get => throw null; } + public bool SelectBeforeUpdate { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] Synchronize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] Tuplizers { get => throw null; } + public bool? UseLazy { get => throw null; } + public bool @abstract; + public bool abstractSpecified; + public string batchsize; + public string catalog; + public string check; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public bool dynamicinsert; + public bool dynamicupdate; + public string entityname; + public string extends; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public NHibernate.Cfg.MappingSchema.HbmJoinedSubclass[] joinedsubclass1; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public bool lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public string persister; + public string proxy; + public NHibernate.Cfg.MappingSchema.HbmResultSet[] resultset; + public string schema; + public string schemaaction; + public bool selectbeforeupdate; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] tuplizer; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmKey : NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmKey() => throw null; + public bool? IsNullable { get => throw null; } + public bool? IsUpdatable { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string foreignkey; + public bool notnull; + public bool notnullSpecified; + public NHibernate.Cfg.MappingSchema.HbmOndelete ondelete; + public string propertyref; + public bool unique; + public bool uniqueSpecified; + public bool update; + public bool updateSpecified; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmKeyManyToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmKeyManyToOne : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public string EntityName { get => throw null; } + public HbmKeyManyToOne() => throw null; + public bool IsLazyProperty { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmRestrictedLaziness? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string access; + public string @class; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string entityname; + public string foreignkey; + public NHibernate.Cfg.MappingSchema.HbmRestrictedLaziness lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode notfound; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmKeyProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmKeyProperty : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Access { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmKeyProperty() => throw null; + public bool IsLazyProperty { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public string access; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string length; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmType type; + public string type1; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmLaziness` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmLaziness + { + False, + NoProxy, + Proxy, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmList` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmList : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IIndexedCollectionMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmList() => throw null; + public NHibernate.Cfg.MappingSchema.HbmIndex Index { get => throw null; } + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public object Item1; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmListIndex ListIndex { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool generic; + public bool genericSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmListIndex` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmListIndex : NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmListIndex() => throw null; + public string @base; + public NHibernate.Cfg.MappingSchema.HbmColumn column; + public string column1; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmLoadCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmLoadCollection + { + public HbmLoadCollection() => throw null; + public string alias; + public NHibernate.Cfg.MappingSchema.HbmLockMode lockmode; + public NHibernate.Cfg.MappingSchema.HbmReturnProperty[] returnproperty; + public string role; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmLoader + { + public HbmLoader() => throw null; + public string queryref; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmLockMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmLockMode + { + None, + Read, + Upgrade, + UpgradeNowait, + Write, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmManyToAny` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmManyToAny : NHibernate.Cfg.MappingSchema.IColumnsMapping, NHibernate.Cfg.MappingSchema.IAnyMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmManyToAny() => throw null; + public string MetaType { get => throw null; } + public System.Collections.Generic.ICollection MetaValues { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public string idtype; + public string metatype; + public NHibernate.Cfg.MappingSchema.HbmMetaValue[] metavalue; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmManyToMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmManyToMany : NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Class { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public string EntityName { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmManyToMany() => throw null; + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public string @class; + public string column; + public string entityname; + public NHibernate.Cfg.MappingSchema.HbmFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public string foreignkey; + public string formula; + public NHibernate.Cfg.MappingSchema.HbmRestrictedLaziness lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string node; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode notfound; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string propertyref; + public bool unique; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmManyToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmManyToOne : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public string EntityName { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmManyToOne() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmLaziness? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string access; + public string cascade; + public string @class; + public string column; + public string entityname; + public NHibernate.Cfg.MappingSchema.HbmFetchMode fetch; + public bool fetchSpecified; + public string foreignkey; + public string formula; + public string index; + public bool insert; + public NHibernate.Cfg.MappingSchema.HbmLaziness lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode notfound; + public bool notnull; + public bool notnullSpecified; + public bool optimisticlock; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string propertyref; + public bool unique; + public string uniquekey; + public bool update; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMap : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmMap() => throw null; + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public object Item1; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool generic; + public bool genericSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public string sort; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMapKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMapKey : NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmMapKey() => throw null; + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public string column; + public string formula; + public string length; + public string node; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMapKeyManyToMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMapKeyManyToMany : NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Class { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public string EntityName { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmMapKeyManyToMany() => throw null; + public object[] Items; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public string @class; + public string column; + public string entityname; + public string foreignkey; + public string formula; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMapping : NHibernate.Cfg.MappingSchema.AbstractDecoratable + { + public NHibernate.Cfg.MappingSchema.HbmDatabaseObject[] DatabaseObjects { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmFilterDef[] FilterDefinitions { get => throw null; } + public HbmMapping() => throw null; + public NHibernate.Cfg.MappingSchema.HbmQuery[] HqlQueries { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmImport[] Imports { get => throw null; } + public object[] Items; + public object[] Items1; + public NHibernate.Cfg.MappingSchema.HbmJoinedSubclass[] JoinedSubclasses { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmResultSet[] ResultSets { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmClass[] RootClasses { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSqlQuery[] SqlQueries { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSubclass[] SubClasses { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTypedef[] TypeDefinitions { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmUnionSubclass[] UnionSubclasses { get => throw null; } + public string assembly; + public bool autoimport; + public string catalog; + public NHibernate.Cfg.MappingSchema.HbmDatabaseObject[] databaseobject; + public string defaultaccess; + public string defaultcascade; + public bool defaultlazy; + public NHibernate.Cfg.MappingSchema.HbmFilterDef[] filterdef; + public NHibernate.Cfg.MappingSchema.HbmImport[] import; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string @namespace; + public NHibernate.Cfg.MappingSchema.HbmResultSet[] resultset; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmTypedef[] typedef; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMeta` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMeta : NHibernate.Cfg.MappingSchema.HbmBase + { + public string GetText() => throw null; + public HbmMeta() => throw null; + public string[] Text; + public string attribute; + public bool inherit; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmMetaValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmMetaValue + { + public HbmMetaValue() => throw null; + public string @class; + public string value; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmNaturalId` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmNaturalId : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping + { + public HbmNaturalId() => throw null; + public object[] Items; + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public bool mutable; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmNestedCompositeElement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmNestedCompositeElement : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmNestedCompositeElement() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string access; + public string @class; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmParent parent; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmNotFoundMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmNotFoundMode + { + Exception, + Ignore, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmOndelete` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmOndelete + { + Cascade, + Noaction, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmOneToMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmOneToMany : NHibernate.Cfg.MappingSchema.IRelationship + { + public string Class { get => throw null; } + public string EntityName { get => throw null; } + public HbmOneToMany() => throw null; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public string @class; + public string entityname; + public string node; + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode notfound; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmOneToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmOneToOne : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IRelationship, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public string EntityName { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmOneToOne() => throw null; + public bool IsLazyProperty { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLaziness? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string access; + public string cascade; + public string @class; + public bool constrained; + public string entityname; + public NHibernate.Cfg.MappingSchema.HbmFetchMode fetch; + public bool fetchSpecified; + public string foreignkey; + public NHibernate.Cfg.MappingSchema.HbmFormula[] formula; + public string formula1; + public NHibernate.Cfg.MappingSchema.HbmLaziness lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string propertyref; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmOptimisticLockMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmOptimisticLockMode + { + All, + Dirty, + None, + Version, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmOuterJoinStrategy + { + Auto, + False, + True, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmParam` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmParam : NHibernate.Cfg.MappingSchema.HbmBase + { + public string GetText() => throw null; + public HbmParam() => throw null; + public string[] Text; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmParent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmParent + { + public HbmParent() => throw null; + public string access; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmPolymorphismType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmPolymorphismType + { + Explicit, + Implicit, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmPrimitiveArray` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmPrimitiveArray : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IIndexedCollectionMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmPrimitiveArray() => throw null; + public NHibernate.Cfg.MappingSchema.HbmIndex Index { get => throw null; } + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmListIndex ListIndex { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public string batchsize; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmElement element; + public NHibernate.Cfg.MappingSchema.HbmPrimitivearrayFetch fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public NHibernate.Cfg.MappingSchema.HbmPrimitivearrayOuterjoin outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmPrimitivearrayFetch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmPrimitivearrayFetch + { + Join, + Select, + Subselect, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmPrimitivearrayOuterjoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmPrimitivearrayOuterjoin + { + Auto, + False, + True, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmProperties` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmProperties : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IComponentMapping + { + public string Access { get => throw null; } + public string Class { get => throw null; } + public string EmbeddedNode { get => throw null; } + public HbmProperties() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmParent Parent { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public bool insert; + public string name; + public string node; + public bool optimisticlock; + public bool unique; + public bool update; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmProperty : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.ITypeMapping, NHibernate.Cfg.MappingSchema.IFormulasMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public string Access { get => throw null; } + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnsAndFormulas { get => throw null; } + public string FetchGroup { get => throw null; } + public System.Collections.Generic.IEnumerable Formulas { get => throw null; } + public HbmProperty() => throw null; + public bool IsLazyProperty { get => throw null; } + public object[] Items; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmType Type { get => throw null; } + public string access; + public string column; + public string formula; + public NHibernate.Cfg.MappingSchema.HbmPropertyGeneration generated; + public string index; + public bool insert; + public bool insertSpecified; + public bool lazy; + public string lazygroup; + public string length; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public bool notnull; + public bool notnullSpecified; + public bool optimisticlock; + public string precision; + public string scale; + public NHibernate.Cfg.MappingSchema.HbmType type; + public string type1; + public bool unique; + public string uniquekey; + public bool update; + public bool updateSpecified; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmPropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmPropertyGeneration + { + Always, + Insert, + Never, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmQuery : NHibernate.Cfg.MappingSchema.HbmBase + { + public string GetText() => throw null; + public HbmQuery() => throw null; + public NHibernate.Cfg.MappingSchema.HbmQueryParam[] Items; + public string[] Text; + public bool cacheable; + public NHibernate.Cfg.MappingSchema.HbmCacheMode cachemode; + public bool cachemodeSpecified; + public string cacheregion; + public string comment; + public int fetchsize; + public bool fetchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmFlushMode flushmode; + public bool flushmodeSpecified; + public string name; + public bool @readonly; + public bool readonlySpecified; + public string timeout; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmQueryParam` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmQueryParam + { + public HbmQueryParam() => throw null; + public string name; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmRestrictedLaziness` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmRestrictedLaziness + { + False, + Proxy, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmResultSet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmResultSet + { + public HbmResultSet() => throw null; + public object[] Items; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturn + { + public HbmReturn() => throw null; + public string alias; + public string @class; + public string entityname; + public NHibernate.Cfg.MappingSchema.HbmLockMode lockmode; + public NHibernate.Cfg.MappingSchema.HbmReturnDiscriminator returndiscriminator; + public NHibernate.Cfg.MappingSchema.HbmReturnProperty[] returnproperty; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturnColumn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturnColumn + { + public HbmReturnColumn() => throw null; + public string name; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturnDiscriminator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturnDiscriminator + { + public HbmReturnDiscriminator() => throw null; + public string column; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturnJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturnJoin + { + public HbmReturnJoin() => throw null; + public string alias; + public NHibernate.Cfg.MappingSchema.HbmLockMode lockmode; + public string property; + public NHibernate.Cfg.MappingSchema.HbmReturnProperty[] returnproperty; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturnProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturnProperty + { + public HbmReturnProperty() => throw null; + public string column; + public string name; + public NHibernate.Cfg.MappingSchema.HbmReturnColumn[] returncolumn; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmReturnScalar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmReturnScalar + { + public HbmReturnScalar() => throw null; + public string column; + public string type; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmSet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmSet : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping, NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping + { + public string Access { get => throw null; } + public int? BatchSize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCache Cache { get => throw null; } + public string Cascade { get => throw null; } + public string Catalog { get => throw null; } + public string Check { get => throw null; } + public string CollectionType { get => throw null; } + public object ElementRelationship { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get => throw null; } + public System.Collections.Generic.IEnumerable Filters { get => throw null; } + public bool? Generic { get => throw null; } + public HbmSet() => throw null; + public bool Inverse { get => throw null; } + public bool IsLazyProperty { get => throw null; } + public object Item; + public NHibernate.Cfg.MappingSchema.HbmKey Key { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public bool Mutable { get => throw null; } + public string Name { get => throw null; } + public bool OptimisticLock { get => throw null; } + public string OrderBy { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get => throw null; } + public string PersisterQualifiedName { get => throw null; } + public string Schema { get => throw null; } + public string Sort { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public string Table { get => throw null; } + public string Where { get => throw null; } + public string access; + public int batchsize; + public bool batchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmCache cache; + public string cascade; + public string catalog; + public string check; + public string collectiontype; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode fetch; + public bool fetchSpecified; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public bool generic; + public bool genericSpecified; + public bool inverse; + public NHibernate.Cfg.MappingSchema.HbmKey key; + public NHibernate.Cfg.MappingSchema.HbmCollectionLazy lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public bool mutable; + public string name; + public string node; + public bool optimisticlock; + public string orderby; + public NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerjoin; + public bool outerjoinSpecified; + public string persister; + public string schema; + public string sort; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldeleteall; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public string where; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmSqlQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmSqlQuery : NHibernate.Cfg.MappingSchema.HbmBase + { + public string GetText() => throw null; + public HbmSqlQuery() => throw null; + public object[] Items; + public string[] Text; + public bool cacheable; + public NHibernate.Cfg.MappingSchema.HbmCacheMode cachemode; + public bool cachemodeSpecified; + public string cacheregion; + public bool callable; + public string comment; + public int fetchsize; + public bool fetchsizeSpecified; + public NHibernate.Cfg.MappingSchema.HbmFlushMode flushmode; + public bool flushmodeSpecified; + public string name; + public bool @readonly; + public bool readonlySpecified; + public string resultsetref; + public string timeout; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmSubclass : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping, NHibernate.Cfg.MappingSchema.IEntityMapping, NHibernate.Cfg.MappingSchema.IEntityDiscriminableMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + public int? BatchSize { get => throw null; } + public string DiscriminatorValue { get => throw null; } + public bool DynamicInsert { get => throw null; } + public bool DynamicUpdate { get => throw null; } + public string EntityName { get => throw null; } + public HbmSubclass() => throw null; + public bool? IsAbstract { get => throw null; } + public object[] Items; + public object[] Items1; + public System.Collections.Generic.IEnumerable Joins { get => throw null; } + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public string Node { get => throw null; } + public string Persister { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string Proxy { get => throw null; } + public bool SelectBeforeUpdate { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public System.Collections.Generic.IEnumerable Subclasses { get => throw null; } + public string Subselect { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] Synchronize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] Tuplizers { get => throw null; } + public bool? UseLazy { get => throw null; } + public bool @abstract; + public bool abstractSpecified; + public string batchsize; + public string discriminatorvalue; + public bool dynamicinsert; + public bool dynamicupdate; + public string entityname; + public string extends; + public NHibernate.Cfg.MappingSchema.HbmFilter[] filter; + public NHibernate.Cfg.MappingSchema.HbmJoin[] join; + public bool lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public string persister; + public string proxy; + public NHibernate.Cfg.MappingSchema.HbmResultSet[] resultset; + public bool selectbeforeupdate; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubclass[] subclass1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] tuplizer; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmSubselect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmSubselect + { + public HbmSubselect() => throw null; + public string[] Text; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmSynchronize` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmSynchronize + { + public HbmSynchronize() => throw null; + public string table; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTimestamp` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmTimestamp : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmTimestamp() => throw null; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string access; + public string column; + public NHibernate.Cfg.MappingSchema.HbmVersionGeneration generated; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public NHibernate.Cfg.MappingSchema.HbmTimestampSource source; + public NHibernate.Cfg.MappingSchema.HbmTimestampUnsavedvalue unsavedvalue; + public bool unsavedvalueSpecified; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTimestampSource` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmTimestampSource + { + Db, + Vm, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTimestampUnsavedvalue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmTimestampUnsavedvalue + { + Null, + Undefined, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmTuplizer + { + public HbmTuplizer() => throw null; + public string @class; + public NHibernate.Cfg.MappingSchema.HbmTuplizerEntitymode entitymode; + public bool entitymodeSpecified; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTuplizerEntitymode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmTuplizerEntitymode + { + DynamicMap, + Poco, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmType + { + public HbmType() => throw null; + public string name; + public NHibernate.Cfg.MappingSchema.HbmParam[] param; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmTypedef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmTypedef + { + public HbmTypedef() => throw null; + public string @class; + public string name; + public NHibernate.Cfg.MappingSchema.HbmParam[] param; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmUnionSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmUnionSubclass : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping, NHibernate.Cfg.MappingSchema.IEntityMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + public int? BatchSize { get => throw null; } + public bool DynamicInsert { get => throw null; } + public bool DynamicUpdate { get => throw null; } + public string EntityName { get => throw null; } + public HbmUnionSubclass() => throw null; + public bool? IsAbstract { get => throw null; } + public object[] Items; + public object[] Items1; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string Name { get => throw null; } + public string Node { get => throw null; } + public string Persister { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public string Proxy { get => throw null; } + public bool SelectBeforeUpdate { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get => throw null; } + public string Subselect { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] Synchronize { get => throw null; } + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] Tuplizers { get => throw null; } + public System.Collections.Generic.IEnumerable UnionSubclasses { get => throw null; } + public bool? UseLazy { get => throw null; } + public bool @abstract; + public bool abstractSpecified; + public string batchsize; + public string catalog; + public string check; + public NHibernate.Cfg.MappingSchema.HbmComment comment; + public bool dynamicinsert; + public bool dynamicupdate; + public string entityname; + public string extends; + public bool lazy; + public bool lazySpecified; + public NHibernate.Cfg.MappingSchema.HbmLoader loader; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public string persister; + public string proxy; + public NHibernate.Cfg.MappingSchema.HbmResultSet[] resultset; + public string schema; + public bool selectbeforeupdate; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqldelete; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlinsert; + public NHibernate.Cfg.MappingSchema.HbmCustomSQL sqlupdate; + public NHibernate.Cfg.MappingSchema.HbmSubselect subselect; + public string subselect1; + public NHibernate.Cfg.MappingSchema.HbmSynchronize[] synchronize; + public string table; + public NHibernate.Cfg.MappingSchema.HbmTuplizer[] tuplizer; + public NHibernate.Cfg.MappingSchema.HbmUnionSubclass[] unionsubclass1; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmUnsavedValueType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmUnsavedValueType + { + Any, + None, + Undefined, + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmVersion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HbmVersion : NHibernate.Cfg.MappingSchema.AbstractDecoratable, NHibernate.Cfg.MappingSchema.IColumnsMapping + { + public System.Collections.Generic.IEnumerable Columns { get => throw null; } + public HbmVersion() => throw null; + protected override NHibernate.Cfg.MappingSchema.HbmMeta[] Metadatas { get => throw null; } + public string access; + public NHibernate.Cfg.MappingSchema.HbmColumn[] column; + public string column1; + public NHibernate.Cfg.MappingSchema.HbmVersionGeneration generated; + public bool insert; + public bool insertSpecified; + public NHibernate.Cfg.MappingSchema.HbmMeta[] meta; + public string name; + public string node; + public string type; + public string unsavedvalue; + } + + // Generated from `NHibernate.Cfg.MappingSchema.HbmVersionGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HbmVersionGeneration + { + Always, + Never, + } + + // Generated from `NHibernate.Cfg.MappingSchema.IAnyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAnyMapping + { + string MetaType { get; } + System.Collections.Generic.ICollection MetaValues { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IAssemblyResourceFilter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAssemblyResourceFilter + { + bool ShouldParse(string resourceName); + } + + // Generated from `NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPropertiesMapping : NHibernate.Cfg.MappingSchema.IReferencePropertyMapping, NHibernate.Cfg.MappingSchema.IEntityPropertyMapping, NHibernate.Cfg.MappingSchema.IDecoratable, NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping + { + int? BatchSize { get; } + NHibernate.Cfg.MappingSchema.HbmCache Cache { get; } + string Catalog { get; } + string Check { get; } + string CollectionType { get; } + object ElementRelationship { get; } + NHibernate.Cfg.MappingSchema.HbmCollectionFetchMode? FetchMode { get; } + System.Collections.Generic.IEnumerable Filters { get; } + bool? Generic { get; } + bool Inverse { get; } + NHibernate.Cfg.MappingSchema.HbmKey Key { get; } + NHibernate.Cfg.MappingSchema.HbmCollectionLazy? Lazy { get; } + bool Mutable { get; } + string OrderBy { get; } + NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy? OuterJoin { get; } + string PersisterQualifiedName { get; } + string Schema { get; } + string Sort { get; } + string Table { get; } + string Where { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.ICollectionSqlsMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionSqlsMapping + { + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get; } + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDeleteAll { get; } + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get; } + NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get; } + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get; } + string Subselect { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IColumnsMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnsMapping + { + System.Collections.Generic.IEnumerable Columns { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IComponentMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentMapping : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping + { + string Class { get; } + string EmbeddedNode { get; } + string Name { get; } + NHibernate.Cfg.MappingSchema.HbmParent Parent { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IDecoratable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDecoratable + { + System.Collections.Generic.IDictionary InheritableMetaData { get; } + System.Collections.Generic.IDictionary MappedMetaData { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IEntityDiscriminableMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityDiscriminableMapping + { + string DiscriminatorValue { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IEntityMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityMapping : NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping, NHibernate.Cfg.MappingSchema.IEntitySqlsMapping, NHibernate.Cfg.MappingSchema.IDecoratable + { + int? BatchSize { get; } + bool DynamicInsert { get; } + bool DynamicUpdate { get; } + string EntityName { get; } + bool? IsAbstract { get; } + string Name { get; } + string Node { get; } + string Persister { get; } + string Proxy { get; } + bool SelectBeforeUpdate { get; } + NHibernate.Cfg.MappingSchema.HbmSynchronize[] Synchronize { get; } + NHibernate.Cfg.MappingSchema.HbmTuplizer[] Tuplizers { get; } + bool? UseLazy { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IEntityPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityPropertyMapping : NHibernate.Cfg.MappingSchema.IDecoratable + { + string Access { get; } + bool IsLazyProperty { get; } + string Name { get; } + bool OptimisticLock { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IEntitySqlsMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntitySqlsMapping + { + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlDelete { get; } + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlInsert { get; } + NHibernate.Cfg.MappingSchema.HbmLoader SqlLoader { get; } + NHibernate.Cfg.MappingSchema.HbmCustomSQL SqlUpdate { get; } + string Subselect { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IFormulasMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFormulasMapping + { + System.Collections.Generic.IEnumerable Formulas { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IIndexedCollectionMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIndexedCollectionMapping + { + NHibernate.Cfg.MappingSchema.HbmIndex Index { get; } + NHibernate.Cfg.MappingSchema.HbmListIndex ListIndex { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IMappingDocumentParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMappingDocumentParser + { + NHibernate.Cfg.MappingSchema.HbmMapping Parse(System.IO.Stream stream); + } + + // Generated from `NHibernate.Cfg.MappingSchema.IPropertiesContainerMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertiesContainerMapping + { + System.Collections.Generic.IEnumerable Properties { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IReferencePropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IReferencePropertyMapping + { + string Cascade { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.IRelationship` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRelationship + { + string Class { get; } + string EntityName { get; } + NHibernate.Cfg.MappingSchema.HbmNotFoundMode NotFoundMode { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.ITypeMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITypeMapping + { + NHibernate.Cfg.MappingSchema.HbmType Type { get; } + } + + // Generated from `NHibernate.Cfg.MappingSchema.MappingDocumentAggregator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingDocumentAggregator + { + public void Add(string fileName) => throw null; + public void Add(System.Reflection.Assembly assembly, string resourceName) => throw null; + public void Add(System.Reflection.Assembly assembly, NHibernate.Cfg.MappingSchema.IAssemblyResourceFilter filter) => throw null; + public void Add(System.Reflection.Assembly assembly) => throw null; + public void Add(System.IO.Stream stream) => throw null; + public void Add(System.IO.FileInfo file) => throw null; + public void Add(NHibernate.Cfg.MappingSchema.HbmMapping document) => throw null; + public System.Collections.Generic.IList List() => throw null; + public MappingDocumentAggregator(NHibernate.Cfg.MappingSchema.IMappingDocumentParser parser, NHibernate.Cfg.MappingSchema.IAssemblyResourceFilter defaultFilter) => throw null; + public MappingDocumentAggregator() => throw null; + } + + // Generated from `NHibernate.Cfg.MappingSchema.MappingDocumentParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingDocumentParser : NHibernate.Cfg.MappingSchema.IMappingDocumentParser + { + public MappingDocumentParser() => throw null; + public NHibernate.Cfg.MappingSchema.HbmMapping Parse(System.IO.Stream stream) => throw null; + } + + // Generated from `NHibernate.Cfg.MappingSchema.MappingExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class MappingExtensions + { + public static NHibernate.EntityMode ToEntityMode(this NHibernate.Cfg.MappingSchema.HbmTuplizerEntitymode source) => throw null; + } + + } + namespace XmlHbmBinding + { + // Generated from `NHibernate.Cfg.XmlHbmBinding.Binder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Binder + { + protected Binder(NHibernate.Cfg.Mappings mappings) => throw null; + protected static System.Type ClassForFullNameChecked(string fullName, string errorMessage) => throw null; + protected static System.Type ClassForNameChecked(string name, NHibernate.Cfg.Mappings mappings, string errorMessage) => throw null; + protected static System.Collections.Generic.IDictionary EmptyMeta; + protected static string FullClassName(string className, NHibernate.Cfg.Mappings mappings) => throw null; + protected static string FullQualifiedClassName(string className, NHibernate.Cfg.Mappings mappings) => throw null; + protected static string GetClassName(string unqualifiedName, NHibernate.Cfg.Mappings mappings) => throw null; + public static System.Collections.Generic.IDictionary GetMetas(NHibernate.Cfg.MappingSchema.IDecoratable decoratable, System.Collections.Generic.IDictionary inheritedMeta, bool onlyInheritable) => throw null; + public static System.Collections.Generic.IDictionary GetMetas(NHibernate.Cfg.MappingSchema.IDecoratable decoratable, System.Collections.Generic.IDictionary inheritedMeta) => throw null; + protected static string GetQualifiedClassName(string unqualifiedName, NHibernate.Cfg.Mappings mappings) => throw null; + public NHibernate.Cfg.Mappings Mappings { get => throw null; } + protected static bool NeedQualifiedClassName(string className) => throw null; + protected static NHibernate.INHibernateLogger log; + protected NHibernate.Cfg.Mappings mappings; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ClassBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ClassBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + protected void BindAny(NHibernate.Cfg.MappingSchema.HbmAny node, NHibernate.Mapping.Any model, bool isNullable) => throw null; + protected void BindAnyMeta(NHibernate.Cfg.MappingSchema.IAnyMapping anyMapping, NHibernate.Mapping.Any model) => throw null; + protected void BindClass(NHibernate.Cfg.MappingSchema.IEntityMapping classMapping, NHibernate.Mapping.PersistentClass model, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected void BindComponent(NHibernate.Cfg.MappingSchema.IComponentMapping componentMapping, NHibernate.Mapping.Component model, System.Type reflectedClass, string className, string path, bool isNullable, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected void BindForeignKey(string foreignKey, NHibernate.Mapping.SimpleValue value) => throw null; + protected void BindJoinedSubclasses(System.Collections.Generic.IEnumerable joinedSubclasses, NHibernate.Mapping.PersistentClass persistentClass, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected void BindJoins(System.Collections.Generic.IEnumerable joins, NHibernate.Mapping.PersistentClass persistentClass, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected void BindOneToOne(NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOneMapping, NHibernate.Mapping.OneToOne model) => throw null; + protected void BindSubclasses(System.Collections.Generic.IEnumerable subclasses, NHibernate.Mapping.PersistentClass persistentClass, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected void BindUnionSubclasses(System.Collections.Generic.IEnumerable unionSubclasses, NHibernate.Mapping.PersistentClass persistentClass, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + protected ClassBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + protected ClassBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + protected ClassBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + protected string GetClassTableName(NHibernate.Mapping.PersistentClass model, string mappedTableName) => throw null; + protected static string GetEntityName(NHibernate.Cfg.MappingSchema.IRelationship relationship, NHibernate.Cfg.Mappings mappings) => throw null; + protected NHibernate.FetchMode GetFetchStyle(NHibernate.Cfg.MappingSchema.HbmOuterJoinStrategy outerJoinStrategyMapping) => throw null; + protected NHibernate.FetchMode GetFetchStyle(NHibernate.Cfg.MappingSchema.HbmFetchMode fetchModeMapping) => throw null; + protected static NHibernate.Engine.ExecuteUpdateResultCheckStyle GetResultCheckStyle(NHibernate.Cfg.MappingSchema.HbmCustomSQL customSQL) => throw null; + protected NHibernate.Mapping.PersistentClass GetSuperclass(string extendsName) => throw null; + protected static void InitLaziness(NHibernate.Cfg.MappingSchema.HbmRestrictedLaziness? restrictedLaziness, NHibernate.Mapping.ToOne fetchable, bool defaultLazy) => throw null; + protected static void InitLaziness(NHibernate.Cfg.MappingSchema.HbmLaziness? laziness, NHibernate.Mapping.ToOne fetchable, bool defaultLazy) => throw null; + protected void InitOuterJoinFetchSetting(NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOne, NHibernate.Mapping.OneToOne model) => throw null; + protected void InitOuterJoinFetchSetting(NHibernate.Cfg.MappingSchema.HbmManyToMany manyToMany, NHibernate.Mapping.IFetchable model) => throw null; + protected NHibernate.Dialect.Dialect dialect; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ClassCompositeIdBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassCompositeIdBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void BindCompositeId(NHibernate.Cfg.MappingSchema.HbmCompositeId idSchema, NHibernate.Mapping.PersistentClass rootClass) => throw null; + public ClassCompositeIdBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public ClassCompositeIdBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ClassDiscriminatorBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassDiscriminatorBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void BindDiscriminator(NHibernate.Cfg.MappingSchema.HbmDiscriminator discriminatorSchema, NHibernate.Mapping.Table table) => throw null; + public ClassDiscriminatorBinder(NHibernate.Mapping.PersistentClass rootClass, NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ClassIdBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassIdBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void BindId(NHibernate.Cfg.MappingSchema.HbmId idSchema, NHibernate.Mapping.PersistentClass rootClass, NHibernate.Mapping.Table table) => throw null; + public ClassIdBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public ClassIdBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.CollectionBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public CollectionBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public CollectionBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public NHibernate.Mapping.Collection Create(NHibernate.Cfg.MappingSchema.ICollectionPropertiesMapping collectionMapping, string className, string propertyFullPath, NHibernate.Mapping.PersistentClass owner, System.Type containingType, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ColumnsBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnsBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void Bind(System.Collections.Generic.IEnumerable columns, bool isNullable, System.Func defaultColumnDelegate) => throw null; + public void Bind(NHibernate.Cfg.MappingSchema.HbmColumn column, bool isNullable) => throw null; + public ColumnsBinder(NHibernate.Mapping.SimpleValue value, NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.FilterDefinitionFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterDefinitionFactory + { + public static NHibernate.Engine.FilterDefinition CreateFilterDefinition(NHibernate.Cfg.MappingSchema.HbmFilterDef filterDefSchema) => throw null; + public FilterDefinitionFactory() => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.FiltersBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FiltersBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void Bind(System.Collections.Generic.IEnumerable filters, System.Action addFilterDelegate) => throw null; + public void Bind(System.Collections.Generic.IEnumerable filters) => throw null; + public FiltersBinder(NHibernate.Mapping.IFilterable filterable, NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.IdGeneratorBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdGeneratorBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void BindGenerator(NHibernate.Mapping.SimpleValue id, NHibernate.Cfg.MappingSchema.HbmGenerator generatorMapping) => throw null; + public IdGeneratorBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.JoinedSubclassBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void Bind(NHibernate.Cfg.MappingSchema.HbmJoinedSubclass joinedSubclassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public void HandleJoinedSubclass(NHibernate.Mapping.PersistentClass model, NHibernate.Cfg.MappingSchema.HbmJoinedSubclass joinedSubclassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public JoinedSubclassBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public JoinedSubclassBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public JoinedSubclassBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.MappingLogExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class MappingLogExtensions + { + public static void LogMapped(this NHibernate.Mapping.Property property, NHibernate.INHibernateLogger log) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.MappingRootBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MappingRootBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void AddImports(NHibernate.Cfg.MappingSchema.HbmMapping mappingSchema) => throw null; + public void AddTypeDefs(NHibernate.Cfg.MappingSchema.HbmMapping mappingSchema) => throw null; + public void Bind(NHibernate.Cfg.MappingSchema.HbmMapping mappingSchema) => throw null; + public MappingRootBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public MappingRootBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.NamedQueryBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedQueryBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void AddQuery(NHibernate.Cfg.MappingSchema.HbmQuery querySchema) => throw null; + public NamedQueryBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.NamedSQLQueryBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedSQLQueryBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void AddSqlQuery(NHibernate.Cfg.MappingSchema.HbmSqlQuery querySchema) => throw null; + public NamedSQLQueryBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.PropertiesBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertiesBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void Bind(System.Collections.Generic.IEnumerable properties, System.Collections.Generic.IDictionary inheritedMetas, System.Action modifier) => throw null; + public void Bind(System.Collections.Generic.IEnumerable properties, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public void Bind(System.Collections.Generic.IEnumerable properties, NHibernate.Mapping.Table table, System.Collections.Generic.IDictionary inheritedMetas, System.Action modifier, System.Action addToModelAction) => throw null; + public PropertiesBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public PropertiesBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Mapping.PersistentClass persistentClass) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public PropertiesBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Mapping.Component component, string className, string path, bool isNullable, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public PropertiesBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Mapping.Component component, string className, string path, bool isNullable) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ResultSetMappingBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultSetMappingBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public NHibernate.Engine.ResultSetMappingDefinition Create(NHibernate.Cfg.MappingSchema.HbmSqlQuery sqlQuerySchema) => throw null; + public NHibernate.Engine.ResultSetMappingDefinition Create(NHibernate.Cfg.MappingSchema.HbmResultSet resultSetSchema) => throw null; + public ResultSetMappingBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.RootClassBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RootClassBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void Bind(NHibernate.Cfg.MappingSchema.HbmClass classSchema, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public RootClassBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public RootClassBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.SubclassBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubclassBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void Bind(NHibernate.Cfg.MappingSchema.HbmSubclass subClassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public void HandleSubclass(NHibernate.Mapping.PersistentClass model, NHibernate.Cfg.MappingSchema.HbmSubclass subClassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public SubclassBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public SubclassBinder(NHibernate.Cfg.XmlHbmBinding.Binder parent, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public SubclassBinder(NHibernate.Cfg.XmlHbmBinding.Binder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public SubclassBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.TypeBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void Bind(string typeName) => throw null; + public void Bind(NHibernate.Cfg.MappingSchema.HbmType typeMapping) => throw null; + public TypeBinder(NHibernate.Mapping.SimpleValue value, NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.UnionSubclassBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclassBinder : NHibernate.Cfg.XmlHbmBinding.ClassBinder + { + public void Bind(NHibernate.Cfg.MappingSchema.HbmUnionSubclass unionSubclassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public void HandleUnionSubclass(NHibernate.Mapping.PersistentClass model, NHibernate.Cfg.MappingSchema.HbmUnionSubclass unionSubclassMapping, System.Collections.Generic.IDictionary inheritedMetas) => throw null; + public UnionSubclassBinder(NHibernate.Cfg.XmlHbmBinding.ClassBinder parent) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public UnionSubclassBinder(NHibernate.Cfg.Mappings mappings, NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Cfg.Mappings)) => throw null; + public UnionSubclassBinder(NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + // Generated from `NHibernate.Cfg.XmlHbmBinding.ValuePropertyBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ValuePropertyBinder : NHibernate.Cfg.XmlHbmBinding.Binder + { + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmProperty propertyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmMapKeyManyToMany mapKeyManyToManyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmMapKey mapKeyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmManyToOne manyToOneMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmManyToMany manyToManyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmListIndex listIndexMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmKeyProperty mapKeyManyToManyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmKeyManyToOne mapKeyManyToManyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmKey propertyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmIndexManyToMany indexManyToManyMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmIndex indexMapping, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmElement element, string propertyPath, bool isNullable) => throw null; + public void BindSimpleValue(NHibernate.Cfg.MappingSchema.HbmCollectionId collectionIdMapping, string propertyPath) => throw null; + public ValuePropertyBinder(NHibernate.Mapping.SimpleValue value, NHibernate.Cfg.Mappings mappings) : base(default(NHibernate.Cfg.Mappings)) => throw null; + } + + } + } + namespace Classic + { + // Generated from `NHibernate.Classic.ILifecycle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILifecycle + { + NHibernate.Classic.LifecycleVeto OnDelete(NHibernate.ISession s); + void OnLoad(NHibernate.ISession s, object id); + NHibernate.Classic.LifecycleVeto OnSave(NHibernate.ISession s); + NHibernate.Classic.LifecycleVeto OnUpdate(NHibernate.ISession s); + } + + // Generated from `NHibernate.Classic.IValidatable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IValidatable + { + void Validate(); + } + + // Generated from `NHibernate.Classic.LifecycleVeto` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum LifecycleVeto + { + NoVeto, + Veto, + } + + // Generated from `NHibernate.Classic.ValidationFailure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ValidationFailure : NHibernate.HibernateException + { + public ValidationFailure(string message, System.Exception innerException) => throw null; + public ValidationFailure(string message) => throw null; + public ValidationFailure(System.Exception innerException) => throw null; + public ValidationFailure() => throw null; + protected ValidationFailure(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + namespace Collection + { + // Generated from `NHibernate.Collection.AbstractPersistentCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractPersistentCollection : NHibernate.Collection.IPersistentCollection, NHibernate.Collection.ILazyInitializedCollection + { + protected AbstractPersistentCollection(NHibernate.Engine.ISessionImplementor session) => throw null; + protected AbstractPersistentCollection() => throw null; + public virtual bool AfterInitialize(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public virtual void AfterRowInsert(NHibernate.Persister.Collection.ICollectionPersister persister, object entry, int i, object id) => throw null; + public virtual void ApplyQueuedOperations() => throw null; + public abstract void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize); + public virtual void BeginRead() => throw null; + protected int CachedSize { get => throw null; set => throw null; } + public void ClearDirty() => throw null; + protected bool ClearQueueEnabled { get => throw null; } + public void Dirty() => throw null; + public abstract object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister); + public abstract System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken); + public abstract bool Empty { get; } + public virtual bool EndRead(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public abstract System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister); + public abstract bool EntryExists(object entry, int i); + public abstract bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister); + public abstract System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken); + public virtual void ForceInitialization() => throw null; + public virtual System.Threading.Tasks.Task ForceInitializationAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula); + public abstract System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken); + public abstract object GetElement(object entry); + public virtual object GetIdentifier(object entry, int i) => throw null; + public abstract object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister); + public abstract System.Collections.ICollection GetOrphans(object snapshot, string entityName); + protected virtual System.Collections.ICollection GetOrphans(System.Collections.ICollection oldElements, System.Collections.ICollection currentElements, string entityName, NHibernate.Engine.ISessionImplementor session) => throw null; + public abstract System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken); + protected virtual System.Threading.Tasks.Task GetOrphansAsync(System.Collections.ICollection oldElements, System.Collections.ICollection currentElements, string entityName, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.ICollection GetQueuedOrphans(string entityName) => throw null; + public System.Threading.Tasks.Task GetQueuedOrphansAsync(string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister); + protected virtual object GetSnapshot() => throw null; + public abstract object GetSnapshotElement(object entry, int i); + public virtual object GetValue() => throw null; + public bool HasQueuedOperations { get => throw null; } + // Generated from `NHibernate.Collection.AbstractPersistentCollection+IDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected interface IDelayedOperation + { + object AddedInstance { get; } + void Operate(); + object Orphan { get; } + } + + + public void IdentityRemove(System.Collections.IList list, object obj, string entityName, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task IdentityRemoveAsync(System.Collections.IList list, object obj, string entityName, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void Initialize(bool writing) => throw null; + protected virtual System.Threading.Tasks.Task InitializeAsync(bool writing, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner); + public abstract System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken); + protected bool InverseCollectionNoOrphanDelete { get => throw null; } + protected bool InverseOneToManyOrNoOrphanDelete { get => throw null; } + protected bool IsConnectedToSession { get => throw null; } + public virtual bool IsDirectlyAccessible { get => throw null; set => throw null; } + public bool IsDirty { get => throw null; } + protected bool IsInverseCollection { get => throw null; } + protected bool IsOperationQueueEnabled { get => throw null; } + public abstract bool IsSnapshotEmpty(object snapshot); + public bool IsUnreferenced { get => throw null; } + public abstract bool IsWrapper(object collection); + public object Key { get => throw null; } + public abstract bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType); + public abstract System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken); + public virtual bool NeedsRecreate(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public abstract bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType); + public abstract System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken); + protected internal static object NotFound; + public virtual object Owner { get => throw null; set => throw null; } + protected virtual void PerformQueuedOperations() => throw null; + public virtual void PostAction() => throw null; + public virtual void PreInsert(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public virtual System.Threading.Tasks.Task PreInsertAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + protected bool PutQueueEnabled { get => throw null; } + protected bool QueueAddElement(T element) => throw null; + protected void QueueAddElementAtIndex(int index, T element) => throw null; + protected void QueueAddElementByKey(TKey elementKey, TValue element) => throw null; + protected void QueueClearCollection() => throw null; + protected virtual void QueueOperation(NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation element) => throw null; + protected void QueueRemoveElementAtIndex(int index, T element) => throw null; + protected bool QueueRemoveElementByKey(TKey elementKey, TValue oldElement, bool? existsInDb) => throw null; + protected void QueueRemoveExistingElement(T element, bool? existsInDb) => throw null; + protected void QueueSetElementAtIndex(int index, T element, T oldElement) => throw null; + protected void QueueSetElementByKey(TKey elementKey, TValue element, TValue oldElement, bool? existsInDb) => throw null; + public System.Collections.IEnumerable QueuedAdditionIterator { get => throw null; } + public virtual void Read() => throw null; + protected virtual object ReadElementByIndex(object index) => throw null; + protected virtual bool? ReadElementExistence(T element, out bool? existsInDb) => throw null; + protected virtual bool? ReadElementExistence(object element) => throw null; + public abstract object ReadFrom(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner); + public abstract System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken); + protected virtual bool? ReadIndexExistence(object index) => throw null; + protected virtual bool? ReadKeyExistence(TKey elementKey) => throw null; + protected virtual System.Threading.Tasks.Task ReadKeyExistenceAsync(TKey elementKey, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool ReadSize() => throw null; + public string Role { get => throw null; } + public virtual bool RowUpdatePossible { get => throw null; } + protected virtual NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public virtual bool SetCurrentSession(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual void SetInitialized() => throw null; + public void SetSnapshot(object key, string role, object snapshot) => throw null; + public object StoredSnapshot { get => throw null; } + protected void ThrowLazyInitializationException(string message) => throw null; + protected void ThrowLazyInitializationExceptionIfNotConnected() => throw null; + protected virtual bool? TryReadElementAtIndex(int index, out T element) => throw null; + protected virtual bool? TryReadElementByKey(TKey elementKey, out TValue element, out bool? existsInDb) => throw null; + protected internal static object Unknown; + public bool UnsetSession(NHibernate.Engine.ISessionImplementor currentSession) => throw null; + public bool WasInitialized { get => throw null; } + protected virtual void Write() => throw null; + } + + // Generated from `NHibernate.Collection.ILazyInitializedCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILazyInitializedCollection + { + void ForceInitialization(); + System.Threading.Tasks.Task ForceInitializationAsync(System.Threading.CancellationToken cancellationToken); + bool WasInitialized { get; } + } + + // Generated from `NHibernate.Collection.IPersistentCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistentCollection + { + bool AfterInitialize(NHibernate.Persister.Collection.ICollectionPersister persister); + void AfterRowInsert(NHibernate.Persister.Collection.ICollectionPersister persister, object entry, int i, object id); + void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize); + void BeginRead(); + void ClearDirty(); + void Dirty(); + object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister); + System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken); + bool Empty { get; } + bool EndRead(NHibernate.Persister.Collection.ICollectionPersister persister); + System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister); + bool EntryExists(object entry, int i); + bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister); + System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken); + void ForceInitialization(); + System.Threading.Tasks.Task ForceInitializationAsync(System.Threading.CancellationToken cancellationToken); + System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula); + System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken); + object GetElement(object entry); + object GetIdentifier(object entry, int i); + object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister); + System.Collections.ICollection GetOrphans(object snapshot, string entityName); + System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken); + System.Collections.ICollection GetQueuedOrphans(string entityName); + System.Threading.Tasks.Task GetQueuedOrphansAsync(string entityName, System.Threading.CancellationToken cancellationToken); + object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister); + object GetSnapshotElement(object entry, int i); + object GetValue(); + bool HasQueuedOperations { get; } + void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner); + System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken); + bool IsDirectlyAccessible { get; } + bool IsDirty { get; } + bool IsSnapshotEmpty(object snapshot); + bool IsUnreferenced { get; } + bool IsWrapper(object collection); + object Key { get; } + bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType); + System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken); + bool NeedsRecreate(NHibernate.Persister.Collection.ICollectionPersister persister); + bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType); + System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken); + object Owner { get; set; } + void PostAction(); + void PreInsert(NHibernate.Persister.Collection.ICollectionPersister persister); + System.Threading.Tasks.Task PreInsertAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken); + System.Collections.IEnumerable QueuedAdditionIterator { get; } + object ReadFrom(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner); + System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken); + string Role { get; } + bool RowUpdatePossible { get; } + bool SetCurrentSession(NHibernate.Engine.ISessionImplementor session); + void SetSnapshot(object key, string role, object snapshot); + object StoredSnapshot { get; } + bool UnsetSession(NHibernate.Engine.ISessionImplementor currentSession); + bool WasInitialized { get; } + } + + // Generated from `NHibernate.Collection.PersistentArrayHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentArrayHolder : NHibernate.Collection.AbstractPersistentCollection, System.Collections.IEnumerable, System.Collections.ICollection + { + public object Array { get => throw null; set => throw null; } + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + public override void BeginRead() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.ICollection Elements() => throw null; + public override bool Empty { get => throw null; } + public override bool EndRead(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public override object GetValue() => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsDirectlyAccessible { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public PersistentArrayHolder(NHibernate.Engine.ISessionImplementor session, object array) => throw null; + public PersistentArrayHolder(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object ReadFrom(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `NHibernate.Collection.PersistentCollectionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PersistentCollectionExtensions + { + public static void ApplyQueuedOperations(this NHibernate.Collection.IPersistentCollection collection) => throw null; + } + + namespace Generic + { + // Generated from `NHibernate.Collection.Generic.PersistentGenericBag<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentGenericBag : NHibernate.Collection.AbstractPersistentCollection, System.Linq.IQueryable, System.Linq.IQueryable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public override void ApplyQueuedOperations() => throw null; + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Type System.Linq.IQueryable.ElementType { get => throw null; } + public override bool Empty { get => throw null; } + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get => throw null; } + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + protected System.Collections.Generic.IList InternalBag { get => throw null; set => throw null; } + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsRecreate(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public PersistentGenericBag(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.IEnumerable coll) => throw null; + public PersistentGenericBag(NHibernate.Engine.ISessionImplementor session) => throw null; + public PersistentGenericBag() => throw null; + System.Linq.IQueryProvider System.Linq.IQueryable.Provider { get => throw null; } + public override object ReadFrom(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public void RemoveAt(int index) => throw null; + public override bool RowUpdatePossible { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentGenericList : NHibernate.Collection.AbstractPersistentCollection, System.Linq.IQueryable, System.Linq.IQueryable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+AddDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class AddDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public AddDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance, int index, T value) => throw null; + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + } + + + public override void ApplyQueuedOperations() => throw null; + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + public void Clear() => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+ClearDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class ClearDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public ClearDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance) => throw null; + public void Operate() => throw null; + public object Orphan { get => throw null; } + } + + + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + protected virtual T DefaultForType { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Type System.Linq.IQueryable.ElementType { get => throw null; } + public override bool Empty { get => throw null; } + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool Equals(object obj) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get => throw null; } + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + bool System.Collections.IList.IsFixedSize { get => throw null; } + bool System.Collections.IList.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection.IsReadOnly { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public PersistentGenericList(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.IList list) => throw null; + public PersistentGenericList(NHibernate.Engine.ISessionImplementor session) => throw null; + public PersistentGenericList() => throw null; + System.Linq.IQueryProvider System.Linq.IQueryable.Provider { get => throw null; } + public override object ReadFrom(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public void RemoveAt(int index) => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+RemoveDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class RemoveDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public RemoveDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance, int index, object old) => throw null; + } + + + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+SetDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SetDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public SetDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance, int index, T value, object old) => throw null; + } + + + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+SimpleAddDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SimpleAddDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public SimpleAddDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance, T value) => throw null; + } + + + // Generated from `NHibernate.Collection.Generic.PersistentGenericList<>+SimpleRemoveDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SimpleRemoveDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public SimpleRemoveDelayedOperation(NHibernate.Collection.Generic.PersistentGenericList enclosingInstance, T value) => throw null; + } + + + object System.Collections.ICollection.SyncRoot { get => throw null; } + public override string ToString() => throw null; + protected System.Collections.Generic.IList WrappedList; + } + + // Generated from `NHibernate.Collection.Generic.PersistentGenericMap<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentGenericMap : NHibernate.Collection.AbstractPersistentCollection, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyDictionary, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + protected virtual void AddDuringInitialize(object index, object element) => throw null; + public override void ApplyQueuedOperations() => throw null; + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + public void Clear() => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericMap<,>+ClearDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class ClearDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public ClearDelayedOperation(NHibernate.Collection.Generic.PersistentGenericMap enclosingInstance) => throw null; + public void Operate() => throw null; + public object Orphan { get => throw null; } + } + + + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(TKey key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public void CopyTo(System.Array array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Empty { get => throw null; } + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool Equals(object other) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsReadOnly { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + public bool IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public TValue this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Keys { get => throw null; } + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public PersistentGenericMap(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.IDictionary map) => throw null; + public PersistentGenericMap(NHibernate.Engine.ISessionImplementor session) => throw null; + public PersistentGenericMap() => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericMap<,>+PutDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class PutDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public PutDelayedOperation(NHibernate.Collection.Generic.PersistentGenericMap enclosingInstance, TKey index, TValue value, object old) => throw null; + } + + + public override object ReadFrom(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericMap<,>+RemoveDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class RemoveDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public RemoveDelayedOperation(NHibernate.Collection.Generic.PersistentGenericMap enclosingInstance, TKey index, object old) => throw null; + } + + + public object SyncRoot { get => throw null; } + public override string ToString() => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + System.Collections.Generic.IEnumerable System.Collections.Generic.IReadOnlyDictionary.Values { get => throw null; } + protected System.Collections.Generic.IDictionary WrappedMap; + } + + // Generated from `NHibernate.Collection.Generic.PersistentGenericSet<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentGenericSet : NHibernate.Collection.AbstractPersistentCollection, System.Linq.IQueryable, System.Linq.IQueryable, System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(T item) => throw null; + public bool Add(T o) => throw null; + public override void ApplyQueuedOperations() => throw null; + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + public override void BeginRead() => throw null; + public void Clear() => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericSet<>+ClearDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class ClearDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public ClearDelayedOperation(NHibernate.Collection.Generic.PersistentGenericSet enclosingInstance) => throw null; + public void Operate() => throw null; + public object Orphan { get => throw null; } + } + + + public bool Contains(T item) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Type System.Linq.IQueryable.ElementType { get => throw null; } + public override bool Empty { get => throw null; } + public override bool EndRead(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool Equals(object other) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get => throw null; } + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsReadOnly { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public PersistentGenericSet(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.ISet original) => throw null; + public PersistentGenericSet(NHibernate.Engine.ISessionImplementor session) => throw null; + public PersistentGenericSet() => throw null; + System.Linq.IQueryProvider System.Linq.IQueryable.Provider { get => throw null; } + public override object ReadFrom(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader rs, NHibernate.Persister.Collection.ICollectionPersister role, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public bool Remove(T o) => throw null; + public override bool RowUpdatePossible { get => throw null; } + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + // Generated from `NHibernate.Collection.Generic.PersistentGenericSet<>+SimpleAddDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SimpleAddDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public SimpleAddDelayedOperation(NHibernate.Collection.Generic.PersistentGenericSet enclosingInstance, T value) => throw null; + } + + + // Generated from `NHibernate.Collection.Generic.PersistentGenericSet<>+SimpleRemoveDelayedOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SimpleRemoveDelayedOperation : NHibernate.Collection.AbstractPersistentCollection.IDelayedOperation + { + public object AddedInstance { get => throw null; } + public void Operate() => throw null; + public object Orphan { get => throw null; } + public SimpleRemoveDelayedOperation(NHibernate.Collection.Generic.PersistentGenericSet enclosingInstance, T value) => throw null; + } + + + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public object SyncRoot { get => throw null; } + public override string ToString() => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + protected System.Collections.Generic.ISet WrappedSet; + } + + // Generated from `NHibernate.Collection.Generic.PersistentIdentifierBag<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentIdentifierBag : NHibernate.Collection.AbstractPersistentCollection, System.Linq.IQueryable, System.Linq.IQueryable, System.Collections.IList, System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IReadOnlyList, System.Collections.Generic.IReadOnlyCollection, System.Collections.Generic.IList, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + public void Add(T item) => throw null; + int System.Collections.IList.Add(object value) => throw null; + public override void AfterRowInsert(NHibernate.Persister.Collection.ICollectionPersister persister, object entry, int i, object id) => throw null; + public override void BeforeInitialize(NHibernate.Persister.Collection.ICollectionPersister persister, int anticipatedSize) => throw null; + protected void BeforeInsert(int index) => throw null; + protected void BeforeRemove(int index) => throw null; + public void Clear() => throw null; + public bool Contains(T item) => throw null; + bool System.Collections.IList.Contains(object value) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) => throw null; + public void CopyTo(T[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public override object Disassemble(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Type System.Linq.IQueryable.ElementType { get => throw null; } + public override bool Empty { get => throw null; } + public override System.Collections.IEnumerable Entries(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override bool EntryExists(object entry, int i) => throw null; + public override bool EqualsSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task EqualsSnapshotAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Linq.Expressions.Expression System.Linq.IQueryable.Expression { get => throw null; } + public override System.Collections.IEnumerable GetDeletes(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula) => throw null; + public override System.Threading.Tasks.Task GetDeletesAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool indexIsFormula, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetElement(object entry) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override object GetIdentifier(object entry, int i) => throw null; + public override object GetIndex(object entry, int i, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Collections.ICollection GetOrphans(object snapshot, string entityName) => throw null; + public override System.Threading.Tasks.Task GetOrphansAsync(object snapshot, string entityName, System.Threading.CancellationToken cancellationToken) => throw null; + public override object GetSnapshot(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override object GetSnapshotElement(object entry, int i) => throw null; + public int IndexOf(T item) => throw null; + int System.Collections.IList.IndexOf(object value) => throw null; + public override void InitializeFromCache(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner) => throw null; + public override System.Threading.Tasks.Task InitializeFromCacheAsync(NHibernate.Persister.Collection.ICollectionPersister persister, object disassembled, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Insert(int index, object value) => throw null; + public void Insert(int index, T item) => throw null; + protected System.Collections.Generic.IList InternalValues { get => throw null; set => throw null; } + bool System.Collections.IList.IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public override bool IsSnapshotEmpty(object snapshot) => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public override bool IsWrapper(object collection) => throw null; + public T this[int index] { get => throw null; set => throw null; } + object System.Collections.IList.this[int index] { get => throw null; set => throw null; } + public override bool NeedsInserting(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsInsertingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool NeedsUpdating(object entry, int i, NHibernate.Type.IType elemType) => throw null; + public override System.Threading.Tasks.Task NeedsUpdatingAsync(object entry, int i, NHibernate.Type.IType elemType, System.Threading.CancellationToken cancellationToken) => throw null; + public PersistentIdentifierBag(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.IEnumerable coll) => throw null; + public PersistentIdentifierBag(NHibernate.Engine.ISessionImplementor session) => throw null; + public PersistentIdentifierBag() => throw null; + public override void PreInsert(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public override System.Threading.Tasks.Task PreInsertAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + System.Linq.IQueryProvider System.Linq.IQueryable.Provider { get => throw null; } + public override object ReadFrom(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Loader.ICollectionAliases descriptor, object owner) => throw null; + public override System.Threading.Tasks.Task ReadFromAsync(System.Data.Common.DbDataReader reader, NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Loader.ICollectionAliases descriptor, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Collections.IList.Remove(object value) => throw null; + public bool Remove(T item) => throw null; + public void RemoveAt(int index) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + } + } + namespace Connection + { + // Generated from `NHibernate.Connection.ConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ConnectionProvider : System.IDisposable, NHibernate.Connection.IConnectionProvider + { + public virtual void CloseConnection(System.Data.Common.DbConnection conn) => throw null; + public virtual void Configure(System.Collections.Generic.IDictionary settings) => throw null; + protected virtual void ConfigureDriver(System.Collections.Generic.IDictionary settings) => throw null; + protected ConnectionProvider() => throw null; + protected internal virtual string ConnectionString { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool isDisposing) => throw null; + public NHibernate.Driver.IDriver Driver { get => throw null; } + public virtual System.Data.Common.DbConnection GetConnection(string connectionString) => throw null; + public virtual System.Data.Common.DbConnection GetConnection() => throw null; + public virtual System.Threading.Tasks.Task GetConnectionAsync(string connectionString, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task GetConnectionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual string GetNamedConnectionString(System.Collections.Generic.IDictionary settings) => throw null; + // ERR: Stub generator didn't handle member: ~ConnectionProvider + } + + // Generated from `NHibernate.Connection.ConnectionProviderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ConnectionProviderExtensions + { + public static string GetConnectionString(this NHibernate.Connection.IConnectionProvider connectionProvider) => throw null; + } + + // Generated from `NHibernate.Connection.ConnectionProviderFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ConnectionProviderFactory + { + public static NHibernate.Connection.IConnectionProvider NewConnectionProvider(System.Collections.Generic.IDictionary settings) => throw null; + } + + // Generated from `NHibernate.Connection.DriverConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DriverConnectionProvider : NHibernate.Connection.ConnectionProvider + { + public override void CloseConnection(System.Data.Common.DbConnection conn) => throw null; + public DriverConnectionProvider() => throw null; + public override System.Data.Common.DbConnection GetConnection(string connectionString) => throw null; + public override System.Threading.Tasks.Task GetConnectionAsync(string connectionString, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Connection.IConnectionAccess` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConnectionAccess + { + void CloseConnection(System.Data.Common.DbConnection connection); + string ConnectionString { get; } + System.Data.Common.DbConnection GetConnection(); + System.Threading.Tasks.Task GetConnectionAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Connection.IConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConnectionProvider : System.IDisposable + { + void CloseConnection(System.Data.Common.DbConnection conn); + void Configure(System.Collections.Generic.IDictionary settings); + NHibernate.Driver.IDriver Driver { get; } + System.Data.Common.DbConnection GetConnection(); + System.Threading.Tasks.Task GetConnectionAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Connection.UserSuppliedConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UserSuppliedConnectionProvider : NHibernate.Connection.ConnectionProvider + { + public override void CloseConnection(System.Data.Common.DbConnection conn) => throw null; + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override System.Data.Common.DbConnection GetConnection(string connectionString) => throw null; + public override System.Threading.Tasks.Task GetConnectionAsync(string connectionString, System.Threading.CancellationToken cancellationToken) => throw null; + public UserSuppliedConnectionProvider() => throw null; + } + + } + namespace Context + { + // Generated from `NHibernate.Context.AsyncLocalSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AsyncLocalSessionContext : NHibernate.Context.CurrentSessionContext + { + public AsyncLocalSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected override NHibernate.ISession Session { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Context.CallSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CallSessionContext : NHibernate.Context.MapBasedSessionContext + { + public CallSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override System.Collections.IDictionary GetMap() => throw null; + protected override void SetMap(System.Collections.IDictionary value) => throw null; + } + + // Generated from `NHibernate.Context.CurrentSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CurrentSessionContext : NHibernate.Context.ICurrentSessionContext + { + public static void Bind(NHibernate.ISession session) => throw null; + public virtual NHibernate.ISession CurrentSession() => throw null; + protected CurrentSessionContext() => throw null; + public static bool HasBind(NHibernate.ISessionFactory factory) => throw null; + protected abstract NHibernate.ISession Session { get; set; } + public static NHibernate.ISession Unbind(NHibernate.ISessionFactory factory) => throw null; + } + + // Generated from `NHibernate.Context.ICurrentSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICurrentSessionContext + { + NHibernate.ISession CurrentSession(); + } + + // Generated from `NHibernate.Context.ISessionFactoryAwareCurrentSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionFactoryAwareCurrentSessionContext : NHibernate.Context.ICurrentSessionContext + { + void SetFactory(NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.Context.MapBasedSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class MapBasedSessionContext : NHibernate.Context.CurrentSessionContext + { + protected abstract System.Collections.IDictionary GetMap(); + protected MapBasedSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected override NHibernate.ISession Session { get => throw null; set => throw null; } + protected abstract void SetMap(System.Collections.IDictionary value); + } + + // Generated from `NHibernate.Context.ReflectiveHttpContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ReflectiveHttpContext + { + public static System.Func HttpContextCurrentGetter { get => throw null; set => throw null; } + public static System.Collections.IDictionary HttpContextCurrentItems { get => throw null; } + public static System.Func HttpContextItemsGetter { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Context.ThreadLocalSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ThreadLocalSessionContext : NHibernate.Context.ICurrentSessionContext + { + public static void Bind(NHibernate.ISession session) => throw null; + public static System.Threading.Tasks.Task BindAsync(NHibernate.ISession session, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.ISession BuildOrObtainSession() => throw null; + public NHibernate.ISession CurrentSession() => throw null; + protected virtual bool IsAutoCloseEnabled() => throw null; + protected virtual bool IsAutoFlushEnabled() => throw null; + public ThreadLocalSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static NHibernate.ISession Unbind(NHibernate.ISessionFactory factory) => throw null; + protected static System.Collections.Generic.IDictionary context; + protected NHibernate.Engine.ISessionFactoryImplementor factory; + } + + // Generated from `NHibernate.Context.ThreadStaticSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ThreadStaticSessionContext : NHibernate.Context.MapBasedSessionContext + { + protected override System.Collections.IDictionary GetMap() => throw null; + protected override void SetMap(System.Collections.IDictionary value) => throw null; + public ThreadStaticSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + // Generated from `NHibernate.Context.WcfOperationSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WcfOperationSessionContext : NHibernate.Context.MapBasedSessionContext + { + protected override System.Collections.IDictionary GetMap() => throw null; + protected override void SetMap(System.Collections.IDictionary value) => throw null; + public WcfOperationSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + // Generated from `NHibernate.Context.WebSessionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WebSessionContext : NHibernate.Context.MapBasedSessionContext + { + protected override System.Collections.IDictionary GetMap() => throw null; + protected override void SetMap(System.Collections.IDictionary value) => throw null; + public WebSessionContext(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + } + namespace Criterion + { + // Generated from `NHibernate.Criterion.AbstractCriterion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractCriterion : NHibernate.Criterion.ICriterion + { + public static NHibernate.Criterion.AbstractCriterion operator !(NHibernate.Criterion.AbstractCriterion crit) => throw null; + public static NHibernate.Criterion.AbstractCriterion operator &(NHibernate.Criterion.AbstractCriterion lhs, NHibernate.Criterion.AbstractEmptinessExpression rhs) => throw null; + public static NHibernate.Criterion.AbstractCriterion operator &(NHibernate.Criterion.AbstractCriterion lhs, NHibernate.Criterion.AbstractCriterion rhs) => throw null; + protected AbstractCriterion() => throw null; + public abstract NHibernate.Criterion.IProjection[] GetProjections(); + public abstract NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + public abstract NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + public abstract override string ToString(); + public static bool operator false(NHibernate.Criterion.AbstractCriterion criteria) => throw null; + public static bool operator true(NHibernate.Criterion.AbstractCriterion criteria) => throw null; + public static NHibernate.Criterion.AbstractCriterion operator |(NHibernate.Criterion.AbstractCriterion lhs, NHibernate.Criterion.AbstractEmptinessExpression rhs) => throw null; + public static NHibernate.Criterion.AbstractCriterion operator |(NHibernate.Criterion.AbstractCriterion lhs, NHibernate.Criterion.AbstractCriterion rhs) => throw null; + } + + // Generated from `NHibernate.Criterion.AbstractEmptinessExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEmptinessExpression : NHibernate.Criterion.AbstractCriterion + { + protected AbstractEmptinessExpression(string propertyName) => throw null; + protected abstract bool ExcludeEmpty { get; } + protected NHibernate.Persister.Collection.IQueryableCollection GetQueryableCollection(string entityName, string actualPropertyName, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.AggregateProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AggregateProjection : NHibernate.Criterion.SimpleProjection + { + protected internal AggregateProjection(string aggregate, string propertyName) => throw null; + protected internal AggregateProjection(string aggregate, NHibernate.Criterion.IProjection projection) => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + protected string aggregate; + protected NHibernate.Criterion.IProjection projection; + protected string propertyName; + } + + // Generated from `NHibernate.Criterion.AliasedProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AliasedProjection : NHibernate.Criterion.IProjection + { + protected internal AliasedProjection(NHibernate.Criterion.IProjection projection, string alias) => throw null; + public virtual string[] Aliases { get => throw null; } + public string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public bool IsAggregate { get => throw null; } + public virtual bool IsGrouped { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.AndExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AndExpression : NHibernate.Criterion.LogicalExpression + { + public AndExpression(NHibernate.Criterion.ICriterion lhs, NHibernate.Criterion.ICriterion rhs) : base(default(NHibernate.Criterion.ICriterion), default(NHibernate.Criterion.ICriterion)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.AvgProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AvgProjection : NHibernate.Criterion.AggregateProjection + { + public AvgProjection(string propertyName) : base(default(string), default(NHibernate.Criterion.IProjection)) => throw null; + public AvgProjection(NHibernate.Criterion.IProjection projection) : base(default(string), default(NHibernate.Criterion.IProjection)) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.BetweenExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BetweenExpression : NHibernate.Criterion.AbstractCriterion + { + public BetweenExpression(string propertyName, object lo, object hi) => throw null; + public BetweenExpression(NHibernate.Criterion.IProjection projection, object lo, object hi) => throw null; + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.CastProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CastProjection : NHibernate.Criterion.SimpleProjection + { + public CastProjection(NHibernate.Type.IType type, NHibernate.Criterion.IProjection projection) => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.ConditionalProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConditionalProjection : NHibernate.Criterion.SimpleProjection + { + public ConditionalProjection(NHibernate.Criterion.ICriterion criterion, NHibernate.Criterion.IProjection whenTrue, NHibernate.Criterion.IProjection whenFalse) => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.Conjunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Conjunction : NHibernate.Criterion.Junction + { + public Conjunction() => throw null; + protected override NHibernate.SqlCommand.SqlString EmptyExpression { get => throw null; } + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.ConstantProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConstantProjection : NHibernate.Criterion.SimpleProjection + { + public ConstantProjection(object value, NHibernate.Type.IType type) => throw null; + public ConstantProjection(object value) => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Engine.TypedValue TypedValue { get => throw null; } + } + + // Generated from `NHibernate.Criterion.CountProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CountProjection : NHibernate.Criterion.AggregateProjection + { + protected internal CountProjection(string prop) : base(default(string), default(NHibernate.Criterion.IProjection)) => throw null; + protected internal CountProjection(NHibernate.Criterion.IProjection projection) : base(default(string), default(NHibernate.Criterion.IProjection)) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Criterion.CountProjection SetDistinct() => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.CriteriaSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CriteriaSpecification + { + public static NHibernate.Transform.IResultTransformer AliasToEntityMap; + public static NHibernate.Transform.IResultTransformer DistinctRootEntity; + public static NHibernate.SqlCommand.JoinType FullJoin; + public static NHibernate.SqlCommand.JoinType InnerJoin; + public static NHibernate.SqlCommand.JoinType LeftJoin; + public static NHibernate.Transform.IResultTransformer Projection; + public static string RootAlias; + public static NHibernate.Transform.IResultTransformer RootEntity; + } + + // Generated from `NHibernate.Criterion.CriterionUtil` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CriterionUtil + { + public static NHibernate.SqlCommand.SqlString[] GetColumnNames(string propertyName, NHibernate.Criterion.IProjection projection, NHibernate.Criterion.ICriteriaQuery criteriaQuery, NHibernate.ICriteria criteria) => throw null; + public static NHibernate.SqlCommand.SqlString[] GetColumnNamesForSimpleExpression(string propertyName, NHibernate.Criterion.IProjection projection, NHibernate.Criterion.ICriteriaQuery criteriaQuery, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriterion criterion, object value) => throw null; + public static NHibernate.Engine.TypedValue GetTypedValue(NHibernate.Criterion.ICriteriaQuery criteriaQuery, NHibernate.ICriteria criteria, NHibernate.Criterion.IProjection projection, string propertyName, object value) => throw null; + public static NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.Criterion.ICriteriaQuery criteriaQuery, NHibernate.ICriteria criteria, NHibernate.Criterion.IProjection projection, string propertyName, params object[] values) => throw null; + } + + // Generated from `NHibernate.Criterion.DetachedCriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DetachedCriteria + { + public NHibernate.Criterion.DetachedCriteria Add(NHibernate.Criterion.ICriterion criterion) => throw null; + public NHibernate.Criterion.DetachedCriteria AddOrder(NHibernate.Criterion.Order order) => throw null; + public string Alias { get => throw null; } + public void ClearOrders() => throw null; + public NHibernate.Criterion.DetachedCriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateAlias(string associationPath, string alias) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateCriteria(string associationPath, string alias) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateCriteria(string associationPath, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.DetachedCriteria CreateCriteria(string associationPath) => throw null; + protected internal DetachedCriteria(NHibernate.Impl.CriteriaImpl impl, NHibernate.ICriteria criteria) => throw null; + protected DetachedCriteria(string entityName, string alias) => throw null; + protected DetachedCriteria(string entityName) => throw null; + protected DetachedCriteria(System.Type entityType, string alias) => throw null; + protected DetachedCriteria(System.Type entityType) => throw null; + public string EntityOrClassName { get => throw null; } + public static NHibernate.Criterion.DetachedCriteria For(string alias) => throw null; + public static NHibernate.Criterion.DetachedCriteria For() => throw null; + public static NHibernate.Criterion.DetachedCriteria For(System.Type entityType, string alias) => throw null; + public static NHibernate.Criterion.DetachedCriteria For(System.Type entityType) => throw null; + public static NHibernate.Criterion.DetachedCriteria ForEntityName(string entityName, string alias) => throw null; + public static NHibernate.Criterion.DetachedCriteria ForEntityName(string entityName) => throw null; + public NHibernate.Criterion.DetachedCriteria GetCriteriaByAlias(string alias) => throw null; + public NHibernate.Criterion.DetachedCriteria GetCriteriaByPath(string path) => throw null; + protected internal NHibernate.Impl.CriteriaImpl GetCriteriaImpl() => throw null; + public NHibernate.ICriteria GetExecutableCriteria(NHibernate.IStatelessSession session) => throw null; + public NHibernate.ICriteria GetExecutableCriteria(NHibernate.ISession session) => throw null; + public System.Type GetRootEntityTypeIfAvailable() => throw null; + public NHibernate.Criterion.DetachedCriteria SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.Criterion.DetachedCriteria SetCacheRegion(string region) => throw null; + public NHibernate.Criterion.DetachedCriteria SetCacheable(bool cacheable) => throw null; + public NHibernate.Criterion.DetachedCriteria SetFetchMode(string associationPath, NHibernate.FetchMode mode) => throw null; + public NHibernate.Criterion.DetachedCriteria SetFirstResult(int firstResult) => throw null; + public NHibernate.Criterion.DetachedCriteria SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + public NHibernate.Criterion.DetachedCriteria SetLockMode(NHibernate.LockMode lockMode) => throw null; + public NHibernate.Criterion.DetachedCriteria SetMaxResults(int maxResults) => throw null; + public NHibernate.Criterion.DetachedCriteria SetProjection(NHibernate.Criterion.IProjection projection) => throw null; + public NHibernate.Criterion.DetachedCriteria SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.Disjunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Disjunction : NHibernate.Criterion.Junction + { + public Disjunction() => throw null; + protected override NHibernate.SqlCommand.SqlString EmptyExpression { get => throw null; } + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.Distinct` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Distinct : NHibernate.Criterion.IProjection + { + public virtual string[] Aliases { get => throw null; } + public Distinct(NHibernate.Criterion.IProjection proj) => throw null; + public virtual string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public bool IsAggregate { get => throw null; } + public virtual bool IsGrouped { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.EntityProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityProjection : NHibernate.Criterion.IProjection + { + string[] NHibernate.Criterion.IProjection.Aliases { get => throw null; } + public EntityProjection(System.Type entityType, string entityAlias) => throw null; + public EntityProjection() => throw null; + public bool FetchLazyProperties { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection FetchLazyPropertyGroups { get => throw null; set => throw null; } + string[] NHibernate.Criterion.IProjection.GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + string[] NHibernate.Criterion.IProjection.GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + NHibernate.Engine.TypedValue[] NHibernate.Criterion.IProjection.GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + NHibernate.Type.IType[] NHibernate.Criterion.IProjection.GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + NHibernate.Type.IType[] NHibernate.Criterion.IProjection.GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + bool NHibernate.Criterion.IProjection.IsAggregate { get => throw null; } + bool NHibernate.Criterion.IProjection.IsGrouped { get => throw null; } + public bool Lazy { get => throw null; set => throw null; } + public NHibernate.Criterion.EntityProjection SetFetchLazyProperties(bool fetchLazyProperties = default(bool)) => throw null; + public NHibernate.Criterion.EntityProjection SetFetchLazyPropertyGroups(params string[] lazyPropertyGroups) => throw null; + public NHibernate.Criterion.EntityProjection SetLazy(bool lazy = default(bool)) => throw null; + NHibernate.SqlCommand.SqlString NHibernate.Criterion.IProjection.ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + NHibernate.SqlCommand.SqlString NHibernate.Criterion.IProjection.ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.EqPropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EqPropertyExpression : NHibernate.Criterion.PropertyExpression + { + public EqPropertyExpression(string lhsPropertyName, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public EqPropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public EqPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public EqPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.Example` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Example : NHibernate.Criterion.AbstractCriterion + { + protected void AddComponentTypedValues(string path, object component, NHibernate.Type.IAbstractComponentType type, System.Collections.IList list, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + protected void AddPropertyTypedValue(object value, NHibernate.Type.IType type, System.Collections.IList list) => throw null; + protected static NHibernate.Criterion.Example.IPropertySelector All; + protected void AppendComponentCondition(string path, object component, NHibernate.Type.IAbstractComponentType type, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery, NHibernate.SqlCommand.SqlStringBuilder builder) => throw null; + protected void AppendPropertyCondition(string propertyName, object propertyValue, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery cq, NHibernate.SqlCommand.SqlStringBuilder builder) => throw null; + public static NHibernate.Criterion.Example Create(object entity) => throw null; + public NHibernate.Criterion.Example EnableLike(NHibernate.Criterion.MatchMode matchMode) => throw null; + public NHibernate.Criterion.Example EnableLike() => throw null; + protected Example(object entity, NHibernate.Criterion.Example.IPropertySelector selector) => throw null; + public NHibernate.Criterion.Example ExcludeNone() => throw null; + public NHibernate.Criterion.Example ExcludeNulls() => throw null; + public NHibernate.Criterion.Example ExcludeProperty(string name) => throw null; + public NHibernate.Criterion.Example ExcludeZeroes() => throw null; + protected virtual NHibernate.Criterion.ICriterion GetNotNullPropertyCriterion(object propertyValue, string propertyName) => throw null; + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + // Generated from `NHibernate.Criterion.Example+IPropertySelector` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertySelector + { + bool Include(object propertyValue, string propertyName, NHibernate.Type.IType type); + } + + + public NHibernate.Criterion.Example IgnoreCase() => throw null; + protected static NHibernate.Criterion.Example.IPropertySelector NotNullOrEmptyString; + protected static NHibernate.Criterion.Example.IPropertySelector NotNullOrZero; + public virtual NHibernate.Criterion.Example SetEscapeCharacter(System.Char? escapeCharacter) => throw null; + public NHibernate.Criterion.Example SetPropertySelector(NHibernate.Criterion.Example.IPropertySelector selector) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.ExistsSubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExistsSubqueryExpression : NHibernate.Criterion.SubqueryExpression + { + internal ExistsSubqueryExpression(string quantifier, NHibernate.Criterion.DetachedCriteria dc) : base(default(string), default(string), default(NHibernate.Criterion.DetachedCriteria)) => throw null; + protected override NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery outerQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.Expression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Expression : NHibernate.Criterion.Restrictions + { + public static NHibernate.Criterion.AbstractCriterion Sql(string sql, object[] values, NHibernate.Type.IType[] types) => throw null; + public static NHibernate.Criterion.AbstractCriterion Sql(string sql, object value, NHibernate.Type.IType type) => throw null; + public static NHibernate.Criterion.AbstractCriterion Sql(string sql) => throw null; + public static NHibernate.Criterion.AbstractCriterion Sql(NHibernate.SqlCommand.SqlString sql, object[] values, NHibernate.Type.IType[] types) => throw null; + public static NHibernate.Criterion.AbstractCriterion Sql(NHibernate.SqlCommand.SqlString sql, object value, NHibernate.Type.IType type) => throw null; + public static NHibernate.Criterion.AbstractCriterion Sql(NHibernate.SqlCommand.SqlString sql) => throw null; + } + + // Generated from `NHibernate.Criterion.GePropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GePropertyExpression : NHibernate.Criterion.PropertyExpression + { + public GePropertyExpression(string lhsPropertyName, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GePropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GePropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GePropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.GroupedProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GroupedProjection : NHibernate.Criterion.IProjection + { + public virtual string[] Aliases { get => throw null; } + public string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public GroupedProjection(NHibernate.Criterion.IProjection projection) => throw null; + public bool IsAggregate { get => throw null; } + public virtual bool IsGrouped { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.GtPropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GtPropertyExpression : NHibernate.Criterion.PropertyExpression + { + public GtPropertyExpression(string lhsPropertyName, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GtPropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GtPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public GtPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.ICriteriaQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICriteriaQuery + { + System.Collections.Generic.ICollection CollectedParameterSpecifications { get; } + System.Collections.Generic.ICollection CollectedParameters { get; } + NHibernate.SqlCommand.Parameter CreateSkipParameter(int value); + NHibernate.SqlCommand.Parameter CreateTakeParameter(int value); + NHibernate.Engine.ISessionFactoryImplementor Factory { get; } + string GenerateSQLAlias(); + string GetColumn(NHibernate.ICriteria criteria, string propertyPath); + string[] GetColumnAliasesUsingProjection(NHibernate.ICriteria criteria, string propertyPath); + string[] GetColumns(NHibernate.ICriteria criteria, string propertyPath); + string[] GetColumnsUsingProjection(NHibernate.ICriteria criteria, string propertyPath); + string GetEntityName(NHibernate.ICriteria criteria, string propertyPath); + string GetEntityName(NHibernate.ICriteria criteria); + string[] GetIdentifierColumns(NHibernate.ICriteria subcriteria); + NHibernate.Type.IType GetIdentifierType(NHibernate.ICriteria subcriteria); + int GetIndexForAlias(); + string GetPropertyName(string propertyName); + string GetSQLAlias(NHibernate.ICriteria subcriteria); + string GetSQLAlias(NHibernate.ICriteria criteria, string propertyPath); + NHibernate.Type.IType GetType(NHibernate.ICriteria criteria, string propertyPath); + NHibernate.Type.IType GetTypeUsingProjection(NHibernate.ICriteria criteria, string propertyPath); + NHibernate.Engine.TypedValue GetTypedIdentifierValue(NHibernate.ICriteria subcriteria, object value); + NHibernate.Engine.TypedValue GetTypedValue(NHibernate.ICriteria criteria, string propertyPath, object value); + System.Collections.Generic.IEnumerable NewQueryParameter(NHibernate.Engine.TypedValue parameter); + } + + // Generated from `NHibernate.Criterion.ICriterion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICriterion + { + NHibernate.Criterion.IProjection[] GetProjections(); + NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + } + + // Generated from `NHibernate.Criterion.IProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProjection + { + string[] Aliases { get; } + string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + bool IsAggregate { get; } + bool IsGrouped { get; } + NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + } + + // Generated from `NHibernate.Criterion.IPropertyProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyProjection + { + string PropertyName { get; } + } + + // Generated from `NHibernate.Criterion.ISupportEntityJoinQueryOver<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportEntityJoinQueryOver + { + NHibernate.IQueryOver JoinEntityQueryOver(System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName); + } + + // Generated from `NHibernate.Criterion.ISupportSelectModeQueryOver<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportSelectModeQueryOver + { + NHibernate.IQueryOver Fetch(NHibernate.SelectMode mode, System.Linq.Expressions.Expression> path); + } + + // Generated from `NHibernate.Criterion.IdentifierEqExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierEqExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public IdentifierEqExpression(object value) => throw null; + public IdentifierEqExpression(NHibernate.Criterion.IProjection projection) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.IdentifierProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierProjection : NHibernate.Criterion.SimpleProjection, NHibernate.Criterion.IPropertyProjection + { + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + protected internal IdentifierProjection(bool grouped) => throw null; + protected internal IdentifierProjection() => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public string PropertyName { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.InExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public InExpression(string propertyName, object[] values) => throw null; + public InExpression(NHibernate.Criterion.IProjection projection, object[] values) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + public object[] Values { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Criterion.InsensitiveLikeExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsensitiveLikeExpression : NHibernate.Criterion.AbstractCriterion + { + public NHibernate.Engine.TypedValue GetParameterTypedValue(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public InsensitiveLikeExpression(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public InsensitiveLikeExpression(string propertyName, object value) => throw null; + public InsensitiveLikeExpression(NHibernate.Criterion.IProjection projection, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public InsensitiveLikeExpression(NHibernate.Criterion.IProjection projection, object value) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.IsEmptyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IsEmptyExpression : NHibernate.Criterion.AbstractEmptinessExpression + { + protected override bool ExcludeEmpty { get => throw null; } + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public IsEmptyExpression(string propertyName) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Criterion.IsNotEmptyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IsNotEmptyExpression : NHibernate.Criterion.AbstractEmptinessExpression + { + protected override bool ExcludeEmpty { get => throw null; } + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public IsNotEmptyExpression(string propertyName) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Criterion.Junction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Junction : NHibernate.Criterion.AbstractCriterion + { + public NHibernate.Criterion.Junction Add(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Junction Add(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Junction Add(NHibernate.Criterion.ICriterion criterion) => throw null; + protected abstract NHibernate.SqlCommand.SqlString EmptyExpression { get; } + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + protected Junction() => throw null; + protected abstract string Op { get; } + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.LePropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LePropertyExpression : NHibernate.Criterion.PropertyExpression + { + public LePropertyExpression(string lhsPropertyName, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LePropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LePropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LePropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.LikeExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LikeExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public LikeExpression(string propertyName, string value, System.Char? escapeChar, bool ignoreCase) => throw null; + public LikeExpression(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode, System.Char? escapeChar, bool ignoreCase) => throw null; + public LikeExpression(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public LikeExpression(string propertyName, string value) => throw null; + public LikeExpression(NHibernate.Criterion.IProjection projection, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.LogicalExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class LogicalExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + protected NHibernate.Criterion.ICriterion LeftHandSide { get => throw null; } + protected LogicalExpression(NHibernate.Criterion.ICriterion lhs, NHibernate.Criterion.ICriterion rhs) => throw null; + protected abstract string Op { get; } + protected NHibernate.Criterion.ICriterion RightHandSide { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.LtPropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LtPropertyExpression : NHibernate.Criterion.PropertyExpression + { + public LtPropertyExpression(string lhsPropertyName, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LtPropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LtPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + public LtPropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) : base(default(NHibernate.Criterion.IProjection), default(NHibernate.Criterion.IProjection)) => throw null; + protected override string Op { get => throw null; } + } + + // Generated from `NHibernate.Criterion.MatchMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class MatchMode + { + public static NHibernate.Criterion.MatchMode Anywhere; + public static NHibernate.Criterion.MatchMode End; + public static NHibernate.Criterion.MatchMode Exact; + protected MatchMode(int intCode, string name) => throw null; + public static NHibernate.Criterion.MatchMode Start; + public abstract string ToMatchString(string pattern); + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.NaturalIdentifier` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NaturalIdentifier : NHibernate.Criterion.ICriterion + { + public NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NaturalIdentifier() => throw null; + public NHibernate.Criterion.NaturalIdentifier Set(string property, object value) => throw null; + public NHibernate.Criterion.Lambda.LambdaNaturalIdentifierBuilder Set(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.LambdaNaturalIdentifierBuilder Set(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.NotExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NotExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NotExpression(NHibernate.Criterion.ICriterion criterion) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.NotNullExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NotNullExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NotNullExpression(string propertyName) => throw null; + public NotNullExpression(NHibernate.Criterion.IProjection projection) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.NullExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NullExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NullExpression(string propertyName) => throw null; + public NullExpression(NHibernate.Criterion.IProjection projection) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.NullSubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NullSubqueryExpression : NHibernate.Criterion.SubqueryExpression + { + internal NullSubqueryExpression(string quantifier, NHibernate.Criterion.DetachedCriteria dc) : base(default(string), default(string), default(NHibernate.Criterion.DetachedCriteria)) => throw null; + protected override NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery outerQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.OrExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OrExpression : NHibernate.Criterion.LogicalExpression + { + protected override string Op { get => throw null; } + public OrExpression(NHibernate.Criterion.ICriterion lhs, NHibernate.Criterion.ICriterion rhs) : base(default(NHibernate.Criterion.ICriterion), default(NHibernate.Criterion.ICriterion)) => throw null; + } + + // Generated from `NHibernate.Criterion.Order` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Order + { + public static NHibernate.Criterion.Order Asc(string propertyName) => throw null; + public static NHibernate.Criterion.Order Asc(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.Order Desc(string propertyName) => throw null; + public static NHibernate.Criterion.Order Desc(NHibernate.Criterion.IProjection projection) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Criterion.Order IgnoreCase() => throw null; + public Order(string propertyName, bool ascending) => throw null; + public Order(NHibernate.Criterion.IProjection projection, bool ascending) => throw null; + public virtual NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + protected bool ascending; + protected NHibernate.Criterion.IProjection projection; + protected string propertyName; + } + + // Generated from `NHibernate.Criterion.ProjectionList` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProjectionList : NHibernate.Criterion.IProjection + { + public NHibernate.Criterion.ProjectionList Add(NHibernate.Criterion.IProjection projection, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.ProjectionList Add(NHibernate.Criterion.IProjection projection, string alias) => throw null; + public NHibernate.Criterion.ProjectionList Add(NHibernate.Criterion.IProjection proj) => throw null; + public string[] Aliases { get => throw null; } + public NHibernate.Criterion.ProjectionList Create() => throw null; + public string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public bool IsAggregate { get => throw null; } + public bool IsGrouped { get => throw null; } + public NHibernate.Criterion.IProjection this[int index] { get => throw null; } + public int Length { get => throw null; } + protected internal ProjectionList() => throw null; + public NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.Projections` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Projections + { + public static NHibernate.Criterion.IProjection Alias(NHibernate.Criterion.IProjection projection, string alias) => throw null; + public static NHibernate.Criterion.AggregateProjection Avg(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Avg(string propertyName) => throw null; + public static NHibernate.Criterion.AggregateProjection Avg(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Avg(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.IProjection Cast(NHibernate.Type.IType type, NHibernate.Criterion.IProjection projection) => throw null; + public static string Concat(params string[] strings) => throw null; + public static NHibernate.Criterion.IProjection Conditional(NHibernate.Criterion.ICriterion criterion, NHibernate.Criterion.IProjection whenTrue, NHibernate.Criterion.IProjection whenFalse) => throw null; + public static NHibernate.Criterion.IProjection Constant(object obj, NHibernate.Type.IType type) => throw null; + public static NHibernate.Criterion.IProjection Constant(object obj) => throw null; + public static NHibernate.Criterion.CountProjection Count(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.CountProjection Count(string propertyName) => throw null; + public static NHibernate.Criterion.CountProjection Count(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.CountProjection Count(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.CountProjection CountDistinct(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.CountProjection CountDistinct(string propertyName) => throw null; + public static NHibernate.Criterion.CountProjection CountDistinct(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.CountProjection CountDistinct(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.IProjection Distinct(NHibernate.Criterion.IProjection proj) => throw null; + public static NHibernate.Criterion.EntityProjection Entity(string alias) => throw null; + public static NHibernate.Criterion.EntityProjection Entity(System.Linq.Expressions.Expression> alias) => throw null; + public static NHibernate.Criterion.EntityProjection Entity(System.Type type, string alias) => throw null; + public static NHibernate.Criterion.PropertyProjection Group(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.PropertyProjection Group(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.IProjection GroupProjection(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.IProjection GroupProjection(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.PropertyProjection GroupProperty(string propertyName) => throw null; + public static NHibernate.Criterion.GroupedProjection GroupProperty(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.IdentifierProjection Id() => throw null; + public static NHibernate.Criterion.AggregateProjection Max(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Max(string propertyName) => throw null; + public static NHibernate.Criterion.AggregateProjection Max(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Max(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AggregateProjection Min(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Min(string propertyName) => throw null; + public static NHibernate.Criterion.AggregateProjection Min(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Min(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.ProjectionList ProjectionList() => throw null; + public static NHibernate.Criterion.PropertyProjection Property(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.PropertyProjection Property(string propertyName) => throw null; + public static NHibernate.Criterion.PropertyProjection Property(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.EntityProjection RootEntity() => throw null; + public static NHibernate.Criterion.IProjection RowCount() => throw null; + public static NHibernate.Criterion.IProjection RowCountInt64() => throw null; + public static NHibernate.Criterion.IProjection SqlFunction(string functionName, NHibernate.Type.IType type, params NHibernate.Criterion.IProjection[] projections) => throw null; + public static NHibernate.Criterion.IProjection SqlFunction(NHibernate.Dialect.Function.ISQLFunction function, NHibernate.Type.IType type, params NHibernate.Criterion.IProjection[] projections) => throw null; + public static NHibernate.Criterion.IProjection SqlGroupProjection(string sql, string groupBy, string[] columnAliases, NHibernate.Type.IType[] types) => throw null; + public static NHibernate.Criterion.IProjection SqlProjection(string sql, string[] columnAliases, NHibernate.Type.IType[] types) => throw null; + public static NHibernate.Criterion.IProjection SubQuery(NHibernate.Criterion.QueryOver detachedQueryOver) => throw null; + public static NHibernate.Criterion.IProjection SubQuery(NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public static NHibernate.Criterion.AggregateProjection Sum(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Sum(string propertyName) => throw null; + public static NHibernate.Criterion.AggregateProjection Sum(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AggregateProjection Sum(NHibernate.Criterion.IProjection projection) => throw null; + } + + // Generated from `NHibernate.Criterion.ProjectionsExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ProjectionsExtensions + { + public static int Abs(this int numericProperty) => throw null; + public static double Abs(this double numericProperty) => throw null; + public static System.Int64 Abs(this System.Int64 numericProperty) => throw null; + public static T AsEntity(this T alias) where T : class => throw null; + public static int BitLength(this string stringProperty) => throw null; + public static int CharIndex(this string stringProperty, string theChar, int startLocation) => throw null; + public static T? Coalesce(this T? objectProperty, T replaceValueIfIsNull) where T : struct => throw null; + public static T Coalesce(this T objectProperty, T replaceValueIfIsNull) => throw null; + public static string Lower(this string stringProperty) => throw null; + public static int Mod(this int numericProperty, int divisor) => throw null; + public static double Sqrt(this int numericProperty) => throw null; + public static double Sqrt(this double numericProperty) => throw null; + public static double Sqrt(this System.Int64 numericProperty) => throw null; + public static double Sqrt(this System.Decimal numericProperty) => throw null; + public static double Sqrt(this System.Byte numericProperty) => throw null; + public static int StrLength(this string stringProperty) => throw null; + public static string Substr(this string stringProperty, int startIndex, int length) => throw null; + public static string TrimStr(this string stringProperty) => throw null; + public static string Upper(this string stringProperty) => throw null; + public static NHibernate.Criterion.IProjection WithAlias(this NHibernate.Criterion.IProjection projection, string alias) => throw null; + public static NHibernate.Criterion.IProjection WithAlias(this NHibernate.Criterion.IProjection projection, System.Linq.Expressions.Expression> alias) => throw null; + } + + // Generated from `NHibernate.Criterion.Property` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Property : NHibernate.Criterion.PropertyProjection + { + public NHibernate.Criterion.Order Asc() => throw null; + public NHibernate.Criterion.AggregateProjection Avg() => throw null; + public NHibernate.Criterion.AbstractCriterion Between(object min, object max) => throw null; + public NHibernate.Criterion.AbstractCriterion Bt(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.CountProjection Count() => throw null; + public NHibernate.Criterion.Order Desc() => throw null; + public NHibernate.Criterion.AbstractCriterion Eq(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Eq(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion EqAll(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion EqProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion EqProperty(NHibernate.Criterion.Property other) => throw null; + public static NHibernate.Criterion.Property ForName(string propertyName) => throw null; + public NHibernate.Criterion.AbstractCriterion Ge(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Ge(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion GeAll(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion GeProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion GeProperty(NHibernate.Criterion.Property other) => throw null; + public NHibernate.Criterion.AbstractCriterion GeSome(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.Property GetProperty(string propertyName) => throw null; + public NHibernate.Criterion.PropertyProjection Group() => throw null; + public NHibernate.Criterion.AbstractCriterion Gt(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion GtAll(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion GtProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion GtProperty(NHibernate.Criterion.Property other) => throw null; + public NHibernate.Criterion.AbstractCriterion GtSome(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion In(object[] values) => throw null; + public NHibernate.Criterion.AbstractCriterion In(System.Collections.ICollection values) => throw null; + public NHibernate.Criterion.AbstractCriterion In(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractEmptinessExpression IsEmpty() => throw null; + public NHibernate.Criterion.AbstractEmptinessExpression IsNotEmpty() => throw null; + public NHibernate.Criterion.AbstractCriterion IsNotNull() => throw null; + public NHibernate.Criterion.AbstractCriterion IsNull() => throw null; + public NHibernate.Criterion.AbstractCriterion Le(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Le(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion LeAll(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion LeProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion LeProperty(NHibernate.Criterion.Property other) => throw null; + public NHibernate.Criterion.AbstractCriterion LeSome(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion Like(string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public NHibernate.Criterion.AbstractCriterion Like(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Lt(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Lt(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion LtAll(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion LtProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion LtProperty(NHibernate.Criterion.Property other) => throw null; + public NHibernate.Criterion.AbstractCriterion LtSome(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AggregateProjection Max() => throw null; + public NHibernate.Criterion.AggregateProjection Min() => throw null; + public NHibernate.Criterion.AbstractCriterion Ne(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + public NHibernate.Criterion.AbstractCriterion NotEqProperty(string other) => throw null; + public NHibernate.Criterion.AbstractCriterion NotEqProperty(NHibernate.Criterion.Property other) => throw null; + public NHibernate.Criterion.AbstractCriterion NotIn(NHibernate.Criterion.DetachedCriteria subselect) => throw null; + internal Property(string propertyName) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Criterion.PropertyExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class PropertyExpression : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + protected abstract string Op { get; } + protected PropertyExpression(string lhsPropertyName, string rhsPropertyName) => throw null; + protected PropertyExpression(string lhsPropertyName, NHibernate.Criterion.IProjection rhsProjection) => throw null; + protected PropertyExpression(NHibernate.Criterion.IProjection lhsProjection, string rhsPropertyName) => throw null; + protected PropertyExpression(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.PropertyProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyProjection : NHibernate.Criterion.SimpleProjection, NHibernate.Criterion.IPropertyProjection + { + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public string PropertyName { get => throw null; } + protected internal PropertyProjection(string propertyName, bool grouped) => throw null; + protected internal PropertyProjection(string propertyName) => throw null; + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.PropertySubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertySubqueryExpression : NHibernate.Criterion.SubqueryExpression + { + internal PropertySubqueryExpression(string propertyName, string op, string quantifier, NHibernate.Criterion.DetachedCriteria dc) : base(default(string), default(string), default(NHibernate.Criterion.DetachedCriteria)) => throw null; + protected override NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.QueryOver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class QueryOver + { + public NHibernate.Criterion.DetachedCriteria DetachedCriteria { get => throw null; } + public static NHibernate.Criterion.QueryOver Of(string entityName, System.Linq.Expressions.Expression> alias) => throw null; + public static NHibernate.Criterion.QueryOver Of(string entityName) => throw null; + public static NHibernate.Criterion.QueryOver Of(System.Linq.Expressions.Expression> alias) => throw null; + public static NHibernate.Criterion.QueryOver Of() => throw null; + protected QueryOver() => throw null; + public NHibernate.ICriteria RootCriteria { get => throw null; } + public NHibernate.ICriteria UnderlyingCriteria { get => throw null; } + protected NHibernate.ICriteria criteria; + protected NHibernate.Impl.CriteriaImpl impl; + } + + // Generated from `NHibernate.Criterion.QueryOver<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOver : NHibernate.Criterion.QueryOver, NHibernate.IQueryOver, NHibernate.IQueryOver, NHibernate.IQueryOver, NHibernate.Criterion.ISupportSelectModeQueryOver, NHibernate.Criterion.ISupportEntityJoinQueryOver + { + public NHibernate.Criterion.QueryOver And(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver And(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver And(NHibernate.Criterion.ICriterion expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.And(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.And(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.And(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.Criterion.QueryOver AndNot(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver AndNot(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver AndNot(NHibernate.Criterion.ICriterion expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.AndNot(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.AndNot(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.AndNot(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder AndRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder AndRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder NHibernate.IQueryOver.AndRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder NHibernate.IQueryOver.AndRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver Fetch(NHibernate.SelectMode mode, System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverFetchBuilder Fetch(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.IQueryOver NHibernate.Criterion.ISupportSelectModeQueryOver.Fetch(NHibernate.SelectMode mode, System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverFetchBuilder NHibernate.IQueryOver.Fetch(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverJoinBuilder Full { get => throw null; } + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder NHibernate.IQueryOver.Full { get => throw null; } + public NHibernate.Criterion.Lambda.QueryOverJoinBuilder Inner { get => throw null; } + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder NHibernate.IQueryOver.Inner { get => throw null; } + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinEntityQueryOver(System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + public NHibernate.Criterion.QueryOver JoinEntityQueryOver(System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType = default(NHibernate.SqlCommand.JoinType), string entityName = default(string)) => throw null; + NHibernate.IQueryOver NHibernate.Criterion.ISupportEntityJoinQueryOver.JoinEntityQueryOver(System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path, NHibernate.SqlCommand.JoinType joinType) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverJoinBuilder Left { get => throw null; } + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder NHibernate.IQueryOver.Left { get => throw null; } + public NHibernate.Criterion.Lambda.QueryOverLockBuilder Lock(System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.Lambda.QueryOverLockBuilder Lock() => throw null; + NHibernate.Criterion.Lambda.IQueryOverLockBuilder NHibernate.IQueryOver.Lock(System.Linq.Expressions.Expression> alias) => throw null; + NHibernate.Criterion.Lambda.IQueryOverLockBuilder NHibernate.IQueryOver.Lock() => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder OrderBy(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder OrderBy(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder OrderBy(NHibernate.Criterion.IProjection projection) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.OrderBy(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.OrderBy(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.OrderBy(NHibernate.Criterion.IProjection projection) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder OrderByAlias(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.OrderByAlias(System.Linq.Expressions.Expression> path) => throw null; + protected internal QueryOver(string entityName, System.Linq.Expressions.Expression> alias) => throw null; + protected internal QueryOver(string entityName) => throw null; + protected internal QueryOver(System.Linq.Expressions.Expression> alias) => throw null; + protected internal QueryOver(NHibernate.Impl.CriteriaImpl rootImpl, NHibernate.ICriteria criteria) => throw null; + protected internal QueryOver(NHibernate.Impl.CriteriaImpl impl) => throw null; + protected internal QueryOver() => throw null; + public NHibernate.Criterion.Lambda.QueryOverJoinBuilder Right { get => throw null; } + NHibernate.Criterion.Lambda.IQueryOverJoinBuilder NHibernate.IQueryOver.Right { get => throw null; } + public NHibernate.Criterion.QueryOver Select(params System.Linq.Expressions.Expression>[] projections) => throw null; + public NHibernate.Criterion.QueryOver Select(params NHibernate.Criterion.IProjection[] projections) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Select(params System.Linq.Expressions.Expression>[] projections) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Select(params NHibernate.Criterion.IProjection[] projections) => throw null; + public NHibernate.Criterion.QueryOver SelectList(System.Func, NHibernate.Criterion.Lambda.QueryOverProjectionBuilder> list) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.SelectList(System.Func, NHibernate.Criterion.Lambda.QueryOverProjectionBuilder> list) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder ThenBy(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder ThenBy(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder ThenBy(NHibernate.Criterion.IProjection projection) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.ThenBy(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.ThenBy(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.ThenBy(NHibernate.Criterion.IProjection projection) => throw null; + public NHibernate.Criterion.Lambda.QueryOverOrderBuilder ThenByAlias(System.Linq.Expressions.Expression> path) => throw null; + NHibernate.Criterion.Lambda.IQueryOverOrderBuilder NHibernate.IQueryOver.ThenByAlias(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.QueryOver TransformUsing(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.TransformUsing(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + public NHibernate.Criterion.QueryOver Where(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver Where(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver Where(NHibernate.Criterion.ICriterion expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Where(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Where(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Where(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.Criterion.QueryOver WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.QueryOver WhereNot(NHibernate.Criterion.ICriterion expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.WhereNot(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder WhereRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder WhereRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder NHibernate.IQueryOver.WhereRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder NHibernate.IQueryOver.WhereRestrictionOn(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverSubqueryBuilder WithSubquery { get => throw null; } + NHibernate.Criterion.Lambda.IQueryOverSubqueryBuilder NHibernate.IQueryOver.WithSubquery { get => throw null; } + } + + // Generated from `NHibernate.Criterion.QueryOver<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class QueryOver : NHibernate.Criterion.QueryOver, NHibernate.IQueryOver, NHibernate.IQueryOver + { + public S As() => throw null; + public NHibernate.Criterion.QueryOver CacheMode(NHibernate.CacheMode cacheMode) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.CacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.Criterion.QueryOver CacheRegion(string cacheRegion) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.CacheRegion(string cacheRegion) => throw null; + public NHibernate.Criterion.QueryOver Cacheable() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Cacheable() => throw null; + public NHibernate.Criterion.QueryOver ClearOrders() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.ClearOrders() => throw null; + public NHibernate.Criterion.QueryOver Clone() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Clone() => throw null; + protected internal NHibernate.Criterion.QueryOver Create(NHibernate.ICriteria criteria) => throw null; + NHibernate.IFutureEnumerable NHibernate.IQueryOver.Future() => throw null; + NHibernate.IFutureEnumerable NHibernate.IQueryOver.Future() => throw null; + NHibernate.IFutureValue NHibernate.IQueryOver.FutureValue() => throw null; + NHibernate.IFutureValue NHibernate.IQueryOver.FutureValue() => throw null; + public NHibernate.IQueryOver GetExecutableQueryOver(NHibernate.IStatelessSession session) => throw null; + public NHibernate.IQueryOver GetExecutableQueryOver(NHibernate.ISession session) => throw null; + System.Collections.Generic.IList NHibernate.IQueryOver.List() => throw null; + System.Collections.Generic.IList NHibernate.IQueryOver.List() => throw null; + System.Threading.Tasks.Task> NHibernate.IQueryOver.ListAsync(System.Threading.CancellationToken cancellationToken) => throw null; + System.Threading.Tasks.Task> NHibernate.IQueryOver.ListAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected QueryOver() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.ReadOnly() => throw null; + int NHibernate.IQueryOver.RowCount() => throw null; + System.Threading.Tasks.Task NHibernate.IQueryOver.RowCountAsync(System.Threading.CancellationToken cancellationToken) => throw null; + System.Int64 NHibernate.IQueryOver.RowCountInt64() => throw null; + System.Threading.Tasks.Task NHibernate.IQueryOver.RowCountInt64Async(System.Threading.CancellationToken cancellationToken) => throw null; + U NHibernate.IQueryOver.SingleOrDefault() => throw null; + TRoot NHibernate.IQueryOver.SingleOrDefault() => throw null; + System.Threading.Tasks.Task NHibernate.IQueryOver.SingleOrDefaultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + System.Threading.Tasks.Task NHibernate.IQueryOver.SingleOrDefaultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Criterion.QueryOver Skip(int firstResult) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Skip(int firstResult) => throw null; + public NHibernate.Criterion.QueryOver Take(int maxResults) => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.Take(int maxResults) => throw null; + public NHibernate.Criterion.QueryOver ToRowCountInt64Query() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.ToRowCountInt64Query() => throw null; + public NHibernate.Criterion.QueryOver ToRowCountQuery() => throw null; + NHibernate.IQueryOver NHibernate.IQueryOver.ToRowCountQuery() => throw null; + } + + // Generated from `NHibernate.Criterion.QueryOverBuilderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class QueryOverBuilderExtensions + { + public static NHibernate.IQueryOver Asc(this NHibernate.Criterion.Lambda.IQueryOverOrderBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Asc(this NHibernate.Criterion.Lambda.QueryOverOrderBuilder builder) => throw null; + public static NHibernate.IQueryOver Default(this NHibernate.Criterion.Lambda.IQueryOverFetchBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Default(this NHibernate.Criterion.Lambda.QueryOverFetchBuilder builder) => throw null; + public static NHibernate.IQueryOver Desc(this NHibernate.Criterion.Lambda.IQueryOverOrderBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Desc(this NHibernate.Criterion.Lambda.QueryOverOrderBuilder builder) => throw null; + public static NHibernate.IQueryOver Eager(this NHibernate.Criterion.Lambda.IQueryOverFetchBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Eager(this NHibernate.Criterion.Lambda.QueryOverFetchBuilder builder) => throw null; + public static NHibernate.IQueryOver Force(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Force(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + public static NHibernate.IQueryOver IsEmpty(this NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver IsEmpty(this NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.IQueryOver IsNotEmpty(this NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver IsNotEmpty(this NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.IQueryOver IsNotNull(this NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver IsNotNull(this NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.IQueryOver IsNull(this NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver IsNull(this NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder builder) => throw null; + public static NHibernate.IQueryOver Lazy(this NHibernate.Criterion.Lambda.IQueryOverFetchBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Lazy(this NHibernate.Criterion.Lambda.QueryOverFetchBuilder builder) => throw null; + public static NHibernate.IQueryOver None(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver None(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + public static NHibernate.IQueryOver Read(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Read(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + public static NHibernate.IQueryOver Upgrade(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Upgrade(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + public static NHibernate.IQueryOver UpgradeNoWait(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver UpgradeNoWait(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + public static NHibernate.IQueryOver Write(this NHibernate.Criterion.Lambda.IQueryOverLockBuilder builder) => throw null; + public static NHibernate.Criterion.QueryOver Write(this NHibernate.Criterion.Lambda.QueryOverLockBuilder builder) => throw null; + } + + // Generated from `NHibernate.Criterion.RestrictionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class RestrictionExtensions + { + public static NHibernate.Criterion.RestrictionExtensions.RestrictionBetweenBuilder IsBetween(this object projection, object lo) => throw null; + public static bool IsIn(this object projection, object[] values) => throw null; + public static bool IsIn(this object projection, System.Collections.ICollection values) => throw null; + public static bool IsInsensitiveLike(this string projection, string comparison, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static bool IsInsensitiveLike(this string projection, string comparison) => throw null; + public static bool IsLike(this string projection, string comparison, NHibernate.Criterion.MatchMode matchMode, System.Char? escapeChar) => throw null; + public static bool IsLike(this string projection, string comparison, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static bool IsLike(this string projection, string comparison) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsBetween(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsInArray(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsInCollection(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsInsensitiveLike(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsInsensitiveLikeMatchMode(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsLike(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsLikeMatchMode(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessIsLikeMatchModeEscapeChar(System.Linq.Expressions.MethodCallExpression methodCallExpression) => throw null; + // Generated from `NHibernate.Criterion.RestrictionExtensions+RestrictionBetweenBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RestrictionBetweenBuilder + { + public bool And(object hi) => throw null; + public RestrictionBetweenBuilder() => throw null; + } + + + } + + // Generated from `NHibernate.Criterion.Restrictions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Restrictions + { + public static NHibernate.Criterion.AbstractCriterion AllEq(System.Collections.IDictionary propertyNameValues) => throw null; + public static NHibernate.Criterion.AbstractCriterion And(NHibernate.Criterion.ICriterion lhs, NHibernate.Criterion.ICriterion rhs) => throw null; + public static NHibernate.Criterion.AbstractCriterion Between(string propertyName, object lo, object hi) => throw null; + public static NHibernate.Criterion.AbstractCriterion Between(NHibernate.Criterion.IProjection projection, object lo, object hi) => throw null; + public static NHibernate.Criterion.Conjunction Conjunction() => throw null; + public static NHibernate.Criterion.Disjunction Disjunction() => throw null; + public static NHibernate.Criterion.SimpleExpression Eq(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Eq(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion EqProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion EqProperty(string propertyName, NHibernate.Criterion.IProjection rshProjection) => throw null; + public static NHibernate.Criterion.AbstractCriterion EqProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion EqProperty(NHibernate.Criterion.IProjection lshProjection, NHibernate.Criterion.IProjection rshProjection) => throw null; + public static NHibernate.Criterion.SimpleExpression Ge(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Ge(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeProperty(string propertyName, NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeProperty(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.SimpleExpression Gt(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Gt(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtProperty(string propertyName, NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtProperty(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.AbstractCriterion IdEq(object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion IdEq(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion In(string propertyName, object[] values) => throw null; + public static NHibernate.Criterion.AbstractCriterion In(string propertyName, System.Collections.ICollection values) => throw null; + public static NHibernate.Criterion.AbstractCriterion In(NHibernate.Criterion.IProjection projection, object[] values) => throw null; + public static NHibernate.Criterion.AbstractCriterion In(NHibernate.Criterion.IProjection projection, System.Collections.ICollection values) => throw null; + public static NHibernate.Criterion.AbstractCriterion InG(string propertyName, System.Collections.Generic.IEnumerable values) => throw null; + public static NHibernate.Criterion.AbstractCriterion InG(NHibernate.Criterion.IProjection projection, System.Collections.Generic.IEnumerable values) => throw null; + public static NHibernate.Criterion.AbstractCriterion InsensitiveLike(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static NHibernate.Criterion.AbstractCriterion InsensitiveLike(string propertyName, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion InsensitiveLike(NHibernate.Criterion.IProjection projection, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static NHibernate.Criterion.AbstractCriterion InsensitiveLike(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractEmptinessExpression IsEmpty(string propertyName) => throw null; + public static NHibernate.Criterion.AbstractEmptinessExpression IsNotEmpty(string propertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNotNull(string propertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNotNull(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNull(string propertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNull(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.SimpleExpression Le(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Le(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeProperty(string propertyName, NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeProperty(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.SimpleExpression Like(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static NHibernate.Criterion.SimpleExpression Like(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Like(NHibernate.Criterion.IProjection projection, string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public static NHibernate.Criterion.SimpleExpression Like(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion Like(string propertyName, string value, NHibernate.Criterion.MatchMode matchMode, System.Char? escapeChar) => throw null; + public static NHibernate.Criterion.SimpleExpression Lt(string propertyName, object value) => throw null; + public static NHibernate.Criterion.SimpleExpression Lt(NHibernate.Criterion.IProjection projection, object value) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtProperty(string propertyName, NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtProperty(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.NaturalIdentifier NaturalId() => throw null; + public static NHibernate.Criterion.AbstractCriterion Not(NHibernate.Criterion.ICriterion expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotEqProperty(string propertyName, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotEqProperty(string propertyName, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotEqProperty(NHibernate.Criterion.IProjection projection, string otherPropertyName) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotEqProperty(NHibernate.Criterion.IProjection lhsProjection, NHibernate.Criterion.IProjection rhsProjection) => throw null; + public static NHibernate.Criterion.Lambda.LambdaRestrictionBuilder On(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.Lambda.LambdaRestrictionBuilder On(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion Or(NHibernate.Criterion.ICriterion lhs, NHibernate.Criterion.ICriterion rhs) => throw null; + internal Restrictions() => throw null; + public static NHibernate.Criterion.ICriterion Where(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.ICriterion Where(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.ICriterion WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.ICriterion WhereNot(System.Linq.Expressions.Expression> expression) => throw null; + } + + // Generated from `NHibernate.Criterion.RowCountInt64Projection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RowCountInt64Projection : NHibernate.Criterion.RowCountProjection + { + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public RowCountInt64Projection() => throw null; + } + + // Generated from `NHibernate.Criterion.RowCountProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RowCountProjection : NHibernate.Criterion.SimpleProjection + { + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + protected internal RowCountProjection() => throw null; + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.SQLCriterion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLCriterion : NHibernate.Criterion.AbstractCriterion + { + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public SQLCriterion(NHibernate.SqlCommand.SqlString sql, object[] values, NHibernate.Type.IType[] types) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.SQLProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLProjection : NHibernate.Criterion.IProjection + { + public string[] Aliases { get => throw null; } + public string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(string alias, int loc) => throw null; + public string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(int loc) => throw null; + public NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria crit, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria crit, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public bool IsAggregate { get => throw null; } + public bool IsGrouped { get => throw null; } + public NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.SelectSubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectSubqueryExpression : NHibernate.Criterion.SubqueryExpression + { + internal SelectSubqueryExpression(NHibernate.Criterion.DetachedCriteria dc) : base(default(string), default(string), default(NHibernate.Criterion.DetachedCriteria)) => throw null; + protected override NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.SimpleExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleExpression : NHibernate.Criterion.AbstractCriterion + { + public NHibernate.Engine.TypedValue GetParameterTypedValue(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Criterion.SimpleExpression IgnoreCase() => throw null; + protected virtual string Op { get => throw null; } + public string PropertyName { get => throw null; } + public SimpleExpression(string propertyName, object value, string op, bool ignoreCase) => throw null; + public SimpleExpression(string propertyName, object value, string op) => throw null; + protected internal SimpleExpression(NHibernate.Criterion.IProjection projection, object value, string op) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + public object Value { get => throw null; } + } + + // Generated from `NHibernate.Criterion.SimpleProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SimpleProjection : NHibernate.Criterion.IProjection + { + public virtual string[] Aliases { get => throw null; } + public NHibernate.Criterion.IProjection As(string alias) => throw null; + public virtual string[] GetColumnAliases(string alias, int loc) => throw null; + public virtual string[] GetColumnAliases(int loc) => throw null; + public string[] GetColumnAliases(string alias, int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public string[] GetColumnAliases(int position, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public virtual NHibernate.Type.IType[] GetTypes(string alias, NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public abstract NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + public abstract bool IsAggregate { get; } + public abstract bool IsGrouped { get; } + protected SimpleProjection() => throw null; + public abstract NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + public abstract NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery); + } + + // Generated from `NHibernate.Criterion.SimpleSubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleSubqueryExpression : NHibernate.Criterion.SubqueryExpression + { + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + internal SimpleSubqueryExpression(object value, string op, string quantifier, NHibernate.Criterion.DetachedCriteria dc) : base(default(string), default(string), default(NHibernate.Criterion.DetachedCriteria)) => throw null; + protected override NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.SqlFunctionProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlFunctionProjection : NHibernate.Criterion.SimpleProjection + { + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + public SqlFunctionProjection(string functionName, NHibernate.Type.IType returnType, params NHibernate.Criterion.IProjection[] args) => throw null; + public SqlFunctionProjection(string functionName, NHibernate.Criterion.IProjection returnTypeProjection, params NHibernate.Criterion.IProjection[] args) => throw null; + public SqlFunctionProjection(NHibernate.Dialect.Function.ISQLFunction function, NHibernate.Type.IType returnType, params NHibernate.Criterion.IProjection[] args) => throw null; + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int position, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + } + + // Generated from `NHibernate.Criterion.Subqueries` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Subqueries + { + public static NHibernate.Criterion.AbstractCriterion Eq(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion EqAll(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Exists(NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Ge(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeAll(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion GeSome(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Gt(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtAll(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion GtSome(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion In(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNotNull(NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion IsNull(NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Le(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeAll(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion LeSome(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Lt(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtAll(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion LtSome(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Ne(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotExists(NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion NotIn(object value, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyEq(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyEqAll(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGe(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGeAll(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGeSome(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGt(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGtAll(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyGtSome(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyIn(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLe(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLeAll(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLeSome(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLt(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLtAll(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyLtSome(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyNe(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion PropertyNotIn(string propertyName, NHibernate.Criterion.DetachedCriteria dc) => throw null; + public static NHibernate.Criterion.AbstractCriterion Select(NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public Subqueries() => throw null; + public static NHibernate.Criterion.AbstractCriterion Where(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion Where(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereAll(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereAll(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereExists(NHibernate.Criterion.QueryOver detachedQuery) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereNotExists(NHibernate.Criterion.QueryOver detachedQuery) => throw null; + public static NHibernate.Criterion.Lambda.LambdaSubqueryBuilder WhereProperty(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.Lambda.LambdaSubqueryBuilder WhereProperty(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereSome(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion WhereSome(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.Lambda.LambdaSubqueryBuilder WhereValue(object value) => throw null; + } + + // Generated from `NHibernate.Criterion.SubqueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SubqueryExpression : NHibernate.Criterion.AbstractCriterion + { + public NHibernate.ICriteria Criteria { get => throw null; } + public override NHibernate.Criterion.IProjection[] GetProjections() => throw null; + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public NHibernate.Type.IType[] GetTypes() => throw null; + protected SubqueryExpression(string op, string quantifier, NHibernate.Criterion.DetachedCriteria dc, bool prefixOp) => throw null; + protected SubqueryExpression(string op, string quantifier, NHibernate.Criterion.DetachedCriteria dc) => throw null; + protected abstract NHibernate.SqlCommand.SqlString ToLeftSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery outerQuery); + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Criterion.SubqueryProjection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubqueryProjection : NHibernate.Criterion.SimpleProjection + { + public override NHibernate.Engine.TypedValue[] GetTypedValues(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.Type.IType[] GetTypes(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override bool IsAggregate { get => throw null; } + public override bool IsGrouped { get => throw null; } + protected internal SubqueryProjection(NHibernate.Criterion.SelectSubqueryExpression subquery) => throw null; + public override NHibernate.SqlCommand.SqlString ToGroupSqlString(NHibernate.ICriteria criteria, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString(NHibernate.ICriteria criteria, int loc, NHibernate.Criterion.ICriteriaQuery criteriaQuery) => throw null; + public override string ToString() => throw null; + } + + namespace Lambda + { + // Generated from `NHibernate.Criterion.Lambda.IQueryOverFetchBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverFetchBuilder : NHibernate.Criterion.Lambda.QueryOverFetchBuilderBase, TRoot, TSubType> + { + public IQueryOverFetchBuilder(NHibernate.IQueryOver root, System.Linq.Expressions.Expression> path) : base(default(NHibernate.IQueryOver), default(System.Linq.Expressions.Expression>)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverJoinBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverJoinBuilder : NHibernate.Criterion.Lambda.QueryOverJoinBuilderBase, TRoot, TSubType> + { + public IQueryOverJoinBuilder(NHibernate.IQueryOver root, NHibernate.SqlCommand.JoinType joinType) : base(default(NHibernate.IQueryOver), default(NHibernate.SqlCommand.JoinType)) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.IQueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverLockBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverLockBuilder : NHibernate.Criterion.Lambda.QueryOverLockBuilderBase, TRoot, TSubType> + { + public IQueryOverLockBuilder(NHibernate.IQueryOver root, System.Linq.Expressions.Expression> alias) : base(default(NHibernate.IQueryOver), default(System.Linq.Expressions.Expression>)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverOrderBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverOrderBuilder : NHibernate.Criterion.Lambda.QueryOverOrderBuilderBase, TRoot, TSubType> + { + public IQueryOverOrderBuilder(NHibernate.IQueryOver root, System.Linq.Expressions.Expression> path, bool isAlias) : base(default(NHibernate.IQueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + public IQueryOverOrderBuilder(NHibernate.IQueryOver root, System.Linq.Expressions.Expression> path) : base(default(NHibernate.IQueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + public IQueryOverOrderBuilder(NHibernate.IQueryOver root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) : base(default(NHibernate.IQueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverRestrictionBuilder : NHibernate.Criterion.Lambda.QueryOverRestrictionBuilderBase, TRoot, TSubType> + { + public IQueryOverRestrictionBuilder(NHibernate.IQueryOver root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) : base(default(NHibernate.IQueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + public NHibernate.Criterion.Lambda.IQueryOverRestrictionBuilder Not { get => throw null; } + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverSubqueryBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverSubqueryBuilder : NHibernate.Criterion.Lambda.QueryOverSubqueryBuilderBase, TRoot, TSubType, NHibernate.Criterion.Lambda.IQueryOverSubqueryPropertyBuilder> + { + public IQueryOverSubqueryBuilder(NHibernate.IQueryOver root) : base(default(NHibernate.IQueryOver)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.IQueryOverSubqueryPropertyBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IQueryOverSubqueryPropertyBuilder : NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase, TRoot, TSubType> + { + public IQueryOverSubqueryPropertyBuilder() => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.LambdaNaturalIdentifierBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LambdaNaturalIdentifierBuilder + { + public NHibernate.Criterion.NaturalIdentifier Is(object value) => throw null; + public LambdaNaturalIdentifierBuilder(NHibernate.Criterion.NaturalIdentifier naturalIdentifier, string propertyName) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.LambdaRestrictionBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LambdaRestrictionBuilder + { + public NHibernate.Criterion.Lambda.LambdaRestrictionBuilder.LambdaBetweenBuilder IsBetween(object lo) => throw null; + public NHibernate.Criterion.AbstractCriterion IsEmpty { get => throw null; } + public NHibernate.Criterion.AbstractCriterion IsIn(object[] values) => throw null; + public NHibernate.Criterion.AbstractCriterion IsIn(System.Collections.ICollection values) => throw null; + public NHibernate.Criterion.AbstractCriterion IsInG(System.Collections.Generic.IEnumerable values) => throw null; + public NHibernate.Criterion.AbstractCriterion IsInsensitiveLike(string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public NHibernate.Criterion.AbstractCriterion IsInsensitiveLike(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion IsLike(string value, NHibernate.Criterion.MatchMode matchMode, System.Char? escapeChar) => throw null; + public NHibernate.Criterion.AbstractCriterion IsLike(string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public NHibernate.Criterion.AbstractCriterion IsLike(object value) => throw null; + public NHibernate.Criterion.AbstractCriterion IsNotEmpty { get => throw null; } + public NHibernate.Criterion.AbstractCriterion IsNotNull { get => throw null; } + public NHibernate.Criterion.AbstractCriterion IsNull { get => throw null; } + // Generated from `NHibernate.Criterion.Lambda.LambdaRestrictionBuilder+LambdaBetweenBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LambdaBetweenBuilder + { + public NHibernate.Criterion.AbstractCriterion And(object hi) => throw null; + public LambdaBetweenBuilder(NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection, object lo, bool isNot) => throw null; + } + + + public LambdaRestrictionBuilder(NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) => throw null; + public NHibernate.Criterion.Lambda.LambdaRestrictionBuilder Not { get => throw null; } + } + + // Generated from `NHibernate.Criterion.Lambda.LambdaSubqueryBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LambdaSubqueryBuilder + { + public NHibernate.Criterion.AbstractCriterion Eq(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion EqAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion Ge(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion GeAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion GeSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion Gt(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion GtAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion GtSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion In(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public LambdaSubqueryBuilder(string propertyName, object value) => throw null; + public NHibernate.Criterion.AbstractCriterion Le(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion LeAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion LeSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion Lt(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion LtAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion LtSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion Ne(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public NHibernate.Criterion.AbstractCriterion NotIn(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverFetchBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverFetchBuilder : NHibernate.Criterion.Lambda.QueryOverFetchBuilderBase, TRoot, TSubType> + { + public QueryOverFetchBuilder(NHibernate.Criterion.QueryOver root, System.Linq.Expressions.Expression> path) : base(default(NHibernate.Criterion.QueryOver), default(System.Linq.Expressions.Expression>)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverFetchBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverFetchBuilderBase where TReturn : NHibernate.IQueryOver + { + public TReturn Default { get => throw null; } + public TReturn Eager { get => throw null; } + public TReturn Lazy { get => throw null; } + protected QueryOverFetchBuilderBase(TReturn root, System.Linq.Expressions.Expression> path) => throw null; + protected string path; + protected TReturn root; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverJoinBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverJoinBuilder : NHibernate.Criterion.Lambda.QueryOverJoinBuilderBase, TRoot, TSubType> + { + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias) => throw null; + public NHibernate.Criterion.QueryOver JoinQueryOver(System.Linq.Expressions.Expression>> path) => throw null; + public QueryOverJoinBuilder(NHibernate.Criterion.QueryOver root, NHibernate.SqlCommand.JoinType joinType) : base(default(NHibernate.Criterion.QueryOver), default(NHibernate.SqlCommand.JoinType)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverJoinBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverJoinBuilderBase where TReturn : NHibernate.IQueryOver + { + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, System.Linq.Expressions.Expression> withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression>> path, System.Linq.Expressions.Expression> alias, NHibernate.Criterion.ICriterion withClause) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public TReturn JoinAlias(System.Linq.Expressions.Expression> path, System.Linq.Expressions.Expression> alias) => throw null; + public QueryOverJoinBuilderBase(TReturn root, NHibernate.SqlCommand.JoinType joinType) => throw null; + protected NHibernate.SqlCommand.JoinType joinType; + protected TReturn root; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverLockBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverLockBuilder : NHibernate.Criterion.Lambda.QueryOverLockBuilderBase, TRoot, TSubType> + { + public QueryOverLockBuilder(NHibernate.Criterion.QueryOver root, System.Linq.Expressions.Expression> alias) : base(default(NHibernate.Criterion.QueryOver), default(System.Linq.Expressions.Expression>)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverLockBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverLockBuilderBase where TReturn : NHibernate.IQueryOver + { + public TReturn Force { get => throw null; } + public TReturn None { get => throw null; } + protected QueryOverLockBuilderBase(TReturn root, System.Linq.Expressions.Expression> alias) => throw null; + public TReturn Read { get => throw null; } + public TReturn Upgrade { get => throw null; } + public TReturn UpgradeNoWait { get => throw null; } + public TReturn Write { get => throw null; } + protected string alias; + protected TReturn root; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverOrderBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverOrderBuilder : NHibernate.Criterion.Lambda.QueryOverOrderBuilderBase, TRoot, TSubType> + { + public QueryOverOrderBuilder(NHibernate.Criterion.QueryOver root, System.Linq.Expressions.Expression> path, bool isAlias) : base(default(NHibernate.Criterion.QueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + public QueryOverOrderBuilder(NHibernate.Criterion.QueryOver root, System.Linq.Expressions.Expression> path) : base(default(NHibernate.Criterion.QueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + public QueryOverOrderBuilder(NHibernate.Criterion.QueryOver root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) : base(default(NHibernate.Criterion.QueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverOrderBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverOrderBuilderBase where TReturn : NHibernate.IQueryOver + { + public TReturn Asc { get => throw null; } + public TReturn Desc { get => throw null; } + protected QueryOverOrderBuilderBase(TReturn root, System.Linq.Expressions.Expression> path, bool isAlias) => throw null; + protected QueryOverOrderBuilderBase(TReturn root, System.Linq.Expressions.Expression> path) => throw null; + protected QueryOverOrderBuilderBase(TReturn root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) => throw null; + protected bool isAlias; + protected System.Linq.Expressions.LambdaExpression path; + protected NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection; + protected TReturn root; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverProjectionBuilder<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverProjectionBuilder + { + public QueryOverProjectionBuilder() => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder Select(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder Select(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder Select(NHibernate.Criterion.IProjection projection) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectAvg(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectAvg(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectCount(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectCount(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectCountDistinct(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectCountDistinct(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectGroup(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectGroup(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectMax(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectMax(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectMin(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectMin(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectSubQuery(NHibernate.Criterion.QueryOver detachedQueryOver) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectSum(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder SelectSum(System.Linq.Expressions.Expression> expression) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder WithAlias(string alias) => throw null; + public NHibernate.Criterion.Lambda.QueryOverProjectionBuilder WithAlias(System.Linq.Expressions.Expression> alias) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverRestrictionBuilder : NHibernate.Criterion.Lambda.QueryOverRestrictionBuilderBase, TRoot, TSubType> + { + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilder Not { get => throw null; } + public QueryOverRestrictionBuilder(NHibernate.Criterion.QueryOver root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) : base(default(NHibernate.Criterion.QueryOver), default(NHibernate.Impl.ExpressionProcessor.ProjectionInfo)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverRestrictionBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverRestrictionBuilderBase where TReturn : NHibernate.IQueryOver + { + public NHibernate.Criterion.Lambda.QueryOverRestrictionBuilderBase.LambdaBetweenBuilder IsBetween(object lo) => throw null; + public TReturn IsEmpty { get => throw null; } + public TReturn IsIn(object[] values) => throw null; + public TReturn IsIn(System.Collections.ICollection values) => throw null; + public TReturn IsInG(System.Collections.Generic.IEnumerable values) => throw null; + public TReturn IsInsensitiveLike(string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public TReturn IsInsensitiveLike(object value) => throw null; + public TReturn IsLike(string value, NHibernate.Criterion.MatchMode matchMode, System.Char? escapeChar) => throw null; + public TReturn IsLike(string value, NHibernate.Criterion.MatchMode matchMode) => throw null; + public TReturn IsLike(object value) => throw null; + public TReturn IsNotEmpty { get => throw null; } + public TReturn IsNotNull { get => throw null; } + public TReturn IsNull { get => throw null; } + // Generated from `NHibernate.Criterion.Lambda.QueryOverRestrictionBuilderBase<,,>+LambdaBetweenBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LambdaBetweenBuilder + { + public TReturn And(object hi) => throw null; + public LambdaBetweenBuilder(TReturn root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection, bool isNot, object lo) => throw null; + } + + + public QueryOverRestrictionBuilderBase(TReturn root, NHibernate.Impl.ExpressionProcessor.ProjectionInfo projection) => throw null; + protected bool isNot; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverSubqueryBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverSubqueryBuilder : NHibernate.Criterion.Lambda.QueryOverSubqueryBuilderBase, TRoot, TSubType, NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilder> + { + public QueryOverSubqueryBuilder(NHibernate.Criterion.QueryOver root) : base(default(NHibernate.Criterion.QueryOver)) => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverSubqueryBuilderBase<,,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverSubqueryBuilderBase where TBuilderType : NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase, new() where TReturn : NHibernate.IQueryOver + { + protected QueryOverSubqueryBuilderBase(TReturn root) => throw null; + public TReturn Where(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn Where(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn WhereAll(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn WhereAll(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn WhereExists(NHibernate.Criterion.QueryOver detachedQuery) => throw null; + public TReturn WhereNotExists(NHibernate.Criterion.QueryOver detachedQuery) => throw null; + public TBuilderType WhereProperty(System.Linq.Expressions.Expression> expression) => throw null; + public TBuilderType WhereProperty(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn WhereSome(System.Linq.Expressions.Expression> expression) => throw null; + public TReturn WhereSome(System.Linq.Expressions.Expression> expression) => throw null; + public TBuilderType WhereValue(object value) => throw null; + protected TReturn root; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverSubqueryPropertyBuilder : NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase, TRoot, TSubType> + { + public QueryOverSubqueryPropertyBuilder() => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class QueryOverSubqueryPropertyBuilderBase + { + protected QueryOverSubqueryPropertyBuilderBase() => throw null; + } + + // Generated from `NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryOverSubqueryPropertyBuilderBase : NHibernate.Criterion.Lambda.QueryOverSubqueryPropertyBuilderBase where TReturn : NHibernate.IQueryOver + { + public TReturn Eq(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn EqAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn Ge(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn GeAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn GeSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn Gt(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn GtAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn GtSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn In(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn Le(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn LeAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn LeSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn Lt(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn LtAll(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn LtSome(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn Ne(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + public TReturn NotIn(NHibernate.Criterion.QueryOver detachedCriteria) => throw null; + protected QueryOverSubqueryPropertyBuilderBase() => throw null; + protected string path; + protected TReturn root; + protected object value; + } + + } + } + namespace DebugHelpers + { + // Generated from `NHibernate.DebugHelpers.CollectionProxy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionProxy + { + public CollectionProxy(System.Collections.ICollection dic) => throw null; + public object[] Items { get => throw null; } + } + + // Generated from `NHibernate.DebugHelpers.CollectionProxy<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionProxy + { + public CollectionProxy(System.Collections.Generic.ICollection dic) => throw null; + public T[] Items { get => throw null; } + } + + // Generated from `NHibernate.DebugHelpers.DictionaryProxy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryProxy + { + public DictionaryProxy(System.Collections.IDictionary dic) => throw null; + public System.Collections.DictionaryEntry[] Items { get => throw null; } + } + + // Generated from `NHibernate.DebugHelpers.DictionaryProxy<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryProxy + { + public DictionaryProxy(System.Collections.Generic.IDictionary dic) => throw null; + public System.Collections.Generic.KeyValuePair[] Items { get => throw null; } + } + + } + namespace Dialect + { + // Generated from `NHibernate.Dialect.AnsiSqlKeywords` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiSqlKeywords + { + public AnsiSqlKeywords() => throw null; + public static System.Collections.Generic.IReadOnlyCollection Sql2003; + } + + // Generated from `NHibernate.Dialect.BitwiseFunctionOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BitwiseFunctionOperation : NHibernate.Dialect.Function.BitwiseFunctionOperation + { + public BitwiseFunctionOperation(string functionName) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Dialect.BitwiseNativeOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BitwiseNativeOperation : NHibernate.Dialect.Function.BitwiseNativeOperation + { + public BitwiseNativeOperation(string sqlOpToken, bool isNot) : base(default(string)) => throw null; + public BitwiseNativeOperation(string sqlOpToken) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Dialect.DB2400Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2400Dialect : NHibernate.Dialect.DB2Dialect + { + public DB2400Dialect() => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string IdentitySelectString { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public override bool UseMaxForLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.DB2Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2Dialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public DB2Dialect() => throw null; + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override string ForUpdateString { get => throw null; } + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString querySqlString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentityInsertString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override bool SupportsCrossJoin { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExistsInSelect { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLobValueChangePropogation { get => throw null; } + public override bool SupportsResultSetPositionQueryMethodsOnForwardOnlyCursor { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override bool UseMaxForLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Dialect + { + public virtual string AddColumnString { get => throw null; } + public virtual string AddColumnSuffixString { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString AddIdentifierOutParameterToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName, string parameterName) => throw null; + public virtual NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName) => throw null; + public virtual NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertString) => throw null; + public virtual string AppendLockHint(NHibernate.LockMode lockMode, string tableName) => throw null; + public virtual NHibernate.SqlCommand.SqlString ApplyLocksToSql(NHibernate.SqlCommand.SqlString sql, System.Collections.Generic.IDictionary aliasedLockModes, System.Collections.Generic.IDictionary keyColumnNames) => throw null; + public virtual bool AreStringComparisonsCaseInsensitive { get => throw null; } + public virtual NHibernate.Exceptions.ISQLExceptionConverter BuildSQLExceptionConverter() => throw null; + public virtual string CascadeConstraintsString { get => throw null; } + public virtual System.Char CloseQuote { get => throw null; } + public virtual void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public virtual string ConvertQuotesForAliasName(string aliasName) => throw null; + public virtual string ConvertQuotesForCatalogName(string catalogName) => throw null; + public virtual string ConvertQuotesForColumnName(string columnName) => throw null; + public virtual string ConvertQuotesForSchemaName(string schemaName) => throw null; + public virtual string ConvertQuotesForTableName(string tableName) => throw null; + public virtual NHibernate.SqlCommand.CaseFragment CreateCaseFragment() => throw null; + public virtual string CreateMultisetTableString { get => throw null; } + public virtual NHibernate.SqlCommand.JoinFragment CreateOuterJoinFragment() => throw null; + public virtual string CreateTableString { get => throw null; } + public virtual string CreateTemporaryTablePostfix { get => throw null; } + public virtual string CreateTemporaryTableString { get => throw null; } + public virtual string CurrentTimestampSQLFunctionName { get => throw null; } + public virtual string CurrentTimestampSelectString { get => throw null; } + public virtual string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public virtual string CurrentUtcTimestampSelectString { get => throw null; } + protected const string DefaultBatchSize = default; + public int DefaultCastLength { get => throw null; set => throw null; } + public System.Byte DefaultCastPrecision { get => throw null; set => throw null; } + public System.Byte DefaultCastScale { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary DefaultProperties { get => throw null; } + protected Dialect() => throw null; + public virtual string DisableForeignKeyConstraintsString { get => throw null; } + public virtual bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public virtual bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public virtual bool DropConstraints { get => throw null; } + public virtual string DropForeignKeyString { get => throw null; } + public virtual bool DropTemporaryTableAfterUse() => throw null; + public virtual string EnableForeignKeyConstraintsString { get => throw null; } + public virtual string ForUpdateNowaitString { get => throw null; } + public virtual bool ForUpdateOfColumns { get => throw null; } + public virtual string ForUpdateString { get => throw null; } + public virtual System.Collections.Generic.IDictionary Functions { get => throw null; } + public virtual bool GenerateTablePrimaryKeyConstraintForIdentityColumn { get => throw null; } + public virtual string GenerateTemporaryTableName(string baseTableName) => throw null; + public virtual string GetAddForeignKeyConstraintString(string constraintName, string[] foreignKey, string referencedTable, string[] primaryKey, bool referencesPrimaryKey) => throw null; + public virtual string GetAddPrimaryKeyConstraintString(string constraintName) => throw null; + public virtual string GetCastTypeName(NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected virtual string GetCastTypeName(NHibernate.SqlTypes.SqlType sqlType, NHibernate.Dialect.TypeNames castTypeNames) => throw null; + public virtual string GetColumnComment(string comment) => throw null; + public virtual string GetCreateSequenceString(string sequenceName) => throw null; + protected virtual string GetCreateSequenceString(string sequenceName, int initialValue, int incrementSize) => throw null; + public virtual string[] GetCreateSequenceStrings(string sequenceName, int initialValue, int incrementSize) => throw null; + public virtual NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public static NHibernate.Dialect.Dialect GetDialect(System.Collections.Generic.IDictionary props) => throw null; + public static NHibernate.Dialect.Dialect GetDialect() => throw null; + public virtual string GetDropForeignKeyConstraintString(string constraintName) => throw null; + public virtual string GetDropIndexConstraintString(string constraintName) => throw null; + public virtual string GetDropPrimaryKeyConstraintString(string constraintName) => throw null; + public virtual string GetDropSequenceString(string sequenceName) => throw null; + public virtual string[] GetDropSequenceStrings(string sequenceName) => throw null; + public virtual string GetDropTableString(string tableName) => throw null; + public virtual string GetForUpdateNowaitString(string aliases) => throw null; + public virtual string GetForUpdateString(string aliases) => throw null; + public virtual string GetForUpdateString(NHibernate.LockMode lockMode) => throw null; + public virtual string GetIdentityColumnString(System.Data.DbType type) => throw null; + public virtual string GetIdentitySelectString(string identityColumn, string tableName, System.Data.DbType type) => throw null; + public virtual string GetIfExistsDropConstraint(string catalog, string schema, string table, string name) => throw null; + public virtual string GetIfExistsDropConstraint(NHibernate.Mapping.Table table, string name) => throw null; + public virtual string GetIfExistsDropConstraintEnd(string catalog, string schema, string table, string name) => throw null; + public virtual string GetIfExistsDropConstraintEnd(NHibernate.Mapping.Table table, string name) => throw null; + public virtual string GetIfNotExistsCreateConstraint(string catalog, string schema, string table, string name) => throw null; + public virtual string GetIfNotExistsCreateConstraint(NHibernate.Mapping.Table table, string name) => throw null; + public virtual string GetIfNotExistsCreateConstraintEnd(string catalog, string schema, string table, string name) => throw null; + public virtual string GetIfNotExistsCreateConstraintEnd(NHibernate.Mapping.Table table, string name) => throw null; + public virtual NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, int? offset, int? limit, NHibernate.SqlCommand.Parameter offsetParameter, NHibernate.SqlCommand.Parameter limitParameter) => throw null; + public int GetLimitValue(int offset, int limit) => throw null; + public virtual NHibernate.Dialect.Lock.ILockingStrategy GetLockingStrategy(NHibernate.Persister.Entity.ILockable lockable, NHibernate.LockMode lockMode) => throw null; + public virtual string GetLongestTypeName(System.Data.DbType dbType) => throw null; + public int GetOffsetValue(int offset) => throw null; + public virtual System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand statement) => throw null; + public virtual System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand statement, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string GetSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public virtual string GetSelectSequenceNextValString(string sequenceName) => throw null; + public virtual string GetSequenceNextValString(string sequenceName) => throw null; + public virtual string GetTableComment(string comment) => throw null; + public virtual string GetTypeName(NHibernate.SqlTypes.SqlType sqlType, int length, int precision, int scale) => throw null; + public virtual string GetTypeName(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public virtual bool HasDataTypeInIdentityColumn { get => throw null; } + public virtual bool HasSelfReferentialForeignKeyBug { get => throw null; } + public virtual string IdentityColumnString { get => throw null; } + public virtual string IdentityInsertString { get => throw null; } + public virtual string IdentitySelectString { get => throw null; } + public virtual System.Type IdentityStyleIdentifierGeneratorClass { get => throw null; } + public virtual NHibernate.Dialect.InsertGeneratedIdentifierRetrievalMethod InsertGeneratedIdentifierRetrievalMethod { get => throw null; } + public virtual bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public bool IsKeyword(string str) => throw null; + public virtual bool IsKnownToken(string currentToken, string nextToken) => throw null; + public virtual bool IsQuoted(string name) => throw null; + public System.Collections.Generic.HashSet Keywords { get => throw null; } + public virtual string LowercaseFunction { get => throw null; } + public virtual int MaxAliasLength { get => throw null; } + public virtual int? MaxNumberOfParameters { get => throw null; } + public virtual System.Type NativeIdentifierGeneratorClass { get => throw null; } + protected const string NoBatch = default; + public virtual string NoColumnsInsertString { get => throw null; } + public virtual string NullColumnString { get => throw null; } + public virtual bool OffsetStartsAtOne { get => throw null; } + public virtual System.Char OpenQuote { get => throw null; } + public virtual NHibernate.SqlTypes.SqlType OverrideSqlType(NHibernate.SqlTypes.SqlType type) => throw null; + public virtual bool? PerformTemporaryTableDDLInIsolation() => throw null; + public const string PossibleClosedQuoteChars = default; + public const string PossibleQuoteChars = default; + public virtual string PrimaryKeyString { get => throw null; } + public virtual string Qualify(string catalog, string schema, string name) => throw null; + public virtual bool QualifyIndexName { get => throw null; } + public virtual string QuerySequencesString { get => throw null; } + protected virtual string Quote(string name) => throw null; + public virtual string QuoteForAliasName(string aliasName) => throw null; + public virtual string QuoteForCatalogName(string catalogName) => throw null; + public virtual string QuoteForColumnName(string columnName) => throw null; + public virtual string QuoteForSchemaName(string schemaName) => throw null; + public virtual string QuoteForTableName(string tableName) => throw null; + // Generated from `NHibernate.Dialect.Dialect+QuotedAndParenthesisStringTokenizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuotedAndParenthesisStringTokenizer : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public System.Collections.Generic.IList GetTokens() => throw null; + public QuotedAndParenthesisStringTokenizer(NHibernate.SqlCommand.SqlString original) => throw null; + // Generated from `NHibernate.Dialect.Dialect+QuotedAndParenthesisStringTokenizer+TokenizerState` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum TokenizerState + { + InParenthesis, + Quoted, + Token, + WhiteSpace, + } + + + } + + + protected void RegisterColumnType(System.Data.DbType code, string name) => throw null; + protected void RegisterColumnType(System.Data.DbType code, int capacity, string name) => throw null; + protected void RegisterFunction(string name, NHibernate.Dialect.Function.ISQLFunction function) => throw null; + protected void RegisterKeyword(string word) => throw null; + protected internal void RegisterKeywords(params string[] keywords) => throw null; + protected internal void RegisterKeywords(System.Collections.Generic.IEnumerable keywords) => throw null; + public virtual int RegisterResultSetOutParameter(System.Data.Common.DbCommand statement, int position) => throw null; + public virtual bool ReplaceResultVariableInOrderByClauseWithPosition { get => throw null; } + public virtual string SelectGUIDString { get => throw null; } + public virtual System.Char StatementTerminator { get => throw null; } + public virtual bool SupportsBindAsCallableArgument { get => throw null; } + public virtual bool SupportsCascadeDelete { get => throw null; } + public virtual bool SupportsCircularCascadeDeleteConstraints { get => throw null; } + public virtual bool SupportsColumnCheck { get => throw null; } + public virtual bool SupportsCommentOn { get => throw null; } + public virtual bool SupportsConcurrentWritingConnections { get => throw null; } + public virtual bool SupportsConcurrentWritingConnectionsInSameTransaction { get => throw null; } + public virtual bool SupportsCrossJoin { get => throw null; } + public virtual bool SupportsCurrentTimestampSelection { get => throw null; } + public virtual bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public virtual bool SupportsDateTimeScale { get => throw null; } + public virtual bool SupportsDistributedTransactions { get => throw null; } + public virtual bool SupportsEmptyInList { get => throw null; } + public virtual bool SupportsExistsInSelect { get => throw null; } + public virtual bool SupportsExpectedLobUsagePattern { get => throw null; } + public virtual bool SupportsForUpdateOf { get => throw null; } + public virtual bool SupportsForeignKeyConstraintInAlterTable { get => throw null; } + public virtual bool SupportsHavingOnGroupedByComputation { get => throw null; } + public virtual bool SupportsIdentityColumns { get => throw null; } + public virtual bool SupportsIfExistsAfterTableName { get => throw null; } + public virtual bool SupportsIfExistsBeforeTableName { get => throw null; } + public virtual bool SupportsInsertSelectIdentity { get => throw null; } + public virtual bool SupportsLimit { get => throw null; } + public virtual bool SupportsLimitOffset { get => throw null; } + public virtual bool SupportsLobValueChangePropogation { get => throw null; } + public virtual bool SupportsNotNullUnique { get => throw null; } + public virtual bool SupportsNullInUnique { get => throw null; } + public virtual bool SupportsOuterJoinForUpdate { get => throw null; } + public virtual bool SupportsParametersInInsertSelect { get => throw null; } + public virtual bool SupportsPooledSequences { get => throw null; } + public virtual bool SupportsPoolingParameter { get => throw null; } + public virtual bool SupportsResultSetPositionQueryMethodsOnForwardOnlyCursor { get => throw null; } + public virtual bool SupportsRowValueConstructorSyntax { get => throw null; } + public virtual bool SupportsRowValueConstructorSyntaxInInList { get => throw null; } + public virtual bool SupportsScalarSubSelects { get => throw null; } + public virtual bool SupportsSequences { get => throw null; } + public virtual bool SupportsSqlBatches { get => throw null; } + public virtual bool SupportsSubSelects { get => throw null; } + public virtual bool SupportsSubSelectsWithPagingAsInPredicateRhs { get => throw null; } + public virtual bool SupportsSubqueryOnMutatingTable { get => throw null; } + public virtual bool SupportsSubselectAsInPredicateLHS { get => throw null; } + public virtual bool SupportsTableCheck { get => throw null; } + public virtual bool SupportsTemporaryTables { get => throw null; } + public virtual bool SupportsUnboundedLobLocatorMaterialization { get => throw null; } + public virtual bool SupportsUnionAll { get => throw null; } + public virtual bool SupportsUnique { get => throw null; } + public virtual bool SupportsUniqueConstraintInCreateAlterTable { get => throw null; } + public virtual bool SupportsVariableLimit { get => throw null; } + public virtual string TableTypeString { get => throw null; } + public virtual System.Int64 TimestampResolutionInTicks { get => throw null; } + public virtual string ToBooleanValueString(bool value) => throw null; + public virtual bool TryGetCastTypeName(NHibernate.SqlTypes.SqlType sqlType, out string typeName) => throw null; + protected virtual bool TryGetCastTypeName(NHibernate.SqlTypes.SqlType sqlType, NHibernate.Dialect.TypeNames castTypeNames, out string typeName) => throw null; + public virtual string[] UnQuote(string[] quoted) => throw null; + public virtual string UnQuote(string quoted) => throw null; + public virtual bool UseInputStreamToInsertBlob { get => throw null; } + public virtual bool UseMaxForLimit { get => throw null; } + public virtual bool UsesColumnsWithForUpdateOf { get => throw null; } + public virtual NHibernate.Exceptions.IViolatedConstraintNameExtracter ViolatedConstraintNameExtracter { get => throw null; } + } + + // Generated from `NHibernate.Dialect.FirebirdDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AddIdentifierOutParameterToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName, string parameterName) => throw null; + public override string CreateTemporaryTableString { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override bool DropTemporaryTableAfterUse() => throw null; + public FirebirdDialect() => throw null; + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override int MaxAliasLength { get => throw null; } + public override bool? PerformTemporaryTableDDLInIsolation() => throw null; + public override string QuerySequencesString { get => throw null; } + protected virtual void RegisterColumnTypes() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.GenericDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public GenericDialect() => throw null; + } + + // Generated from `NHibernate.Dialect.HanaColumnStoreDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaColumnStoreDialect : NHibernate.Dialect.HanaDialectBase + { + public override string CreateTableString { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public HanaColumnStoreDialect() => throw null; + } + + // Generated from `NHibernate.Dialect.HanaDialectBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HanaDialectBase : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override string AddColumnSuffixString { get => throw null; } + public override string CascadeConstraintsString { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSelectString { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override string ForUpdateNowaitString { get => throw null; } + public override string GenerateTemporaryTableName(string baseTableName) => throw null; + public override string GetColumnComment(string comment) => throw null; + public override string GetCreateSequenceString(string sequenceName) => throw null; + protected override string GetCreateSequenceString(string sequenceName, int initialValue, int incrementSize) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override string GetForUpdateNowaitString(string aliases) => throw null; + public override string GetForUpdateString(string aliases) => throw null; + public override string GetIdentitySelectString(string identityColumn, string tableName, System.Data.DbType type) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override string GetTableComment(string comment) => throw null; + protected HanaDialectBase() => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override bool? PerformTemporaryTableDDLInIsolation() => throw null; + public override bool QualifyIndexName { get => throw null; } + public override string QuerySequencesString { get => throw null; } + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterHANAFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + protected virtual void RegisterNHibernateFunctions() => throw null; + public override int RegisterResultSetOutParameter(System.Data.Common.DbCommand statement, int position) => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsColumnCheck { get => throw null; } + public override bool SupportsCommentOn { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExistsInSelect { get => throw null; } + public override bool SupportsExpectedLobUsagePattern { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsRowValueConstructorSyntax { get => throw null; } + public override bool SupportsRowValueConstructorSyntaxInInList { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnboundedLobLocatorMaterialization { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override string ToBooleanValueString(bool value) => throw null; + public override bool UsesColumnsWithForUpdateOf { get => throw null; } + } + + // Generated from `NHibernate.Dialect.HanaRowStoreDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaRowStoreDialect : NHibernate.Dialect.HanaDialectBase + { + public override string CreateTableString { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public HanaRowStoreDialect() => throw null; + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsOuterJoinForUpdate { get => throw null; } + } + + // Generated from `NHibernate.Dialect.IfxViolatedConstraintExtracter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IfxViolatedConstraintExtracter : NHibernate.Exceptions.TemplatedViolatedConstraintNameExtracter + { + public override string ExtractConstraintName(System.Data.Common.DbException sqle) => throw null; + public IfxViolatedConstraintExtracter() => throw null; + } + + // Generated from `NHibernate.Dialect.InformixDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InformixDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.Exceptions.ISQLExceptionConverter BuildSQLExceptionConverter() => throw null; + public override NHibernate.SqlCommand.JoinFragment CreateOuterJoinFragment() => throw null; + public override string CreateTemporaryTablePostfix { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override bool ForUpdateOfColumns { get => throw null; } + public override string GetAddForeignKeyConstraintString(string constraintName, string[] foreignKey, string referencedTable, string[] primaryKey, bool referencesPrimaryKey) => throw null; + public override string GetForUpdateString(string aliases) => throw null; + public override string GetIdentityColumnString(System.Data.DbType type) => throw null; + public override string GetIdentitySelectString(string identityColumn, string tableName, System.Data.DbType type) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand statement) => throw null; + public override System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand statement, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool HasDataTypeInIdentityColumn { get => throw null; } + public override string IdentityColumnString { get => throw null; } + public override string IdentityInsertString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public InformixDialect() => throw null; + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override bool? PerformTemporaryTableDDLInIsolation() => throw null; + public override int RegisterResultSetOutParameter(System.Data.Common.DbCommand statement, int position) => throw null; + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsOuterJoinForUpdate { get => throw null; } + public override bool SupportsResultSetPositionQueryMethodsOnForwardOnlyCursor { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override string ToBooleanValueString(bool value) => throw null; + public override NHibernate.Exceptions.IViolatedConstraintNameExtracter ViolatedConstraintNameExtracter { get => throw null; } + } + + // Generated from `NHibernate.Dialect.InformixDialect0940` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InformixDialect0940 : NHibernate.Dialect.InformixDialect + { + public override NHibernate.SqlCommand.JoinFragment CreateOuterJoinFragment() => throw null; + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public InformixDialect0940() => throw null; + public override int MaxAliasLength { get => throw null; } + public override string QuerySequencesString { get => throw null; } + public override bool SupportsCrossJoin { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + } + + // Generated from `NHibernate.Dialect.InformixDialect1000` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InformixDialect1000 : NHibernate.Dialect.InformixDialect0940 + { + public InformixDialect1000() => throw null; + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Ingres9Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Ingres9Dialect : NHibernate.Dialect.IngresDialect + { + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override System.Type IdentityStyleIdentifierGeneratorClass { get => throw null; } + public Ingres9Dialect() => throw null; + public override System.Type NativeIdentifierGeneratorClass { get => throw null; } + public override string QuerySequencesString { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.IngresDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IngresDialect : NHibernate.Dialect.Dialect + { + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public IngresDialect() => throw null; + public override int MaxAliasLength { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExpectedLobUsagePattern { get => throw null; } + public override bool SupportsSubselectAsInPredicateLHS { get => throw null; } + } + + // Generated from `NHibernate.Dialect.InsertGeneratedIdentifierRetrievalMethod` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum InsertGeneratedIdentifierRetrievalMethod + { + OutputParameter, + ReturnValueParameter, + } + + // Generated from `NHibernate.Dialect.MsSql2000Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSql2000Dialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertSql) => throw null; + public override string AppendLockHint(NHibernate.LockMode lockMode, string tableName) => throw null; + public override NHibernate.SqlCommand.SqlString ApplyLocksToSql(NHibernate.SqlCommand.SqlString sql, System.Collections.Generic.IDictionary aliasedLockModes, System.Collections.Generic.IDictionary keyColumnNames) => throw null; + public override bool AreStringComparisonsCaseInsensitive { get => throw null; } + public override System.Char CloseQuote { get => throw null; } + // Generated from `NHibernate.Dialect.MsSql2000Dialect+CountBigQueryFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class CountBigQueryFunction : NHibernate.Dialect.Function.ClassicAggregateFunction + { + public CountBigQueryFunction() : base(default(string), default(bool)) => throw null; + } + + + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSelectString { get => throw null; } + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override bool DropTemporaryTableAfterUse() => throw null; + public override string ForUpdateString { get => throw null; } + public override string GenerateTemporaryTableName(string baseTableName) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropTableString(string tableName) => throw null; + public override string GetIfExistsDropConstraint(string catalog, string schema, string tableName, string name) => throw null; + public override string GetIfNotExistsCreateConstraint(string catalog, string schema, string table, string name) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString querySqlString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + protected virtual string GetSelectExistingObject(string name, NHibernate.Mapping.Table table) => throw null; + protected virtual string GetSelectExistingObject(string catalog, string schema, string table, string name) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override bool IsKnownToken(string currentToken, string nextToken) => throw null; + // Generated from `NHibernate.Dialect.MsSql2000Dialect+LockHintAppender` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct LockHintAppender + { + public NHibernate.SqlCommand.SqlString AppendLockHint(NHibernate.SqlCommand.SqlString sql) => throw null; + public LockHintAppender(NHibernate.Dialect.MsSql2000Dialect dialect, System.Collections.Generic.IDictionary aliasedLockModes) => throw null; + // Stub generator skipped constructor + } + + + public override int MaxAliasLength { get => throw null; } + public const System.Byte MaxDateTime2 = default; + public const System.Byte MaxDateTimeOffset = default; + public override int? MaxNumberOfParameters { get => throw null; } + public const int MaxSizeForAnsiClob = default; + public const int MaxSizeForBlob = default; + public const int MaxSizeForClob = default; + public const int MaxSizeForLengthLimitedAnsiString = default; + public const int MaxSizeForLengthLimitedBinary = default; + public const int MaxSizeForLengthLimitedString = default; + public MsSql2000Dialect() => throw null; + protected bool NeedsLockHint(NHibernate.LockMode lockMode) => throw null; + public override string NoColumnsInsertString { get => throw null; } + public override string NullColumnString { get => throw null; } + public override System.Char OpenQuote { get => throw null; } + public override string Qualify(string catalog, string schema, string name) => throw null; + public override bool QualifyIndexName { get => throw null; } + protected override string Quote(string name) => throw null; + protected virtual void RegisterCharacterTypeMappings() => throw null; + protected virtual void RegisterDateTimeTypeMappings() => throw null; + protected virtual void RegisterDefaultProperties() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterGuidTypeMapping() => throw null; + protected virtual void RegisterKeywords() => throw null; + protected virtual void RegisterLargeObjectTypeMappings() => throw null; + protected virtual void RegisterNumericTypeMappings() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCircularCascadeDeleteConstraints { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsLobValueChangePropogation { get => throw null; } + public override bool SupportsResultSetPositionQueryMethodsOnForwardOnlyCursor { get => throw null; } + public override bool SupportsSqlBatches { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override string UnQuote(string quoted) => throw null; + public override bool UseMaxForLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSql2005Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSql2005Dialect : NHibernate.Dialect.MsSql2000Dialect + { + public override string AppendLockHint(NHibernate.LockMode lockMode, string tableName) => throw null; + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + protected override string GetSelectExistingObject(string catalog, string schema, string table, string name) => throw null; + public override int MaxAliasLength { get => throw null; } + public const int MaxSizeForXml = default; + public MsSql2005Dialect() => throw null; + protected override void RegisterCharacterTypeMappings() => throw null; + protected override void RegisterKeywords() => throw null; + protected override void RegisterLargeObjectTypeMappings() => throw null; + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public override bool UseMaxForLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSql2008Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSql2008Dialect : NHibernate.Dialect.MsSql2005Dialect + { + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + protected bool KeepDateTime { get => throw null; set => throw null; } + public MsSql2008Dialect() => throw null; + public override NHibernate.SqlTypes.SqlType OverrideSqlType(NHibernate.SqlTypes.SqlType type) => throw null; + protected override void RegisterDateTimeTypeMappings() => throw null; + protected override void RegisterDefaultProperties() => throw null; + protected override void RegisterFunctions() => throw null; + protected override void RegisterKeywords() => throw null; + public override bool SupportsDateTimeScale { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSql2012Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSql2012Dialect : NHibernate.Dialect.MsSql2008Dialect + { + public override string GetCreateSequenceString(string sequenceName) => throw null; + protected override string GetCreateSequenceString(string sequenceName, int initialValue, int incrementSize) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString querySqlString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public MsSql2012Dialect() => throw null; + public override string QuerySequencesString { get => throw null; } + protected override void RegisterFunctions() => throw null; + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSql7Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSql7Dialect : NHibernate.Dialect.MsSql2000Dialect + { + public override string IdentitySelectString { get => throw null; } + public MsSql7Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.MsSqlAzure2008Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlAzure2008Dialect : NHibernate.Dialect.MsSql2008Dialect + { + public MsSqlAzure2008Dialect() => throw null; + public override string PrimaryKeyString { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSqlCe40Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCe40Dialect : NHibernate.Dialect.MsSqlCeDialect + { + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public MsSqlCe40Dialect() => throw null; + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MsSqlCeDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override string ForUpdateString { get => throw null; } + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString querySqlString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public MsSqlCeDialect() => throw null; + public override System.Type NativeIdentifierGeneratorClass { get => throw null; } + public override string NullColumnString { get => throw null; } + public override string Qualify(string catalog, string schema, string table) => throw null; + public override bool QualifyIndexName { get => throw null; } + protected virtual void RegisterDefaultProperties() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + protected virtual void RegisterTypeMapping() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCircularCascadeDeleteConstraints { get => throw null; } + public override bool SupportsConcurrentWritingConnectionsInSameTransaction { get => throw null; } + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsPoolingParameter { get => throw null; } + public override bool SupportsScalarSubSelects { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MySQL55Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQL55Dialect : NHibernate.Dialect.MySQL5Dialect + { + public MySQL55Dialect() => throw null; + protected override void RegisterFunctions() => throw null; + } + + // Generated from `NHibernate.Dialect.MySQL55InnoDBDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQL55InnoDBDialect : NHibernate.Dialect.MySQL55Dialect + { + public override bool HasSelfReferentialForeignKeyBug { get => throw null; } + public MySQL55InnoDBDialect() => throw null; + public override bool SupportsCascadeDelete { get => throw null; } + public override string TableTypeString { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MySQL57Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQL57Dialect : NHibernate.Dialect.MySQL55Dialect + { + public MySQL57Dialect() => throw null; + public override bool SupportsDateTimeScale { get => throw null; } + public override bool SupportsRowValueConstructorSyntaxInInList { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MySQL5Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQL5Dialect : NHibernate.Dialect.MySQLDialect + { + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertString) => throw null; + public override int MaxAliasLength { get => throw null; } + public MySQL5Dialect() => throw null; + protected override void RegisterCastTypes() => throw null; + protected override void RegisterFunctions() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + public override bool SupportsSubSelects { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MySQL5InnoDBDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQL5InnoDBDialect : NHibernate.Dialect.MySQL5Dialect + { + public override bool HasSelfReferentialForeignKeyBug { get => throw null; } + public MySQL5InnoDBDialect() => throw null; + public override bool SupportsCascadeDelete { get => throw null; } + public override string TableTypeString { get => throw null; } + } + + // Generated from `NHibernate.Dialect.MySQLDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override bool AreStringComparisonsCaseInsensitive { get => throw null; } + public override System.Char CloseQuote { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public override string GetAddForeignKeyConstraintString(string constraintName, string[] foreignKey, string referencedTable, string[] primaryKey, bool referencesPrimaryKey) => throw null; + public override string GetCastTypeName(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropForeignKeyConstraintString(string constraintName) => throw null; + public override string GetDropIndexConstraintString(string constraintName) => throw null; + public override string GetDropPrimaryKeyConstraintString(string constraintName) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public MySQLDialect() => throw null; + public override System.Char OpenQuote { get => throw null; } + public override bool QualifyIndexName { get => throw null; } + protected void RegisterCastType(System.Data.DbType code, string name) => throw null; + protected void RegisterCastType(System.Data.DbType code, int capacity, string name) => throw null; + protected virtual void RegisterCastTypes() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + public override bool SupportsConcurrentWritingConnectionsInSameTransaction { get => throw null; } + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsHavingOnGroupedByComputation { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsIfExistsBeforeTableName { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLobValueChangePropogation { get => throw null; } + public override bool SupportsSubSelects { get => throw null; } + public override bool SupportsSubSelectsWithPagingAsInPredicateRhs { get => throw null; } + public override bool SupportsSubqueryOnMutatingTable { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override bool TryGetCastTypeName(NHibernate.SqlTypes.SqlType sqlType, out string typeName) => throw null; + } + + // Generated from `NHibernate.Dialect.Oracle10gDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Oracle10gDialect : NHibernate.Dialect.Oracle9iDialect + { + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override NHibernate.SqlCommand.JoinFragment CreateOuterJoinFragment() => throw null; + public Oracle10gDialect() => throw null; + protected override void RegisterFloatingPointTypeMappings() => throw null; + protected override void RegisterFunctions() => throw null; + public override bool SupportsCrossJoin { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Oracle12cDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Oracle12cDialect : NHibernate.Dialect.Oracle10gDialect + { + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString querySqlString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public Oracle12cDialect() => throw null; + public override bool UseMaxForLimit { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Oracle8iDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Oracle8iDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AddIdentifierOutParameterToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName, string parameterName) => throw null; + public override string CascadeConstraintsString { get => throw null; } + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override NHibernate.SqlCommand.CaseFragment CreateCaseFragment() => throw null; + public override NHibernate.SqlCommand.JoinFragment CreateOuterJoinFragment() => throw null; + public override string CreateTemporaryTablePostfix { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override bool DropTemporaryTableAfterUse() => throw null; + public override string ForUpdateNowaitString { get => throw null; } + public override bool ForUpdateOfColumns { get => throw null; } + public override string GenerateTemporaryTableName(string baseTableName) => throw null; + public virtual string GetBasicSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override string GetForUpdateNowaitString(string aliases) => throw null; + public override string GetForUpdateString(string aliases) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString sql, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public Oracle8iDialect() => throw null; + public override string QuerySequencesString { get => throw null; } + protected virtual void RegisterCharacterTypeMappings() => throw null; + protected virtual void RegisterDateTimeTypeMappings() => throw null; + protected internal virtual void RegisterDefaultProperties() => throw null; + protected virtual void RegisterFloatingPointTypeMappings() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterGuidTypeMapping() => throw null; + protected virtual void RegisterKeywords() => throw null; + protected virtual void RegisterLargeObjectTypeMappings() => throw null; + protected virtual void RegisterNumericTypeMappings() => throw null; + protected virtual void RegisterReverseHibernateTypeMappings() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCommentOn { get => throw null; } + public override bool SupportsCrossJoin { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExistsInSelect { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override bool UseMaxForLimit { get => throw null; } + public bool UseNPrefixedTypesForUnicode { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Dialect.Oracle9iDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Oracle9iDialect : NHibernate.Dialect.Oracle8iDialect + { + public override NHibernate.SqlCommand.CaseFragment CreateCaseFragment() => throw null; + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSelectString { get => throw null; } + public override string GetSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public Oracle9iDialect() => throw null; + protected override void RegisterDateTimeTypeMappings() => throw null; + protected override void RegisterFunctions() => throw null; + public override bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public override bool SupportsDateTimeScale { get => throw null; } + public override bool SupportsRowValueConstructorSyntaxInInList { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.OracleLiteDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleLiteDialect : NHibernate.Dialect.Oracle9iDialect + { + public override string GetCreateSequenceString(string sequenceName) => throw null; + protected override string GetCreateSequenceString(string sequenceName, int initialValue, int incrementSize) => throw null; + public OracleLiteDialect() => throw null; + } + + // Generated from `NHibernate.Dialect.PostgreSQL81Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQL81Dialect : NHibernate.Dialect.PostgreSQLDialect + { + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName) => throw null; + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertSql) => throw null; + public override string ForUpdateNowaitString { get => throw null; } + public override string GetForUpdateNowaitString(string aliases) => throw null; + public override string GetIdentityColumnString(System.Data.DbType type) => throw null; + public override bool HasDataTypeInIdentityColumn { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override string NoColumnsInsertString { get => throw null; } + public PostgreSQL81Dialect() => throw null; + protected override void RegisterDateTimeTypeMappings() => throw null; + public override bool SupportsDateTimeScale { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + } + + // Generated from `NHibernate.Dialect.PostgreSQL82Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQL82Dialect : NHibernate.Dialect.PostgreSQL81Dialect + { + public override string GetDropSequenceString(string sequenceName) => throw null; + public PostgreSQL82Dialect() => throw null; + public override bool SupportsIfExistsBeforeTableName { get => throw null; } + public override bool SupportsRowValueConstructorSyntaxInInList { get => throw null; } + } + + // Generated from `NHibernate.Dialect.PostgreSQL83Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQL83Dialect : NHibernate.Dialect.PostgreSQL82Dialect + { + public PostgreSQL83Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.PostgreSQLDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AddIdentifierOutParameterToInsert(NHibernate.SqlCommand.SqlString insertString, string identifierColumnName, string parameterName) => throw null; + public override string CascadeConstraintsString { get => throw null; } + public override string CreateTemporaryTablePostfix { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override string GetForUpdateString(string aliases) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string GetSelectClauseNullString(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override NHibernate.Dialect.InsertGeneratedIdentifierRetrievalMethod InsertGeneratedIdentifierRetrievalMethod { get => throw null; } + public PostgreSQLDialect() => throw null; + public override string QuerySequencesString { get => throw null; } + protected virtual void RegisterDateTimeTypeMappings() => throw null; + protected virtual void RegisterKeywords() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsForUpdateOf { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsLobValueChangePropogation { get => throw null; } + public override bool SupportsOuterJoinForUpdate { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnboundedLobLocatorMaterialization { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + public override string ToBooleanValueString(bool value) => throw null; + public override bool UseInputStreamToInsertBlob { get => throw null; } + } + + // Generated from `NHibernate.Dialect.SQLiteDialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteDialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertSql) => throw null; + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override string CreateTemporaryTableString { get => throw null; } + public override string DisableForeignKeyConstraintsString { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override bool DropTemporaryTableAfterUse() => throw null; + public override string EnableForeignKeyConstraintsString { get => throw null; } + public override string ForUpdateString { get => throw null; } + public override bool GenerateTablePrimaryKeyConstraintForIdentityColumn { get => throw null; } + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override bool HasDataTypeInIdentityColumn { get => throw null; } + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override string NoColumnsInsertString { get => throw null; } + public override string Qualify(string catalog, string schema, string table) => throw null; + protected virtual void RegisterColumnTypes() => throw null; + protected virtual void RegisterDefaultProperties() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + // Generated from `NHibernate.Dialect.SQLiteDialect+SQLiteCastFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class SQLiteCastFunction : NHibernate.Dialect.Function.CastFunction + { + protected override bool CastingIsRequired(string sqlType) => throw null; + public SQLiteCastFunction() => throw null; + } + + + public SQLiteDialect() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsConcurrentWritingConnections { get => throw null; } + public override bool SupportsDistributedTransactions { get => throw null; } + public override bool SupportsForeignKeyConstraintInAlterTable { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsIfExistsBeforeTableName { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsSubSelects { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + } + + // Generated from `NHibernate.Dialect.SapSQLAnywhere17Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSQLAnywhere17Dialect : NHibernate.Dialect.SybaseSQLAnywhere12Dialect + { + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString sql, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + protected virtual void RegisterConfigurationDependentFunctions() => throw null; + protected override void RegisterKeywords() => throw null; + protected override void RegisterMathFunctions() => throw null; + protected override void RegisterStringFunctions() => throw null; + public SapSQLAnywhere17Dialect() => throw null; + public override bool SupportsNullInUnique { get => throw null; } + } + + // Generated from `NHibernate.Dialect.SybaseASA9Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseASA9Dialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override string ForUpdateString { get => throw null; } + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString queryString, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override string NoColumnsInsertString { get => throw null; } + public override string NullColumnString { get => throw null; } + public override bool OffsetStartsAtOne { get => throw null; } + public override bool QualifyIndexName { get => throw null; } + public override bool SupportsCrossJoin { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public SybaseASA9Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.SybaseASE15Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseASE15Dialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertString) => throw null; + public override string AppendLockHint(NHibernate.LockMode lockMode, string tableName) => throw null; + public override NHibernate.SqlCommand.SqlString ApplyLocksToSql(NHibernate.SqlCommand.SqlString sql, System.Collections.Generic.IDictionary aliasedLockModes, System.Collections.Generic.IDictionary keyColumnNames) => throw null; + public override bool AreStringComparisonsCaseInsensitive { get => throw null; } + public override System.Char CloseQuote { get => throw null; } + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSelectString { get => throw null; } + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override bool DropTemporaryTableAfterUse() => throw null; + public override string ForUpdateString { get => throw null; } + public override string GenerateTemporaryTableName(string baseTableName) => throw null; + public override System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand statement) => throw null; + public override System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand statement, System.Threading.CancellationToken cancellationToken) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override string NullColumnString { get => throw null; } + public override System.Char OpenQuote { get => throw null; } + public override bool QualifyIndexName { get => throw null; } + public override int RegisterResultSetOutParameter(System.Data.Common.DbCommand statement, int position) => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCascadeDelete { get => throw null; } + public override bool SupportsCrossJoin { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExistsInSelect { get => throw null; } + public override bool SupportsExpectedLobUsagePattern { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public SybaseASE15Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.SybaseSQLAnywhere10Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseSQLAnywhere10Dialect : NHibernate.Dialect.Dialect + { + public override string AddColumnString { get => throw null; } + public override NHibernate.SqlCommand.SqlString AppendIdentitySelectToInsert(NHibernate.SqlCommand.SqlString insertSql) => throw null; + public override bool AreStringComparisonsCaseInsensitive { get => throw null; } + public override System.Char CloseQuote { get => throw null; } + public override string CreateTemporaryTablePostfix { get => throw null; } + public override string CreateTemporaryTableString { get => throw null; } + public override string CurrentTimestampSQLFunctionName { get => throw null; } + public override string CurrentTimestampSelectString { get => throw null; } + public override bool DoesReadCommittedCauseWritersToBlockReaders { get => throw null; } + public override bool DoesRepeatableReadCauseReadersToBlockWriters { get => throw null; } + public override bool DropConstraints { get => throw null; } + public override string DropForeignKeyString { get => throw null; } + public string ForReadOnlyString { get => throw null; } + public string ForUpdateByLockString { get => throw null; } + public override string ForUpdateNowaitString { get => throw null; } + public override bool ForUpdateOfColumns { get => throw null; } + public override string ForUpdateString { get => throw null; } + protected static int GetAfterSelectInsertPoint(NHibernate.SqlCommand.SqlString sql) => throw null; + public override NHibernate.Dialect.Schema.IDataBaseSchema GetDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public override string GetForUpdateString(NHibernate.LockMode lockMode) => throw null; + public override NHibernate.SqlCommand.SqlString GetLimitString(NHibernate.SqlCommand.SqlString sql, NHibernate.SqlCommand.SqlString offset, NHibernate.SqlCommand.SqlString limit) => throw null; + public override System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand statement) => throw null; + public override System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand statement, System.Threading.CancellationToken cancellationToken) => throw null; + public override string IdentityColumnString { get => throw null; } + public override string IdentitySelectString { get => throw null; } + public override bool IsCurrentTimestampSelectStringCallable { get => throw null; } + public override int MaxAliasLength { get => throw null; } + public override string NoColumnsInsertString { get => throw null; } + public override string NullColumnString { get => throw null; } + public override bool OffsetStartsAtOne { get => throw null; } + public override System.Char OpenQuote { get => throw null; } + public override bool? PerformTemporaryTableDDLInIsolation() => throw null; + public override bool QualifyIndexName { get => throw null; } + protected virtual void RegisterAggregationFunctions() => throw null; + protected virtual void RegisterBitFunctions() => throw null; + protected virtual void RegisterCharacterTypeMappings() => throw null; + protected virtual void RegisterDateFunctions() => throw null; + protected virtual void RegisterDateTimeTypeMappings() => throw null; + protected virtual void RegisterFunctions() => throw null; + protected virtual void RegisterKeywords() => throw null; + protected virtual void RegisterMathFunctions() => throw null; + protected virtual void RegisterMiscellaneousFunctions() => throw null; + protected virtual void RegisterNumericTypeMappings() => throw null; + public override int RegisterResultSetOutParameter(System.Data.Common.DbCommand statement, int position) => throw null; + protected virtual void RegisterReverseNHibernateTypeMappings() => throw null; + protected virtual void RegisterSoapFunctions() => throw null; + protected virtual void RegisterStringFunctions() => throw null; + protected virtual void RegisterXmlFunctions() => throw null; + public override string SelectGUIDString { get => throw null; } + public override bool SupportsCommentOn { get => throw null; } + public override bool SupportsCurrentTimestampSelection { get => throw null; } + public override bool SupportsEmptyInList { get => throw null; } + public override bool SupportsExistsInSelect { get => throw null; } + public override bool SupportsIdentityColumns { get => throw null; } + public override bool SupportsInsertSelectIdentity { get => throw null; } + public override bool SupportsLimit { get => throw null; } + public override bool SupportsLimitOffset { get => throw null; } + public override bool SupportsOuterJoinForUpdate { get => throw null; } + public override bool SupportsResultSetPositionQueryMethodsOnForwardOnlyCursor { get => throw null; } + public override bool SupportsTemporaryTables { get => throw null; } + public override bool SupportsUnionAll { get => throw null; } + public override bool SupportsVariableLimit { get => throw null; } + public SybaseSQLAnywhere10Dialect() => throw null; + public override System.Int64 TimestampResolutionInTicks { get => throw null; } + } + + // Generated from `NHibernate.Dialect.SybaseSQLAnywhere11Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseSQLAnywhere11Dialect : NHibernate.Dialect.SybaseSQLAnywhere10Dialect + { + public SybaseSQLAnywhere11Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.SybaseSQLAnywhere12Dialect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseSQLAnywhere12Dialect : NHibernate.Dialect.SybaseSQLAnywhere11Dialect + { + public override string CurrentUtcTimestampSQLFunctionName { get => throw null; } + public override string CurrentUtcTimestampSelectString { get => throw null; } + public override string GetCreateSequenceString(string sequenceName) => throw null; + public override string GetDropSequenceString(string sequenceName) => throw null; + public override string GetSelectSequenceNextValString(string sequenceName) => throw null; + public override string GetSequenceNextValString(string sequenceName) => throw null; + public override string NoColumnsInsertString { get => throw null; } + public override string QuerySequencesString { get => throw null; } + protected override void RegisterDateFunctions() => throw null; + protected override void RegisterDateTimeTypeMappings() => throw null; + protected override void RegisterKeywords() => throw null; + public override bool SupportsCurrentUtcTimestampSelection { get => throw null; } + public override bool SupportsPooledSequences { get => throw null; } + public override bool SupportsSequences { get => throw null; } + public SybaseSQLAnywhere12Dialect() => throw null; + } + + // Generated from `NHibernate.Dialect.TypeNames` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeNames + { + public string Get(System.Data.DbType typecode, int size, int precision, int scale) => throw null; + public string Get(System.Data.DbType typecode) => throw null; + public string GetLongest(System.Data.DbType typecode) => throw null; + public const string LengthPlaceHolder = default; + public const string PrecisionPlaceHolder = default; + public void Put(System.Data.DbType typecode, string value) => throw null; + public void Put(System.Data.DbType typecode, int capacity, string value) => throw null; + public const string ScalePlaceHolder = default; + public bool TryGet(System.Data.DbType typecode, out string typeName) => throw null; + public bool TryGet(System.Data.DbType typecode, int size, int precision, int scale, out string typeName) => throw null; + public TypeNames() => throw null; + } + + namespace Function + { + // Generated from `NHibernate.Dialect.Function.AnsiExtractFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiExtractFunction : NHibernate.Dialect.Function.SQLFunctionTemplate, NHibernate.Dialect.Function.IFunctionGrammar + { + public AnsiExtractFunction() : base(default(NHibernate.Type.IType), default(string)) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsKnownArgument(string token) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsSeparator(string token) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.AnsiSubstringFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiSubstringFunction : NHibernate.Dialect.Function.ISQLFunction + { + public AnsiSubstringFunction() => throw null; + public NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.AnsiTrimEmulationFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiTrimEmulationFunction : NHibernate.Dialect.Function.ISQLFunction, NHibernate.Dialect.Function.IFunctionGrammar + { + public AnsiTrimEmulationFunction(string replaceFunction) => throw null; + public AnsiTrimEmulationFunction() => throw null; + public NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + bool NHibernate.Dialect.Function.IFunctionGrammar.IsKnownArgument(string token) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsSeparator(string token) => throw null; + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.AnsiTrimFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiTrimFunction : NHibernate.Dialect.Function.SQLFunctionTemplate, NHibernate.Dialect.Function.IFunctionGrammar + { + public AnsiTrimFunction() : base(default(NHibernate.Type.IType), default(string)) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsKnownArgument(string token) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsSeparator(string token) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.BitwiseFunctionOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BitwiseFunctionOperation : NHibernate.Dialect.Function.ISQLFunction + { + public BitwiseFunctionOperation(string functionName) => throw null; + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.BitwiseNativeOperation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BitwiseNativeOperation : NHibernate.Dialect.Function.ISQLFunction + { + public BitwiseNativeOperation(string sqlOpToken, bool isUnary) => throw null; + public BitwiseNativeOperation(string sqlOpToken) => throw null; + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.CastFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CastFunction : NHibernate.Dialect.Function.ISQLFunction, NHibernate.Dialect.Function.IFunctionGrammar + { + public CastFunction() => throw null; + protected virtual bool CastingIsRequired(string sqlType) => throw null; + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + bool NHibernate.Dialect.Function.IFunctionGrammar.IsKnownArgument(string token) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsSeparator(string token) => throw null; + public string Name { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected virtual NHibernate.SqlCommand.SqlString Render(object expression, string sqlType, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.CharIndexFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CharIndexFunction : NHibernate.Dialect.Function.ISQLFunction + { + public CharIndexFunction() => throw null; + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.ClassicAggregateFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassicAggregateFunction : NHibernate.Dialect.Function.ISQLFunction, NHibernate.Dialect.Function.IFunctionGrammar + { + public ClassicAggregateFunction(string name, bool acceptAsterisk, NHibernate.Type.IType typeValue) => throw null; + public ClassicAggregateFunction(string name, bool acceptAsterisk) => throw null; + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public virtual NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + bool NHibernate.Dialect.Function.IFunctionGrammar.IsKnownArgument(string token) => throw null; + bool NHibernate.Dialect.Function.IFunctionGrammar.IsSeparator(string token) => throw null; + public string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToString() => throw null; + protected bool TryGetArgumentType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError, out NHibernate.Type.IType argumentType, out NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected bool acceptAsterisk; + } + + // Generated from `NHibernate.Dialect.Function.ClassicAvgFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassicAvgFunction : NHibernate.Dialect.Function.ClassicAggregateFunction + { + public ClassicAvgFunction() : base(default(string), default(bool)) => throw null; + public override NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public override NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.ClassicCountFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassicCountFunction : NHibernate.Dialect.Function.ClassicAggregateFunction + { + public ClassicCountFunction() : base(default(string), default(bool)) => throw null; + public override NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public override NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.ClassicSumFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassicSumFunction : NHibernate.Dialect.Function.ClassicAggregateFunction + { + public ClassicSumFunction() : base(default(string), default(bool)) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.CommonGrammar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CommonGrammar : NHibernate.Dialect.Function.IFunctionGrammar + { + public CommonGrammar() => throw null; + public bool IsKnownArgument(string token) => throw null; + public bool IsSeparator(string token) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.EmulatedLengthSubstringFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmulatedLengthSubstringFunction : NHibernate.Dialect.Function.StandardSQLFunction + { + public EmulatedLengthSubstringFunction() : base(default(string)) => throw null; + public override NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.IFunctionGrammar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFunctionGrammar + { + bool IsKnownArgument(string token); + bool IsSeparator(string token); + } + + // Generated from `NHibernate.Dialect.Function.ISQLFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISQLFunction + { + bool HasArguments { get; } + bool HasParenthesesIfNoArguments { get; } + NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory); + NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping); + } + + // Generated from `NHibernate.Dialect.Function.ISQLFunctionExtended` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface ISQLFunctionExtended : NHibernate.Dialect.Function.ISQLFunction + { + NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError); + NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError); + string Name { get; } + } + + // Generated from `NHibernate.Dialect.Function.NoArgSQLFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoArgSQLFunction : NHibernate.Dialect.Function.ISQLFunction + { + public NHibernate.Type.IType FunctionReturnType { get => throw null; set => throw null; } + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public NoArgSQLFunction(string name, NHibernate.Type.IType returnType, bool hasParenthesesIfNoArguments) => throw null; + public NoArgSQLFunction(string name, NHibernate.Type.IType returnType) => throw null; + public virtual NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.NvlFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NvlFunction : NHibernate.Dialect.Function.ISQLFunction + { + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public NvlFunction() => throw null; + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.PositionSubstringFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PositionSubstringFunction : NHibernate.Dialect.Function.ISQLFunction + { + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public PositionSubstringFunction() => throw null; + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.SQLFunctionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SQLFunctionExtensions + { + public static NHibernate.Type.IType GetEffectiveReturnType(this NHibernate.Dialect.Function.ISQLFunction sqlFunction, System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public static NHibernate.Type.IType GetReturnType(this NHibernate.Dialect.Function.ISQLFunction sqlFunction, System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.SQLFunctionRegistry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLFunctionRegistry + { + public NHibernate.Dialect.Function.ISQLFunction FindSQLFunction(string functionName) => throw null; + public bool HasFunction(string functionName) => throw null; + public SQLFunctionRegistry(NHibernate.Dialect.Dialect dialect, System.Collections.Generic.IDictionary userFunctions) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.SQLFunctionTemplate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLFunctionTemplate : NHibernate.Dialect.Function.ISQLFunction + { + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public virtual NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public virtual string Name { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + public SQLFunctionTemplate(NHibernate.Type.IType type, string template, bool hasParenthesesIfNoArgs) => throw null; + public SQLFunctionTemplate(NHibernate.Type.IType type, string template) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Dialect.Function.SQLFunctionTemplateWithRequiredParameters` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLFunctionTemplateWithRequiredParameters : NHibernate.Dialect.Function.SQLFunctionTemplate + { + public override NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public SQLFunctionTemplateWithRequiredParameters(NHibernate.Type.IType type, string template, object[] requiredArgs, bool hasParenthesesIfNoArgs) : base(default(NHibernate.Type.IType), default(string)) => throw null; + public SQLFunctionTemplateWithRequiredParameters(NHibernate.Type.IType type, string template, object[] requiredArgs) : base(default(NHibernate.Type.IType), default(string)) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.StandardSQLFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardSQLFunction : NHibernate.Dialect.Function.ISQLFunction + { + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public virtual NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public string Name { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + public StandardSQLFunction(string name, NHibernate.Type.IType typeValue) => throw null; + public StandardSQLFunction(string name) => throw null; + public override string ToString() => throw null; + protected string name; + } + + // Generated from `NHibernate.Dialect.Function.StandardSafeSQLFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardSafeSQLFunction : NHibernate.Dialect.Function.StandardSQLFunction + { + public override NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public StandardSafeSQLFunction(string name, int allowedArgsCount) : base(default(string)) => throw null; + public StandardSafeSQLFunction(string name, NHibernate.Type.IType typeValue, int allowedArgsCount) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Dialect.Function.TransparentCastFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TransparentCastFunction : NHibernate.Dialect.Function.CastFunction + { + protected override bool CastingIsRequired(string sqlType) => throw null; + protected override NHibernate.SqlCommand.SqlString Render(object expression, string sqlType, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public TransparentCastFunction() => throw null; + } + + // Generated from `NHibernate.Dialect.Function.VarArgsSQLFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VarArgsSQLFunction : NHibernate.Dialect.Function.ISQLFunction + { + public virtual NHibernate.Type.IType GetEffectiveReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public virtual NHibernate.Type.IType GetReturnType(System.Collections.Generic.IEnumerable argumentTypes, NHibernate.Engine.IMapping mapping, bool throwOnError) => throw null; + public bool HasArguments { get => throw null; } + public bool HasParenthesesIfNoArguments { get => throw null; } + public virtual string Name { get => throw null; } + public NHibernate.SqlCommand.SqlString Render(System.Collections.IList args, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual NHibernate.Type.IType ReturnType(NHibernate.Type.IType columnType, NHibernate.Engine.IMapping mapping) => throw null; + public VarArgsSQLFunction(string begin, string sep, string end) => throw null; + public VarArgsSQLFunction(NHibernate.Type.IType type, string begin, string sep, string end) => throw null; + } + + } + namespace Lock + { + // Generated from `NHibernate.Dialect.Lock.ILockingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILockingStrategy + { + void Lock(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task LockAsync(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Dialect.Lock.SelectLockingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectLockingStrategy : NHibernate.Dialect.Lock.ILockingStrategy + { + public void Lock(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LockAsync(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public SelectLockingStrategy(NHibernate.Persister.Entity.ILockable lockable, NHibernate.LockMode lockMode) => throw null; + } + + // Generated from `NHibernate.Dialect.Lock.UpdateLockingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UpdateLockingStrategy : NHibernate.Dialect.Lock.ILockingStrategy + { + public void Lock(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LockAsync(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public UpdateLockingStrategy(NHibernate.Persister.Entity.ILockable lockable, NHibernate.LockMode lockMode) => throw null; + } + + } + namespace Schema + { + // Generated from `NHibernate.Dialect.Schema.AbstractColumnMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractColumnMetaData : NHibernate.Dialect.Schema.IColumnMetadata + { + public AbstractColumnMetaData(System.Data.DataRow rs) => throw null; + public int ColumnSize { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string Nullable { get => throw null; set => throw null; } + public int NumericalPrecision { get => throw null; set => throw null; } + protected void SetColumnSize(object columnSizeValue) => throw null; + protected void SetNumericalPrecision(object numericalPrecisionValue) => throw null; + public override string ToString() => throw null; + public string TypeName { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.AbstractDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractDataBaseSchema : NHibernate.Dialect.Schema.IDataBaseSchema + { + protected AbstractDataBaseSchema(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect dialect) => throw null; + protected AbstractDataBaseSchema(System.Data.Common.DbConnection connection) => throw null; + public virtual string ColumnNameForTableName { get => throw null; } + protected System.Data.Common.DbConnection Connection { get => throw null; } + protected virtual string ForeignKeysSchemaName { get => throw null; } + public virtual System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public virtual System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public virtual System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public virtual System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public virtual System.Collections.Generic.ISet GetReservedWords() => throw null; + public abstract NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras); + public virtual System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public virtual bool IncludeDataTypesInReservedWords { get => throw null; } + public virtual bool StoresLowerCaseIdentifiers { get => throw null; } + public virtual bool StoresLowerCaseQuotedIdentifiers { get => throw null; } + public virtual bool StoresMixedCaseQuotedIdentifiers { get => throw null; } + public virtual bool StoresUpperCaseIdentifiers { get => throw null; } + public virtual bool StoresUpperCaseQuotedIdentifiers { get => throw null; } + public virtual bool UseDialectQualifyInsteadOfTableName { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.AbstractForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AbstractForeignKeyMetadata : NHibernate.Dialect.Schema.IForeignKeyMetadata + { + public AbstractForeignKeyMetadata(System.Data.DataRow rs) => throw null; + public void AddColumn(NHibernate.Dialect.Schema.IColumnMetadata column) => throw null; + public NHibernate.Dialect.Schema.IColumnMetadata[] Columns { get => throw null; } + public string Name { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.AbstractIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractIndexMetadata : NHibernate.Dialect.Schema.IIndexMetadata + { + public AbstractIndexMetadata(System.Data.DataRow rs) => throw null; + public void AddColumn(NHibernate.Dialect.Schema.IColumnMetadata column) => throw null; + public NHibernate.Dialect.Schema.IColumnMetadata[] Columns { get => throw null; } + public string Name { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.AbstractTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractTableMetadata : NHibernate.Dialect.Schema.ITableMetadata + { + public AbstractTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) => throw null; + public string Catalog { get => throw null; set => throw null; } + public NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(string columnName) => throw null; + protected abstract NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs); + protected abstract string GetColumnName(System.Data.DataRow rs); + protected abstract string GetConstraintName(System.Data.DataRow rs); + public NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(string keyName) => throw null; + protected abstract NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs); + public NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(string indexName) => throw null; + protected abstract NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs); + protected abstract string GetIndexName(System.Data.DataRow rs); + public string Name { get => throw null; set => throw null; } + public virtual bool NeedPhysicalConstraintCreation(string fkName) => throw null; + protected abstract void ParseTableInfo(System.Data.DataRow rs); + public string Schema { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.DB2ColumnMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2ColumnMetaData : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public DB2ColumnMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.DB2ForeignKeyMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2ForeignKeyMetaData : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public DB2ForeignKeyMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.DB2IndexMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2IndexMetaData : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public DB2IndexMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.DB2MetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2MetaData : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public DB2MetaData(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Collections.Generic.ISet GetReservedWords() => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.DB2TableMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2TableMetaData : NHibernate.Dialect.Schema.AbstractTableMetadata + { + public DB2TableMetaData(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.FirebirdColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public FirebirdColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.FirebirdDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public FirebirdDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override bool StoresUpperCaseIdentifiers { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.FirebirdForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public FirebirdForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.FirebirdIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public FirebirdIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.FirebirdTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + public FirebirdTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.HanaColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public HanaColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.HanaDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public override System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public override System.Collections.Generic.ISet GetReservedWords() => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public HanaDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override bool StoresUpperCaseIdentifiers { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.HanaForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public HanaForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.HanaIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public HanaIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.HanaTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + public HanaTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.IColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnMetadata + { + int ColumnSize { get; } + string Name { get; } + string Nullable { get; } + int NumericalPrecision { get; } + string TypeName { get; } + } + + // Generated from `NHibernate.Dialect.Schema.IDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDataBaseSchema + { + string ColumnNameForTableName { get; } + System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern); + System.Data.DataTable GetForeignKeys(string catalog, string schema, string table); + System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName); + System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName); + System.Collections.Generic.ISet GetReservedWords(); + NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras); + System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types); + bool StoresLowerCaseIdentifiers { get; } + bool StoresLowerCaseQuotedIdentifiers { get; } + bool StoresMixedCaseQuotedIdentifiers { get; } + bool StoresUpperCaseIdentifiers { get; } + bool StoresUpperCaseQuotedIdentifiers { get; } + } + + // Generated from `NHibernate.Dialect.Schema.IForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IForeignKeyMetadata + { + void AddColumn(NHibernate.Dialect.Schema.IColumnMetadata column); + NHibernate.Dialect.Schema.IColumnMetadata[] Columns { get; } + string Name { get; } + } + + // Generated from `NHibernate.Dialect.Schema.IIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIndexMetadata + { + void AddColumn(NHibernate.Dialect.Schema.IColumnMetadata column); + NHibernate.Dialect.Schema.IColumnMetadata[] Columns { get; } + string Name { get; } + } + + // Generated from `NHibernate.Dialect.Schema.ITableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITableMetadata + { + string Catalog { get; } + NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(string columnName); + NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(string keyName); + NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(string indexName); + string Name { get; } + bool NeedPhysicalConstraintCreation(string fkName); + string Schema { get; } + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlCeColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public MsSqlCeColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlCeDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public MsSqlCeDataBaseSchema(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect dialect) : base(default(System.Data.Common.DbConnection)) => throw null; + public MsSqlCeDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override bool UseDialectQualifyInsteadOfTableName { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlCeForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public MsSqlCeForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlCeIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public MsSqlCeIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlCeTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlCeTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + public MsSqlCeTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public MsSqlColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public MsSqlDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public MsSqlForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public MsSqlIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MsSqlTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MsSqlTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + public MsSqlTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MySQLColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public MySQLColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MySQLDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + protected override string ForeignKeysSchemaName { get => throw null; } + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public MySQLDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MySQLForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public MySQLForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MySQLIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public MySQLIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.MySQLTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySQLTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + public MySQLTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.OracleColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public OracleColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.OracleDataBaseSchema` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleDataBaseSchema : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public override System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public OracleDataBaseSchema(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override bool StoresUpperCaseIdentifiers { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.OracleForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public OracleForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.OracleIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public OracleIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.OracleTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + public OracleTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.PostgreSQLColumnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLColumnMetadata : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public PostgreSQLColumnMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.PostgreSQLDataBaseMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLDataBaseMetadata : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public override System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public override bool IncludeDataTypesInReservedWords { get => throw null; } + public PostgreSQLDataBaseMetadata(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override bool StoresLowerCaseIdentifiers { get => throw null; } + public override bool StoresMixedCaseQuotedIdentifiers { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.PostgreSQLForeignKeyMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLForeignKeyMetadata : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public PostgreSQLForeignKeyMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.PostgreSQLIndexMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLIndexMetadata : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public PostgreSQLIndexMetadata(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.PostgreSQLTableMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostgreSQLTableMetadata : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + public PostgreSQLTableMetadata(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SQLiteColumnMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteColumnMetaData : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public SQLiteColumnMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SQLiteDataBaseMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteDataBaseMetaData : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public SQLiteDataBaseMetaData(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect dialect) : base(default(System.Data.Common.DbConnection)) => throw null; + public SQLiteDataBaseMetaData(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + public override bool UseDialectQualifyInsteadOfTableName { get => throw null; } + } + + // Generated from `NHibernate.Dialect.Schema.SQLiteForeignKeyMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteForeignKeyMetaData : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public SQLiteForeignKeyMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SQLiteIndexMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteIndexMetaData : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public SQLiteIndexMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SQLiteTableMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLiteTableMetaData : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + public SQLiteTableMetaData(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SapSqlAnywhere17ColumnMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSqlAnywhere17ColumnMetaData : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public SapSqlAnywhere17ColumnMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SapSqlAnywhere17DataBaseMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSqlAnywhere17DataBaseMetaData : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public override System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public override System.Collections.Generic.ISet GetReservedWords() => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public SapSqlAnywhere17DataBaseMetaData(System.Data.Common.DbConnection connection) : base(default(System.Data.Common.DbConnection)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SapSqlAnywhere17ForeignKeyMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSqlAnywhere17ForeignKeyMetaData : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public SapSqlAnywhere17ForeignKeyMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SapSqlAnywhere17IndexMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSqlAnywhere17IndexMetaData : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public SapSqlAnywhere17IndexMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SapSqlAnywhere17TableMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSqlAnywhere17TableMetaData : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + public SapSqlAnywhere17TableMetaData(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SchemaHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SchemaHelper + { + public static string GetString(System.Data.DataRow row, params string[] alternativeColumnNames) => throw null; + public static object GetValue(System.Data.DataRow row, params string[] alternativeColumnNames) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SybaseAnywhereColumnMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAnywhereColumnMetaData : NHibernate.Dialect.Schema.AbstractColumnMetaData + { + public SybaseAnywhereColumnMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SybaseAnywhereDataBaseMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAnywhereDataBaseMetaData : NHibernate.Dialect.Schema.AbstractDataBaseSchema + { + public override System.Data.DataTable GetColumns(string catalog, string schemaPattern, string tableNamePattern, string columnNamePattern) => throw null; + public override System.Data.DataTable GetForeignKeys(string catalog, string schema, string table) => throw null; + public override System.Data.DataTable GetIndexColumns(string catalog, string schemaPattern, string tableName, string indexName) => throw null; + public override System.Data.DataTable GetIndexInfo(string catalog, string schemaPattern, string tableName) => throw null; + public override System.Collections.Generic.ISet GetReservedWords() => throw null; + public override NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(System.Data.DataRow rs, bool extras) => throw null; + public override System.Data.DataTable GetTables(string catalog, string schemaPattern, string tableNamePattern, string[] types) => throw null; + public SybaseAnywhereDataBaseMetaData(System.Data.Common.DbConnection pObjConnection) : base(default(System.Data.Common.DbConnection)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SybaseAnywhereForeignKeyMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAnywhereForeignKeyMetaData : NHibernate.Dialect.Schema.AbstractForeignKeyMetadata + { + public SybaseAnywhereForeignKeyMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SybaseAnywhereIndexMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAnywhereIndexMetaData : NHibernate.Dialect.Schema.AbstractIndexMetadata + { + public SybaseAnywhereIndexMetaData(System.Data.DataRow rs) : base(default(System.Data.DataRow)) => throw null; + } + + // Generated from `NHibernate.Dialect.Schema.SybaseAnywhereTableMetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAnywhereTableMetaData : NHibernate.Dialect.Schema.AbstractTableMetadata + { + protected override NHibernate.Dialect.Schema.IColumnMetadata GetColumnMetadata(System.Data.DataRow rs) => throw null; + protected override string GetColumnName(System.Data.DataRow rs) => throw null; + protected override string GetConstraintName(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IForeignKeyMetadata GetForeignKeyMetadata(System.Data.DataRow rs) => throw null; + protected override NHibernate.Dialect.Schema.IIndexMetadata GetIndexMetadata(System.Data.DataRow rs) => throw null; + protected override string GetIndexName(System.Data.DataRow rs) => throw null; + protected override void ParseTableInfo(System.Data.DataRow rs) => throw null; + public SybaseAnywhereTableMetaData(System.Data.DataRow rs, NHibernate.Dialect.Schema.IDataBaseSchema meta, bool extras) : base(default(System.Data.DataRow), default(NHibernate.Dialect.Schema.IDataBaseSchema), default(bool)) => throw null; + } + + } + } + namespace Driver + { + // Generated from `NHibernate.Driver.BasicResultSetsCommand` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicResultSetsCommand : NHibernate.Driver.IResultSetsCommand + { + public virtual void Append(NHibernate.SqlCommand.ISqlCommand command) => throw null; + public BasicResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual void BindParameters(System.Data.Common.DbCommand command) => throw null; + protected System.Collections.Generic.List Commands { get => throw null; set => throw null; } + protected void ForEachSqlCommand(System.Action actionToDo) => throw null; + public virtual System.Data.Common.DbDataReader GetReader(int? commandTimeout) => throw null; + public virtual System.Threading.Tasks.Task GetReaderAsync(int? commandTimeout, System.Threading.CancellationToken cancellationToken) => throw null; + public bool HasQueries { get => throw null; } + protected NHibernate.Engine.ISessionImplementor Session { get => throw null; set => throw null; } + public virtual NHibernate.SqlCommand.SqlString Sql { get => throw null; } + } + + // Generated from `NHibernate.Driver.BatcherDataReaderWrapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BatcherDataReaderWrapper : System.Data.Common.DbDataReader + { + protected BatcherDataReaderWrapper(NHibernate.Engine.IBatcher batcher, System.Data.Common.DbCommand command) => throw null; + public override void Close() => throw null; + public static NHibernate.Driver.BatcherDataReaderWrapper Create(NHibernate.Engine.IBatcher batcher, System.Data.Common.DbCommand command) => throw null; + public static System.Threading.Tasks.Task CreateAsync(NHibernate.Engine.IBatcher batcher, System.Data.Common.DbCommand command, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Depth { get => throw null; } + public override bool Equals(object obj) => throw null; + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int i) => throw null; + public override System.Byte GetByte(int i) => throw null; + public override System.Int64 GetBytes(int i, System.Int64 fieldOffset, System.Byte[] buffer, int bufferoffset, int length) => throw null; + public override System.Char GetChar(int i) => throw null; + public override System.Int64 GetChars(int i, System.Int64 fieldoffset, System.Char[] buffer, int bufferoffset, int length) => throw null; + public override string GetDataTypeName(int i) => throw null; + public override System.DateTime GetDateTime(int i) => throw null; + protected override System.Data.Common.DbDataReader GetDbDataReader(int ordinal) => throw null; + public override System.Decimal GetDecimal(int i) => throw null; + public override double GetDouble(int i) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int i) => throw null; + public override float GetFloat(int i) => throw null; + public override System.Guid GetGuid(int i) => throw null; + public override int GetHashCode() => throw null; + public override System.Int16 GetInt16(int i) => throw null; + public override int GetInt32(int i) => throw null; + public override System.Int64 GetInt64(int i) => throw null; + public override string GetName(int i) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public override string GetString(int i) => throw null; + public override object GetValue(int i) => throw null; + public override int GetValues(object[] values) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + public override bool IsDBNull(int i) => throw null; + public override System.Threading.Tasks.Task IsDBNullAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public override object this[string name] { get => throw null; } + public override object this[int i] { get => throw null; } + public override bool NextResult() => throw null; + public override System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Read() => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override int RecordsAffected { get => throw null; } + } + + // Generated from `NHibernate.Driver.CsharpSqliteDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CsharpSqliteDriver : NHibernate.Driver.ReflectionBasedDriver + { + public CsharpSqliteDriver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.DB2400Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2400Driver : NHibernate.Driver.ReflectionBasedDriver + { + public DB2400Driver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.DB2CoreDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2CoreDriver : NHibernate.Driver.DB2DriverBase + { + public DB2CoreDriver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.DB2Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DB2Driver : NHibernate.Driver.DB2DriverBase + { + public DB2Driver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.DB2DriverBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class DB2DriverBase : NHibernate.Driver.ReflectionBasedDriver + { + protected DB2DriverBase(string assemblyName) : base(default(string), default(string), default(string)) => throw null; + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.DbProviderFactoryDriveConnectionCommandProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DbProviderFactoryDriveConnectionCommandProvider : NHibernate.Driver.IDriveConnectionCommandProvider + { + public System.Data.Common.DbCommand CreateCommand() => throw null; + public System.Data.Common.DbConnection CreateConnection() => throw null; + public DbProviderFactoryDriveConnectionCommandProvider(System.Data.Common.DbProviderFactory dbProviderFactory) => throw null; + } + + // Generated from `NHibernate.Driver.DotConnectMySqlDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DotConnectMySqlDriver : NHibernate.Driver.ReflectionBasedDriver + { + public DotConnectMySqlDriver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.DriverBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class DriverBase : NHibernate.Driver.ISqlParameterFormatter, NHibernate.Driver.IDriver + { + public virtual void AdjustCommand(System.Data.Common.DbCommand command) => throw null; + public virtual System.Data.Common.DbTransaction BeginTransaction(System.Data.IsolationLevel isolationLevel, System.Data.Common.DbConnection connection) => throw null; + protected virtual System.Data.Common.DbParameter CloneParameter(System.Data.Common.DbCommand cmd, System.Data.Common.DbParameter originalParameter, NHibernate.SqlTypes.SqlType originalType) => throw null; + public virtual int CommandTimeout { get => throw null; } + public virtual void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public abstract System.Data.Common.DbCommand CreateCommand(); + public abstract System.Data.Common.DbConnection CreateConnection(); + protected DriverBase() => throw null; + public virtual void ExpandQueryParameters(System.Data.Common.DbCommand cmd, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + public string FormatNameForParameter(string parameterName) => throw null; + public string FormatNameForSql(string parameterName) => throw null; + public virtual System.Data.Common.DbCommand GenerateCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + public System.Data.Common.DbParameter GenerateOutputParameter(System.Data.Common.DbCommand command) => throw null; + public System.Data.Common.DbParameter GenerateParameter(System.Data.Common.DbCommand command, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + string NHibernate.Driver.ISqlParameterFormatter.GetParameterName(int index) => throw null; + public virtual NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual NHibernate.Driver.SqlStringFormatter GetSqlStringFormatter() => throw null; + public virtual bool HasDelayedDistributedTransactionCompletion { get => throw null; } + protected virtual void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected bool IsPrepareSqlEnabled { get => throw null; } + public virtual System.DateTime MinDate { get => throw null; } + public abstract string NamedPrefix { get; } + protected virtual void OnBeforePrepare(System.Data.Common.DbCommand command) => throw null; + public void PrepareCommand(System.Data.Common.DbCommand command) => throw null; + public void RemoveUnusedCommandParameters(System.Data.Common.DbCommand cmd, NHibernate.SqlCommand.SqlString sqlString) => throw null; + public virtual bool RequiresTimeSpanForTime { get => throw null; } + protected virtual void SetCommandTimeout(System.Data.Common.DbCommand cmd) => throw null; + public virtual bool SupportsEnlistmentWhenAutoEnlistmentIsDisabled { get => throw null; } + public virtual bool SupportsMultipleOpenReaders { get => throw null; } + public virtual bool SupportsMultipleQueries { get => throw null; } + public virtual bool SupportsNullEnlistment { get => throw null; } + protected virtual bool SupportsPreparingCommands { get => throw null; } + public virtual bool SupportsSystemTransactions { get => throw null; } + public abstract bool UseNamedPrefixInParameter { get; } + public abstract bool UseNamedPrefixInSql { get; } + } + + // Generated from `NHibernate.Driver.DriverExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class DriverExtensions + { + public static System.Data.Common.DbTransaction BeginTransaction(this NHibernate.Driver.IDriver driver, System.Data.IsolationLevel isolationLevel, System.Data.Common.DbConnection connection) => throw null; + } + + // Generated from `NHibernate.Driver.FirebirdClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FirebirdClientDriver : NHibernate.Driver.ReflectionBasedDriver + { + public void ClearPool(string connectionString) => throw null; + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public FirebirdClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override System.Data.Common.DbCommand GenerateCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool SupportsEnlistmentWhenAutoEnlistmentIsDisabled { get => throw null; } + public override bool SupportsSystemTransactions { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.HanaColumnStoreDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaColumnStoreDriver : NHibernate.Driver.HanaDriverBase + { + public HanaColumnStoreDriver() => throw null; + } + + // Generated from `NHibernate.Driver.HanaDriverBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HanaDriverBase : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + protected HanaDriverBase() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public override bool SupportsNullEnlistment { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.HanaRowStoreDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HanaRowStoreDriver : NHibernate.Driver.HanaDriverBase + { + public HanaRowStoreDriver() => throw null; + public override bool SupportsSystemTransactions { get => throw null; } + } + + // Generated from `NHibernate.Driver.IDriveConnectionCommandProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDriveConnectionCommandProvider + { + System.Data.Common.DbCommand CreateCommand(); + System.Data.Common.DbConnection CreateConnection(); + } + + // Generated from `NHibernate.Driver.IDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDriver + { + void AdjustCommand(System.Data.Common.DbCommand command); + void Configure(System.Collections.Generic.IDictionary settings); + System.Data.Common.DbConnection CreateConnection(); + void ExpandQueryParameters(System.Data.Common.DbCommand cmd, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes); + System.Data.Common.DbCommand GenerateCommand(System.Data.CommandType type, NHibernate.SqlCommand.SqlString sqlString, NHibernate.SqlTypes.SqlType[] parameterTypes); + System.Data.Common.DbParameter GenerateParameter(System.Data.Common.DbCommand command, string name, NHibernate.SqlTypes.SqlType sqlType); + NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session); + bool HasDelayedDistributedTransactionCompletion { get; } + System.DateTime MinDate { get; } + void PrepareCommand(System.Data.Common.DbCommand command); + void RemoveUnusedCommandParameters(System.Data.Common.DbCommand cmd, NHibernate.SqlCommand.SqlString sqlString); + bool RequiresTimeSpanForTime { get; } + bool SupportsEnlistmentWhenAutoEnlistmentIsDisabled { get; } + bool SupportsMultipleOpenReaders { get; } + bool SupportsMultipleQueries { get; } + bool SupportsNullEnlistment { get; } + bool SupportsSystemTransactions { get; } + } + + // Generated from `NHibernate.Driver.IResultSetsCommand` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IResultSetsCommand + { + void Append(NHibernate.SqlCommand.ISqlCommand command); + System.Data.Common.DbDataReader GetReader(int? commandTimeout); + System.Threading.Tasks.Task GetReaderAsync(int? commandTimeout, System.Threading.CancellationToken cancellationToken); + bool HasQueries { get; } + NHibernate.SqlCommand.SqlString Sql { get; } + } + + // Generated from `NHibernate.Driver.ISqlParameterFormatter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlParameterFormatter + { + string GetParameterName(int index); + } + + // Generated from `NHibernate.Driver.IfxDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IfxDriver : NHibernate.Driver.ReflectionBasedDriver + { + public IfxDriver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.IngresDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IngresDriver : NHibernate.Driver.ReflectionBasedDriver + { + public IngresDriver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.MicrosoftDataSqlClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MicrosoftDataSqlClientDriver : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IParameterAdjuster, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + public virtual void AdjustParameterForValue(System.Data.Common.DbParameter parameter, NHibernate.SqlTypes.SqlType sqlType, object value) => throw null; + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsAnsiText(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsBlob(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsText(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public MicrosoftDataSqlClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override System.DateTime MinDate { get => throw null; } + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.MySqlDataDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MySqlDataDriver : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.DateTime MinDate { get => throw null; } + public MySqlDataDriver() : base(default(string), default(string), default(string)) => throw null; + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + protected override bool SupportsPreparingCommands { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.NDataReader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NDataReader : System.Data.Common.DbDataReader + { + public override void Close() => throw null; + public static NHibernate.Driver.NDataReader Create(System.Data.Common.DbDataReader reader, bool isMidstream) => throw null; + public static System.Threading.Tasks.Task CreateAsync(System.Data.Common.DbDataReader reader, bool isMidstream, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Depth { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int i) => throw null; + public override System.Byte GetByte(int i) => throw null; + public override System.Int64 GetBytes(int i, System.Int64 fieldOffset, System.Byte[] buffer, int bufferOffset, int length) => throw null; + public override System.Char GetChar(int i) => throw null; + public override System.Int64 GetChars(int i, System.Int64 fieldOffset, System.Char[] buffer, int bufferOffset, int length) => throw null; + public override string GetDataTypeName(int i) => throw null; + public override System.DateTime GetDateTime(int i) => throw null; + protected override System.Data.Common.DbDataReader GetDbDataReader(int ordinal) => throw null; + public override System.Decimal GetDecimal(int i) => throw null; + public override double GetDouble(int i) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int i) => throw null; + public override float GetFloat(int i) => throw null; + public override System.Guid GetGuid(int i) => throw null; + public override System.Int16 GetInt16(int i) => throw null; + public override int GetInt32(int i) => throw null; + public override System.Int64 GetInt64(int i) => throw null; + public override string GetName(int i) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public override string GetString(int i) => throw null; + public override object GetValue(int i) => throw null; + public override int GetValues(object[] values) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + public override bool IsDBNull(int i) => throw null; + public override System.Threading.Tasks.Task IsDBNullAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public override object this[string name] { get => throw null; } + public override object this[int i] { get => throw null; } + protected NDataReader() => throw null; + public override bool NextResult() => throw null; + public override System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Read() => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override int RecordsAffected { get => throw null; } + } + + // Generated from `NHibernate.Driver.NHybridDataReader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NHybridDataReader : System.Data.Common.DbDataReader + { + public override void Close() => throw null; + public static NHibernate.Driver.NHybridDataReader Create(System.Data.Common.DbDataReader reader, bool inMemory) => throw null; + public static NHibernate.Driver.NHybridDataReader Create(System.Data.Common.DbDataReader reader) => throw null; + public static System.Threading.Tasks.Task CreateAsync(System.Data.Common.DbDataReader reader, bool inMemory, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task CreateAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Depth { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int i) => throw null; + public override System.Byte GetByte(int i) => throw null; + public override System.Int64 GetBytes(int i, System.Int64 fieldOffset, System.Byte[] buffer, int bufferoffset, int length) => throw null; + public override System.Char GetChar(int i) => throw null; + public override System.Int64 GetChars(int i, System.Int64 fieldoffset, System.Char[] buffer, int bufferoffset, int length) => throw null; + public override string GetDataTypeName(int i) => throw null; + public override System.DateTime GetDateTime(int i) => throw null; + protected override System.Data.Common.DbDataReader GetDbDataReader(int ordinal) => throw null; + public override System.Decimal GetDecimal(int i) => throw null; + public override double GetDouble(int i) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int i) => throw null; + public override float GetFloat(int i) => throw null; + public override System.Guid GetGuid(int i) => throw null; + public override System.Int16 GetInt16(int i) => throw null; + public override int GetInt32(int i) => throw null; + public override System.Int64 GetInt64(int i) => throw null; + public override string GetName(int i) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public override string GetString(int i) => throw null; + public override object GetValue(int i) => throw null; + public override int GetValues(object[] values) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + public override bool IsDBNull(int i) => throw null; + public override System.Threading.Tasks.Task IsDBNullAsync(int ordinal, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsMidstream { get => throw null; } + public override object this[string name] { get => throw null; } + public override object this[int i] { get => throw null; } + protected NHybridDataReader() => throw null; + public override bool NextResult() => throw null; + public override System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Read() => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void ReadIntoMemory() => throw null; + public System.Threading.Tasks.Task ReadIntoMemoryAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override int RecordsAffected { get => throw null; } + public System.Data.Common.DbDataReader Target { get => throw null; } + // ERR: Stub generator didn't handle member: ~NHybridDataReader + } + + // Generated from `NHibernate.Driver.NpgsqlDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NpgsqlDriver : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + public NpgsqlDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool RequiresTimeSpanForTime { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + public override bool SupportsNullEnlistment { get => throw null; } + protected override bool SupportsPreparingCommands { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OdbcDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OdbcDriver : NHibernate.Driver.ReflectionBasedDriver + { + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override System.DateTime MinDate { get => throw null; } + public override string NamedPrefix { get => throw null; } + public OdbcDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool RequiresTimeSpanForTime { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OleDbDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OleDbDriver : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + public OleDbDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OracleClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleClientDriver : NHibernate.Driver.ReflectionBasedDriver + { + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + protected override void OnBeforePrepare(System.Data.Common.DbCommand command) => throw null; + public OracleClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OracleDataClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleDataClientDriver : NHibernate.Driver.OracleDataClientDriverBase + { + public OracleDataClientDriver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.OracleDataClientDriverBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class OracleDataClientDriverBase : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + protected override void OnBeforePrepare(System.Data.Common.DbCommand command) => throw null; + protected OracleDataClientDriverBase(string assemblyName) : base(default(string), default(string), default(string)) => throw null; + private OracleDataClientDriverBase(string driverAssemblyName, string clientNamespace) : base(default(string), default(string), default(string)) => throw null; + public bool UseBinaryFloatingPointTypes { get => throw null; set => throw null; } + public bool UseNPrefixedTypesForUnicode { get => throw null; set => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OracleLiteDataClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleLiteDataClientDriver : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override string NamedPrefix { get => throw null; } + public OracleLiteDataClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.OracleManagedDataClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleManagedDataClientDriver : NHibernate.Driver.OracleDataClientDriverBase + { + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + public OracleManagedDataClientDriver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.ReflectionBasedDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ReflectionBasedDriver : NHibernate.Driver.DriverBase + { + public override System.Data.Common.DbCommand CreateCommand() => throw null; + public override System.Data.Common.DbConnection CreateConnection() => throw null; + protected System.Version DriverVersion { get => throw null; } + protected ReflectionBasedDriver(string providerInvariantName, string driverAssemblyName, string connectionTypeName, string commandTypeName) => throw null; + protected ReflectionBasedDriver(string driverAssemblyName, string connectionTypeName, string commandTypeName) => throw null; + protected const string ReflectionTypedProviderExceptionMessageTemplate = default; + } + + // Generated from `NHibernate.Driver.ReflectionDriveConnectionCommandProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReflectionDriveConnectionCommandProvider : NHibernate.Driver.IDriveConnectionCommandProvider + { + public System.Data.Common.DbCommand CreateCommand() => throw null; + public System.Data.Common.DbConnection CreateConnection() => throw null; + public ReflectionDriveConnectionCommandProvider(System.Type connectionType, System.Type commandType) => throw null; + } + + // Generated from `NHibernate.Driver.SQLite20Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLite20Driver : NHibernate.Driver.ReflectionBasedDriver + { + public override System.Data.Common.DbConnection CreateConnection() => throw null; + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + public override string NamedPrefix { get => throw null; } + public SQLite20Driver() : base(default(string), default(string), default(string)) => throw null; + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + public override bool SupportsNullEnlistment { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SapSQLAnywhere17Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SapSQLAnywhere17Driver : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public SapSQLAnywhere17Driver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.Sql2008ClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Sql2008ClientDriver : NHibernate.Driver.SqlClientDriver + { + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override System.DateTime MinDate { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public Sql2008ClientDriver() => throw null; + } + + // Generated from `NHibernate.Driver.SqlClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlClientDriver : NHibernate.Driver.ReflectionBasedDriver, NHibernate.AdoNet.IParameterAdjuster, NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider + { + public virtual void AdjustParameterForValue(System.Data.Common.DbParameter parameter, NHibernate.SqlTypes.SqlType sqlType, object value) => throw null; + System.Type NHibernate.AdoNet.IEmbeddedBatcherFactoryProvider.BatcherFactoryClass { get => throw null; } + public override void Configure(System.Collections.Generic.IDictionary settings) => throw null; + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool HasDelayedDistributedTransactionCompletion { get => throw null; } + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsAnsiText(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsBlob(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsChar(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + protected static bool IsText(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public const System.Byte MaxDateTime2 = default; + public const System.Byte MaxDateTimeOffset = default; + public const System.Byte MaxPrecision = default; + public const System.Byte MaxScale = default; + public const int MaxSizeForAnsiClob = default; + public const int MaxSizeForBlob = default; + public const int MaxSizeForClob = default; + public const int MaxSizeForLengthLimitedAnsiString = default; + public const int MaxSizeForLengthLimitedBinary = default; + public const int MaxSizeForLengthLimitedString = default; + public const int MaxSizeForXml = default; + public override System.DateTime MinDate { get => throw null; } + public override string NamedPrefix { get => throw null; } + protected static void SetDefaultParameterSize(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public static void SetVariableLengthParameterSize(System.Data.Common.DbParameter dbParam, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public SqlClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsMultipleQueries { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SqlServerCeDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlServerCeDriver : NHibernate.Driver.ReflectionBasedDriver + { + public override NHibernate.Driver.IResultSetsCommand GetResultSetsCommand(NHibernate.Engine.ISessionImplementor session) => throw null; + protected override void InitializeParameter(System.Data.Common.DbParameter dbParam, string name, NHibernate.SqlTypes.SqlType sqlType) => throw null; + public override System.DateTime MinDate { get => throw null; } + public override string NamedPrefix { get => throw null; } + protected override void SetCommandTimeout(System.Data.Common.DbCommand cmd) => throw null; + public SqlServerCeDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool SupportsEnlistmentWhenAutoEnlistmentIsDisabled { get => throw null; } + public override bool SupportsMultipleOpenReaders { get => throw null; } + public override bool SupportsNullEnlistment { get => throw null; } + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SqlStringFormatter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlStringFormatter : NHibernate.SqlCommand.ISqlStringVisitor + { + public string[] AssignedParameterNames { get => throw null; } + public void Format(NHibernate.SqlCommand.SqlString text) => throw null; + public string GetFormattedText() => throw null; + public bool HasReturnParameter { get => throw null; } + void NHibernate.SqlCommand.ISqlStringVisitor.Parameter(NHibernate.SqlCommand.Parameter parameter) => throw null; + public SqlStringFormatter(NHibernate.Driver.ISqlParameterFormatter formatter, string multipleQueriesSeparator) => throw null; + void NHibernate.SqlCommand.ISqlStringVisitor.String(string text) => throw null; + void NHibernate.SqlCommand.ISqlStringVisitor.String(NHibernate.SqlCommand.SqlString sqlString) => throw null; + } + + // Generated from `NHibernate.Driver.SybaseAdoNet45Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAdoNet45Driver : NHibernate.Driver.SybaseAseClientDriverBase + { + public SybaseAdoNet45Driver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.SybaseAdoNet4Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAdoNet4Driver : NHibernate.Driver.SybaseAseClientDriverBase + { + public SybaseAdoNet4Driver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.SybaseAsaClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAsaClientDriver : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public SybaseAsaClientDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SybaseAseClientDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseAseClientDriver : NHibernate.Driver.SybaseAseClientDriverBase + { + public SybaseAseClientDriver() : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Driver.SybaseAseClientDriverBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SybaseAseClientDriverBase : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + protected SybaseAseClientDriverBase(string providerInvariantName, string assemblyName, string connectionTypeName, string commandTypeName) : base(default(string), default(string), default(string)) => throw null; + protected SybaseAseClientDriverBase(string assemblyName) : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SybaseSQLAnywhereDotNet4Driver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseSQLAnywhereDotNet4Driver : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public SybaseSQLAnywhereDotNet4Driver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + // Generated from `NHibernate.Driver.SybaseSQLAnywhereDriver` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SybaseSQLAnywhereDriver : NHibernate.Driver.ReflectionBasedDriver + { + public override string NamedPrefix { get => throw null; } + public override bool RequiresTimeSpanForTime { get => throw null; } + public SybaseSQLAnywhereDriver() : base(default(string), default(string), default(string)) => throw null; + public override bool UseNamedPrefixInParameter { get => throw null; } + public override bool UseNamedPrefixInSql { get => throw null; } + } + + } + namespace Engine + { + // Generated from `NHibernate.Engine.AbstractLhsAssociationTypeSqlInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractLhsAssociationTypeSqlInfo : NHibernate.Engine.ILhsAssociationTypeSqlInfo + { + protected AbstractLhsAssociationTypeSqlInfo(string alias, NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.IMapping mapping) => throw null; + public string Alias { get => throw null; set => throw null; } + public string[] GetAliasedColumnNames(NHibernate.Type.IAssociationType type, int begin) => throw null; + protected abstract string[] GetAliasedColumns(); + public string[] GetColumnNames(NHibernate.Type.IAssociationType type, int begin) => throw null; + protected abstract string[] GetColumns(); + public abstract string GetTableName(NHibernate.Type.IAssociationType type); + public NHibernate.Engine.IMapping Mapping { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IOuterJoinLoadable Persister { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Engine.ActionQueue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ActionQueue + { + public ActionQueue(NHibernate.Engine.ISessionImplementor session) => throw null; + public void AddAction(NHibernate.Action.EntityUpdateAction action) => throw null; + public void AddAction(NHibernate.Action.EntityInsertAction action) => throw null; + public void AddAction(NHibernate.Action.EntityIdentityInsertAction insert) => throw null; + public void AddAction(NHibernate.Action.EntityDeleteAction action) => throw null; + public void AddAction(NHibernate.Action.CollectionUpdateAction action) => throw null; + public void AddAction(NHibernate.Action.CollectionRemoveAction action) => throw null; + public void AddAction(NHibernate.Action.CollectionRecreateAction action) => throw null; + public void AddAction(NHibernate.Action.BulkOperationCleanupAction cleanupAction) => throw null; + public System.Threading.Tasks.Task AddActionAsync(NHibernate.Action.BulkOperationCleanupAction cleanupAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void AfterTransactionCompletion(bool success) => throw null; + public System.Threading.Tasks.Task AfterTransactionCompletionAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public bool AreInsertionsOrDeletionsQueued { get => throw null; } + public virtual bool AreTablesToBeUpdated(System.Collections.Generic.ISet tables) => throw null; + public void BeforeTransactionCompletion() => throw null; + public System.Threading.Tasks.Task BeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void Clear() => throw null; + public void ClearFromFlushNeededCheck(int previousCollectionRemovalSize) => throw null; + public System.Collections.Generic.IList CloneDeletions() => throw null; + public int CollectionCreationsCount { get => throw null; } + public int CollectionRemovalsCount { get => throw null; } + public int CollectionUpdatesCount { get => throw null; } + public int DeletionsCount { get => throw null; } + public void Execute(NHibernate.Action.IExecutable executable) => throw null; + public void ExecuteActions() => throw null; + public System.Threading.Tasks.Task ExecuteActionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(NHibernate.Action.IExecutable executable, System.Threading.CancellationToken cancellationToken) => throw null; + public void ExecuteInserts() => throw null; + public System.Threading.Tasks.Task ExecuteInsertsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public bool HasAfterTransactionActions() => throw null; + public bool HasAnyQueuedActions { get => throw null; } + public bool HasBeforeTransactionActions() => throw null; + public int InsertionsCount { get => throw null; } + public void PrepareActions() => throw null; + public System.Threading.Tasks.Task PrepareActionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void RegisterProcess(NHibernate.Action.IBeforeTransactionCompletionProcess process) => throw null; + public void RegisterProcess(NHibernate.Action.IAfterTransactionCompletionProcess process) => throw null; + public void RegisterProcess(NHibernate.Action.BeforeTransactionCompletionProcessDelegate process) => throw null; + public void RegisterProcess(NHibernate.Action.AfterTransactionCompletionProcessDelegate process) => throw null; + public void SortActions() => throw null; + public void SortCollectionActions() => throw null; + public override string ToString() => throw null; + public int UpdatesCount { get => throw null; } + } + + // Generated from `NHibernate.Engine.BatchFetchQueue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BatchFetchQueue + { + public void AddBatchLoadableCollection(NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.CollectionEntry ce) => throw null; + public void AddBatchLoadableEntityKey(NHibernate.Engine.EntityKey key) => throw null; + public void AddSubselect(NHibernate.Engine.EntityKey key, NHibernate.Engine.SubselectFetch subquery) => throw null; + public BatchFetchQueue(NHibernate.Engine.IPersistenceContext context) => throw null; + public void Clear() => throw null; + public void ClearSubselects() => throw null; + public object[] GetCollectionBatch(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, object id, int batchSize) => throw null; + public System.Threading.Tasks.Task GetCollectionBatchAsync(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, object id, int batchSize, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetEntityBatch(NHibernate.Persister.Entity.IEntityPersister persister, object id, int batchSize) => throw null; + public System.Threading.Tasks.Task GetEntityBatchAsync(NHibernate.Persister.Entity.IEntityPersister persister, object id, int batchSize, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Engine.SubselectFetch GetSubselect(NHibernate.Engine.EntityKey key) => throw null; + public void RemoveBatchLoadableCollection(NHibernate.Engine.CollectionEntry ce) => throw null; + public void RemoveBatchLoadableEntityKey(NHibernate.Engine.EntityKey key) => throw null; + public void RemoveSubselect(NHibernate.Engine.EntityKey key) => throw null; + } + + // Generated from `NHibernate.Engine.Cascade` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Cascade + { + public Cascade(NHibernate.Engine.CascadingAction action, NHibernate.Engine.CascadePoint point, NHibernate.Event.IEventSource eventSource) => throw null; + public void CascadeOn(NHibernate.Persister.Entity.IEntityPersister persister, object parent, object anything) => throw null; + public void CascadeOn(NHibernate.Persister.Entity.IEntityPersister persister, object parent) => throw null; + public System.Threading.Tasks.Task CascadeOnAsync(NHibernate.Persister.Entity.IEntityPersister persister, object parent, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CascadeOnAsync(NHibernate.Persister.Entity.IEntityPersister persister, object parent, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Engine.CascadePoint` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum CascadePoint + { + AfterEvict, + AfterInsertBeforeDelete, + AfterInsertBeforeDeleteViaCollection, + AfterLock, + AfterUpdate, + BeforeFlush, + BeforeInsertAfterDelete, + BeforeMerge, + BeforeRefresh, + } + + // Generated from `NHibernate.Engine.CascadeStyle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CascadeStyle : System.Runtime.Serialization.ISerializable + { + public static NHibernate.Engine.CascadeStyle All; + public static NHibernate.Engine.CascadeStyle AllDeleteOrphan; + internal CascadeStyle() => throw null; + public static NHibernate.Engine.CascadeStyle Delete; + public static NHibernate.Engine.CascadeStyle DeleteOrphan; + public abstract bool DoCascade(NHibernate.Engine.CascadingAction action); + public static NHibernate.Engine.CascadeStyle Evict; + public static NHibernate.Engine.CascadeStyle GetCascadeStyle(string cascade) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual bool HasOrphanDelete { get => throw null; } + public static NHibernate.Engine.CascadeStyle Lock; + public static NHibernate.Engine.CascadeStyle Merge; + // Generated from `NHibernate.Engine.CascadeStyle+MultipleCascadeStyle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MultipleCascadeStyle : NHibernate.Engine.CascadeStyle, System.Runtime.Serialization.ISerializable + { + public override bool DoCascade(NHibernate.Engine.CascadingAction action) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override bool HasOrphanDelete { get => throw null; } + public MultipleCascadeStyle(NHibernate.Engine.CascadeStyle[] styles) => throw null; + public override bool ReallyDoCascade(NHibernate.Engine.CascadingAction action) => throw null; + public override string ToString() => throw null; + } + + + public static NHibernate.Engine.CascadeStyle None; + public static NHibernate.Engine.CascadeStyle Persist; + public virtual bool ReallyDoCascade(NHibernate.Engine.CascadingAction action) => throw null; + public static NHibernate.Engine.CascadeStyle Refresh; + public static NHibernate.Engine.CascadeStyle Replicate; + public static NHibernate.Engine.CascadeStyle Update; + } + + // Generated from `NHibernate.Engine.CascadingAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CascadingAction + { + public abstract void Cascade(NHibernate.Event.IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled); + public abstract System.Threading.Tasks.Task CascadeAsync(NHibernate.Event.IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled, System.Threading.CancellationToken cancellationToken); + protected CascadingAction() => throw null; + public static NHibernate.Engine.CascadingAction Delete; + public abstract bool DeleteOrphans { get; } + public static NHibernate.Engine.CascadingAction Evict; + public abstract System.Collections.IEnumerable GetCascadableChildrenIterator(NHibernate.Event.IEventSource session, NHibernate.Type.CollectionType collectionType, object collection); + public static System.Collections.IEnumerable GetLoadedElementsIterator(NHibernate.Engine.ISessionImplementor session, NHibernate.Type.CollectionType collectionType, object collection) => throw null; + public static NHibernate.Engine.CascadingAction Lock; + public static NHibernate.Engine.CascadingAction Merge; + public virtual void NoCascade(NHibernate.Event.IEventSource session, object child, object parent, NHibernate.Persister.Entity.IEntityPersister persister, int propertyIndex) => throw null; + public virtual System.Threading.Tasks.Task NoCascadeAsync(NHibernate.Event.IEventSource session, object child, object parent, NHibernate.Persister.Entity.IEntityPersister persister, int propertyIndex, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual bool PerformOnLazyProperty { get => throw null; } + public static NHibernate.Engine.CascadingAction Persist; + public static NHibernate.Engine.CascadingAction PersistOnFlush; + public static NHibernate.Engine.CascadingAction Refresh; + public static NHibernate.Engine.CascadingAction Replicate; + public virtual bool RequiresNoCascadeChecking { get => throw null; } + public static NHibernate.Engine.CascadingAction SaveUpdate; + } + + // Generated from `NHibernate.Engine.CollectionEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionEntry + { + public void AfterAction(NHibernate.Collection.IPersistentCollection collection) => throw null; + public CollectionEntry(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection) => throw null; + public CollectionEntry(NHibernate.Persister.Collection.ICollectionPersister loadedPersister, object loadedKey) => throw null; + public CollectionEntry(NHibernate.Collection.IPersistentCollection collection, NHibernate.Persister.Collection.ICollectionPersister loadedPersister, object loadedKey, bool ignore) => throw null; + public object CurrentKey { get => throw null; set => throw null; } + public NHibernate.Persister.Collection.ICollectionPersister CurrentPersister { get => throw null; set => throw null; } + public System.Collections.ICollection GetOrphans(string entityName, NHibernate.Collection.IPersistentCollection collection) => throw null; + public System.Threading.Tasks.Task GetOrphansAsync(string entityName, NHibernate.Collection.IPersistentCollection collection, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsDorecreate { get => throw null; set => throw null; } + public bool IsDoremove { get => throw null; set => throw null; } + public bool IsDoupdate { get => throw null; set => throw null; } + public bool IsIgnore { get => throw null; } + public bool IsProcessed { get => throw null; set => throw null; } + public bool IsReached { get => throw null; set => throw null; } + public bool IsSnapshotEmpty(NHibernate.Collection.IPersistentCollection collection) => throw null; + public object Key { get => throw null; } + public object LoadedKey { get => throw null; } + public NHibernate.Persister.Collection.ICollectionPersister LoadedPersister { get => throw null; } + public void PostFlush(NHibernate.Collection.IPersistentCollection collection) => throw null; + public void PostInitialize(NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.IPersistenceContext persistenceContext) => throw null; + public void PostInitialize(NHibernate.Collection.IPersistentCollection collection) => throw null; + public void PreFlush(NHibernate.Collection.IPersistentCollection collection) => throw null; + public System.Threading.Tasks.Task PreFlushAsync(NHibernate.Collection.IPersistentCollection collection, System.Threading.CancellationToken cancellationToken) => throw null; + public string Role { get => throw null; set => throw null; } + public object Snapshot { get => throw null; } + public override string ToString() => throw null; + public bool WasDereferenced { get => throw null; } + } + + // Generated from `NHibernate.Engine.CollectionKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionKey : System.Runtime.Serialization.IDeserializationCallback + { + public CollectionKey(NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public object Key { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public string Role { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.Collections` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Collections + { + public static void ProcessReachableCollection(NHibernate.Collection.IPersistentCollection collection, NHibernate.Type.CollectionType type, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task ProcessReachableCollectionAsync(NHibernate.Collection.IPersistentCollection collection, NHibernate.Type.CollectionType type, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static void ProcessUnreachableCollection(NHibernate.Collection.IPersistentCollection coll, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task ProcessUnreachableCollectionAsync(NHibernate.Collection.IPersistentCollection coll, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Engine.EntityEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityEntry + { + public object[] DeletedState { get => throw null; set => throw null; } + public NHibernate.Engine.EntityKey EntityKey { get => throw null; } + public string EntityName { get => throw null; } + public bool ExistsInDatabase { get => throw null; } + public void ForceLocked(object entity, object nextVersion) => throw null; + public object GetLoadedValue(string propertyName) => throw null; + public object Id { get => throw null; } + public bool IsBeingReplicated { get => throw null; } + public bool IsModifiableEntity() => throw null; + public bool IsNullifiable(bool earlyInsert, NHibernate.Engine.ISessionImplementor session) => throw null; + public bool IsReadOnly { get => throw null; } + public object[] LoadedState { get => throw null; } + public bool LoadedWithLazyPropertiesUnfetched { get => throw null; } + public NHibernate.LockMode LockMode { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; set => throw null; } + public void PostDelete() => throw null; + public void PostInsert() => throw null; + public void PostUpdate(object entity, object[] updatedState, object nextVersion) => throw null; + public bool RequiresDirtyCheck(object entity) => throw null; + public object RowId { get => throw null; } + public void SetReadOnly(bool readOnly, object entity) => throw null; + public NHibernate.Engine.Status Status { get => throw null; set => throw null; } + public override string ToString() => throw null; + public object Version { get => throw null; } + } + + // Generated from `NHibernate.Engine.EntityKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityKey : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IEquatable + { + public EntityKey(object id, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public string EntityName { get => throw null; } + public override bool Equals(object other) => throw null; + public bool Equals(NHibernate.Engine.EntityKey other) => throw null; + public override int GetHashCode() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object Identifier { get => throw null; } + public bool IsBatchLoadable { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.EntityUniqueKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityUniqueKey : System.Runtime.Serialization.IDeserializationCallback + { + public string EntityName { get => throw null; } + public EntityUniqueKey(string entityName, string uniqueKeyName, object semiResolvedKey, NHibernate.Type.IType keyType, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Engine.EntityUniqueKey that) => throw null; + public int GenerateHashCode() => throw null; + public override int GetHashCode() => throw null; + public object Key { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public override string ToString() => throw null; + public string UniqueKeyName { get => throw null; } + } + + // Generated from `NHibernate.Engine.ExecuteUpdateResultCheckStyle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExecuteUpdateResultCheckStyle + { + public static NHibernate.Engine.ExecuteUpdateResultCheckStyle Count; + public static NHibernate.Engine.ExecuteUpdateResultCheckStyle DetermineDefault(NHibernate.SqlCommand.SqlString customSql, bool callable) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public static NHibernate.Engine.ExecuteUpdateResultCheckStyle None; + public static NHibernate.Engine.ExecuteUpdateResultCheckStyle Parse(string name) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.FilterDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterDefinition + { + public string DefaultFilterCondition { get => throw null; } + public FilterDefinition(string name, string defaultCondition, System.Collections.Generic.IDictionary parameterTypes, bool useManyToOne) => throw null; + public string FilterName { get => throw null; } + public NHibernate.Type.IType GetParameterType(string parameterName) => throw null; + public System.Collections.Generic.ICollection ParameterNames { get => throw null; } + public System.Collections.Generic.IDictionary ParameterTypes { get => throw null; } + public bool UseInManyToOne { get => throw null; } + } + + // Generated from `NHibernate.Engine.ForeignKeys` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ForeignKeys + { + public static object GetEntityIdentifierIfNotUnsaved(string entityName, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task GetEntityIdentifierIfNotUnsavedAsync(string entityName, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool IsNotTransientSlow(string entityName, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task IsNotTransientSlowAsync(string entityName, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool? IsTransientFast(string entityName, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task IsTransientFastAsync(string entityName, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool IsTransientSlow(string entityName, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task IsTransientSlowAsync(string entityName, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Engine.ForeignKeys+Nullifier` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Nullifier + { + public Nullifier(object self, bool isDelete, bool isEarlyInsert, NHibernate.Engine.ISessionImplementor session) => throw null; + public void NullifyTransientReferences(object[] values, NHibernate.Type.IType[] types) => throw null; + public System.Threading.Tasks.Task NullifyTransientReferencesAsync(object[] values, NHibernate.Type.IType[] types, System.Threading.CancellationToken cancellationToken) => throw null; + } + + + } + + // Generated from `NHibernate.Engine.IBatcher` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBatcher : System.IDisposable + { + void AbortBatch(System.Exception e); + void AddToBatch(NHibernate.AdoNet.IExpectation expectation); + System.Threading.Tasks.Task AddToBatchAsync(NHibernate.AdoNet.IExpectation expectation, System.Threading.CancellationToken cancellationToken); + int BatchSize { get; set; } + void CancelLastQuery(); + void CloseCommand(System.Data.Common.DbCommand cmd, System.Data.Common.DbDataReader reader); + void CloseCommands(); + void CloseReader(System.Data.Common.DbDataReader reader); + void ExecuteBatch(); + System.Threading.Tasks.Task ExecuteBatchAsync(System.Threading.CancellationToken cancellationToken); + int ExecuteNonQuery(System.Data.Common.DbCommand cmd); + System.Threading.Tasks.Task ExecuteNonQueryAsync(System.Data.Common.DbCommand cmd, System.Threading.CancellationToken cancellationToken); + System.Data.Common.DbDataReader ExecuteReader(System.Data.Common.DbCommand cmd); + System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.Common.DbCommand cmd, System.Threading.CancellationToken cancellationToken); + bool HasOpenResources { get; } + System.Data.Common.DbCommand PrepareBatchCommand(System.Data.CommandType commandType, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes); + System.Threading.Tasks.Task PrepareBatchCommandAsync(System.Data.CommandType commandType, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes, System.Threading.CancellationToken cancellationToken); + System.Data.Common.DbCommand PrepareCommand(System.Data.CommandType commandType, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes); + System.Threading.Tasks.Task PrepareCommandAsync(System.Data.CommandType commandType, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes, System.Threading.CancellationToken cancellationToken); + System.Data.Common.DbCommand PrepareQueryCommand(System.Data.CommandType commandType, NHibernate.SqlCommand.SqlString sql, NHibernate.SqlTypes.SqlType[] parameterTypes); + } + + // Generated from `NHibernate.Engine.ILhsAssociationTypeSqlInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILhsAssociationTypeSqlInfo + { + string[] GetAliasedColumnNames(NHibernate.Type.IAssociationType type, int begin); + string[] GetColumnNames(NHibernate.Type.IAssociationType type, int begin); + string GetTableName(NHibernate.Type.IAssociationType type); + } + + // Generated from `NHibernate.Engine.IMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapping + { + NHibernate.Dialect.Dialect Dialect { get; } + string GetIdentifierPropertyName(string className); + NHibernate.Type.IType GetIdentifierType(string className); + NHibernate.Type.IType GetReferencedPropertyType(string className, string propertyName); + bool HasNonIdentifierPropertyNamedId(string className); + } + + // Generated from `NHibernate.Engine.IPersistenceContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistenceContext + { + void AddChildParent(object child, object parent); + void AddCollectionHolder(NHibernate.Collection.IPersistentCollection holder); + void AddEntity(NHibernate.Engine.EntityUniqueKey euk, object entity); + void AddEntity(NHibernate.Engine.EntityKey key, object entity); + NHibernate.Engine.EntityEntry AddEntity(object entity, NHibernate.Engine.Status status, object[] loadedState, NHibernate.Engine.EntityKey entityKey, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement, bool lazyPropertiesAreUnfetched); + NHibernate.Engine.EntityEntry AddEntry(object entity, NHibernate.Engine.Status status, object[] loadedState, object rowId, object id, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement, bool lazyPropertiesAreUnfetched); + NHibernate.Engine.CollectionEntry AddInitializedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection, object id); + void AddInitializedDetachedCollection(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection); + void AddNewCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection); + void AddNonLazyCollection(NHibernate.Collection.IPersistentCollection collection); + void AddNullProperty(NHibernate.Engine.EntityKey ownerKey, string propertyName); + void AddProxy(NHibernate.Engine.EntityKey key, NHibernate.Proxy.INHibernateProxy proxy); + void AddUninitializedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection, object id); + void AddUninitializedDetachedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection); + void AddUnownedCollection(NHibernate.Engine.CollectionKey key, NHibernate.Collection.IPersistentCollection collection); + void AfterLoad(); + void AfterTransactionCompletion(); + NHibernate.Engine.BatchFetchQueue BatchFetchQueue { get; } + void BeforeLoad(); + int CascadeLevel { get; } + void CheckUniqueness(NHibernate.Engine.EntityKey key, object obj); + void Clear(); + System.Collections.IDictionary CollectionEntries { get; } + System.Collections.Generic.IDictionary CollectionsByKey { get; } + bool ContainsCollection(NHibernate.Collection.IPersistentCollection collection); + bool ContainsEntity(NHibernate.Engine.EntityKey key); + bool ContainsProxy(NHibernate.Proxy.INHibernateProxy proxy); + int DecrementCascadeLevel(); + bool DefaultReadOnly { get; set; } + System.Collections.Generic.IDictionary EntitiesByKey { get; } + System.Collections.IDictionary EntityEntries { get; } + bool Flushing { get; set; } + object[] GetCachedDatabaseSnapshot(NHibernate.Engine.EntityKey key); + NHibernate.Collection.IPersistentCollection GetCollection(NHibernate.Engine.CollectionKey collectionKey); + NHibernate.Engine.CollectionEntry GetCollectionEntry(NHibernate.Collection.IPersistentCollection coll); + NHibernate.Engine.CollectionEntry GetCollectionEntryOrNull(object collection); + NHibernate.Collection.IPersistentCollection GetCollectionHolder(object array); + object GetCollectionOwner(object key, NHibernate.Persister.Collection.ICollectionPersister collectionPersister); + object[] GetDatabaseSnapshot(object id, NHibernate.Persister.Entity.IEntityPersister persister); + System.Threading.Tasks.Task GetDatabaseSnapshotAsync(object id, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken); + object GetEntity(NHibernate.Engine.EntityUniqueKey euk); + object GetEntity(NHibernate.Engine.EntityKey key); + NHibernate.Engine.EntityEntry GetEntry(object entity); + object GetIndexInOwner(string entity, string property, object childObject, System.Collections.IDictionary mergeMap); + object GetLoadedCollectionOwnerIdOrNull(NHibernate.Collection.IPersistentCollection collection); + object GetLoadedCollectionOwnerOrNull(NHibernate.Collection.IPersistentCollection collection); + object[] GetNaturalIdSnapshot(object id, NHibernate.Persister.Entity.IEntityPersister persister); + System.Threading.Tasks.Task GetNaturalIdSnapshotAsync(object id, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken); + object GetOwnerId(string entity, string property, object childObject, System.Collections.IDictionary mergeMap); + object GetProxy(NHibernate.Engine.EntityKey key); + object GetSnapshot(NHibernate.Collection.IPersistentCollection coll); + bool HasNonReadOnlyEntities { get; } + int IncrementCascadeLevel(); + void InitializeNonLazyCollections(); + System.Threading.Tasks.Task InitializeNonLazyCollectionsAsync(System.Threading.CancellationToken cancellationToken); + bool IsEntryFor(object entity); + bool IsLoadFinished { get; } + bool IsPropertyNull(NHibernate.Engine.EntityKey ownerKey, string propertyName); + bool IsReadOnly(object entityOrProxy); + bool IsStateless { get; } + NHibernate.Engine.Loading.LoadContexts LoadContexts { get; } + object NarrowProxy(NHibernate.Proxy.INHibernateProxy proxy, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey key, object obj); + System.Collections.Generic.ISet NullifiableEntityKeys { get; } + object ProxyFor(object impl); + object ProxyFor(NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey key, object impl); + bool ReassociateIfUninitializedProxy(object value); + void ReassociateProxy(object value, object id); + void RemoveChildParent(object child); + NHibernate.Collection.IPersistentCollection RemoveCollectionHolder(object array); + object RemoveEntity(NHibernate.Engine.EntityKey key); + NHibernate.Engine.EntityEntry RemoveEntry(object entity); + object RemoveProxy(NHibernate.Engine.EntityKey key); + void ReplaceDelayedEntityIdentityInsertKeys(NHibernate.Engine.EntityKey oldKey, object generatedId); + NHibernate.Engine.ISessionImplementor Session { get; } + void SetEntryStatus(NHibernate.Engine.EntityEntry entry, NHibernate.Engine.Status status); + void SetReadOnly(object entityOrProxy, bool readOnly); + object Unproxy(object maybeProxy); + object UnproxyAndReassociate(object maybeProxy); + System.Threading.Tasks.Task UnproxyAndReassociateAsync(object maybeProxy, System.Threading.CancellationToken cancellationToken); + NHibernate.Collection.IPersistentCollection UseUnownedCollection(NHibernate.Engine.CollectionKey key); + } + + // Generated from `NHibernate.Engine.ISessionFactoryImplementor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionFactoryImplementor : System.IDisposable, NHibernate.ISessionFactory, NHibernate.Engine.IMapping + { + NHibernate.Connection.IConnectionProvider ConnectionProvider { get; } + NHibernate.Context.ICurrentSessionContext CurrentSessionContext { get; } + NHibernate.Proxy.IEntityNotFoundDelegate EntityNotFoundDelegate { get; } + System.Collections.Generic.IDictionary GetAllSecondLevelCacheRegions(); + NHibernate.Persister.Collection.ICollectionPersister GetCollectionPersister(string role); + System.Collections.Generic.ISet GetCollectionRolesByEntityParticipant(string entityName); + NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName); + NHibernate.Id.IIdentifierGenerator GetIdentifierGenerator(string rootEntityName); + string[] GetImplementors(string entityOrClassName); + string GetImportedClassName(string name); + NHibernate.Engine.NamedQueryDefinition GetNamedQuery(string queryName); + NHibernate.Engine.NamedSQLQueryDefinition GetNamedSQLQuery(string queryName); + NHibernate.Cache.IQueryCache GetQueryCache(string regionName); + NHibernate.Engine.ResultSetMappingDefinition GetResultSetMapping(string resultSetRef); + string[] GetReturnAliases(string queryString); + NHibernate.Type.IType[] GetReturnTypes(string queryString); + NHibernate.Cache.ICache GetSecondLevelCacheRegion(string regionName); + NHibernate.IInterceptor Interceptor { get; } + NHibernate.ISession OpenSession(System.Data.Common.DbConnection connection, bool flushBeforeCompletionEnabled, bool autoCloseSessionEnabled, NHibernate.ConnectionReleaseMode connectionReleaseMode); + NHibernate.Cache.IQueryCache QueryCache { get; } + NHibernate.Engine.Query.QueryPlanCache QueryPlanCache { get; } + NHibernate.Exceptions.ISQLExceptionConverter SQLExceptionConverter { get; } + NHibernate.Dialect.Function.SQLFunctionRegistry SQLFunctionRegistry { get; } + NHibernate.Cfg.Settings Settings { get; } + NHibernate.Stat.IStatisticsImplementor StatisticsImplementor { get; } + NHibernate.Transaction.ITransactionFactory TransactionFactory { get; } + NHibernate.Persister.Entity.IEntityPersister TryGetEntityPersister(string entityName); + string TryGetGuessEntityName(System.Type implementor); + NHibernate.Cache.UpdateTimestampsCache UpdateTimestampsCache { get; } + } + + // Generated from `NHibernate.Engine.ISessionImplementor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionImplementor + { + void AfterTransactionBegin(NHibernate.ITransaction tx); + void AfterTransactionCompletion(bool successful, NHibernate.ITransaction tx); + System.Threading.Tasks.Task AfterTransactionCompletionAsync(bool successful, NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken); + NHibernate.Engine.IBatcher Batcher { get; } + void BeforeTransactionCompletion(NHibernate.ITransaction tx); + System.Threading.Tasks.Task BeforeTransactionCompletionAsync(NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken); + string BestGuessEntityName(object entity); + NHibernate.CacheMode CacheMode { get; set; } + void CloseSessionFromSystemTransaction(); + System.Data.Common.DbConnection Connection { get; } + NHibernate.AdoNet.ConnectionManager ConnectionManager { get; } + NHibernate.IQuery CreateFilter(object collection, NHibernate.IQueryExpression queryExpression); + System.Threading.Tasks.Task CreateFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, System.Threading.CancellationToken cancellationToken); + NHibernate.IQuery CreateQuery(NHibernate.IQueryExpression queryExpression); + System.Collections.Generic.IDictionary EnabledFilters { get; } + System.Collections.IEnumerable Enumerable(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters parameters); + System.Collections.Generic.IEnumerable Enumerable(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task EnumerableAsync(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> EnumerableAsync(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + System.Collections.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + System.Collections.Generic.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + System.Threading.Tasks.Task EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + int ExecuteNativeUpdate(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification specification, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task ExecuteNativeUpdateAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification specification, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + int ExecuteUpdate(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + NHibernate.Engine.ISessionFactoryImplementor Factory { get; } + string FetchProfile { get; set; } + void Flush(); + System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken); + void FlushBeforeTransactionCompletion(); + System.Threading.Tasks.Task FlushBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken); + NHibernate.FlushMode FlushMode { get; set; } + NHibernate.Impl.FutureCriteriaBatch FutureCriteriaBatch { get; } + NHibernate.Impl.FutureQueryBatch FutureQueryBatch { get; } + NHibernate.Cache.CacheKey GenerateCacheKey(object id, NHibernate.Type.IType type, string entityOrRoleName); + NHibernate.Engine.EntityKey GenerateEntityKey(object id, NHibernate.Persister.Entity.IEntityPersister persister); + object GetContextEntityIdentifier(object obj); + NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName, object obj); + object GetEntityUsingInterceptor(NHibernate.Engine.EntityKey key); + System.Threading.Tasks.Task GetEntityUsingInterceptorAsync(NHibernate.Engine.EntityKey key, System.Threading.CancellationToken cancellationToken); + NHibernate.Type.IType GetFilterParameterType(string filterParameterName); + object GetFilterParameterValue(string filterParameterName); + NHibernate.IQuery GetNamedQuery(string queryName); + NHibernate.IQuery GetNamedSQLQuery(string name); + NHibernate.Hql.IQueryTranslator[] GetQueries(NHibernate.IQueryExpression query, bool scalar); + System.Threading.Tasks.Task GetQueriesAsync(NHibernate.IQueryExpression query, bool scalar, System.Threading.CancellationToken cancellationToken); + string GuessEntityName(object entity); + object ImmediateLoad(string entityName, object id); + System.Threading.Tasks.Task ImmediateLoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken); + void Initialize(); + void InitializeCollection(NHibernate.Collection.IPersistentCollection collection, bool writing); + System.Threading.Tasks.Task InitializeCollectionAsync(NHibernate.Collection.IPersistentCollection collection, bool writing, System.Threading.CancellationToken cancellationToken); + object Instantiate(string entityName, object id); + NHibernate.IInterceptor Interceptor { get; } + object InternalLoad(string entityName, object id, bool eager, bool isNullable); + System.Threading.Tasks.Task InternalLoadAsync(string entityName, object id, bool eager, bool isNullable, System.Threading.CancellationToken cancellationToken); + bool IsClosed { get; } + bool IsConnected { get; } + bool IsEventSource { get; } + bool IsOpen { get; } + void JoinTransaction(); + void List(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results); + void List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results); + void List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results); + System.Collections.IList List(NHibernate.Impl.CriteriaImpl criteria); + System.Collections.IList List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters); + System.Collections.IList List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters); + System.Collections.Generic.IList List(NHibernate.Impl.CriteriaImpl criteria); + System.Collections.Generic.IList List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters); + System.Collections.Generic.IList List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + void ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results); + System.Collections.Generic.IList ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task> ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + System.Collections.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + System.Collections.IList ListFilter(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters); + System.Collections.Generic.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + System.Threading.Tasks.Task ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ListFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + NHibernate.Event.EventListeners Listeners { get; } + NHibernate.Engine.IPersistenceContext PersistenceContext { get; } + System.Guid SessionId { get; } + System.Int64 Timestamp { get; } + NHibernate.Transaction.ITransactionContext TransactionContext { get; set; } + bool TransactionInProgress { get; } + } + + // Generated from `NHibernate.Engine.IdPropertiesLhsAssociationTypeSqlInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdPropertiesLhsAssociationTypeSqlInfo : NHibernate.Engine.AbstractLhsAssociationTypeSqlInfo + { + protected override string[] GetAliasedColumns() => throw null; + protected override string[] GetColumns() => throw null; + public override string GetTableName(NHibernate.Type.IAssociationType type) => throw null; + public IdPropertiesLhsAssociationTypeSqlInfo(string alias, NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.IMapping mapping) : base(default(string), default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Engine.IMapping)) => throw null; + } + + // Generated from `NHibernate.Engine.IdentifierValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierValue + { + public virtual object GetDefaultValue(object currentValue) => throw null; + public IdentifierValue(object value) => throw null; + protected IdentifierValue() => throw null; + public virtual bool? IsUnsaved(object id) => throw null; + public static NHibernate.Engine.IdentifierValue SaveAny; + public static NHibernate.Engine.IdentifierValue SaveNone; + public static NHibernate.Engine.IdentifierValue SaveNull; + public static NHibernate.Engine.IdentifierValue Undefined; + // Generated from `NHibernate.Engine.IdentifierValue+UndefinedClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UndefinedClass : NHibernate.Engine.IdentifierValue + { + public override object GetDefaultValue(object currentValue) => throw null; + public override bool? IsUnsaved(object id) => throw null; + public UndefinedClass() => throw null; + } + + + } + + // Generated from `NHibernate.Engine.JoinHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class JoinHelper + { + public static NHibernate.Engine.ILhsAssociationTypeSqlInfo GetIdLhsSqlInfo(string alias, NHibernate.Persister.Entity.IOuterJoinLoadable lhsPersister, NHibernate.Engine.IMapping mapping) => throw null; + public static NHibernate.Engine.ILhsAssociationTypeSqlInfo GetLhsSqlInfo(string alias, int property, NHibernate.Persister.Entity.IOuterJoinLoadable lhsPersister, NHibernate.Engine.IMapping mapping) => throw null; + public static string[] GetRHSColumnNames(NHibernate.Type.IAssociationType type, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Engine.JoinSequence` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinSequence + { + public NHibernate.Engine.JoinSequence AddCondition(string alias, string[] columns, string condition, bool appendParameter) => throw null; + public NHibernate.Engine.JoinSequence AddCondition(NHibernate.SqlCommand.SqlString condition) => throw null; + public NHibernate.Engine.JoinSequence AddJoin(NHibernate.Type.IAssociationType associationType, string alias, NHibernate.SqlCommand.JoinType joinType, string[] referencingKey) => throw null; + public NHibernate.Engine.JoinSequence Copy() => throw null; + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public NHibernate.Engine.JoinSequence GetFromPart() => throw null; + // Generated from `NHibernate.Engine.JoinSequence+ISelector` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISelector + { + bool IncludeSubclasses(string alias); + } + + + public bool IsThetaStyle { get => throw null; } + public int JoinCount { get => throw null; } + public JoinSequence(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Engine.JoinSequence SetNext(NHibernate.Engine.JoinSequence next) => throw null; + public NHibernate.Engine.JoinSequence SetRoot(NHibernate.Persister.Entity.IJoinable joinable, string alias) => throw null; + public NHibernate.Engine.JoinSequence SetSelector(NHibernate.Engine.JoinSequence.ISelector s) => throw null; + public NHibernate.Engine.JoinSequence SetUseThetaStyle(bool useThetaStyle) => throw null; + public NHibernate.SqlCommand.JoinFragment ToJoinFragment(System.Collections.Generic.IDictionary enabledFilters, bool includeExtraJoins, NHibernate.SqlCommand.SqlString withClauseFragment, string withClauseJoinAlias) => throw null; + public NHibernate.SqlCommand.JoinFragment ToJoinFragment(System.Collections.Generic.IDictionary enabledFilters, bool includeExtraJoins) => throw null; + public NHibernate.SqlCommand.JoinFragment ToJoinFragment() => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.NamedQueryDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedQueryDefinition + { + public NHibernate.CacheMode? CacheMode { get => throw null; } + public string CacheRegion { get => throw null; } + public string Comment { get => throw null; } + public int FetchSize { get => throw null; } + public NHibernate.FlushMode FlushMode { get => throw null; } + public bool IsCacheable { get => throw null; } + public bool IsReadOnly { get => throw null; } + public NamedQueryDefinition(string query, bool cacheable, string cacheRegion, int timeout, int fetchSize, NHibernate.FlushMode flushMode, bool readOnly, string comment, System.Collections.Generic.IDictionary parameterTypes) => throw null; + public NamedQueryDefinition(string query, bool cacheable, string cacheRegion, int timeout, int fetchSize, NHibernate.FlushMode flushMode, NHibernate.CacheMode? cacheMode, bool readOnly, string comment, System.Collections.Generic.IDictionary parameterTypes) => throw null; + public System.Collections.Generic.IDictionary ParameterTypes { get => throw null; } + public string Query { get => throw null; } + public string QueryString { get => throw null; } + public int Timeout { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.NamedSQLQueryDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedSQLQueryDefinition : NHibernate.Engine.NamedQueryDefinition + { + public bool IsCallable { get => throw null; } + public NamedSQLQueryDefinition(string query, string resultSetRef, System.Collections.Generic.IList querySpaces, bool cacheable, string cacheRegion, int timeout, int fetchSize, NHibernate.FlushMode flushMode, NHibernate.CacheMode? cacheMode, bool readOnly, string comment, System.Collections.Generic.IDictionary parameterTypes, bool callable) : base(default(string), default(bool), default(string), default(int), default(int), default(NHibernate.FlushMode), default(bool), default(string), default(System.Collections.Generic.IDictionary)) => throw null; + public NamedSQLQueryDefinition(string query, NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] queryReturns, System.Collections.Generic.IList querySpaces, bool cacheable, string cacheRegion, int timeout, int fetchSize, NHibernate.FlushMode flushMode, NHibernate.CacheMode? cacheMode, bool readOnly, string comment, System.Collections.Generic.IDictionary parameterTypes, bool callable) : base(default(string), default(bool), default(string), default(int), default(int), default(NHibernate.FlushMode), default(bool), default(string), default(System.Collections.Generic.IDictionary)) => throw null; + public NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] QueryReturns { get => throw null; } + public System.Collections.Generic.IList QuerySpaces { get => throw null; } + public string ResultSetRef { get => throw null; } + } + + // Generated from `NHibernate.Engine.Nullability` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Nullability + { + public void CheckNullability(object[] values, NHibernate.Persister.Entity.IEntityPersister persister, bool isUpdate) => throw null; + public Nullability(NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Engine.PersistenceContextExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PersistenceContextExtensions + { + public static NHibernate.Engine.EntityEntry AddEntity(this NHibernate.Engine.IPersistenceContext context, object entity, NHibernate.Engine.Status status, object[] loadedState, NHibernate.Engine.EntityKey entityKey, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement) => throw null; + public static NHibernate.Engine.EntityEntry AddEntry(this NHibernate.Engine.IPersistenceContext context, object entity, NHibernate.Engine.Status status, object[] loadedState, object rowId, object id, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement) => throw null; + } + + // Generated from `NHibernate.Engine.PropertiesLhsAssociationTypeSqlInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertiesLhsAssociationTypeSqlInfo : NHibernate.Engine.AbstractLhsAssociationTypeSqlInfo + { + protected override string[] GetAliasedColumns() => throw null; + protected override string[] GetColumns() => throw null; + public override string GetTableName(NHibernate.Type.IAssociationType type) => throw null; + public PropertiesLhsAssociationTypeSqlInfo(string alias, int propertyIdx, NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.IMapping mapping) : base(default(string), default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Engine.IMapping)) => throw null; + } + + // Generated from `NHibernate.Engine.QueryParameters` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryParameters + { + public NHibernate.CacheMode? CacheMode { get => throw null; set => throw null; } + public string CacheRegion { get => throw null; set => throw null; } + public bool Cacheable { get => throw null; set => throw null; } + public bool Callable { get => throw null; set => throw null; } + public bool CanGetFromCache(NHibernate.Engine.ISessionImplementor session) => throw null; + public bool CanPutToCache(NHibernate.Engine.ISessionImplementor session) => throw null; + public object[] CollectionKeys { get => throw null; set => throw null; } + public string Comment { get => throw null; set => throw null; } + public NHibernate.Engine.QueryParameters CreateCopyUsing(NHibernate.Engine.RowSelection selection) => throw null; + public bool ForceCacheRefresh { get => throw null; set => throw null; } + public bool HasAutoDiscoverScalarTypes { get => throw null; set => throw null; } + public bool HasRowSelection { get => throw null; } + public bool IsReadOnly(NHibernate.Engine.ISessionImplementor session) => throw null; + public bool IsReadOnlyInitialized { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary LockModes { get => throw null; set => throw null; } + public void LogParameters(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public System.Collections.Generic.IDictionary NamedParameters { get => throw null; set => throw null; } + public bool NaturalKeyLookup { get => throw null; set => throw null; } + public string OptionalEntityName { get => throw null; set => throw null; } + public object OptionalId { get => throw null; set => throw null; } + public object OptionalObject { get => throw null; set => throw null; } + public NHibernate.Type.IType[] PositionalParameterTypes { get => throw null; set => throw null; } + public object[] PositionalParameterValues { get => throw null; set => throw null; } + public NHibernate.Engine.RowSelection ProcessedRowSelection { get => throw null; set => throw null; } + public NHibernate.SqlCommand.SqlString ProcessedSql { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable ProcessedSqlParameters { get => throw null; set => throw null; } + public QueryParameters(System.Collections.Generic.IDictionary namedParameters, System.Collections.Generic.IDictionary lockModes, NHibernate.Engine.RowSelection rowSelection, bool isReadOnlyInitialized, bool readOnly, bool cacheable, string cacheRegion, string comment, bool isLookupByNaturalKey, NHibernate.Transform.IResultTransformer transformer) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] postionalParameterValues, object[] collectionKeys) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] postionalParameterValues, object optionalObject, string optionalEntityName, object optionalObjectId) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] postionalParameterValues, System.Collections.Generic.IDictionary namedParameters, object[] collectionKeys) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] postionalParameterValues) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] positionalParameterValues, System.Collections.Generic.IDictionary lockModes, NHibernate.Engine.RowSelection rowSelection, bool isReadOnlyInitialized, bool readOnly, bool cacheable, string cacheRegion, string comment, bool isLookupByNaturalKey, NHibernate.Transform.IResultTransformer transformer) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] positionalParameterValues, System.Collections.Generic.IDictionary namedParameters, System.Collections.Generic.IDictionary lockModes, NHibernate.Engine.RowSelection rowSelection, bool isReadOnlyInitialized, bool readOnly, bool cacheable, string cacheRegion, string comment, object[] collectionKeys, object optionalObject, string optionalEntityName, object optionalId, NHibernate.Transform.IResultTransformer transformer) => throw null; + public QueryParameters(NHibernate.Type.IType[] positionalParameterTypes, object[] positionalParameterValues, System.Collections.Generic.IDictionary namedParameters, System.Collections.Generic.IDictionary lockModes, NHibernate.Engine.RowSelection rowSelection, bool isReadOnlyInitialized, bool readOnly, bool cacheable, string cacheRegion, string comment, object[] collectionKeys, NHibernate.Transform.IResultTransformer transformer) => throw null; + public QueryParameters() => throw null; + public bool ReadOnly { get => throw null; set => throw null; } + public NHibernate.Transform.IResultTransformer ResultTransformer { get => throw null; set => throw null; } + public NHibernate.Engine.RowSelection RowSelection { get => throw null; set => throw null; } + public void ValidateParameters() => throw null; + } + + // Generated from `NHibernate.Engine.ResultSetMappingDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultSetMappingDefinition + { + public void AddQueryReturn(NHibernate.Engine.Query.Sql.INativeSQLQueryReturn queryReturn) => throw null; + public NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] GetQueryReturns() => throw null; + public string Name { get => throw null; } + public ResultSetMappingDefinition(string name) => throw null; + } + + // Generated from `NHibernate.Engine.RowSelection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RowSelection + { + public bool DefinesLimits { get => throw null; } + public int FetchSize { get => throw null; set => throw null; } + public int FirstRow { get => throw null; set => throw null; } + public int MaxRows { get => throw null; set => throw null; } + public static int NoValue; + public RowSelection() => throw null; + public int Timeout { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Engine.SessionImplementorExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SessionImplementorExtensions + { + public static string GetTenantIdentifier(this NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Engine.StatefulPersistenceContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StatefulPersistenceContext : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, NHibernate.Engine.IPersistenceContext + { + public void AddChildParent(object child, object parent) => throw null; + public void AddCollectionHolder(NHibernate.Collection.IPersistentCollection holder) => throw null; + public void AddEntity(NHibernate.Engine.EntityUniqueKey euk, object entity) => throw null; + public void AddEntity(NHibernate.Engine.EntityKey key, object entity) => throw null; + public NHibernate.Engine.EntityEntry AddEntity(object entity, NHibernate.Engine.Status status, object[] loadedState, NHibernate.Engine.EntityKey entityKey, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement, bool lazyPropertiesAreUnfetched) => throw null; + public NHibernate.Engine.EntityEntry AddEntity(object entity, NHibernate.Engine.Status status, object[] loadedState, NHibernate.Engine.EntityKey entityKey, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement) => throw null; + public NHibernate.Engine.EntityEntry AddEntry(object entity, NHibernate.Engine.Status status, object[] loadedState, object rowId, object id, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement, bool lazyPropertiesAreUnfetched) => throw null; + public NHibernate.Engine.EntityEntry AddEntry(object entity, NHibernate.Engine.Status status, object[] loadedState, object rowId, object id, object version, NHibernate.LockMode lockMode, bool existsInDatabase, NHibernate.Persister.Entity.IEntityPersister persister, bool disableVersionIncrement) => throw null; + public NHibernate.Engine.CollectionEntry AddInitializedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection, object id) => throw null; + public void AddInitializedDetachedCollection(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection) => throw null; + public void AddNewCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection) => throw null; + public void AddNonLazyCollection(NHibernate.Collection.IPersistentCollection collection) => throw null; + public void AddNullProperty(NHibernate.Engine.EntityKey ownerKey, string propertyName) => throw null; + public void AddProxy(NHibernate.Engine.EntityKey key, NHibernate.Proxy.INHibernateProxy proxy) => throw null; + public void AddUninitializedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection, object id) => throw null; + public void AddUninitializedDetachedCollection(NHibernate.Persister.Collection.ICollectionPersister persister, NHibernate.Collection.IPersistentCollection collection) => throw null; + public void AddUnownedCollection(NHibernate.Engine.CollectionKey key, NHibernate.Collection.IPersistentCollection collection) => throw null; + public void AfterLoad() => throw null; + public void AfterTransactionCompletion() => throw null; + public NHibernate.Engine.BatchFetchQueue BatchFetchQueue { get => throw null; } + public void BeforeLoad() => throw null; + public int CascadeLevel { get => throw null; } + public void CheckUniqueness(NHibernate.Engine.EntityKey key, object obj) => throw null; + public void Clear() => throw null; + public System.Collections.IDictionary CollectionEntries { get => throw null; } + public System.Collections.Generic.IDictionary CollectionsByKey { get => throw null; } + public bool ContainsCollection(NHibernate.Collection.IPersistentCollection collection) => throw null; + public bool ContainsEntity(NHibernate.Engine.EntityKey key) => throw null; + public bool ContainsProxy(NHibernate.Proxy.INHibernateProxy proxy) => throw null; + public int DecrementCascadeLevel() => throw null; + public bool DefaultReadOnly { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary EntitiesByKey { get => throw null; } + public System.Collections.IDictionary EntityEntries { get => throw null; } + public bool Flushing { get => throw null; set => throw null; } + public object[] GetCachedDatabaseSnapshot(NHibernate.Engine.EntityKey key) => throw null; + public NHibernate.Collection.IPersistentCollection GetCollection(NHibernate.Engine.CollectionKey collectionKey) => throw null; + public NHibernate.Engine.CollectionEntry GetCollectionEntry(NHibernate.Collection.IPersistentCollection coll) => throw null; + public NHibernate.Engine.CollectionEntry GetCollectionEntryOrNull(object collection) => throw null; + public NHibernate.Collection.IPersistentCollection GetCollectionHolder(object array) => throw null; + public object GetCollectionOwner(object key, NHibernate.Persister.Collection.ICollectionPersister collectionPersister) => throw null; + public object[] GetDatabaseSnapshot(object id, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public System.Threading.Tasks.Task GetDatabaseSnapshotAsync(object id, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public object GetEntity(NHibernate.Engine.EntityUniqueKey euk) => throw null; + public object GetEntity(NHibernate.Engine.EntityKey key) => throw null; + public NHibernate.Engine.EntityEntry GetEntry(object entity) => throw null; + public object GetIndexInOwner(string entity, string property, object childEntity, System.Collections.IDictionary mergeMap) => throw null; + public virtual object GetLoadedCollectionOwnerIdOrNull(NHibernate.Collection.IPersistentCollection collection) => throw null; + public virtual object GetLoadedCollectionOwnerOrNull(NHibernate.Collection.IPersistentCollection collection) => throw null; + public object[] GetNaturalIdSnapshot(object id, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public System.Threading.Tasks.Task GetNaturalIdSnapshotAsync(object id, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object GetOwnerId(string entityName, string propertyName, object childEntity, System.Collections.IDictionary mergeMap) => throw null; + public object GetProxy(NHibernate.Engine.EntityKey key) => throw null; + public object GetSnapshot(NHibernate.Collection.IPersistentCollection coll) => throw null; + public bool HasNonReadOnlyEntities { get => throw null; } + public int IncrementCascadeLevel() => throw null; + public void InitializeNonLazyCollections() => throw null; + public System.Threading.Tasks.Task InitializeNonLazyCollectionsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsEntryFor(object entity) => throw null; + public bool IsLoadFinished { get => throw null; } + public bool IsPropertyNull(NHibernate.Engine.EntityKey ownerKey, string propertyName) => throw null; + public bool IsReadOnly(object entityOrProxy) => throw null; + public bool IsStateless { get => throw null; } + public NHibernate.Engine.Loading.LoadContexts LoadContexts { get => throw null; } + public object NarrowProxy(NHibernate.Proxy.INHibernateProxy proxy, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey key, object obj) => throw null; + public static object NoRow; + public System.Collections.Generic.ISet NullifiableEntityKeys { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public object ProxyFor(object impl) => throw null; + public object ProxyFor(NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey key, object impl) => throw null; + public bool ReassociateIfUninitializedProxy(object value) => throw null; + public void ReassociateProxy(object value, object id) => throw null; + public void RemoveChildParent(object child) => throw null; + public NHibernate.Collection.IPersistentCollection RemoveCollectionHolder(object array) => throw null; + public object RemoveEntity(NHibernate.Engine.EntityKey key) => throw null; + public NHibernate.Engine.EntityEntry RemoveEntry(object entity) => throw null; + public object RemoveProxy(NHibernate.Engine.EntityKey key) => throw null; + public void ReplaceDelayedEntityIdentityInsertKeys(NHibernate.Engine.EntityKey oldKey, object generatedId) => throw null; + public NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public void SetEntryStatus(NHibernate.Engine.EntityEntry entry, NHibernate.Engine.Status status) => throw null; + public void SetReadOnly(object entityOrProxy, bool readOnly) => throw null; + public StatefulPersistenceContext(NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToString() => throw null; + public object Unproxy(object maybeProxy) => throw null; + public object UnproxyAndReassociate(object maybeProxy) => throw null; + public System.Threading.Tasks.Task UnproxyAndReassociateAsync(object maybeProxy, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Collection.IPersistentCollection UseUnownedCollection(NHibernate.Engine.CollectionKey key) => throw null; + } + + // Generated from `NHibernate.Engine.Status` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum Status + { + Deleted, + Gone, + Loaded, + Loading, + ReadOnly, + Saving, + } + + // Generated from `NHibernate.Engine.SubselectFetch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubselectFetch + { + public NHibernate.Engine.QueryParameters QueryParameters { get => throw null; } + public System.Collections.Generic.ISet Result { get => throw null; } + public SubselectFetch(string alias, NHibernate.Persister.Entity.ILoadable loadable, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet resultingEntityKeys) => throw null; + public override string ToString() => throw null; + public NHibernate.SqlCommand.SqlString ToSubselectString(string ukname) => throw null; + } + + // Generated from `NHibernate.Engine.TransactionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class TransactionHelper + { + public abstract object DoWorkInCurrentTransaction(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction); + public abstract System.Threading.Tasks.Task DoWorkInCurrentTransactionAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken); + public virtual object DoWorkInNewTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task DoWorkInNewTransactionAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected TransactionHelper() => throw null; + // Generated from `NHibernate.Engine.TransactionHelper+Work` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Work : NHibernate.Engine.Transaction.IIsolatedWork + { + public void DoWork(System.Data.Common.DbConnection connection, System.Data.Common.DbTransaction transaction) => throw null; + public System.Threading.Tasks.Task DoWorkAsync(System.Data.Common.DbConnection connection, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken) => throw null; + public Work(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.TransactionHelper owner) => throw null; + } + + + } + + // Generated from `NHibernate.Engine.TwoPhaseLoad` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TwoPhaseLoad + { + public static void AddUninitializedCachedEntity(NHibernate.Engine.EntityKey key, object obj, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.LockMode lockMode, object version, NHibernate.Engine.ISessionImplementor session) => throw null; + public static void AddUninitializedCachedEntity(NHibernate.Engine.EntityKey key, object obj, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.LockMode lockMode, bool lazyPropertiesAreUnfetched, object version, NHibernate.Engine.ISessionImplementor session) => throw null; + public static void AddUninitializedEntity(NHibernate.Engine.EntityKey key, object obj, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.LockMode lockMode, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session) => throw null; + public static void AddUninitializedEntity(NHibernate.Engine.EntityKey key, object obj, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session) => throw null; + public static void InitializeEntity(object entity, bool readOnly, NHibernate.Engine.ISessionImplementor session, NHibernate.Event.PreLoadEvent preLoadEvent, NHibernate.Event.PostLoadEvent postLoadEvent) => throw null; + public static System.Threading.Tasks.Task InitializeEntityAsync(object entity, bool readOnly, NHibernate.Engine.ISessionImplementor session, NHibernate.Event.PreLoadEvent preLoadEvent, NHibernate.Event.PostLoadEvent postLoadEvent, System.Threading.CancellationToken cancellationToken) => throw null; + public static void PostHydrate(NHibernate.Persister.Entity.IEntityPersister persister, object id, object[] values, object rowId, object obj, NHibernate.LockMode lockMode, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session) => throw null; + public static void PostHydrate(NHibernate.Persister.Entity.IEntityPersister persister, object id, object[] values, object rowId, object obj, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Engine.TypedValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypedValue + { + public System.Collections.Generic.IEqualityComparer Comparer { get => throw null; } + // Generated from `NHibernate.Engine.TypedValue+DefaultComparer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultComparer : System.Collections.Generic.IEqualityComparer + { + public DefaultComparer() => throw null; + public bool Equals(NHibernate.Engine.TypedValue x, NHibernate.Engine.TypedValue y) => throw null; + public int GetHashCode(NHibernate.Engine.TypedValue obj) => throw null; + } + + + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + // Generated from `NHibernate.Engine.TypedValue+ParameterListComparer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParameterListComparer : System.Collections.Generic.IEqualityComparer + { + public bool Equals(NHibernate.Engine.TypedValue x, NHibernate.Engine.TypedValue y) => throw null; + public int GetHashCode(NHibernate.Engine.TypedValue obj) => throw null; + public ParameterListComparer() => throw null; + } + + + public override string ToString() => throw null; + public NHibernate.Type.IType Type { get => throw null; } + public TypedValue(NHibernate.Type.IType type, object value, bool isList) => throw null; + public TypedValue(NHibernate.Type.IType type, object value) => throw null; + public object Value { get => throw null; } + } + + // Generated from `NHibernate.Engine.UnsavedValueFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class UnsavedValueFactory + { + public static NHibernate.Engine.IdentifierValue GetUnsavedIdentifierValue(string unsavedValue, NHibernate.Properties.IGetter identifierGetter, NHibernate.Type.IType identifierType, System.Reflection.ConstructorInfo constructor) => throw null; + public static NHibernate.Engine.VersionValue GetUnsavedVersionValue(string versionUnsavedValue, NHibernate.Properties.IGetter versionGetter, NHibernate.Type.IVersionType versionType, System.Reflection.ConstructorInfo constructor) => throw null; + } + + // Generated from `NHibernate.Engine.ValueInclusion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum ValueInclusion + { + Full, + None, + Partial, + } + + // Generated from `NHibernate.Engine.VersionValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VersionValue + { + public virtual object GetDefaultValue(object currentValue) => throw null; + public virtual bool? IsUnsaved(object version) => throw null; + public static NHibernate.Engine.VersionValue VersionNegative; + public static NHibernate.Engine.VersionValue VersionSaveNull; + public static NHibernate.Engine.VersionValue VersionUndefined; + public VersionValue(object value) => throw null; + protected VersionValue() => throw null; + } + + // Generated from `NHibernate.Engine.Versioning` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Versioning + { + public static object GetVersion(object[] fields, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public static object Increment(object version, NHibernate.Type.IVersionType versionType, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task IncrementAsync(object version, NHibernate.Type.IVersionType versionType, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool IsVersionIncrementRequired(int[] dirtyProperties, bool hasDirtyCollections, bool[] propertyVersionability) => throw null; + // Generated from `NHibernate.Engine.Versioning+OptimisticLock` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum OptimisticLock + { + All, + Dirty, + None, + Version, + } + + + public static object Seed(NHibernate.Type.IVersionType versionType, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task SeedAsync(NHibernate.Type.IVersionType versionType, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static bool SeedVersion(object[] fields, int versionProperty, NHibernate.Type.IVersionType versionType, bool? force, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task SeedVersionAsync(object[] fields, int versionProperty, NHibernate.Type.IVersionType versionType, bool? force, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static void SetVersion(object[] fields, object version, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public Versioning() => throw null; + } + + namespace Loading + { + // Generated from `NHibernate.Engine.Loading.CollectionLoadContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionLoadContext + { + public CollectionLoadContext(NHibernate.Engine.Loading.LoadContexts loadContexts, System.Data.Common.DbDataReader resultSet) => throw null; + public void EndLoadingCollections(NHibernate.Persister.Collection.ICollectionPersister persister, bool skipCache, NHibernate.Cache.CacheBatcher cacheBatcher) => throw null; + public void EndLoadingCollections(NHibernate.Persister.Collection.ICollectionPersister persister, bool skipCache) => throw null; + public void EndLoadingCollections(NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + public System.Threading.Tasks.Task EndLoadingCollectionsAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool skipCache, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task EndLoadingCollectionsAsync(NHibernate.Persister.Collection.ICollectionPersister persister, bool skipCache, NHibernate.Cache.CacheBatcher cacheBatcher, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task EndLoadingCollectionsAsync(NHibernate.Persister.Collection.ICollectionPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Collection.IPersistentCollection GetLoadingCollection(NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public NHibernate.Engine.Loading.LoadContexts LoadContext { get => throw null; } + public System.Data.Common.DbDataReader ResultSet { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Engine.Loading.LoadContexts` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LoadContexts + { + public void Cleanup() => throw null; + public virtual void Cleanup(System.Data.Common.DbDataReader resultSet) => throw null; + public NHibernate.Engine.Loading.CollectionLoadContext GetCollectionLoadContext(System.Data.Common.DbDataReader resultSet) => throw null; + public bool HasLoadingCollectionEntries { get => throw null; } + public bool HasRegisteredLoadingCollectionEntries { get => throw null; } + public LoadContexts(NHibernate.Engine.IPersistenceContext persistenceContext) => throw null; + public NHibernate.Collection.IPersistentCollection LocateLoadingCollection(NHibernate.Persister.Collection.ICollectionPersister persister, object ownerKey) => throw null; + public NHibernate.Engine.IPersistenceContext PersistenceContext { get => throw null; } + } + + // Generated from `NHibernate.Engine.Loading.LoadingCollectionEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LoadingCollectionEntry + { + public NHibernate.Collection.IPersistentCollection Collection { get => throw null; } + public object Key { get => throw null; } + public LoadingCollectionEntry(System.Data.Common.DbDataReader resultSet, NHibernate.Persister.Collection.ICollectionPersister persister, object key, NHibernate.Collection.IPersistentCollection collection) => throw null; + public NHibernate.Persister.Collection.ICollectionPersister Persister { get => throw null; } + public System.Data.Common.DbDataReader ResultSet { get => throw null; } + public bool StopLoading { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + } + namespace Query + { + // Generated from `NHibernate.Engine.Query.CallableParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CallableParser + { + // Generated from `NHibernate.Engine.Query.CallableParser+Detail` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Detail + { + public Detail() => throw null; + public string FunctionName; + public bool HasReturn; + public bool IsCallable; + } + + + public static NHibernate.Engine.Query.CallableParser.Detail Parse(string sqlString) => throw null; + } + + // Generated from `NHibernate.Engine.Query.FilterQueryPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterQueryPlan : NHibernate.Engine.Query.QueryExpressionPlan + { + public string CollectionRole { get => throw null; } + public override NHibernate.Engine.Query.QueryExpressionPlan Copy(NHibernate.IQueryExpression expression) => throw null; + public FilterQueryPlan(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.Query.HQLQueryPlan), default(NHibernate.IQueryExpression)) => throw null; + protected FilterQueryPlan(NHibernate.Engine.Query.FilterQueryPlan source, NHibernate.IQueryExpression expression) : base(default(NHibernate.Engine.Query.HQLQueryPlan), default(NHibernate.IQueryExpression)) => throw null; + } + + // Generated from `NHibernate.Engine.Query.HQLQueryPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HQLQueryPlan : NHibernate.Engine.Query.IQueryPlan + { + protected HQLQueryPlan(string sourceQuery, NHibernate.Hql.IQueryTranslator[] translators) => throw null; + internal HQLQueryPlan(NHibernate.Engine.Query.HQLQueryPlan source) => throw null; + protected static NHibernate.INHibernateLogger Log; + public NHibernate.Engine.Query.ParameterMetadata ParameterMetadata { get => throw null; set => throw null; } + public int PerformExecuteUpdate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task PerformExecuteUpdateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.IEnumerable PerformIterate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session) => throw null; + public System.Collections.Generic.IEnumerable PerformIterate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session) => throw null; + public System.Threading.Tasks.Task PerformIterateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task> PerformIterateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + public void PerformList(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Collections.IList results) => throw null; + public System.Threading.Tasks.Task PerformListAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.Generic.ISet QuerySpaces { get => throw null; set => throw null; } + public NHibernate.Engine.Query.ReturnMetadata ReturnMetadata { get => throw null; set => throw null; } + public string[] SqlStrings { get => throw null; set => throw null; } + public NHibernate.Hql.IQueryTranslator[] Translators { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Engine.Query.IQueryExpressionPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryExpressionPlan : NHibernate.Engine.Query.IQueryPlan + { + NHibernate.IQueryExpression QueryExpression { get; } + } + + // Generated from `NHibernate.Engine.Query.IQueryPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryPlan + { + NHibernate.Engine.Query.ParameterMetadata ParameterMetadata { get; } + int PerformExecuteUpdate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor statelessSessionImpl); + System.Threading.Tasks.Task PerformExecuteUpdateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor statelessSessionImpl, System.Threading.CancellationToken cancellationToken); + System.Collections.IEnumerable PerformIterate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session); + System.Collections.Generic.IEnumerable PerformIterate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session); + System.Threading.Tasks.Task PerformIterateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> PerformIterateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken); + void PerformList(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor statelessSessionImpl, System.Collections.IList results); + System.Threading.Tasks.Task PerformListAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor statelessSessionImpl, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + System.Collections.Generic.ISet QuerySpaces { get; } + NHibernate.Engine.Query.ReturnMetadata ReturnMetadata { get; } + NHibernate.Hql.IQueryTranslator[] Translators { get; } + } + + // Generated from `NHibernate.Engine.Query.NamedParameterDescriptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedParameterDescriptor + { + public NHibernate.Type.IType ExpectedType { get => throw null; } + public bool JpaStyle { get => throw null; } + public string Name { get => throw null; } + public NamedParameterDescriptor(string name, NHibernate.Type.IType expectedType, bool jpaStyle) => throw null; + } + + // Generated from `NHibernate.Engine.Query.NativeSQLQueryPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQueryPlan + { + public NHibernate.Loader.Custom.Sql.SQLCustomQuery CustomQuery { get => throw null; } + public NativeSQLQueryPlan(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification specification, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public int PerformExecuteUpdate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task PerformExecuteUpdateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string SourceQuery { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.OrdinalParameterDescriptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OrdinalParameterDescriptor + { + public NHibernate.Type.IType ExpectedType { get => throw null; } + public OrdinalParameterDescriptor(int ordinalPosition, NHibernate.Type.IType expectedType) => throw null; + public int OrdinalPosition { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.ParamLocationRecognizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParamLocationRecognizer : NHibernate.Engine.Query.ParameterParser.IRecognizer + { + public void JpaPositionalParameter(string name, int position) => throw null; + public void NamedParameter(string name, int position) => throw null; + // Generated from `NHibernate.Engine.Query.ParamLocationRecognizer+NamedParameterDescription` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedParameterDescription + { + public int[] BuildPositionsArray() => throw null; + public bool JpaStyle { get => throw null; } + public NamedParameterDescription(bool jpaStyle) => throw null; + } + + + public System.Collections.Generic.IDictionary NamedParameterDescriptionMap { get => throw null; } + public void OrdinalParameter(int position) => throw null; + public System.Collections.Generic.List OrdinalParameterLocationList { get => throw null; } + public void Other(string sqlPart) => throw null; + public void Other(System.Char character) => throw null; + public void OutParameter(int position) => throw null; + public ParamLocationRecognizer() => throw null; + public static NHibernate.Engine.Query.ParamLocationRecognizer ParseLocations(string query) => throw null; + } + + // Generated from `NHibernate.Engine.Query.ParameterMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParameterMetadata + { + public NHibernate.Engine.Query.NamedParameterDescriptor GetNamedParameterDescriptor(string name) => throw null; + public NHibernate.Type.IType GetNamedParameterExpectedType(string name) => throw null; + public NHibernate.Engine.Query.OrdinalParameterDescriptor GetOrdinalParameterDescriptor(int position) => throw null; + public NHibernate.Type.IType GetOrdinalParameterExpectedType(int position) => throw null; + public System.Collections.Generic.ICollection NamedParameterNames { get => throw null; } + public int OrdinalParameterCount { get => throw null; } + public ParameterMetadata(System.Collections.Generic.IEnumerable ordinalDescriptors, System.Collections.Generic.IDictionary namedDescriptorMap) => throw null; + } + + // Generated from `NHibernate.Engine.Query.ParameterParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParameterParser + { + // Generated from `NHibernate.Engine.Query.ParameterParser+IRecognizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRecognizer + { + void JpaPositionalParameter(string name, int position); + void NamedParameter(string name, int position); + void OrdinalParameter(int position); + void Other(string sqlPart); + void Other(System.Char character); + void OutParameter(int position); + } + + + public static void Parse(string sqlString, NHibernate.Engine.Query.ParameterParser.IRecognizer recognizer) => throw null; + } + + // Generated from `NHibernate.Engine.Query.QueryExpressionPlan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryExpressionPlan : NHibernate.Engine.Query.HQLQueryPlan, NHibernate.Engine.Query.IQueryPlan, NHibernate.Engine.Query.IQueryExpressionPlan + { + public virtual NHibernate.Engine.Query.QueryExpressionPlan Copy(NHibernate.IQueryExpression expression) => throw null; + protected static NHibernate.Hql.IQueryTranslator[] CreateTranslators(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.IQueryExpression QueryExpression { get => throw null; } + public QueryExpressionPlan(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.Query.HQLQueryPlan)) => throw null; + public QueryExpressionPlan(NHibernate.IQueryExpression queryExpression, bool shallow, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.Query.HQLQueryPlan)) => throw null; + protected QueryExpressionPlan(string key, NHibernate.Hql.IQueryTranslator[] translators) : base(default(NHibernate.Engine.Query.HQLQueryPlan)) => throw null; + protected QueryExpressionPlan(NHibernate.Engine.Query.HQLQueryPlan source, NHibernate.IQueryExpression expression) : base(default(NHibernate.Engine.Query.HQLQueryPlan)) => throw null; + } + + // Generated from `NHibernate.Engine.Query.QueryPlanCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryPlanCache + { + public NHibernate.Engine.Query.IQueryExpressionPlan GetFilterQueryPlan(string filterString, string collectionRole, bool shallow, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public NHibernate.Engine.Query.IQueryExpressionPlan GetFilterQueryPlan(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public NHibernate.Engine.Query.IQueryExpressionPlan GetHQLQueryPlan(NHibernate.IQueryExpression queryExpression, bool shallow, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public NHibernate.Engine.Query.NativeSQLQueryPlan GetNativeSQLQueryPlan(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec) => throw null; + public NHibernate.Engine.Query.ParameterMetadata GetSQLParameterMetadata(string query) => throw null; + public QueryPlanCache(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Engine.Query.ReturnMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReturnMetadata + { + public string[] ReturnAliases { get => throw null; } + public ReturnMetadata(string[] returnAliases, NHibernate.Type.IType[] returnTypes) => throw null; + public NHibernate.Type.IType[] ReturnTypes { get => throw null; } + } + + namespace Sql + { + // Generated from `NHibernate.Engine.Query.Sql.INativeSQLQueryReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INativeSQLQueryReturn + { + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQueryCollectionReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQueryCollectionReturn : NHibernate.Engine.Query.Sql.NativeSQLQueryNonScalarReturn + { + public NativeSQLQueryCollectionReturn(string alias, string ownerEntityName, string ownerProperty, System.Collections.Generic.IDictionary propertyResults, NHibernate.LockMode lockMode) : base(default(string), default(System.Collections.Generic.IDictionary), default(NHibernate.LockMode)) => throw null; + public string OwnerEntityName { get => throw null; } + public string OwnerProperty { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQueryJoinReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQueryJoinReturn : NHibernate.Engine.Query.Sql.NativeSQLQueryNonScalarReturn + { + public NativeSQLQueryJoinReturn(string alias, string ownerAlias, string ownerProperty, System.Collections.Generic.IDictionary propertyResults, NHibernate.LockMode lockMode) : base(default(string), default(System.Collections.Generic.IDictionary), default(NHibernate.LockMode)) => throw null; + public string OwnerAlias { get => throw null; } + public string OwnerProperty { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQueryNonScalarReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NativeSQLQueryNonScalarReturn : NHibernate.Engine.Query.Sql.INativeSQLQueryReturn + { + public string Alias { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Engine.Query.Sql.NativeSQLQueryNonScalarReturn other) => throw null; + public override int GetHashCode() => throw null; + public NHibernate.LockMode LockMode { get => throw null; } + protected internal NativeSQLQueryNonScalarReturn(string alias, System.Collections.Generic.IDictionary propertyResults, NHibernate.LockMode lockMode) => throw null; + public System.Collections.Generic.IDictionary PropertyResultsMap { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQueryRootReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQueryRootReturn : NHibernate.Engine.Query.Sql.NativeSQLQueryNonScalarReturn + { + public NativeSQLQueryRootReturn(string alias, string entityName, System.Collections.Generic.IDictionary propertyResults, NHibernate.LockMode lockMode) : base(default(string), default(System.Collections.Generic.IDictionary), default(NHibernate.LockMode)) => throw null; + public NativeSQLQueryRootReturn(string alias, string entityName, NHibernate.LockMode lockMode) : base(default(string), default(System.Collections.Generic.IDictionary), default(NHibernate.LockMode)) => throw null; + public string ReturnEntityName { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQueryScalarReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQueryScalarReturn : NHibernate.Engine.Query.Sql.INativeSQLQueryReturn + { + public string ColumnAlias { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Engine.Query.Sql.NativeSQLQueryScalarReturn other) => throw null; + public override int GetHashCode() => throw null; + public NativeSQLQueryScalarReturn(string alias, NHibernate.Type.IType type) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeSQLQuerySpecification + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public NativeSQLQuerySpecification(string queryString, NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] sqlQueryReturns, System.Collections.Generic.ICollection querySpaces) => throw null; + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public string QueryString { get => throw null; } + public NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] SqlQueryReturns { get => throw null; } + } + + } + } + namespace Transaction + { + // Generated from `NHibernate.Engine.Transaction.IIsolatedWork` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIsolatedWork + { + void DoWork(System.Data.Common.DbConnection connection, System.Data.Common.DbTransaction transaction); + System.Threading.Tasks.Task DoWorkAsync(System.Data.Common.DbConnection connection, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Engine.Transaction.Isolater` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Isolater + { + public static void DoIsolatedWork(NHibernate.Engine.Transaction.IIsolatedWork work, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task DoIsolatedWorkAsync(NHibernate.Engine.Transaction.IIsolatedWork work, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static void DoNonTransactedWork(NHibernate.Engine.Transaction.IIsolatedWork work, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task DoNonTransactedWorkAsync(NHibernate.Engine.Transaction.IIsolatedWork work, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public Isolater() => throw null; + } + + } + } + namespace Event + { + // Generated from `NHibernate.Event.AbstractCollectionEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractCollectionEvent : NHibernate.Event.AbstractEvent + { + protected AbstractCollectionEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source, object affectedOwner, object affectedOwnerId) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object AffectedOwnerIdOrNull { get => throw null; } + public object AffectedOwnerOrNull { get => throw null; } + public NHibernate.Collection.IPersistentCollection Collection { get => throw null; } + public virtual string GetAffectedOwnerEntityName() => throw null; + protected static string GetAffectedOwnerEntityName(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, object affectedOwner, NHibernate.Event.IEventSource source) => throw null; + protected static NHibernate.Persister.Collection.ICollectionPersister GetLoadedCollectionPersister(NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) => throw null; + protected static object GetLoadedOwnerIdOrNull(NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) => throw null; + protected static object GetLoadedOwnerOrNull(NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) => throw null; + protected static object GetOwnerIdOrNull(object owner, NHibernate.Event.IEventSource source) => throw null; + } + + // Generated from `NHibernate.Event.AbstractEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AbstractEvent : NHibernate.Event.IDatabaseEventArgs + { + public AbstractEvent(NHibernate.Event.IEventSource source) => throw null; + public NHibernate.Event.IEventSource Session { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.AbstractPostDatabaseOperationEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AbstractPostDatabaseOperationEvent : NHibernate.Event.AbstractEvent, NHibernate.Event.IPostDatabaseOperationEventArgs, NHibernate.Event.IDatabaseEventArgs + { + protected AbstractPostDatabaseOperationEvent(NHibernate.Event.IEventSource source, object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object Entity { get => throw null; set => throw null; } + public object Id { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.AbstractPreDatabaseOperationEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractPreDatabaseOperationEvent : NHibernate.Event.AbstractEvent, NHibernate.Event.IPreDatabaseOperationEventArgs, NHibernate.Event.IDatabaseEventArgs + { + protected AbstractPreDatabaseOperationEvent(NHibernate.Event.IEventSource source, object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object Entity { get => throw null; set => throw null; } + public object Id { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.AutoFlushEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AutoFlushEvent : NHibernate.Event.FlushEvent + { + public AutoFlushEvent(System.Collections.Generic.ISet querySpaces, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public bool FlushRequired { get => throw null; set => throw null; } + public System.Collections.Generic.ISet QuerySpaces { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.DeleteEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DeleteEvent : NHibernate.Event.AbstractEvent + { + public bool CascadeDeleteEnabled { get => throw null; } + public DeleteEvent(string entityName, object entity, bool isCascadeDeleteEnabled, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public DeleteEvent(string entityName, object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public DeleteEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object Entity { get => throw null; } + public string EntityName { get => throw null; } + } + + // Generated from `NHibernate.Event.DirtyCheckEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DirtyCheckEvent : NHibernate.Event.FlushEvent + { + public bool Dirty { get => throw null; set => throw null; } + public DirtyCheckEvent(NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.EventListeners` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EventListeners + { + public NHibernate.Event.IAutoFlushEventListener[] AutoFlushEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IDeleteEventListener[] DeleteEventListeners { get => throw null; set => throw null; } + public void DestroyListeners() => throw null; + public NHibernate.Event.IDirtyCheckEventListener[] DirtyCheckEventListeners { get => throw null; set => throw null; } + public EventListeners() => throw null; + public NHibernate.Event.IEvictEventListener[] EvictEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IFlushEntityEventListener[] FlushEntityEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IFlushEventListener[] FlushEventListeners { get => throw null; set => throw null; } + public System.Type GetListenerClassFor(NHibernate.Event.ListenerType type) => throw null; + public NHibernate.Event.IInitializeCollectionEventListener[] InitializeCollectionEventListeners { get => throw null; set => throw null; } + public virtual void InitializeListeners(NHibernate.Cfg.Configuration cfg) => throw null; + public NHibernate.Event.ILoadEventListener[] LoadEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.ILockEventListener[] LockEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IMergeEventListener[] MergeEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPersistEventListener[] PersistEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPersistEventListener[] PersistOnFlushEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostCollectionRecreateEventListener[] PostCollectionRecreateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostCollectionRemoveEventListener[] PostCollectionRemoveEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostCollectionUpdateEventListener[] PostCollectionUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostDeleteEventListener[] PostCommitDeleteEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostInsertEventListener[] PostCommitInsertEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostUpdateEventListener[] PostCommitUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostDeleteEventListener[] PostDeleteEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostInsertEventListener[] PostInsertEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostLoadEventListener[] PostLoadEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPostUpdateEventListener[] PostUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreCollectionRecreateEventListener[] PreCollectionRecreateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreCollectionRemoveEventListener[] PreCollectionRemoveEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreCollectionUpdateEventListener[] PreCollectionUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreDeleteEventListener[] PreDeleteEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreInsertEventListener[] PreInsertEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreLoadEventListener[] PreLoadEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IPreUpdateEventListener[] PreUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IRefreshEventListener[] RefreshEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.IReplicateEventListener[] ReplicateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.ISaveOrUpdateEventListener[] SaveEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.ISaveOrUpdateEventListener[] SaveOrUpdateEventListeners { get => throw null; set => throw null; } + public NHibernate.Event.EventListeners ShallowCopy() => throw null; + public NHibernate.Event.ISaveOrUpdateEventListener[] UpdateEventListeners { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.EvictEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EvictEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public EvictEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.FlushEntityEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FlushEntityEvent : NHibernate.Event.AbstractEvent + { + public object[] DatabaseSnapshot { get => throw null; set => throw null; } + public bool DirtyCheckHandledByInterceptor { get => throw null; set => throw null; } + public bool DirtyCheckPossible { get => throw null; set => throw null; } + public int[] DirtyProperties { get => throw null; set => throw null; } + public object Entity { get => throw null; } + public NHibernate.Engine.EntityEntry EntityEntry { get => throw null; } + public FlushEntityEvent(NHibernate.Event.IEventSource source, object entity, NHibernate.Engine.EntityEntry entry) : base(default(NHibernate.Event.IEventSource)) => throw null; + public bool HasDatabaseSnapshot { get => throw null; } + public bool HasDirtyCollection { get => throw null; set => throw null; } + public object[] PropertyValues { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.FlushEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FlushEvent : NHibernate.Event.AbstractEvent + { + public FlushEvent(NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.IAutoFlushEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAutoFlushEventListener + { + void OnAutoFlush(NHibernate.Event.AutoFlushEvent @event); + System.Threading.Tasks.Task OnAutoFlushAsync(NHibernate.Event.AutoFlushEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IDatabaseEventArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDatabaseEventArgs + { + NHibernate.Event.IEventSource Session { get; } + } + + // Generated from `NHibernate.Event.IDeleteEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDeleteEventListener + { + void OnDelete(NHibernate.Event.DeleteEvent @event, System.Collections.Generic.ISet transientEntities); + void OnDelete(NHibernate.Event.DeleteEvent @event); + System.Threading.Tasks.Task OnDeleteAsync(NHibernate.Event.DeleteEvent @event, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task OnDeleteAsync(NHibernate.Event.DeleteEvent @event, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IDestructible` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDestructible + { + void Cleanup(); + } + + // Generated from `NHibernate.Event.IDirtyCheckEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDirtyCheckEventListener + { + void OnDirtyCheck(NHibernate.Event.DirtyCheckEvent @event); + System.Threading.Tasks.Task OnDirtyCheckAsync(NHibernate.Event.DirtyCheckEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IEventSource` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEventSource : System.IDisposable, NHibernate.ISession, NHibernate.Engine.ISessionImplementor + { + NHibernate.Engine.ActionQueue ActionQueue { get; } + bool AutoFlushSuspended { get; } + void Delete(string entityName, object child, bool isCascadeDeleteEnabled, System.Collections.Generic.ISet transientEntities); + System.Threading.Tasks.Task DeleteAsync(string entityName, object child, bool isCascadeDeleteEnabled, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken); + void ForceFlush(NHibernate.Engine.EntityEntry e); + System.Threading.Tasks.Task ForceFlushAsync(NHibernate.Engine.EntityEntry e, System.Threading.CancellationToken cancellationToken); + object Instantiate(NHibernate.Persister.Entity.IEntityPersister persister, object id); + void Merge(string entityName, object obj, System.Collections.IDictionary copiedAlready); + System.Threading.Tasks.Task MergeAsync(string entityName, object obj, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken); + void Persist(string entityName, object obj, System.Collections.IDictionary createdAlready); + System.Threading.Tasks.Task PersistAsync(string entityName, object obj, System.Collections.IDictionary createdAlready, System.Threading.CancellationToken cancellationToken); + void PersistOnFlush(string entityName, object obj, System.Collections.IDictionary copiedAlready); + System.Threading.Tasks.Task PersistOnFlushAsync(string entityName, object obj, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken); + void Refresh(object obj, System.Collections.IDictionary refreshedAlready); + System.Threading.Tasks.Task RefreshAsync(object obj, System.Collections.IDictionary refreshedAlready, System.Threading.CancellationToken cancellationToken); + System.IDisposable SuspendAutoFlush(); + } + + // Generated from `NHibernate.Event.IEvictEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEvictEventListener + { + void OnEvict(NHibernate.Event.EvictEvent @event); + System.Threading.Tasks.Task OnEvictAsync(NHibernate.Event.EvictEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IFlushEntityEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFlushEntityEventListener + { + void OnFlushEntity(NHibernate.Event.FlushEntityEvent @event); + System.Threading.Tasks.Task OnFlushEntityAsync(NHibernate.Event.FlushEntityEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IFlushEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFlushEventListener + { + void OnFlush(NHibernate.Event.FlushEvent @event); + System.Threading.Tasks.Task OnFlushAsync(NHibernate.Event.FlushEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IInitializable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInitializable + { + void Initialize(NHibernate.Cfg.Configuration cfg); + } + + // Generated from `NHibernate.Event.IInitializeCollectionEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInitializeCollectionEventListener + { + void OnInitializeCollection(NHibernate.Event.InitializeCollectionEvent @event); + System.Threading.Tasks.Task OnInitializeCollectionAsync(NHibernate.Event.InitializeCollectionEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.ILoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILoadEventListener + { + void OnLoad(NHibernate.Event.LoadEvent @event, NHibernate.Event.LoadType loadType); + System.Threading.Tasks.Task OnLoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Event.LoadType loadType, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.ILockEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILockEventListener + { + void OnLock(NHibernate.Event.LockEvent @event); + System.Threading.Tasks.Task OnLockAsync(NHibernate.Event.LockEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IMergeEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMergeEventListener + { + void OnMerge(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copiedAlready); + void OnMerge(NHibernate.Event.MergeEvent @event); + System.Threading.Tasks.Task OnMergeAsync(NHibernate.Event.MergeEvent @event, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task OnMergeAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPersistEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistEventListener + { + void OnPersist(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createdAlready); + void OnPersist(NHibernate.Event.PersistEvent @event); + System.Threading.Tasks.Task OnPersistAsync(NHibernate.Event.PersistEvent @event, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task OnPersistAsync(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createdAlready, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostCollectionRecreateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostCollectionRecreateEventListener + { + void OnPostRecreateCollection(NHibernate.Event.PostCollectionRecreateEvent @event); + System.Threading.Tasks.Task OnPostRecreateCollectionAsync(NHibernate.Event.PostCollectionRecreateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostCollectionRemoveEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostCollectionRemoveEventListener + { + void OnPostRemoveCollection(NHibernate.Event.PostCollectionRemoveEvent @event); + System.Threading.Tasks.Task OnPostRemoveCollectionAsync(NHibernate.Event.PostCollectionRemoveEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostCollectionUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostCollectionUpdateEventListener + { + void OnPostUpdateCollection(NHibernate.Event.PostCollectionUpdateEvent @event); + System.Threading.Tasks.Task OnPostUpdateCollectionAsync(NHibernate.Event.PostCollectionUpdateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostDatabaseOperationEventArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostDatabaseOperationEventArgs : NHibernate.Event.IDatabaseEventArgs + { + object Entity { get; } + object Id { get; } + NHibernate.Persister.Entity.IEntityPersister Persister { get; } + } + + // Generated from `NHibernate.Event.IPostDeleteEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostDeleteEventListener + { + void OnPostDelete(NHibernate.Event.PostDeleteEvent @event); + System.Threading.Tasks.Task OnPostDeleteAsync(NHibernate.Event.PostDeleteEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostInsertEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostInsertEventListener + { + void OnPostInsert(NHibernate.Event.PostInsertEvent @event); + System.Threading.Tasks.Task OnPostInsertAsync(NHibernate.Event.PostInsertEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPostLoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostLoadEventListener + { + void OnPostLoad(NHibernate.Event.PostLoadEvent @event); + } + + // Generated from `NHibernate.Event.IPostUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostUpdateEventListener + { + void OnPostUpdate(NHibernate.Event.PostUpdateEvent @event); + System.Threading.Tasks.Task OnPostUpdateAsync(NHibernate.Event.PostUpdateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreCollectionRecreateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreCollectionRecreateEventListener + { + void OnPreRecreateCollection(NHibernate.Event.PreCollectionRecreateEvent @event); + System.Threading.Tasks.Task OnPreRecreateCollectionAsync(NHibernate.Event.PreCollectionRecreateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreCollectionRemoveEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreCollectionRemoveEventListener + { + void OnPreRemoveCollection(NHibernate.Event.PreCollectionRemoveEvent @event); + System.Threading.Tasks.Task OnPreRemoveCollectionAsync(NHibernate.Event.PreCollectionRemoveEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreCollectionUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreCollectionUpdateEventListener + { + void OnPreUpdateCollection(NHibernate.Event.PreCollectionUpdateEvent @event); + System.Threading.Tasks.Task OnPreUpdateCollectionAsync(NHibernate.Event.PreCollectionUpdateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreDatabaseOperationEventArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreDatabaseOperationEventArgs : NHibernate.Event.IDatabaseEventArgs + { + object Entity { get; } + object Id { get; } + NHibernate.Persister.Entity.IEntityPersister Persister { get; } + } + + // Generated from `NHibernate.Event.IPreDeleteEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreDeleteEventListener + { + bool OnPreDelete(NHibernate.Event.PreDeleteEvent @event); + System.Threading.Tasks.Task OnPreDeleteAsync(NHibernate.Event.PreDeleteEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreInsertEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreInsertEventListener + { + bool OnPreInsert(NHibernate.Event.PreInsertEvent @event); + System.Threading.Tasks.Task OnPreInsertAsync(NHibernate.Event.PreInsertEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreLoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreLoadEventListener + { + void OnPreLoad(NHibernate.Event.PreLoadEvent @event); + System.Threading.Tasks.Task OnPreLoadAsync(NHibernate.Event.PreLoadEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IPreUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPreUpdateEventListener + { + bool OnPreUpdate(NHibernate.Event.PreUpdateEvent @event); + System.Threading.Tasks.Task OnPreUpdateAsync(NHibernate.Event.PreUpdateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IRefreshEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRefreshEventListener + { + void OnRefresh(NHibernate.Event.RefreshEvent @event, System.Collections.IDictionary refreshedAlready); + void OnRefresh(NHibernate.Event.RefreshEvent @event); + System.Threading.Tasks.Task OnRefreshAsync(NHibernate.Event.RefreshEvent @event, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task OnRefreshAsync(NHibernate.Event.RefreshEvent @event, System.Collections.IDictionary refreshedAlready, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.IReplicateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IReplicateEventListener + { + void OnReplicate(NHibernate.Event.ReplicateEvent @event); + System.Threading.Tasks.Task OnReplicateAsync(NHibernate.Event.ReplicateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.ISaveOrUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISaveOrUpdateEventListener + { + void OnSaveOrUpdate(NHibernate.Event.SaveOrUpdateEvent @event); + System.Threading.Tasks.Task OnSaveOrUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Event.InitializeCollectionEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InitializeCollectionEvent : NHibernate.Event.AbstractCollectionEvent + { + public InitializeCollectionEvent(NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.ListenerType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum ListenerType + { + Autoflush, + Create, + CreateOnFlush, + Delete, + DirtyCheck, + Evict, + Flush, + FlushEntity, + Load, + LoadCollection, + Lock, + Merge, + NotValidType, + PostCollectionRecreate, + PostCollectionRemove, + PostCollectionUpdate, + PostCommitDelete, + PostCommitInsert, + PostCommitUpdate, + PostDelete, + PostInsert, + PostLoad, + PostUpdate, + PreCollectionRecreate, + PreCollectionRemove, + PreCollectionUpdate, + PreDelete, + PreInsert, + PreLoad, + PreUpdate, + Refresh, + Replicate, + Save, + SaveUpdate, + Update, + } + + // Generated from `NHibernate.Event.LoadEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LoadEvent : NHibernate.Event.AbstractEvent + { + public static NHibernate.LockMode DefaultLockMode; + public string EntityClassName { get => throw null; set => throw null; } + public object EntityId { get => throw null; set => throw null; } + public object InstanceToLoad { get => throw null; set => throw null; } + public bool IsAssociationFetch { get => throw null; } + public LoadEvent(object entityId, string entityClassName, bool isAssociationFetch, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public LoadEvent(object entityId, string entityClassName, NHibernate.LockMode lockMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public LoadEvent(object entityId, object instanceToLoad, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + private LoadEvent(object entityId, string entityClassName, object instanceToLoad, NHibernate.LockMode lockMode, bool isAssociationFetch, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public NHibernate.LockMode LockMode { get => throw null; set => throw null; } + public object Result { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.LoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class LoadEventListener + { + public static NHibernate.Event.LoadType Get; + public static NHibernate.Event.LoadType ImmediateLoad; + public static NHibernate.Event.LoadType InternalLoadEager; + public static NHibernate.Event.LoadType InternalLoadLazy; + public static NHibernate.Event.LoadType InternalLoadNullable; + public static NHibernate.Event.LoadType Load; + public static NHibernate.Event.LoadType Reload; + } + + // Generated from `NHibernate.Event.LoadType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LoadType + { + public bool ExactPersister { get => throw null; } + public bool IsAllowNulls { get => throw null; } + public bool IsAllowProxyCreation { get => throw null; } + public bool IsCheckDeleted { get => throw null; } + public bool IsNakedEntityReturned { get => throw null; } + public string Name { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Event.LockEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LockEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public LockEvent(string entityName, object original, NHibernate.LockMode lockMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public LockEvent(object entity, NHibernate.LockMode lockMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public NHibernate.LockMode LockMode { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.MergeEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MergeEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public MergeEvent(string entityName, object original, object id, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public MergeEvent(string entityName, object original, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public MergeEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object Original { get => throw null; set => throw null; } + public object RequestedId { get => throw null; set => throw null; } + public object Result { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.PersistEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public PersistEvent(string entityName, object original, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public PersistEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.PostCollectionRecreateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostCollectionRecreateEvent : NHibernate.Event.AbstractCollectionEvent + { + public PostCollectionRecreateEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PostCollectionRemoveEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostCollectionRemoveEvent : NHibernate.Event.AbstractCollectionEvent + { + public PostCollectionRemoveEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source, object loadedOwner) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PostCollectionUpdateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostCollectionUpdateEvent : NHibernate.Event.AbstractCollectionEvent + { + public PostCollectionUpdateEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PostDeleteEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostDeleteEvent : NHibernate.Event.AbstractPostDatabaseOperationEvent + { + public object[] DeletedState { get => throw null; set => throw null; } + public PostDeleteEvent(object entity, object id, object[] deletedState, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + } + + // Generated from `NHibernate.Event.PostInsertEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostInsertEvent : NHibernate.Event.AbstractPostDatabaseOperationEvent + { + public PostInsertEvent(object entity, object id, object[] state, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public object[] State { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.PostLoadEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostLoadEvent : NHibernate.Event.AbstractEvent, NHibernate.Event.IPostDatabaseOperationEventArgs, NHibernate.Event.IDatabaseEventArgs + { + public object Entity { get => throw null; set => throw null; } + public object Id { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; set => throw null; } + public PostLoadEvent(NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.PostUpdateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PostUpdateEvent : NHibernate.Event.AbstractPostDatabaseOperationEvent + { + public object[] OldState { get => throw null; set => throw null; } + public PostUpdateEvent(object entity, object id, object[] state, object[] oldState, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public object[] State { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.PreCollectionRecreateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreCollectionRecreateEvent : NHibernate.Event.AbstractCollectionEvent + { + public PreCollectionRecreateEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PreCollectionRemoveEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreCollectionRemoveEvent : NHibernate.Event.AbstractCollectionEvent + { + public PreCollectionRemoveEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source, object loadedOwner) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PreCollectionUpdateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreCollectionUpdateEvent : NHibernate.Event.AbstractCollectionEvent + { + public PreCollectionUpdateEvent(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, NHibernate.Collection.IPersistentCollection collection, NHibernate.Event.IEventSource source) : base(default(NHibernate.Persister.Collection.ICollectionPersister), default(NHibernate.Collection.IPersistentCollection), default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.PreDeleteEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreDeleteEvent : NHibernate.Event.AbstractPreDatabaseOperationEvent + { + public object[] DeletedState { get => throw null; set => throw null; } + public PreDeleteEvent(object entity, object id, object[] deletedState, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + } + + // Generated from `NHibernate.Event.PreInsertEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreInsertEvent : NHibernate.Event.AbstractPreDatabaseOperationEvent + { + public PreInsertEvent(object entity, object id, object[] state, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public object[] State { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.PreLoadEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreLoadEvent : NHibernate.Event.AbstractEvent, NHibernate.Event.IPreDatabaseOperationEventArgs, NHibernate.Event.IDatabaseEventArgs + { + public object Entity { get => throw null; set => throw null; } + public object Id { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister Persister { get => throw null; set => throw null; } + public PreLoadEvent(NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public object[] State { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.PreUpdateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreUpdateEvent : NHibernate.Event.AbstractPreDatabaseOperationEvent + { + public object[] OldState { get => throw null; set => throw null; } + public PreUpdateEvent(object entity, object id, object[] state, object[] oldState, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource), default(object), default(object), default(NHibernate.Persister.Entity.IEntityPersister)) => throw null; + public object[] State { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.RefreshEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RefreshEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; } + public NHibernate.LockMode LockMode { get => throw null; } + public RefreshEvent(object entity, NHibernate.LockMode lockMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public RefreshEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.ReplicateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReplicateEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public ReplicateEvent(string entityName, object entity, NHibernate.ReplicationMode replicationMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public ReplicateEvent(object entity, NHibernate.ReplicationMode replicationMode, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public NHibernate.ReplicationMode ReplicationMode { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Event.SaveOrUpdateEvent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SaveOrUpdateEvent : NHibernate.Event.AbstractEvent + { + public object Entity { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public NHibernate.Engine.EntityEntry Entry { get => throw null; set => throw null; } + public object RequestedId { get => throw null; set => throw null; } + public object ResultEntity { get => throw null; set => throw null; } + public object ResultId { get => throw null; set => throw null; } + public SaveOrUpdateEvent(string entityName, object original, object id, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public SaveOrUpdateEvent(string entityName, object original, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + public SaveOrUpdateEvent(object entity, NHibernate.Event.IEventSource source) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + namespace Default + { + // Generated from `NHibernate.Event.Default.AbstractFlushingEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractFlushingEventListener + { + protected AbstractFlushingEventListener() => throw null; + protected virtual object Anything { get => throw null; } + protected virtual void CascadeOnFlush(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object key, object anything) => throw null; + protected virtual System.Threading.Tasks.Task CascadeOnFlushAsync(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object key, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual NHibernate.Engine.CascadingAction CascadingAction { get => throw null; } + protected virtual void FlushCollections(NHibernate.Event.IEventSource session) => throw null; + protected virtual System.Threading.Tasks.Task FlushCollectionsAsync(NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void FlushEntities(NHibernate.Event.FlushEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task FlushEntitiesAsync(NHibernate.Event.FlushEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void FlushEverythingToExecutions(NHibernate.Event.FlushEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task FlushEverythingToExecutionsAsync(NHibernate.Event.FlushEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void PerformExecutions(NHibernate.Event.IEventSource session) => throw null; + protected virtual System.Threading.Tasks.Task PerformExecutionsAsync(NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void PostFlush(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual void PrepareCollectionFlushes(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task PrepareCollectionFlushesAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void PrepareEntityFlushes(NHibernate.Event.IEventSource session) => throw null; + protected virtual System.Threading.Tasks.Task PrepareEntityFlushesAsync(NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.AbstractLockUpgradeEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AbstractLockUpgradeEventListener : NHibernate.Event.Default.AbstractReassociateEventListener + { + public AbstractLockUpgradeEventListener() => throw null; + protected virtual void UpgradeLock(object entity, NHibernate.Engine.EntityEntry entry, NHibernate.LockMode requestedLockMode, NHibernate.Engine.ISessionImplementor source) => throw null; + protected virtual System.Threading.Tasks.Task UpgradeLockAsync(object entity, NHibernate.Engine.EntityEntry entry, NHibernate.LockMode requestedLockMode, NHibernate.Engine.ISessionImplementor source, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.AbstractReassociateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AbstractReassociateEventListener + { + public AbstractReassociateEventListener() => throw null; + protected NHibernate.Engine.EntityEntry Reassociate(NHibernate.Event.AbstractEvent @event, object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected System.Threading.Tasks.Task ReassociateAsync(NHibernate.Event.AbstractEvent @event, object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.AbstractSaveEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractSaveEventListener : NHibernate.Event.Default.AbstractReassociateEventListener + { + protected AbstractSaveEventListener() => throw null; + protected virtual bool? AssumedUnsaved { get => throw null; } + protected abstract NHibernate.Engine.CascadingAction CascadeAction { get; } + protected virtual void CascadeAfterSave(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything) => throw null; + protected virtual System.Threading.Tasks.Task CascadeAfterSaveAsync(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void CascadeBeforeSave(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything) => throw null; + protected virtual System.Threading.Tasks.Task CascadeBeforeSaveAsync(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual NHibernate.Event.Default.EntityState GetEntityState(object entity, string entityName, NHibernate.Engine.EntityEntry entry, NHibernate.Engine.ISessionImplementor source) => throw null; + protected virtual System.Threading.Tasks.Task GetEntityStateAsync(object entity, string entityName, NHibernate.Engine.EntityEntry entry, NHibernate.Engine.ISessionImplementor source, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual string GetLoggableName(string entityName, object entity) => throw null; + protected virtual System.Collections.IDictionary GetMergeMap(object anything) => throw null; + protected virtual bool InvokeSaveLifecycle(object entity, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) => throw null; + protected virtual object PerformSave(object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister, bool useIdentityColumn, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess) => throw null; + protected virtual System.Threading.Tasks.Task PerformSaveAsync(object entity, object id, NHibernate.Persister.Entity.IEntityPersister persister, bool useIdentityColumn, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object PerformSaveOrReplicate(object entity, NHibernate.Engine.EntityKey key, NHibernate.Persister.Entity.IEntityPersister persister, bool useIdentityColumn, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess) => throw null; + protected virtual System.Threading.Tasks.Task PerformSaveOrReplicateAsync(object entity, NHibernate.Engine.EntityKey key, NHibernate.Persister.Entity.IEntityPersister persister, bool useIdentityColumn, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object SaveWithGeneratedId(object entity, string entityName, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess) => throw null; + protected virtual System.Threading.Tasks.Task SaveWithGeneratedIdAsync(object entity, string entityName, object anything, NHibernate.Event.IEventSource source, bool requiresImmediateIdAccess, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object SaveWithRequestedId(object entity, object requestedId, string entityName, object anything, NHibernate.Event.IEventSource source) => throw null; + protected virtual System.Threading.Tasks.Task SaveWithRequestedIdAsync(object entity, object requestedId, string entityName, object anything, NHibernate.Event.IEventSource source, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool SubstituteValuesIfNecessary(object entity, object id, object[] values, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor source) => throw null; + protected virtual System.Threading.Tasks.Task SubstituteValuesIfNecessaryAsync(object entity, object id, object[] values, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor source, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void Validate(object entity, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) => throw null; + protected virtual bool VersionIncrementDisabled { get => throw null; } + protected virtual bool VisitCollectionsBeforeSave(object entity, object id, object[] values, NHibernate.Type.IType[] types, NHibernate.Event.IEventSource source) => throw null; + protected virtual System.Threading.Tasks.Task VisitCollectionsBeforeSaveAsync(object entity, object id, object[] values, NHibernate.Type.IType[] types, NHibernate.Event.IEventSource source, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.AbstractVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractVisitor + { + public AbstractVisitor(NHibernate.Event.IEventSource session) => throw null; + public void ProcessEntityPropertyValues(object[] values, NHibernate.Type.IType[] types) => throw null; + public System.Threading.Tasks.Task ProcessEntityPropertyValuesAsync(object[] values, NHibernate.Type.IType[] types, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Event.IEventSource Session { get => throw null; } + } + + // Generated from `NHibernate.Event.Default.DefaultAutoFlushEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultAutoFlushEventListener : NHibernate.Event.Default.AbstractFlushingEventListener, NHibernate.Event.IAutoFlushEventListener + { + public DefaultAutoFlushEventListener() => throw null; + public virtual void OnAutoFlush(NHibernate.Event.AutoFlushEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnAutoFlushAsync(NHibernate.Event.AutoFlushEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultDeleteEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultDeleteEventListener : NHibernate.Event.IDeleteEventListener + { + protected virtual void CascadeAfterDelete(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object entity, System.Collections.Generic.ISet transientEntities) => throw null; + protected virtual System.Threading.Tasks.Task CascadeAfterDeleteAsync(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object entity, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void CascadeBeforeDelete(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object entity, NHibernate.Engine.EntityEntry entityEntry, System.Collections.Generic.ISet transientEntities) => throw null; + protected virtual System.Threading.Tasks.Task CascadeBeforeDeleteAsync(NHibernate.Event.IEventSource session, NHibernate.Persister.Entity.IEntityPersister persister, object entity, NHibernate.Engine.EntityEntry entityEntry, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + public DefaultDeleteEventListener() => throw null; + protected virtual void DeleteEntity(NHibernate.Event.IEventSource session, object entity, NHibernate.Engine.EntityEntry entityEntry, bool isCascadeDeleteEnabled, NHibernate.Persister.Entity.IEntityPersister persister, System.Collections.Generic.ISet transientEntities) => throw null; + protected virtual System.Threading.Tasks.Task DeleteEntityAsync(NHibernate.Event.IEventSource session, object entity, NHibernate.Engine.EntityEntry entityEntry, bool isCascadeDeleteEnabled, NHibernate.Persister.Entity.IEntityPersister persister, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void DeleteTransientEntity(NHibernate.Event.IEventSource session, object entity, bool cascadeDeleteEnabled, NHibernate.Persister.Entity.IEntityPersister persister, System.Collections.Generic.ISet transientEntities) => throw null; + protected virtual System.Threading.Tasks.Task DeleteTransientEntityAsync(NHibernate.Event.IEventSource session, object entity, bool cascadeDeleteEnabled, NHibernate.Persister.Entity.IEntityPersister persister, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool InvokeDeleteLifecycle(NHibernate.Event.IEventSource session, object entity, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public virtual void OnDelete(NHibernate.Event.DeleteEvent @event, System.Collections.Generic.ISet transientEntities) => throw null; + public virtual void OnDelete(NHibernate.Event.DeleteEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnDeleteAsync(NHibernate.Event.DeleteEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnDeleteAsync(NHibernate.Event.DeleteEvent @event, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void PerformDetachedEntityDeletionCheck(NHibernate.Event.DeleteEvent @event) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultDirtyCheckEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultDirtyCheckEventListener : NHibernate.Event.Default.AbstractFlushingEventListener, NHibernate.Event.IDirtyCheckEventListener + { + public DefaultDirtyCheckEventListener() => throw null; + public virtual void OnDirtyCheck(NHibernate.Event.DirtyCheckEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnDirtyCheckAsync(NHibernate.Event.DirtyCheckEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultEvictEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultEvictEventListener : NHibernate.Event.IEvictEventListener + { + public DefaultEvictEventListener() => throw null; + protected virtual void DoEvict(object obj, NHibernate.Engine.EntityKey key, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource session) => throw null; + protected virtual System.Threading.Tasks.Task DoEvictAsync(object obj, NHibernate.Engine.EntityKey key, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void OnEvict(NHibernate.Event.EvictEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnEvictAsync(NHibernate.Event.EvictEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultFlushEntityEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultFlushEntityEventListener : NHibernate.Event.IFlushEntityEventListener + { + public virtual void CheckId(object obj, NHibernate.Persister.Entity.IEntityPersister persister, object id) => throw null; + public DefaultFlushEntityEventListener() => throw null; + protected virtual void DirtyCheck(NHibernate.Event.FlushEntityEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task DirtyCheckAsync(NHibernate.Event.FlushEntityEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool HandleInterception(NHibernate.Event.FlushEntityEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task HandleInterceptionAsync(NHibernate.Event.FlushEntityEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool InvokeInterceptor(NHibernate.Engine.ISessionImplementor session, object entity, NHibernate.Engine.EntityEntry entry, object[] values, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected bool IsUpdateNecessary(NHibernate.Event.FlushEntityEvent @event) => throw null; + protected System.Threading.Tasks.Task IsUpdateNecessaryAsync(NHibernate.Event.FlushEntityEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void OnFlushEntity(NHibernate.Event.FlushEntityEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnFlushEntityAsync(NHibernate.Event.FlushEntityEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void Validate(object entity, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.Status status) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultFlushEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultFlushEventListener : NHibernate.Event.Default.AbstractFlushingEventListener, NHibernate.Event.IFlushEventListener + { + public DefaultFlushEventListener() => throw null; + public virtual void OnFlush(NHibernate.Event.FlushEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnFlushAsync(NHibernate.Event.FlushEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultInitializeCollectionEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultInitializeCollectionEventListener : NHibernate.Event.IInitializeCollectionEventListener + { + public DefaultInitializeCollectionEventListener() => throw null; + public virtual void OnInitializeCollection(NHibernate.Event.InitializeCollectionEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnInitializeCollectionAsync(NHibernate.Event.InitializeCollectionEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultLoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultLoadEventListener : NHibernate.Event.Default.AbstractLockUpgradeEventListener, NHibernate.Event.ILoadEventListener + { + public DefaultLoadEventListener() => throw null; + public static NHibernate.LockMode DefaultLockMode; + protected virtual object DoLoad(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task DoLoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(NHibernate.Engine.ISessionFactoryImplementor factory, string entityName) => throw null; + public static object InconsistentRTNClassMarker; + protected virtual object Load(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task LoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object LoadFromDatasource(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task LoadFromDatasourceAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object LoadFromSecondLevelCache(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task LoadFromSecondLevelCacheAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object LoadFromSessionCache(NHibernate.Event.LoadEvent @event, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task LoadFromSessionCacheAsync(NHibernate.Event.LoadEvent @event, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object LockAndLoad(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, NHibernate.Engine.ISessionImplementor source) => throw null; + protected virtual System.Threading.Tasks.Task LockAndLoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, NHibernate.Engine.ISessionImplementor source, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void OnLoad(NHibernate.Event.LoadEvent @event, NHibernate.Event.LoadType loadType) => throw null; + public virtual System.Threading.Tasks.Task OnLoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Event.LoadType loadType, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object ProxyOrLoad(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options) => throw null; + protected virtual System.Threading.Tasks.Task ProxyOrLoadAsync(NHibernate.Event.LoadEvent @event, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.EntityKey keyToLoad, NHibernate.Event.LoadType options, System.Threading.CancellationToken cancellationToken) => throw null; + public static object RemovedEntityMarker; + } + + // Generated from `NHibernate.Event.Default.DefaultLockEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultLockEventListener : NHibernate.Event.Default.AbstractLockUpgradeEventListener, NHibernate.Event.ILockEventListener + { + public DefaultLockEventListener() => throw null; + public virtual void OnLock(NHibernate.Event.LockEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnLockAsync(NHibernate.Event.LockEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultMergeEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultMergeEventListener : NHibernate.Event.Default.AbstractSaveEventListener, NHibernate.Event.IMergeEventListener + { + protected override bool? AssumedUnsaved { get => throw null; } + protected override NHibernate.Engine.CascadingAction CascadeAction { get => throw null; } + protected override void CascadeAfterSave(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything) => throw null; + protected override System.Threading.Tasks.Task CascadeAfterSaveAsync(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + protected override void CascadeBeforeSave(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything) => throw null; + protected override System.Threading.Tasks.Task CascadeBeforeSaveAsync(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, object anything, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void CascadeOnMerge(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, System.Collections.IDictionary copyCache) => throw null; + protected virtual System.Threading.Tasks.Task CascadeOnMergeAsync(NHibernate.Event.IEventSource source, NHibernate.Persister.Entity.IEntityPersister persister, object entity, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void CopyValues(NHibernate.Persister.Entity.IEntityPersister persister, object entity, object target, NHibernate.Engine.ISessionImplementor source, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection) => throw null; + protected virtual void CopyValues(NHibernate.Persister.Entity.IEntityPersister persister, object entity, object target, NHibernate.Engine.ISessionImplementor source, System.Collections.IDictionary copyCache) => throw null; + protected virtual System.Threading.Tasks.Task CopyValuesAsync(NHibernate.Persister.Entity.IEntityPersister persister, object entity, object target, NHibernate.Engine.ISessionImplementor source, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task CopyValuesAsync(NHibernate.Persister.Entity.IEntityPersister persister, object entity, object target, NHibernate.Engine.ISessionImplementor source, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken) => throw null; + public DefaultMergeEventListener() => throw null; + protected virtual void EntityIsDetached(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsDetachedAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void EntityIsPersistent(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsPersistentAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void EntityIsTransient(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsTransientAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Collections.IDictionary GetMergeMap(object anything) => throw null; + protected NHibernate.Event.Default.EventCache GetTransientCopyCache(NHibernate.Event.MergeEvent @event, NHibernate.Event.Default.EventCache copyCache) => throw null; + protected System.Threading.Tasks.Task GetTransientCopyCacheAsync(NHibernate.Event.MergeEvent @event, NHibernate.Event.Default.EventCache copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool InvokeUpdateLifecycle(object entity, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) => throw null; + public virtual void OnMerge(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copiedAlready) => throw null; + public virtual void OnMerge(NHibernate.Event.MergeEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnMergeAsync(NHibernate.Event.MergeEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnMergeAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + protected void RetryMergeTransientEntities(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary transientCopyCache, NHibernate.Event.Default.EventCache copyCache) => throw null; + protected System.Threading.Tasks.Task RetryMergeTransientEntitiesAsync(NHibernate.Event.MergeEvent @event, System.Collections.IDictionary transientCopyCache, NHibernate.Event.Default.EventCache copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultPersistEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultPersistEventListener : NHibernate.Event.Default.AbstractSaveEventListener, NHibernate.Event.IPersistEventListener + { + protected override bool? AssumedUnsaved { get => throw null; } + protected override NHibernate.Engine.CascadingAction CascadeAction { get => throw null; } + public DefaultPersistEventListener() => throw null; + protected virtual void EntityIsPersistent(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createCache) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsPersistentAsync(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createCache, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void EntityIsTransient(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createCache) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsTransientAsync(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createCache, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void OnPersist(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createdAlready) => throw null; + public virtual void OnPersist(NHibernate.Event.PersistEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnPersistAsync(NHibernate.Event.PersistEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnPersistAsync(NHibernate.Event.PersistEvent @event, System.Collections.IDictionary createdAlready, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultPersistOnFlushEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultPersistOnFlushEventListener : NHibernate.Event.Default.DefaultPersistEventListener + { + protected override NHibernate.Engine.CascadingAction CascadeAction { get => throw null; } + public DefaultPersistOnFlushEventListener() => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultPostLoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultPostLoadEventListener : NHibernate.Event.IPostLoadEventListener + { + public DefaultPostLoadEventListener() => throw null; + public virtual void OnPostLoad(NHibernate.Event.PostLoadEvent @event) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultPreLoadEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultPreLoadEventListener : NHibernate.Event.IPreLoadEventListener + { + public DefaultPreLoadEventListener() => throw null; + public virtual void OnPreLoad(NHibernate.Event.PreLoadEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnPreLoadAsync(NHibernate.Event.PreLoadEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultRefreshEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultRefreshEventListener : NHibernate.Event.IRefreshEventListener + { + public DefaultRefreshEventListener() => throw null; + public virtual void OnRefresh(NHibernate.Event.RefreshEvent @event, System.Collections.IDictionary refreshedAlready) => throw null; + public virtual void OnRefresh(NHibernate.Event.RefreshEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnRefreshAsync(NHibernate.Event.RefreshEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task OnRefreshAsync(NHibernate.Event.RefreshEvent @event, System.Collections.IDictionary refreshedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultReplicateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultReplicateEventListener : NHibernate.Event.Default.AbstractSaveEventListener, NHibernate.Event.IReplicateEventListener + { + protected override NHibernate.Engine.CascadingAction CascadeAction { get => throw null; } + public DefaultReplicateEventListener() => throw null; + public virtual void OnReplicate(NHibernate.Event.ReplicateEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnReplicateAsync(NHibernate.Event.ReplicateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool SubstituteValuesIfNecessary(object entity, object id, object[] values, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor source) => throw null; + protected override System.Threading.Tasks.Task SubstituteValuesIfNecessaryAsync(object entity, object id, object[] values, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Engine.ISessionImplementor source, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool VersionIncrementDisabled { get => throw null; } + protected override bool VisitCollectionsBeforeSave(object entity, object id, object[] values, NHibernate.Type.IType[] types, NHibernate.Event.IEventSource source) => throw null; + protected override System.Threading.Tasks.Task VisitCollectionsBeforeSaveAsync(object entity, object id, object[] values, NHibernate.Type.IType[] types, NHibernate.Event.IEventSource source, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultSaveEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultSaveEventListener : NHibernate.Event.Default.DefaultSaveOrUpdateEventListener + { + public DefaultSaveEventListener() => throw null; + protected override object PerformSaveOrUpdate(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected override System.Threading.Tasks.Task PerformSaveOrUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool ReassociateIfUninitializedProxy(object obj, NHibernate.Engine.ISessionImplementor source) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultSaveOrUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultSaveOrUpdateEventListener : NHibernate.Event.Default.AbstractSaveEventListener, NHibernate.Event.ISaveOrUpdateEventListener + { + protected override NHibernate.Engine.CascadingAction CascadeAction { get => throw null; } + public DefaultSaveOrUpdateEventListener() => throw null; + protected virtual void EntityIsDetached(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsDetachedAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object EntityIsPersistent(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected virtual object EntityIsTransient(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task EntityIsTransientAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object GetUpdateId(object entity, NHibernate.Persister.Entity.IEntityPersister persister, object requestedId) => throw null; + protected virtual bool InvokeUpdateLifecycle(object entity, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Event.IEventSource source) => throw null; + public virtual void OnSaveOrUpdate(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + public virtual System.Threading.Tasks.Task OnSaveOrUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object PerformSaveOrUpdate(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task PerformSaveOrUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void PerformUpdate(NHibernate.Event.SaveOrUpdateEvent @event, object entity, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected virtual System.Threading.Tasks.Task PerformUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, object entity, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool ReassociateIfUninitializedProxy(object obj, NHibernate.Engine.ISessionImplementor source) => throw null; + protected virtual object SaveWithGeneratedOrRequestedId(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected virtual System.Threading.Tasks.Task SaveWithGeneratedOrRequestedIdAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DefaultUpdateEventListener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultUpdateEventListener : NHibernate.Event.Default.DefaultSaveOrUpdateEventListener + { + public DefaultUpdateEventListener() => throw null; + protected override object GetUpdateId(object entity, NHibernate.Persister.Entity.IEntityPersister persister, object requestedId) => throw null; + protected override object PerformSaveOrUpdate(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected override System.Threading.Tasks.Task PerformSaveOrUpdateAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + protected override object SaveWithGeneratedOrRequestedId(NHibernate.Event.SaveOrUpdateEvent @event) => throw null; + protected override System.Threading.Tasks.Task SaveWithGeneratedOrRequestedIdAsync(NHibernate.Event.SaveOrUpdateEvent @event, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Event.Default.DirtyCollectionSearchVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DirtyCollectionSearchVisitor : NHibernate.Event.Default.AbstractVisitor + { + public DirtyCollectionSearchVisitor(NHibernate.Event.IEventSource session, bool[] propertyVersionability) : base(default(NHibernate.Event.IEventSource)) => throw null; + public bool WasDirtyCollectionFound { get => throw null; } + } + + // Generated from `NHibernate.Event.Default.EntityState` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum EntityState + { + Deleted, + Detached, + Persistent, + Transient, + Undefined, + } + + // Generated from `NHibernate.Event.Default.EventCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EventCache : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object value) => throw null; + public void Add(object entity, object copy, bool isOperatedOn) => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public EventCache() => throw null; + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Collections.IDictionary InvertMap() => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsOperatedOn(object entity) => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + public void Remove(object key) => throw null; + public void SetOperatedOn(object entity, bool isOperatedOn) => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Event.Default.EvictVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EvictVisitor : NHibernate.Event.Default.AbstractVisitor + { + public virtual void EvictCollection(object value, NHibernate.Type.CollectionType type) => throw null; + public EvictVisitor(NHibernate.Event.IEventSource session) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.Default.FlushVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FlushVisitor : NHibernate.Event.Default.AbstractVisitor + { + public FlushVisitor(NHibernate.Event.IEventSource session, object owner) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.Default.OnLockVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OnLockVisitor : NHibernate.Event.Default.ReattachVisitor + { + public OnLockVisitor(NHibernate.Event.IEventSource session, object ownerIdentifier, object owner) : base(default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.Default.OnReplicateVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OnReplicateVisitor : NHibernate.Event.Default.ReattachVisitor + { + public OnReplicateVisitor(NHibernate.Event.IEventSource session, object ownerIdentifier, object owner, bool isUpdate) : base(default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.Default.OnUpdateVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OnUpdateVisitor : NHibernate.Event.Default.ReattachVisitor + { + public OnUpdateVisitor(NHibernate.Event.IEventSource session, object ownerIdentifier, object owner) : base(default(NHibernate.Event.IEventSource), default(object), default(object)) => throw null; + } + + // Generated from `NHibernate.Event.Default.ProxyVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ProxyVisitor : NHibernate.Event.Default.AbstractVisitor + { + protected internal static bool IsOwnerUnchanged(NHibernate.Collection.IPersistentCollection snapshot, NHibernate.Persister.Collection.ICollectionPersister persister, object id) => throw null; + public ProxyVisitor(NHibernate.Event.IEventSource session) : base(default(NHibernate.Event.IEventSource)) => throw null; + protected internal void ReattachCollection(NHibernate.Collection.IPersistentCollection collection, NHibernate.Type.CollectionType type) => throw null; + } + + // Generated from `NHibernate.Event.Default.ReattachVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ReattachVisitor : NHibernate.Event.Default.ProxyVisitor + { + public object Owner { get => throw null; } + public object OwnerIdentifier { get => throw null; } + protected ReattachVisitor(NHibernate.Event.IEventSource session, object ownerIdentifier, object owner) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + // Generated from `NHibernate.Event.Default.WrapVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WrapVisitor : NHibernate.Event.Default.ProxyVisitor + { + public WrapVisitor(NHibernate.Event.IEventSource session) : base(default(NHibernate.Event.IEventSource)) => throw null; + } + + } + } + namespace Exceptions + { + // Generated from `NHibernate.Exceptions.ADOConnectionException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ADOConnectionException : NHibernate.ADOException + { + public ADOConnectionException(string message, System.Exception innerException, string sql) => throw null; + public ADOConnectionException(string message, System.Exception innerException) => throw null; + public ADOConnectionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.ADOExceptionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ADOExceptionHelper + { + public static System.Exception Convert(NHibernate.Exceptions.ISQLExceptionConverter converter, System.Exception sqle, string message, NHibernate.SqlCommand.SqlString sql, object[] parameterValues, System.Collections.Generic.IDictionary namedParameters) => throw null; + public static System.Exception Convert(NHibernate.Exceptions.ISQLExceptionConverter converter, System.Exception sqlException, string message, NHibernate.SqlCommand.SqlString sql) => throw null; + public static System.Exception Convert(NHibernate.Exceptions.ISQLExceptionConverter converter, System.Exception sqlException, string message) => throw null; + public static System.Exception Convert(NHibernate.Exceptions.ISQLExceptionConverter converter, NHibernate.Exceptions.AdoExceptionContextInfo exceptionContextInfo) => throw null; + public static string ExtendMessage(string message, string sql, object[] parameterValues, System.Collections.Generic.IDictionary namedParameters) => throw null; + public static System.Data.Common.DbException ExtractDbException(System.Exception sqlException) => throw null; + public const string SQLNotAvailable = default; + public static string TryGetActualSqlQuery(System.Exception sqle, string sql) => throw null; + public static NHibernate.SqlCommand.SqlString TryGetActualSqlQuery(System.Exception sqle, NHibernate.SqlCommand.SqlString sql) => throw null; + } + + // Generated from `NHibernate.Exceptions.AdoExceptionContextInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AdoExceptionContextInfo + { + public AdoExceptionContextInfo() => throw null; + public object EntityId { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public string Message { get => throw null; set => throw null; } + public string Sql { get => throw null; set => throw null; } + public System.Exception SqlException { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Exceptions.AggregateHibernateException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AggregateHibernateException : NHibernate.HibernateException + { + public AggregateHibernateException(string message, params System.Exception[] innerExceptions) => throw null; + public AggregateHibernateException(string message, System.Collections.Generic.IEnumerable innerExceptions) => throw null; + public AggregateHibernateException(params System.Exception[] innerExceptions) => throw null; + public AggregateHibernateException(System.Collections.Generic.IEnumerable innerExceptions) => throw null; + protected AggregateHibernateException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection InnerExceptions { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Exceptions.ConstraintViolationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConstraintViolationException : NHibernate.ADOException + { + public string ConstraintName { get => throw null; } + public ConstraintViolationException(string message, System.Exception innerException, string sql, string constraintName) => throw null; + public ConstraintViolationException(string message, System.Exception innerException, string constraintName) => throw null; + public ConstraintViolationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.DataException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DataException : NHibernate.ADOException + { + public DataException(string message, System.Exception innerException, string sql) => throw null; + public DataException(string message, System.Exception innerException) => throw null; + public DataException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.GenericADOException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericADOException : NHibernate.ADOException + { + public GenericADOException(string message, System.Exception innerException, string sql) => throw null; + public GenericADOException(string message, System.Exception innerException) => throw null; + public GenericADOException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public GenericADOException() => throw null; + } + + // Generated from `NHibernate.Exceptions.IConfigurable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConfigurable + { + void Configure(System.Collections.Generic.IDictionary properties); + } + + // Generated from `NHibernate.Exceptions.ISQLExceptionConverter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISQLExceptionConverter + { + System.Exception Convert(NHibernate.Exceptions.AdoExceptionContextInfo adoExceptionContextInfo); + } + + // Generated from `NHibernate.Exceptions.IViolatedConstraintNameExtracter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IViolatedConstraintNameExtracter + { + string ExtractConstraintName(System.Data.Common.DbException sqle); + } + + // Generated from `NHibernate.Exceptions.LockAcquisitionException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LockAcquisitionException : NHibernate.ADOException + { + public LockAcquisitionException(string message, System.Exception innerException, string sql) => throw null; + public LockAcquisitionException(string message, System.Exception innerException) => throw null; + public LockAcquisitionException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.NoOpViolatedConstraintNameExtracter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoOpViolatedConstraintNameExtracter : NHibernate.Exceptions.IViolatedConstraintNameExtracter + { + public virtual string ExtractConstraintName(System.Data.Common.DbException sqle) => throw null; + public NoOpViolatedConstraintNameExtracter() => throw null; + } + + // Generated from `NHibernate.Exceptions.SQLExceptionConverterFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SQLExceptionConverterFactory + { + public static NHibernate.Exceptions.ISQLExceptionConverter BuildMinimalSQLExceptionConverter() => throw null; + public static NHibernate.Exceptions.ISQLExceptionConverter BuildSQLExceptionConverter(NHibernate.Dialect.Dialect dialect, System.Collections.Generic.IDictionary properties) => throw null; + } + + // Generated from `NHibernate.Exceptions.SQLGrammarException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLGrammarException : NHibernate.ADOException + { + public SQLGrammarException(string message, System.Exception innerException, string sql) => throw null; + public SQLGrammarException(string message, System.Exception innerException) => throw null; + public SQLGrammarException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.SQLStateConverter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLStateConverter : NHibernate.Exceptions.ISQLExceptionConverter + { + public System.Exception Convert(NHibernate.Exceptions.AdoExceptionContextInfo exceptionInfo) => throw null; + public static NHibernate.ADOException HandledNonSpecificException(System.Exception sqlException, string message, string sql) => throw null; + public SQLStateConverter(NHibernate.Exceptions.IViolatedConstraintNameExtracter extracter) => throw null; + } + + // Generated from `NHibernate.Exceptions.SqlParseException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlParseException : System.Exception + { + public SqlParseException(string message) => throw null; + protected SqlParseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Exceptions.SqlStateExtracter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SqlStateExtracter + { + public int ExtractErrorCode(System.Data.Common.DbException sqle) => throw null; + public abstract int ExtractSingleErrorCode(System.Data.Common.DbException sqle); + public abstract string ExtractSingleSqlState(System.Data.Common.DbException sqle); + public string ExtractSqlState(System.Data.Common.DbException sqle) => throw null; + protected SqlStateExtracter() => throw null; + } + + // Generated from `NHibernate.Exceptions.TemplatedViolatedConstraintNameExtracter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class TemplatedViolatedConstraintNameExtracter : NHibernate.Exceptions.IViolatedConstraintNameExtracter + { + public abstract string ExtractConstraintName(System.Data.Common.DbException sqle); + protected string ExtractUsingTemplate(string templateStart, string templateEnd, string message) => throw null; + protected TemplatedViolatedConstraintNameExtracter() => throw null; + } + + } + namespace Hql + { + // Generated from `NHibernate.Hql.CollectionSubqueryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionSubqueryFactory + { + public CollectionSubqueryFactory() => throw null; + public static string CreateCollectionSubquery(NHibernate.Engine.JoinSequence joinSequence, System.Collections.Generic.IDictionary enabledFilters, string[] columns) => throw null; + } + + // Generated from `NHibernate.Hql.HolderInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HolderInstantiator + { + public static NHibernate.Hql.HolderInstantiator CreateClassicHolderInstantiator(System.Reflection.ConstructorInfo constructor, NHibernate.Transform.IResultTransformer transformer) => throw null; + public static NHibernate.Transform.IResultTransformer CreateSelectNewTransformer(System.Reflection.ConstructorInfo constructor, bool returnMaps, bool returnLists) => throw null; + public static NHibernate.Hql.HolderInstantiator GetHolderInstantiator(NHibernate.Transform.IResultTransformer selectNewTransformer, NHibernate.Transform.IResultTransformer customTransformer, string[] queryReturnAliases) => throw null; + public HolderInstantiator(NHibernate.Transform.IResultTransformer transformer, string[] queryReturnAliases) => throw null; + public object Instantiate(object[] row) => throw null; + public bool IsRequired { get => throw null; } + public static NHibernate.Hql.HolderInstantiator NoopInstantiator; + public string[] QueryReturnAliases { get => throw null; } + public static NHibernate.Transform.IResultTransformer ResolveClassicResultTransformer(System.Reflection.ConstructorInfo constructor, NHibernate.Transform.IResultTransformer transformer) => throw null; + public static NHibernate.Transform.IResultTransformer ResolveResultTransformer(NHibernate.Transform.IResultTransformer selectNewTransformer, NHibernate.Transform.IResultTransformer customTransformer) => throw null; + public NHibernate.Transform.IResultTransformer ResultTransformer { get => throw null; } + } + + // Generated from `NHibernate.Hql.IFilterTranslator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFilterTranslator : NHibernate.Hql.IQueryTranslator + { + void Compile(string collectionRole, System.Collections.Generic.IDictionary replacements, bool shallow); + } + + // Generated from `NHibernate.Hql.IQueryTranslator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryTranslator + { + NHibernate.Type.IType[] ActualReturnTypes { get; } + NHibernate.Engine.Query.ParameterMetadata BuildParameterMetadata(); + System.Collections.Generic.IList CollectSqlStrings { get; } + void Compile(System.Collections.Generic.IDictionary replacements, bool shallow); + bool ContainsCollectionFetches { get; } + System.Collections.Generic.IDictionary EnabledFilters { get; } + int ExecuteUpdate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + string[][] GetColumnNames(); + System.Collections.IEnumerable GetEnumerable(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session); + System.Threading.Tasks.Task GetEnumerableAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken); + bool IsManipulationStatement { get; } + System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters); + System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + NHibernate.Loader.Loader Loader { get; } + System.Collections.Generic.ISet QuerySpaces { get; } + string QueryString { get; } + string[] ReturnAliases { get; } + NHibernate.Type.IType[] ReturnTypes { get; } + string SQLString { get; } + } + + // Generated from `NHibernate.Hql.IQueryTranslatorFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryTranslatorFactory + { + NHibernate.Hql.IQueryTranslator[] CreateQueryTranslators(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary filters, NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.Hql.NameGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NameGenerator + { + public static string[][] GenerateColumnNames(NHibernate.Type.IType[] types, NHibernate.Engine.ISessionFactoryImplementor f) => throw null; + public NameGenerator() => throw null; + public static string ScalarName(int x, int y) => throw null; + } + + // Generated from `NHibernate.Hql.ParserHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ParserHelper + { + public const string EntityClass = default; + public const string HqlSeparators = default; + public const string HqlVariablePrefix = default; + public static bool IsWhitespace(string str) => throw null; + public const string Whitespace = default; + } + + // Generated from `NHibernate.Hql.QueryExecutionRequestException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryExecutionRequestException : NHibernate.QueryException + { + public QueryExecutionRequestException(string message, string queryString) => throw null; + protected QueryExecutionRequestException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Hql.QuerySplitter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySplitter + { + public static string[] ConcreteQueries(string query, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public QuerySplitter() => throw null; + } + + // Generated from `NHibernate.Hql.StringQueryExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringQueryExpression : NHibernate.IQueryExpression + { + public string Key { get => throw null; } + public System.Collections.Generic.IList ParameterDescriptors { get => throw null; set => throw null; } + public StringQueryExpression(string queryString) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Translate(NHibernate.Engine.ISessionFactoryImplementor factory, bool filter) => throw null; + public System.Type Type { get => throw null; } + } + + namespace Ast + { + // Generated from `NHibernate.Hql.Ast.HqlAdd` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAdd : NHibernate.Hql.Ast.HqlExpression + { + public HqlAdd(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlAlias` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAlias : NHibernate.Hql.Ast.HqlExpression + { + public HqlAlias(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlAll` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAll : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlAll(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlAny` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAny : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlAny(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlAs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAs : NHibernate.Hql.Ast.HqlExpression + { + public HqlAs(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, System.Type type) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlAverage` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlAverage : NHibernate.Hql.Ast.HqlExpression + { + public HqlAverage(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBitwiseAnd` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBitwiseAnd : NHibernate.Hql.Ast.HqlExpression + { + public HqlBitwiseAnd(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBitwiseNot` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBitwiseNot : NHibernate.Hql.Ast.HqlExpression + { + public HqlBitwiseNot(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBitwiseOr` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBitwiseOr : NHibernate.Hql.Ast.HqlExpression + { + public HqlBitwiseOr(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanAnd` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBooleanAnd : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlBooleanAnd(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlBooleanExpression lhs, NHibernate.Hql.Ast.HqlBooleanExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanDot` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBooleanDot : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlBooleanDot(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlDot dot) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HqlBooleanExpression : NHibernate.Hql.Ast.HqlExpression + { + protected HqlBooleanExpression(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + protected HqlBooleanExpression(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanMethodCall` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBooleanMethodCall : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlBooleanMethodCall(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string methodName, System.Collections.Generic.IEnumerable parameters) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanNot` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBooleanNot : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlBooleanNot(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlBooleanExpression operand) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlBooleanOr` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlBooleanOr : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlBooleanOr(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlBooleanExpression lhs, NHibernate.Hql.Ast.HqlBooleanExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCase : NHibernate.Hql.Ast.HqlExpression + { + public HqlCase(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlWhen[] whenClauses, NHibernate.Hql.Ast.HqlExpression ifFalse) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCast` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCast : NHibernate.Hql.Ast.HqlExpression + { + public HqlCast(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, System.Type type) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlClass : NHibernate.Hql.Ast.HqlExpression + { + public HqlClass(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCoalesce` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCoalesce : NHibernate.Hql.Ast.HqlExpression + { + public HqlCoalesce(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlConcat` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlConcat : NHibernate.Hql.Ast.HqlExpression + { + public HqlConcat(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlExpression[] args) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlConstant : NHibernate.Hql.Ast.HqlExpression + { + public HqlConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, int type, string value) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCount` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCount : NHibernate.Hql.Ast.HqlExpression + { + public HqlCount(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression child) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlCount(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCountBig` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCountBig : NHibernate.Hql.Ast.HqlExpression + { + public HqlCountBig(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression child) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlCountBig(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCross` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCross : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlCross(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlCrossJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlCrossJoin : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlCrossJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDecimalConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDecimalConstant : NHibernate.Hql.Ast.HqlConstant + { + public HqlDecimalConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string s) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDelete` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDelete : NHibernate.Hql.Ast.HqlStatement + { + internal HqlDelete(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDictionaryIndex` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDictionaryIndex : NHibernate.Hql.Ast.HqlIndex + { + public HqlDictionaryIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression dictionary, NHibernate.Hql.Ast.HqlExpression index) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(NHibernate.Hql.Ast.HqlExpression), default(NHibernate.Hql.Ast.HqlExpression)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDirection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum HqlDirection + { + Ascending, + Descending, + } + + // Generated from `NHibernate.Hql.Ast.HqlDirectionAscending` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDirectionAscending : NHibernate.Hql.Ast.HqlDirectionStatement + { + public HqlDirectionAscending(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDirectionDescending` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDirectionDescending : NHibernate.Hql.Ast.HqlDirectionStatement + { + public HqlDirectionDescending(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDirectionStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDirectionStatement : NHibernate.Hql.Ast.HqlStatement + { + public HqlDirectionStatement(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDistinct` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDistinct : NHibernate.Hql.Ast.HqlStatement + { + public HqlDistinct(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDivide` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDivide : NHibernate.Hql.Ast.HqlExpression + { + public HqlDivide(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDot` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDot : NHibernate.Hql.Ast.HqlExpression + { + public HqlDot(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlDoubleConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlDoubleConstant : NHibernate.Hql.Ast.HqlConstant + { + public HqlDoubleConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string s) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlElements` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlElements : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlElements(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlElse` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlElse : NHibernate.Hql.Ast.HqlStatement + { + public HqlElse(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression ifFalse) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlEquality` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlEquality : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlEquality(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlEscape` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlEscape : NHibernate.Hql.Ast.HqlStatement + { + public HqlEscape(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlConstant escapeCharacter) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlExists` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlExists : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlExists(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlQuery query) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HqlExpression : NHibernate.Hql.Ast.HqlTreeNode + { + protected HqlExpression(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + protected HqlExpression(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlExpressionList` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlExpressionList : NHibernate.Hql.Ast.HqlStatement + { + public HqlExpressionList(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlExpression[] expressions) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlExpressionList(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable expressions) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlExpressionSubTreeHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlExpressionSubTreeHolder : NHibernate.Hql.Ast.HqlExpression + { + public HqlExpressionSubTreeHolder(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlExpressionSubTreeHolder(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlFalse` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlFalse : NHibernate.Hql.Ast.HqlConstant + { + public HqlFalse(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlFetch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlFetch : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlFetch(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlFetchJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlFetchJoin : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlFetchJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlFloatConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlFloatConstant : NHibernate.Hql.Ast.HqlConstant + { + public HqlFloatConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string s) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlFrom` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlFrom : NHibernate.Hql.Ast.HqlStatement + { + internal HqlFrom(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlGreaterThan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlGreaterThan : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlGreaterThan(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlGreaterThanOrEqual` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlGreaterThanOrEqual : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlGreaterThanOrEqual(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlGroupBy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlGroupBy : NHibernate.Hql.Ast.HqlStatement + { + public HqlGroupBy(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlExpression[] expressions) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlHaving` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlHaving : NHibernate.Hql.Ast.HqlStatement + { + public HqlHaving(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIdent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIdent : NHibernate.Hql.Ast.HqlExpression + { + internal HqlIdent(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string ident) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + internal HqlIdent(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Type type) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIn : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlIn(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression itemExpression, NHibernate.Hql.Ast.HqlTreeNode source) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInList` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInList : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlInList(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlTreeNode source) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIndex` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIndex : NHibernate.Hql.Ast.HqlExpression + { + public HqlIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression collection, NHibernate.Hql.Ast.HqlExpression index) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIndices` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIndices : NHibernate.Hql.Ast.HqlExpression + { + public HqlIndices(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression dictionary) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInequality` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInequality : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlInequality(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInner` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInner : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlInner(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInnerJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInnerJoin : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlInnerJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInsert` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInsert : NHibernate.Hql.Ast.HqlStatement + { + internal HqlInsert(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIntegerConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIntegerConstant : NHibernate.Hql.Ast.HqlConstant + { + public HqlIntegerConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string s) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlInto` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlInto : NHibernate.Hql.Ast.HqlStatement + { + public HqlInto(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIsNotNull` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIsNotNull : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlIsNotNull(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlIsNull` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlIsNull : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlIsNull(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlJoin : NHibernate.Hql.Ast.HqlStatement + { + public HqlJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLeft` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLeft : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlLeft(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLeftFetchJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLeftFetchJoin : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlLeftFetchJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLeftJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLeftJoin : NHibernate.Hql.Ast.HqlTreeNode + { + public HqlLeftJoin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLessThan` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLessThan : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlLessThan(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLessThanOrEqual` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLessThanOrEqual : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlLessThanOrEqual(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlLike` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLike : NHibernate.Hql.Ast.HqlBooleanExpression + { + public HqlLike(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs, NHibernate.Hql.Ast.HqlConstant escapeCharacter) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlLike(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlMax` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlMax : NHibernate.Hql.Ast.HqlExpression + { + public HqlMax(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlMethodCall` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlMethodCall : NHibernate.Hql.Ast.HqlExpression + { + public HqlMethodCall(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string methodName, System.Collections.Generic.IEnumerable parameters) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlMin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlMin : NHibernate.Hql.Ast.HqlExpression + { + public HqlMin(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlMultiplty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlMultiplty : NHibernate.Hql.Ast.HqlExpression + { + public HqlMultiplty(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlNegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlNegate : NHibernate.Hql.Ast.HqlExpression + { + public HqlNegate(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlNull` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlNull : NHibernate.Hql.Ast.HqlConstant + { + public HqlNull(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlOrderBy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlOrderBy : NHibernate.Hql.Ast.HqlStatement + { + public HqlOrderBy(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlParameter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlParameter : NHibernate.Hql.Ast.HqlExpression + { + public HqlParameter(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string name) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlQuery : NHibernate.Hql.Ast.HqlExpression + { + internal HqlQuery(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlStatement[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlRange` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlRange : NHibernate.Hql.Ast.HqlStatement + { + internal HqlRange(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlRowStar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlRowStar : NHibernate.Hql.Ast.HqlStatement + { + public HqlRowStar(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSelect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSelect : NHibernate.Hql.Ast.HqlStatement + { + public HqlSelect(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlExpression[] expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSelectFrom` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSelectFrom : NHibernate.Hql.Ast.HqlStatement + { + internal HqlSelectFrom(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSet : NHibernate.Hql.Ast.HqlStatement + { + public HqlSet(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlSet(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSkip` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSkip : NHibernate.Hql.Ast.HqlStatement + { + public HqlSkip(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression parameter) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlStar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlStar : NHibernate.Hql.Ast.HqlExpression + { + public HqlStar(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class HqlStatement : NHibernate.Hql.Ast.HqlTreeNode + { + protected HqlStatement(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + protected HqlStatement(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlStringConstant` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlStringConstant : NHibernate.Hql.Ast.HqlConstant + { + public HqlStringConstant(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, string s) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSubtract` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSubtract : NHibernate.Hql.Ast.HqlExpression + { + public HqlSubtract(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlSum` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSum : NHibernate.Hql.Ast.HqlExpression + { + public HqlSum(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + public HqlSum(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTake` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlTake : NHibernate.Hql.Ast.HqlStatement + { + public HqlTake(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression parameter) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTransparentCast` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlTransparentCast : NHibernate.Hql.Ast.HqlExpression + { + public HqlTransparentCast(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression, System.Type type) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTreeBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlTreeBuilder + { + public NHibernate.Hql.Ast.HqlAdd Add(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlAlias Alias(string alias) => throw null; + public NHibernate.Hql.Ast.HqlAll All() => throw null; + public NHibernate.Hql.Ast.HqlAny Any() => throw null; + public NHibernate.Hql.Ast.HqlDirectionAscending Ascending() => throw null; + public NHibernate.Hql.Ast.HqlAverage Average(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlBitwiseAnd BitwiseAnd(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlBitwiseNot BitwiseNot() => throw null; + public NHibernate.Hql.Ast.HqlBitwiseOr BitwiseOr(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlBooleanAnd BooleanAnd(NHibernate.Hql.Ast.HqlBooleanExpression lhs, NHibernate.Hql.Ast.HqlBooleanExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlBooleanMethodCall BooleanMethodCall(string methodName, System.Collections.Generic.IEnumerable parameters) => throw null; + public NHibernate.Hql.Ast.HqlBooleanNot BooleanNot(NHibernate.Hql.Ast.HqlBooleanExpression operand) => throw null; + public NHibernate.Hql.Ast.HqlBooleanOr BooleanOr(NHibernate.Hql.Ast.HqlBooleanExpression lhs, NHibernate.Hql.Ast.HqlBooleanExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlCase Case(NHibernate.Hql.Ast.HqlWhen[] whenClauses, NHibernate.Hql.Ast.HqlExpression ifFalse) => throw null; + public NHibernate.Hql.Ast.HqlCase Case(NHibernate.Hql.Ast.HqlWhen[] whenClauses) => throw null; + public NHibernate.Hql.Ast.HqlCast Cast(NHibernate.Hql.Ast.HqlExpression expression, System.Type type) => throw null; + public NHibernate.Hql.Ast.HqlClass Class() => throw null; + public NHibernate.Hql.Ast.HqlTreeNode Coalesce(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlConcat Concat(params NHibernate.Hql.Ast.HqlExpression[] args) => throw null; + public NHibernate.Hql.Ast.HqlConstant Constant(object value) => throw null; + public NHibernate.Hql.Ast.HqlCount Count(NHibernate.Hql.Ast.HqlExpression child) => throw null; + public NHibernate.Hql.Ast.HqlCount Count() => throw null; + public NHibernate.Hql.Ast.HqlCountBig CountBig(NHibernate.Hql.Ast.HqlExpression child) => throw null; + public NHibernate.Hql.Ast.HqlCrossJoin CrossJoin(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlDelete Delete(NHibernate.Hql.Ast.HqlFrom from) => throw null; + public NHibernate.Hql.Ast.HqlDirectionDescending Descending() => throw null; + public NHibernate.Hql.Ast.HqlTreeNode DictionaryItem(NHibernate.Hql.Ast.HqlExpression dictionary, NHibernate.Hql.Ast.HqlExpression index) => throw null; + public NHibernate.Hql.Ast.HqlDistinct Distinct() => throw null; + public NHibernate.Hql.Ast.HqlDivide Divide(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlDot Dot(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlElements Elements() => throw null; + public NHibernate.Hql.Ast.HqlElse Else(NHibernate.Hql.Ast.HqlExpression ifFalse) => throw null; + public NHibernate.Hql.Ast.HqlEquality Equality(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlExists Exists(NHibernate.Hql.Ast.HqlQuery query) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode ExpressionList(System.Collections.Generic.IEnumerable expressions) => throw null; + public NHibernate.Hql.Ast.HqlExpressionSubTreeHolder ExpressionSubTreeHolder(params NHibernate.Hql.Ast.HqlTreeNode[] children) => throw null; + public NHibernate.Hql.Ast.HqlExpressionSubTreeHolder ExpressionSubTreeHolder(System.Collections.Generic.IEnumerable children) => throw null; + public NHibernate.Hql.Ast.HqlFalse False() => throw null; + public NHibernate.Hql.Ast.HqlFetch Fetch() => throw null; + public NHibernate.Hql.Ast.HqlFetchJoin FetchJoin(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlFrom From(NHibernate.Hql.Ast.HqlRange range, params NHibernate.Hql.Ast.HqlJoin[] joins) => throw null; + public NHibernate.Hql.Ast.HqlFrom From(NHibernate.Hql.Ast.HqlRange range, System.Collections.Generic.IEnumerable joins) => throw null; + public NHibernate.Hql.Ast.HqlFrom From(NHibernate.Hql.Ast.HqlRange range) => throw null; + public NHibernate.Hql.Ast.HqlFrom From() => throw null; + public NHibernate.Hql.Ast.HqlGreaterThan GreaterThan(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlGreaterThanOrEqual GreaterThanOrEqual(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlGroupBy GroupBy(params NHibernate.Hql.Ast.HqlExpression[] expressions) => throw null; + public NHibernate.Hql.Ast.HqlHaving Having(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public HqlTreeBuilder() => throw null; + public NHibernate.Hql.Ast.HqlIdent Ident(string ident) => throw null; + public NHibernate.Hql.Ast.HqlIdent Ident(System.Type type) => throw null; + public NHibernate.Hql.Ast.HqlIn In(NHibernate.Hql.Ast.HqlExpression itemExpression, NHibernate.Hql.Ast.HqlTreeNode source) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode Index(NHibernate.Hql.Ast.HqlExpression collection, NHibernate.Hql.Ast.HqlExpression index) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode Indices(NHibernate.Hql.Ast.HqlExpression dictionary) => throw null; + public NHibernate.Hql.Ast.HqlInequality Inequality(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlInnerJoin InnerJoin(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlInsert Insert(NHibernate.Hql.Ast.HqlInto into, NHibernate.Hql.Ast.HqlQuery query) => throw null; + public NHibernate.Hql.Ast.HqlInto Into() => throw null; + public NHibernate.Hql.Ast.HqlIsNotNull IsNotNull(NHibernate.Hql.Ast.HqlExpression lhs) => throw null; + public NHibernate.Hql.Ast.HqlIsNull IsNull(NHibernate.Hql.Ast.HqlExpression lhs) => throw null; + public NHibernate.Hql.Ast.HqlJoin Join(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlLeftFetchJoin LeftFetchJoin(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlLeftJoin LeftJoin(NHibernate.Hql.Ast.HqlExpression expression, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlLessThan LessThan(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlLessThanOrEqual LessThanOrEqual(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlLike Like(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs, NHibernate.Hql.Ast.HqlConstant escapeCharacter) => throw null; + public NHibernate.Hql.Ast.HqlLike Like(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlMax Max(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlMethodCall MethodCall(string methodName, params NHibernate.Hql.Ast.HqlExpression[] parameters) => throw null; + public NHibernate.Hql.Ast.HqlMethodCall MethodCall(string methodName, System.Collections.Generic.IEnumerable parameters) => throw null; + public NHibernate.Hql.Ast.HqlMin Min(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlMultiplty Multiply(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlNegate Negate(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlOrderBy OrderBy() => throw null; + public NHibernate.Hql.Ast.HqlParameter Parameter(string name) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode Query(NHibernate.Hql.Ast.HqlSelectFrom selectFrom, NHibernate.Hql.Ast.HqlWhere where, NHibernate.Hql.Ast.HqlOrderBy orderBy) => throw null; + public NHibernate.Hql.Ast.HqlQuery Query(NHibernate.Hql.Ast.HqlSelectFrom selectFrom, NHibernate.Hql.Ast.HqlWhere where) => throw null; + public NHibernate.Hql.Ast.HqlQuery Query(NHibernate.Hql.Ast.HqlSelectFrom selectFrom) => throw null; + public NHibernate.Hql.Ast.HqlQuery Query() => throw null; + public NHibernate.Hql.Ast.HqlRange Range(params NHibernate.Hql.Ast.HqlIdent[] idents) => throw null; + public NHibernate.Hql.Ast.HqlRange Range(NHibernate.Hql.Ast.HqlTreeNode ident, NHibernate.Hql.Ast.HqlAlias alias) => throw null; + public NHibernate.Hql.Ast.HqlRowStar RowStar() => throw null; + public NHibernate.Hql.Ast.HqlSelect Select(params NHibernate.Hql.Ast.HqlExpression[] expression) => throw null; + public NHibernate.Hql.Ast.HqlSelect Select(System.Collections.Generic.IEnumerable expressions) => throw null; + public NHibernate.Hql.Ast.HqlSelect Select(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlSelectFrom SelectFrom(NHibernate.Hql.Ast.HqlSelect select) => throw null; + public NHibernate.Hql.Ast.HqlSelectFrom SelectFrom(NHibernate.Hql.Ast.HqlFrom from, NHibernate.Hql.Ast.HqlSelect select) => throw null; + public NHibernate.Hql.Ast.HqlSelectFrom SelectFrom(NHibernate.Hql.Ast.HqlFrom from) => throw null; + public NHibernate.Hql.Ast.HqlSelectFrom SelectFrom() => throw null; + public NHibernate.Hql.Ast.HqlSet Set(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlSet Set() => throw null; + public NHibernate.Hql.Ast.HqlSkip Skip(NHibernate.Hql.Ast.HqlExpression parameter) => throw null; + public NHibernate.Hql.Ast.HqlStar Star() => throw null; + public NHibernate.Hql.Ast.HqlSubtract Subtract(NHibernate.Hql.Ast.HqlExpression lhs, NHibernate.Hql.Ast.HqlExpression rhs) => throw null; + public NHibernate.Hql.Ast.HqlSum Sum(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlTake Take(NHibernate.Hql.Ast.HqlExpression parameter) => throw null; + public NHibernate.Hql.Ast.HqlTransparentCast TransparentCast(NHibernate.Hql.Ast.HqlExpression expression, System.Type type) => throw null; + public NHibernate.Hql.Ast.HqlTrue True() => throw null; + public NHibernate.Hql.Ast.HqlUpdate Update(NHibernate.Hql.Ast.HqlVersioned versioned, NHibernate.Hql.Ast.HqlFrom from, NHibernate.Hql.Ast.HqlSet set) => throw null; + public NHibernate.Hql.Ast.HqlUpdate Update(NHibernate.Hql.Ast.HqlFrom from, NHibernate.Hql.Ast.HqlSet set) => throw null; + public NHibernate.Hql.Ast.HqlVersioned Versioned() => throw null; + public NHibernate.Hql.Ast.HqlWhen When(NHibernate.Hql.Ast.HqlExpression predicate, NHibernate.Hql.Ast.HqlExpression ifTrue) => throw null; + public NHibernate.Hql.Ast.HqlWhere Where(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + public NHibernate.Hql.Ast.HqlWith With(NHibernate.Hql.Ast.HqlExpression expression) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTreeNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlTreeNode + { + public System.Collections.Generic.IEnumerable Children { get => throw null; } + public void ClearChildren() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory Factory { get => throw null; set => throw null; } + protected HqlTreeNode(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) => throw null; + protected HqlTreeNode(int type, string text, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, System.Collections.Generic.IEnumerable children) => throw null; + public System.Collections.Generic.IEnumerable NodesPostOrder { get => throw null; } + public System.Collections.Generic.IEnumerable NodesPreOrder { get => throw null; } + protected void SetText(string text) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTreeNodeExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class HqlTreeNodeExtensions + { + public static NHibernate.Hql.Ast.HqlBooleanExpression AsBooleanExpression(this NHibernate.Hql.Ast.HqlTreeNode node) => throw null; + public static NHibernate.Hql.Ast.HqlExpression AsExpression(this NHibernate.Hql.Ast.HqlTreeNode node) => throw null; + public static NHibernate.Hql.Ast.HqlBooleanExpression ToBooleanExpression(this NHibernate.Hql.Ast.HqlTreeNode node) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlTrue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlTrue : NHibernate.Hql.Ast.HqlConstant + { + public HqlTrue(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(int), default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlUpdate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlUpdate : NHibernate.Hql.Ast.HqlStatement + { + internal HqlUpdate(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, params NHibernate.Hql.Ast.HqlTreeNode[] children) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlVersioned` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlVersioned : NHibernate.Hql.Ast.HqlExpression + { + public HqlVersioned(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlWhen` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlWhen : NHibernate.Hql.Ast.HqlStatement + { + public HqlWhen(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression predicate, NHibernate.Hql.Ast.HqlExpression ifTrue) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlWhere` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlWhere : NHibernate.Hql.Ast.HqlStatement + { + public HqlWhere(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.HqlWith` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlWith : NHibernate.Hql.Ast.HqlStatement + { + public HqlWith(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.HqlExpression expression) : base(default(int), default(string), default(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory), default(System.Collections.Generic.IEnumerable)) => throw null; + } + + namespace ANTLR + { + // Generated from `NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTQueryTranslatorFactory : NHibernate.Hql.IQueryTranslatorFactory + { + public ASTQueryTranslatorFactory() => throw null; + public NHibernate.Hql.IQueryTranslator[] CreateQueryTranslators(NHibernate.IQueryExpression queryExpression, string collectionRole, bool shallow, System.Collections.Generic.IDictionary filters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AstPolymorphicProcessor + { + public static NHibernate.Hql.Ast.ANTLR.Tree.IASTNode[] Process(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode ast, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.CrossJoinDictionaryArrays` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CrossJoinDictionaryArrays + { + public static System.Collections.Generic.IList> PerformCrossJoin(System.Collections.Generic.IEnumerable> input) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.DetailedSemanticException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DetailedSemanticException : NHibernate.Hql.Ast.ANTLR.SemanticException + { + public DetailedSemanticException(string message, System.Exception inner) : base(default(string)) => throw null; + public DetailedSemanticException(string message) : base(default(string)) => throw null; + protected DetailedSemanticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.HqlLexer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlLexer : Antlr.Runtime.Lexer + { + public const int AGGREGATE = default; + public const int ALIAS = default; + public const int ALL = default; + public const int AND = default; + public const int ANY = default; + public const int AS = default; + public const int ASCENDING = default; + public const int AVG = default; + public const int BAND = default; + public const int BETWEEN = default; + public const int BNOT = default; + public const int BOR = default; + public const int BOTH = default; + public const int BXOR = default; + public const int CASE = default; + public const int CASE2 = default; + public const int CLASS = default; + public const int CLOSE = default; + public const int CLOSE_BRACKET = default; + public const int COLON = default; + public const int COMMA = default; + public const int CONCAT = default; + public const int CONSTANT = default; + public const int CONSTRUCTOR = default; + public const int COUNT = default; + public const int CROSS = default; + public const int DELETE = default; + public const int DESCENDING = default; + public const int DISTINCT = default; + public const int DIV = default; + public const int DOT = default; + public const int ELEMENTS = default; + public const int ELSE = default; + public const int EMPTY = default; + public const int END = default; + public const int EOF = default; + public const int EQ = default; + public const int ESCAPE = default; + public const int ESCqs = default; + public const int EXISTS = default; + public const int EXPONENT = default; + public const int EXPR_LIST = default; + public override Antlr.Runtime.IToken Emit() => throw null; + public const int FALSE = default; + public const int FETCH = default; + public const int FILTER_ENTITY = default; + public const int FLOAT_SUFFIX = default; + public const int FROM = default; + public const int FULL = default; + public const int GE = default; + public const int GROUP = default; + public const int GT = default; + public override string GrammarFileName { get => throw null; } + public const int HAVING = default; + public const int HEX_DIGIT = default; + public HqlLexer(Antlr.Runtime.ICharStream input, Antlr.Runtime.RecognizerSharedState state) => throw null; + public HqlLexer(Antlr.Runtime.ICharStream input) => throw null; + public HqlLexer() => throw null; + public const int IDENT = default; + public const int ID_LETTER = default; + public const int ID_START_LETTER = default; + public const int IN = default; + public const int INDEX_OP = default; + public const int INDICES = default; + public const int INNER = default; + public const int INSERT = default; + public const int INTO = default; + public const int IN_LIST = default; + public const int IS = default; + public const int IS_NOT_NULL = default; + public const int IS_NULL = default; + protected override void InitDFAs() => throw null; + public const int JAVA_CONSTANT = default; + public const int JOIN = default; + public const int LE = default; + public const int LEADING = default; + public const int LEFT = default; + public const int LIKE = default; + public const int LITERAL_by = default; + public const int LT = default; + public const int MAX = default; + public const int MEMBER = default; + public const int METHOD_CALL = default; + public const int MIN = default; + public const int MINUS = default; + public const int NE = default; + public const int NEW = default; + public const int NOT = default; + public const int NOT_BETWEEN = default; + public const int NOT_IN = default; + public const int NOT_LIKE = default; + public const int NULL = default; + public const int NUM_DECIMAL = default; + public const int NUM_DOUBLE = default; + public const int NUM_FLOAT = default; + public const int NUM_INT = default; + public const int NUM_LONG = default; + public const int OBJECT = default; + public const int OF = default; + public const int ON = default; + public const int OPEN = default; + public const int OPEN_BRACKET = default; + public const int OR = default; + public const int ORDER = default; + public const int ORDER_ELEMENT = default; + public const int OUTER = default; + public const int PARAM = default; + public const int PLUS = default; + public const int PROPERTIES = default; + public const int QUERY = default; + public const int QUOTED_String = default; + public const int RANGE = default; + public const int RIGHT = default; + public const int ROW_STAR = default; + public const int SELECT = default; + public const int SELECT_FROM = default; + public const int SET = default; + public const int SKIP = default; + public const int SOME = default; + public const int SQL_NE = default; + public const int STAR = default; + public const int SUM = default; + public const int TAKE = default; + public const int THEN = default; + public const int TRAILING = default; + public const int TRUE = default; + public const int T__134 = default; + public const int T__135 = default; + public const int UNARY_MINUS = default; + public const int UNARY_PLUS = default; + public const int UNION = default; + public const int UPDATE = default; + public const int VECTOR_EXPR = default; + public const int VERSIONED = default; + public const int WEIRD_IDENT = default; + public const int WHEN = default; + public const int WHERE = default; + public const int WITH = default; + public const int WS = default; + public override void mTokens() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.HqlParseEngine` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlParseEngine + { + public HqlParseEngine(string hql, bool filter, NHibernate.Engine.ISessionFactoryImplementor sfi) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Parse() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.HqlParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlParser : Antlr.Runtime.Parser + { + public const int AGGREGATE = default; + public const int ALIAS = default; + public const int ALL = default; + public const int AND = default; + public const int ANY = default; + public const int AS = default; + public const int ASCENDING = default; + public const int AVG = default; + public const int BAND = default; + public const int BETWEEN = default; + public const int BNOT = default; + public const int BOR = default; + public const int BOTH = default; + public const int BXOR = default; + public const int CASE = default; + public const int CASE2 = default; + public const int CLASS = default; + public const int CLOSE = default; + public const int CLOSE_BRACKET = default; + public const int COLON = default; + public const int COMMA = default; + public const int CONCAT = default; + public const int CONSTANT = default; + public const int CONSTRUCTOR = default; + public const int COUNT = default; + public const int CROSS = default; + public const int DELETE = default; + public const int DESCENDING = default; + public const int DISTINCT = default; + public const int DIV = default; + public const int DOT = default; + public const int ELEMENTS = default; + public const int ELSE = default; + public const int EMPTY = default; + public const int END = default; + public const int EOF = default; + public const int EQ = default; + public const int ESCAPE = default; + public const int ESCqs = default; + public const int EXISTS = default; + public const int EXPONENT = default; + public const int EXPR_LIST = default; + public const int FALSE = default; + public const int FETCH = default; + public const int FILTER_ENTITY = default; + public const int FLOAT_SUFFIX = default; + public const int FROM = default; + public const int FULL = default; + public bool Filter { get => throw null; set => throw null; } + public const int GE = default; + public const int GROUP = default; + public const int GT = default; + public override string GrammarFileName { get => throw null; } + public const int HAVING = default; + public const int HEX_DIGIT = default; + public void HandleDotIdent() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode HandleIdentifierError(Antlr.Runtime.IToken token, Antlr.Runtime.RecognitionException ex) => throw null; + public HqlParser(Antlr.Runtime.ITokenStream input, Antlr.Runtime.RecognizerSharedState state) : base(default(Antlr.Runtime.ITokenStream)) => throw null; + public HqlParser(Antlr.Runtime.ITokenStream input) : base(default(Antlr.Runtime.ITokenStream)) => throw null; + public const int IDENT = default; + public const int ID_LETTER = default; + public const int ID_START_LETTER = default; + public const int IN = default; + public const int INDEX_OP = default; + public const int INDICES = default; + public const int INNER = default; + public const int INSERT = default; + public const int INTO = default; + public const int IN_LIST = default; + public const int IS = default; + public const int IS_NOT_NULL = default; + public const int IS_NULL = default; + public const int JAVA_CONSTANT = default; + public const int JOIN = default; + public const int LE = default; + public const int LEADING = default; + public const int LEFT = default; + public const int LIKE = default; + public const int LITERAL_by = default; + public const int LT = default; + public const int MAX = default; + public const int MEMBER = default; + public const int METHOD_CALL = default; + public const int MIN = default; + public const int MINUS = default; + public const int NE = default; + public const int NEW = default; + public const int NOT = default; + public const int NOT_BETWEEN = default; + public const int NOT_IN = default; + public const int NOT_LIKE = default; + public const int NULL = default; + public const int NUM_DECIMAL = default; + public const int NUM_DOUBLE = default; + public const int NUM_FLOAT = default; + public const int NUM_INT = default; + public const int NUM_LONG = default; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode NegateNode(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node) => throw null; + public const int OBJECT = default; + public const int OF = default; + public const int ON = default; + public const int OPEN = default; + public const int OPEN_BRACKET = default; + public const int OR = default; + public const int ORDER = default; + public const int ORDER_ELEMENT = default; + public const int OUTER = default; + public const int PARAM = default; + public const int PLUS = default; + public const int PROPERTIES = default; + public NHibernate.Hql.Ast.ANTLR.IParseErrorHandler ParseErrorHandler { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode ProcessEqualityExpression(object o) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode ProcessMemberOf(Antlr.Runtime.IToken n, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode p, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode root) => throw null; + public const int QUERY = default; + public const int QUOTED_String = default; + public const int RANGE = default; + public const int RIGHT = default; + public const int ROW_STAR = default; + protected override object RecoverFromMismatchedToken(Antlr.Runtime.IIntStream input, int ttype, Antlr.Runtime.BitSet follow) => throw null; + public override void ReportError(Antlr.Runtime.RecognitionException e) => throw null; + public const int SELECT = default; + public const int SELECT_FROM = default; + public const int SET = default; + public const int SKIP = default; + public const int SOME = default; + public const int SQL_NE = default; + public const int STAR = default; + public const int SUM = default; + public const int TAKE = default; + public const int THEN = default; + public const int TRAILING = default; + public const int TRUE = default; + public const int T__134 = default; + public const int T__135 = default; + public override string[] TokenNames { get => throw null; } + public Antlr.Runtime.Tree.ITreeAdaptor TreeAdaptor { get => throw null; set => throw null; } + public const int UNARY_MINUS = default; + public const int UNARY_PLUS = default; + public const int UNION = default; + public const int UPDATE = default; + public const int VECTOR_EXPR = default; + public const int VERSIONED = default; + public const int WEIRD_IDENT = default; + public const int WHEN = default; + public const int WHERE = default; + public const int WITH = default; + public const int WS = default; + public void WeakKeywords() => throw null; + public void WeakKeywords2() => throw null; + public Antlr.Runtime.AstParserRuleReturnScope statement() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.HqlSqlWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSqlWalker : Antlr.Runtime.Tree.TreeParser + { + public const int AGGREGATE = default; + public const int ALIAS = default; + public const int ALIAS_REF = default; + public const int ALL = default; + public const int AND = default; + public const int ANY = default; + public const int AS = default; + public const int ASCENDING = default; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory ASTFactory { get => throw null; } + public const int AVG = default; + public void AddQuerySpaces(string[] spaces) => throw null; + public NHibernate.Hql.Ast.ANTLR.Util.AliasGenerator AliasGenerator { get => throw null; } + public System.Collections.Generic.IList AssignmentSpecifications { get => throw null; } + public const int BAND = default; + public const int BETWEEN = default; + public const int BNOT = default; + public const int BOGUS = default; + public const int BOR = default; + public const int BOTH = default; + public const int BXOR = default; + public const int CASE = default; + public const int CASE2 = default; + public const int CLASS = default; + public const int CLOSE = default; + public const int CLOSE_BRACKET = default; + public const int COLON = default; + public const int COMMA = default; + public const int CONCAT = default; + public const int CONSTANT = default; + public const int CONSTRUCTOR = default; + public const int COUNT = default; + public const int CROSS = default; + public string CollectionFilterRole { get => throw null; } + public int CurrentClauseType { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromClause CurrentFromClause { get => throw null; } + public int CurrentStatementType { get => throw null; } + public const int DELETE = default; + public const int DESCENDING = default; + public const int DISTINCT = default; + public const int DIV = default; + public const int DOT = default; + public const int ELEMENTS = default; + public const int ELSE = default; + public const int EMPTY = default; + public const int END = default; + public const int ENTITY_JOIN = default; + public const int EOF = default; + public const int EQ = default; + public const int ESCAPE = default; + public const int ESCqs = default; + public const int EXISTS = default; + public const int EXPONENT = default; + public const int EXPR_LIST = default; + public System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + protected void EvaluateAssignment(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode eq) => throw null; + public const int FALSE = default; + public const int FETCH = default; + public const int FILTERS = default; + public const int FILTER_ENTITY = default; + public const int FLOAT_SUFFIX = default; + public const int FROM = default; + public const int FROM_FRAGMENT = default; + public const int FULL = default; + public const int GE = default; + public const int GROUP = default; + public const int GT = default; + public NHibernate.Hql.Ast.ANTLR.Tree.FromClause GetFinalFromClause() => throw null; + public override string GrammarFileName { get => throw null; } + public const int HAVING = default; + public const int HEX_DIGIT = default; + protected void HandleResultVariableRef(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode resultVariableRef) => throw null; + public HqlSqlWalker(NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl qti, NHibernate.Engine.ISessionFactoryImplementor sfi, Antlr.Runtime.Tree.ITreeNodeStream input, System.Collections.Generic.IDictionary tokenReplacements, string collectionRole) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public HqlSqlWalker(Antlr.Runtime.Tree.ITreeNodeStream input, Antlr.Runtime.RecognizerSharedState state) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public HqlSqlWalker(Antlr.Runtime.Tree.ITreeNodeStream input) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + internal HqlSqlWalker(NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl qti, NHibernate.Engine.ISessionFactoryImplementor sfi, Antlr.Runtime.Tree.ITreeNodeStream input, System.Collections.Generic.IDictionary tokenReplacements, System.Collections.Generic.IDictionary namedParameters, string collectionRole) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public const int IDENT = default; + public const int ID_LETTER = default; + public const int ID_START_LETTER = default; + public const int IMPLIED_FROM = default; + public const int IN = default; + public const int INDEX_OP = default; + public const int INDICES = default; + public const int INNER = default; + public const int INSERT = default; + public const int INTO = default; + public const int IN_LIST = default; + public const int IS = default; + public const int IS_NOT_NULL = default; + public const int IS_NULL = default; + public NHibernate.SqlCommand.JoinType ImpliedJoinType { get => throw null; } + public bool IsComparativeExpressionClause { get => throw null; } + public bool IsFilter() => throw null; + public bool IsInCase { get => throw null; } + public bool IsInFrom { get => throw null; } + public bool IsInSelect { get => throw null; } + protected bool IsOrderExpressionResultVariableRef(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode orderExpressionNode) => throw null; + public bool IsSelectStatement { get => throw null; } + public bool IsShallowQuery { get => throw null; } + public bool IsSubQuery { get => throw null; } + public const int JAVA_CONSTANT = default; + public const int JOIN = default; + public const int JOIN_FRAGMENT = default; + public const int LE = default; + public const int LEADING = default; + public const int LEFT = default; + public const int LEFT_OUTER = default; + public const int LIKE = default; + public const int LITERAL_by = default; + public const int LT = default; + public NHibernate.Hql.Ast.ANTLR.Util.LiteralProcessor LiteralProcessor { get => throw null; } + protected NHibernate.Hql.Ast.ANTLR.Tree.IASTNode LookupProperty(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode dot, bool root, bool inSelect) => throw null; + public const int MAX = default; + public const int MEMBER = default; + public const int METHOD_CALL = default; + public const int METHOD_NAME = default; + public const int MIN = default; + public const int MINUS = default; + public const int NAMED_PARAM = default; + public const int NE = default; + public const int NEW = default; + public const int NOT = default; + public const int NOT_BETWEEN = default; + public const int NOT_IN = default; + public const int NOT_LIKE = default; + public const int NULL = default; + public const int NUM_DECIMAL = default; + public const int NUM_DOUBLE = default; + public const int NUM_FLOAT = default; + public const int NUM_INT = default; + public const int NUM_LONG = default; + public System.Collections.Generic.IDictionary NamedParameters { get => throw null; } + public int NumberOfParametersInSetClause { get => throw null; } + public const int OBJECT = default; + public const int OF = default; + public const int ON = default; + public const int OPEN = default; + public const int OPEN_BRACKET = default; + public const int OR = default; + public const int ORDER = default; + public const int ORDER_ELEMENT = default; + public const int OUTER = default; + public const int PARAM = default; + public const int PLUS = default; + public const int PROPERTIES = default; + public const int PROPERTY_REF = default; + public System.Collections.Generic.IList Parameters { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.IParseErrorHandler ParseErrorHandler { get => throw null; set => throw null; } + public const int QUERY = default; + public const int QUOTED_String = default; + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public const int RANGE = default; + public const int RESULT_VARIABLE_REF = default; + public const int RIGHT = default; + public const int RIGHT_OUTER = default; + public const int ROW_STAR = default; + public override void ReportError(Antlr.Runtime.RecognitionException e) => throw null; + public string[] ReturnAliases { get => throw null; } + public NHibernate.Type.IType[] ReturnTypes { get => throw null; } + public const int SELECT = default; + public const int SELECT_CLAUSE = default; + public const int SELECT_COLUMNS = default; + public const int SELECT_EXPR = default; + public const int SELECT_FROM = default; + public const int SET = default; + public const int SKIP = default; + public const int SOME = default; + public const int SQL_NE = default; + public const int SQL_TOKEN = default; + public const int STAR = default; + public const int SUM = default; + public NHibernate.Hql.Ast.ANTLR.Tree.SelectClause SelectClause { get => throw null; } + public int StatementType { get => throw null; } + public static bool SupportsIdGenWithBulkInsertion(NHibernate.Id.IIdentifierGenerator generator) => throw null; + public const int TAKE = default; + public const int THEN = default; + public const int THETA_JOINS = default; + public const int TRAILING = default; + public const int TRUE = default; + public const int T__134 = default; + public const int T__135 = default; + public override string[] TokenNames { get => throw null; } + public System.Collections.Generic.IDictionary TokenReplacements { get => throw null; } + public Antlr.Runtime.Tree.ITreeAdaptor TreeAdaptor { get => throw null; set => throw null; } + public const int UNARY_MINUS = default; + public const int UNARY_PLUS = default; + public const int UNION = default; + public const int UPDATE = default; + public const int VECTOR_EXPR = default; + public const int VERSIONED = default; + public const int WEIRD_IDENT = default; + public const int WHEN = default; + public const int WHERE = default; + public const int WITH = default; + public const int WS = default; + public Antlr.Runtime.Tree.AstTreeRuleReturnScope statement() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.HqlToken` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlToken : Antlr.Runtime.CommonToken + { + public HqlToken(Antlr.Runtime.IToken other) => throw null; + public HqlToken(Antlr.Runtime.ICharStream input, int type, int channel, int start, int stop) => throw null; + public bool PossibleId { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.IErrorReporter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IErrorReporter + { + void ReportError(string s); + void ReportError(Antlr.Runtime.RecognitionException e); + void ReportWarning(string s); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.IParseErrorHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParseErrorHandler : NHibernate.Hql.Ast.ANTLR.IErrorReporter + { + int GetErrorCount(); + void ThrowQueryException(); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.InvalidPathException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InvalidPathException : NHibernate.Hql.Ast.ANTLR.SemanticException + { + public InvalidPathException(string s) : base(default(string)) => throw null; + protected InvalidPathException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(default(string)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.InvalidWithClauseException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InvalidWithClauseException : NHibernate.Hql.Ast.ANTLR.QuerySyntaxException + { + public InvalidWithClauseException(string message, System.Exception inner) => throw null; + public InvalidWithClauseException(string message) => throw null; + protected InvalidWithClauseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected InvalidWithClauseException() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.QuerySyntaxException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySyntaxException : NHibernate.QueryException + { + public static NHibernate.Hql.Ast.ANTLR.QuerySyntaxException Convert(Antlr.Runtime.RecognitionException e, string hql) => throw null; + public static NHibernate.Hql.Ast.ANTLR.QuerySyntaxException Convert(Antlr.Runtime.RecognitionException e) => throw null; + public QuerySyntaxException(string message, string hql, System.Exception inner) => throw null; + public QuerySyntaxException(string message, string hql) => throw null; + public QuerySyntaxException(string message, System.Exception inner) => throw null; + public QuerySyntaxException(string message) => throw null; + protected QuerySyntaxException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected QuerySyntaxException() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryTranslatorImpl : NHibernate.Hql.IQueryTranslator, NHibernate.Hql.IFilterTranslator + { + public virtual NHibernate.Type.IType[] ActualReturnTypes { get => throw null; } + public NHibernate.Engine.Query.ParameterMetadata BuildParameterMetadata() => throw null; + public System.Collections.Generic.IList CollectSqlStrings { get => throw null; } + public System.Collections.Generic.IList CollectedParameterSpecifications { get => throw null; } + public void Compile(string collectionRole, System.Collections.Generic.IDictionary replacements, bool shallow) => throw null; + public void Compile(System.Collections.Generic.IDictionary replacements, bool shallow) => throw null; + public bool ContainsCollectionFetches { get => throw null; } + public System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + public int ExecuteUpdate(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string[][] GetColumnNames() => throw null; + public System.Collections.IEnumerable GetEnumerable(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session) => throw null; + public System.Threading.Tasks.Task GetEnumerableAsync(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Event.IEventSource session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsManipulationStatement { get => throw null; } + public bool IsShallowQuery { get => throw null; } + public System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Loader.Loader Loader { get => throw null; } + public string QueryIdentifier { get => throw null; } + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public string QueryString { get => throw null; } + public QueryTranslatorImpl(string queryIdentifier, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parsedQuery, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public string[] ReturnAliases { get => throw null; } + public NHibernate.Type.IType[] ReturnTypes { get => throw null; } + public string SQLString { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IStatement SqlAST { get => throw null; } + public NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + public System.Collections.Generic.ISet UncacheableCollectionPersisters { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.SemanticException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SemanticException : NHibernate.QueryException + { + public SemanticException(string message, System.Exception inner) => throw null; + public SemanticException(string message) => throw null; + protected SemanticException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.SessionFactoryHelperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionFactoryHelperExtensions + { + public NHibernate.Engine.JoinSequence CreateCollectionJoinSequence(NHibernate.Persister.Collection.IQueryableCollection collPersister, string collectionName) => throw null; + public NHibernate.Engine.JoinSequence CreateJoinSequence(bool implicitJoin, NHibernate.Type.IAssociationType associationType, string tableAlias, NHibernate.SqlCommand.JoinType joinType, string[] columns) => throw null; + public NHibernate.Engine.JoinSequence CreateJoinSequence() => throw null; + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public NHibernate.Type.IType FindFunctionReturnType(string functionName, System.Collections.Generic.IEnumerable arguments) => throw null; + public NHibernate.Type.IType FindFunctionReturnType(string functionName, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode first) => throw null; + public NHibernate.Persister.Entity.IQueryable FindQueryableUsingImports(string className) => throw null; + public NHibernate.Dialect.Function.ISQLFunction FindSQLFunction(string functionName) => throw null; + public string[][] GenerateColumnNames(NHibernate.Type.IType[] sqlResultTypes) => throw null; + public string[] GetCollectionElementColumns(string role, string roleAlias) => throw null; + public NHibernate.Persister.Collection.IQueryableCollection GetCollectionPersister(string collectionFilterRole) => throw null; + public NHibernate.Type.IAssociationType GetElementAssociationType(NHibernate.Type.CollectionType collectionType) => throw null; + public string GetIdentifierOrUniqueKeyPropertyName(NHibernate.Type.EntityType entityType) => throw null; + public string GetImportedClassName(string className) => throw null; + public bool HasPhysicalDiscriminatorColumn(NHibernate.Persister.Entity.IQueryable persister) => throw null; + public bool IsStrictJPAQLComplianceEnabled { get => throw null; } + public NHibernate.Persister.Entity.IEntityPersister RequireClassPersister(string name) => throw null; + public NHibernate.Persister.Collection.IQueryableCollection RequireQueryableCollection(string role) => throw null; + public SessionFactoryHelperExtensions(NHibernate.Engine.ISessionFactoryImplementor sfi) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.SqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlGenerator : Antlr.Runtime.Tree.TreeParser, NHibernate.Hql.Ast.ANTLR.IErrorReporter + { + public const int AGGREGATE = default; + public const int ALIAS = default; + public const int ALIAS_REF = default; + public const int ALL = default; + public const int AND = default; + public const int ANY = default; + public const int AS = default; + public const int ASCENDING = default; + public const int AVG = default; + public const int BAND = default; + public const int BETWEEN = default; + public const int BNOT = default; + public const int BOGUS = default; + public const int BOR = default; + public const int BOTH = default; + public const int BXOR = default; + public const int CASE = default; + public const int CASE2 = default; + public const int CLASS = default; + public const int CLOSE = default; + public const int CLOSE_BRACKET = default; + public const int COLON = default; + public const int COMMA = default; + public const int CONCAT = default; + public const int CONSTANT = default; + public const int CONSTRUCTOR = default; + public const int COUNT = default; + public const int CROSS = default; + public const int DELETE = default; + public const int DESCENDING = default; + public const int DISTINCT = default; + public const int DIV = default; + public const int DOT = default; + public const int ELEMENTS = default; + public const int ELSE = default; + public const int EMPTY = default; + public const int END = default; + public const int ENTITY_JOIN = default; + public const int EOF = default; + public const int EQ = default; + public const int ESCAPE = default; + public const int ESCqs = default; + public const int EXISTS = default; + public const int EXPONENT = default; + public const int EXPR_LIST = default; + public const int FALSE = default; + public const int FETCH = default; + public const int FILTERS = default; + public const int FILTER_ENTITY = default; + public const int FLOAT_SUFFIX = default; + public const int FROM = default; + public const int FROM_FRAGMENT = default; + public const int FULL = default; + protected virtual void FromFragmentSeparator(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode a) => throw null; + public const int GE = default; + public const int GROUP = default; + public const int GT = default; + public System.Collections.Generic.IList GetCollectedParameters() => throw null; + public NHibernate.SqlCommand.SqlString GetSQL() => throw null; + public override string GrammarFileName { get => throw null; } + public const int HAVING = default; + public const int HEX_DIGIT = default; + public const int IDENT = default; + public const int ID_LETTER = default; + public const int ID_START_LETTER = default; + public const int IMPLIED_FROM = default; + public const int IN = default; + public const int INDEX_OP = default; + public const int INDICES = default; + public const int INNER = default; + public const int INSERT = default; + public const int INTO = default; + public const int IN_LIST = default; + public const int IS = default; + public const int IS_NOT_NULL = default; + public const int IS_NULL = default; + public const int JAVA_CONSTANT = default; + public const int JOIN = default; + public const int JOIN_FRAGMENT = default; + public const int LE = default; + public const int LEADING = default; + public const int LEFT = default; + public const int LEFT_OUTER = default; + public const int LIKE = default; + public const int LITERAL_by = default; + public const int LT = default; + public const int MAX = default; + public const int MEMBER = default; + public const int METHOD_CALL = default; + public const int METHOD_NAME = default; + public const int MIN = default; + public const int MINUS = default; + public const int NAMED_PARAM = default; + public const int NE = default; + public const int NEW = default; + public const int NOT = default; + public const int NOT_BETWEEN = default; + public const int NOT_IN = default; + public const int NOT_LIKE = default; + public const int NULL = default; + public const int NUM_DECIMAL = default; + public const int NUM_DOUBLE = default; + public const int NUM_FLOAT = default; + public const int NUM_INT = default; + public const int NUM_LONG = default; + protected virtual void NestedFromFragment(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode d, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public const int OBJECT = default; + public const int OF = default; + public const int ON = default; + public const int OPEN = default; + public const int OPEN_BRACKET = default; + public const int OR = default; + public const int ORDER = default; + public const int ORDER_ELEMENT = default; + public const int OUTER = default; + public const int PARAM = default; + public const int PLUS = default; + public const int PROPERTIES = default; + public const int PROPERTY_REF = default; + public NHibernate.Hql.Ast.ANTLR.IParseErrorHandler ParseErrorHandler { get => throw null; } + public const int QUERY = default; + public const int QUOTED_String = default; + public const int RANGE = default; + public const int RESULT_VARIABLE_REF = default; + public const int RIGHT = default; + public const int RIGHT_OUTER = default; + public const int ROW_STAR = default; + public void ReportError(string s) => throw null; + public override void ReportError(Antlr.Runtime.RecognitionException e) => throw null; + public void ReportWarning(string s) => throw null; + public const int SELECT = default; + public const int SELECT_CLAUSE = default; + public const int SELECT_COLUMNS = default; + public const int SELECT_EXPR = default; + public const int SELECT_FROM = default; + public const int SET = default; + public const int SKIP = default; + public const int SOME = default; + public const int SQL_NE = default; + public const int SQL_TOKEN = default; + public const int STAR = default; + public const int SUM = default; + public SqlGenerator(NHibernate.Engine.ISessionFactoryImplementor sfi, Antlr.Runtime.Tree.ITreeNodeStream input) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public SqlGenerator(Antlr.Runtime.Tree.ITreeNodeStream input, Antlr.Runtime.RecognizerSharedState state) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public SqlGenerator(Antlr.Runtime.Tree.ITreeNodeStream input) : base(default(Antlr.Runtime.Tree.ITreeNodeStream)) => throw null; + public const int TAKE = default; + public const int THEN = default; + public const int THETA_JOINS = default; + public const int TRAILING = default; + public const int TRUE = default; + public const int T__134 = default; + public const int T__135 = default; + public override string[] TokenNames { get => throw null; } + public const int UNARY_MINUS = default; + public const int UNARY_PLUS = default; + public const int UNION = default; + public const int UPDATE = default; + public const int VECTOR_EXPR = default; + public const int VERSIONED = default; + public const int WEIRD_IDENT = default; + public const int WHEN = default; + public const int WHERE = default; + public const int WITH = default; + public const int WS = default; + public void comparisonExpr(bool parens) => throw null; + public Antlr.Runtime.Tree.TreeRuleReturnScope simpleExpr() => throw null; + public void statement() => throw null; + public void whereClause() => throw null; + public void whereExpr() => throw null; + } + + namespace Exec + { + // Generated from `NHibernate.Hql.Ast.ANTLR.Exec.AbstractStatementExecutor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractStatementExecutor : NHibernate.Hql.Ast.ANTLR.Exec.IStatementExecutor + { + protected AbstractStatementExecutor(NHibernate.Hql.Ast.ANTLR.Tree.IStatement statement, NHibernate.INHibernateLogger log) => throw null; + protected abstract NHibernate.Persister.Entity.IQueryable[] AffectedQueryables { get; } + protected virtual void CoordinateSharedCacheCleanup(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task CoordinateSharedCacheCleanupAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void CreateTemporaryTableIfNecessary(NHibernate.Persister.Entity.IQueryable persister, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task CreateTemporaryTableIfNecessaryAsync(NHibernate.Persister.Entity.IQueryable persister, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void DropTemporaryTableIfNecessary(NHibernate.Persister.Entity.IQueryable persister, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task DropTemporaryTableIfNecessaryAsync(NHibernate.Persister.Entity.IQueryable persister, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract int Execute(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session); + public abstract System.Threading.Tasks.Task ExecuteAsync(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + protected NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + protected NHibernate.SqlCommand.SqlString GenerateIdInsertSelect(NHibernate.Persister.Entity.IQueryable persister, string tableAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode whereClause) => throw null; + protected string GenerateIdSubselect(NHibernate.Persister.Entity.IQueryable persister) => throw null; + protected virtual bool ShouldIsolateTemporaryTableDDL() => throw null; + public abstract NHibernate.SqlCommand.SqlString[] SqlStatements { get; } + protected NHibernate.Hql.Ast.ANTLR.Tree.IStatement Statement { get => throw null; set => throw null; } + protected NHibernate.Hql.Ast.ANTLR.HqlSqlWalker Walker { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Exec.BasicExecutor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicExecutor : NHibernate.Hql.Ast.ANTLR.Exec.AbstractStatementExecutor + { + protected override NHibernate.Persister.Entity.IQueryable[] AffectedQueryables { get => throw null; } + public BasicExecutor(NHibernate.Hql.Ast.ANTLR.Tree.IStatement statement, NHibernate.Persister.Entity.IQueryable persister) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IStatement), default(NHibernate.INHibernateLogger)) => throw null; + public override int Execute(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.SqlCommand.SqlString[] SqlStatements { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Exec.IStatementExecutor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatementExecutor + { + int Execute(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ExecuteAsync(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.SqlCommand.SqlString[] SqlStatements { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Exec.MultiTableDeleteExecutor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MultiTableDeleteExecutor : NHibernate.Hql.Ast.ANTLR.Exec.AbstractStatementExecutor + { + protected override NHibernate.Persister.Entity.IQueryable[] AffectedQueryables { get => throw null; } + public override int Execute(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public MultiTableDeleteExecutor(NHibernate.Hql.Ast.ANTLR.Tree.IStatement statement) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IStatement), default(NHibernate.INHibernateLogger)) => throw null; + public override NHibernate.SqlCommand.SqlString[] SqlStatements { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Exec.MultiTableUpdateExecutor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MultiTableUpdateExecutor : NHibernate.Hql.Ast.ANTLR.Exec.AbstractStatementExecutor + { + protected override NHibernate.Persister.Entity.IQueryable[] AffectedQueryables { get => throw null; } + public override int Execute(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ExecuteAsync(NHibernate.Engine.QueryParameters parameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public MultiTableUpdateExecutor(NHibernate.Hql.Ast.ANTLR.Tree.IStatement statement) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.IStatement), default(NHibernate.INHibernateLogger)) => throw null; + public override NHibernate.SqlCommand.SqlString[] SqlStatements { get => throw null; } + } + + } + namespace Tree + { + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ASTErrorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTErrorNode : NHibernate.Hql.Ast.ANTLR.Tree.ASTNode + { + public ASTErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e) => throw null; + public Antlr.Runtime.ITokenStream Input { get => throw null; set => throw null; } + public Antlr.Runtime.RecognitionException RecognitionException { get => throw null; set => throw null; } + public Antlr.Runtime.IToken Stop { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ASTFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTFactory : NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory + { + public ASTFactory(Antlr.Runtime.Tree.ITreeAdaptor adaptor) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode CreateNode(int type, string text, params NHibernate.Hql.Ast.ANTLR.Tree.IASTNode[] children) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ASTNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTNode : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode, Antlr.Runtime.Tree.ITree + { + public ASTNode(NHibernate.Hql.Ast.ANTLR.Tree.ASTNode other) => throw null; + public ASTNode(Antlr.Runtime.IToken token) => throw null; + public ASTNode() => throw null; + void Antlr.Runtime.Tree.ITree.AddChild(Antlr.Runtime.Tree.ITree t) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode AddChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child) => throw null; + public void AddChildren(params NHibernate.Hql.Ast.ANTLR.Tree.IASTNode[] children) => throw null; + public void AddChildren(System.Collections.Generic.IEnumerable children) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode AddSibling(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newSibling) => throw null; + public int CharPositionInLine { get => throw null; } + public int ChildCount { get => throw null; } + public int ChildIndex { get => throw null; } + int Antlr.Runtime.Tree.ITree.ChildIndex { get => throw null; set => throw null; } + public void ClearChildren() => throw null; + object Antlr.Runtime.Tree.ITree.DeleteChild(int i) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode DupNode() => throw null; + Antlr.Runtime.Tree.ITree Antlr.Runtime.Tree.ITree.DupNode() => throw null; + void Antlr.Runtime.Tree.ITree.FreshenParentAndChildIndexes() => throw null; + public Antlr.Runtime.Tree.ITree GetAncestor(int ttype) => throw null; + public System.Collections.Generic.IList GetAncestors() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetChild(int index) => throw null; + Antlr.Runtime.Tree.ITree Antlr.Runtime.Tree.ITree.GetChild(int i) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetFirstChild() => throw null; + public bool HasAncestor(int ttype) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode InsertChild(int index, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child) => throw null; + public bool IsNil { get => throw null; } + public int Line { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode NextSibling { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Parent { get => throw null; set => throw null; } + Antlr.Runtime.Tree.ITree Antlr.Runtime.Tree.ITree.Parent { get => throw null; set => throw null; } + public void RemoveChild(int index) => throw null; + public void RemoveChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child) => throw null; + void Antlr.Runtime.Tree.ITree.ReplaceChildren(int startChildIndex, int stopChildIndex, object t) => throw null; + void Antlr.Runtime.Tree.ITree.SetChild(int i, Antlr.Runtime.Tree.ITree t) => throw null; + public void SetChild(int index, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newChild) => throw null; + public void SetFirstChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newChild) => throw null; + public virtual string Text { get => throw null; set => throw null; } + public override string ToString() => throw null; + public string ToStringTree() => throw null; + public Antlr.Runtime.IToken Token { get => throw null; } + int Antlr.Runtime.Tree.ITree.TokenStartIndex { get => throw null; set => throw null; } + int Antlr.Runtime.Tree.ITree.TokenStopIndex { get => throw null; set => throw null; } + public int Type { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ASTTreeAdaptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTTreeAdaptor : Antlr.Runtime.Tree.BaseTreeAdaptor + { + public ASTTreeAdaptor() => throw null; + public override object Create(Antlr.Runtime.IToken payload) => throw null; + public override Antlr.Runtime.IToken CreateToken(int tokenType, string text) => throw null; + public override Antlr.Runtime.IToken CreateToken(Antlr.Runtime.IToken fromToken) => throw null; + public override object DupNode(object t) => throw null; + public override object ErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e) => throw null; + public override Antlr.Runtime.IToken GetToken(object treeNode) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AbstractNullnessCheckNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractNullnessCheckNode : NHibernate.Hql.Ast.ANTLR.Tree.UnaryLogicOperatorNode + { + protected AbstractNullnessCheckNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected abstract string ExpansionConnectorText { get; } + protected abstract int ExpansionConnectorType { get; } + public override void Initialize() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AbstractRestrictableStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractRestrictableStatement : NHibernate.Hql.Ast.ANTLR.Tree.AbstractStatement, NHibernate.Hql.Ast.ANTLR.Tree.IStatement, NHibernate.Hql.Ast.ANTLR.Tree.IRestrictableStatement + { + protected AbstractRestrictableStatement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromClause FromClause { get => throw null; } + protected abstract NHibernate.INHibernateLogger GetLog(); + protected abstract int GetWhereClauseParentTokenType(); + public bool HasWhereClause { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode WhereClause { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractSelectExpression : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + protected AbstractSelectExpression(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public string Alias { get => throw null; set => throw null; } + public virtual NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; set => throw null; } + public bool IsConstructor { get => throw null; } + public virtual bool IsReturnableEntity { get => throw null; } + public virtual bool IsScalar { get => throw null; } + public int ScalarColumnIndex { get => throw null; } + public void SetScalarColumn(int i) => throw null; + public abstract void SetScalarColumnText(int i); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AbstractStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractStatement : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IStatement, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + protected AbstractStatement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public string GetDisplayText() => throw null; + public abstract bool NeedsExecutor { get; } + public abstract int StatementType { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AggregateNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AggregateNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public AggregateNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public string FunctionName { get => throw null; } + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.AssignmentSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AssignmentSpecification + { + public bool AffectsTable(string tableName) => throw null; + public AssignmentSpecification(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode eq, NHibernate.Persister.Entity.IQueryable persister) => throw null; + public NHibernate.Param.IParameterSpecification[] Parameters { get => throw null; } + public NHibernate.SqlCommand.SqlString SqlAssignmentFragment { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.BetweenOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BetweenOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.SqlNode, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode + { + public BetweenOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public void Initialize() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.BinaryArithmeticOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinaryArithmeticOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode, NHibernate.Hql.Ast.ANTLR.Tree.IBinaryOperatorNode + { + public BinaryArithmeticOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public string GetDisplayText() => throw null; + public void Initialize() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode LeftHandOperand { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode RightHandOperand { get => throw null; } + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinaryLogicOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IParameterContainer, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IBinaryOperatorNode + { + public void AddEmbeddedParameter(NHibernate.Param.IParameterSpecification specification) => throw null; + public BinaryLogicOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected static NHibernate.Type.IType ExtractDataType(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode operand) => throw null; + public NHibernate.Param.IParameterSpecification[] GetEmbeddedParameters() => throw null; + public bool HasEmbeddedParameters { get => throw null; } + public virtual void Initialize() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode LeftHandOperand { get => throw null; } + protected void MutateRowValueConstructorSyntaxesIfNecessary(NHibernate.Type.IType lhsType, NHibernate.Type.IType rhsType) => throw null; + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode RightHandOperand { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.BooleanLiteralNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BooleanLiteralNode : NHibernate.Hql.Ast.ANTLR.Tree.LiteralNode, NHibernate.Hql.Ast.ANTLR.Tree.IExpectedTypeAwareNode + { + public BooleanLiteralNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.Case2Node` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Case2Node : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public Case2Node(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.CaseNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CaseNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.IExpectedTypeAwareNode + { + public CaseNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable GetResultNodes() => throw null; + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.CollectionFunction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionFunction : NHibernate.Hql.Ast.ANTLR.Tree.MethodNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public CollectionFunction(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected override void PrepareSelectColumns(string[] selectColumns) => throw null; + public override void Resolve(bool inSelect) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ComponentJoin` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentJoin : NHibernate.Hql.Ast.ANTLR.Tree.FromElement + { + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ComponentJoin+ComponentFromElementType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentFromElementType : NHibernate.Hql.Ast.ANTLR.Tree.FromElementType + { + public ComponentFromElementType(NHibernate.Hql.Ast.ANTLR.Tree.ComponentJoin fromElement) : base(default(NHibernate.Hql.Ast.ANTLR.Tree.FromElement)) => throw null; + public override NHibernate.Type.IType DataType { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.ComponentJoin FromElement { get => throw null; } + protected NHibernate.Persister.Entity.IPropertyMapping GetBasePropertyMapping() => throw null; + public override NHibernate.Persister.Entity.IPropertyMapping GetPropertyMapping(string propertyName) => throw null; + public override NHibernate.Type.IType GetPropertyType(string propertyName, string propertyPath) => throw null; + public override NHibernate.Persister.Collection.IQueryableCollection QueryableCollection { get => throw null; set => throw null; } + public override string RenderScalarIdentifierSelect(int i) => throw null; + } + + + public ComponentJoin(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, NHibernate.Hql.Ast.ANTLR.Tree.FromElement origin, string alias, string componentPath, NHibernate.Type.ComponentType componentType) : base(default(Antlr.Runtime.IToken)) => throw null; + public string ComponentPath { get => throw null; } + public string ComponentProperty { get => throw null; } + public NHibernate.Type.ComponentType ComponentType { get => throw null; } + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public override string GetDisplayText() => throw null; + public override string GetIdentityColumn() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ConstructorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConstructorNode : NHibernate.Hql.Ast.ANTLR.Tree.SelectExpressionList, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public string Alias { get => throw null; set => throw null; } + public System.Reflection.ConstructorInfo Constructor { get => throw null; } + public System.Collections.Generic.IList ConstructorArgumentTypeList { get => throw null; } + public ConstructorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; } + public string[] GetAliases() => throw null; + protected internal override NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetFirstSelectExpression() => throw null; + public bool IsConstructor { get => throw null; } + public bool IsList { get => throw null; } + public bool IsMap { get => throw null; } + public bool IsReturnableEntity { get => throw null; } + public bool IsScalar { get => throw null; } + public void Prepare() => throw null; + public int ScalarColumnIndex { get => throw null; } + public void SetScalarColumn(int i) => throw null; + public void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.DeleteStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DeleteStatement : NHibernate.Hql.Ast.ANTLR.Tree.AbstractRestrictableStatement + { + public DeleteStatement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected override NHibernate.INHibernateLogger GetLog() => throw null; + protected override int GetWhereClauseParentTokenType() => throw null; + public override bool NeedsExecutor { get => throw null; } + public override int StatementType { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.DotNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DotNode : NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode + { + public DotNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public bool Fetch { set => throw null; } + public override NHibernate.Hql.Ast.ANTLR.Tree.FromElement GetImpliedJoin() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode GetLhs() => throw null; + public NHibernate.SqlCommand.JoinType JoinType { set => throw null; } + public override string Path { get => throw null; } + public string PropertyPath { get => throw null; set => throw null; } + public static bool REGRESSION_STYLE_JOIN_SUPPRESSION; + public override void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void ResolveFirstChild() => throw null; + public override void ResolveInFunctionCall(bool generateJoin, bool implicitJoin) => throw null; + public override void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public void ResolveSelectExpression() => throw null; + public void SetResolvedConstant(string text) => throw null; + public override void SetScalarColumnText(int i) => throw null; + public static bool UseThetaStyleImplicitJoins; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.FromClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FromClause : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public void AddCollectionJoinFromElementByPath(string path, NHibernate.Hql.Ast.ANTLR.Tree.FromElement destination) => throw null; + public void AddDuplicateAlias(string alias, NHibernate.Hql.Ast.ANTLR.Tree.FromElement element) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement AddFromElement(string path, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode alias) => throw null; + public void AddJoinByPathMap(string path, NHibernate.Hql.Ast.ANTLR.Tree.FromElement destination) => throw null; + public bool ContainsClassAlias(string alias) => throw null; + public bool ContainsTableAlias(string alias) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FindCollectionJoin(string path) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FindJoinByPath(string path) => throw null; + public FromClause(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public System.Collections.Generic.IList GetCollectionFetches() => throw null; + public string GetDisplayText() => throw null; + public System.Collections.Generic.IList GetExplicitFromElements() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement GetFromElement(string aliasOrClassName) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement GetFromElement() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement GetFromElementByClassName(string className) => throw null; + public System.Collections.Generic.IList GetFromElements() => throw null; + public System.Collections.Generic.IList GetProjectionList() => throw null; + public bool IsFromElementAlias(string possibleAlias) => throw null; + public bool IsSubQuery { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromClause ParentFromClause { get => throw null; } + public void RegisterFromElement(NHibernate.Hql.Ast.ANTLR.Tree.FromElement element) => throw null; + public virtual void Resolve() => throw null; + public void SetParentFromClause(NHibernate.Hql.Ast.ANTLR.Tree.FromClause parentFromClause) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.FromElement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FromElement : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IParameterContainer, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public void AddEmbeddedParameter(NHibernate.Param.IParameterSpecification specification) => throw null; + protected void AppendDisplayText(System.Text.StringBuilder buf) => throw null; + public void CheckInitialized() => throw null; + public string ClassAlias { get => throw null; } + public string ClassName { get => throw null; } + public bool CollectionJoin { get => throw null; set => throw null; } + public string CollectionSuffix { get => throw null; set => throw null; } + public string CollectionTableAlias { get => throw null; set => throw null; } + public string[] Columns { get => throw null; set => throw null; } + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IEntityPersister EntityPersister { get => throw null; } + public bool Fetch { get => throw null; set => throw null; } + public string[] FetchLazyProperties { get => throw null; set => throw null; } + public bool Filter { set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromClause FromClause { get => throw null; } + public FromElement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected FromElement(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, NHibernate.Hql.Ast.ANTLR.Tree.FromElement origin, string alias) : base(default(Antlr.Runtime.IToken)) => throw null; + public virtual string GetDisplayText() => throw null; + public NHibernate.Param.IParameterSpecification[] GetEmbeddedParameters() => throw null; + public virtual string GetIdentityColumn() => throw null; + public NHibernate.Persister.Entity.IPropertyMapping GetPropertyMapping(string propertyName) => throw null; + public NHibernate.Type.IType GetPropertyType(string propertyName, string propertyPath) => throw null; + public void HandlePropertyBeingDereferenced(NHibernate.Type.IType propertySource, string propertyName) => throw null; + public bool HasEmbeddedParameters { get => throw null; } + public virtual bool InProjectionList { get => throw null; set => throw null; } + public virtual bool IncludeSubclasses { get => throw null; set => throw null; } + public NHibernate.Param.IParameterSpecification IndexCollectionSelectorParamSpec { get => throw null; set => throw null; } + public void InitializeCollection(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, string classAlias, string tableAlias) => throw null; + protected void InitializeComponentJoin(NHibernate.Hql.Ast.ANTLR.Tree.FromElementType elementType) => throw null; + public void InitializeEntity(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, string className, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Type.EntityType type, string classAlias, string tableAlias) => throw null; + public bool IsAllPropertyFetch { get => throw null; set => throw null; } + public bool IsCollectionJoin { get => throw null; } + public bool IsCollectionOfValuesOrComponents { get => throw null; } + public bool IsDereferencedBySubclassProperty { get => throw null; } + public bool IsDereferencedBySuperclassOrSubclassProperty { get => throw null; } + public bool IsEntity { get => throw null; } + public bool IsFetch { get => throw null; } + public bool IsFilter { get => throw null; } + public bool IsFromOrJoinFragment { get => throw null; } + public virtual bool IsImplied { get => throw null; } + public virtual bool IsImpliedInFromClause { get => throw null; } + public NHibernate.Engine.JoinSequence JoinSequence { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement Origin { get => throw null; } + public NHibernate.Persister.Entity.IQueryable Queryable { get => throw null; } + public NHibernate.Persister.Collection.IQueryableCollection QueryableCollection { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement RealOrigin { get => throw null; } + public string RenderCollectionSelectFragment(int size, int k) => throw null; + public string RenderIdentifierSelect(int size, int k) => throw null; + public string RenderPropertySelect(int size, int k) => throw null; + public string RenderScalarIdentifierSelect(int i) => throw null; + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public string RenderValueCollectionSelectFragment(int size, int k) => throw null; + public NHibernate.Type.IType SelectType { get => throw null; } + public void SetAllPropertyFetch(bool fetch) => throw null; + public virtual void SetImpliedInFromClause(bool flag) => throw null; + public void SetIncludeSubclasses(bool includeSubclasses) => throw null; + public void SetIndexCollectionSelectorParamSpec(NHibernate.Param.IParameterSpecification indexCollectionSelectorParamSpec) => throw null; + public void SetOrigin(NHibernate.Hql.Ast.ANTLR.Tree.FromElement origin, bool manyToMany) => throw null; + public void SetRole(string role) => throw null; + public void SetWithClauseFragment(string withClauseJoinAlias, NHibernate.SqlCommand.SqlString withClauseFragment) => throw null; + public string TableAlias { get => throw null; } + public string[] ToColumns(string tableAlias, string path, bool inSelect, bool forceAlias) => throw null; + public string[] ToColumns(string tableAlias, string path, bool inSelect) => throw null; + public bool UseFromFragment { get => throw null; set => throw null; } + public bool UseWhereFragment { get => throw null; set => throw null; } + public NHibernate.SqlCommand.SqlString WithClauseFragment { get => throw null; } + public string WithClauseJoinAlias { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.FromElementFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FromElementFactory + { + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement AddFromElement() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement CreateCollection(NHibernate.Persister.Collection.IQueryableCollection queryableCollection, string role, NHibernate.SqlCommand.JoinType joinType, bool fetchFlag, bool indexed) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement CreateCollectionElementsJoin(NHibernate.Persister.Collection.IQueryableCollection queryableCollection, string collectionName) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement CreateComponentJoin(NHibernate.Type.ComponentType type) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement CreateElementJoin(NHibernate.Persister.Collection.IQueryableCollection queryableCollection) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement CreateEntityJoin(string entityClass, string tableAlias, NHibernate.Engine.JoinSequence joinSequence, bool fetchFlag, bool inFrom, NHibernate.Type.EntityType type) => throw null; + public FromElementFactory(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, NHibernate.Hql.Ast.ANTLR.Tree.FromElement origin, string path, string classAlias, string[] columns, bool implied) => throw null; + public FromElementFactory(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause, NHibernate.Hql.Ast.ANTLR.Tree.FromElement origin, string path) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.FromElementType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FromElementType + { + public string CollectionSuffix { get => throw null; set => throw null; } + public virtual NHibernate.Type.IType DataType { get => throw null; } + public NHibernate.Persister.Entity.IEntityPersister EntityPersister { get => throw null; } + public FromElementType(NHibernate.Hql.Ast.ANTLR.Tree.FromElement fromElement, NHibernate.Persister.Entity.IEntityPersister persister, NHibernate.Type.EntityType entityType) => throw null; + protected FromElementType(NHibernate.Hql.Ast.ANTLR.Tree.FromElement fromElement) => throw null; + public virtual NHibernate.Persister.Entity.IPropertyMapping GetPropertyMapping(string propertyName) => throw null; + public virtual NHibernate.Type.IType GetPropertyType(string propertyName, string propertyPath) => throw null; + public NHibernate.Param.IParameterSpecification IndexCollectionSelectorParamSpec { get => throw null; set => throw null; } + public bool IsCollectionOfValuesOrComponents { get => throw null; } + public bool IsEntity { get => throw null; } + public NHibernate.Engine.JoinSequence JoinSequence { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.IQueryable Queryable { get => throw null; } + public virtual NHibernate.Persister.Collection.IQueryableCollection QueryableCollection { get => throw null; set => throw null; } + public string RenderCollectionSelectFragment(int size, int k) => throw null; + public string RenderIdentifierSelect(int size, int k) => throw null; + public string RenderPropertySelect(int size, int k, string[] fetchLazyProperties) => throw null; + public string RenderPropertySelect(int size, int k, bool allProperties) => throw null; + public virtual string RenderScalarIdentifierSelect(int i) => throw null; + public string RenderValueCollectionSelectFragment(int size, int k) => throw null; + public NHibernate.Type.IType SelectType { get => throw null; } + public string[] ToColumns(string tableAlias, string path, bool inSelect, bool forceAlias) => throw null; + public string[] ToColumns(string tableAlias, string path, bool inSelect) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class FromReferenceNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.IResolvableNode, NHibernate.Hql.Ast.ANTLR.Tree.IPathNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public override NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; set => throw null; } + protected FromReferenceNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public string GetDisplayText() => throw null; + public virtual NHibernate.Hql.Ast.ANTLR.Tree.FromElement GetImpliedJoin() => throw null; + public bool IsResolved { get => throw null; set => throw null; } + public override bool IsReturnableEntity { get => throw null; } + public virtual string Path { get => throw null; } + public virtual void PrepareForDot(string propertyName) => throw null; + public void RecursiveResolve(int level, bool impliedAtRoot, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public void Resolve(bool generateJoin, bool implicitJoin, string classAlias) => throw null; + public void Resolve(bool generateJoin, bool implicitJoin) => throw null; + public abstract void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent); + public virtual void ResolveFirstChild() => throw null; + public virtual void ResolveInFunctionCall(bool generateJoin, bool implicitJoin) => throw null; + public abstract void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent); + public const int RootLevel = default; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSqlWalkerNode : NHibernate.Hql.Ast.ANTLR.Tree.SqlNode, NHibernate.Hql.Ast.ANTLR.Tree.IInitializableNode + { + public NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory ASTFactory { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Util.AliasGenerator AliasGenerator { get => throw null; } + public HqlSqlWalkerNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public virtual void Initialize(object param) => throw null; + public NHibernate.Hql.Ast.ANTLR.HqlSqlWalker Walker { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerTreeAdaptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlSqlWalkerTreeAdaptor : NHibernate.Hql.Ast.ANTLR.Tree.ASTTreeAdaptor + { + public override object Create(Antlr.Runtime.IToken payload) => throw null; + public override object DupNode(object t) => throw null; + public override object ErrorNode(Antlr.Runtime.ITokenStream input, Antlr.Runtime.IToken start, Antlr.Runtime.IToken stop, Antlr.Runtime.RecognitionException e) => throw null; + public HqlSqlWalkerTreeAdaptor(object walker) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IASTFactory + { + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode CreateNode(int type, string text, params NHibernate.Hql.Ast.ANTLR.Tree.IASTNode[] children); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IASTNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IASTNode : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode AddChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode childNode); + void AddChildren(params NHibernate.Hql.Ast.ANTLR.Tree.IASTNode[] children); + void AddChildren(System.Collections.Generic.IEnumerable children); + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode AddSibling(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newSibling); + int CharPositionInLine { get; } + int ChildCount { get; } + int ChildIndex { get; } + void ClearChildren(); + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode DupNode(); + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetChild(int index); + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetFirstChild(); + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode InsertChild(int index, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child); + bool IsNil { get; } + int Line { get; } + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode NextSibling { get; } + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Parent { get; set; } + void RemoveChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child); + void SetChild(int index, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newChild); + void SetFirstChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode newChild); + string Text { get; set; } + string ToStringTree(); + Antlr.Runtime.IToken Token { get; } + int Type { get; set; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IBinaryOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBinaryOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode + { + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode LeftHandOperand { get; } + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode RightHandOperand { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDisplayableNode + { + string GetDisplayText(); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IExpectedTypeAwareNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IExpectedTypeAwareNode + { + NHibernate.Type.IType ExpectedType { get; set; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IInitializableNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInitializableNode + { + void Initialize(object param); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOperatorNode + { + NHibernate.Type.IType DataType { get; } + void Initialize(); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IParameterContainer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParameterContainer + { + void AddEmbeddedParameter(NHibernate.Param.IParameterSpecification specification); + NHibernate.Param.IParameterSpecification[] GetEmbeddedParameters(); + bool HasEmbeddedParameters { get; } + string Text { set; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IPathNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPathNode + { + string Path { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IResolvableNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IResolvableNode + { + void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent); + void Resolve(bool generateJoin, bool implicitJoin, string classAlias); + void Resolve(bool generateJoin, bool implicitJoin); + void ResolveInFunctionCall(bool generateJoin, bool implicitJoin); + void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IRestrictableStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRestrictableStatement : NHibernate.Hql.Ast.ANTLR.Tree.IStatement + { + NHibernate.Hql.Ast.ANTLR.Tree.FromClause FromClause { get; } + bool HasWhereClause { get; } + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode WhereClause { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISelectExpression + { + string Alias { get; set; } + NHibernate.Type.IType DataType { get; } + NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get; } + bool IsConstructor { get; } + bool IsReturnableEntity { get; } + bool IsScalar { get; } + int ScalarColumnIndex { get; } + void SetScalarColumn(int i); + void SetScalarColumnText(int i); + string Text { set; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ISessionFactoryAwareNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionFactoryAwareNode + { + NHibernate.Engine.ISessionFactoryImplementor SessionFactory { set; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatement + { + bool NeedsExecutor { get; } + int StatementType { get; } + NHibernate.Hql.Ast.ANTLR.HqlSqlWalker Walker { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IUnaryOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUnaryOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode + { + NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Operand { get; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IdentNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentNode : NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public IdentNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ImpliedFromElement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ImpliedFromElement : NHibernate.Hql.Ast.ANTLR.Tree.FromElement + { + public override string GetDisplayText() => throw null; + public ImpliedFromElement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override bool InProjectionList { get => throw null; set => throw null; } + public override bool IncludeSubclasses { get => throw null; set => throw null; } + public override bool IsImplied { get => throw null; } + public override bool IsImpliedInFromClause { get => throw null; } + public override void SetImpliedInFromClause(bool flag) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.InLogicOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InLogicOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.BinaryLogicOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IBinaryOperatorNode + { + public InLogicOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override void Initialize() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IndexNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexNode : NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode + { + public IndexNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override void PrepareForDot(string propertyName) => throw null; + public override void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.InsertStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertStatement : NHibernate.Hql.Ast.ANTLR.Tree.AbstractStatement + { + public InsertStatement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IntoClause IntoClause { get => throw null; } + public override bool NeedsExecutor { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.SelectClause SelectClause { get => throw null; } + public override int StatementType { get => throw null; } + public virtual void Validate() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IntoClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IntoClause : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public string GetDisplayText() => throw null; + public void Initialize(NHibernate.Persister.Entity.IQueryable persister) => throw null; + public IntoClause(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public bool IsDiscriminated { get => throw null; } + public bool IsExplicitIdInsertion { get => throw null; } + public bool IsExplicitVersionInsertion { get => throw null; } + public void PrependIdColumnSpec() => throw null; + public void PrependVersionColumnSpec() => throw null; + public NHibernate.Persister.Entity.IQueryable Queryable { get => throw null; } + public void ValidateTypes(NHibernate.Hql.Ast.ANTLR.Tree.SelectClause selectClause) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IsNotNullLogicOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IsNotNullLogicOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractNullnessCheckNode + { + protected override string ExpansionConnectorText { get => throw null; } + protected override int ExpansionConnectorType { get => throw null; } + public IsNotNullLogicOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.IsNullLogicOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IsNullLogicOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractNullnessCheckNode + { + protected override string ExpansionConnectorText { get => throw null; } + protected override int ExpansionConnectorType { get => throw null; } + public IsNullLogicOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.JavaConstantNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JavaConstantNode : NHibernate.Hql.Ast.ANTLR.Tree.SqlNode, NHibernate.Hql.Ast.ANTLR.Tree.ISessionFactoryAwareNode, NHibernate.Hql.Ast.ANTLR.Tree.IExpectedTypeAwareNode + { + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public JavaConstantNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public NHibernate.Engine.ISessionFactoryImplementor SessionFactory { set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.LiteralNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LiteralNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression + { + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public LiteralNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.MethodNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MethodNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression + { + public override NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; set => throw null; } + public string GetDisplayText() => throw null; + public void InitializeMethodNode(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode name, bool inSelect) => throw null; + public bool IsCollectionPropertyMethod { get => throw null; } + public override bool IsScalar { get => throw null; } + public MethodNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + protected virtual void PrepareSelectColumns(string[] columns) => throw null; + public virtual void Resolve(bool inSelect) => throw null; + public void ResolveCollectionProperty(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode expr) => throw null; + public NHibernate.Dialect.Function.ISQLFunction SQLFunction { get => throw null; } + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.OrderByClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OrderByClause : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode + { + public void AddOrderFragment(string orderByFragment) => throw null; + public OrderByClause(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ParameterNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParameterNode : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.IExpectedTypeAwareNode, NHibernate.Hql.Ast.ANTLR.Tree.IDisplayableNode + { + public string Alias { get => throw null; set => throw null; } + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; } + public string GetDisplayText() => throw null; + public NHibernate.Param.IParameterSpecification HqlParameterSpecification { get => throw null; set => throw null; } + public bool IsConstructor { get => throw null; } + public bool IsReturnableEntity { get => throw null; } + public bool IsScalar { get => throw null; } + public ParameterNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public int ScalarColumnIndex { get => throw null; } + public void SetScalarColumn(int i) => throw null; + public void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.QueryNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractRestrictableStatement, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public string Alias { get => throw null; set => throw null; } + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; } + protected override NHibernate.INHibernateLogger GetLog() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.OrderByClause GetOrderByClause() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.SelectClause GetSelectClause() => throw null; + protected override int GetWhereClauseParentTokenType() => throw null; + public bool IsConstructor { get => throw null; } + public bool IsReturnableEntity { get => throw null; } + public bool IsScalar { get => throw null; } + public override bool NeedsExecutor { get => throw null; } + public QueryNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public int ScalarColumnIndex { get => throw null; } + public void SetScalarColumn(int i) => throw null; + public void SetScalarColumnText(int i) => throw null; + public override int StatementType { get => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.ResultVariableRefNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultVariableRefNode : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode + { + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public ResultVariableRefNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public void SetSelectExpression(NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression selectExpression) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.SelectClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectClause : NHibernate.Hql.Ast.ANTLR.Tree.SelectExpressionList + { + public System.Collections.Generic.IList CollectionFromElements { get => throw null; } + public string[][] ColumnNames { get => throw null; } + public System.Reflection.ConstructorInfo Constructor { get => throw null; } + public System.Collections.Generic.IList FromElementsForLoad { get => throw null; } + public int GetColumnNamesStartPosition(int i) => throw null; + protected internal override NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetFirstSelectExpression() => throw null; + public void InitializeDerivedSelectClause(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause) => throw null; + public void InitializeExplicitSelectClause(NHibernate.Hql.Ast.ANTLR.Tree.FromClause fromClause) => throw null; + public bool IsDistinct { get => throw null; } + public bool IsList { get => throw null; } + public bool IsMap { get => throw null; } + public bool IsScalarSelect { get => throw null; } + public string[] QueryReturnAliases { get => throw null; } + public NHibernate.Type.IType[] QueryReturnTypes { get => throw null; } + public SelectClause(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public static bool VERSION2_SQL; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.SelectExpressionImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectExpressionImpl : NHibernate.Hql.Ast.ANTLR.Tree.FromReferenceNode, NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression + { + public override void Resolve(bool generateJoin, bool implicitJoin, string classAlias, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public override void ResolveIndex(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public SelectExpressionImpl(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + public override void SetScalarColumnText(int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.SelectExpressionList` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SelectExpressionList : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode + { + public NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression[] CollectSelectExpressions(bool recurse) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.ISelectExpression[] CollectSelectExpressions() => throw null; + protected internal abstract NHibernate.Hql.Ast.ANTLR.Tree.IASTNode GetFirstSelectExpression(); + protected SelectExpressionList(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.SqlFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlFragment : NHibernate.Hql.Ast.ANTLR.Tree.SqlNode, NHibernate.Hql.Ast.ANTLR.Tree.IParameterContainer + { + public void AddEmbeddedParameter(NHibernate.Param.IParameterSpecification specification) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.FromElement FromElement { get => throw null; set => throw null; } + public NHibernate.Param.IParameterSpecification[] GetEmbeddedParameters() => throw null; + public bool HasEmbeddedParameters { get => throw null; } + public bool HasFilterCondition { get => throw null; } + public override NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public void SetJoinFragment(NHibernate.SqlCommand.JoinFragment joinFragment) => throw null; + public SqlFragment(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.SqlNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlNode : NHibernate.Hql.Ast.ANTLR.Tree.ASTNode + { + public virtual NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public string OriginalText { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString RenderText(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public SqlNode(Antlr.Runtime.IToken token) => throw null; + public override string Text { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.UnaryArithmeticNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnaryArithmeticNode : NHibernate.Hql.Ast.ANTLR.Tree.AbstractSelectExpression, NHibernate.Hql.Ast.ANTLR.Tree.IUnaryOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode + { + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public void Initialize() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Operand { get => throw null; } + public override void SetScalarColumnText(int i) => throw null; + public UnaryArithmeticNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.UnaryLogicOperatorNode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnaryLogicOperatorNode : NHibernate.Hql.Ast.ANTLR.Tree.HqlSqlWalkerNode, NHibernate.Hql.Ast.ANTLR.Tree.IUnaryOperatorNode, NHibernate.Hql.Ast.ANTLR.Tree.IOperatorNode + { + public override NHibernate.Type.IType DataType { get => throw null; set => throw null; } + public virtual void Initialize() => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Operand { get => throw null; } + public UnaryLogicOperatorNode(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Tree.UpdateStatement` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UpdateStatement : NHibernate.Hql.Ast.ANTLR.Tree.AbstractRestrictableStatement + { + protected override NHibernate.INHibernateLogger GetLog() => throw null; + protected override int GetWhereClauseParentTokenType() => throw null; + public override bool NeedsExecutor { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode SetClause { get => throw null; } + public override int StatementType { get => throw null; } + public UpdateStatement(Antlr.Runtime.IToken token) : base(default(Antlr.Runtime.IToken)) => throw null; + } + + } + namespace Util + { + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.ASTAppender` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTAppender + { + public ASTAppender(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent) => throw null; + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Append(int type, string text, bool appendIfEmpty) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.ASTIterator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ASTIterator : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public ASTIterator(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode tree) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.ASTUtil` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ASTUtil + { + public static System.Collections.Generic.IList CollectChildren(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode root, NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate predicate) where TNode : NHibernate.Hql.Ast.ANTLR.Tree.IASTNode => throw null; + public static System.Collections.Generic.IList CollectChildren(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode root, NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate predicate) => throw null; + public static NHibernate.Hql.Ast.ANTLR.Tree.IASTNode FindTypeInChildren(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent, int type) => throw null; + public static string GetDebugstring(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode n) => throw null; + public static string GetPathText(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode n) => throw null; + public static bool IsSubtreeChild(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode fixture, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode test) => throw null; + public static void MakeSiblingOfParent(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode parent, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode child) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.AliasGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AliasGenerator + { + public AliasGenerator() => throw null; + public string CreateName(string name) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.CollectingNodeVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectingNodeVisitor : NHibernate.Hql.Ast.ANTLR.Util.CollectingNodeVisitor + { + public CollectingNodeVisitor(NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate predicate) : base(default(NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate)) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.CollectingNodeVisitor<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectingNodeVisitor : NHibernate.Hql.Ast.ANTLR.Util.IVisitationStrategy + { + public System.Collections.Generic.IList Collect(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode root) => throw null; + public CollectingNodeVisitor(NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate predicate) => throw null; + public void Visit(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.ColumnHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnHelper + { + public ColumnHelper() => throw null; + public static void GenerateScalarColumns(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node, string[] sqlColumns, int i) => throw null; + public static void GenerateSingleScalarColumn(NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory, NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node, int i) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.FilterPredicate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate bool FilterPredicate(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node); + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.IVisitationStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IVisitationStrategy + { + void Visit(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode node); + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.JoinProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinProcessor + { + public JoinProcessor(NHibernate.Hql.Ast.ANTLR.HqlSqlWalker walker) => throw null; + public static void ProcessDynamicFilterParameters(NHibernate.SqlCommand.SqlString sqlFragment, NHibernate.Hql.Ast.ANTLR.Tree.IParameterContainer container, NHibernate.Hql.Ast.ANTLR.HqlSqlWalker walker) => throw null; + public void ProcessJoins(NHibernate.Hql.Ast.ANTLR.Tree.QueryNode query) => throw null; + public void ProcessJoins(NHibernate.Hql.Ast.ANTLR.Tree.IRestrictableStatement query) => throw null; + public static NHibernate.SqlCommand.JoinType ToHibernateJoinType(int astJoinType) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.LiteralProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LiteralProcessor + { + public static int APPROXIMATE; + public static int DECIMAL_LITERAL_FORMAT; + public static int EXACT; + public const string ErrorCannotDetermineType = default; + public const string ErrorCannotFetchWithIterate = default; + public const string ErrorCannotFormatLiteral = default; + public const string ErrorNamedParameterDoesNotAppear = default; + public LiteralProcessor(NHibernate.Hql.Ast.ANTLR.HqlSqlWalker walker) => throw null; + public void LookupConstant(NHibernate.Hql.Ast.ANTLR.Tree.DotNode node) => throw null; + public void ProcessBoolean(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode constant) => throw null; + public void ProcessConstant(NHibernate.Hql.Ast.ANTLR.Tree.SqlNode constant, bool resolveIdent) => throw null; + public void ProcessNumericLiteral(NHibernate.Hql.Ast.ANTLR.Tree.SqlNode literal) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.NodeTraverser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NodeTraverser + { + public NodeTraverser(NHibernate.Hql.Ast.ANTLR.Util.IVisitationStrategy visitor) => throw null; + public void TraverseDepthFirst(NHibernate.Hql.Ast.ANTLR.Tree.IASTNode ast) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.PathHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PathHelper + { + public static string GetAlias(string path) => throw null; + public static NHibernate.Hql.Ast.ANTLR.Tree.IASTNode ParsePath(string path, NHibernate.Hql.Ast.ANTLR.Tree.IASTFactory factory) => throw null; + } + + // Generated from `NHibernate.Hql.Ast.ANTLR.Util.SyntheticAndFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SyntheticAndFactory + { + public virtual void AddDiscriminatorWhereFragment(NHibernate.Hql.Ast.ANTLR.Tree.IRestrictableStatement statement, NHibernate.Persister.Entity.IQueryable persister, System.Collections.Generic.IDictionary enabledFilters, string alias) => throw null; + public void AddWhereFragment(NHibernate.SqlCommand.JoinFragment joinFragment, NHibernate.SqlCommand.SqlString whereFragment, NHibernate.Hql.Ast.ANTLR.Tree.QueryNode query, NHibernate.Hql.Ast.ANTLR.Tree.FromElement fromElement, NHibernate.Hql.Ast.ANTLR.HqlSqlWalker hqlSqlWalker) => throw null; + public void AddWhereFragment(NHibernate.SqlCommand.JoinFragment joinFragment, NHibernate.SqlCommand.SqlString whereFragment, NHibernate.Hql.Ast.ANTLR.Tree.IRestrictableStatement query, NHibernate.Hql.Ast.ANTLR.Tree.FromElement fromElement, NHibernate.Hql.Ast.ANTLR.HqlSqlWalker hqlSqlWalker) => throw null; + public SyntheticAndFactory(NHibernate.Hql.Ast.ANTLR.HqlSqlWalker hqlSqlWalker) => throw null; + } + + } + } + } + namespace Util + { + // Generated from `NHibernate.Hql.Util.SessionFactoryHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionFactoryHelper + { + public NHibernate.Persister.Entity.IEntityPersister FindEntityPersisterUsingImports(string className) => throw null; + public NHibernate.Persister.Entity.IQueryable FindQueryableUsingImports(string className) => throw null; + public NHibernate.Persister.Collection.IQueryableCollection GetCollectionPersister(string role) => throw null; + public NHibernate.Persister.Entity.IPropertyMapping GetCollectionPropertyMapping(string role) => throw null; + public System.Type GetImportedClass(string className) => throw null; + public NHibernate.Persister.Entity.IEntityPersister RequireClassPersister(string name) => throw null; + public NHibernate.Persister.Collection.IQueryableCollection RequireQueryableCollection(string role) => throw null; + public SessionFactoryHelper(NHibernate.Engine.ISessionFactoryImplementor sfi) => throw null; + } + + } + } + namespace Id + { + // Generated from `NHibernate.Id.AbstractPostInsertGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractPostInsertGenerator : NHibernate.Id.IPostInsertIdentifierGenerator, NHibernate.Id.IIdentifierGenerator + { + protected AbstractPostInsertGenerator() => throw null; + public object Generate(NHibernate.Engine.ISessionImplementor s, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor s, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled); + } + + // Generated from `NHibernate.Id.Assigned` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Assigned : NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public Assigned() => throw null; + public void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Id.CounterGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CounterGenerator : NHibernate.Id.IIdentifierGenerator + { + protected System.Int16 Count { get => throw null; } + public CounterGenerator() => throw null; + public object Generate(NHibernate.Engine.ISessionImplementor cache, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor cache, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Id.ForeignGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ForeignGenerator : NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public ForeignGenerator() => throw null; + public object Generate(NHibernate.Engine.ISessionImplementor sessionImplementor, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor sessionImplementor, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Id.GuidCombGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GuidCombGenerator : NHibernate.Id.IIdentifierGenerator + { + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public GuidCombGenerator() => throw null; + } + + // Generated from `NHibernate.Id.GuidGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GuidGenerator : NHibernate.Id.IIdentifierGenerator + { + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public GuidGenerator() => throw null; + } + + // Generated from `NHibernate.Id.ICompositeKeyPostInsertIdentityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICompositeKeyPostInsertIdentityPersister + { + void BindSelectByUniqueKey(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames); + System.Threading.Tasks.Task BindSelectByUniqueKeyAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames, System.Threading.CancellationToken cancellationToken); + NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string[] suppliedPropertyNames, out NHibernate.Type.IType[] parameterTypes); + } + + // Generated from `NHibernate.Id.IConfigurable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConfigurable + { + void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect); + } + + // Generated from `NHibernate.Id.IIdentifierGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIdentifierGenerator + { + object Generate(NHibernate.Engine.ISessionImplementor session, object obj); + System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Id.IPersistentIdentifierGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistentIdentifierGenerator : NHibernate.Id.IIdentifierGenerator + { + string GeneratorKey(); + string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect); + string[] SqlDropString(NHibernate.Dialect.Dialect dialect); + } + + // Generated from `NHibernate.Id.IPostInsertIdentifierGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostInsertIdentifierGenerator : NHibernate.Id.IIdentifierGenerator + { + NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled); + } + + // Generated from `NHibernate.Id.IPostInsertIdentityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPostInsertIdentityPersister + { + string GetInfoString(); + NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string propertyName); + NHibernate.Type.IType IdentifierType { get; } + string IdentitySelectString { get; } + string[] RootTableKeyColumnNames { get; } + } + + // Generated from `NHibernate.Id.IdGeneratorParmsNames` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct IdGeneratorParmsNames + { + public static string EntityName; + // Stub generator skipped constructor + } + + // Generated from `NHibernate.Id.IdentifierGenerationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierGenerationException : NHibernate.HibernateException + { + public IdentifierGenerationException(string message, System.Exception e) => throw null; + public IdentifierGenerationException(string message) => throw null; + public IdentifierGenerationException() => throw null; + protected IdentifierGenerationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Id.IdentifierGeneratorFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class IdentifierGeneratorFactory + { + public static NHibernate.Id.IIdentifierGenerator Create(string strategy, NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public static object CreateNumber(System.Int64 value, System.Type type) => throw null; + public static object Get(System.Data.Common.DbDataReader rs, NHibernate.Type.IType type, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task GetAsync(System.Data.Common.DbDataReader rs, NHibernate.Type.IType type, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static object GetGeneratedIdentity(System.Data.Common.DbDataReader rs, NHibernate.Type.IType type, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task GetGeneratedIdentityAsync(System.Data.Common.DbDataReader rs, NHibernate.Type.IType type, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Type GetIdentifierGeneratorClass(string strategy, NHibernate.Dialect.Dialect dialect) => throw null; + public static object PostInsertIndicator; + public static object ShortCircuitIndicator; + } + + // Generated from `NHibernate.Id.IdentityGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentityGenerator : NHibernate.Id.AbstractPostInsertGenerator + { + // Generated from `NHibernate.Id.IdentityGenerator+BasicDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicDelegate : NHibernate.Id.Insert.AbstractSelectingDelegate, NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate + { + public BasicDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Id.IPostInsertIdentityPersister)) => throw null; + protected internal override object GetResult(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object obj) => throw null; + protected internal override System.Threading.Tasks.Task GetResultAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert() => throw null; + protected internal override NHibernate.SqlCommand.SqlString SelectSQL { get => throw null; } + } + + + public override NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled) => throw null; + public IdentityGenerator() => throw null; + // Generated from `NHibernate.Id.IdentityGenerator+InsertSelectDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertSelectDelegate : NHibernate.Id.Insert.AbstractReturningDelegate, NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate + { + public object DetermineGeneratedIdentifier(NHibernate.Engine.ISessionImplementor session, object entity) => throw null; + public override object ExecuteAndExtract(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ExecuteAndExtractAsync(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public InsertSelectDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Id.IPostInsertIdentityPersister)) => throw null; + protected internal override System.Data.Common.DbCommand Prepare(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal override System.Threading.Tasks.Task PrepareAsync(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert() => throw null; + } + + + } + + // Generated from `NHibernate.Id.IncrementGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IncrementGenerator : NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public IncrementGenerator() => throw null; + } + + // Generated from `NHibernate.Id.NativeGuidGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeGuidGenerator : NHibernate.Id.IIdentifierGenerator + { + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public NativeGuidGenerator() => throw null; + } + + // Generated from `NHibernate.Id.PersistentIdGeneratorParmsNames` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct PersistentIdGeneratorParmsNames + { + public static string Catalog; + public static string PK; + // Stub generator skipped constructor + public static string Schema; + public static NHibernate.AdoNet.Util.SqlStatementLogger SqlStatementLogger; + public static string Table; + public static string Tables; + } + + // Generated from `NHibernate.Id.SelectGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectGenerator : NHibernate.Id.AbstractPostInsertGenerator, NHibernate.Id.IConfigurable + { + public void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public override NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled) => throw null; + public SelectGenerator() => throw null; + // Generated from `NHibernate.Id.SelectGenerator+SelectGeneratorDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectGeneratorDelegate : NHibernate.Id.Insert.AbstractSelectingDelegate + { + protected internal override void BindParameters(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, object entity) => throw null; + protected internal override void BindParameters(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, NHibernate.Id.Insert.IBinder binder) => throw null; + protected internal override System.Threading.Tasks.Task BindParametersAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, object entity, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override System.Threading.Tasks.Task BindParametersAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, NHibernate.Id.Insert.IBinder binder, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override object GetResult(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object entity) => throw null; + protected internal override System.Threading.Tasks.Task GetResultAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object entity, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal override NHibernate.SqlTypes.SqlType[] ParametersTypes { get => throw null; } + public override NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert() => throw null; + internal SelectGeneratorDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, string suppliedUniqueKeyPropertyNames) : base(default(NHibernate.Id.IPostInsertIdentityPersister)) => throw null; + protected internal override NHibernate.SqlCommand.SqlString SelectSQL { get => throw null; } + } + + + } + + // Generated from `NHibernate.Id.SequenceGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceGenerator : NHibernate.Id.IPersistentIdentifierGenerator, NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public virtual void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public virtual object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public string GeneratorKey() => throw null; + public const string Parameters = default; + public const string Sequence = default; + public SequenceGenerator() => throw null; + public string SequenceName { get => throw null; } + public string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public string[] SqlDropString(NHibernate.Dialect.Dialect dialect) => throw null; + } + + // Generated from `NHibernate.Id.SequenceHiLoGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceHiLoGenerator : NHibernate.Id.SequenceGenerator + { + public override void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public override object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public const string MaxLo = default; + public SequenceHiLoGenerator() => throw null; + } + + // Generated from `NHibernate.Id.SequenceIdentityGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceIdentityGenerator : NHibernate.Id.SequenceGenerator, NHibernate.Id.IPostInsertIdentifierGenerator, NHibernate.Id.IIdentifierGenerator + { + public override object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled) => throw null; + // Generated from `NHibernate.Id.SequenceIdentityGenerator+SequenceIdentityDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceIdentityDelegate : NHibernate.Id.Insert.OutputParamReturningDelegate + { + public override NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert() => throw null; + public SequenceIdentityDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, string sequenceName) : base(default(NHibernate.Id.IPostInsertIdentityPersister), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + + public SequenceIdentityGenerator() => throw null; + } + + // Generated from `NHibernate.Id.TableGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableGenerator : NHibernate.Engine.TransactionHelper, NHibernate.Id.IPersistentIdentifierGenerator, NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public const string ColumnParamName = default; + public virtual void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public const string DefaultColumnName = default; + public const string DefaultTableName = default; + public override object DoWorkInCurrentTransaction(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction) => throw null; + public override System.Threading.Tasks.Task DoWorkInCurrentTransactionAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public string GeneratorKey() => throw null; + public virtual string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual string[] SqlDropString(NHibernate.Dialect.Dialect dialect) => throw null; + public TableGenerator() => throw null; + public const string TableParamName = default; + public const string Where = default; + protected NHibernate.SqlTypes.SqlType columnSqlType; + protected NHibernate.Type.PrimitiveType columnType; + } + + // Generated from `NHibernate.Id.TableHiLoGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableHiLoGenerator : NHibernate.Id.TableGenerator + { + public override void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public override object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public const string MaxLo = default; + public TableHiLoGenerator() => throw null; + } + + // Generated from `NHibernate.Id.TriggerIdentityGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TriggerIdentityGenerator : NHibernate.Id.AbstractPostInsertGenerator + { + public override NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate GetInsertGeneratedIdentifierDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory, bool isGetGeneratedKeysEnabled) => throw null; + public TriggerIdentityGenerator() => throw null; + } + + // Generated from `NHibernate.Id.UUIDHexGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UUIDHexGenerator : NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + public virtual void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + protected const string FormatWithDigitsOnly = default; + public virtual object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual string GenerateNewGuid() => throw null; + public UUIDHexGenerator() => throw null; + protected string format; + protected string sep; + } + + // Generated from `NHibernate.Id.UUIDStringGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UUIDStringGenerator : NHibernate.Id.IIdentifierGenerator + { + public object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public UUIDStringGenerator() => throw null; + } + + namespace Enhanced + { + // Generated from `NHibernate.Id.Enhanced.IAccessCallback` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAccessCallback + { + System.Int64 GetNextValue(); + System.Threading.Tasks.Task GetNextValueAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Id.Enhanced.IDatabaseStructure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDatabaseStructure + { + NHibernate.Id.Enhanced.IAccessCallback BuildCallback(NHibernate.Engine.ISessionImplementor session); + int IncrementSize { get; } + string Name { get; } + void Prepare(NHibernate.Id.Enhanced.IOptimizer optimizer); + string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect); + string[] SqlDropStrings(NHibernate.Dialect.Dialect dialect); + int TimesAccessed { get; } + } + + // Generated from `NHibernate.Id.Enhanced.IOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOptimizer + { + bool ApplyIncrementSizeToSourceValues { get; } + object Generate(NHibernate.Id.Enhanced.IAccessCallback callback); + System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback callback, System.Threading.CancellationToken cancellationToken); + int IncrementSize { get; } + System.Int64 LastSourceValue { get; } + } + + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OptimizerFactory + { + public static NHibernate.Id.Enhanced.IOptimizer BuildOptimizer(string type, System.Type returnClass, int incrementSize, System.Int64 explicitInitialValue) => throw null; + public const string HiLo = default; + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+HiLoOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HiLoOptimizer : NHibernate.Id.Enhanced.OptimizerFactory.OptimizerSupport + { + public override bool ApplyIncrementSizeToSourceValues { get => throw null; } + public override object Generate(NHibernate.Id.Enhanced.IAccessCallback callback) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback callback, System.Threading.CancellationToken cancellationToken) => throw null; + public HiLoOptimizer(System.Type returnClass, int incrementSize) : base(default(System.Type), default(int)) => throw null; + public System.Int64 HiValue { get => throw null; } + public override System.Int64 LastSourceValue { get => throw null; } + public System.Int64 LastValue { get => throw null; } + } + + + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+IInitialValueAwareOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInitialValueAwareOptimizer + { + void InjectInitialValue(System.Int64 initialValue); + } + + + public const string None = default; + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+NoopOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoopOptimizer : NHibernate.Id.Enhanced.OptimizerFactory.OptimizerSupport + { + public override bool ApplyIncrementSizeToSourceValues { get => throw null; } + public override object Generate(NHibernate.Id.Enhanced.IAccessCallback callback) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback callback, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 LastSourceValue { get => throw null; } + public NoopOptimizer(System.Type returnClass, int incrementSize) : base(default(System.Type), default(int)) => throw null; + } + + + public OptimizerFactory() => throw null; + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+OptimizerSupport` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class OptimizerSupport : NHibernate.Id.Enhanced.IOptimizer + { + public abstract bool ApplyIncrementSizeToSourceValues { get; } + public abstract object Generate(NHibernate.Id.Enhanced.IAccessCallback param); + public abstract System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback param, System.Threading.CancellationToken cancellationToken); + public int IncrementSize { get => throw null; set => throw null; } + public abstract System.Int64 LastSourceValue { get; } + protected virtual object Make(System.Int64 value) => throw null; + protected OptimizerSupport(System.Type returnClass, int incrementSize) => throw null; + public System.Type ReturnClass { get => throw null; set => throw null; } + } + + + public const string Pool = default; + public const string PoolLo = default; + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+PooledLoOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PooledLoOptimizer : NHibernate.Id.Enhanced.OptimizerFactory.OptimizerSupport + { + public override bool ApplyIncrementSizeToSourceValues { get => throw null; } + public override object Generate(NHibernate.Id.Enhanced.IAccessCallback callback) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback callback, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Int64 LastSourceValue { get => throw null; } + public System.Int64 LastValue { get => throw null; } + public PooledLoOptimizer(System.Type returnClass, int incrementSize) : base(default(System.Type), default(int)) => throw null; + } + + + // Generated from `NHibernate.Id.Enhanced.OptimizerFactory+PooledOptimizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PooledOptimizer : NHibernate.Id.Enhanced.OptimizerFactory.OptimizerSupport, NHibernate.Id.Enhanced.OptimizerFactory.IInitialValueAwareOptimizer + { + public override bool ApplyIncrementSizeToSourceValues { get => throw null; } + public override object Generate(NHibernate.Id.Enhanced.IAccessCallback callback) => throw null; + public override System.Threading.Tasks.Task GenerateAsync(NHibernate.Id.Enhanced.IAccessCallback callback, System.Threading.CancellationToken cancellationToken) => throw null; + public void InjectInitialValue(System.Int64 initialValue) => throw null; + public override System.Int64 LastSourceValue { get => throw null; } + public System.Int64 LastValue { get => throw null; } + public PooledOptimizer(System.Type returnClass, int incrementSize) : base(default(System.Type), default(int)) => throw null; + } + + + } + + // Generated from `NHibernate.Id.Enhanced.SequenceStructure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceStructure : NHibernate.Id.Enhanced.IDatabaseStructure + { + public NHibernate.Id.Enhanced.IAccessCallback BuildCallback(NHibernate.Engine.ISessionImplementor session) => throw null; + public int IncrementSize { get => throw null; } + public string Name { get => throw null; } + public void Prepare(NHibernate.Id.Enhanced.IOptimizer optimizer) => throw null; + public SequenceStructure(NHibernate.Dialect.Dialect dialect, string sequenceName, int initialValue, int incrementSize) => throw null; + public string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public string[] SqlDropStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public int TimesAccessed { get => throw null; } + } + + // Generated from `NHibernate.Id.Enhanced.SequenceStyleGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceStyleGenerator : NHibernate.Id.IPersistentIdentifierGenerator, NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + protected NHibernate.Id.Enhanced.IDatabaseStructure BuildDatabaseStructure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect, bool forceTableUse, string sequenceName, int initialValue, int incrementSize) => throw null; + public virtual void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public NHibernate.Id.Enhanced.IDatabaseStructure DatabaseStructure { get => throw null; set => throw null; } + public const int DefaultIncrementSize = default; + public const int DefaultInitialValue = default; + public const string DefaultSequenceName = default; + public const string DefaultValueColumnName = default; + protected int DetermineAdjustedIncrementSize(string optimizationStrategy, int incrementSize) => throw null; + protected int DetermineIncrementSize(System.Collections.Generic.IDictionary parms) => throw null; + protected int DetermineInitialValue(System.Collections.Generic.IDictionary parms) => throw null; + protected string DetermineOptimizationStrategy(System.Collections.Generic.IDictionary parms, int incrementSize) => throw null; + protected string DetermineSequenceName(System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + protected string DetermineValueColumnName(System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public const string ForceTableParam = default; + public virtual object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string GeneratorKey() => throw null; + public NHibernate.Type.IType IdentifierType { get => throw null; set => throw null; } + public const string IncrementParam = default; + public const string InitialParam = default; + public NHibernate.Id.Enhanced.IOptimizer Optimizer { get => throw null; set => throw null; } + public const string OptimizerParam = default; + protected bool RequiresPooledSequence(int initialValue, int incrementSize, NHibernate.Id.Enhanced.IOptimizer optimizer) => throw null; + public const string SequenceParam = default; + public SequenceStyleGenerator() => throw null; + public virtual string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual string[] SqlDropString(NHibernate.Dialect.Dialect dialect) => throw null; + public const string ValueColumnParam = default; + } + + // Generated from `NHibernate.Id.Enhanced.TableGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableGenerator : NHibernate.Engine.TransactionHelper, NHibernate.Id.IPersistentIdentifierGenerator, NHibernate.Id.IIdentifierGenerator, NHibernate.Id.IConfigurable + { + protected void BuildInsertQuery() => throw null; + protected void BuildSelectQuery(NHibernate.Dialect.Dialect dialect) => throw null; + protected void BuildUpdateQuery() => throw null; + public const string ConfigPreferSegmentPerEntity = default; + public virtual void Configure(NHibernate.Type.IType type, System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public const int DefaltInitialValue = default; + public const int DefaultIncrementSize = default; + public const string DefaultSegmentColumn = default; + public const int DefaultSegmentLength = default; + public const string DefaultSegmentValue = default; + public const string DefaultTable = default; + public const string DefaultValueColumn = default; + protected string DetermineDefaultSegmentValue(System.Collections.Generic.IDictionary parms) => throw null; + protected string DetermineGeneratorTableName(System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + protected int DetermineIncrementSize(System.Collections.Generic.IDictionary parms) => throw null; + protected int DetermineInitialValue(System.Collections.Generic.IDictionary parms) => throw null; + protected string DetermineSegmentColumnName(System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + protected int DetermineSegmentColumnSize(System.Collections.Generic.IDictionary parms) => throw null; + protected string DetermineSegmentValue(System.Collections.Generic.IDictionary parms) => throw null; + protected string DetermineValueColumnName(System.Collections.Generic.IDictionary parms, NHibernate.Dialect.Dialect dialect) => throw null; + public override object DoWorkInCurrentTransaction(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction) => throw null; + public override System.Threading.Tasks.Task DoWorkInCurrentTransactionAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object Generate(NHibernate.Engine.ISessionImplementor session, object obj) => throw null; + public virtual System.Threading.Tasks.Task GenerateAsync(NHibernate.Engine.ISessionImplementor session, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string GeneratorKey() => throw null; + public NHibernate.Type.IType IdentifierType { get => throw null; set => throw null; } + public const string IncrementParam = default; + public int IncrementSize { get => throw null; set => throw null; } + public const string InitialParam = default; + public int InitialValue { get => throw null; set => throw null; } + public NHibernate.Id.Enhanced.IOptimizer Optimizer { get => throw null; set => throw null; } + public const string OptimizerParam = default; + public string SegmentColumnName { get => throw null; set => throw null; } + public const string SegmentColumnParam = default; + public const string SegmentLengthParam = default; + public string SegmentValue { get => throw null; set => throw null; } + public int SegmentValueLength { get => throw null; set => throw null; } + public const string SegmentValueParam = default; + public virtual string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual string[] SqlDropString(NHibernate.Dialect.Dialect dialect) => throw null; + public System.Int64 TableAccessCount { get => throw null; set => throw null; } + public TableGenerator() => throw null; + public string TableName { get => throw null; set => throw null; } + public const string TableParam = default; + public string ValueColumnName { get => throw null; set => throw null; } + public const string ValueColumnParam = default; + } + + // Generated from `NHibernate.Id.Enhanced.TableStructure` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableStructure : NHibernate.Engine.TransactionHelper, NHibernate.Id.Enhanced.IDatabaseStructure + { + public virtual NHibernate.Id.Enhanced.IAccessCallback BuildCallback(NHibernate.Engine.ISessionImplementor session) => throw null; + public override object DoWorkInCurrentTransaction(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction) => throw null; + public override System.Threading.Tasks.Task DoWorkInCurrentTransactionAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbConnection conn, System.Data.Common.DbTransaction transaction, System.Threading.CancellationToken cancellationToken) => throw null; + public int IncrementSize { get => throw null; } + public string Name { get => throw null; } + public virtual void Prepare(NHibernate.Id.Enhanced.IOptimizer optimizer) => throw null; + public virtual string[] SqlCreateStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual string[] SqlDropStrings(NHibernate.Dialect.Dialect dialect) => throw null; + public TableStructure(NHibernate.Dialect.Dialect dialect, string tableName, string valueColumnName, int initialValue, int incrementSize) => throw null; + public int TimesAccessed { get => throw null; } + } + + } + namespace Insert + { + // Generated from `NHibernate.Id.Insert.AbstractReturningDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractReturningDelegate : NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate + { + protected AbstractReturningDelegate(NHibernate.Id.IPostInsertIdentityPersister persister) => throw null; + public abstract object ExecuteAndExtract(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session); + public abstract System.Threading.Tasks.Task ExecuteAndExtractAsync(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public object PerformInsert(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder) => throw null; + public System.Threading.Tasks.Task PerformInsertAsync(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Id.IPostInsertIdentityPersister Persister { get => throw null; } + protected internal abstract System.Data.Common.DbCommand Prepare(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session); + protected internal abstract System.Threading.Tasks.Task PrepareAsync(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public abstract NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert(); + protected internal virtual void ReleaseStatement(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Id.Insert.AbstractSelectingDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractSelectingDelegate : NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate + { + protected internal AbstractSelectingDelegate(NHibernate.Id.IPostInsertIdentityPersister persister) => throw null; + protected internal virtual void BindParameters(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, object entity) => throw null; + protected internal virtual void BindParameters(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, NHibernate.Id.Insert.IBinder binder) => throw null; + protected internal virtual System.Threading.Tasks.Task BindParametersAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, object entity, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal virtual System.Threading.Tasks.Task BindParametersAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand ps, NHibernate.Id.Insert.IBinder binder, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal abstract object GetResult(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object entity); + protected internal abstract System.Threading.Tasks.Task GetResultAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbDataReader rs, object entity, System.Threading.CancellationToken cancellationToken); + protected internal virtual NHibernate.SqlTypes.SqlType[] ParametersTypes { get => throw null; } + public object PerformInsert(NHibernate.SqlCommand.SqlCommandInfo insertSql, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder) => throw null; + public System.Threading.Tasks.Task PerformInsertAsync(NHibernate.SqlCommand.SqlCommandInfo insertSql, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert(); + protected internal abstract NHibernate.SqlCommand.SqlString SelectSQL { get; } + } + + // Generated from `NHibernate.Id.Insert.IBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBinder + { + void BindValues(System.Data.Common.DbCommand cm); + System.Threading.Tasks.Task BindValuesAsync(System.Data.Common.DbCommand cm, System.Threading.CancellationToken cancellationToken); + object Entity { get; } + } + + // Generated from `NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInsertGeneratedIdentifierDelegate + { + object PerformInsert(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder); + System.Threading.Tasks.Task PerformInsertAsync(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, NHibernate.Id.Insert.IBinder binder, System.Threading.CancellationToken cancellationToken); + NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert(); + } + + // Generated from `NHibernate.Id.Insert.IdentifierGeneratingInsert` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierGeneratingInsert : NHibernate.SqlCommand.SqlInsertBuilder + { + public IdentifierGeneratingInsert(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + // Generated from `NHibernate.Id.Insert.InsertSelectIdentityInsert` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertSelectIdentityInsert : NHibernate.Id.Insert.IdentifierGeneratingInsert + { + public InsertSelectIdentityInsert(NHibernate.Engine.ISessionFactoryImplementor factory, string identifierColumnName) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public InsertSelectIdentityInsert(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.Id.Insert.NoCommentsInsert` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoCommentsInsert : NHibernate.Id.Insert.IdentifierGeneratingInsert + { + public NoCommentsInsert(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override NHibernate.SqlCommand.SqlInsertBuilder SetComment(string comment) => throw null; + } + + // Generated from `NHibernate.Id.Insert.OutputParamReturningDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OutputParamReturningDelegate : NHibernate.Id.Insert.AbstractReturningDelegate + { + public override object ExecuteAndExtract(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ExecuteAndExtractAsync(System.Data.Common.DbCommand insert, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public OutputParamReturningDelegate(NHibernate.Id.IPostInsertIdentityPersister persister, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Id.IPostInsertIdentityPersister)) => throw null; + protected internal override System.Data.Common.DbCommand Prepare(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal override System.Threading.Tasks.Task PrepareAsync(NHibernate.SqlCommand.SqlCommandInfo insertSQL, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Id.Insert.IdentifierGeneratingInsert PrepareIdentifierGeneratingInsert() => throw null; + } + + // Generated from `NHibernate.Id.Insert.ReturningIdentifierInsert` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReturningIdentifierInsert : NHibernate.Id.Insert.NoCommentsInsert + { + public ReturningIdentifierInsert(NHibernate.Engine.ISessionFactoryImplementor factory, string identifierColumnName, string returnParameterName) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + } + } + namespace Impl + { + // Generated from `NHibernate.Impl.AbstractDetachedQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractDetachedQuery : NHibernate.Impl.IDetachedQueryImplementor, NHibernate.IDetachedQuery + { + protected AbstractDetachedQuery() => throw null; + public NHibernate.IDetachedQuery CopyParametersFrom(NHibernate.Impl.IDetachedQueryImplementor origin) => throw null; + public void CopyTo(NHibernate.IDetachedQuery destination) => throw null; + public abstract NHibernate.IQuery GetExecutableQuery(NHibernate.ISession session); + void NHibernate.Impl.IDetachedQueryImplementor.OverrideInfoFrom(NHibernate.Impl.IDetachedQueryImplementor origin) => throw null; + void NHibernate.Impl.IDetachedQueryImplementor.OverrideParametersFrom(NHibernate.Impl.IDetachedQueryImplementor origin) => throw null; + public NHibernate.IDetachedQuery SetAnsiString(string name, string val) => throw null; + public NHibernate.IDetachedQuery SetAnsiString(int position, string val) => throw null; + public NHibernate.IDetachedQuery SetBinary(string name, System.Byte[] val) => throw null; + public NHibernate.IDetachedQuery SetBinary(int position, System.Byte[] val) => throw null; + public NHibernate.IDetachedQuery SetBoolean(string name, bool val) => throw null; + public NHibernate.IDetachedQuery SetBoolean(int position, bool val) => throw null; + public NHibernate.IDetachedQuery SetByte(string name, System.Byte val) => throw null; + public NHibernate.IDetachedQuery SetByte(int position, System.Byte val) => throw null; + public virtual NHibernate.IDetachedQuery SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public virtual NHibernate.IDetachedQuery SetCacheRegion(string cacheRegion) => throw null; + public virtual NHibernate.IDetachedQuery SetCacheable(bool cacheable) => throw null; + public NHibernate.IDetachedQuery SetCharacter(string name, System.Char val) => throw null; + public NHibernate.IDetachedQuery SetCharacter(int position, System.Char val) => throw null; + public virtual NHibernate.IDetachedQuery SetComment(string comment) => throw null; + public NHibernate.IDetachedQuery SetDateTime(string name, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetDateTime(int position, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetDateTimeNoMs(string name, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetDateTimeNoMs(int position, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetDecimal(string name, System.Decimal val) => throw null; + public NHibernate.IDetachedQuery SetDecimal(int position, System.Decimal val) => throw null; + public NHibernate.IDetachedQuery SetDouble(string name, double val) => throw null; + public NHibernate.IDetachedQuery SetDouble(int position, double val) => throw null; + public NHibernate.IDetachedQuery SetEntity(string name, object val) => throw null; + public NHibernate.IDetachedQuery SetEntity(int position, object val) => throw null; + public NHibernate.IDetachedQuery SetEnum(string name, System.Enum val) => throw null; + public NHibernate.IDetachedQuery SetEnum(int position, System.Enum val) => throw null; + public virtual NHibernate.IDetachedQuery SetFetchSize(int fetchSize) => throw null; + public NHibernate.IDetachedQuery SetFirstResult(int firstResult) => throw null; + public virtual NHibernate.IDetachedQuery SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public NHibernate.IDetachedQuery SetGuid(string name, System.Guid val) => throw null; + public NHibernate.IDetachedQuery SetGuid(int position, System.Guid val) => throw null; + public NHibernate.IDetachedQuery SetIgnoreUknownNamedParameters(bool ignoredUnknownNamedParameters) => throw null; + public NHibernate.IDetachedQuery SetInt16(string name, System.Int16 val) => throw null; + public NHibernate.IDetachedQuery SetInt16(int position, System.Int16 val) => throw null; + public NHibernate.IDetachedQuery SetInt32(string name, int val) => throw null; + public NHibernate.IDetachedQuery SetInt32(int position, int val) => throw null; + public NHibernate.IDetachedQuery SetInt64(string name, System.Int64 val) => throw null; + public NHibernate.IDetachedQuery SetInt64(int position, System.Int64 val) => throw null; + public void SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + public NHibernate.IDetachedQuery SetMaxResults(int maxResults) => throw null; + public NHibernate.IDetachedQuery SetParameter(string name, object val, NHibernate.Type.IType type) => throw null; + public NHibernate.IDetachedQuery SetParameter(string name, object val) => throw null; + public NHibernate.IDetachedQuery SetParameter(int position, object val, NHibernate.Type.IType type) => throw null; + public NHibernate.IDetachedQuery SetParameter(int position, object val) => throw null; + public NHibernate.IDetachedQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type) => throw null; + public NHibernate.IDetachedQuery SetParameterList(string name, System.Collections.IEnumerable vals) => throw null; + public void SetParametersTo(NHibernate.IDetachedQuery destination) => throw null; + public NHibernate.IDetachedQuery SetProperties(object obj) => throw null; + protected void SetQueryProperties(NHibernate.IQuery q) => throw null; + public virtual NHibernate.IDetachedQuery SetReadOnly(bool readOnly) => throw null; + public NHibernate.IDetachedQuery SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + public NHibernate.IDetachedQuery SetSingle(string name, float val) => throw null; + public NHibernate.IDetachedQuery SetSingle(int position, float val) => throw null; + public NHibernate.IDetachedQuery SetString(string name, string val) => throw null; + public NHibernate.IDetachedQuery SetString(int position, string val) => throw null; + public NHibernate.IDetachedQuery SetTime(string name, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetTime(int position, System.DateTime val) => throw null; + public virtual NHibernate.IDetachedQuery SetTimeout(int timeout) => throw null; + public NHibernate.IDetachedQuery SetTimestamp(string name, System.DateTime val) => throw null; + public NHibernate.IDetachedQuery SetTimestamp(int position, System.DateTime val) => throw null; + protected NHibernate.CacheMode? cacheMode; + protected string cacheRegion; + protected bool cacheable; + protected string comment; + protected NHibernate.FlushMode flushMode; + protected System.Collections.Generic.Dictionary lockModes; + protected System.Collections.Generic.Dictionary namedListParams; + protected System.Collections.Generic.Dictionary namedParams; + protected System.Collections.Generic.Dictionary namedUntypeListParams; + protected System.Collections.Generic.Dictionary namedUntypeParams; + protected System.Collections.IList optionalUntypeParams; + protected System.Collections.Generic.Dictionary posParams; + protected System.Collections.Generic.Dictionary posUntypeParams; + protected bool readOnly; + protected NHibernate.Transform.IResultTransformer resultTransformer; + protected NHibernate.Engine.RowSelection selection; + protected bool shouldIgnoredUnknownNamedParameters; + } + + // Generated from `NHibernate.Impl.AbstractQueryImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractQueryImpl : NHibernate.IQuery + { + protected AbstractQueryImpl(string queryString, NHibernate.FlushMode flushMode, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) => throw null; + protected void After() => throw null; + protected void Before() => throw null; + public string CacheRegion { get => throw null; } + public bool Cacheable { get => throw null; } + protected internal virtual NHibernate.Type.IType DetermineType(string paramName, object paramValue, NHibernate.Type.IType defaultType) => throw null; + protected internal virtual NHibernate.Type.IType DetermineType(string paramName, object paramValue) => throw null; + protected internal virtual NHibernate.Type.IType DetermineType(string paramName, System.Type clazz) => throw null; + protected internal virtual NHibernate.Type.IType DetermineType(int paramPosition, object paramValue, NHibernate.Type.IType defaultType) => throw null; + protected internal virtual NHibernate.Type.IType DetermineType(int paramPosition, object paramValue) => throw null; + public abstract System.Collections.IEnumerable Enumerable(); + public abstract System.Collections.Generic.IEnumerable Enumerable(); + public abstract System.Threading.Tasks.Task EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract int ExecuteUpdate(); + public abstract System.Threading.Tasks.Task ExecuteUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal virtual string ExpandParameterLists(System.Collections.Generic.IDictionary namedParamsCopy) => throw null; + public NHibernate.IFutureEnumerable Future() => throw null; + public NHibernate.IFutureValue FutureValue() => throw null; + public virtual NHibernate.Engine.QueryParameters GetQueryParameters(System.Collections.Generic.IDictionary namedParams) => throw null; + public virtual NHibernate.Engine.QueryParameters GetQueryParameters() => throw null; + protected internal abstract System.Collections.Generic.IEnumerable GetTranslators(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters); + protected internal abstract System.Threading.Tasks.Task> GetTranslatorsAsync(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + public bool HasNamedParameters { get => throw null; } + public bool IsReadOnly { get => throw null; } + public abstract void List(System.Collections.IList results); + public abstract System.Collections.IList List(); + public abstract System.Collections.Generic.IList List(); + public abstract System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public abstract System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Collections.Generic.IDictionary LockModes { get; } + protected System.Collections.IDictionary NamedParameterLists { get => throw null; } + public string[] NamedParameters { get => throw null; } + protected internal System.Collections.Generic.IDictionary NamedParams { get => throw null; } + public string QueryString { get => throw null; } + public virtual string[] ReturnAliases { get => throw null; } + public virtual NHibernate.Type.IType[] ReturnTypes { get => throw null; } + protected NHibernate.Engine.RowSelection RowSelection { get => throw null; } + public NHibernate.Engine.RowSelection Selection { get => throw null; } + protected internal NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public NHibernate.IQuery SetAnsiString(string name, string val) => throw null; + public NHibernate.IQuery SetAnsiString(int position, string val) => throw null; + public NHibernate.IQuery SetBinary(string name, System.Byte[] val) => throw null; + public NHibernate.IQuery SetBinary(int position, System.Byte[] val) => throw null; + public NHibernate.IQuery SetBoolean(string name, bool val) => throw null; + public NHibernate.IQuery SetBoolean(int position, bool val) => throw null; + public NHibernate.IQuery SetByte(string name, System.Byte val) => throw null; + public NHibernate.IQuery SetByte(int position, System.Byte val) => throw null; + public NHibernate.IQuery SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.IQuery SetCacheRegion(string cacheRegion) => throw null; + public NHibernate.IQuery SetCacheable(bool cacheable) => throw null; + public NHibernate.IQuery SetCharacter(string name, System.Char val) => throw null; + public NHibernate.IQuery SetCharacter(int position, System.Char val) => throw null; + public NHibernate.IQuery SetCollectionKey(object collectionKey) => throw null; + public NHibernate.IQuery SetComment(string comment) => throw null; + public NHibernate.IQuery SetDateTime(string name, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTime(int position, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTime2(string name, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTime2(int position, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTimeNoMs(string name, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTimeNoMs(int position, System.DateTime val) => throw null; + public NHibernate.IQuery SetDateTimeOffset(string name, System.DateTimeOffset val) => throw null; + public NHibernate.IQuery SetDateTimeOffset(int position, System.DateTimeOffset val) => throw null; + public NHibernate.IQuery SetDecimal(string name, System.Decimal val) => throw null; + public NHibernate.IQuery SetDecimal(int position, System.Decimal val) => throw null; + public NHibernate.IQuery SetDouble(string name, double val) => throw null; + public NHibernate.IQuery SetDouble(int position, double val) => throw null; + public NHibernate.IQuery SetEntity(string name, object val) => throw null; + public NHibernate.IQuery SetEntity(int position, object val) => throw null; + public NHibernate.IQuery SetEnum(string name, System.Enum val) => throw null; + public NHibernate.IQuery SetEnum(int position, System.Enum val) => throw null; + public NHibernate.IQuery SetFetchSize(int fetchSize) => throw null; + public NHibernate.IQuery SetFirstResult(int firstResult) => throw null; + public NHibernate.IQuery SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public NHibernate.IQuery SetGuid(string name, System.Guid val) => throw null; + public NHibernate.IQuery SetGuid(int position, System.Guid val) => throw null; + public NHibernate.IQuery SetIgnoreUknownNamedParameters(bool ignoredUnknownNamedParameters) => throw null; + public NHibernate.IQuery SetInt16(string name, System.Int16 val) => throw null; + public NHibernate.IQuery SetInt16(int position, System.Int16 val) => throw null; + public NHibernate.IQuery SetInt32(string name, int val) => throw null; + public NHibernate.IQuery SetInt32(int position, int val) => throw null; + public NHibernate.IQuery SetInt64(string name, System.Int64 val) => throw null; + public NHibernate.IQuery SetInt64(int position, System.Int64 val) => throw null; + public abstract NHibernate.IQuery SetLockMode(string alias, NHibernate.LockMode lockMode); + public NHibernate.IQuery SetMaxResults(int maxResults) => throw null; + public void SetOptionalEntityName(string optionalEntityName) => throw null; + public void SetOptionalId(object optionalId) => throw null; + public void SetOptionalObject(object optionalObject) => throw null; + public NHibernate.IQuery SetParameter(string name, T val) => throw null; + public NHibernate.IQuery SetParameter(int position, T val) => throw null; + public NHibernate.IQuery SetParameter(string name, object val, NHibernate.Type.IType type) => throw null; + public NHibernate.IQuery SetParameter(string name, object val) => throw null; + public NHibernate.IQuery SetParameter(int position, object val, NHibernate.Type.IType type) => throw null; + public NHibernate.IQuery SetParameter(int position, object val) => throw null; + public NHibernate.IQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type) => throw null; + public NHibernate.IQuery SetParameterList(string name, System.Collections.IEnumerable vals) => throw null; + public NHibernate.IQuery SetProperties(object bean) => throw null; + public NHibernate.IQuery SetProperties(System.Collections.IDictionary map) => throw null; + public NHibernate.IQuery SetReadOnly(bool readOnly) => throw null; + public NHibernate.IQuery SetResultTransformer(NHibernate.Transform.IResultTransformer transformer) => throw null; + public NHibernate.IQuery SetSingle(string name, float val) => throw null; + public NHibernate.IQuery SetSingle(int position, float val) => throw null; + public NHibernate.IQuery SetString(string name, string val) => throw null; + public NHibernate.IQuery SetString(int position, string val) => throw null; + public NHibernate.IQuery SetTime(string name, System.DateTime val) => throw null; + public NHibernate.IQuery SetTime(int position, System.DateTime val) => throw null; + public NHibernate.IQuery SetTimeAsTimeSpan(string name, System.TimeSpan val) => throw null; + public NHibernate.IQuery SetTimeAsTimeSpan(int position, System.TimeSpan val) => throw null; + public NHibernate.IQuery SetTimeSpan(string name, System.TimeSpan val) => throw null; + public NHibernate.IQuery SetTimeSpan(int position, System.TimeSpan val) => throw null; + public NHibernate.IQuery SetTimeout(int timeout) => throw null; + public NHibernate.IQuery SetTimestamp(string name, System.DateTime val) => throw null; + public NHibernate.IQuery SetTimestamp(int position, System.DateTime val) => throw null; + public override string ToString() => throw null; + public virtual NHibernate.Type.IType[] TypeArray() => throw null; + protected virtual System.Collections.Generic.IList Types { get => throw null; } + public object UniqueResult() => throw null; + public T UniqueResult() => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public virtual object[] ValueArray() => throw null; + protected virtual System.Collections.IList Values { get => throw null; } + protected internal virtual void VerifyParameters(bool reserveFirstParameter) => throw null; + protected internal virtual void VerifyParameters() => throw null; + protected System.Collections.Generic.Dictionary namedParameterLists; + protected internal NHibernate.Engine.Query.ParameterMetadata parameterMetadata; + protected NHibernate.Engine.ISessionImplementor session; + } + + // Generated from `NHibernate.Impl.AbstractQueryImpl2` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractQueryImpl2 : NHibernate.Impl.AbstractQueryImpl + { + protected AbstractQueryImpl2(string queryString, NHibernate.FlushMode flushMode, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + public override System.Collections.IEnumerable Enumerable() => throw null; + public override System.Collections.Generic.IEnumerable Enumerable() => throw null; + public override System.Threading.Tasks.Task EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override int ExecuteUpdate() => throw null; + public override System.Threading.Tasks.Task ExecuteUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected abstract NHibernate.IQueryExpression ExpandParameters(System.Collections.Generic.IDictionary namedParamsCopy); + protected internal override System.Collections.Generic.IEnumerable GetTranslators(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected internal override System.Threading.Tasks.Task> GetTranslatorsAsync(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override void List(System.Collections.IList results) => throw null; + public override System.Collections.IList List() => throw null; + public override System.Collections.Generic.IList List() => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected internal override System.Collections.Generic.IDictionary LockModes { get => throw null; } + public override NHibernate.IQuery SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + } + + // Generated from `NHibernate.Impl.AbstractSessionImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractSessionImpl : NHibernate.Engine.ISessionImplementor + { + protected internal AbstractSessionImpl(NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Impl.ISessionCreationOptions options) => throw null; + internal AbstractSessionImpl() => throw null; + protected void AfterOperation(bool success) => throw null; + protected System.Threading.Tasks.Task AfterOperationAsync(bool success, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract void AfterTransactionBegin(NHibernate.ITransaction tx); + public abstract void AfterTransactionCompletion(bool successful, NHibernate.ITransaction tx); + public abstract System.Threading.Tasks.Task AfterTransactionCompletionAsync(bool successful, NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken); + public virtual bool AutoFlushIfRequired(System.Collections.Generic.ISet querySpaces) => throw null; + public virtual System.Threading.Tasks.Task AutoFlushIfRequiredAsync(System.Collections.Generic.ISet querySpaces, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.Engine.IBatcher Batcher { get => throw null; } + public abstract void BeforeTransactionCompletion(NHibernate.ITransaction tx); + public abstract System.Threading.Tasks.Task BeforeTransactionCompletionAsync(NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken); + public System.IDisposable BeginContext() => throw null; + public System.IDisposable BeginProcess() => throw null; + public NHibernate.ITransaction BeginTransaction(System.Data.IsolationLevel isolationLevel) => throw null; + public NHibernate.ITransaction BeginTransaction() => throw null; + public abstract string BestGuessEntityName(object entity); + public abstract NHibernate.CacheMode CacheMode { get; set; } + protected internal virtual void CheckAndUpdateSessionStatus() => throw null; + protected System.Data.Common.DbConnection CloseConnectionManager() => throw null; + public abstract void CloseSessionFromSystemTransaction(); + public virtual System.Data.Common.DbConnection Connection { get => throw null; } + public virtual NHibernate.AdoNet.ConnectionManager ConnectionManager { get => throw null; set => throw null; } + protected System.Exception Convert(System.Exception sqlException, string message) => throw null; + public abstract NHibernate.IQuery CreateFilter(object collection, NHibernate.IQueryExpression queryExpression); + public abstract System.Threading.Tasks.Task CreateFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, System.Threading.CancellationToken cancellationToken); + public virtual NHibernate.IQuery CreateQuery(string queryString) => throw null; + public virtual NHibernate.IQuery CreateQuery(NHibernate.IQueryExpression queryExpression) => throw null; + public virtual NHibernate.Multi.IQueryBatch CreateQueryBatch() => throw null; + public virtual NHibernate.ISQLQuery CreateSQLQuery(string sql) => throw null; + public abstract System.Collections.Generic.IDictionary EnabledFilters { get; } + protected void EnlistInAmbientTransactionIfNeeded() => throw null; + public abstract System.Collections.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters); + public abstract System.Collections.Generic.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters); + public abstract System.Threading.Tasks.Task EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task> EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + public abstract System.Collections.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + public abstract System.Collections.Generic.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + public abstract System.Threading.Tasks.Task EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task> EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + protected virtual void ErrorIfClosed() => throw null; + public abstract int ExecuteNativeUpdate(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification specification, NHibernate.Engine.QueryParameters queryParameters); + public abstract System.Threading.Tasks.Task ExecuteNativeUpdateAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification specification, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + public abstract int ExecuteUpdate(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters); + public abstract System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken); + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; set => throw null; } + public abstract string FetchProfile { get; set; } + public abstract void Flush(); + public abstract System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken); + public abstract void FlushBeforeTransactionCompletion(); + public abstract System.Threading.Tasks.Task FlushBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken); + public virtual NHibernate.FlushMode FlushMode { get => throw null; set => throw null; } + public virtual NHibernate.Multi.IQueryBatch FutureBatch { get => throw null; } + public abstract NHibernate.Impl.FutureCriteriaBatch FutureCriteriaBatch { get; set; } + public abstract NHibernate.Impl.FutureQueryBatch FutureQueryBatch { get; set; } + public NHibernate.Cache.CacheKey GenerateCacheKey(object id, NHibernate.Type.IType type, string entityOrRoleName) => throw null; + public NHibernate.Engine.EntityKey GenerateEntityKey(object id, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public abstract object GetContextEntityIdentifier(object obj); + public abstract NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName, object obj); + public abstract object GetEntityUsingInterceptor(NHibernate.Engine.EntityKey key); + public abstract System.Threading.Tasks.Task GetEntityUsingInterceptorAsync(NHibernate.Engine.EntityKey key, System.Threading.CancellationToken cancellationToken); + public abstract NHibernate.Type.IType GetFilterParameterType(string filterParameterName); + public abstract object GetFilterParameterValue(string filterParameterName); + protected internal virtual NHibernate.Engine.Query.IQueryExpressionPlan GetHQLQueryPlan(NHibernate.IQueryExpression queryExpression, bool shallow) => throw null; + public virtual NHibernate.IQuery GetNamedQuery(string queryName) => throw null; + public virtual NHibernate.IQuery GetNamedSQLQuery(string name) => throw null; + protected internal virtual NHibernate.Engine.Query.NativeSQLQueryPlan GetNativeSQLQueryPlan(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec) => throw null; + public abstract NHibernate.Hql.IQueryTranslator[] GetQueries(NHibernate.IQueryExpression query, bool scalar); + public abstract System.Threading.Tasks.Task GetQueriesAsync(NHibernate.IQueryExpression query, bool scalar, System.Threading.CancellationToken cancellationToken); + public abstract string GuessEntityName(object entity); + public abstract object ImmediateLoad(string entityName, object id); + public abstract System.Threading.Tasks.Task ImmediateLoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken); + public void Initialize() => throw null; + public abstract void InitializeCollection(NHibernate.Collection.IPersistentCollection collection, bool writing); + public abstract System.Threading.Tasks.Task InitializeCollectionAsync(NHibernate.Collection.IPersistentCollection collection, bool writing, System.Threading.CancellationToken cancellationToken); + public virtual object Instantiate(NHibernate.Persister.Entity.IEntityPersister persister, object id) => throw null; + public abstract object Instantiate(string clazz, object id); + public virtual NHibernate.IInterceptor Interceptor { get => throw null; set => throw null; } + public abstract object InternalLoad(string entityName, object id, bool eager, bool isNullable); + public abstract System.Threading.Tasks.Task InternalLoadAsync(string entityName, object id, bool eager, bool isNullable, System.Threading.CancellationToken cancellationToken); + protected bool IsAlreadyDisposed { get => throw null; set => throw null; } + public bool IsClosed { get => throw null; } + public virtual bool IsConnected { get => throw null; } + public abstract bool IsEventSource { get; } + public abstract bool IsOpen { get; } + protected bool IsTransactionCoordinatorShared { get => throw null; } + public void JoinTransaction() => throw null; + public virtual void List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public virtual System.Collections.IList List(NHibernate.Impl.CriteriaImpl criteria) => throw null; + public virtual System.Collections.IList List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters) => throw null; + public virtual System.Collections.IList List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public virtual System.Collections.Generic.IList List(NHibernate.Impl.CriteriaImpl criteria) => throw null; + public virtual System.Collections.Generic.IList List(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters parameters) => throw null; + public virtual System.Collections.Generic.IList List(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public abstract void List(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results); + public abstract void List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results); + public virtual System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task> ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task> ListAsync(NHibernate.IQueryExpression query, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task> ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Threading.Tasks.Task ListAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification spec, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + public virtual System.Collections.Generic.IList ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public abstract void ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results); + public virtual System.Threading.Tasks.Task> ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + public abstract System.Collections.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + public abstract System.Collections.Generic.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters); + public System.Collections.IList ListFilter(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters) => throw null; + protected abstract void ListFilter(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Collections.IList results); + public abstract System.Threading.Tasks.Task ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task> ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken); + public System.Threading.Tasks.Task ListFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + protected abstract System.Threading.Tasks.Task ListFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken); + public abstract NHibernate.Event.EventListeners Listeners { get; } + public abstract NHibernate.Engine.IPersistenceContext PersistenceContext { get; } + public System.Linq.IQueryable Query(string entityName) => throw null; + public System.Linq.IQueryable Query() => throw null; + public System.Guid SessionId { get => throw null; } + protected internal void SetClosed() => throw null; + public NHibernate.MultiTenancy.TenantConfiguration TenantConfiguration { get => throw null; set => throw null; } + public string TenantIdentifier { get => throw null; } + public virtual System.Int64 Timestamp { get => throw null; set => throw null; } + public NHibernate.ITransaction Transaction { get => throw null; } + public NHibernate.Transaction.ITransactionContext TransactionContext { get => throw null; set => throw null; } + public virtual bool TransactionInProgress { get => throw null; } + } + + // Generated from `NHibernate.Impl.CollectionFilterImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionFilterImpl : NHibernate.Impl.QueryImpl + { + public CollectionFilterImpl(string queryString, object collection, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + public override System.Collections.IEnumerable Enumerable() => throw null; + public override System.Collections.Generic.IEnumerable Enumerable() => throw null; + public override System.Threading.Tasks.Task EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected internal override System.Collections.Generic.IEnumerable GetTranslators(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected internal override System.Threading.Tasks.Task> GetTranslatorsAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override void List(System.Collections.IList results) => throw null; + public override System.Collections.IList List() => throw null; + public override System.Collections.Generic.IList List() => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override NHibernate.Type.IType[] TypeArray() => throw null; + public override object[] ValueArray() => throw null; + } + + // Generated from `NHibernate.Impl.CriteriaImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaImpl : System.ICloneable, NHibernate.Impl.ISupportEntityJoinCriteria, NHibernate.ISupportSelectModeCriteria, NHibernate.ICriteria + { + public NHibernate.ICriteria Add(NHibernate.ICriteria criteriaInst, NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.ICriteria Add(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.ICriteria AddOrder(NHibernate.Criterion.Order ordering) => throw null; + protected internal void After() => throw null; + public string Alias { get => throw null; } + protected internal void Before() => throw null; + public NHibernate.CacheMode? CacheMode { get => throw null; } + public string CacheRegion { get => throw null; } + public bool Cacheable { get => throw null; } + public void ClearOrders() => throw null; + public object Clone() => throw null; + public string Comment { get => throw null; } + public NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateAlias(string associationPath, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath) => throw null; + public NHibernate.ICriteria CreateEntityCriteria(string alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName) => throw null; + public CriteriaImpl(string entityOrClassName, string alias, NHibernate.Engine.ISessionImplementor session) => throw null; + public CriteriaImpl(string entityOrClassName, NHibernate.Engine.ISessionImplementor session) => throw null; + public CriteriaImpl(System.Type persistentClass, string alias, NHibernate.Engine.ISessionImplementor session) => throw null; + public CriteriaImpl(System.Type persistentClass, NHibernate.Engine.ISessionImplementor session) => throw null; + // Generated from `NHibernate.Impl.CriteriaImpl+CriterionEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriterionEntry + { + public NHibernate.ICriteria Criteria { get => throw null; } + public NHibernate.Criterion.ICriterion Criterion { get => throw null; } + public override string ToString() => throw null; + } + + + public string EntityOrClassName { get => throw null; } + public NHibernate.ICriteria Fetch(NHibernate.SelectMode selectMode, string associationPath, string alias) => throw null; + public int FetchSize { get => throw null; } + public int FirstResult { get => throw null; } + public NHibernate.IFutureEnumerable Future() => throw null; + public NHibernate.IFutureValue FutureValue() => throw null; + public NHibernate.ICriteria GetCriteriaByAlias(string alias) => throw null; + public NHibernate.ICriteria GetCriteriaByPath(string path) => throw null; + public System.Collections.Generic.HashSet GetEntityFetchLazyProperties(string path) => throw null; + public NHibernate.FetchMode GetFetchMode(string path) => throw null; + public System.Type GetRootEntityTypeIfAvailable() => throw null; + public NHibernate.SelectMode GetSelectMode(string path) => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsReadOnlyInitialized { get => throw null; } + public System.Collections.Generic.IEnumerable IterateExpressionEntries() => throw null; + public System.Collections.Generic.IEnumerable IterateOrderings() => throw null; + public System.Collections.Generic.IEnumerable IterateSubcriteria() => throw null; + public void List(System.Collections.IList results) => throw null; + public System.Collections.IList List() => throw null; + public System.Collections.Generic.IList List() => throw null; + public System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Collections.Generic.IDictionary LockModes { get => throw null; } + public bool LookupByNaturalKey { get => throw null; } + public int MaxResults { get => throw null; } + // Generated from `NHibernate.Impl.CriteriaImpl+OrderEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OrderEntry + { + public NHibernate.ICriteria Criteria { get => throw null; } + public NHibernate.Criterion.Order Order { get => throw null; } + public override string ToString() => throw null; + } + + + public NHibernate.Criterion.IProjection Projection { get => throw null; } + public NHibernate.ICriteria ProjectionCriteria { get => throw null; } + public NHibernate.Transform.IResultTransformer ResultTransformer { get => throw null; } + public NHibernate.Engine.ISessionImplementor Session { get => throw null; set => throw null; } + public NHibernate.ICriteria SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.ICriteria SetCacheRegion(string cacheRegion) => throw null; + public NHibernate.ICriteria SetCacheable(bool cacheable) => throw null; + public NHibernate.ICriteria SetComment(string comment) => throw null; + public NHibernate.ICriteria SetFetchMode(string associationPath, NHibernate.FetchMode mode) => throw null; + public NHibernate.ICriteria SetFetchSize(int fetchSize) => throw null; + public NHibernate.ICriteria SetFirstResult(int firstResult) => throw null; + public NHibernate.ICriteria SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public NHibernate.ICriteria SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ICriteria SetLockMode(NHibernate.LockMode lockMode) => throw null; + public NHibernate.ICriteria SetMaxResults(int maxResults) => throw null; + public NHibernate.ICriteria SetProjection(params NHibernate.Criterion.IProjection[] projections) => throw null; + public NHibernate.ICriteria SetReadOnly(bool readOnly) => throw null; + public NHibernate.ICriteria SetResultTransformer(NHibernate.Transform.IResultTransformer tupleMapper) => throw null; + public NHibernate.ICriteria SetTimeout(int timeout) => throw null; + // Generated from `NHibernate.Impl.CriteriaImpl+Subcriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Subcriteria : System.ICloneable, NHibernate.ISupportSelectModeCriteria, NHibernate.ICriteria + { + public NHibernate.ICriteria Add(NHibernate.Criterion.ICriterion expression) => throw null; + public NHibernate.ICriteria AddOrder(NHibernate.Criterion.Order order) => throw null; + public string Alias { get => throw null; set => throw null; } + public void ClearOrders() => throw null; + public object Clone() => throw null; + public NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.ICriteria CreateAlias(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateAlias(string associationPath, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType, NHibernate.Criterion.ICriterion withClause) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath, NHibernate.SqlCommand.JoinType joinType) => throw null; + public NHibernate.ICriteria CreateCriteria(string associationPath) => throw null; + public NHibernate.ICriteria Fetch(NHibernate.SelectMode selectMode, string associationPath, string alias) => throw null; + public NHibernate.IFutureEnumerable Future() => throw null; + public NHibernate.IFutureValue FutureValue() => throw null; + public NHibernate.ICriteria GetCriteriaByAlias(string alias) => throw null; + public NHibernate.ICriteria GetCriteriaByPath(string path) => throw null; + public System.Type GetRootEntityTypeIfAvailable() => throw null; + public bool HasRestrictions { get => throw null; } + public bool IsEntityJoin { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsReadOnlyInitialized { get => throw null; } + public string JoinEntityName { get => throw null; } + public NHibernate.SqlCommand.JoinType JoinType { get => throw null; } + public void List(System.Collections.IList results) => throw null; + public System.Collections.IList List() => throw null; + public System.Collections.Generic.IList List() => throw null; + public System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.LockMode LockMode { get => throw null; } + public NHibernate.ICriteria Parent { get => throw null; } + public string Path { get => throw null; } + public NHibernate.ICriteria SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.ICriteria SetCacheRegion(string cacheRegion) => throw null; + public NHibernate.ICriteria SetCacheable(bool cacheable) => throw null; + public NHibernate.ICriteria SetComment(string comment) => throw null; + public NHibernate.ICriteria SetFetchMode(string associationPath, NHibernate.FetchMode mode) => throw null; + public NHibernate.ICriteria SetFetchSize(int fetchSize) => throw null; + public NHibernate.ICriteria SetFirstResult(int firstResult) => throw null; + public NHibernate.ICriteria SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public NHibernate.ICriteria SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ICriteria SetLockMode(NHibernate.LockMode lockMode) => throw null; + public NHibernate.ICriteria SetMaxResults(int maxResults) => throw null; + public NHibernate.ICriteria SetProjection(params NHibernate.Criterion.IProjection[] projections) => throw null; + public NHibernate.ICriteria SetReadOnly(bool readOnly) => throw null; + public NHibernate.ICriteria SetResultTransformer(NHibernate.Transform.IResultTransformer resultProcessor) => throw null; + public NHibernate.ICriteria SetTimeout(int timeout) => throw null; + public object UniqueResult() => throw null; + public T UniqueResult() => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.Criterion.ICriterion WithClause { get => throw null; } + } + + + public int Timeout { get => throw null; } + public override string ToString() => throw null; + public object UniqueResult() => throw null; + public T UniqueResult() => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UniqueResultAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `NHibernate.Impl.DetachedNamedQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DetachedNamedQuery : NHibernate.Impl.AbstractDetachedQuery + { + public NHibernate.Impl.DetachedNamedQuery Clone() => throw null; + public DetachedNamedQuery(string queryName) => throw null; + public override NHibernate.IQuery GetExecutableQuery(NHibernate.ISession session) => throw null; + public string QueryName { get => throw null; } + public override NHibernate.IDetachedQuery SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public override NHibernate.IDetachedQuery SetCacheRegion(string cacheRegion) => throw null; + public override NHibernate.IDetachedQuery SetCacheable(bool cacheable) => throw null; + public override NHibernate.IDetachedQuery SetComment(string comment) => throw null; + public override NHibernate.IDetachedQuery SetFetchSize(int fetchSize) => throw null; + public override NHibernate.IDetachedQuery SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public override NHibernate.IDetachedQuery SetReadOnly(bool readOnly) => throw null; + public override NHibernate.IDetachedQuery SetTimeout(int timeout) => throw null; + } + + // Generated from `NHibernate.Impl.DetachedQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DetachedQuery : NHibernate.Impl.AbstractDetachedQuery + { + public NHibernate.Impl.DetachedQuery Clone() => throw null; + public DetachedQuery(string hql) => throw null; + public override NHibernate.IQuery GetExecutableQuery(NHibernate.ISession session) => throw null; + public string Hql { get => throw null; } + } + + // Generated from `NHibernate.Impl.EnumerableImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnumerableImpl : System.IDisposable, System.Collections.IEnumerator, System.Collections.IEnumerable + { + public object Current { get => throw null; } + public void Dispose() => throw null; + protected virtual void Dispose(bool isDisposing) => throw null; + public EnumerableImpl(System.Data.Common.DbDataReader reader, System.Data.Common.DbCommand cmd, NHibernate.Event.IEventSource session, bool readOnly, NHibernate.Type.IType[] types, string[][] columnNames, NHibernate.Engine.RowSelection selection, NHibernate.Transform.IResultTransformer resultTransformer, string[] returnAliases) => throw null; + public EnumerableImpl(System.Data.Common.DbDataReader reader, System.Data.Common.DbCommand cmd, NHibernate.Event.IEventSource session, bool readOnly, NHibernate.Type.IType[] types, string[][] columnNames, NHibernate.Engine.RowSelection selection, NHibernate.Hql.HolderInstantiator holderInstantiator) => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + // ERR: Stub generator didn't handle member: ~EnumerableImpl + } + + // Generated from `NHibernate.Impl.ExpressionProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ExpressionProcessor + { + public static NHibernate.Criterion.DetachedCriteria FindDetachedCriteria(System.Linq.Expressions.Expression expression) => throw null; + public static string FindMemberExpression(System.Linq.Expressions.Expression expression) => throw null; + public static NHibernate.Impl.ExpressionProcessor.ProjectionInfo FindMemberProjection(System.Linq.Expressions.Expression expression) => throw null; + public static string FindPropertyExpression(System.Linq.Expressions.Expression expression) => throw null; + public static object FindValue(System.Linq.Expressions.Expression expression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessExpression(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.ICriterion ProcessExpression(System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.Order ProcessOrder(System.Linq.Expressions.Expression> expression, System.Func orderDelegate) => throw null; + public static NHibernate.Criterion.Order ProcessOrder(System.Linq.Expressions.LambdaExpression expression, System.Func orderStringDelegate, System.Func orderProjectionDelegate) => throw null; + public static NHibernate.Criterion.Order ProcessOrder(System.Linq.Expressions.LambdaExpression expression, System.Func orderDelegate) => throw null; + public static NHibernate.Criterion.Order ProcessOrder(System.Linq.Expressions.Expression> expression, System.Func orderDelegate) => throw null; + public static NHibernate.Criterion.AbstractCriterion ProcessSubquery(NHibernate.Impl.LambdaSubqueryType subqueryType, System.Linq.Expressions.Expression> expression) => throw null; + public static NHibernate.Criterion.AbstractCriterion ProcessSubquery(NHibernate.Impl.LambdaSubqueryType subqueryType, System.Linq.Expressions.Expression> expression) => throw null; + // Generated from `NHibernate.Impl.ExpressionProcessor+ProjectionInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProjectionInfo + { + public NHibernate.Criterion.IProjection AsProjection() => throw null; + public string AsProperty() => throw null; + public T Create(System.Func stringFunc, System.Func projectionFunc) => throw null; + public NHibernate.Criterion.ICriterion CreateCriterion(System.Func stringFunc, System.Func projectionFunc, object value) => throw null; + public NHibernate.Criterion.ICriterion CreateCriterion(System.Func stringFunc, System.Func projectionFunc) => throw null; + public NHibernate.Criterion.ICriterion CreateCriterion(NHibernate.Impl.ExpressionProcessor.ProjectionInfo rhs, System.Func ssFunc, System.Func spFunc, System.Func psFunc, System.Func ppFunc) => throw null; + public NHibernate.Criterion.Order CreateOrder(System.Func orderStringDelegate, System.Func orderProjectionDelegate) => throw null; + public static NHibernate.Impl.ExpressionProcessor.ProjectionInfo ForProjection(NHibernate.Criterion.IProjection projection) => throw null; + public static NHibernate.Impl.ExpressionProcessor.ProjectionInfo ForProperty(string property) => throw null; + protected ProjectionInfo() => throw null; + } + + + public static void RegisterCustomMethodCall(System.Linq.Expressions.Expression> function, System.Func functionProcessor) => throw null; + public static void RegisterCustomProjection(System.Linq.Expressions.Expression> function, System.Func functionProcessor) => throw null; + public static void RegisterCustomProjection(System.Linq.Expressions.Expression> function, System.Func functionProcessor) => throw null; + public static string Signature(System.Reflection.MethodInfo methodInfo) => throw null; + public static string Signature(System.Reflection.MemberInfo memberInfo) => throw null; + } + + // Generated from `NHibernate.Impl.FilterImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterImpl : NHibernate.IFilter + { + public void AfterDeserialize(NHibernate.Engine.FilterDefinition factoryDefinition) => throw null; + public NHibernate.Engine.FilterDefinition FilterDefinition { get => throw null; } + public FilterImpl(NHibernate.Engine.FilterDefinition configuration) => throw null; + public object GetParameter(string name) => throw null; + public int? GetParameterSpan(string name) => throw null; + public static string MARKER; + public string Name { get => throw null; } + public System.Collections.Generic.IDictionary Parameters { get => throw null; } + public NHibernate.IFilter SetParameter(string name, object value) => throw null; + public NHibernate.IFilter SetParameterList(string name, System.Collections.Generic.ICollection values) => throw null; + public void Validate() => throw null; + } + + // Generated from `NHibernate.Impl.FutureBatch<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class FutureBatch + { + public void Add(TQueryApproach query) => throw null; + public void Add(TQueryApproach query) => throw null; + protected virtual void AddResultTransformer(TMultiApproach multiApproach, NHibernate.Transform.IResultTransformer futureResulsTransformer) => throw null; + protected abstract void AddTo(TMultiApproach multiApproach, TQueryApproach query, System.Type resultType); + protected abstract string CacheRegion(TQueryApproach query); + protected abstract void ClearCurrentFutureBatch(); + protected abstract TMultiApproach CreateMultiApproach(bool isCacheable, string cacheRegion); + protected FutureBatch(NHibernate.Impl.SessionImpl session) => throw null; + public NHibernate.IFutureEnumerable GetEnumerator() => throw null; + public NHibernate.IFutureValue GetFutureValue() => throw null; + protected abstract System.Collections.IList GetResultsFrom(TMultiApproach multiApproach); + protected abstract System.Threading.Tasks.Task GetResultsFromAsync(TMultiApproach multiApproach, System.Threading.CancellationToken cancellationToken); + protected abstract bool IsQueryCacheable(TQueryApproach query); + protected virtual System.Collections.IList List(TQueryApproach query) => throw null; + protected virtual System.Threading.Tasks.Task ListAsync(TQueryApproach query, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Impl.SessionImpl session; + } + + // Generated from `NHibernate.Impl.FutureCriteriaBatch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FutureCriteriaBatch : NHibernate.Impl.FutureBatch + { + protected override void AddTo(NHibernate.IMultiCriteria multiApproach, NHibernate.ICriteria query, System.Type resultType) => throw null; + protected override string CacheRegion(NHibernate.ICriteria query) => throw null; + protected override void ClearCurrentFutureBatch() => throw null; + protected override NHibernate.IMultiCriteria CreateMultiApproach(bool isCacheable, string cacheRegion) => throw null; + public FutureCriteriaBatch(NHibernate.Impl.SessionImpl session) : base(default(NHibernate.Impl.SessionImpl)) => throw null; + protected override System.Collections.IList GetResultsFrom(NHibernate.IMultiCriteria multiApproach) => throw null; + protected override System.Threading.Tasks.Task GetResultsFromAsync(NHibernate.IMultiCriteria multiApproach, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool IsQueryCacheable(NHibernate.ICriteria query) => throw null; + protected override System.Collections.IList List(NHibernate.ICriteria query) => throw null; + protected override System.Threading.Tasks.Task ListAsync(NHibernate.ICriteria query, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Impl.FutureQueryBatch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FutureQueryBatch : NHibernate.Impl.FutureBatch + { + protected override void AddResultTransformer(NHibernate.IMultiQuery multiApproach, NHibernate.Transform.IResultTransformer futureResulsTransformer) => throw null; + protected override void AddTo(NHibernate.IMultiQuery multiApproach, NHibernate.IQuery query, System.Type resultType) => throw null; + protected override string CacheRegion(NHibernate.IQuery query) => throw null; + protected override void ClearCurrentFutureBatch() => throw null; + protected override NHibernate.IMultiQuery CreateMultiApproach(bool isCacheable, string cacheRegion) => throw null; + public FutureQueryBatch(NHibernate.Impl.SessionImpl session) : base(default(NHibernate.Impl.SessionImpl)) => throw null; + protected override System.Collections.IList GetResultsFrom(NHibernate.IMultiQuery multiApproach) => throw null; + protected override System.Threading.Tasks.Task GetResultsFromAsync(NHibernate.IMultiQuery multiApproach, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool IsQueryCacheable(NHibernate.IQuery query) => throw null; + protected override System.Collections.IList List(NHibernate.IQuery query) => throw null; + protected override System.Threading.Tasks.Task ListAsync(NHibernate.IQuery query, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Impl.IDetachedQueryImplementor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDetachedQueryImplementor + { + void CopyTo(NHibernate.IDetachedQuery destination); + void OverrideInfoFrom(NHibernate.Impl.IDetachedQueryImplementor origin); + void OverrideParametersFrom(NHibernate.Impl.IDetachedQueryImplementor origin); + void SetParametersTo(NHibernate.IDetachedQuery destination); + } + + // Generated from `NHibernate.Impl.ISessionCreationOptions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionCreationOptions + { + NHibernate.FlushMode InitialSessionFlushMode { get; } + NHibernate.ConnectionReleaseMode SessionConnectionReleaseMode { get; } + NHibernate.IInterceptor SessionInterceptor { get; } + bool ShouldAutoClose { get; } + bool ShouldAutoJoinTransaction { get; } + System.Data.Common.DbConnection UserSuppliedConnection { get; } + } + + // Generated from `NHibernate.Impl.ISessionCreationOptionsWithMultiTenancy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionCreationOptionsWithMultiTenancy + { + NHibernate.MultiTenancy.TenantConfiguration TenantConfiguration { get; set; } + } + + // Generated from `NHibernate.Impl.ISharedSessionCreationOptions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISharedSessionCreationOptions : NHibernate.Impl.ISessionCreationOptions + { + NHibernate.AdoNet.ConnectionManager ConnectionManager { get; } + bool IsTransactionCoordinatorShared { get; } + } + + // Generated from `NHibernate.Impl.ISupportEntityJoinCriteria` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportEntityJoinCriteria + { + NHibernate.ICriteria CreateEntityCriteria(string alias, NHibernate.Criterion.ICriterion withClause, NHibernate.SqlCommand.JoinType joinType, string entityName); + } + + // Generated from `NHibernate.Impl.ITranslator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITranslator + { + NHibernate.Loader.Loader Loader { get; } + System.Collections.Generic.ICollection QuerySpaces { get; } + string[] ReturnAliases { get; } + NHibernate.Type.IType[] ReturnTypes { get; } + } + + // Generated from `NHibernate.Impl.LambdaSubqueryType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum LambdaSubqueryType + { + All, + Exact, + Some, + } + + // Generated from `NHibernate.Impl.MessageHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class MessageHelper + { + public static string InfoString(string entityName, string propertyName, object key) => throw null; + public static string InfoString(string entityName, object id) => throw null; + public static string InfoString(System.Type clazz, object id) => throw null; + public static string InfoString(NHibernate.Persister.Entity.IEntityPersister persister, object[] ids, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static string InfoString(NHibernate.Persister.Entity.IEntityPersister persister, object id, NHibernate.Type.IType identifierType, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static string InfoString(NHibernate.Persister.Entity.IEntityPersister persister, object id, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static string InfoString(NHibernate.Persister.Entity.IEntityPersister persister, object id) => throw null; + public static string InfoString(NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + public static string InfoString(NHibernate.Persister.Collection.ICollectionPersister persister, object id, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static string InfoString(NHibernate.Persister.Collection.ICollectionPersister persister, object id) => throw null; + } + + // Generated from `NHibernate.Impl.MultiCriteriaImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MultiCriteriaImpl : NHibernate.IMultiCriteria + { + public NHibernate.IMultiCriteria Add(string key, NHibernate.IQueryOver queryOver) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.IQueryOver queryOver) => throw null; + public NHibernate.IMultiCriteria Add(string key, NHibernate.IQueryOver queryOver) => throw null; + public NHibernate.IMultiCriteria Add(string key, NHibernate.ICriteria criteria) => throw null; + public NHibernate.IMultiCriteria Add(string key, NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.IQueryOver queryOver) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.ICriteria criteria) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public NHibernate.IMultiCriteria Add(string key, NHibernate.ICriteria criteria) => throw null; + public NHibernate.IMultiCriteria Add(string key, NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public NHibernate.IMultiCriteria Add(System.Type resultGenericListType, NHibernate.IQueryOver queryOver) => throw null; + public NHibernate.IMultiCriteria Add(System.Type resultGenericListType, NHibernate.ICriteria criteria) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.ICriteria criteria) => throw null; + public NHibernate.IMultiCriteria Add(NHibernate.Criterion.DetachedCriteria detachedCriteria) => throw null; + public NHibernate.IMultiCriteria ForceCacheRefresh(bool forceRefresh) => throw null; + public object GetResult(string key) => throw null; + public System.Threading.Tasks.Task GetResultAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual System.Collections.IList GetResultList(System.Collections.IList results) => throw null; + public System.Collections.IList List() => throw null; + public System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.IMultiCriteria SetCacheRegion(string cacheRegion) => throw null; + public NHibernate.IMultiCriteria SetCacheable(bool cachable) => throw null; + public NHibernate.IMultiCriteria SetResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + public NHibernate.IMultiCriteria SetTimeout(int timeout) => throw null; + public NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + } + + // Generated from `NHibernate.Impl.MultiQueryImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MultiQueryImpl : NHibernate.IMultiQuery + { + public NHibernate.IMultiQuery Add(string key, string hql) => throw null; + public NHibernate.IMultiQuery Add(string key, NHibernate.IQuery query) => throw null; + public NHibernate.IMultiQuery Add(string hql) => throw null; + public NHibernate.IMultiQuery Add(NHibernate.IQuery query) => throw null; + public NHibernate.IMultiQuery Add(string key, string hql) => throw null; + public NHibernate.IMultiQuery Add(string key, NHibernate.IQuery query) => throw null; + public NHibernate.IMultiQuery Add(string hql) => throw null; + public NHibernate.IMultiQuery Add(System.Type resultGenericListType, NHibernate.IQuery query) => throw null; + public NHibernate.IMultiQuery Add(NHibernate.IQuery query) => throw null; + public NHibernate.IMultiQuery AddNamedQuery(string queryName) => throw null; + public NHibernate.IMultiQuery AddNamedQuery(string key, string namedQuery) => throw null; + public NHibernate.IMultiQuery AddNamedQuery(string queryName) => throw null; + public NHibernate.IMultiQuery AddNamedQuery(string key, string namedQuery) => throw null; + protected void After() => throw null; + protected void Before() => throw null; + protected System.Collections.Generic.List DoList() => throw null; + protected System.Threading.Tasks.Task> DoListAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public object GetResult(string key) => throw null; + public System.Threading.Tasks.Task GetResultAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected virtual System.Collections.IList GetResultList(System.Collections.IList results) => throw null; + public System.Collections.IList List() => throw null; + public System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public MultiQueryImpl(NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.IMultiQuery SetAnsiString(string name, string val) => throw null; + public NHibernate.IMultiQuery SetBinary(string name, System.Byte[] val) => throw null; + public NHibernate.IMultiQuery SetBoolean(string name, bool val) => throw null; + public NHibernate.IMultiQuery SetByte(string name, System.Byte val) => throw null; + public NHibernate.IMultiQuery SetCacheRegion(string region) => throw null; + public NHibernate.IMultiQuery SetCacheable(bool cacheable) => throw null; + public NHibernate.IMultiQuery SetCharacter(string name, System.Char val) => throw null; + public NHibernate.IMultiQuery SetDateTime(string name, System.DateTime val) => throw null; + public NHibernate.IMultiQuery SetDateTime2(string name, System.DateTime val) => throw null; + public NHibernate.IMultiQuery SetDateTimeNoMs(string name, System.DateTime val) => throw null; + public NHibernate.IMultiQuery SetDateTimeOffset(string name, System.DateTimeOffset val) => throw null; + public NHibernate.IMultiQuery SetDecimal(string name, System.Decimal val) => throw null; + public NHibernate.IMultiQuery SetDouble(string name, double val) => throw null; + public NHibernate.IMultiQuery SetEntity(string name, object val) => throw null; + public NHibernate.IMultiQuery SetEnum(string name, System.Enum val) => throw null; + public NHibernate.IMultiQuery SetFlushMode(NHibernate.FlushMode mode) => throw null; + public NHibernate.IMultiQuery SetForceCacheRefresh(bool cacheRefresh) => throw null; + public NHibernate.IMultiQuery SetGuid(string name, System.Guid val) => throw null; + public NHibernate.IMultiQuery SetInt16(string name, System.Int16 val) => throw null; + public NHibernate.IMultiQuery SetInt32(string name, int val) => throw null; + public NHibernate.IMultiQuery SetInt64(string name, System.Int64 val) => throw null; + public NHibernate.IMultiQuery SetParameter(string name, object val, NHibernate.Type.IType type) => throw null; + public NHibernate.IMultiQuery SetParameter(string name, object val) => throw null; + public NHibernate.IMultiQuery SetParameterList(string name, System.Collections.IEnumerable vals, NHibernate.Type.IType type) => throw null; + public NHibernate.IMultiQuery SetParameterList(string name, System.Collections.IEnumerable vals) => throw null; + public NHibernate.IMultiQuery SetResultTransformer(NHibernate.Transform.IResultTransformer transformer) => throw null; + public NHibernate.IMultiQuery SetSingle(string name, float val) => throw null; + public NHibernate.IMultiQuery SetString(string name, string val) => throw null; + public NHibernate.IMultiQuery SetTime(string name, System.DateTime val) => throw null; + public NHibernate.IMultiQuery SetTimeAsTimeSpan(string name, System.TimeSpan val) => throw null; + public NHibernate.IMultiQuery SetTimeSpan(string name, System.TimeSpan val) => throw null; + public NHibernate.IMultiQuery SetTimeout(int timeout) => throw null; + public NHibernate.IMultiQuery SetTimestamp(string name, System.DateTime val) => throw null; + protected NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Impl.Printer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Printer + { + public Printer(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public void ToString(object[] entities) => throw null; + public string ToString(object entity) => throw null; + public string ToString(System.Collections.Generic.IDictionary namedTypedValues) => throw null; + public string ToString(NHibernate.Type.IType[] types, object[] values) => throw null; + } + + // Generated from `NHibernate.Impl.QueryImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryImpl : NHibernate.Impl.AbstractQueryImpl2 + { + protected override NHibernate.IQueryExpression ExpandParameters(System.Collections.Generic.IDictionary namedParams) => throw null; + public QueryImpl(string queryString, NHibernate.FlushMode flushMode, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + public QueryImpl(string queryString, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + } + + // Generated from `NHibernate.Impl.SessionFactoryImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionFactoryImpl : System.Runtime.Serialization.IObjectReference, System.IDisposable, NHibernate.ISessionFactory, NHibernate.Engine.ISessionFactoryImplementor, NHibernate.Engine.IMapping + { + public void Close() => throw null; + public System.Threading.Tasks.Task CloseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.Connection.IConnectionProvider ConnectionProvider { get => throw null; } + public NHibernate.Context.ICurrentSessionContext CurrentSessionContext { get => throw null; } + public System.Collections.Generic.ICollection DefinedFilterNames { get => throw null; } + public NHibernate.Dialect.Dialect Dialect { get => throw null; } + public void Dispose() => throw null; + public NHibernate.Proxy.IEntityNotFoundDelegate EntityNotFoundDelegate { get => throw null; } + public NHibernate.Event.EventListeners EventListeners { get => throw null; } + public void Evict(System.Type persistentClass, object id) => throw null; + public void Evict(System.Type persistentClass) => throw null; + public void Evict(System.Collections.Generic.IEnumerable persistentClasses) => throw null; + public System.Threading.Tasks.Task EvictAsync(System.Type persistentClass, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictAsync(System.Type persistentClass, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictAsync(System.Collections.Generic.IEnumerable persistentClasses, System.Threading.CancellationToken cancellationToken) => throw null; + public void EvictCollection(string roleName, object id, string tenantIdentifier) => throw null; + public void EvictCollection(string roleName, object id) => throw null; + public void EvictCollection(string roleName) => throw null; + public void EvictCollection(System.Collections.Generic.IEnumerable roleNames) => throw null; + public System.Threading.Tasks.Task EvictCollectionAsync(string roleName, object id, string tenantIdentifier, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task EvictCollectionAsync(string roleName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictCollectionAsync(string roleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictCollectionAsync(System.Collections.Generic.IEnumerable roleNames, System.Threading.CancellationToken cancellationToken) => throw null; + public void EvictEntity(string entityName, object id, string tenantIdentifier) => throw null; + public void EvictEntity(string entityName, object id) => throw null; + public void EvictEntity(string entityName) => throw null; + public void EvictEntity(System.Collections.Generic.IEnumerable entityNames) => throw null; + public System.Threading.Tasks.Task EvictEntityAsync(string entityName, object id, string tenantIdentifier, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task EvictEntityAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictEntityAsync(string entityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictEntityAsync(System.Collections.Generic.IEnumerable entityNames, System.Threading.CancellationToken cancellationToken) => throw null; + public void EvictQueries(string cacheRegion) => throw null; + public void EvictQueries() => throw null; + public System.Threading.Tasks.Task EvictQueriesAsync(string cacheRegion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task EvictQueriesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Collections.Generic.IDictionary GetAllClassMetadata() => throw null; + public System.Collections.Generic.IDictionary GetAllCollectionMetadata() => throw null; + public System.Collections.Generic.IDictionary GetAllSecondLevelCacheRegions() => throw null; + public NHibernate.Metadata.IClassMetadata GetClassMetadata(string entityName) => throw null; + public NHibernate.Metadata.IClassMetadata GetClassMetadata(System.Type persistentClass) => throw null; + public NHibernate.Metadata.ICollectionMetadata GetCollectionMetadata(string roleName) => throw null; + public NHibernate.Persister.Collection.ICollectionPersister GetCollectionPersister(string role) => throw null; + public System.Collections.Generic.ISet GetCollectionRolesByEntityParticipant(string entityName) => throw null; + public NHibernate.ISession GetCurrentSession() => throw null; + public NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName) => throw null; + public NHibernate.Engine.FilterDefinition GetFilterDefinition(string filterName) => throw null; + public NHibernate.Id.IIdentifierGenerator GetIdentifierGenerator(string rootEntityName) => throw null; + public string GetIdentifierPropertyName(string className) => throw null; + public NHibernate.Type.IType GetIdentifierType(string className) => throw null; + public string[] GetImplementors(string entityOrClassName) => throw null; + public string GetImportedClassName(string className) => throw null; + public NHibernate.Engine.NamedQueryDefinition GetNamedQuery(string queryName) => throw null; + public NHibernate.Engine.NamedSQLQueryDefinition GetNamedSQLQuery(string queryName) => throw null; + public NHibernate.Cache.IQueryCache GetQueryCache(string cacheRegion) => throw null; + public object GetRealObject(System.Runtime.Serialization.StreamingContext context) => throw null; + public NHibernate.Type.IType GetReferencedPropertyType(string className, string propertyName) => throw null; + public NHibernate.Engine.ResultSetMappingDefinition GetResultSetMapping(string resultSetName) => throw null; + public string[] GetReturnAliases(string queryString) => throw null; + public NHibernate.Type.IType[] GetReturnTypes(string queryString) => throw null; + public NHibernate.Cache.ICache GetSecondLevelCacheRegion(string regionName) => throw null; + public bool HasNonIdentifierPropertyNamedId(string className) => throw null; + public NHibernate.IInterceptor Interceptor { get => throw null; } + public bool IsClosed { get => throw null; } + public string Name { get => throw null; } + public NHibernate.ISession OpenSession(System.Data.Common.DbConnection connection, bool flushBeforeCompletionEnabled, bool autoCloseSessionEnabled, NHibernate.ConnectionReleaseMode connectionReleaseMode) => throw null; + public NHibernate.ISession OpenSession(System.Data.Common.DbConnection connection, NHibernate.IInterceptor sessionLocalInterceptor) => throw null; + public NHibernate.ISession OpenSession(System.Data.Common.DbConnection connection) => throw null; + public NHibernate.ISession OpenSession(NHibernate.IInterceptor sessionLocalInterceptor) => throw null; + public NHibernate.ISession OpenSession() => throw null; + public NHibernate.IStatelessSession OpenStatelessSession(System.Data.Common.DbConnection connection) => throw null; + public NHibernate.IStatelessSession OpenStatelessSession() => throw null; + public NHibernate.Cache.IQueryCache QueryCache { get => throw null; } + public NHibernate.Engine.Query.QueryPlanCache QueryPlanCache { get => throw null; } + public NHibernate.Exceptions.ISQLExceptionConverter SQLExceptionConverter { get => throw null; } + public NHibernate.Dialect.Function.SQLFunctionRegistry SQLFunctionRegistry { get => throw null; } + public SessionFactoryImpl(NHibernate.Cfg.Configuration cfg, NHibernate.Engine.IMapping mapping, NHibernate.Cfg.Settings settings, NHibernate.Event.EventListeners listeners) => throw null; + public NHibernate.Cfg.Settings Settings { get => throw null; } + public NHibernate.Stat.IStatistics Statistics { get => throw null; } + public NHibernate.Stat.IStatisticsImplementor StatisticsImplementor { get => throw null; } + public NHibernate.Transaction.ITransactionFactory TransactionFactory { get => throw null; } + public NHibernate.Persister.Entity.IEntityPersister TryGetEntityPersister(string entityName) => throw null; + public string TryGetGuessEntityName(System.Type implementor) => throw null; + public NHibernate.Cache.UpdateTimestampsCache UpdateTimestampsCache { get => throw null; } + public string Uuid { get => throw null; } + public NHibernate.ISessionBuilder WithOptions() => throw null; + public NHibernate.IStatelessSessionBuilder WithStatelessOptions() => throw null; + } + + // Generated from `NHibernate.Impl.SessionFactoryObjectFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SessionFactoryObjectFactory + { + public static void AddInstance(string uid, string name, NHibernate.ISessionFactory instance, System.Collections.Generic.IDictionary properties) => throw null; + public static NHibernate.ISessionFactory GetInstance(string uid) => throw null; + public static NHibernate.ISessionFactory GetNamedInstance(string name) => throw null; + public static void RemoveInstance(string uid, string name, System.Collections.Generic.IDictionary properties) => throw null; + } + + // Generated from `NHibernate.Impl.SessionIdLoggingContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionIdLoggingContext : System.IDisposable + { + public static System.IDisposable CreateOrNull(System.Guid id) => throw null; + public void Dispose() => throw null; + public static System.Guid? SessionId { get => throw null; set => throw null; } + public SessionIdLoggingContext(System.Guid id) => throw null; + } + + // Generated from `NHibernate.Impl.SessionImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionImpl : NHibernate.Impl.AbstractSessionImpl, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.IDisposable, NHibernate.ISession, NHibernate.Event.IEventSource, NHibernate.Engine.ISessionImplementor + { + public NHibernate.Engine.ActionQueue ActionQueue { get => throw null; } + public override void AfterTransactionBegin(NHibernate.ITransaction tx) => throw null; + public override void AfterTransactionCompletion(bool success, NHibernate.ITransaction tx) => throw null; + public override System.Threading.Tasks.Task AfterTransactionCompletionAsync(bool success, NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool AutoFlushIfRequired(System.Collections.Generic.ISet querySpaces) => throw null; + public override System.Threading.Tasks.Task AutoFlushIfRequiredAsync(System.Collections.Generic.ISet querySpaces, System.Threading.CancellationToken cancellationToken) => throw null; + public bool AutoFlushSuspended { get => throw null; } + public override void BeforeTransactionCompletion(NHibernate.ITransaction tx) => throw null; + public override System.Threading.Tasks.Task BeforeTransactionCompletionAsync(NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken) => throw null; + public override string BestGuessEntityName(object entity) => throw null; + public override NHibernate.CacheMode CacheMode { get => throw null; set => throw null; } + public void CancelQuery() => throw null; + public void Clear() => throw null; + public System.Data.Common.DbConnection Close() => throw null; + public override void CloseSessionFromSystemTransaction() => throw null; + public NHibernate.ConnectionReleaseMode ConnectionReleaseMode { get => throw null; } + public bool Contains(object obj) => throw null; + public NHibernate.ICriteria CreateCriteria(string alias) where T : class => throw null; + public NHibernate.ICriteria CreateCriteria() where T : class => throw null; + public NHibernate.ICriteria CreateCriteria(string entityName, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string entityName) => throw null; + public NHibernate.ICriteria CreateCriteria(System.Type persistentClass, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(System.Type persistentClass) => throw null; + public override NHibernate.IQuery CreateFilter(object collection, NHibernate.IQueryExpression queryExpression) => throw null; + public NHibernate.IQuery CreateFilter(object collection, string queryString) => throw null; + public override System.Threading.Tasks.Task CreateFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task CreateFilterAsync(object collection, string queryString, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.IMultiCriteria CreateMultiCriteria() => throw null; + public NHibernate.IMultiQuery CreateMultiQuery() => throw null; + public bool DefaultReadOnly { get => throw null; set => throw null; } + public void Delete(string entityName, object obj) => throw null; + public void Delete(string entityName, object child, bool isCascadeDeleteEnabled, System.Collections.Generic.ISet transientEntities) => throw null; + public void Delete(object obj) => throw null; + public int Delete(string query, object[] values, NHibernate.Type.IType[] types) => throw null; + public int Delete(string query, object value, NHibernate.Type.IType type) => throw null; + public int Delete(string query) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string query, object[] values, NHibernate.Type.IType[] types, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string query, object value, NHibernate.Type.IType type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string query, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string entityName, object child, bool isCascadeDeleteEnabled, System.Collections.Generic.ISet transientEntities, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task DeleteAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void DisableFilter(string filterName) => throw null; + public System.Data.Common.DbConnection Disconnect() => throw null; + public void Dispose() => throw null; + public NHibernate.IFilter EnableFilter(string filterName) => throw null; + public override System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + public override System.Collections.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Collections.Generic.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Collections.Generic.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public void Evict(object obj) => throw null; + public System.Threading.Tasks.Task EvictAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override int ExecuteNativeUpdate(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification nativeQuerySpecification, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task ExecuteNativeUpdateAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification nativeQuerySpecification, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ExecuteUpdate(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override string FetchProfile { get => throw null; set => throw null; } + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public bool FlushBeforeCompletionEnabled { get => throw null; } + public override void FlushBeforeTransactionCompletion() => throw null; + public override System.Threading.Tasks.Task FlushBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void ForceFlush(NHibernate.Engine.EntityEntry entityEntry) => throw null; + public System.Threading.Tasks.Task ForceFlushAsync(NHibernate.Engine.EntityEntry entityEntry, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Impl.FutureCriteriaBatch FutureCriteriaBatch { get => throw null; set => throw null; } + public override NHibernate.Impl.FutureQueryBatch FutureQueryBatch { get => throw null; set => throw null; } + public object Get(string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public object Get(string entityName, object id) => throw null; + public object Get(System.Type entityClass, object id) => throw null; + public object Get(System.Type clazz, object id, NHibernate.LockMode lockMode) => throw null; + public T Get(object id, NHibernate.LockMode lockMode) => throw null; + public T Get(object id) => throw null; + public System.Threading.Tasks.Task GetAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Type entityClass, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(System.Type clazz, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override object GetContextEntityIdentifier(object obj) => throw null; + public NHibernate.LockMode GetCurrentLockMode(object obj) => throw null; + public NHibernate.IFilter GetEnabledFilter(string filterName) => throw null; + public string GetEntityName(object obj) => throw null; + public System.Threading.Tasks.Task GetEntityNameAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName, object obj) => throw null; + public override object GetEntityUsingInterceptor(NHibernate.Engine.EntityKey key) => throw null; + public override System.Threading.Tasks.Task GetEntityUsingInterceptorAsync(NHibernate.Engine.EntityKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Type.IType GetFilterParameterType(string filterParameterName) => throw null; + public override object GetFilterParameterValue(string filterParameterName) => throw null; + public object GetIdentifier(object obj) => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override NHibernate.Hql.IQueryTranslator[] GetQueries(NHibernate.IQueryExpression query, bool scalar) => throw null; + public override System.Threading.Tasks.Task GetQueriesAsync(NHibernate.IQueryExpression query, bool scalar, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.ISession GetSession(NHibernate.EntityMode entityMode) => throw null; + public NHibernate.Engine.ISessionImplementor GetSessionImplementation() => throw null; + public override string GuessEntityName(object entity) => throw null; + public override object ImmediateLoad(string entityName, object id) => throw null; + public override System.Threading.Tasks.Task ImmediateLoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken) => throw null; + public override void InitializeCollection(NHibernate.Collection.IPersistentCollection collection, bool writing) => throw null; + public override System.Threading.Tasks.Task InitializeCollectionAsync(NHibernate.Collection.IPersistentCollection collection, bool writing, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Instantiate(string clazz, object id) => throw null; + public override object Instantiate(NHibernate.Persister.Entity.IEntityPersister persister, object id) => throw null; + public override object InternalLoad(string entityName, object id, bool eager, bool isNullable) => throw null; + public override System.Threading.Tasks.Task InternalLoadAsync(string entityName, object id, bool eager, bool isNullable, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsAutoCloseSessionEnabled { get => throw null; } + public bool IsDirty() => throw null; + public System.Threading.Tasks.Task IsDirtyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override bool IsEventSource { get => throw null; } + public override bool IsOpen { get => throw null; } + public bool IsReadOnly(object entityOrProxy) => throw null; + public override void List(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results) => throw null; + public override void List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public override System.Collections.Generic.IList List(NHibernate.Impl.CriteriaImpl criteria) => throw null; + public override System.Threading.Tasks.Task> ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override void ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public override System.Threading.Tasks.Task ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Collections.Generic.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected override void ListFilter(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public override System.Threading.Tasks.Task ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task ListFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Event.EventListeners Listeners { get => throw null; } + public void Load(object obj, object id) => throw null; + public object Load(string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public object Load(string entityName, object id) => throw null; + public object Load(System.Type entityClass, object id, NHibernate.LockMode lockMode) => throw null; + public object Load(System.Type entityClass, object id) => throw null; + public T Load(object id, NHibernate.LockMode lockMode) => throw null; + public T Load(object id) => throw null; + public System.Threading.Tasks.Task LoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(System.Type entityClass, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(System.Type entityClass, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LoadAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Lock(string entityName, object obj, NHibernate.LockMode lockMode) => throw null; + public void Lock(object obj, NHibernate.LockMode lockMode) => throw null; + public System.Threading.Tasks.Task LockAsync(string entityName, object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task LockAsync(object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Merge(string entityName, object obj, System.Collections.IDictionary copiedAlready) => throw null; + public object Merge(string entityName, object obj) => throw null; + public object Merge(object obj) => throw null; + public T Merge(string entityName, T entity) where T : class => throw null; + public T Merge(T entity) where T : class => throw null; + public System.Threading.Tasks.Task MergeAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task MergeAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task MergeAsync(string entityName, T entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class => throw null; + public System.Threading.Tasks.Task MergeAsync(T entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : class => throw null; + public System.Threading.Tasks.Task MergeAsync(string entityName, object obj, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public void Persist(string entityName, object obj, System.Collections.IDictionary createdAlready) => throw null; + public void Persist(string entityName, object obj) => throw null; + public void Persist(object obj) => throw null; + public System.Threading.Tasks.Task PersistAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task PersistAsync(string entityName, object obj, System.Collections.IDictionary createdAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PersistAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void PersistOnFlush(string entityName, object obj, System.Collections.IDictionary copiedAlready) => throw null; + public void PersistOnFlush(string entityName, object obj) => throw null; + public void PersistOnFlush(object obj) => throw null; + public System.Threading.Tasks.Task PersistOnFlushAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PersistOnFlushAsync(string entityName, object obj, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task PersistOnFlushAsync(object obj, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Engine.IPersistenceContext PersistenceContext { get => throw null; } + public NHibernate.IQueryOver QueryOver(string entityName, System.Linq.Expressions.Expression> alias) where T : class => throw null; + public NHibernate.IQueryOver QueryOver(string entityName) where T : class => throw null; + public NHibernate.IQueryOver QueryOver(System.Linq.Expressions.Expression> alias) where T : class => throw null; + public NHibernate.IQueryOver QueryOver() where T : class => throw null; + public void Reconnect(System.Data.Common.DbConnection conn) => throw null; + public void Reconnect() => throw null; + public void Refresh(object obj, System.Collections.IDictionary refreshedAlready) => throw null; + public void Refresh(object obj, NHibernate.LockMode lockMode) => throw null; + public void Refresh(object obj) => throw null; + public System.Threading.Tasks.Task RefreshAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task RefreshAsync(object obj, System.Collections.IDictionary refreshedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task RefreshAsync(object obj, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Replicate(string entityName, object obj, NHibernate.ReplicationMode replicationMode) => throw null; + public void Replicate(object obj, NHibernate.ReplicationMode replicationMode) => throw null; + public System.Threading.Tasks.Task ReplicateAsync(string entityName, object obj, NHibernate.ReplicationMode replicationMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ReplicateAsync(object obj, NHibernate.ReplicationMode replicationMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Save(string entityName, object obj, object id) => throw null; + public void Save(object obj, object id) => throw null; + public object Save(string entityName, object obj) => throw null; + public object Save(object obj) => throw null; + public System.Threading.Tasks.Task SaveAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task SaveAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task SaveAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task SaveAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void SaveOrUpdate(string entityName, object obj, object id) => throw null; + public void SaveOrUpdate(string entityName, object obj) => throw null; + public void SaveOrUpdate(object obj) => throw null; + public System.Threading.Tasks.Task SaveOrUpdateAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task SaveOrUpdateAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task SaveOrUpdateAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.ISessionFactory SessionFactory { get => throw null; } + public NHibernate.ISharedSessionBuilder SessionWithOptions() => throw null; + public NHibernate.ISession SetBatchSize(int batchSize) => throw null; + public void SetReadOnly(object entityOrProxy, bool readOnly) => throw null; + public bool ShouldAutoClose { get => throw null; } + public NHibernate.ISharedStatelessSessionBuilder StatelessSessionWithOptions() => throw null; + public NHibernate.Stat.ISessionStatistics Statistics { get => throw null; } + public System.IDisposable SuspendAutoFlush() => throw null; + public void Update(string entityName, object obj, object id) => throw null; + public void Update(string entityName, object obj) => throw null; + public void Update(object obj, object id) => throw null; + public void Update(object obj) => throw null; + public System.Threading.Tasks.Task UpdateAsync(string entityName, object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UpdateAsync(string entityName, object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UpdateAsync(object obj, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UpdateAsync(object obj, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + // ERR: Stub generator didn't handle member: ~SessionImpl + } + + // Generated from `NHibernate.Impl.SqlQueryImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlQueryImpl : NHibernate.Impl.AbstractQueryImpl, NHibernate.ISynchronizableSQLQuery, NHibernate.ISynchronizableQuery, NHibernate.ISQLQuery, NHibernate.IQuery + { + public NHibernate.ISQLQuery AddEntity(string entityName) => throw null; + public NHibernate.ISQLQuery AddEntity(string alias, string entityName, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ISQLQuery AddEntity(string alias, string entityName) => throw null; + public NHibernate.ISQLQuery AddEntity(string alias, System.Type entityClass, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ISQLQuery AddEntity(string alias, System.Type entityClass) => throw null; + public NHibernate.ISQLQuery AddEntity(System.Type entityClass) => throw null; + public NHibernate.ISQLQuery AddJoin(string alias, string path, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ISQLQuery AddJoin(string alias, string path) => throw null; + public NHibernate.ISQLQuery AddScalar(string columnAlias, NHibernate.Type.IType type) => throw null; + public NHibernate.ISynchronizableSQLQuery AddSynchronizedEntityClass(System.Type entityType) => throw null; + public NHibernate.ISynchronizableSQLQuery AddSynchronizedEntityName(string entityName) => throw null; + public NHibernate.ISynchronizableSQLQuery AddSynchronizedQuerySpace(string querySpace) => throw null; + public override System.Collections.IEnumerable Enumerable() => throw null; + public override System.Collections.Generic.IEnumerable Enumerable() => throw null; + public override System.Threading.Tasks.Task EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> EnumerableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override int ExecuteUpdate() => throw null; + public override System.Threading.Tasks.Task ExecuteUpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification GenerateQuerySpecification(System.Collections.Generic.IDictionary parameters) => throw null; + public override NHibernate.Engine.QueryParameters GetQueryParameters(System.Collections.Generic.IDictionary namedParams) => throw null; + public System.Collections.Generic.IReadOnlyCollection GetSynchronizedQuerySpaces() => throw null; + protected internal override System.Collections.Generic.IEnumerable GetTranslators(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected internal override System.Threading.Tasks.Task> GetTranslatorsAsync(NHibernate.Engine.ISessionImplementor sessionImplementor, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override void List(System.Collections.IList results) => throw null; + public override System.Collections.IList List() => throw null; + public override System.Collections.Generic.IList List() => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task> ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override System.Threading.Tasks.Task ListAsync(System.Collections.IList results, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + protected internal override System.Collections.Generic.IDictionary LockModes { get => throw null; } + public override string[] ReturnAliases { get => throw null; } + public override NHibernate.Type.IType[] ReturnTypes { get => throw null; } + public override NHibernate.IQuery SetLockMode(string alias, NHibernate.LockMode lockMode) => throw null; + public NHibernate.ISQLQuery SetResultSetMapping(string name) => throw null; + internal SqlQueryImpl(string sql, string[] returnAliases, System.Type[] returnClasses, NHibernate.LockMode[] lockModes, NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.ICollection querySpaces, NHibernate.FlushMode flushMode, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + internal SqlQueryImpl(string sql, string[] returnAliases, System.Type[] returnClasses, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + internal SqlQueryImpl(string sql, System.Collections.Generic.IList queryReturns, System.Collections.Generic.ICollection querySpaces, NHibernate.FlushMode flushMode, bool callable, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + internal SqlQueryImpl(string sql, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + internal SqlQueryImpl(NHibernate.Engine.NamedSQLQueryDefinition queryDef, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Query.ParameterMetadata parameterMetadata) : base(default(string), default(NHibernate.FlushMode), default(NHibernate.Engine.ISessionImplementor), default(NHibernate.Engine.Query.ParameterMetadata)) => throw null; + public override NHibernate.Type.IType[] TypeArray() => throw null; + protected override System.Collections.Generic.IList Types { get => throw null; } + public override object[] ValueArray() => throw null; + protected override System.Collections.IList Values { get => throw null; } + protected internal override void VerifyParameters(bool reserveFirstParameter) => throw null; + protected internal override void VerifyParameters() => throw null; + } + + // Generated from `NHibernate.Impl.StatelessSessionImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StatelessSessionImpl : NHibernate.Impl.AbstractSessionImpl, System.IDisposable, NHibernate.IStatelessSession + { + public override void AfterTransactionBegin(NHibernate.ITransaction tx) => throw null; + public override void AfterTransactionCompletion(bool successful, NHibernate.ITransaction tx) => throw null; + public override System.Threading.Tasks.Task AfterTransactionCompletionAsync(bool successful, NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken) => throw null; + public override void BeforeTransactionCompletion(NHibernate.ITransaction tx) => throw null; + public override System.Threading.Tasks.Task BeforeTransactionCompletionAsync(NHibernate.ITransaction tx, System.Threading.CancellationToken cancellationToken) => throw null; + public override string BestGuessEntityName(object entity) => throw null; + public override NHibernate.CacheMode CacheMode { get => throw null; set => throw null; } + public void Close() => throw null; + public override void CloseSessionFromSystemTransaction() => throw null; + public NHibernate.ICriteria CreateCriteria(string alias) where T : class => throw null; + public NHibernate.ICriteria CreateCriteria() where T : class => throw null; + public NHibernate.ICriteria CreateCriteria(string entityName, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(string entityName) => throw null; + public NHibernate.ICriteria CreateCriteria(System.Type entityType, string alias) => throw null; + public NHibernate.ICriteria CreateCriteria(System.Type entityType) => throw null; + public override NHibernate.IQuery CreateFilter(object collection, NHibernate.IQueryExpression queryExpression) => throw null; + public override System.Threading.Tasks.Task CreateFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, System.Threading.CancellationToken cancellationToken) => throw null; + public void Delete(string entityName, object entity) => throw null; + public void Delete(object entity) => throw null; + public System.Threading.Tasks.Task DeleteAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DeleteAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Dispose() => throw null; + protected void Dispose(bool isDisposing) => throw null; + public override System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + public override System.Collections.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Collections.Generic.IEnumerable Enumerable(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> EnumerableAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters) => throw null; + public override System.Collections.Generic.IEnumerable EnumerableFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters) => throw null; + public override System.Threading.Tasks.Task EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> EnumerableFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ExecuteNativeUpdate(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification nativeSQLQuerySpecification, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task ExecuteNativeUpdateAsync(NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification nativeSQLQuerySpecification, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ExecuteUpdate(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public override System.Threading.Tasks.Task ExecuteUpdateAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override string FetchProfile { get => throw null; set => throw null; } + public override void Flush() => throw null; + public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override void FlushBeforeTransactionCompletion() => throw null; + public override System.Threading.Tasks.Task FlushBeforeTransactionCompletionAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.FlushMode FlushMode { get => throw null; set => throw null; } + public override NHibernate.Impl.FutureCriteriaBatch FutureCriteriaBatch { get => throw null; set => throw null; } + public override NHibernate.Impl.FutureQueryBatch FutureQueryBatch { get => throw null; set => throw null; } + public object Get(string entityName, object id, NHibernate.LockMode lockMode) => throw null; + public object Get(string entityName, object id) => throw null; + public T Get(object id, NHibernate.LockMode lockMode) => throw null; + public T Get(object id) => throw null; + public System.Threading.Tasks.Task GetAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(string entityName, object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(object id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task GetAsync(object id, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override object GetContextEntityIdentifier(object obj) => throw null; + public override NHibernate.Persister.Entity.IEntityPersister GetEntityPersister(string entityName, object obj) => throw null; + public override object GetEntityUsingInterceptor(NHibernate.Engine.EntityKey key) => throw null; + public override System.Threading.Tasks.Task GetEntityUsingInterceptorAsync(NHibernate.Engine.EntityKey key, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Type.IType GetFilterParameterType(string filterParameterName) => throw null; + public override object GetFilterParameterValue(string filterParameterName) => throw null; + public override NHibernate.Hql.IQueryTranslator[] GetQueries(NHibernate.IQueryExpression query, bool scalar) => throw null; + public override System.Threading.Tasks.Task GetQueriesAsync(NHibernate.IQueryExpression query, bool scalar, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Engine.ISessionImplementor GetSessionImplementation() => throw null; + public override string GuessEntityName(object entity) => throw null; + public override object ImmediateLoad(string entityName, object id) => throw null; + public override System.Threading.Tasks.Task ImmediateLoadAsync(string entityName, object id, System.Threading.CancellationToken cancellationToken) => throw null; + public override void InitializeCollection(NHibernate.Collection.IPersistentCollection collection, bool writing) => throw null; + public override System.Threading.Tasks.Task InitializeCollectionAsync(NHibernate.Collection.IPersistentCollection collection, bool writing, System.Threading.CancellationToken cancellationToken) => throw null; + public object Insert(string entityName, object entity) => throw null; + public object Insert(object entity) => throw null; + public System.Threading.Tasks.Task InsertAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task InsertAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public override object Instantiate(string clazz, object id) => throw null; + public override object Instantiate(NHibernate.Persister.Entity.IEntityPersister persister, object id) => throw null; + public override NHibernate.IInterceptor Interceptor { get => throw null; } + public override object InternalLoad(string entityName, object id, bool eager, bool isNullable) => throw null; + public override System.Threading.Tasks.Task InternalLoadAsync(string entityName, object id, bool eager, bool isNullable, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsEventSource { get => throw null; } + public override bool IsOpen { get => throw null; } + public override void List(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results) => throw null; + public override void List(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public override System.Collections.Generic.IList List(NHibernate.Impl.CriteriaImpl criteria) => throw null; + public override System.Threading.Tasks.Task> ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ListAsync(NHibernate.Impl.CriteriaImpl criteria, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ListAsync(NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override void ListCustomQuery(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results) => throw null; + public override System.Threading.Tasks.Task ListCustomQueryAsync(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.QueryParameters queryParameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters) => throw null; + public override System.Collections.Generic.IList ListFilter(object collection, string filter, NHibernate.Engine.QueryParameters parameters) => throw null; + protected override void ListFilter(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Collections.IList results) => throw null; + public override System.Threading.Tasks.Task ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task> ListFilterAsync(object collection, string filter, NHibernate.Engine.QueryParameters parameters, System.Threading.CancellationToken cancellationToken) => throw null; + protected override System.Threading.Tasks.Task ListFilterAsync(object collection, NHibernate.IQueryExpression queryExpression, NHibernate.Engine.QueryParameters parameters, System.Collections.IList results, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Event.EventListeners Listeners { get => throw null; } + public void ManagedClose() => throw null; + public void ManagedFlush() => throw null; + public System.Threading.Tasks.Task ManagedFlushAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Engine.IPersistenceContext PersistenceContext { get => throw null; } + public NHibernate.IQueryOver QueryOver(System.Linq.Expressions.Expression> alias) where T : class => throw null; + public NHibernate.IQueryOver QueryOver() where T : class => throw null; + public void Refresh(string entityName, object entity, NHibernate.LockMode lockMode) => throw null; + public void Refresh(string entityName, object entity) => throw null; + public void Refresh(object entity, NHibernate.LockMode lockMode) => throw null; + public void Refresh(object entity) => throw null; + public System.Threading.Tasks.Task RefreshAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task RefreshAsync(string entityName, object entity, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task RefreshAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task RefreshAsync(object entity, NHibernate.LockMode lockMode, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.IStatelessSession SetBatchSize(int batchSize) => throw null; + public override System.Int64 Timestamp { get => throw null; } + public void Update(string entityName, object entity) => throw null; + public void Update(object entity) => throw null; + public System.Threading.Tasks.Task UpdateAsync(string entityName, object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task UpdateAsync(object entity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + // ERR: Stub generator didn't handle member: ~StatelessSessionImpl + } + + } + namespace Intercept + { + // Generated from `NHibernate.Intercept.AbstractFieldInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractFieldInterceptor : NHibernate.Intercept.IFieldInterceptor + { + protected internal AbstractFieldInterceptor(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.ISet uninitializedFields, System.Collections.Generic.ISet unwrapProxyFieldNames, string entityName, System.Type mappedClass) => throw null; + public void ClearDirty() => throw null; + public string EntityName { get => throw null; } + public System.Collections.Generic.ISet GetUninitializedFields() => throw null; + public bool Initializing { get => throw null; } + public object Intercept(object target, string fieldName, object value, bool setter) => throw null; + public object Intercept(object target, string fieldName, object value) => throw null; + public static object InvokeImplementation; + public bool IsDirty { get => throw null; } + public bool IsInitialized { get => throw null; } + public bool IsInitializedField(string field) => throw null; + public System.Type MappedClass { get => throw null; } + public void MarkDirty() => throw null; + public NHibernate.Engine.ISessionImplementor Session { get => throw null; set => throw null; } + public System.Collections.Generic.ISet UninitializedFields { get => throw null; } + } + + // Generated from `NHibernate.Intercept.DefaultDynamicLazyFieldInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultDynamicLazyFieldInterceptor : NHibernate.Proxy.DynamicProxy.IInterceptor, NHibernate.Intercept.IFieldInterceptorAccessor + { + public DefaultDynamicLazyFieldInterceptor() => throw null; + public NHibernate.Intercept.IFieldInterceptor FieldInterceptor { get => throw null; set => throw null; } + public object Intercept(NHibernate.Proxy.DynamicProxy.InvocationInfo info) => throw null; + } + + // Generated from `NHibernate.Intercept.DefaultFieldInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultFieldInterceptor : NHibernate.Intercept.AbstractFieldInterceptor + { + public DefaultFieldInterceptor(NHibernate.Engine.ISessionImplementor session, System.Collections.Generic.ISet uninitializedFields, System.Collections.Generic.ISet unwrapProxyFieldNames, string entityName, System.Type mappedClass) : base(default(NHibernate.Engine.ISessionImplementor), default(System.Collections.Generic.ISet), default(System.Collections.Generic.ISet), default(string), default(System.Type)) => throw null; + } + + // Generated from `NHibernate.Intercept.FieldInterceptionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class FieldInterceptionHelper + { + public static void ClearDirty(object entity) => throw null; + public static NHibernate.Intercept.IFieldInterceptor ExtractFieldInterceptor(object entity) => throw null; + public static NHibernate.Intercept.IFieldInterceptor InjectFieldInterceptor(object entity, string entityName, System.Type mappedClass, System.Collections.Generic.ISet uninitializedFieldNames, System.Collections.Generic.ISet unwrapProxyFieldNames, NHibernate.Engine.ISessionImplementor session) => throw null; + public static bool IsInstrumented(object entity) => throw null; + public static bool IsInstrumented(System.Type entityClass) => throw null; + public static void MarkDirty(object entity) => throw null; + } + + // Generated from `NHibernate.Intercept.FieldInterceptorExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class FieldInterceptorExtensions + { + public static object Intercept(this NHibernate.Intercept.IFieldInterceptor interceptor, object target, string fieldName, object value, bool setter) => throw null; + } + + // Generated from `NHibernate.Intercept.IFieldInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFieldInterceptor + { + void ClearDirty(); + string EntityName { get; } + object Intercept(object target, string fieldName, object value); + bool IsDirty { get; } + bool IsInitialized { get; } + bool IsInitializedField(string field); + System.Type MappedClass { get; } + void MarkDirty(); + NHibernate.Engine.ISessionImplementor Session { get; set; } + } + + // Generated from `NHibernate.Intercept.IFieldInterceptorAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFieldInterceptorAccessor + { + NHibernate.Intercept.IFieldInterceptor FieldInterceptor { get; set; } + } + + // Generated from `NHibernate.Intercept.ILazyPropertyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILazyPropertyInitializer + { + object InitializeLazyProperty(string fieldName, object entity, NHibernate.Engine.ISessionImplementor session); + } + + // Generated from `NHibernate.Intercept.LazyPropertyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct LazyPropertyInitializer + { + // Stub generator skipped constructor + public static object UnfetchedProperty; + } + + // Generated from `NHibernate.Intercept.UnfetchedLazyProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct UnfetchedLazyProperty + { + // Stub generator skipped constructor + } + + } + namespace Linq + { + // Generated from `NHibernate.Linq.DefaultQueryProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultQueryProvider : System.Linq.IQueryProvider, NHibernate.Linq.ISupportFutureBatchNhQueryProvider, NHibernate.Linq.IQueryProviderWithOptions, NHibernate.Linq.INhQueryProvider + { + public object Collection { get => throw null; } + public virtual System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + public virtual System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + protected virtual System.Linq.IQueryProvider CreateWithOptions(NHibernate.Linq.NhQueryableOptions options) => throw null; + public DefaultQueryProvider(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + public DefaultQueryProvider(NHibernate.Engine.ISessionImplementor session) => throw null; + protected DefaultQueryProvider(NHibernate.Engine.ISessionImplementor session, object collection, NHibernate.Linq.NhQueryableOptions options) => throw null; + public virtual object Execute(System.Linq.Expressions.Expression expression) => throw null; + public TResult Execute(System.Linq.Expressions.Expression expression) => throw null; + public virtual System.Threading.Tasks.Task ExecuteAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken) => throw null; + public int ExecuteDml(NHibernate.Linq.QueryMode queryMode, System.Linq.Expressions.Expression expression) => throw null; + public System.Threading.Tasks.Task ExecuteDmlAsync(NHibernate.Linq.QueryMode queryMode, System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.IFutureEnumerable ExecuteFuture(System.Linq.Expressions.Expression expression) => throw null; + public virtual NHibernate.IFutureValue ExecuteFutureValue(System.Linq.Expressions.Expression expression) => throw null; + public virtual System.Collections.Generic.IList ExecuteList(System.Linq.Expressions.Expression expression) => throw null; + public virtual System.Threading.Tasks.Task> ExecuteListAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual object ExecuteQuery(NHibernate.Linq.NhLinqExpression nhLinqExpression, NHibernate.IQuery query, NHibernate.Linq.NhLinqExpression nhQuery) => throw null; + protected virtual object ExecuteQuery(NHibernate.Linq.NhLinqExpression nhLinqExpression, NHibernate.IQuery query) => throw null; + protected virtual System.Threading.Tasks.Task ExecuteQueryAsync(NHibernate.Linq.NhLinqExpression nhLinqExpression, NHibernate.IQuery query, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task ExecuteQueryAsync(NHibernate.Linq.NhLinqExpression nhLinqExpression, NHibernate.IQuery query, NHibernate.Linq.NhLinqExpression nhQuery, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.IQuery GetPreparedQuery(System.Linq.Expressions.Expression expression, out NHibernate.Linq.NhLinqExpression nhExpression) => throw null; + protected virtual NHibernate.Linq.NhLinqExpression PrepareQuery(System.Linq.Expressions.Expression expression, out NHibernate.IQuery query) => throw null; + public virtual NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public virtual void SetResultTransformerAndAdditionalCriteria(NHibernate.IQuery query, NHibernate.Linq.NhLinqExpression nhExpression, System.Collections.Generic.IDictionary> parameters) => throw null; + public System.Linq.IQueryProvider WithOptions(System.Action setOptions) => throw null; + } + + // Generated from `NHibernate.Linq.DmlExpressionRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DmlExpressionRewriter + { + public static System.Linq.Expressions.Expression PrepareExpression(System.Linq.Expressions.Expression sourceExpression, System.Collections.Generic.IReadOnlyDictionary assignments) => throw null; + public static System.Linq.Expressions.Expression PrepareExpression(System.Linq.Expressions.Expression sourceExpression, System.Linq.Expressions.Expression> expression) => throw null; + public static System.Linq.Expressions.Expression PrepareExpressionFromAnonymous(System.Linq.Expressions.Expression sourceExpression, System.Linq.Expressions.Expression> expression) => throw null; + } + + // Generated from `NHibernate.Linq.DmlExtensionMethods` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class DmlExtensionMethods + { + public static int Delete(this System.Linq.IQueryable source) => throw null; + public static System.Threading.Tasks.Task DeleteAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.Linq.InsertBuilder InsertBuilder(this System.Linq.IQueryable source) => throw null; + public static int InsertInto(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static int InsertInto(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static System.Threading.Tasks.Task InsertIntoAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task InsertIntoAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static int Update(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static int Update(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static System.Threading.Tasks.Task UpdateAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task UpdateAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static NHibernate.Linq.UpdateBuilder UpdateBuilder(this System.Linq.IQueryable source) => throw null; + public static int UpdateVersioned(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static int UpdateVersioned(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression) => throw null; + public static System.Threading.Tasks.Task UpdateVersionedAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task UpdateVersionedAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> expression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `NHibernate.Linq.EagerFetchingExtensionMethods` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EagerFetchingExtensionMethods + { + public static NHibernate.Linq.INhFetchRequest Fetch(this System.Linq.IQueryable query, System.Linq.Expressions.Expression> relatedObjectSelector) => throw null; + public static NHibernate.Linq.INhFetchRequest FetchLazyProperties(this System.Linq.IQueryable query) => throw null; + public static NHibernate.Linq.INhFetchRequest FetchMany(this System.Linq.IQueryable query, System.Linq.Expressions.Expression>> relatedObjectSelector) => throw null; + public static NHibernate.Linq.INhFetchRequest ThenFetch(this NHibernate.Linq.INhFetchRequest query, System.Linq.Expressions.Expression> relatedObjectSelector) => throw null; + public static NHibernate.Linq.INhFetchRequest ThenFetchMany(this NHibernate.Linq.INhFetchRequest query, System.Linq.Expressions.Expression>> relatedObjectSelector) => throw null; + } + + // Generated from `NHibernate.Linq.EnumerableHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EnumerableHelper + { + public static System.Reflection.MethodInfo GetMethod(string name, System.Type[] parameterTypes, System.Type[] genericTypeParameters) => throw null; + public static System.Reflection.MethodInfo GetMethod(string name, System.Type[] parameterTypes) => throw null; + } + + // Generated from `NHibernate.Linq.ExpressionExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ExpressionExtensions + { + public static bool IsGroupingElementOf(this Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression, Remotion.Linq.Clauses.ResultOperators.GroupResultOperator groupBy) => throw null; + public static bool IsGroupingKey(this System.Linq.Expressions.MemberExpression expression) => throw null; + public static bool IsGroupingKeyOf(this System.Linq.Expressions.MemberExpression expression, Remotion.Linq.Clauses.ResultOperators.GroupResultOperator groupBy) => throw null; + } + + // Generated from `NHibernate.Linq.ExpressionToHqlTranslationResults` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExpressionToHqlTranslationResults + { + public System.Collections.Generic.List>>> AdditionalCriteria { get => throw null; } + public System.Type ExecuteResultTypeOverride { get => throw null; } + public ExpressionToHqlTranslationResults(NHibernate.Hql.Ast.HqlTreeNode statement, System.Collections.Generic.IList itemTransformers, System.Collections.Generic.IList listTransformers, System.Collections.Generic.IList postExecuteTransformers, System.Collections.Generic.List>>> additionalCriteria, System.Type executeResultTypeOverride) => throw null; + public System.Delegate PostExecuteTransformer { get => throw null; } + public NHibernate.Linq.ResultTransformer ResultTransformer { get => throw null; } + public NHibernate.Hql.Ast.HqlTreeNode Statement { get => throw null; } + } + + // Generated from `NHibernate.Linq.IEntityNameProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface IEntityNameProvider + { + string EntityName { get; } + } + + // Generated from `NHibernate.Linq.INhFetchRequest<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INhFetchRequest : System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + } + + // Generated from `NHibernate.Linq.INhQueryModelVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INhQueryModelVisitor : Remotion.Linq.IQueryModelVisitor + { + void VisitNhHavingClause(NHibernate.Linq.Clauses.NhHavingClause nhWhereClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitNhJoinClause(NHibernate.Linq.Clauses.NhJoinClause nhJoinClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitNhWithClause(NHibernate.Linq.Clauses.NhWithClause nhWhereClause, Remotion.Linq.QueryModel queryModel, int index); + } + + // Generated from `NHibernate.Linq.INhQueryModelVisitorExtended` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface INhQueryModelVisitorExtended : Remotion.Linq.IQueryModelVisitor, NHibernate.Linq.INhQueryModelVisitor + { + void VisitNhOuterJoinClause(NHibernate.Linq.Clauses.NhOuterJoinClause nhOuterJoinClause, Remotion.Linq.QueryModel queryModel, int index); + } + + // Generated from `NHibernate.Linq.INhQueryProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INhQueryProvider : System.Linq.IQueryProvider + { + System.Threading.Tasks.Task ExecuteAsync(System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken); + int ExecuteDml(NHibernate.Linq.QueryMode queryMode, System.Linq.Expressions.Expression expression); + System.Threading.Tasks.Task ExecuteDmlAsync(NHibernate.Linq.QueryMode queryMode, System.Linq.Expressions.Expression expression, System.Threading.CancellationToken cancellationToken); + NHibernate.IFutureEnumerable ExecuteFuture(System.Linq.Expressions.Expression expression); + NHibernate.IFutureValue ExecuteFutureValue(System.Linq.Expressions.Expression expression); + void SetResultTransformerAndAdditionalCriteria(NHibernate.IQuery query, NHibernate.Linq.NhLinqExpression nhExpression, System.Collections.Generic.IDictionary> parameters); + } + + // Generated from `NHibernate.Linq.IQueryProviderWithOptions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryProviderWithOptions : System.Linq.IQueryProvider + { + System.Linq.IQueryProvider WithOptions(System.Action setOptions); + } + + // Generated from `NHibernate.Linq.IQueryableOptions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryableOptions + { + NHibernate.Linq.IQueryableOptions SetCacheMode(NHibernate.CacheMode cacheMode); + NHibernate.Linq.IQueryableOptions SetCacheRegion(string cacheRegion); + NHibernate.Linq.IQueryableOptions SetCacheable(bool cacheable); + NHibernate.Linq.IQueryableOptions SetTimeout(int timeout); + } + + // Generated from `NHibernate.Linq.ISupportFutureBatchNhQueryProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportFutureBatchNhQueryProvider + { + NHibernate.IQuery GetPreparedQuery(System.Linq.Expressions.Expression expression, out NHibernate.Linq.NhLinqExpression nhExpression); + NHibernate.Engine.ISessionImplementor Session { get; } + } + + // Generated from `NHibernate.Linq.InsertBuilder<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertBuilder + { + public int Insert() => throw null; + public System.Threading.Tasks.Task InsertAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public NHibernate.Linq.InsertBuilder Value(System.Linq.Expressions.Expression> property, TProp value) => throw null; + public NHibernate.Linq.InsertBuilder Value(System.Linq.Expressions.Expression> property, System.Linq.Expressions.Expression> expression) => throw null; + } + + // Generated from `NHibernate.Linq.InsertBuilder<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertBuilder + { + public NHibernate.Linq.InsertBuilder Into() => throw null; + } + + // Generated from `NHibernate.Linq.IntermediateHqlTree` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IntermediateHqlTree + { + public void AddAdditionalCriteria(System.Action>> criteria) => throw null; + public void AddDistinctRootOperator() => throw null; + public void AddFromClause(NHibernate.Hql.Ast.HqlTreeNode from) => throw null; + public void AddFromLastChildClause(params NHibernate.Hql.Ast.HqlTreeNode[] nodes) => throw null; + public void AddGroupByClause(NHibernate.Hql.Ast.HqlGroupBy groupBy) => throw null; + public void AddHavingClause(NHibernate.Hql.Ast.HqlBooleanExpression where) => throw null; + public void AddInsertClause(NHibernate.Hql.Ast.HqlIdent target, NHibernate.Hql.Ast.HqlRange columnSpec) => throw null; + public void AddItemTransformer(System.Linq.Expressions.LambdaExpression transformer) => throw null; + public void AddListTransformer(System.Linq.Expressions.LambdaExpression lambda) => throw null; + public void AddOrderByClause(NHibernate.Hql.Ast.HqlExpression orderBy, NHibernate.Hql.Ast.HqlDirectionStatement direction) => throw null; + public void AddPostExecuteTransformer(System.Linq.Expressions.LambdaExpression lambda) => throw null; + public void AddSelectClause(NHibernate.Hql.Ast.HqlTreeNode select) => throw null; + public void AddSet(NHibernate.Hql.Ast.HqlEquality equality) => throw null; + public void AddSkipClause(NHibernate.Hql.Ast.HqlExpression toSkip) => throw null; + public void AddTakeClause(NHibernate.Hql.Ast.HqlExpression toTake) => throw null; + public void AddWhereClause(NHibernate.Hql.Ast.HqlBooleanExpression where) => throw null; + public System.Type ExecuteResultTypeOverride { get => throw null; set => throw null; } + public NHibernate.Linq.ExpressionToHqlTranslationResults GetTranslation() => throw null; + public IntermediateHqlTree(bool root, NHibernate.Linq.QueryMode mode) => throw null; + public bool IsRoot { get => throw null; } + public NHibernate.Hql.Ast.HqlTreeNode Root { get => throw null; } + public void SetRoot(NHibernate.Hql.Ast.HqlTreeNode newRoot) => throw null; + public NHibernate.Hql.Ast.HqlTreeBuilder TreeBuilder { get => throw null; } + } + + // Generated from `NHibernate.Linq.LinqExtensionMethodAttribute` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LinqExtensionMethodAttribute : NHibernate.Linq.LinqExtensionMethodAttributeBase + { + public LinqExtensionMethodAttribute(string name, NHibernate.Linq.LinqExtensionPreEvaluation preEvaluation) : base(default(NHibernate.Linq.LinqExtensionPreEvaluation)) => throw null; + public LinqExtensionMethodAttribute(string name) : base(default(NHibernate.Linq.LinqExtensionPreEvaluation)) => throw null; + public LinqExtensionMethodAttribute(NHibernate.Linq.LinqExtensionPreEvaluation preEvaluation) : base(default(NHibernate.Linq.LinqExtensionPreEvaluation)) => throw null; + public LinqExtensionMethodAttribute() : base(default(NHibernate.Linq.LinqExtensionPreEvaluation)) => throw null; + public string Name { get => throw null; } + } + + // Generated from `NHibernate.Linq.LinqExtensionMethodAttributeBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class LinqExtensionMethodAttributeBase : System.Attribute + { + protected LinqExtensionMethodAttributeBase(NHibernate.Linq.LinqExtensionPreEvaluation preEvaluation) => throw null; + public NHibernate.Linq.LinqExtensionPreEvaluation PreEvaluation { get => throw null; } + } + + // Generated from `NHibernate.Linq.LinqExtensionMethods` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class LinqExtensionMethods + { + public static System.Threading.Tasks.Task AllAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AnyAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AnyAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task AverageAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Linq.IQueryable CacheMode(this System.Linq.IQueryable query, NHibernate.CacheMode cacheMode) => throw null; + public static System.Linq.IQueryable CacheRegion(this System.Linq.IQueryable query, string region) => throw null; + public static System.Linq.IQueryable Cacheable(this System.Linq.IQueryable query) => throw null; + public static System.Threading.Tasks.Task CountAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task CountAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task FirstAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task FirstAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task FirstOrDefaultAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task FirstOrDefaultAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Linq.IQueryable LeftJoin(this System.Linq.IQueryable outer, System.Linq.IQueryable inner, System.Linq.Expressions.Expression> outerKeySelector, System.Linq.Expressions.Expression> innerKeySelector, System.Linq.Expressions.Expression> resultSelector) => throw null; + public static System.Threading.Tasks.Task LongCountAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task LongCountAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static T MappedAs(this T parameter, NHibernate.Type.IType type) => throw null; + public static System.Threading.Tasks.Task MaxAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task MaxAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task MinAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task MinAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Linq.IQueryable SetOptions(this System.Linq.IQueryable query, System.Action setOptions) => throw null; + public static System.Threading.Tasks.Task SingleAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SingleAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SingleOrDefaultAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SingleOrDefaultAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Linq.Expressions.Expression> selector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Threading.Tasks.Task SumAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Linq.IQueryable Timeout(this System.Linq.IQueryable query, int timeout) => throw null; + public static NHibernate.IFutureEnumerable ToFuture(this System.Linq.IQueryable source) => throw null; + public static NHibernate.IFutureValue ToFutureValue(this System.Linq.IQueryable source) => throw null; + public static NHibernate.IFutureValue ToFutureValue(this System.Linq.IQueryable source, System.Linq.Expressions.Expression, TResult>> selector) => throw null; + public static System.Threading.Tasks.Task> ToListAsync(this System.Linq.IQueryable source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static System.Linq.IQueryable WithLock(this System.Linq.IQueryable query, NHibernate.LockMode lockMode) => throw null; + public static System.Collections.Generic.IEnumerable WithLock(this System.Collections.Generic.IEnumerable query, NHibernate.LockMode lockMode) => throw null; + public static System.Linq.IQueryable WithOptions(this System.Linq.IQueryable query, System.Action setOptions) => throw null; + } + + // Generated from `NHibernate.Linq.LinqExtensionPreEvaluation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum LinqExtensionPreEvaluation + { + AllowPreEvaluation, + NoEvaluation, + } + + // Generated from `NHibernate.Linq.NHibernateNodeTypeProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NHibernateNodeTypeProvider : Remotion.Linq.Parsing.Structure.INodeTypeProvider + { + public System.Type GetNodeType(System.Reflection.MethodInfo method) => throw null; + public bool IsRegistered(System.Reflection.MethodInfo method) => throw null; + public NHibernateNodeTypeProvider() => throw null; + } + + // Generated from `NHibernate.Linq.NhFetchRequest<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhFetchRequest : Remotion.Linq.QueryableBase, System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable, NHibernate.Linq.INhFetchRequest + { + public NhFetchRequest(System.Linq.IQueryProvider provider, System.Linq.Expressions.Expression expression) : base(default(System.Linq.IQueryProvider)) => throw null; + } + + // Generated from `NHibernate.Linq.NhLinqDmlExpression<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhLinqDmlExpression : NHibernate.Linq.NhLinqExpression + { + public NhLinqDmlExpression(NHibernate.Linq.QueryMode queryMode, System.Linq.Expressions.Expression expression, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) : base(default(System.Linq.Expressions.Expression), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override System.Type TargetType { get => throw null; } + } + + // Generated from `NHibernate.Linq.NhLinqExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhLinqExpression : NHibernate.IQueryExpression + { + public bool CanCachePlan { get => throw null; set => throw null; } + public NHibernate.Linq.ExpressionToHqlTranslationResults ExpressionToHqlTranslationResults { get => throw null; set => throw null; } + public string Key { get => throw null; set => throw null; } + public NhLinqExpression(System.Linq.Expressions.Expression expression, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public System.Collections.Generic.IList ParameterDescriptors { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary> ParameterValuesByName { get => throw null; } + protected virtual NHibernate.Linq.QueryMode QueryMode { get => throw null; } + public NHibernate.Linq.NhLinqExpressionReturnType ReturnType { get => throw null; } + protected virtual System.Type TargetType { get => throw null; } + public NHibernate.Hql.Ast.ANTLR.Tree.IASTNode Translate(NHibernate.Engine.ISessionFactoryImplementor sessionFactory, bool filter) => throw null; + public System.Type Type { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.NhLinqExpressionReturnType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum NhLinqExpressionReturnType + { + Scalar, + Sequence, + } + + // Generated from `NHibernate.Linq.NhQueryable<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhQueryable : Remotion.Linq.QueryableBase, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public string EntityName { get => throw null; set => throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public NhQueryable(System.Linq.IQueryProvider provider, System.Linq.Expressions.Expression expression, string entityName) : base(default(System.Linq.IQueryProvider)) => throw null; + public NhQueryable(System.Linq.IQueryProvider provider, System.Linq.Expressions.Expression expression) : base(default(System.Linq.IQueryProvider)) => throw null; + public NhQueryable(NHibernate.Engine.ISessionImplementor session, string entityName) : base(default(System.Linq.IQueryProvider)) => throw null; + public NhQueryable(NHibernate.Engine.ISessionImplementor session, object collection) : base(default(System.Linq.IQueryProvider)) => throw null; + public NhQueryable(NHibernate.Engine.ISessionImplementor session) : base(default(System.Linq.IQueryProvider)) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Linq.NhQueryableOptions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhQueryableOptions : NHibernate.Linq.IQueryableOptions + { + protected internal void Apply(NHibernate.IQuery query) => throw null; + protected NHibernate.CacheMode? CacheMode { get => throw null; set => throw null; } + protected string CacheRegion { get => throw null; set => throw null; } + protected bool? Cacheable { get => throw null; set => throw null; } + protected internal NHibernate.Linq.NhQueryableOptions Clone() => throw null; + protected string Comment { get => throw null; set => throw null; } + protected NHibernate.FlushMode? FlushMode { get => throw null; set => throw null; } + public NhQueryableOptions() => throw null; + protected bool? ReadOnly { get => throw null; set => throw null; } + public NHibernate.Linq.NhQueryableOptions SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + NHibernate.Linq.IQueryableOptions NHibernate.Linq.IQueryableOptions.SetCacheMode(NHibernate.CacheMode cacheMode) => throw null; + public NHibernate.Linq.NhQueryableOptions SetCacheRegion(string cacheRegion) => throw null; + NHibernate.Linq.IQueryableOptions NHibernate.Linq.IQueryableOptions.SetCacheRegion(string cacheRegion) => throw null; + public NHibernate.Linq.NhQueryableOptions SetCacheable(bool cacheable) => throw null; + NHibernate.Linq.IQueryableOptions NHibernate.Linq.IQueryableOptions.SetCacheable(bool cacheable) => throw null; + public NHibernate.Linq.NhQueryableOptions SetComment(string comment) => throw null; + public NHibernate.Linq.NhQueryableOptions SetFlushMode(NHibernate.FlushMode flushMode) => throw null; + public NHibernate.Linq.NhQueryableOptions SetReadOnly(bool readOnly) => throw null; + public NHibernate.Linq.NhQueryableOptions SetTimeout(int timeout) => throw null; + NHibernate.Linq.IQueryableOptions NHibernate.Linq.IQueryableOptions.SetTimeout(int timeout) => throw null; + protected int? Timeout { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.NhRelinqQueryParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NhRelinqQueryParser + { + public static Remotion.Linq.QueryModel Parse(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.Expression PreTransform(System.Linq.Expressions.Expression expression) => throw null; + public static NHibernate.Linq.Visitors.PreTransformationResult PreTransform(System.Linq.Expressions.Expression expression, NHibernate.Linq.Visitors.PreTransformationParameters parameters) => throw null; + } + + // Generated from `NHibernate.Linq.NoPreEvaluationAttribute` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoPreEvaluationAttribute : NHibernate.Linq.LinqExtensionMethodAttributeBase + { + public NoPreEvaluationAttribute() : base(default(NHibernate.Linq.LinqExtensionPreEvaluation)) => throw null; + } + + // Generated from `NHibernate.Linq.QueryMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum QueryMode + { + Delete, + Insert, + Select, + Update, + UpdateVersioned, + } + + // Generated from `NHibernate.Linq.QuerySourceNamer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySourceNamer + { + public void Add(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public string GetName(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public QuerySourceNamer() => throw null; + } + + // Generated from `NHibernate.Linq.ReflectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ReflectionHelper + { + public static System.Reflection.MethodInfo GetMethod(System.Linq.Expressions.Expression> method) => throw null; + public static System.Reflection.MethodInfo GetMethod(System.Linq.Expressions.Expression method) => throw null; + public static System.Reflection.MethodInfo GetMethodDefinition(System.Linq.Expressions.Expression> method) => throw null; + public static System.Reflection.MethodInfo GetMethodDefinition(System.Linq.Expressions.Expression method) => throw null; + public static System.Reflection.MemberInfo GetProperty(System.Linq.Expressions.Expression> property) => throw null; + } + + // Generated from `NHibernate.Linq.ResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultTransformer : System.IEquatable, NHibernate.Transform.IResultTransformer + { + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Linq.ResultTransformer other) => throw null; + public override int GetHashCode() => throw null; + public ResultTransformer(System.Func itemTransformation, System.Func, object> listTransformation) => throw null; + public System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Linq.SqlMethods` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SqlMethods + { + public static bool Like(this string matchExpression, string sqlLikePattern, System.Char escapeCharacter) => throw null; + public static bool Like(this string matchExpression, string sqlLikePattern) => throw null; + } + + // Generated from `NHibernate.Linq.UpdateBuilder<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UpdateBuilder + { + public NHibernate.Linq.UpdateBuilder Set(System.Linq.Expressions.Expression> property, TProp value) => throw null; + public NHibernate.Linq.UpdateBuilder Set(System.Linq.Expressions.Expression> property, System.Linq.Expressions.Expression> expression) => throw null; + public int Update() => throw null; + public System.Threading.Tasks.Task UpdateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public int UpdateVersioned() => throw null; + public System.Threading.Tasks.Task UpdateVersionedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + namespace Clauses + { + // Generated from `NHibernate.Linq.Clauses.NhClauseBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NhClauseBase + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + protected abstract void Accept(NHibernate.Linq.INhQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index); + protected NhClauseBase() => throw null; + } + + // Generated from `NHibernate.Linq.Clauses.NhHavingClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhHavingClause : NHibernate.Linq.Clauses.NhClauseBase, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + protected override void Accept(NHibernate.Linq.INhQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public NHibernate.Linq.Clauses.NhHavingClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public NhHavingClause(System.Linq.Expressions.Expression predicate) => throw null; + public System.Linq.Expressions.Expression Predicate { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `NHibernate.Linq.Clauses.NhJoinClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhJoinClause : NHibernate.Linq.Clauses.NhClauseBase, Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IFromClause, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + protected override void Accept(NHibernate.Linq.INhQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public NHibernate.Linq.Clauses.NhJoinClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public void CopyFromSource(Remotion.Linq.Clauses.IFromClause source) => throw null; + public System.Linq.Expressions.Expression FromExpression { get => throw null; set => throw null; } + public bool IsInner { get => throw null; set => throw null; } + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public void MakeInner() => throw null; + public NhJoinClause(string itemName, System.Type itemType, System.Linq.Expressions.Expression fromExpression, System.Collections.Generic.IEnumerable restrictions) => throw null; + public NhJoinClause(string itemName, System.Type itemType, System.Linq.Expressions.Expression fromExpression) => throw null; + public System.Collections.ObjectModel.ObservableCollection Restrictions { get => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `NHibernate.Linq.Clauses.NhOuterJoinClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhOuterJoinClause : NHibernate.Linq.Clauses.NhClauseBase, Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + protected override void Accept(NHibernate.Linq.INhQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public Remotion.Linq.Clauses.IBodyClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public string ItemName { get => throw null; } + public System.Type ItemType { get => throw null; } + public Remotion.Linq.Clauses.JoinClause JoinClause { get => throw null; } + public NhOuterJoinClause(Remotion.Linq.Clauses.JoinClause joinClause) => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `NHibernate.Linq.Clauses.NhWithClause` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhWithClause : NHibernate.Linq.Clauses.NhClauseBase, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + protected override void Accept(NHibernate.Linq.INhQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public NHibernate.Linq.Clauses.NhWithClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public NhWithClause(System.Linq.Expressions.Expression predicate) => throw null; + public System.Linq.Expressions.Expression Predicate { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + } + namespace ExpressionTransformers + { + // Generated from `NHibernate.Linq.ExpressionTransformers.RemoveCharToIntConversion` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RemoveCharToIntConversion : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public RemoveCharToIntConversion() => throw null; + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.BinaryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.ExpressionTransformers.RemoveRedundantCast` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RemoveRedundantCast : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public RemoveRedundantCast() => throw null; + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.UnaryExpression expression) => throw null; + } + + } + namespace Expressions + { + // Generated from `NHibernate.Linq.Expressions.NhAggregatedExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NhAggregatedExpression : NHibernate.Linq.Expressions.NhExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public virtual bool AllowsNullableReturnType { get => throw null; } + public abstract System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression); + public System.Linq.Expressions.Expression Expression { get => throw null; } + protected NhAggregatedExpression(System.Linq.Expressions.Expression expression, System.Type type) => throw null; + protected NhAggregatedExpression(System.Linq.Expressions.Expression expression) => throw null; + public override System.Type Type { get => throw null; } + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhAverageExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhAverageExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhAverageExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhCountExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NhCountExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override bool AllowsNullableReturnType { get => throw null; } + protected NhCountExpression(System.Linq.Expressions.Expression expression, System.Type type) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhDistinctExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhDistinctExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhDistinctExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NhExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + protected abstract System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor); + protected NhExpression() => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + } + + // Generated from `NHibernate.Linq.Expressions.NhLongCountExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhLongCountExpression : NHibernate.Linq.Expressions.NhCountExpression + { + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhLongCountExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression), default(System.Type)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhMaxExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhMaxExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhMaxExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhMinExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhMinExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhMinExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhNewExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhNewExpression : NHibernate.Linq.Expressions.NhExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection Arguments { get => throw null; } + public System.Collections.ObjectModel.ReadOnlyCollection Members { get => throw null; } + public NhNewExpression(System.Collections.Generic.IList members, System.Collections.Generic.IList arguments) => throw null; + public override System.Type Type { get => throw null; } + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhNominatedExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhNominatedExpression : NHibernate.Linq.Expressions.NhExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Expression { get => throw null; } + public NhNominatedExpression(System.Linq.Expressions.Expression expression) => throw null; + public override System.Type Type { get => throw null; } + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhShortCountExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhShortCountExpression : NHibernate.Linq.Expressions.NhCountExpression + { + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhShortCountExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression), default(System.Type)) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhStarExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhStarExpression : NHibernate.Linq.Expressions.NhExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public System.Linq.Expressions.Expression Expression { get => throw null; } + public NhStarExpression(System.Linq.Expressions.Expression expression) => throw null; + public override System.Type Type { get => throw null; } + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Expressions.NhSumExpression` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhSumExpression : NHibernate.Linq.Expressions.NhAggregatedExpression + { + protected override System.Linq.Expressions.Expression Accept(NHibernate.Linq.Visitors.NhExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.Expression CreateNew(System.Linq.Expressions.Expression expression) => throw null; + public NhSumExpression(System.Linq.Expressions.Expression expression) : base(default(System.Linq.Expressions.Expression)) => throw null; + } + + } + namespace Functions + { + // Generated from `NHibernate.Linq.Functions.AllHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AllHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public AllHqlGenerator() => throw null; + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.AnyHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnyHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public AnyHqlGenerator() => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.BaseHqlGeneratorForMethod` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class BaseHqlGeneratorForMethod : NHibernate.Linq.Functions.IHqlGeneratorForMethod + { + public virtual bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + protected BaseHqlGeneratorForMethod() => throw null; + public abstract NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor); + protected static NHibernate.INHibernateLogger Log; + public System.Collections.Generic.IEnumerable SupportedMethods { get => throw null; set => throw null; } + public virtual bool TryGetCollectionParameter(System.Linq.Expressions.MethodCallExpression expression, out System.Linq.Expressions.ConstantExpression collectionParameter) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.BaseHqlGeneratorForProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class BaseHqlGeneratorForProperty : NHibernate.Linq.Functions.IHqlGeneratorForProperty + { + protected BaseHqlGeneratorForProperty() => throw null; + public abstract NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor); + public System.Collections.Generic.IEnumerable SupportedProperties { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.Functions.CollectionContainsGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionContainsGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public CollectionContainsGenerator() => throw null; + public override bool TryGetCollectionParameter(System.Linq.Expressions.MethodCallExpression expression, out System.Linq.Expressions.ConstantExpression collectionParameter) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.CollectionContainsRuntimeHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionContainsRuntimeHqlGenerator : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator + { + public CollectionContainsRuntimeHqlGenerator() => throw null; + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ContainsGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ContainsGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public ContainsGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToBooleanGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConvertToBooleanGenerator : NHibernate.Linq.Functions.ConvertToGenerator + { + public ConvertToBooleanGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToDateTimeGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConvertToDateTimeGenerator : NHibernate.Linq.Functions.ConvertToGenerator + { + public ConvertToDateTimeGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToDecimalGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConvertToDecimalGenerator : NHibernate.Linq.Functions.ConvertToGenerator + { + public ConvertToDecimalGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToDoubleGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConvertToDoubleGenerator : NHibernate.Linq.Functions.ConvertToGenerator + { + public ConvertToDoubleGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToGenerator<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ConvertToGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + protected ConvertToGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ConvertToInt32Generator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConvertToInt32Generator : NHibernate.Linq.Functions.ConvertToGenerator + { + public ConvertToInt32Generator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DateTimeNowHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeNowHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForProperty, NHibernate.Linq.Functions.IAllowPreEvaluationHqlGenerator + { + public bool AllowPreEvaluation(System.Reflection.MemberInfo member, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public DateTimeNowHqlGenerator() => throw null; + public bool IgnoreInstance(System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DateTimePropertiesHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimePropertiesHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForProperty + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public DateTimePropertiesHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DefaultLinqToHqlGeneratorsRegistry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultLinqToHqlGeneratorsRegistry : NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry + { + public DefaultLinqToHqlGeneratorsRegistry() => throw null; + protected bool GetRuntimeMethodGenerator(System.Reflection.MethodInfo method, out NHibernate.Linq.Functions.IHqlGeneratorForMethod methodGenerator) => throw null; + public void RegisterGenerator(NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator generator) => throw null; + public virtual void RegisterGenerator(System.Reflection.MethodInfo method, NHibernate.Linq.Functions.IHqlGeneratorForMethod generator) => throw null; + public virtual void RegisterGenerator(System.Reflection.MemberInfo property, NHibernate.Linq.Functions.IHqlGeneratorForProperty generator) => throw null; + public virtual bool TryGetGenerator(System.Reflection.MethodInfo method, out NHibernate.Linq.Functions.IHqlGeneratorForMethod generator) => throw null; + public virtual bool TryGetGenerator(System.Reflection.MemberInfo property, out NHibernate.Linq.Functions.IHqlGeneratorForProperty generator) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DictionaryContainsKeyGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryContainsKeyGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public DictionaryContainsKeyGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DictionaryContainsKeyRuntimeHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryContainsKeyRuntimeHqlGenerator : NHibernate.Linq.Functions.DictionaryRuntimeMethodHqlGeneratorBase + { + public DictionaryContainsKeyRuntimeHqlGenerator() => throw null; + protected override string MethodName { get => throw null; } + } + + // Generated from `NHibernate.Linq.Functions.DictionaryItemGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryItemGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public DictionaryItemGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.DictionaryItemRuntimeHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DictionaryItemRuntimeHqlGenerator : NHibernate.Linq.Functions.DictionaryRuntimeMethodHqlGeneratorBase + { + public DictionaryItemRuntimeHqlGenerator() => throw null; + protected override string MethodName { get => throw null; } + } + + // Generated from `NHibernate.Linq.Functions.DictionaryRuntimeMethodHqlGeneratorBase<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class DictionaryRuntimeMethodHqlGeneratorBase : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator where TGenerator : NHibernate.Linq.Functions.IHqlGeneratorForMethod, new() + { + protected DictionaryRuntimeMethodHqlGeneratorBase() => throw null; + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + protected abstract string MethodName { get; } + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.EndsWithGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EndsWithGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public EndsWithGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.EqualsGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EqualsGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public EqualsGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.GenericDictionaryContainsKeyRuntimeHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericDictionaryContainsKeyRuntimeHqlGenerator : NHibernate.Linq.Functions.GenericDictionaryRuntimeMethodHqlGeneratorBase + { + public GenericDictionaryContainsKeyRuntimeHqlGenerator() => throw null; + protected override string MethodName { get => throw null; } + } + + // Generated from `NHibernate.Linq.Functions.GenericDictionaryItemRuntimeHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericDictionaryItemRuntimeHqlGenerator : NHibernate.Linq.Functions.GenericDictionaryRuntimeMethodHqlGeneratorBase + { + public GenericDictionaryItemRuntimeHqlGenerator() => throw null; + protected override string MethodName { get => throw null; } + } + + // Generated from `NHibernate.Linq.Functions.GenericDictionaryRuntimeMethodHqlGeneratorBase<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class GenericDictionaryRuntimeMethodHqlGeneratorBase : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator where TGenerator : NHibernate.Linq.Functions.IHqlGeneratorForMethod, new() + { + protected GenericDictionaryRuntimeMethodHqlGeneratorBase() => throw null; + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + protected abstract string MethodName { get; } + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.GetCharsGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GetCharsGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public GetCharsGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.HqlGeneratorForExtensionMethod` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlGeneratorForExtensionMethod : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public HqlGeneratorForExtensionMethod(NHibernate.Linq.LinqExtensionMethodAttribute attribute, System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.HqlGeneratorForPropertyExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class HqlGeneratorForPropertyExtensions + { + public static bool AllowPreEvaluation(this NHibernate.Linq.Functions.IHqlGeneratorForProperty generator, System.Reflection.MemberInfo member, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.IAllowPreEvaluationHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAllowPreEvaluationHqlGenerator + { + bool AllowPreEvaluation(System.Reflection.MemberInfo member, NHibernate.Engine.ISessionFactoryImplementor factory); + bool IgnoreInstance(System.Reflection.MemberInfo member); + } + + // Generated from `NHibernate.Linq.Functions.IHqlGeneratorForMethod` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IHqlGeneratorForMethod + { + NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor); + System.Collections.Generic.IEnumerable SupportedMethods { get; } + } + + // Generated from `NHibernate.Linq.Functions.IHqlGeneratorForMethodExtended` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface IHqlGeneratorForMethodExtended + { + bool AllowsNullableReturnType(System.Reflection.MethodInfo method); + bool TryGetCollectionParameter(System.Linq.Expressions.MethodCallExpression expression, out System.Linq.Expressions.ConstantExpression collectionParameter); + } + + // Generated from `NHibernate.Linq.Functions.IHqlGeneratorForProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IHqlGeneratorForProperty + { + NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor); + System.Collections.Generic.IEnumerable SupportedProperties { get; } + } + + // Generated from `NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILinqToHqlGeneratorsRegistry + { + void RegisterGenerator(System.Reflection.MethodInfo method, NHibernate.Linq.Functions.IHqlGeneratorForMethod generator); + void RegisterGenerator(System.Reflection.MemberInfo property, NHibernate.Linq.Functions.IHqlGeneratorForProperty generator); + void RegisterGenerator(NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator generator); + bool TryGetGenerator(System.Reflection.MethodInfo method, out NHibernate.Linq.Functions.IHqlGeneratorForMethod generator); + bool TryGetGenerator(System.Reflection.MemberInfo property, out NHibernate.Linq.Functions.IHqlGeneratorForProperty generator); + } + + // Generated from `NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRuntimeMethodHqlGenerator + { + NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method); + bool SupportsMethod(System.Reflection.MethodInfo method); + } + + // Generated from `NHibernate.Linq.Functions.IndexOfGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexOfGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public IndexOfGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.LengthGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LengthGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForProperty + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MemberInfo member, System.Linq.Expressions.Expression expression, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public LengthGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.LikeGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LikeGenerator : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator, NHibernate.Linq.Functions.IHqlGeneratorForMethod + { + public bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + public LikeGenerator() => throw null; + public System.Collections.Generic.IEnumerable SupportedMethods { get => throw null; } + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + public bool TryGetCollectionParameter(System.Linq.Expressions.MethodCallExpression expression, out System.Linq.Expressions.ConstantExpression collectionParameter) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.LinqToHqlGeneratorsRegistryExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class LinqToHqlGeneratorsRegistryExtensions + { + public static void Merge(this NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry registry, NHibernate.Linq.Functions.IHqlGeneratorForProperty generator) => throw null; + public static void Merge(this NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry registry, NHibernate.Linq.Functions.IHqlGeneratorForMethod generator) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.LinqToHqlGeneratorsRegistryFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LinqToHqlGeneratorsRegistryFactory + { + public static NHibernate.Linq.Functions.ILinqToHqlGeneratorsRegistry CreateGeneratorsRegistry(System.Collections.Generic.IDictionary properties) => throw null; + public LinqToHqlGeneratorsRegistryFactory() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.MathGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MathGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression expression, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public MathGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.MaxHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MaxHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public MaxHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.MinHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MinHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public MinHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.NewGuidHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NewGuidHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod, NHibernate.Linq.Functions.IAllowPreEvaluationHqlGenerator + { + public bool AllowPreEvaluation(System.Reflection.MemberInfo member, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public bool IgnoreInstance(System.Reflection.MemberInfo member) => throw null; + public NewGuidHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.RandomHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RandomHqlGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod, NHibernate.Linq.Functions.IAllowPreEvaluationHqlGenerator + { + public bool AllowPreEvaluation(System.Reflection.MemberInfo member, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public bool IgnoreInstance(System.Reflection.MemberInfo member) => throw null; + public RandomHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ReplaceGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReplaceGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public ReplaceGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.StandardLinqExtensionMethodGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardLinqExtensionMethodGenerator : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator + { + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + public StandardLinqExtensionMethodGenerator() => throw null; + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Linq.Functions.StartsWithGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StartsWithGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override bool AllowsNullableReturnType(System.Reflection.MethodInfo method) => throw null; + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public StartsWithGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.SubStringGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubStringGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public SubStringGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ToLowerGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ToLowerGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public ToLowerGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ToStringHqlGeneratorForMethod` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ToStringHqlGeneratorForMethod : NHibernate.Linq.Functions.IHqlGeneratorForMethod + { + public NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public System.Collections.Generic.IEnumerable SupportedMethods { get => throw null; } + public ToStringHqlGeneratorForMethod() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ToStringRuntimeMethodHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ToStringRuntimeMethodHqlGenerator : NHibernate.Linq.Functions.IRuntimeMethodHqlGenerator + { + public NHibernate.Linq.Functions.IHqlGeneratorForMethod GetMethodGenerator(System.Reflection.MethodInfo method) => throw null; + public bool SupportsMethod(System.Reflection.MethodInfo method) => throw null; + public ToStringRuntimeMethodHqlGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.ToUpperGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ToUpperGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public ToUpperGenerator() => throw null; + } + + // Generated from `NHibernate.Linq.Functions.TrimGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TrimGenerator : NHibernate.Linq.Functions.BaseHqlGeneratorForMethod + { + public override NHibernate.Hql.Ast.HqlTreeNode BuildHql(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.ObjectModel.ReadOnlyCollection arguments, NHibernate.Hql.Ast.HqlTreeBuilder treeBuilder, NHibernate.Linq.Visitors.IHqlExpressionVisitor visitor) => throw null; + public TrimGenerator() => throw null; + } + + } + namespace GroupBy + { + // Generated from `NHibernate.Linq.GroupBy.AggregatingGroupByRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class AggregatingGroupByRewriter + { + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + } + + // Generated from `NHibernate.Linq.GroupBy.ClientSideSelect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClientSideSelect : NHibernate.Linq.ResultOperators.ClientSideTransformOperator + { + public ClientSideSelect(System.Linq.Expressions.LambdaExpression selectClause) => throw null; + public System.Linq.Expressions.LambdaExpression SelectClause { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.GroupBy.ClientSideSelect2` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClientSideSelect2 : NHibernate.Linq.ResultOperators.ClientSideTransformOperator + { + public ClientSideSelect2(System.Linq.Expressions.LambdaExpression selectClause) => throw null; + public System.Linq.Expressions.LambdaExpression SelectClause { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.GroupBy.NonAggregatingGroupByRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NonAggregatingGroupByRewriter + { + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + } + + } + namespace GroupJoin + { + // Generated from `NHibernate.Linq.GroupJoin.AggregatingGroupJoinRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class AggregatingGroupJoinRewriter + { + public static void ReWrite(Remotion.Linq.QueryModel model) => throw null; + } + + // Generated from `NHibernate.Linq.GroupJoin.GroupJoinSelectClauseRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GroupJoinSelectClauseRewriter : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression ReWrite(System.Linq.Expressions.Expression expression, NHibernate.Linq.GroupJoin.IsAggregatingResults results) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.GroupJoin.IsAggregatingResults` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IsAggregatingResults + { + public System.Collections.Generic.List AggregatingClauses { get => throw null; set => throw null; } + public IsAggregatingResults() => throw null; + public System.Collections.Generic.List NonAggregatingClauses { get => throw null; set => throw null; } + public System.Collections.Generic.List NonAggregatingExpressions { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.GroupJoin.LocateGroupJoinQuerySource` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LocateGroupJoinQuerySource : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public Remotion.Linq.Clauses.GroupJoinClause Detect(System.Linq.Expressions.Expression expression) => throw null; + public LocateGroupJoinQuerySource(NHibernate.Linq.GroupJoin.IsAggregatingResults results) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + } + + } + namespace ReWriters + { + // Generated from `NHibernate.Linq.ReWriters.AddJoinsReWriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AddJoinsReWriter : NHibernate.Linq.Visitors.NhQueryModelVisitorBase, Remotion.Linq.IQueryModelVisitor, NHibernate.Linq.INhQueryModelVisitor + { + public bool IsEntity(System.Type type) => throw null; + public bool IsIdentifier(System.Type type, string propertyName) => throw null; + public static void ReWrite(Remotion.Linq.QueryModel queryModel, NHibernate.Linq.Visitors.VisitorParameters parameters) => throw null; + public override void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitNhHavingClause(NHibernate.Linq.Clauses.NhHavingClause havingClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public void VisitNhOuterJoinClause(NHibernate.Linq.Clauses.NhOuterJoinClause nhOuterJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitOrdering(Remotion.Linq.Clauses.Ordering ordering, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause, int index) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.ArrayIndexExpressionFlattener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ArrayIndexExpressionFlattener : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public ArrayIndexExpressionFlattener() => throw null; + public static void ReWrite(Remotion.Linq.QueryModel model) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.IIsEntityDecider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface IIsEntityDecider + { + } + + // Generated from `NHibernate.Linq.ReWriters.MergeAggregatingResultsRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MergeAggregatingResultsRewriter : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static void ReWrite(Remotion.Linq.QueryModel model) => throw null; + public override void VisitOrdering(Remotion.Linq.Clauses.Ordering ordering, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause, int index) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.MoveOrderByToEndRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MoveOrderByToEndRewriter + { + public MoveOrderByToEndRewriter() => throw null; + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.QueryReferenceExpressionFlattener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryReferenceExpressionFlattener : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static void ReWrite(Remotion.Linq.QueryModel model) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression subQuery) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.RemoveUnnecessaryBodyOperators` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RemoveUnnecessaryBodyOperators : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.ResultOperatorRemover` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultOperatorRemover : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static void Remove(Remotion.Linq.QueryModel queryModel, System.Func predicate) => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.ResultOperatorRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultOperatorRewriter : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static NHibernate.Linq.ReWriters.ResultOperatorRewriterResult Rewrite(Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + } + + // Generated from `NHibernate.Linq.ReWriters.ResultOperatorRewriterResult` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultOperatorRewriterResult + { + public Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo EvaluationType { get => throw null; set => throw null; } + public ResultOperatorRewriterResult(System.Collections.Generic.IEnumerable rewrittenOperators, Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo evaluationType) => throw null; + public System.Collections.Generic.IEnumerable RewrittenOperators { get => throw null; set => throw null; } + } + + } + namespace ResultOperators + { + // Generated from `NHibernate.Linq.ResultOperators.ClientSideTransformOperator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClientSideTransformOperator : Remotion.Linq.Clauses.ResultOperatorBase + { + public ClientSideTransformOperator() => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.IStreamedData input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `NHibernate.Linq.ResultOperators.NonAggregatingGroupBy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonAggregatingGroupBy : NHibernate.Linq.ResultOperators.ClientSideTransformOperator + { + public Remotion.Linq.Clauses.ResultOperators.GroupResultOperator GroupBy { get => throw null; set => throw null; } + public NonAggregatingGroupBy(Remotion.Linq.Clauses.ResultOperators.GroupResultOperator groupBy) => throw null; + } + + } + namespace Visitors + { + // Generated from `NHibernate.Linq.Visitors.BooleanToCaseConvertor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class BooleanToCaseConvertor + { + public static System.Collections.Generic.IEnumerable Convert(System.Collections.Generic.IEnumerable hqlTreeNodes) => throw null; + public static NHibernate.Hql.Ast.HqlExpression ConvertBooleanToCase(NHibernate.Hql.Ast.HqlExpression node) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.EqualityHqlGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EqualityHqlGenerator + { + public EqualityHqlGenerator(NHibernate.Linq.Visitors.VisitorParameters parameters) => throw null; + public NHibernate.Hql.Ast.HqlBooleanExpression Visit(System.Linq.Expressions.Expression innerKeySelector, System.Linq.Expressions.Expression outerKeySelector) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ExpressionKeyVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExpressionKeyVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public override string ToString() => throw null; + public static string Visit(System.Linq.Expressions.Expression rootExpression, System.Collections.Generic.IDictionary parameters, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public static string Visit(System.Linq.Expressions.Expression expression, System.Collections.Generic.IDictionary parameters) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConditional(System.Linq.Expressions.ConditionalExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConstant(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitDynamic(System.Linq.Expressions.DynamicExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitInvocation(System.Linq.Expressions.InvocationExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLambda(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMember(System.Linq.Expressions.MemberExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitParameter(System.Linq.Expressions.ParameterExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ExpressionParameterVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExpressionParameterVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public ExpressionParameterVisitor(NHibernate.Linq.Visitors.PreTransformationResult preTransformationResult) => throw null; + public ExpressionParameterVisitor(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public static System.Collections.Generic.IDictionary Visit(System.Linq.Expressions.Expression expression, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public static System.Collections.Generic.IDictionary Visit(NHibernate.Linq.Visitors.PreTransformationResult preTransformationResult) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConstant(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitInvocation(System.Linq.Expressions.InvocationExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression node) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.HqlGeneratorExpressionVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HqlGeneratorExpressionVisitor : NHibernate.Linq.Visitors.IHqlExpressionVisitor + { + public HqlGeneratorExpressionVisitor(NHibernate.Linq.Visitors.VisitorParameters parameters) => throw null; + public NHibernate.ISessionFactory SessionFactory { get => throw null; } + public static NHibernate.Hql.Ast.HqlTreeNode Visit(System.Linq.Expressions.Expression expression, NHibernate.Linq.Visitors.VisitorParameters parameters) => throw null; + public NHibernate.Hql.Ast.HqlTreeNode Visit(System.Linq.Expressions.Expression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitBinaryExpression(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitConditionalExpression(System.Linq.Expressions.ConditionalExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitConstantExpression(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitExpression(System.Linq.Expressions.Expression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitLambdaExpression(System.Linq.Expressions.LambdaExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitMemberExpression(System.Linq.Expressions.MemberExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitMethodCallExpression(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNewArrayExpression(System.Linq.Expressions.NewArrayExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhAverage(NHibernate.Linq.Expressions.NhAverageExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhCount(NHibernate.Linq.Expressions.NhCountExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhDistinct(NHibernate.Linq.Expressions.NhDistinctExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhMax(NHibernate.Linq.Expressions.NhMaxExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhMin(NHibernate.Linq.Expressions.NhMinExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhStar(NHibernate.Linq.Expressions.NhStarExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitNhSum(NHibernate.Linq.Expressions.NhSumExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitParameterExpression(System.Linq.Expressions.ParameterExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitQuerySourceReferenceExpression(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitSubQueryExpression(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + protected NHibernate.Hql.Ast.HqlTreeNode VisitUnaryExpression(System.Linq.Expressions.UnaryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.IExpressionTransformerRegistrar` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IExpressionTransformerRegistrar + { + void Register(Remotion.Linq.Parsing.ExpressionVisitors.Transformation.ExpressionTransformerRegistry expressionTransformerRegistry); + } + + // Generated from `NHibernate.Linq.Visitors.IHqlExpressionVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IHqlExpressionVisitor + { + NHibernate.ISessionFactory SessionFactory { get; } + NHibernate.Hql.Ast.HqlTreeNode Visit(System.Linq.Expressions.Expression expression); + } + + // Generated from `NHibernate.Linq.Visitors.IJoiner` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoiner + { + System.Linq.Expressions.Expression AddJoin(System.Linq.Expressions.Expression expression, string key); + bool CanAddJoin(System.Linq.Expressions.Expression expression); + void MakeInnerIfJoined(string key); + } + + // Generated from `NHibernate.Linq.Visitors.IQueryModelRewriterFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryModelRewriterFactory + { + Remotion.Linq.QueryModelVisitorBase CreateVisitor(NHibernate.Linq.Visitors.VisitorParameters parameters); + } + + // Generated from `NHibernate.Linq.Visitors.Joiner` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Joiner : NHibernate.Linq.Visitors.IJoiner + { + public System.Linq.Expressions.Expression AddJoin(System.Linq.Expressions.Expression expression, string key) => throw null; + public bool CanAddJoin(System.Linq.Expressions.Expression expression) => throw null; + public System.Collections.Generic.IEnumerable Joins { get => throw null; } + public void MakeInnerIfJoined(string key) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.LeftJoinRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LeftJoinRewriter : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public LeftJoinRewriter() => throw null; + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.NameGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NameGenerator + { + public string GetNewName() => throw null; + public NameGenerator(Remotion.Linq.QueryModel model) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.NhExpressionVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public NhExpressionVisitor() => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhAggregated(NHibernate.Linq.Expressions.NhAggregatedExpression node) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhAverage(NHibernate.Linq.Expressions.NhAverageExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhCount(NHibernate.Linq.Expressions.NhCountExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhDistinct(NHibernate.Linq.Expressions.NhDistinctExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhMax(NHibernate.Linq.Expressions.NhMaxExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhMin(NHibernate.Linq.Expressions.NhMinExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhNew(NHibernate.Linq.Expressions.NhNewExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhNominated(NHibernate.Linq.Expressions.NhNominatedExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhStar(NHibernate.Linq.Expressions.NhStarExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitNhSum(NHibernate.Linq.Expressions.NhSumExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.NhQueryModelVisitorBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NhQueryModelVisitorBase : Remotion.Linq.QueryModelVisitorBase, Remotion.Linq.IQueryModelVisitor, Remotion.Linq.Clauses.ResultOperators.AsQueryableResultOperator.ISupportedByIQueryModelVistor, NHibernate.Linq.INhQueryModelVisitor + { + public NhQueryModelVisitorBase() => throw null; + public virtual void VisitNhHavingClause(NHibernate.Linq.Clauses.NhHavingClause havingClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public virtual void VisitNhJoinClause(NHibernate.Linq.Clauses.NhJoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public virtual void VisitNhWithClause(NHibernate.Linq.Clauses.NhWithClause nhWhereClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.NonAggregatingGroupJoinRewriter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonAggregatingGroupJoinRewriter + { + public static void ReWrite(Remotion.Linq.QueryModel model) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ParameterTypeLocator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ParameterTypeLocator + { + public static void SetParameterTypes(System.Collections.Generic.IDictionary parameters, Remotion.Linq.QueryModel queryModel, System.Type targetType, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.PossibleValueSet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PossibleValueSet + { + public NHibernate.Linq.Visitors.PossibleValueSet Add(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet And(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet AndAlso(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet ArrayLength(System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet BitwiseNot(System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Coalesce(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public bool Contains(object obj) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Convert(System.Type resultType) => throw null; + public static NHibernate.Linq.Visitors.PossibleValueSet Create(System.Type expressionType, params object[] values) => throw null; + public static NHibernate.Linq.Visitors.PossibleValueSet CreateAllNonNullValues(System.Type expressionType) => throw null; + public static NHibernate.Linq.Visitors.PossibleValueSet CreateAllValues(System.Type expressionType) => throw null; + public static NHibernate.Linq.Visitors.PossibleValueSet CreateNull(System.Type expressionType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Divide(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Equal(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet ExclusiveOr(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet GreaterThan(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet GreaterThanOrEqual(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet IsNotNull() => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet IsNull() => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet LeftShift(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet LessThan(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet LessThanOrEqual(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet MemberAccess(System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Modulo(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Multiply(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Negate(System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Not() => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet NotEqual(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Or(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet OrElse(NHibernate.Linq.Visitors.PossibleValueSet pvs) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Power(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet RightShift(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet Subtract(NHibernate.Linq.Visitors.PossibleValueSet pvs, System.Type resultType) => throw null; + public NHibernate.Linq.Visitors.PossibleValueSet UnaryPlus(System.Type resultType) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.PreTransformationParameters` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreTransformationParameters + { + public bool MinimizeParameters { get => throw null; set => throw null; } + public PreTransformationParameters(NHibernate.Linq.QueryMode queryMode, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public NHibernate.Linq.QueryMode QueryMode { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor SessionFactory { get => throw null; } + } + + // Generated from `NHibernate.Linq.Visitors.PreTransformationResult` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PreTransformationResult + { + public System.Linq.Expressions.Expression Expression { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor SessionFactory { get => throw null; } + } + + // Generated from `NHibernate.Linq.Visitors.QueryExpressionSourceIdentifer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryExpressionSourceIdentifer : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public QueryExpressionSourceIdentifer(NHibernate.Linq.Visitors.QuerySourceIdentifier identifier) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.QueryModelVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryModelVisitor : NHibernate.Linq.Visitors.NhQueryModelVisitorBase, Remotion.Linq.IQueryModelVisitor, NHibernate.Linq.INhQueryModelVisitor + { + public Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo CurrentEvaluationType { get => throw null; set => throw null; } + public static NHibernate.Linq.ExpressionToHqlTranslationResults GenerateHqlQuery(Remotion.Linq.QueryModel queryModel, NHibernate.Linq.Visitors.VisitorParameters parameters, bool root, NHibernate.Linq.NhLinqExpressionReturnType? rootReturnType) => throw null; + public Remotion.Linq.QueryModel Model { get => throw null; } + public Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo PreviousEvaluationType { get => throw null; set => throw null; } + public NHibernate.Linq.ReWriters.ResultOperatorRewriterResult RewrittenOperatorResult { get => throw null; set => throw null; } + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitGroupJoinClause(Remotion.Linq.Clauses.GroupJoinClause groupJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitNhHavingClause(NHibernate.Linq.Clauses.NhHavingClause havingClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitNhJoinClause(NHibernate.Linq.Clauses.NhJoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public void VisitNhOuterJoinClause(NHibernate.Linq.Clauses.NhOuterJoinClause outerJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitNhWithClause(NHibernate.Linq.Clauses.NhWithClause withClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitOrderByClause(Remotion.Linq.Clauses.OrderByClause orderByClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public NHibernate.Linq.Visitors.VisitorParameters VisitorParameters { get => throw null; } + } + + // Generated from `NHibernate.Linq.Visitors.QuerySourceIdentifier` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySourceIdentifier : NHibernate.Linq.Visitors.NhQueryModelVisitorBase, Remotion.Linq.IQueryModelVisitor, NHibernate.Linq.INhQueryModelVisitor + { + public NHibernate.Linq.QuerySourceNamer Namer { get => throw null; } + public static void Visit(NHibernate.Linq.QuerySourceNamer namer, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitGroupJoinClause(Remotion.Linq.Clauses.GroupJoinClause groupJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.GroupJoinClause groupJoinClause) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitNhJoinClause(NHibernate.Linq.Clauses.NhJoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public void VisitNhOuterJoinClause(NHibernate.Linq.Clauses.NhOuterJoinClause outerJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.QuerySourceLocator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySourceLocator : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static Remotion.Linq.Clauses.IQuerySource FindQuerySource(Remotion.Linq.QueryModel queryModel, System.Type type) => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitNhJoinClause(NHibernate.Linq.Clauses.NhJoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.SelectClauseVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectClauseVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public System.Collections.Generic.IEnumerable GetHqlNodes() => throw null; + public System.Linq.Expressions.LambdaExpression ProjectionExpression { get => throw null; set => throw null; } + public SelectClauseVisitor(System.Type inputType, NHibernate.Linq.Visitors.VisitorParameters parameters) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + public void VisitSelector(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.SubQueryFromClauseFlattener` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubQueryFromClauseFlattener : NHibernate.Linq.Visitors.NhQueryModelVisitorBase + { + public static void ReWrite(Remotion.Linq.QueryModel queryModel) => throw null; + public SubQueryFromClauseFlattener() => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.SwapQuerySourceVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SwapQuerySourceVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public System.Linq.Expressions.Expression Swap(System.Linq.Expressions.Expression expression) => throw null; + public SwapQuerySourceVisitor(Remotion.Linq.Clauses.IQuerySource oldClause, Remotion.Linq.Clauses.IQuerySource newClause) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.VisitorParameters` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VisitorParameters + { + public System.Collections.Generic.IDictionary ConstantToParameterMap { get => throw null; set => throw null; } + public NHibernate.Linq.QuerySourceNamer QuerySourceNamer { get => throw null; set => throw null; } + public System.Collections.Generic.List RequiredHqlParameters { get => throw null; set => throw null; } + public NHibernate.Linq.QueryMode RootQueryMode { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor SessionFactory { get => throw null; set => throw null; } + public System.Type TargetEntityType { get => throw null; } + public VisitorParameters(NHibernate.Engine.ISessionFactoryImplementor sessionFactory, System.Collections.Generic.IDictionary constantToParameterMap, System.Collections.Generic.List requiredHqlParameters, NHibernate.Linq.QuerySourceNamer querySourceNamer, System.Type targetEntityType, NHibernate.Linq.QueryMode rootQueryMode) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.VisitorUtil` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class VisitorUtil + { + public static string GetMemberPath(this System.Linq.Expressions.MemberExpression memberExpression) => throw null; + public static bool IsBooleanConstant(System.Linq.Expressions.Expression expression, out bool value) => throw null; + public static bool IsDynamicComponentDictionaryGetter(System.Reflection.MethodInfo method, System.Linq.Expressions.Expression targetObject, System.Collections.Generic.IEnumerable arguments, NHibernate.ISessionFactory sessionFactory, out string memberName) => throw null; + public static bool IsDynamicComponentDictionaryGetter(System.Linq.Expressions.MethodCallExpression expression, NHibernate.ISessionFactory sessionFactory, out string memberName) => throw null; + public static bool IsDynamicComponentDictionaryGetter(System.Linq.Expressions.MethodCallExpression expression, NHibernate.ISessionFactory sessionFactory) => throw null; + public static bool IsNullConstant(System.Linq.Expressions.Expression expression) => throw null; + public static System.Linq.Expressions.Expression Replace(this System.Linq.Expressions.Expression expression, System.Linq.Expressions.Expression oldExpression, System.Linq.Expressions.Expression newExpression) => throw null; + } + + namespace ResultOperatorProcessors + { + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IResultOperatorProcessor + { + void Process(T resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree); + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessAggregate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessAggregate : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.AggregateResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessAggregate() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessAggregateFromSeed` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessAggregateFromSeed : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.AggregateFromSeedResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessAggregateFromSeed() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessAll` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessAll : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.AllResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessAll() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessAny` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessAny : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.AnyResultOperator anyOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessAny() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessAsQueryable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessAsQueryable : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.AsQueryableResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessAsQueryable() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessCast` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessCast : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.CastResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessCast() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessClientSideSelect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessClientSideSelect : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(NHibernate.Linq.GroupBy.ClientSideSelect resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessClientSideSelect() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessClientSideSelect2` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessClientSideSelect2 : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(NHibernate.Linq.GroupBy.ClientSideSelect2 resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessClientSideSelect2() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessContains` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessContains : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.ContainsResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessContains() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFetch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessFetch + { + public void Process(Remotion.Linq.EagerFetching.FetchRequestBase resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree, string sourceAlias) => throw null; + public void Process(Remotion.Linq.EagerFetching.FetchRequestBase resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessFetch() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFetchMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessFetchMany : NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFetch, NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.EagerFetching.FetchManyRequest resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessFetchMany() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFetchOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessFetchOne : NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFetch, NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.EagerFetching.FetchOneRequest resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessFetchOne() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFirst` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessFirst : NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFirstOrSingleBase, NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.FirstResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessFirst() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFirstOrSingleBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessFirstOrSingleBase + { + protected static void AddClientSideEval(System.Reflection.MethodInfo target, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessFirstOrSingleBase() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessGroupBy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessGroupBy : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.GroupResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessGroupBy() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessNonAggregatingGroupBy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessNonAggregatingGroupBy : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(NHibernate.Linq.ResultOperators.NonAggregatingGroupBy resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessNonAggregatingGroupBy() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessOfType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessOfType : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.OfTypeResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessOfType() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessResultOperatorReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessResultOperatorReturn + { + public System.Action>> AdditionalCriteria { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.HqlTreeNode AdditionalFrom { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.HqlGroupBy GroupBy { get => throw null; set => throw null; } + public System.Linq.Expressions.LambdaExpression ListTransformer { get => throw null; set => throw null; } + public System.Linq.Expressions.LambdaExpression PostExecuteTransformer { get => throw null; set => throw null; } + public ProcessResultOperatorReturn() => throw null; + public NHibernate.Hql.Ast.HqlTreeNode TreeNode { get => throw null; set => throw null; } + public NHibernate.Hql.Ast.HqlBooleanExpression WhereClause { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessSingle` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessSingle : NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessFirstOrSingleBase, NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.SingleResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessSingle() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessSkip` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessSkip : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.SkipResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessSkip() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ProcessTake` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProcessTake : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor + { + public void Process(Remotion.Linq.Clauses.ResultOperators.TakeResultOperator resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModelVisitor, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ProcessTake() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ResultOperatorMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultOperatorMap + { + public void Add() where TOperator : Remotion.Linq.Clauses.ResultOperatorBase where TProcessor : NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor, new() => throw null; + public void Process(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModel, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ResultOperatorMap() => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ResultOperatorProcessor<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultOperatorProcessor : NHibernate.Linq.Visitors.ResultOperatorProcessors.ResultOperatorProcessorBase where T : Remotion.Linq.Clauses.ResultOperatorBase + { + public override void Process(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModel, NHibernate.Linq.IntermediateHqlTree tree) => throw null; + public ResultOperatorProcessor(NHibernate.Linq.Visitors.ResultOperatorProcessors.IResultOperatorProcessor processor) => throw null; + } + + // Generated from `NHibernate.Linq.Visitors.ResultOperatorProcessors.ResultOperatorProcessorBase` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ResultOperatorProcessorBase + { + public abstract void Process(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, NHibernate.Linq.Visitors.QueryModelVisitor queryModel, NHibernate.Linq.IntermediateHqlTree tree); + protected ResultOperatorProcessorBase() => throw null; + } + + } + } + } + namespace Loader + { + // Generated from `NHibernate.Loader.AbstractEntityJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEntityJoinWalker : NHibernate.Loader.JoinWalker + { + public AbstractEntityJoinWalker(string rootSqlAlias, NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public AbstractEntityJoinWalker(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected virtual void AddAssociations() => throw null; + protected string Alias { get => throw null; } + public abstract string Comment { get; } + protected virtual NHibernate.Loader.OuterJoinableAssociation CreateRootAssociation() => throw null; + protected virtual void InitAll(NHibernate.SqlCommand.SqlString whereString, NHibernate.SqlCommand.SqlString orderByString, NHibernate.LockMode lockMode) => throw null; + protected void InitProjection(NHibernate.SqlCommand.SqlString projectionString, NHibernate.SqlCommand.SqlString whereString, NHibernate.SqlCommand.SqlString orderByString, NHibernate.SqlCommand.SqlString groupByString, NHibernate.SqlCommand.SqlString havingString, System.Collections.Generic.IDictionary enabledFilters, NHibernate.LockMode lockMode, System.Collections.Generic.IList entityProjections) => throw null; + protected void InitProjection(NHibernate.SqlCommand.SqlString projectionString, NHibernate.SqlCommand.SqlString whereString, NHibernate.SqlCommand.SqlString orderByString, NHibernate.SqlCommand.SqlString groupByString, NHibernate.SqlCommand.SqlString havingString, System.Collections.Generic.IDictionary enabledFilters, NHibernate.LockMode lockMode) => throw null; + protected override bool IsJoinedFetchEnabled(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected NHibernate.Persister.Entity.IOuterJoinLoadable Persister { get => throw null; } + public override string ToString() => throw null; + protected virtual NHibernate.SqlCommand.SqlString WhereFragment { get => throw null; } + } + + // Generated from `NHibernate.Loader.BasicLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class BasicLoader : NHibernate.Loader.Loader + { + public BasicLoader(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override NHibernate.Loader.ICollectionAliases[] CollectionAliases { get => throw null; } + protected abstract string[] CollectionSuffixes { get; } + protected override NHibernate.Loader.IEntityAliases[] EntityAliases { get => throw null; } + public static string GenerateSuffix(int index) => throw null; + public static string[] GenerateSuffixes(int seed, int length) => throw null; + public static string[] GenerateSuffixes(int length) => throw null; + protected virtual System.Collections.Generic.IDictionary GetCollectionUserProvidedAlias(int index) => throw null; + protected static string[] NoSuffix; + protected override void PostInstantiate() => throw null; + protected abstract string[] Suffixes { get; } + } + + // Generated from `NHibernate.Loader.DefaultEntityAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultEntityAliases : NHibernate.Loader.IEntityAliases + { + public DefaultEntityAliases(System.Collections.Generic.IDictionary userProvidedAliases, NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + public DefaultEntityAliases(NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + protected virtual string GetDiscriminatorAlias(NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + protected virtual string[] GetIdentifierAliases(NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + protected virtual string[] GetPropertyAliases(NHibernate.Persister.Entity.ILoadable persister, int j) => throw null; + public string[][] GetSuffixedPropertyAliases(NHibernate.Persister.Entity.ILoadable persister) => throw null; + public string RowIdAlias { get => throw null; } + public string SuffixedDiscriminatorAlias { get => throw null; } + public string[] SuffixedKeyAliases { get => throw null; } + public string[][] SuffixedPropertyAliases { get => throw null; } + public string[] SuffixedVersionAliases { get => throw null; } + } + + // Generated from `NHibernate.Loader.GeneratedCollectionAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GeneratedCollectionAliases : NHibernate.Loader.ICollectionAliases + { + public GeneratedCollectionAliases(System.Collections.Generic.IDictionary userProvidedAliases, NHibernate.Persister.Collection.ICollectionPersister persister, string suffix) => throw null; + public GeneratedCollectionAliases(NHibernate.Persister.Collection.ICollectionPersister persister, string str) => throw null; + public string Suffix { get => throw null; } + public string[] SuffixedElementAliases { get => throw null; } + public string SuffixedIdentifierAlias { get => throw null; } + public string[] SuffixedIndexAliases { get => throw null; } + public string[] SuffixedKeyAliases { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Loader.ICollectionAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionAliases + { + string Suffix { get; } + string[] SuffixedElementAliases { get; } + string SuffixedIdentifierAlias { get; } + string[] SuffixedIndexAliases { get; } + string[] SuffixedKeyAliases { get; } + } + + // Generated from `NHibernate.Loader.IEntityAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityAliases + { + string[][] GetSuffixedPropertyAliases(NHibernate.Persister.Entity.ILoadable persister); + string RowIdAlias { get; } + string SuffixedDiscriminatorAlias { get; } + string[] SuffixedKeyAliases { get; } + string[][] SuffixedPropertyAliases { get; } + string[] SuffixedVersionAliases { get; } + } + + // Generated from `NHibernate.Loader.JoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinWalker + { + public string[] Aliases { get => throw null; set => throw null; } + // Generated from `NHibernate.Loader.JoinWalker+AssociationKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class AssociationKey + { + public AssociationKey(string[] columns, string table) => throw null; + public override bool Equals(object other) => throw null; + public override int GetHashCode() => throw null; + } + + + public bool[] ChildFetchEntities { get => throw null; set => throw null; } + public int[] CollectionOwners { get => throw null; set => throw null; } + public NHibernate.Persister.Collection.ICollectionPersister[] CollectionPersisters { get => throw null; set => throw null; } + public string[] CollectionSuffixes { get => throw null; set => throw null; } + protected static int CountCollectionPersisters(System.Collections.Generic.IList associations) => throw null; + protected static int CountEntityPersisters(System.Collections.Generic.IList associations) => throw null; + // Generated from `NHibernate.Loader.JoinWalker+DependentAlias` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DependentAlias + { + public string Alias { get => throw null; set => throw null; } + public DependentAlias() => throw null; + public string[] DependsOn { get => throw null; set => throw null; } + } + + + protected NHibernate.Dialect.Dialect Dialect { get => throw null; } + public bool[] EagerPropertyFetches { get => throw null; set => throw null; } + protected System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + public System.Collections.Generic.ISet[] EntityFetchLazyProperties { get => throw null; set => throw null; } + protected NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + protected virtual string GenerateAliasForColumn(string rootAlias, string column) => throw null; + protected virtual string GenerateRootAlias(string description) => throw null; + protected virtual string GenerateTableAlias(int n, string path, string pathAlias, NHibernate.Persister.Entity.IJoinable joinable) => throw null; + protected virtual string GenerateTableAlias(int n, string path, NHibernate.Persister.Entity.IJoinable joinable) => throw null; + protected virtual System.Collections.Generic.IReadOnlyCollection GetChildAliases(string parentSqlAlias, string childPath) => throw null; + protected virtual System.Collections.Generic.ISet GetEntityFetchLazyProperties(string path) => throw null; + protected virtual NHibernate.SqlCommand.JoinType GetJoinType(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, string path, string pathAlias, string lhsTable, string[] lhsColumns, bool nullable, int currentDepth, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected virtual NHibernate.SqlCommand.JoinType GetJoinType(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, string path, string lhsTable, string[] lhsColumns, bool nullable, int currentDepth, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected NHibernate.SqlCommand.JoinType GetJoinType(bool nullable, int currentDepth) => throw null; + protected static string GetSelectFragment(NHibernate.Loader.OuterJoinableAssociation join, string entitySuffix, string collectionSuffix, NHibernate.Loader.OuterJoinableAssociation next = default(NHibernate.Loader.OuterJoinableAssociation)) => throw null; + protected virtual NHibernate.SelectMode GetSelectMode(string path) => throw null; + protected virtual NHibernate.SqlCommand.SqlString GetWithClause(string path, string pathAlias) => throw null; + protected virtual NHibernate.SqlCommand.SqlString GetWithClause(string path) => throw null; + protected void InitPersisters(System.Collections.Generic.IList associations, NHibernate.LockMode lockMode) => throw null; + protected virtual bool IsDuplicateAssociation(string lhsTable, string[] lhsColumnNames, NHibernate.Type.IAssociationType type) => throw null; + protected virtual bool IsDuplicateAssociation(string foreignKeyTable, string[] foreignKeyColumns) => throw null; + protected bool IsJoinable(NHibernate.SqlCommand.JoinType joinType, System.Collections.Generic.ISet visitedAssociationKeys, string lhsTable, string[] lhsColumnNames, NHibernate.Type.IAssociationType type, int depth) => throw null; + protected virtual bool IsJoinedFetchEnabled(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected bool IsJoinedFetchEnabledInMapping(NHibernate.FetchMode config, NHibernate.Type.IAssociationType type) => throw null; + protected virtual bool IsTooDeep(int currentDepth) => throw null; + protected virtual bool IsTooManyCollections { get => throw null; } + protected JoinWalker(NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public NHibernate.LockMode[] LockModeArray { get => throw null; set => throw null; } + protected NHibernate.SqlCommand.SqlString MergeOrderings(string ass, string orderBy) => throw null; + protected NHibernate.SqlCommand.SqlString MergeOrderings(string ass, NHibernate.SqlCommand.SqlString orderBy) => throw null; + protected NHibernate.SqlCommand.SqlString MergeOrderings(NHibernate.SqlCommand.SqlString ass, NHibernate.SqlCommand.SqlString orderBy) => throw null; + protected NHibernate.SqlCommand.JoinFragment MergeOuterJoins(System.Collections.Generic.IList associations) => throw null; + protected NHibernate.SqlCommand.SqlString OrderBy(System.Collections.Generic.IList associations, string orderBy) => throw null; + protected NHibernate.SqlCommand.SqlString OrderBy(System.Collections.Generic.IList associations, NHibernate.SqlCommand.SqlString orderBy) => throw null; + protected NHibernate.SqlCommand.SqlString OrderBy(System.Collections.Generic.IList associations) => throw null; + public NHibernate.Type.EntityType[] OwnerAssociationTypes { get => throw null; set => throw null; } + public int[] Owners { get => throw null; set => throw null; } + public NHibernate.Persister.Entity.ILoadable[] Persisters { get => throw null; set => throw null; } + public string SelectString(System.Collections.Generic.IList associations) => throw null; + public NHibernate.SqlCommand.SqlString SqlString { get => throw null; set => throw null; } + protected static string SubPath(string path, string property) => throw null; + public string[] Suffixes { get => throw null; set => throw null; } + protected void WalkCollectionTree(NHibernate.Persister.Collection.IQueryableCollection persister, string alias) => throw null; + protected void WalkComponentTree(NHibernate.Type.IAbstractComponentType componentType, int begin, string alias, string path, int currentDepth, NHibernate.Engine.ILhsAssociationTypeSqlInfo associationTypeSQLInfo) => throw null; + protected void WalkEntityTree(NHibernate.Persister.Entity.IOuterJoinLoadable persister, string alias) => throw null; + protected virtual void WalkEntityTree(NHibernate.Persister.Entity.IOuterJoinLoadable persister, string alias, string path, int currentDepth) => throw null; + protected NHibernate.SqlCommand.SqlStringBuilder WhereString(string alias, string[] columnNames, int batchSize) => throw null; + protected System.Collections.Generic.IList associations; + } + + // Generated from `NHibernate.Loader.Loader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Loader + { + protected NHibernate.SqlCommand.SqlString AddLimitsParametersIfNeeded(NHibernate.SqlCommand.SqlString sqlString, System.Collections.Generic.ICollection parameterSpecs, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + protected void AdjustQueryParametersForSubSelectFetching(NHibernate.SqlCommand.SqlString filteredSqlString, System.Collections.Generic.IEnumerable parameterSpecsWithFilters, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected virtual string[] Aliases { get => throw null; } + protected virtual NHibernate.SqlCommand.SqlString ApplyLocks(NHibernate.SqlCommand.SqlString sql, System.Collections.Generic.IDictionary lockModes, NHibernate.Dialect.Dialect dialect) => throw null; + protected virtual bool AreResultSetRowsTransformedImmediately() => throw null; + protected internal virtual void AutoDiscoverTypes(System.Data.Common.DbDataReader rs, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer) => throw null; + protected internal virtual void AutoDiscoverTypes(System.Data.Common.DbDataReader rs) => throw null; + public virtual NHibernate.Loader.Loader.QueryCacheInfo CacheInfo { get => throw null; } + protected void CachePersistersWithCollections(System.Collections.Generic.IEnumerable resultTypePersisters) => throw null; + public NHibernate.Type.IType[] CacheTypes { get => throw null; } + protected abstract NHibernate.Loader.ICollectionAliases[] CollectionAliases { get; } + protected virtual int[] CollectionOwners { get => throw null; } + protected internal virtual NHibernate.Persister.Collection.ICollectionPersister[] CollectionPersisters { get => throw null; } + public virtual NHibernate.SqlCommand.ISqlCommand CreateSqlCommand(NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Collections.IList DoList(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer, NHibernate.Cache.QueryCacheResultBuilder queryCacheResultBuilder) => throw null; + protected System.Collections.IList DoList(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer) => throw null; + protected System.Collections.IList DoList(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected System.Threading.Tasks.Task DoListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task DoListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task DoListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer, NHibernate.Cache.QueryCacheResultBuilder queryCacheResultBuilder, System.Threading.CancellationToken cancellationToken) => throw null; + protected abstract NHibernate.Loader.IEntityAliases[] EntityAliases { get; } + protected virtual bool[] EntityEagerPropertyFetches { get => throw null; } + protected virtual System.Collections.Generic.ISet[] EntityFetchLazyProperties { get => throw null; } + public abstract NHibernate.Persister.Entity.ILoadable[] EntityPersisters { get; } + protected NHibernate.SqlCommand.SqlString ExpandDynamicFilterParameters(NHibernate.SqlCommand.SqlString sqlString, System.Collections.Generic.ICollection parameterSpecs, NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public abstract NHibernate.LockMode[] GetLockModes(System.Collections.Generic.IDictionary lockModes); + protected abstract System.Collections.Generic.IEnumerable GetParameterSpecifications(); + protected virtual object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual System.Collections.IList GetResultList(System.Collections.IList results, NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected virtual object[] GetResultRow(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task GetResultRowAsync(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand st, bool autoDiscoverTypes, bool callable, NHibernate.Engine.RowSelection selection, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Data.Common.DbDataReader GetResultSet(System.Data.Common.DbCommand st, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, NHibernate.Transform.IResultTransformer forcedResultTransformer) => throw null; + protected System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand st, bool autoDiscoverTypes, bool callable, NHibernate.Engine.RowSelection selection, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task GetResultSetAsync(System.Data.Common.DbCommand st, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, NHibernate.Transform.IResultTransformer forcedResultTransformer, System.Threading.CancellationToken cancellationToken) => throw null; + protected bool HasSubselectLoadableCollections() => throw null; + protected NHibernate.Hql.Util.SessionFactoryHelper Helper { get => throw null; } + protected virtual bool[] IncludeInResultRow { get => throw null; } + protected virtual bool IsChildFetchEntity(int i) => throw null; + protected virtual bool IsCollectionPersisterCacheable(NHibernate.Persister.Collection.ICollectionPersister collectionPersister) => throw null; + protected virtual bool IsSingleRowLoader { get => throw null; } + public virtual bool IsSubselectLoadingEnabled { get => throw null; } + protected System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet querySpaces, NHibernate.Type.IType[] resultTypes) => throw null; + protected System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet querySpaces) => throw null; + protected System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet querySpaces, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Collections.Generic.ISet querySpaces, NHibernate.Type.IType[] resultTypes, System.Threading.CancellationToken cancellationToken) => throw null; + public void LoadCollection(NHibernate.Engine.ISessionImplementor session, object id, NHibernate.Type.IType type) => throw null; + public System.Threading.Tasks.Task LoadCollectionAsync(NHibernate.Engine.ISessionImplementor session, object id, NHibernate.Type.IType type, System.Threading.CancellationToken cancellationToken) => throw null; + public void LoadCollectionBatch(NHibernate.Engine.ISessionImplementor session, object[] ids, NHibernate.Type.IType type) => throw null; + public System.Threading.Tasks.Task LoadCollectionBatchAsync(NHibernate.Engine.ISessionImplementor session, object[] ids, NHibernate.Type.IType type, System.Threading.CancellationToken cancellationToken) => throw null; + protected void LoadCollectionSubselect(NHibernate.Engine.ISessionImplementor session, object[] ids, object[] parameterValues, NHibernate.Type.IType[] parameterTypes, System.Collections.Generic.IDictionary namedParameters, NHibernate.Type.IType type) => throw null; + protected System.Threading.Tasks.Task LoadCollectionSubselectAsync(NHibernate.Engine.ISessionImplementor session, object[] ids, object[] parameterValues, NHibernate.Type.IType[] parameterTypes, System.Collections.Generic.IDictionary namedParameters, NHibernate.Type.IType type, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Collections.IList LoadEntity(NHibernate.Engine.ISessionImplementor session, object key, object index, NHibernate.Type.IType keyType, NHibernate.Type.IType indexType, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected System.Collections.IList LoadEntity(NHibernate.Engine.ISessionImplementor session, object id, NHibernate.Type.IType identifierType, object optionalObject, string optionalEntityName, object optionalIdentifier, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected System.Threading.Tasks.Task LoadEntityAsync(NHibernate.Engine.ISessionImplementor session, object key, object index, NHibernate.Type.IType keyType, NHibernate.Type.IType indexType, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task LoadEntityAsync(NHibernate.Engine.ISessionImplementor session, object id, NHibernate.Type.IType identifierType, object optionalObject, string optionalEntityName, object optionalIdentifier, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal System.Collections.IList LoadEntityBatch(NHibernate.Engine.ISessionImplementor session, object[] ids, NHibernate.Type.IType idType, object optionalObject, string optionalEntityName, object optionalId, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + protected internal System.Threading.Tasks.Task LoadEntityBatchAsync(NHibernate.Engine.ISessionImplementor session, object[] ids, NHibernate.Type.IType idType, object optionalObject, string optionalEntityName, object optionalId, NHibernate.Persister.Entity.IEntityPersister persister, System.Threading.CancellationToken cancellationToken) => throw null; + protected object LoadSingleRow(System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, bool returnProxies) => throw null; + protected System.Threading.Tasks.Task LoadSingleRowAsync(System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, bool returnProxies, System.Threading.CancellationToken cancellationToken) => throw null; + protected Loader(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected virtual NHibernate.Type.EntityType[] OwnerAssociationTypes { get => throw null; } + protected virtual int[] Owners { get => throw null; } + protected virtual void PostInstantiate() => throw null; + protected internal virtual System.Data.Common.DbCommand PrepareQueryCommand(NHibernate.Engine.QueryParameters queryParameters, bool scroll, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal virtual System.Threading.Tasks.Task PrepareQueryCommandAsync(NHibernate.Engine.QueryParameters queryParameters, bool scroll, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual NHibernate.SqlCommand.SqlString PreprocessSQL(NHibernate.SqlCommand.SqlString sql, NHibernate.Engine.QueryParameters parameters, NHibernate.Dialect.Dialect dialect) => throw null; + // Generated from `NHibernate.Loader.Loader+QueryCacheInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryCacheInfo + { + public System.Collections.Generic.IReadOnlyList AdditionalEntities { get => throw null; set => throw null; } + public NHibernate.Type.IType[] CacheTypes { get => throw null; set => throw null; } + public QueryCacheInfo() => throw null; + } + + + public virtual string QueryIdentifier { get => throw null; } + protected virtual void ResetEffectiveExpectedType(System.Collections.Generic.IEnumerable parameterSpecs, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected virtual NHibernate.Transform.IResultTransformer ResolveResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected virtual string[] ResultRowAliases { get => throw null; } + public NHibernate.Type.IType[] ResultTypes { get => throw null; set => throw null; } + public abstract NHibernate.SqlCommand.SqlString SqlString { get; } + public override string ToString() => throw null; + protected bool TryGetLimitString(NHibernate.Dialect.Dialect dialect, NHibernate.SqlCommand.SqlString queryString, int? offset, int? limit, NHibernate.SqlCommand.Parameter offsetParameter, NHibernate.SqlCommand.Parameter limitParameter, out NHibernate.SqlCommand.SqlString result) => throw null; + protected virtual bool UpgradeLocks() => throw null; + } + + // Generated from `NHibernate.Loader.OuterJoinLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class OuterJoinLoader : NHibernate.Loader.BasicLoader + { + protected override string[] Aliases { get => throw null; } + protected override int[] CollectionOwners { get => throw null; } + protected internal override NHibernate.Persister.Collection.ICollectionPersister[] CollectionPersisters { get => throw null; } + protected override string[] CollectionSuffixes { get => throw null; } + protected NHibernate.Dialect.Dialect Dialect { get => throw null; } + public System.Collections.Generic.IDictionary EnabledFilters { get => throw null; } + protected override bool[] EntityEagerPropertyFetches { get => throw null; } + public override NHibernate.Persister.Entity.ILoadable[] EntityPersisters { get => throw null; } + public override NHibernate.LockMode[] GetLockModes(System.Collections.Generic.IDictionary lockModes) => throw null; + protected void InitFromWalker(NHibernate.Loader.JoinWalker walker) => throw null; + protected OuterJoinLoader(NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override NHibernate.Type.EntityType[] OwnerAssociationTypes { get => throw null; } + protected override int[] Owners { get => throw null; } + public override NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + protected override string[] Suffixes { get => throw null; } + } + + // Generated from `NHibernate.Loader.OuterJoinableAssociation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OuterJoinableAssociation + { + public void AddJoins(NHibernate.SqlCommand.JoinFragment outerjoin) => throw null; + public void AddManyToManyJoin(NHibernate.SqlCommand.JoinFragment outerjoin, NHibernate.Persister.Collection.IQueryableCollection collection) => throw null; + public System.Collections.Generic.ISet EntityFetchLazyProperties { get => throw null; set => throw null; } + public int GetOwner(System.Collections.Generic.IList associations) => throw null; + public bool IsCollection { get => throw null; } + public bool IsManyToManyWith(NHibernate.Loader.OuterJoinableAssociation other) => throw null; + public NHibernate.SqlCommand.JoinType JoinType { get => throw null; } + public NHibernate.Persister.Entity.IJoinable Joinable { get => throw null; } + public NHibernate.Type.IAssociationType JoinableType { get => throw null; } + public NHibernate.SqlCommand.SqlString On { get => throw null; } + public OuterJoinableAssociation(NHibernate.Type.IAssociationType joinableType, string lhsAlias, string[] lhsColumns, string rhsAlias, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString withClause, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters, NHibernate.SelectMode selectMode) => throw null; + public OuterJoinableAssociation(NHibernate.Type.IAssociationType joinableType, string lhsAlias, string[] lhsColumns, string rhsAlias, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString withClause, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public string RHSAlias { get => throw null; } + public string RHSUniqueKeyName { get => throw null; } + public NHibernate.SelectMode SelectMode { get => throw null; } + public void ValidateJoin(string path) => throw null; + } + + namespace Collection + { + // Generated from `NHibernate.Loader.Collection.BasicCollectionJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicCollectionJoinWalker : NHibernate.Loader.Collection.CollectionJoinWalker + { + public BasicCollectionJoinWalker(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, int batchSize, NHibernate.SqlCommand.SqlString subquery, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Loader.Collection.BasicCollectionLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicCollectionLoader : NHibernate.Loader.Collection.CollectionLoader + { + public BasicCollectionLoader(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, int batchSize, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public BasicCollectionLoader(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, NHibernate.Engine.ISessionFactoryImplementor session, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected BasicCollectionLoader(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, int batchSize, NHibernate.SqlCommand.SqlString subquery, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected virtual void InitializeFromWalker(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, NHibernate.SqlCommand.SqlString subquery, int batchSize, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Loader.Collection.BatchingCollectionInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BatchingCollectionInitializer : NHibernate.Loader.Collection.ICollectionInitializer + { + public BatchingCollectionInitializer(NHibernate.Persister.Collection.ICollectionPersister collectionPersister, int[] batchSizes, NHibernate.Loader.Loader[] loaders) => throw null; + public static NHibernate.Loader.Collection.ICollectionInitializer CreateBatchingCollectionInitializer(NHibernate.Persister.Collection.IQueryableCollection persister, int maxBatchSize, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public static NHibernate.Loader.Collection.ICollectionInitializer CreateBatchingOneToManyInitializer(NHibernate.Persister.Collection.OneToManyPersister persister, int maxBatchSize, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public void Initialize(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InitializeAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Loader.Collection.CollectionJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CollectionJoinWalker : NHibernate.Loader.JoinWalker + { + public CollectionJoinWalker(NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected NHibernate.SqlCommand.SqlStringBuilder WhereString(string alias, string[] columnNames, NHibernate.SqlCommand.SqlString subselect, int batchSize) => throw null; + } + + // Generated from `NHibernate.Loader.Collection.CollectionLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionLoader : NHibernate.Loader.OuterJoinLoader, NHibernate.Loader.Collection.ICollectionInitializer + { + public CollectionLoader(NHibernate.Persister.Collection.IQueryableCollection persister, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected virtual System.Collections.Generic.IEnumerable CreateParameterSpecificationsAndAssignBackTrack(System.Collections.Generic.IEnumerable sqlPatameters) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected NHibernate.SqlCommand.SqlString GetSubSelectWithLimits(NHibernate.SqlCommand.SqlString subquery, System.Collections.Generic.ICollection parameterSpecs, NHibernate.Engine.RowSelection processedRowSelection, System.Collections.Generic.IDictionary parameters) => throw null; + public virtual void Initialize(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task InitializeAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsSubselectLoadingEnabled { get => throw null; } + protected NHibernate.Type.IType KeyType { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Loader.Collection.ICollectionInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionInitializer + { + void Initialize(object id, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task InitializeAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Loader.Collection.OneToManyJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToManyJoinWalker : NHibernate.Loader.Collection.CollectionJoinWalker + { + protected override string GenerateAliasForColumn(string rootAlias, string column) => throw null; + protected override bool IsDuplicateAssociation(string foreignKeyTable, string[] foreignKeyColumns) => throw null; + public OneToManyJoinWalker(NHibernate.Persister.Collection.IQueryableCollection oneToManyPersister, int batchSize, NHibernate.SqlCommand.SqlString subquery, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Loader.Collection.OneToManyLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToManyLoader : NHibernate.Loader.Collection.CollectionLoader + { + protected virtual void InitializeFromWalker(NHibernate.Persister.Collection.IQueryableCollection oneToManyPersister, NHibernate.SqlCommand.SqlString subquery, int batchSize, System.Collections.Generic.IDictionary enabledFilters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public OneToManyLoader(NHibernate.Persister.Collection.IQueryableCollection oneToManyPersister, int batchSize, NHibernate.SqlCommand.SqlString subquery, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public OneToManyLoader(NHibernate.Persister.Collection.IQueryableCollection oneToManyPersister, int batchSize, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public OneToManyLoader(NHibernate.Persister.Collection.IQueryableCollection oneToManyPersister, NHibernate.Engine.ISessionFactoryImplementor session, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + } + + // Generated from `NHibernate.Loader.Collection.SubselectCollectionLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubselectCollectionLoader : NHibernate.Loader.Collection.BasicCollectionLoader + { + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + public override void Initialize(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task InitializeAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public SubselectCollectionLoader(NHibernate.Persister.Collection.IQueryableCollection persister, NHibernate.SqlCommand.SqlString subquery, System.Collections.Generic.ICollection entityKeys, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + } + + // Generated from `NHibernate.Loader.Collection.SubselectOneToManyLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubselectOneToManyLoader : NHibernate.Loader.Collection.OneToManyLoader + { + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + public override void Initialize(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task InitializeAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public SubselectOneToManyLoader(NHibernate.Persister.Collection.IQueryableCollection persister, NHibernate.SqlCommand.SqlString subquery, System.Collections.Generic.ICollection entityKeys, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Collection.IQueryableCollection), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + } + + } + namespace Criteria + { + // Generated from `NHibernate.Loader.Criteria.ComponentCollectionCriteriaInfoProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentCollectionCriteriaInfoProvider : NHibernate.Loader.Criteria.ICriteriaInfoProvider + { + public ComponentCollectionCriteriaInfoProvider(NHibernate.Persister.Collection.IQueryableCollection persister) => throw null; + public NHibernate.Type.IType GetType(string relativePath) => throw null; + public string Name { get => throw null; } + public NHibernate.Persister.Entity.IPropertyMapping PropertyMapping { get => throw null; } + public string[] Spaces { get => throw null; } + } + + // Generated from `NHibernate.Loader.Criteria.CriteriaJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaJoinWalker : NHibernate.Loader.AbstractEntityJoinWalker + { + protected override void AddAssociations() => throw null; + public override string Comment { get => throw null; } + protected override NHibernate.Loader.OuterJoinableAssociation CreateRootAssociation() => throw null; + public CriteriaJoinWalker(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Loader.Criteria.CriteriaQueryTranslator translator, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.ICriteria criteria, string rootEntityName, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override string GenerateRootAlias(string tableName) => throw null; + protected override string GenerateTableAlias(int n, string path, string pathAlias, NHibernate.Persister.Entity.IJoinable joinable) => throw null; + protected override System.Collections.Generic.IReadOnlyCollection GetChildAliases(string parentSqlAlias, string childPath) => throw null; + protected override System.Collections.Generic.ISet GetEntityFetchLazyProperties(string path) => throw null; + protected override NHibernate.SqlCommand.JoinType GetJoinType(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, string path, string pathAlias, string lhsTable, string[] lhsColumns, bool nullable, int currentDepth, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected override NHibernate.SelectMode GetSelectMode(string path) => throw null; + protected override NHibernate.SqlCommand.SqlString GetWithClause(string path, string pathAlias) => throw null; + public bool[] IncludeInResultRow { get => throw null; } + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public NHibernate.Type.IType[] ResultTypes { get => throw null; } + public string[] UserAliases { get => throw null; } + protected override void WalkEntityTree(NHibernate.Persister.Entity.IOuterJoinLoadable persister, string alias, string path, int currentDepth) => throw null; + protected override NHibernate.SqlCommand.SqlString WhereFragment { get => throw null; } + } + + // Generated from `NHibernate.Loader.Criteria.CriteriaLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaLoader : NHibernate.Loader.OuterJoinLoader + { + protected override NHibernate.SqlCommand.SqlString ApplyLocks(NHibernate.SqlCommand.SqlString sqlSelectString, System.Collections.Generic.IDictionary lockModes, NHibernate.Dialect.Dialect dialect) => throw null; + protected override bool AreResultSetRowsTransformedImmediately() => throw null; + public CriteriaLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Impl.CriteriaImpl rootCriteria, string rootEntityName, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override System.Collections.Generic.ISet[] EntityFetchLazyProperties { get => throw null; } + public override NHibernate.LockMode[] GetLockModes(System.Collections.Generic.IDictionary lockModes) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected override object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer customResultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer customResultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IList GetResultList(System.Collections.IList results, NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override object[] GetResultRow(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultRowAsync(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool[] IncludeInResultRow { get => throw null; } + protected override bool IsChildFetchEntity(int i) => throw null; + protected override bool IsCollectionPersisterCacheable(NHibernate.Persister.Collection.ICollectionPersister collectionPersister) => throw null; + public override bool IsSubselectLoadingEnabled { get => throw null; } + public System.Collections.IList List(NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + protected override NHibernate.Transform.IResultTransformer ResolveResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override string[] ResultRowAliases { get => throw null; } + public NHibernate.Loader.Criteria.CriteriaQueryTranslator Translator { get => throw null; } + } + + // Generated from `NHibernate.Loader.Criteria.CriteriaQueryTranslator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaQueryTranslator : NHibernate.Loader.Criteria.ISupportEntityProjectionCriteriaQuery, NHibernate.Criterion.ICriteriaQuery + { + public System.Collections.Generic.ICollection CollectedParameterSpecifications { get => throw null; } + public System.Collections.Generic.ICollection CollectedParameters { get => throw null; } + public NHibernate.SqlCommand.Parameter CreateSkipParameter(int value) => throw null; + public NHibernate.SqlCommand.Parameter CreateTakeParameter(int value) => throw null; + public CriteriaQueryTranslator(NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Impl.CriteriaImpl criteria, string rootEntityName, string rootSQLAlias, NHibernate.Criterion.ICriteriaQuery outerQuery) => throw null; + public CriteriaQueryTranslator(NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Impl.CriteriaImpl criteria, string rootEntityName, string rootSQLAlias) => throw null; + // Generated from `NHibernate.Loader.Criteria.CriteriaQueryTranslator+EntityJoinInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityJoinInfo + { + public NHibernate.ICriteria Criteria; + public EntityJoinInfo() => throw null; + public NHibernate.Persister.Entity.IQueryable Persister; + } + + + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public string GenerateSQLAlias() => throw null; + public System.Collections.Generic.IReadOnlyCollection GetChildAliases(string parentSqlAlias, string childPath) => throw null; + public string GetColumn(NHibernate.ICriteria criteria, string propertyName) => throw null; + public string[] GetColumnAliasesUsingProjection(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public string[] GetColumns(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public string[] GetColumnsUsingProjection(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public NHibernate.ICriteria GetCriteria(string path, string critAlias) => throw null; + public NHibernate.ICriteria GetCriteria(string path) => throw null; + public string GetEntityName(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public string GetEntityName(NHibernate.ICriteria criteria) => throw null; + public System.Collections.Generic.IList GetEntityProjections() => throw null; + public NHibernate.SqlCommand.SqlString GetGroupBy() => throw null; + public NHibernate.SqlCommand.SqlString GetHavingCondition() => throw null; + public string[] GetIdentifierColumns(NHibernate.ICriteria subcriteria) => throw null; + public NHibernate.Type.IType GetIdentifierType(NHibernate.ICriteria subcriteria) => throw null; + public int GetIndexForAlias() => throw null; + public NHibernate.SqlCommand.JoinType GetJoinType(string path, string critAlias) => throw null; + public NHibernate.SqlCommand.JoinType GetJoinType(string path) => throw null; + public NHibernate.SqlCommand.SqlString GetOrderBy() => throw null; + public string GetPropertyName(string propertyName) => throw null; + public NHibernate.Engine.QueryParameters GetQueryParameters() => throw null; + public System.Collections.Generic.ISet GetQuerySpaces() => throw null; + public string GetSQLAlias(NHibernate.ICriteria criteria, string propertyName) => throw null; + public string GetSQLAlias(NHibernate.ICriteria criteria) => throw null; + public NHibernate.SqlCommand.SqlString GetSelect() => throw null; + public NHibernate.Type.IType GetType(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public NHibernate.Type.IType GetTypeUsingProjection(NHibernate.ICriteria subcriteria, string propertyName) => throw null; + public NHibernate.Engine.TypedValue GetTypedIdentifierValue(NHibernate.ICriteria subcriteria, object value) => throw null; + public NHibernate.Engine.TypedValue GetTypedValue(NHibernate.ICriteria subcriteria, string propertyName, object value) => throw null; + public NHibernate.SqlCommand.SqlString GetWhereCondition() => throw null; + public NHibernate.SqlCommand.SqlString GetWithClause(string path, string pathAlias) => throw null; + public NHibernate.SqlCommand.SqlString GetWithClause(string path) => throw null; + protected static bool HasGroupedOrAggregateProjection(NHibernate.Criterion.IProjection[] projections) => throw null; + public bool HasProjection { get => throw null; } + public bool IsJoin(string path, string critAlias) => throw null; + public bool IsJoin(string path) => throw null; + public System.Collections.Generic.IEnumerable NewQueryParameter(NHibernate.Engine.TypedValue parameter) => throw null; + public string[] ProjectedAliases { get => throw null; } + public string[] ProjectedColumnAliases { get => throw null; } + public NHibernate.Type.IType[] ProjectedTypes { get => throw null; } + public void RegisterEntityProjection(NHibernate.Criterion.EntityProjection projection) => throw null; + public NHibernate.SqlCommand.SqlString RenderSQLAliases(NHibernate.SqlCommand.SqlString sqlTemplate) => throw null; + public NHibernate.Impl.CriteriaImpl RootCriteria { get => throw null; } + NHibernate.ICriteria NHibernate.Loader.Criteria.ISupportEntityProjectionCriteriaQuery.RootCriteria { get => throw null; } + public string RootSQLAlias { get => throw null; } + public static string RootSqlAlias; + public int SQLAliasCount { get => throw null; } + public bool TryGetType(NHibernate.ICriteria subcriteria, string propertyName, out NHibernate.Type.IType type) => throw null; + public System.Collections.Generic.ISet UncacheableCollectionPersisters { get => throw null; } + } + + // Generated from `NHibernate.Loader.Criteria.EntityCriteriaInfoProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityCriteriaInfoProvider : NHibernate.Loader.Criteria.ICriteriaInfoProvider + { + public EntityCriteriaInfoProvider(NHibernate.Persister.Entity.IQueryable persister) => throw null; + public NHibernate.Type.IType GetType(string relativePath) => throw null; + public string Name { get => throw null; } + public NHibernate.Persister.Entity.IPropertyMapping PropertyMapping { get => throw null; } + public string[] Spaces { get => throw null; } + } + + // Generated from `NHibernate.Loader.Criteria.ICriteriaInfoProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICriteriaInfoProvider + { + NHibernate.Type.IType GetType(string relativePath); + string Name { get; } + NHibernate.Persister.Entity.IPropertyMapping PropertyMapping { get; } + string[] Spaces { get; } + } + + // Generated from `NHibernate.Loader.Criteria.ISupportEntityProjectionCriteriaQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportEntityProjectionCriteriaQuery + { + void RegisterEntityProjection(NHibernate.Criterion.EntityProjection projection); + NHibernate.ICriteria RootCriteria { get; } + } + + // Generated from `NHibernate.Loader.Criteria.ScalarCollectionCriteriaInfoProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ScalarCollectionCriteriaInfoProvider : NHibernate.Loader.Criteria.ICriteriaInfoProvider + { + public NHibernate.Type.IType GetType(string relativePath) => throw null; + public string Name { get => throw null; } + public NHibernate.Persister.Entity.IPropertyMapping PropertyMapping { get => throw null; } + public ScalarCollectionCriteriaInfoProvider(NHibernate.Hql.Util.SessionFactoryHelper helper, string role) => throw null; + public string[] Spaces { get => throw null; } + } + + } + namespace Custom + { + // Generated from `NHibernate.Loader.Custom.CollectionFetchReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionFetchReturn : NHibernate.Loader.Custom.FetchReturn + { + public NHibernate.Loader.ICollectionAliases CollectionAliases { get => throw null; } + public CollectionFetchReturn(string alias, NHibernate.Loader.Custom.NonScalarReturn owner, string ownerProperty, NHibernate.Loader.ICollectionAliases collectionAliases, NHibernate.Loader.IEntityAliases elementEntityAliases, NHibernate.LockMode lockMode) : base(default(NHibernate.Loader.Custom.NonScalarReturn), default(string), default(string), default(NHibernate.LockMode)) => throw null; + public NHibernate.Loader.IEntityAliases ElementEntityAliases { get => throw null; } + } + + // Generated from `NHibernate.Loader.Custom.CollectionReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionReturn : NHibernate.Loader.Custom.NonScalarReturn + { + public NHibernate.Loader.ICollectionAliases CollectionAliases { get => throw null; } + public CollectionReturn(string alias, string ownerEntityName, string ownerProperty, NHibernate.Loader.ICollectionAliases collectionAliases, NHibernate.Loader.IEntityAliases elementEntityAliases, NHibernate.LockMode lockMode) : base(default(string), default(NHibernate.LockMode)) => throw null; + public NHibernate.Loader.IEntityAliases ElementEntityAliases { get => throw null; } + public string OwnerEntityName { get => throw null; } + public string OwnerProperty { get => throw null; } + } + + // Generated from `NHibernate.Loader.Custom.ColumnCollectionAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnCollectionAliases : NHibernate.Loader.ICollectionAliases + { + public ColumnCollectionAliases(System.Collections.Generic.IDictionary userProvidedAliases, NHibernate.Persister.Collection.ISqlLoadableCollection persister) => throw null; + public string Suffix { get => throw null; } + public string[] SuffixedElementAliases { get => throw null; } + public string SuffixedIdentifierAlias { get => throw null; } + public string[] SuffixedIndexAliases { get => throw null; } + public string[] SuffixedKeyAliases { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Loader.Custom.ColumnEntityAliases` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnEntityAliases : NHibernate.Loader.DefaultEntityAliases + { + public ColumnEntityAliases(System.Collections.Generic.IDictionary returnProperties, NHibernate.Persister.Entity.ILoadable persister, string suffix) : base(default(NHibernate.Persister.Entity.ILoadable), default(string)) => throw null; + protected override string GetDiscriminatorAlias(NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + protected override string[] GetIdentifierAliases(NHibernate.Persister.Entity.ILoadable persister, string suffix) => throw null; + protected override string[] GetPropertyAliases(NHibernate.Persister.Entity.ILoadable persister, int j) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.CustomLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CustomLoader : NHibernate.Loader.Loader + { + protected internal override void AutoDiscoverTypes(System.Data.Common.DbDataReader rs, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Transform.IResultTransformer forcedResultTransformer) => throw null; + protected override NHibernate.Loader.ICollectionAliases[] CollectionAliases { get => throw null; } + protected override int[] CollectionOwners { get => throw null; } + protected internal override NHibernate.Persister.Collection.ICollectionPersister[] CollectionPersisters { get => throw null; } + public CustomLoader(NHibernate.Loader.Custom.ICustomQuery customQuery, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override NHibernate.Loader.IEntityAliases[] EntityAliases { get => throw null; } + public override NHibernate.Persister.Entity.ILoadable[] EntityPersisters { get => throw null; } + public override NHibernate.LockMode[] GetLockModes(System.Collections.Generic.IDictionary lockModesMap) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected override object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IList GetResultList(System.Collections.IList results, NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override object[] GetResultRow(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultRowAsync(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Loader.Custom.CustomLoader+IResultColumnProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IResultColumnProcessor + { + object Extract(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ExtractAsync(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void PerformDiscovery(NHibernate.Loader.Custom.CustomLoader.MetaData metadata, System.Collections.Generic.IList types, System.Collections.Generic.IList aliases); + } + + + protected override bool[] IncludeInResultRow { get => throw null; } + public System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Loader.Custom.CustomLoader+MetaData` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MetaData + { + public int GetColumnCount() => throw null; + public string GetColumnName(int position) => throw null; + public int GetColumnPosition(string columnName) => throw null; + public NHibernate.Type.IType GetHibernateType(int columnPos) => throw null; + public MetaData(System.Data.Common.DbDataReader resultSet) => throw null; + } + + + public System.Collections.Generic.IEnumerable NamedParameters { get => throw null; } + // Generated from `NHibernate.Loader.Custom.CustomLoader+NonScalarResultColumnProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonScalarResultColumnProcessor : NHibernate.Loader.Custom.CustomLoader.IResultColumnProcessor + { + public object Extract(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ExtractAsync(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NonScalarResultColumnProcessor(int position) => throw null; + public void PerformDiscovery(NHibernate.Loader.Custom.CustomLoader.MetaData metadata, System.Collections.Generic.IList types, System.Collections.Generic.IList aliases) => throw null; + } + + + protected override int[] Owners { get => throw null; } + public override string QueryIdentifier { get => throw null; } + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + protected override void ResetEffectiveExpectedType(System.Collections.Generic.IEnumerable parameterSpecs, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected override NHibernate.Transform.IResultTransformer ResolveResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override string[] ResultRowAliases { get => throw null; } + // Generated from `NHibernate.Loader.Custom.CustomLoader+ResultRowProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultRowProcessor + { + public object[] BuildResultRow(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session) => throw null; + public object BuildResultRow(object[] data, System.Data.Common.DbDataReader resultSet, bool hasTransformer, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BuildResultRowAsync(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BuildResultRowAsync(object[] data, System.Data.Common.DbDataReader resultSet, bool hasTransformer, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Loader.Custom.CustomLoader.IResultColumnProcessor[] ColumnProcessors { get => throw null; } + public void PrepareForAutoDiscovery(NHibernate.Loader.Custom.CustomLoader.MetaData metadata) => throw null; + public ResultRowProcessor(bool hasScalars, NHibernate.Loader.Custom.CustomLoader.IResultColumnProcessor[] columnProcessors) => throw null; + } + + + public string[] ReturnAliases { get => throw null; } + // Generated from `NHibernate.Loader.Custom.CustomLoader+ScalarResultColumnProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ScalarResultColumnProcessor : NHibernate.Loader.Custom.CustomLoader.IResultColumnProcessor + { + public object Extract(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ExtractAsync(object[] data, System.Data.Common.DbDataReader resultSet, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void PerformDiscovery(NHibernate.Loader.Custom.CustomLoader.MetaData metadata, System.Collections.Generic.IList types, System.Collections.Generic.IList aliases) => throw null; + public ScalarResultColumnProcessor(string alias, NHibernate.Type.IType type) => throw null; + public ScalarResultColumnProcessor(int position) => throw null; + } + + + public override NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + } + + // Generated from `NHibernate.Loader.Custom.EntityFetchReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityFetchReturn : NHibernate.Loader.Custom.FetchReturn + { + public NHibernate.Loader.IEntityAliases EntityAliases { get => throw null; } + public EntityFetchReturn(string alias, NHibernate.Loader.IEntityAliases entityAliases, NHibernate.Loader.Custom.NonScalarReturn owner, string ownerProperty, NHibernate.LockMode lockMode) : base(default(NHibernate.Loader.Custom.NonScalarReturn), default(string), default(string), default(NHibernate.LockMode)) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.FetchReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class FetchReturn : NHibernate.Loader.Custom.NonScalarReturn + { + public FetchReturn(NHibernate.Loader.Custom.NonScalarReturn owner, string ownerProperty, string alias, NHibernate.LockMode lockMode) : base(default(string), default(NHibernate.LockMode)) => throw null; + public NHibernate.Loader.Custom.NonScalarReturn Owner { get => throw null; } + public string OwnerProperty { get => throw null; } + } + + // Generated from `NHibernate.Loader.Custom.ICustomQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICustomQuery + { + System.Collections.Generic.IEnumerable CollectedParametersSpecifications { get; } + System.Collections.Generic.IList CustomQueryReturns { get; } + System.Collections.Generic.ISet QuerySpaces { get; } + NHibernate.SqlCommand.SqlString SQL { get; } + } + + // Generated from `NHibernate.Loader.Custom.IReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IReturn + { + } + + // Generated from `NHibernate.Loader.Custom.NonScalarReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NonScalarReturn : NHibernate.Loader.Custom.IReturn + { + public string Alias { get => throw null; } + public NHibernate.LockMode LockMode { get => throw null; } + public NonScalarReturn(string alias, NHibernate.LockMode lockMode) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.RootReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RootReturn : NHibernate.Loader.Custom.NonScalarReturn + { + public NHibernate.Loader.IEntityAliases EntityAliases { get => throw null; } + public string EntityName { get => throw null; } + public RootReturn(string alias, string entityName, NHibernate.Loader.IEntityAliases entityAliases, NHibernate.LockMode lockMode) : base(default(string), default(NHibernate.LockMode)) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.ScalarReturn` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ScalarReturn : NHibernate.Loader.Custom.IReturn + { + public string ColumnAlias { get => throw null; } + public ScalarReturn(NHibernate.Type.IType type, string columnAlias) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + } + + namespace Sql + { + // Generated from `NHibernate.Loader.Custom.Sql.SQLCustomQuery` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLCustomQuery : NHibernate.Loader.Custom.ICustomQuery + { + public System.Collections.Generic.IEnumerable CollectedParametersSpecifications { get => throw null; } + public System.Collections.Generic.IList CustomQueryReturns { get => throw null; } + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public NHibernate.SqlCommand.SqlString SQL { get => throw null; } + public SQLCustomQuery(NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] queryReturns, string sqlQuery, System.Collections.Generic.ICollection additionalQuerySpaces, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.Sql.SQLQueryParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLQueryParser + { + public System.Collections.Generic.IEnumerable CollectedParametersSpecifications { get => throw null; } + // Generated from `NHibernate.Loader.Custom.Sql.SQLQueryParser+IParserContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParserContext + { + NHibernate.Persister.Collection.ISqlLoadableCollection GetCollectionPersisterByAlias(string alias); + string GetCollectionSuffixByAlias(string alias); + NHibernate.Persister.Entity.ISqlLoadable GetEntityPersisterByAlias(string alias); + string GetEntitySuffixByAlias(string alias); + System.Collections.Generic.IDictionary GetPropertyResultsMapByAlias(string alias); + bool IsCollectionAlias(string aliasName); + bool IsEntityAlias(string aliasName); + } + + + // Generated from `NHibernate.Loader.Custom.Sql.SQLQueryParser+ParameterSubstitutionRecognizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParameterSubstitutionRecognizer : NHibernate.Engine.Query.ParameterParser.IRecognizer + { + public void JpaPositionalParameter(string name, int position) => throw null; + public void NamedParameter(string name, int position) => throw null; + public void OrdinalParameter(int position) => throw null; + public void Other(string sqlPart) => throw null; + public void Other(System.Char character) => throw null; + public void OutParameter(int position) => throw null; + public ParameterSubstitutionRecognizer(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public System.Collections.Generic.IEnumerable ParametersSpecifications { get => throw null; } + } + + + public NHibernate.SqlCommand.SqlString Process() => throw null; + public bool QueryHasAliases { get => throw null; } + public SQLQueryParser(NHibernate.Engine.ISessionFactoryImplementor factory, string sqlQuery, NHibernate.Loader.Custom.Sql.SQLQueryParser.IParserContext context) => throw null; + } + + // Generated from `NHibernate.Loader.Custom.Sql.SQLQueryReturnProcessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SQLQueryReturnProcessor + { + public System.Collections.IList GenerateCustomReturns(bool queryHadAliases) => throw null; + public NHibernate.Loader.Custom.Sql.SQLQueryReturnProcessor.ResultAliasContext Process() => throw null; + // Generated from `NHibernate.Loader.Custom.Sql.SQLQueryReturnProcessor+ResultAliasContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ResultAliasContext + { + public NHibernate.Persister.Collection.ISqlLoadableCollection GetCollectionPersister(string alias) => throw null; + public string GetCollectionSuffix(string alias) => throw null; + public NHibernate.Persister.Entity.ISqlLoadable GetEntityPersister(string alias) => throw null; + public string GetEntitySuffix(string alias) => throw null; + public string GetOwnerAlias(string alias) => throw null; + public System.Collections.Generic.IDictionary GetPropertyResultsMap(string alias) => throw null; + public ResultAliasContext(NHibernate.Loader.Custom.Sql.SQLQueryReturnProcessor parent) => throw null; + } + + + public SQLQueryReturnProcessor(NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] queryReturns, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + } + } + namespace Entity + { + // Generated from `NHibernate.Loader.Entity.AbstractEntityLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEntityLoader : NHibernate.Loader.OuterJoinLoader, NHibernate.Loader.Entity.IUniqueEntityLoader + { + protected AbstractEntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Type.IType uniqueKeyType, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected override object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool IsSingleRowLoader { get => throw null; } + public object Load(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual object Load(NHibernate.Engine.ISessionImplementor session, object id, object optionalObject, object optionalId) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.Threading.Tasks.Task LoadAsync(NHibernate.Engine.ISessionImplementor session, object id, object optionalObject, object optionalId, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Type.IType UniqueKeyType { get => throw null; set => throw null; } + protected string entityName; + protected static NHibernate.INHibernateLogger log; + protected NHibernate.Persister.Entity.IOuterJoinLoadable persister; + } + + // Generated from `NHibernate.Loader.Entity.BatchingEntityLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BatchingEntityLoader : NHibernate.Loader.Entity.IUniqueEntityLoader + { + public BatchingEntityLoader(NHibernate.Persister.Entity.IEntityPersister persister, int[] batchSizes, NHibernate.Loader.Loader[] loaders) => throw null; + public static NHibernate.Loader.Entity.IUniqueEntityLoader CreateBatchingEntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, int maxBatchSize, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public object Load(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Loader.Entity.CascadeEntityJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CascadeEntityJoinWalker : NHibernate.Loader.AbstractEntityJoinWalker + { + public CascadeEntityJoinWalker(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.CascadingAction action, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public override string Comment { get => throw null; } + protected override bool IsJoinedFetchEnabled(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + protected override bool IsTooManyCollections { get => throw null; } + } + + // Generated from `NHibernate.Loader.Entity.CascadeEntityLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CascadeEntityLoader : NHibernate.Loader.Entity.AbstractEntityLoader + { + public CascadeEntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.Engine.CascadingAction action, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Type.IType), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + } + + // Generated from `NHibernate.Loader.Entity.CollectionElementLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionElementLoader : NHibernate.Loader.OuterJoinLoader + { + public CollectionElementLoader(NHibernate.Persister.Collection.IQueryableCollection collectionPersister, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected override object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer transformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer transformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool IsSingleRowLoader { get => throw null; } + public virtual object LoadElement(NHibernate.Engine.ISessionImplementor session, object key, object index) => throw null; + public virtual System.Threading.Tasks.Task LoadElementAsync(NHibernate.Engine.ISessionImplementor session, object key, object index, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Loader.Entity.EntityJoinWalker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityJoinWalker : NHibernate.Loader.AbstractEntityJoinWalker + { + public override string Comment { get => throw null; } + public EntityJoinWalker(NHibernate.Persister.Entity.IOuterJoinLoadable persister, string[] uniqueKey, int batchSize, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override string GenerateAliasForColumn(string rootAlias, string column) => throw null; + protected override bool IsJoinedFetchEnabled(NHibernate.Type.IAssociationType type, NHibernate.FetchMode config, NHibernate.Engine.CascadeStyle cascadeStyle) => throw null; + } + + // Generated from `NHibernate.Loader.Entity.EntityLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityLoader : NHibernate.Loader.Entity.AbstractEntityLoader + { + public EntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, string[] uniqueKey, NHibernate.Type.IType uniqueKeyType, int batchSize, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Type.IType), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public EntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, int batchSize, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Type.IType), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + public EntityLoader(NHibernate.Persister.Entity.IOuterJoinLoadable persister, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) : base(default(NHibernate.Persister.Entity.IOuterJoinLoadable), default(NHibernate.Type.IType), default(NHibernate.Engine.ISessionFactoryImplementor), default(System.Collections.Generic.IDictionary)) => throw null; + protected override bool IsSingleRowLoader { get => throw null; } + public object LoadByUniqueKey(NHibernate.Engine.ISessionImplementor session, object key) => throw null; + public System.Threading.Tasks.Task LoadByUniqueKeyAsync(NHibernate.Engine.ISessionImplementor session, object key, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Loader.Entity.IUniqueEntityLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUniqueEntityLoader + { + object Load(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + } + namespace Hql + { + // Generated from `NHibernate.Loader.Hql.QueryLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryLoader : NHibernate.Loader.BasicLoader + { + protected override string[] Aliases { get => throw null; } + protected override NHibernate.SqlCommand.SqlString ApplyLocks(NHibernate.SqlCommand.SqlString sql, System.Collections.Generic.IDictionary lockModes, NHibernate.Dialect.Dialect dialect) => throw null; + protected override int[] CollectionOwners { get => throw null; } + protected internal override NHibernate.Persister.Collection.ICollectionPersister[] CollectionPersisters { get => throw null; } + protected override string[] CollectionSuffixes { get => throw null; } + protected override bool[] EntityEagerPropertyFetches { get => throw null; } + protected override System.Collections.Generic.ISet[] EntityFetchLazyProperties { get => throw null; } + public override NHibernate.Persister.Entity.ILoadable[] EntityPersisters { get => throw null; } + protected override System.Collections.Generic.IDictionary GetCollectionUserProvidedAlias(int index) => throw null; + public override NHibernate.LockMode[] GetLockModes(System.Collections.Generic.IDictionary lockModes) => throw null; + protected override System.Collections.Generic.IEnumerable GetParameterSpecifications() => throw null; + protected override object GetResultColumnOrRow(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultColumnOrRowAsync(object[] row, NHibernate.Transform.IResultTransformer resultTransformer, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Collections.IList GetResultList(System.Collections.IList results, NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override object[] GetResultRow(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task GetResultRowAsync(object[] row, System.Data.Common.DbDataReader rs, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected override bool[] IncludeInResultRow { get => throw null; } + protected override bool IsCollectionPersisterCacheable(NHibernate.Persister.Collection.ICollectionPersister collectionPersister) => throw null; + public override bool IsSubselectLoadingEnabled { get => throw null; } + public System.Collections.IList List(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters) => throw null; + public System.Threading.Tasks.Task ListAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.QueryParameters queryParameters, System.Threading.CancellationToken cancellationToken) => throw null; + protected override NHibernate.Type.EntityType[] OwnerAssociationTypes { get => throw null; } + protected override int[] Owners { get => throw null; } + public override string QueryIdentifier { get => throw null; } + public QueryLoader(NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl queryTranslator, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Hql.Ast.ANTLR.Tree.SelectClause selectClause) : base(default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override void ResetEffectiveExpectedType(System.Collections.Generic.IEnumerable parameterSpecs, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected override NHibernate.Transform.IResultTransformer ResolveResultTransformer(NHibernate.Transform.IResultTransformer resultTransformer) => throw null; + protected override string[] ResultRowAliases { get => throw null; } + public NHibernate.Type.IType[] ReturnTypes { get => throw null; } + public override NHibernate.SqlCommand.SqlString SqlString { get => throw null; } + protected override string[] Suffixes { get => throw null; } + protected override bool UpgradeLocks() => throw null; + } + + } + } + namespace Mapping + { + // Generated from `NHibernate.Mapping.AbstractAuxiliaryDatabaseObject` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractAuxiliaryDatabaseObject : NHibernate.Mapping.IRelationalModel, NHibernate.Mapping.IAuxiliaryDatabaseObject + { + protected AbstractAuxiliaryDatabaseObject(System.Collections.Generic.HashSet dialectScopes) => throw null; + protected AbstractAuxiliaryDatabaseObject() => throw null; + public void AddDialectScope(string dialectName) => throw null; + public bool AppliesToDialect(NHibernate.Dialect.Dialect dialect) => throw null; + public System.Collections.Generic.HashSet DialectScopes { get => throw null; } + public System.Collections.Generic.IDictionary Parameters { get => throw null; } + public void SetParameterValues(System.Collections.Generic.IDictionary parameters) => throw null; + public abstract string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema); + public abstract string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema); + } + + // Generated from `NHibernate.Mapping.Any` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Any : NHibernate.Mapping.SimpleValue + { + public Any(NHibernate.Mapping.Table table) => throw null; + public virtual string IdentifierTypeName { get => throw null; set => throw null; } + public virtual string MetaType { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary MetaValues { get => throw null; set => throw null; } + public void ResetCachedType() => throw null; + public override void SetTypeUsingReflection(string className, string propertyName, string access) => throw null; + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Array` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Array : NHibernate.Mapping.List + { + public Array(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + public System.Type ElementClass { get => throw null; } + public string ElementClassName { get => throw null; set => throw null; } + public override bool IsArray { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Backref` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Backref : NHibernate.Mapping.Property + { + public override bool BackRef { get => throw null; } + public Backref() => throw null; + public string CollectionRole { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public override bool IsBasicPropertyAccessor { get => throw null; } + protected override NHibernate.Properties.IPropertyAccessor PropertyAccessor { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Bag` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Bag : NHibernate.Mapping.Collection + { + public Bag(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override void CreatePrimaryKey() => throw null; + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Collection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Collection : NHibernate.Mapping.IValue, NHibernate.Mapping.IFilterable, NHibernate.Mapping.IFetchable + { + public object Accept(NHibernate.Mapping.IValueVisitor visitor) => throw null; + public void AddFilter(string name, string condition) => throw null; + public void AddManyToManyFilter(string name, string condition) => throw null; + public int BatchSize { get => throw null; set => throw null; } + public string CacheConcurrencyStrategy { get => throw null; set => throw null; } + public string CacheRegionName { get => throw null; set => throw null; } + protected void CheckGenericArgumentsLength(int expectedLength) => throw null; + protected Collection(NHibernate.Mapping.PersistentClass owner) => throw null; + public System.Type CollectionPersisterClass { get => throw null; set => throw null; } + public NHibernate.Mapping.Table CollectionTable { get => throw null; set => throw null; } + public virtual NHibernate.Type.CollectionType CollectionType { get => throw null; } + public bool[] ColumnInsertability { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public bool[] ColumnUpdateability { get => throw null; } + public object Comparer { get => throw null; set => throw null; } + public string ComparerClassName { get => throw null; set => throw null; } + public virtual void CreateAllKeys() => throw null; + public void CreateForeignKey() => throw null; + public abstract void CreatePrimaryKey(); + public NHibernate.SqlCommand.SqlString CustomSQLDelete { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLDeleteAll { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLDeleteAllCheckStyle { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLDeleteCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLInsert { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLInsertCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLUpdate { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLUpdateCheckStyle { get => throw null; } + public abstract NHibernate.Type.CollectionType DefaultCollectionType { get; } + public const string DefaultElementColumnName = default; + public const string DefaultKeyColumnName = default; + public NHibernate.Mapping.IValue Element { get => throw null; set => throw null; } + public bool ExtraLazy { get => throw null; set => throw null; } + public NHibernate.FetchMode FetchMode { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary FilterMap { get => throw null; } + public NHibernate.Mapping.Formula Formula { get => throw null; } + public System.Type[] GenericArguments { get => throw null; set => throw null; } + public virtual bool HasFormula { get => throw null; } + public bool HasOrder { get => throw null; } + public bool HasOrphanDelete { get => throw null; set => throw null; } + public virtual bool IsAlternateUniqueKey { get => throw null; } + public virtual bool IsArray { get => throw null; } + public bool IsCustomDeleteAllCallable { get => throw null; } + public bool IsCustomDeleteCallable { get => throw null; } + public bool IsCustomInsertCallable { get => throw null; } + public bool IsCustomUpdateCallable { get => throw null; } + public bool IsGeneric { get => throw null; set => throw null; } + public virtual bool IsIdentified { get => throw null; } + public virtual bool IsIndexed { get => throw null; } + public bool IsInverse { get => throw null; set => throw null; } + public bool IsLazy { get => throw null; set => throw null; } + public virtual bool IsMap { get => throw null; } + public bool IsMutable { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; } + public bool IsOneToMany { get => throw null; } + public bool IsOptimisticLocked { get => throw null; set => throw null; } + public virtual bool IsPrimitiveArray { get => throw null; } + public virtual bool IsSet { get => throw null; } + public bool IsSimpleValue { get => throw null; } + public bool IsSorted { get => throw null; set => throw null; } + public bool IsSubselectLoadable { get => throw null; set => throw null; } + public bool IsUnique { get => throw null; } + public bool IsValid(NHibernate.Engine.IMapping mapping) => throw null; + public NHibernate.Mapping.IKeyValue Key { get => throw null; set => throw null; } + public string LoaderName { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary ManyToManyFilterMap { get => throw null; } + public string ManyToManyOrdering { get => throw null; set => throw null; } + public string ManyToManyWhere { get => throw null; set => throw null; } + public string OrderBy { get => throw null; set => throw null; } + public NHibernate.Mapping.PersistentClass Owner { get => throw null; set => throw null; } + public string OwnerEntityName { get => throw null; } + public string ReferencedPropertyName { get => throw null; set => throw null; } + public string Role { get => throw null; set => throw null; } + public void SetCustomSQLDelete(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLDeleteAll(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLInsert(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLUpdate(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetTypeUsingReflection(string className, string propertyName, string access) => throw null; + public System.Collections.Generic.ISet SynchronizedTables { get => throw null; } + public NHibernate.Mapping.Table Table { get => throw null; } + public override string ToString() => throw null; + public NHibernate.Type.IType Type { get => throw null; } + public string TypeName { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary TypeParameters { get => throw null; set => throw null; } + public virtual void Validate(NHibernate.Engine.IMapping mapping) => throw null; + public string Where { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.Column` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Column : System.ICloneable, NHibernate.Mapping.ISelectable + { + public string CanonicalName { get => throw null; } + public string CheckConstraint { get => throw null; set => throw null; } + public object Clone() => throw null; + public Column(string columnName) => throw null; + public Column() => throw null; + public string Comment { get => throw null; set => throw null; } + public const int DefaultLength = default; + public const int DefaultPrecision = default; + public const int DefaultScale = default; + public string DefaultValue { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Mapping.Column column) => throw null; + public string GetAlias(NHibernate.Dialect.Dialect dialect, NHibernate.Mapping.Table table) => throw null; + public string GetAlias(NHibernate.Dialect.Dialect dialect) => throw null; + public override int GetHashCode() => throw null; + public string GetQuotedName(NHibernate.Dialect.Dialect d) => throw null; + public string GetQuotedName() => throw null; + public string GetSqlType(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping) => throw null; + public NHibernate.SqlTypes.SqlType GetSqlTypeCode(NHibernate.Engine.IMapping mapping) => throw null; + public string GetTemplate(NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry) => throw null; + public string GetText(NHibernate.Dialect.Dialect dialect) => throw null; + public bool HasCheckConstraint { get => throw null; } + public bool IsCaracteristicsDefined() => throw null; + public bool IsFormula { get => throw null; } + public bool IsLengthDefined() => throw null; + public bool IsNullable { get => throw null; set => throw null; } + public bool IsPrecisionDefined() => throw null; + public bool IsQuoted { get => throw null; set => throw null; } + public bool IsScaleDefined() => throw null; + public bool IsUnique { get => throw null; set => throw null; } + public int Length { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public int Precision { get => throw null; set => throw null; } + public int Scale { get => throw null; set => throw null; } + public string SqlType { get => throw null; set => throw null; } + public NHibernate.SqlTypes.SqlType SqlTypeCode { get => throw null; set => throw null; } + public string Text { get => throw null; } + public override string ToString() => throw null; + public int TypeIndex { get => throw null; set => throw null; } + public bool Unique { get => throw null; set => throw null; } + public NHibernate.Mapping.IValue Value { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.Component` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Component : NHibernate.Mapping.SimpleValue, NHibernate.Mapping.IMetaAttributable + { + public override void AddColumn(NHibernate.Mapping.Column column) => throw null; + public void AddProperty(NHibernate.Mapping.Property p) => throw null; + public virtual void AddTuplizer(NHibernate.EntityMode entityMode, string implClassName) => throw null; + public override bool[] ColumnInsertability { get => throw null; } + public override System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public override int ColumnSpan { get => throw null; } + public override bool[] ColumnUpdateability { get => throw null; } + public Component(NHibernate.Mapping.Table table, NHibernate.Mapping.PersistentClass owner) => throw null; + public Component(NHibernate.Mapping.PersistentClass owner) => throw null; + public Component(NHibernate.Mapping.Component component) => throw null; + public Component(NHibernate.Mapping.Collection collection) => throw null; + public System.Type ComponentClass { get => throw null; set => throw null; } + public string ComponentClassName { get => throw null; set => throw null; } + public NHibernate.Mapping.MetaAttribute GetMetaAttribute(string attributeName) => throw null; + public NHibernate.Mapping.Property GetProperty(string propertyName) => throw null; + public virtual string GetTuplizerImplClassName(NHibernate.EntityMode mode) => throw null; + public bool HasPocoRepresentation { get => throw null; } + public bool IsDynamic { get => throw null; set => throw null; } + public bool IsEmbedded { get => throw null; set => throw null; } + public bool IsKey { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary MetaAttributes { get => throw null; set => throw null; } + public NHibernate.Mapping.PersistentClass Owner { get => throw null; set => throw null; } + public NHibernate.Mapping.Property ParentProperty { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable PropertyIterator { get => throw null; } + public int PropertySpan { get => throw null; } + public string RoleName { get => throw null; set => throw null; } + public override void SetTypeUsingReflection(string className, string propertyName, string accesorName) => throw null; + public override string ToString() => throw null; + public virtual System.Collections.Generic.IDictionary TuplizerMap { get => throw null; } + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Constraint` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Constraint : NHibernate.Mapping.IRelationalModel + { + public void AddColumn(NHibernate.Mapping.Column column) => throw null; + public void AddColumns(System.Collections.Generic.IEnumerable columnIterator) => throw null; + public void AddColumns(System.Collections.Generic.IEnumerable columnIterator) => throw null; + public System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public System.Collections.Generic.IList Columns { get => throw null; } + protected Constraint() => throw null; + public static string GenerateName(string prefix, NHibernate.Mapping.Table table, NHibernate.Mapping.Table referencedTable, System.Collections.Generic.IEnumerable columns) => throw null; + public virtual bool IsGenerated(NHibernate.Dialect.Dialect dialect) => throw null; + public string Name { get => throw null; set => throw null; } + public abstract string SqlConstraintString(NHibernate.Dialect.Dialect d, string constraintName, string defaultCatalog, string defaultSchema); + public virtual string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema) => throw null; + public virtual string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public NHibernate.Mapping.Table Table { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Mapping.DenormalizedTable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DenormalizedTable : NHibernate.Mapping.Table + { + public override System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public override bool ContainsColumn(NHibernate.Mapping.Column column) => throw null; + public override void CreateForeignKeys() => throw null; + public DenormalizedTable(NHibernate.Mapping.Table includedTable) => throw null; + public override NHibernate.Mapping.Column GetColumn(NHibernate.Mapping.Column column) => throw null; + public override System.Collections.Generic.IEnumerable IndexIterator { get => throw null; } + public override NHibernate.Mapping.PrimaryKey PrimaryKey { get => throw null; set => throw null; } + public override System.Collections.Generic.IEnumerable UniqueKeyIterator { get => throw null; } + } + + // Generated from `NHibernate.Mapping.DependantValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DependantValue : NHibernate.Mapping.SimpleValue + { + public DependantValue(NHibernate.Mapping.Table table, NHibernate.Mapping.IKeyValue prototype) => throw null; + public override bool IsNullable { get => throw null; } + public override bool IsUpdateable { get => throw null; } + public void SetNullable(bool nullable) => throw null; + public void SetTypeUsingReflection(string className, string propertyName) => throw null; + public virtual void SetUpdateable(bool updateable) => throw null; + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ForeignKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ForeignKey : NHibernate.Mapping.Constraint + { + public virtual void AddReferencedColumns(System.Collections.Generic.IEnumerable referencedColumnsIterator) => throw null; + public void AlignColumns() => throw null; + public bool CascadeDeleteEnabled { get => throw null; set => throw null; } + public ForeignKey() => throw null; + public string GeneratedConstraintNamePrefix { get => throw null; } + public bool HasPhysicalConstraint { get => throw null; } + public override bool IsGenerated(NHibernate.Dialect.Dialect dialect) => throw null; + public bool IsReferenceToPrimaryKey { get => throw null; } + public System.Collections.Generic.IList ReferencedColumns { get => throw null; } + public string ReferencedEntityName { get => throw null; set => throw null; } + public NHibernate.Mapping.Table ReferencedTable { get => throw null; set => throw null; } + public override string SqlConstraintString(NHibernate.Dialect.Dialect d, string constraintName, string defaultCatalog, string defaultSchema) => throw null; + public override string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Mapping.Formula` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Formula : NHibernate.Mapping.ISelectable + { + public Formula() => throw null; + public string FormulaString { get => throw null; set => throw null; } + public string GetAlias(NHibernate.Dialect.Dialect dialect, NHibernate.Mapping.Table table) => throw null; + public string GetAlias(NHibernate.Dialect.Dialect dialect) => throw null; + public string GetTemplate(NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry) => throw null; + public string GetText(NHibernate.Dialect.Dialect dialect) => throw null; + public bool IsFormula { get => throw null; } + public string Text { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Mapping.IAuxiliaryDatabaseObject` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAuxiliaryDatabaseObject : NHibernate.Mapping.IRelationalModel + { + void AddDialectScope(string dialectName); + bool AppliesToDialect(NHibernate.Dialect.Dialect dialect); + void SetParameterValues(System.Collections.Generic.IDictionary parameters); + } + + // Generated from `NHibernate.Mapping.IFetchable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFetchable + { + NHibernate.FetchMode FetchMode { get; set; } + bool IsLazy { get; set; } + } + + // Generated from `NHibernate.Mapping.IFilterable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFilterable + { + void AddFilter(string name, string condition); + System.Collections.Generic.IDictionary FilterMap { get; } + } + + // Generated from `NHibernate.Mapping.IKeyValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IKeyValue : NHibernate.Mapping.IValue + { + void CreateForeignKeyOfEntity(string entityName); + NHibernate.Id.IIdentifierGenerator CreateIdentifierGenerator(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema, NHibernate.Mapping.RootClass rootClass); + bool IsCascadeDeleteEnabled { get; } + bool IsIdentityColumn(NHibernate.Dialect.Dialect dialect); + bool IsUpdateable { get; } + string NullValue { get; } + } + + // Generated from `NHibernate.Mapping.IMetaAttributable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMetaAttributable + { + NHibernate.Mapping.MetaAttribute GetMetaAttribute(string attributeName); + System.Collections.Generic.IDictionary MetaAttributes { get; set; } + } + + // Generated from `NHibernate.Mapping.IPersistentClassVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistentClassVisitor + { + object Accept(NHibernate.Mapping.PersistentClass clazz); + } + + // Generated from `NHibernate.Mapping.IPersistentClassVisitor<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPersistentClassVisitor where T : NHibernate.Mapping.PersistentClass + { + object Accept(T clazz); + } + + // Generated from `NHibernate.Mapping.IRelationalModel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IRelationalModel + { + string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema); + string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema); + } + + // Generated from `NHibernate.Mapping.ISelectable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISelectable + { + string GetAlias(NHibernate.Dialect.Dialect dialect, NHibernate.Mapping.Table table); + string GetAlias(NHibernate.Dialect.Dialect dialect); + string GetTemplate(NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry); + string GetText(NHibernate.Dialect.Dialect dialect); + bool IsFormula { get; } + string Text { get; } + } + + // Generated from `NHibernate.Mapping.ISqlCustomizable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlCustomizable + { + void SetCustomSQLDelete(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle); + void SetCustomSQLInsert(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle); + void SetCustomSQLUpdate(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle); + } + + // Generated from `NHibernate.Mapping.ITableOwner` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITableOwner + { + NHibernate.Mapping.Table Table { set; } + } + + // Generated from `NHibernate.Mapping.IValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IValue + { + object Accept(NHibernate.Mapping.IValueVisitor visitor); + bool[] ColumnInsertability { get; } + System.Collections.Generic.IEnumerable ColumnIterator { get; } + int ColumnSpan { get; } + bool[] ColumnUpdateability { get; } + void CreateForeignKey(); + NHibernate.FetchMode FetchMode { get; } + bool HasFormula { get; } + bool IsAlternateUniqueKey { get; } + bool IsNullable { get; } + bool IsSimpleValue { get; } + bool IsValid(NHibernate.Engine.IMapping mapping); + void SetTypeUsingReflection(string className, string propertyName, string accesorName); + NHibernate.Mapping.Table Table { get; } + NHibernate.Type.IType Type { get; } + } + + // Generated from `NHibernate.Mapping.IValueVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IValueVisitor + { + object Accept(NHibernate.Mapping.IValue visited); + } + + // Generated from `NHibernate.Mapping.IValueVisitor<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IValueVisitor : NHibernate.Mapping.IValueVisitor where T : NHibernate.Mapping.IValue + { + object Accept(T visited); + } + + // Generated from `NHibernate.Mapping.IdentifierBag` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierBag : NHibernate.Mapping.IdentifierCollection + { + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + public IdentifierBag(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.IdentifierCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class IdentifierCollection : NHibernate.Mapping.Collection + { + public override void CreatePrimaryKey() => throw null; + public const string DefaultIdentifierColumnName = default; + public NHibernate.Mapping.IKeyValue Identifier { get => throw null; set => throw null; } + protected IdentifierCollection(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override bool IsIdentified { get => throw null; } + public override void Validate(NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.Index` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Index : NHibernate.Mapping.IRelationalModel + { + public void AddColumn(NHibernate.Mapping.Column column) => throw null; + public void AddColumns(System.Collections.Generic.IEnumerable extraColumns) => throw null; + public static string BuildSqlCreateIndexString(NHibernate.Dialect.Dialect dialect, string name, NHibernate.Mapping.Table table, System.Collections.Generic.IEnumerable columns, bool unique, string defaultCatalog, string defaultSchema) => throw null; + public static string BuildSqlDropIndexString(NHibernate.Dialect.Dialect dialect, NHibernate.Mapping.Table table, string name, string defaultCatalog, string defaultSchema) => throw null; + public System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public bool ContainsColumn(NHibernate.Mapping.Column column) => throw null; + public Index() => throw null; + public bool IsInherited { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema) => throw null; + public string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public NHibernate.Mapping.Table Table { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Mapping.IndexBackref` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexBackref : NHibernate.Mapping.Property + { + public override bool BackRef { get => throw null; } + public string CollectionRole { get => throw null; set => throw null; } + public string EntityName { get => throw null; set => throw null; } + public IndexBackref() => throw null; + public override bool IsBasicPropertyAccessor { get => throw null; } + protected override NHibernate.Properties.IPropertyAccessor PropertyAccessor { get => throw null; } + } + + // Generated from `NHibernate.Mapping.IndexedCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class IndexedCollection : NHibernate.Mapping.Collection + { + public override void CreatePrimaryKey() => throw null; + public const string DefaultIndexColumnName = default; + public NHibernate.Mapping.SimpleValue Index { get => throw null; set => throw null; } + protected IndexedCollection(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override bool IsIndexed { get => throw null; } + public virtual bool IsList { get => throw null; } + public override void Validate(NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.Join` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Join : NHibernate.Mapping.ISqlCustomizable + { + public void AddProperty(NHibernate.Mapping.Property prop) => throw null; + public bool ContainsProperty(NHibernate.Mapping.Property prop) => throw null; + public void CreateForeignKey() => throw null; + public void CreatePrimaryKey(NHibernate.Dialect.Dialect dialect) => throw null; + public void CreatePrimaryKey() => throw null; + public NHibernate.SqlCommand.SqlString CustomSQLDelete { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLDeleteCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLInsert { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLInsertCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLUpdate { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLUpdateCheckStyle { get => throw null; } + public bool IsCustomDeleteCallable { get => throw null; } + public bool IsCustomInsertCallable { get => throw null; } + public bool IsCustomUpdateCallable { get => throw null; } + public virtual bool IsInverse { get => throw null; set => throw null; } + public bool IsLazy { get => throw null; } + public virtual bool IsOptional { get => throw null; set => throw null; } + public virtual bool IsSequentialSelect { get => throw null; set => throw null; } + public Join() => throw null; + public virtual NHibernate.Mapping.IKeyValue Key { get => throw null; set => throw null; } + public virtual NHibernate.Mapping.PersistentClass PersistentClass { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable PropertyIterator { get => throw null; } + public int PropertySpan { get => throw null; } + public NHibernate.Mapping.Property RefIdProperty { get => throw null; set => throw null; } + public void SetCustomSQLDelete(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLInsert(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLUpdate(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public virtual NHibernate.Mapping.Table Table { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.JoinedSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclass : NHibernate.Mapping.Subclass, NHibernate.Mapping.ITableOwner + { + public JoinedSubclass(NHibernate.Mapping.PersistentClass superclass) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override NHibernate.Mapping.IKeyValue Key { get => throw null; set => throw null; } + public override System.Collections.Generic.IEnumerable ReferenceablePropertyIterator { get => throw null; } + public override NHibernate.Mapping.Table Table { get => throw null; } + NHibernate.Mapping.Table NHibernate.Mapping.ITableOwner.Table { set => throw null; } + public override void Validate(NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.List` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class List : NHibernate.Mapping.IndexedCollection + { + public int BaseIndex { get => throw null; set => throw null; } + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + public override bool IsList { get => throw null; } + public List(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.ManyToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToOne : NHibernate.Mapping.ToOne + { + public override void CreateForeignKey() => throw null; + public void CreatePropertyRefConstraints(System.Collections.Generic.IDictionary persistentClasses) => throw null; + public bool IsIgnoreNotFound { get => throw null; set => throw null; } + public bool IsLogicalOneToOne { get => throw null; set => throw null; } + public ManyToOne(NHibernate.Mapping.Table table) : base(default(NHibernate.Mapping.Table)) => throw null; + public string PropertyName { get => throw null; set => throw null; } + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.Map` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Map : NHibernate.Mapping.IndexedCollection + { + public override NHibernate.Type.CollectionType CollectionType { get => throw null; } + public override void CreateAllKeys() => throw null; + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + public override bool IsMap { get => throw null; } + public Map(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.MetaAttribute` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MetaAttribute + { + public void AddValue(string value) => throw null; + public void AddValues(System.Collections.Generic.IEnumerable range) => throw null; + public bool IsMultiValued { get => throw null; } + public MetaAttribute(string name) => throw null; + public string Name { get => throw null; } + public override string ToString() => throw null; + public string Value { get => throw null; } + public System.Collections.Generic.IList Values { get => throw null; } + } + + // Generated from `NHibernate.Mapping.OneToMany` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToMany : NHibernate.Mapping.IValue + { + public object Accept(NHibernate.Mapping.IValueVisitor visitor) => throw null; + public NHibernate.Mapping.PersistentClass AssociatedClass { get => throw null; set => throw null; } + public bool[] ColumnInsertability { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public bool[] ColumnUpdateability { get => throw null; } + public void CreateForeignKey() => throw null; + public NHibernate.FetchMode FetchMode { get => throw null; } + public NHibernate.Mapping.Formula Formula { get => throw null; } + public bool HasFormula { get => throw null; } + public bool IsAlternateUniqueKey { get => throw null; } + public bool IsIgnoreNotFound { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; } + public bool IsSimpleValue { get => throw null; } + public bool IsUnique { get => throw null; } + public bool IsValid(NHibernate.Engine.IMapping mapping) => throw null; + public OneToMany(NHibernate.Mapping.PersistentClass owner) => throw null; + public string ReferencedEntityName { get => throw null; set => throw null; } + public NHibernate.Mapping.Table ReferencingTable { get => throw null; } + public void SetTypeUsingReflection(string className, string propertyName, string accesorName) => throw null; + public NHibernate.Mapping.Table Table { get => throw null; } + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.OneToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToOne : NHibernate.Mapping.ToOne + { + public override System.Collections.Generic.IEnumerable ConstraintColumns { get => throw null; } + public override void CreateForeignKey() => throw null; + public string EntityName { get => throw null; set => throw null; } + public NHibernate.Type.ForeignKeyDirection ForeignKeyType { get => throw null; set => throw null; } + public NHibernate.Mapping.IKeyValue Identifier { get => throw null; set => throw null; } + public bool IsConstrained { get => throw null; set => throw null; } + public override bool IsNullable { get => throw null; } + public OneToOne(NHibernate.Mapping.Table table, NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.Table)) => throw null; + public string PropertyName { get => throw null; set => throw null; } + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Mapping.PersistentClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class PersistentClass : NHibernate.Mapping.ISqlCustomizable, NHibernate.Mapping.IMetaAttributable, NHibernate.Mapping.IFilterable + { + public abstract object Accept(NHibernate.Mapping.IPersistentClassVisitor mv); + public void AddFilter(string name, string condition) => throw null; + public virtual void AddJoin(NHibernate.Mapping.Join join) => throw null; + public virtual void AddProperty(NHibernate.Mapping.Property p) => throw null; + public virtual void AddSubclass(NHibernate.Mapping.Subclass subclass) => throw null; + public virtual void AddSubclassJoin(NHibernate.Mapping.Join join) => throw null; + public virtual void AddSubclassProperty(NHibernate.Mapping.Property p) => throw null; + public virtual void AddSubclassTable(NHibernate.Mapping.Table table) => throw null; + public void AddSynchronizedTable(string table) => throw null; + public void AddTuplizer(NHibernate.EntityMode entityMode, string implClass) => throw null; + public int? BatchSize { get => throw null; set => throw null; } + public abstract string CacheConcurrencyStrategy { get; set; } + protected internal void CheckColumnDuplication(System.Collections.Generic.ISet distinctColumns, System.Collections.Generic.IEnumerable columns) => throw null; + protected internal virtual void CheckColumnDuplication() => throw null; + protected internal void CheckPropertyColumnDuplication(System.Collections.Generic.ISet distinctColumns, System.Collections.Generic.IEnumerable properties) => throw null; + public string ClassName { get => throw null; set => throw null; } + public virtual void CreatePrimaryKey(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual void CreatePrimaryKey() => throw null; + public NHibernate.SqlCommand.SqlString CustomSQLDelete { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLDeleteCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLInsert { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLInsertCheckStyle { get => throw null; } + public NHibernate.SqlCommand.SqlString CustomSQLUpdate { get => throw null; } + public NHibernate.Engine.ExecuteUpdateResultCheckStyle CustomSQLUpdateCheckStyle { get => throw null; } + public virtual System.Collections.Generic.IEnumerable DirectSubclasses { get => throw null; } + public abstract NHibernate.Mapping.IValue Discriminator { get; set; } + protected internal virtual System.Collections.Generic.IEnumerable DiscriminatorColumnIterator { get => throw null; } + public virtual string DiscriminatorValue { get => throw null; set => throw null; } + public virtual bool DynamicInsert { get => throw null; set => throw null; } + public virtual bool DynamicUpdate { get => throw null; set => throw null; } + public virtual string EntityName { get => throw null; set => throw null; } + public abstract System.Type EntityPersisterClass { get; set; } + public virtual System.Collections.Generic.IDictionary FilterMap { get => throw null; } + public virtual int GetJoinNumber(NHibernate.Mapping.Property prop) => throw null; + public NHibernate.Mapping.MetaAttribute GetMetaAttribute(string attributeName) => throw null; + public NHibernate.Mapping.Property GetProperty(string propertyName) => throw null; + public NHibernate.Mapping.Property GetRecursiveProperty(string propertyPath) => throw null; + public NHibernate.Mapping.Property GetReferencedProperty(string propertyPath) => throw null; + public virtual string GetTuplizerImplClassName(NHibernate.EntityMode mode) => throw null; + public abstract bool HasEmbeddedIdentifier { get; set; } + public bool HasIdentifierMapper { get => throw null; } + public abstract bool HasIdentifierProperty { get; } + public bool HasNaturalId() => throw null; + public bool HasPocoRepresentation { get => throw null; } + public virtual bool HasSubclasses { get => throw null; } + public virtual bool HasSubselectLoadableCollections { get => throw null; set => throw null; } + public abstract NHibernate.Mapping.IKeyValue Identifier { get; set; } + public virtual NHibernate.Mapping.Component IdentifierMapper { get => throw null; set => throw null; } + public abstract NHibernate.Mapping.Property IdentifierProperty { get; set; } + public virtual NHibernate.Mapping.Table IdentityTable { get => throw null; } + public bool? IsAbstract { get => throw null; set => throw null; } + public virtual bool IsClassOrSuperclassJoin(NHibernate.Mapping.Join join) => throw null; + public virtual bool IsClassOrSuperclassTable(NHibernate.Mapping.Table closureTable) => throw null; + public bool IsCustomDeleteCallable { get => throw null; } + public bool IsCustomInsertCallable { get => throw null; } + public bool IsCustomUpdateCallable { get => throw null; } + public abstract bool IsDiscriminatorInsertable { get; set; } + public bool IsDiscriminatorValueNotNull { get => throw null; } + public bool IsDiscriminatorValueNull { get => throw null; } + public abstract bool IsExplicitPolymorphism { get; set; } + public virtual bool IsForceDiscriminator { get => throw null; set => throw null; } + public abstract bool IsInherited { get; } + public abstract bool IsJoinedSubclass { get; } + public bool IsLazy { get => throw null; set => throw null; } + public abstract bool IsLazyPropertiesCacheable { get; } + public abstract bool IsMutable { get; set; } + public abstract bool IsPolymorphic { get; set; } + public abstract bool IsVersioned { get; } + public virtual System.Collections.Generic.IEnumerable JoinClosureIterator { get => throw null; } + public virtual int JoinClosureSpan { get => throw null; } + public virtual System.Collections.Generic.IEnumerable JoinIterator { get => throw null; } + public abstract NHibernate.Mapping.IKeyValue Key { get; set; } + public abstract System.Collections.Generic.IEnumerable KeyClosureIterator { get; } + public string LoaderName { get => throw null; set => throw null; } + public virtual System.Type MappedClass { get => throw null; } + public System.Collections.Generic.IDictionary MetaAttributes { get => throw null; set => throw null; } + protected internal virtual System.Collections.Generic.IEnumerable NonDuplicatedPropertyIterator { get => throw null; } + public const string NotNullDiscriminatorMapping = default; + public const string NullDiscriminatorMapping = default; + public virtual NHibernate.Engine.Versioning.OptimisticLock OptimisticLockMode { get => throw null; set => throw null; } + protected PersistentClass() => throw null; + public void PrepareTemporaryTables(NHibernate.Engine.IMapping mapping, NHibernate.Dialect.Dialect dialect) => throw null; + public abstract System.Collections.Generic.IEnumerable PropertyClosureIterator { get; } + public virtual int PropertyClosureSpan { get => throw null; } + public virtual System.Collections.Generic.IEnumerable PropertyIterator { get => throw null; } + public virtual System.Type ProxyInterface { get => throw null; } + public string ProxyInterfaceName { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IEnumerable ReferenceablePropertyIterator { get => throw null; } + public abstract NHibernate.Mapping.RootClass RootClazz { get; } + public abstract NHibernate.Mapping.Table RootTable { get; } + public bool SelectBeforeUpdate { get => throw null; set => throw null; } + public void SetCustomSQLDelete(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLInsert(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public void SetCustomSQLUpdate(string sql, bool callable, NHibernate.Engine.ExecuteUpdateResultCheckStyle checkStyle) => throw null; + public virtual System.Collections.Generic.IEnumerable SubclassClosureIterator { get => throw null; } + public abstract int SubclassId { get; } + public virtual System.Collections.Generic.IEnumerable SubclassIterator { get => throw null; } + public virtual System.Collections.Generic.IEnumerable SubclassJoinClosureIterator { get => throw null; } + public virtual System.Collections.Generic.IEnumerable SubclassPropertyClosureIterator { get => throw null; } + public virtual int SubclassSpan { get => throw null; } + public virtual System.Collections.Generic.IEnumerable SubclassTableClosureIterator { get => throw null; } + public abstract NHibernate.Mapping.PersistentClass Superclass { get; set; } + public virtual System.Collections.Generic.ISet SynchronizedTables { get => throw null; } + public abstract NHibernate.Mapping.Table Table { get; } + public abstract System.Collections.Generic.IEnumerable TableClosureIterator { get; } + public string TemporaryIdTableDDL { get => throw null; } + public string TemporaryIdTableName { get => throw null; } + public override string ToString() => throw null; + public virtual System.Collections.Generic.IDictionary TuplizerMap { get => throw null; } + public virtual System.Collections.Generic.IEnumerable UnjoinedPropertyIterator { get => throw null; } + public virtual void Validate(NHibernate.Engine.IMapping mapping) => throw null; + public abstract NHibernate.Mapping.Property Version { get; set; } + public abstract string Where { get; set; } + } + + // Generated from `NHibernate.Mapping.PrimaryKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PrimaryKey : NHibernate.Mapping.Constraint + { + public PrimaryKey() => throw null; + public string SqlConstraintString(NHibernate.Dialect.Dialect d, string defaultSchema) => throw null; + public override string SqlConstraintString(NHibernate.Dialect.Dialect d, string constraintName, string defaultCatalog, string defaultSchema) => throw null; + public override string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + } + + // Generated from `NHibernate.Mapping.PrimitiveArray` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PrimitiveArray : NHibernate.Mapping.Array + { + public override bool IsPrimitiveArray { get => throw null; } + public PrimitiveArray(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.Property` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Property : NHibernate.Mapping.IMetaAttributable + { + public virtual bool BackRef { get => throw null; } + public string Cascade { get => throw null; set => throw null; } + public NHibernate.Engine.CascadeStyle CascadeStyle { get => throw null; } + public System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public NHibernate.Mapping.PropertyGeneration Generation { get => throw null; set => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type clazz) => throw null; + public NHibernate.Mapping.MetaAttribute GetMetaAttribute(string attributeName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type clazz) => throw null; + public virtual bool IsBasicPropertyAccessor { get => throw null; } + public bool IsComposite { get => throw null; } + public bool IsEntityRelation { get => throw null; } + public bool IsInsertable { get => throw null; set => throw null; } + public bool IsLazy { get => throw null; set => throw null; } + public bool IsNaturalIdentifier { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; } + public bool IsOptimisticLocked { get => throw null; set => throw null; } + public bool IsOptional { get => throw null; set => throw null; } + public bool IsSelectable { get => throw null; set => throw null; } + public bool IsUpdateable { get => throw null; set => throw null; } + public bool IsValid(NHibernate.Engine.IMapping mapping) => throw null; + public string LazyGroup { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary MetaAttributes { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public string NullValue { get => throw null; } + public NHibernate.Mapping.PersistentClass PersistentClass { get => throw null; set => throw null; } + public Property(NHibernate.Mapping.IValue propertyValue) => throw null; + public Property() => throw null; + protected virtual NHibernate.Properties.IPropertyAccessor PropertyAccessor { get => throw null; } + public string PropertyAccessorName { get => throw null; set => throw null; } + public NHibernate.Type.IType Type { get => throw null; } + public bool UnwrapProxy { get => throw null; set => throw null; } + public NHibernate.Mapping.IValue Value { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.PropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum PropertyGeneration + { + Always, + Insert, + Never, + } + + // Generated from `NHibernate.Mapping.ReferenceDependantValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReferenceDependantValue : NHibernate.Mapping.DependantValue + { + public override void CreateForeignKeyOfEntity(string entityName) => throw null; + public System.Collections.Generic.IEnumerable ReferenceColumns { get => throw null; } + public ReferenceDependantValue(NHibernate.Mapping.Table table, NHibernate.Mapping.SimpleValue prototype) : base(default(NHibernate.Mapping.Table), default(NHibernate.Mapping.IKeyValue)) => throw null; + } + + // Generated from `NHibernate.Mapping.RootClass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RootClass : NHibernate.Mapping.PersistentClass, NHibernate.Mapping.ITableOwner + { + public override object Accept(NHibernate.Mapping.IPersistentClassVisitor mv) => throw null; + public override void AddSubclass(NHibernate.Mapping.Subclass subclass) => throw null; + public override string CacheConcurrencyStrategy { get => throw null; set => throw null; } + public string CacheRegionName { get => throw null; set => throw null; } + public const string DefaultDiscriminatorColumnName = default; + public const string DefaultIdentifierColumnName = default; + public override NHibernate.Mapping.IValue Discriminator { get => throw null; set => throw null; } + public override System.Type EntityPersisterClass { get => throw null; set => throw null; } + public override bool HasEmbeddedIdentifier { get => throw null; set => throw null; } + public override bool HasIdentifierProperty { get => throw null; } + public override NHibernate.Mapping.IKeyValue Identifier { get => throw null; set => throw null; } + public override NHibernate.Mapping.Property IdentifierProperty { get => throw null; set => throw null; } + public virtual System.Collections.Generic.ISet IdentityTables { get => throw null; } + public override bool IsDiscriminatorInsertable { get => throw null; set => throw null; } + public override bool IsExplicitPolymorphism { get => throw null; set => throw null; } + public override bool IsForceDiscriminator { get => throw null; set => throw null; } + public override bool IsInherited { get => throw null; } + public override bool IsJoinedSubclass { get => throw null; } + public override bool IsLazyPropertiesCacheable { get => throw null; } + public override bool IsMutable { get => throw null; set => throw null; } + public override bool IsPolymorphic { get => throw null; set => throw null; } + public override bool IsVersioned { get => throw null; } + public override NHibernate.Mapping.IKeyValue Key { get => throw null; set => throw null; } + public override System.Collections.Generic.IEnumerable KeyClosureIterator { get => throw null; } + public override System.Collections.Generic.IEnumerable PropertyClosureIterator { get => throw null; } + public RootClass() => throw null; + public override NHibernate.Mapping.RootClass RootClazz { get => throw null; } + public override NHibernate.Mapping.Table RootTable { get => throw null; } + public void SetLazyPropertiesCacheable(bool isLazyPropertiesCacheable) => throw null; + public override int SubclassId { get => throw null; } + public override NHibernate.Mapping.PersistentClass Superclass { get => throw null; set => throw null; } + public override NHibernate.Mapping.Table Table { get => throw null; } + NHibernate.Mapping.Table NHibernate.Mapping.ITableOwner.Table { set => throw null; } + public override System.Collections.Generic.IEnumerable TableClosureIterator { get => throw null; } + public override void Validate(NHibernate.Engine.IMapping mapping) => throw null; + public override NHibernate.Mapping.Property Version { get => throw null; set => throw null; } + public override string Where { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.SchemaAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + [System.Flags] + public enum SchemaAction + { + All, + Drop, + Export, + None, + Update, + Validate, + } + + // Generated from `NHibernate.Mapping.Set` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Set : NHibernate.Mapping.Collection + { + public override void CreatePrimaryKey() => throw null; + public override NHibernate.Type.CollectionType DefaultCollectionType { get => throw null; } + public override bool IsSet { get => throw null; } + public Set(NHibernate.Mapping.PersistentClass owner) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.SimpleAuxiliaryDatabaseObject` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleAuxiliaryDatabaseObject : NHibernate.Mapping.AbstractAuxiliaryDatabaseObject + { + public SimpleAuxiliaryDatabaseObject(string sqlCreateString, string sqlDropString, System.Collections.Generic.HashSet dialectScopes) => throw null; + public SimpleAuxiliaryDatabaseObject(string sqlCreateString, string sqlDropString) => throw null; + public override string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema) => throw null; + public override string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + } + + // Generated from `NHibernate.Mapping.SimpleValue` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleValue : NHibernate.Mapping.IValue, NHibernate.Mapping.IKeyValue + { + public virtual object Accept(NHibernate.Mapping.IValueVisitor visitor) => throw null; + public virtual void AddColumn(NHibernate.Mapping.Column column) => throw null; + public virtual void AddFormula(NHibernate.Mapping.Formula formula) => throw null; + public virtual bool[] ColumnInsertability { get => throw null; } + public virtual System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public virtual int ColumnSpan { get => throw null; } + public virtual bool[] ColumnUpdateability { get => throw null; } + public virtual System.Collections.Generic.IEnumerable ConstraintColumns { get => throw null; } + public virtual void CreateForeignKey() => throw null; + public virtual void CreateForeignKeyOfEntity(string entityName) => throw null; + public NHibernate.Id.IIdentifierGenerator CreateIdentifierGenerator(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema, NHibernate.Mapping.RootClass rootClass) => throw null; + public virtual NHibernate.FetchMode FetchMode { get => throw null; set => throw null; } + public string ForeignKeyName { get => throw null; set => throw null; } + public bool HasFormula { get => throw null; } + public System.Collections.Generic.IDictionary IdentifierGeneratorProperties { get => throw null; set => throw null; } + public string IdentifierGeneratorStrategy { get => throw null; set => throw null; } + public bool IsAlternateUniqueKey { get => throw null; set => throw null; } + public bool IsCascadeDeleteEnabled { get => throw null; set => throw null; } + public virtual bool IsComposite { get => throw null; } + public bool IsIdentityColumn(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual bool IsNullable { get => throw null; } + public bool IsSimpleValue { get => throw null; } + public virtual bool IsTypeSpecified { get => throw null; } + public virtual bool IsUpdateable { get => throw null; } + public virtual bool IsValid(NHibernate.Engine.IMapping mapping) => throw null; + public string NullValue { get => throw null; set => throw null; } + public virtual void SetTypeUsingReflection(string className, string propertyName, string accesorName) => throw null; + public SimpleValue(NHibernate.Mapping.Table table) => throw null; + public SimpleValue() => throw null; + public NHibernate.Mapping.Table Table { get => throw null; set => throw null; } + public override string ToString() => throw null; + public virtual NHibernate.Type.IType Type { get => throw null; } + public string TypeName { get => throw null; set => throw null; } + public System.Collections.Generic.IDictionary TypeParameters { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.SingleTableSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SingleTableSubclass : NHibernate.Mapping.Subclass + { + protected internal override System.Collections.Generic.IEnumerable DiscriminatorColumnIterator { get => throw null; } + protected internal override System.Collections.Generic.IEnumerable NonDuplicatedPropertyIterator { get => throw null; } + public SingleTableSubclass(NHibernate.Mapping.PersistentClass superclass) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + public override void Validate(NHibernate.Engine.IMapping mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.Subclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Subclass : NHibernate.Mapping.PersistentClass + { + public override object Accept(NHibernate.Mapping.IPersistentClassVisitor mv) => throw null; + public override void AddJoin(NHibernate.Mapping.Join join) => throw null; + public override void AddProperty(NHibernate.Mapping.Property p) => throw null; + public override void AddSubclassJoin(NHibernate.Mapping.Join join) => throw null; + public override void AddSubclassProperty(NHibernate.Mapping.Property p) => throw null; + public override void AddSubclassTable(NHibernate.Mapping.Table table) => throw null; + public override string CacheConcurrencyStrategy { get => throw null; set => throw null; } + public void CreateForeignKey() => throw null; + public override NHibernate.Mapping.IValue Discriminator { get => throw null; set => throw null; } + public override System.Type EntityPersisterClass { get => throw null; set => throw null; } + public override System.Collections.Generic.IDictionary FilterMap { get => throw null; } + public override string GetTuplizerImplClassName(NHibernate.EntityMode mode) => throw null; + public override bool HasEmbeddedIdentifier { get => throw null; set => throw null; } + public override bool HasIdentifierProperty { get => throw null; } + public override bool HasSubselectLoadableCollections { get => throw null; set => throw null; } + public override NHibernate.Mapping.IKeyValue Identifier { get => throw null; set => throw null; } + public override NHibernate.Mapping.Component IdentifierMapper { get => throw null; } + public override NHibernate.Mapping.Property IdentifierProperty { get => throw null; set => throw null; } + public override bool IsClassOrSuperclassJoin(NHibernate.Mapping.Join join) => throw null; + public override bool IsClassOrSuperclassTable(NHibernate.Mapping.Table closureTable) => throw null; + public override bool IsDiscriminatorInsertable { get => throw null; set => throw null; } + public override bool IsExplicitPolymorphism { get => throw null; set => throw null; } + public override bool IsForceDiscriminator { get => throw null; } + public override bool IsInherited { get => throw null; } + public override bool IsJoinedSubclass { get => throw null; } + public override bool IsLazyPropertiesCacheable { get => throw null; } + public override bool IsMutable { get => throw null; set => throw null; } + public override bool IsPolymorphic { get => throw null; set => throw null; } + public override bool IsVersioned { get => throw null; } + public override System.Collections.Generic.IEnumerable JoinClosureIterator { get => throw null; } + public override int JoinClosureSpan { get => throw null; } + public override NHibernate.Mapping.IKeyValue Key { get => throw null; set => throw null; } + public override System.Collections.Generic.IEnumerable KeyClosureIterator { get => throw null; } + public override NHibernate.Engine.Versioning.OptimisticLock OptimisticLockMode { get => throw null; } + public override System.Collections.Generic.IEnumerable PropertyClosureIterator { get => throw null; } + public override int PropertyClosureSpan { get => throw null; } + public override NHibernate.Mapping.RootClass RootClazz { get => throw null; } + public override NHibernate.Mapping.Table RootTable { get => throw null; } + public Subclass(NHibernate.Mapping.PersistentClass superclass) => throw null; + public override int SubclassId { get => throw null; } + public override NHibernate.Mapping.PersistentClass Superclass { get => throw null; set => throw null; } + public override System.Collections.Generic.ISet SynchronizedTables { get => throw null; } + public override NHibernate.Mapping.Table Table { get => throw null; } + public override System.Collections.Generic.IEnumerable TableClosureIterator { get => throw null; } + public override System.Collections.Generic.IDictionary TuplizerMap { get => throw null; } + public override NHibernate.Mapping.Property Version { get => throw null; set => throw null; } + public override string Where { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.Table` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Table : NHibernate.Mapping.IRelationalModel + { + public void AddCheckConstraint(string constraint) => throw null; + public void AddColumn(NHibernate.Mapping.Column column) => throw null; + public NHibernate.Mapping.Index AddIndex(NHibernate.Mapping.Index index) => throw null; + public NHibernate.Mapping.UniqueKey AddUniqueKey(NHibernate.Mapping.UniqueKey uniqueKey) => throw null; + public string Catalog { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable CheckConstraintsIterator { get => throw null; } + public virtual System.Collections.Generic.IEnumerable ColumnIterator { get => throw null; } + public int ColumnSpan { get => throw null; } + public string Comment { get => throw null; set => throw null; } + public virtual bool ContainsColumn(NHibernate.Mapping.Column column) => throw null; + public virtual NHibernate.Mapping.ForeignKey CreateForeignKey(string keyName, System.Collections.Generic.IEnumerable keyColumns, string referencedEntityName, System.Collections.Generic.IEnumerable referencedColumns) => throw null; + public virtual NHibernate.Mapping.ForeignKey CreateForeignKey(string keyName, System.Collections.Generic.IEnumerable keyColumns, string referencedEntityName) => throw null; + public virtual void CreateForeignKeys() => throw null; + public virtual NHibernate.Mapping.UniqueKey CreateUniqueKey(System.Collections.Generic.IList keyColumns) => throw null; + public System.Collections.Generic.IEnumerable ForeignKeyIterator { get => throw null; } + public virtual NHibernate.Mapping.Column GetColumn(NHibernate.Mapping.Column column) => throw null; + public NHibernate.Mapping.Column GetColumn(int n) => throw null; + public NHibernate.Mapping.Index GetIndex(string indexName) => throw null; + public NHibernate.Mapping.Index GetOrCreateIndex(string indexName) => throw null; + public NHibernate.Mapping.UniqueKey GetOrCreateUniqueKey(string keyName) => throw null; + public virtual string GetQualifiedName(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public string GetQualifiedName(NHibernate.Dialect.Dialect dialect) => throw null; + public string GetQuotedCatalog(NHibernate.Dialect.Dialect dialect, string defaultQuotedCatalog) => throw null; + public string GetQuotedCatalog(NHibernate.Dialect.Dialect dialect) => throw null; + public string GetQuotedCatalog() => throw null; + public string GetQuotedName(NHibernate.Dialect.Dialect dialect) => throw null; + public string GetQuotedName() => throw null; + public string GetQuotedSchema(NHibernate.Dialect.Dialect dialect, string defaultQuotedSchema) => throw null; + public string GetQuotedSchema(NHibernate.Dialect.Dialect dialect) => throw null; + public string GetQuotedSchema() => throw null; + public string GetQuotedSchemaName(NHibernate.Dialect.Dialect dialect) => throw null; + public NHibernate.Mapping.UniqueKey GetUniqueKey(string keyName) => throw null; + public bool HasDenormalizedTables { get => throw null; } + public bool HasPrimaryKey { get => throw null; } + public NHibernate.Mapping.IKeyValue IdentifierValue { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IEnumerable IndexIterator { get => throw null; } + public bool IsAbstract { get => throw null; set => throw null; } + public bool IsAbstractUnionTable { get => throw null; } + public bool IsCatalogQuoted { get => throw null; } + public bool IsPhysicalTable { get => throw null; } + public bool IsQuoted { get => throw null; set => throw null; } + public bool IsSchemaQuoted { get => throw null; } + public bool IsSubselect { get => throw null; } + public string Name { get => throw null; set => throw null; } + public virtual NHibernate.Mapping.PrimaryKey PrimaryKey { get => throw null; set => throw null; } + public string RowId { get => throw null; set => throw null; } + public string Schema { get => throw null; set => throw null; } + public NHibernate.Mapping.SchemaAction SchemaActions { get => throw null; set => throw null; } + public void SetIdentifierValue(NHibernate.Mapping.SimpleValue identifierValue) => throw null; + public string[] SqlAlterStrings(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, NHibernate.Dialect.Schema.ITableMetadata tableInfo, string defaultCatalog, string defaultSchema) => throw null; + public virtual string[] SqlCommentStrings(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema) => throw null; + public string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public virtual string SqlTemporaryTableCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping) => throw null; + public string Subselect { get => throw null; set => throw null; } + public Table(string name) => throw null; + public Table() => throw null; + public override string ToString() => throw null; + public string UniqueColumnString(System.Collections.IEnumerable uniqueColumns) => throw null; + public string UniqueColumnString(System.Collections.IEnumerable iterator, string referencedEntityName) => throw null; + public int UniqueInteger { get => throw null; set => throw null; } + public virtual System.Collections.Generic.IEnumerable UniqueKeyIterator { get => throw null; } + public System.Collections.Generic.IEnumerable ValidateColumns(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping, NHibernate.Dialect.Schema.ITableMetadata tableInfo) => throw null; + } + + // Generated from `NHibernate.Mapping.ToOne` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ToOne : NHibernate.Mapping.SimpleValue, NHibernate.Mapping.IFetchable + { + public abstract override void CreateForeignKey(); + public override NHibernate.FetchMode FetchMode { get => throw null; set => throw null; } + public bool IsLazy { get => throw null; set => throw null; } + public override bool IsTypeSpecified { get => throw null; } + public override bool IsValid(NHibernate.Engine.IMapping mapping) => throw null; + public string ReferencedEntityName { get => throw null; set => throw null; } + public string ReferencedPropertyName { get => throw null; set => throw null; } + public override void SetTypeUsingReflection(string className, string propertyName, string accesorName) => throw null; + public ToOne(NHibernate.Mapping.Table table) => throw null; + public abstract override NHibernate.Type.IType Type { get; } + public bool UnwrapProxy { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.TypeDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeDef + { + public System.Collections.Generic.IDictionary Parameters { get => throw null; } + public string TypeClass { get => throw null; } + public TypeDef(string typeClass, System.Collections.Generic.IDictionary parameters) => throw null; + } + + // Generated from `NHibernate.Mapping.UnionSubclass` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclass : NHibernate.Mapping.Subclass, NHibernate.Mapping.ITableOwner + { + public override NHibernate.Mapping.Table IdentityTable { get => throw null; } + protected internal override System.Collections.Generic.IEnumerable NonDuplicatedPropertyIterator { get => throw null; } + public override NHibernate.Mapping.Table Table { get => throw null; } + NHibernate.Mapping.Table NHibernate.Mapping.ITableOwner.Table { set => throw null; } + public UnionSubclass(NHibernate.Mapping.PersistentClass superclass) : base(default(NHibernate.Mapping.PersistentClass)) => throw null; + } + + // Generated from `NHibernate.Mapping.UniqueKey` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UniqueKey : NHibernate.Mapping.Constraint + { + public override bool IsGenerated(NHibernate.Dialect.Dialect dialect) => throw null; + public string SqlConstraintString(NHibernate.Dialect.Dialect dialect) => throw null; + public override string SqlConstraintString(NHibernate.Dialect.Dialect dialect, string constraintName, string defaultCatalog, string defaultSchema) => throw null; + public override string SqlCreateString(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping p, string defaultCatalog, string defaultSchema) => throw null; + public override string SqlDropString(NHibernate.Dialect.Dialect dialect, string defaultCatalog, string defaultSchema) => throw null; + public UniqueKey() => throw null; + } + + namespace ByCode + { + // Generated from `NHibernate.Mapping.ByCode.AbstractExplicitlyDeclaredModel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractExplicitlyDeclaredModel : NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder + { + protected AbstractExplicitlyDeclaredModel() => throw null; + public void AddAsAny(System.Reflection.MemberInfo member) => throw null; + public void AddAsArray(System.Reflection.MemberInfo member) => throw null; + public void AddAsBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsComponent(System.Type type) => throw null; + public void AddAsDynamicComponent(System.Reflection.MemberInfo member, System.Type componentTemplate) => throw null; + public void AddAsIdBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsList(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToAnyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyItemRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyKeyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsMap(System.Reflection.MemberInfo member) => throw null; + public void AddAsNaturalId(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToManyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsPartOfComposedId(System.Reflection.MemberInfo member) => throw null; + public void AddAsPersistentMember(System.Reflection.MemberInfo member) => throw null; + public void AddAsPoid(System.Reflection.MemberInfo member) => throw null; + public void AddAsProperty(System.Reflection.MemberInfo member) => throw null; + public void AddAsPropertySplit(NHibernate.Mapping.ByCode.SplitDefinition definition) => throw null; + public void AddAsRootEntity(System.Type type) => throw null; + public void AddAsSet(System.Reflection.MemberInfo member) => throw null; + public void AddAsTablePerClassEntity(System.Type type) => throw null; + protected virtual void AddAsTablePerClassEntity(System.Type type, bool rootEntityMustExists) => throw null; + public void AddAsTablePerClassHierarchyEntity(System.Type type) => throw null; + protected virtual void AddAsTablePerClassHierarchyEntity(System.Type type, bool rootEntityMustExists) => throw null; + public void AddAsTablePerConcreteClassEntity(System.Type type) => throw null; + protected virtual void AddAsTablePerConcreteClassEntity(System.Type type, bool rootEntityMustExists) => throw null; + public void AddAsVersionProperty(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable Any { get => throw null; } + public System.Collections.Generic.IEnumerable Arrays { get => throw null; } + public System.Collections.Generic.IEnumerable Bags { get => throw null; } + public System.Collections.Generic.IEnumerable Components { get => throw null; } + public System.Collections.Generic.IEnumerable ComposedIds { get => throw null; } + public System.Collections.Generic.IEnumerable Dictionaries { get => throw null; } + public System.Collections.Generic.IEnumerable DynamicComponents { get => throw null; } + protected void EnlistTypeRegistration(System.Type type, System.Action registration) => throw null; + protected void ExecuteDelayedRootEntitiesRegistrations() => throw null; + protected void ExecuteDelayedTypeRegistration(System.Type type) => throw null; + public virtual System.Type GetDynamicComponentTemplate(System.Reflection.MemberInfo member) => throw null; + protected System.Collections.Generic.IEnumerable GetRootEntitiesOf(System.Type entityType) => throw null; + protected System.Type GetSingleRootEntityOrNull(System.Type entityType) => throw null; + public string GetSplitGroupFor(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable GetSplitGroupsFor(System.Type type) => throw null; + protected bool HasDelayedEntityRegistration(System.Type type) => throw null; + public System.Collections.Generic.IEnumerable IdBags { get => throw null; } + public abstract bool IsComponent(System.Type type); + protected bool IsMappedForTablePerClassEntities(System.Type type) => throw null; + protected bool IsMappedForTablePerClassHierarchyEntities(System.Type type) => throw null; + protected bool IsMappedForTablePerConcreteClassEntities(System.Type type) => throw null; + public abstract bool IsRootEntity(System.Type entityType); + public System.Collections.Generic.IEnumerable ItemManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable KeyManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable Lists { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToAnyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable NaturalIds { get => throw null; } + public System.Collections.Generic.IEnumerable OneToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable OneToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable PersistentMembers { get => throw null; } + public System.Collections.Generic.IEnumerable Poids { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public System.Collections.Generic.IEnumerable RootEntities { get => throw null; } + public System.Collections.Generic.IEnumerable Sets { get => throw null; } + public System.Collections.Generic.IEnumerable SplitDefinitions { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassHierarchyEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerConcreteClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable VersionProperties { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Accessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum Accessor + { + Field, + NoSetter, + None, + Property, + ReadOnly, + } + + // Generated from `NHibernate.Mapping.ByCode.AssignedGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AssignedGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public AssignedGeneratorDef() => throw null; + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.BasePlainPropertyContainerMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class BasePlainPropertyContainerMapperExtensions + { + public static void Component(this NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper mapper, System.Linq.Expressions.Expression>> property, TComponent dynamicComponentTemplate, System.Action> mapping) where TComponent : class => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.CacheInclude` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CacheInclude + { + public static NHibernate.Mapping.ByCode.CacheInclude All; + // Generated from `NHibernate.Mapping.ByCode.CacheInclude+AllCacheInclude` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AllCacheInclude : NHibernate.Mapping.ByCode.CacheInclude + { + public AllCacheInclude() => throw null; + } + + + protected CacheInclude() => throw null; + public static NHibernate.Mapping.ByCode.CacheInclude NonLazy; + // Generated from `NHibernate.Mapping.ByCode.CacheInclude+NonLazyCacheInclude` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NonLazyCacheInclude : NHibernate.Mapping.ByCode.CacheInclude + { + public NonLazyCacheInclude() => throw null; + } + + + } + + // Generated from `NHibernate.Mapping.ByCode.CacheUsage` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CacheUsage + { + protected CacheUsage() => throw null; + public static NHibernate.Mapping.ByCode.CacheUsage NonstrictReadWrite; + public static NHibernate.Mapping.ByCode.CacheUsage ReadOnly; + public static NHibernate.Mapping.ByCode.CacheUsage ReadWrite; + public static NHibernate.Mapping.ByCode.CacheUsage Transactional; + } + + // Generated from `NHibernate.Mapping.ByCode.Cascade` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + [System.Flags] + public enum Cascade + { + All, + DeleteOrphans, + Detach, + Merge, + None, + Persist, + ReAttach, + Refresh, + Remove, + } + + // Generated from `NHibernate.Mapping.ByCode.CascadeExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CascadeExtensions + { + public static NHibernate.Mapping.ByCode.Cascade Exclude(this NHibernate.Mapping.ByCode.Cascade source, NHibernate.Mapping.ByCode.Cascade value) => throw null; + public static bool Has(this NHibernate.Mapping.ByCode.Cascade source, NHibernate.Mapping.ByCode.Cascade value) => throw null; + public static NHibernate.Mapping.ByCode.Cascade Include(this NHibernate.Mapping.ByCode.Cascade source, NHibernate.Mapping.ByCode.Cascade value) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.CollectionFetchMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CollectionFetchMode + { + protected CollectionFetchMode() => throw null; + public static NHibernate.Mapping.ByCode.CollectionFetchMode Join; + public static NHibernate.Mapping.ByCode.CollectionFetchMode Select; + public static NHibernate.Mapping.ByCode.CollectionFetchMode Subselect; + } + + // Generated from `NHibernate.Mapping.ByCode.CollectionLazy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum CollectionLazy + { + Extra, + Lazy, + NoLazy, + } + + // Generated from `NHibernate.Mapping.ByCode.CollectionPropertiesMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CollectionPropertiesMapperExtensions + { + public static void Type(this NHibernate.Mapping.ByCode.ICollectionPropertiesMapper mapper, string collectionType) => throw null; + public static void Type(this NHibernate.Mapping.ByCode.ICollectionPropertiesMapper mapper, string collectionType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ColumnsAndFormulasMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ColumnsAndFormulasMapperExtensions + { + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IPropertyMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IMapKeyMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IManyToOneMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IManyToManyMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void ColumnsAndFormulas(this NHibernate.Mapping.ByCode.IElementMapper mapper, params System.Action[] columnOrFormulaMapper) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IPropertyMapper mapper, params string[] formulas) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IMapKeyMapper mapper, params string[] formulas) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper mapper, params string[] formulas) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IManyToOneMapper mapper, params string[] formulas) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IManyToManyMapper mapper, params string[] formulas) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IElementMapper mapper, params string[] formulas) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ComponentAttributesMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ComponentAttributesMapperExtensions + { + public static void LazyGroup(this NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper, string name) => throw null; + public static void LazyGroup(this NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper, string name) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ConventionModelMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConventionModelMapper : NHibernate.Mapping.ByCode.ModelMapper + { + protected virtual void AppendDefaultEvents() => throw null; + protected virtual void ComponentParentNoSetterToField(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAttributesMapper componentMapper) => throw null; + protected virtual void ComponentParentToFieldAccessor(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAttributesMapper componentMapper) => throw null; + public ConventionModelMapper() => throw null; + public void IsAny(System.Func match) => throw null; + public void IsArray(System.Func match) => throw null; + public void IsBag(System.Func match) => throw null; + public void IsComponent(System.Func match) => throw null; + public void IsDictionary(System.Func match) => throw null; + public void IsEntity(System.Func match) => throw null; + public void IsIdBag(System.Func match) => throw null; + public void IsList(System.Func match) => throw null; + public void IsManyToMany(System.Func match) => throw null; + public void IsManyToOne(System.Func match) => throw null; + public void IsMemberOfNaturalId(System.Func match) => throw null; + public void IsOneToMany(System.Func match) => throw null; + public void IsOneToOne(System.Func match) => throw null; + public void IsPersistentId(System.Func match) => throw null; + public void IsPersistentProperty(System.Func match) => throw null; + public void IsProperty(System.Func match) => throw null; + public void IsRootEntity(System.Func match) => throw null; + public void IsSet(System.Func match) => throw null; + public void IsTablePerClass(System.Func match) => throw null; + public void IsTablePerClassHierarchy(System.Func match) => throw null; + public void IsTablePerClassSplit(System.Func match) => throw null; + public void IsTablePerConcreteClass(System.Func match) => throw null; + public void IsVersion(System.Func match) => throw null; + protected bool MatchNoSetterProperty(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchPropertyToField(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchReadOnlyProperty(System.Reflection.MemberInfo subject) => throw null; + protected virtual void MemberNoSetterToField(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper propertyCustomizer) => throw null; + protected virtual void MemberReadOnlyAccessor(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper propertyCustomizer) => throw null; + protected virtual void MemberToFieldAccessor(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper propertyCustomizer) => throw null; + protected virtual void NoPoidGuid(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.IClassAttributesMapper classCustomizer) => throw null; + protected virtual void NoSetterPoidToField(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.IClassAttributesMapper classCustomizer) => throw null; + protected NHibernate.Mapping.ByCode.SimpleModelInspector SimpleModelInspector { get => throw null; } + public void SplitsFor(System.Func, System.Collections.Generic.IEnumerable> getPropertiesSplitsId) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.CounterGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CounterGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public CounterGeneratorDef() => throw null; + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.EnhancedSequenceGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnhancedSequenceGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public EnhancedSequenceGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.EnhancedTableGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnhancedTableGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public EnhancedTableGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.ExplicitlyDeclaredModel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExplicitlyDeclaredModel : NHibernate.Mapping.ByCode.AbstractExplicitlyDeclaredModel, NHibernate.Mapping.ByCode.IModelInspector + { + public ExplicitlyDeclaredModel() => throw null; + public virtual System.Collections.Generic.IEnumerable GetPropertiesSplits(System.Type type) => throw null; + public virtual bool IsAny(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsArray(System.Reflection.MemberInfo role) => throw null; + public virtual bool IsBag(System.Reflection.MemberInfo role) => throw null; + public override bool IsComponent(System.Type type) => throw null; + public virtual bool IsDictionary(System.Reflection.MemberInfo role) => throw null; + public virtual bool IsDynamicComponent(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsEntity(System.Type type) => throw null; + public virtual bool IsIdBag(System.Reflection.MemberInfo role) => throw null; + public virtual bool IsList(System.Reflection.MemberInfo role) => throw null; + public bool IsManyToAny(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsManyToManyItem(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsManyToManyKey(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsManyToOne(System.Reflection.MemberInfo member) => throw null; + public bool IsMemberOfComposedId(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsMemberOfNaturalId(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsOneToMany(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsOneToOne(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsPersistentId(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsPersistentProperty(System.Reflection.MemberInfo member) => throw null; + public virtual bool IsProperty(System.Reflection.MemberInfo member) => throw null; + public override bool IsRootEntity(System.Type type) => throw null; + public virtual bool IsSet(System.Reflection.MemberInfo role) => throw null; + public virtual bool IsTablePerClass(System.Type type) => throw null; + public virtual bool IsTablePerClassHierarchy(System.Type type) => throw null; + public virtual bool IsTablePerClassSplit(System.Type type, object splitGroupId, System.Reflection.MemberInfo member) => throw null; + public virtual bool IsTablePerConcreteClass(System.Type type) => throw null; + public virtual bool IsVersion(System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.FakeModelExplicitDeclarationsHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FakeModelExplicitDeclarationsHolder : NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder + { + public void AddAsAny(System.Reflection.MemberInfo member) => throw null; + public void AddAsArray(System.Reflection.MemberInfo member) => throw null; + public void AddAsBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsComponent(System.Type type) => throw null; + public void AddAsDynamicComponent(System.Reflection.MemberInfo member, System.Type componentTemplate) => throw null; + public void AddAsIdBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsList(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToAnyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyItemRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyKeyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsMap(System.Reflection.MemberInfo member) => throw null; + public void AddAsNaturalId(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToManyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsPartOfComposedId(System.Reflection.MemberInfo member) => throw null; + public void AddAsPersistentMember(System.Reflection.MemberInfo member) => throw null; + public void AddAsPoid(System.Reflection.MemberInfo member) => throw null; + public void AddAsProperty(System.Reflection.MemberInfo member) => throw null; + public void AddAsPropertySplit(NHibernate.Mapping.ByCode.SplitDefinition definition) => throw null; + public void AddAsRootEntity(System.Type type) => throw null; + public void AddAsSet(System.Reflection.MemberInfo member) => throw null; + public void AddAsTablePerClassEntity(System.Type type) => throw null; + public void AddAsTablePerClassHierarchyEntity(System.Type type) => throw null; + public void AddAsTablePerConcreteClassEntity(System.Type type) => throw null; + public void AddAsVersionProperty(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable Any { get => throw null; } + public System.Collections.Generic.IEnumerable Arrays { get => throw null; } + public System.Collections.Generic.IEnumerable Bags { get => throw null; } + public System.Collections.Generic.IEnumerable Components { get => throw null; } + public System.Collections.Generic.IEnumerable ComposedIds { get => throw null; } + public System.Collections.Generic.IEnumerable Dictionaries { get => throw null; } + public System.Collections.Generic.IEnumerable DynamicComponents { get => throw null; } + public FakeModelExplicitDeclarationsHolder() => throw null; + public System.Type GetDynamicComponentTemplate(System.Reflection.MemberInfo member) => throw null; + public string GetSplitGroupFor(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable GetSplitGroupsFor(System.Type type) => throw null; + public System.Collections.Generic.IEnumerable IdBags { get => throw null; } + public System.Collections.Generic.IEnumerable ItemManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable KeyManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable Lists { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToAnyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable NaturalIds { get => throw null; } + public System.Collections.Generic.IEnumerable OneToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable OneToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable PersistentMembers { get => throw null; } + public System.Collections.Generic.IEnumerable Poids { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public System.Collections.Generic.IEnumerable RootEntities { get => throw null; } + public System.Collections.Generic.IEnumerable Sets { get => throw null; } + public System.Collections.Generic.IEnumerable SplitDefinitions { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassHierarchyEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassHierarchyJoinEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerConcreteClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable VersionProperties { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.FetchKind` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class FetchKind + { + protected FetchKind() => throw null; + public static NHibernate.Mapping.ByCode.FetchKind Join; + public static NHibernate.Mapping.ByCode.FetchKind Select; + } + + // Generated from `NHibernate.Mapping.ByCode.ForClass<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ForClass + { + public static System.Reflection.FieldInfo Field(string fieldName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ForeignGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ForeignGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public ForeignGeneratorDef(System.Reflection.MemberInfo foreignProperty) => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Generators` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Generators + { + public static NHibernate.Mapping.ByCode.IGeneratorDef Assigned { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Counter { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef EnhancedSequence { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef EnhancedTable { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Foreign(System.Linq.Expressions.Expression> property) => throw null; + public static NHibernate.Mapping.ByCode.IGeneratorDef Foreign(System.Reflection.MemberInfo property) => throw null; + public static NHibernate.Mapping.ByCode.IGeneratorDef Guid { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef GuidComb { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef HighLow { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Identity { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Increment { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Native { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef NativeGuid { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Select { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Sequence { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef SequenceHiLo { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef SequenceIdentity { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef Table { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef TriggerIdentity { get => throw null; set => throw null; } + public static NHibernate.Mapping.ByCode.IGeneratorDef UUIDHex(string format, string separator) => throw null; + public static NHibernate.Mapping.ByCode.IGeneratorDef UUIDHex(string format) => throw null; + public static NHibernate.Mapping.ByCode.IGeneratorDef UUIDHex() => throw null; + public static NHibernate.Mapping.ByCode.IGeneratorDef UUIDString { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.GuidCombGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GuidCombGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public GuidCombGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.GuidGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GuidGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public GuidGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.HighLowGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class HighLowGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public HighLowGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.IAccessorPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAccessorPropertyMapper + { + void Access(System.Type accessorType); + void Access(NHibernate.Mapping.ByCode.Accessor accessor); + } + + // Generated from `NHibernate.Mapping.ByCode.IAnyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAnyMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle); + void Columns(System.Action idColumnMapping, System.Action classColumnMapping); + void IdType(); + void IdType(System.Type idType); + void IdType(NHibernate.Type.IType idType); + void Index(string indexName); + void Insert(bool consideredInInsertQuery); + void Lazy(bool isLazy); + void MetaType(); + void MetaType(System.Type metaType); + void MetaType(NHibernate.Type.IType metaType); + void MetaValue(object value, System.Type entityType); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IBagPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBagPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IBagPropertiesMapper<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBagPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBasePlainPropertyContainerMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper + { + void Any(System.Reflection.MemberInfo property, System.Type idTypeOfMetaType, System.Action mapping); + void Component(System.Reflection.MemberInfo property, System.Action mapping); + void Component(System.Reflection.MemberInfo property, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IBasePlainPropertyContainerMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper + { + void Any(string notVisiblePropertyOrFieldName, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class; + void Any(System.Linq.Expressions.Expression> property, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class; + void Component(string notVisiblePropertyOrFieldName, TComponent dynamicComponentTemplate, System.Action> mapping); + void Component(string notVisiblePropertyOrFieldName, System.Action> mapping); + void Component(string notVisiblePropertyOrFieldName); + void Component(System.Linq.Expressions.Expression> property, System.Action> mapping); + void Component(System.Linq.Expressions.Expression> property); + void Component(System.Linq.Expressions.Expression> property, TComponent dynamicComponentTemplate, System.Action> mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ICacheMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheMapper + { + void Include(NHibernate.Mapping.ByCode.CacheInclude cacheInclude); + void Region(string regionName); + void Usage(NHibernate.Mapping.ByCode.CacheUsage cacheUsage); + } + + // Generated from `NHibernate.Mapping.ByCode.IClassAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IClassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper + { + void Abstract(bool isAbstract); + void Cache(System.Action cacheMapping); + void Catalog(string catalogName); + void Check(string check); + void ComponentAsId(System.Reflection.MemberInfo idProperty, System.Action idMapper); + void ComposedId(System.Action idPropertiesMapping); + void Discriminator(System.Action discriminatorMapping); + void DiscriminatorValue(object value); + void Filter(string filterName, System.Action filterMapping); + void Id(System.Reflection.MemberInfo idProperty, System.Action idMapper); + void Id(System.Action idMapper); + void Mutable(bool isMutable); + void NaturalId(System.Action naturalIdMapping); + void OptimisticLock(NHibernate.Mapping.ByCode.OptimisticLockMode mode); + void Polymorphism(NHibernate.Mapping.ByCode.PolymorphismType type); + void Schema(string schemaName); + void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action); + void Table(string tableName); + void Version(System.Reflection.MemberInfo versionProperty, System.Action versionMapping); + void Where(string whereClause); + } + + // Generated from `NHibernate.Mapping.ByCode.IClassAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IClassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper where TEntity : class + { + void Abstract(bool isAbstract); + void Cache(System.Action cacheMapping); + void Catalog(string catalogName); + void ComponentAsId(string notVisiblePropertyOrFieldName, System.Action> idMapper); + void ComponentAsId(string notVisiblePropertyOrFieldName); + void ComponentAsId(System.Linq.Expressions.Expression> idProperty, System.Action> idMapper); + void ComponentAsId(System.Linq.Expressions.Expression> idProperty); + void ComposedId(System.Action> idPropertiesMapping); + void Discriminator(System.Action discriminatorMapping); + void DiscriminatorValue(object value); + void Filter(string filterName, System.Action filterMapping); + void Id(System.Linq.Expressions.Expression> idProperty, System.Action idMapper); + void Id(System.Linq.Expressions.Expression> idProperty); + void Id(string notVisiblePropertyOrFieldName, System.Action idMapper); + void Mutable(bool isMutable); + void NaturalId(System.Action> naturalIdPropertiesMapping, System.Action naturalIdMapping); + void NaturalId(System.Action> naturalIdPropertiesMapping); + void OptimisticLock(NHibernate.Mapping.ByCode.OptimisticLockMode mode); + void Polymorphism(NHibernate.Mapping.ByCode.PolymorphismType type); + void Schema(string schemaName); + void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action); + void Table(string tableName); + void Version(System.Linq.Expressions.Expression> versionProperty, System.Action versionMapping); + void Version(string notVisiblePropertyOrFieldName, System.Action versionMapping); + void Where(string whereClause); + } + + // Generated from `NHibernate.Mapping.ByCode.IClassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IClassMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IClassAttributesMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + void Join(string splitGroupId, System.Action splitMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IClassMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IClassMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IClassAttributesMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + void Join(string splitGroupId, System.Action> splitMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionElementRelation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionElementRelation + { + void Component(System.Action mapping); + void Element(System.Action mapping); + void ManyToAny(System.Type idTypeOfMetaType, System.Action mapping); + void ManyToMany(System.Action mapping); + void OneToMany(System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionElementRelation<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionElementRelation + { + void Component(System.Action> mapping); + void Element(System.Action mapping); + void Element(); + void ManyToAny(System.Action mapping); + void ManyToAny(System.Type idTypeOfMetaType, System.Action mapping); + void ManyToMany(System.Action mapping); + void ManyToMany(); + void OneToMany(System.Action mapping); + void OneToMany(); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionIdMapper + { + void Column(string name); + void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator, System.Action generatorMapping); + void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator); + void Length(int length); + void Type(NHibernate.Type.IIdentifierType persistentType); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPropertiesContainerMapper + { + void Bag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping); + void IdBag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping); + void List(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping); + void Map(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action keyMapping, System.Action mapping); + void Set(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPropertiesContainerMapper + { + void Bag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping); + void Bag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping); + void Bag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping); + void Bag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping); + void IdBag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping); + void IdBag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping); + void IdBag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping); + void IdBag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping); + void List(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping); + void List(string notVisiblePropertyOrFieldName, System.Action> collectionMapping); + void List(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping); + void List(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping); + void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping); + void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping); + void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping); + void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping); + void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping); + void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping); + void Set(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping); + void Set(string notVisiblePropertyOrFieldName, System.Action> collectionMapping); + void Set(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping); + void Set(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void BatchSize(int value); + void Cache(System.Action cacheMapping); + void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle); + void Catalog(string catalogName); + void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode); + void Filter(string filterName, System.Action filterMapping); + void Inverse(bool value); + void Key(System.Action keyMapping); + void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy); + void Mutable(bool value); + void OrderBy(string sqlOrderByClause); + void OrderBy(System.Reflection.MemberInfo property); + void Persister(System.Type persister); + void Schema(string schemaName); + void Sort(); + void Sort(); + void Table(string tableName); + void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType; + void Type(System.Type collectionType); + void Where(string sqlWhereClause); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionPropertiesMapper<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void BatchSize(int value); + void Cache(System.Action cacheMapping); + void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle); + void Catalog(string catalogName); + void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode); + void Filter(string filterName, System.Action filterMapping); + void Inverse(bool value); + void Key(System.Action> keyMapping); + void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy); + void Mutable(bool value); + void OrderBy(System.Linq.Expressions.Expression> property); + void OrderBy(string sqlOrderByClause); + void Persister() where TPersister : NHibernate.Persister.Collection.ICollectionPersister; + void Schema(string schemaName); + void Sort(); + void Sort(); + void Table(string tableName); + void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType; + void Type(System.Type collectionType); + void Where(string sqlWhereClause); + } + + // Generated from `NHibernate.Mapping.ByCode.ICollectionSqlsMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionSqlsMapper + { + void Loader(string namedQueryReference); + void SqlDelete(string sql); + void SqlDeleteAll(string sql); + void SqlInsert(string sql); + void SqlUpdate(string sql); + void Subselect(string sql); + } + + // Generated from `NHibernate.Mapping.ByCode.IColumnMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnMapper + { + void Check(string checkConstraint); + void Default(object defaultValue); + void Index(string indexName); + void Length(int length); + void Name(string name); + void NotNullable(bool notnull); + void Precision(System.Int16 precision); + void Scale(System.Int16 scale); + void SqlType(string sqltype); + void Unique(bool unique); + void UniqueKey(string uniquekeyName); + } + + // Generated from `NHibernate.Mapping.ByCode.IColumnOrFormulaMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnOrFormulaMapper : NHibernate.Mapping.ByCode.IColumnMapper + { + void Formula(string formula); + } + + // Generated from `NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnsAndFormulasMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper); + void Formula(string formula); + void Formulas(params string[] formulas); + } + + // Generated from `NHibernate.Mapping.ByCode.IColumnsMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IColumnsMapper + { + void Column(string name); + void Column(System.Action columnMapper); + void Columns(params System.Action[] columnMapper); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAsIdAttributesMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Class(System.Type componentType); + void UnsavedValue(NHibernate.Mapping.ByCode.UnsavedValueType unsavedValueType); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAsIdAttributesMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Class() where TConcrete : TComponent; + void UnsavedValue(NHibernate.Mapping.ByCode.UnsavedValueType unsavedValueType); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAsIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAsIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAsIdMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAsIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAttributesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Class(System.Type componentType); + void Insert(bool consideredInInsertQuery); + void Lazy(bool isLazy); + void Parent(System.Reflection.MemberInfo parent, System.Action parentMapping); + void Parent(System.Reflection.MemberInfo parent); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentAttributesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Class() where TConcrete : TComponent; + void Insert(bool consideredInInsertQuery); + void Lazy(bool isLazy); + void Parent(System.Linq.Expressions.Expression> parent, System.Action parentMapping) where TProperty : class; + void Parent(System.Linq.Expressions.Expression> parent) where TProperty : class; + void Parent(string notVisiblePropertyOrFieldName, System.Action mapping); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentElementMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentElementMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Component(System.Reflection.MemberInfo property, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentElementMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentElementMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Component(string notVisiblePropertyOrFieldName, System.Action> mapping) where TNestedComponent : class; + void Component(System.Linq.Expressions.Expression> property, System.Action> mapping) where TNestedComponent : class; + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentMapKeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentMapKeyMapper + { + void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping); + void Property(System.Reflection.MemberInfo property, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentMapKeyMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentMapKeyMapper + { + void ManyToOne(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class; + void Property(System.Linq.Expressions.Expression> property, System.Action mapping); + void Property(System.Linq.Expressions.Expression> property); + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComponentParentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentParentMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComposedIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComposedIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IComposedIdMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComposedIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper where TEntity : class + { + } + + // Generated from `NHibernate.Mapping.ByCode.IConformistHoldersProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConformistHoldersProvider + { + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get; } + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder ExplicitDeclarationsHolder { get; } + } + + // Generated from `NHibernate.Mapping.ByCode.IDiscriminatorMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDiscriminatorMapper + { + void Column(string column); + void Column(System.Action columnMapper); + void Force(bool force); + void Formula(string formula); + void Insert(bool applyOnApplyOnInsert); + void Length(int length); + void NotNullable(bool isNotNullable); + void Type() where TPersistentType : NHibernate.Type.IDiscriminatorType; + void Type(System.Type persistentType); + void Type(NHibernate.Type.IType persistentType); + void Type(NHibernate.Type.IDiscriminatorType persistentType); + } + + // Generated from `NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDynamicComponentAttributesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Insert(bool consideredInInsertQuery); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDynamicComponentAttributesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Insert(bool consideredInInsertQuery); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IDynamicComponentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDynamicComponentMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IDynamicComponentMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDynamicComponentMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IElementMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IElementMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void Formula(string formula); + void Length(int length); + void NotNullable(bool notnull); + void Precision(System.Int16 precision); + void Scale(System.Int16 scale); + void Type(object parameters); + void Type(); + void Type(System.Type persistentType, object parameters); + void Type(NHibernate.Type.IType persistentType); + void Unique(bool unique); + } + + // Generated from `NHibernate.Mapping.ByCode.IEntityAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityAttributesMapper + { + void BatchSize(int value); + void DynamicInsert(bool value); + void DynamicUpdate(bool value); + void EntityName(string value); + void Lazy(bool value); + void Persister() where T : NHibernate.Persister.Entity.IEntityPersister; + void Proxy(System.Type proxy); + void SelectBeforeUpdate(bool value); + void Synchronize(params string[] table); + } + + // Generated from `NHibernate.Mapping.ByCode.IEntityPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityPropertyMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void OptimisticLock(bool takeInConsiderationForOptimisticLock); + } + + // Generated from `NHibernate.Mapping.ByCode.IEntitySqlsMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntitySqlsMapper + { + void Loader(string namedQueryReference); + void SqlDelete(string sql); + void SqlInsert(string sql); + void SqlUpdate(string sql); + void Subselect(string sql); + } + + // Generated from `NHibernate.Mapping.ByCode.IFilterMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFilterMapper + { + void Condition(string sqlCondition); + } + + // Generated from `NHibernate.Mapping.ByCode.IGenerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IGenerator + { + } + + // Generated from `NHibernate.Mapping.ByCode.IGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IGeneratorDef + { + string Class { get; } + System.Type DefaultReturnType { get; } + object Params { get; } + bool SupportedAsCollectionElementId { get; } + } + + // Generated from `NHibernate.Mapping.ByCode.IGeneratorMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IGeneratorMapper + { + void Params(object generatorParameters); + void Params(System.Collections.Generic.IDictionary generatorParameters); + } + + // Generated from `NHibernate.Mapping.ByCode.IIdBagPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIdBagPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Id(System.Action idMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IIdBagPropertiesMapper<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIdBagPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Id(System.Action idMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIdMapper : NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator, System.Action generatorMapping); + void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator); + void Length(int length); + void Type(NHibernate.Type.IIdentifierType persistentType); + void UnsavedValue(object value); + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper + { + void Catalog(string catalogName); + void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode); + void Inverse(bool value); + void Key(System.Action keyMapping); + void Optional(bool isOptional); + void Schema(string schemaName); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper where TEntity : class + { + void Catalog(string catalogName); + void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode); + void Inverse(bool value); + void Key(System.Action> keyMapping); + void Optional(bool isOptional); + void Schema(string schemaName); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinedSubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper + { + void Abstract(bool isAbstract); + void Catalog(string catalogName); + void Extends(System.Type baseType); + void Filter(string filterName, System.Action filterMapping); + void Key(System.Action keyMapping); + void Schema(string schemaName); + void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinedSubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper where TEntity : class + { + void Abstract(bool isAbstract); + void Catalog(string catalogName); + void Extends(System.Type baseType); + void Filter(string filterName, System.Action filterMapping); + void Key(System.Action> keyMapping); + void Schema(string schemaName); + void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinedSubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinedSubclassMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IJoinedSubclassMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinedSubclassMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + } + + // Generated from `NHibernate.Mapping.ByCode.IKeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IKeyMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void ForeignKey(string foreignKeyName); + void NotNullable(bool notnull); + void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction); + void PropertyRef(System.Reflection.MemberInfo property); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IKeyMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IKeyMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void ForeignKey(string foreignKeyName); + void NotNullable(bool notnull); + void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction); + void PropertyRef(System.Linq.Expressions.Expression> propertyGetter); + void Unique(bool unique); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IListIndexMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IListIndexMapper + { + void Base(int baseIndex); + void Column(string columnName); + void Column(System.Action columnMapper); + } + + // Generated from `NHibernate.Mapping.ByCode.IListPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IListPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Index(System.Action listIndexMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IListPropertiesMapper<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IListPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Index(System.Action listIndexMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IManyToAnyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IManyToAnyMapper + { + void Columns(System.Action idColumnMapping, System.Action classColumnMapping); + void IdType(); + void IdType(System.Type idType); + void IdType(NHibernate.Type.IType idType); + void MetaType(); + void MetaType(System.Type metaType); + void MetaType(NHibernate.Type.IType metaType); + void MetaValue(object value, System.Type entityType); + } + + // Generated from `NHibernate.Mapping.ByCode.IManyToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IManyToManyMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void Class(System.Type entityType); + void EntityName(string entityName); + void ForeignKey(string foreignKeyName); + void Formula(string formula); + void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation); + void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode); + void Where(string sqlWhereClause); + } + + // Generated from `NHibernate.Mapping.ByCode.IManyToOneMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IManyToOneMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle); + void Class(System.Type entityType); + void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode); + void ForeignKey(string foreignKeyName); + void Formula(string formula); + void Index(string indexName); + void Insert(bool consideredInInsertQuery); + void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation); + void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode); + void NotNullable(bool notnull); + void PropertyRef(string propertyReferencedName); + void Unique(bool unique); + void UniqueKey(string uniquekeyName); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapKeyManyToManyMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void ForeignKey(string foreignKeyName); + void Formula(string formula); + } + + // Generated from `NHibernate.Mapping.ByCode.IMapKeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapKeyMapper : NHibernate.Mapping.ByCode.IColumnsMapper + { + void Formula(string formula); + void Length(int length); + void Type(); + void Type(System.Type persistentType); + void Type(NHibernate.Type.IType persistentType); + } + + // Generated from `NHibernate.Mapping.ByCode.IMapKeyRelation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapKeyRelation + { + void Component(System.Action mapping); + void Element(System.Action mapping); + void ManyToMany(System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IMapKeyRelation<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapKeyRelation + { + void Component(System.Action> mapping); + void Element(System.Action mapping); + void Element(); + void ManyToMany(System.Action mapping); + void ManyToMany(); + } + + // Generated from `NHibernate.Mapping.ByCode.IMapPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IMapPropertiesMapper<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMapPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMinimalPlainPropertyContainerMapper + { + void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping); + void Property(System.Reflection.MemberInfo property, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMinimalPlainPropertyContainerMapper + { + void ManyToOne(string notVisiblePropertyOrFieldName, System.Action mapping) where TProperty : class; + void ManyToOne(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class; + void ManyToOne(System.Linq.Expressions.Expression> property) where TProperty : class; + void Property(System.Linq.Expressions.Expression> property, System.Action mapping); + void Property(System.Linq.Expressions.Expression> property); + void Property(string notVisiblePropertyOrFieldName, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IModelExplicitDeclarationsHolder + { + void AddAsAny(System.Reflection.MemberInfo member); + void AddAsArray(System.Reflection.MemberInfo member); + void AddAsBag(System.Reflection.MemberInfo member); + void AddAsComponent(System.Type type); + void AddAsDynamicComponent(System.Reflection.MemberInfo member, System.Type componentTemplate); + void AddAsIdBag(System.Reflection.MemberInfo member); + void AddAsList(System.Reflection.MemberInfo member); + void AddAsManyToAnyRelation(System.Reflection.MemberInfo member); + void AddAsManyToManyItemRelation(System.Reflection.MemberInfo member); + void AddAsManyToManyKeyRelation(System.Reflection.MemberInfo member); + void AddAsManyToOneRelation(System.Reflection.MemberInfo member); + void AddAsMap(System.Reflection.MemberInfo member); + void AddAsNaturalId(System.Reflection.MemberInfo member); + void AddAsOneToManyRelation(System.Reflection.MemberInfo member); + void AddAsOneToOneRelation(System.Reflection.MemberInfo member); + void AddAsPartOfComposedId(System.Reflection.MemberInfo member); + void AddAsPersistentMember(System.Reflection.MemberInfo member); + void AddAsPoid(System.Reflection.MemberInfo member); + void AddAsProperty(System.Reflection.MemberInfo member); + void AddAsPropertySplit(NHibernate.Mapping.ByCode.SplitDefinition definition); + void AddAsRootEntity(System.Type type); + void AddAsSet(System.Reflection.MemberInfo member); + void AddAsTablePerClassEntity(System.Type type); + void AddAsTablePerClassHierarchyEntity(System.Type type); + void AddAsTablePerConcreteClassEntity(System.Type type); + void AddAsVersionProperty(System.Reflection.MemberInfo member); + System.Collections.Generic.IEnumerable Any { get; } + System.Collections.Generic.IEnumerable Arrays { get; } + System.Collections.Generic.IEnumerable Bags { get; } + System.Collections.Generic.IEnumerable Components { get; } + System.Collections.Generic.IEnumerable ComposedIds { get; } + System.Collections.Generic.IEnumerable Dictionaries { get; } + System.Collections.Generic.IEnumerable DynamicComponents { get; } + System.Type GetDynamicComponentTemplate(System.Reflection.MemberInfo member); + string GetSplitGroupFor(System.Reflection.MemberInfo member); + System.Collections.Generic.IEnumerable GetSplitGroupsFor(System.Type type); + System.Collections.Generic.IEnumerable IdBags { get; } + System.Collections.Generic.IEnumerable ItemManyToManyRelations { get; } + System.Collections.Generic.IEnumerable KeyManyToManyRelations { get; } + System.Collections.Generic.IEnumerable Lists { get; } + System.Collections.Generic.IEnumerable ManyToAnyRelations { get; } + System.Collections.Generic.IEnumerable ManyToOneRelations { get; } + System.Collections.Generic.IEnumerable NaturalIds { get; } + System.Collections.Generic.IEnumerable OneToManyRelations { get; } + System.Collections.Generic.IEnumerable OneToOneRelations { get; } + System.Collections.Generic.IEnumerable PersistentMembers { get; } + System.Collections.Generic.IEnumerable Poids { get; } + System.Collections.Generic.IEnumerable Properties { get; } + System.Collections.Generic.IEnumerable RootEntities { get; } + System.Collections.Generic.IEnumerable Sets { get; } + System.Collections.Generic.IEnumerable SplitDefinitions { get; } + System.Collections.Generic.IEnumerable TablePerClassEntities { get; } + System.Collections.Generic.IEnumerable TablePerClassHierarchyEntities { get; } + System.Collections.Generic.IEnumerable TablePerConcreteClassEntities { get; } + System.Collections.Generic.IEnumerable VersionProperties { get; } + } + + // Generated from `NHibernate.Mapping.ByCode.IModelInspector` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IModelInspector + { + System.Type GetDynamicComponentTemplate(System.Reflection.MemberInfo member); + System.Collections.Generic.IEnumerable GetPropertiesSplits(System.Type type); + bool IsAny(System.Reflection.MemberInfo member); + bool IsArray(System.Reflection.MemberInfo role); + bool IsBag(System.Reflection.MemberInfo role); + bool IsComponent(System.Type type); + bool IsDictionary(System.Reflection.MemberInfo role); + bool IsDynamicComponent(System.Reflection.MemberInfo member); + bool IsEntity(System.Type type); + bool IsIdBag(System.Reflection.MemberInfo role); + bool IsList(System.Reflection.MemberInfo role); + bool IsManyToAny(System.Reflection.MemberInfo member); + bool IsManyToManyItem(System.Reflection.MemberInfo member); + bool IsManyToManyKey(System.Reflection.MemberInfo member); + bool IsManyToOne(System.Reflection.MemberInfo member); + bool IsMemberOfComposedId(System.Reflection.MemberInfo member); + bool IsMemberOfNaturalId(System.Reflection.MemberInfo member); + bool IsOneToMany(System.Reflection.MemberInfo member); + bool IsOneToOne(System.Reflection.MemberInfo member); + bool IsPersistentId(System.Reflection.MemberInfo member); + bool IsPersistentProperty(System.Reflection.MemberInfo member); + bool IsProperty(System.Reflection.MemberInfo member); + bool IsRootEntity(System.Type type); + bool IsSet(System.Reflection.MemberInfo role); + bool IsTablePerClass(System.Type type); + bool IsTablePerClassHierarchy(System.Type type); + bool IsTablePerClassSplit(System.Type type, object splitGroupId, System.Reflection.MemberInfo member); + bool IsTablePerConcreteClass(System.Type type); + bool IsVersion(System.Reflection.MemberInfo member); + } + + // Generated from `NHibernate.Mapping.ByCode.INaturalIdAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INaturalIdAttributesMapper + { + void Mutable(bool isMutable); + } + + // Generated from `NHibernate.Mapping.ByCode.INaturalIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INaturalIdMapper : NHibernate.Mapping.ByCode.INaturalIdAttributesMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IOneToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOneToManyMapper + { + void Class(System.Type entityType); + void EntityName(string entityName); + void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode); + } + + // Generated from `NHibernate.Mapping.ByCode.IOneToOneMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOneToOneMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle); + void Class(System.Type clazz); + void Constrained(bool value); + void ForeignKey(string foreignKeyName); + void Formula(string formula); + void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation); + void PropertyReference(System.Reflection.MemberInfo propertyInTheOtherSide); + } + + // Generated from `NHibernate.Mapping.ByCode.IOneToOneMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOneToOneMapper : NHibernate.Mapping.ByCode.IOneToOneMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void PropertyReference(System.Linq.Expressions.Expression> reference); + } + + // Generated from `NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPlainPropertyContainerMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + void OneToOne(System.Reflection.MemberInfo property, System.Action mapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPlainPropertyContainerMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + void OneToOne(string notVisiblePropertyOrFieldName, System.Action> mapping) where TProperty : class; + void OneToOne(System.Linq.Expressions.Expression> property, System.Action> mapping) where TProperty : class; + } + + // Generated from `NHibernate.Mapping.ByCode.IPropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyContainerMapper : NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IPropertyContainerMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyContainerMapper : NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Formula(string formula); + void Generated(NHibernate.Mapping.ByCode.PropertyGeneration generation); + void Index(string indexName); + void Insert(bool consideredInInsertQuery); + void Lazy(bool isLazy); + void Length(int length); + void NotNullable(bool notnull); + void Precision(System.Int16 precision); + void Scale(System.Int16 scale); + void Type(object parameters); + void Type(); + void Type(System.Type persistentType, object parameters); + void Type(NHibernate.Type.IType persistentType); + void Unique(bool unique); + void UniqueKey(string uniquekeyName); + void Update(bool consideredInUpdateQuery); + } + + // Generated from `NHibernate.Mapping.ByCode.ISetPropertiesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISetPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.ISetPropertiesMapper<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISetPropertiesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.ISubclassAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper + { + void Abstract(bool isAbstract); + void DiscriminatorValue(object value); + void Extends(System.Type baseType); + void Filter(string filterName, System.Action filterMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ISubclassAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper where TEntity : class + { + void Abstract(bool isAbstract); + void DiscriminatorValue(object value); + void Extends(System.Type baseType); + void Filter(string filterName, System.Action filterMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ISubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISubclassMapper : NHibernate.Mapping.ByCode.ISubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + void Join(string splitGroupId, System.Action splitMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.ISubclassMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISubclassMapper : NHibernate.Mapping.ByCode.ISubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + void Join(string splitGroupId, System.Action> splitMapping); + } + + // Generated from `NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUnionSubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper + { + void Abstract(bool isAbstract); + void Catalog(string catalogName); + void Extends(System.Type baseType); + void Schema(string schemaName); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUnionSubclassAttributesMapper : NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper where TEntity : class + { + void Abstract(bool isAbstract); + void Catalog(string catalogName); + void Extends(System.Type baseType); + void Schema(string schemaName); + void Table(string tableName); + } + + // Generated from `NHibernate.Mapping.ByCode.IUnionSubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUnionSubclassMapper : NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + } + + // Generated from `NHibernate.Mapping.ByCode.IUnionSubclassMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUnionSubclassMapper : NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + } + + // Generated from `NHibernate.Mapping.ByCode.IVersionMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IVersionMapper : NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + void Generated(NHibernate.Mapping.ByCode.VersionGeneration generatedByDb); + void Insert(bool useInInsert); + void Type() where TPersistentType : NHibernate.UserTypes.IUserVersionType; + void Type(System.Type persistentType); + void Type(NHibernate.Type.IVersionType persistentType); + void UnsavedValue(object value); + } + + // Generated from `NHibernate.Mapping.ByCode.IdMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class IdMapperExtensions + { + public static void Type(this NHibernate.Mapping.ByCode.IIdMapper idMapper, object parameters) => throw null; + public static void Type(this NHibernate.Mapping.ByCode.IIdMapper idMapper) => throw null; + public static void Type(this NHibernate.Mapping.ByCode.IIdMapper idMapper, System.Type persistentType, object parameters) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.IdentityGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentityGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public IdentityGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Import` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Import + { + public void AddToMapping(NHibernate.Cfg.MappingSchema.HbmMapping hbmMapping) => throw null; + public Import(System.Type importType, string rename) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.IncrementGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IncrementGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public IncrementGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.JoinedSubclassAttributesMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class JoinedSubclassAttributesMapperExtensions + { + public static void Extends(this NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper mapper, string entityOrClassName) where TEntity : class => throw null; + public static void Extends(this NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper mapper, string entityOrClassName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.LazyRelation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class LazyRelation + { + protected LazyRelation() => throw null; + public static NHibernate.Mapping.ByCode.LazyRelation NoLazy; + public static NHibernate.Mapping.ByCode.LazyRelation NoProxy; + public static NHibernate.Mapping.ByCode.LazyRelation Proxy; + public abstract NHibernate.Cfg.MappingSchema.HbmLaziness ToHbm(); + } + + // Generated from `NHibernate.Mapping.ByCode.ManyToOneMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ManyToOneMapperExtensions + { + public static void EntityName(this NHibernate.Mapping.ByCode.IManyToOneMapper mapper, string entityName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.MappingsExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class MappingsExtensions + { + public static string AsString(this NHibernate.Cfg.MappingSchema.HbmMapping mappings) => throw null; + public static void WriteAllXmlMapping(this System.Collections.Generic.IEnumerable mappings) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ModelExplicitDeclarationsHolderExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ModelExplicitDeclarationsHolderExtensions + { + public static void Merge(this NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder destination, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder source) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.ModelMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ModelMapper + { + public void AddMapping() where T : NHibernate.Mapping.ByCode.IConformistHoldersProvider, new() => throw null; + public void AddMapping(System.Type type) => throw null; + public void AddMapping(NHibernate.Mapping.ByCode.IConformistHoldersProvider mapping) => throw null; + public void AddMappings(System.Collections.Generic.IEnumerable types) => throw null; + public event NHibernate.Mapping.ByCode.Impl.AnyMappingHandler AfterMapAny; + public event NHibernate.Mapping.ByCode.Impl.BagMappingHandler AfterMapBag; + public event NHibernate.Mapping.ByCode.Impl.RootClassMappingHandler AfterMapClass; + public event NHibernate.Mapping.ByCode.Impl.ComponentMappingHandler AfterMapComponent; + public event NHibernate.Mapping.ByCode.Impl.ElementMappingHandler AfterMapElement; + public event NHibernate.Mapping.ByCode.Impl.IdBagMappingHandler AfterMapIdBag; + public event NHibernate.Mapping.ByCode.Impl.JoinedSubclassMappingHandler AfterMapJoinedSubclass; + public event NHibernate.Mapping.ByCode.Impl.ListMappingHandler AfterMapList; + public event NHibernate.Mapping.ByCode.Impl.ManyToManyMappingHandler AfterMapManyToMany; + public event NHibernate.Mapping.ByCode.Impl.ManyToOneMappingHandler AfterMapManyToOne; + public event NHibernate.Mapping.ByCode.Impl.MapMappingHandler AfterMapMap; + public event NHibernate.Mapping.ByCode.Impl.MapKeyMappingHandler AfterMapMapKey; + public event NHibernate.Mapping.ByCode.Impl.MapKeyManyToManyMappingHandler AfterMapMapKeyManyToMany; + public event NHibernate.Mapping.ByCode.Impl.OneToManyMappingHandler AfterMapOneToMany; + public event NHibernate.Mapping.ByCode.Impl.OneToOneMappingHandler AfterMapOneToOne; + public event NHibernate.Mapping.ByCode.Impl.PropertyMappingHandler AfterMapProperty; + public event NHibernate.Mapping.ByCode.Impl.SetMappingHandler AfterMapSet; + public event NHibernate.Mapping.ByCode.Impl.SubclassMappingHandler AfterMapSubclass; + public event NHibernate.Mapping.ByCode.Impl.UnionSubclassMappingHandler AfterMapUnionSubclass; + public event NHibernate.Mapping.ByCode.Impl.AnyMappingHandler BeforeMapAny; + public event NHibernate.Mapping.ByCode.Impl.BagMappingHandler BeforeMapBag; + public event NHibernate.Mapping.ByCode.Impl.RootClassMappingHandler BeforeMapClass; + public event NHibernate.Mapping.ByCode.Impl.ComponentMappingHandler BeforeMapComponent; + public event NHibernate.Mapping.ByCode.Impl.ElementMappingHandler BeforeMapElement; + public event NHibernate.Mapping.ByCode.Impl.IdBagMappingHandler BeforeMapIdBag; + public event NHibernate.Mapping.ByCode.Impl.JoinedSubclassMappingHandler BeforeMapJoinedSubclass; + public event NHibernate.Mapping.ByCode.Impl.ListMappingHandler BeforeMapList; + public event NHibernate.Mapping.ByCode.Impl.ManyToManyMappingHandler BeforeMapManyToMany; + public event NHibernate.Mapping.ByCode.Impl.ManyToOneMappingHandler BeforeMapManyToOne; + public event NHibernate.Mapping.ByCode.Impl.MapMappingHandler BeforeMapMap; + public event NHibernate.Mapping.ByCode.Impl.MapKeyMappingHandler BeforeMapMapKey; + public event NHibernate.Mapping.ByCode.Impl.MapKeyManyToManyMappingHandler BeforeMapMapKeyManyToMany; + public event NHibernate.Mapping.ByCode.Impl.OneToManyMappingHandler BeforeMapOneToMany; + public event NHibernate.Mapping.ByCode.Impl.OneToOneMappingHandler BeforeMapOneToOne; + public event NHibernate.Mapping.ByCode.Impl.PropertyMappingHandler BeforeMapProperty; + public event NHibernate.Mapping.ByCode.Impl.SetMappingHandler BeforeMapSet; + public event NHibernate.Mapping.ByCode.Impl.SubclassMappingHandler BeforeMapSubclass; + public event NHibernate.Mapping.ByCode.Impl.UnionSubclassMappingHandler BeforeMapUnionSubclass; + public void Class(System.Action> customizeAction) where TRootEntity : class => throw null; + public NHibernate.Cfg.MappingSchema.HbmMapping CompileMappingFor(System.Collections.Generic.IEnumerable types) => throw null; + public NHibernate.Cfg.MappingSchema.HbmMapping CompileMappingForAllExplicitlyAddedEntities() => throw null; + public System.Collections.Generic.IEnumerable CompileMappingForEach(System.Collections.Generic.IEnumerable types) => throw null; + public System.Collections.Generic.IEnumerable CompileMappingForEachExplicitlyAddedEntity() => throw null; + public void Component(System.Action> customizeAction) => throw null; + protected virtual NHibernate.Mapping.ByCode.ModelMapper.ICollectionElementRelationMapper DetermineCollectionElementRelationType(System.Reflection.MemberInfo property, NHibernate.Mapping.ByCode.PropertyPath propertyPath, System.Type collectionElementType) => throw null; + protected void ForEachMemberPath(System.Reflection.MemberInfo member, NHibernate.Mapping.ByCode.PropertyPath progressivePath, System.Action invoke) => throw null; + protected System.Reflection.MemberInfo GetComponentParentReferenceProperty(System.Collections.Generic.IEnumerable persistentProperties, System.Type propertiesContainerType) => throw null; + // Generated from `NHibernate.Mapping.ByCode.ModelMapper+ICollectionElementRelationMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected interface ICollectionElementRelationMapper + { + void Map(NHibernate.Mapping.ByCode.ICollectionElementRelation relation); + void MapCollectionProperties(NHibernate.Mapping.ByCode.ICollectionPropertiesMapper mapped); + } + + + // Generated from `NHibernate.Mapping.ByCode.ModelMapper+IMapKeyRelationMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected interface IMapKeyRelationMapper + { + void Map(NHibernate.Mapping.ByCode.IMapKeyRelation relation); + } + + + public void Import(string rename) => throw null; + public void Import() => throw null; + public void JoinedSubclass(System.Action> customizeAction) where TEntity : class => throw null; + protected NHibernate.Mapping.ByCode.Impl.ICandidatePersistentMembersProvider MembersProvider { get => throw null; } + public NHibernate.Mapping.ByCode.IModelInspector ModelInspector { get => throw null; } + public ModelMapper(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.Impl.ICandidatePersistentMembersProvider membersProvider) => throw null; + public ModelMapper(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizerHolder, NHibernate.Mapping.ByCode.Impl.ICandidatePersistentMembersProvider membersProvider) => throw null; + public ModelMapper(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder) => throw null; + public ModelMapper(NHibernate.Mapping.ByCode.IModelInspector modelInspector) => throw null; + public ModelMapper() => throw null; + public void Subclass(System.Action> customizeAction) where TEntity : class => throw null; + public void UnionSubclass(System.Action> customizeAction) where TEntity : class => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.NativeGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public NativeGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.NativeGuidGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NativeGuidGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public NativeGuidGeneratorDef() => throw null; + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.NotFoundMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NotFoundMode + { + public static NHibernate.Mapping.ByCode.NotFoundMode Exception; + public static NHibernate.Mapping.ByCode.NotFoundMode Ignore; + protected NotFoundMode() => throw null; + public abstract NHibernate.Cfg.MappingSchema.HbmNotFoundMode ToHbm(); + } + + // Generated from `NHibernate.Mapping.ByCode.OnDeleteAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum OnDeleteAction + { + Cascade, + NoAction, + } + + // Generated from `NHibernate.Mapping.ByCode.OneToOneMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class OneToOneMapperExtensions + { + public static void Fetch(this NHibernate.Mapping.ByCode.IOneToOneMapper mapper, NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public static void Formulas(this NHibernate.Mapping.ByCode.IOneToOneMapper mapper, params string[] formulas) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.OptimisticLockMode` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum OptimisticLockMode + { + All, + Dirty, + None, + Version, + } + + // Generated from `NHibernate.Mapping.ByCode.PolymorphismType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum PolymorphismType + { + Explicit, + Implicit, + } + + // Generated from `NHibernate.Mapping.ByCode.PropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class PropertyGeneration + { + public static NHibernate.Mapping.ByCode.PropertyGeneration Always; + // Generated from `NHibernate.Mapping.ByCode.PropertyGeneration+AlwaysPropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AlwaysPropertyGeneration : NHibernate.Mapping.ByCode.PropertyGeneration + { + public AlwaysPropertyGeneration() => throw null; + } + + + public static NHibernate.Mapping.ByCode.PropertyGeneration Insert; + // Generated from `NHibernate.Mapping.ByCode.PropertyGeneration+InsertPropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertPropertyGeneration : NHibernate.Mapping.ByCode.PropertyGeneration + { + public InsertPropertyGeneration() => throw null; + } + + + public static NHibernate.Mapping.ByCode.PropertyGeneration Never; + // Generated from `NHibernate.Mapping.ByCode.PropertyGeneration+NeverPropertyGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NeverPropertyGeneration : NHibernate.Mapping.ByCode.PropertyGeneration + { + public NeverPropertyGeneration() => throw null; + } + + + protected PropertyGeneration() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.PropertyMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PropertyMapperExtensions + { + public static void FetchGroup(this NHibernate.Mapping.ByCode.IPropertyMapper mapper, string name) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.PropertyPath` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyPath + { + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Mapping.ByCode.PropertyPath other) => throw null; + public override int GetHashCode() => throw null; + public System.Reflection.MemberInfo GetRootMember() => throw null; + public System.Reflection.MemberInfo LocalMember { get => throw null; } + public NHibernate.Mapping.ByCode.PropertyPath PreviousPath { get => throw null; } + public PropertyPath(NHibernate.Mapping.ByCode.PropertyPath previousPath, System.Reflection.MemberInfo localMember) => throw null; + public string ToColumnName() => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.PropertyPathExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PropertyPathExtensions + { + public static NHibernate.Mapping.ByCode.PropertyPath DepureFirstLevelIfCollection(this NHibernate.Mapping.ByCode.PropertyPath source) => throw null; + public static System.Type GetContainerEntity(this NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.IModelInspector domainInspector) => throw null; + public static System.Collections.Generic.IEnumerable InverseProgressivePath(this NHibernate.Mapping.ByCode.PropertyPath source) => throw null; + public static string ToColumnName(this NHibernate.Mapping.ByCode.PropertyPath propertyPath, string pathSeparator) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.PropertyToField` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyToField + { + public static System.Collections.Generic.IDictionary DefaultStrategies { get => throw null; } + public static System.Reflection.FieldInfo GetBackFieldInfo(System.Reflection.PropertyInfo subject) => throw null; + public PropertyToField() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.SchemaAction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + [System.Flags] + public enum SchemaAction + { + All, + Drop, + Export, + None, + Update, + Validate, + } + + // Generated from `NHibernate.Mapping.ByCode.SchemaActionConverter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SchemaActionConverter + { + public static bool Has(this NHibernate.Mapping.ByCode.SchemaAction source, NHibernate.Mapping.ByCode.SchemaAction value) => throw null; + public static string ToSchemaActionString(this NHibernate.Mapping.ByCode.SchemaAction source) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.SelectGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public SelectGeneratorDef() => throw null; + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.SequenceGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public SequenceGeneratorDef() => throw null; + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.SequenceHiLoGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceHiLoGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public SequenceHiLoGeneratorDef() => throw null; + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.SequenceIdentityGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequenceIdentityGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public SequenceIdentityGeneratorDef() => throw null; + public bool SupportedAsCollectionElementId { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.SimpleModelInspector` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleModelInspector : NHibernate.Mapping.ByCode.IModelInspector, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder + { + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsAny(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsArray(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsBag(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsComponent(System.Type type) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsDynamicComponent(System.Reflection.MemberInfo member, System.Type componentTemplate) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsIdBag(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsList(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsManyToAnyRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsManyToManyItemRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsManyToManyKeyRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsManyToOneRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsMap(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsNaturalId(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsOneToManyRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsOneToOneRelation(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsPartOfComposedId(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsPersistentMember(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsPoid(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsProperty(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsPropertySplit(NHibernate.Mapping.ByCode.SplitDefinition definition) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsRootEntity(System.Type type) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsSet(System.Reflection.MemberInfo member) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsTablePerClassEntity(System.Type type) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsTablePerClassHierarchyEntity(System.Type type) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsTablePerConcreteClassEntity(System.Type type) => throw null; + void NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.AddAsVersionProperty(System.Reflection.MemberInfo member) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Any { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Arrays { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Bags { get => throw null; } + protected bool CanReadCantWriteInBaseType(System.Reflection.PropertyInfo property) => throw null; + protected bool CanReadCantWriteInsideType(System.Reflection.PropertyInfo property) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Components { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.ComposedIds { get => throw null; } + protected virtual bool DeclaredPolymorphicMatch(System.Reflection.MemberInfo member, System.Func declaredMatch) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Dictionaries { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.DynamicComponents { get => throw null; } + System.Type NHibernate.Mapping.ByCode.IModelInspector.GetDynamicComponentTemplate(System.Reflection.MemberInfo member) => throw null; + System.Type NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.GetDynamicComponentTemplate(System.Reflection.MemberInfo member) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelInspector.GetPropertiesSplits(System.Type type) => throw null; + string NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.GetSplitGroupFor(System.Reflection.MemberInfo member) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.GetSplitGroupsFor(System.Type type) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.IdBags { get => throw null; } + public void IsAny(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsAny(System.Reflection.MemberInfo member) => throw null; + public void IsArray(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsArray(System.Reflection.MemberInfo role) => throw null; + protected bool IsAutoproperty(System.Reflection.PropertyInfo property) => throw null; + public void IsBag(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsBag(System.Reflection.MemberInfo role) => throw null; + public void IsComponent(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsComponent(System.Type type) => throw null; + public void IsDictionary(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsDictionary(System.Reflection.MemberInfo role) => throw null; + public void IsDynamicComponent(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsDynamicComponent(System.Reflection.MemberInfo member) => throw null; + public void IsEntity(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsEntity(System.Type type) => throw null; + public void IsIdBag(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsIdBag(System.Reflection.MemberInfo role) => throw null; + public void IsList(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsList(System.Reflection.MemberInfo role) => throw null; + public void IsManyToAny(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsManyToAny(System.Reflection.MemberInfo member) => throw null; + public void IsManyToMany(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsManyToManyItem(System.Reflection.MemberInfo member) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsManyToManyKey(System.Reflection.MemberInfo member) => throw null; + public void IsManyToOne(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsManyToOne(System.Reflection.MemberInfo member) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsMemberOfComposedId(System.Reflection.MemberInfo member) => throw null; + public void IsMemberOfNaturalId(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsMemberOfNaturalId(System.Reflection.MemberInfo member) => throw null; + public void IsOneToMany(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsOneToMany(System.Reflection.MemberInfo member) => throw null; + public void IsOneToOne(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsOneToOne(System.Reflection.MemberInfo member) => throw null; + public void IsPersistentId(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsPersistentId(System.Reflection.MemberInfo member) => throw null; + public void IsPersistentProperty(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsPersistentProperty(System.Reflection.MemberInfo member) => throw null; + public void IsProperty(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsProperty(System.Reflection.MemberInfo member) => throw null; + protected bool IsReadOnlyProperty(System.Reflection.MemberInfo subject) => throw null; + public void IsRootEntity(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsRootEntity(System.Type type) => throw null; + public void IsSet(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsSet(System.Reflection.MemberInfo role) => throw null; + public void IsTablePerClass(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsTablePerClass(System.Type type) => throw null; + public void IsTablePerClassHierarchy(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsTablePerClassHierarchy(System.Type type) => throw null; + public void IsTablePerClassSplit(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsTablePerClassSplit(System.Type type, object splitGroupId, System.Reflection.MemberInfo member) => throw null; + public void IsTablePerConcreteClass(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsTablePerConcreteClass(System.Type type) => throw null; + public void IsVersion(System.Func match) => throw null; + bool NHibernate.Mapping.ByCode.IModelInspector.IsVersion(System.Reflection.MemberInfo member) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.ItemManyToManyRelations { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.KeyManyToManyRelations { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Lists { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.ManyToAnyRelations { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.ManyToOneRelations { get => throw null; } + protected bool MatchArrayMember(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchBagMember(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchCollection(System.Reflection.MemberInfo subject, System.Predicate specificCollectionPredicate) => throw null; + protected bool MatchComponentPattern(System.Type subject) => throw null; + protected bool MatchDictionaryMember(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchEntity(System.Type subject) => throw null; + protected bool MatchNoReadOnlyPropertyPattern(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchPoIdPattern(System.Reflection.MemberInfo subject) => throw null; + protected bool MatchSetMember(System.Reflection.MemberInfo subject) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.NaturalIds { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.OneToManyRelations { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.OneToOneRelations { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.PersistentMembers { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Poids { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Properties { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.RootEntities { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.Sets { get => throw null; } + public SimpleModelInspector() => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.SplitDefinitions { get => throw null; } + public void SplitsFor(System.Func, System.Collections.Generic.IEnumerable> getPropertiesSplitsId) => throw null; + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.TablePerClassEntities { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.TablePerClassHierarchyEntities { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.TablePerConcreteClassEntities { get => throw null; } + System.Collections.Generic.IEnumerable NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder.VersionProperties { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.SplitDefinition` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SplitDefinition + { + public string GroupId { get => throw null; set => throw null; } + public System.Reflection.MemberInfo Member { get => throw null; set => throw null; } + public System.Type On { get => throw null; set => throw null; } + public SplitDefinition(System.Type on, string groupId, System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.SubclassAttributesMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SubclassAttributesMapperExtensions + { + public static void Extends(this NHibernate.Mapping.ByCode.ISubclassAttributesMapper mapper, string entityOrClassName) where TEntity : class => throw null; + public static void Extends(this NHibernate.Mapping.ByCode.ISubclassAttributesMapper mapper, string entityOrClassName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.TableGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + public TableGeneratorDef() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.TableHiLoGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableHiLoGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + public TableHiLoGeneratorDef() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.TriggerIdentityGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TriggerIdentityGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + public TriggerIdentityGeneratorDef() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.TypeExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TypeExtensions + { + public static System.Reflection.MemberInfo DecodeMemberAccessExpression(System.Linq.Expressions.Expression> expression) => throw null; + public static System.Reflection.MemberInfo DecodeMemberAccessExpression(System.Linq.Expressions.Expression> expression) => throw null; + public static System.Reflection.MemberInfo DecodeMemberAccessExpressionOf(System.Linq.Expressions.Expression> expression) => throw null; + public static System.Reflection.MemberInfo DecodeMemberAccessExpressionOf(System.Linq.Expressions.Expression> expression) => throw null; + public static System.Type DetermineCollectionElementOrDictionaryValueType(this System.Type genericCollection) => throw null; + public static System.Type DetermineCollectionElementType(this System.Type genericCollection) => throw null; + public static System.Type DetermineDictionaryKeyType(this System.Type genericDictionary) => throw null; + public static System.Type DetermineDictionaryValueType(this System.Type genericDictionary) => throw null; + public static System.Type DetermineRequiredCollectionElementType(this System.Reflection.MemberInfo collectionProperty) => throw null; + public static System.Collections.Generic.IEnumerable GetBaseTypes(this System.Type type) => throw null; + public static System.Type GetFirstImplementorOf(this System.Type source, System.Type abstractType) => throw null; + public static System.Reflection.MemberInfo GetFirstPropertyOfType(this System.Type propertyContainerType, System.Type propertyType, System.Reflection.BindingFlags bindingFlags, System.Func acceptPropertyClauses) => throw null; + public static System.Reflection.MemberInfo GetFirstPropertyOfType(this System.Type propertyContainerType, System.Type propertyType, System.Reflection.BindingFlags bindingFlags) => throw null; + public static System.Reflection.MemberInfo GetFirstPropertyOfType(this System.Type propertyContainerType, System.Type propertyType, System.Func acceptPropertyClauses) => throw null; + public static System.Reflection.MemberInfo GetFirstPropertyOfType(this System.Type propertyContainerType, System.Type propertyType) => throw null; + public static System.Collections.Generic.IEnumerable GetGenericInterfaceTypeDefinitions(this System.Type type) => throw null; + public static System.Collections.Generic.IEnumerable GetHierarchyFromBase(this System.Type type) => throw null; + public static System.Collections.Generic.IEnumerable GetInterfaceProperties(this System.Type type) => throw null; + public static System.Collections.Generic.IEnumerable GetMemberFromDeclaringClasses(this System.Reflection.MemberInfo source) => throw null; + public static System.Reflection.MemberInfo GetMemberFromDeclaringType(this System.Reflection.MemberInfo source) => throw null; + public static System.Reflection.MemberInfo GetMemberFromReflectedType(this System.Reflection.MemberInfo member, System.Type reflectedType) => throw null; + public static System.Collections.Generic.IEnumerable GetPropertyFromInterfaces(this System.Reflection.MemberInfo source) => throw null; + public static System.Reflection.MemberInfo GetPropertyOrFieldMatchingName(this System.Type source, string memberName) => throw null; + public static System.Type GetPropertyOrFieldType(this System.Reflection.MemberInfo propertyOrField) => throw null; + public static bool HasPublicPropertyOf(this System.Type source, System.Type typeOfProperty, System.Func acceptPropertyClauses) => throw null; + public static bool HasPublicPropertyOf(this System.Type source, System.Type typeOfProperty) => throw null; + public static bool IsEnumOrNullableEnum(this System.Type type) => throw null; + public static bool IsFlagEnumOrNullableFlagEnum(this System.Type type) => throw null; + public static bool IsGenericCollection(this System.Type source) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.UUIDHexGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UUIDHexGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + public UUIDHexGeneratorDef(string format, string separator) => throw null; + public UUIDHexGeneratorDef(string format) => throw null; + public UUIDHexGeneratorDef() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.UUIDStringGeneratorDef` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UUIDStringGeneratorDef : NHibernate.Mapping.ByCode.IGeneratorDef + { + public string Class { get => throw null; } + public System.Type DefaultReturnType { get => throw null; } + public object Params { get => throw null; } + public bool SupportedAsCollectionElementId { get => throw null; } + public UUIDStringGeneratorDef() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.UnionSubclassAttributesMapperExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class UnionSubclassAttributesMapperExtensions + { + public static void Extends(this NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper mapper, string entityOrClassName) where TEntity : class => throw null; + public static void Extends(this NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper mapper, string entityOrClassName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.UnsavedValueType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum UnsavedValueType + { + Any, + None, + Undefined, + } + + // Generated from `NHibernate.Mapping.ByCode.VersionGeneration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class VersionGeneration + { + public static NHibernate.Mapping.ByCode.VersionGeneration Always; + public static NHibernate.Mapping.ByCode.VersionGeneration Never; + public abstract NHibernate.Cfg.MappingSchema.HbmVersionGeneration ToHbm(); + protected VersionGeneration() => throw null; + } + + namespace Conformist + { + // Generated from `NHibernate.Mapping.ByCode.Conformist.ClassMapping<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassMapping : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ClassCustomizer where T : class + { + public ClassMapping() : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Conformist.ComponentMapping<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentMapping : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ComponentCustomizer + { + public ComponentMapping() : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Conformist.JoinedSubclassMapping<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassMapping : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.JoinedSubclassCustomizer where T : class + { + public JoinedSubclassMapping() : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Conformist.SubclassMapping<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubclassMapping : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.SubclassCustomizer where T : class + { + public SubclassMapping() : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Conformist.UnionSubclassMapping<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclassMapping : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.UnionSubclassCustomizer where T : class + { + public UnionSubclassMapping() : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + } + namespace Impl + { + // Generated from `NHibernate.Mapping.ByCode.Impl.AbstractBasePropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractBasePropertyContainerMapper + { + protected AbstractBasePropertyContainerMapper(System.Type container, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + protected abstract void AddProperty(object property); + public virtual void Any(System.Reflection.MemberInfo property, System.Type idTypeOfMetaType, System.Action mapping) => throw null; + public virtual void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public virtual void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + protected System.Type Container { get => throw null; } + protected virtual bool IsMemberSupportedByMappedContainer(System.Reflection.MemberInfo property) => throw null; + public virtual void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + protected NHibernate.Cfg.MappingSchema.HbmMapping MapDoc { get => throw null; } + public virtual void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + protected System.Type container; + protected NHibernate.Cfg.MappingSchema.HbmMapping mapDoc; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractPropertyContainerMapper : NHibernate.Mapping.ByCode.Impl.AbstractBasePropertyContainerMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + protected AbstractPropertyContainerMapper(System.Type container, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public virtual void Bag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public virtual void IdBag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public virtual void List(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public virtual void Map(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action keyMapping, System.Action mapping) => throw null; + public virtual void OneToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public virtual void Set(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.AccessorPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AccessorPropertyMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public AccessorPropertyMapper(System.Type declaringType, string propertyName, System.Action accesorValueSetter) => throw null; + public string PropertyName { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.AnyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnyMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAnyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public AnyMapper(System.Reflection.MemberInfo member, System.Type foreignIdType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmAny any, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public AnyMapper(System.Reflection.MemberInfo member, System.Type foreignIdType, NHibernate.Cfg.MappingSchema.HbmAny any, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Columns(System.Action idColumnMapping, System.Action classColumnMapping) => throw null; + public void IdType() => throw null; + public void IdType(System.Type idType) => throw null; + public void IdType(NHibernate.Type.IType idType) => throw null; + public void Index(string indexName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void MetaType() => throw null; + public void MetaType(System.Type metaType) => throw null; + public void MetaType(NHibernate.Type.IType metaType) => throw null; + public void MetaValue(object value, System.Type entityType) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.AnyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void AnyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAnyMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.BagMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BagMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IBagPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public BagMapper(System.Type ownerType, System.Type elementType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmBag mapping) => throw null; + public BagMapper(System.Type ownerType, System.Type elementType, NHibernate.Cfg.MappingSchema.HbmBag mapping) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public System.Type ElementType { get => throw null; set => throw null; } + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void OrderBy(System.Reflection.MemberInfo property) => throw null; + public System.Type OwnerType { get => throw null; set => throw null; } + public void Persister(System.Type persister) => throw null; + public void Schema(string schemaName) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.BagMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void BagMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IBagPropertiesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.CacheMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheMapper : NHibernate.Mapping.ByCode.ICacheMapper + { + public CacheMapper(NHibernate.Cfg.MappingSchema.HbmCache cacheMapping) => throw null; + public void Include(NHibernate.Mapping.ByCode.CacheInclude cacheInclude) => throw null; + public void Region(string regionName) => throw null; + public void Usage(NHibernate.Mapping.ByCode.CacheUsage cacheUsage) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CascadeConverter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CascadeConverter + { + public static string ToCascadeString(this NHibernate.Mapping.ByCode.Cascade source) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ClassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IClassMapper, NHibernate.Mapping.ByCode.IClassAttributesMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + public void Abstract(bool isAbstract) => throw null; + protected override void AddProperty(object property) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Catalog(string catalogName) => throw null; + public void Check(string check) => throw null; + public ClassMapper(System.Type rootClass, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc, System.Reflection.MemberInfo idProperty) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public void ComponentAsId(System.Reflection.MemberInfo idProperty, System.Action mapper) => throw null; + public void ComposedId(System.Action idPropertiesMapping) => throw null; + public void Discriminator(System.Action discriminatorMapping) => throw null; + public void DiscriminatorValue(object value) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Id(System.Reflection.MemberInfo idProperty, System.Action mapper) => throw null; + public void Id(System.Action mapper) => throw null; + public void Join(string splitGroupId, System.Action splitMapping) => throw null; + public System.Collections.Generic.Dictionary JoinMappers { get => throw null; } + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool isMutable) => throw null; + public void NaturalId(System.Action naturalIdMapping) => throw null; + public void OptimisticLock(NHibernate.Mapping.ByCode.OptimisticLockMode mode) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Polymorphism(NHibernate.Mapping.ByCode.PolymorphismType type) => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + public void Version(System.Reflection.MemberInfo versionProperty, System.Action versionMapping) => throw null; + public void Where(string whereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CollectionElementRelation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionElementRelation : NHibernate.Mapping.ByCode.ICollectionElementRelation + { + public CollectionElementRelation(System.Type collectionElementType, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc, System.Action elementRelationshipAssing) => throw null; + public void Component(System.Action mapping) => throw null; + public void Element(System.Action mapping) => throw null; + public void ManyToAny(System.Type idTypeOfMetaType, System.Action mapping) => throw null; + public void ManyToMany(System.Action mapping) => throw null; + public void OneToMany(System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CollectionIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionIdMapper : NHibernate.Mapping.ByCode.ICollectionIdMapper + { + public CollectionIdMapper(NHibernate.Cfg.MappingSchema.HbmCollectionId hbmId) => throw null; + public void Column(string name) => throw null; + public void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator, System.Action generatorMapping) => throw null; + public void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator) => throw null; + public void Length(int length) => throw null; + public void Type(NHibernate.Type.IIdentifierType persistentType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ColumnMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnMapper : NHibernate.Mapping.ByCode.IColumnMapper + { + public void Check(string checkConstraint) => throw null; + public ColumnMapper(NHibernate.Cfg.MappingSchema.HbmColumn mapping, string memberName) => throw null; + public void Default(object defaultValue) => throw null; + public void Index(string indexName) => throw null; + public void Length(int length) => throw null; + public void Name(string name) => throw null; + public void NotNullable(bool notnull) => throw null; + public void Precision(System.Int16 precision) => throw null; + public void Scale(System.Int16 scale) => throw null; + public void SqlType(string sqltype) => throw null; + public void Unique(bool unique) => throw null; + public void UniqueKey(string uniquekeyName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ColumnOrFormulaMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ColumnOrFormulaMapper : NHibernate.Mapping.ByCode.Impl.ColumnMapper, NHibernate.Mapping.ByCode.IColumnOrFormulaMapper, NHibernate.Mapping.ByCode.IColumnMapper + { + public ColumnOrFormulaMapper(NHibernate.Cfg.MappingSchema.HbmColumn columnMapping, string memberName, NHibernate.Cfg.MappingSchema.HbmFormula formulaMapping) : base(default(NHibernate.Cfg.MappingSchema.HbmColumn), default(string)) => throw null; + public void Formula(string formula) => throw null; + public static object[] GetItemsFor(System.Action[] columnOrFormulaMapper, string baseDefaultColumnName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentAsIdLikeComponentAttributesMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentAsIdLikeComponentAttributesMapper : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Class(System.Type componentType) => throw null; + public ComponentAsIdLikeComponentAttributesMapper(NHibernate.Mapping.ByCode.IComponentAsIdMapper realMapper) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Reflection.MemberInfo parent, System.Action parentMapping) => throw null; + public void Parent(System.Reflection.MemberInfo parent) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentAsIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentAsIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComponentAsIdMapper, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + protected void AddProperty(object property) => throw null; + public void Class(System.Type componentType) => throw null; + public ComponentAsIdMapper(System.Type componentType, System.Reflection.MemberInfo declaringTypeMember, NHibernate.Cfg.MappingSchema.HbmCompositeId id, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public NHibernate.Cfg.MappingSchema.HbmCompositeId CompositeId { get => throw null; } + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void UnsavedValue(NHibernate.Mapping.ByCode.UnsavedValueType unsavedValueType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentElementMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentElementMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentElementMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + protected void AddProperty(object property) => throw null; + public void Class(System.Type componentConcreteType) => throw null; + public void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public ComponentElementMapper(System.Type componentType, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc, NHibernate.Cfg.MappingSchema.HbmCompositeElement component) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Reflection.MemberInfo parent, System.Action parentMapping) => throw null; + public void Parent(System.Reflection.MemberInfo parent) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentMapKeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentMapKeyMapper : NHibernate.Mapping.ByCode.IComponentMapKeyMapper + { + protected void AddProperty(object property) => throw null; + public ComponentMapKeyMapper(System.Type componentType, NHibernate.Cfg.MappingSchema.HbmCompositeMapKey component, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public NHibernate.Cfg.MappingSchema.HbmCompositeMapKey CompositeMapKeyMapping { get => throw null; } + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + protected override void AddProperty(object property) => throw null; + public void Class(System.Type componentType) => throw null; + public ComponentMapper(NHibernate.Cfg.MappingSchema.HbmComponent component, System.Type componentType, System.Reflection.MemberInfo declaringTypeMember, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public ComponentMapper(NHibernate.Cfg.MappingSchema.HbmComponent component, System.Type componentType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void LazyGroup(string name) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Reflection.MemberInfo parent, System.Action parentMapping) => throw null; + public void Parent(System.Reflection.MemberInfo parent) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void ComponentMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAttributesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentNestedElementMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentNestedElementMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentElementMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + protected void AddProperty(object property) => throw null; + public void Class(System.Type componentConcreteType) => throw null; + public void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public ComponentNestedElementMapper(System.Type componentType, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc, NHibernate.Cfg.MappingSchema.HbmNestedCompositeElement component, System.Reflection.MemberInfo declaringComponentMember) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Reflection.MemberInfo parent, System.Action parentMapping) => throw null; + public void Parent(System.Reflection.MemberInfo parent) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComponentParentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentParentMapper : NHibernate.Mapping.ByCode.IComponentParentMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public ComponentParentMapper(NHibernate.Cfg.MappingSchema.HbmParent parent, System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ComposedIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComposedIdMapper : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComposedIdMapper + { + protected void AddProperty(object property) => throw null; + public NHibernate.Cfg.MappingSchema.HbmCompositeId ComposedId { get => throw null; } + public ComposedIdMapper(System.Type container, NHibernate.Cfg.MappingSchema.HbmCompositeId id, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CustomizersHolder : NHibernate.Mapping.ByCode.Impl.ICustomizersHolder + { + public void AddCustomizer(System.Type type, System.Action classCustomizer) => throw null; + public void AddCustomizer(System.Type type, System.Action classCustomizer) => throw null; + public void AddCustomizer(System.Type type, System.Action classCustomizer) => throw null; + public void AddCustomizer(System.Type type, System.Action joinCustomizer) => throw null; + public void AddCustomizer(System.Type type, System.Action classCustomizer) => throw null; + public void AddCustomizer(System.Type type, System.Action classCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationOneToManyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action mapKeyElementCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action mapKeyManyToManyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationManyToManyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationManyToAnyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationElementCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer) => throw null; + public CustomizersHolder() => throw null; + public System.Collections.Generic.IEnumerable GetAllCustomizedEntities() => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper mapper) => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.ISubclassMapper mapper) => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper mapper) => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IJoinAttributesMapper mapper) => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper) => throw null; + public void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IClassMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.ISetPropertiesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IPropertyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToOneMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToManyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapPropertiesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToOneMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToManyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToAnyMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IListPropertiesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IIdBagPropertiesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IElementMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IBagPropertiesMapper mapper) => throw null; + public void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAnyMapper mapper) => throw null; + public void Merge(NHibernate.Mapping.ByCode.Impl.CustomizersHolder source) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.DefaultCandidatePersistentMembersProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultCandidatePersistentMembersProvider : NHibernate.Mapping.ByCode.Impl.ICandidatePersistentMembersProvider + { + public DefaultCandidatePersistentMembersProvider() => throw null; + public System.Collections.Generic.IEnumerable GetComponentMembers(System.Type componentClass) => throw null; + public System.Collections.Generic.IEnumerable GetEntityMembersForPoid(System.Type entityClass) => throw null; + public System.Collections.Generic.IEnumerable GetRootEntityMembers(System.Type entityClass) => throw null; + public System.Collections.Generic.IEnumerable GetSubEntityMembers(System.Type entityClass, System.Type entitySuperclass) => throw null; + protected System.Collections.Generic.IEnumerable GetUserDeclaredFields(System.Type type) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.DiscriminatorMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DiscriminatorMapper : NHibernate.Mapping.ByCode.IDiscriminatorMapper + { + public void Column(string column) => throw null; + public void Column(System.Action columnMapper) => throw null; + public DiscriminatorMapper(NHibernate.Cfg.MappingSchema.HbmDiscriminator discriminatorMapping) => throw null; + public void Force(bool force) => throw null; + public void Formula(string formula) => throw null; + public void Insert(bool applyOnInsert) => throw null; + public void Length(int length) => throw null; + public void NotNullable(bool isNotNullable) => throw null; + public void Type() where TPersistentType : NHibernate.Type.IDiscriminatorType => throw null; + public void Type(System.Type persistentType) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + public void Type(NHibernate.Type.IDiscriminatorType persistentType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.DynamicComponentMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicComponentMapper : NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IDynamicComponentMapper, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + protected void AddProperty(object property) => throw null; + public void Any(System.Reflection.MemberInfo property, System.Type idTypeOfMetaType, System.Action mapping) => throw null; + public void Bag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Component(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public DynamicComponentMapper(NHibernate.Cfg.MappingSchema.HbmDynamicComponent component, System.Reflection.MemberInfo declaringTypeMember, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void IdBag(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void List(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public void ManyToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Map(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action keyMapping, System.Action mapping) => throw null; + public void OneToOne(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Property(System.Reflection.MemberInfo property, System.Action mapping) => throw null; + public void Set(System.Reflection.MemberInfo property, System.Action collectionMapping, System.Action mapping) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ElementMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ElementMapper : NHibernate.Mapping.ByCode.IElementMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public ElementMapper(System.Type elementType, NHibernate.Cfg.MappingSchema.HbmElement elementMapping) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Length(int length) => throw null; + public void NotNullable(bool notnull) => throw null; + public void Precision(System.Int16 precision) => throw null; + public void Scale(System.Int16 scale) => throw null; + public void Type(object parameters) => throw null; + public void Type() => throw null; + public void Type(System.Type persistentType, object parameters) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + public void Unique(bool unique) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ElementMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void ElementMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IElementMapper collectionRelationElementCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.ExplicitDeclarationsHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ExplicitDeclarationsHolder : NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder + { + public void AddAsAny(System.Reflection.MemberInfo member) => throw null; + public void AddAsArray(System.Reflection.MemberInfo member) => throw null; + public void AddAsBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsComponent(System.Type type) => throw null; + public void AddAsDynamicComponent(System.Reflection.MemberInfo member, System.Type componentTemplate) => throw null; + public void AddAsIdBag(System.Reflection.MemberInfo member) => throw null; + public void AddAsList(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToAnyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyItemRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToManyKeyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsManyToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsMap(System.Reflection.MemberInfo member) => throw null; + public void AddAsNaturalId(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToManyRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsOneToOneRelation(System.Reflection.MemberInfo member) => throw null; + public void AddAsPartOfComposedId(System.Reflection.MemberInfo member) => throw null; + public void AddAsPersistentMember(System.Reflection.MemberInfo member) => throw null; + public void AddAsPoid(System.Reflection.MemberInfo member) => throw null; + public void AddAsProperty(System.Reflection.MemberInfo member) => throw null; + public void AddAsPropertySplit(NHibernate.Mapping.ByCode.SplitDefinition definition) => throw null; + public void AddAsRootEntity(System.Type type) => throw null; + public void AddAsSet(System.Reflection.MemberInfo member) => throw null; + public void AddAsTablePerClassEntity(System.Type type) => throw null; + public void AddAsTablePerClassHierarchyEntity(System.Type type) => throw null; + public void AddAsTablePerConcreteClassEntity(System.Type type) => throw null; + public void AddAsVersionProperty(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable Any { get => throw null; } + public System.Collections.Generic.IEnumerable Arrays { get => throw null; } + public System.Collections.Generic.IEnumerable Bags { get => throw null; } + public System.Collections.Generic.IEnumerable Components { get => throw null; } + public System.Collections.Generic.IEnumerable ComposedIds { get => throw null; } + public System.Collections.Generic.IEnumerable Dictionaries { get => throw null; } + public System.Collections.Generic.IEnumerable DynamicComponents { get => throw null; } + public ExplicitDeclarationsHolder() => throw null; + public System.Type GetDynamicComponentTemplate(System.Reflection.MemberInfo member) => throw null; + public string GetSplitGroupFor(System.Reflection.MemberInfo member) => throw null; + public System.Collections.Generic.IEnumerable GetSplitGroupsFor(System.Type type) => throw null; + public System.Collections.Generic.IEnumerable IdBags { get => throw null; } + public System.Collections.Generic.IEnumerable ItemManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable KeyManyToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable Lists { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToAnyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable ManyToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable NaturalIds { get => throw null; } + public System.Collections.Generic.IEnumerable OneToManyRelations { get => throw null; } + public System.Collections.Generic.IEnumerable OneToOneRelations { get => throw null; } + public System.Collections.Generic.IEnumerable PersistentMembers { get => throw null; } + public System.Collections.Generic.IEnumerable Poids { get => throw null; } + public System.Collections.Generic.IEnumerable Properties { get => throw null; } + public System.Collections.Generic.IEnumerable RootEntities { get => throw null; } + public System.Collections.Generic.IEnumerable Sets { get => throw null; } + public System.Collections.Generic.IEnumerable SplitDefinitions { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerClassHierarchyEntities { get => throw null; } + public System.Collections.Generic.IEnumerable TablePerConcreteClassEntities { get => throw null; } + public System.Collections.Generic.IEnumerable VersionProperties { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.FilterMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterMapper : NHibernate.Mapping.ByCode.IFilterMapper + { + public void Condition(string sqlCondition) => throw null; + public FilterMapper(string filterName, NHibernate.Cfg.MappingSchema.HbmFilter filter) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.GeneratorMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GeneratorMapper : NHibernate.Mapping.ByCode.IGeneratorMapper + { + public GeneratorMapper(NHibernate.Cfg.MappingSchema.HbmGenerator generator) => throw null; + public void Params(object generatorParameters) => throw null; + public void Params(System.Collections.Generic.IDictionary generatorParameters) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ICandidatePersistentMembersProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICandidatePersistentMembersProvider + { + System.Collections.Generic.IEnumerable GetComponentMembers(System.Type componentClass); + System.Collections.Generic.IEnumerable GetEntityMembersForPoid(System.Type entityClass); + System.Collections.Generic.IEnumerable GetRootEntityMembers(System.Type entityClass); + System.Collections.Generic.IEnumerable GetSubEntityMembers(System.Type entityClass, System.Type entitySuperclass); + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ICustomizersHolder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICustomizersHolder + { + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(System.Type type, System.Action classCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationOneToManyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action mapKeyElementCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action mapKeyManyToManyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationManyToManyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationManyToAnyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action collectionRelationElementCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + void AddCustomizer(NHibernate.Mapping.ByCode.PropertyPath member, System.Action propertyCustomizer); + System.Collections.Generic.IEnumerable GetAllCustomizedEntities(); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper mapper); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.ISubclassMapper mapper); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper mapper); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IJoinAttributesMapper mapper); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper); + void InvokeCustomizers(System.Type type, NHibernate.Mapping.ByCode.IClassMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.ISetPropertiesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IPropertyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToOneMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToManyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapPropertiesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToOneMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToManyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToAnyMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IListPropertiesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IIdBagPropertiesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IElementMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAttributesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IBagPropertiesMapper mapper); + void InvokeCustomizers(NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IAnyMapper mapper); + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.IdBagMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdBagMapper : NHibernate.Mapping.ByCode.IIdBagPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public System.Type ElementType { get => throw null; set => throw null; } + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Id(System.Action idMapping) => throw null; + public IdBagMapper(System.Type ownerType, System.Type elementType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmIdbag mapping) => throw null; + public IdBagMapper(System.Type ownerType, System.Type elementType, NHibernate.Cfg.MappingSchema.HbmIdbag mapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void OrderBy(System.Reflection.MemberInfo property) => throw null; + public System.Type OwnerType { get => throw null; set => throw null; } + public void Persister(System.Type persister) => throw null; + public void Schema(string schemaName) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.IdBagMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void IdBagMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IIdBagPropertiesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.IdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdMapper : NHibernate.Mapping.ByCode.IIdMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator, System.Action generatorMapping) => throw null; + public void Generator(NHibernate.Mapping.ByCode.IGeneratorDef generator) => throw null; + public IdMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmId hbmId) => throw null; + public IdMapper(NHibernate.Cfg.MappingSchema.HbmId hbmId) => throw null; + public void Length(int length) => throw null; + public void Type(System.Type persistentType, object parameters) => throw null; + public void Type(NHibernate.Type.IIdentifierType persistentType) => throw null; + public void UnsavedValue(object value) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.JoinMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinMapper, NHibernate.Mapping.ByCode.IJoinAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + protected override void AddProperty(object property) => throw null; + public void Catalog(string catalogName) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public void Inverse(bool value) => throw null; + public JoinMapper(System.Type container, string splitGroupId, NHibernate.Cfg.MappingSchema.HbmJoin hbmJoin, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Optional(bool isOptional) => throw null; + public void Schema(string schemaName) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public event NHibernate.Mapping.ByCode.Impl.TableNameChangedHandler TableNameChanged; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.JoinedSubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinedSubclassMapper, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + public void Abstract(bool isAbstract) => throw null; + protected override void AddProperty(object property) => throw null; + public void BatchSize(int value) => throw null; + public void Catalog(string catalogName) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public JoinedSubclassMapper(System.Type subClass, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.JoinedSubclassMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void JoinedSubclassMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper joinedSubclassCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.KeyManyToOneMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class KeyManyToOneMapper : NHibernate.Mapping.ByCode.IManyToOneMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Class(System.Type entityType) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void EntityName(string entityName) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Index(string indexName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public KeyManyToOneMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmKeyManyToOne manyToOne, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void PropertyRef(string propertyReferencedName) => throw null; + public void Unique(bool unique) => throw null; + public void UniqueKey(string uniquekeyName) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.KeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class KeyMapper : NHibernate.Mapping.ByCode.IKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public static string DefaultColumnName(System.Type ownerEntityType) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public KeyMapper(System.Type ownerEntityType, NHibernate.Cfg.MappingSchema.HbmKey mapping) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction) => throw null; + public void PropertyRef(System.Reflection.MemberInfo property) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.KeyPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class KeyPropertyMapper : NHibernate.Mapping.ByCode.IPropertyMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void Formula(string formula) => throw null; + public void Generated(NHibernate.Mapping.ByCode.PropertyGeneration generation) => throw null; + public void Index(string indexName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public KeyPropertyMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmKeyProperty propertyMapping) => throw null; + public void Lazy(bool isLazy) => throw null; + public void Length(int length) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Precision(System.Int16 precision) => throw null; + public void Scale(System.Int16 scale) => throw null; + public void Type(object parameters) => throw null; + public void Type() => throw null; + public void Type(System.Type persistentType, object parameters) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + public void Unique(bool unique) => throw null; + public void UniqueKey(string uniquekeyName) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ListIndexMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ListIndexMapper : NHibernate.Mapping.ByCode.IListIndexMapper + { + public void Base(int baseIndex) => throw null; + public void Column(string columnName) => throw null; + public void Column(System.Action columnMapper) => throw null; + public ListIndexMapper(System.Type ownerEntityType, NHibernate.Cfg.MappingSchema.HbmListIndex mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ListMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ListMapper : NHibernate.Mapping.ByCode.IListPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public System.Type ElementType { get => throw null; set => throw null; } + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Index(System.Action listIndexMapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public ListMapper(System.Type ownerType, System.Type elementType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmList mapping) => throw null; + public ListMapper(System.Type ownerType, System.Type elementType, NHibernate.Cfg.MappingSchema.HbmList mapping) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void OrderBy(System.Reflection.MemberInfo property) => throw null; + public System.Type OwnerType { get => throw null; set => throw null; } + public void Persister(System.Type persister) => throw null; + public void Schema(string schemaName) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ListMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void ListMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IListPropertiesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.ManyToAnyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToAnyMapper : NHibernate.Mapping.ByCode.IManyToAnyMapper + { + public void Columns(System.Action idColumnMapping, System.Action classColumnMapping) => throw null; + public void IdType() => throw null; + public void IdType(System.Type idType) => throw null; + public void IdType(NHibernate.Type.IType idType) => throw null; + public ManyToAnyMapper(System.Type elementType, System.Type foreignIdType, NHibernate.Cfg.MappingSchema.HbmManyToAny manyToAny, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void MetaType() => throw null; + public void MetaType(System.Type metaType) => throw null; + public void MetaType(NHibernate.Type.IType metaType) => throw null; + public void MetaValue(object value, System.Type entityType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ManyToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToManyMapper : NHibernate.Mapping.ByCode.IManyToManyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper + { + public void Class(System.Type entityType) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public void EntityName(string entityName) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation) => throw null; + public ManyToManyMapper(System.Type elementType, NHibernate.Cfg.MappingSchema.HbmManyToMany manyToMany, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ManyToManyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void ManyToManyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToManyMapper collectionRelationManyToManyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.ManyToOneMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToOneMapper : NHibernate.Mapping.ByCode.IManyToOneMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Class(System.Type entityType) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public void EntityName(string entityName) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Index(string indexName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation) => throw null; + public ManyToOneMapper(System.Reflection.MemberInfo member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorPropertyMapper, NHibernate.Cfg.MappingSchema.HbmManyToOne manyToOne, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public ManyToOneMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmManyToOne manyToOne, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void PropertyRef(string propertyReferencedName) => throw null; + public void Unique(bool unique) => throw null; + public void UniqueKey(string uniquekeyName) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.ManyToOneMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void ManyToOneMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IManyToOneMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapKeyManyToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyManyToManyMapper : NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public MapKeyManyToManyMapper(NHibernate.Cfg.MappingSchema.HbmMapKeyManyToMany mapping) => throw null; + public NHibernate.Cfg.MappingSchema.HbmMapKeyManyToMany MapKeyManyToManyMapping { get => throw null; } + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapKeyManyToManyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void MapKeyManyToManyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper mapKeyManyToManyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapKeyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyMapper : NHibernate.Mapping.ByCode.IMapKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Length(int length) => throw null; + public MapKeyMapper(NHibernate.Cfg.MappingSchema.HbmMapKey hbmMapKey) => throw null; + public NHibernate.Cfg.MappingSchema.HbmMapKey MapKeyMapping { get => throw null; } + public void Type() => throw null; + public void Type(System.Type persistentType) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapKeyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void MapKeyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapKeyMapper mapKeyElementCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapKeyRelation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyRelation : NHibernate.Mapping.ByCode.IMapKeyRelation + { + public void Component(System.Action mapping) => throw null; + public void Element(System.Action mapping) => throw null; + public void ManyToMany(System.Action mapping) => throw null; + public MapKeyRelation(System.Type dictionaryKeyType, NHibernate.Cfg.MappingSchema.HbmMap mapMapping, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapMapper : NHibernate.Mapping.ByCode.IMapPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action keyMapping) => throw null; + public System.Type KeyType { get => throw null; set => throw null; } + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public void Loader(string namedQueryReference) => throw null; + public MapMapper(System.Type ownerType, System.Type keyType, System.Type valueType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmMap mapping, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public MapMapper(System.Type ownerType, System.Type keyType, System.Type valueType, NHibernate.Cfg.MappingSchema.HbmMap mapping, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void OrderBy(System.Reflection.MemberInfo property) => throw null; + public System.Type OwnerType { get => throw null; set => throw null; } + public void Persister(System.Type persister) => throw null; + public void Schema(string schemaName) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public System.Type ValueType { get => throw null; set => throw null; } + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.MapMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void MapMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IMapPropertiesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.NaturalIdMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NaturalIdMapper : NHibernate.Mapping.ByCode.Impl.AbstractBasePropertyContainerMapper, NHibernate.Mapping.ByCode.INaturalIdMapper, NHibernate.Mapping.ByCode.INaturalIdAttributesMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + protected override void AddProperty(object property) => throw null; + public void Mutable(bool isMutable) => throw null; + public NaturalIdMapper(System.Type rootClass, NHibernate.Cfg.MappingSchema.HbmClass classMapping, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.NoMemberPropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoMemberPropertyMapper : NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public NoMemberPropertyMapper() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.OneToManyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToManyMapper : NHibernate.Mapping.ByCode.IOneToManyMapper + { + public void Class(System.Type entityType) => throw null; + public void EntityName(string entityName) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public OneToManyMapper(System.Type collectionElementType, NHibernate.Cfg.MappingSchema.HbmOneToMany oneToManyMapping, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.OneToManyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void OneToManyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToManyMapper collectionRelationOneToManyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.OneToOneMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToOneMapper : NHibernate.Mapping.ByCode.IOneToOneMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Class(System.Type clazz) => throw null; + public void Constrained(bool value) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation) => throw null; + public OneToOneMapper(System.Reflection.MemberInfo member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOne) => throw null; + public OneToOneMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOne) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void PropertyReference(System.Reflection.MemberInfo propertyInTheOtherSide) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.OneToOneMapper<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToOneMapper : NHibernate.Mapping.ByCode.Impl.OneToOneMapper, NHibernate.Mapping.ByCode.IOneToOneMapper, NHibernate.Mapping.ByCode.IOneToOneMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public OneToOneMapper(System.Reflection.MemberInfo member, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOne) : base(default(System.Reflection.MemberInfo), default(NHibernate.Cfg.MappingSchema.HbmOneToOne)) => throw null; + public OneToOneMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmOneToOne oneToOne) : base(default(System.Reflection.MemberInfo), default(NHibernate.Cfg.MappingSchema.HbmOneToOne)) => throw null; + public void PropertyReference(System.Linq.Expressions.Expression> reference) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.OneToOneMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void OneToOneMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IOneToOneMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.PropertyMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyMapper : NHibernate.Mapping.ByCode.IPropertyMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IColumnsAndFormulasMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ColumnsAndFormulas(params System.Action[] columnOrFormulaMapper) => throw null; + public void FetchGroup(string name) => throw null; + public void Formula(string formula) => throw null; + public void Formulas(params string[] formulas) => throw null; + public void Generated(NHibernate.Mapping.ByCode.PropertyGeneration generation) => throw null; + public void Index(string indexName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void Length(int length) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Precision(System.Int16 precision) => throw null; + public PropertyMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmProperty propertyMapping, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper) => throw null; + public PropertyMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmProperty propertyMapping) => throw null; + public void Scale(System.Int16 scale) => throw null; + public void Type(object parameters) => throw null; + public void Type() => throw null; + public void Type(System.Type persistentType, object parameters) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + public void Unique(bool unique) => throw null; + public void UniqueKey(string uniquekeyName) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.PropertyMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void PropertyMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.IPropertyMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.RootClassMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void RootClassMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.IClassAttributesMapper classCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.SetMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SetMapper : NHibernate.Mapping.ByCode.ISetPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public System.Type ElementType { get => throw null; set => throw null; } + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action keyMapping) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void OrderBy(System.Reflection.MemberInfo property) => throw null; + public System.Type OwnerType { get => throw null; set => throw null; } + public void Persister(System.Type persister) => throw null; + public void Schema(string schemaName) => throw null; + public SetMapper(System.Type ownerType, System.Type elementType, NHibernate.Mapping.ByCode.IAccessorPropertyMapper accessorMapper, NHibernate.Cfg.MappingSchema.HbmSet mapping) => throw null; + public SetMapper(System.Type ownerType, System.Type elementType, NHibernate.Cfg.MappingSchema.HbmSet mapping) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.SetMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SetMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, NHibernate.Mapping.ByCode.PropertyPath member, NHibernate.Mapping.ByCode.ISetPropertiesMapper propertyCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.SubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubclassMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.ISubclassMapper, NHibernate.Mapping.ByCode.ISubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + public void Abstract(bool isAbstract) => throw null; + protected override void AddProperty(object property) => throw null; + public void BatchSize(int value) => throw null; + public void DiscriminatorValue(object value) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Join(string splitGroupId, System.Action splitMapping) => throw null; + public System.Collections.Generic.Dictionary JoinMappers { get => throw null; } + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public SubclassMapper(System.Type subClass, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.SubclassMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void SubclassMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.ISubclassAttributesMapper subclassCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.TableNameChangedEventArgs` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TableNameChangedEventArgs + { + public string NewName { get => throw null; set => throw null; } + public string OldName { get => throw null; set => throw null; } + public TableNameChangedEventArgs(string oldName, string newName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.TableNameChangedHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void TableNameChangedHandler(NHibernate.Mapping.ByCode.IJoinMapper mapper, NHibernate.Mapping.ByCode.Impl.TableNameChangedEventArgs args); + + // Generated from `NHibernate.Mapping.ByCode.Impl.TypeNameUtil` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TypeNameUtil + { + public static string GetNhTypeName(this System.Type type) => throw null; + public static string GetShortClassName(this System.Type type, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.UnionSubclassMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclassMapper : NHibernate.Mapping.ByCode.Impl.AbstractPropertyContainerMapper, NHibernate.Mapping.ByCode.IUnionSubclassMapper, NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper + { + public void Abstract(bool isAbstract) => throw null; + protected override void AddProperty(object property) => throw null; + public void BatchSize(int value) => throw null; + public void Catalog(string catalogName) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + public UnionSubclassMapper(System.Type subClass, NHibernate.Cfg.MappingSchema.HbmMapping mapDoc) : base(default(System.Type), default(NHibernate.Cfg.MappingSchema.HbmMapping)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.UnionSubclassMappingHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate void UnionSubclassMappingHandler(NHibernate.Mapping.ByCode.IModelInspector modelInspector, System.Type type, NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper unionSubclassCustomizer); + + // Generated from `NHibernate.Mapping.ByCode.Impl.VersionMapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VersionMapper : NHibernate.Mapping.ByCode.IVersionMapper, NHibernate.Mapping.ByCode.IColumnsMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void Generated(NHibernate.Mapping.ByCode.VersionGeneration generatedByDb) => throw null; + public void Insert(bool useInInsert) => throw null; + public void Type() where TPersistentType : NHibernate.UserTypes.IUserVersionType => throw null; + public void Type(System.Type persistentType) => throw null; + public void Type(NHibernate.Type.IVersionType persistentType) => throw null; + public void UnsavedValue(object value) => throw null; + public VersionMapper(System.Reflection.MemberInfo member, NHibernate.Cfg.MappingSchema.HbmVersion hbmVersion) => throw null; + } + + namespace CustomizersImpl + { + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.BagPropertiesCustomizer<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BagPropertiesCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IBagPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public BagPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.PropertyPath), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ClassCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.IConformistHoldersProvider, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IClassMapper, NHibernate.Mapping.ByCode.IClassAttributesMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public void Abstract(bool isAbstract) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Catalog(string catalogName) => throw null; + public void Check(string tableName) => throw null; + public ClassCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public void ComponentAsId(string notVisiblePropertyOrFieldName, System.Action> idMapper) => throw null; + public void ComponentAsId(string notVisiblePropertyOrFieldName) => throw null; + public void ComponentAsId(System.Linq.Expressions.Expression> idProperty, System.Action> idMapper) => throw null; + public void ComponentAsId(System.Linq.Expressions.Expression> idProperty) => throw null; + public void ComposedId(System.Action> idPropertiesMapping) => throw null; + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.CustomizersHolder { get => throw null; } + public void Discriminator(System.Action discriminatorMapping) => throw null; + public void DiscriminatorValue(object value) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.ExplicitDeclarationsHolder { get => throw null; } + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Id(System.Linq.Expressions.Expression> idProperty, System.Action idMapper) => throw null; + public void Id(System.Linq.Expressions.Expression> idProperty) => throw null; + public void Id(string notVisiblePropertyOrFieldName, System.Action idMapper) => throw null; + public void Join(string splitGroupId, System.Action> splitMapping) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool isMutable) => throw null; + public void NaturalId(System.Action> naturalIdPropertiesMapping, System.Action naturalIdMapping) => throw null; + public void NaturalId(System.Action> naturalIdPropertiesMapping) => throw null; + public void OptimisticLock(NHibernate.Mapping.ByCode.OptimisticLockMode mode) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Polymorphism(NHibernate.Mapping.ByCode.PolymorphismType type) => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + public void Version(System.Linq.Expressions.Expression> versionProperty, System.Action versionMapping) => throw null; + public void Version(string notVisiblePropertyOrFieldName, System.Action versionMapping) => throw null; + public void Where(string whereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionElementCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionElementCustomizer : NHibernate.Mapping.ByCode.IElementMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public CollectionElementCustomizer(NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + public void Formula(string formula) => throw null; + public void Length(int length) => throw null; + public void NotNullable(bool notnull) => throw null; + public void Precision(System.Int16 precision) => throw null; + public void Scale(System.Int16 scale) => throw null; + public void Type(object parameters) => throw null; + public void Type() => throw null; + public void Type(System.Type persistentType, object parameters) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + public void Unique(bool unique) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionElementRelationCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionElementRelationCustomizer : NHibernate.Mapping.ByCode.ICollectionElementRelation + { + public CollectionElementRelationCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void Component(System.Action> mapping) => throw null; + public void Element(System.Action mapping) => throw null; + public void Element() => throw null; + public void ManyToAny(System.Action mapping) => throw null; + public void ManyToAny(System.Type idTypeOfMetaType, System.Action mapping) => throw null; + public void ManyToMany(System.Action mapping) => throw null; + public void ManyToMany() => throw null; + public void OneToMany(System.Action mapping) => throw null; + public void OneToMany() => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionKeyCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionKeyCustomizer : NHibernate.Mapping.ByCode.IKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public CollectionKeyCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void Column(string columnName) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + public void ForeignKey(string foreignKeyName) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction) => throw null; + public void PropertyRef(System.Linq.Expressions.Expression> propertyGetter) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionPropertiesCustomizer : NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void BatchSize(int value) => throw null; + public void Cache(System.Action cacheMapping) => throw null; + public void Cascade(NHibernate.Mapping.ByCode.Cascade cascadeStyle) => throw null; + public void Catalog(string catalogName) => throw null; + public CollectionPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + public void Fetch(NHibernate.Mapping.ByCode.CollectionFetchMode fetchMode) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Inverse(bool value) => throw null; + public void Key(System.Action> keyMapping) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.CollectionLazy collectionLazy) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Mutable(bool value) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void OrderBy(System.Linq.Expressions.Expression> property) => throw null; + public void OrderBy(string sqlOrderByClause) => throw null; + public void Persister() where TPersister : NHibernate.Persister.Collection.ICollectionPersister => throw null; + public NHibernate.Mapping.ByCode.PropertyPath PropertyPath { get => throw null; set => throw null; } + public void Schema(string schemaName) => throw null; + public void Sort() => throw null; + public void Sort() => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlDeleteAll(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + public void Type() where TCollection : NHibernate.UserTypes.IUserCollectionType => throw null; + public void Type(string collectionType) => throw null; + public void Type(System.Type collectionType) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ComponentAsIdCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentAsIdCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComponentAsIdMapper, NHibernate.Mapping.ByCode.IComponentAsIdAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Class() where TConcrete : TComponent => throw null; + public ComponentAsIdCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public void UnsavedValue(NHibernate.Mapping.ByCode.UnsavedValueType unsavedValueType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ComponentCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IConformistHoldersProvider, NHibernate.Mapping.ByCode.IComponentMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Class() where TConcrete : TComponent => throw null; + public ComponentCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public ComponentCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.CustomizersHolder { get => throw null; } + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.ExplicitDeclarationsHolder { get => throw null; } + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void LazyGroup(string name) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Linq.Expressions.Expression> parent, System.Action parentMapping) where TProperty : class => throw null; + public void Parent(System.Linq.Expressions.Expression> parent) where TProperty : class => throw null; + public void Parent(string notVisiblePropertyOrFieldName, System.Action parentMapping) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ComponentElementCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentElementCustomizer : NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IComponentElementMapper, NHibernate.Mapping.ByCode.IComponentAttributesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public void Class() where TConcrete : TComponent => throw null; + public void Component(string notVisiblePropertyOrFieldName, System.Action> mapping) where TNestedComponent : class => throw null; + public void Component(System.Linq.Expressions.Expression> property, System.Action> mapping) where TNestedComponent : class => throw null; + public ComponentElementCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public static System.Reflection.MemberInfo GetPropertyOrFieldMatchingNameOrThrow(string memberName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void Lazy(bool isLazy) => throw null; + public void LazyGroup(string name) => throw null; + public void ManyToOne(string notVisiblePropertyOrFieldName, System.Action mapping) where TProperty : class => throw null; + public void ManyToOne(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + public void ManyToOne(System.Linq.Expressions.Expression> property) where TProperty : class => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Parent(System.Linq.Expressions.Expression> parent, System.Action parentMapping) where TProperty : class => throw null; + public void Parent(System.Linq.Expressions.Expression> parent) where TProperty : class => throw null; + public void Parent(string notVisiblePropertyOrFieldName, System.Action parentMapping) => throw null; + public void Property(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + public void Property(System.Linq.Expressions.Expression> property) => throw null; + public void Property(string notVisiblePropertyOrFieldName, System.Action mapping) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ComposedIdCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComposedIdCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IComposedIdMapper where TEntity : class + { + public ComposedIdCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + protected override void RegisterManyToOneMapping(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + protected override void RegisterPropertyMapping(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.DynamicComponentCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicComponentCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.IDynamicComponentMapper, NHibernate.Mapping.ByCode.IDynamicComponentAttributesMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Access(System.Type accessorType) => throw null; + public void Access(NHibernate.Mapping.ByCode.Accessor accessor) => throw null; + public DynamicComponentCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + internal DynamicComponentCustomizer(System.Type componentType, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + protected override System.Reflection.MemberInfo GetRequiredPropertyOrFieldByName(string memberName) => throw null; + public void Insert(bool consideredInInsertQuery) => throw null; + public void OptimisticLock(bool takeInConsiderationForOptimisticLock) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.IdBagPropertiesCustomizer<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdBagPropertiesCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer, NHibernate.Mapping.ByCode.IIdBagPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Id(System.Action idMapping) => throw null; + public IdBagPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.PropertyPath), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.JoinCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinMapper, NHibernate.Mapping.ByCode.IJoinAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public void Catalog(string catalogName) => throw null; + public void Fetch(NHibernate.Mapping.ByCode.FetchKind fetchMode) => throw null; + public void Inverse(bool value) => throw null; + public JoinCustomizer(string splitGroupId, NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public void Key(System.Action> keyMapping) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Optional(bool isOptional) => throw null; + protected override void RegisterAnyMapping(System.Linq.Expressions.Expression> property, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class => throw null; + protected override void RegisterBagMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected override void RegisterComponentMapping(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + protected override void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + protected override void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression>> property, System.Action> mapping) where TComponent : class => throw null; + protected override void RegisterIdBagMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected override void RegisterListMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected override void RegisterManyToOneMapping(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + protected override void RegisterMapMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping) => throw null; + protected override void RegisterNoVisiblePropertyMapping(string notVisiblePropertyOrFieldName, System.Action mapping) => throw null; + protected override void RegisterPropertyMapping(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + protected override void RegisterSetMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Schema(string schemaName) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Table(string tableName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.JoinKeyCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinKeyCustomizer : NHibernate.Mapping.ByCode.IKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper where TEntity : class + { + public void Column(string columnName) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + public void ForeignKey(string foreignKeyName) => throw null; + public JoinKeyCustomizer(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction) => throw null; + public void PropertyRef(System.Linq.Expressions.Expression> propertyGetter) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.JoinedSubclassCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IJoinedSubclassMapper, NHibernate.Mapping.ByCode.IJoinedSubclassAttributesMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.IConformistHoldersProvider, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public void Abstract(bool isAbstract) => throw null; + public void BatchSize(int value) => throw null; + public void Catalog(string catalogName) => throw null; + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.CustomizersHolder { get => throw null; } + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.ExplicitDeclarationsHolder { get => throw null; } + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public JoinedSubclassCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public void Key(System.Action> keyMapping) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SchemaAction(NHibernate.Mapping.ByCode.SchemaAction action) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.JoinedSubclassKeyCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassKeyCustomizer : NHibernate.Mapping.ByCode.IKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper where TEntity : class + { + public void Column(string columnName) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + public void ForeignKey(string foreignKeyName) => throw null; + public JoinedSubclassKeyCustomizer(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void NotNullable(bool notnull) => throw null; + public void OnDelete(NHibernate.Mapping.ByCode.OnDeleteAction deleteAction) => throw null; + public void PropertyRef(System.Linq.Expressions.Expression> propertyGetter) => throw null; + public void Unique(bool unique) => throw null; + public void Update(bool consideredInUpdateQuery) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ListPropertiesCustomizer<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ListPropertiesCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer, NHibernate.Mapping.ByCode.IListPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public void Index(System.Action listIndexMapping) => throw null; + public ListPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.PropertyPath), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ManyToAnyCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToAnyCustomizer : NHibernate.Mapping.ByCode.IManyToAnyMapper + { + public void Columns(System.Action idColumnMapping, System.Action classColumnMapping) => throw null; + public void IdType() => throw null; + public void IdType(System.Type idType) => throw null; + public void IdType(NHibernate.Type.IType idType) => throw null; + public ManyToAnyCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void MetaType() => throw null; + public void MetaType(System.Type metaType) => throw null; + public void MetaType(NHibernate.Type.IType metaType) => throw null; + public void MetaValue(object value, System.Type entityType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.ManyToManyCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToManyCustomizer : NHibernate.Mapping.ByCode.IManyToManyMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public void Class(System.Type entityType) => throw null; + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void EntityName(string entityName) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public void Lazy(NHibernate.Mapping.ByCode.LazyRelation lazyRelation) => throw null; + public ManyToManyCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public void Where(string sqlWhereClause) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.MapKeyComponentCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyComponentCustomizer : NHibernate.Mapping.ByCode.IComponentMapKeyMapper + { + public void ManyToOne(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + public MapKeyComponentCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void Property(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + public void Property(System.Linq.Expressions.Expression> property) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.MapKeyCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyCustomizer : NHibernate.Mapping.ByCode.IMapKeyMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void Formula(string formula) => throw null; + public void Length(int length) => throw null; + public MapKeyCustomizer(NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + public void Type() => throw null; + public void Type(System.Type persistentType) => throw null; + public void Type(NHibernate.Type.IType persistentType) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.MapKeyManyToManyCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyManyToManyCustomizer : NHibernate.Mapping.ByCode.IMapKeyManyToManyMapper, NHibernate.Mapping.ByCode.IColumnsMapper + { + public void Column(string name) => throw null; + public void Column(System.Action columnMapper) => throw null; + public void Columns(params System.Action[] columnMapper) => throw null; + public void ForeignKey(string foreignKeyName) => throw null; + public void Formula(string formula) => throw null; + public MapKeyManyToManyCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.MapKeyRelationCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapKeyRelationCustomizer : NHibernate.Mapping.ByCode.IMapKeyRelation + { + public void Component(System.Action> mapping) => throw null; + public void Element(System.Action mapping) => throw null; + public void Element() => throw null; + public void ManyToMany(System.Action mapping) => throw null; + public void ManyToMany() => throw null; + public MapKeyRelationCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.MapPropertiesCustomizer<,,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapPropertiesCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer, NHibernate.Mapping.ByCode.IMapPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public MapPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.PropertyPath), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.NaturalIdCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NaturalIdCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public NaturalIdCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + protected override void RegisterAnyMapping(System.Linq.Expressions.Expression> property, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class => throw null; + protected override void RegisterComponentMapping(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + protected override void RegisterManyToOneMapping(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + protected override void RegisterNoVisiblePropertyMapping(string notVisiblePropertyOrFieldName, System.Action mapping) => throw null; + protected override void RegisterPropertyMapping(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.OneToManyCustomizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToManyCustomizer : NHibernate.Mapping.ByCode.IOneToManyMapper + { + public void Class(System.Type entityType) => throw null; + public void EntityName(string entityName) => throw null; + public void NotFound(NHibernate.Mapping.ByCode.NotFoundMode mode) => throw null; + public OneToManyCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyContainerCustomizer + { + public void Any(string notVisiblePropertyOrFieldName, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class => throw null; + public void Any(System.Linq.Expressions.Expression> property, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class => throw null; + public void Bag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Bag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping) => throw null; + public void Bag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Bag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping) => throw null; + public void Component(string notVisiblePropertyOrFieldName, TComponent dynamicComponentTemplate, System.Action> mapping) => throw null; + public void Component(string notVisiblePropertyOrFieldName, System.Action> mapping) => throw null; + public void Component(string notVisiblePropertyOrFieldName) => throw null; + public void Component(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + public void Component(System.Linq.Expressions.Expression> property) => throw null; + public void Component(System.Linq.Expressions.Expression> property, TComponent dynamicComponentTemplate, System.Action> mapping) => throw null; + public void Component(System.Linq.Expressions.Expression>> property, TComponent dynamicComponentTemplate, System.Action> mapping) where TComponent : class => throw null; + protected internal NHibernate.Mapping.ByCode.Impl.ICustomizersHolder CustomizersHolder { get => throw null; set => throw null; } + protected internal NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder ExplicitDeclarationsHolder { get => throw null; } + public static System.Reflection.MemberInfo GetPropertyOrFieldMatchingNameOrThrow(string memberName) => throw null; + protected virtual System.Reflection.MemberInfo GetRequiredPropertyOrFieldByName(string memberName) => throw null; + public void IdBag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void IdBag(string notVisiblePropertyOrFieldName, System.Action> collectionMapping) => throw null; + public void IdBag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void IdBag(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping) => throw null; + public void List(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void List(string notVisiblePropertyOrFieldName, System.Action> collectionMapping) => throw null; + public void List(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void List(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping) => throw null; + public void ManyToOne(string notVisiblePropertyOrFieldName, System.Action mapping) where TProperty : class => throw null; + public void ManyToOne(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + public void ManyToOne(System.Linq.Expressions.Expression> property) where TProperty : class => throw null; + public void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping) => throw null; + public void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Map(string notVisiblePropertyOrFieldName, System.Action> collectionMapping) => throw null; + public void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping) => throw null; + public void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Map(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping) => throw null; + public void OneToOne(string notVisiblePropertyOrFieldName, System.Action> mapping) where TProperty : class => throw null; + public void OneToOne(System.Linq.Expressions.Expression> property, System.Action> mapping) where TProperty : class => throw null; + public void Property(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + public void Property(System.Linq.Expressions.Expression> property) => throw null; + public void Property(string notVisiblePropertyOrFieldName, System.Action mapping) => throw null; + public PropertyContainerCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath) => throw null; + protected internal NHibernate.Mapping.ByCode.PropertyPath PropertyPath { get => throw null; set => throw null; } + protected void RegistePropertyMapping(System.Action mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected void RegisterAnyMapping(System.Action mapping, System.Type idTypeOfMetaType, params System.Reflection.MemberInfo[] members) where TProperty : class => throw null; + protected virtual void RegisterAnyMapping(System.Linq.Expressions.Expression> property, System.Type idTypeOfMetaType, System.Action mapping) where TProperty : class => throw null; + protected void RegisterBagMapping(System.Action> collectionMapping, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterBagMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected void RegisterComponentMapping(System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterComponentMapping(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + protected void RegisterDynamicComponentMapping(System.Type componentType, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected void RegisterDynamicComponentMapping(System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression> property, System.Type componentType, System.Action> mapping) => throw null; + protected virtual void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression> property, System.Action> mapping) => throw null; + protected virtual void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression>> property, System.Type componentType, System.Action> mapping) => throw null; + protected virtual void RegisterDynamicComponentMapping(System.Linq.Expressions.Expression>> property, System.Action> mapping) where TComponent : class => throw null; + protected virtual void RegisterIdBagMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected virtual void RegisterIdBagMapping(System.Action> collectionMapping, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected void RegisterListMapping(System.Action> collectionMapping, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterListMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + protected void RegisterManyToOneMapping(System.Action mapping, params System.Reflection.MemberInfo[] members) where TProperty : class => throw null; + protected virtual void RegisterManyToOneMapping(System.Linq.Expressions.Expression> property, System.Action mapping) where TProperty : class => throw null; + protected virtual void RegisterMapMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping) => throw null; + protected virtual void RegisterMapMapping(System.Action> collectionMapping, System.Action> keyMapping, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterNoVisiblePropertyMapping(string notVisiblePropertyOrFieldName, System.Action mapping) => throw null; + protected void RegisterOneToOneMapping(System.Action> mapping, params System.Reflection.MemberInfo[] members) where TProperty : class => throw null; + protected virtual void RegisterPropertyMapping(System.Linq.Expressions.Expression> property, System.Action mapping) => throw null; + protected void RegisterSetMapping(System.Action> collectionMapping, System.Action> mapping, params System.Reflection.MemberInfo[] members) => throw null; + protected virtual void RegisterSetMapping(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Set(string notVisiblePropertyOrFieldName, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Set(string notVisiblePropertyOrFieldName, System.Action> collectionMapping) => throw null; + public void Set(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping, System.Action> mapping) => throw null; + public void Set(System.Linq.Expressions.Expression>> property, System.Action> collectionMapping) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.SetPropertiesCustomizer<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SetPropertiesCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.CollectionPropertiesCustomizer, NHibernate.Mapping.ByCode.ISetPropertiesMapper, NHibernate.Mapping.ByCode.IEntityPropertyMapper, NHibernate.Mapping.ByCode.ICollectionSqlsMapper, NHibernate.Mapping.ByCode.ICollectionPropertiesMapper, NHibernate.Mapping.ByCode.IAccessorPropertyMapper + { + public SetPropertiesCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.PropertyPath propertyPath, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.PropertyPath), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder)) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.SubclassCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubclassCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.ISubclassMapper, NHibernate.Mapping.ByCode.ISubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.IConformistHoldersProvider, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public void Abstract(bool isAbstract) => throw null; + public void BatchSize(int value) => throw null; + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.CustomizersHolder { get => throw null; } + public void DiscriminatorValue(object value) => throw null; + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.ExplicitDeclarationsHolder { get => throw null; } + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Filter(string filterName, System.Action filterMapping) => throw null; + public void Join(string splitGroupId, System.Action> splitMapping) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public SubclassCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + } + + // Generated from `NHibernate.Mapping.ByCode.Impl.CustomizersImpl.UnionSubclassCustomizer<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclassCustomizer : NHibernate.Mapping.ByCode.Impl.CustomizersImpl.PropertyContainerCustomizer, NHibernate.Mapping.ByCode.IUnionSubclassMapper, NHibernate.Mapping.ByCode.IUnionSubclassAttributesMapper, NHibernate.Mapping.ByCode.IPropertyContainerMapper, NHibernate.Mapping.ByCode.IPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IMinimalPlainPropertyContainerMapper, NHibernate.Mapping.ByCode.IEntitySqlsMapper, NHibernate.Mapping.ByCode.IEntityAttributesMapper, NHibernate.Mapping.ByCode.IConformistHoldersProvider, NHibernate.Mapping.ByCode.ICollectionPropertiesContainerMapper, NHibernate.Mapping.ByCode.IBasePlainPropertyContainerMapper where TEntity : class + { + public void Abstract(bool isAbstract) => throw null; + public void BatchSize(int value) => throw null; + public void Catalog(string catalogName) => throw null; + NHibernate.Mapping.ByCode.Impl.ICustomizersHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.CustomizersHolder { get => throw null; } + public void DynamicInsert(bool value) => throw null; + public void DynamicUpdate(bool value) => throw null; + public void EntityName(string value) => throw null; + NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder NHibernate.Mapping.ByCode.IConformistHoldersProvider.ExplicitDeclarationsHolder { get => throw null; } + public void Extends(string entityOrClassName) => throw null; + public void Extends(System.Type baseType) => throw null; + public void Lazy(bool value) => throw null; + public void Loader(string namedQueryReference) => throw null; + public void Persister() where T : NHibernate.Persister.Entity.IEntityPersister => throw null; + public void Proxy(System.Type proxy) => throw null; + public void Schema(string schemaName) => throw null; + public void SelectBeforeUpdate(bool value) => throw null; + public void SqlDelete(string sql) => throw null; + public void SqlInsert(string sql) => throw null; + public void SqlUpdate(string sql) => throw null; + public void Subselect(string sql) => throw null; + public void Synchronize(params string[] table) => throw null; + public void Table(string tableName) => throw null; + public UnionSubclassCustomizer(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder explicitDeclarationsHolder, NHibernate.Mapping.ByCode.Impl.ICustomizersHolder customizersHolder) : base(default(NHibernate.Mapping.ByCode.IModelExplicitDeclarationsHolder), default(NHibernate.Mapping.ByCode.Impl.ICustomizersHolder), default(NHibernate.Mapping.ByCode.PropertyPath)) => throw null; + } + + } + } + } + } + namespace Metadata + { + // Generated from `NHibernate.Metadata.IClassMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IClassMetadata + { + string EntityName { get; } + object GetIdentifier(object entity); + NHibernate.Type.IType GetPropertyType(string propertyName); + object GetPropertyValue(object obj, string propertyName); + object[] GetPropertyValues(object entity); + object[] GetPropertyValuesToInsert(object entity, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session); + object GetVersion(object obj); + bool HasIdentifierProperty { get; } + bool HasNaturalIdentifier { get; } + bool HasProxy { get; } + bool HasSubclasses { get; } + string IdentifierPropertyName { get; } + NHibernate.Type.IType IdentifierType { get; } + bool ImplementsLifecycle { get; } + bool ImplementsValidatable { get; } + object Instantiate(object id); + bool IsInherited { get; } + bool IsMutable { get; } + bool IsVersioned { get; } + System.Type MappedClass { get; } + int[] NaturalIdentifierProperties { get; } + bool[] PropertyLaziness { get; } + string[] PropertyNames { get; } + bool[] PropertyNullability { get; } + NHibernate.Type.IType[] PropertyTypes { get; } + void SetIdentifier(object entity, object id); + void SetPropertyValue(object obj, string propertyName, object value); + void SetPropertyValues(object entity, object[] values); + int VersionProperty { get; } + } + + // Generated from `NHibernate.Metadata.ICollectionMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionMetadata + { + NHibernate.Type.IType ElementType { get; } + bool HasIndex { get; } + NHibernate.Type.IType IndexType { get; } + bool IsArray { get; } + bool IsLazy { get; } + bool IsPrimitiveArray { get; } + NHibernate.Type.IType KeyType { get; } + string Role { get; } + } + + } + namespace Multi + { + // Generated from `NHibernate.Multi.CriteriaBatchItem<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaBatchItem : NHibernate.Multi.QueryBatchItemBase + { + public CriteriaBatchItem(NHibernate.ICriteria query) => throw null; + protected override System.Collections.Generic.List DoGetResults() => throw null; + protected override System.Collections.Generic.List.QueryInfo> GetQueryInformation(NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Collections.Generic.IList GetResultsNonBatched() => throw null; + protected override System.Threading.Tasks.Task> GetResultsNonBatchedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Multi.ICachingInformation` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICachingInformation + { + NHibernate.Cache.QueryKey CacheKey { get; } + bool CanGetFromCache { get; } + bool IsCacheable { get; } + NHibernate.Engine.QueryParameters Parameters { get; } + string QueryIdentifier { get; } + System.Collections.Generic.ISet QuerySpaces { get; } + System.Collections.IList ResultToCache { get; } + NHibernate.Type.IType[] ResultTypes { get; } + void SetCacheBatcher(NHibernate.Cache.CacheBatcher cacheBatcher); + void SetCachedResult(System.Collections.IList result); + } + + // Generated from `NHibernate.Multi.ICachingInformationWithFetches` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface ICachingInformationWithFetches + { + NHibernate.Type.IType[] CacheTypes { get; } + } + + // Generated from `NHibernate.Multi.ILinqBatchItem` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface ILinqBatchItem + { + } + + // Generated from `NHibernate.Multi.IQueryBatch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryBatch + { + void Add(string key, NHibernate.Multi.IQueryBatchItem query); + void Add(NHibernate.Multi.IQueryBatchItem query); + void Execute(); + System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken); + NHibernate.FlushMode? FlushMode { get; set; } + System.Collections.Generic.IList GetResult(string querykey); + System.Collections.Generic.IList GetResult(int queryIndex); + System.Threading.Tasks.Task> GetResultAsync(string querykey, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task> GetResultAsync(int queryIndex, System.Threading.CancellationToken cancellationToken); + bool IsExecutedOrEmpty { get; } + int? Timeout { get; set; } + } + + // Generated from `NHibernate.Multi.IQueryBatchItem` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryBatchItem + { + System.Collections.Generic.IEnumerable CachingInformation { get; } + void ExecuteNonBatched(); + System.Threading.Tasks.Task ExecuteNonBatchedAsync(System.Threading.CancellationToken cancellationToken); + System.Collections.Generic.IEnumerable GetCommands(); + System.Collections.Generic.IEnumerable GetQuerySpaces(); + void Init(NHibernate.Engine.ISessionImplementor session); + void ProcessResults(); + int ProcessResultsSet(System.Data.Common.DbDataReader reader); + System.Threading.Tasks.Task ProcessResultsSetAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Multi.IQueryBatchItem<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryBatchItem : NHibernate.Multi.IQueryBatchItem + { + System.Action> AfterLoadCallback { get; set; } + System.Collections.Generic.IList GetResults(); + } + + // Generated from `NHibernate.Multi.IQueryBatchItemWithAsyncProcessResults` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface IQueryBatchItemWithAsyncProcessResults + { + void ProcessResults(); + System.Threading.Tasks.Task ProcessResultsAsync(System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Multi.LinqBatchItem` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class LinqBatchItem + { + public static NHibernate.Multi.LinqBatchItem Create(System.Linq.IQueryable query, System.Linq.Expressions.Expression, TResult>> selector) => throw null; + public static NHibernate.Multi.LinqBatchItem Create(System.Linq.IQueryable query) => throw null; + } + + // Generated from `NHibernate.Multi.LinqBatchItem<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LinqBatchItem : NHibernate.Multi.QueryBatchItem + { + protected override System.Collections.Generic.List DoGetResults() => throw null; + protected override System.Collections.Generic.IList GetResultsNonBatched() => throw null; + protected override System.Threading.Tasks.Task> GetResultsNonBatchedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public LinqBatchItem(NHibernate.IQuery query) : base(default(NHibernate.IQuery)) => throw null; + internal LinqBatchItem(NHibernate.IQuery query, NHibernate.Linq.NhLinqExpression linq) : base(default(NHibernate.IQuery)) => throw null; + } + + // Generated from `NHibernate.Multi.QueryBatch` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryBatch : NHibernate.Multi.IQueryBatch + { + public void Add(string key, NHibernate.Multi.IQueryBatchItem query) => throw null; + public void Add(NHibernate.Multi.IQueryBatchItem query) => throw null; + public void Execute() => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected void ExecuteBatched() => throw null; + protected System.Threading.Tasks.Task ExecuteBatchedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.FlushMode? FlushMode { get => throw null; set => throw null; } + public System.Collections.Generic.IList GetResult(string querykey) => throw null; + public System.Collections.Generic.IList GetResult(int queryIndex) => throw null; + public System.Threading.Tasks.Task> GetResultAsync(string querykey, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task> GetResultAsync(int queryIndex, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsExecutedOrEmpty { get => throw null; } + public QueryBatch(NHibernate.Engine.ISessionImplementor session, bool autoReset) => throw null; + protected NHibernate.Engine.ISessionImplementor Session { get => throw null; } + public int? Timeout { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Multi.QueryBatchExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class QueryBatchExtensions + { + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, System.Linq.IQueryable query, System.Linq.Expressions.Expression, TResult>> selector) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, System.Linq.IQueryable query, System.Linq.Expressions.Expression, TResult>> selector, System.Action afterLoad = default(System.Action)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, System.Linq.IQueryable query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, NHibernate.IQueryOver query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, NHibernate.IQueryOver query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, NHibernate.IQuery query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, NHibernate.ICriteria query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, string key, NHibernate.Criterion.DetachedCriteria query) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, System.Linq.IQueryable query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQuery query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, NHibernate.ICriteria query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.Multi.IQueryBatch Add(this NHibernate.Multi.IQueryBatch batch, NHibernate.Criterion.DetachedCriteria query, System.Action> afterLoad = default(System.Action>)) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, System.Linq.IQueryable query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.Multi.IQueryBatchItem query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQuery query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.ICriteria query) => throw null; + public static NHibernate.IFutureEnumerable AddAsFuture(this NHibernate.Multi.IQueryBatch batch, NHibernate.Criterion.DetachedCriteria query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, System.Linq.IQueryable query, System.Linq.Expressions.Expression, TResult>> selector) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, System.Linq.IQueryable query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.Multi.IQueryBatchItem query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQueryOver query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.IQuery query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.ICriteria query) => throw null; + public static NHibernate.IFutureValue AddAsFutureValue(this NHibernate.Multi.IQueryBatch batch, NHibernate.Criterion.DetachedCriteria query) => throw null; + public static NHibernate.Multi.IQueryBatch SetFlushMode(this NHibernate.Multi.IQueryBatch batch, NHibernate.FlushMode mode) => throw null; + public static NHibernate.Multi.IQueryBatch SetTimeout(this NHibernate.Multi.IQueryBatch batch, int? timeout) => throw null; + } + + // Generated from `NHibernate.Multi.QueryBatchItem<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryBatchItem : NHibernate.Multi.QueryBatchItemBase + { + protected override System.Collections.Generic.List DoGetResults() => throw null; + protected override System.Collections.Generic.List.QueryInfo> GetQueryInformation(NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Collections.Generic.IList GetResultsNonBatched() => throw null; + protected override System.Threading.Tasks.Task> GetResultsNonBatchedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Impl.AbstractQueryImpl Query; + public QueryBatchItem(NHibernate.IQuery query) => throw null; + } + + // Generated from `NHibernate.Multi.QueryBatchItemBase<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class QueryBatchItemBase : NHibernate.Multi.IQueryBatchItem, NHibernate.Multi.IQueryBatchItem + { + public System.Action> AfterLoadCallback { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable CachingInformation { get => throw null; } + protected abstract System.Collections.Generic.List DoGetResults(); + public void ExecuteNonBatched() => throw null; + public System.Threading.Tasks.Task ExecuteNonBatchedAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.Generic.IEnumerable GetCommands() => throw null; + protected abstract System.Collections.Generic.List.QueryInfo> GetQueryInformation(NHibernate.Engine.ISessionImplementor session); + public System.Collections.Generic.IEnumerable GetQuerySpaces() => throw null; + public System.Collections.Generic.IList GetResults() => throw null; + protected abstract System.Collections.Generic.IList GetResultsNonBatched(); + protected abstract System.Threading.Tasks.Task> GetResultsNonBatchedAsync(System.Threading.CancellationToken cancellationToken); + protected System.Collections.Generic.List GetTypedResults() => throw null; + public virtual void Init(NHibernate.Engine.ISessionImplementor session) => throw null; + public void ProcessResults() => throw null; + public System.Threading.Tasks.Task ProcessResultsAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public int ProcessResultsSet(System.Data.Common.DbDataReader reader) => throw null; + public System.Threading.Tasks.Task ProcessResultsSetAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken cancellationToken) => throw null; + protected QueryBatchItemBase() => throw null; + // Generated from `NHibernate.Multi.QueryBatchItemBase<>+QueryInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class QueryInfo : NHibernate.Multi.ICachingInformation + { + public NHibernate.Cache.CacheBatcher CacheBatcher { get => throw null; set => throw null; } + public NHibernate.Cache.QueryKey CacheKey { get => throw null; } + public NHibernate.Type.IType[] CacheTypes { get => throw null; } + public bool CanGetFromCache { get => throw null; } + public bool CanPutToCache { get => throw null; } + public bool IsCacheable { get => throw null; } + public bool IsResultFromCache { get => throw null; set => throw null; } + public NHibernate.Loader.Loader Loader { get => throw null; set => throw null; } + public NHibernate.Engine.QueryParameters Parameters { get => throw null; } + public string QueryIdentifier { get => throw null; } + public QueryInfo(NHibernate.Engine.QueryParameters parameters, NHibernate.Loader.Loader loader, System.Collections.Generic.ISet querySpaces, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Collections.Generic.ISet QuerySpaces { get => throw null; } + public System.Collections.IList Result { get => throw null; set => throw null; } + public System.Collections.IList ResultToCache { get => throw null; set => throw null; } + public NHibernate.Type.IType[] ResultTypes { get => throw null; } + public void SetCacheBatcher(NHibernate.Cache.CacheBatcher cacheBatcher) => throw null; + public void SetCachedResult(System.Collections.IList result) => throw null; + } + + + protected NHibernate.Engine.ISessionImplementor Session; + } + + } + namespace MultiTenancy + { + // Generated from `NHibernate.MultiTenancy.AbstractMultiTenancyConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractMultiTenancyConnectionProvider : NHibernate.MultiTenancy.IMultiTenancyConnectionProvider + { + protected AbstractMultiTenancyConnectionProvider() => throw null; + public NHibernate.Connection.IConnectionAccess GetConnectionAccess(NHibernate.MultiTenancy.TenantConfiguration tenantConfiguration, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + protected abstract string GetTenantConnectionString(NHibernate.MultiTenancy.TenantConfiguration tenantConfiguration, NHibernate.Engine.ISessionFactoryImplementor sessionFactory); + } + + // Generated from `NHibernate.MultiTenancy.IMultiTenancyConnectionProvider` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMultiTenancyConnectionProvider + { + NHibernate.Connection.IConnectionAccess GetConnectionAccess(NHibernate.MultiTenancy.TenantConfiguration tenantConfiguration, NHibernate.Engine.ISessionFactoryImplementor sessionFactory); + } + + // Generated from `NHibernate.MultiTenancy.MultiTenancyStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum MultiTenancyStrategy + { + Database, + None, + } + + // Generated from `NHibernate.MultiTenancy.TenantConfiguration` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TenantConfiguration + { + public TenantConfiguration(string tenantIdentifier) => throw null; + public string TenantIdentifier { get => throw null; } + } + + } + namespace Param + { + // Generated from `NHibernate.Param.AbstractExplicitParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractExplicitParameterSpecification : NHibernate.Param.IParameterSpecification, NHibernate.Param.IPageableParameterSpecification, NHibernate.Param.IExplicitParameterSpecification + { + protected AbstractExplicitParameterSpecification(int sourceLine, int sourceColumn) => throw null; + public abstract void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session); + public abstract void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session); + public abstract System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public abstract System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory); + protected object GetPagingValue(object value, NHibernate.Dialect.Dialect dialect, NHibernate.Engine.QueryParameters queryParameters) => throw null; + protected int GetParemeterSpan(NHibernate.Engine.IMapping sessionFactory) => throw null; + public abstract int GetSkipValue(NHibernate.Engine.QueryParameters queryParameters); + public void IsSkipParameter() => throw null; + public void IsTakeParameterWithSkipParameter(NHibernate.Param.IPageableParameterSpecification skipParameter) => throw null; + public abstract string RenderDisplayInfo(); + public abstract void SetEffectiveType(NHibernate.Engine.QueryParameters queryParameters); + public int SourceColumn { get => throw null; } + public int SourceLine { get => throw null; } + } + + // Generated from `NHibernate.Param.AggregatedIndexCollectionSelectorParameterSpecifications` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AggregatedIndexCollectionSelectorParameterSpecifications : NHibernate.Param.IParameterSpecification + { + public AggregatedIndexCollectionSelectorParameterSpecifications(System.Collections.Generic.IList paramSpecs) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.CollectionFilterKeyParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionFilterKeyParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public CollectionFilterKeyParameterSpecification(string collectionRole, NHibernate.Type.IType keyType, int queryParameterPosition) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.CollectionFilterKeyParameterSpecification other) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.CriteriaNamedParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CriteriaNamedParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public CriteriaNamedParameterSpecification(string name, NHibernate.Type.IType expectedType) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.CriteriaNamedParameterSpecification other) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + protected int GetParemeterSpan(NHibernate.Engine.IMapping sessionFactory) => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.DynamicFilterParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicFilterParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public DynamicFilterParameterSpecification(string filterName, string parameterName, NHibernate.Type.IType expectedDefinedType, int? collectionSpan) => throw null; + public NHibernate.Type.IType ElementType { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.DynamicFilterParameterSpecification other) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public string FilterParameterFullName { get => throw null; } + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.IExplicitParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IExplicitParameterSpecification : NHibernate.Param.IParameterSpecification + { + void SetEffectiveType(NHibernate.Engine.QueryParameters queryParameters); + int SourceColumn { get; } + int SourceLine { get; } + } + + // Generated from `NHibernate.Param.IPageableParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPageableParameterSpecification : NHibernate.Param.IParameterSpecification, NHibernate.Param.IExplicitParameterSpecification + { + int GetSkipValue(NHibernate.Engine.QueryParameters queryParameters); + void IsSkipParameter(); + void IsTakeParameterWithSkipParameter(NHibernate.Param.IPageableParameterSpecification skipParameter); + } + + // Generated from `NHibernate.Param.IParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParameterSpecification + { + void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session); + void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.Type.IType ExpectedType { get; set; } + System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory); + string RenderDisplayInfo(); + } + + // Generated from `NHibernate.Param.NamedParameter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedParameter + { + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.NamedParameter other) => throw null; + public override int GetHashCode() => throw null; + public virtual bool IsCollection { get => throw null; } + public string Name { get => throw null; set => throw null; } + public NamedParameter(string name, object value, NHibernate.Type.IType type) => throw null; + public NHibernate.Type.IType Type { get => throw null; set => throw null; } + public object Value { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Param.NamedParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedParameterSpecification : NHibernate.Param.AbstractExplicitParameterSpecification + { + public override void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.NamedParameterSpecification other) => throw null; + public override int GetHashCode() => throw null; + public override System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public override int GetSkipValue(NHibernate.Engine.QueryParameters queryParameters) => throw null; + public string Name { get => throw null; } + public NamedParameterSpecification(int sourceLine, int sourceColumn, string name) : base(default(int), default(int)) => throw null; + public override string RenderDisplayInfo() => throw null; + public override void SetEffectiveType(NHibernate.Engine.QueryParameters queryParameters) => throw null; + } + + // Generated from `NHibernate.Param.ParametersBackTrackExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ParametersBackTrackExtensions + { + public static System.Collections.Generic.IEnumerable GetEffectiveParameterLocations(this System.Collections.Generic.IList sqlParameters, string backTrackId) => throw null; + public static NHibernate.SqlTypes.SqlType[] GetQueryParameterTypes(this System.Collections.Generic.IEnumerable parameterSpecs, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static void ResetEffectiveExpectedType(this System.Collections.Generic.IEnumerable parameterSpecs, NHibernate.Engine.QueryParameters queryParameters) => throw null; + } + + // Generated from `NHibernate.Param.PositionalParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PositionalParameterSpecification : NHibernate.Param.AbstractExplicitParameterSpecification + { + public override void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.PositionalParameterSpecification other) => throw null; + public override int GetHashCode() => throw null; + public override System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public override int GetSkipValue(NHibernate.Engine.QueryParameters queryParameters) => throw null; + public int HqlPosition { get => throw null; } + public PositionalParameterSpecification(int sourceLine, int sourceColumn, int hqlPosition) : base(default(int), default(int)) => throw null; + public override string RenderDisplayInfo() => throw null; + public override void SetEffectiveType(NHibernate.Engine.QueryParameters queryParameters) => throw null; + } + + // Generated from `NHibernate.Param.QuerySkipParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySkipParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.QuerySkipParameterSpecification other) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public QuerySkipParameterSpecification() => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.QueryTakeParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryTakeParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Param.QueryTakeParameterSpecification other) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public override int GetHashCode() => throw null; + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public QueryTakeParameterSpecification() => throw null; + public string RenderDisplayInfo() => throw null; + } + + // Generated from `NHibernate.Param.VersionTypeSeedParameterSpecification` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VersionTypeSeedParameterSpecification : NHibernate.Param.IParameterSpecification + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList multiSqlQueryParametersList, int singleSqlParametersOffset, System.Collections.Generic.IList sqlQueryParametersList, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Type.IType ExpectedType { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable GetIdsForBackTrack(NHibernate.Engine.IMapping sessionFactory) => throw null; + public string RenderDisplayInfo() => throw null; + public VersionTypeSeedParameterSpecification(NHibernate.Type.IVersionType type) => throw null; + } + + } + namespace Persister + { + // Generated from `NHibernate.Persister.PersisterFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PersisterFactory + { + public static NHibernate.Persister.Entity.IEntityPersister Create(System.Type persisterClass, NHibernate.Mapping.PersistentClass model, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Engine.IMapping cfg) => throw null; + public static NHibernate.Persister.Collection.ICollectionPersister Create(System.Type persisterClass, NHibernate.Mapping.Collection model, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public static NHibernate.Persister.Entity.IEntityPersister CreateClassPersister(NHibernate.Mapping.PersistentClass model, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Engine.IMapping cfg) => throw null; + public static NHibernate.Persister.Collection.ICollectionPersister CreateCollectionPersister(NHibernate.Mapping.Collection model, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + namespace Collection + { + // Generated from `NHibernate.Persister.Collection.AbstractCollectionPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractCollectionPersister : NHibernate.Persister.Entity.ISupportSelectModeJoinable, NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Collection.ISqlLoadableCollection, NHibernate.Persister.Collection.IQueryableCollection, NHibernate.Persister.Collection.ICollectionPersister, NHibernate.Metadata.ICollectionMetadata, NHibernate.Id.IPostInsertIdentityPersister, NHibernate.Id.ICompositeKeyPostInsertIdentityPersister + { + public AbstractCollectionPersister(NHibernate.Mapping.Collection collection, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected virtual void AppendElementColumns(NHibernate.SqlCommand.SelectFragment frag, string elemAlias) => throw null; + protected virtual void AppendIdentifierColumns(NHibernate.SqlCommand.SelectFragment frag, string alias) => throw null; + protected virtual void AppendIndexColumns(NHibernate.SqlCommand.SelectFragment frag, string alias) => throw null; + public void BindSelectByUniqueKey(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames) => throw null; + public System.Threading.Tasks.Task BindSelectByUniqueKeyAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.ICacheConcurrencyStrategy Cache { get => throw null; } + public NHibernate.Cache.Entry.ICacheEntryStructure CacheEntryStructure { get => throw null; } + public abstract bool CascadeDeleteEnabled { get; } + public NHibernate.Metadata.ICollectionMetadata CollectionMetadata { get => throw null; } + public string[] CollectionSpaces { get => throw null; } + public NHibernate.Type.CollectionType CollectionType { get => throw null; } + protected static bool[] Combine(bool[] settable, bool[] columnNullness) => throw null; + public abstract bool ConsumesCollectionAlias(); + public abstract bool ConsumesEntityAlias(); + protected abstract NHibernate.Loader.Collection.ICollectionInitializer CreateCollectionInitializer(System.Collections.Generic.IDictionary enabledFilters); + protected abstract NHibernate.Loader.Collection.ICollectionInitializer CreateSubselectInitializer(NHibernate.Engine.SubselectFetch subselect, NHibernate.Engine.ISessionImplementor session); + public object DecrementIndexByBase(object index) => throw null; + protected virtual bool DeleteAllCallable { get => throw null; } + protected NHibernate.Engine.ExecuteUpdateResultCheckStyle DeleteAllCheckStyle { get => throw null; } + protected virtual bool DeleteCallable { get => throw null; } + protected NHibernate.Engine.ExecuteUpdateResultCheckStyle DeleteCheckStyle { get => throw null; } + public void DeleteRows(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task DeleteRowsAsync(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected NHibernate.Dialect.Dialect Dialect { get => throw null; } + protected abstract int DoUpdateRows(object key, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session); + protected abstract System.Threading.Tasks.Task DoUpdateRowsAsync(object key, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public System.Type ElementClass { get => throw null; } + public string[] ElementColumnNames { get => throw null; } + public bool ElementExists(object key, object element, NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.Persister.Entity.IEntityPersister ElementPersister { get => throw null; } + public NHibernate.Type.IType ElementType { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public NHibernate.FetchMode FetchMode { get => throw null; } + public virtual string FilterFragment(string alias, System.Collections.Generic.IDictionary enabledFilters) => throw null; + protected virtual string FilterFragment(string alias) => throw null; + public abstract NHibernate.SqlCommand.SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses); + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteRowString(bool[] columnNullness) => throw null; + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteRowString() => throw null; + protected abstract NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteString(); + protected abstract NHibernate.SqlCommand.SqlCommandInfo GenerateIdentityInsertRowString(); + protected abstract NHibernate.SqlCommand.SqlCommandInfo GenerateInsertRowString(); + protected virtual NHibernate.SqlCommand.SelectFragment GenerateSelectFragment(string alias, string columnSuffix) => throw null; + public virtual string GenerateTableAliasForKeyColumns(string alias) => throw null; + protected abstract NHibernate.SqlCommand.SqlCommandInfo GenerateUpdateRowString(); + // Generated from `NHibernate.Persister.Collection.AbstractCollectionPersister+GeneratedIdentifierBinder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class GeneratedIdentifierBinder : NHibernate.Id.Insert.IBinder + { + public void BindValues(System.Data.Common.DbCommand cm) => throw null; + public System.Threading.Tasks.Task BindValuesAsync(System.Data.Common.DbCommand cm, System.Threading.CancellationToken cancellationToken) => throw null; + public object Entity { get => throw null; } + public GeneratedIdentifierBinder(object ownerId, NHibernate.Collection.IPersistentCollection collection, object entry, int index, NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.AbstractCollectionPersister persister) => throw null; + } + + + protected NHibernate.Loader.Collection.ICollectionInitializer GetAppropriateInitializer(object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public int GetBatchSize() => throw null; + public string[] GetCollectionPropertyColumnAliases(string propertyName, string suffix) => throw null; + protected virtual string GetCountSqlSelectClause() => throw null; + public virtual object GetElementByIndex(object key, object index, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public string[] GetElementColumnAliases(string suffix) => throw null; + public string[] GetElementColumnNames(string alias) => throw null; + public string GetIdentifierColumnAlias(string suffix) => throw null; + public string[] GetIndexColumnAliases(string suffix) => throw null; + public string[] GetIndexColumnNames(string alias) => throw null; + public string GetInfoString() => throw null; + public string[] GetKeyColumnAliases(string suffix) => throw null; + public string GetManyToManyFilterFragment(string alias, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public string GetManyToManyOrderByString(string alias) => throw null; + public string GetSQLOrderByString(string alias) => throw null; + public string GetSQLWhereString(string alias) => throw null; + public virtual NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string[] suppliedPropertyNames, out NHibernate.Type.IType[] parameterTypes) => throw null; + public NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string propertyName) => throw null; + public int GetSize(object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public bool HasCache { get => throw null; } + public bool HasIndex { get => throw null; } + public bool HasManyToManyOrdering { get => throw null; } + public bool HasOrdering { get => throw null; } + public bool HasOrphanDelete { get => throw null; } + public bool HasWhere { get => throw null; } + public string IdentifierColumnName { get => throw null; } + public NHibernate.Id.IIdentifierGenerator IdentifierGenerator { get => throw null; } + public virtual string IdentifierSelectFragment(string name, string suffix) => throw null; + public NHibernate.Type.IType IdentifierType { get => throw null; } + public string IdentitySelectString { get => throw null; } + protected object IncrementIndexByBase(object index) => throw null; + public string[] IndexColumnNames { get => throw null; } + public bool IndexExists(object key, object index, NHibernate.Engine.ISessionImplementor session) => throw null; + public string[] IndexFormulas { get => throw null; } + public NHibernate.Type.IType IndexType { get => throw null; } + public void InitCollectionPropertyMap() => throw null; + public void Initialize(object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InitializeAsync(object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool InsertCallable { get => throw null; } + protected NHibernate.Engine.ExecuteUpdateResultCheckStyle InsertCheckStyle { get => throw null; } + public void InsertRows(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InsertRowsAsync(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsAffectedByEnabledFilters(NHibernate.Engine.ISessionImplementor session) => throw null; + public bool IsArray { get => throw null; } + public bool IsCollection { get => throw null; } + public bool IsExtraLazy { get => throw null; } + public bool IsIdentifierAssignedByInsert { get => throw null; } + public bool IsInverse { get => throw null; } + public bool IsLazy { get => throw null; } + public abstract bool IsManyToMany { get; } + public bool IsManyToManyFiltered(System.Collections.Generic.IDictionary enabledFilters) => throw null; + public bool IsMutable { get => throw null; } + public abstract bool IsOneToMany { get; } + public bool IsPrimitiveArray { get => throw null; } + public bool IsSubselectLoadable { get => throw null; } + public bool IsVersioned { get => throw null; } + public string[] JoinColumnNames { get => throw null; } + protected string[] KeyColumnAliases { get => throw null; } + public string[] KeyColumnNames { get => throw null; } + public NHibernate.Type.IType KeyType { get => throw null; } + protected void LogStaticSQL() => throw null; + public string Name { get => throw null; } + public object NotFoundObject { get => throw null; } + protected static object NotFoundPlaceHolder; + public string OneToManyFilterFragment(string alias) => throw null; + public virtual string OwnerEntityName { get => throw null; } + public NHibernate.Persister.Entity.IEntityPersister OwnerEntityPersister { get => throw null; } + protected object PerformInsert(object ownerId, NHibernate.Collection.IPersistentCollection collection, object entry, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + protected object PerformInsert(object ownerId, NHibernate.Collection.IPersistentCollection collection, NHibernate.AdoNet.IExpectation expectation, object entry, int index, bool useBatch, bool callable, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task PerformInsertAsync(object ownerId, NHibernate.Collection.IPersistentCollection collection, object entry, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task PerformInsertAsync(object ownerId, NHibernate.Collection.IPersistentCollection collection, NHibernate.AdoNet.IExpectation expectation, object entry, int index, bool useBatch, bool callable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void PostInstantiate() => throw null; + public object ReadElement(System.Data.Common.DbDataReader rs, object owner, string[] aliases, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ReadElementAsync(System.Data.Common.DbDataReader rs, object owner, string[] aliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object ReadIdentifier(System.Data.Common.DbDataReader rs, string alias, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ReadIdentifierAsync(System.Data.Common.DbDataReader rs, string alias, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object ReadIndex(System.Data.Common.DbDataReader rs, string[] aliases, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ReadIndexAsync(System.Data.Common.DbDataReader rs, string[] aliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object ReadKey(System.Data.Common.DbDataReader dr, string[] aliases, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ReadKeyAsync(System.Data.Common.DbDataReader dr, string[] aliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void Recreate(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task RecreateAsync(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void Remove(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task RemoveAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string Role { get => throw null; } + public string[] RootTableKeyColumnNames { get => throw null; } + protected virtual bool RowDeleteEnabled { get => throw null; } + protected virtual bool RowInsertEnabled { get => throw null; } + protected virtual NHibernate.Exceptions.ISQLExceptionConverter SQLExceptionConverter { get => throw null; } + public virtual string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns, bool includeLazyProperties) => throw null; + public virtual string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string currentEntitySuffix, string currentCollectionSuffix, bool includeCollectionColumns) => throw null; + public virtual string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string currentCollectionSuffix, bool includeCollectionColumns, NHibernate.Persister.Entity.EntityLoadInfo entityInfo) => throw null; + public string SelectFragment(string alias, string columnSuffix) => throw null; + protected NHibernate.SqlCommand.SqlCommandInfo SqlDeleteRowString { get => throw null; } + protected NHibernate.SqlCommand.SqlCommandInfo SqlDeleteString { get => throw null; } + protected NHibernate.SqlCommand.SqlCommandInfo SqlInsertRowString { get => throw null; } + protected NHibernate.SqlCommand.SqlCommandInfo SqlUpdateRowString { get => throw null; } + public virtual string TableName { get => throw null; } + public string[] ToColumns(string propertyName) => throw null; + public string[] ToColumns(string alias, string propertyName) => throw null; + public override string ToString() => throw null; + public NHibernate.Type.IType ToType(string propertyName) => throw null; + public bool TryToType(string propertyName, out NHibernate.Type.IType type) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + protected virtual bool UpdateCallable { get => throw null; } + protected NHibernate.Engine.ExecuteUpdateResultCheckStyle UpdateCheckStyle { get => throw null; } + public void UpdateRows(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task UpdateRowsAsync(NHibernate.Collection.IPersistentCollection collection, object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected bool UseGetGeneratedKeys() => throw null; + protected bool UseInsertSelectIdentity() => throw null; + public abstract NHibernate.SqlCommand.SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses); + protected int WriteElement(System.Data.Common.DbCommand st, object elt, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteElementAsync(System.Data.Common.DbCommand st, object elt, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int WriteElementToWhere(System.Data.Common.DbCommand st, object elt, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected int WriteElementToWhere(System.Data.Common.DbCommand st, object elt, bool[] columnNullness, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteElementToWhereAsync(System.Data.Common.DbCommand st, object elt, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task WriteElementToWhereAsync(System.Data.Common.DbCommand st, object elt, bool[] columnNullness, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int WriteIdentifier(System.Data.Common.DbCommand st, object idx, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteIdentifierAsync(System.Data.Common.DbCommand st, object idx, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int WriteIndex(System.Data.Common.DbCommand st, object idx, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteIndexAsync(System.Data.Common.DbCommand st, object idx, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int WriteIndexToWhere(System.Data.Common.DbCommand st, object index, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteIndexToWhereAsync(System.Data.Common.DbCommand st, object index, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int WriteKey(System.Data.Common.DbCommand st, object id, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task WriteKeyAsync(System.Data.Common.DbCommand st, object id, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected int batchSize; + protected string[] elementColumnAliases; + protected bool[] elementColumnIsInPrimaryKey; + protected bool[] elementColumnIsSettable; + protected string[] elementFormulaTemplates; + protected string[] elementFormulas; + protected internal bool elementIsPureFormula; + protected bool hasIdentifier; + protected NHibernate.Id.Insert.IInsertGeneratedIdentifierDelegate identityDelegate; + protected bool[] indexColumnIsSettable; + protected internal bool indexContainsFormula; + protected string[] indexFormulaTemplates; + protected string qualifiedTableName; + protected string sqlWhereString; + } + + // Generated from `NHibernate.Persister.Collection.BasicCollectionPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicCollectionPersister : NHibernate.Persister.Collection.AbstractCollectionPersister + { + public BasicCollectionPersister(NHibernate.Mapping.Collection collection, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Mapping.Collection), default(NHibernate.Cache.ICacheConcurrencyStrategy), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override bool CascadeDeleteEnabled { get => throw null; } + public override bool ConsumesCollectionAlias() => throw null; + public override bool ConsumesEntityAlias() => throw null; + protected override NHibernate.Loader.Collection.ICollectionInitializer CreateCollectionInitializer(System.Collections.Generic.IDictionary enabledFilters) => throw null; + protected override NHibernate.Loader.Collection.ICollectionInitializer CreateSubselectInitializer(NHibernate.Engine.SubselectFetch subselect, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override int DoUpdateRows(object id, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task DoUpdateRowsAsync(object id, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.SqlCommand.SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteRowString(bool[] columnNullness) => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteString() => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateIdentityInsertRowString() => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateInsertRowString() => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateUpdateRowString() => throw null; + public override bool IsManyToMany { get => throw null; } + public override bool IsOneToMany { get => throw null; } + public override string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string collectionSuffix, bool includeCollectionColumns, NHibernate.Persister.Entity.EntityLoadInfo entityInfo) => throw null; + public override NHibernate.SqlCommand.SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + } + + // Generated from `NHibernate.Persister.Collection.CollectionPersisterExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CollectionPersisterExtensions + { + public static int GetBatchSize(this NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + } + + // Generated from `NHibernate.Persister.Collection.CollectionPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionPropertyMapping : NHibernate.Persister.Entity.IPropertyMapping + { + public CollectionPropertyMapping(NHibernate.Persister.Collection.IQueryableCollection memberPersister) => throw null; + public string[] ToColumns(string propertyName) => throw null; + public string[] ToColumns(string alias, string propertyName) => throw null; + public NHibernate.Type.IType ToType(string propertyName) => throw null; + public bool TryToType(string propertyName, out NHibernate.Type.IType type) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Persister.Collection.CollectionPropertyNames` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionPropertyNames + { + public CollectionPropertyNames() => throw null; + public const string Elements = default; + public const string Index = default; + public const string Indices = default; + public const string MaxElement = default; + public const string MaxIndex = default; + public const string MinElement = default; + public const string MinIndex = default; + public const string Size = default; + } + + // Generated from `NHibernate.Persister.Collection.CompositeElementPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CompositeElementPropertyMapping : NHibernate.Persister.Entity.AbstractPropertyMapping + { + public CompositeElementPropertyMapping(string[] elementColumns, string[] elementFormulaTemplates, NHibernate.Type.IAbstractComponentType compositeType, NHibernate.Engine.IMapping factory) => throw null; + protected override string EntityName { get => throw null; } + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Persister.Collection.ElementPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ElementPropertyMapping : NHibernate.Persister.Entity.IPropertyMapping + { + public ElementPropertyMapping(string[] elementColumns, NHibernate.Type.IType type) => throw null; + public string[] ToColumns(string propertyName) => throw null; + public string[] ToColumns(string alias, string propertyName) => throw null; + public NHibernate.Type.IType ToType(string propertyName) => throw null; + public bool TryToType(string propertyName, out NHibernate.Type.IType outType) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Persister.Collection.ICollectionPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICollectionPersister + { + NHibernate.Cache.ICacheConcurrencyStrategy Cache { get; } + NHibernate.Cache.Entry.ICacheEntryStructure CacheEntryStructure { get; } + bool CascadeDeleteEnabled { get; } + NHibernate.Metadata.ICollectionMetadata CollectionMetadata { get; } + string[] CollectionSpaces { get; } + NHibernate.Type.CollectionType CollectionType { get; } + void DeleteRows(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task DeleteRowsAsync(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Type ElementClass { get; } + bool ElementExists(object key, object element, NHibernate.Engine.ISessionImplementor session); + NHibernate.Type.IType ElementType { get; } + NHibernate.Engine.ISessionFactoryImplementor Factory { get; } + object GetElementByIndex(object key, object index, NHibernate.Engine.ISessionImplementor session, object owner); + string[] GetElementColumnAliases(string suffix); + string GetIdentifierColumnAlias(string suffix); + string[] GetIndexColumnAliases(string suffix); + string[] GetKeyColumnAliases(string suffix); + string GetManyToManyFilterFragment(string alias, System.Collections.Generic.IDictionary enabledFilters); + int GetSize(object key, NHibernate.Engine.ISessionImplementor session); + bool HasCache { get; } + bool HasIndex { get; } + bool HasManyToManyOrdering { get; } + bool HasOrdering { get; } + bool HasOrphanDelete { get; } + NHibernate.Id.IIdentifierGenerator IdentifierGenerator { get; } + NHibernate.Type.IType IdentifierType { get; } + bool IndexExists(object key, object index, NHibernate.Engine.ISessionImplementor session); + NHibernate.Type.IType IndexType { get; } + void Initialize(object key, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task InitializeAsync(object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void InsertRows(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task InsertRowsAsync(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool IsAffectedByEnabledFilters(NHibernate.Engine.ISessionImplementor session); + bool IsArray { get; } + bool IsExtraLazy { get; } + bool IsInverse { get; } + bool IsLazy { get; } + bool IsManyToMany { get; } + bool IsMutable { get; } + bool IsOneToMany { get; } + bool IsPrimitiveArray { get; } + bool IsVersioned { get; } + NHibernate.Type.IType KeyType { get; } + object NotFoundObject { get; } + NHibernate.Persister.Entity.IEntityPersister OwnerEntityPersister { get; } + void PostInstantiate(); + object ReadElement(System.Data.Common.DbDataReader rs, object owner, string[] columnAliases, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ReadElementAsync(System.Data.Common.DbDataReader rs, object owner, string[] columnAliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object ReadIdentifier(System.Data.Common.DbDataReader rs, string columnAlias, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ReadIdentifierAsync(System.Data.Common.DbDataReader rs, string columnAlias, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object ReadIndex(System.Data.Common.DbDataReader rs, string[] columnAliases, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ReadIndexAsync(System.Data.Common.DbDataReader rs, string[] columnAliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object ReadKey(System.Data.Common.DbDataReader rs, string[] keyAliases, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ReadKeyAsync(System.Data.Common.DbDataReader rs, string[] keyAliases, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void Recreate(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task RecreateAsync(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void Remove(object id, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task RemoveAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + string Role { get; } + void UpdateRows(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task UpdateRowsAsync(NHibernate.Collection.IPersistentCollection collection, object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Persister.Collection.IQueryableCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryableCollection : NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Collection.ICollectionPersister + { + string[] ElementColumnNames { get; } + NHibernate.Persister.Entity.IEntityPersister ElementPersister { get; } + NHibernate.FetchMode FetchMode { get; } + string GenerateTableAliasForKeyColumns(string alias); + string[] GetElementColumnNames(string alias); + string[] GetIndexColumnNames(string alias); + string GetManyToManyOrderByString(string alias); + string GetSQLOrderByString(string alias); + string GetSQLWhereString(string alias); + bool HasWhere { get; } + string[] IndexColumnNames { get; } + string[] IndexFormulas { get; } + string SelectFragment(string alias, string columnSuffix); + } + + // Generated from `NHibernate.Persister.Collection.ISqlLoadableCollection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlLoadableCollection : NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Collection.IQueryableCollection, NHibernate.Persister.Collection.ICollectionPersister + { + string[] GetCollectionPropertyColumnAliases(string propertyName, string str); + string IdentifierColumnName { get; } + } + + // Generated from `NHibernate.Persister.Collection.NamedQueryCollectionInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedQueryCollectionInitializer : NHibernate.Loader.Collection.ICollectionInitializer + { + public void Initialize(object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InitializeAsync(object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NamedQueryCollectionInitializer(string queryName, NHibernate.Persister.Collection.ICollectionPersister persister) => throw null; + } + + // Generated from `NHibernate.Persister.Collection.OneToManyPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToManyPersister : NHibernate.Persister.Collection.AbstractCollectionPersister, NHibernate.Persister.Entity.ISupportSelectModeJoinable + { + public override bool CascadeDeleteEnabled { get => throw null; } + public override bool ConsumesCollectionAlias() => throw null; + public override bool ConsumesEntityAlias() => throw null; + protected override NHibernate.Loader.Collection.ICollectionInitializer CreateCollectionInitializer(System.Collections.Generic.IDictionary enabledFilters) => throw null; + protected override NHibernate.Loader.Collection.ICollectionInitializer CreateSubselectInitializer(NHibernate.Engine.SubselectFetch subselect, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override int DoUpdateRows(object id, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override System.Threading.Tasks.Task DoUpdateRowsAsync(object id, NHibernate.Collection.IPersistentCollection collection, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected override string FilterFragment(string alias) => throw null; + public override NHibernate.SqlCommand.SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteRowString(bool[] columnNullness) => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteString() => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateIdentityInsertRowString() => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateInsertRowString() => throw null; + protected override NHibernate.SqlCommand.SelectFragment GenerateSelectFragment(string alias, string columnSuffix) => throw null; + protected override NHibernate.SqlCommand.SqlCommandInfo GenerateUpdateRowString() => throw null; + public override object GetElementByIndex(object key, object index, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override bool IsManyToMany { get => throw null; } + public override bool IsOneToMany { get => throw null; } + public OneToManyPersister(NHibernate.Mapping.Collection collection, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Mapping.Collection), default(NHibernate.Cache.ICacheConcurrencyStrategy), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + protected override bool RowDeleteEnabled { get => throw null; } + protected override bool RowInsertEnabled { get => throw null; } + public override string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string collectionSuffix, bool includeCollectionColumns, NHibernate.Persister.Entity.EntityLoadInfo entityInfo) => throw null; + public override string TableName { get => throw null; } + public override NHibernate.SqlCommand.SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + } + + } + namespace Entity + { + // Generated from `NHibernate.Persister.Entity.AbstractEntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEntityPersister : NHibernate.Persister.Entity.IUniqueKeyLoadable, NHibernate.Persister.Entity.ISupportSelectModeJoinable, NHibernate.Persister.Entity.ISqlLoadable, NHibernate.Persister.Entity.IQueryable, NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.IOuterJoinLoadable, NHibernate.Persister.Entity.ILockable, NHibernate.Persister.Entity.ILoadable, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Entity.IEntityPersister, NHibernate.Metadata.IClassMetadata, NHibernate.Intercept.ILazyPropertyInitializer, NHibernate.Id.IPostInsertIdentityPersister, NHibernate.Id.ICompositeKeyPostInsertIdentityPersister, NHibernate.Cache.IOptimisticCacheSource + { + protected AbstractEntityPersister(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected virtual void AddDiscriminatorToInsert(NHibernate.SqlCommand.SqlInsertBuilder insert) => throw null; + protected virtual void AddDiscriminatorToSelect(NHibernate.SqlCommand.SelectFragment select, string name, string suffix) => throw null; + public void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session) => throw null; + public void AfterInitialize(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual void AfterReassociate(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public int BatchSize { get => throw null; } + public void BindSelectByUniqueKey(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames) => throw null; + public System.Threading.Tasks.Task BindSelectByUniqueKeyAsync(NHibernate.Engine.ISessionImplementor session, System.Data.Common.DbCommand selectCommand, NHibernate.Id.Insert.IBinder binder, string[] suppliedPropertyNames, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.ICacheConcurrencyStrategy Cache { get => throw null; } + public void CacheByUniqueKeys(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task CacheByUniqueKeysAsync(object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Cache.Entry.ICacheEntryStructure CacheEntryStructure { get => throw null; } + public virtual bool CanExtractIdOutOfEntity { get => throw null; } + protected bool Check(int rows, object id, int tableNumber, NHibernate.AdoNet.IExpectation expectation, System.Data.Common.DbCommand statement) => throw null; + public virtual NHibernate.Metadata.IClassMetadata ClassMetadata { get => throw null; } + protected string ConcretePropertySelectFragment(string alias, bool[] includeProperty) => throw null; + protected string ConcretePropertySelectFragment(string alias, NHibernate.Persister.Entity.AbstractEntityPersister.IInclusionChecker inclusionChecker) => throw null; + protected string ConcretePropertySelectFragment(string alias, NHibernate.Engine.ValueInclusion[] inclusions) => throw null; + protected string ConcretePropertySelectFragmentSansLeadingComma(string alias, bool[] include) => throw null; + public System.Type ConcreteProxyClass { get => throw null; } + public abstract string[][] ConstraintOrderedTableKeyColumnClosure { get; } + public abstract string[] ConstraintOrderedTableNameClosure { get; } + public bool ConsumesCollectionAlias() => throw null; + public bool ConsumesEntityAlias() => throw null; + public int CountSubclassProperties() => throw null; + protected NHibernate.Loader.Entity.IUniqueEntityLoader CreateEntityLoader(NHibernate.LockMode lockMode, System.Collections.Generic.IDictionary enabledFilters) => throw null; + protected NHibernate.Loader.Entity.IUniqueEntityLoader CreateEntityLoader(NHibernate.LockMode lockMode) => throw null; + protected string CreateFrom(int tableNumber, string alias) => throw null; + public object CreateProxy(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + protected void CreateQueryLoader() => throw null; + protected NHibernate.SqlCommand.SelectFragment CreateSelect(int[] subclassColumnNumbers, int[] subclassFormulaNumbers) => throw null; + protected void CreateUniqueKeyLoaders() => throw null; + protected NHibernate.SqlCommand.SqlString CreateWhereByKey(int tableNumber, string alias) => throw null; + protected int Dehydrate(object id, object[] fields, object rowId, bool[] includeProperty, bool[][] includeColumns, int table, System.Data.Common.DbCommand statement, NHibernate.Engine.ISessionImplementor session, int index) => throw null; + protected int Dehydrate(object id, object[] fields, bool[] includeProperty, bool[][] includeColumns, int j, System.Data.Common.DbCommand st, NHibernate.Engine.ISessionImplementor session) => throw null; + protected System.Threading.Tasks.Task DehydrateAsync(object id, object[] fields, object rowId, bool[] includeProperty, bool[][] includeColumns, int table, System.Data.Common.DbCommand statement, NHibernate.Engine.ISessionImplementor session, int index, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task DehydrateAsync(object id, object[] fields, bool[] includeProperty, bool[][] includeColumns, int j, System.Data.Common.DbCommand st, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void Delete(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Delete(object id, object version, int j, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session, object[] loadedState) => throw null; + public System.Threading.Tasks.Task DeleteAsync(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task DeleteAsync(object id, object version, int j, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session, object[] loadedState, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal virtual string DiscriminatorAlias { get => throw null; } + public virtual string DiscriminatorColumnName { get => throw null; } + protected virtual string DiscriminatorFormulaTemplate { get => throw null; } + public abstract string DiscriminatorSQLValue { get; } + public abstract NHibernate.Type.IType DiscriminatorType { get; } + public abstract object DiscriminatorValue { get; } + protected const string Discriminator_Alias = default; + public const string EntityClass = default; + public NHibernate.Tuple.Entity.EntityMetamodel EntityMetamodel { get => throw null; } + public NHibernate.EntityMode EntityMode { get => throw null; } + public string EntityName { get => throw null; } + public NHibernate.Tuple.Entity.IEntityTuplizer EntityTuplizer { get => throw null; } + public NHibernate.Type.EntityType EntityType { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor Factory { get => throw null; } + public virtual string FilterFragment(string alias, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public abstract string FilterFragment(string alias); + public virtual int[] FindDirty(object[] currentState, object[] previousState, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task FindDirtyAsync(object[] currentState, object[] previousState, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual int[] FindModified(object[] old, object[] current, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task FindModifiedAsync(object[] old, object[] current, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object ForceVersionIncrement(object id, object currentVersion, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ForceVersionIncrementAsync(object id, object currentVersion, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.SqlCommand.SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + public abstract string FromTableFragment(string alias); + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateDeleteString(int j) => throw null; + public virtual string GenerateFilterConditionAlias(string rootAlias) => throw null; + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateIdentityInsertString(bool[] includeProperty) => throw null; + protected NHibernate.SqlCommand.SqlString GenerateInsertGeneratedValuesSelectString() => throw null; + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateInsertString(bool identityInsert, bool[] includeProperty, int j) => throw null; + protected NHibernate.SqlCommand.SqlCommandInfo GenerateInsertString(bool[] includeProperty, int j) => throw null; + protected NHibernate.SqlCommand.SqlCommandInfo GenerateInsertString(bool identityInsert, bool[] includeProperty) => throw null; + protected internal virtual NHibernate.SqlCommand.SqlString GenerateLazySelectString() => throw null; + protected virtual System.Collections.Generic.IDictionary GenerateLazySelectStringsByFetchGroup() => throw null; + protected internal virtual NHibernate.Dialect.Lock.ILockingStrategy GenerateLocker(NHibernate.LockMode lockMode) => throw null; + protected NHibernate.SqlCommand.SqlCommandInfo[] GenerateSQLDeleteStrings(object[] loadedState) => throw null; + protected NHibernate.SqlCommand.SqlString GenerateSelectVersionString() => throw null; + protected virtual NHibernate.SqlCommand.SqlString GenerateSnapshotSelectString() => throw null; + public string GenerateTableAlias(string rootAlias, int tableNumber) => throw null; + public virtual string GenerateTableAliasForColumn(string rootAlias, string column) => throw null; + protected NHibernate.SqlCommand.SqlString GenerateUpdateGeneratedValuesSelectString() => throw null; + protected virtual NHibernate.SqlCommand.SqlCommandInfo GenerateUpdateString(bool[] includeProperty, int j, bool useRowId) => throw null; + protected internal NHibernate.SqlCommand.SqlCommandInfo GenerateUpdateString(bool[] includeProperty, int j, object[] oldFields, bool useRowId) => throw null; + public NHibernate.Engine.CascadeStyle GetCascadeStyle(int i) => throw null; + public object GetCurrentVersion(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetCurrentVersionAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetDatabaseSnapshot(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetDatabaseSnapshotAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string GetDiscriminatorAlias(string suffix) => throw null; + public NHibernate.FetchMode GetFetchMode(int i) => throw null; + protected virtual NHibernate.Tuple.Property GetIdentiferProperty(int table) => throw null; + public virtual object GetIdentifier(object obj) => throw null; + public string[] GetIdentifierAliases(string suffix) => throw null; + public virtual NHibernate.Type.IType GetIdentifierType(int j) => throw null; + public string GetInfoString() => throw null; + protected virtual string[] GetJoinIdKeyColumns(int j) => throw null; + protected virtual object GetJoinTableId(int table, object obj) => throw null; + protected virtual object GetJoinTableId(int j, object[] fields) => throw null; + protected abstract string[] GetKeyColumns(int table); + public virtual object[] GetNaturalIdentifierSnapshot(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task GetNaturalIdentifierSnapshotAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected bool[] GetPropertiesToInsert(object[] fields) => throw null; + protected virtual bool[] GetPropertiesToUpdate(int[] dirtyProperties, bool hasDirtyCollection) => throw null; + public string[] GetPropertyAliases(string suffix, int i) => throw null; + public string[] GetPropertyColumnNames(string propertyName) => throw null; + public string[] GetPropertyColumnNames(int i) => throw null; + protected int GetPropertyColumnSpan(int i) => throw null; + public int GetPropertyIndex(string propertyName) => throw null; + public abstract string GetPropertyTableName(string propertyName); + public virtual NHibernate.Type.IType GetPropertyType(string path) => throw null; + protected bool[] GetPropertyUpdateability(object entity) => throw null; + public object GetPropertyValue(object obj, string propertyName) => throw null; + public object GetPropertyValue(object obj, int i) => throw null; + public object[] GetPropertyValues(object obj) => throw null; + public virtual object[] GetPropertyValuesToInsert(object obj, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual int? GetRefIdColumnOfTable(int table) => throw null; + public virtual string GetRootTableAlias(string drivingAlias) => throw null; + protected NHibernate.SqlCommand.SqlString GetSQLLazySelectString(string fetchGroup) => throw null; + protected string GetSQLWhereString(string alias) => throw null; + public virtual NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string[] suppliedPropertyNames, out NHibernate.Type.IType[] parameterTypes) => throw null; + public virtual NHibernate.SqlCommand.SqlString GetSelectByUniqueKeyString(string propertyName) => throw null; + protected virtual NHibernate.SqlCommand.SqlString GetSequentialSelect(string entityName) => throw null; + protected virtual NHibernate.SqlCommand.SqlString GetSequentialSelect() => throw null; + public NHibernate.Persister.Entity.IEntityPersister GetSubclassEntityPersister(object instance, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public abstract string GetSubclassForDiscriminatorValue(object value); + public string[] GetSubclassPropertyColumnAliases(string propertyName, string suffix) => throw null; + public string[] GetSubclassPropertyColumnNames(string propertyName) => throw null; + public string[] GetSubclassPropertyColumnNames(int i) => throw null; + public virtual NHibernate.Persister.Entity.Declarer GetSubclassPropertyDeclarer(string propertyPath) => throw null; + public string GetSubclassPropertyName(int i) => throw null; + public abstract string GetSubclassPropertyTableName(int i); + public virtual int GetSubclassPropertyTableNumber(string propertyPath) => throw null; + protected abstract int GetSubclassPropertyTableNumber(int i); + public NHibernate.Type.IType GetSubclassPropertyType(int i) => throw null; + protected abstract string[] GetSubclassTableKeyColumns(int j); + public abstract string GetSubclassTableName(int j); + protected abstract string GetTableName(int table); + protected virtual bool[] GetTableUpdateNeeded(int[] dirtyProperties, bool hasDirtyCollection) => throw null; + protected internal NHibernate.Tuple.Entity.IEntityTuplizer GetTuplizer(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object GetVersion(object obj) => throw null; + public virtual bool HasCache { get => throw null; } + public virtual bool HasCascades { get => throw null; } + public virtual bool HasCollections { get => throw null; } + protected virtual bool HasEmbeddedCompositeIdentifier { get => throw null; } + protected bool HasFormulaProperties { get => throw null; } + public virtual bool HasIdentifierProperty { get => throw null; } + public bool HasInsertGeneratedProperties { get => throw null; } + public virtual bool HasLazyProperties { get => throw null; } + public virtual bool HasMutableProperties { get => throw null; } + public virtual bool HasNaturalIdentifier { get => throw null; } + public virtual bool HasProxy { get => throw null; } + public virtual bool HasRowId { get => throw null; } + public virtual bool HasSequentialSelect { get => throw null; } + public virtual bool HasSubclasses { get => throw null; } + public bool HasSubselectLoadableCollections { get => throw null; } + public virtual bool HasUninitializedLazyProperties(object obj) => throw null; + public bool HasUpdateGeneratedProperties { get => throw null; } + protected bool HasWhere { get => throw null; } + public object[] Hydrate(System.Data.Common.DbDataReader rs, object id, object obj, string[][] suffixedPropertyColumns, System.Collections.Generic.ISet fetchedLazyProperties, bool allProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public object[] Hydrate(System.Data.Common.DbDataReader rs, object id, object obj, NHibernate.Persister.Entity.ILoadable rootLoadable, string[][] suffixedPropertyColumns, bool allProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, object id, object obj, string[][] suffixedPropertyColumns, System.Collections.Generic.ISet fetchedLazyProperties, bool allProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, object id, object obj, NHibernate.Persister.Entity.ILoadable rootLoadable, string[][] suffixedPropertyColumns, bool allProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Persister.Entity.AbstractEntityPersister+IInclusionChecker` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected internal interface IInclusionChecker + { + bool IncludeProperty(int propertyNumber); + } + + + public virtual NHibernate.SqlTypes.SqlType[] IdAndVersionSqlTypes { get => throw null; } + public string[] IdentifierAliases { get => throw null; } + public virtual string[] IdentifierColumnNames { get => throw null; } + protected int IdentifierColumnSpan { get => throw null; } + public virtual NHibernate.Id.IIdentifierGenerator IdentifierGenerator { get => throw null; } + public virtual string IdentifierPropertyName { get => throw null; } + public virtual string IdentifierSelectFragment(string name, string suffix) => throw null; + public virtual NHibernate.Type.IType IdentifierType { get => throw null; } + public string IdentitySelectString { get => throw null; } + public bool ImplementsLifecycle { get => throw null; } + public bool ImplementsValidatable { get => throw null; } + protected internal virtual void InitLockers() => throw null; + protected void InitSubclassPropertyAliasesMap(NHibernate.Mapping.PersistentClass model) => throw null; + public void InitializeLazyProperties(System.Data.Common.DbDataReader rs, object id, object entity, string[][] suffixedPropertyColumns, string[] uninitializedLazyProperties, bool allLazyProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InitializeLazyPropertiesAsync(System.Data.Common.DbDataReader rs, object id, object entity, string[][] suffixedPropertyColumns, string[] uninitializedLazyProperties, bool allLazyProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object InitializeLazyProperty(string fieldName, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Insert(object id, object[] fields, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + public object Insert(object[] fields, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + protected void Insert(object id, object[] fields, bool[] notNull, int j, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + protected object Insert(object[] fields, bool[] notNull, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task InsertAsync(object[] fields, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task InsertAsync(object id, object[] fields, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task InsertAsync(object[] fields, bool[] notNull, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task InsertAsync(object id, object[] fields, bool[] notNull, int j, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object Instantiate(object id) => throw null; + public NHibernate.Bytecode.IBytecodeEnhancementMetadata InstrumentationMetadata { get => throw null; } + public virtual bool IsAbstract { get => throw null; } + public bool IsBatchLoadable { get => throw null; } + public bool IsBatchable { get => throw null; } + public bool IsCacheInvalidationRequired { get => throw null; } + protected abstract bool IsClassOrSuperclassTable(int j); + public bool IsCollection { get => throw null; } + public bool IsDefinedOnSubclass(int i) => throw null; + protected bool IsDeleteCallable(int j) => throw null; + public virtual bool IsExplicitPolymorphism { get => throw null; } + protected virtual bool IsIdOfTable(int property, int table) => throw null; + public virtual bool IsIdentifierAssignedByInsert { get => throw null; } + public virtual bool IsInherited { get => throw null; } + protected bool IsInsertCallable(int j) => throw null; + public bool IsInstance(object entity) => throw null; + public bool IsInstrumented { get => throw null; } + protected virtual bool IsInverseSubclassTable(int j) => throw null; + protected virtual bool IsInverseTable(int j) => throw null; + public bool IsLazyPropertiesCacheable { get => throw null; } + public virtual bool IsModifiableEntity(NHibernate.Engine.EntityEntry entry) => throw null; + public virtual bool IsMultiTable { get => throw null; } + public virtual bool IsMutable { get => throw null; } + protected virtual bool IsNullableSubclassTable(int j) => throw null; + protected virtual bool IsNullableTable(int j) => throw null; + public virtual bool IsPolymorphic { get => throw null; } + protected virtual bool IsPropertyDeferred(int propertyIndex) => throw null; + protected abstract bool IsPropertyOfTable(int property, int table); + public bool IsSelectBeforeUpdateRequired { get => throw null; } + public virtual bool IsSubclassEntityName(string entityName) => throw null; + protected virtual bool IsSubclassPropertyDeferred(string propertyName, string entityName) => throw null; + public bool IsSubclassPropertyNullable(int i) => throw null; + protected internal virtual bool IsSubclassTableLazy(int j) => throw null; + protected virtual bool IsSubclassTableSequentialSelect(int table) => throw null; + protected abstract bool IsTableCascadeDeleteEnabled(int j); + public virtual bool? IsTransient(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task IsTransientAsync(object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool? IsUnsavedVersion(object version) => throw null; + protected bool IsUpdateCallable(int j) => throw null; + public bool IsVersionPropertyGenerated { get => throw null; } + public virtual bool IsVersioned { get => throw null; } + public string[] JoinColumnNames { get => throw null; } + public string[] KeyColumnNames { get => throw null; } + protected internal System.Collections.Generic.ISet LazyProperties { get => throw null; } + public object Load(object id, object optionalObject, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object LoadByUniqueKey(string propertyName, object uniqueKey, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LoadByUniqueKeyAsync(string propertyName, object uniqueKey, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void Lock(object id, object version, object obj, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task LockAsync(object id, object version, object obj, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected void LogStaticSQL() => throw null; + public System.Type MappedClass { get => throw null; } + public virtual string MappedSuperclass { get => throw null; } + public string Name { get => throw null; } + public int[] NaturalIdentifierProperties { get => throw null; } + public bool[] NonLazyPropertyUpdateability { get => throw null; } + public virtual string OneToManyFilterFragment(string alias) => throw null; + protected NHibernate.Engine.Versioning.OptimisticLock OptimisticLockMode { get => throw null; } + protected void PostConstruct(NHibernate.Engine.IMapping mapping) => throw null; + public virtual void PostInstantiate() => throw null; + public void ProcessInsertGeneratedProperties(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ProcessInsertGeneratedPropertiesAsync(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public void ProcessUpdateGeneratedProperties(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task ProcessUpdateGeneratedPropertiesAsync(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.Engine.CascadeStyle[] PropertyCascadeStyles { get => throw null; } + public virtual bool[] PropertyCheckability { get => throw null; } + public NHibernate.Engine.ValueInclusion[] PropertyInsertGenerationInclusions { get => throw null; } + public virtual bool[] PropertyInsertability { get => throw null; } + public bool[] PropertyLaziness { get => throw null; } + public virtual string[] PropertyNames { get => throw null; } + public virtual bool[] PropertyNullability { get => throw null; } + public string PropertySelectFragment(string name, string suffix, bool allProperties) => throw null; + public string PropertySelectFragment(string name, string suffix, System.Collections.Generic.ICollection fetchProperties) => throw null; + public abstract string[] PropertySpaces { get; } + protected int PropertySpan { get => throw null; } + protected internal string[] PropertySubclassNames { get => throw null; } + protected internal abstract int[] PropertyTableNumbers { get; } + protected internal abstract int[] PropertyTableNumbersInSelect { get; } + public virtual NHibernate.Type.IType[] PropertyTypes { get => throw null; } + public NHibernate.Engine.ValueInclusion[] PropertyUpdateGenerationInclusions { get => throw null; } + public virtual bool[] PropertyUpdateability { get => throw null; } + public virtual bool[] PropertyVersionability { get => throw null; } + public virtual string[] QuerySpaces { get => throw null; } + protected NHibernate.SqlCommand.SqlString RenderSelect(int[] tableNumbers, int[] columnNumbers, int[] formulaNumbers) => throw null; + public virtual void ResetIdentifier(object entity, object currentId, object currentVersion) => throw null; + public virtual string RootEntityName { get => throw null; } + public virtual string[] RootTableIdentifierColumnNames { get => throw null; } + public string[] RootTableKeyColumnNames { get => throw null; } + public virtual string RootTableName { get => throw null; } + protected internal NHibernate.SqlCommand.SqlCommandInfo SQLIdentityInsertString { get => throw null; } + protected NHibernate.SqlCommand.SqlString SQLLazySelectString { get => throw null; } + protected internal NHibernate.SqlCommand.SqlCommandInfo[] SQLLazyUpdateByRowIdStrings { get => throw null; } + protected internal NHibernate.SqlCommand.SqlCommandInfo[] SQLLazyUpdateStrings { get => throw null; } + protected NHibernate.SqlCommand.SqlString SQLSnapshotSelectString { get => throw null; } + protected internal NHibernate.SqlCommand.SqlCommandInfo[] SQLUpdateByRowIdStrings { get => throw null; } + public string SelectFragment(string alias, string suffix, bool fetchLazyProperties) => throw null; + public string SelectFragment(string alias, string suffix) => throw null; + public string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns, bool includeLazyProperties) => throw null; + public string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns) => throw null; + public string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string collectionSuffix, bool includeCollectionColumns, NHibernate.Persister.Entity.EntityLoadInfo entityInfo) => throw null; + public virtual void SetIdentifier(object obj, object id) => throw null; + public void SetPropertyValue(object obj, int i, object value) => throw null; + public virtual void SetPropertyValue(object obj, string propertyName, object value) => throw null; + public void SetPropertyValues(object obj, object[] values) => throw null; + protected NHibernate.SqlCommand.SqlCommandInfo[] SqlDeleteStrings { get => throw null; } + protected NHibernate.SqlCommand.SqlCommandInfo[] SqlInsertStrings { get => throw null; } + protected NHibernate.SqlCommand.SqlCommandInfo[] SqlUpdateStrings { get => throw null; } + public abstract string[] SubclassClosure { get; } + protected string[] SubclassColumnAliasClosure { get => throw null; } + protected string[] SubclassColumnClosure { get => throw null; } + protected internal bool[] SubclassColumnLaziness { get => throw null; } + protected abstract int[] SubclassColumnTableNumberClosure { get; } + protected string[] SubclassFormulaAliasClosure { get => throw null; } + protected string[] SubclassFormulaClosure { get => throw null; } + protected internal bool[] SubclassFormulaLaziness { get => throw null; } + protected abstract int[] SubclassFormulaTableNumberClosure { get; } + protected string[] SubclassFormulaTemplateClosure { get => throw null; } + protected string[][] SubclassPropertyColumnNameClosure { get => throw null; } + protected string[][] SubclassPropertyFormulaTemplateClosure { get => throw null; } + protected string[] SubclassPropertyNameClosure { get => throw null; } + protected string[] SubclassPropertySubclassNameClosure { get => throw null; } + protected NHibernate.Type.IType[] SubclassPropertyTypeClosure { get => throw null; } + protected abstract int SubclassTableSpan { get; } + protected bool[] TableHasColumns { get => throw null; } + public abstract string TableName { get; } + protected abstract int TableSpan { get; } + public string TemporaryIdTableDDL { get => throw null; } + public string TemporaryIdTableName { get => throw null; } + public virtual string[] ToColumns(string alias, string propertyName) => throw null; + public string[] ToColumns(string propertyName) => throw null; + public string[] ToColumns(string name, int i) => throw null; + public string[] ToIdentifierColumns(string name) => throw null; + public override string ToString() => throw null; + public NHibernate.Type.IType ToType(string propertyName) => throw null; + public bool TryToType(string propertyName, out NHibernate.Type.IType type) => throw null; + public NHibernate.Type.IType Type { get => throw null; } + public void Update(object id, object[] fields, int[] dirtyFields, bool hasDirtyCollection, object[] oldFields, object oldVersion, object obj, object rowId, NHibernate.Engine.ISessionImplementor session) => throw null; + protected bool Update(object id, object[] fields, object[] oldFields, object rowId, bool[] includeProperty, int j, object oldVersion, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task UpdateAsync(object id, object[] fields, int[] dirtyFields, bool hasDirtyCollection, object[] oldFields, object oldVersion, object obj, object rowId, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task UpdateAsync(object id, object[] fields, object[] oldFields, object rowId, bool[] includeProperty, int j, object oldVersion, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected internal virtual void UpdateOrInsert(object id, object[] fields, object[] oldFields, object rowId, bool[] includeProperty, int j, object oldVersion, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal virtual System.Threading.Tasks.Task UpdateOrInsertAsync(object id, object[] fields, object[] oldFields, object rowId, bool[] includeProperty, int j, object oldVersion, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool UseDynamicInsert { get => throw null; } + protected virtual bool UseDynamicUpdate { get => throw null; } + protected bool UseGetGeneratedKeys() => throw null; + protected bool UseInsertSelectIdentity() => throw null; + public virtual string VersionColumnName { get => throw null; } + public System.Collections.IComparer VersionComparator { get => throw null; } + public virtual int VersionProperty { get => throw null; } + public bool VersionPropertyInsertable { get => throw null; } + protected NHibernate.SqlCommand.SqlString VersionSelectString { get => throw null; } + public virtual NHibernate.Type.IVersionType VersionType { get => throw null; } + protected internal string VersionedTableName { get => throw null; } + public virtual NHibernate.SqlCommand.SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses) => throw null; + protected internal NHibernate.SqlCommand.SqlString[] customSQLDelete; + protected internal NHibernate.SqlCommand.SqlString[] customSQLInsert; + protected internal NHibernate.SqlCommand.SqlString[] customSQLUpdate; + protected internal bool[] deleteCallable; + protected internal NHibernate.Engine.ExecuteUpdateResultCheckStyle[] deleteResultCheckStyles; + protected internal bool[] insertCallable; + protected internal NHibernate.Engine.ExecuteUpdateResultCheckStyle[] insertResultCheckStyles; + protected bool[] propertyDefinedOnSubclass; + protected NHibernate.Persister.Entity.BasicEntityPropertyMapping propertyMapping; + protected internal string rowIdName; + protected internal bool[] updateCallable; + protected internal NHibernate.Engine.ExecuteUpdateResultCheckStyle[] updateResultCheckStyles; + } + + // Generated from `NHibernate.Persister.Entity.AbstractPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractPropertyMapping : NHibernate.Persister.Entity.IPropertyMapping + { + protected AbstractPropertyMapping() => throw null; + protected void AddPropertyPath(string path, NHibernate.Type.IType type, string[] columns, string[] formulaTemplates) => throw null; + protected abstract string EntityName { get; } + public string[] GetColumnNames(string propertyName) => throw null; + public virtual string[] IdentifierColumnNames { get => throw null; } + protected void InitComponentPropertyPaths(string path, NHibernate.Type.IAbstractComponentType type, string[] columns, string[] formulaTemplates, NHibernate.Engine.IMapping factory) => throw null; + protected void InitIdentifierPropertyPaths(string path, NHibernate.Type.EntityType etype, string[] columns, NHibernate.Engine.IMapping factory) => throw null; + protected internal void InitPropertyPaths(string path, NHibernate.Type.IType type, string[] columns, string[] formulaTemplates, NHibernate.Engine.IMapping factory) => throw null; + protected NHibernate.QueryException PropertyException(string propertyName) => throw null; + public virtual string[] ToColumns(string propertyName) => throw null; + public virtual string[] ToColumns(string alias, string propertyName) => throw null; + public NHibernate.Type.IType ToType(string propertyName) => throw null; + public bool TryToType(string propertyName, out NHibernate.Type.IType type) => throw null; + public abstract NHibernate.Type.IType Type { get; } + } + + // Generated from `NHibernate.Persister.Entity.BasicEntityPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicEntityPropertyMapping : NHibernate.Persister.Entity.AbstractPropertyMapping + { + public BasicEntityPropertyMapping(NHibernate.Persister.Entity.AbstractEntityPersister persister) => throw null; + protected override string EntityName { get => throw null; } + public override string[] IdentifierColumnNames { get => throw null; } + public override string[] ToColumns(string alias, string propertyName) => throw null; + public override NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Persister.Entity.Declarer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum Declarer + { + Class, + SubClass, + SuperClass, + } + + // Generated from `NHibernate.Persister.Entity.EntityLoadInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityLoadInfo + { + public EntityLoadInfo(string entitySuffix) => throw null; + public string EntitySuffix { get => throw null; } + public bool IncludeLazyProps { get => throw null; set => throw null; } + public System.Collections.Generic.ISet LazyProperties { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Persister.Entity.EntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct EntityPersister + { + public static string EntityID; + // Stub generator skipped constructor + } + + // Generated from `NHibernate.Persister.Entity.IEntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityPersister : NHibernate.Cache.IOptimisticCacheSource + { + void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session); + void AfterReassociate(object entity, NHibernate.Engine.ISessionImplementor session); + NHibernate.Cache.ICacheConcurrencyStrategy Cache { get; } + NHibernate.Cache.Entry.ICacheEntryStructure CacheEntryStructure { get; } + bool CanExtractIdOutOfEntity { get; } + NHibernate.Metadata.IClassMetadata ClassMetadata { get; } + System.Type ConcreteProxyClass { get; } + object CreateProxy(object id, NHibernate.Engine.ISessionImplementor session); + void Delete(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task DeleteAsync(object id, object version, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.Tuple.Entity.EntityMetamodel EntityMetamodel { get; } + NHibernate.EntityMode EntityMode { get; } + string EntityName { get; } + NHibernate.Tuple.Entity.IEntityTuplizer EntityTuplizer { get; } + NHibernate.Engine.ISessionFactoryImplementor Factory { get; } + int[] FindDirty(object[] currentState, object[] previousState, object entity, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task FindDirtyAsync(object[] currentState, object[] previousState, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + int[] FindModified(object[] old, object[] current, object entity, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task FindModifiedAsync(object[] old, object[] current, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object ForceVersionIncrement(object id, object currentVersion, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ForceVersionIncrementAsync(object id, object currentVersion, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object GetCurrentVersion(object id, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetCurrentVersionAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object[] GetDatabaseSnapshot(object id, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetDatabaseSnapshotAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object GetIdentifier(object obj); + object[] GetNaturalIdentifierSnapshot(object id, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetNaturalIdentifierSnapshotAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.Type.IType GetPropertyType(string propertyName); + object GetPropertyValue(object obj, string name); + object GetPropertyValue(object obj, int i); + object[] GetPropertyValues(object obj); + object[] GetPropertyValuesToInsert(object obj, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session); + NHibernate.Persister.Entity.IEntityPersister GetSubclassEntityPersister(object instance, NHibernate.Engine.ISessionFactoryImplementor factory); + object GetVersion(object obj); + bool HasCache { get; } + bool HasCascades { get; } + bool HasCollections { get; } + bool HasIdentifierProperty { get; } + bool HasInsertGeneratedProperties { get; } + bool HasLazyProperties { get; } + bool HasMutableProperties { get; } + bool HasNaturalIdentifier { get; } + bool HasProxy { get; } + bool HasSubselectLoadableCollections { get; } + bool HasUninitializedLazyProperties(object obj); + bool HasUpdateGeneratedProperties { get; } + NHibernate.Id.IIdentifierGenerator IdentifierGenerator { get; } + string IdentifierPropertyName { get; } + NHibernate.Type.IType IdentifierType { get; } + bool ImplementsLifecycle { get; } + bool ImplementsValidatable { get; } + void Insert(object id, object[] fields, object obj, NHibernate.Engine.ISessionImplementor session); + object Insert(object[] fields, object obj, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task InsertAsync(object[] fields, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task InsertAsync(object id, object[] fields, object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object Instantiate(object id); + bool IsBatchLoadable { get; } + bool IsCacheInvalidationRequired { get; } + bool IsIdentifierAssignedByInsert { get; } + bool IsInherited { get; } + bool IsInstance(object entity); + bool IsInstrumented { get; } + bool IsLazyPropertiesCacheable { get; } + bool IsMutable { get; } + bool IsSelectBeforeUpdateRequired { get; } + bool IsSubclassEntityName(string entityName); + bool? IsTransient(object obj, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task IsTransientAsync(object obj, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool? IsUnsavedVersion(object version); + bool IsVersionPropertyGenerated { get; } + bool IsVersioned { get; } + object Load(object id, object optionalObject, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void Lock(object id, object version, object obj, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task LockAsync(object id, object version, object obj, NHibernate.LockMode lockMode, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Type MappedClass { get; } + int[] NaturalIdentifierProperties { get; } + void PostInstantiate(); + void ProcessInsertGeneratedProperties(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ProcessInsertGeneratedPropertiesAsync(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + void ProcessUpdateGeneratedProperties(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task ProcessUpdateGeneratedPropertiesAsync(object id, object entity, object[] state, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.Engine.CascadeStyle[] PropertyCascadeStyles { get; } + bool[] PropertyCheckability { get; } + NHibernate.Engine.ValueInclusion[] PropertyInsertGenerationInclusions { get; } + bool[] PropertyInsertability { get; } + bool[] PropertyLaziness { get; } + string[] PropertyNames { get; } + bool[] PropertyNullability { get; } + string[] PropertySpaces { get; } + NHibernate.Type.IType[] PropertyTypes { get; } + NHibernate.Engine.ValueInclusion[] PropertyUpdateGenerationInclusions { get; } + bool[] PropertyUpdateability { get; } + bool[] PropertyVersionability { get; } + string[] QuerySpaces { get; } + void ResetIdentifier(object entity, object currentId, object currentVersion); + string RootEntityName { get; } + void SetIdentifier(object obj, object id); + void SetPropertyValue(object obj, int i, object value); + void SetPropertyValues(object obj, object[] values); + void Update(object id, object[] fields, int[] dirtyFields, bool hasDirtyCollection, object[] oldFields, object oldVersion, object obj, object rowId, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task UpdateAsync(object id, object[] fields, int[] dirtyFields, bool hasDirtyCollection, object[] oldFields, object oldVersion, object obj, object rowId, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + int VersionProperty { get; } + NHibernate.Type.IVersionType VersionType { get; } + } + + // Generated from `NHibernate.Persister.Entity.IJoinable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IJoinable + { + bool ConsumesCollectionAlias(); + bool ConsumesEntityAlias(); + string FilterFragment(string alias, System.Collections.Generic.IDictionary enabledFilters); + NHibernate.SqlCommand.SqlString FromJoinFragment(string alias, bool innerJoin, bool includeSubclasses); + bool IsCollection { get; } + string[] JoinColumnNames { get; } + string[] KeyColumnNames { get; } + string Name { get; } + string OneToManyFilterFragment(string alias); + string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string currentEntitySuffix, string currentCollectionSuffix, bool includeCollectionColumns); + string TableName { get; } + NHibernate.SqlCommand.SqlString WhereJoinFragment(string alias, bool innerJoin, bool includeSubclasses); + } + + // Generated from `NHibernate.Persister.Entity.ILoadable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILoadable : NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + string DiscriminatorColumnName { get; } + NHibernate.Type.IType DiscriminatorType { get; } + string GetDiscriminatorAlias(string suffix); + string[] GetIdentifierAliases(string suffix); + string[] GetPropertyAliases(string suffix, int i); + string[] GetPropertyColumnNames(int i); + string GetSubclassForDiscriminatorValue(object value); + bool HasRowId { get; } + bool HasSubclasses { get; } + object[] Hydrate(System.Data.Common.DbDataReader rs, object id, object obj, NHibernate.Persister.Entity.ILoadable rootLoadable, string[][] suffixedPropertyColumns, bool allProperties, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, object id, object obj, NHibernate.Persister.Entity.ILoadable rootLoadable, string[][] suffixedPropertyColumns, bool allProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + string[] IdentifierColumnNames { get; } + bool IsAbstract { get; } + } + + // Generated from `NHibernate.Persister.Entity.ILockable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILockable : NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + string GetRootTableAlias(string drivingAlias); + NHibernate.SqlTypes.SqlType[] IdAndVersionSqlTypes { get; } + string[] RootTableIdentifierColumnNames { get; } + string RootTableName { get; } + string VersionColumnName { get; } + } + + // Generated from `NHibernate.Persister.Entity.IOuterJoinLoadable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOuterJoinLoadable : NHibernate.Persister.Entity.ILoadable, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + int CountSubclassProperties(); + NHibernate.Type.EntityType EntityType { get; } + string FromTableFragment(string alias); + string GenerateTableAliasForColumn(string rootAlias, string column); + NHibernate.Engine.CascadeStyle GetCascadeStyle(int i); + NHibernate.FetchMode GetFetchMode(int i); + string[] GetPropertyColumnNames(string propertyPath); + string GetPropertyTableName(string propertyName); + string[] GetSubclassPropertyColumnNames(int i); + string GetSubclassPropertyName(int i); + string GetSubclassPropertyTableName(int i); + NHibernate.Type.IType GetSubclassPropertyType(int i); + bool IsDefinedOnSubclass(int i); + bool IsSubclassPropertyNullable(int i); + string SelectFragment(string alias, string suffix); + string[] ToColumns(string name, int i); + string[] ToIdentifierColumns(string alias); + } + + // Generated from `NHibernate.Persister.Entity.IPropertyMapping` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyMapping + { + string[] ToColumns(string propertyName); + string[] ToColumns(string alias, string propertyName); + NHibernate.Type.IType ToType(string propertyName); + bool TryToType(string propertyName, out NHibernate.Type.IType type); + NHibernate.Type.IType Type { get; } + } + + // Generated from `NHibernate.Persister.Entity.IQueryable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IQueryable : NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.ILoadable, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + string[][] ConstraintOrderedTableKeyColumnClosure { get; } + string[] ConstraintOrderedTableNameClosure { get; } + string DiscriminatorSQLValue { get; } + object DiscriminatorValue { get; } + string GenerateFilterConditionAlias(string rootAlias); + NHibernate.Persister.Entity.Declarer GetSubclassPropertyDeclarer(string propertyPath); + int GetSubclassPropertyTableNumber(string propertyPath); + string GetSubclassTableName(int number); + string IdentifierSelectFragment(string name, string suffix); + bool IsExplicitPolymorphism { get; } + bool IsMultiTable { get; } + string MappedSuperclass { get; } + string PropertySelectFragment(string alias, string suffix, bool allProperties); + string TemporaryIdTableDDL { get; } + string TemporaryIdTableName { get; } + bool VersionPropertyInsertable { get; } + } + + // Generated from `NHibernate.Persister.Entity.ISqlLoadable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlLoadable : NHibernate.Persister.Entity.ILoadable, NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + string[] GetSubclassPropertyColumnAliases(string propertyName, string suffix); + string[] GetSubclassPropertyColumnNames(string propertyName); + string SelectFragment(string alias, string suffix); + NHibernate.Type.IType Type { get; } + } + + // Generated from `NHibernate.Persister.Entity.ISupportLazyPropsJoinable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + internal interface ISupportLazyPropsJoinable + { + string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string collectionSuffix, bool includeCollectionColumns, NHibernate.Persister.Entity.EntityLoadInfo entityInfo); + } + + // Generated from `NHibernate.Persister.Entity.ISupportSelectModeJoinable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISupportSelectModeJoinable + { + string IdentifierSelectFragment(string name, string suffix); + string SelectFragment(NHibernate.Persister.Entity.IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string currentCollectionSuffix, bool includeCollectionColumns, bool includeLazyProperties); + } + + // Generated from `NHibernate.Persister.Entity.IUniqueKeyLoadable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUniqueKeyLoadable + { + int GetPropertyIndex(string propertyName); + object LoadByUniqueKey(string propertyName, object uniqueKey, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task LoadByUniqueKeyAsync(string propertyName, object uniqueKey, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Persister.Entity.JoinedSubclassEntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedSubclassEntityPersister : NHibernate.Persister.Entity.AbstractEntityPersister + { + protected override void AddDiscriminatorToSelect(NHibernate.SqlCommand.SelectFragment select, string name, string suffix) => throw null; + public override string[][] ConstraintOrderedTableKeyColumnClosure { get => throw null; } + public override string[] ConstraintOrderedTableNameClosure { get => throw null; } + public override string DiscriminatorSQLValue { get => throw null; } + public override NHibernate.Type.IType DiscriminatorType { get => throw null; } + public override object DiscriminatorValue { get => throw null; } + public override string FilterFragment(string alias) => throw null; + public override string FromTableFragment(string alias) => throw null; + public override string GenerateFilterConditionAlias(string rootAlias) => throw null; + protected override string[] GetKeyColumns(int table) => throw null; + protected override bool[] GetPropertiesToUpdate(int[] dirtyProperties, bool hasDirtyCollection) => throw null; + public override string GetPropertyTableName(string propertyName) => throw null; + public override string GetRootTableAlias(string drivingAlias) => throw null; + public override string GetSubclassForDiscriminatorValue(object value) => throw null; + public override NHibernate.Persister.Entity.Declarer GetSubclassPropertyDeclarer(string propertyPath) => throw null; + public override string GetSubclassPropertyTableName(int i) => throw null; + protected override int GetSubclassPropertyTableNumber(int i) => throw null; + protected override string[] GetSubclassTableKeyColumns(int j) => throw null; + public override string GetSubclassTableName(int j) => throw null; + protected override string GetTableName(int table) => throw null; + protected override bool[] GetTableUpdateNeeded(int[] dirtyProperties, bool hasDirtyCollection) => throw null; + public override string[] IdentifierColumnNames { get => throw null; } + protected override bool IsClassOrSuperclassTable(int j) => throw null; + public override bool IsMultiTable { get => throw null; } + protected override bool IsPropertyOfTable(int property, int table) => throw null; + protected override bool IsTableCascadeDeleteEnabled(int j) => throw null; + public JoinedSubclassEntityPersister(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Engine.IMapping mapping) : base(default(NHibernate.Mapping.PersistentClass), default(NHibernate.Cache.ICacheConcurrencyStrategy), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override string[] PropertySpaces { get => throw null; } + protected internal override int[] PropertyTableNumbers { get => throw null; } + protected internal override int[] PropertyTableNumbersInSelect { get => throw null; } + public override string RootTableName { get => throw null; } + public override string[] SubclassClosure { get => throw null; } + protected override int[] SubclassColumnTableNumberClosure { get => throw null; } + protected override int[] SubclassFormulaTableNumberClosure { get => throw null; } + protected override int SubclassTableSpan { get => throw null; } + public override string TableName { get => throw null; } + protected override int TableSpan { get => throw null; } + public override string[] ToColumns(string alias, string propertyName) => throw null; + } + + // Generated from `NHibernate.Persister.Entity.Loadable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct Loadable + { + // Stub generator skipped constructor + public static string RowIdAlias; + } + + // Generated from `NHibernate.Persister.Entity.LoadableExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class LoadableExtensions + { + public static object[] Hydrate(this NHibernate.Persister.Entity.ILoadable loadable, System.Data.Common.DbDataReader rs, object id, object obj, string[][] suffixedPropertyColumns, System.Collections.Generic.ISet fetchedLazyProperties, bool allProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task HydrateAsync(this NHibernate.Persister.Entity.ILoadable loadable, System.Data.Common.DbDataReader rs, object id, object obj, string[][] suffixedPropertyColumns, System.Collections.Generic.ISet fetchedLazyProperties, bool allProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Persister.Entity.NamedQueryLoader` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NamedQueryLoader : NHibernate.Loader.Entity.IUniqueEntityLoader + { + public object Load(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LoadAsync(object id, object optionalObject, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NamedQueryLoader(string queryName, NHibernate.Persister.Entity.IEntityPersister persister) => throw null; + } + + // Generated from `NHibernate.Persister.Entity.SingleTableEntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SingleTableEntityPersister : NHibernate.Persister.Entity.AbstractEntityPersister, NHibernate.Persister.Entity.IQueryable, NHibernate.Persister.Entity.IPropertyMapping, NHibernate.Persister.Entity.ILoadable, NHibernate.Persister.Entity.IJoinable, NHibernate.Persister.Entity.IEntityPersister, NHibernate.Cache.IOptimisticCacheSource + { + protected override void AddDiscriminatorToInsert(NHibernate.SqlCommand.SqlInsertBuilder insert) => throw null; + protected override void AddDiscriminatorToSelect(NHibernate.SqlCommand.SelectFragment select, string name, string suffix) => throw null; + public override string[][] ConstraintOrderedTableKeyColumnClosure { get => throw null; } + public override string[] ConstraintOrderedTableNameClosure { get => throw null; } + protected internal override string DiscriminatorAlias { get => throw null; } + public override string DiscriminatorColumnName { get => throw null; } + protected string DiscriminatorFormula { get => throw null; } + protected override string DiscriminatorFormulaTemplate { get => throw null; } + public override string DiscriminatorSQLValue { get => throw null; } + public override NHibernate.Type.IType DiscriminatorType { get => throw null; } + public override object DiscriminatorValue { get => throw null; } + public override string FilterFragment(string alias) => throw null; + public override string FromTableFragment(string name) => throw null; + public override NHibernate.Type.IType GetIdentifierType(int j) => throw null; + protected override string[] GetJoinIdKeyColumns(int j) => throw null; + protected override object GetJoinTableId(int table, object[] fields) => throw null; + protected override object GetJoinTableId(int table, object obj) => throw null; + protected override string[] GetKeyColumns(int table) => throw null; + public override string GetPropertyTableName(string propertyName) => throw null; + protected override int? GetRefIdColumnOfTable(int table) => throw null; + protected override NHibernate.SqlCommand.SqlString GetSequentialSelect(string entityName) => throw null; + protected override NHibernate.SqlCommand.SqlString GetSequentialSelect() => throw null; + public override string GetSubclassForDiscriminatorValue(object value) => throw null; + public override string GetSubclassPropertyTableName(int i) => throw null; + public int GetSubclassPropertyTableNumber(string propertyName, string entityName) => throw null; + protected override int GetSubclassPropertyTableNumber(int i) => throw null; + protected override string[] GetSubclassTableKeyColumns(int j) => throw null; + public override string GetSubclassTableName(int j) => throw null; + protected override string GetTableName(int table) => throw null; + public override bool HasSequentialSelect { get => throw null; } + protected override bool IsClassOrSuperclassTable(int j) => throw null; + protected bool IsDiscriminatorFormula { get => throw null; } + protected override bool IsIdOfTable(int property, int table) => throw null; + protected override bool IsInverseSubclassTable(int j) => throw null; + protected override bool IsInverseTable(int j) => throw null; + public override bool IsMultiTable { get => throw null; } + protected override bool IsNullableSubclassTable(int j) => throw null; + protected override bool IsNullableTable(int j) => throw null; + protected override bool IsPropertyDeferred(int propertyIndex) => throw null; + protected override bool IsPropertyOfTable(int property, int table) => throw null; + protected override bool IsSubclassPropertyDeferred(string propertyName, string entityName) => throw null; + protected internal override bool IsSubclassTableLazy(int j) => throw null; + protected override bool IsSubclassTableSequentialSelect(int table) => throw null; + protected override bool IsTableCascadeDeleteEnabled(int j) => throw null; + public override string OneToManyFilterFragment(string alias) => throw null; + public override void PostInstantiate() => throw null; + public override string[] PropertySpaces { get => throw null; } + protected internal override int[] PropertyTableNumbers { get => throw null; } + protected internal override int[] PropertyTableNumbersInSelect { get => throw null; } + public SingleTableEntityPersister(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Engine.IMapping mapping) : base(default(NHibernate.Mapping.PersistentClass), default(NHibernate.Cache.ICacheConcurrencyStrategy), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + public override string[] SubclassClosure { get => throw null; } + protected override int[] SubclassColumnTableNumberClosure { get => throw null; } + protected override int[] SubclassFormulaTableNumberClosure { get => throw null; } + protected override int SubclassTableSpan { get => throw null; } + public override string TableName { get => throw null; } + protected override int TableSpan { get => throw null; } + } + + // Generated from `NHibernate.Persister.Entity.UnionSubclassEntityPersister` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnionSubclassEntityPersister : NHibernate.Persister.Entity.AbstractEntityPersister + { + protected override void AddDiscriminatorToSelect(NHibernate.SqlCommand.SelectFragment select, string name, string suffix) => throw null; + public override string[][] ConstraintOrderedTableKeyColumnClosure { get => throw null; } + public override string[] ConstraintOrderedTableNameClosure { get => throw null; } + public override string DiscriminatorSQLValue { get => throw null; } + public override NHibernate.Type.IType DiscriminatorType { get => throw null; } + public override object DiscriminatorValue { get => throw null; } + public override string FilterFragment(string alias) => throw null; + public override string FromTableFragment(string name) => throw null; + protected string GenerateSubquery(NHibernate.Mapping.PersistentClass model, NHibernate.Engine.IMapping mapping) => throw null; + protected override string[] GetKeyColumns(int table) => throw null; + public override string GetPropertyTableName(string propertyName) => throw null; + public override string GetSubclassForDiscriminatorValue(object value) => throw null; + public override string GetSubclassPropertyTableName(int i) => throw null; + public override int GetSubclassPropertyTableNumber(string propertyName) => throw null; + protected override int GetSubclassPropertyTableNumber(int i) => throw null; + protected override string[] GetSubclassTableKeyColumns(int j) => throw null; + public override string GetSubclassTableName(int j) => throw null; + protected override string GetTableName(int table) => throw null; + protected override bool IsClassOrSuperclassTable(int j) => throw null; + public override bool IsMultiTable { get => throw null; } + protected override bool IsPropertyOfTable(int property, int j) => throw null; + protected override bool IsTableCascadeDeleteEnabled(int j) => throw null; + public override string[] PropertySpaces { get => throw null; } + protected internal override int[] PropertyTableNumbers { get => throw null; } + protected internal override int[] PropertyTableNumbersInSelect { get => throw null; } + public override string[] QuerySpaces { get => throw null; } + public override string[] SubclassClosure { get => throw null; } + protected override int[] SubclassColumnTableNumberClosure { get => throw null; } + protected override int[] SubclassFormulaTableNumberClosure { get => throw null; } + protected override int SubclassTableSpan { get => throw null; } + public override string TableName { get => throw null; } + protected override int TableSpan { get => throw null; } + public UnionSubclassEntityPersister(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Cache.ICacheConcurrencyStrategy cache, NHibernate.Engine.ISessionFactoryImplementor factory, NHibernate.Engine.IMapping mapping) : base(default(NHibernate.Mapping.PersistentClass), default(NHibernate.Cache.ICacheConcurrencyStrategy), default(NHibernate.Engine.ISessionFactoryImplementor)) => throw null; + } + + // Generated from `NHibernate.Persister.Entity.UniqueKeyLoadableExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class UniqueKeyLoadableExtensions + { + public static void CacheByUniqueKeys(this NHibernate.Persister.Entity.IUniqueKeyLoadable ukLoadable, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task CacheByUniqueKeysAsync(this NHibernate.Persister.Entity.IUniqueKeyLoadable ukLoadable, object entity, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + } + } + namespace Properties + { + // Generated from `NHibernate.Properties.BackFieldStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BackFieldStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public BackFieldStrategy() => throw null; + public string GetFieldName(string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.BackrefPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BackrefPropertyAccessor : NHibernate.Properties.IPropertyAccessor + { + public BackrefPropertyAccessor(string collectionRole, string entityName) => throw null; + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + public static object Unknown; + } + + // Generated from `NHibernate.Properties.BasicPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicPropertyAccessor : NHibernate.Properties.IPropertyAccessor + { + // Generated from `NHibernate.Properties.BasicPropertyAccessor+BasicGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicGetter : NHibernate.Properties.IOptimizableGetter, NHibernate.Properties.IGetter + { + public BasicGetter(System.Type clazz, System.Reflection.PropertyInfo property, string propertyName) => throw null; + public void Emit(System.Reflection.Emit.ILGenerator il) => throw null; + public object Get(object target) => throw null; + public object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public System.Reflection.PropertyInfo Property { get => throw null; } + public string PropertyName { get => throw null; } + public System.Type ReturnType { get => throw null; } + } + + + public BasicPropertyAccessor() => throw null; + // Generated from `NHibernate.Properties.BasicPropertyAccessor+BasicSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BasicSetter : NHibernate.Properties.ISetter, NHibernate.Properties.IOptimizableSetter + { + public BasicSetter(System.Type clazz, System.Reflection.PropertyInfo property, string propertyName) => throw null; + public void Emit(System.Reflection.Emit.ILGenerator il) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public System.Reflection.PropertyInfo Property { get => throw null; } + public string PropertyName { get => throw null; } + public void Set(object target, object value) => throw null; + public System.Type Type { get => throw null; } + } + + + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type type, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type type, string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.CamelCaseMUnderscoreStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CamelCaseMUnderscoreStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public CamelCaseMUnderscoreStrategy() => throw null; + public string GetFieldName(string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.CamelCaseStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CamelCaseStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public CamelCaseStrategy() => throw null; + public string GetFieldName(string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.CamelCaseUnderscoreStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CamelCaseUnderscoreStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public CamelCaseUnderscoreStrategy() => throw null; + public string GetFieldName(string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.ChainedPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ChainedPropertyAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public ChainedPropertyAccessor(NHibernate.Properties.IPropertyAccessor[] chain) => throw null; + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.EmbeddedPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmbeddedPropertyAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + // Generated from `NHibernate.Properties.EmbeddedPropertyAccessor+EmbeddedGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmbeddedGetter : NHibernate.Properties.IGetter + { + public object Get(object target) => throw null; + public object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public System.Type ReturnType { get => throw null; } + public override string ToString() => throw null; + } + + + public EmbeddedPropertyAccessor() => throw null; + // Generated from `NHibernate.Properties.EmbeddedPropertyAccessor+EmbeddedSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmbeddedSetter : NHibernate.Properties.ISetter + { + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public void Set(object target, object value) => throw null; + public override string ToString() => throw null; + } + + + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + } + + // Generated from `NHibernate.Properties.FieldAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FieldAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public FieldAccessor(NHibernate.Properties.IFieldNamingStrategy namingStrategy) => throw null; + public FieldAccessor() => throw null; + // Generated from `NHibernate.Properties.FieldAccessor+FieldGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FieldGetter : NHibernate.Properties.IOptimizableGetter, NHibernate.Properties.IGetter + { + public void Emit(System.Reflection.Emit.ILGenerator il) => throw null; + public FieldGetter(System.Reflection.FieldInfo field, System.Type clazz, string name) => throw null; + public object Get(object target) => throw null; + public object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public System.Type ReturnType { get => throw null; } + } + + + // Generated from `NHibernate.Properties.FieldAccessor+FieldSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FieldSetter : NHibernate.Properties.ISetter, NHibernate.Properties.IOptimizableSetter + { + public void Emit(System.Reflection.Emit.ILGenerator il) => throw null; + public FieldSetter(System.Reflection.FieldInfo field, System.Type clazz, string name) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public void Set(object target, object value) => throw null; + public System.Type Type { get => throw null; } + } + + + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.IFieldNamingStrategy NamingStrategy { get => throw null; } + } + + // Generated from `NHibernate.Properties.IFieldNamingStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IFieldNamingStrategy + { + string GetFieldName(string propertyName); + } + + // Generated from `NHibernate.Properties.IGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IGetter + { + object Get(object target); + object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session); + System.Reflection.MethodInfo Method { get; } + string PropertyName { get; } + System.Type ReturnType { get; } + } + + // Generated from `NHibernate.Properties.IOptimizableGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOptimizableGetter + { + void Emit(System.Reflection.Emit.ILGenerator il); + } + + // Generated from `NHibernate.Properties.IOptimizableSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IOptimizableSetter + { + void Emit(System.Reflection.Emit.ILGenerator il); + System.Type Type { get; } + } + + // Generated from `NHibernate.Properties.IPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IPropertyAccessor + { + bool CanAccessThroughReflectionOptimizer { get; } + NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName); + NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName); + } + + // Generated from `NHibernate.Properties.ISetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISetter + { + System.Reflection.MethodInfo Method { get; } + string PropertyName { get; } + void Set(object target, object value); + } + + // Generated from `NHibernate.Properties.IndexPropertyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexPropertyAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + // Generated from `NHibernate.Properties.IndexPropertyAccessor+IndexGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexGetter : NHibernate.Properties.IGetter + { + public object Get(object target) => throw null; + public object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public IndexGetter(NHibernate.Properties.IndexPropertyAccessor encloser) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public System.Type ReturnType { get => throw null; } + } + + + public IndexPropertyAccessor(string collectionRole, string entityName) => throw null; + // Generated from `NHibernate.Properties.IndexPropertyAccessor+IndexSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IndexSetter : NHibernate.Properties.ISetter + { + public IndexSetter() => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public void Set(object target, object value) => throw null; + } + + + } + + // Generated from `NHibernate.Properties.LowerCaseStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LowerCaseStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public string GetFieldName(string propertyName) => throw null; + public LowerCaseStrategy() => throw null; + } + + // Generated from `NHibernate.Properties.LowerCaseUnderscoreStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LowerCaseUnderscoreStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public string GetFieldName(string propertyName) => throw null; + public LowerCaseUnderscoreStrategy() => throw null; + } + + // Generated from `NHibernate.Properties.MapAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + public MapAccessor() => throw null; + // Generated from `NHibernate.Properties.MapAccessor+MapGetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapGetter : NHibernate.Properties.IGetter + { + public object Get(object target) => throw null; + public object GetForInsert(object owner, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public System.Type ReturnType { get => throw null; } + } + + + // Generated from `NHibernate.Properties.MapAccessor+MapSetter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapSetter : NHibernate.Properties.ISetter + { + public System.Reflection.MethodInfo Method { get => throw null; } + public string PropertyName { get => throw null; } + public void Set(object target, object value) => throw null; + } + + + } + + // Generated from `NHibernate.Properties.NoSetterAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoSetterAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type type, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type type, string propertyName) => throw null; + public NoSetterAccessor(NHibernate.Properties.IFieldNamingStrategy namingStrategy) => throw null; + } + + // Generated from `NHibernate.Properties.NoopAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NoopAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type theClass, string propertyName) => throw null; + public NoopAccessor() => throw null; + } + + // Generated from `NHibernate.Properties.PascalCaseMStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PascalCaseMStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public string GetFieldName(string propertyName) => throw null; + public PascalCaseMStrategy() => throw null; + } + + // Generated from `NHibernate.Properties.PascalCaseMUnderscoreStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PascalCaseMUnderscoreStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public string GetFieldName(string propertyName) => throw null; + public PascalCaseMUnderscoreStrategy() => throw null; + } + + // Generated from `NHibernate.Properties.PascalCaseUnderscoreStrategy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PascalCaseUnderscoreStrategy : NHibernate.Properties.IFieldNamingStrategy + { + public string GetFieldName(string propertyName) => throw null; + public PascalCaseUnderscoreStrategy() => throw null; + } + + // Generated from `NHibernate.Properties.PropertyAccessorFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PropertyAccessorFactory + { + public static NHibernate.Properties.IPropertyAccessor DynamicMapPropertyAccessor { get => throw null; } + public static NHibernate.Properties.IPropertyAccessor GetPropertyAccessor(string type) => throw null; + public static NHibernate.Properties.IPropertyAccessor GetPropertyAccessor(NHibernate.Mapping.Property property, NHibernate.EntityMode? mode) => throw null; + } + + // Generated from `NHibernate.Properties.ReadOnlyAccessor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ReadOnlyAccessor : NHibernate.Properties.IPropertyAccessor + { + public bool CanAccessThroughReflectionOptimizer { get => throw null; } + public NHibernate.Properties.IGetter GetGetter(System.Type type, string propertyName) => throw null; + public NHibernate.Properties.ISetter GetSetter(System.Type type, string propertyName) => throw null; + public ReadOnlyAccessor() => throw null; + } + + // Generated from `NHibernate.Properties.UnknownBackrefProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public struct UnknownBackrefProperty + { + // Stub generator skipped constructor + } + + } + namespace Proxy + { + // Generated from `NHibernate.Proxy.AbstractLazyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractLazyInitializer : NHibernate.Proxy.ILazyInitializer + { + protected internal AbstractLazyInitializer(string entityName, object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public string EntityName { get => throw null; } + public object GetImplementation(NHibernate.Engine.ISessionImplementor s) => throw null; + public object GetImplementation() => throw null; + public System.Threading.Tasks.Task GetImplementationAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public object Identifier { get => throw null; set => throw null; } + public virtual void Initialize() => throw null; + public virtual System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken) => throw null; + protected static object InvokeImplementation; + protected internal bool IsConnectedToSession { get => throw null; } + public bool IsReadOnlySettingAvailable { get => throw null; } + public bool IsUninitialized { get => throw null; } + public abstract System.Type PersistentClass { get; } + public bool ReadOnly { get => throw null; set => throw null; } + public NHibernate.Engine.ISessionImplementor Session { get => throw null; set => throw null; } + public void SetImplementation(object target) => throw null; + public void SetSession(NHibernate.Engine.ISessionImplementor s) => throw null; + protected internal object Target { get => throw null; } + public void UnsetSession() => throw null; + public bool Unwrap { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Proxy.AbstractProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractProxyFactory : NHibernate.Proxy.IProxyFactory + { + protected AbstractProxyFactory() => throw null; + protected virtual NHibernate.Type.IAbstractComponentType ComponentIdType { get => throw null; set => throw null; } + protected virtual string EntityName { get => throw null; set => throw null; } + public virtual object GetFieldInterceptionProxy(object instanceToWrap) => throw null; + protected virtual System.Reflection.MethodInfo GetIdentifierMethod { get => throw null; set => throw null; } + public abstract NHibernate.Proxy.INHibernateProxy GetProxy(object id, NHibernate.Engine.ISessionImplementor session); + protected virtual System.Type[] Interfaces { get => throw null; set => throw null; } + protected virtual bool IsClassProxy { get => throw null; set => throw null; } + protected virtual bool OverridesEquals { get => throw null; set => throw null; } + protected virtual System.Type PersistentClass { get => throw null; set => throw null; } + public virtual void PostInstantiate(string entityName, System.Type persistentClass, System.Collections.Generic.ISet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType, bool isClassProxy) => throw null; + public virtual void PostInstantiate(string entityName, System.Type persistentClass, System.Collections.Generic.ISet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType) => throw null; + protected virtual System.Reflection.MethodInfo SetIdentifierMethod { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Proxy.DefaultDynamicProxyMethodCheckerExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class DefaultDynamicProxyMethodCheckerExtensions + { + public static bool IsProxiable(this System.Reflection.MethodInfo method) => throw null; + public static bool ShouldBeProxiable(this System.Reflection.PropertyInfo propertyInfo) => throw null; + public static bool ShouldBeProxiable(this System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `NHibernate.Proxy.DefaultLazyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultLazyInitializer : NHibernate.Proxy.Poco.BasicLazyInitializer, NHibernate.Proxy.DynamicProxy.IInterceptor + { + public DefaultLazyInitializer(string entityName, System.Type persistentClass, object id, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType, NHibernate.Engine.ISessionImplementor session, bool overridesEquals) : base(default(string), default(System.Type), default(object), default(System.Reflection.MethodInfo), default(System.Reflection.MethodInfo), default(NHibernate.Type.IAbstractComponentType), default(NHibernate.Engine.ISessionImplementor), default(bool)) => throw null; + public object Intercept(NHibernate.Proxy.DynamicProxy.InvocationInfo info) => throw null; + } + + // Generated from `NHibernate.Proxy.DefaultProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultProxyFactory : NHibernate.Proxy.AbstractProxyFactory + { + public DefaultProxyFactory() => throw null; + public override object GetFieldInterceptionProxy(object instanceToWrap) => throw null; + public override NHibernate.Proxy.INHibernateProxy GetProxy(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + protected static NHibernate.INHibernateLogger log; + } + + // Generated from `NHibernate.Proxy.DynProxyTypeValidator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynProxyTypeValidator : NHibernate.Proxy.IProxyValidator + { + protected virtual void CheckAccessibleMembersAreVirtual(System.Type type) => throw null; + protected virtual void CheckHasVisibleDefaultConstructor(System.Type type) => throw null; + protected virtual void CheckMethodIsVirtual(System.Type type, System.Reflection.MethodInfo method) => throw null; + protected void CheckNotSealed(System.Type type) => throw null; + public DynProxyTypeValidator() => throw null; + protected void EnlistError(System.Type type, string text) => throw null; + protected virtual bool HasVisibleDefaultConstructor(System.Type type) => throw null; + public virtual bool IsProxeable(System.Reflection.MethodInfo method) => throw null; + public System.Collections.Generic.ICollection ValidateType(System.Type type) => throw null; + } + + // Generated from `NHibernate.Proxy.FieldInterceptorObjectReference` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FieldInterceptorObjectReference : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IObjectReference + { + public FieldInterceptorObjectReference(NHibernate.Proxy.NHibernateProxyFactoryInfo proxyFactoryInfo, NHibernate.Intercept.IFieldInterceptor fieldInterceptorField) => throw null; + public void GetBaseData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, object proxy, System.Type proxyBaseType) => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object GetRealObject(System.Runtime.Serialization.StreamingContext context) => throw null; + public void SetNoAdditionalData(System.Runtime.Serialization.SerializationInfo info) => throw null; + } + + // Generated from `NHibernate.Proxy.IEntityNotFoundDelegate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityNotFoundDelegate + { + void HandleEntityNotFound(string entityName, object id); + } + + // Generated from `NHibernate.Proxy.ILazyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILazyInitializer + { + string EntityName { get; } + object GetImplementation(NHibernate.Engine.ISessionImplementor s); + object GetImplementation(); + System.Threading.Tasks.Task GetImplementationAsync(System.Threading.CancellationToken cancellationToken); + object Identifier { get; set; } + void Initialize(); + System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken); + bool IsReadOnlySettingAvailable { get; } + bool IsUninitialized { get; } + System.Type PersistentClass { get; } + bool ReadOnly { get; set; } + NHibernate.Engine.ISessionImplementor Session { get; set; } + void SetImplementation(object target); + void SetSession(NHibernate.Engine.ISessionImplementor s); + void UnsetSession(); + bool Unwrap { get; set; } + } + + // Generated from `NHibernate.Proxy.INHibernateProxy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface INHibernateProxy + { + NHibernate.Proxy.ILazyInitializer HibernateLazyInitializer { get; } + } + + // Generated from `NHibernate.Proxy.IProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyFactory + { + object GetFieldInterceptionProxy(object instanceToWrap); + NHibernate.Proxy.INHibernateProxy GetProxy(object id, NHibernate.Engine.ISessionImplementor session); + void PostInstantiate(string entityName, System.Type persistentClass, System.Collections.Generic.ISet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType); + } + + // Generated from `NHibernate.Proxy.IProxyValidator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyValidator + { + bool IsProxeable(System.Reflection.MethodInfo method); + System.Collections.Generic.ICollection ValidateType(System.Type type); + } + + // Generated from `NHibernate.Proxy.NHibernateProxyFactoryInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NHibernateProxyFactoryInfo : System.Runtime.Serialization.ISerializable + { + public NHibernate.Proxy.IProxyFactory CreateProxyFactory() => throw null; + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Proxy.NHibernateProxyHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class NHibernateProxyHelper + { + public static System.Type GetClassWithoutInitializingProxy(object obj) => throw null; + public static System.Type GuessClass(object entity) => throw null; + public static bool IsProxy(this object entity) => throw null; + } + + // Generated from `NHibernate.Proxy.NHibernateProxyObjectReference` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NHibernateProxyObjectReference : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IObjectReference + { + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object GetRealObject(System.Runtime.Serialization.StreamingContext context) => throw null; + public NHibernateProxyObjectReference(NHibernate.Proxy.NHibernateProxyFactoryInfo proxyFactoryInfo, object identifier, object implementation) => throw null; + public NHibernateProxyObjectReference(NHibernate.Proxy.NHibernateProxyFactoryInfo proxyFactoryInfo, object identifier) => throw null; + } + + // Generated from `NHibernate.Proxy.ProxyCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyCacheEntry : System.IEquatable + { + public System.Type BaseType { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Proxy.ProxyCacheEntry other) => throw null; + public override int GetHashCode() => throw null; + public System.Collections.Generic.IReadOnlyCollection Interfaces { get => throw null; } + public ProxyCacheEntry(System.Type baseType, System.Type[] interfaces) => throw null; + } + + // Generated from `NHibernate.Proxy.ProxyFactoryExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ProxyFactoryExtensions + { + public static object GetFieldInterceptionProxy(this NHibernate.Proxy.IProxyFactory proxyFactory) => throw null; + public static void PostInstantiate(this NHibernate.Proxy.IProxyFactory pf, string entityName, System.Type persistentClass, System.Collections.Generic.HashSet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType, bool isClassProxy) => throw null; + } + + // Generated from `NHibernate.Proxy.StaticProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StaticProxyFactory : NHibernate.Proxy.AbstractProxyFactory + { + public override object GetFieldInterceptionProxy(object instanceToWrap) => throw null; + public object GetFieldInterceptionProxy() => throw null; + public override NHibernate.Proxy.INHibernateProxy GetProxy(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void PostInstantiate(string entityName, System.Type persistentClass, System.Collections.Generic.ISet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType, bool isClassProxy) => throw null; + public StaticProxyFactory() => throw null; + } + + namespace DynamicProxy + { + // Generated from `NHibernate.Proxy.DynamicProxy.DefaultProxyAssemblyBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultProxyAssemblyBuilder : NHibernate.Proxy.DynamicProxy.IProxyAssemblyBuilder + { + public DefaultProxyAssemblyBuilder() => throw null; + public System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(System.AppDomain appDomain, System.Reflection.AssemblyName name) => throw null; + public System.Reflection.Emit.ModuleBuilder DefineDynamicModule(System.Reflection.Emit.AssemblyBuilder assemblyBuilder, string moduleName) => throw null; + public void Save(System.Reflection.Emit.AssemblyBuilder assemblyBuilder) => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.HashSetExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class HashSetExtensions + { + public static System.Collections.Generic.HashSet Merge(this System.Collections.Generic.HashSet source, System.Collections.Generic.IEnumerable toMerge) => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IArgumentHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IArgumentHandler + { + void PushArguments(System.Reflection.ParameterInfo[] parameters, System.Reflection.Emit.ILGenerator IL, bool isStatic); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IInterceptor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInterceptor + { + object Intercept(NHibernate.Proxy.DynamicProxy.InvocationInfo info); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IMethodBodyEmitter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IMethodBodyEmitter + { + void EmitMethodBody(System.Reflection.Emit.MethodBuilder proxyMethod, System.Reflection.Emit.MethodBuilder callbackMethod, System.Reflection.MethodInfo method, System.Reflection.FieldInfo field); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IProxy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxy + { + NHibernate.Proxy.DynamicProxy.IInterceptor Interceptor { get; set; } + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IProxyAssemblyBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyAssemblyBuilder + { + System.Reflection.Emit.AssemblyBuilder DefineDynamicAssembly(System.AppDomain appDomain, System.Reflection.AssemblyName name); + System.Reflection.Emit.ModuleBuilder DefineDynamicModule(System.Reflection.Emit.AssemblyBuilder assemblyBuilder, string moduleName); + void Save(System.Reflection.Emit.AssemblyBuilder assemblyBuilder); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IProxyCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyCache + { + bool Contains(System.Type baseType, params System.Type[] baseInterfaces); + System.Reflection.TypeInfo GetProxyType(System.Type baseType, params System.Type[] baseInterfaces); + void StoreProxyType(System.Reflection.TypeInfo result, System.Type baseType, params System.Type[] baseInterfaces); + bool TryGetProxyType(System.Type baseType, System.Type[] baseInterfaces, out System.Reflection.TypeInfo proxyType); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.IProxyMethodBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IProxyMethodBuilder + { + void CreateProxiedMethod(System.Reflection.FieldInfo field, System.Reflection.MethodInfo method, System.Reflection.Emit.TypeBuilder typeBuilder); + } + + // Generated from `NHibernate.Proxy.DynamicProxy.InterceptorHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object InterceptorHandler(object proxy, System.Reflection.MethodInfo targetMethod, System.Diagnostics.StackTrace trace, System.Type[] genericTypeArgs, object[] args); + + // Generated from `NHibernate.Proxy.DynamicProxy.InvocationHandler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate object InvocationHandler(NHibernate.Proxy.DynamicProxy.InvocationInfo info); + + // Generated from `NHibernate.Proxy.DynamicProxy.InvocationInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InvocationInfo + { + public object[] Arguments { get => throw null; } + public InvocationInfo(object proxy, System.Reflection.MethodInfo targetMethod, System.Reflection.MethodInfo callbackMethod, System.Diagnostics.StackTrace trace, System.Type[] genericTypeArgs, object[] args) => throw null; + public virtual object InvokeMethodOnTarget() => throw null; + public void SetArgument(int position, object arg) => throw null; + public System.Diagnostics.StackTrace StackTrace { get => throw null; } + public object Target { get => throw null; } + public System.Reflection.MethodInfo TargetMethod { get => throw null; } + public override string ToString() => throw null; + public System.Type[] TypeArguments { get => throw null; } + } + + // Generated from `NHibernate.Proxy.DynamicProxy.OpCodesMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class OpCodesMap + { + public static bool TryGetLdindOpCode(System.Type valueType, out System.Reflection.Emit.OpCode opCode) => throw null; + public static bool TryGetStindOpCode(System.Type valueType, out System.Reflection.Emit.OpCode opCode) => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.ProxyCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyCache : NHibernate.Proxy.DynamicProxy.IProxyCache + { + public bool Contains(System.Type baseType, params System.Type[] baseInterfaces) => throw null; + public System.Reflection.TypeInfo GetProxyType(System.Type baseType, params System.Type[] baseInterfaces) => throw null; + public ProxyCache() => throw null; + public void StoreProxyType(System.Reflection.TypeInfo result, System.Type baseType, params System.Type[] baseInterfaces) => throw null; + public bool TryGetProxyType(System.Type baseType, System.Type[] baseInterfaces, out System.Reflection.TypeInfo proxyType) => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.ProxyCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyCacheEntry : NHibernate.Proxy.ProxyCacheEntry + { + public ProxyCacheEntry(System.Type baseType, System.Type[] interfaces) : base(default(System.Type), default(System.Type[])) => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.ProxyDummy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyDummy + { + public ProxyDummy() => throw null; + } + + // Generated from `NHibernate.Proxy.DynamicProxy.ProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyFactory + { + public NHibernate.Proxy.DynamicProxy.IProxyCache Cache { get => throw null; } + public object CreateProxy(System.Type instanceType, NHibernate.Proxy.DynamicProxy.IInterceptor interceptor, params System.Type[] baseInterfaces) => throw null; + public System.Type CreateProxyType(System.Type baseType, params System.Type[] interfaces) => throw null; + public NHibernate.Proxy.DynamicProxy.IProxyAssemblyBuilder ProxyAssemblyBuilder { get => throw null; } + public ProxyFactory(NHibernate.Proxy.DynamicProxy.IProxyMethodBuilder proxyMethodBuilder, NHibernate.Proxy.DynamicProxy.IProxyAssemblyBuilder proxyAssemblyBuilder) => throw null; + public ProxyFactory(NHibernate.Proxy.DynamicProxy.IProxyMethodBuilder proxyMethodBuilder) => throw null; + public ProxyFactory(NHibernate.Proxy.DynamicProxy.IProxyAssemblyBuilder proxyAssemblyBuilder) => throw null; + public ProxyFactory() => throw null; + public NHibernate.Proxy.DynamicProxy.IProxyMethodBuilder ProxyMethodBuilder { get => throw null; } + } + + // Generated from `NHibernate.Proxy.DynamicProxy.ProxyObjectReference` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ProxyObjectReference : System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IObjectReference + { + public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public object GetRealObject(System.Runtime.Serialization.StreamingContext context) => throw null; + protected ProxyObjectReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + namespace Map + { + // Generated from `NHibernate.Proxy.Map.MapLazyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapLazyInitializer : NHibernate.Proxy.AbstractLazyInitializer + { + public System.Collections.Generic.IDictionary GenericMap { get => throw null; } + public System.Collections.IDictionary Map { get => throw null; } + public MapLazyInitializer(string entityName, object id, NHibernate.Engine.ISessionImplementor session) : base(default(string), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public override System.Type PersistentClass { get => throw null; } + } + + // Generated from `NHibernate.Proxy.Map.MapProxy` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapProxy : System.Dynamic.DynamicObject, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection>, NHibernate.Proxy.INHibernateProxy + { + void System.Collections.Generic.IDictionary.Add(string key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Add(object key, object value) => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.ContainsKey(string key) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public override System.Collections.Generic.IEnumerable GetDynamicMemberNames() => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public NHibernate.Proxy.ILazyInitializer HibernateLazyInitializer { get => throw null; } + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + object System.Collections.Generic.IDictionary.this[string key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + public void Remove(object key) => throw null; + bool System.Collections.Generic.IDictionary.Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public object SyncRoot { get => throw null; } + public override bool TryDeleteIndex(System.Dynamic.DeleteIndexBinder binder, object[] indexes) => throw null; + public override bool TryDeleteMember(System.Dynamic.DeleteMemberBinder binder) => throw null; + public override bool TryGetIndex(System.Dynamic.GetIndexBinder binder, object[] indexes, out object result) => throw null; + public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out object result) => throw null; + bool System.Collections.Generic.IDictionary.TryGetValue(string key, out object value) => throw null; + public override bool TryInvokeMember(System.Dynamic.InvokeMemberBinder binder, object[] args, out object result) => throw null; + public override bool TrySetIndex(System.Dynamic.SetIndexBinder binder, object[] indexes, object value) => throw null; + public override bool TrySetMember(System.Dynamic.SetMemberBinder binder, object value) => throw null; + public System.Collections.ICollection Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `NHibernate.Proxy.Map.MapProxyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MapProxyFactory : NHibernate.Proxy.IProxyFactory + { + public object GetFieldInterceptionProxy(object getInstance) => throw null; + public NHibernate.Proxy.INHibernateProxy GetProxy(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public MapProxyFactory(string entityName) => throw null; + public MapProxyFactory() => throw null; + public void PostInstantiate(string entityName, System.Type persistentClass, System.Collections.Generic.ISet interfaces, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType) => throw null; + } + + } + namespace Poco + { + // Generated from `NHibernate.Proxy.Poco.BasicLazyInitializer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class BasicLazyInitializer : NHibernate.Proxy.AbstractLazyInitializer + { + protected virtual void AddSerializationInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + protected internal BasicLazyInitializer(string entityName, System.Type persistentClass, object id, System.Reflection.MethodInfo getIdentifierMethod, System.Reflection.MethodInfo setIdentifierMethod, NHibernate.Type.IAbstractComponentType componentIdType, NHibernate.Engine.ISessionImplementor session, bool overridesEquals) : base(default(string), default(object), default(NHibernate.Engine.ISessionImplementor)) => throw null; + public virtual object Invoke(System.Reflection.MethodInfo method, object[] args, object proxy) => throw null; + public override System.Type PersistentClass { get => throw null; } + protected internal NHibernate.Type.IAbstractComponentType componentIdType; + protected internal System.Reflection.MethodInfo getIdentifierMethod; + protected internal bool overridesEquals; + protected internal System.Reflection.MethodInfo setIdentifierMethod; + } + + } + } + namespace SqlCommand + { + // Generated from `NHibernate.SqlCommand.ANSICaseFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ANSICaseFragment : NHibernate.SqlCommand.CaseFragment + { + public ANSICaseFragment(NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Dialect.Dialect)) => throw null; + public override string ToSqlStringFragment() => throw null; + } + + // Generated from `NHibernate.SqlCommand.ANSIJoinFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ANSIJoinFragment : NHibernate.SqlCommand.JoinFragment + { + public ANSIJoinFragment() => throw null; + public override bool AddCondition(string condition) => throw null; + public override bool AddCondition(NHibernate.SqlCommand.SqlString condition) => throw null; + public override void AddCrossJoin(string tableName, string alias) => throw null; + public override void AddFromFragmentString(NHibernate.SqlCommand.SqlString fromFragmentString) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString on) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType) => throw null; + public override void AddJoins(NHibernate.SqlCommand.SqlString fromFragment, NHibernate.SqlCommand.SqlString whereFragment) => throw null; + public NHibernate.SqlCommand.JoinFragment Copy() => throw null; + public override NHibernate.SqlCommand.SqlString ToFromFragmentString { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToWhereFragmentString { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.Alias` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Alias + { + public Alias(string suffix) => throw null; + public Alias(int length, string suffix) => throw null; + public string ToAliasString(string sqlIdentifier, NHibernate.Dialect.Dialect dialect) => throw null; + public string ToAliasString(string sqlIdentifier) => throw null; + public string[] ToAliasStrings(string[] sqlIdentifiers, NHibernate.Dialect.Dialect dialect) => throw null; + public string ToUnquotedAliasString(string sqlIdentifier, NHibernate.Dialect.Dialect dialect) => throw null; + public string[] ToUnquotedAliasStrings(string[] sqlIdentifiers, NHibernate.Dialect.Dialect dialect) => throw null; + } + + // Generated from `NHibernate.SqlCommand.CaseFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CaseFragment + { + public virtual NHibernate.SqlCommand.CaseFragment AddWhenColumnNotNull(string alias, string columnName, string value) => throw null; + protected CaseFragment(NHibernate.Dialect.Dialect dialect) => throw null; + public virtual NHibernate.SqlCommand.CaseFragment SetReturnColumnName(string returnColumnName, string suffix) => throw null; + public virtual NHibernate.SqlCommand.CaseFragment SetReturnColumnName(string returnColumnName) => throw null; + public abstract string ToSqlStringFragment(); + protected internal System.Collections.Generic.IDictionary cases; + protected internal NHibernate.Dialect.Dialect dialect; + protected internal string returnColumnName; + } + + // Generated from `NHibernate.SqlCommand.ConditionalFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ConditionalFragment + { + public ConditionalFragment() => throw null; + public NHibernate.SqlCommand.ConditionalFragment SetCondition(string[] lhs, string[] rhs) => throw null; + public NHibernate.SqlCommand.ConditionalFragment SetCondition(string[] lhs, string rhs) => throw null; + public NHibernate.SqlCommand.ConditionalFragment SetCondition(string[] lhs, NHibernate.SqlCommand.Parameter[] rhs) => throw null; + public NHibernate.SqlCommand.ConditionalFragment SetOp(string op) => throw null; + public NHibernate.SqlCommand.ConditionalFragment SetTableAlias(string tableAlias) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlStringFragment() => throw null; + } + + // Generated from `NHibernate.SqlCommand.DecodeCaseFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DecodeCaseFragment : NHibernate.SqlCommand.CaseFragment + { + public DecodeCaseFragment(NHibernate.Dialect.Dialect dialect) : base(default(NHibernate.Dialect.Dialect)) => throw null; + public override string ToSqlStringFragment() => throw null; + } + + // Generated from `NHibernate.SqlCommand.DisjunctionFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DisjunctionFragment + { + public NHibernate.SqlCommand.DisjunctionFragment AddCondition(NHibernate.SqlCommand.ConditionalFragment fragment) => throw null; + public DisjunctionFragment(System.Collections.Generic.IEnumerable fragments) => throw null; + public DisjunctionFragment() => throw null; + public NHibernate.SqlCommand.SqlString ToFragmentString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.ForUpdateFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ForUpdateFragment + { + public NHibernate.SqlCommand.ForUpdateFragment AddTableAlias(string alias) => throw null; + public ForUpdateFragment(NHibernate.Dialect.Dialect dialect, System.Collections.Generic.IDictionary lockModes, System.Collections.Generic.IDictionary keyColumnNames) => throw null; + public ForUpdateFragment(NHibernate.Dialect.Dialect dialect) => throw null; + public bool IsNoWaitEnabled { get => throw null; set => throw null; } + public string ToSqlStringFragment() => throw null; + } + + // Generated from `NHibernate.SqlCommand.ISqlCommand` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlCommand + { + void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList commandQueryParametersList, int singleSqlParametersOffset, NHibernate.Engine.ISessionImplementor session); + void Bind(System.Data.Common.DbCommand command, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList commandQueryParametersList, int singleSqlParametersOffset, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + NHibernate.SqlTypes.SqlType[] ParameterTypes { get; } + NHibernate.SqlCommand.SqlString Query { get; } + NHibernate.Engine.QueryParameters QueryParameters { get; } + void ResetParametersIndexesForTheCommand(int singleSqlParametersOffset); + } + + // Generated from `NHibernate.SqlCommand.ISqlStringBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlStringBuilder + { + NHibernate.SqlCommand.SqlString ToSqlString(); + } + + // Generated from `NHibernate.SqlCommand.ISqlStringVisitor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISqlStringVisitor + { + void Parameter(NHibernate.SqlCommand.Parameter parameter); + void String(string text); + void String(NHibernate.SqlCommand.SqlString sqlString); + } + + // Generated from `NHibernate.SqlCommand.InFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InFragment + { + public NHibernate.SqlCommand.InFragment AddValue(object value) => throw null; + public InFragment() => throw null; + public static string NotNull; + public static string Null; + public NHibernate.SqlCommand.InFragment SetColumn(string colName) => throw null; + public NHibernate.SqlCommand.InFragment SetColumn(string alias, string colName) => throw null; + public NHibernate.SqlCommand.InFragment SetFormula(string alias, string formulaTemplate) => throw null; + public NHibernate.SqlCommand.SqlString ToFragmentString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.InformixJoinFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InformixJoinFragment : NHibernate.SqlCommand.JoinFragment + { + public override bool AddCondition(string condition) => throw null; + public override bool AddCondition(NHibernate.SqlCommand.SqlString condition) => throw null; + public override void AddCrossJoin(string tableName, string alias) => throw null; + public override void AddFromFragmentString(NHibernate.SqlCommand.SqlString fromFragmentString) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString on) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType) => throw null; + public override void AddJoins(NHibernate.SqlCommand.SqlString fromFragment, NHibernate.SqlCommand.SqlString whereFragment) => throw null; + public InformixJoinFragment() => throw null; + public override NHibernate.SqlCommand.SqlString ToFromFragmentString { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToWhereFragmentString { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.InsertSelect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class InsertSelect : NHibernate.SqlCommand.ISqlStringBuilder + { + public virtual NHibernate.SqlCommand.InsertSelect AddColumn(string columnName) => throw null; + public virtual NHibernate.SqlCommand.InsertSelect AddColumns(string[] columnNames) => throw null; + public InsertSelect() => throw null; + public virtual NHibernate.SqlCommand.InsertSelect SetComment(string comment) => throw null; + public virtual NHibernate.SqlCommand.InsertSelect SetSelect(NHibernate.SqlCommand.SqlSelectBuilder select) => throw null; + public virtual NHibernate.SqlCommand.InsertSelect SetTableName(string tableName) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.JoinFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class JoinFragment + { + protected void AddBareCondition(NHibernate.SqlCommand.SqlStringBuilder buffer, NHibernate.SqlCommand.SqlString condition) => throw null; + public abstract bool AddCondition(string condition); + public abstract bool AddCondition(NHibernate.SqlCommand.SqlString condition); + protected bool AddCondition(NHibernate.SqlCommand.SqlStringBuilder buffer, string on) => throw null; + protected bool AddCondition(NHibernate.SqlCommand.SqlStringBuilder buffer, NHibernate.SqlCommand.SqlString on) => throw null; + public abstract void AddCrossJoin(string tableName, string alias); + public virtual void AddFragment(NHibernate.SqlCommand.JoinFragment ojf) => throw null; + public abstract void AddFromFragmentString(NHibernate.SqlCommand.SqlString fromFragmentString); + public abstract void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString on); + public abstract void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType); + public abstract void AddJoins(NHibernate.SqlCommand.SqlString fromFragment, NHibernate.SqlCommand.SqlString whereFragment); + public bool HasFilterCondition { get => throw null; set => throw null; } + public bool HasThetaJoins { get => throw null; set => throw null; } + protected JoinFragment() => throw null; + public abstract NHibernate.SqlCommand.SqlString ToFromFragmentString { get; } + public abstract NHibernate.SqlCommand.SqlString ToWhereFragmentString { get; } + } + + // Generated from `NHibernate.SqlCommand.JoinType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public enum JoinType + { + CrossJoin, + FullJoin, + InnerJoin, + LeftOuterJoin, + None, + RightOuterJoin, + } + + // Generated from `NHibernate.SqlCommand.OracleJoinFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OracleJoinFragment : NHibernate.SqlCommand.JoinFragment + { + public override bool AddCondition(string condition) => throw null; + public override bool AddCondition(NHibernate.SqlCommand.SqlString condition) => throw null; + public override void AddCrossJoin(string tableName, string alias) => throw null; + public override void AddFromFragmentString(NHibernate.SqlCommand.SqlString fromFragmentString) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString on) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType) => throw null; + public override void AddJoins(NHibernate.SqlCommand.SqlString fromFragment, NHibernate.SqlCommand.SqlString whereFragment) => throw null; + public OracleJoinFragment() => throw null; + public override NHibernate.SqlCommand.SqlString ToFromFragmentString { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToWhereFragmentString { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.Parameter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Parameter + { + public static bool operator !=(object a, NHibernate.SqlCommand.Parameter b) => throw null; + public static bool operator !=(NHibernate.SqlCommand.Parameter a, object b) => throw null; + public static bool operator !=(NHibernate.SqlCommand.Parameter a, NHibernate.SqlCommand.Parameter b) => throw null; + public static bool operator ==(object a, NHibernate.SqlCommand.Parameter b) => throw null; + public static bool operator ==(NHibernate.SqlCommand.Parameter a, object b) => throw null; + public static bool operator ==(NHibernate.SqlCommand.Parameter a, NHibernate.SqlCommand.Parameter b) => throw null; + public object BackTrack { get => throw null; set => throw null; } + public NHibernate.SqlCommand.Parameter Clone() => throw null; + public override bool Equals(object obj) => throw null; + public static NHibernate.SqlCommand.Parameter[] GenerateParameters(int count) => throw null; + public override int GetHashCode() => throw null; + public int? ParameterPosition { get => throw null; set => throw null; } + public static NHibernate.SqlCommand.Parameter Placeholder { get => throw null; } + public override string ToString() => throw null; + public static NHibernate.SqlCommand.Parameter WithIndex(int position) => throw null; + } + + // Generated from `NHibernate.SqlCommand.QueryJoinFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryJoinFragment : NHibernate.SqlCommand.JoinFragment + { + public override bool AddCondition(string condition) => throw null; + public override bool AddCondition(NHibernate.SqlCommand.SqlString condition) => throw null; + public override void AddCrossJoin(string tableName, string alias) => throw null; + public override void AddFromFragmentString(NHibernate.SqlCommand.SqlString fromFragmentString) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType, NHibernate.SqlCommand.SqlString on) => throw null; + public override void AddJoin(string tableName, string alias, string[] fkColumns, string[] pkColumns, NHibernate.SqlCommand.JoinType joinType) => throw null; + public override void AddJoins(NHibernate.SqlCommand.SqlString fromFragment, NHibernate.SqlCommand.SqlString whereFragment) => throw null; + public void ClearWherePart() => throw null; + public QueryJoinFragment(NHibernate.Dialect.Dialect dialect, bool useThetaStyleInnerJoins) => throw null; + public override NHibernate.SqlCommand.SqlString ToFromFragmentString { get => throw null; } + public override NHibernate.SqlCommand.SqlString ToWhereFragmentString { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.QuerySelect` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QuerySelect + { + public void AddOrderBy(string orderBySql) => throw null; + public void AddSelectColumn(string columnName, string alias) => throw null; + public void AddSelectFragmentString(NHibernate.SqlCommand.SqlString fragment) => throw null; + public bool Distinct { get => throw null; set => throw null; } + public NHibernate.SqlCommand.JoinFragment JoinFragment { get => throw null; } + public QuerySelect(NHibernate.Dialect.Dialect dialect) => throw null; + public void SetGroupByTokens(System.Collections.IEnumerable tokens) => throw null; + public void SetHavingTokens(System.Collections.IEnumerable tokens) => throw null; + public void SetOrderByTokens(System.Collections.IEnumerable tokens) => throw null; + public void SetWhereTokens(System.Collections.IEnumerable tokens) => throw null; + public NHibernate.SqlCommand.SqlString ToQuerySqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SelectFragment` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SelectFragment + { + public NHibernate.SqlCommand.SelectFragment AddColumn(string tableAlias, string columnName, string columnAlias) => throw null; + public NHibernate.SqlCommand.SelectFragment AddColumn(string tableAlias, string columnName) => throw null; + public NHibernate.SqlCommand.SelectFragment AddColumn(string columnName) => throw null; + public NHibernate.SqlCommand.SelectFragment AddColumns(string[] columnNames) => throw null; + public NHibernate.SqlCommand.SelectFragment AddColumns(string tableAlias, string[] columnNames, string[] columnAliases) => throw null; + public NHibernate.SqlCommand.SelectFragment AddColumns(string tableAlias, string[] columnNames) => throw null; + public NHibernate.SqlCommand.SelectFragment AddFormula(string tableAlias, string formula, string formulaAlias) => throw null; + public NHibernate.SqlCommand.SelectFragment AddFormulas(string tableAlias, string[] formulas, string[] formulaAliases) => throw null; + public SelectFragment(NHibernate.Dialect.Dialect d) => throw null; + public NHibernate.SqlCommand.SelectFragment SetExtraSelectList(string extraSelectList) => throw null; + public NHibernate.SqlCommand.SelectFragment SetExtraSelectList(NHibernate.SqlCommand.CaseFragment caseFragment, string fragmentAlias) => throw null; + public NHibernate.SqlCommand.SelectFragment SetSuffix(string suffix) => throw null; + public NHibernate.SqlCommand.SelectFragment SetUsedAliases(string[] usedAliases) => throw null; + public string ToFragmentString() => throw null; + public string ToSqlStringFragment(bool includeLeadingComma) => throw null; + public string ToSqlStringFragment() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlBaseBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class SqlBaseBuilder + { + public NHibernate.Dialect.Dialect Dialect { get => throw null; } + protected NHibernate.Engine.IMapping Mapping { get => throw null; } + protected SqlBaseBuilder(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping) => throw null; + protected NHibernate.SqlCommand.SqlString ToWhereString(string[] columnNames, string op) => throw null; + protected NHibernate.SqlCommand.SqlString ToWhereString(string[] columnNames) => throw null; + protected NHibernate.SqlCommand.SqlString ToWhereString(string tableAlias, string[] columnNames, string op) => throw null; + protected NHibernate.SqlCommand.SqlString ToWhereString(string tableAlias, string[] columnNames) => throw null; + protected NHibernate.SqlCommand.SqlString ToWhereString(string columnName, string op) => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlCommandImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlCommandImpl : NHibernate.SqlCommand.ISqlCommand + { + public void Bind(System.Data.Common.DbCommand command, System.Collections.Generic.IList commandQueryParametersList, int singleSqlParametersOffset, NHibernate.Engine.ISessionImplementor session) => throw null; + public void Bind(System.Data.Common.DbCommand command, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, System.Collections.Generic.IList commandQueryParametersList, int singleSqlParametersOffset, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task BindAsync(System.Data.Common.DbCommand command, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.SqlTypes.SqlType[] ParameterTypes { get => throw null; } + public NHibernate.SqlCommand.SqlString Query { get => throw null; } + public NHibernate.Engine.QueryParameters QueryParameters { get => throw null; } + public void ResetParametersIndexesForTheCommand(int singleSqlParametersOffset) => throw null; + public System.Collections.Generic.IEnumerable Specifications { get => throw null; } + public SqlCommandImpl(NHibernate.SqlCommand.SqlString query, System.Collections.Generic.ICollection specifications, NHibernate.Engine.QueryParameters queryParameters, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public System.Collections.Generic.IList SqlQueryParametersList { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.SqlCommandInfo` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlCommandInfo + { + public System.Data.CommandType CommandType { get => throw null; } + public NHibernate.SqlTypes.SqlType[] ParameterTypes { get => throw null; } + public SqlCommandInfo(NHibernate.SqlCommand.SqlString text, NHibernate.SqlTypes.SqlType[] parameterTypes) => throw null; + public NHibernate.SqlCommand.SqlString Text { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlDeleteBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlDeleteBuilder : NHibernate.SqlCommand.SqlBaseBuilder, NHibernate.SqlCommand.ISqlStringBuilder + { + public NHibernate.SqlCommand.SqlDeleteBuilder AddWhereFragment(string[] columnNames, NHibernate.Type.IType type, string op) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder AddWhereFragment(string[] columnNames, NHibernate.SqlTypes.SqlType[] types, string op) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder AddWhereFragment(string whereSql) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder AddWhereFragment(string columnName, NHibernate.SqlTypes.SqlType type, string op) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder SetComment(string comment) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder SetIdentityColumn(string[] columnNames, NHibernate.Type.IType identityType) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder SetTableName(string tableName) => throw null; + public NHibernate.SqlCommand.SqlDeleteBuilder SetVersionColumn(string[] columnNames, NHibernate.Type.IVersionType versionType) => throw null; + public virtual NHibernate.SqlCommand.SqlDeleteBuilder SetWhere(string whereSql) => throw null; + public SqlDeleteBuilder(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping) : base(default(NHibernate.Dialect.Dialect), default(NHibernate.Engine.IMapping)) => throw null; + public NHibernate.SqlCommand.SqlCommandInfo ToSqlCommandInfo() => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlInsertBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlInsertBuilder : NHibernate.SqlCommand.ISqlStringBuilder + { + public virtual NHibernate.SqlCommand.SqlInsertBuilder AddColumn(string columnName, NHibernate.Type.IType propertyType) => throw null; + public NHibernate.SqlCommand.SqlInsertBuilder AddColumn(string columnName, string val) => throw null; + public NHibernate.SqlCommand.SqlInsertBuilder AddColumn(string columnName, object val, NHibernate.Type.ILiteralType literalType) => throw null; + public NHibernate.SqlCommand.SqlInsertBuilder AddColumns(string[] columnNames, bool[] insertable, NHibernate.Type.IType propertyType) => throw null; + public virtual NHibernate.SqlCommand.SqlInsertBuilder AddIdentityColumn(string columnName) => throw null; + protected internal NHibernate.Dialect.Dialect Dialect { get => throw null; } + public NHibernate.SqlTypes.SqlType[] GetParametersTypeArray() => throw null; + public virtual NHibernate.SqlCommand.SqlInsertBuilder SetComment(string comment) => throw null; + public NHibernate.SqlCommand.SqlInsertBuilder SetTableName(string tableName) => throw null; + public SqlInsertBuilder(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.SqlCommand.SqlCommandInfo ToSqlCommandInfo() => throw null; + public virtual NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlSelectBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlSelectBuilder : NHibernate.SqlCommand.SqlBaseBuilder, NHibernate.SqlCommand.ISqlStringBuilder + { + public NHibernate.SqlCommand.SqlSelectBuilder SetComment(string comment) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetFromClause(string tableName, string alias) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetFromClause(string fromClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetFromClause(NHibernate.SqlCommand.SqlString fromClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetGroupByClause(NHibernate.SqlCommand.SqlString groupByClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetHavingClause(string tableAlias, string[] columnNames, NHibernate.Type.IType whereType) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetHavingClause(NHibernate.SqlCommand.SqlString havingSqlString) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetLockMode(NHibernate.LockMode lockMode, string mainTableAlias) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetLockMode(NHibernate.LockMode lockMode) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetOrderByClause(NHibernate.SqlCommand.SqlString orderByClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetOuterJoins(NHibernate.SqlCommand.SqlString outerJoinsAfterFrom, NHibernate.SqlCommand.SqlString outerJoinsAfterWhere) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetSelectClause(string selectClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetSelectClause(NHibernate.SqlCommand.SqlString selectClause) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetWhereClause(string tableAlias, string[] columnNames, NHibernate.Type.IType whereType) => throw null; + public NHibernate.SqlCommand.SqlSelectBuilder SetWhereClause(NHibernate.SqlCommand.SqlString whereSqlString) => throw null; + public SqlSelectBuilder(NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Dialect.Dialect), default(NHibernate.Engine.IMapping)) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + public NHibernate.SqlCommand.SqlString ToStatementString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlSimpleSelectBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlSimpleSelectBuilder : NHibernate.SqlCommand.SqlBaseBuilder, NHibernate.SqlCommand.ISqlStringBuilder + { + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddColumn(string columnName, string alias) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddColumn(string columnName) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddColumns(string[] columns, string[] aliases, bool[] ignore) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddColumns(string[] columnNames, string[] aliases) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddColumns(string[] columnNames) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddWhereFragment(string[] columnNames, NHibernate.Type.IType type, string op) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder AddWhereFragment(string fragment) => throw null; + public string GetAlias(string columnName) => throw null; + public virtual NHibernate.SqlCommand.SqlSimpleSelectBuilder SetComment(string comment) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder SetIdentityColumn(string[] columnNames, NHibernate.Type.IType identityType) => throw null; + public virtual NHibernate.SqlCommand.SqlSimpleSelectBuilder SetLockMode(NHibernate.LockMode lockMode) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder SetOrderBy(string orderBy) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder SetTableName(string tableName) => throw null; + public NHibernate.SqlCommand.SqlSimpleSelectBuilder SetVersionColumn(string[] columnNames, NHibernate.Type.IVersionType versionType) => throw null; + public SqlSimpleSelectBuilder(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping factory) : base(default(NHibernate.Dialect.Dialect), default(NHibernate.Engine.IMapping)) => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlString` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlString : System.Collections.IEnumerable, System.Collections.ICollection, System.Collections.Generic.IEnumerable + { + public static NHibernate.SqlCommand.SqlString operator +(NHibernate.SqlCommand.SqlString lhs, NHibernate.SqlCommand.SqlString rhs) => throw null; + public NHibernate.SqlCommand.SqlString Append(string text) => throw null; + public NHibernate.SqlCommand.SqlString Append(params object[] parts) => throw null; + public NHibernate.SqlCommand.SqlString Append(NHibernate.SqlCommand.SqlString sql) => throw null; + public NHibernate.SqlCommand.SqlString Copy() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public static NHibernate.SqlCommand.SqlString Empty; + public bool EndsWith(string value) => throw null; + public bool EndsWithCaseInsensitive(string value) => throw null; + public override bool Equals(object obj) => throw null; + public bool EqualsCaseInsensitive(string value) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + public int GetParameterCount() => throw null; + public System.Collections.Generic.IEnumerable GetParameters() => throw null; + public NHibernate.SqlCommand.SqlString GetSubselectString() => throw null; + public int IndexOf(string text, int startIndex, int length, System.StringComparison stringComparison) => throw null; + public int IndexOfCaseInsensitive(string text) => throw null; + public NHibernate.SqlCommand.SqlString Insert(int index, string text) => throw null; + public NHibernate.SqlCommand.SqlString Insert(int index, NHibernate.SqlCommand.SqlString sql) => throw null; + public bool IsEmptyOrWhitespace() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public int LastIndexOfCaseInsensitive(string text) => throw null; + public int Length { get => throw null; } + public static NHibernate.SqlCommand.SqlString Parse(string sql) => throw null; + public NHibernate.SqlCommand.SqlString Replace(string oldValue, string newValue) => throw null; + public NHibernate.SqlCommand.SqlString[] Split(string splitter) => throw null; + public SqlString(string sql) => throw null; + public SqlString(params object[] parts) => throw null; + public SqlString(NHibernate.SqlCommand.Parameter parameter) => throw null; + public bool StartsWithCaseInsensitive(string value) => throw null; + public NHibernate.SqlCommand.SqlString Substring(int startIndex, int length) => throw null; + public NHibernate.SqlCommand.SqlString Substring(int startIndex) => throw null; + public NHibernate.SqlCommand.SqlString SubstringStartingWithLast(string text) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public string ToString(int startIndex, int length) => throw null; + public string ToString(int startIndex) => throw null; + public override string ToString() => throw null; + public NHibernate.SqlCommand.SqlString Trim() => throw null; + public void Visit(NHibernate.SqlCommand.ISqlStringVisitor visitor) => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlStringBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlStringBuilder : NHibernate.SqlCommand.ISqlStringBuilder + { + public NHibernate.SqlCommand.SqlStringBuilder Add(string sql) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Add(NHibernate.SqlCommand.SqlString[] sqlStrings, string prefix, string op, string postfix, bool wrapStatement) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Add(NHibernate.SqlCommand.SqlString[] sqlStrings, string prefix, string op, string postfix) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Add(NHibernate.SqlCommand.SqlString sqlString, string prefix, string op, string postfix) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Add(NHibernate.SqlCommand.SqlString sqlString) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Add(NHibernate.SqlCommand.Parameter parameter) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder AddObject(object part) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder AddParameter() => throw null; + public void Clear() => throw null; + public int Count { get => throw null; } + public NHibernate.SqlCommand.SqlStringBuilder Insert(int index, string sql) => throw null; + public NHibernate.SqlCommand.SqlStringBuilder Insert(int index, NHibernate.SqlCommand.Parameter param) => throw null; + public object this[int index] { get => throw null; set => throw null; } + public NHibernate.SqlCommand.SqlStringBuilder RemoveAt(int index) => throw null; + public SqlStringBuilder(int partsCapacity) => throw null; + public SqlStringBuilder(NHibernate.SqlCommand.SqlString sqlString) => throw null; + public SqlStringBuilder() => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlStringHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SqlStringHelper + { + public static NHibernate.SqlCommand.SqlString[] Add(NHibernate.SqlCommand.SqlString[] x, string sep, NHibernate.SqlCommand.SqlString[] y) => throw null; + public static bool IsEmpty(NHibernate.SqlCommand.SqlString str) => throw null; + public static bool IsNotEmpty(NHibernate.SqlCommand.SqlString str) => throw null; + public static NHibernate.SqlCommand.SqlString Join(NHibernate.SqlCommand.SqlString separator, System.Collections.IEnumerable objects) => throw null; + public static NHibernate.SqlCommand.SqlString RemoveAsAliasesFromSql(NHibernate.SqlCommand.SqlString sql) => throw null; + } + + // Generated from `NHibernate.SqlCommand.SqlUpdateBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlUpdateBuilder : NHibernate.SqlCommand.SqlBaseBuilder, NHibernate.SqlCommand.ISqlStringBuilder + { + public virtual NHibernate.SqlCommand.SqlUpdateBuilder AddColumn(string columnName, NHibernate.Type.IType propertyType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddColumn(string columnName, string val) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddColumn(string columnName, object val, NHibernate.Type.ILiteralType literalType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddColumns(string[] columnsName, string val) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddColumns(string[] columnNames, bool[] updateable, NHibernate.Type.IType propertyType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddColumns(string[] columnNames, NHibernate.Type.IType propertyType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddWhereFragment(string[] columnNames, NHibernate.Type.IType type, string op) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddWhereFragment(string[] columnNames, NHibernate.SqlTypes.SqlType[] types, string op) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddWhereFragment(string whereSql) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AddWhereFragment(string columnName, NHibernate.SqlTypes.SqlType type, string op) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder AppendAssignmentFragment(NHibernate.SqlCommand.SqlString fragment) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetComment(string comment) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetIdentityColumn(string[] columnNames, NHibernate.Type.IType identityType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetJoin(string joinTableName, string[] keyColumnNames, NHibernate.Type.IType identityType, string[] lhsColumnNames, string[] rhsColumnNames) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetTableName(string tableName) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetVersionColumn(string[] columnNames, NHibernate.Type.IVersionType versionType) => throw null; + public NHibernate.SqlCommand.SqlUpdateBuilder SetWhere(string whereSql) => throw null; + public SqlUpdateBuilder(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.IMapping mapping) : base(default(NHibernate.Dialect.Dialect), default(NHibernate.Engine.IMapping)) => throw null; + public NHibernate.SqlCommand.SqlCommandInfo ToSqlCommandInfo() => throw null; + public NHibernate.SqlCommand.SqlString ToSqlString() => throw null; + } + + // Generated from `NHibernate.SqlCommand.SubselectClauseExtractor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SubselectClauseExtractor + { + public NHibernate.SqlCommand.SqlString GetSqlString() => throw null; + public static bool HasOrderBy(NHibernate.SqlCommand.SqlString subselect) => throw null; + public SubselectClauseExtractor(NHibernate.SqlCommand.SqlString sql) => throw null; + } + + // Generated from `NHibernate.SqlCommand.Template` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Template + { + public static string Placeholder; + public static string RenderOrderByStringTemplate(string sqlOrderByString, NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry) => throw null; + public static string RenderWhereStringTemplate(string sqlWhereString, string placeholder, NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry) => throw null; + public static string RenderWhereStringTemplate(string sqlWhereString, NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry functionRegistry) => throw null; + } + + // Generated from `NHibernate.SqlCommand.WhereBuilder` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WhereBuilder : NHibernate.SqlCommand.SqlBaseBuilder + { + public WhereBuilder(NHibernate.Dialect.Dialect dialect, NHibernate.Engine.ISessionFactoryImplementor factory) : base(default(NHibernate.Dialect.Dialect), default(NHibernate.Engine.IMapping)) => throw null; + public NHibernate.SqlCommand.SqlString WhereClause(string alias, string[] columnNames, NHibernate.Type.IType whereType) => throw null; + } + + namespace Parser + { + // Generated from `NHibernate.SqlCommand.Parser.SqlToken` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlToken + { + public override bool Equals(object obj) => throw null; + public bool Equals(string value, System.StringComparison stringComparison) => throw null; + public bool Equals(string value) => throw null; + public override int GetHashCode() => throw null; + public int Length { get => throw null; } + public int SqlIndex { get => throw null; } + public SqlToken(NHibernate.SqlCommand.Parser.SqlTokenType tokenType, NHibernate.SqlCommand.SqlString sql, int sqlIndex, int length) => throw null; + public override string ToString() => throw null; + public NHibernate.SqlCommand.Parser.SqlTokenType TokenType { get => throw null; } + public string UnquotedValue { get => throw null; } + public string Value { get => throw null; } + } + + // Generated from `NHibernate.SqlCommand.Parser.SqlTokenType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + [System.Flags] + public enum SqlTokenType + { + All, + AllBrackets, + AllExceptWhitespace, + AllExceptWhitespaceOrComment, + BracketClose, + BracketOpen, + Comma, + Comment, + DelimitedText, + Parameter, + Text, + Whitespace, + } + + // Generated from `NHibernate.SqlCommand.Parser.SqlTokenizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlTokenizer : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IgnoreComments { get => throw null; set => throw null; } + public bool IgnoreWhitespace { get => throw null; set => throw null; } + public SqlTokenizer(NHibernate.SqlCommand.SqlString sql) => throw null; + } + + } + } + namespace SqlTypes + { + // Generated from `NHibernate.SqlTypes.AnsiStringFixedLengthSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiStringFixedLengthSqlType : NHibernate.SqlTypes.SqlType + { + public AnsiStringFixedLengthSqlType(int length) : base(default(System.Data.DbType)) => throw null; + public AnsiStringFixedLengthSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.AnsiStringSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiStringSqlType : NHibernate.SqlTypes.SqlType + { + public AnsiStringSqlType(int length) : base(default(System.Data.DbType)) => throw null; + public AnsiStringSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.BinaryBlobSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinaryBlobSqlType : NHibernate.SqlTypes.BinarySqlType + { + public BinaryBlobSqlType(int length) => throw null; + public BinaryBlobSqlType() => throw null; + } + + // Generated from `NHibernate.SqlTypes.BinarySqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinarySqlType : NHibernate.SqlTypes.SqlType + { + public BinarySqlType(int length) : base(default(System.Data.DbType)) => throw null; + public BinarySqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.DateTime2SqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTime2SqlType : NHibernate.SqlTypes.SqlType + { + public DateTime2SqlType(System.Byte fractionalSecondsPrecision) : base(default(System.Data.DbType)) => throw null; + public DateTime2SqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.DateTimeOffsetSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeOffsetSqlType : NHibernate.SqlTypes.SqlType + { + public DateTimeOffsetSqlType(System.Byte fractionalSecondsPrecision) : base(default(System.Data.DbType)) => throw null; + public DateTimeOffsetSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.DateTimeSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeSqlType : NHibernate.SqlTypes.SqlType + { + public DateTimeSqlType(System.Byte fractionalSecondsPrecision) : base(default(System.Data.DbType)) => throw null; + public DateTimeSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.SqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SqlType + { + public System.Data.DbType DbType { get => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.SqlTypes.SqlType rhsSqlType) => throw null; + public override int GetHashCode() => throw null; + public int Length { get => throw null; } + public bool LengthDefined { get => throw null; } + public System.Byte Precision { get => throw null; } + public bool PrecisionDefined { get => throw null; } + public System.Byte Scale { get => throw null; } + public bool ScaleDefined { get => throw null; } + public SqlType(System.Data.DbType dbType, int length) => throw null; + public SqlType(System.Data.DbType dbType, System.Byte scale) => throw null; + public SqlType(System.Data.DbType dbType, System.Byte precision, System.Byte scale) => throw null; + public SqlType(System.Data.DbType dbType) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.SqlTypes.SqlTypeFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SqlTypeFactory + { + public static NHibernate.SqlTypes.SqlType Boolean; + public static NHibernate.SqlTypes.SqlType Byte; + public static NHibernate.SqlTypes.SqlType Currency; + public static NHibernate.SqlTypes.SqlType Date; + public static NHibernate.SqlTypes.SqlType DateTime; + public static NHibernate.SqlTypes.SqlType DateTime2; + public static NHibernate.SqlTypes.SqlType DateTimeOffSet; + public static NHibernate.SqlTypes.SqlType Decimal; + public static NHibernate.SqlTypes.SqlType Double; + public static NHibernate.SqlTypes.AnsiStringSqlType GetAnsiString(int length) => throw null; + public static NHibernate.SqlTypes.BinarySqlType GetBinary(int length) => throw null; + public static NHibernate.SqlTypes.BinaryBlobSqlType GetBinaryBlob(int length) => throw null; + public static NHibernate.SqlTypes.DateTimeSqlType GetDateTime(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.SqlTypes.DateTime2SqlType GetDateTime2(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.SqlTypes.DateTimeOffsetSqlType GetDateTimeOffset(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.SqlTypes.SqlType GetSqlType(System.Data.DbType dbType, System.Byte precision, System.Byte scale) => throw null; + public static NHibernate.SqlTypes.StringSqlType GetString(int length) => throw null; + public static NHibernate.SqlTypes.StringClobSqlType GetStringClob(int length) => throw null; + public static NHibernate.SqlTypes.TimeSqlType GetTime(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.SqlTypes.SqlType Guid; + public static NHibernate.SqlTypes.SqlType Int16; + public static NHibernate.SqlTypes.SqlType Int32; + public static NHibernate.SqlTypes.SqlType Int64; + public static NHibernate.SqlTypes.SqlType[] NoTypes; + public static NHibernate.SqlTypes.SqlType SByte; + public static NHibernate.SqlTypes.SqlType Single; + public static NHibernate.SqlTypes.SqlType Time; + public static NHibernate.SqlTypes.SqlType UInt16; + public static NHibernate.SqlTypes.SqlType UInt32; + public static NHibernate.SqlTypes.SqlType UInt64; + } + + // Generated from `NHibernate.SqlTypes.StringClobSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringClobSqlType : NHibernate.SqlTypes.StringSqlType + { + public StringClobSqlType(int length) => throw null; + public StringClobSqlType() => throw null; + } + + // Generated from `NHibernate.SqlTypes.StringFixedLengthSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringFixedLengthSqlType : NHibernate.SqlTypes.SqlType + { + public StringFixedLengthSqlType(int length) : base(default(System.Data.DbType)) => throw null; + public StringFixedLengthSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.StringSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringSqlType : NHibernate.SqlTypes.SqlType + { + public StringSqlType(int length) : base(default(System.Data.DbType)) => throw null; + public StringSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.TimeSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TimeSqlType : NHibernate.SqlTypes.SqlType + { + public TimeSqlType(System.Byte fractionalSecondsPrecision) : base(default(System.Data.DbType)) => throw null; + public TimeSqlType() : base(default(System.Data.DbType)) => throw null; + } + + // Generated from `NHibernate.SqlTypes.XmlSqlType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class XmlSqlType : NHibernate.SqlTypes.SqlType + { + public XmlSqlType(int length) : base(default(System.Data.DbType)) => throw null; + public XmlSqlType() : base(default(System.Data.DbType)) => throw null; + } + + } + namespace Stat + { + // Generated from `NHibernate.Stat.CategorizedStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CategorizedStatistics + { + internal CategorizedStatistics(string categoryName) => throw null; + public string CategoryName { get => throw null; } + } + + // Generated from `NHibernate.Stat.CollectionStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CollectionStatistics : NHibernate.Stat.CategorizedStatistics + { + internal CollectionStatistics(string categoryName) : base(default(string)) => throw null; + public System.Int64 FetchCount { get => throw null; } + public System.Int64 LoadCount { get => throw null; } + public System.Int64 RecreateCount { get => throw null; } + public System.Int64 RemoveCount { get => throw null; } + public override string ToString() => throw null; + public System.Int64 UpdateCount { get => throw null; } + } + + // Generated from `NHibernate.Stat.EntityStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityStatistics : NHibernate.Stat.CategorizedStatistics + { + public System.Int64 DeleteCount { get => throw null; } + internal EntityStatistics(string categoryName) : base(default(string)) => throw null; + public System.Int64 FetchCount { get => throw null; } + public System.Int64 InsertCount { get => throw null; } + public System.Int64 LoadCount { get => throw null; } + public System.Int64 OptimisticFailureCount { get => throw null; } + public override string ToString() => throw null; + public System.Int64 UpdateCount { get => throw null; } + } + + // Generated from `NHibernate.Stat.ISessionStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISessionStatistics + { + int CollectionCount { get; } + System.Collections.Generic.IList CollectionKeys { get; } + int EntityCount { get; } + System.Collections.Generic.IList EntityKeys { get; } + } + + // Generated from `NHibernate.Stat.IStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatistics + { + void Clear(); + System.Int64 CloseStatementCount { get; } + System.Int64 CollectionFetchCount { get; } + System.Int64 CollectionLoadCount { get; } + System.Int64 CollectionRecreateCount { get; } + System.Int64 CollectionRemoveCount { get; } + string[] CollectionRoleNames { get; } + System.Int64 CollectionUpdateCount { get; } + System.Int64 ConnectCount { get; } + System.Int64 EntityDeleteCount { get; } + System.Int64 EntityFetchCount { get; } + System.Int64 EntityInsertCount { get; } + System.Int64 EntityLoadCount { get; } + string[] EntityNames { get; } + System.Int64 EntityUpdateCount { get; } + System.Int64 FlushCount { get; } + NHibernate.Stat.CollectionStatistics GetCollectionStatistics(string role); + NHibernate.Stat.EntityStatistics GetEntityStatistics(string entityName); + NHibernate.Stat.QueryStatistics GetQueryStatistics(string queryString); + NHibernate.Stat.SecondLevelCacheStatistics GetSecondLevelCacheStatistics(string regionName); + bool IsStatisticsEnabled { get; set; } + void LogSummary(); + System.TimeSpan OperationThreshold { get; set; } + System.Int64 OptimisticFailureCount { get; } + System.Int64 PrepareStatementCount { get; } + string[] Queries { get; } + System.Int64 QueryCacheHitCount { get; } + System.Int64 QueryCacheMissCount { get; } + System.Int64 QueryCachePutCount { get; } + System.Int64 QueryExecutionCount { get; } + System.TimeSpan QueryExecutionMaxTime { get; } + string QueryExecutionMaxTimeQueryString { get; } + System.Int64 SecondLevelCacheHitCount { get; } + System.Int64 SecondLevelCacheMissCount { get; } + System.Int64 SecondLevelCachePutCount { get; } + string[] SecondLevelCacheRegionNames { get; } + System.Int64 SessionCloseCount { get; } + System.Int64 SessionOpenCount { get; } + System.DateTime StartTime { get; } + System.Int64 SuccessfulTransactionCount { get; } + System.Int64 TransactionCount { get; } + } + + // Generated from `NHibernate.Stat.IStatisticsImplementor` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IStatisticsImplementor + { + void CloseSession(); + void CloseStatement(); + void Connect(); + void DeleteEntity(string entityName, System.TimeSpan time); + void EndTransaction(bool success); + void FetchCollection(string role, System.TimeSpan time); + void FetchEntity(string entityName, System.TimeSpan time); + void Flush(); + void InsertEntity(string entityName, System.TimeSpan time); + void LoadCollection(string role, System.TimeSpan time); + void LoadEntity(string entityName, System.TimeSpan time); + void OpenSession(); + void OptimisticFailure(string entityName); + void PrepareStatement(); + void QueryCacheHit(string hql, string regionName); + void QueryCacheMiss(string hql, string regionName); + void QueryCachePut(string hql, string regionName); + void QueryExecuted(string hql, int rows, System.TimeSpan time); + void RecreateCollection(string role, System.TimeSpan time); + void RemoveCollection(string role, System.TimeSpan time); + void SecondLevelCacheHit(string regionName); + void SecondLevelCacheMiss(string regionName); + void SecondLevelCachePut(string regionName); + void UpdateCollection(string role, System.TimeSpan time); + void UpdateEntity(string entityName, System.TimeSpan time); + } + + // Generated from `NHibernate.Stat.QueryStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class QueryStatistics : NHibernate.Stat.CategorizedStatistics + { + public System.Int64 CacheHitCount { get => throw null; } + public System.Int64 CacheMissCount { get => throw null; } + public System.Int64 CachePutCount { get => throw null; } + public System.TimeSpan ExecutionAvgTime { get => throw null; } + public System.Int64 ExecutionCount { get => throw null; } + public System.TimeSpan ExecutionMaxTime { get => throw null; } + public System.TimeSpan ExecutionMinTime { get => throw null; } + public System.Int64 ExecutionRowCount { get => throw null; } + public QueryStatistics(string categoryName) : base(default(string)) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Stat.SecondLevelCacheStatistics` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SecondLevelCacheStatistics : NHibernate.Stat.CategorizedStatistics + { + public System.Int64 ElementCountInMemory { get => throw null; } + public System.Int64 ElementCountOnDisk { get => throw null; } + public System.Collections.IDictionary Entries { get => throw null; } + public System.Int64 HitCount { get => throw null; } + public System.Int64 MissCount { get => throw null; } + public System.Int64 PutCount { get => throw null; } + public SecondLevelCacheStatistics(NHibernate.Cache.ICache cache) : base(default(string)) => throw null; + public System.Int64 SizeInMemory { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Stat.SessionStatisticsImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SessionStatisticsImpl : NHibernate.Stat.ISessionStatistics + { + public int CollectionCount { get => throw null; } + public System.Collections.Generic.IList CollectionKeys { get => throw null; } + public int EntityCount { get => throw null; } + public System.Collections.Generic.IList EntityKeys { get => throw null; } + public SessionStatisticsImpl(NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Stat.StatisticsImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StatisticsImpl : NHibernate.Stat.IStatisticsImplementor, NHibernate.Stat.IStatistics + { + public void Clear() => throw null; + public void CloseSession() => throw null; + public void CloseStatement() => throw null; + public System.Int64 CloseStatementCount { get => throw null; } + public System.Int64 CollectionFetchCount { get => throw null; } + public System.Int64 CollectionLoadCount { get => throw null; } + public System.Int64 CollectionRecreateCount { get => throw null; } + public System.Int64 CollectionRemoveCount { get => throw null; } + public string[] CollectionRoleNames { get => throw null; } + public System.Int64 CollectionUpdateCount { get => throw null; } + public void Connect() => throw null; + public System.Int64 ConnectCount { get => throw null; } + public void DeleteEntity(string entityName, System.TimeSpan time) => throw null; + public void EndTransaction(bool success) => throw null; + public System.Int64 EntityDeleteCount { get => throw null; } + public System.Int64 EntityFetchCount { get => throw null; } + public System.Int64 EntityInsertCount { get => throw null; } + public System.Int64 EntityLoadCount { get => throw null; } + public string[] EntityNames { get => throw null; } + public System.Int64 EntityUpdateCount { get => throw null; } + public void FetchCollection(string role, System.TimeSpan time) => throw null; + public void FetchEntity(string entityName, System.TimeSpan time) => throw null; + public void Flush() => throw null; + public System.Int64 FlushCount { get => throw null; } + public NHibernate.Stat.CollectionStatistics GetCollectionStatistics(string role) => throw null; + public NHibernate.Stat.EntityStatistics GetEntityStatistics(string entityName) => throw null; + public NHibernate.Stat.QueryStatistics GetQueryStatistics(string queryString) => throw null; + public NHibernate.Stat.SecondLevelCacheStatistics GetSecondLevelCacheStatistics(string regionName) => throw null; + public void InsertEntity(string entityName, System.TimeSpan time) => throw null; + public bool IsStatisticsEnabled { get => throw null; set => throw null; } + public void LoadCollection(string role, System.TimeSpan time) => throw null; + public void LoadEntity(string entityName, System.TimeSpan time) => throw null; + public void LogSummary() => throw null; + public void OpenSession() => throw null; + public System.TimeSpan OperationThreshold { get => throw null; set => throw null; } + public void OptimisticFailure(string entityName) => throw null; + public System.Int64 OptimisticFailureCount { get => throw null; } + public void PrepareStatement() => throw null; + public System.Int64 PrepareStatementCount { get => throw null; } + public string[] Queries { get => throw null; } + public void QueryCacheHit(string hql, string regionName) => throw null; + public System.Int64 QueryCacheHitCount { get => throw null; } + public void QueryCacheMiss(string hql, string regionName) => throw null; + public System.Int64 QueryCacheMissCount { get => throw null; } + public void QueryCachePut(string hql, string regionName) => throw null; + public System.Int64 QueryCachePutCount { get => throw null; } + public void QueryExecuted(string hql, int rows, System.TimeSpan time) => throw null; + public System.Int64 QueryExecutionCount { get => throw null; } + public System.TimeSpan QueryExecutionMaxTime { get => throw null; } + public string QueryExecutionMaxTimeQueryString { get => throw null; } + public void RecreateCollection(string role, System.TimeSpan time) => throw null; + public void RemoveCollection(string role, System.TimeSpan time) => throw null; + public void SecondLevelCacheHit(string regionName) => throw null; + public System.Int64 SecondLevelCacheHitCount { get => throw null; } + public void SecondLevelCacheMiss(string regionName) => throw null; + public System.Int64 SecondLevelCacheMissCount { get => throw null; } + public void SecondLevelCachePut(string regionName) => throw null; + public System.Int64 SecondLevelCachePutCount { get => throw null; } + public string[] SecondLevelCacheRegionNames { get => throw null; } + public System.Int64 SessionCloseCount { get => throw null; } + public System.Int64 SessionOpenCount { get => throw null; } + public System.DateTime StartTime { get => throw null; } + public StatisticsImpl(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public StatisticsImpl() => throw null; + public System.Int64 SuccessfulTransactionCount { get => throw null; } + public override string ToString() => throw null; + public System.Int64 TransactionCount { get => throw null; } + public void UpdateCollection(string role, System.TimeSpan time) => throw null; + public void UpdateEntity(string entityName, System.TimeSpan time) => throw null; + } + + } + namespace Tool + { + namespace hbm2ddl + { + // Generated from `NHibernate.Tool.hbm2ddl.DatabaseMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DatabaseMetadata : NHibernate.Tool.hbm2ddl.IDatabaseMetadata + { + public DatabaseMetadata(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect dialect, bool extras) => throw null; + public DatabaseMetadata(System.Data.Common.DbConnection connection, NHibernate.Dialect.Dialect dialect) => throw null; + public NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(string name, string schema, string catalog, bool isQuoted) => throw null; + public bool IsSequence(object key) => throw null; + public bool IsTable(object key) => throw null; + public override string ToString() => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.IConnectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IConnectionHelper + { + System.Data.Common.DbConnection Connection { get; } + void Prepare(); + System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken); + void Release(); + } + + // Generated from `NHibernate.Tool.hbm2ddl.IDatabaseMetadata` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDatabaseMetadata + { + NHibernate.Dialect.Schema.ITableMetadata GetTableMetadata(string name, string schema, string catalog, bool isQuoted); + bool IsSequence(object key); + bool IsTable(object key); + } + + // Generated from `NHibernate.Tool.hbm2ddl.ManagedProviderConnectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManagedProviderConnectionHelper : NHibernate.Tool.hbm2ddl.IConnectionHelper + { + public System.Data.Common.DbConnection Connection { get => throw null; } + public ManagedProviderConnectionHelper(System.Collections.Generic.IDictionary cfgProperties) => throw null; + public void Prepare() => throw null; + public System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Release() => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SchemaExport` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SchemaExport + { + public void Create(bool useStdOut, bool execute, System.Data.Common.DbConnection connection) => throw null; + public void Create(bool useStdOut, bool execute) => throw null; + public void Create(System.IO.TextWriter exportOutput, bool execute, System.Data.Common.DbConnection connection) => throw null; + public void Create(System.IO.TextWriter exportOutput, bool execute) => throw null; + public void Create(System.Action scriptAction, bool execute, System.Data.Common.DbConnection connection) => throw null; + public void Create(System.Action scriptAction, bool execute) => throw null; + public System.Threading.Tasks.Task CreateAsync(bool useStdOut, bool execute, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task CreateAsync(bool useStdOut, bool execute, System.Data.Common.DbConnection connection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task CreateAsync(System.IO.TextWriter exportOutput, bool execute, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task CreateAsync(System.IO.TextWriter exportOutput, bool execute, System.Data.Common.DbConnection connection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task CreateAsync(System.Action scriptAction, bool execute, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task CreateAsync(System.Action scriptAction, bool execute, System.Data.Common.DbConnection connection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Drop(bool useStdOut, bool execute, System.Data.Common.DbConnection connection) => throw null; + public void Drop(bool useStdOut, bool execute) => throw null; + public void Drop(System.IO.TextWriter exportOutput, bool execute, System.Data.Common.DbConnection connection) => throw null; + public void Drop(System.IO.TextWriter exportOutput, bool execute) => throw null; + public System.Threading.Tasks.Task DropAsync(bool useStdOut, bool execute, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DropAsync(bool useStdOut, bool execute, System.Data.Common.DbConnection connection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DropAsync(System.IO.TextWriter exportOutput, bool execute, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task DropAsync(System.IO.TextWriter exportOutput, bool execute, System.Data.Common.DbConnection connection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Execute(bool useStdOut, bool execute, bool justDrop, System.Data.Common.DbConnection connection, System.IO.TextWriter exportOutput) => throw null; + public void Execute(bool useStdOut, bool execute, bool justDrop) => throw null; + public void Execute(System.Action scriptAction, bool execute, bool justDrop, System.IO.TextWriter exportOutput) => throw null; + public void Execute(System.Action scriptAction, bool execute, bool justDrop, System.Data.Common.DbConnection connection, System.IO.TextWriter exportOutput) => throw null; + public void Execute(System.Action scriptAction, bool execute, bool justDrop) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(bool useStdOut, bool execute, bool justDrop, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(bool useStdOut, bool execute, bool justDrop, System.Data.Common.DbConnection connection, System.IO.TextWriter exportOutput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Action scriptAction, bool execute, bool justDrop, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Action scriptAction, bool execute, bool justDrop, System.IO.TextWriter exportOutput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Action scriptAction, bool execute, bool justDrop, System.Data.Common.DbConnection connection, System.IO.TextWriter exportOutput, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public SchemaExport(NHibernate.Cfg.Configuration cfg, System.Collections.Generic.IDictionary configProperties) => throw null; + public SchemaExport(NHibernate.Cfg.Configuration cfg) => throw null; + public NHibernate.Tool.hbm2ddl.SchemaExport SetDelimiter(string delimiter) => throw null; + public NHibernate.Tool.hbm2ddl.SchemaExport SetOutputFile(string filename) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SchemaMetadataUpdater + { + public static void QuoteTableAndColumns(NHibernate.Cfg.Configuration configuration, NHibernate.Dialect.Dialect dialect) => throw null; + public static void QuoteTableAndColumns(NHibernate.Cfg.Configuration configuration) => throw null; + public static void Update(NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public static void Update(NHibernate.Cfg.Configuration configuration, NHibernate.Dialect.Dialect dialect) => throw null; + public static System.Threading.Tasks.Task UpdateAsync(NHibernate.Engine.ISessionFactoryImplementor sessionFactory, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task UpdateAsync(NHibernate.Cfg.Configuration configuration, NHibernate.Dialect.Dialect dialect, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SchemaUpdate` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SchemaUpdate + { + public System.Collections.Generic.IList Exceptions { get => throw null; } + public void Execute(bool useStdOut, bool doUpdate) => throw null; + public void Execute(System.Action scriptAction, bool doUpdate) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(bool useStdOut, bool doUpdate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public System.Threading.Tasks.Task ExecuteAsync(System.Action scriptAction, bool doUpdate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public static void Main(string[] args) => throw null; + public static System.Threading.Tasks.Task MainAsync(string[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public SchemaUpdate(NHibernate.Cfg.Configuration cfg, System.Collections.Generic.IDictionary configProperties) => throw null; + public SchemaUpdate(NHibernate.Cfg.Configuration cfg, NHibernate.Cfg.Settings settings) => throw null; + public SchemaUpdate(NHibernate.Cfg.Configuration cfg) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SchemaValidator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SchemaValidator + { + public static void Main(string[] args) => throw null; + public static System.Threading.Tasks.Task MainAsync(string[] args, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public SchemaValidator(NHibernate.Cfg.Configuration cfg, System.Collections.Generic.IDictionary connectionProperties) => throw null; + public SchemaValidator(NHibernate.Cfg.Configuration cfg, NHibernate.Cfg.Settings settings) => throw null; + public SchemaValidator(NHibernate.Cfg.Configuration cfg) => throw null; + public void Validate() => throw null; + public System.Threading.Tasks.Task ValidateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.ScriptSplitter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ScriptSplitter : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public ScriptSplitter(string script) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SuppliedConnectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SuppliedConnectionHelper : NHibernate.Tool.hbm2ddl.IConnectionHelper + { + public System.Data.Common.DbConnection Connection { get => throw null; } + public void Prepare() => throw null; + public System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Release() => throw null; + public SuppliedConnectionHelper(System.Data.Common.DbConnection connection) => throw null; + } + + // Generated from `NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SuppliedConnectionProviderConnectionHelper : NHibernate.Tool.hbm2ddl.IConnectionHelper + { + public System.Data.Common.DbConnection Connection { get => throw null; } + public void Prepare() => throw null; + public System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public void Release() => throw null; + public SuppliedConnectionProviderConnectionHelper(NHibernate.Connection.IConnectionProvider provider) => throw null; + } + + } + } + namespace Transaction + { + // Generated from `NHibernate.Transaction.AdoNetTransactionFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AdoNetTransactionFactory : NHibernate.Transaction.ITransactionFactory + { + public AdoNetTransactionFactory() => throw null; + public virtual void Configure(System.Collections.Generic.IDictionary props) => throw null; + public virtual NHibernate.ITransaction CreateTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual void EnlistInSystemTransactionIfNeeded(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual void ExecuteWorkInIsolation(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted) => throw null; + public virtual System.Threading.Tasks.Task ExecuteWorkInIsolationAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void ExplicitJoinSystemTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual bool IsInActiveSystemTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Transaction.AdoNetWithSystemTransactionFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AdoNetWithSystemTransactionFactory : NHibernate.Transaction.AdoNetTransactionFactory + { + public AdoNetWithSystemTransactionFactory() => throw null; + public override void Configure(System.Collections.Generic.IDictionary props) => throw null; + protected virtual NHibernate.Transaction.ITransactionContext CreateAndEnlistMainContext(NHibernate.Engine.ISessionImplementor session, System.Transactions.Transaction transaction) => throw null; + protected virtual NHibernate.Transaction.ITransactionContext CreateDependentContext(NHibernate.Engine.ISessionImplementor dependentSession, NHibernate.Transaction.ITransactionContext mainContext) => throw null; + // Generated from `NHibernate.Transaction.AdoNetWithSystemTransactionFactory+DependentContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DependentContext : System.IDisposable, NHibernate.Transaction.ITransactionContext + { + public virtual bool CanFlushOnSystemTransactionCompleted { get => throw null; } + public DependentContext(NHibernate.Transaction.ITransactionContext mainTransactionContext) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + public bool IsInActiveTransaction { get => throw null; } + protected NHibernate.Transaction.ITransactionContext MainTransactionContext { get => throw null; } + public bool ShouldCloseSessionOnSystemTransactionCompleted { get => throw null; set => throw null; } + public virtual void Wait() => throw null; + } + + + public override void EnlistInSystemTransactionIfNeeded(NHibernate.Engine.ISessionImplementor session) => throw null; + public override void ExecuteWorkInIsolation(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted) => throw null; + public override System.Threading.Tasks.Task ExecuteWorkInIsolationAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted, System.Threading.CancellationToken cancellationToken) => throw null; + public override void ExplicitJoinSystemTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsInActiveSystemTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual void JoinSystemTransaction(NHibernate.Engine.ISessionImplementor session, System.Transactions.Transaction transaction) => throw null; + protected int SystemTransactionCompletionLockTimeout { get => throw null; set => throw null; } + // Generated from `NHibernate.Transaction.AdoNetWithSystemTransactionFactory+SystemTransactionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SystemTransactionContext : System.Transactions.IEnlistmentNotification, System.IDisposable, NHibernate.Transaction.ITransactionContext + { + public virtual bool CanFlushOnSystemTransactionCompleted { get => throw null; } + void System.Transactions.IEnlistmentNotification.Commit(System.Transactions.Enlistment enlistment) => throw null; + protected virtual void CompleteTransaction(bool isCommitted) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool disposing) => throw null; + protected internal System.Transactions.Transaction EnlistedTransaction { get => throw null; } + protected System.Transactions.TransactionStatus? GetTransactionStatus() => throw null; + void System.Transactions.IEnlistmentNotification.InDoubt(System.Transactions.Enlistment enlistment) => throw null; + public bool IsInActiveTransaction { get => throw null; set => throw null; } + protected virtual void Lock() => throw null; + public virtual void Prepare(System.Transactions.PreparingEnlistment preparingEnlistment) => throw null; + protected virtual void ProcessSecondPhase(System.Transactions.Enlistment enlistment, bool? success) => throw null; + void System.Transactions.IEnlistmentNotification.Rollback(System.Transactions.Enlistment enlistment) => throw null; + public bool ShouldCloseSessionOnSystemTransactionCompleted { get => throw null; set => throw null; } + public SystemTransactionContext(NHibernate.Engine.ISessionImplementor session, System.Transactions.Transaction transaction, int systemTransactionCompletionLockTimeout, bool useConnectionOnSystemTransactionPrepare) => throw null; + protected virtual void Unlock() => throw null; + public virtual void Wait() => throw null; + } + + + protected bool UseConnectionOnSystemTransactionPrepare { get => throw null; set => throw null; } + } + + // Generated from `NHibernate.Transaction.AdoTransaction` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AdoTransaction : System.IDisposable, NHibernate.ITransaction + { + public AdoTransaction(NHibernate.Engine.ISessionImplementor session) => throw null; + public void Begin(System.Data.IsolationLevel isolationLevel) => throw null; + public void Begin() => throw null; + public void Commit() => throw null; + public System.Threading.Tasks.Task CommitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public void Dispose() => throw null; + protected virtual void Dispose(bool isDisposing) => throw null; + protected virtual System.Threading.Tasks.Task DisposeAsync(bool isDisposing, System.Threading.CancellationToken cancellationToken) => throw null; + public void Enlist(System.Data.Common.DbCommand command) => throw null; + public bool IsActive { get => throw null; } + public System.Data.IsolationLevel IsolationLevel { get => throw null; } + public void RegisterSynchronization(NHibernate.Transaction.ITransactionCompletionSynchronization synchronization) => throw null; + public void RegisterSynchronization(NHibernate.Transaction.ISynchronization sync) => throw null; + public void Rollback() => throw null; + public System.Threading.Tasks.Task RollbackAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + public bool WasCommitted { get => throw null; } + public bool WasRolledBack { get => throw null; } + // ERR: Stub generator didn't handle member: ~AdoTransaction + } + + // Generated from `NHibernate.Transaction.AfterTransactionCompletes` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AfterTransactionCompletes : NHibernate.Transaction.ISynchronization + { + public void AfterCompletion(bool success) => throw null; + public AfterTransactionCompletes(System.Action whenCompleted) => throw null; + public void BeforeCompletion() => throw null; + } + + // Generated from `NHibernate.Transaction.ISynchronization` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ISynchronization + { + void AfterCompletion(bool success); + void BeforeCompletion(); + } + + // Generated from `NHibernate.Transaction.ITransactionCompletionSynchronization` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITransactionCompletionSynchronization : NHibernate.Action.IBeforeTransactionCompletionProcess, NHibernate.Action.IAfterTransactionCompletionProcess + { + } + + // Generated from `NHibernate.Transaction.ITransactionContext` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITransactionContext : System.IDisposable + { + bool CanFlushOnSystemTransactionCompleted { get; } + bool IsInActiveTransaction { get; } + bool ShouldCloseSessionOnSystemTransactionCompleted { get; set; } + void Wait(); + } + + // Generated from `NHibernate.Transaction.ITransactionFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITransactionFactory + { + void Configure(System.Collections.Generic.IDictionary props); + NHibernate.ITransaction CreateTransaction(NHibernate.Engine.ISessionImplementor session); + void EnlistInSystemTransactionIfNeeded(NHibernate.Engine.ISessionImplementor session); + void ExecuteWorkInIsolation(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted); + System.Threading.Tasks.Task ExecuteWorkInIsolationAsync(NHibernate.Engine.ISessionImplementor session, NHibernate.Engine.Transaction.IIsolatedWork work, bool transacted, System.Threading.CancellationToken cancellationToken); + void ExplicitJoinSystemTransaction(NHibernate.Engine.ISessionImplementor session); + bool IsInActiveSystemTransaction(NHibernate.Engine.ISessionImplementor session); + } + + } + namespace Transform + { + // Generated from `NHibernate.Transform.AliasToBeanConstructorResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AliasToBeanConstructorResultTransformer : NHibernate.Transform.IResultTransformer + { + public AliasToBeanConstructorResultTransformer(System.Reflection.ConstructorInfo constructor) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Transform.AliasToBeanConstructorResultTransformer other) => throw null; + public override int GetHashCode() => throw null; + public System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.AliasToBeanResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AliasToBeanResultTransformer : NHibernate.Transform.AliasedTupleSubsetResultTransformer, System.IEquatable + { + public AliasToBeanResultTransformer(System.Type resultClass) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Transform.AliasToBeanResultTransformer other) => throw null; + public override int GetHashCode() => throw null; + public override bool IsTransformedValueATupleElement(string[] aliases, int tupleLength) => throw null; + protected virtual void OnPropertyNotFound(string propertyName) => throw null; + public override System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public override object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.AliasToEntityMapResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AliasToEntityMapResultTransformer : NHibernate.Transform.AliasedTupleSubsetResultTransformer + { + public AliasToEntityMapResultTransformer() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override bool IsTransformedValueATupleElement(string[] aliases, int tupleLength) => throw null; + public override System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public override object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.AliasedTupleSubsetResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AliasedTupleSubsetResultTransformer : NHibernate.Transform.ITupleSubsetResultTransformer, NHibernate.Transform.IResultTransformer + { + protected AliasedTupleSubsetResultTransformer() => throw null; + public bool[] IncludeInTransform(string[] aliases, int tupleLength) => throw null; + public abstract bool IsTransformedValueATupleElement(string[] aliases, int tupleLength); + public abstract System.Collections.IList TransformList(System.Collections.IList collection); + public abstract object TransformTuple(object[] tuple, string[] aliases); + } + + // Generated from `NHibernate.Transform.CacheableResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CacheableResultTransformer : NHibernate.Transform.IResultTransformer + { + public bool AutoDiscoverTypes { get => throw null; } + public static NHibernate.Transform.CacheableResultTransformer Create(NHibernate.Transform.IResultTransformer transformer, string[] aliases, bool[] includeInTuple, bool autoDiscoverTypes, NHibernate.SqlCommand.SqlString autoDiscoveredQuery, bool skipTransformer) => throw null; + public static NHibernate.Transform.CacheableResultTransformer Create(NHibernate.Transform.IResultTransformer transformer, string[] aliases, bool[] includeInTuple, bool autoDiscoverTypes, NHibernate.SqlCommand.SqlString autoDiscoveredQuery) => throw null; + public static NHibernate.Transform.CacheableResultTransformer Create(NHibernate.Transform.IResultTransformer transformer, string[] aliases, bool[] includeInTuple) => throw null; + public override bool Equals(object o) => throw null; + public NHibernate.Type.IType[] GetCachedResultTypes(NHibernate.Type.IType[] tupleResultTypes) => throw null; + public override int GetHashCode() => throw null; + public System.Collections.IList RetransformResults(System.Collections.IList transformedResults, string[] aliases, NHibernate.Transform.IResultTransformer transformer, bool[] includeInTuple) => throw null; + public System.Collections.IList TransformList(System.Collections.IList list) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + public System.Collections.IList UntransformToTuples(System.Collections.IList results) => throw null; + } + + // Generated from `NHibernate.Transform.DistinctRootEntityResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DistinctRootEntityResultTransformer : NHibernate.Transform.ITupleSubsetResultTransformer, NHibernate.Transform.IResultTransformer + { + public DistinctRootEntityResultTransformer() => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool[] IncludeInTransform(string[] aliases, int tupleLength) => throw null; + public bool IsTransformedValueATupleElement(string[] aliases, int tupleLength) => throw null; + public System.Collections.IList TransformList(System.Collections.IList list) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.IResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IResultTransformer + { + System.Collections.IList TransformList(System.Collections.IList collection); + object TransformTuple(object[] tuple, string[] aliases); + } + + // Generated from `NHibernate.Transform.ITupleSubsetResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITupleSubsetResultTransformer : NHibernate.Transform.IResultTransformer + { + bool[] IncludeInTransform(string[] aliases, int tupleLength); + bool IsTransformedValueATupleElement(string[] aliases, int tupleLength); + } + + // Generated from `NHibernate.Transform.PassThroughResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PassThroughResultTransformer : NHibernate.Transform.ITupleSubsetResultTransformer, NHibernate.Transform.IResultTransformer + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool[] IncludeInTransform(string[] aliases, int tupleLength) => throw null; + public bool IsTransformedValueATupleElement(string[] aliases, int tupleLength) => throw null; + public PassThroughResultTransformer() => throw null; + public System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.RootEntityResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class RootEntityResultTransformer : NHibernate.Transform.ITupleSubsetResultTransformer, NHibernate.Transform.IResultTransformer + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool[] IncludeInTransform(string[] aliases, int tupleLength) => throw null; + public bool IsTransformedValueATupleElement(string[] aliases, int tupleLength) => throw null; + public RootEntityResultTransformer() => throw null; + public System.Collections.IList TransformList(System.Collections.IList collection) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.ToListResultTransformer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ToListResultTransformer : NHibernate.Transform.IResultTransformer + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public ToListResultTransformer() => throw null; + public System.Collections.IList TransformList(System.Collections.IList list) => throw null; + public object TransformTuple(object[] tuple, string[] aliases) => throw null; + } + + // Generated from `NHibernate.Transform.Transformers` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class Transformers + { + public static NHibernate.Transform.IResultTransformer AliasToBean() => throw null; + public static NHibernate.Transform.IResultTransformer AliasToBean(System.Type target) => throw null; + public static NHibernate.Transform.IResultTransformer AliasToBeanConstructor(System.Reflection.ConstructorInfo constructor) => throw null; + public static NHibernate.Transform.IResultTransformer AliasToEntityMap; + public static NHibernate.Transform.IResultTransformer DistinctRootEntity; + public static NHibernate.Transform.IResultTransformer PassThrough; + public static NHibernate.Transform.IResultTransformer RootEntity; + public static NHibernate.Transform.ToListResultTransformer ToList; + } + + } + namespace Tuple + { + // Generated from `NHibernate.Tuple.DynamicEntityInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicEntityInstantiator : NHibernate.Tuple.IInstantiator + { + public DynamicEntityInstantiator(NHibernate.Mapping.PersistentClass mappingInfo) => throw null; + public object Instantiate(object id) => throw null; + public object Instantiate() => throw null; + public bool IsInstance(object obj) => throw null; + public const string Key = default; + } + + // Generated from `NHibernate.Tuple.DynamicMapInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicMapInstantiator : NHibernate.Tuple.IInstantiator + { + public DynamicMapInstantiator(NHibernate.Mapping.PersistentClass mappingInfo) => throw null; + public DynamicMapInstantiator() => throw null; + protected virtual System.Collections.IDictionary GenerateMap() => throw null; + public object Instantiate(object id) => throw null; + public object Instantiate() => throw null; + public bool IsInstance(object obj) => throw null; + public const string KEY = default; + } + + // Generated from `NHibernate.Tuple.IInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IInstantiator + { + object Instantiate(object id); + object Instantiate(); + bool IsInstance(object obj); + } + + // Generated from `NHibernate.Tuple.ITuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ITuplizer + { + object GetPropertyValue(object entity, int i); + object[] GetPropertyValues(object entity); + object Instantiate(); + bool IsInstance(object obj); + System.Type MappedClass { get; } + void SetPropertyValues(object entity, object[] values); + } + + // Generated from `NHibernate.Tuple.IdentifierProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentifierProperty : NHibernate.Tuple.Property + { + public bool HasIdentifierMapper { get => throw null; } + public NHibernate.Id.IIdentifierGenerator IdentifierGenerator { get => throw null; } + public IdentifierProperty(string name, NHibernate.Type.IType type, bool embedded, NHibernate.Engine.IdentifierValue unsavedValue, NHibernate.Id.IIdentifierGenerator identifierGenerator) : base(default(string), default(NHibernate.Type.IType)) => throw null; + public IdentifierProperty(NHibernate.Type.IType type, bool embedded, bool hasIdentifierMapper, NHibernate.Engine.IdentifierValue unsavedValue, NHibernate.Id.IIdentifierGenerator identifierGenerator) : base(default(string), default(NHibernate.Type.IType)) => throw null; + public bool IsEmbedded { get => throw null; } + public bool IsIdentifierAssignedByInsert { get => throw null; } + public bool IsVirtual { get => throw null; } + public NHibernate.Engine.IdentifierValue UnsavedValue { get => throw null; } + } + + // Generated from `NHibernate.Tuple.PocoInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PocoInstantiator : System.Runtime.Serialization.IDeserializationCallback, NHibernate.Tuple.IInstantiator + { + protected virtual object CreateInstance() => throw null; + public object Instantiate(object id) => throw null; + public object Instantiate() => throw null; + public virtual bool IsInstance(object obj) => throw null; + public void OnDeserialization(object sender) => throw null; + public PocoInstantiator(System.Type mappedClass, NHibernate.Bytecode.IInstantiationOptimizer optimizer, bool embeddedIdentifier) => throw null; + public PocoInstantiator(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Bytecode.IInstantiationOptimizer optimizer, NHibernate.Proxy.IProxyFactory proxyFactory, bool generateFieldInterceptionProxy) => throw null; + public PocoInstantiator(NHibernate.Mapping.Component component, NHibernate.Bytecode.IInstantiationOptimizer optimizer) => throw null; + public PocoInstantiator() => throw null; + public void SetOptimizer(NHibernate.Bytecode.IInstantiationOptimizer optimizer) => throw null; + } + + // Generated from `NHibernate.Tuple.Property` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class Property + { + public string Name { get => throw null; } + protected Property(string name, NHibernate.Type.IType type) => throw null; + public override string ToString() => throw null; + public NHibernate.Type.IType Type { get => throw null; } + } + + // Generated from `NHibernate.Tuple.PropertyFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PropertyFactory + { + public static NHibernate.Tuple.IdentifierProperty BuildIdentifierProperty(NHibernate.Mapping.PersistentClass mappedEntity, NHibernate.Id.IIdentifierGenerator generator) => throw null; + public static NHibernate.Tuple.StandardProperty BuildStandardProperty(NHibernate.Mapping.Property property, bool lazyAvailable) => throw null; + public static NHibernate.Tuple.VersionProperty BuildVersionProperty(NHibernate.Mapping.Property property, bool lazyAvailable) => throw null; + public PropertyFactory() => throw null; + } + + // Generated from `NHibernate.Tuple.StandardProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StandardProperty : NHibernate.Tuple.Property + { + public NHibernate.Engine.CascadeStyle CascadeStyle { get => throw null; } + public NHibernate.FetchMode? FetchMode { get => throw null; } + public bool IsDirtyCheckable(bool hasUninitializedProperties) => throw null; + public bool IsDirtyCheckable() => throw null; + public bool IsInsertGenerated { get => throw null; } + public bool IsInsertable { get => throw null; } + public bool IsLazy { get => throw null; } + public bool IsNullable { get => throw null; } + public bool IsUpdateGenerated { get => throw null; } + public bool IsUpdateable { get => throw null; } + public bool IsVersionable { get => throw null; } + public StandardProperty(string name, NHibernate.Type.IType type, bool lazy, bool insertable, bool updateable, bool insertGenerated, bool updateGenerated, bool nullable, bool checkable, bool versionable, NHibernate.Engine.CascadeStyle cascadeStyle, NHibernate.FetchMode? fetchMode) : base(default(string), default(NHibernate.Type.IType)) => throw null; + } + + // Generated from `NHibernate.Tuple.VersionProperty` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class VersionProperty : NHibernate.Tuple.StandardProperty + { + public NHibernate.Engine.VersionValue UnsavedValue { get => throw null; } + public VersionProperty(string name, NHibernate.Type.IType type, bool lazy, bool insertable, bool updateable, bool insertGenerated, bool updateGenerated, bool nullable, bool checkable, bool versionable, NHibernate.Engine.CascadeStyle cascadeStyle, NHibernate.Engine.VersionValue unsavedValue) : base(default(string), default(NHibernate.Type.IType), default(bool), default(bool), default(bool), default(bool), default(bool), default(bool), default(bool), default(bool), default(NHibernate.Engine.CascadeStyle), default(NHibernate.FetchMode?)) => throw null; + } + + namespace Component + { + // Generated from `NHibernate.Tuple.Component.AbstractComponentTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractComponentTuplizer : NHibernate.Tuple.ITuplizer, NHibernate.Tuple.Component.IComponentTuplizer + { + protected internal AbstractComponentTuplizer(NHibernate.Mapping.Component component) => throw null; + protected internal abstract NHibernate.Properties.IGetter BuildGetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop); + protected internal abstract NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.Component component); + protected internal abstract NHibernate.Properties.ISetter BuildSetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop); + public virtual object GetParent(object component) => throw null; + public virtual object GetPropertyValue(object component, int i) => throw null; + public virtual object[] GetPropertyValues(object component) => throw null; + public virtual bool HasParentProperty { get => throw null; } + public virtual object Instantiate() => throw null; + public virtual bool IsInstance(object obj) => throw null; + public abstract System.Type MappedClass { get; } + public virtual void SetParent(object component, object parent, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual void SetPropertyValues(object component, object[] values) => throw null; + protected internal NHibernate.Properties.IGetter[] getters; + protected internal bool hasCustomAccessors; + protected internal NHibernate.Tuple.IInstantiator instantiator; + protected internal int propertySpan; + protected internal NHibernate.Properties.ISetter[] setters; + } + + // Generated from `NHibernate.Tuple.Component.ComponentMetamodel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentMetamodel + { + public ComponentMetamodel(NHibernate.Mapping.Component component) => throw null; + public NHibernate.Tuple.Component.IComponentTuplizer ComponentTuplizer { get => throw null; } + public NHibernate.EntityMode EntityMode { get => throw null; } + public NHibernate.Tuple.StandardProperty GetProperty(string propertyName) => throw null; + public NHibernate.Tuple.StandardProperty GetProperty(int index) => throw null; + public int GetPropertyIndex(string propertyName) => throw null; + public bool IsKey { get => throw null; } + public NHibernate.Tuple.StandardProperty[] Properties { get => throw null; } + public int PropertySpan { get => throw null; } + public string Role { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Component.ComponentTuplizerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentTuplizerFactory + { + public NHibernate.Tuple.Component.IComponentTuplizer BuildComponentTuplizer(string tuplizerImpl, NHibernate.Mapping.Component component) => throw null; + public NHibernate.Tuple.Component.IComponentTuplizer BuildDefaultComponentTuplizer(NHibernate.EntityMode entityMode, NHibernate.Mapping.Component component) => throw null; + public ComponentTuplizerFactory() => throw null; + } + + // Generated from `NHibernate.Tuple.Component.DynamicMapComponentTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicMapComponentTuplizer : NHibernate.Tuple.Component.AbstractComponentTuplizer + { + protected internal override NHibernate.Properties.IGetter BuildGetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop) => throw null; + protected internal override NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.Component component) => throw null; + protected internal override NHibernate.Properties.ISetter BuildSetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop) => throw null; + public DynamicMapComponentTuplizer(NHibernate.Mapping.Component component) : base(default(NHibernate.Mapping.Component)) => throw null; + public override System.Type MappedClass { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Component.IComponentTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IComponentTuplizer : NHibernate.Tuple.ITuplizer + { + object GetParent(object component); + bool HasParentProperty { get; } + void SetParent(object component, object parent, NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.Tuple.Component.PocoComponentTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PocoComponentTuplizer : NHibernate.Tuple.Component.AbstractComponentTuplizer + { + protected internal override NHibernate.Properties.IGetter BuildGetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop) => throw null; + protected internal override NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.Component component) => throw null; + protected internal override NHibernate.Properties.ISetter BuildSetter(NHibernate.Mapping.Component component, NHibernate.Mapping.Property prop) => throw null; + protected void ClearOptimizerWhenUsingCustomAccessors() => throw null; + public override object GetParent(object component) => throw null; + public override object GetPropertyValue(object component, int i) => throw null; + public override object[] GetPropertyValues(object component) => throw null; + public override bool HasParentProperty { get => throw null; } + public override System.Type MappedClass { get => throw null; } + public PocoComponentTuplizer(NHibernate.Mapping.Component component) : base(default(NHibernate.Mapping.Component)) => throw null; + public override void SetParent(object component, object parent, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override void SetPropertyValues(object component, object[] values) => throw null; + protected void SetReflectionOptimizer() => throw null; + } + + } + namespace Entity + { + // Generated from `NHibernate.Tuple.Entity.AbstractEntityTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEntityTuplizer : NHibernate.Tuple.ITuplizer, NHibernate.Tuple.Entity.IEntityTuplizer + { + protected AbstractEntityTuplizer(NHibernate.Tuple.Entity.EntityMetamodel entityMetamodel, NHibernate.Mapping.PersistentClass mappingInfo) => throw null; + public virtual void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual void AfterInitialize(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + protected abstract NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.PersistentClass mappingInfo); + protected abstract NHibernate.Properties.IGetter BuildPropertyGetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity); + protected abstract NHibernate.Properties.ISetter BuildPropertySetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity); + protected abstract NHibernate.Proxy.IProxyFactory BuildProxyFactory(NHibernate.Mapping.PersistentClass mappingInfo, NHibernate.Properties.IGetter idGetter, NHibernate.Properties.ISetter idSetter); + public abstract System.Type ConcreteProxyClass { get; } + public object CreateProxy(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + protected NHibernate.Tuple.Entity.EntityMetamodel EntityMetamodel { get => throw null; } + public abstract NHibernate.EntityMode EntityMode { get; } + protected virtual string EntityName { get => throw null; } + protected virtual object GetComponentValue(NHibernate.Type.ComponentType type, object component, string propertyPath) => throw null; + public object GetIdentifier(object entity) => throw null; + protected virtual object GetIdentifierPropertyValue(object entity) => throw null; + public virtual object GetPropertyValue(object entity, int i) => throw null; + public object GetPropertyValue(object entity, string propertyPath) => throw null; + public virtual object[] GetPropertyValues(object entity) => throw null; + public virtual object[] GetPropertyValuesToInsert(object entity, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public object GetVersion(object entity) => throw null; + public bool HasProxy { get => throw null; } + public virtual bool HasUninitializedLazyProperties(object entity) => throw null; + public object Instantiate(object id) => throw null; + public object Instantiate() => throw null; + protected virtual NHibernate.Tuple.IInstantiator Instantiator { get => throw null; set => throw null; } + public bool IsInstance(object obj) => throw null; + public abstract bool IsInstrumented { get; } + public virtual bool IsLifecycleImplementor { get => throw null; } + public virtual bool IsValidatableImplementor { get => throw null; } + public abstract System.Type MappedClass { get; } + protected virtual NHibernate.Proxy.IProxyFactory ProxyFactory { get => throw null; } + public void ResetIdentifier(object entity, object currentId, object currentVersion) => throw null; + public void SetIdentifier(object entity, object id) => throw null; + protected virtual void SetIdentifierPropertyValue(object entity, object value) => throw null; + public void SetPropertyValue(object entity, string propertyName, object value) => throw null; + public virtual void SetPropertyValue(object entity, int i, object value) => throw null; + public virtual void SetPropertyValues(object entity, object[] values) => throw null; + protected virtual bool ShouldGetAllProperties(object entity) => throw null; + protected virtual System.Collections.Generic.ISet SubclassEntityNames { get => throw null; } + protected NHibernate.Properties.IGetter[] getters; + protected bool hasCustomAccessors; + protected NHibernate.Properties.IGetter idGetter; + protected NHibernate.Properties.ISetter idSetter; + protected int propertySpan; + protected NHibernate.Properties.ISetter[] setters; + } + + // Generated from `NHibernate.Tuple.Entity.BytecodeEnhancementMetadataNonPocoImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BytecodeEnhancementMetadataNonPocoImpl : NHibernate.Bytecode.IBytecodeEnhancementMetadata + { + public BytecodeEnhancementMetadataNonPocoImpl(string entityName) => throw null; + public bool EnhancedForLazyLoading { get => throw null; } + public string EntityName { get => throw null; } + public NHibernate.Intercept.IFieldInterceptor ExtractInterceptor(object entity) => throw null; + public System.Collections.Generic.ISet GetUninitializedLazyProperties(object[] entityState) => throw null; + public System.Collections.Generic.ISet GetUninitializedLazyProperties(object entity) => throw null; + public bool HasAnyUninitializedLazyProperties(object entity) => throw null; + public NHibernate.Intercept.IFieldInterceptor InjectInterceptor(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.Bytecode.LazyPropertiesMetadata LazyPropertiesMetadata { get => throw null; } + public NHibernate.Bytecode.UnwrapProxyPropertiesMetadata UnwrapProxyPropertiesMetadata { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Entity.BytecodeEnhancementMetadataPocoImpl` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BytecodeEnhancementMetadataPocoImpl : NHibernate.Bytecode.IBytecodeEnhancementMetadata + { + public BytecodeEnhancementMetadataPocoImpl(string entityName, System.Type entityType, bool enhancedForLazyLoading, NHibernate.Bytecode.LazyPropertiesMetadata lazyPropertiesMetadata, NHibernate.Bytecode.UnwrapProxyPropertiesMetadata unwrapProxyPropertiesMetadata) => throw null; + public bool EnhancedForLazyLoading { get => throw null; } + public string EntityName { get => throw null; } + public NHibernate.Intercept.IFieldInterceptor ExtractInterceptor(object entity) => throw null; + public static NHibernate.Bytecode.IBytecodeEnhancementMetadata From(NHibernate.Mapping.PersistentClass persistentClass, System.Collections.Generic.ICollection lazyPropertyDescriptors, System.Collections.Generic.ICollection unwrapProxyPropertyDescriptors) => throw null; + public System.Collections.Generic.ISet GetUninitializedLazyProperties(object[] entityState) => throw null; + public System.Collections.Generic.ISet GetUninitializedLazyProperties(object entity) => throw null; + public bool HasAnyUninitializedLazyProperties(object entity) => throw null; + public NHibernate.Intercept.IFieldInterceptor InjectInterceptor(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public NHibernate.Bytecode.LazyPropertiesMetadata LazyPropertiesMetadata { get => throw null; } + public NHibernate.Bytecode.UnwrapProxyPropertiesMetadata UnwrapProxyPropertiesMetadata { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Entity.DynamicMapEntityTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicMapEntityTuplizer : NHibernate.Tuple.Entity.AbstractEntityTuplizer + { + protected override NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.PersistentClass mappingInfo) => throw null; + protected override NHibernate.Properties.IGetter BuildPropertyGetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity) => throw null; + protected override NHibernate.Properties.ISetter BuildPropertySetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity) => throw null; + protected override NHibernate.Proxy.IProxyFactory BuildProxyFactory(NHibernate.Mapping.PersistentClass mappingInfo, NHibernate.Properties.IGetter idGetter, NHibernate.Properties.ISetter idSetter) => throw null; + public override System.Type ConcreteProxyClass { get => throw null; } + internal DynamicMapEntityTuplizer(NHibernate.Tuple.Entity.EntityMetamodel entityMetamodel, NHibernate.Mapping.PersistentClass mappingInfo) : base(default(NHibernate.Tuple.Entity.EntityMetamodel), default(NHibernate.Mapping.PersistentClass)) => throw null; + public override NHibernate.EntityMode EntityMode { get => throw null; } + public override bool IsInstrumented { get => throw null; } + public override System.Type MappedClass { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Entity.EntityMetamodel` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityMetamodel + { + public NHibernate.Bytecode.IBytecodeEnhancementMetadata BytecodeEnhancementMetadata { get => throw null; } + public NHibernate.Engine.CascadeStyle[] CascadeStyles { get => throw null; } + public EntityMetamodel(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Engine.ISessionFactoryImplementor sessionFactory) => throw null; + public NHibernate.EntityMode EntityMode { get => throw null; } + public NHibernate.Type.EntityType EntityType { get => throw null; } + public int GetPropertyIndex(string propertyName) => throw null; + public int? GetPropertyIndexOrNull(string propertyName) => throw null; + public bool HasCascades { get => throw null; } + public bool HasCollections { get => throw null; } + public bool HasInsertGeneratedValues { get => throw null; } + public bool HasLazyProperties { get => throw null; } + public bool HasMutableProperties { get => throw null; } + public bool HasNaturalIdentifier { get => throw null; } + public bool HasNonIdentifierPropertyNamedId { get => throw null; } + public bool HasPocoRepresentation { get => throw null; set => throw null; } + public bool HasSubclasses { get => throw null; } + public bool HasUnwrapProxyForProperties { get => throw null; } + public bool HasUpdateGeneratedValues { get => throw null; } + public NHibernate.Tuple.IdentifierProperty IdentifierProperty { get => throw null; } + public bool IsAbstract { get => throw null; } + public bool IsDynamicInsert { get => throw null; } + public bool IsDynamicUpdate { get => throw null; } + public bool IsExplicitPolymorphism { get => throw null; } + public bool IsInherited { get => throw null; } + public bool IsLazy { get => throw null; set => throw null; } + public bool IsMutable { get => throw null; } + public bool IsPolymorphic { get => throw null; } + public bool IsSelectBeforeUpdate { get => throw null; } + public bool IsVersioned { get => throw null; } + public string Name { get => throw null; } + public int[] NaturalIdentifierProperties { get => throw null; } + public bool[] NonlazyPropertyUpdateability { get => throw null; } + public NHibernate.Engine.Versioning.OptimisticLock OptimisticLockMode { get => throw null; } + public NHibernate.Tuple.StandardProperty[] Properties { get => throw null; } + public bool[] PropertyCheckability { get => throw null; } + public NHibernate.Engine.ValueInclusion[] PropertyInsertGenerationInclusions { get => throw null; } + public bool[] PropertyInsertability { get => throw null; } + public bool[] PropertyLaziness { get => throw null; } + public string[] PropertyNames { get => throw null; } + public bool[] PropertyNullability { get => throw null; } + public int PropertySpan { get => throw null; } + public NHibernate.Type.IType[] PropertyTypes { get => throw null; } + public NHibernate.Engine.ValueInclusion[] PropertyUpdateGenerationInclusions { get => throw null; } + public bool[] PropertyUpdateability { get => throw null; } + public bool[] PropertyVersionability { get => throw null; } + public string RootName { get => throw null; } + public System.Type RootType { get => throw null; } + public string RootTypeAssemblyQualifiedName { get => throw null; } + public NHibernate.Engine.ISessionFactoryImplementor SessionFactory { get => throw null; } + public System.Collections.Generic.ISet SubclassEntityNames { get => throw null; } + public string Superclass { get => throw null; } + public System.Type SuperclassType { get => throw null; } + public override string ToString() => throw null; + public NHibernate.Tuple.Entity.IEntityTuplizer Tuplizer { get => throw null; } + public System.Type Type { get => throw null; } + public NHibernate.Tuple.VersionProperty VersionProperty { get => throw null; } + public int VersionPropertyIndex { get => throw null; } + } + + // Generated from `NHibernate.Tuple.Entity.EntityTuplizerExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EntityTuplizerExtensions + { + public static void AfterInitialize(this NHibernate.Tuple.Entity.IEntityTuplizer entityTuplizer, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Tuple.Entity.EntityTuplizerFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EntityTuplizerFactory + { + public NHibernate.Tuple.Entity.IEntityTuplizer BuildDefaultEntityTuplizer(NHibernate.EntityMode entityMode, NHibernate.Tuple.Entity.EntityMetamodel entityMetamodel, NHibernate.Mapping.PersistentClass persistentClass) => throw null; + public NHibernate.Tuple.Entity.IEntityTuplizer BuildEntityTuplizer(string className, NHibernate.Tuple.Entity.EntityMetamodel em, NHibernate.Mapping.PersistentClass pc) => throw null; + public EntityTuplizerFactory() => throw null; + } + + // Generated from `NHibernate.Tuple.Entity.IEntityTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEntityTuplizer : NHibernate.Tuple.ITuplizer + { + void AfterInitialize(object entity, bool lazyPropertiesAreUnfetched, NHibernate.Engine.ISessionImplementor session); + System.Type ConcreteProxyClass { get; } + object CreateProxy(object id, NHibernate.Engine.ISessionImplementor session); + object GetIdentifier(object entity); + object GetPropertyValue(object entity, string propertyName); + object[] GetPropertyValuesToInsert(object entity, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session); + object GetVersion(object entity); + bool HasProxy { get; } + bool HasUninitializedLazyProperties(object entity); + object Instantiate(object id); + bool IsInstrumented { get; } + bool IsLifecycleImplementor { get; } + bool IsValidatableImplementor { get; } + void ResetIdentifier(object entity, object currentId, object currentVersion); + void SetIdentifier(object entity, object id); + void SetPropertyValue(object entity, string propertyName, object value); + void SetPropertyValue(object entity, int i, object value); + } + + // Generated from `NHibernate.Tuple.Entity.PocoEntityInstantiator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PocoEntityInstantiator : NHibernate.Tuple.PocoInstantiator + { + protected override object CreateInstance() => throw null; + public override bool IsInstance(object obj) => throw null; + public PocoEntityInstantiator(NHibernate.Tuple.Entity.EntityMetamodel entityMetamodel, NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Bytecode.IInstantiationOptimizer optimizer, NHibernate.Proxy.IProxyFactory proxyFactory) => throw null; + } + + // Generated from `NHibernate.Tuple.Entity.PocoEntityTuplizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PocoEntityTuplizer : NHibernate.Tuple.Entity.AbstractEntityTuplizer + { + public override void AfterInitialize(object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + protected override NHibernate.Tuple.IInstantiator BuildInstantiator(NHibernate.Mapping.PersistentClass persistentClass) => throw null; + protected override NHibernate.Properties.IGetter BuildPropertyGetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity) => throw null; + protected override NHibernate.Properties.ISetter BuildPropertySetter(NHibernate.Mapping.Property mappedProperty, NHibernate.Mapping.PersistentClass mappedEntity) => throw null; + protected override NHibernate.Proxy.IProxyFactory BuildProxyFactory(NHibernate.Mapping.PersistentClass persistentClass, NHibernate.Properties.IGetter idGetter, NHibernate.Properties.ISetter idSetter) => throw null; + protected virtual NHibernate.Proxy.IProxyFactory BuildProxyFactoryInternal(NHibernate.Mapping.PersistentClass @class, NHibernate.Properties.IGetter getter, NHibernate.Properties.ISetter setter) => throw null; + protected void ClearOptimizerWhenUsingCustomAccessors() => throw null; + public override System.Type ConcreteProxyClass { get => throw null; } + public override NHibernate.EntityMode EntityMode { get => throw null; } + protected override object GetIdentifierPropertyValue(object entity) => throw null; + public override object GetPropertyValue(object entity, int i) => throw null; + public override object[] GetPropertyValues(object entity) => throw null; + public override object[] GetPropertyValuesToInsert(object entity, System.Collections.IDictionary mergeMap, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool HasUninitializedLazyProperties(object entity) => throw null; + public override bool IsInstrumented { get => throw null; } + public override bool IsLifecycleImplementor { get => throw null; } + public override bool IsValidatableImplementor { get => throw null; } + public override System.Type MappedClass { get => throw null; } + public PocoEntityTuplizer(NHibernate.Tuple.Entity.EntityMetamodel entityMetamodel, NHibernate.Mapping.PersistentClass mappedEntity) : base(default(NHibernate.Tuple.Entity.EntityMetamodel), default(NHibernate.Mapping.PersistentClass)) => throw null; + protected override void SetIdentifierPropertyValue(object entity, object value) => throw null; + public override void SetPropertyValue(object entity, int i, object value) => throw null; + public override void SetPropertyValues(object entity, object[] values) => throw null; + protected void SetReflectionOptimizer() => throw null; + } + + } + } + namespace Type + { + // Generated from `NHibernate.Type.AbstractBinaryType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractBinaryType : NHibernate.Type.MutableType, System.Collections.IComparer, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + internal AbstractBinaryType(NHibernate.SqlTypes.BinarySqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal AbstractBinaryType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public System.Collections.IComparer Comparator { get => throw null; } + public override int Compare(object x, object y) => throw null; + public override object DeepCopyNotNull(object value) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override int GetHashCode(object x) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public abstract override string Name { get; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal abstract object ToExternalFormat(System.Byte[] bytes); + protected internal abstract System.Byte[] ToInternalFormat(object bytes); + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.AbstractCharType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractCharType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public AbstractCharType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.AbstractDateTimeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractDateTimeType : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.ICacheAssembler + { + protected AbstractDateTimeType(NHibernate.SqlTypes.SqlType sqlTypeDateTime) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + protected AbstractDateTimeType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + protected virtual System.DateTime AdjustDateTime(System.DateTime dateValue) => throw null; + public virtual System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.DateTime GetDateTime(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsEqual(object x, object y) => throw null; + protected virtual System.DateTimeKind Kind { get => throw null; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual System.DateTime Now { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public static System.DateTime Round(System.DateTime value, System.Int64 resolution) => throw null; + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.AbstractEnumType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractEnumType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + protected AbstractEnumType(NHibernate.SqlTypes.SqlType sqlType, System.Type enumType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.AbstractStringType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractStringType : NHibernate.Type.ImmutableType, NHibernate.UserTypes.IParameterizedType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public AbstractStringType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + protected System.StringComparer Comparer { get => throw null; set => throw null; } + public const string ComparerCultureParameterName = default; + public static System.StringComparer DefaultComparer { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override int GetHashCode(object x) => throw null; + public override int GetHashCode() => throw null; + public const string IgnoreCaseParameterName = default; + public override bool IsEqual(object x, object y) => throw null; + public string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public void SetParameterValues(System.Collections.Generic.IDictionary parameters) => throw null; + public object StringToObject(string xml) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.AbstractType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class AbstractType : NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + protected AbstractType() => throw null; + public virtual object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public virtual System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task BeforeAssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual int Compare(object x, object y) => throw null; + public abstract object DeepCopy(object val, NHibernate.Engine.ISessionFactoryImplementor factory); + public virtual object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public virtual System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public abstract int GetColumnSpan(NHibernate.Engine.IMapping mapping); + public virtual int GetHashCode(object x, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual int GetHashCode(object x) => throw null; + public override int GetHashCode() => throw null; + public virtual NHibernate.Type.IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public virtual System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual bool IsAnyType { get => throw null; } + public virtual bool IsAssociationType { get => throw null; } + public virtual bool IsCollectionType { get => throw null; } + public virtual bool IsComponentType { get => throw null; } + public virtual bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public abstract bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session); + public virtual System.Threading.Tasks.Task IsDirtyAsync(object old, object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public virtual bool IsEntityType { get => throw null; } + public virtual bool IsEqual(object x, object y, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual bool IsEqual(object x, object y) => throw null; + public virtual bool IsModified(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task IsModifiedAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract bool IsMutable { get; } + public virtual bool IsSame(object x, object y) => throw null; + public abstract string Name { get; } + public abstract object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + public abstract object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner); + public abstract System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + public abstract void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session); + public abstract void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session); + public abstract System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + public virtual object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection) => throw null; + public abstract object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready); + public virtual System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken); + public virtual object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public virtual System.Threading.Tasks.Task ResolveIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract System.Type ReturnedClass { get; } + public virtual object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public virtual System.Threading.Tasks.Task SemiResolveAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public abstract NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping); + public abstract bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping); + public abstract string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.Type.AnsiCharType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiCharType : NHibernate.Type.AbstractCharType + { + internal AnsiCharType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.AnsiStringType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnsiStringType : NHibernate.Type.AbstractStringType + { + internal AnsiStringType(NHibernate.SqlTypes.AnsiStringSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal AnsiStringType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.AnyType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AnyType : NHibernate.Type.AbstractType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAssociationType, NHibernate.Type.IAbstractComponentType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Compare(object x, object y) => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get => throw null; } + public string GetAssociatedEntityName(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Persister.Entity.IJoinable GetAssociatedJoinable(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Engine.CascadeStyle GetCascadeStyle(int i) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping session) => throw null; + public NHibernate.FetchMode GetFetchMode(int i) => throw null; + public override int GetHashCode() => throw null; + public string GetOnCondition(string alias, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public object GetPropertyValue(object component, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetPropertyValueAsync(object component, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetPropertyValues(object component, NHibernate.Engine.ISessionImplementor session) => throw null; + public object[] GetPropertyValues(object component) => throw null; + public System.Threading.Tasks.Task GetPropertyValuesAsync(object component, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string[] GetReferencedColumns(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsAlwaysDirtyChecked { get => throw null; } + public override bool IsAnyType { get => throw null; } + public override bool IsAssociationType { get => throw null; } + public override bool IsComponentType { get => throw null; } + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsEmbedded { get => throw null; } + public virtual bool IsMethodOf(System.Reflection.MethodBase method) => throw null; + public override bool IsModified(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsModifiedAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsMutable { get => throw null; } + public override bool IsSame(object x, object y) => throw null; + public string LHSPropertyName { get => throw null; } + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + // Generated from `NHibernate.Type.AnyType+ObjectTypeCacheEntry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ObjectTypeCacheEntry + { + public string EntityName { get => throw null; set => throw null; } + public object Id { get => throw null; set => throw null; } + public ObjectTypeCacheEntry() => throw null; + } + + + public string[] PropertyNames { get => throw null; } + public bool[] PropertyNullability { get => throw null; } + public string RHSUniqueKeyPropertyName { get => throw null; } + public bool ReferenceToPrimaryKey { get => throw null; } + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task ResolveIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task SemiResolveAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public void SetPropertyValues(object component, object[] values) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public NHibernate.Type.IType[] Subtypes { get => throw null; } + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public bool UseLHSPrimaryKey { get => throw null; } + } + + // Generated from `NHibernate.Type.ArrayType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ArrayType : NHibernate.Type.CollectionType + { + public ArrayType(string role, string propertyRef, System.Type elementClass) : base(default(string), default(string)) => throw null; + public override System.Collections.IEnumerable GetElementsIterator(object collection) => throw null; + public override bool HasHolder() => throw null; + public override object IndexOf(object collection, object element) => throw null; + protected internal override bool InitializeImmediately() => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override object InstantiateResult(object original) => throw null; + public override bool IsArrayType { get => throw null; } + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object ReplaceElements(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ReplaceElementsAsync(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object array) => throw null; + } + + // Generated from `NHibernate.Type.BinaryBlobType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinaryBlobType : NHibernate.Type.BinaryType + { + public BinaryBlobType() => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.BinaryType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BinaryType : NHibernate.Type.AbstractBinaryType + { + internal BinaryType() => throw null; + public override int Compare(object x, object y) => throw null; + public override string Name { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + protected internal override object ToExternalFormat(System.Byte[] bytes) => throw null; + protected internal override System.Byte[] ToInternalFormat(object bytes) => throw null; + } + + // Generated from `NHibernate.Type.BooleanType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class BooleanType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public BooleanType(NHibernate.SqlTypes.AnsiStringFixedLengthSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public BooleanType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.ByteType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ByteType : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public ByteType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.CharBooleanType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CharBooleanType : NHibernate.Type.BooleanType + { + protected CharBooleanType(NHibernate.SqlTypes.AnsiStringFixedLengthSqlType sqlType) => throw null; + protected abstract string FalseString { get; } + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object StringToObject(string xml) => throw null; + protected abstract string TrueString { get; } + } + + // Generated from `NHibernate.Type.CharType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CharType : NHibernate.Type.AbstractCharType + { + internal CharType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.ClassMetaType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ClassMetaType : NHibernate.Type.AbstractType + { + public ClassMetaType() => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsMutable { get => throw null; } + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Type.CollectionType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class CollectionType : NHibernate.Type.AbstractType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAssociationType + { + protected virtual void Add(object collection, object element) => throw null; + protected virtual bool AreCollectionElementsEqual(System.Collections.IEnumerable original, System.Collections.IEnumerable target) => throw null; + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void BeforeAssemble(object oid, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task BeforeAssembleAsync(object oid, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual void Clear(object collection) => throw null; + protected CollectionType(string role, string foreignKeyPropertyName) => throw null; + public override int Compare(object x, object y) => throw null; + public virtual bool Contains(object collection, object childObject, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get => throw null; } + public string GetAssociatedEntityName(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.Persister.Entity.IJoinable GetAssociatedJoinable(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public object GetCollection(object key, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public System.Threading.Tasks.Task GetCollectionAsync(object key, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping session) => throw null; + public NHibernate.Type.IType GetElementType(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual System.Collections.IEnumerable GetElementsIterator(object collection, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Collections.IEnumerable GetElementsIterator(object collection) => throw null; + public override int GetHashCode(object x) => throw null; + public virtual object GetIdOfOwnerOrNull(object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public object GetKeyOfOwner(object owner, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task GetKeyOfOwnerAsync(object owner, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string GetOnCondition(string alias, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public string[] GetReferencedColumns(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual bool HasHolder() => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object IndexOf(object collection, object element) => throw null; + protected internal virtual bool InitializeImmediately() => throw null; + public abstract object Instantiate(int anticipatedSize); + public abstract NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key); + public virtual object InstantiateResult(object original) => throw null; + public bool IsAlwaysDirtyChecked { get => throw null; } + public virtual bool IsArrayType { get => throw null; } + public override bool IsAssociationType { get => throw null; } + public override bool IsCollectionType { get => throw null; } + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsModifiedAsync(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsMutable { get => throw null; } + public string LHSPropertyName { get => throw null; } + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string RHSUniqueKeyPropertyName { get => throw null; } + protected internal virtual string RenderLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object ReplaceElements(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task ReplaceElementsAsync(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object ResolveIdentifier(object key, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task ResolveIdentifierAsync(object key, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string Role { get => throw null; } + public override object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task SemiResolveAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString() => throw null; + public static object UnfetchedCollection; + public bool UseLHSPrimaryKey { get => throw null; } + public abstract NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection); + } + + // Generated from `NHibernate.Type.ComponentType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ComponentType : NHibernate.Type.AbstractType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAbstractComponentType + { + public override object Assemble(object obj, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object obj, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override int Compare(object x, object y) => throw null; + public NHibernate.Tuple.Component.IComponentTuplizer ComponentTuplizer { get => throw null; } + public ComponentType(NHibernate.Tuple.Component.ComponentMetamodel metamodel) => throw null; + public override object DeepCopy(object component, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public NHibernate.EntityMode EntityMode { get => throw null; } + public NHibernate.Engine.CascadeStyle GetCascadeStyle(int i) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public NHibernate.FetchMode GetFetchMode(int i) => throw null; + public override int GetHashCode(object x, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override int GetHashCode(object x) => throw null; + public int GetPropertyIndex(string name) => throw null; + public object GetPropertyValue(object component, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + public object GetPropertyValue(object component, int i) => throw null; + public System.Threading.Tasks.Task GetPropertyValueAsync(object component, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public object[] GetPropertyValues(object component, NHibernate.Engine.ISessionImplementor session) => throw null; + public object[] GetPropertyValues(object component) => throw null; + public System.Threading.Tasks.Task GetPropertyValuesAsync(object component, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object Instantiate(object parent, NHibernate.Engine.ISessionImplementor session) => throw null; + public object Instantiate() => throw null; + public override bool IsCollectionType { get => throw null; } + public override bool IsComponentType { get => throw null; } + public override bool IsDirty(object x, object y, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsDirty(object x, object y, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object x, object y, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object x, object y, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual bool IsEmbedded { get => throw null; } + public override bool IsEntityType { get => throw null; } + public override bool IsEqual(object x, object y, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public virtual bool IsMethodOf(System.Reflection.MethodBase method) => throw null; + public override bool IsModified(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsModifiedAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsMutable { get => throw null; } + public override bool IsSame(object x, object y) => throw null; + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int begin, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int begin, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int begin, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int begin, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string[] PropertyNames { get => throw null; } + public bool[] PropertyNullability { get => throw null; } + public override object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection) => throw null; + public override object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task ResolveIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task SemiResolveAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual void SetPropertyValues(object component, object[] values) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public NHibernate.Type.IType[] Subtypes { get => throw null; } + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Type.CompositeCustomType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CompositeCustomType : NHibernate.Type.AbstractType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAbstractComponentType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public CompositeCustomType(System.Type userTypeClass, System.Collections.Generic.IDictionary parameters) => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public virtual NHibernate.Engine.CascadeStyle GetCascadeStyle(int i) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public virtual NHibernate.FetchMode GetFetchMode(int i) => throw null; + public override int GetHashCode() => throw null; + public virtual object GetPropertyValue(object component, int i, NHibernate.Engine.ISessionImplementor session) => throw null; + public object GetPropertyValue(object component, int i) => throw null; + public virtual System.Threading.Tasks.Task GetPropertyValueAsync(object component, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object[] GetPropertyValues(object component, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object[] GetPropertyValues(object component) => throw null; + public virtual System.Threading.Tasks.Task GetPropertyValuesAsync(object component, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsComponentType { get => throw null; } + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public bool IsEmbedded { get => throw null; } + public override bool IsEqual(object x, object y) => throw null; + public virtual bool IsMethodOf(System.Reflection.MethodBase method) => throw null; + public override bool IsMutable { get => throw null; } + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string[] PropertyNames { get => throw null; } + public bool[] PropertyNullability { get => throw null; } + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public virtual void SetPropertyValues(object component, object[] values) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public virtual NHibernate.Type.IType[] Subtypes { get => throw null; } + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.UserTypes.ICompositeUserType UserType { get => throw null; } + } + + // Generated from `NHibernate.Type.CultureInfoType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CultureInfoType : NHibernate.Type.ImmutableType, NHibernate.Type.ILiteralType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + internal CultureInfoType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + } + + // Generated from `NHibernate.Type.CurrencyType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CurrencyType : NHibernate.Type.DecimalType + { + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.CustomCollectionType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CustomCollectionType : NHibernate.Type.CollectionType + { + public override bool Contains(object collection, object entity, NHibernate.Engine.ISessionImplementor session) => throw null; + public CustomCollectionType(System.Type userTypeClass, string role, string foreignKeyPropertyName) : base(default(string), default(string)) => throw null; + public override System.Collections.IEnumerable GetElementsIterator(object collection) => throw null; + public override object IndexOf(object collection, object entity) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override object ReplaceElements(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ReplaceElementsAsync(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public NHibernate.UserTypes.IUserCollectionType UserType { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.CustomType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class CustomType : NHibernate.Type.AbstractType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Collections.IComparer Comparator { get => throw null; } + public CustomType(System.Type userTypeClass, System.Collections.Generic.IDictionary parameters) => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public object FromStringValue(string xml) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping session) => throw null; + public override int GetHashCode(object x) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override bool IsMutable { get => throw null; } + public override string Name { get => throw null; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public object StringToObject(string xml) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public NHibernate.UserTypes.IUserType UserType { get => throw null; } + } + + // Generated from `NHibernate.Type.DateTime2Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTime2Type : NHibernate.Type.AbstractDateTimeType + { + public DateTime2Type(NHibernate.SqlTypes.DateTime2SqlType sqlType) => throw null; + public DateTime2Type() => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.DateTimeNoMsType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeNoMsType : NHibernate.Type.AbstractDateTimeType + { + protected override System.DateTime AdjustDateTime(System.DateTime dateValue) => throw null; + public DateTimeNoMsType() => throw null; + public override int GetHashCode(object x) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Type.DateTimeOffsetType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeOffsetType : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public DateTimeOffsetType(NHibernate.SqlTypes.DateTimeOffsetSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public DateTimeOffsetType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public static System.DateTimeOffset Round(System.DateTimeOffset value, System.Int64 resolution) => throw null; + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.DateTimeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateTimeType : NHibernate.Type.AbstractDateTimeType + { + public DateTimeType(NHibernate.SqlTypes.DateTimeSqlType sqlType) => throw null; + public DateTimeType() => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.DateType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DateType : NHibernate.Type.AbstractDateTimeType, NHibernate.UserTypes.IParameterizedType + { + protected override System.DateTime AdjustDateTime(System.DateTime dateValue) => throw null; + public static System.DateTime BaseDateValue; + public const string BaseValueParameterName = default; + public DateType() => throw null; + public override object DefaultValue { get => throw null; } + public override int GetHashCode(object x) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public void SetParameterValues(System.Collections.Generic.IDictionary parameters) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.DbTimestampType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DbTimestampType : NHibernate.Type.AbstractDateTimeType + { + public DbTimestampType() => throw null; + protected virtual System.DateTime GetCurrentTimestamp(NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task GetCurrentTimestampAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual string GetCurrentTimestampSelectString(NHibernate.Dialect.Dialect dialect) => throw null; + public override string Name { get => throw null; } + public override object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected virtual bool SupportsCurrentTimestampSelection(NHibernate.Dialect.Dialect dialect) => throw null; + protected virtual System.DateTime UsePreparedStatement(string timestampSelectString, NHibernate.Engine.ISessionImplementor session) => throw null; + protected virtual System.Threading.Tasks.Task UsePreparedStatementAsync(string timestampSelectString, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Type.DecimalType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DecimalType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.IIdentifierType, NHibernate.Type.ICacheAssembler + { + public DecimalType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public DecimalType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.DefaultCollectionTypeFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DefaultCollectionTypeFactory : NHibernate.Bytecode.ICollectionTypeFactory + { + public virtual NHibernate.Type.CollectionType Array(string role, string propertyRef, System.Type elementClass) => throw null; + public virtual NHibernate.Type.CollectionType Bag(string role, string propertyRef) => throw null; + public DefaultCollectionTypeFactory() => throw null; + public virtual NHibernate.Type.CollectionType IdBag(string role, string propertyRef) => throw null; + public virtual NHibernate.Type.CollectionType List(string role, string propertyRef) => throw null; + public virtual NHibernate.Type.CollectionType Map(string role, string propertyRef) => throw null; + public virtual NHibernate.Type.CollectionType OrderedSet(string role, string propertyRef) => throw null; + public virtual NHibernate.Type.CollectionType Set(string role, string propertyRef) => throw null; + public virtual NHibernate.Type.CollectionType SortedDictionary(string role, string propertyRef, System.Collections.Generic.IComparer comparer) => throw null; + public virtual NHibernate.Type.CollectionType SortedList(string role, string propertyRef, System.Collections.Generic.IComparer comparer) => throw null; + public virtual NHibernate.Type.CollectionType SortedSet(string role, string propertyRef, System.Collections.Generic.IComparer comparer) => throw null; + } + + // Generated from `NHibernate.Type.DoubleType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DoubleType : NHibernate.Type.PrimitiveType + { + public override object DefaultValue { get => throw null; } + public DoubleType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public DoubleType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + } + + // Generated from `NHibernate.Type.EmbeddedComponentType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmbeddedComponentType : NHibernate.Type.ComponentType + { + public EmbeddedComponentType(NHibernate.Tuple.Component.ComponentMetamodel metamodel) : base(default(NHibernate.Tuple.Component.ComponentMetamodel)) => throw null; + public override object Instantiate(object parent, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsEmbedded { get => throw null; } + } + + // Generated from `NHibernate.Type.EntityType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class EntityType : NHibernate.Type.AbstractType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAssociationType + { + public override int Compare(object x, object y) => throw null; + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected internal EntityType(string entityName, string uniqueKeyPropertyName, bool eager, bool unwrapProxy) => throw null; + public abstract NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get; } + public virtual string GetAssociatedEntityName(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public string GetAssociatedEntityName() => throw null; + public NHibernate.Persister.Entity.IJoinable GetAssociatedJoinable(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override int GetHashCode(object x, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected internal object GetIdentifier(object value, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal System.Threading.Tasks.Task GetIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public string GetIdentifierOrUniqueKeyPropertyName(NHibernate.Engine.IMapping factory) => throw null; + public NHibernate.Type.IType GetIdentifierOrUniqueKeyType(NHibernate.Engine.IMapping factory) => throw null; + public string GetOnCondition(string alias, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public virtual int GetOwnerColumnSpan(NHibernate.Engine.IMapping session) => throw null; + protected internal object GetReferenceValue(object value, NHibernate.Engine.ISessionImplementor session) => throw null; + protected internal System.Threading.Tasks.Task GetReferenceValueAsync(object value, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Type.IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public abstract override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + public abstract override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + public abstract bool IsAlwaysDirtyChecked { get; } + public override bool IsAssociationType { get => throw null; } + public override bool IsEntityType { get => throw null; } + public override bool IsEqual(object x, object y, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual bool IsLogicalOneToOne() => throw null; + public override bool IsMutable { get => throw null; } + public virtual bool IsNull(object owner, NHibernate.Engine.ISessionImplementor session) => throw null; + public abstract bool IsNullable { get; } + public abstract bool IsOneToOne { get; } + public bool IsReferenceToPrimaryKey { get => throw null; } + public override bool IsSame(object x, object y) => throw null; + public bool IsUniqueKeyReference { get => throw null; } + public string LHSPropertyName { get => throw null; } + public object LoadByUniqueKey(string entityName, string uniqueKeyPropertyName, object key, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task LoadByUniqueKeyAsync(string entityName, string uniqueKeyPropertyName, object key, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual string PropertyName { get => throw null; } + public string RHSUniqueKeyPropertyName { get => throw null; } + public override object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, System.Threading.CancellationToken cancellationToken) => throw null; + public override object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + protected object ResolveIdentifier(object id, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ResolveIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + protected System.Threading.Tasks.Task ResolveIdentifierAsync(object id, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString() => throw null; + public abstract bool UseLHSPrimaryKey { get; } + protected string uniqueKeyPropertyName; + } + + // Generated from `NHibernate.Type.EnumCharType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnumCharType : NHibernate.Type.AbstractEnumType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public EnumCharType() : base(default(NHibernate.SqlTypes.SqlType), default(System.Type)) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object GetInstance(object code) => throw null; + public virtual object GetValue(object instance) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + } + + // Generated from `NHibernate.Type.EnumStringType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class EnumStringType : NHibernate.Type.AbstractEnumType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + protected EnumStringType(System.Type enumClass, int length) : base(default(NHibernate.SqlTypes.SqlType), default(System.Type)) => throw null; + protected EnumStringType(System.Type enumClass) : base(default(NHibernate.SqlTypes.SqlType), default(System.Type)) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object GetInstance(object code) => throw null; + public virtual object GetValue(object code) => throw null; + public const int MaxLengthForEnumString = default; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + } + + // Generated from `NHibernate.Type.EnumStringType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnumStringType : NHibernate.Type.EnumStringType + { + public EnumStringType() : base(default(System.Type)) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.EnumType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnumType : NHibernate.Type.PersistentEnumType + { + public EnumType() : base(default(System.Type)) => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.ForeignKeyDirection` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ForeignKeyDirection + { + public abstract bool CascadeNow(NHibernate.Engine.CascadePoint cascadePoint); + protected ForeignKeyDirection() => throw null; + public static NHibernate.Type.ForeignKeyDirection ForeignKeyFromParent; + public static NHibernate.Type.ForeignKeyDirection ForeignKeyToParent; + } + + // Generated from `NHibernate.Type.GenericBagType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericBagType : NHibernate.Type.CollectionType + { + protected override void Add(object collection, object element) => throw null; + protected override bool AreCollectionElementsEqual(System.Collections.IEnumerable original, System.Collections.IEnumerable target) => throw null; + protected override void Clear(object collection) => throw null; + public GenericBagType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.GenericIdentifierBagType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericIdentifierBagType : NHibernate.Type.CollectionType + { + protected override void Add(object collection, object element) => throw null; + protected override bool AreCollectionElementsEqual(System.Collections.IEnumerable original, System.Collections.IEnumerable target) => throw null; + protected override void Clear(object collection) => throw null; + public GenericIdentifierBagType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override object ReplaceElements(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ReplaceElementsAsync(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.GenericListType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericListType : NHibernate.Type.CollectionType + { + protected override void Add(object collection, object element) => throw null; + protected override void Clear(object collection) => throw null; + public GenericListType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override object IndexOf(object collection, object element) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.GenericMapType<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericMapType : NHibernate.Type.CollectionType + { + protected override void Add(object collection, object element) => throw null; + protected override bool AreCollectionElementsEqual(System.Collections.IEnumerable original, System.Collections.IEnumerable target) => throw null; + protected override void Clear(object collection) => throw null; + public GenericMapType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override System.Collections.IEnumerable GetElementsIterator(object collection) => throw null; + public override object IndexOf(object collection, object element) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override object ReplaceElements(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task ReplaceElementsAsync(object original, object target, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.GenericOrderedSetType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericOrderedSetType : NHibernate.Type.GenericSetType + { + public GenericOrderedSetType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + } + + // Generated from `NHibernate.Type.GenericSetType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericSetType : NHibernate.Type.CollectionType + { + protected override void Add(object collection, object element) => throw null; + protected override bool AreCollectionElementsEqual(System.Collections.IEnumerable original, System.Collections.IEnumerable target) => throw null; + protected override void Clear(object collection) => throw null; + public GenericSetType(string role, string propertyRef) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + public override NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister, object key) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection) => throw null; + } + + // Generated from `NHibernate.Type.GenericSortedDictionaryType<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericSortedDictionaryType : NHibernate.Type.GenericMapType + { + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public GenericSortedDictionaryType(string role, string propertyRef, System.Collections.Generic.IComparer comparer) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + } + + // Generated from `NHibernate.Type.GenericSortedListType<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericSortedListType : NHibernate.Type.GenericMapType + { + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public GenericSortedListType(string role, string propertyRef, System.Collections.Generic.IComparer comparer) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + } + + // Generated from `NHibernate.Type.GenericSortedSetType<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GenericSortedSetType : NHibernate.Type.GenericSetType + { + public System.Collections.Generic.IComparer Comparer { get => throw null; } + public GenericSortedSetType(string role, string propertyRef, System.Collections.Generic.IComparer comparer) : base(default(string), default(string)) => throw null; + public override object Instantiate(int anticipatedSize) => throw null; + } + + // Generated from `NHibernate.Type.GuidType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class GuidType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public GuidType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.IAbstractComponentType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAbstractComponentType : NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + NHibernate.Engine.CascadeStyle GetCascadeStyle(int i); + NHibernate.FetchMode GetFetchMode(int i); + object GetPropertyValue(object component, int i, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task GetPropertyValueAsync(object component, int i, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object[] GetPropertyValues(object component, NHibernate.Engine.ISessionImplementor session); + object[] GetPropertyValues(object component); + System.Threading.Tasks.Task GetPropertyValuesAsync(object component, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool IsEmbedded { get; } + bool IsMethodOf(System.Reflection.MethodBase method); + string[] PropertyNames { get; } + bool[] PropertyNullability { get; } + void SetPropertyValues(object component, object[] values); + NHibernate.Type.IType[] Subtypes { get; } + } + + // Generated from `NHibernate.Type.IAssociationType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IAssociationType : NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get; } + string GetAssociatedEntityName(NHibernate.Engine.ISessionFactoryImplementor factory); + NHibernate.Persister.Entity.IJoinable GetAssociatedJoinable(NHibernate.Engine.ISessionFactoryImplementor factory); + string GetOnCondition(string alias, NHibernate.Engine.ISessionFactoryImplementor factory, System.Collections.Generic.IDictionary enabledFilters); + bool IsAlwaysDirtyChecked { get; } + string LHSPropertyName { get; } + string RHSUniqueKeyPropertyName { get; } + bool UseLHSPrimaryKey { get; } + } + + // Generated from `NHibernate.Type.ICacheAssembler` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICacheAssembler + { + object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + void BeforeAssemble(object cached, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task BeforeAssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Type.IDiscriminatorType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IDiscriminatorType : NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.ICacheAssembler + { + } + + // Generated from `NHibernate.Type.IIdentifierType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IIdentifierType : NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + object StringToObject(string xml); + } + + // Generated from `NHibernate.Type.ILiteralType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILiteralType + { + string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect); + } + + // Generated from `NHibernate.Type.IType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IType : NHibernate.Type.ICacheAssembler + { + int Compare(object x, object y); + object DeepCopy(object val, NHibernate.Engine.ISessionFactoryImplementor factory); + int GetColumnSpan(NHibernate.Engine.IMapping mapping); + int GetHashCode(object x, NHibernate.Engine.ISessionFactoryImplementor factory); + int GetHashCode(object x); + NHibernate.Type.IType GetSemiResolvedType(NHibernate.Engine.ISessionFactoryImplementor factory); + object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + bool IsAnyType { get; } + bool IsAssociationType { get; } + bool IsCollectionType { get; } + bool IsComponentType { get; } + bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session); + bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task IsDirtyAsync(object old, object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool IsEntityType { get; } + bool IsEqual(object x, object y, NHibernate.Engine.ISessionFactoryImplementor factory); + bool IsEqual(object x, object y); + bool IsModified(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task IsModifiedAsync(object oldHydratedState, object currentState, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + bool IsMutable { get; } + bool IsSame(object x, object y); + string Name { get; } + object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session); + void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection); + object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready); + System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken); + System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken); + object ResolveIdentifier(object value, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task ResolveIdentifierAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + System.Type ReturnedClass { get; } + object SemiResolve(object value, NHibernate.Engine.ISessionImplementor session, object owner); + System.Threading.Tasks.Task SemiResolveAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken); + NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping); + bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping); + string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.Type.IVersionType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IVersionType : NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + System.Collections.IComparer Comparator { get; } + object FromStringValue(string xml); + object Next(object current, NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + object Seed(NHibernate.Engine.ISessionImplementor session); + System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken); + } + + // Generated from `NHibernate.Type.ImmutableType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class ImmutableType : NHibernate.Type.NullableType + { + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + protected ImmutableType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override bool IsMutable { get => throw null; } + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Type.Int16Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Int16Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public Int16Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.Int32Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Int32Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public Int32Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.Int64Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class Int64Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public Int64Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.LocalDateTimeNoMsType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LocalDateTimeNoMsType : NHibernate.Type.DateTimeNoMsType + { + protected override System.DateTimeKind Kind { get => throw null; } + public LocalDateTimeNoMsType() => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.LocalDateTimeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LocalDateTimeType : NHibernate.Type.DateTimeType + { + protected override System.DateTimeKind Kind { get => throw null; } + public LocalDateTimeType(NHibernate.SqlTypes.DateTimeSqlType sqlType) => throw null; + public LocalDateTimeType() => throw null; + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.LocalDateType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LocalDateType : NHibernate.Type.DateType + { + protected override System.DateTimeKind Kind { get => throw null; } + public LocalDateType() => throw null; + } + + // Generated from `NHibernate.Type.ManyToOneType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ManyToOneType : NHibernate.Type.EntityType + { + public override object Assemble(object oid, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object oid, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void BeforeAssemble(object oid, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task BeforeAssembleAsync(object oid, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get => throw null; } + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsAlwaysDirtyChecked { get => throw null; } + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsLogicalOneToOne() => throw null; + public override bool IsModified(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsModifiedAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsNull(object owner, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsNullable { get => throw null; } + public override bool IsOneToOne { get => throw null; } + public ManyToOneType(string entityName, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, bool ignoreNotFound, bool isLogicalOneToOne, string propertyName) : base(default(string), default(string), default(bool), default(bool)) => throw null; + public ManyToOneType(string entityName, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, bool ignoreNotFound, bool isLogicalOneToOne) : base(default(string), default(string), default(bool), default(bool)) => throw null; + public ManyToOneType(string className, bool lazy) : base(default(string), default(string), default(bool), default(bool)) => throw null; + public ManyToOneType(string className) : base(default(string), default(string), default(bool), default(bool)) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string PropertyName { get => throw null; } + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override bool UseLHSPrimaryKey { get => throw null; } + } + + // Generated from `NHibernate.Type.MetaType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class MetaType : NHibernate.Type.AbstractType + { + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsMutable { get => throw null; } + public MetaType(System.Collections.Generic.IDictionary values, NHibernate.Type.IType baseType) => throw null; + public override string Name { get => throw null; } + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Replace(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object current, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + } + + // Generated from `NHibernate.Type.MutableType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class MutableType : NHibernate.Type.NullableType + { + public override object DeepCopy(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public abstract object DeepCopyNotNull(object value); + public override bool IsMutable { get => throw null; } + protected MutableType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public override System.Threading.Tasks.Task ReplaceAsync(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Type.NullableType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class NullableType : NHibernate.Type.AbstractType + { + public override bool Equals(object obj) => throw null; + public virtual object FromStringValue(string xml) => throw null; + public abstract object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session); + public abstract object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session); + public override int GetColumnSpan(NHibernate.Engine.IMapping session) => throw null; + public override int GetHashCode() => throw null; + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public virtual object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override object NullSafeGet(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeGetAsync(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + protected NullableType(NHibernate.SqlTypes.SqlType sqlType) => throw null; + public abstract void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session); + public virtual NHibernate.SqlTypes.SqlType SqlType { get => throw null; } + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public virtual string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.OneToOneType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class OneToOneType : NHibernate.Type.EntityType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler, NHibernate.Type.IAssociationType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override NHibernate.Type.ForeignKeyDirection ForeignKeyDirection { get => throw null; } + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override int GetOwnerColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsAlwaysDirtyChecked { get => throw null; } + public override bool IsDirty(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsDirty(object old, object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task IsDirtyAsync(object old, object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsModified(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task IsModifiedAsync(object old, object current, bool[] checkable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool IsNull(object owner, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsNullable { get => throw null; } + public override bool IsOneToOne { get => throw null; } + public override void NullSafeSet(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session) => throw null; + public override void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand st, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override System.Threading.Tasks.Task NullSafeSetAsync(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public OneToOneType(string referencedEntityName, NHibernate.Type.ForeignKeyDirection foreignKeyType, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, string entityName, string propertyName) : base(default(string), default(string), default(bool), default(bool)) => throw null; + public override string PropertyName { get => throw null; } + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool[] ToColumnNullness(object value, NHibernate.Engine.IMapping mapping) => throw null; + public override bool UseLHSPrimaryKey { get => throw null; } + } + + // Generated from `NHibernate.Type.PersistentEnumType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class PersistentEnumType : NHibernate.Type.AbstractEnumType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Equals(object obj) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public static NHibernate.Type.PersistentEnumType.IEnumConverter GetEnumCoverter(System.Type enumClass) => throw null; + public override int GetHashCode() => throw null; + public virtual object GetInstance(object code) => throw null; + public virtual object GetValue(object code) => throw null; + // Generated from `NHibernate.Type.PersistentEnumType+IEnumConverter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEnumConverter + { + NHibernate.SqlTypes.SqlType SqlType { get; } + object ToEnumValue(object value); + object ToObject(System.Type enumClass, object code); + } + + + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public PersistentEnumType(System.Type enumClass) : base(default(NHibernate.SqlTypes.SqlType), default(System.Type)) => throw null; + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + } + + // Generated from `NHibernate.Type.PrimitiveType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public abstract class PrimitiveType : NHibernate.Type.ImmutableType, NHibernate.Type.ILiteralType + { + public abstract object DefaultValue { get; } + public abstract string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect); + public abstract System.Type PrimitiveClass { get; } + protected PrimitiveType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.SByteType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SByteType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public SByteType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.SerializableType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SerializableType : NHibernate.Type.MutableType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object DeepCopyNotNull(object value) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public object FromBytes(System.Byte[] bytes) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override int GetHashCode(object x) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + internal SerializableType(System.Type serializableClass, NHibernate.SqlTypes.BinarySqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal SerializableType(System.Type serializableClass) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal SerializableType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + } + + // Generated from `NHibernate.Type.SerializationException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SerializationException : NHibernate.HibernateException + { + public SerializationException(string message, System.Exception e) => throw null; + public SerializationException(string message) => throw null; + public SerializationException() => throw null; + protected SerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Type.SingleType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SingleType : NHibernate.Type.PrimitiveType + { + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public SingleType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public SingleType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public object StringToObject(string xml) => throw null; + } + + // Generated from `NHibernate.Type.SpecialOneToOneType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SpecialOneToOneType : NHibernate.Type.OneToOneType + { + public override int GetColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override int GetOwnerColumnSpan(NHibernate.Engine.IMapping mapping) => throw null; + public override object Hydrate(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task HydrateAsync(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public SpecialOneToOneType(string referencedEntityName, NHibernate.Type.ForeignKeyDirection foreignKeyType, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, string entityName, string propertyName) : base(default(string), default(NHibernate.Type.ForeignKeyDirection), default(string), default(bool), default(bool), default(string), default(string)) => throw null; + public override NHibernate.SqlTypes.SqlType[] SqlTypes(NHibernate.Engine.IMapping mapping) => throw null; + public override bool UseLHSPrimaryKey { get => throw null; } + } + + // Generated from `NHibernate.Type.StringClobType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringClobType : NHibernate.Type.StringType + { + public override string Name { get => throw null; } + } + + // Generated from `NHibernate.Type.StringType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringType : NHibernate.Type.AbstractStringType + { + public override string Name { get => throw null; } + internal StringType(NHibernate.SqlTypes.StringSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal StringType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.TicksType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TicksType : NHibernate.Type.AbstractDateTimeType + { + public override object FromStringValue(string xml) => throw null; + protected override System.DateTime GetDateTime(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public override System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public TicksType() => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.TimeAsTimeSpanType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TimeAsTimeSpanType : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public TimeAsTimeSpanType(NHibernate.SqlTypes.TimeSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public TimeAsTimeSpanType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.TimeSpanType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TimeSpanType : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public TimeSpanType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.TimeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TimeType : NHibernate.Type.PrimitiveType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.ICacheAssembler + { + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override int GetHashCode(object x) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand st, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public TimeType(NHibernate.SqlTypes.TimeSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public TimeType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.TimestampType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TimestampType : NHibernate.Type.AbstractDateTimeType + { + public override string Name { get => throw null; } + public TimestampType() => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + } + + // Generated from `NHibernate.Type.TrueFalseType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TrueFalseType : NHibernate.Type.CharBooleanType + { + protected override string FalseString { get => throw null; } + public override string Name { get => throw null; } + internal TrueFalseType() : base(default(NHibernate.SqlTypes.AnsiStringFixedLengthSqlType)) => throw null; + protected override string TrueString { get => throw null; } + } + + // Generated from `NHibernate.Type.TypeFactory` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TypeFactory + { + public static NHibernate.Type.CollectionType Array(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.IType Basic(string name, System.Collections.Generic.IDictionary parameters) => throw null; + public static NHibernate.Type.IType Basic(string name) => throw null; + public static void ClearCustomRegistrations() => throw null; + public static NHibernate.Type.CollectionType CustomCollection(string typeName, System.Collections.Generic.IDictionary typeParameters, string role, string propertyRef) => throw null; + public static string[] EmptyAliases; + public static NHibernate.Type.CollectionType GenericBag(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericIdBag(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericList(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericMap(string role, string propertyRef, System.Type indexClass, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericOrderedSet(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericSet(string role, string propertyRef, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericSortedDictionary(string role, string propertyRef, object comparer, System.Type indexClass, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericSortedList(string role, string propertyRef, object comparer, System.Type indexClass, System.Type elementClass) => throw null; + public static NHibernate.Type.CollectionType GenericSortedSet(string role, string propertyRef, object comparer, System.Type elementClass) => throw null; + public static NHibernate.Type.NullableType GetAnsiStringType(int length) => throw null; + public static NHibernate.Type.NullableType GetBinaryType(int length) => throw null; + public static NHibernate.Type.NullableType GetDateTime2Type(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.NullableType GetDateTimeOffsetType(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.NullableType GetDateTimeType(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.IType GetDefaultTypeFor(System.Type type) => throw null; + public static NHibernate.Type.NullableType GetLocalDateTimeType(System.Byte fractionalSecondsPrecision) => throw null; + // Generated from `NHibernate.Type.TypeFactory+GetNullableTypeWithLengthOrScale` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate NHibernate.Type.NullableType GetNullableTypeWithLengthOrScale(int lengthOrScale); + + + // Generated from `NHibernate.Type.TypeFactory+GetNullableTypeWithPrecision` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public delegate NHibernate.Type.NullableType GetNullableTypeWithPrecision(System.Byte precision, System.Byte scale); + + + public static NHibernate.Type.NullableType GetSerializableType(int length) => throw null; + public static NHibernate.Type.NullableType GetSerializableType(System.Type serializableType, int length) => throw null; + public static NHibernate.Type.NullableType GetSerializableType(System.Type serializableType) => throw null; + public static NHibernate.Type.NullableType GetStringType(int length) => throw null; + public static NHibernate.Type.NullableType GetTimeAsTimeSpanType(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.NullableType GetTimeType(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.NullableType GetTypeType(int length) => throw null; + public static NHibernate.Type.NullableType GetUtcDateTimeType(System.Byte fractionalSecondsPrecision) => throw null; + public static NHibernate.Type.IType HeuristicType(string typeName, System.Collections.Generic.IDictionary parameters, int? length) => throw null; + public static NHibernate.Type.IType HeuristicType(string typeName, System.Collections.Generic.IDictionary parameters) => throw null; + public static NHibernate.Type.IType HeuristicType(string typeName) => throw null; + public static NHibernate.Type.IType HeuristicType(System.Type type) => throw null; + public static void InjectParameters(object type, System.Collections.Generic.IDictionary parameters) => throw null; + public static NHibernate.Type.EntityType ManyToOne(string persistentClass, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, bool ignoreNotFound, bool isLogicalOneToOne, string propertyName) => throw null; + public static NHibernate.Type.EntityType ManyToOne(string persistentClass, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, bool ignoreNotFound, bool isLogicalOneToOne) => throw null; + public static NHibernate.Type.EntityType ManyToOne(string persistentClass, bool lazy) => throw null; + public static NHibernate.Type.EntityType ManyToOne(string persistentClass) => throw null; + public static NHibernate.Type.EntityType OneToOne(string persistentClass, NHibernate.Type.ForeignKeyDirection foreignKeyType, string uniqueKeyPropertyName, bool lazy, bool unwrapProxy, string entityName, string propertyName) => throw null; + public static void RegisterType(System.Type systemType, NHibernate.Type.IType nhibernateType, System.Collections.Generic.IEnumerable aliases, NHibernate.Type.TypeFactory.GetNullableTypeWithPrecision ctorPrecision) => throw null; + public static void RegisterType(System.Type systemType, NHibernate.Type.IType nhibernateType, System.Collections.Generic.IEnumerable aliases, NHibernate.Type.TypeFactory.GetNullableTypeWithLengthOrScale ctorLengthOrScale) => throw null; + public static void RegisterType(System.Type systemType, NHibernate.Type.IType nhibernateType, System.Collections.Generic.IEnumerable aliases) => throw null; + } + + // Generated from `NHibernate.Type.TypeHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TypeHelper + { + public static object[] Assemble(object[] row, NHibernate.Type.ICacheAssembler[] types, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public static System.Threading.Tasks.Task AssembleAsync(object[] row, NHibernate.Type.ICacheAssembler[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public static void BeforeAssemble(object[] row, NHibernate.Type.ICacheAssembler[] types, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task BeforeAssembleAsync(object[] row, NHibernate.Type.ICacheAssembler[] types, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static void DeepCopy(object[] values, NHibernate.Type.IType[] types, bool[] copy, object[] target, NHibernate.Engine.ISessionImplementor session) => throw null; + public static object[] Disassemble(object[] row, NHibernate.Type.ICacheAssembler[] types, bool[] nonCacheable, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public static System.Threading.Tasks.Task DisassembleAsync(object[] row, NHibernate.Type.ICacheAssembler[] types, bool[] nonCacheable, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public static NHibernate.Type.IType[] EmptyTypeArray; + public static int[] FindDirty(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, bool anyUninitializedProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public static int[] FindDirty(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task FindDirtyAsync(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, bool anyUninitializedProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task FindDirtyAsync(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static int[] FindModified(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, bool anyUninitializedProperties, NHibernate.Engine.ISessionImplementor session) => throw null; + public static int[] FindModified(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, NHibernate.Engine.ISessionImplementor session) => throw null; + public static System.Threading.Tasks.Task FindModifiedAsync(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, bool anyUninitializedProperties, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task FindModifiedAsync(NHibernate.Tuple.StandardProperty[] properties, object[] currentState, object[] previousState, bool[][] includeColumns, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public static object[] Replace(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection) => throw null; + public static object[] Replace(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready) => throw null; + public static object[] ReplaceAssociations(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection) => throw null; + public static System.Threading.Tasks.Task ReplaceAssociationsAsync(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task ReplaceAsync(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copyCache, NHibernate.Type.ForeignKeyDirection foreignKeyDirection, System.Threading.CancellationToken cancellationToken) => throw null; + public static System.Threading.Tasks.Task ReplaceAsync(object[] original, object[] target, NHibernate.Type.IType[] types, NHibernate.Engine.ISessionImplementor session, object owner, System.Collections.IDictionary copiedAlready, System.Threading.CancellationToken cancellationToken) => throw null; + } + + // Generated from `NHibernate.Type.TypeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeType : NHibernate.Type.ImmutableType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override NHibernate.SqlTypes.SqlType SqlType { get => throw null; } + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object value) => throw null; + internal TypeType(NHibernate.SqlTypes.StringSqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + internal TypeType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.UInt16Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UInt16Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public UInt16Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.UInt32Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UInt32Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public UInt32Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.UInt64Type` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UInt64Type : NHibernate.Type.PrimitiveType, NHibernate.Type.IVersionType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public System.Collections.IComparer Comparator { get => throw null; } + public override object DefaultValue { get => throw null; } + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public virtual object Next(object current, NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task NextAsync(object current, NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type PrimitiveClass { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public virtual object Seed(NHibernate.Engine.ISessionImplementor session) => throw null; + public virtual System.Threading.Tasks.Task SeedAsync(NHibernate.Engine.ISessionImplementor session, System.Threading.CancellationToken cancellationToken) => throw null; + public override void Set(System.Data.Common.DbCommand rs, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public UInt64Type() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.UriType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UriType : NHibernate.Type.ImmutableType, NHibernate.Type.IType, NHibernate.Type.ILiteralType, NHibernate.Type.IIdentifierType, NHibernate.Type.IDiscriminatorType, NHibernate.Type.ICacheAssembler + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string Name { get => throw null; } + public string ObjectToSQLString(object value, NHibernate.Dialect.Dialect dialect) => throw null; + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public object StringToObject(string xml) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + public UriType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public UriType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.UtcDateTimeNoMsType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UtcDateTimeNoMsType : NHibernate.Type.DateTimeNoMsType + { + protected override System.DateTimeKind Kind { get => throw null; } + public override string Name { get => throw null; } + public UtcDateTimeNoMsType() => throw null; + } + + // Generated from `NHibernate.Type.UtcDateTimeType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UtcDateTimeType : NHibernate.Type.DateTimeType + { + protected override System.DateTimeKind Kind { get => throw null; } + public override string Name { get => throw null; } + public UtcDateTimeType(NHibernate.SqlTypes.DateTimeSqlType sqlType) => throw null; + public UtcDateTimeType() => throw null; + } + + // Generated from `NHibernate.Type.UtcDbTimestampType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UtcDbTimestampType : NHibernate.Type.DbTimestampType + { + protected override string GetCurrentTimestampSelectString(NHibernate.Dialect.Dialect dialect) => throw null; + protected override System.DateTimeKind Kind { get => throw null; } + public override string Name { get => throw null; } + protected override bool SupportsCurrentTimestampSelection(NHibernate.Dialect.Dialect dialect) => throw null; + public UtcDbTimestampType() => throw null; + } + + // Generated from `NHibernate.Type.UtcTicksType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UtcTicksType : NHibernate.Type.TicksType + { + protected override System.DateTimeKind Kind { get => throw null; } + public override string Name { get => throw null; } + public UtcTicksType() => throw null; + } + + // Generated from `NHibernate.Type.XDocType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class XDocType : NHibernate.Type.MutableType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object DeepCopyNotNull(object value) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + public XDocType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public XDocType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.XmlDocType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class XmlDocType : NHibernate.Type.MutableType + { + public override object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task AssembleAsync(object cached, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object DeepCopyNotNull(object value) => throw null; + public override object Disassemble(object value, NHibernate.Engine.ISessionImplementor session, object owner) => throw null; + public override System.Threading.Tasks.Task DisassembleAsync(object value, NHibernate.Engine.ISessionImplementor session, object owner, System.Threading.CancellationToken cancellationToken) => throw null; + public override object FromStringValue(string xml) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, string name, NHibernate.Engine.ISessionImplementor session) => throw null; + public override object Get(System.Data.Common.DbDataReader rs, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override bool IsEqual(object x, object y) => throw null; + public override string Name { get => throw null; } + public override System.Type ReturnedClass { get => throw null; } + public override void Set(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session) => throw null; + public override string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory) => throw null; + public override string ToString(object val) => throw null; + public XmlDocType(NHibernate.SqlTypes.SqlType sqlType) : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + public XmlDocType() : base(default(NHibernate.SqlTypes.SqlType)) => throw null; + } + + // Generated from `NHibernate.Type.YesNoType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class YesNoType : NHibernate.Type.CharBooleanType + { + protected override string FalseString { get => throw null; } + public override string Name { get => throw null; } + protected override string TrueString { get => throw null; } + public YesNoType() : base(default(NHibernate.SqlTypes.AnsiStringFixedLengthSqlType)) => throw null; + } + + } + namespace UserTypes + { + // Generated from `NHibernate.UserTypes.ICompositeUserType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ICompositeUserType + { + object Assemble(object cached, NHibernate.Engine.ISessionImplementor session, object owner); + object DeepCopy(object value); + object Disassemble(object value, NHibernate.Engine.ISessionImplementor session); + bool Equals(object x, object y); + int GetHashCode(object x); + object GetPropertyValue(object component, int property); + bool IsMutable { get; } + object NullSafeGet(System.Data.Common.DbDataReader dr, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, bool[] settable, NHibernate.Engine.ISessionImplementor session); + string[] PropertyNames { get; } + NHibernate.Type.IType[] PropertyTypes { get; } + object Replace(object original, object target, NHibernate.Engine.ISessionImplementor session, object owner); + System.Type ReturnedClass { get; } + void SetPropertyValue(object component, int property, object value); + } + + // Generated from `NHibernate.UserTypes.IEnhancedUserType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IEnhancedUserType : NHibernate.UserTypes.IUserType + { + object FromXMLString(string xml); + string ObjectToSQLString(object value); + string ToXMLString(object value); + } + + // Generated from `NHibernate.UserTypes.ILoggableUserType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface ILoggableUserType + { + string ToLoggableString(object value, NHibernate.Engine.ISessionFactoryImplementor factory); + } + + // Generated from `NHibernate.UserTypes.IParameterizedType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IParameterizedType + { + void SetParameterValues(System.Collections.Generic.IDictionary parameters); + } + + // Generated from `NHibernate.UserTypes.IUserCollectionType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUserCollectionType + { + bool Contains(object collection, object entity); + System.Collections.IEnumerable GetElements(object collection); + object IndexOf(object collection, object entity); + object Instantiate(int anticipatedSize); + NHibernate.Collection.IPersistentCollection Instantiate(NHibernate.Engine.ISessionImplementor session, NHibernate.Persister.Collection.ICollectionPersister persister); + object ReplaceElements(object original, object target, NHibernate.Persister.Collection.ICollectionPersister persister, object owner, System.Collections.IDictionary copyCache, NHibernate.Engine.ISessionImplementor session); + NHibernate.Collection.IPersistentCollection Wrap(NHibernate.Engine.ISessionImplementor session, object collection); + } + + // Generated from `NHibernate.UserTypes.IUserType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUserType + { + object Assemble(object cached, object owner); + object DeepCopy(object value); + object Disassemble(object value); + bool Equals(object x, object y); + int GetHashCode(object x); + bool IsMutable { get; } + object NullSafeGet(System.Data.Common.DbDataReader rs, string[] names, NHibernate.Engine.ISessionImplementor session, object owner); + void NullSafeSet(System.Data.Common.DbCommand cmd, object value, int index, NHibernate.Engine.ISessionImplementor session); + object Replace(object original, object target, object owner); + System.Type ReturnedType { get; } + NHibernate.SqlTypes.SqlType[] SqlTypes { get; } + } + + // Generated from `NHibernate.UserTypes.IUserVersionType` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public interface IUserVersionType : System.Collections.IComparer, NHibernate.UserTypes.IUserType + { + object Next(object current, NHibernate.Engine.ISessionImplementor session); + object Seed(NHibernate.Engine.ISessionImplementor session); + } + + } + namespace Util + { + // Generated from `NHibernate.Util.ADOExceptionReporter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ADOExceptionReporter + { + public const string DefaultExceptionMsg = default; + public static void LogExceptions(System.Exception ex, string message) => throw null; + public static void LogExceptions(System.Exception ex) => throw null; + } + + // Generated from `NHibernate.Util.ArrayHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ArrayHelper + { + public static void AddAll(System.Collections.Generic.IDictionary to, System.Collections.Generic.IDictionary from) => throw null; + public static void AddAll(System.Collections.Generic.IList to, System.Collections.Generic.IList from) => throw null; + public static void AddAll(System.Collections.IList to, System.Collections.IList from) => throw null; + public static System.Collections.Generic.IDictionary AddOrOverride(this System.Collections.Generic.IDictionary destination, System.Collections.Generic.IDictionary sourceOverride) => throw null; + public static bool ArrayEquals(T[] a, T[] b) => throw null; + public static bool ArrayEquals(System.Byte[] a, System.Byte[] b) => throw null; + public static int ArrayGetHashCode(T[] array) => throw null; + public static int CountTrue(bool[] array) => throw null; + public static bool[] EmptyBoolArray { get => throw null; } + public static int[] EmptyIntArray { get => throw null; } + public static object[] EmptyObjectArray { get => throw null; } + public static bool[] False; + public static void Fill(T[] array, T value) => throw null; + public static T[] Fill(T value, int length) => throw null; + public static int[] GetBatchSizes(int maxBatchSize) => throw null; + public static bool IsAllFalse(bool[] array) => throw null; + public static bool IsAllNegative(int[] array) => throw null; + public static T[] Join(T[] x, T[] y, bool[] use) => throw null; + public static T[] Join(T[] x, T[] y) => throw null; + public static T[] Slice(T[] strings, int begin, int length) => throw null; + public static string ToString(object[] array) => throw null; + public static bool[] True; + } + + // Generated from `NHibernate.Util.AssemblyQualifiedTypeName` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AssemblyQualifiedTypeName + { + public string Assembly { get => throw null; } + public AssemblyQualifiedTypeName(string type, string assembly) => throw null; + public override bool Equals(object obj) => throw null; + public bool Equals(NHibernate.Util.AssemblyQualifiedTypeName obj) => throw null; + public override int GetHashCode() => throw null; + public override string ToString() => throw null; + public string Type { get => throw null; } + } + + // Generated from `NHibernate.Util.AsyncLock` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class AsyncLock + { + public AsyncLock() => throw null; + public System.IDisposable Lock() => throw null; + public System.Threading.Tasks.Task LockAsync() => throw null; + } + + // Generated from `NHibernate.Util.CollectionHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CollectionHelper + { + public static bool BagEquals(System.Collections.Generic.IEnumerable c1, System.Collections.Generic.IEnumerable c2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool BagEquals(System.Collections.Generic.IEnumerable c1, System.Collections.Generic.IEnumerable c2) => throw null; + public static bool CollectionEquals(System.Collections.Generic.ICollection c1, System.Collections.Generic.ICollection c2) => throw null; + public static bool CollectionEquals(System.Collections.ICollection c1, System.Collections.ICollection c2) => throw null; + public static System.Collections.Generic.IDictionary CreateCaseInsensitiveHashtable(System.Collections.Generic.IDictionary dictionary) => throw null; + public static System.Collections.Generic.IDictionary CreateCaseInsensitiveHashtable() => throw null; + public static bool DictionaryEquals(System.Collections.Generic.IDictionary m1, System.Collections.Generic.IDictionary m2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool DictionaryEquals(System.Collections.Generic.IDictionary m1, System.Collections.Generic.IDictionary m2) => throw null; + public static bool DictionaryEquals(System.Collections.IDictionary a, System.Collections.IDictionary b) => throw null; + public static System.Collections.ICollection EmptyCollection; + public static System.Collections.Generic.IDictionary EmptyDictionary() => throw null; + public static System.Collections.IEnumerable EmptyEnumerable; + // Generated from `NHibernate.Util.CollectionHelper+EmptyEnumerableClass<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmptyEnumerableClass : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public EmptyEnumerableClass() => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + } + + + public static System.Collections.IList EmptyList; + public static System.Collections.IDictionary EmptyMap; + // Generated from `NHibernate.Util.CollectionHelper+EmptyMapClass<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EmptyMapClass : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(TKey key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public EmptyMapClass() => throw null; + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + + public static int GetHashCode(System.Collections.Generic.IEnumerable coll, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static int GetHashCode(System.Collections.Generic.IEnumerable coll) => throw null; + public static int GetHashCode(System.Collections.IEnumerable coll) => throw null; + public static bool SequenceEquals(System.Collections.Generic.IEnumerable c1, System.Collections.Generic.IEnumerable c2, System.Collections.Generic.IEqualityComparer comparer) => throw null; + public static bool SequenceEquals(System.Collections.Generic.IEnumerable c1, System.Collections.Generic.IEnumerable c2) => throw null; + public static bool SetEquals(System.Collections.Generic.ISet s1, System.Collections.Generic.ISet s2) => throw null; + } + + // Generated from `NHibernate.Util.CollectionPrinter` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class CollectionPrinter + { + public static string ToString(System.Collections.IEnumerable elements) => throw null; + public static string ToString(System.Collections.IDictionary dictionary) => throw null; + public static string ToString(System.Collections.Generic.IDictionary dictionary) => throw null; + } + + // Generated from `NHibernate.Util.DynamicComponent` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class DynamicComponent : System.Dynamic.DynamicObject, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + void System.Collections.IDictionary.Add(object key, object value) => throw null; + void System.Collections.Generic.IDictionary.Add(string key, object value) => throw null; + void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) => throw null; + void System.Collections.IDictionary.Clear() => throw null; + void System.Collections.Generic.ICollection>.Clear() => throw null; + bool System.Collections.IDictionary.Contains(object key) => throw null; + bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) => throw null; + bool System.Collections.Generic.IDictionary.ContainsKey(string key) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + int System.Collections.ICollection.Count { get => throw null; } + int System.Collections.Generic.ICollection>.Count { get => throw null; } + public DynamicComponent() => throw null; + public override System.Collections.Generic.IEnumerable GetDynamicMemberNames() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + bool System.Collections.IDictionary.IsFixedSize { get => throw null; } + bool System.Collections.IDictionary.IsReadOnly { get => throw null; } + bool System.Collections.Generic.ICollection>.IsReadOnly { get => throw null; } + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + object System.Collections.IDictionary.this[object key] { get => throw null; set => throw null; } + object System.Collections.Generic.IDictionary.this[string key] { get => throw null; set => throw null; } + System.Collections.ICollection System.Collections.IDictionary.Keys { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Keys { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + void System.Collections.IDictionary.Remove(object key) => throw null; + bool System.Collections.Generic.IDictionary.Remove(string key) => throw null; + bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) => throw null; + object System.Collections.ICollection.SyncRoot { get => throw null; } + public override bool TryDeleteIndex(System.Dynamic.DeleteIndexBinder binder, object[] indexes) => throw null; + public override bool TryDeleteMember(System.Dynamic.DeleteMemberBinder binder) => throw null; + public override bool TryGetIndex(System.Dynamic.GetIndexBinder binder, object[] indexes, out object result) => throw null; + public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out object result) => throw null; + bool System.Collections.Generic.IDictionary.TryGetValue(string key, out object value) => throw null; + public override bool TryInvokeMember(System.Dynamic.InvokeMemberBinder binder, object[] args, out object result) => throw null; + public override bool TrySetIndex(System.Dynamic.SetIndexBinder binder, object[] indexes, object value) => throw null; + public override bool TrySetMember(System.Dynamic.SetMemberBinder binder, object value) => throw null; + System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get => throw null; } + } + + // Generated from `NHibernate.Util.EnumerableExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EnumerableExtensions + { + public static bool Any(this System.Collections.IEnumerable source) => throw null; + public static object First(this System.Collections.IEnumerable source) => throw null; + public static object FirstOrNull(this System.Collections.IEnumerable source) => throw null; + public static void ForEach(this System.Collections.Generic.IEnumerable query, System.Action method) => throw null; + } + + // Generated from `NHibernate.Util.EnumeratorAdapter<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class EnumeratorAdapter : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public T Current { get => throw null; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public EnumeratorAdapter(System.Collections.IEnumerator wrapped) => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + } + + // Generated from `NHibernate.Util.EqualsHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class EqualsHelper + { + public static bool Equals(object x, object y) => throw null; + } + + // Generated from `NHibernate.Util.ExpressionsHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ExpressionsHelper + { + public static System.Reflection.MemberInfo DecodeMemberAccessExpression(System.Linq.Expressions.Expression> expression) => throw null; + } + + // Generated from `NHibernate.Util.FilterHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class FilterHelper + { + public FilterHelper(System.Collections.Generic.IDictionary filters, NHibernate.Dialect.Dialect dialect, NHibernate.Dialect.Function.SQLFunctionRegistry sqlFunctionRegistry) => throw null; + public static System.Collections.Generic.IDictionary GetEnabledForManyToOne(System.Collections.Generic.IDictionary enabledFilters) => throw null; + public bool IsAffectedBy(System.Collections.Generic.IDictionary enabledFilters) => throw null; + public void Render(System.Text.StringBuilder buffer, string defaultAlias, System.Collections.Generic.IDictionary propMap, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public void Render(System.Text.StringBuilder buffer, string alias, System.Collections.Generic.IDictionary enabledFilters) => throw null; + public string Render(string alias, System.Collections.Generic.IDictionary enabledFilters) => throw null; + } + + // Generated from `NHibernate.Util.IdentityMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentityMap : System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object val) => throw null; + public void Clear() => throw null; + public static System.Collections.ICollection ConcurrentEntries(System.Collections.IDictionary map) => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int i) => throw null; + public int Count { get => throw null; } + public static System.Collections.ICollection Entries(System.Collections.IDictionary map) => throw null; + public System.Collections.IList EntryList { get => throw null; } + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public static System.Collections.IDictionary Instantiate(int size) => throw null; + public static System.Collections.IDictionary InstantiateSequenced(int size) => throw null; + public static System.Collections.IDictionary Invert(System.Collections.IDictionary map) => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public void Remove(object key) => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Util.IdentitySet` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IdentitySet : System.Collections.IEnumerable, System.Collections.Generic.ISet, System.Collections.Generic.IEnumerable, System.Collections.Generic.ICollection + { + void System.Collections.Generic.ICollection.Add(object item) => throw null; + public bool Add(object o) => throw null; + public void Clear() => throw null; + public bool Contains(object o) => throw null; + public void CopyTo(object[] array, int index) => throw null; + public int Count { get => throw null; } + public void ExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public IdentitySet(System.Collections.Generic.IEnumerable members) => throw null; + public IdentitySet() => throw null; + public void IntersectWith(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsReadOnly { get => throw null; } + public bool IsSubsetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool IsSupersetOf(System.Collections.Generic.IEnumerable other) => throw null; + public bool Overlaps(System.Collections.Generic.IEnumerable other) => throw null; + public bool Remove(object o) => throw null; + public bool SetEquals(System.Collections.Generic.IEnumerable other) => throw null; + public void SymmetricExceptWith(System.Collections.Generic.IEnumerable other) => throw null; + public void UnionWith(System.Collections.Generic.IEnumerable other) => throw null; + } + + // Generated from `NHibernate.Util.JoinedEnumerable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedEnumerable : System.Collections.IEnumerable + { + public System.Collections.IEnumerator GetEnumerator() => throw null; + public JoinedEnumerable(System.Collections.IEnumerable[] enumerables) => throw null; + public JoinedEnumerable(System.Collections.IEnumerable first, System.Collections.IEnumerable second) => throw null; + public JoinedEnumerable(System.Collections.Generic.IEnumerable enumerables) => throw null; + } + + // Generated from `NHibernate.Util.JoinedEnumerable<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class JoinedEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() => throw null; + public JoinedEnumerable(System.Collections.Generic.List> enumerables) => throw null; + public JoinedEnumerable(System.Collections.Generic.IEnumerable[] enumerables) => throw null; + public JoinedEnumerable(System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) => throw null; + } + + // Generated from `NHibernate.Util.LRUMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LRUMap : NHibernate.Util.SequencedHashMap + { + public override void Add(object key, object value) => throw null; + public override object this[object key] { get => throw null; set => throw null; } + public LRUMap(int capacity) => throw null; + public LRUMap() => throw null; + public int MaximumSize { get => throw null; set => throw null; } + protected void ProcessRemovedLRU(object key, object value) => throw null; + } + + // Generated from `NHibernate.Util.LinkedHashMap<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class LinkedHashMap : System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public virtual void Add(TKey key, TValue value) => throw null; + // Generated from `NHibernate.Util.LinkedHashMap<,>+BackwardEnumerator<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected abstract class BackwardEnumerator : System.IDisposable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerator + { + public BackwardEnumerator(NHibernate.Util.LinkedHashMap dictionary) => throw null; + public abstract T Current { get; } + object System.Collections.IEnumerator.Current { get => throw null; } + public void Dispose() => throw null; + public bool MoveNext() => throw null; + public void Reset() => throw null; + protected NHibernate.Util.LinkedHashMap dictionary; + protected System.Int64 version; + } + + + public virtual void Clear() => throw null; + public virtual bool Contains(TKey key) => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public virtual bool ContainsKey(TKey key) => throw null; + public virtual bool ContainsValue(TValue value) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public virtual int Count { get => throw null; } + // Generated from `NHibernate.Util.LinkedHashMap<,>+Entry` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + protected class Entry + { + public Entry(TKey key, TValue value) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public TKey Key { get => throw null; } + public NHibernate.Util.LinkedHashMap.Entry Next { get => throw null; set => throw null; } + public NHibernate.Util.LinkedHashMap.Entry Prev { get => throw null; set => throw null; } + public override string ToString() => throw null; + public TValue Value { get => throw null; set => throw null; } + } + + + public virtual TKey FirstKey { get => throw null; } + public virtual TValue FirstValue { get => throw null; } + public virtual System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + public virtual System.Collections.Generic.ICollection Keys { get => throw null; } + public virtual TKey LastKey { get => throw null; } + public virtual TValue LastValue { get => throw null; } + public LinkedHashMap(int capacity, System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public LinkedHashMap(int capacity) => throw null; + public LinkedHashMap(System.Collections.Generic.IEqualityComparer equalityComparer) => throw null; + public LinkedHashMap() => throw null; + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public virtual bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public override string ToString() => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public virtual System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Util.NullableDictionary<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class NullableDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> where TKey : class + { + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(TKey key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.Generic.IEnumerator> GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public NullableDictionary(System.Collections.Generic.IEqualityComparer comparer) => throw null; + public NullableDictionary() => throw null; + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Util.ObjectHelpers` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ObjectHelpers + { + public static string IdentityToString(object obj) => throw null; + } + + // Generated from `NHibernate.Util.ParserException` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class ParserException : System.Exception + { + public ParserException(string message) => throw null; + protected ParserException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `NHibernate.Util.PropertiesHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class PropertiesHelper + { + public static bool GetBoolean(string property, System.Collections.Generic.IDictionary properties, bool defaultValue) => throw null; + public static bool GetBoolean(string property, System.Collections.Generic.IDictionary properties) => throw null; + public static System.Byte? GetByte(string property, System.Collections.Generic.IDictionary properties, System.Byte? defaultValue) => throw null; + public static TEnum GetEnum(string property, System.Collections.Generic.IDictionary properties, TEnum defaultValue) where TEnum : struct => throw null; + public static int GetInt32(string property, System.Collections.Generic.IDictionary properties, int defaultValue) => throw null; + public static System.Int64 GetInt64(string property, System.Collections.Generic.IDictionary properties, System.Int64 defaultValue) => throw null; + public static string GetString(string property, System.Collections.Generic.IDictionary properties, string defaultValue) => throw null; + public static System.Collections.Generic.IDictionary ToDictionary(string property, string delim, System.Collections.Generic.IDictionary properties) => throw null; + } + + // Generated from `NHibernate.Util.ReflectHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class ReflectHelper + { + public const System.Reflection.BindingFlags AnyVisibilityInstance = default; + public static System.Type ClassForFullName(string classFullName) => throw null; + public static System.Type ClassForFullNameOrNull(string classFullName) => throw null; + public static System.Type ClassForName(string name) => throw null; + public static System.Type GetCollectionElementType(this System.Collections.IEnumerable collectionInstance) => throw null; + public static System.Type GetCollectionElementType(System.Type collectionType) => throw null; + public static object GetConstantValue(System.Type type, string fieldName) => throw null; + public static System.Reflection.ConstructorInfo GetConstructor(System.Type type, NHibernate.Type.IType[] types) => throw null; + public static System.Reflection.ConstructorInfo GetDefaultConstructor(System.Type type) => throw null; + public static System.Reflection.MethodInfo GetGenericMethodFrom(string methodName, System.Type[] genericArgs, System.Type[] signature) => throw null; + public static NHibernate.Properties.IGetter GetGetter(System.Type theClass, string propertyName, string propertyAccessorName) => throw null; + public static System.Reflection.MethodInfo GetMethod(System.Linq.Expressions.Expression> method) => throw null; + public static System.Reflection.MethodInfo GetMethod(System.Linq.Expressions.Expression> method) => throw null; + public static System.Reflection.MethodInfo GetMethod(System.Linq.Expressions.Expression method) => throw null; + public static System.Reflection.MethodInfo GetMethodDefinition(System.Linq.Expressions.Expression> method) => throw null; + public static System.Reflection.MethodInfo GetMethodDefinition(System.Linq.Expressions.Expression method) => throw null; + public static System.Reflection.MethodInfo GetMethodOverload(System.Reflection.MethodInfo method, params System.Type[] parameterTypes) => throw null; + public static System.Reflection.MemberInfo GetProperty(System.Linq.Expressions.Expression> property) => throw null; + public static System.Reflection.MemberInfo GetProperty(System.Linq.Expressions.Expression> property) => throw null; + public static string GetPropertyName(System.Reflection.MethodInfo method) => throw null; + public static bool HasProperty(this System.Type source, string propertyName) => throw null; + public static bool IsAbstractClass(System.Type type) => throw null; + public static bool IsFinalClass(System.Type type) => throw null; + public static bool IsMethodOf(this System.Reflection.MethodInfo source, System.Type realDeclaringType) => throw null; + public static bool IsPropertyGet(System.Reflection.MethodInfo method) => throw null; + public static bool IsPropertySet(System.Reflection.MethodInfo method) => throw null; + public static bool OverridesEquals(System.Type clazz) => throw null; + public static bool OverridesGetHashCode(System.Type clazz) => throw null; + public static System.Type ReflectedPropertyClass(string className, string name, string accessorName) => throw null; + public static System.Type ReflectedPropertyClass(System.Type theClass, string name, string access) => throw null; + public static NHibernate.Type.IType ReflectedPropertyType(System.Type theClass, string name, string access) => throw null; + public static System.Collections.Generic.IDictionary ToTypeParameters(this object source) => throw null; + public static System.Reflection.MethodInfo TryGetMethod(System.Type type, System.Reflection.MethodInfo method) => throw null; + public static bool TryLoadAssembly(string assemblyName) => throw null; + public static System.Type TypeFromAssembly(string type, string assembly, bool throwIfError) => throw null; + public static System.Type TypeFromAssembly(NHibernate.Util.AssemblyQualifiedTypeName name, bool throwOnError) => throw null; + public static System.Exception UnwrapTargetInvocationException(System.Reflection.TargetInvocationException ex) => throw null; + } + + // Generated from `NHibernate.Util.SafetyEnumerable<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SafetyEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public SafetyEnumerable(System.Collections.IEnumerable collection) => throw null; + } + + // Generated from `NHibernate.Util.SequencedHashMap` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SequencedHashMap : System.Runtime.Serialization.IDeserializationCallback, System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public virtual void Add(object key, object value) => throw null; + public virtual void Clear() => throw null; + public virtual bool Contains(object key) => throw null; + public virtual bool ContainsKey(object key) => throw null; + public virtual bool ContainsValue(object value) => throw null; + public virtual void CopyTo(System.Array array, int index) => throw null; + public virtual int Count { get => throw null; } + public virtual object FirstKey { get => throw null; } + public virtual object FirstValue { get => throw null; } + public virtual System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public virtual bool IsFixedSize { get => throw null; } + public virtual bool IsReadOnly { get => throw null; } + public virtual bool IsSynchronized { get => throw null; } + public virtual object this[object o] { get => throw null; set => throw null; } + public virtual System.Collections.ICollection Keys { get => throw null; } + public virtual object LastKey { get => throw null; } + public virtual object LastValue { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public virtual void Remove(object key) => throw null; + public SequencedHashMap(int capacity, float loadFactor, System.Collections.IEqualityComparer equalityComparer) => throw null; + public SequencedHashMap(int capacity, float loadFactor) => throw null; + public SequencedHashMap(int capacity, System.Collections.IEqualityComparer equalityComparer) => throw null; + public SequencedHashMap(int capacity) => throw null; + public SequencedHashMap(System.Collections.IEqualityComparer equalityComparer) => throw null; + public SequencedHashMap() => throw null; + public virtual object SyncRoot { get => throw null; } + public override string ToString() => throw null; + public virtual System.Collections.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Util.SerializationHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class SerializationHelper + { + public static object Deserialize(System.Byte[] data) => throw null; + public static System.Byte[] Serialize(object obj) => throw null; + // Generated from `NHibernate.Util.SerializationHelper+SurrogateSelector` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SurrogateSelector : System.Runtime.Serialization.SurrogateSelector + { + public override void AddSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISerializationSurrogate surrogate) => throw null; + public override System.Runtime.Serialization.ISerializationSurrogate GetSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context, out System.Runtime.Serialization.ISurrogateSelector selector) => throw null; + public override void RemoveSurrogate(System.Type type, System.Runtime.Serialization.StreamingContext context) => throw null; + public SurrogateSelector() => throw null; + } + + + } + + // Generated from `NHibernate.Util.SimpleMRUCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SimpleMRUCache : System.Runtime.Serialization.IDeserializationCallback + { + public void Clear() => throw null; + public int Count { get => throw null; } + public object this[object key] { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public void Put(object key, object value) => throw null; + public SimpleMRUCache(int strongReferenceCount) => throw null; + public SimpleMRUCache() => throw null; + } + + // Generated from `NHibernate.Util.SingletonEnumerable<>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SingletonEnumerable : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public SingletonEnumerable(T value) => throw null; + } + + // Generated from `NHibernate.Util.SoftLimitMRUCache` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class SoftLimitMRUCache : System.Runtime.Serialization.IDeserializationCallback + { + public void Clear() => throw null; + public int Count { get => throw null; } + public object this[object key] { get => throw null; } + void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) => throw null; + public void Put(object key, object value) => throw null; + public int SoftCount { get => throw null; } + public SoftLimitMRUCache(int strongReferenceCount) => throw null; + public SoftLimitMRUCache() => throw null; + } + + // Generated from `NHibernate.Util.StringHelper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class StringHelper + { + public const int AliasTruncateLength = default; + public static bool BooleanValue(string value) => throw null; + public const string ClosedParen = default; + public static string CollectionToString(System.Collections.IEnumerable keys) => throw null; + public const string Comma = default; + public const string CommaSpace = default; + public static int CountUnquoted(string str, System.Char character) => throw null; + public const System.Char Dot = default; + public static bool EqualsCaseInsensitive(string a, string b) => throw null; + public static int FirstIndexOfChar(string sqlString, string str, int startIndex) => throw null; + public static string GenerateAlias(string description, int unique) => throw null; + public static string GenerateAlias(string description) => throw null; + public static string GetClassname(string typeName) => throw null; + public static string GetFullClassname(string typeName) => throw null; + public static int IndexOfAnyNewLine(this string str, int startIndex, out int newLineLength) => throw null; + public static int IndexOfCaseInsensitive(string source, string value, int startIndex, int count) => throw null; + public static int IndexOfCaseInsensitive(string source, string value, int startIndex) => throw null; + public static int IndexOfCaseInsensitive(string source, string value) => throw null; + public static string InternedIfPossible(string str) => throw null; + public static bool IsAnyNewLine(this string str, int index, out int newLineLength) => throw null; + public static bool IsBackticksEnclosed(string identifier) => throw null; + public static bool IsEmpty(string str) => throw null; + public static bool IsNotEmpty(string str) => throw null; + public static string Join(string separator, System.Collections.IEnumerable objects) => throw null; + public static int LastIndexOfCaseInsensitive(string source, string value) => throw null; + public static int LastIndexOfLetter(string str) => throw null; + public static string LinesToString(this string[] text) => throw null; + public static string MoveAndToBeginning(string filter) => throw null; + public static string[] Multiply(string[] strings, string placeholder, string[] replacements) => throw null; + public static string[] Multiply(string str, System.Collections.Generic.IEnumerable placeholders, System.Collections.Generic.IEnumerable replacements) => throw null; + public const string OpenParen = default; + public static string[] ParseFilterParameterName(string filterParameterName) => throw null; + public static string[] Prefix(string[] columns, string prefix) => throw null; + public static string PurgeBackticksEnclosing(string identifier) => throw null; + public static string Qualifier(string qualifiedName) => throw null; + public static string[] Qualify(string prefix, string[] names) => throw null; + public static string Qualify(string prefix, string name) => throw null; + public static string Repeat(string str, int times) => throw null; + public static string Replace(string template, string placeholder, string replacement, bool wholeWords) => throw null; + public static string Replace(string template, string placeholder, string replacement) => throw null; + public static string ReplaceOnce(string template, string placeholder, string replacement) => throw null; + public static string ReplaceWholeWord(this string template, string placeholder, string replacement) => throw null; + public static string Root(string qualifiedName) => throw null; + public const System.Char SingleQuote = default; + public static string[] Split(string separators, string list, bool include) => throw null; + public static string[] Split(string separators, string list) => throw null; + public const string SqlParameter = default; + public static bool StartsWithCaseInsensitive(string source, string prefix) => throw null; + public static string[] Suffix(string[] columns, string suffix) => throw null; + public static string Suffix(string name, string suffix) => throw null; + public static string ToLowerCase(string str) => throw null; + public static string ToString(object[] array) => throw null; + public static string ToUpperCase(string str) => throw null; + public static string Truncate(string str, int length) => throw null; + public const System.Char Underscore = default; + public static string Unqualify(string qualifiedName, string seperator) => throw null; + public static string Unqualify(string qualifiedName) => throw null; + public static string UnqualifyEntityName(string entityName) => throw null; + public static string Unroot(string qualifiedName) => throw null; + public const string WhiteSpace = default; + } + + // Generated from `NHibernate.Util.StringTokenizer` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class StringTokenizer : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public StringTokenizer(string str, string delim, bool returnDelims) => throw null; + public StringTokenizer(string str, string delim) => throw null; + public StringTokenizer(string str) => throw null; + } + + // Generated from `NHibernate.Util.TypeExtensions` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public static class TypeExtensions + { + public static bool IsEnumerableOfT(this System.Type type) => throw null; + public static bool IsNonPrimitive(this System.Type type) => throw null; + public static bool IsNullable(this System.Type type) => throw null; + public static bool IsNullableOrReference(this System.Type type) => throw null; + public static bool IsPrimitive(this System.Type type) => throw null; + public static System.Type NullableOf(this System.Type type) => throw null; + } + + // Generated from `NHibernate.Util.TypeNameParser` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class TypeNameParser + { + public NHibernate.Util.AssemblyQualifiedTypeName MakeGenericType(NHibernate.Util.AssemblyQualifiedTypeName qualifiedName, bool isArrayType, NHibernate.Util.AssemblyQualifiedTypeName[] typeArguments) => throw null; + public static NHibernate.Util.AssemblyQualifiedTypeName Parse(string type, string defaultNamespace, string defaultAssembly) => throw null; + public static NHibernate.Util.AssemblyQualifiedTypeName Parse(string type) => throw null; + public NHibernate.Util.AssemblyQualifiedTypeName ParseTypeName(string typeName) => throw null; + public TypeNameParser(string defaultNamespace, string defaultAssembly) => throw null; + } + + // Generated from `NHibernate.Util.UnmodifiableDictionary<,>` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class UnmodifiableDictionary : System.Collections.IEnumerable, System.Collections.Generic.IEnumerable>, System.Collections.Generic.IDictionary, System.Collections.Generic.ICollection> + { + public void Add(TKey key, TValue value) => throw null; + public void Add(System.Collections.Generic.KeyValuePair item) => throw null; + public void Clear() => throw null; + public bool Contains(System.Collections.Generic.KeyValuePair item) => throw null; + public bool ContainsKey(TKey key) => throw null; + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() => throw null; + public bool IsReadOnly { get => throw null; } + public TValue this[TKey key] { get => throw null; set => throw null; } + public System.Collections.Generic.ICollection Keys { get => throw null; } + public bool Remove(TKey key) => throw null; + public bool Remove(System.Collections.Generic.KeyValuePair item) => throw null; + public bool TryGetValue(TKey key, out TValue value) => throw null; + public UnmodifiableDictionary(System.Collections.Generic.IDictionary dictionary) => throw null; + public System.Collections.Generic.ICollection Values { get => throw null; } + } + + // Generated from `NHibernate.Util.WeakEnumerator` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WeakEnumerator : System.Collections.IEnumerator, System.Collections.IDictionaryEnumerator + { + public object Current { get => throw null; } + public System.Collections.DictionaryEntry Entry { get => throw null; } + public object Key { get => throw null; } + public bool MoveNext() => throw null; + public void Reset() => throw null; + public object Value { get => throw null; } + public WeakEnumerator(System.Collections.IDictionaryEnumerator innerEnumerator) => throw null; + } + + // Generated from `NHibernate.Util.WeakHashtable` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WeakHashtable : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection + { + public void Add(object key, object value) => throw null; + public void Clear() => throw null; + public bool Contains(object key) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IDictionaryEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public bool IsFixedSize { get => throw null; } + public bool IsReadOnly { get => throw null; } + public bool IsSynchronized { get => throw null; } + public object this[object key] { get => throw null; set => throw null; } + public System.Collections.ICollection Keys { get => throw null; } + public void Remove(object key) => throw null; + public void Scavenge() => throw null; + public object SyncRoot { get => throw null; } + public System.Collections.ICollection Values { get => throw null; } + public WeakHashtable() => throw null; + } + + // Generated from `NHibernate.Util.WeakRefWrapper` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class WeakRefWrapper : System.Runtime.Serialization.IDeserializationCallback + { + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public bool IsAlive { get => throw null; } + public void OnDeserialization(object sender) => throw null; + public object Target { get => throw null; } + public static object Unwrap(object value) => throw null; + public WeakRefWrapper(object target) => throw null; + public static NHibernate.Util.WeakRefWrapper Wrap(object value) => throw null; + } + + } +} +namespace System +{ + namespace Runtime + { + namespace CompilerServices + { + // Generated from `System.Runtime.CompilerServices.IgnoresAccessChecksToAttribute` in `NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4` + public class IgnoresAccessChecksToAttribute : System.Attribute + { + public string AssemblyName { get => throw null; } + public IgnoresAccessChecksToAttribute(string assemblyName) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.csproj b/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.csproj new file mode 100644 index 000000000000..618c2e10562e --- /dev/null +++ b/csharp/ql/test/resources/stubs/NHibernate/5.3.8/NHibernate.csproj @@ -0,0 +1,17 @@ + + + net5.0 + true + bin\ + false + + + + + + + + + + + diff --git a/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.cs b/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.cs new file mode 100644 index 000000000000..7f88424d24f0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.cs @@ -0,0 +1,128 @@ +// This file contains auto-generated code. + +namespace Remotion +{ + namespace Linq + { + namespace EagerFetching + { + // Generated from `Remotion.Linq.EagerFetching.FetchFilteringQueryModelVisitor` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchFilteringQueryModelVisitor : Remotion.Linq.QueryModelVisitorBase + { + protected FetchFilteringQueryModelVisitor() => throw null; + protected System.Collections.ObjectModel.ReadOnlyCollection FetchQueryModelBuilders { get => throw null; } + public static Remotion.Linq.EagerFetching.FetchQueryModelBuilder[] RemoveFetchRequestsFromQueryModel(Remotion.Linq.QueryModel queryModel) => throw null; + public override void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.FetchManyRequest` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchManyRequest : Remotion.Linq.EagerFetching.FetchRequestBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public FetchManyRequest(System.Reflection.MemberInfo relationMember) : base(default(System.Reflection.MemberInfo)) => throw null; + protected override void ModifyFetchQueryModel(Remotion.Linq.QueryModel fetchQueryModel) => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.FetchOneRequest` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchOneRequest : Remotion.Linq.EagerFetching.FetchRequestBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public FetchOneRequest(System.Reflection.MemberInfo relationMember) : base(default(System.Reflection.MemberInfo)) => throw null; + protected override void ModifyFetchQueryModel(Remotion.Linq.QueryModel fetchQueryModel) => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.FetchQueryModelBuilder` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchQueryModelBuilder + { + public Remotion.Linq.EagerFetching.FetchQueryModelBuilder[] CreateInnerBuilders() => throw null; + public FetchQueryModelBuilder(Remotion.Linq.EagerFetching.FetchRequestBase fetchRequest, Remotion.Linq.QueryModel queryModel, int resultOperatorPosition) => throw null; + public Remotion.Linq.EagerFetching.FetchRequestBase FetchRequest { get => throw null; set => throw null; } + public Remotion.Linq.QueryModel GetOrCreateFetchQueryModel() => throw null; + public int ResultOperatorPosition { get => throw null; set => throw null; } + public Remotion.Linq.QueryModel SourceItemQueryModel { get => throw null; set => throw null; } + } + + // Generated from `Remotion.Linq.EagerFetching.FetchRequestBase` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class FetchRequestBase : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public virtual Remotion.Linq.QueryModel CreateFetchQueryModel(Remotion.Linq.QueryModel sourceItemQueryModel) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + protected FetchRequestBase(System.Reflection.MemberInfo relationMember) => throw null; + protected System.Linq.Expressions.Expression GetFetchedMemberExpression(System.Linq.Expressions.Expression source) => throw null; + public Remotion.Linq.EagerFetching.FetchRequestBase GetOrAddInnerFetchRequest(Remotion.Linq.EagerFetching.FetchRequestBase fetchRequest) => throw null; + public System.Collections.Generic.IEnumerable InnerFetchRequests { get => throw null; } + protected abstract void ModifyFetchQueryModel(Remotion.Linq.QueryModel fetchQueryModel); + public System.Reflection.MemberInfo RelationMember { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.FetchRequestCollection` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchRequestCollection + { + public FetchRequestCollection() => throw null; + public System.Collections.Generic.IEnumerable FetchRequests { get => throw null; } + public Remotion.Linq.EagerFetching.FetchRequestBase GetOrAddFetchRequest(Remotion.Linq.EagerFetching.FetchRequestBase fetchRequest) => throw null; + } + + namespace Parsing + { + // Generated from `Remotion.Linq.EagerFetching.Parsing.FetchExpressionNodeBase` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class FetchExpressionNodeBase : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected FetchExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public System.Reflection.MemberInfo RelationMember { get => throw null; set => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.FetchManyExpressionNode` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchManyExpressionNode : Remotion.Linq.EagerFetching.Parsing.OuterFetchExpressionNodeBase + { + protected override Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest() => throw null; + public FetchManyExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.FetchOneExpressionNode` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FetchOneExpressionNode : Remotion.Linq.EagerFetching.Parsing.OuterFetchExpressionNodeBase + { + protected override Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest() => throw null; + public FetchOneExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.OuterFetchExpressionNodeBase` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class OuterFetchExpressionNodeBase : Remotion.Linq.EagerFetching.Parsing.FetchExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected abstract Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest(); + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected OuterFetchExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.ThenFetchExpressionNodeBase` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ThenFetchExpressionNodeBase : Remotion.Linq.EagerFetching.Parsing.FetchExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected abstract Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest(); + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected ThenFetchExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.ThenFetchManyExpressionNode` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ThenFetchManyExpressionNode : Remotion.Linq.EagerFetching.Parsing.ThenFetchExpressionNodeBase + { + protected override Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest() => throw null; + public ThenFetchManyExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.EagerFetching.Parsing.ThenFetchOneExpressionNode` in `Remotion.Linq.EagerFetching, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ThenFetchOneExpressionNode : Remotion.Linq.EagerFetching.Parsing.ThenFetchExpressionNodeBase + { + protected override Remotion.Linq.EagerFetching.FetchRequestBase CreateFetchRequest() => throw null; + public ThenFetchOneExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression relatedObjectSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + } + } + } +} diff --git a/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.csproj b/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.csproj new file mode 100644 index 000000000000..e0a19817ca4c --- /dev/null +++ b/csharp/ql/test/resources/stubs/Remotion.Linq.EagerFetching/2.2.0/Remotion.Linq.EagerFetching.csproj @@ -0,0 +1,13 @@ + + + net5.0 + true + bin\ + false + + + + + + + diff --git a/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.cs b/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.cs new file mode 100644 index 000000000000..0aac343f24ca --- /dev/null +++ b/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.cs @@ -0,0 +1,1954 @@ +// This file contains auto-generated code. + +namespace Remotion +{ + namespace Linq + { + // Generated from `Remotion.Linq.DefaultQueryProvider` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DefaultQueryProvider : Remotion.Linq.QueryProviderBase + { + public override System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + public DefaultQueryProvider(System.Type queryableType, Remotion.Linq.Parsing.Structure.IQueryParser queryParser, Remotion.Linq.IQueryExecutor executor) : base(default(Remotion.Linq.Parsing.Structure.IQueryParser), default(Remotion.Linq.IQueryExecutor)) => throw null; + public System.Type QueryableType { get => throw null; } + } + + // Generated from `Remotion.Linq.IQueryExecutor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IQueryExecutor + { + System.Collections.Generic.IEnumerable ExecuteCollection(Remotion.Linq.QueryModel queryModel); + T ExecuteScalar(Remotion.Linq.QueryModel queryModel); + T ExecuteSingle(Remotion.Linq.QueryModel queryModel, bool returnDefaultWhenEmpty); + } + + // Generated from `Remotion.Linq.IQueryModelVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IQueryModelVisitor + { + void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitGroupJoinClause(Remotion.Linq.Clauses.GroupJoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.GroupJoinClause groupJoinClause); + void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel); + void VisitOrderByClause(Remotion.Linq.Clauses.OrderByClause orderByClause, Remotion.Linq.QueryModel queryModel, int index); + void VisitOrdering(Remotion.Linq.Clauses.Ordering ordering, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause, int index); + void VisitQueryModel(Remotion.Linq.QueryModel queryModel); + void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index); + void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel); + void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, Remotion.Linq.QueryModel queryModel, int index); + } + + // Generated from `Remotion.Linq.QueryModel` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class QueryModel + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor) => throw null; + public System.Collections.ObjectModel.ObservableCollection BodyClauses { get => throw null; set => throw null; } + public Remotion.Linq.QueryModel Clone(Remotion.Linq.Clauses.QuerySourceMapping querySourceMapping) => throw null; + public Remotion.Linq.QueryModel Clone() => throw null; + public Remotion.Linq.QueryModel ConvertToSubQuery(string itemName) => throw null; + public Remotion.Linq.Clauses.StreamedData.IStreamedData Execute(Remotion.Linq.IQueryExecutor executor) => throw null; + public string GetNewName(string prefix) => throw null; + public Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo() => throw null; + public System.Type GetResultType() => throw null; + public Remotion.Linq.UniqueIdentifierGenerator GetUniqueIdentfierGenerator() => throw null; + public bool IsIdentityQuery() => throw null; + public Remotion.Linq.Clauses.MainFromClause MainFromClause { get => throw null; set => throw null; } + public QueryModel(Remotion.Linq.Clauses.MainFromClause mainFromClause, Remotion.Linq.Clauses.SelectClause selectClause) => throw null; + public System.Collections.ObjectModel.ObservableCollection ResultOperators { get => throw null; set => throw null; } + public System.Type ResultTypeOverride { get => throw null; set => throw null; } + public Remotion.Linq.Clauses.SelectClause SelectClause { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.QueryModelBuilder` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class QueryModelBuilder + { + public void AddClause(Remotion.Linq.Clauses.IClause clause) => throw null; + public void AddResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection BodyClauses { get => throw null; } + public Remotion.Linq.QueryModel Build() => throw null; + public Remotion.Linq.Clauses.MainFromClause MainFromClause { get => throw null; set => throw null; } + public QueryModelBuilder() => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection ResultOperators { get => throw null; } + public Remotion.Linq.Clauses.SelectClause SelectClause { get => throw null; set => throw null; } + } + + // Generated from `Remotion.Linq.QueryModelVisitorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class QueryModelVisitorBase : Remotion.Linq.IQueryModelVisitor + { + protected QueryModelVisitorBase() => throw null; + public virtual void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + protected virtual void VisitBodyClauses(System.Collections.ObjectModel.ObservableCollection bodyClauses, Remotion.Linq.QueryModel queryModel) => throw null; + public virtual void VisitGroupJoinClause(Remotion.Linq.Clauses.GroupJoinClause groupJoinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public virtual void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public virtual void VisitJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.GroupJoinClause groupJoinClause) => throw null; + public virtual void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + public virtual void VisitOrderByClause(Remotion.Linq.Clauses.OrderByClause orderByClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public virtual void VisitOrdering(Remotion.Linq.Clauses.Ordering ordering, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause, int index) => throw null; + protected virtual void VisitOrderings(System.Collections.ObjectModel.ObservableCollection orderings, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause) => throw null; + public virtual void VisitQueryModel(Remotion.Linq.QueryModel queryModel) => throw null; + public virtual void VisitResultOperator(Remotion.Linq.Clauses.ResultOperatorBase resultOperator, Remotion.Linq.QueryModel queryModel, int index) => throw null; + protected virtual void VisitResultOperators(System.Collections.ObjectModel.ObservableCollection resultOperators, Remotion.Linq.QueryModel queryModel) => throw null; + public virtual void VisitSelectClause(Remotion.Linq.Clauses.SelectClause selectClause, Remotion.Linq.QueryModel queryModel) => throw null; + public virtual void VisitWhereClause(Remotion.Linq.Clauses.WhereClause whereClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + } + + // Generated from `Remotion.Linq.QueryProviderBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class QueryProviderBase : System.Linq.IQueryProvider + { + public abstract System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression); + public System.Linq.IQueryable CreateQuery(System.Linq.Expressions.Expression expression) => throw null; + public virtual Remotion.Linq.Clauses.StreamedData.IStreamedData Execute(System.Linq.Expressions.Expression expression) => throw null; + object System.Linq.IQueryProvider.Execute(System.Linq.Expressions.Expression expression) => throw null; + TResult System.Linq.IQueryProvider.Execute(System.Linq.Expressions.Expression expression) => throw null; + public Remotion.Linq.IQueryExecutor Executor { get => throw null; } + public Remotion.Linq.Parsing.Structure.ExpressionTreeParser ExpressionTreeParser { get => throw null; } + public virtual Remotion.Linq.QueryModel GenerateQueryModel(System.Linq.Expressions.Expression expression) => throw null; + public Remotion.Linq.Parsing.Structure.IQueryParser QueryParser { get => throw null; } + protected QueryProviderBase(Remotion.Linq.Parsing.Structure.IQueryParser queryParser, Remotion.Linq.IQueryExecutor executor) => throw null; + } + + // Generated from `Remotion.Linq.QueryableBase<>` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class QueryableBase : System.Linq.IQueryable, System.Linq.IQueryable, System.Linq.IOrderedQueryable, System.Linq.IOrderedQueryable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable + { + public System.Type ElementType { get => throw null; } + public System.Linq.Expressions.Expression Expression { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerator GetEnumerator() => throw null; + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null; + public System.Linq.IQueryProvider Provider { get => throw null; } + protected QueryableBase(System.Linq.IQueryProvider provider, System.Linq.Expressions.Expression expression) => throw null; + protected QueryableBase(System.Linq.IQueryProvider provider) => throw null; + protected QueryableBase(Remotion.Linq.Parsing.Structure.IQueryParser queryParser, Remotion.Linq.IQueryExecutor executor) => throw null; + } + + // Generated from `Remotion.Linq.UniqueIdentifierGenerator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class UniqueIdentifierGenerator + { + public void AddKnownIdentifier(string identifier) => throw null; + public string GetUniqueIdentifier(string prefix) => throw null; + public void Reset() => throw null; + public UniqueIdentifierGenerator() => throw null; + } + + namespace Clauses + { + // Generated from `Remotion.Linq.Clauses.AdditionalFromClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AdditionalFromClause : Remotion.Linq.Clauses.FromClauseBase, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public AdditionalFromClause(string itemName, System.Type itemType, System.Linq.Expressions.Expression fromExpression) : base(default(string), default(System.Type), default(System.Linq.Expressions.Expression)) => throw null; + public Remotion.Linq.Clauses.AdditionalFromClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.CloneContext` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CloneContext + { + public CloneContext(Remotion.Linq.Clauses.QuerySourceMapping querySourceMapping) => throw null; + public Remotion.Linq.Clauses.QuerySourceMapping QuerySourceMapping { get => throw null; set => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.FromClauseBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class FromClauseBase : Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IFromClause, Remotion.Linq.Clauses.IClause + { + public virtual void CopyFromSource(Remotion.Linq.Clauses.IFromClause source) => throw null; + internal FromClauseBase(string itemName, System.Type itemType, System.Linq.Expressions.Expression fromExpression) => throw null; + public System.Linq.Expressions.Expression FromExpression { get => throw null; set => throw null; } + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public override string ToString() => throw null; + public virtual void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.GroupJoinClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class GroupJoinClause : Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public Remotion.Linq.Clauses.GroupJoinClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public GroupJoinClause(string itemName, System.Type itemType, Remotion.Linq.Clauses.JoinClause joinClause) => throw null; + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public Remotion.Linq.Clauses.JoinClause JoinClause { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.IBodyClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IBodyClause : Remotion.Linq.Clauses.IClause + { + void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index); + Remotion.Linq.Clauses.IBodyClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext); + } + + // Generated from `Remotion.Linq.Clauses.IClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IClause + { + void TransformExpressions(System.Func transformation); + } + + // Generated from `Remotion.Linq.Clauses.IFromClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IFromClause : Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IClause + { + void CopyFromSource(Remotion.Linq.Clauses.IFromClause source); + System.Linq.Expressions.Expression FromExpression { get; } + } + + // Generated from `Remotion.Linq.Clauses.IQuerySource` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IQuerySource + { + string ItemName { get; } + System.Type ItemType { get; } + } + + // Generated from `Remotion.Linq.Clauses.JoinClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class JoinClause : Remotion.Linq.Clauses.IQuerySource, Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.GroupJoinClause groupJoinClause) => throw null; + public Remotion.Linq.Clauses.JoinClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression InnerKeySelector { get => throw null; set => throw null; } + public System.Linq.Expressions.Expression InnerSequence { get => throw null; set => throw null; } + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public JoinClause(string itemName, System.Type itemType, System.Linq.Expressions.Expression innerSequence, System.Linq.Expressions.Expression outerKeySelector, System.Linq.Expressions.Expression innerKeySelector) => throw null; + public System.Linq.Expressions.Expression OuterKeySelector { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.MainFromClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MainFromClause : Remotion.Linq.Clauses.FromClauseBase + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel) => throw null; + public Remotion.Linq.Clauses.MainFromClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public MainFromClause(string itemName, System.Type itemType, System.Linq.Expressions.Expression fromExpression) : base(default(string), default(System.Type), default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.OrderByClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class OrderByClause : Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public Remotion.Linq.Clauses.OrderByClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public OrderByClause() => throw null; + public System.Collections.ObjectModel.ObservableCollection Orderings { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.Ordering` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class Ordering + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, Remotion.Linq.Clauses.OrderByClause orderByClause, int index) => throw null; + public Remotion.Linq.Clauses.Ordering Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression Expression { get => throw null; set => throw null; } + public Ordering(System.Linq.Expressions.Expression expression, Remotion.Linq.Clauses.OrderingDirection direction) => throw null; + public Remotion.Linq.Clauses.OrderingDirection OrderingDirection { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.OrderingDirection` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public enum OrderingDirection + { + Asc, + Desc, + } + + // Generated from `Remotion.Linq.Clauses.QuerySourceMapping` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class QuerySourceMapping + { + public void AddMapping(Remotion.Linq.Clauses.IQuerySource querySource, System.Linq.Expressions.Expression expression) => throw null; + public bool ContainsMapping(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public System.Linq.Expressions.Expression GetExpression(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public QuerySourceMapping() => throw null; + public void RemoveMapping(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public void ReplaceMapping(Remotion.Linq.Clauses.IQuerySource querySource, System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperatorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ResultOperatorBase + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + protected void CheckSequenceItemType(Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo inputInfo, System.Type expectedItemType) => throw null; + public abstract Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext); + public abstract Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.IStreamedData input); + protected T GetConstantValueFromExpression(string expressionName, System.Linq.Expressions.Expression expression) => throw null; + public abstract Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo); + protected object InvokeExecuteMethod(System.Reflection.MethodInfo method, object input) => throw null; + protected ResultOperatorBase() => throw null; + public abstract void TransformExpressions(System.Func transformation); + } + + // Generated from `Remotion.Linq.Clauses.SelectClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SelectClause : Remotion.Linq.Clauses.IClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel) => throw null; + public Remotion.Linq.Clauses.SelectClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo GetOutputDataInfo() => throw null; + public SelectClause(System.Linq.Expressions.Expression selector) => throw null; + public System.Linq.Expressions.Expression Selector { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.WhereClause` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class WhereClause : Remotion.Linq.Clauses.IClause, Remotion.Linq.Clauses.IBodyClause + { + public void Accept(Remotion.Linq.IQueryModelVisitor visitor, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public Remotion.Linq.Clauses.WhereClause Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + Remotion.Linq.Clauses.IBodyClause Remotion.Linq.Clauses.IBodyClause.Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression Predicate { get => throw null; set => throw null; } + public override string ToString() => throw null; + public void TransformExpressions(System.Func transformation) => throw null; + public WhereClause(System.Linq.Expressions.Expression predicate) => throw null; + } + + namespace ExpressionVisitors + { + // Generated from `Remotion.Linq.Clauses.ExpressionVisitors.AccessorFindingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AccessorFindingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.LambdaExpression FindAccessorLambda(System.Linq.Expressions.Expression searchedExpression, System.Linq.Expressions.Expression fullExpression, System.Linq.Expressions.ParameterExpression inputParameter) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + protected override System.Linq.Expressions.MemberAssignment VisitMemberAssignment(System.Linq.Expressions.MemberAssignment memberAssigment) => throw null; + protected override System.Linq.Expressions.MemberBinding VisitMemberBinding(System.Linq.Expressions.MemberBinding memberBinding) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ExpressionVisitors.CloningExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CloningExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression AdjustExpressionAfterCloning(System.Linq.Expressions.Expression expression, Remotion.Linq.Clauses.QuerySourceMapping querySourceMapping) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ExpressionVisitors.ReferenceReplacingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ReferenceReplacingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression ReplaceClauseReferences(System.Linq.Expressions.Expression expression, Remotion.Linq.Clauses.QuerySourceMapping querySourceMapping, bool throwOnUnmappedReferences) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ExpressionVisitors.ReverseResolvingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ReverseResolvingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.LambdaExpression ReverseResolve(System.Linq.Expressions.Expression itemExpression, System.Linq.Expressions.Expression resolvedExpression) => throw null; + public static System.Linq.Expressions.LambdaExpression ReverseResolveLambda(System.Linq.Expressions.Expression itemExpression, System.Linq.Expressions.LambdaExpression resolvedExpression, int parameterInsertionPosition) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + } + + } + namespace Expressions + { + // Generated from `Remotion.Linq.Clauses.Expressions.IPartialEvaluationExceptionExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IPartialEvaluationExceptionExpressionVisitor + { + System.Linq.Expressions.Expression VisitPartialEvaluationException(Remotion.Linq.Clauses.Expressions.PartialEvaluationExceptionExpression partialEvaluationExceptionExpression); + } + + // Generated from `Remotion.Linq.Clauses.Expressions.IVBSpecificExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IVBSpecificExpressionVisitor + { + System.Linq.Expressions.Expression VisitVBStringComparison(Remotion.Linq.Clauses.Expressions.VBStringComparisonExpression vbStringComparisonExpression); + } + + // Generated from `Remotion.Linq.Clauses.Expressions.PartialEvaluationExceptionExpression` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class PartialEvaluationExceptionExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool CanReduce { get => throw null; } + public System.Linq.Expressions.Expression EvaluatedExpression { get => throw null; } + public System.Exception Exception { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public PartialEvaluationExceptionExpression(System.Exception exception, System.Linq.Expressions.Expression evaluatedExpression) => throw null; + public override System.Linq.Expressions.Expression Reduce() => throw null; + public override string ToString() => throw null; + public override System.Type Type { get => throw null; } + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class QuerySourceReferenceExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool Equals(object obj) => throw null; + public override int GetHashCode() => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public QuerySourceReferenceExpression(Remotion.Linq.Clauses.IQuerySource querySource) => throw null; + public Remotion.Linq.Clauses.IQuerySource ReferencedQuerySource { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override System.Type Type { get => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.Expressions.SubQueryExpression` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SubQueryExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public Remotion.Linq.QueryModel QueryModel { get => throw null; set => throw null; } + public SubQueryExpression(Remotion.Linq.QueryModel queryModel) => throw null; + public override string ToString() => throw null; + public override System.Type Type { get => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.Expressions.VBStringComparisonExpression` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class VBStringComparisonExpression : System.Linq.Expressions.Expression + { + protected internal override System.Linq.Expressions.Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + public override bool CanReduce { get => throw null; } + public System.Linq.Expressions.Expression Comparison { get => throw null; } + public override System.Linq.Expressions.ExpressionType NodeType { get => throw null; } + public override System.Linq.Expressions.Expression Reduce() => throw null; + public bool TextCompare { get => throw null; } + public override string ToString() => throw null; + public override System.Type Type { get => throw null; } + public VBStringComparisonExpression(System.Linq.Expressions.Expression comparison, bool textCompare) => throw null; + protected internal override System.Linq.Expressions.Expression VisitChildren(System.Linq.Expressions.ExpressionVisitor visitor) => throw null; + } + + } + namespace ResultOperators + { + // Generated from `Remotion.Linq.Clauses.ResultOperators.AggregateFromSeedResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AggregateFromSeedResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public AggregateFromSeedResultOperator(System.Linq.Expressions.Expression seed, System.Linq.Expressions.LambdaExpression func, System.Linq.Expressions.LambdaExpression optionalResultSelector) => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteAggregateInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Linq.Expressions.LambdaExpression Func { get => throw null; set => throw null; } + public T GetConstantSeed() => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public System.Linq.Expressions.LambdaExpression OptionalResultSelector { get => throw null; set => throw null; } + public System.Linq.Expressions.Expression Seed { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.AggregateResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AggregateResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public AggregateResultOperator(System.Linq.Expressions.LambdaExpression func) => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Linq.Expressions.LambdaExpression Func { get => throw null; set => throw null; } + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.AllResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AllResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public AllResultOperator(System.Linq.Expressions.Expression predicate) => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public System.Linq.Expressions.Expression Predicate { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.AnyResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AnyResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public AnyResultOperator() => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.AsQueryableResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AsQueryableResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public AsQueryableResultOperator() => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + // Generated from `Remotion.Linq.Clauses.ResultOperators.AsQueryableResultOperator+ISupportedByIQueryModelVistor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface ISupportedByIQueryModelVistor + { + } + + + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.AverageResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AverageResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public AverageResultOperator() => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.CastResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CastResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase + { + public System.Type CastItemType { get => throw null; set => throw null; } + public CastResultOperator(System.Type castItemType) => throw null; + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ChoiceResultOperatorBase : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + protected ChoiceResultOperatorBase(bool returnDefaultWhenEmpty) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + protected Remotion.Linq.Clauses.StreamedData.StreamedValueInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo inputSequenceInfo) => throw null; + public bool ReturnDefaultWhenEmpty { get => throw null; set => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ConcatResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ConcatResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase, Remotion.Linq.Clauses.IQuerySource + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public ConcatResultOperator(string itemName, System.Type itemType, System.Linq.Expressions.Expression source2) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Collections.IEnumerable GetConstantSource2() => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public System.Linq.Expressions.Expression Source2 { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ContainsResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ContainsResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public ContainsResultOperator(System.Linq.Expressions.Expression item) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public T GetConstantItem() => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public System.Linq.Expressions.Expression Item { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.CountResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CountResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public CountResultOperator() => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.DefaultIfEmptyResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DefaultIfEmptyResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public DefaultIfEmptyResultOperator(System.Linq.Expressions.Expression optionalDefaultValue) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public object GetConstantOptionalDefaultValue() => throw null; + public System.Linq.Expressions.Expression OptionalDefaultValue { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.DistinctResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DistinctResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public DistinctResultOperator() => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ExceptResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExceptResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public ExceptResultOperator(System.Linq.Expressions.Expression source2) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Collections.Generic.IEnumerable GetConstantSource2() => throw null; + public System.Linq.Expressions.Expression Source2 { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.FirstResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FirstResultOperator : Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public FirstResultOperator(bool returnDefaultWhenEmpty) : base(default(bool)) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.GroupResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class GroupResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase, Remotion.Linq.Clauses.IQuerySource + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression ElementSelector { get => throw null; set => throw null; } + public Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteGroupingInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public GroupResultOperator(string itemName, System.Linq.Expressions.Expression keySelector, System.Linq.Expressions.Expression elementSelector) => throw null; + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; } + public System.Linq.Expressions.Expression KeySelector { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.IntersectResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class IntersectResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Collections.Generic.IEnumerable GetConstantSource2() => throw null; + public IntersectResultOperator(System.Linq.Expressions.Expression source2) => throw null; + public System.Linq.Expressions.Expression Source2 { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.LastResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class LastResultOperator : Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public LastResultOperator(bool returnDefaultWhenEmpty) : base(default(bool)) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.LongCountResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class LongCountResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public LongCountResultOperator() => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.MaxResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MaxResultOperator : Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public MaxResultOperator() : base(default(bool)) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.MinResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MinResultOperator : Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public MinResultOperator() : base(default(bool)) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.OfTypeResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class OfTypeResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public OfTypeResultOperator(System.Type searchedItemType) => throw null; + public System.Type SearchedItemType { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ReverseResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ReverseResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public ReverseResultOperator() => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class SequenceFromSequenceResultOperatorBase : Remotion.Linq.Clauses.ResultOperatorBase + { + public override Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.IStreamedData input) => throw null; + public abstract Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input); + protected SequenceFromSequenceResultOperatorBase() => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class SequenceTypePreservingResultOperatorBase : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + protected Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo inputSequenceInfo) => throw null; + protected SequenceTypePreservingResultOperatorBase() => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.SingleResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SingleResultOperator : Remotion.Linq.Clauses.ResultOperators.ChoiceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public SingleResultOperator(bool returnDefaultWhenEmpty) : base(default(bool)) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.SkipResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SkipResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression Count { get => throw null; set => throw null; } + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public int GetConstantCount() => throw null; + public SkipResultOperator(System.Linq.Expressions.Expression count) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.SumResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SumResultOperator : Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public SumResultOperator() => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.TakeResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TakeResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceTypePreservingResultOperatorBase + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public System.Linq.Expressions.Expression Count { get => throw null; set => throw null; } + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public int GetConstantCount() => throw null; + public TakeResultOperator(System.Linq.Expressions.Expression count) => throw null; + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.UnionResultOperator` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class UnionResultOperator : Remotion.Linq.Clauses.ResultOperators.SequenceFromSequenceResultOperatorBase, Remotion.Linq.Clauses.IQuerySource + { + public override Remotion.Linq.Clauses.ResultOperatorBase Clone(Remotion.Linq.Clauses.CloneContext cloneContext) => throw null; + public override Remotion.Linq.Clauses.StreamedData.StreamedSequence ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence input) => throw null; + public System.Collections.IEnumerable GetConstantSource2() => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo GetOutputDataInfo(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo inputInfo) => throw null; + public string ItemName { get => throw null; set => throw null; } + public System.Type ItemType { get => throw null; set => throw null; } + public System.Linq.Expressions.Expression Source2 { get => throw null; set => throw null; } + public override string ToString() => throw null; + public override void TransformExpressions(System.Func transformation) => throw null; + public UnionResultOperator(string itemName, System.Type itemType, System.Linq.Expressions.Expression source2) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.ResultOperators.ValueFromSequenceResultOperatorBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ValueFromSequenceResultOperatorBase : Remotion.Linq.Clauses.ResultOperatorBase + { + public override Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.IStreamedData input) => throw null; + public abstract Remotion.Linq.Clauses.StreamedData.StreamedValue ExecuteInMemory(Remotion.Linq.Clauses.StreamedData.StreamedSequence sequence); + protected ValueFromSequenceResultOperatorBase() => throw null; + } + + } + namespace StreamedData + { + // Generated from `Remotion.Linq.Clauses.StreamedData.IStreamedData` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IStreamedData + { + Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo DataInfo { get; } + object Value { get; } + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IStreamedDataInfo : System.IEquatable + { + Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo AdjustDataType(System.Type dataType); + System.Type DataType { get; } + Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor); + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedScalarValueInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class StreamedScalarValueInfo : Remotion.Linq.Clauses.StreamedData.StreamedValueInfo + { + protected override Remotion.Linq.Clauses.StreamedData.StreamedValueInfo CloneWithNewDataType(System.Type dataType) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public object ExecuteScalarQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public StreamedScalarValueInfo(System.Type dataType) : base(default(System.Type)) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedSequence` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class StreamedSequence : Remotion.Linq.Clauses.StreamedData.IStreamedData + { + public Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo DataInfo { get => throw null; set => throw null; } + Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo Remotion.Linq.Clauses.StreamedData.IStreamedData.DataInfo { get => throw null; } + public System.Collections.Generic.IEnumerable GetTypedSequence() => throw null; + public System.Collections.IEnumerable Sequence { get => throw null; set => throw null; } + public StreamedSequence(System.Collections.IEnumerable sequence, Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo streamedSequenceInfo) => throw null; + object Remotion.Linq.Clauses.StreamedData.IStreamedData.Value { get => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedSequenceInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class StreamedSequenceInfo : System.IEquatable, Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo + { + public Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo AdjustDataType(System.Type dataType) => throw null; + public System.Type DataType { get => throw null; set => throw null; } + public override bool Equals(object obj) => throw null; + public bool Equals(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo obj) => throw null; + public System.Collections.IEnumerable ExecuteCollectionQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public override int GetHashCode() => throw null; + public System.Linq.Expressions.Expression ItemExpression { get => throw null; set => throw null; } + public System.Type ResultItemType { get => throw null; set => throw null; } + public StreamedSequenceInfo(System.Type dataType, System.Linq.Expressions.Expression itemExpression) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedSingleValueInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class StreamedSingleValueInfo : Remotion.Linq.Clauses.StreamedData.StreamedValueInfo + { + protected override Remotion.Linq.Clauses.StreamedData.StreamedValueInfo CloneWithNewDataType(System.Type dataType) => throw null; + public override bool Equals(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo obj) => throw null; + public override Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public object ExecuteSingleQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor) => throw null; + public override int GetHashCode() => throw null; + public bool ReturnDefaultWhenEmpty { get => throw null; } + public StreamedSingleValueInfo(System.Type dataType, bool returnDefaultWhenEmpty) : base(default(System.Type)) => throw null; + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedValue` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class StreamedValue : Remotion.Linq.Clauses.StreamedData.IStreamedData + { + public Remotion.Linq.Clauses.StreamedData.StreamedValueInfo DataInfo { get => throw null; set => throw null; } + Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo Remotion.Linq.Clauses.StreamedData.IStreamedData.DataInfo { get => throw null; } + public T GetTypedValue() => throw null; + public StreamedValue(object value, Remotion.Linq.Clauses.StreamedData.StreamedValueInfo streamedValueInfo) => throw null; + public object Value { get => throw null; set => throw null; } + } + + // Generated from `Remotion.Linq.Clauses.StreamedData.StreamedValueInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class StreamedValueInfo : System.IEquatable, Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo + { + public virtual Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo AdjustDataType(System.Type dataType) => throw null; + protected abstract Remotion.Linq.Clauses.StreamedData.StreamedValueInfo CloneWithNewDataType(System.Type dataType); + public System.Type DataType { get => throw null; set => throw null; } + public virtual bool Equals(Remotion.Linq.Clauses.StreamedData.IStreamedDataInfo obj) => throw null; + public override bool Equals(object obj) => throw null; + public abstract Remotion.Linq.Clauses.StreamedData.IStreamedData ExecuteQueryModel(Remotion.Linq.QueryModel queryModel, Remotion.Linq.IQueryExecutor executor); + public override int GetHashCode() => throw null; + internal StreamedValueInfo(System.Type dataType) => throw null; + } + + } + } + namespace Parsing + { + // Generated from `Remotion.Linq.Parsing.ParserException` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ParserException : System.Exception + { + } + + // Generated from `Remotion.Linq.Parsing.RelinqExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class RelinqExpressionVisitor : System.Linq.Expressions.ExpressionVisitor + { + public static System.Collections.Generic.IEnumerable AdjustArgumentsForNewExpression(System.Collections.Generic.IList arguments, System.Collections.Generic.IList members) => throw null; + protected RelinqExpressionVisitor() => throw null; + protected internal override System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal virtual System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ThrowingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ThrowingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + protected System.Linq.Expressions.Expression BaseVisitBinary(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitBlock(System.Linq.Expressions.BlockExpression expression) => throw null; + protected System.Linq.Expressions.CatchBlock BaseVisitCatchBlock(System.Linq.Expressions.CatchBlock expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitConditional(System.Linq.Expressions.ConditionalExpression arg) => throw null; + protected System.Linq.Expressions.Expression BaseVisitConstant(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitDebugInfo(System.Linq.Expressions.DebugInfoExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitDefault(System.Linq.Expressions.DefaultExpression expression) => throw null; + protected System.Linq.Expressions.ElementInit BaseVisitElementInit(System.Linq.Expressions.ElementInit elementInit) => throw null; + protected System.Linq.Expressions.Expression BaseVisitExtension(System.Linq.Expressions.Expression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitGoto(System.Linq.Expressions.GotoExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitIndex(System.Linq.Expressions.IndexExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitInvocation(System.Linq.Expressions.InvocationExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitLabel(System.Linq.Expressions.LabelExpression expression) => throw null; + protected System.Linq.Expressions.LabelTarget BaseVisitLabelTarget(System.Linq.Expressions.LabelTarget expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitLambda(System.Linq.Expressions.Expression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitListInit(System.Linq.Expressions.ListInitExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitLoop(System.Linq.Expressions.LoopExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitMember(System.Linq.Expressions.MemberExpression expression) => throw null; + protected System.Linq.Expressions.MemberAssignment BaseVisitMemberAssignment(System.Linq.Expressions.MemberAssignment memberAssigment) => throw null; + protected System.Linq.Expressions.MemberBinding BaseVisitMemberBinding(System.Linq.Expressions.MemberBinding expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitMemberInit(System.Linq.Expressions.MemberInitExpression expression) => throw null; + protected System.Linq.Expressions.MemberListBinding BaseVisitMemberListBinding(System.Linq.Expressions.MemberListBinding listBinding) => throw null; + protected System.Linq.Expressions.MemberMemberBinding BaseVisitMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding binding) => throw null; + protected System.Linq.Expressions.Expression BaseVisitMethodCall(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitNewArray(System.Linq.Expressions.NewArrayExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitParameter(System.Linq.Expressions.ParameterExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitRuntimeVariables(System.Linq.Expressions.RuntimeVariablesExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitSwitch(System.Linq.Expressions.SwitchExpression expression) => throw null; + protected System.Linq.Expressions.SwitchCase BaseVisitSwitchCase(System.Linq.Expressions.SwitchCase expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitTry(System.Linq.Expressions.TryExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression expression) => throw null; + protected System.Linq.Expressions.Expression BaseVisitUnary(System.Linq.Expressions.UnaryExpression expression) => throw null; + protected abstract System.Exception CreateUnhandledItemException(T unhandledItem, string visitMethod); + protected ThrowingExpressionVisitor() => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBlock(System.Linq.Expressions.BlockExpression expression) => throw null; + protected override System.Linq.Expressions.CatchBlock VisitCatchBlock(System.Linq.Expressions.CatchBlock expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConditional(System.Linq.Expressions.ConditionalExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConstant(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitDebugInfo(System.Linq.Expressions.DebugInfoExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitDefault(System.Linq.Expressions.DefaultExpression expression) => throw null; + protected override System.Linq.Expressions.ElementInit VisitElementInit(System.Linq.Expressions.ElementInit elementInit) => throw null; + protected internal override System.Linq.Expressions.Expression VisitExtension(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitGoto(System.Linq.Expressions.GotoExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitIndex(System.Linq.Expressions.IndexExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitInvocation(System.Linq.Expressions.InvocationExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLabel(System.Linq.Expressions.LabelExpression expression) => throw null; + protected override System.Linq.Expressions.LabelTarget VisitLabelTarget(System.Linq.Expressions.LabelTarget expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLambda(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitListInit(System.Linq.Expressions.ListInitExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLoop(System.Linq.Expressions.LoopExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMember(System.Linq.Expressions.MemberExpression expression) => throw null; + protected override System.Linq.Expressions.MemberAssignment VisitMemberAssignment(System.Linq.Expressions.MemberAssignment memberAssigment) => throw null; + protected override System.Linq.Expressions.MemberBinding VisitMemberBinding(System.Linq.Expressions.MemberBinding expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMemberInit(System.Linq.Expressions.MemberInitExpression expression) => throw null; + protected override System.Linq.Expressions.MemberListBinding VisitMemberListBinding(System.Linq.Expressions.MemberListBinding listBinding) => throw null; + protected override System.Linq.Expressions.MemberMemberBinding VisitMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding binding) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNewArray(System.Linq.Expressions.NewArrayExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitParameter(System.Linq.Expressions.ParameterExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitQuerySourceReference(Remotion.Linq.Clauses.Expressions.QuerySourceReferenceExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitRuntimeVariables(System.Linq.Expressions.RuntimeVariablesExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSwitch(System.Linq.Expressions.SwitchExpression expression) => throw null; + protected override System.Linq.Expressions.SwitchCase VisitSwitchCase(System.Linq.Expressions.SwitchCase expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitTry(System.Linq.Expressions.TryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression expression) => throw null; + protected virtual TResult VisitUnhandledItem(TItem unhandledItem, string visitMethod, System.Func baseBehavior) where TItem : TResult => throw null; + protected virtual System.Linq.Expressions.Expression VisitUnknownStandardExpression(System.Linq.Expressions.Expression expression, string visitMethod, System.Func baseBehavior) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.TupleExpressionBuilder` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public static class TupleExpressionBuilder + { + public static System.Linq.Expressions.Expression AggregateExpressionsIntoTuple(System.Collections.Generic.IEnumerable expressions) => throw null; + public static System.Collections.Generic.IEnumerable GetExpressionsFromTuple(System.Linq.Expressions.Expression tupleExpression) => throw null; + } + + namespace ExpressionVisitors + { + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.MultiReplacingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MultiReplacingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression Replace(System.Collections.Generic.IDictionary expressionMapping, System.Linq.Expressions.Expression sourceTree) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.PartialEvaluatingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class PartialEvaluatingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression EvaluateIndependentSubtrees(System.Linq.Expressions.Expression expressionTree, Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter evaluatableExpressionFilter) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.ReplacingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ReplacingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression Replace(System.Linq.Expressions.Expression replacedExpression, System.Linq.Expressions.Expression replacementExpression, System.Linq.Expressions.Expression sourceTree) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.SubQueryFindingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SubQueryFindingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree, Remotion.Linq.Parsing.Structure.INodeTypeProvider nodeTypeProvider) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TransformingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TransformingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression Transform(System.Linq.Expressions.Expression expression, Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider tranformationProvider) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TransparentIdentifierRemovingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TransparentIdentifierRemovingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor + { + public static System.Linq.Expressions.Expression ReplaceTransparentIdentifiers(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMember(System.Linq.Expressions.MemberExpression memberExpression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression expression) => throw null; + } + + namespace MemberBindings + { + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.FieldInfoBinding` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FieldInfoBinding : Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MemberBinding + { + public FieldInfoBinding(System.Reflection.FieldInfo boundMember, System.Linq.Expressions.Expression associatedExpression) : base(default(System.Reflection.MemberInfo), default(System.Linq.Expressions.Expression)) => throw null; + public override bool MatchesReadAccess(System.Reflection.MemberInfo member) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MemberBinding` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class MemberBinding + { + public System.Linq.Expressions.Expression AssociatedExpression { get => throw null; } + public static Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MemberBinding Bind(System.Reflection.MemberInfo boundMember, System.Linq.Expressions.Expression associatedExpression) => throw null; + public System.Reflection.MemberInfo BoundMember { get => throw null; } + public abstract bool MatchesReadAccess(System.Reflection.MemberInfo member); + public MemberBinding(System.Reflection.MemberInfo boundMember, System.Linq.Expressions.Expression associatedExpression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MethodInfoBinding` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MethodInfoBinding : Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MemberBinding + { + public override bool MatchesReadAccess(System.Reflection.MemberInfo readMember) => throw null; + public MethodInfoBinding(System.Reflection.MethodInfo boundMember, System.Linq.Expressions.Expression associatedExpression) : base(default(System.Reflection.MemberInfo), default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.PropertyInfoBinding` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class PropertyInfoBinding : Remotion.Linq.Parsing.ExpressionVisitors.MemberBindings.MemberBinding + { + public override bool MatchesReadAccess(System.Reflection.MemberInfo member) => throw null; + public PropertyInfoBinding(System.Reflection.PropertyInfo boundMember, System.Linq.Expressions.Expression associatedExpression) : base(default(System.Reflection.MemberInfo), default(System.Linq.Expressions.Expression)) => throw null; + } + + } + namespace Transformation + { + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.ExpressionTransformation` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public delegate System.Linq.Expressions.Expression ExpressionTransformation(System.Linq.Expressions.Expression expression); + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.ExpressionTransformerRegistry` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExpressionTransformerRegistry : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider + { + public static Remotion.Linq.Parsing.ExpressionVisitors.Transformation.ExpressionTransformerRegistry CreateDefault() => throw null; + public ExpressionTransformerRegistry() => throw null; + public Remotion.Linq.Parsing.ExpressionVisitors.Transformation.ExpressionTransformation[] GetAllTransformations(System.Linq.Expressions.ExpressionType expressionType) => throw null; + public System.Collections.Generic.IEnumerable GetTransformations(System.Linq.Expressions.Expression expression) => throw null; + public void Register(Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer transformer) where T : System.Linq.Expressions.Expression => throw null; + public int RegisteredTransformerCount { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IExpressionTranformationProvider + { + System.Collections.Generic.IEnumerable GetTransformations(System.Linq.Expressions.Expression expression); + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer<>` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IExpressionTransformer where T : System.Linq.Expressions.Expression + { + System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get; } + System.Linq.Expressions.Expression Transform(T expression); + } + + namespace PredefinedTransformations + { + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.AttributeEvaluatingExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AttributeEvaluatingExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public AttributeEvaluatingExpressionTransformer() => throw null; + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.AttributeEvaluatingExpressionTransformer+IMethodCallExpressionTransformerAttribute` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IMethodCallExpressionTransformerAttribute + { + Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer GetExpressionTransformer(System.Linq.Expressions.MethodCallExpression expression); + } + + + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.Expression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.DictionaryEntryNewExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DictionaryEntryNewExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.MemberAddingNewExpressionTransformerBase + { + protected override bool CanAddMembers(System.Type instantiatedType, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + public DictionaryEntryNewExpressionTransformer() => throw null; + protected override System.Reflection.MemberInfo[] GetMembers(System.Reflection.ConstructorInfo constructorInfo, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.InvocationOfLambdaExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class InvocationOfLambdaExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public InvocationOfLambdaExpressionTransformer() => throw null; + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.InvocationExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.KeyValuePairNewExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class KeyValuePairNewExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.MemberAddingNewExpressionTransformerBase + { + protected override bool CanAddMembers(System.Type instantiatedType, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + protected override System.Reflection.MemberInfo[] GetMembers(System.Reflection.ConstructorInfo constructorInfo, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + public KeyValuePairNewExpressionTransformer() => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.MemberAddingNewExpressionTransformerBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class MemberAddingNewExpressionTransformerBase : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + protected abstract bool CanAddMembers(System.Type instantiatedType, System.Collections.ObjectModel.ReadOnlyCollection arguments); + protected System.Reflection.MemberInfo GetMemberForNewExpression(System.Type instantiatedType, string propertyName) => throw null; + protected abstract System.Reflection.MemberInfo[] GetMembers(System.Reflection.ConstructorInfo constructorInfo, System.Collections.ObjectModel.ReadOnlyCollection arguments); + protected MemberAddingNewExpressionTransformerBase() => throw null; + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.NewExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.MethodCallExpressionTransformerAttribute` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MethodCallExpressionTransformerAttribute : System.Attribute, Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.AttributeEvaluatingExpressionTransformer.IMethodCallExpressionTransformerAttribute + { + public Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer GetExpressionTransformer(System.Linq.Expressions.MethodCallExpression expression) => throw null; + public MethodCallExpressionTransformerAttribute(System.Type transformerType) => throw null; + public System.Type TransformerType { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.NullableValueTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class NullableValueTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public NullableValueTransformer() => throw null; + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.MemberExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.TupleNewExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TupleNewExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.MemberAddingNewExpressionTransformerBase + { + protected override bool CanAddMembers(System.Type instantiatedType, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + protected override System.Reflection.MemberInfo[] GetMembers(System.Reflection.ConstructorInfo constructorInfo, System.Collections.ObjectModel.ReadOnlyCollection arguments) => throw null; + public TupleNewExpressionTransformer() => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.VBCompareStringExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class VBCompareStringExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.BinaryExpression expression) => throw null; + public VBCompareStringExpressionTransformer() => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.Transformation.PredefinedTransformations.VBInformationIsNothingExpressionTransformer` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class VBInformationIsNothingExpressionTransformer : Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTransformer + { + public System.Linq.Expressions.ExpressionType[] SupportedExpressionTypes { get => throw null; } + public System.Linq.Expressions.Expression Transform(System.Linq.Expressions.MethodCallExpression expression) => throw null; + public VBInformationIsNothingExpressionTransformer() => throw null; + } + + } + } + namespace TreeEvaluation + { + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.EvaluatableExpressionFilterBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class EvaluatableExpressionFilterBase : Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter + { + protected EvaluatableExpressionFilterBase() => throw null; + public virtual bool IsEvaluatableBinary(System.Linq.Expressions.BinaryExpression node) => throw null; + public virtual bool IsEvaluatableBlock(System.Linq.Expressions.BlockExpression node) => throw null; + public virtual bool IsEvaluatableCatchBlock(System.Linq.Expressions.CatchBlock node) => throw null; + public virtual bool IsEvaluatableConditional(System.Linq.Expressions.ConditionalExpression node) => throw null; + public virtual bool IsEvaluatableConstant(System.Linq.Expressions.ConstantExpression node) => throw null; + public virtual bool IsEvaluatableDebugInfo(System.Linq.Expressions.DebugInfoExpression node) => throw null; + public virtual bool IsEvaluatableDefault(System.Linq.Expressions.DefaultExpression node) => throw null; + public virtual bool IsEvaluatableElementInit(System.Linq.Expressions.ElementInit node) => throw null; + public virtual bool IsEvaluatableGoto(System.Linq.Expressions.GotoExpression node) => throw null; + public virtual bool IsEvaluatableIndex(System.Linq.Expressions.IndexExpression node) => throw null; + public virtual bool IsEvaluatableInvocation(System.Linq.Expressions.InvocationExpression node) => throw null; + public virtual bool IsEvaluatableLabel(System.Linq.Expressions.LabelExpression node) => throw null; + public virtual bool IsEvaluatableLabelTarget(System.Linq.Expressions.LabelTarget node) => throw null; + public virtual bool IsEvaluatableLambda(System.Linq.Expressions.LambdaExpression node) => throw null; + public virtual bool IsEvaluatableListInit(System.Linq.Expressions.ListInitExpression node) => throw null; + public virtual bool IsEvaluatableLoop(System.Linq.Expressions.LoopExpression node) => throw null; + public virtual bool IsEvaluatableMember(System.Linq.Expressions.MemberExpression node) => throw null; + public virtual bool IsEvaluatableMemberAssignment(System.Linq.Expressions.MemberAssignment node) => throw null; + public virtual bool IsEvaluatableMemberInit(System.Linq.Expressions.MemberInitExpression node) => throw null; + public virtual bool IsEvaluatableMemberListBinding(System.Linq.Expressions.MemberListBinding node) => throw null; + public virtual bool IsEvaluatableMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding node) => throw null; + public virtual bool IsEvaluatableMethodCall(System.Linq.Expressions.MethodCallExpression node) => throw null; + public virtual bool IsEvaluatableNew(System.Linq.Expressions.NewExpression node) => throw null; + public virtual bool IsEvaluatableNewArray(System.Linq.Expressions.NewArrayExpression node) => throw null; + public virtual bool IsEvaluatableSwitch(System.Linq.Expressions.SwitchExpression node) => throw null; + public virtual bool IsEvaluatableSwitchCase(System.Linq.Expressions.SwitchCase node) => throw null; + public virtual bool IsEvaluatableTry(System.Linq.Expressions.TryExpression node) => throw null; + public virtual bool IsEvaluatableTypeBinary(System.Linq.Expressions.TypeBinaryExpression node) => throw null; + public virtual bool IsEvaluatableUnary(System.Linq.Expressions.UnaryExpression node) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.EvaluatableTreeFindingExpressionVisitor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class EvaluatableTreeFindingExpressionVisitor : Remotion.Linq.Parsing.RelinqExpressionVisitor, Remotion.Linq.Clauses.Expressions.IPartialEvaluationExceptionExpressionVisitor + { + public static Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.PartialEvaluationInfo Analyze(System.Linq.Expressions.Expression expressionTree, Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter evaluatableExpressionFilter) => throw null; + public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBinary(System.Linq.Expressions.BinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitBlock(System.Linq.Expressions.BlockExpression expression) => throw null; + protected override System.Linq.Expressions.CatchBlock VisitCatchBlock(System.Linq.Expressions.CatchBlock node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConditional(System.Linq.Expressions.ConditionalExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitConstant(System.Linq.Expressions.ConstantExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitDebugInfo(System.Linq.Expressions.DebugInfoExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitDefault(System.Linq.Expressions.DefaultExpression expression) => throw null; + protected override System.Linq.Expressions.ElementInit VisitElementInit(System.Linq.Expressions.ElementInit node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitGoto(System.Linq.Expressions.GotoExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitIndex(System.Linq.Expressions.IndexExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitInvocation(System.Linq.Expressions.InvocationExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLabel(System.Linq.Expressions.LabelExpression expression) => throw null; + protected override System.Linq.Expressions.LabelTarget VisitLabelTarget(System.Linq.Expressions.LabelTarget node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLambda(System.Linq.Expressions.Expression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitListInit(System.Linq.Expressions.ListInitExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitLoop(System.Linq.Expressions.LoopExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMember(System.Linq.Expressions.MemberExpression expression) => throw null; + protected override System.Linq.Expressions.MemberAssignment VisitMemberAssignment(System.Linq.Expressions.MemberAssignment node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMemberInit(System.Linq.Expressions.MemberInitExpression expression) => throw null; + protected override System.Linq.Expressions.MemberListBinding VisitMemberListBinding(System.Linq.Expressions.MemberListBinding node) => throw null; + protected override System.Linq.Expressions.MemberMemberBinding VisitMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNew(System.Linq.Expressions.NewExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitNewArray(System.Linq.Expressions.NewArrayExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitParameter(System.Linq.Expressions.ParameterExpression expression) => throw null; + public System.Linq.Expressions.Expression VisitPartialEvaluationException(Remotion.Linq.Clauses.Expressions.PartialEvaluationExceptionExpression partialEvaluationExceptionExpression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitSwitch(System.Linq.Expressions.SwitchExpression expression) => throw null; + protected override System.Linq.Expressions.SwitchCase VisitSwitchCase(System.Linq.Expressions.SwitchCase node) => throw null; + protected internal override System.Linq.Expressions.Expression VisitTry(System.Linq.Expressions.TryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitTypeBinary(System.Linq.Expressions.TypeBinaryExpression expression) => throw null; + protected internal override System.Linq.Expressions.Expression VisitUnary(System.Linq.Expressions.UnaryExpression expression) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IEvaluatableExpressionFilter + { + bool IsEvaluatableBinary(System.Linq.Expressions.BinaryExpression node); + bool IsEvaluatableBlock(System.Linq.Expressions.BlockExpression node); + bool IsEvaluatableCatchBlock(System.Linq.Expressions.CatchBlock node); + bool IsEvaluatableConditional(System.Linq.Expressions.ConditionalExpression node); + bool IsEvaluatableConstant(System.Linq.Expressions.ConstantExpression node); + bool IsEvaluatableDebugInfo(System.Linq.Expressions.DebugInfoExpression node); + bool IsEvaluatableDefault(System.Linq.Expressions.DefaultExpression node); + bool IsEvaluatableElementInit(System.Linq.Expressions.ElementInit node); + bool IsEvaluatableGoto(System.Linq.Expressions.GotoExpression node); + bool IsEvaluatableIndex(System.Linq.Expressions.IndexExpression node); + bool IsEvaluatableInvocation(System.Linq.Expressions.InvocationExpression node); + bool IsEvaluatableLabel(System.Linq.Expressions.LabelExpression node); + bool IsEvaluatableLabelTarget(System.Linq.Expressions.LabelTarget node); + bool IsEvaluatableLambda(System.Linq.Expressions.LambdaExpression node); + bool IsEvaluatableListInit(System.Linq.Expressions.ListInitExpression node); + bool IsEvaluatableLoop(System.Linq.Expressions.LoopExpression node); + bool IsEvaluatableMember(System.Linq.Expressions.MemberExpression node); + bool IsEvaluatableMemberAssignment(System.Linq.Expressions.MemberAssignment node); + bool IsEvaluatableMemberInit(System.Linq.Expressions.MemberInitExpression node); + bool IsEvaluatableMemberListBinding(System.Linq.Expressions.MemberListBinding node); + bool IsEvaluatableMemberMemberBinding(System.Linq.Expressions.MemberMemberBinding node); + bool IsEvaluatableMethodCall(System.Linq.Expressions.MethodCallExpression node); + bool IsEvaluatableNew(System.Linq.Expressions.NewExpression node); + bool IsEvaluatableNewArray(System.Linq.Expressions.NewArrayExpression node); + bool IsEvaluatableSwitch(System.Linq.Expressions.SwitchExpression node); + bool IsEvaluatableSwitchCase(System.Linq.Expressions.SwitchCase node); + bool IsEvaluatableTry(System.Linq.Expressions.TryExpression node); + bool IsEvaluatableTypeBinary(System.Linq.Expressions.TypeBinaryExpression node); + bool IsEvaluatableUnary(System.Linq.Expressions.UnaryExpression node); + } + + // Generated from `Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.PartialEvaluationInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class PartialEvaluationInfo + { + public void AddEvaluatableExpression(System.Linq.Expressions.Expression expression) => throw null; + public int Count { get => throw null; } + public bool IsEvaluatableExpression(System.Linq.Expressions.Expression expression) => throw null; + public PartialEvaluationInfo() => throw null; + } + + } + } + namespace Structure + { + // Generated from `Remotion.Linq.Parsing.Structure.ExpressionTreeParser` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExpressionTreeParser + { + public static Remotion.Linq.Parsing.Structure.ExpressionTreeParser CreateDefault() => throw null; + public static Remotion.Linq.Parsing.Structure.NodeTypeProviders.CompoundNodeTypeProvider CreateDefaultNodeTypeProvider() => throw null; + public static Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors.CompoundExpressionTreeProcessor CreateDefaultProcessor(Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider tranformationProvider, Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter evaluatableExpressionFilter = default(Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter)) => throw null; + public ExpressionTreeParser(Remotion.Linq.Parsing.Structure.INodeTypeProvider nodeTypeProvider, Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor processor) => throw null; + public System.Linq.Expressions.MethodCallExpression GetQueryOperatorExpression(System.Linq.Expressions.Expression expression) => throw null; + public Remotion.Linq.Parsing.Structure.INodeTypeProvider NodeTypeProvider { get => throw null; } + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode ParseTree(System.Linq.Expressions.Expression expressionTree) => throw null; + public Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor Processor { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IExpressionTreeProcessor + { + System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree); + } + + // Generated from `Remotion.Linq.Parsing.Structure.INodeTypeProvider` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface INodeTypeProvider + { + System.Type GetNodeType(System.Reflection.MethodInfo method); + bool IsRegistered(System.Reflection.MethodInfo method); + } + + // Generated from `Remotion.Linq.Parsing.Structure.IQueryParser` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IQueryParser + { + Remotion.Linq.QueryModel GetParsedQuery(System.Linq.Expressions.Expression expressionTreeRoot); + } + + // Generated from `Remotion.Linq.Parsing.Structure.MethodCallExpressionParser` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MethodCallExpressionParser + { + public MethodCallExpressionParser(Remotion.Linq.Parsing.Structure.INodeTypeProvider nodeTypeProvider) => throw null; + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Parse(string associatedIdentifier, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode source, System.Collections.Generic.IEnumerable arguments, System.Linq.Expressions.MethodCallExpression expressionToParse) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.QueryParser` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class QueryParser : Remotion.Linq.Parsing.Structure.IQueryParser + { + public static Remotion.Linq.Parsing.Structure.QueryParser CreateDefault() => throw null; + public Remotion.Linq.Parsing.Structure.ExpressionTreeParser ExpressionTreeParser { get => throw null; } + public Remotion.Linq.QueryModel GetParsedQuery(System.Linq.Expressions.Expression expressionTreeRoot) => throw null; + public Remotion.Linq.Parsing.Structure.INodeTypeProvider NodeTypeProvider { get => throw null; } + public Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor Processor { get => throw null; } + public QueryParser(Remotion.Linq.Parsing.Structure.ExpressionTreeParser expressionTreeParser) => throw null; + } + + namespace ExpressionTreeProcessors + { + // Generated from `Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors.CompoundExpressionTreeProcessor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CompoundExpressionTreeProcessor : Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor + { + public CompoundExpressionTreeProcessor(System.Collections.Generic.IEnumerable innerProcessors) => throw null; + public System.Collections.Generic.IList InnerProcessors { get => throw null; } + public System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors.NullExpressionTreeProcessor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class NullExpressionTreeProcessor : Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor + { + public NullExpressionTreeProcessor() => throw null; + public System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors.PartialEvaluatingExpressionTreeProcessor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class PartialEvaluatingExpressionTreeProcessor : Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor + { + public Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter Filter { get => throw null; } + public PartialEvaluatingExpressionTreeProcessor(Remotion.Linq.Parsing.ExpressionVisitors.TreeEvaluation.IEvaluatableExpressionFilter filter) => throw null; + public System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.ExpressionTreeProcessors.TransformingExpressionTreeProcessor` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TransformingExpressionTreeProcessor : Remotion.Linq.Parsing.Structure.IExpressionTreeProcessor + { + public System.Linq.Expressions.Expression Process(System.Linq.Expressions.Expression expressionTree) => throw null; + public Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider Provider { get => throw null; } + public TransformingExpressionTreeProcessor(Remotion.Linq.Parsing.ExpressionVisitors.Transformation.IExpressionTranformationProvider provider) => throw null; + } + + } + namespace IntermediateModel + { + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AggregateExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AggregateExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AggregateExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression func) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression Func { get => throw null; } + public System.Linq.Expressions.LambdaExpression GetResolvedFunc(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AggregateFromSeedExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AggregateFromSeedExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AggregateFromSeedExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression seed, System.Linq.Expressions.LambdaExpression func, System.Linq.Expressions.LambdaExpression optionalResultSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression Func { get => throw null; } + public System.Linq.Expressions.LambdaExpression GetResolvedFunc(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression OptionalResultSelector { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression Seed { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AllExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AllExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AllExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression predicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedPredicate(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression Predicate { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AnyExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AnyExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AnyExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AsQueryableExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AsQueryableExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AsQueryableExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.AverageExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class AverageExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public AverageExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.CastExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CastExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public CastExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public System.Type CastItemType { get => throw null; } + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public struct ClauseGenerationContext + { + public void AddContextInfo(Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode node, object contextInfo) => throw null; + public ClauseGenerationContext(Remotion.Linq.Parsing.Structure.INodeTypeProvider nodeTypeProvider) => throw null; + // Stub generator skipped constructor + public int Count { get => throw null; } + public object GetContextInfo(Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode node) => throw null; + public Remotion.Linq.Parsing.Structure.INodeTypeProvider NodeTypeProvider { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ConcatExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ConcatExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.QuerySourceSetOperationExpressionNodeBase + { + public ConcatExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression source2) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.Expression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateSpecificResultOperator() => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ContainsExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ContainsExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public ContainsExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression item) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethodNames() => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.Expression Item { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.CountExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CountExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public CountExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.DefaultIfEmptyExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DefaultIfEmptyExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public DefaultIfEmptyExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression optionalDefaultValue) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.Expression OptionalDefaultValue { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.DistinctExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class DistinctExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public DistinctExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ExceptExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExceptExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public ExceptExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression source2) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression Source2 { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ExpressionNodeInstantiationException` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExpressionNodeInstantiationException : System.Exception + { + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ExpressionResolver` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ExpressionResolver + { + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode CurrentNode { get => throw null; } + public ExpressionResolver(Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode currentNode) => throw null; + public System.Linq.Expressions.Expression GetResolvedExpression(System.Linq.Expressions.Expression unresolvedExpression, System.Linq.Expressions.ParameterExpression parameterToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.FirstExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class FirstExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public FirstExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.GroupByExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class GroupByExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase, Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedOptionalElementSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public GroupByExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector, System.Linq.Expressions.LambdaExpression optionalElementSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public System.Linq.Expressions.LambdaExpression KeySelector { get => throw null; } + public System.Linq.Expressions.LambdaExpression OptionalElementSelector { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.GroupByWithResultSelectorExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class GroupByWithResultSelectorExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + public Remotion.Linq.QueryModel Apply(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public string AssociatedIdentifier { get => throw null; } + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public GroupByWithResultSelectorExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector, System.Linq.Expressions.LambdaExpression elementSelectorOrResultSelector, System.Linq.Expressions.LambdaExpression resultSelectorOrNull) => throw null; + public System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression Selector { get => throw null; } + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Source { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.GroupJoinExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class GroupJoinExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase, Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedResultSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public GroupJoinExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression innerSequence, System.Linq.Expressions.LambdaExpression outerKeySelector, System.Linq.Expressions.LambdaExpression innerKeySelector, System.Linq.Expressions.LambdaExpression resultSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + public System.Linq.Expressions.LambdaExpression InnerKeySelector { get => throw null; } + public System.Linq.Expressions.Expression InnerSequence { get => throw null; } + public Remotion.Linq.Parsing.Structure.IntermediateModel.JoinExpressionNode JoinExpressionNode { get => throw null; } + public System.Linq.Expressions.LambdaExpression OuterKeySelector { get => throw null; } + public System.Linq.Expressions.MethodCallExpression ParsedExpression { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression ResultSelector { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IExpressionNode + { + Remotion.Linq.QueryModel Apply(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext); + string AssociatedIdentifier { get; } + System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext); + Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Source { get; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public interface IQuerySourceExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.IntersectExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class IntersectExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public IntersectExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression source2) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression Source2 { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.JoinExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class JoinExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase, Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public Remotion.Linq.Clauses.JoinClause CreateJoinClause(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedInnerKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedOuterKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedResultSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression InnerKeySelector { get => throw null; } + public System.Linq.Expressions.Expression InnerSequence { get => throw null; } + public JoinExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression innerSequence, System.Linq.Expressions.LambdaExpression outerKeySelector, System.Linq.Expressions.LambdaExpression innerKeySelector, System.Linq.Expressions.LambdaExpression resultSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + public System.Linq.Expressions.LambdaExpression OuterKeySelector { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression ResultSelector { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.LastExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class LastExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public LastExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.LongCountExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class LongCountExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public LongCountExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MainSourceExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MainSourceExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + public Remotion.Linq.QueryModel Apply(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public string AssociatedIdentifier { get => throw null; } + public MainSourceExpressionNode(string associatedIdentifier, System.Linq.Expressions.Expression expression) => throw null; + public System.Linq.Expressions.Expression ParsedExpression { get => throw null; } + public System.Type QuerySourceElementType { get => throw null; } + public System.Type QuerySourceType { get => throw null; } + public System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Source { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MaxExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MaxExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public MaxExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class MethodCallExpressionNodeBase : Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + public Remotion.Linq.QueryModel Apply(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected abstract void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext); + public string AssociatedIdentifier { get => throw null; } + protected System.NotSupportedException CreateOutputParameterNotSupportedException() => throw null; + protected System.NotSupportedException CreateResolveNotSupportedException() => throw null; + protected MethodCallExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) => throw null; + public System.Type NodeResultType { get => throw null; } + public abstract System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext); + protected virtual void SetResultTypeOverride(Remotion.Linq.QueryModel queryModel) => throw null; + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Source { get => throw null; } + protected virtual Remotion.Linq.QueryModel WrapQueryModelAfterEndOfQuery(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeFactory` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public static class MethodCallExpressionNodeFactory + { + public static Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode CreateExpressionNode(System.Type nodeType, Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, object[] additionalConstructorParameters) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public struct MethodCallExpressionParseInfo + { + public string AssociatedIdentifier { get => throw null; } + public MethodCallExpressionParseInfo(string associatedIdentifier, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode source, System.Linq.Expressions.MethodCallExpression parsedExpression) => throw null; + // Stub generator skipped constructor + public System.Linq.Expressions.MethodCallExpression ParsedExpression { get => throw null; } + public Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode Source { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.MinExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MinExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public MinExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.OfTypeExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class OfTypeExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public OfTypeExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Type SearchedItemType { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.OrderByDescendingExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class OrderByDescendingExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression KeySelector { get => throw null; } + public OrderByDescendingExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.OrderByExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class OrderByExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression KeySelector { get => throw null; } + public OrderByExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.QuerySourceExpressionNodeUtility` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public static class QuerySourceExpressionNodeUtility + { + public static Remotion.Linq.Clauses.IQuerySource GetQuerySourceForNode(Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode node, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext context) => throw null; + public static System.Linq.Expressions.Expression ReplaceParameterWithReference(Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode referencedNode, System.Linq.Expressions.ParameterExpression parameterToReplace, System.Linq.Expressions.Expression expression, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext context) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.QuerySourceSetOperationExpressionNodeBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class QuerySourceSetOperationExpressionNodeBase : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase, Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected abstract Remotion.Linq.Clauses.ResultOperatorBase CreateSpecificResultOperator(); + public System.Type ItemType { get => throw null; } + protected QuerySourceSetOperationExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression source2) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression Source2 { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ResolvedExpressionCache<>` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ResolvedExpressionCache where T : System.Linq.Expressions.Expression + { + public T GetOrCreate(System.Func generator) => throw null; + public ResolvedExpressionCache(Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode currentNode) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public abstract class ResultOperatorExpressionNodeBase : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + protected abstract Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext); + public System.Linq.Expressions.MethodCallExpression ParsedExpression { get => throw null; } + protected ResultOperatorExpressionNodeBase(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate, System.Linq.Expressions.LambdaExpression optionalSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + protected override Remotion.Linq.QueryModel WrapQueryModelAfterEndOfQuery(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ReverseExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ReverseExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public ReverseExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.SelectExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SelectExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public SelectExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression selector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + public System.Linq.Expressions.LambdaExpression Selector { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.SelectManyExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SelectManyExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase, Remotion.Linq.Parsing.Structure.IntermediateModel.IQuerySourceExpressionNode, Remotion.Linq.Parsing.Structure.IntermediateModel.IExpressionNode + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression CollectionSelector { get => throw null; } + public System.Linq.Expressions.Expression GetResolvedCollectionSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedResultSelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.LambdaExpression ResultSelector { get => throw null; } + public SelectManyExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression collectionSelector, System.Linq.Expressions.LambdaExpression resultSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.SingleExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SingleExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public SingleExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalPredicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.SkipExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SkipExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public System.Linq.Expressions.Expression Count { get => throw null; } + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public SkipExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression count) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.SumExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SumExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public SumExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression optionalSelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.TakeExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class TakeExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.ResultOperatorExpressionNodeBase + { + public System.Linq.Expressions.Expression Count { get => throw null; } + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateResultOperator(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public TakeExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression count) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.LambdaExpression), default(System.Linq.Expressions.LambdaExpression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ThenByDescendingExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ThenByDescendingExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression KeySelector { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public ThenByDescendingExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.ThenByExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class ThenByExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedKeySelector(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression KeySelector { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public ThenByExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression keySelector) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.UnionExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class UnionExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.QuerySourceSetOperationExpressionNodeBase + { + protected override Remotion.Linq.Clauses.ResultOperatorBase CreateSpecificResultOperator() => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public UnionExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.Expression source2) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo), default(System.Linq.Expressions.Expression)) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.IntermediateModel.WhereExpressionNode` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class WhereExpressionNode : Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionNodeBase + { + protected override void ApplyNodeSpecificSemantics(Remotion.Linq.QueryModel queryModel, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public System.Linq.Expressions.Expression GetResolvedPredicate(Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public static System.Collections.Generic.IEnumerable GetSupportedMethods() => throw null; + public System.Linq.Expressions.LambdaExpression Predicate { get => throw null; } + public override System.Linq.Expressions.Expression Resolve(System.Linq.Expressions.ParameterExpression inputParameter, System.Linq.Expressions.Expression expressionToBeResolved, Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext clauseGenerationContext) => throw null; + public WhereExpressionNode(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo parseInfo, System.Linq.Expressions.LambdaExpression predicate) : base(default(Remotion.Linq.Parsing.Structure.IntermediateModel.MethodCallExpressionParseInfo)) => throw null; + } + + } + namespace NodeTypeProviders + { + // Generated from `Remotion.Linq.Parsing.Structure.NodeTypeProviders.CompoundNodeTypeProvider` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class CompoundNodeTypeProvider : Remotion.Linq.Parsing.Structure.INodeTypeProvider + { + public CompoundNodeTypeProvider(System.Collections.Generic.IEnumerable innerProviders) => throw null; + public System.Type GetNodeType(System.Reflection.MethodInfo method) => throw null; + public System.Collections.Generic.IList InnerProviders { get => throw null; } + public bool IsRegistered(System.Reflection.MethodInfo method) => throw null; + } + + // Generated from `Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodInfoBasedNodeTypeRegistry` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MethodInfoBasedNodeTypeRegistry : Remotion.Linq.Parsing.Structure.INodeTypeProvider + { + public static Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodInfoBasedNodeTypeRegistry CreateFromRelinqAssembly() => throw null; + public System.Type GetNodeType(System.Reflection.MethodInfo method) => throw null; + public static System.Reflection.MethodInfo GetRegisterableMethodDefinition(System.Reflection.MethodInfo method, bool throwOnAmbiguousMatch) => throw null; + public bool IsRegistered(System.Reflection.MethodInfo method) => throw null; + public MethodInfoBasedNodeTypeRegistry() => throw null; + public void Register(System.Collections.Generic.IEnumerable methods, System.Type nodeType) => throw null; + public int RegisteredMethodInfoCount { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodNameBasedNodeTypeRegistry` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class MethodNameBasedNodeTypeRegistry : Remotion.Linq.Parsing.Structure.INodeTypeProvider + { + public static Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodNameBasedNodeTypeRegistry CreateFromRelinqAssembly() => throw null; + public System.Type GetNodeType(System.Reflection.MethodInfo method) => throw null; + public bool IsRegistered(System.Reflection.MethodInfo method) => throw null; + public MethodNameBasedNodeTypeRegistry() => throw null; + public void Register(System.Collections.Generic.IEnumerable registrationInfo, System.Type nodeType) => throw null; + public int RegisteredNamesCount { get => throw null; } + } + + // Generated from `Remotion.Linq.Parsing.Structure.NodeTypeProviders.NameBasedRegistrationInfo` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class NameBasedRegistrationInfo + { + public System.Func Filter { get => throw null; } + public string Name { get => throw null; } + public NameBasedRegistrationInfo(string name, System.Func filter) => throw null; + } + + } + } + } + namespace Transformations + { + // Generated from `Remotion.Linq.Transformations.SubQueryFromClauseFlattener` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public class SubQueryFromClauseFlattener : Remotion.Linq.QueryModelVisitorBase + { + protected virtual void CheckFlattenable(Remotion.Linq.QueryModel subQueryModel) => throw null; + protected virtual void FlattenSubQuery(Remotion.Linq.Clauses.Expressions.SubQueryExpression subQueryExpression, Remotion.Linq.Clauses.IFromClause fromClause, Remotion.Linq.QueryModel queryModel, int destinationIndex) => throw null; + protected void InsertBodyClauses(System.Collections.ObjectModel.ObservableCollection bodyClauses, Remotion.Linq.QueryModel destinationQueryModel, int destinationIndex) => throw null; + public SubQueryFromClauseFlattener() => throw null; + public override void VisitAdditionalFromClause(Remotion.Linq.Clauses.AdditionalFromClause fromClause, Remotion.Linq.QueryModel queryModel, int index) => throw null; + public override void VisitMainFromClause(Remotion.Linq.Clauses.MainFromClause fromClause, Remotion.Linq.QueryModel queryModel) => throw null; + } + + } + namespace Utilities + { + // Generated from `Remotion.Linq.Utilities.ItemTypeReflectionUtility` in `Remotion.Linq, Version=2.2.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b` + public static class ItemTypeReflectionUtility + { + public static bool TryGetItemTypeOfClosedGenericIEnumerable(System.Type possibleEnumerableType, out System.Type itemType) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.csproj b/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Remotion.Linq/2.2.0/Remotion.Linq.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + diff --git a/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.cs b/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.cs new file mode 100644 index 000000000000..556165b5ed14 --- /dev/null +++ b/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.cs @@ -0,0 +1,1827 @@ +// This file contains auto-generated code. + +namespace System +{ + // Generated from `System.UriIdnScope` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum UriIdnScope + { + All, + AllExceptIntranet, + None, + } + + namespace Configuration + { + // Generated from `System.Configuration.AppSettingsReader` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AppSettingsReader + { + public AppSettingsReader() => throw null; + public object GetValue(string key, System.Type type) => throw null; + } + + // Generated from `System.Configuration.AppSettingsSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class AppSettingsSection : System.Configuration.ConfigurationSection + { + public AppSettingsSection() => throw null; + protected override void DeserializeElement(System.Xml.XmlReader reader, bool serializeCollectionKey) => throw null; + public string File { get => throw null; set => throw null; } + protected override object GetRuntimeObject() => throw null; + protected override bool IsModified() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + protected override void Reset(System.Configuration.ConfigurationElement parentSection) => throw null; + protected override string SerializeSection(System.Configuration.ConfigurationElement parentElement, string name, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + public System.Configuration.KeyValueConfigurationCollection Settings { get => throw null; } + } + + // Generated from `System.Configuration.ApplicationScopedSettingAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationScopedSettingAttribute : System.Configuration.SettingAttribute + { + public ApplicationScopedSettingAttribute() => throw null; + } + + // Generated from `System.Configuration.ApplicationSettingsBase` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ApplicationSettingsBase : System.Configuration.SettingsBase, System.ComponentModel.INotifyPropertyChanged + { + protected ApplicationSettingsBase(string settingsKey) => throw null; + protected ApplicationSettingsBase(System.ComponentModel.IComponent owner, string settingsKey) => throw null; + protected ApplicationSettingsBase(System.ComponentModel.IComponent owner) => throw null; + protected ApplicationSettingsBase() => throw null; + public override System.Configuration.SettingsContext Context { get => throw null; } + public object GetPreviousVersion(string propertyName) => throw null; + public override object this[string propertyName] { get => throw null; set => throw null; } + protected virtual void OnPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) => throw null; + protected virtual void OnSettingChanging(object sender, System.Configuration.SettingChangingEventArgs e) => throw null; + protected virtual void OnSettingsLoaded(object sender, System.Configuration.SettingsLoadedEventArgs e) => throw null; + protected virtual void OnSettingsSaving(object sender, System.ComponentModel.CancelEventArgs e) => throw null; + public override System.Configuration.SettingsPropertyCollection Properties { get => throw null; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + public override System.Configuration.SettingsPropertyValueCollection PropertyValues { get => throw null; } + public override System.Configuration.SettingsProviderCollection Providers { get => throw null; } + public void Reload() => throw null; + public void Reset() => throw null; + public override void Save() => throw null; + public event System.Configuration.SettingChangingEventHandler SettingChanging; + public string SettingsKey { get => throw null; set => throw null; } + public event System.Configuration.SettingsLoadedEventHandler SettingsLoaded; + public event System.Configuration.SettingsSavingEventHandler SettingsSaving; + public virtual void Upgrade() => throw null; + } + + // Generated from `System.Configuration.ApplicationSettingsGroup` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ApplicationSettingsGroup : System.Configuration.ConfigurationSectionGroup + { + public ApplicationSettingsGroup() => throw null; + } + + // Generated from `System.Configuration.CallbackValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CallbackValidator : System.Configuration.ConfigurationValidatorBase + { + public CallbackValidator(System.Type type, System.Configuration.ValidatorCallback callback) => throw null; + public override bool CanValidate(System.Type type) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.CallbackValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CallbackValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public string CallbackMethodName { get => throw null; set => throw null; } + public CallbackValidatorAttribute() => throw null; + public System.Type Type { get => throw null; set => throw null; } + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.ClientSettingsSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ClientSettingsSection : System.Configuration.ConfigurationSection + { + public ClientSettingsSection() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public System.Configuration.SettingElementCollection Settings { get => throw null; } + } + + // Generated from `System.Configuration.CommaDelimitedStringCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CommaDelimitedStringCollection : System.Collections.Specialized.StringCollection + { + public void Add(string value) => throw null; + public void AddRange(string[] range) => throw null; + public void Clear() => throw null; + public System.Configuration.CommaDelimitedStringCollection Clone() => throw null; + public CommaDelimitedStringCollection() => throw null; + public void Insert(int index, string value) => throw null; + public bool IsModified { get => throw null; } + public bool IsReadOnly { get => throw null; } + public string this[int index] { get => throw null; set => throw null; } + public void Remove(string value) => throw null; + public void SetReadOnly() => throw null; + public override string ToString() => throw null; + } + + // Generated from `System.Configuration.CommaDelimitedStringCollectionConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class CommaDelimitedStringCollectionConverter : System.Configuration.ConfigurationConverterBase + { + public CommaDelimitedStringCollectionConverter() => throw null; + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + } + + // Generated from `System.Configuration.ConfigXmlDocument` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigXmlDocument : System.Xml.XmlDocument, System.Configuration.Internal.IConfigErrorInfo + { + public ConfigXmlDocument() => throw null; + public override System.Xml.XmlAttribute CreateAttribute(string prefix, string localName, string namespaceUri) => throw null; + public override System.Xml.XmlCDataSection CreateCDataSection(string data) => throw null; + public override System.Xml.XmlComment CreateComment(string data) => throw null; + public override System.Xml.XmlElement CreateElement(string prefix, string localName, string namespaceUri) => throw null; + public override System.Xml.XmlSignificantWhitespace CreateSignificantWhitespace(string data) => throw null; + public override System.Xml.XmlText CreateTextNode(string text) => throw null; + public override System.Xml.XmlWhitespace CreateWhitespace(string data) => throw null; + string System.Configuration.Internal.IConfigErrorInfo.Filename { get => throw null; } + public string Filename { get => throw null; } + public int LineNumber { get => throw null; } + int System.Configuration.Internal.IConfigErrorInfo.LineNumber { get => throw null; } + public override void Load(string filename) => throw null; + public void LoadSingleElement(string filename, System.Xml.XmlTextReader sourceReader) => throw null; + } + + // Generated from `System.Configuration.Configuration` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class Configuration + { + public System.Configuration.AppSettingsSection AppSettings { get => throw null; } + public System.Func AssemblyStringTransformer { get => throw null; set => throw null; } + public System.Configuration.ConnectionStringsSection ConnectionStrings { get => throw null; } + public System.Configuration.ContextInformation EvaluationContext { get => throw null; } + public string FilePath { get => throw null; } + public System.Configuration.ConfigurationSection GetSection(string sectionName) => throw null; + public System.Configuration.ConfigurationSectionGroup GetSectionGroup(string sectionGroupName) => throw null; + public bool HasFile { get => throw null; } + public System.Configuration.ConfigurationLocationCollection Locations { get => throw null; } + public bool NamespaceDeclared { get => throw null; set => throw null; } + public System.Configuration.ConfigurationSectionGroup RootSectionGroup { get => throw null; } + public void Save(System.Configuration.ConfigurationSaveMode saveMode, bool forceSaveAll) => throw null; + public void Save(System.Configuration.ConfigurationSaveMode saveMode) => throw null; + public void Save() => throw null; + public void SaveAs(string filename, System.Configuration.ConfigurationSaveMode saveMode, bool forceSaveAll) => throw null; + public void SaveAs(string filename, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + public void SaveAs(string filename) => throw null; + public System.Configuration.ConfigurationSectionGroupCollection SectionGroups { get => throw null; } + public System.Configuration.ConfigurationSectionCollection Sections { get => throw null; } + public System.Runtime.Versioning.FrameworkName TargetFramework { get => throw null; set => throw null; } + public System.Func TypeStringTransformer { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ConfigurationAllowDefinition` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ConfigurationAllowDefinition + { + Everywhere, + MachineOnly, + MachineToApplication, + MachineToWebRoot, + } + + // Generated from `System.Configuration.ConfigurationAllowExeDefinition` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ConfigurationAllowExeDefinition + { + MachineOnly, + MachineToApplication, + MachineToLocalUser, + MachineToRoamingUser, + } + + // Generated from `System.Configuration.ConfigurationCollectionAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationCollectionAttribute : System.Attribute + { + public string AddItemName { get => throw null; set => throw null; } + public string ClearItemsName { get => throw null; set => throw null; } + public System.Configuration.ConfigurationElementCollectionType CollectionType { get => throw null; set => throw null; } + public ConfigurationCollectionAttribute(System.Type itemType) => throw null; + public System.Type ItemType { get => throw null; } + public string RemoveItemName { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ConfigurationConverterBase` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ConfigurationConverterBase : System.ComponentModel.TypeConverter + { + public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Type type) => throw null; + public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Type type) => throw null; + protected ConfigurationConverterBase() => throw null; + } + + // Generated from `System.Configuration.ConfigurationElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ConfigurationElement + { + protected ConfigurationElement() => throw null; + public System.Configuration.Configuration CurrentConfiguration { get => throw null; } + protected virtual void DeserializeElement(System.Xml.XmlReader reader, bool serializeCollectionKey) => throw null; + public System.Configuration.ElementInformation ElementInformation { get => throw null; } + protected virtual System.Configuration.ConfigurationElementProperty ElementProperty { get => throw null; } + public override bool Equals(object compareTo) => throw null; + protected System.Configuration.ContextInformation EvaluationContext { get => throw null; } + public override int GetHashCode() => throw null; + protected virtual string GetTransformedAssemblyString(string assemblyName) => throw null; + protected virtual string GetTransformedTypeString(string typeName) => throw null; + protected bool HasContext { get => throw null; } + protected virtual void Init() => throw null; + protected virtual void InitializeDefault() => throw null; + protected virtual bool IsModified() => throw null; + public virtual bool IsReadOnly() => throw null; + protected object this[string propertyName] { get => throw null; set => throw null; } + protected object this[System.Configuration.ConfigurationProperty prop] { get => throw null; set => throw null; } + protected virtual void ListErrors(System.Collections.IList errorList) => throw null; + public System.Configuration.ConfigurationLockCollection LockAllAttributesExcept { get => throw null; } + public System.Configuration.ConfigurationLockCollection LockAllElementsExcept { get => throw null; } + public System.Configuration.ConfigurationLockCollection LockAttributes { get => throw null; } + public System.Configuration.ConfigurationLockCollection LockElements { get => throw null; } + public bool LockItem { get => throw null; set => throw null; } + protected virtual bool OnDeserializeUnrecognizedAttribute(string name, string value) => throw null; + protected virtual bool OnDeserializeUnrecognizedElement(string elementName, System.Xml.XmlReader reader) => throw null; + protected virtual object OnRequiredPropertyNotFound(string name) => throw null; + protected virtual void PostDeserialize() => throw null; + protected virtual void PreSerialize(System.Xml.XmlWriter writer) => throw null; + protected virtual System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + protected virtual void Reset(System.Configuration.ConfigurationElement parentElement) => throw null; + protected virtual void ResetModified() => throw null; + protected virtual bool SerializeElement(System.Xml.XmlWriter writer, bool serializeCollectionKey) => throw null; + protected virtual bool SerializeToXmlElement(System.Xml.XmlWriter writer, string elementName) => throw null; + protected void SetPropertyValue(System.Configuration.ConfigurationProperty prop, object value, bool ignoreLocks) => throw null; + protected virtual void SetReadOnly() => throw null; + protected virtual void Unmerge(System.Configuration.ConfigurationElement sourceElement, System.Configuration.ConfigurationElement parentElement, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + } + + // Generated from `System.Configuration.ConfigurationElementCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ConfigurationElementCollection : System.Configuration.ConfigurationElement, System.Collections.IEnumerable, System.Collections.ICollection + { + protected string AddElementName { get => throw null; set => throw null; } + protected void BaseAdd(System.Configuration.ConfigurationElement element, bool throwIfExists) => throw null; + protected virtual void BaseAdd(int index, System.Configuration.ConfigurationElement element) => throw null; + protected virtual void BaseAdd(System.Configuration.ConfigurationElement element) => throw null; + protected void BaseClear() => throw null; + protected System.Configuration.ConfigurationElement BaseGet(object key) => throw null; + protected System.Configuration.ConfigurationElement BaseGet(int index) => throw null; + protected object[] BaseGetAllKeys() => throw null; + protected object BaseGetKey(int index) => throw null; + protected int BaseIndexOf(System.Configuration.ConfigurationElement element) => throw null; + protected bool BaseIsRemoved(object key) => throw null; + protected void BaseRemove(object key) => throw null; + protected void BaseRemoveAt(int index) => throw null; + protected string ClearElementName { get => throw null; set => throw null; } + public virtual System.Configuration.ConfigurationElementCollectionType CollectionType { get => throw null; } + protected ConfigurationElementCollection(System.Collections.IComparer comparer) => throw null; + protected ConfigurationElementCollection() => throw null; + void System.Collections.ICollection.CopyTo(System.Array arr, int index) => throw null; + public void CopyTo(System.Configuration.ConfigurationElement[] array, int index) => throw null; + public int Count { get => throw null; } + protected virtual System.Configuration.ConfigurationElement CreateNewElement(string elementName) => throw null; + protected abstract System.Configuration.ConfigurationElement CreateNewElement(); + protected virtual string ElementName { get => throw null; } + public bool EmitClear { get => throw null; set => throw null; } + public override bool Equals(object compareTo) => throw null; + protected abstract object GetElementKey(System.Configuration.ConfigurationElement element); + public System.Collections.IEnumerator GetEnumerator() => throw null; + public override int GetHashCode() => throw null; + protected virtual bool IsElementName(string elementName) => throw null; + protected virtual bool IsElementRemovable(System.Configuration.ConfigurationElement element) => throw null; + protected override bool IsModified() => throw null; + public override bool IsReadOnly() => throw null; + public bool IsSynchronized { get => throw null; } + protected override bool OnDeserializeUnrecognizedElement(string elementName, System.Xml.XmlReader reader) => throw null; + protected string RemoveElementName { get => throw null; set => throw null; } + protected override void Reset(System.Configuration.ConfigurationElement parentElement) => throw null; + protected override void ResetModified() => throw null; + protected override bool SerializeElement(System.Xml.XmlWriter writer, bool serializeCollectionKey) => throw null; + protected override void SetReadOnly() => throw null; + public object SyncRoot { get => throw null; } + protected virtual bool ThrowOnDuplicate { get => throw null; } + protected override void Unmerge(System.Configuration.ConfigurationElement sourceElement, System.Configuration.ConfigurationElement parentElement, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + } + + // Generated from `System.Configuration.ConfigurationElementCollectionType` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ConfigurationElementCollectionType + { + AddRemoveClearMap, + AddRemoveClearMapAlternate, + BasicMap, + BasicMapAlternate, + } + + // Generated from `System.Configuration.ConfigurationElementProperty` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationElementProperty + { + public ConfigurationElementProperty(System.Configuration.ConfigurationValidatorBase validator) => throw null; + public System.Configuration.ConfigurationValidatorBase Validator { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationErrorsException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationErrorsException : System.Configuration.ConfigurationException + { + public override string BareMessage { get => throw null; } + public ConfigurationErrorsException(string message, string filename, int line) => throw null; + public ConfigurationErrorsException(string message, System.Xml.XmlReader reader) => throw null; + public ConfigurationErrorsException(string message, System.Xml.XmlNode node) => throw null; + public ConfigurationErrorsException(string message, System.Exception inner, string filename, int line) => throw null; + public ConfigurationErrorsException(string message, System.Exception inner, System.Xml.XmlReader reader) => throw null; + public ConfigurationErrorsException(string message, System.Exception inner, System.Xml.XmlNode node) => throw null; + public ConfigurationErrorsException(string message, System.Exception inner) => throw null; + public ConfigurationErrorsException(string message) => throw null; + public ConfigurationErrorsException() => throw null; + protected ConfigurationErrorsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Collections.ICollection Errors { get => throw null; } + public override string Filename { get => throw null; } + public static string GetFilename(System.Xml.XmlReader reader) => throw null; + public static string GetFilename(System.Xml.XmlNode node) => throw null; + public static int GetLineNumber(System.Xml.XmlReader reader) => throw null; + public static int GetLineNumber(System.Xml.XmlNode node) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public override int Line { get => throw null; } + public override string Message { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationException : System.SystemException + { + public virtual string BareMessage { get => throw null; } + public ConfigurationException(string message, string filename, int line) => throw null; + public ConfigurationException(string message, System.Xml.XmlNode node) => throw null; + public ConfigurationException(string message, System.Exception inner, string filename, int line) => throw null; + public ConfigurationException(string message, System.Exception inner, System.Xml.XmlNode node) => throw null; + public ConfigurationException(string message, System.Exception inner) => throw null; + public ConfigurationException(string message) => throw null; + public ConfigurationException() => throw null; + protected ConfigurationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public virtual string Filename { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public static string GetXmlNodeFilename(System.Xml.XmlNode node) => throw null; + public static int GetXmlNodeLineNumber(System.Xml.XmlNode node) => throw null; + public virtual int Line { get => throw null; } + public override string Message { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationFileMap` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationFileMap : System.ICloneable + { + public virtual object Clone() => throw null; + public ConfigurationFileMap(string machineConfigFilename) => throw null; + public ConfigurationFileMap() => throw null; + public string MachineConfigFilename { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ConfigurationLocation` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationLocation + { + public System.Configuration.Configuration OpenConfiguration() => throw null; + public string Path { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationLocationCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationLocationCollection : System.Collections.ReadOnlyCollectionBase + { + public System.Configuration.ConfigurationLocation this[int index] { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationLockCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationLockCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(string name) => throw null; + public string AttributeList { get => throw null; } + public void Clear() => throw null; + public bool Contains(string name) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(string[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool HasParentElements { get => throw null; } + public bool IsModified { get => throw null; } + public bool IsReadOnly(string name) => throw null; + public bool IsSynchronized { get => throw null; } + public void Remove(string name) => throw null; + public void SetFromList(string attributeList) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationManager` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class ConfigurationManager + { + public static System.Collections.Specialized.NameValueCollection AppSettings { get => throw null; } + public static System.Configuration.ConnectionStringSettingsCollection ConnectionStrings { get => throw null; } + public static object GetSection(string sectionName) => throw null; + public static System.Configuration.Configuration OpenExeConfiguration(string exePath) => throw null; + public static System.Configuration.Configuration OpenExeConfiguration(System.Configuration.ConfigurationUserLevel userLevel) => throw null; + public static System.Configuration.Configuration OpenMachineConfiguration() => throw null; + public static System.Configuration.Configuration OpenMappedExeConfiguration(System.Configuration.ExeConfigurationFileMap fileMap, System.Configuration.ConfigurationUserLevel userLevel, bool preLoad) => throw null; + public static System.Configuration.Configuration OpenMappedExeConfiguration(System.Configuration.ExeConfigurationFileMap fileMap, System.Configuration.ConfigurationUserLevel userLevel) => throw null; + public static System.Configuration.Configuration OpenMappedMachineConfiguration(System.Configuration.ConfigurationFileMap fileMap) => throw null; + public static void RefreshSection(string sectionName) => throw null; + } + + // Generated from `System.Configuration.ConfigurationProperty` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationProperty + { + public ConfigurationProperty(string name, System.Type type, object defaultValue, System.Configuration.ConfigurationPropertyOptions options) => throw null; + public ConfigurationProperty(string name, System.Type type, object defaultValue, System.ComponentModel.TypeConverter typeConverter, System.Configuration.ConfigurationValidatorBase validator, System.Configuration.ConfigurationPropertyOptions options, string description) => throw null; + public ConfigurationProperty(string name, System.Type type, object defaultValue, System.ComponentModel.TypeConverter typeConverter, System.Configuration.ConfigurationValidatorBase validator, System.Configuration.ConfigurationPropertyOptions options) => throw null; + public ConfigurationProperty(string name, System.Type type, object defaultValue) => throw null; + public ConfigurationProperty(string name, System.Type type) => throw null; + public System.ComponentModel.TypeConverter Converter { get => throw null; } + public object DefaultValue { get => throw null; } + public string Description { get => throw null; } + public bool IsAssemblyStringTransformationRequired { get => throw null; } + public bool IsDefaultCollection { get => throw null; } + public bool IsKey { get => throw null; } + public bool IsRequired { get => throw null; } + public bool IsTypeStringTransformationRequired { get => throw null; } + public bool IsVersionCheckRequired { get => throw null; } + public string Name { get => throw null; } + public System.Type Type { get => throw null; } + public System.Configuration.ConfigurationValidatorBase Validator { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationPropertyAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationPropertyAttribute : System.Attribute + { + public ConfigurationPropertyAttribute(string name) => throw null; + public object DefaultValue { get => throw null; set => throw null; } + public bool IsDefaultCollection { get => throw null; set => throw null; } + public bool IsKey { get => throw null; set => throw null; } + public bool IsRequired { get => throw null; set => throw null; } + public string Name { get => throw null; } + public System.Configuration.ConfigurationPropertyOptions Options { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ConfigurationPropertyCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationPropertyCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(System.Configuration.ConfigurationProperty property) => throw null; + public void Clear() => throw null; + public ConfigurationPropertyCollection() => throw null; + public bool Contains(string name) => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Configuration.ConfigurationProperty[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Configuration.ConfigurationProperty this[string name] { get => throw null; } + public bool Remove(string name) => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationPropertyOptions` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + [System.Flags] + public enum ConfigurationPropertyOptions + { + IsAssemblyStringTransformationRequired, + IsDefaultCollection, + IsKey, + IsRequired, + IsTypeStringTransformationRequired, + IsVersionCheckRequired, + None, + } + + // Generated from `System.Configuration.ConfigurationSaveMode` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ConfigurationSaveMode + { + Full, + Minimal, + Modified, + } + + // Generated from `System.Configuration.ConfigurationSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ConfigurationSection : System.Configuration.ConfigurationElement + { + protected ConfigurationSection() => throw null; + protected virtual void DeserializeSection(System.Xml.XmlReader reader) => throw null; + protected virtual object GetRuntimeObject() => throw null; + protected override bool IsModified() => throw null; + protected override void ResetModified() => throw null; + public System.Configuration.SectionInformation SectionInformation { get => throw null; } + protected virtual string SerializeSection(System.Configuration.ConfigurationElement parentElement, string name, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + protected virtual bool ShouldSerializeElementInTargetVersion(System.Configuration.ConfigurationElement element, string elementName, System.Runtime.Versioning.FrameworkName targetFramework) => throw null; + protected virtual bool ShouldSerializePropertyInTargetVersion(System.Configuration.ConfigurationProperty property, string propertyName, System.Runtime.Versioning.FrameworkName targetFramework, System.Configuration.ConfigurationElement parentConfigurationElement) => throw null; + protected virtual bool ShouldSerializeSectionInTargetVersion(System.Runtime.Versioning.FrameworkName targetFramework) => throw null; + } + + // Generated from `System.Configuration.ConfigurationSectionCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationSectionCollection : System.Collections.Specialized.NameObjectCollectionBase + { + public void Add(string name, System.Configuration.ConfigurationSection section) => throw null; + public void Clear() => throw null; + public void CopyTo(System.Configuration.ConfigurationSection[] array, int index) => throw null; + public override int Count { get => throw null; } + public System.Configuration.ConfigurationSection Get(string name) => throw null; + public System.Configuration.ConfigurationSection Get(int index) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public string GetKey(int index) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Configuration.ConfigurationSection this[string name] { get => throw null; } + public System.Configuration.ConfigurationSection this[int index] { get => throw null; } + public override System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get => throw null; } + public void Remove(string name) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Configuration.ConfigurationSectionGroup` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationSectionGroup + { + public ConfigurationSectionGroup() => throw null; + public void ForceDeclaration(bool force) => throw null; + public void ForceDeclaration() => throw null; + public bool IsDeclarationRequired { get => throw null; } + public bool IsDeclared { get => throw null; } + public string Name { get => throw null; } + public string SectionGroupName { get => throw null; } + public System.Configuration.ConfigurationSectionGroupCollection SectionGroups { get => throw null; } + public System.Configuration.ConfigurationSectionCollection Sections { get => throw null; } + protected virtual bool ShouldSerializeSectionGroupInTargetVersion(System.Runtime.Versioning.FrameworkName targetFramework) => throw null; + public string Type { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ConfigurationSectionGroupCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationSectionGroupCollection : System.Collections.Specialized.NameObjectCollectionBase + { + public void Add(string name, System.Configuration.ConfigurationSectionGroup sectionGroup) => throw null; + public void Clear() => throw null; + public void CopyTo(System.Configuration.ConfigurationSectionGroup[] array, int index) => throw null; + public override int Count { get => throw null; } + public System.Configuration.ConfigurationSectionGroup Get(string name) => throw null; + public System.Configuration.ConfigurationSectionGroup Get(int index) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public string GetKey(int index) => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Configuration.ConfigurationSectionGroup this[string name] { get => throw null; } + public System.Configuration.ConfigurationSectionGroup this[int index] { get => throw null; } + public override System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys { get => throw null; } + public void Remove(string name) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Configuration.ConfigurationSettings` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationSettings + { + public static System.Collections.Specialized.NameValueCollection AppSettings { get => throw null; } + public static object GetConfig(string sectionName) => throw null; + } + + // Generated from `System.Configuration.ConfigurationUserLevel` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum ConfigurationUserLevel + { + None, + PerUserRoaming, + PerUserRoamingAndLocal, + } + + // Generated from `System.Configuration.ConfigurationValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConfigurationValidatorAttribute : System.Attribute + { + public ConfigurationValidatorAttribute(System.Type validator) => throw null; + protected ConfigurationValidatorAttribute() => throw null; + public virtual System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + public System.Type ValidatorType { get => throw null; } + } + + // Generated from `System.Configuration.ConfigurationValidatorBase` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ConfigurationValidatorBase + { + public virtual bool CanValidate(System.Type type) => throw null; + protected ConfigurationValidatorBase() => throw null; + public abstract void Validate(object value); + } + + // Generated from `System.Configuration.ConnectionStringSettings` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConnectionStringSettings : System.Configuration.ConfigurationElement + { + public string ConnectionString { get => throw null; set => throw null; } + public ConnectionStringSettings(string name, string connectionString, string providerName) => throw null; + public ConnectionStringSettings(string name, string connectionString) => throw null; + public ConnectionStringSettings() => throw null; + public string Name { get => throw null; set => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public string ProviderName { get => throw null; set => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Configuration.ConnectionStringSettingsCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConnectionStringSettingsCollection : System.Configuration.ConfigurationElementCollection + { + public void Add(System.Configuration.ConnectionStringSettings settings) => throw null; + protected override void BaseAdd(int index, System.Configuration.ConfigurationElement element) => throw null; + public void Clear() => throw null; + public ConnectionStringSettingsCollection() => throw null; + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public int IndexOf(System.Configuration.ConnectionStringSettings settings) => throw null; + public System.Configuration.ConnectionStringSettings this[string name] { get => throw null; } + public System.Configuration.ConnectionStringSettings this[int index] { get => throw null; set => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public void Remove(string name) => throw null; + public void Remove(System.Configuration.ConnectionStringSettings settings) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Configuration.ConnectionStringsSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ConnectionStringsSection : System.Configuration.ConfigurationSection + { + public System.Configuration.ConnectionStringSettingsCollection ConnectionStrings { get => throw null; } + public ConnectionStringsSection() => throw null; + protected override object GetRuntimeObject() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + } + + // Generated from `System.Configuration.ContextInformation` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ContextInformation + { + public object GetSection(string sectionName) => throw null; + public object HostingContext { get => throw null; } + public bool IsMachineLevel { get => throw null; } + } + + // Generated from `System.Configuration.DefaultSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DefaultSection : System.Configuration.ConfigurationSection + { + public DefaultSection() => throw null; + protected override void DeserializeSection(System.Xml.XmlReader xmlReader) => throw null; + protected override bool IsModified() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + protected override void Reset(System.Configuration.ConfigurationElement parentSection) => throw null; + protected override void ResetModified() => throw null; + protected override string SerializeSection(System.Configuration.ConfigurationElement parentSection, string name, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + } + + // Generated from `System.Configuration.DefaultSettingValueAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DefaultSettingValueAttribute : System.Attribute + { + public DefaultSettingValueAttribute(string value) => throw null; + public string Value { get => throw null; } + } + + // Generated from `System.Configuration.DefaultValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DefaultValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public DefaultValidator() => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.DictionarySectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DictionarySectionHandler : System.Configuration.IConfigurationSectionHandler + { + public virtual object Create(object parent, object context, System.Xml.XmlNode section) => throw null; + public DictionarySectionHandler() => throw null; + protected virtual string KeyAttributeName { get => throw null; } + protected virtual string ValueAttributeName { get => throw null; } + } + + // Generated from `System.Configuration.DpapiProtectedConfigurationProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DpapiProtectedConfigurationProvider : System.Configuration.ProtectedConfigurationProvider + { + public override System.Xml.XmlNode Decrypt(System.Xml.XmlNode encryptedNode) => throw null; + public DpapiProtectedConfigurationProvider() => throw null; + public override System.Xml.XmlNode Encrypt(System.Xml.XmlNode node) => throw null; + public override void Initialize(string name, System.Collections.Specialized.NameValueCollection configurationValues) => throw null; + public bool UseMachineProtection { get => throw null; } + } + + // Generated from `System.Configuration.ElementInformation` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ElementInformation + { + public System.Collections.ICollection Errors { get => throw null; } + public bool IsCollection { get => throw null; } + public bool IsLocked { get => throw null; } + public bool IsPresent { get => throw null; } + public int LineNumber { get => throw null; } + public System.Configuration.PropertyInformationCollection Properties { get => throw null; } + public string Source { get => throw null; } + public System.Type Type { get => throw null; } + public System.Configuration.ConfigurationValidatorBase Validator { get => throw null; } + } + + // Generated from `System.Configuration.ExeConfigurationFileMap` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ExeConfigurationFileMap : System.Configuration.ConfigurationFileMap + { + public override object Clone() => throw null; + public string ExeConfigFilename { get => throw null; set => throw null; } + public ExeConfigurationFileMap(string machineConfigFileName) => throw null; + public ExeConfigurationFileMap() => throw null; + public string LocalUserConfigFilename { get => throw null; set => throw null; } + public string RoamingUserConfigFilename { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.ExeContext` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ExeContext + { + public string ExePath { get => throw null; } + public System.Configuration.ConfigurationUserLevel UserLevel { get => throw null; } + } + + // Generated from `System.Configuration.GenericEnumConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class GenericEnumConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public GenericEnumConverter(System.Type typeEnum) => throw null; + } + + // Generated from `System.Configuration.IApplicationSettingsProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IApplicationSettingsProvider + { + System.Configuration.SettingsPropertyValue GetPreviousVersion(System.Configuration.SettingsContext context, System.Configuration.SettingsProperty property); + void Reset(System.Configuration.SettingsContext context); + void Upgrade(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties); + } + + // Generated from `System.Configuration.IConfigurationSectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigurationSectionHandler + { + object Create(object parent, object configContext, System.Xml.XmlNode section); + } + + // Generated from `System.Configuration.IConfigurationSystem` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigurationSystem + { + object GetConfig(string configKey); + void Init(); + } + + // Generated from `System.Configuration.IPersistComponentSettings` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IPersistComponentSettings + { + void LoadComponentSettings(); + void ResetComponentSettings(); + void SaveComponentSettings(); + bool SaveSettings { get; set; } + string SettingsKey { get; set; } + } + + // Generated from `System.Configuration.ISettingsProviderService` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface ISettingsProviderService + { + System.Configuration.SettingsProvider GetSettingsProvider(System.Configuration.SettingsProperty property); + } + + // Generated from `System.Configuration.IdnElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IdnElement : System.Configuration.ConfigurationElement + { + public System.UriIdnScope Enabled { get => throw null; set => throw null; } + public IdnElement() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + } + + // Generated from `System.Configuration.IgnoreSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IgnoreSection : System.Configuration.ConfigurationSection + { + protected override void DeserializeSection(System.Xml.XmlReader xmlReader) => throw null; + public IgnoreSection() => throw null; + protected override bool IsModified() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + protected override void Reset(System.Configuration.ConfigurationElement parentSection) => throw null; + protected override void ResetModified() => throw null; + protected override string SerializeSection(System.Configuration.ConfigurationElement parentSection, string name, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + } + + // Generated from `System.Configuration.IgnoreSectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IgnoreSectionHandler : System.Configuration.IConfigurationSectionHandler + { + public virtual object Create(object parent, object configContext, System.Xml.XmlNode section) => throw null; + public IgnoreSectionHandler() => throw null; + } + + // Generated from `System.Configuration.InfiniteIntConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class InfiniteIntConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public InfiniteIntConverter() => throw null; + } + + // Generated from `System.Configuration.InfiniteTimeSpanConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class InfiniteTimeSpanConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public InfiniteTimeSpanConverter() => throw null; + } + + // Generated from `System.Configuration.IntegerValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IntegerValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive, int resolution) => throw null; + public IntegerValidator(int minValue, int maxValue, bool rangeIsExclusive) => throw null; + public IntegerValidator(int minValue, int maxValue) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.IntegerValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IntegerValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public bool ExcludeRange { get => throw null; set => throw null; } + public IntegerValidatorAttribute() => throw null; + public int MaxValue { get => throw null; set => throw null; } + public int MinValue { get => throw null; set => throw null; } + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.IriParsingElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class IriParsingElement : System.Configuration.ConfigurationElement + { + public bool Enabled { get => throw null; set => throw null; } + public IriParsingElement() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + } + + // Generated from `System.Configuration.KeyValueConfigurationCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyValueConfigurationCollection : System.Configuration.ConfigurationElementCollection + { + public void Add(string key, string value) => throw null; + public void Add(System.Configuration.KeyValueConfigurationElement keyValue) => throw null; + public string[] AllKeys { get => throw null; } + public void Clear() => throw null; + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public System.Configuration.KeyValueConfigurationElement this[string key] { get => throw null; } + public KeyValueConfigurationCollection() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public void Remove(string key) => throw null; + protected override bool ThrowOnDuplicate { get => throw null; } + } + + // Generated from `System.Configuration.KeyValueConfigurationElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class KeyValueConfigurationElement : System.Configuration.ConfigurationElement + { + protected override void Init() => throw null; + public string Key { get => throw null; } + public KeyValueConfigurationElement(string key, string value) => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.LocalFileSettingsProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class LocalFileSettingsProvider : System.Configuration.SettingsProvider, System.Configuration.IApplicationSettingsProvider + { + public override string ApplicationName { get => throw null; set => throw null; } + public System.Configuration.SettingsPropertyValue GetPreviousVersion(System.Configuration.SettingsContext context, System.Configuration.SettingsProperty property) => throw null; + public override System.Configuration.SettingsPropertyValueCollection GetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties) => throw null; + public override void Initialize(string name, System.Collections.Specialized.NameValueCollection values) => throw null; + public LocalFileSettingsProvider() => throw null; + public void Reset(System.Configuration.SettingsContext context) => throw null; + public override void SetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection values) => throw null; + public void Upgrade(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties) => throw null; + } + + // Generated from `System.Configuration.LongValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class LongValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public LongValidator(System.Int64 minValue, System.Int64 maxValue, bool rangeIsExclusive, System.Int64 resolution) => throw null; + public LongValidator(System.Int64 minValue, System.Int64 maxValue, bool rangeIsExclusive) => throw null; + public LongValidator(System.Int64 minValue, System.Int64 maxValue) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.LongValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class LongValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public bool ExcludeRange { get => throw null; set => throw null; } + public LongValidatorAttribute() => throw null; + public System.Int64 MaxValue { get => throw null; set => throw null; } + public System.Int64 MinValue { get => throw null; set => throw null; } + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.NameValueConfigurationCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NameValueConfigurationCollection : System.Configuration.ConfigurationElementCollection + { + public void Add(System.Configuration.NameValueConfigurationElement nameValue) => throw null; + public string[] AllKeys { get => throw null; } + public void Clear() => throw null; + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public System.Configuration.NameValueConfigurationElement this[string name] { get => throw null; set => throw null; } + public NameValueConfigurationCollection() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public void Remove(string name) => throw null; + public void Remove(System.Configuration.NameValueConfigurationElement nameValue) => throw null; + } + + // Generated from `System.Configuration.NameValueConfigurationElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NameValueConfigurationElement : System.Configuration.ConfigurationElement + { + public string Name { get => throw null; } + public NameValueConfigurationElement(string name, string value) => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.NameValueFileSectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NameValueFileSectionHandler : System.Configuration.IConfigurationSectionHandler + { + public object Create(object parent, object configContext, System.Xml.XmlNode section) => throw null; + public NameValueFileSectionHandler() => throw null; + } + + // Generated from `System.Configuration.NameValueSectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NameValueSectionHandler : System.Configuration.IConfigurationSectionHandler + { + public object Create(object parent, object context, System.Xml.XmlNode section) => throw null; + protected virtual string KeyAttributeName { get => throw null; } + public NameValueSectionHandler() => throw null; + protected virtual string ValueAttributeName { get => throw null; } + } + + // Generated from `System.Configuration.NoSettingsVersionUpgradeAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class NoSettingsVersionUpgradeAttribute : System.Attribute + { + public NoSettingsVersionUpgradeAttribute() => throw null; + } + + // Generated from `System.Configuration.OverrideMode` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum OverrideMode + { + Allow, + Deny, + Inherit, + } + + // Generated from `System.Configuration.PositiveTimeSpanValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PositiveTimeSpanValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public PositiveTimeSpanValidator() => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.PositiveTimeSpanValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PositiveTimeSpanValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public PositiveTimeSpanValidatorAttribute() => throw null; + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.PropertyInformation` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PropertyInformation + { + public System.ComponentModel.TypeConverter Converter { get => throw null; } + public object DefaultValue { get => throw null; } + public string Description { get => throw null; } + public bool IsKey { get => throw null; } + public bool IsLocked { get => throw null; } + public bool IsModified { get => throw null; } + public bool IsRequired { get => throw null; } + public int LineNumber { get => throw null; } + public string Name { get => throw null; } + public string Source { get => throw null; } + public System.Type Type { get => throw null; } + public System.Configuration.ConfigurationValidatorBase Validator { get => throw null; } + public object Value { get => throw null; set => throw null; } + public System.Configuration.PropertyValueOrigin ValueOrigin { get => throw null; } + } + + // Generated from `System.Configuration.PropertyInformationCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase + { + public void CopyTo(System.Configuration.PropertyInformation[] array, int index) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + public System.Configuration.PropertyInformation this[string propertyName] { get => throw null; } + } + + // Generated from `System.Configuration.PropertyValueOrigin` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum PropertyValueOrigin + { + Default, + Inherited, + SetHere, + } + + // Generated from `System.Configuration.ProtectedConfiguration` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public static class ProtectedConfiguration + { + public const string DataProtectionProviderName = default; + public static string DefaultProvider { get => throw null; } + public const string ProtectedDataSectionName = default; + public static System.Configuration.ProtectedConfigurationProviderCollection Providers { get => throw null; } + public const string RsaProviderName = default; + } + + // Generated from `System.Configuration.ProtectedConfigurationProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ProtectedConfigurationProvider : System.Configuration.Provider.ProviderBase + { + public abstract System.Xml.XmlNode Decrypt(System.Xml.XmlNode encryptedNode); + public abstract System.Xml.XmlNode Encrypt(System.Xml.XmlNode node); + protected ProtectedConfigurationProvider() => throw null; + } + + // Generated from `System.Configuration.ProtectedConfigurationProviderCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProtectedConfigurationProviderCollection : System.Configuration.Provider.ProviderCollection + { + public override void Add(System.Configuration.Provider.ProviderBase provider) => throw null; + public System.Configuration.ProtectedConfigurationProvider this[string name] { get => throw null; } + public ProtectedConfigurationProviderCollection() => throw null; + } + + // Generated from `System.Configuration.ProtectedConfigurationSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProtectedConfigurationSection : System.Configuration.ConfigurationSection + { + public string DefaultProvider { get => throw null; set => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public ProtectedConfigurationSection() => throw null; + public System.Configuration.ProviderSettingsCollection Providers { get => throw null; } + } + + // Generated from `System.Configuration.ProtectedProviderSettings` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProtectedProviderSettings : System.Configuration.ConfigurationElement + { + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public ProtectedProviderSettings() => throw null; + public System.Configuration.ProviderSettingsCollection Providers { get => throw null; } + } + + // Generated from `System.Configuration.ProviderSettings` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProviderSettings : System.Configuration.ConfigurationElement + { + protected override bool IsModified() => throw null; + public string Name { get => throw null; set => throw null; } + protected override bool OnDeserializeUnrecognizedAttribute(string name, string value) => throw null; + public System.Collections.Specialized.NameValueCollection Parameters { get => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public ProviderSettings(string name, string type) => throw null; + public ProviderSettings() => throw null; + protected override void Reset(System.Configuration.ConfigurationElement parentElement) => throw null; + public string Type { get => throw null; set => throw null; } + protected override void Unmerge(System.Configuration.ConfigurationElement sourceElement, System.Configuration.ConfigurationElement parentElement, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + } + + // Generated from `System.Configuration.ProviderSettingsCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProviderSettingsCollection : System.Configuration.ConfigurationElementCollection + { + public void Add(System.Configuration.ProviderSettings provider) => throw null; + public void Clear() => throw null; + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public System.Configuration.ProviderSettings this[string key] { get => throw null; } + public System.Configuration.ProviderSettings this[int index] { get => throw null; set => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public ProviderSettingsCollection() => throw null; + public void Remove(string name) => throw null; + } + + // Generated from `System.Configuration.RegexStringValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RegexStringValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public RegexStringValidator(string regex) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.RegexStringValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RegexStringValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public string Regex { get => throw null; } + public RegexStringValidatorAttribute(string regex) => throw null; + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.RsaProtectedConfigurationProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class RsaProtectedConfigurationProvider : System.Configuration.ProtectedConfigurationProvider + { + public void AddKey(int keySize, bool exportable) => throw null; + public string CspProviderName { get => throw null; } + public override System.Xml.XmlNode Decrypt(System.Xml.XmlNode encryptedNode) => throw null; + public void DeleteKey() => throw null; + public override System.Xml.XmlNode Encrypt(System.Xml.XmlNode node) => throw null; + public void ExportKey(string xmlFileName, bool includePrivateParameters) => throw null; + public void ImportKey(string xmlFileName, bool exportable) => throw null; + public override void Initialize(string name, System.Collections.Specialized.NameValueCollection configurationValues) => throw null; + public string KeyContainerName { get => throw null; } + public RsaProtectedConfigurationProvider() => throw null; + public System.Security.Cryptography.RSAParameters RsaPublicKey { get => throw null; } + public bool UseFIPS { get => throw null; } + public bool UseMachineContainer { get => throw null; } + public bool UseOAEP { get => throw null; } + } + + // Generated from `System.Configuration.SchemeSettingElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SchemeSettingElement : System.Configuration.ConfigurationElement + { + public System.GenericUriParserOptions GenericUriParserOptions { get => throw null; } + public string Name { get => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public SchemeSettingElement() => throw null; + } + + // Generated from `System.Configuration.SchemeSettingElementCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SchemeSettingElementCollection : System.Configuration.ConfigurationElementCollection + { + public override System.Configuration.ConfigurationElementCollectionType CollectionType { get => throw null; } + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public int IndexOf(System.Configuration.SchemeSettingElement element) => throw null; + public System.Configuration.SchemeSettingElement this[string name] { get => throw null; } + public System.Configuration.SchemeSettingElement this[int index] { get => throw null; } + public SchemeSettingElementCollection() => throw null; + } + + // Generated from `System.Configuration.SectionInformation` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SectionInformation + { + public System.Configuration.ConfigurationAllowDefinition AllowDefinition { get => throw null; set => throw null; } + public System.Configuration.ConfigurationAllowExeDefinition AllowExeDefinition { get => throw null; set => throw null; } + public bool AllowLocation { get => throw null; set => throw null; } + public bool AllowOverride { get => throw null; set => throw null; } + public string ConfigSource { get => throw null; set => throw null; } + public void ForceDeclaration(bool force) => throw null; + public void ForceDeclaration() => throw null; + public bool ForceSave { get => throw null; set => throw null; } + public System.Configuration.ConfigurationSection GetParentSection() => throw null; + public string GetRawXml() => throw null; + public bool InheritInChildApplications { get => throw null; set => throw null; } + public bool IsDeclarationRequired { get => throw null; } + public bool IsDeclared { get => throw null; } + public bool IsLocked { get => throw null; } + public bool IsProtected { get => throw null; } + public string Name { get => throw null; } + public System.Configuration.OverrideMode OverrideMode { get => throw null; set => throw null; } + public System.Configuration.OverrideMode OverrideModeDefault { get => throw null; set => throw null; } + public System.Configuration.OverrideMode OverrideModeEffective { get => throw null; } + public void ProtectSection(string protectionProvider) => throw null; + public System.Configuration.ProtectedConfigurationProvider ProtectionProvider { get => throw null; } + public bool RequirePermission { get => throw null; set => throw null; } + public bool RestartOnExternalChanges { get => throw null; set => throw null; } + public void RevertToParent() => throw null; + public string SectionName { get => throw null; } + public void SetRawXml(string rawXml) => throw null; + public string Type { get => throw null; set => throw null; } + public void UnprotectSection() => throw null; + } + + // Generated from `System.Configuration.SettingAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingAttribute : System.Attribute + { + public SettingAttribute() => throw null; + } + + // Generated from `System.Configuration.SettingChangingEventArgs` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingChangingEventArgs : System.ComponentModel.CancelEventArgs + { + public object NewValue { get => throw null; } + public SettingChangingEventArgs(string settingName, string settingClass, string settingKey, object newValue, bool cancel) => throw null; + public string SettingClass { get => throw null; } + public string SettingKey { get => throw null; } + public string SettingName { get => throw null; } + } + + // Generated from `System.Configuration.SettingChangingEventHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e); + + // Generated from `System.Configuration.SettingElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingElement : System.Configuration.ConfigurationElement + { + public override bool Equals(object settings) => throw null; + public override int GetHashCode() => throw null; + public string Name { get => throw null; set => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public System.Configuration.SettingsSerializeAs SerializeAs { get => throw null; set => throw null; } + public SettingElement(string name, System.Configuration.SettingsSerializeAs serializeAs) => throw null; + public SettingElement() => throw null; + public System.Configuration.SettingValueElement Value { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.SettingElementCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingElementCollection : System.Configuration.ConfigurationElementCollection + { + public void Add(System.Configuration.SettingElement element) => throw null; + public void Clear() => throw null; + public override System.Configuration.ConfigurationElementCollectionType CollectionType { get => throw null; } + protected override System.Configuration.ConfigurationElement CreateNewElement() => throw null; + protected override string ElementName { get => throw null; } + public System.Configuration.SettingElement Get(string elementKey) => throw null; + protected override object GetElementKey(System.Configuration.ConfigurationElement element) => throw null; + public void Remove(System.Configuration.SettingElement element) => throw null; + public SettingElementCollection() => throw null; + } + + // Generated from `System.Configuration.SettingValueElement` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingValueElement : System.Configuration.ConfigurationElement + { + protected override void DeserializeElement(System.Xml.XmlReader reader, bool serializeCollectionKey) => throw null; + public override bool Equals(object settingValue) => throw null; + public override int GetHashCode() => throw null; + protected override bool IsModified() => throw null; + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + protected override void Reset(System.Configuration.ConfigurationElement parentElement) => throw null; + protected override void ResetModified() => throw null; + protected override bool SerializeToXmlElement(System.Xml.XmlWriter writer, string elementName) => throw null; + public SettingValueElement() => throw null; + protected override void Unmerge(System.Configuration.ConfigurationElement sourceElement, System.Configuration.ConfigurationElement parentElement, System.Configuration.ConfigurationSaveMode saveMode) => throw null; + public System.Xml.XmlNode ValueXml { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.SettingsAttributeDictionary` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsAttributeDictionary : System.Collections.Hashtable + { + public SettingsAttributeDictionary(System.Configuration.SettingsAttributeDictionary attributes) => throw null; + public SettingsAttributeDictionary() => throw null; + } + + // Generated from `System.Configuration.SettingsBase` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class SettingsBase + { + public virtual System.Configuration.SettingsContext Context { get => throw null; } + public void Initialize(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties, System.Configuration.SettingsProviderCollection providers) => throw null; + public bool IsSynchronized { get => throw null; } + public virtual object this[string propertyName] { get => throw null; set => throw null; } + public virtual System.Configuration.SettingsPropertyCollection Properties { get => throw null; } + public virtual System.Configuration.SettingsPropertyValueCollection PropertyValues { get => throw null; } + public virtual System.Configuration.SettingsProviderCollection Providers { get => throw null; } + public virtual void Save() => throw null; + protected SettingsBase() => throw null; + public static System.Configuration.SettingsBase Synchronized(System.Configuration.SettingsBase settingsBase) => throw null; + } + + // Generated from `System.Configuration.SettingsContext` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsContext : System.Collections.Hashtable + { + public SettingsContext() => throw null; + } + + // Generated from `System.Configuration.SettingsDescriptionAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsDescriptionAttribute : System.Attribute + { + public string Description { get => throw null; } + public SettingsDescriptionAttribute(string description) => throw null; + } + + // Generated from `System.Configuration.SettingsGroupDescriptionAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsGroupDescriptionAttribute : System.Attribute + { + public string Description { get => throw null; } + public SettingsGroupDescriptionAttribute(string description) => throw null; + } + + // Generated from `System.Configuration.SettingsGroupNameAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsGroupNameAttribute : System.Attribute + { + public string GroupName { get => throw null; } + public SettingsGroupNameAttribute(string groupName) => throw null; + } + + // Generated from `System.Configuration.SettingsLoadedEventArgs` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsLoadedEventArgs : System.EventArgs + { + public System.Configuration.SettingsProvider Provider { get => throw null; } + public SettingsLoadedEventArgs(System.Configuration.SettingsProvider provider) => throw null; + } + + // Generated from `System.Configuration.SettingsLoadedEventHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void SettingsLoadedEventHandler(object sender, System.Configuration.SettingsLoadedEventArgs e); + + // Generated from `System.Configuration.SettingsManageability` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SettingsManageability + { + Roaming, + } + + // Generated from `System.Configuration.SettingsManageabilityAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsManageabilityAttribute : System.Attribute + { + public System.Configuration.SettingsManageability Manageability { get => throw null; } + public SettingsManageabilityAttribute(System.Configuration.SettingsManageability manageability) => throw null; + } + + // Generated from `System.Configuration.SettingsProperty` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsProperty + { + public virtual System.Configuration.SettingsAttributeDictionary Attributes { get => throw null; } + public virtual object DefaultValue { get => throw null; set => throw null; } + public virtual bool IsReadOnly { get => throw null; set => throw null; } + public virtual string Name { get => throw null; set => throw null; } + public virtual System.Type PropertyType { get => throw null; set => throw null; } + public virtual System.Configuration.SettingsProvider Provider { get => throw null; set => throw null; } + public virtual System.Configuration.SettingsSerializeAs SerializeAs { get => throw null; set => throw null; } + public SettingsProperty(string name, System.Type propertyType, System.Configuration.SettingsProvider provider, bool isReadOnly, object defaultValue, System.Configuration.SettingsSerializeAs serializeAs, System.Configuration.SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing) => throw null; + public SettingsProperty(string name) => throw null; + public SettingsProperty(System.Configuration.SettingsProperty propertyToCopy) => throw null; + public bool ThrowOnErrorDeserializing { get => throw null; set => throw null; } + public bool ThrowOnErrorSerializing { get => throw null; set => throw null; } + } + + // Generated from `System.Configuration.SettingsPropertyCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyCollection : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(System.Configuration.SettingsProperty property) => throw null; + public void Clear() => throw null; + public object Clone() => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Configuration.SettingsProperty this[string name] { get => throw null; } + protected virtual void OnAdd(System.Configuration.SettingsProperty property) => throw null; + protected virtual void OnAddComplete(System.Configuration.SettingsProperty property) => throw null; + protected virtual void OnClear() => throw null; + protected virtual void OnClearComplete() => throw null; + protected virtual void OnRemove(System.Configuration.SettingsProperty property) => throw null; + protected virtual void OnRemoveComplete(System.Configuration.SettingsProperty property) => throw null; + public void Remove(string name) => throw null; + public void SetReadOnly() => throw null; + public SettingsPropertyCollection() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Configuration.SettingsPropertyIsReadOnlyException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyIsReadOnlyException : System.Exception + { + public SettingsPropertyIsReadOnlyException(string message, System.Exception innerException) => throw null; + public SettingsPropertyIsReadOnlyException(string message) => throw null; + public SettingsPropertyIsReadOnlyException() => throw null; + protected SettingsPropertyIsReadOnlyException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Configuration.SettingsPropertyNotFoundException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyNotFoundException : System.Exception + { + public SettingsPropertyNotFoundException(string message, System.Exception innerException) => throw null; + public SettingsPropertyNotFoundException(string message) => throw null; + public SettingsPropertyNotFoundException() => throw null; + protected SettingsPropertyNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Configuration.SettingsPropertyValue` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyValue + { + public bool Deserialized { get => throw null; set => throw null; } + public bool IsDirty { get => throw null; set => throw null; } + public string Name { get => throw null; } + public System.Configuration.SettingsProperty Property { get => throw null; } + public object PropertyValue { get => throw null; set => throw null; } + public object SerializedValue { get => throw null; set => throw null; } + public SettingsPropertyValue(System.Configuration.SettingsProperty property) => throw null; + public bool UsingDefaultValue { get => throw null; } + } + + // Generated from `System.Configuration.SettingsPropertyValueCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyValueCollection : System.ICloneable, System.Collections.IEnumerable, System.Collections.ICollection + { + public void Add(System.Configuration.SettingsPropertyValue property) => throw null; + public void Clear() => throw null; + public object Clone() => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Configuration.SettingsPropertyValue this[string name] { get => throw null; } + public void Remove(string name) => throw null; + public void SetReadOnly() => throw null; + public SettingsPropertyValueCollection() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Configuration.SettingsPropertyWrongTypeException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsPropertyWrongTypeException : System.Exception + { + public SettingsPropertyWrongTypeException(string message, System.Exception innerException) => throw null; + public SettingsPropertyWrongTypeException(string message) => throw null; + public SettingsPropertyWrongTypeException() => throw null; + protected SettingsPropertyWrongTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + // Generated from `System.Configuration.SettingsProvider` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class SettingsProvider : System.Configuration.Provider.ProviderBase + { + public abstract string ApplicationName { get; set; } + public abstract System.Configuration.SettingsPropertyValueCollection GetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection collection); + public abstract void SetPropertyValues(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyValueCollection collection); + protected SettingsProvider() => throw null; + } + + // Generated from `System.Configuration.SettingsProviderAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsProviderAttribute : System.Attribute + { + public string ProviderTypeName { get => throw null; } + public SettingsProviderAttribute(string providerTypeName) => throw null; + public SettingsProviderAttribute(System.Type providerType) => throw null; + } + + // Generated from `System.Configuration.SettingsProviderCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsProviderCollection : System.Configuration.Provider.ProviderCollection + { + public override void Add(System.Configuration.Provider.ProviderBase provider) => throw null; + public System.Configuration.SettingsProvider this[string name] { get => throw null; } + public SettingsProviderCollection() => throw null; + } + + // Generated from `System.Configuration.SettingsSavingEventHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e); + + // Generated from `System.Configuration.SettingsSerializeAs` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SettingsSerializeAs + { + Binary, + ProviderSpecific, + String, + Xml, + } + + // Generated from `System.Configuration.SettingsSerializeAsAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SettingsSerializeAsAttribute : System.Attribute + { + public System.Configuration.SettingsSerializeAs SerializeAs { get => throw null; } + public SettingsSerializeAsAttribute(System.Configuration.SettingsSerializeAs serializeAs) => throw null; + } + + // Generated from `System.Configuration.SingleTagSectionHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SingleTagSectionHandler : System.Configuration.IConfigurationSectionHandler + { + public virtual object Create(object parent, object context, System.Xml.XmlNode section) => throw null; + public SingleTagSectionHandler() => throw null; + } + + // Generated from `System.Configuration.SpecialSetting` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public enum SpecialSetting + { + ConnectionString, + WebServiceUrl, + } + + // Generated from `System.Configuration.SpecialSettingAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SpecialSettingAttribute : System.Attribute + { + public System.Configuration.SpecialSetting SpecialSetting { get => throw null; } + public SpecialSettingAttribute(System.Configuration.SpecialSetting specialSetting) => throw null; + } + + // Generated from `System.Configuration.StringValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StringValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public StringValidator(int minLength, int maxLength, string invalidCharacters) => throw null; + public StringValidator(int minLength, int maxLength) => throw null; + public StringValidator(int minLength) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.StringValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class StringValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public string InvalidCharacters { get => throw null; set => throw null; } + public int MaxLength { get => throw null; set => throw null; } + public int MinLength { get => throw null; set => throw null; } + public StringValidatorAttribute() => throw null; + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.SubclassTypeValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SubclassTypeValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public SubclassTypeValidator(System.Type baseClass) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.SubclassTypeValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class SubclassTypeValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public System.Type BaseClass { get => throw null; } + public SubclassTypeValidatorAttribute(System.Type baseClass) => throw null; + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.TimeSpanMinutesConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanMinutesConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public TimeSpanMinutesConverter() => throw null; + } + + // Generated from `System.Configuration.TimeSpanMinutesOrInfiniteConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanMinutesOrInfiniteConverter : System.Configuration.TimeSpanMinutesConverter + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public TimeSpanMinutesOrInfiniteConverter() => throw null; + } + + // Generated from `System.Configuration.TimeSpanSecondsConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanSecondsConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public TimeSpanSecondsConverter() => throw null; + } + + // Generated from `System.Configuration.TimeSpanSecondsOrInfiniteConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanSecondsOrInfiniteConverter : System.Configuration.TimeSpanSecondsConverter + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public TimeSpanSecondsOrInfiniteConverter() => throw null; + } + + // Generated from `System.Configuration.TimeSpanValidator` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanValidator : System.Configuration.ConfigurationValidatorBase + { + public override bool CanValidate(System.Type type) => throw null; + public TimeSpanValidator(System.TimeSpan minValue, System.TimeSpan maxValue, bool rangeIsExclusive, System.Int64 resolutionInSeconds) => throw null; + public TimeSpanValidator(System.TimeSpan minValue, System.TimeSpan maxValue, bool rangeIsExclusive) => throw null; + public TimeSpanValidator(System.TimeSpan minValue, System.TimeSpan maxValue) => throw null; + public override void Validate(object value) => throw null; + } + + // Generated from `System.Configuration.TimeSpanValidatorAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TimeSpanValidatorAttribute : System.Configuration.ConfigurationValidatorAttribute + { + public bool ExcludeRange { get => throw null; set => throw null; } + public System.TimeSpan MaxValue { get => throw null; } + public string MaxValueString { get => throw null; set => throw null; } + public System.TimeSpan MinValue { get => throw null; } + public string MinValueString { get => throw null; set => throw null; } + public const string TimeSpanMaxValue = default; + public const string TimeSpanMinValue = default; + public TimeSpanValidatorAttribute() => throw null; + public override System.Configuration.ConfigurationValidatorBase ValidatorInstance { get => throw null; } + } + + // Generated from `System.Configuration.TypeNameConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class TypeNameConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public TypeNameConverter() => throw null; + } + + // Generated from `System.Configuration.UriSection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UriSection : System.Configuration.ConfigurationSection + { + public System.Configuration.IdnElement Idn { get => throw null; } + public System.Configuration.IriParsingElement IriParsing { get => throw null; } + protected override System.Configuration.ConfigurationPropertyCollection Properties { get => throw null; } + public System.Configuration.SchemeSettingElementCollection SchemeSettings { get => throw null; } + public UriSection() => throw null; + } + + // Generated from `System.Configuration.UserScopedSettingAttribute` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UserScopedSettingAttribute : System.Configuration.SettingAttribute + { + public UserScopedSettingAttribute() => throw null; + } + + // Generated from `System.Configuration.UserSettingsGroup` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class UserSettingsGroup : System.Configuration.ConfigurationSectionGroup + { + public UserSettingsGroup() => throw null; + } + + // Generated from `System.Configuration.ValidatorCallback` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void ValidatorCallback(object value); + + // Generated from `System.Configuration.WhiteSpaceTrimStringConverter` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class WhiteSpaceTrimStringConverter : System.Configuration.ConfigurationConverterBase + { + public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object data) => throw null; + public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, System.Type type) => throw null; + public WhiteSpaceTrimStringConverter() => throw null; + } + + namespace Internal + { + // Generated from `System.Configuration.Internal.DelegatingConfigHost` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class DelegatingConfigHost : System.Configuration.Internal.IInternalConfigHost + { + public virtual object CreateConfigurationContext(string configPath, string locationSubPath) => throw null; + public virtual object CreateDeprecatedConfigContext(string configPath) => throw null; + public virtual string DecryptSection(string encryptedXml, System.Configuration.ProtectedConfigurationProvider protectionProvider, System.Configuration.ProtectedConfigurationSection protectedConfigSection) => throw null; + protected DelegatingConfigHost() => throw null; + public virtual void DeleteStream(string streamName) => throw null; + public virtual string EncryptSection(string clearTextXml, System.Configuration.ProtectedConfigurationProvider protectionProvider, System.Configuration.ProtectedConfigurationSection protectedConfigSection) => throw null; + public virtual string GetConfigPathFromLocationSubPath(string configPath, string locationSubPath) => throw null; + public virtual System.Type GetConfigType(string typeName, bool throwOnError) => throw null; + public virtual string GetConfigTypeName(System.Type t) => throw null; + public virtual string GetStreamName(string configPath) => throw null; + public virtual string GetStreamNameForConfigSource(string streamName, string configSource) => throw null; + public virtual object GetStreamVersion(string streamName) => throw null; + protected System.Configuration.Internal.IInternalConfigHost Host { get => throw null; set => throw null; } + public virtual System.IDisposable Impersonate() => throw null; + public virtual void Init(System.Configuration.Internal.IInternalConfigRoot configRoot, params object[] hostInitParams) => throw null; + public virtual void InitForConfiguration(ref string locationSubPath, out string configPath, out string locationConfigPath, System.Configuration.Internal.IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams) => throw null; + public virtual bool IsAboveApplication(string configPath) => throw null; + public virtual bool IsConfigRecordRequired(string configPath) => throw null; + public virtual bool IsDefinitionAllowed(string configPath, System.Configuration.ConfigurationAllowDefinition allowDefinition, System.Configuration.ConfigurationAllowExeDefinition allowExeDefinition) => throw null; + public virtual bool IsFile(string streamName) => throw null; + public virtual bool IsFullTrustSectionWithoutAptcaAllowed(System.Configuration.Internal.IInternalConfigRecord configRecord) => throw null; + public virtual bool IsInitDelayed(System.Configuration.Internal.IInternalConfigRecord configRecord) => throw null; + public virtual bool IsLocationApplicable(string configPath) => throw null; + public virtual bool IsRemote { get => throw null; } + public virtual bool IsSecondaryRoot(string configPath) => throw null; + public virtual bool IsTrustedConfigPath(string configPath) => throw null; + public virtual System.IO.Stream OpenStreamForRead(string streamName, bool assertPermissions) => throw null; + public virtual System.IO.Stream OpenStreamForRead(string streamName) => throw null; + public virtual System.IO.Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext, bool assertPermissions) => throw null; + public virtual System.IO.Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext) => throw null; + public virtual bool PrefetchAll(string configPath, string streamName) => throw null; + public virtual bool PrefetchSection(string sectionGroupName, string sectionName) => throw null; + public virtual void RequireCompleteInit(System.Configuration.Internal.IInternalConfigRecord configRecord) => throw null; + public virtual object StartMonitoringStreamForChanges(string streamName, System.Configuration.Internal.StreamChangeCallback callback) => throw null; + public virtual void StopMonitoringStreamForChanges(string streamName, System.Configuration.Internal.StreamChangeCallback callback) => throw null; + public virtual bool SupportsChangeNotifications { get => throw null; } + public virtual bool SupportsLocation { get => throw null; } + public virtual bool SupportsPath { get => throw null; } + public virtual bool SupportsRefresh { get => throw null; } + public virtual void VerifyDefinitionAllowed(string configPath, System.Configuration.ConfigurationAllowDefinition allowDefinition, System.Configuration.ConfigurationAllowExeDefinition allowExeDefinition, System.Configuration.Internal.IConfigErrorInfo errorInfo) => throw null; + public virtual void WriteCompleted(string streamName, bool success, object writeContext, bool assertPermissions) => throw null; + public virtual void WriteCompleted(string streamName, bool success, object writeContext) => throw null; + } + + // Generated from `System.Configuration.Internal.IConfigErrorInfo` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigErrorInfo + { + string Filename { get; } + int LineNumber { get; } + } + + // Generated from `System.Configuration.Internal.IConfigSystem` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigSystem + { + System.Configuration.Internal.IInternalConfigHost Host { get; } + void Init(System.Type typeConfigHost, params object[] hostInitParams); + System.Configuration.Internal.IInternalConfigRoot Root { get; } + } + + // Generated from `System.Configuration.Internal.IConfigurationManagerHelper` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigurationManagerHelper + { + void EnsureNetConfigLoaded(); + } + + // Generated from `System.Configuration.Internal.IConfigurationManagerInternal` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IConfigurationManagerInternal + { + string ApplicationConfigUri { get; } + string ExeLocalConfigDirectory { get; } + string ExeLocalConfigPath { get; } + string ExeProductName { get; } + string ExeProductVersion { get; } + string ExeRoamingConfigDirectory { get; } + string ExeRoamingConfigPath { get; } + string MachineConfigPath { get; } + bool SetConfigurationSystemInProgress { get; } + bool SupportsUserConfig { get; } + string UserConfigFilename { get; } + } + + // Generated from `System.Configuration.Internal.IInternalConfigClientHost` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigClientHost + { + string GetExeConfigPath(); + string GetLocalUserConfigPath(); + string GetRoamingUserConfigPath(); + bool IsExeConfig(string configPath); + bool IsLocalUserConfig(string configPath); + bool IsRoamingUserConfig(string configPath); + } + + // Generated from `System.Configuration.Internal.IInternalConfigConfigurationFactory` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigConfigurationFactory + { + System.Configuration.Configuration Create(System.Type typeConfigHost, params object[] hostInitConfigurationParams); + string NormalizeLocationSubPath(string subPath, System.Configuration.Internal.IConfigErrorInfo errorInfo); + } + + // Generated from `System.Configuration.Internal.IInternalConfigHost` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigHost + { + object CreateConfigurationContext(string configPath, string locationSubPath); + object CreateDeprecatedConfigContext(string configPath); + string DecryptSection(string encryptedXml, System.Configuration.ProtectedConfigurationProvider protectionProvider, System.Configuration.ProtectedConfigurationSection protectedConfigSection); + void DeleteStream(string streamName); + string EncryptSection(string clearTextXml, System.Configuration.ProtectedConfigurationProvider protectionProvider, System.Configuration.ProtectedConfigurationSection protectedConfigSection); + string GetConfigPathFromLocationSubPath(string configPath, string locationSubPath); + System.Type GetConfigType(string typeName, bool throwOnError); + string GetConfigTypeName(System.Type t); + string GetStreamName(string configPath); + string GetStreamNameForConfigSource(string streamName, string configSource); + object GetStreamVersion(string streamName); + System.IDisposable Impersonate(); + void Init(System.Configuration.Internal.IInternalConfigRoot configRoot, params object[] hostInitParams); + void InitForConfiguration(ref string locationSubPath, out string configPath, out string locationConfigPath, System.Configuration.Internal.IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams); + bool IsAboveApplication(string configPath); + bool IsConfigRecordRequired(string configPath); + bool IsDefinitionAllowed(string configPath, System.Configuration.ConfigurationAllowDefinition allowDefinition, System.Configuration.ConfigurationAllowExeDefinition allowExeDefinition); + bool IsFile(string streamName); + bool IsFullTrustSectionWithoutAptcaAllowed(System.Configuration.Internal.IInternalConfigRecord configRecord); + bool IsInitDelayed(System.Configuration.Internal.IInternalConfigRecord configRecord); + bool IsLocationApplicable(string configPath); + bool IsRemote { get; } + bool IsSecondaryRoot(string configPath); + bool IsTrustedConfigPath(string configPath); + System.IO.Stream OpenStreamForRead(string streamName, bool assertPermissions); + System.IO.Stream OpenStreamForRead(string streamName); + System.IO.Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext, bool assertPermissions); + System.IO.Stream OpenStreamForWrite(string streamName, string templateStreamName, ref object writeContext); + bool PrefetchAll(string configPath, string streamName); + bool PrefetchSection(string sectionGroupName, string sectionName); + void RequireCompleteInit(System.Configuration.Internal.IInternalConfigRecord configRecord); + object StartMonitoringStreamForChanges(string streamName, System.Configuration.Internal.StreamChangeCallback callback); + void StopMonitoringStreamForChanges(string streamName, System.Configuration.Internal.StreamChangeCallback callback); + bool SupportsChangeNotifications { get; } + bool SupportsLocation { get; } + bool SupportsPath { get; } + bool SupportsRefresh { get; } + void VerifyDefinitionAllowed(string configPath, System.Configuration.ConfigurationAllowDefinition allowDefinition, System.Configuration.ConfigurationAllowExeDefinition allowExeDefinition, System.Configuration.Internal.IConfigErrorInfo errorInfo); + void WriteCompleted(string streamName, bool success, object writeContext, bool assertPermissions); + void WriteCompleted(string streamName, bool success, object writeContext); + } + + // Generated from `System.Configuration.Internal.IInternalConfigRecord` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigRecord + { + string ConfigPath { get; } + object GetLkgSection(string configKey); + object GetSection(string configKey); + bool HasInitErrors { get; } + void RefreshSection(string configKey); + void Remove(); + string StreamName { get; } + void ThrowIfInitErrors(); + } + + // Generated from `System.Configuration.Internal.IInternalConfigRoot` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigRoot + { + event System.Configuration.Internal.InternalConfigEventHandler ConfigChanged; + event System.Configuration.Internal.InternalConfigEventHandler ConfigRemoved; + System.Configuration.Internal.IInternalConfigRecord GetConfigRecord(string configPath); + object GetSection(string section, string configPath); + string GetUniqueConfigPath(string configPath); + System.Configuration.Internal.IInternalConfigRecord GetUniqueConfigRecord(string configPath); + void Init(System.Configuration.Internal.IInternalConfigHost host, bool isDesignTime); + bool IsDesignTime { get; } + void RemoveConfig(string configPath); + } + + // Generated from `System.Configuration.Internal.IInternalConfigSettingsFactory` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigSettingsFactory + { + void CompleteInit(); + void SetConfigurationSystem(System.Configuration.Internal.IInternalConfigSystem internalConfigSystem, bool initComplete); + } + + // Generated from `System.Configuration.Internal.IInternalConfigSystem` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public interface IInternalConfigSystem + { + object GetSection(string configKey); + void RefreshConfig(string sectionName); + bool SupportsUserConfig { get; } + } + + // Generated from `System.Configuration.Internal.InternalConfigEventArgs` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class InternalConfigEventArgs : System.EventArgs + { + public string ConfigPath { get => throw null; set => throw null; } + public InternalConfigEventArgs(string configPath) => throw null; + } + + // Generated from `System.Configuration.Internal.InternalConfigEventHandler` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void InternalConfigEventHandler(object sender, System.Configuration.Internal.InternalConfigEventArgs e); + + // Generated from `System.Configuration.Internal.StreamChangeCallback` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public delegate void StreamChangeCallback(string streamName); + + } + namespace Provider + { + // Generated from `System.Configuration.Provider.ProviderBase` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public abstract class ProviderBase + { + public virtual string Description { get => throw null; } + public virtual void Initialize(string name, System.Collections.Specialized.NameValueCollection config) => throw null; + public virtual string Name { get => throw null; } + protected ProviderBase() => throw null; + } + + // Generated from `System.Configuration.Provider.ProviderCollection` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProviderCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public virtual void Add(System.Configuration.Provider.ProviderBase provider) => throw null; + public void Clear() => throw null; + void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null; + public void CopyTo(System.Configuration.Provider.ProviderBase[] array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + public bool IsSynchronized { get => throw null; } + public System.Configuration.Provider.ProviderBase this[string name] { get => throw null; } + public ProviderCollection() => throw null; + public void Remove(string name) => throw null; + public void SetReadOnly() => throw null; + public object SyncRoot { get => throw null; } + } + + // Generated from `System.Configuration.Provider.ProviderException` in `System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51` + public class ProviderException : System.Exception + { + public ProviderException(string message, System.Exception innerException) => throw null; + public ProviderException(string message) => throw null; + public ProviderException() => throw null; + protected ProviderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.csproj b/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/System.Configuration.ConfigurationManager/4.4.1/System.Configuration.ConfigurationManager.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + From dbc8b9cf6a3d00ca3b44864c52e3fa7125d8408c Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Wed, 23 Jun 2021 14:21:15 +0200 Subject: [PATCH 1592/1662] autoformat --- .../ql/src/semmle/javascript/frameworks/Logging.qll | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll index 393b49133d90..1410655428ad 100644 --- a/javascript/ql/src/semmle/javascript/frameworks/Logging.qll +++ b/javascript/ql/src/semmle/javascript/frameworks/Logging.qll @@ -221,8 +221,12 @@ class AnsiColorsStep extends TaintTracking::SharedTaintStep { class ColorsStep extends TaintTracking::SharedTaintStep { override predicate stringManipulationStep(DataFlow::Node pred, DataFlow::Node succ) { exists(API::CallNode call | - - call = API::moduleImport(["colors", "colors/safe" /* this variant avoids modifying the prototype methods */ ]).getAMember*().getACall() + call = + API::moduleImport([ + "colors", + // the `colors/safe` variant avoids modifying the prototype methods + "colors/safe" + ]).getAMember*().getACall() | pred = call.getArgument(0) and succ = call From c44475458e5a671735ad84b8450b11322d305a61 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 23 Jun 2021 14:38:36 +0200 Subject: [PATCH 1593/1662] Update cpp/ql/src/Security/CWE/CWE-190/Bounded.qll Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- cpp/ql/src/Security/CWE/CWE-190/Bounded.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll index 3982bc867dad..9f872304021d 100644 --- a/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll +++ b/cpp/ql/src/Security/CWE/CWE-190/Bounded.qll @@ -40,7 +40,7 @@ private predicate boundedBitwiseAnd(Expr e, Expr andExpr, Expr operand1, Expr op /** * Holds if `e` is an arithmetic expression that cannot overflow, or if `e` is an operand of an - * operation that may greatly reduces the range of possible values. + * operation that may greatly reduce the range of possible values. */ predicate bounded(Expr e) { ( From 653afc844819f3921ca97abd54fb7799427fc289 Mon Sep 17 00:00:00 2001 From: Alex Denisov Date: Wed, 23 Jun 2021 14:39:16 +0200 Subject: [PATCH 1594/1662] C++: Adjust test expectations after frontend upgrade --- cpp/ql/test/library-tests/ir/ir/PrintAST.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index 295ad79b9e29..040dbe0bfb54 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -5925,7 +5925,7 @@ ir.cpp: # 705| getStmt(0): [ReturnStmt] return ... # 705| getExpr(): [ConditionalExpr] ... ? ... : ... # 705| Type = [UnknownType] unknown -# 705| ValueCategory = prvalue +# 705| ValueCategory = prvalue(load) # 705| getCondition(): [LTExpr] ... < ... # 705| Type = [UnknownType] unknown # 705| ValueCategory = prvalue From 6374914053b498e02ec03db301778a37380da6b9 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Wed, 23 Jun 2021 14:39:18 +0200 Subject: [PATCH 1595/1662] Java: Fix bad magic. --- java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index 535c667698f9..1d9c79ceb202 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -560,6 +560,7 @@ module CsvValidation { } } +pragma[nomagic] private predicate elementSpec( string namespace, string type, boolean subtypes, string name, string signature, string ext ) { From b0447089d911457390ce1dd53674333f961651b9 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 18 Jun 2021 12:59:21 +0200 Subject: [PATCH 1596/1662] C#: Change Dapper stub to nuget-based one (stub also System.Data.SqlClient) --- .../EntityFramework/EntityFramework.cs | 2 +- .../Security Features/CWE-089/SqlInjection.cs | 12 +- csharp/ql/test/resources/stubs/Dapper.cs | 34 - .../resources/stubs/Dapper/2.0.90/Dapper.cs | 408 ++++++++ .../stubs/Dapper/2.0.90/Dapper.csproj | 12 + .../test/resources/stubs/EntityFramework.cs | 7 - .../4.8.2/System.Data.SqlClient.cs | 972 ++++++++++++++++++ .../4.8.2/System.Data.SqlClient.csproj | 12 + 8 files changed, 1411 insertions(+), 48 deletions(-) delete mode 100644 csharp/ql/test/resources/stubs/Dapper.cs create mode 100644 csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.cs create mode 100644 csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.csproj create mode 100644 csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.cs create mode 100644 csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.csproj diff --git a/csharp/ql/test/library-tests/frameworks/EntityFramework/EntityFramework.cs b/csharp/ql/test/library-tests/frameworks/EntityFramework/EntityFramework.cs index 48a332d0680c..ef62ec9cbe2c 100644 --- a/csharp/ql/test/library-tests/frameworks/EntityFramework/EntityFramework.cs +++ b/csharp/ql/test/library-tests/frameworks/EntityFramework/EntityFramework.cs @@ -1,5 +1,5 @@ // semmle-extractor-options: /r:System.Data.dll /r:System.ComponentModel.Primitives.dll /r:System.ComponentModel.TypeConverter.dll ${testdir}/../../../resources/stubs/EntityFramework.cs ${testdir}/../../../resources/stubs/System.Data.cs /r:System.ComponentModel.TypeConverter.dll /r:System.Data.Common.dll /r:System.Linq.dll - +// semmle-extractor-options: ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs ${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.cs using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity; diff --git a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.cs b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.cs index f3593096e1ef..0c0ee2b2ea2d 100644 --- a/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.cs +++ b/csharp/ql/test/query-tests/Security Features/CWE-089/SqlInjection.cs @@ -1,13 +1,13 @@ -// semmle-extractor-options: /r:System.ComponentModel.Primitives.dll /r:System.ComponentModel.TypeConverter.dll /r:System.Data.Common.dll ${testdir}/../../../resources/stubs/EntityFramework.cs ${testdir}/../../../resources/stubs/System.Data.cs ${testdir}/../../../resources/stubs/System.Windows.cs ${testdir}/../../../resources/stubs/Dapper.cs /r:System.Linq.Expressions.dll - +// semmle-extractor-options: /nostdlib /noconfig +// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/Dapper/2.0.90/Dapper.csproj +// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.csproj +// semmle-extractor-options: ${testdir}/../../../resources/stubs/EntityFramework.cs +// semmle-extractor-options: ${testdir}/../../../resources/stubs/System.Windows.cs using System; namespace System.Web.UI.WebControls { - public class TextBox - { - public string Text { get; set; } - } + public class TextBox { public string Text { get; set; } } } namespace Test diff --git a/csharp/ql/test/resources/stubs/Dapper.cs b/csharp/ql/test/resources/stubs/Dapper.cs deleted file mode 100644 index d96f1cd4ee6e..000000000000 --- a/csharp/ql/test/resources/stubs/Dapper.cs +++ /dev/null @@ -1,34 +0,0 @@ -// This file contains auto-generated code. -// original-extractor-options: /r:Dapper.dll /r:System.Data.SqlClient.dll ... - -namespace Dapper -{ - // Generated from `Dapper.CommandDefinition` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` - public struct CommandDefinition - { - public CommandDefinition(string commandText, object parameters = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null, Dapper.CommandFlags flags = CommandFlags.Buffered, System.Threading.CancellationToken cancellationToken = default) => throw null; - } - - // Generated from `Dapper.CommandFlags` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` - [System.Flags] - public enum CommandFlags - { - None = 0x0, - Buffered = 0x1, - Pipelined = 0x2, - NoCache = 0x4 - } - - // Generated from `Dapper.SqlMapper` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` - static public class SqlMapper - { - public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, bool buffered = true, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - public static System.Data.IDataReader ExecuteReader(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; - public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - public static System.Threading.Tasks.Task ExecuteAsync(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - public static object ExecuteScalar(this System.Data.IDbConnection cnn, string sql, object param = null, System.Data.IDbTransaction transaction = null, int? commandTimeout = null, System.Data.CommandType? commandType = null) => throw null; - } -} - diff --git a/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.cs b/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.cs new file mode 100644 index 000000000000..6918827e2b2f --- /dev/null +++ b/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.cs @@ -0,0 +1,408 @@ +// This file contains auto-generated code. + +namespace Dapper +{ + // Generated from `Dapper.CommandDefinition` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public struct CommandDefinition + { + public bool Buffered { get => throw null; } + public System.Threading.CancellationToken CancellationToken { get => throw null; } + public CommandDefinition(string commandText, object parameters = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?), Dapper.CommandFlags flags = default(Dapper.CommandFlags), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; + // Stub generator skipped constructor + public string CommandText { get => throw null; } + public int? CommandTimeout { get => throw null; } + public System.Data.CommandType? CommandType { get => throw null; } + public Dapper.CommandFlags Flags { get => throw null; } + public object Parameters { get => throw null; } + public bool Pipelined { get => throw null; } + public System.Data.IDbTransaction Transaction { get => throw null; } + } + + // Generated from `Dapper.CommandFlags` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + [System.Flags] + public enum CommandFlags + { + Buffered, + NoCache, + None, + Pipelined, + } + + // Generated from `Dapper.CustomPropertyTypeMap` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class CustomPropertyTypeMap : Dapper.SqlMapper.ITypeMap + { + public CustomPropertyTypeMap(System.Type type, System.Func propertySelector) => throw null; + public System.Reflection.ConstructorInfo FindConstructor(string[] names, System.Type[] types) => throw null; + public System.Reflection.ConstructorInfo FindExplicitConstructor() => throw null; + public Dapper.SqlMapper.IMemberMap GetConstructorParameter(System.Reflection.ConstructorInfo constructor, string columnName) => throw null; + public Dapper.SqlMapper.IMemberMap GetMember(string columnName) => throw null; + } + + // Generated from `Dapper.DbString` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class DbString : Dapper.SqlMapper.ICustomQueryParameter + { + public void AddParameter(System.Data.IDbCommand command, string name) => throw null; + public DbString() => throw null; + public const int DefaultLength = default; + public bool IsAnsi { get => throw null; set => throw null; } + public static bool IsAnsiDefault { get => throw null; set => throw null; } + public bool IsFixedLength { get => throw null; set => throw null; } + public int Length { get => throw null; set => throw null; } + public string Value { get => throw null; set => throw null; } + } + + // Generated from `Dapper.DefaultTypeMap` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class DefaultTypeMap : Dapper.SqlMapper.ITypeMap + { + public DefaultTypeMap(System.Type type) => throw null; + public System.Reflection.ConstructorInfo FindConstructor(string[] names, System.Type[] types) => throw null; + public System.Reflection.ConstructorInfo FindExplicitConstructor() => throw null; + public Dapper.SqlMapper.IMemberMap GetConstructorParameter(System.Reflection.ConstructorInfo constructor, string columnName) => throw null; + public Dapper.SqlMapper.IMemberMap GetMember(string columnName) => throw null; + public static bool MatchNamesWithUnderscores { get => throw null; set => throw null; } + public System.Collections.Generic.List Properties { get => throw null; } + } + + // Generated from `Dapper.DynamicParameters` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class DynamicParameters : Dapper.SqlMapper.IParameterLookup, Dapper.SqlMapper.IParameterCallbacks, Dapper.SqlMapper.IDynamicParameters + { + public void Add(string name, object value, System.Data.DbType? dbType, System.Data.ParameterDirection? direction, int? size) => throw null; + public void Add(string name, object value = default(object), System.Data.DbType? dbType = default(System.Data.DbType?), System.Data.ParameterDirection? direction = default(System.Data.ParameterDirection?), int? size = default(int?), System.Byte? precision = default(System.Byte?), System.Byte? scale = default(System.Byte?)) => throw null; + public void AddDynamicParams(object param) => throw null; + void Dapper.SqlMapper.IDynamicParameters.AddParameters(System.Data.IDbCommand command, Dapper.SqlMapper.Identity identity) => throw null; + protected void AddParameters(System.Data.IDbCommand command, Dapper.SqlMapper.Identity identity) => throw null; + public DynamicParameters(object template) => throw null; + public DynamicParameters() => throw null; + public T Get(string name) => throw null; + object Dapper.SqlMapper.IParameterLookup.this[string name] { get => throw null; } + void Dapper.SqlMapper.IParameterCallbacks.OnCompleted() => throw null; + public Dapper.DynamicParameters Output(T target, System.Linq.Expressions.Expression> expression, System.Data.DbType? dbType = default(System.Data.DbType?), int? size = default(int?)) => throw null; + public System.Collections.Generic.IEnumerable ParameterNames { get => throw null; } + public bool RemoveUnused { get => throw null; set => throw null; } + } + + // Generated from `Dapper.ExplicitConstructorAttribute` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class ExplicitConstructorAttribute : System.Attribute + { + public ExplicitConstructorAttribute() => throw null; + } + + // Generated from `Dapper.IWrappedDataReader` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface IWrappedDataReader : System.IDisposable, System.Data.IDataRecord, System.Data.IDataReader + { + System.Data.IDbCommand Command { get; } + System.Data.IDataReader Reader { get; } + } + + // Generated from `Dapper.SqlMapper` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public static class SqlMapper + { + public static void AddTypeHandler(Dapper.SqlMapper.TypeHandler handler) => throw null; + public static void AddTypeHandler(System.Type type, Dapper.SqlMapper.ITypeHandler handler) => throw null; + public static void AddTypeHandlerImpl(System.Type type, Dapper.SqlMapper.ITypeHandler handler, bool clone) => throw null; + public static void AddTypeMap(System.Type type, System.Data.DbType dbType) => throw null; + public static System.Collections.Generic.List AsList(this System.Collections.Generic.IEnumerable source) => throw null; + public static Dapper.SqlMapper.ICustomQueryParameter AsTableValuedParameter(this System.Collections.Generic.IEnumerable list, string typeName = default(string)) where T : System.Data.IDataRecord => throw null; + public static Dapper.SqlMapper.ICustomQueryParameter AsTableValuedParameter(this System.Data.DataTable table, string typeName = default(string)) => throw null; + public static System.Collections.Generic.IEqualityComparer ConnectionStringComparer { get => throw null; set => throw null; } + public static System.Action CreateParamInfoGenerator(Dapper.SqlMapper.Identity identity, bool checkForDuplicates, bool removeUnused) => throw null; + public static int Execute(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static int Execute(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task ExecuteAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task ExecuteAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Data.IDataReader ExecuteReader(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Data.IDataReader ExecuteReader(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Data.CommandBehavior commandBehavior) => throw null; + public static System.Data.IDataReader ExecuteReader(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Data.CommandBehavior commandBehavior) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.Common.DbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.Common.DbConnection cnn, Dapper.CommandDefinition command, System.Data.CommandBehavior commandBehavior) => throw null; + public static System.Threading.Tasks.Task ExecuteReaderAsync(this System.Data.Common.DbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static object ExecuteScalar(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static object ExecuteScalar(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static T ExecuteScalar(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T ExecuteScalar(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task ExecuteScalarAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task ExecuteScalarAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task ExecuteScalarAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task ExecuteScalarAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Data.IDbDataParameter FindOrAddParameter(System.Data.IDataParameterCollection parameters, System.Data.IDbCommand command, string name) => throw null; + public static string Format(object value) => throw null; + public static System.Collections.Generic.IEnumerable> GetCachedSQL(int ignoreHitCountAbove = default(int)) => throw null; + public static int GetCachedSQLCount() => throw null; + public static System.Data.DbType GetDbType(object value) => throw null; + public static System.Collections.Generic.IEnumerable> GetHashCollissions() => throw null; + public static System.Func GetRowParser(this System.Data.IDataReader reader, System.Type type, int startIndex = default(int), int length = default(int), bool returnNullIfFirstMissing = default(bool)) => throw null; + public static System.Func GetRowParser(this System.Data.IDataReader reader, System.Type concreteType = default(System.Type), int startIndex = default(int), int length = default(int), bool returnNullIfFirstMissing = default(bool)) => throw null; + public static System.Func GetTypeDeserializer(System.Type type, System.Data.IDataReader reader, int startBound = default(int), int length = default(int), bool returnNullIfFirstMissing = default(bool)) => throw null; + public static Dapper.SqlMapper.ITypeMap GetTypeMap(System.Type type) => throw null; + public static string GetTypeName(this System.Data.DataTable table) => throw null; + // Generated from `Dapper.SqlMapper+GridReader` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class GridReader : System.IDisposable + { + public System.Data.IDbCommand Command { get => throw null; set => throw null; } + public void Dispose() => throw null; + public bool IsConsumed { get => throw null; set => throw null; } + public System.Collections.Generic.IEnumerable Read(System.Type type, bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Type[] types, System.Func map, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(System.Func func, string splitOn = default(string), bool buffered = default(bool)) => throw null; + public System.Collections.Generic.IEnumerable Read(bool buffered = default(bool)) => throw null; + public System.Threading.Tasks.Task> ReadAsync(System.Type type, bool buffered = default(bool)) => throw null; + public System.Threading.Tasks.Task> ReadAsync(bool buffered = default(bool)) => throw null; + public System.Threading.Tasks.Task> ReadAsync(bool buffered = default(bool)) => throw null; + public object ReadFirst(System.Type type) => throw null; + public dynamic ReadFirst() => throw null; + public T ReadFirst() => throw null; + public System.Threading.Tasks.Task ReadFirstAsync(System.Type type) => throw null; + public System.Threading.Tasks.Task ReadFirstAsync() => throw null; + public System.Threading.Tasks.Task ReadFirstAsync() => throw null; + public object ReadFirstOrDefault(System.Type type) => throw null; + public dynamic ReadFirstOrDefault() => throw null; + public T ReadFirstOrDefault() => throw null; + public System.Threading.Tasks.Task ReadFirstOrDefaultAsync(System.Type type) => throw null; + public System.Threading.Tasks.Task ReadFirstOrDefaultAsync() => throw null; + public System.Threading.Tasks.Task ReadFirstOrDefaultAsync() => throw null; + public object ReadSingle(System.Type type) => throw null; + public dynamic ReadSingle() => throw null; + public T ReadSingle() => throw null; + public System.Threading.Tasks.Task ReadSingleAsync(System.Type type) => throw null; + public System.Threading.Tasks.Task ReadSingleAsync() => throw null; + public System.Threading.Tasks.Task ReadSingleAsync() => throw null; + public object ReadSingleOrDefault(System.Type type) => throw null; + public dynamic ReadSingleOrDefault() => throw null; + public T ReadSingleOrDefault() => throw null; + public System.Threading.Tasks.Task ReadSingleOrDefaultAsync(System.Type type) => throw null; + public System.Threading.Tasks.Task ReadSingleOrDefaultAsync() => throw null; + public System.Threading.Tasks.Task ReadSingleOrDefaultAsync() => throw null; + } + + + // Generated from `Dapper.SqlMapper+ICustomQueryParameter` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface ICustomQueryParameter + { + void AddParameter(System.Data.IDbCommand command, string name); + } + + + // Generated from `Dapper.SqlMapper+IDynamicParameters` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface IDynamicParameters + { + void AddParameters(System.Data.IDbCommand command, Dapper.SqlMapper.Identity identity); + } + + + // Generated from `Dapper.SqlMapper+IMemberMap` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface IMemberMap + { + string ColumnName { get; } + System.Reflection.FieldInfo Field { get; } + System.Type MemberType { get; } + System.Reflection.ParameterInfo Parameter { get; } + System.Reflection.PropertyInfo Property { get; } + } + + + // Generated from `Dapper.SqlMapper+IParameterCallbacks` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface IParameterCallbacks : Dapper.SqlMapper.IDynamicParameters + { + void OnCompleted(); + } + + + // Generated from `Dapper.SqlMapper+IParameterLookup` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface IParameterLookup : Dapper.SqlMapper.IDynamicParameters + { + object this[string name] { get; } + } + + + // Generated from `Dapper.SqlMapper+ITypeHandler` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface ITypeHandler + { + object Parse(System.Type destinationType, object value); + void SetValue(System.Data.IDbDataParameter parameter, object value); + } + + + // Generated from `Dapper.SqlMapper+ITypeMap` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public interface ITypeMap + { + System.Reflection.ConstructorInfo FindConstructor(string[] names, System.Type[] types); + System.Reflection.ConstructorInfo FindExplicitConstructor(); + Dapper.SqlMapper.IMemberMap GetConstructorParameter(System.Reflection.ConstructorInfo constructor, string columnName); + Dapper.SqlMapper.IMemberMap GetMember(string columnName); + } + + + // Generated from `Dapper.SqlMapper+Identity` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class Identity : System.IEquatable + { + public override bool Equals(object obj) => throw null; + public bool Equals(Dapper.SqlMapper.Identity other) => throw null; + public Dapper.SqlMapper.Identity ForDynamicParameters(System.Type type) => throw null; + public override int GetHashCode() => throw null; + internal Identity(string sql, System.Data.CommandType? commandType, System.Data.IDbConnection connection, System.Type type, System.Type parametersType) => throw null; + public override string ToString() => throw null; + public System.Data.CommandType? commandType; + public string connectionString; + public int gridIndex; + public int hashCode; + public System.Type parametersType; + public string sql; + public System.Type type; + } + + + public static System.Data.DbType LookupDbType(System.Type type, string name, bool demand, out Dapper.SqlMapper.ITypeHandler handler) => throw null; + public static void PackListParameters(System.Data.IDbCommand command, string namePrefix, object value) => throw null; + public static System.Collections.Generic.IEnumerable Parse(this System.Data.IDataReader reader, System.Type type) => throw null; + public static System.Collections.Generic.IEnumerable Parse(this System.Data.IDataReader reader) => throw null; + public static System.Collections.Generic.IEnumerable Parse(this System.Data.IDataReader reader) => throw null; + public static void PurgeQueryCache() => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Type[] types, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Collections.Generic.IEnumerable Query(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, System.Type type, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Type[] types, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, System.Func map, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), bool buffered = default(bool), string splitOn = default(string), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command, System.Func map, string splitOn = default(string)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task> QueryAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static event System.EventHandler QueryCachePurged; + public static object QueryFirst(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static dynamic QueryFirst(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QueryFirst(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QueryFirst(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, System.Type type, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static object QueryFirstOrDefault(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static dynamic QueryFirstOrDefault(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QueryFirstOrDefault(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QueryFirstOrDefault(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, System.Type type, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryFirstOrDefaultAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static Dapper.SqlMapper.GridReader QueryMultiple(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static Dapper.SqlMapper.GridReader QueryMultiple(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QueryMultipleAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QueryMultipleAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static object QuerySingle(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static dynamic QuerySingle(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QuerySingle(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QuerySingle(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, System.Type type, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static object QuerySingleOrDefault(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static dynamic QuerySingleOrDefault(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QuerySingleOrDefault(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static T QuerySingleOrDefault(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, System.Type type, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, System.Type type, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, string sql, object param = default(object), System.Data.IDbTransaction transaction = default(System.Data.IDbTransaction), int? commandTimeout = default(int?), System.Data.CommandType? commandType = default(System.Data.CommandType?)) => throw null; + public static System.Threading.Tasks.Task QuerySingleOrDefaultAsync(this System.Data.IDbConnection cnn, Dapper.CommandDefinition command) => throw null; + public static System.Char ReadChar(object value) => throw null; + public static System.Char? ReadNullableChar(object value) => throw null; + public static void RemoveTypeMap(System.Type type) => throw null; + public static void ReplaceLiterals(this Dapper.SqlMapper.IParameterLookup parameters, System.Data.IDbCommand command) => throw null; + public static void ResetTypeHandlers() => throw null; + public static object SanitizeParameterValue(object value) => throw null; + public static void SetTypeMap(System.Type type, Dapper.SqlMapper.ITypeMap map) => throw null; + public static void SetTypeName(this System.Data.DataTable table, string typeName) => throw null; + // Generated from `Dapper.SqlMapper+Settings` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public static class Settings + { + public static bool ApplyNullValues { get => throw null; set => throw null; } + public static int? CommandTimeout { get => throw null; set => throw null; } + public static int InListStringSplitCount { get => throw null; set => throw null; } + public static bool PadListExpansions { get => throw null; set => throw null; } + public static void SetDefaults() => throw null; + public static bool UseSingleResultOptimization { get => throw null; set => throw null; } + public static bool UseSingleRowOptimization { get => throw null; set => throw null; } + } + + + // Generated from `Dapper.SqlMapper+StringTypeHandler<>` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public abstract class StringTypeHandler : Dapper.SqlMapper.TypeHandler + { + protected abstract string Format(T xml); + public override T Parse(object value) => throw null; + protected abstract T Parse(string xml); + public override void SetValue(System.Data.IDbDataParameter parameter, T value) => throw null; + protected StringTypeHandler() => throw null; + } + + + public static void ThrowDataException(System.Exception ex, int index, System.Data.IDataReader reader, object value) => throw null; + // Generated from `Dapper.SqlMapper+TypeHandler<>` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public abstract class TypeHandler : Dapper.SqlMapper.ITypeHandler + { + public abstract T Parse(object value); + object Dapper.SqlMapper.ITypeHandler.Parse(System.Type destinationType, object value) => throw null; + void Dapper.SqlMapper.ITypeHandler.SetValue(System.Data.IDbDataParameter parameter, object value) => throw null; + public abstract void SetValue(System.Data.IDbDataParameter parameter, T value); + protected TypeHandler() => throw null; + } + + + // Generated from `Dapper.SqlMapper+TypeHandlerCache<>` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public static class TypeHandlerCache + { + public static T Parse(object value) => throw null; + public static void SetValue(System.Data.IDbDataParameter parameter, object value) => throw null; + } + + + public static System.Func TypeMapProvider; + // Generated from `Dapper.SqlMapper+UdtTypeHandler` in `Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null` + public class UdtTypeHandler : Dapper.SqlMapper.ITypeHandler + { + object Dapper.SqlMapper.ITypeHandler.Parse(System.Type destinationType, object value) => throw null; + void Dapper.SqlMapper.ITypeHandler.SetValue(System.Data.IDbDataParameter parameter, object value) => throw null; + public UdtTypeHandler(string udtTypeName) => throw null; + } + + + } + +} diff --git a/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.csproj b/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/Dapper/2.0.90/Dapper.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + diff --git a/csharp/ql/test/resources/stubs/EntityFramework.cs b/csharp/ql/test/resources/stubs/EntityFramework.cs index e282e0e9916d..85903ed8799d 100644 --- a/csharp/ql/test/resources/stubs/EntityFramework.cs +++ b/csharp/ql/test/resources/stubs/EntityFramework.cs @@ -102,13 +102,6 @@ public RawSqlString(string str) { } } } -namespace System.ComponentModel.DataAnnotations.Schema -{ - class NotMappedAttribute : Attribute - { - } -} - namespace Microsoft.EntityFrameworkCore.Storage { interface IRawSqlCommandBuilder diff --git a/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.cs b/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.cs new file mode 100644 index 000000000000..5dc70543b3f0 --- /dev/null +++ b/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.cs @@ -0,0 +1,972 @@ +// This file contains auto-generated code. + +namespace Microsoft +{ + namespace SqlServer + { + namespace Server + { + // Generated from `Microsoft.SqlServer.Server.DataAccessKind` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum DataAccessKind + { + None, + Read, + } + + // Generated from `Microsoft.SqlServer.Server.Format` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum Format + { + Native, + Unknown, + UserDefined, + } + + // Generated from `Microsoft.SqlServer.Server.IBinarySerialize` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public interface IBinarySerialize + { + void Read(System.IO.BinaryReader r); + void Write(System.IO.BinaryWriter w); + } + + // Generated from `Microsoft.SqlServer.Server.InvalidUdtException` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class InvalidUdtException : System.SystemException + { + } + + // Generated from `Microsoft.SqlServer.Server.SqlDataRecord` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlDataRecord : System.Data.IDataRecord + { + public virtual int FieldCount { get => throw null; } + public virtual bool GetBoolean(int ordinal) => throw null; + public virtual System.Byte GetByte(int ordinal) => throw null; + public virtual System.Int64 GetBytes(int ordinal, System.Int64 fieldOffset, System.Byte[] buffer, int bufferOffset, int length) => throw null; + public virtual System.Char GetChar(int ordinal) => throw null; + public virtual System.Int64 GetChars(int ordinal, System.Int64 fieldOffset, System.Char[] buffer, int bufferOffset, int length) => throw null; + System.Data.IDataReader System.Data.IDataRecord.GetData(int ordinal) => throw null; + public virtual string GetDataTypeName(int ordinal) => throw null; + public virtual System.DateTime GetDateTime(int ordinal) => throw null; + public virtual System.DateTimeOffset GetDateTimeOffset(int ordinal) => throw null; + public virtual System.Decimal GetDecimal(int ordinal) => throw null; + public virtual double GetDouble(int ordinal) => throw null; + public virtual System.Type GetFieldType(int ordinal) => throw null; + public virtual float GetFloat(int ordinal) => throw null; + public virtual System.Guid GetGuid(int ordinal) => throw null; + public virtual System.Int16 GetInt16(int ordinal) => throw null; + public virtual int GetInt32(int ordinal) => throw null; + public virtual System.Int64 GetInt64(int ordinal) => throw null; + public virtual string GetName(int ordinal) => throw null; + public virtual int GetOrdinal(string name) => throw null; + public virtual System.Data.SqlTypes.SqlBinary GetSqlBinary(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlBoolean GetSqlBoolean(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlByte GetSqlByte(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlBytes GetSqlBytes(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlChars GetSqlChars(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlDateTime GetSqlDateTime(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlDecimal GetSqlDecimal(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlDouble GetSqlDouble(int ordinal) => throw null; + public virtual System.Type GetSqlFieldType(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlGuid GetSqlGuid(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlInt16 GetSqlInt16(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlInt32 GetSqlInt32(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlInt64 GetSqlInt64(int ordinal) => throw null; + public virtual Microsoft.SqlServer.Server.SqlMetaData GetSqlMetaData(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlMoney GetSqlMoney(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlSingle GetSqlSingle(int ordinal) => throw null; + public virtual System.Data.SqlTypes.SqlString GetSqlString(int ordinal) => throw null; + public virtual object GetSqlValue(int ordinal) => throw null; + public virtual int GetSqlValues(object[] values) => throw null; + public virtual System.Data.SqlTypes.SqlXml GetSqlXml(int ordinal) => throw null; + public virtual string GetString(int ordinal) => throw null; + public virtual System.TimeSpan GetTimeSpan(int ordinal) => throw null; + public virtual object GetValue(int ordinal) => throw null; + public virtual int GetValues(object[] values) => throw null; + public virtual bool IsDBNull(int ordinal) => throw null; + public virtual object this[string name] { get => throw null; } + public virtual object this[int ordinal] { get => throw null; } + public virtual void SetBoolean(int ordinal, bool value) => throw null; + public virtual void SetByte(int ordinal, System.Byte value) => throw null; + public virtual void SetBytes(int ordinal, System.Int64 fieldOffset, System.Byte[] buffer, int bufferOffset, int length) => throw null; + public virtual void SetChar(int ordinal, System.Char value) => throw null; + public virtual void SetChars(int ordinal, System.Int64 fieldOffset, System.Char[] buffer, int bufferOffset, int length) => throw null; + public virtual void SetDBNull(int ordinal) => throw null; + public virtual void SetDateTime(int ordinal, System.DateTime value) => throw null; + public virtual void SetDateTimeOffset(int ordinal, System.DateTimeOffset value) => throw null; + public virtual void SetDecimal(int ordinal, System.Decimal value) => throw null; + public virtual void SetDouble(int ordinal, double value) => throw null; + public virtual void SetFloat(int ordinal, float value) => throw null; + public virtual void SetGuid(int ordinal, System.Guid value) => throw null; + public virtual void SetInt16(int ordinal, System.Int16 value) => throw null; + public virtual void SetInt32(int ordinal, int value) => throw null; + public virtual void SetInt64(int ordinal, System.Int64 value) => throw null; + public virtual void SetSqlBinary(int ordinal, System.Data.SqlTypes.SqlBinary value) => throw null; + public virtual void SetSqlBoolean(int ordinal, System.Data.SqlTypes.SqlBoolean value) => throw null; + public virtual void SetSqlByte(int ordinal, System.Data.SqlTypes.SqlByte value) => throw null; + public virtual void SetSqlBytes(int ordinal, System.Data.SqlTypes.SqlBytes value) => throw null; + public virtual void SetSqlChars(int ordinal, System.Data.SqlTypes.SqlChars value) => throw null; + public virtual void SetSqlDateTime(int ordinal, System.Data.SqlTypes.SqlDateTime value) => throw null; + public virtual void SetSqlDecimal(int ordinal, System.Data.SqlTypes.SqlDecimal value) => throw null; + public virtual void SetSqlDouble(int ordinal, System.Data.SqlTypes.SqlDouble value) => throw null; + public virtual void SetSqlGuid(int ordinal, System.Data.SqlTypes.SqlGuid value) => throw null; + public virtual void SetSqlInt16(int ordinal, System.Data.SqlTypes.SqlInt16 value) => throw null; + public virtual void SetSqlInt32(int ordinal, System.Data.SqlTypes.SqlInt32 value) => throw null; + public virtual void SetSqlInt64(int ordinal, System.Data.SqlTypes.SqlInt64 value) => throw null; + public virtual void SetSqlMoney(int ordinal, System.Data.SqlTypes.SqlMoney value) => throw null; + public virtual void SetSqlSingle(int ordinal, System.Data.SqlTypes.SqlSingle value) => throw null; + public virtual void SetSqlString(int ordinal, System.Data.SqlTypes.SqlString value) => throw null; + public virtual void SetSqlXml(int ordinal, System.Data.SqlTypes.SqlXml value) => throw null; + public virtual void SetString(int ordinal, string value) => throw null; + public virtual void SetTimeSpan(int ordinal, System.TimeSpan value) => throw null; + public virtual void SetValue(int ordinal, object value) => throw null; + public virtual int SetValues(params object[] values) => throw null; + public SqlDataRecord(params Microsoft.SqlServer.Server.SqlMetaData[] metaData) => throw null; + } + + // Generated from `Microsoft.SqlServer.Server.SqlFacetAttribute` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlFacetAttribute : System.Attribute + { + public bool IsFixedLength { get => throw null; set => throw null; } + public bool IsNullable { get => throw null; set => throw null; } + public int MaxSize { get => throw null; set => throw null; } + public int Precision { get => throw null; set => throw null; } + public int Scale { get => throw null; set => throw null; } + public SqlFacetAttribute() => throw null; + } + + // Generated from `Microsoft.SqlServer.Server.SqlFunctionAttribute` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlFunctionAttribute : System.Attribute + { + public Microsoft.SqlServer.Server.DataAccessKind DataAccess { get => throw null; set => throw null; } + public string FillRowMethodName { get => throw null; set => throw null; } + public bool IsDeterministic { get => throw null; set => throw null; } + public bool IsPrecise { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public SqlFunctionAttribute() => throw null; + public Microsoft.SqlServer.Server.SystemDataAccessKind SystemDataAccess { get => throw null; set => throw null; } + public string TableDefinition { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.SqlServer.Server.SqlMetaData` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlMetaData + { + public string Adjust(string value) => throw null; + public object Adjust(object value) => throw null; + public int Adjust(int value) => throw null; + public float Adjust(float value) => throw null; + public double Adjust(double value) => throw null; + public bool Adjust(bool value) => throw null; + public System.TimeSpan Adjust(System.TimeSpan value) => throw null; + public System.Int64 Adjust(System.Int64 value) => throw null; + public System.Int16 Adjust(System.Int16 value) => throw null; + public System.Guid Adjust(System.Guid value) => throw null; + public System.Decimal Adjust(System.Decimal value) => throw null; + public System.DateTimeOffset Adjust(System.DateTimeOffset value) => throw null; + public System.DateTime Adjust(System.DateTime value) => throw null; + public System.Data.SqlTypes.SqlXml Adjust(System.Data.SqlTypes.SqlXml value) => throw null; + public System.Data.SqlTypes.SqlString Adjust(System.Data.SqlTypes.SqlString value) => throw null; + public System.Data.SqlTypes.SqlSingle Adjust(System.Data.SqlTypes.SqlSingle value) => throw null; + public System.Data.SqlTypes.SqlMoney Adjust(System.Data.SqlTypes.SqlMoney value) => throw null; + public System.Data.SqlTypes.SqlInt64 Adjust(System.Data.SqlTypes.SqlInt64 value) => throw null; + public System.Data.SqlTypes.SqlInt32 Adjust(System.Data.SqlTypes.SqlInt32 value) => throw null; + public System.Data.SqlTypes.SqlInt16 Adjust(System.Data.SqlTypes.SqlInt16 value) => throw null; + public System.Data.SqlTypes.SqlGuid Adjust(System.Data.SqlTypes.SqlGuid value) => throw null; + public System.Data.SqlTypes.SqlDouble Adjust(System.Data.SqlTypes.SqlDouble value) => throw null; + public System.Data.SqlTypes.SqlDecimal Adjust(System.Data.SqlTypes.SqlDecimal value) => throw null; + public System.Data.SqlTypes.SqlDateTime Adjust(System.Data.SqlTypes.SqlDateTime value) => throw null; + public System.Data.SqlTypes.SqlChars Adjust(System.Data.SqlTypes.SqlChars value) => throw null; + public System.Data.SqlTypes.SqlBytes Adjust(System.Data.SqlTypes.SqlBytes value) => throw null; + public System.Data.SqlTypes.SqlByte Adjust(System.Data.SqlTypes.SqlByte value) => throw null; + public System.Data.SqlTypes.SqlBoolean Adjust(System.Data.SqlTypes.SqlBoolean value) => throw null; + public System.Data.SqlTypes.SqlBinary Adjust(System.Data.SqlTypes.SqlBinary value) => throw null; + public System.Char[] Adjust(System.Char[] value) => throw null; + public System.Char Adjust(System.Char value) => throw null; + public System.Byte[] Adjust(System.Byte[] value) => throw null; + public System.Byte Adjust(System.Byte value) => throw null; + public System.Data.SqlTypes.SqlCompareOptions CompareOptions { get => throw null; } + public System.Data.DbType DbType { get => throw null; } + public static Microsoft.SqlServer.Server.SqlMetaData InferFromValue(object value, string name) => throw null; + public bool IsUniqueKey { get => throw null; } + public System.Int64 LocaleId { get => throw null; } + public static System.Int64 Max { get => throw null; } + public System.Int64 MaxLength { get => throw null; } + public string Name { get => throw null; } + public System.Byte Precision { get => throw null; } + public System.Byte Scale { get => throw null; } + public System.Data.SqlClient.SortOrder SortOrder { get => throw null; } + public int SortOrdinal { get => throw null; } + public System.Data.SqlDbType SqlDbType { get => throw null; } + public SqlMetaData(string name, System.Data.SqlDbType dbType, string database, string owningSchema, string objectName, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, string database, string owningSchema, string objectName) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Type userDefinedType, string serverTypeName, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Type userDefinedType, string serverTypeName) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Type userDefinedType) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength, System.Int64 locale, System.Data.SqlTypes.SqlCompareOptions compareOptions, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength, System.Int64 locale, System.Data.SqlTypes.SqlCompareOptions compareOptions) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength, System.Byte precision, System.Byte scale, System.Int64 localeId, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Type userDefinedType, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength, System.Byte precision, System.Byte scale, System.Int64 locale, System.Data.SqlTypes.SqlCompareOptions compareOptions, System.Type userDefinedType) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Int64 maxLength) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Byte precision, System.Byte scale, bool useServerDefault, bool isUniqueKey, System.Data.SqlClient.SortOrder columnSortOrder, int sortOrdinal) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType, System.Byte precision, System.Byte scale) => throw null; + public SqlMetaData(string name, System.Data.SqlDbType dbType) => throw null; + public System.Type Type { get => throw null; } + public string TypeName { get => throw null; } + public bool UseServerDefault { get => throw null; } + public string XmlSchemaCollectionDatabase { get => throw null; } + public string XmlSchemaCollectionName { get => throw null; } + public string XmlSchemaCollectionOwningSchema { get => throw null; } + } + + // Generated from `Microsoft.SqlServer.Server.SqlMethodAttribute` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlMethodAttribute : Microsoft.SqlServer.Server.SqlFunctionAttribute + { + public bool InvokeIfReceiverIsNull { get => throw null; set => throw null; } + public bool IsMutator { get => throw null; set => throw null; } + public bool OnNullCall { get => throw null; set => throw null; } + public SqlMethodAttribute() => throw null; + } + + // Generated from `Microsoft.SqlServer.Server.SqlUserDefinedAggregateAttribute` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlUserDefinedAggregateAttribute : System.Attribute + { + public Microsoft.SqlServer.Server.Format Format { get => throw null; } + public bool IsInvariantToDuplicates { get => throw null; set => throw null; } + public bool IsInvariantToNulls { get => throw null; set => throw null; } + public bool IsInvariantToOrder { get => throw null; set => throw null; } + public bool IsNullIfEmpty { get => throw null; set => throw null; } + public int MaxByteSize { get => throw null; set => throw null; } + public const int MaxByteSizeValue = default; + public string Name { get => throw null; set => throw null; } + public SqlUserDefinedAggregateAttribute(Microsoft.SqlServer.Server.Format format) => throw null; + } + + // Generated from `Microsoft.SqlServer.Server.SqlUserDefinedTypeAttribute` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlUserDefinedTypeAttribute : System.Attribute + { + public Microsoft.SqlServer.Server.Format Format { get => throw null; } + public bool IsByteOrdered { get => throw null; set => throw null; } + public bool IsFixedLength { get => throw null; set => throw null; } + public int MaxByteSize { get => throw null; set => throw null; } + public string Name { get => throw null; set => throw null; } + public SqlUserDefinedTypeAttribute(Microsoft.SqlServer.Server.Format format) => throw null; + public string ValidationMethodName { get => throw null; set => throw null; } + } + + // Generated from `Microsoft.SqlServer.Server.SystemDataAccessKind` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SystemDataAccessKind + { + None, + Read, + } + + } + } +} +namespace System +{ + namespace Data + { + // Generated from `System.Data.OperationAbortedException` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class OperationAbortedException : System.SystemException + { + } + + namespace Sql + { + // Generated from `System.Data.Sql.SqlNotificationRequest` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlNotificationRequest + { + public string Options { get => throw null; set => throw null; } + public SqlNotificationRequest(string userData, string options, int timeout) => throw null; + public SqlNotificationRequest() => throw null; + public int Timeout { get => throw null; set => throw null; } + public string UserData { get => throw null; set => throw null; } + } + + } + namespace SqlClient + { + // Generated from `System.Data.SqlClient.ApplicationIntent` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum ApplicationIntent + { + ReadOnly, + ReadWrite, + } + + // Generated from `System.Data.SqlClient.OnChangeEventHandler` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void OnChangeEventHandler(object sender, System.Data.SqlClient.SqlNotificationEventArgs e); + + // Generated from `System.Data.SqlClient.PoolBlockingPeriod` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum PoolBlockingPeriod + { + AlwaysBlock, + Auto, + NeverBlock, + } + + // Generated from `System.Data.SqlClient.SortOrder` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SortOrder + { + Ascending, + Descending, + Unspecified, + } + + // Generated from `System.Data.SqlClient.SqlBulkCopy` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlBulkCopy : System.IDisposable + { + public int BatchSize { get => throw null; set => throw null; } + public int BulkCopyTimeout { get => throw null; set => throw null; } + public void Close() => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMappingCollection ColumnMappings { get => throw null; } + public string DestinationTableName { get => throw null; set => throw null; } + void System.IDisposable.Dispose() => throw null; + public bool EnableStreaming { get => throw null; set => throw null; } + public int NotifyAfter { get => throw null; set => throw null; } + public SqlBulkCopy(string connectionString, System.Data.SqlClient.SqlBulkCopyOptions copyOptions) => throw null; + public SqlBulkCopy(string connectionString) => throw null; + public SqlBulkCopy(System.Data.SqlClient.SqlConnection connection, System.Data.SqlClient.SqlBulkCopyOptions copyOptions, System.Data.SqlClient.SqlTransaction externalTransaction) => throw null; + public SqlBulkCopy(System.Data.SqlClient.SqlConnection connection) => throw null; + public event System.Data.SqlClient.SqlRowsCopiedEventHandler SqlRowsCopied; + public void WriteToServer(System.Data.IDataReader reader) => throw null; + public void WriteToServer(System.Data.DataTable table, System.Data.DataRowState rowState) => throw null; + public void WriteToServer(System.Data.DataTable table) => throw null; + public void WriteToServer(System.Data.DataRow[] rows) => throw null; + public void WriteToServer(System.Data.Common.DbDataReader reader) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.IDataReader reader, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.IDataReader reader) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataTable table, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataTable table, System.Data.DataRowState rowState, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataTable table, System.Data.DataRowState rowState) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataTable table) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataRow[] rows, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.DataRow[] rows) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.Common.DbDataReader reader, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task WriteToServerAsync(System.Data.Common.DbDataReader reader) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlBulkCopyColumnMapping` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlBulkCopyColumnMapping + { + public string DestinationColumn { get => throw null; set => throw null; } + public int DestinationOrdinal { get => throw null; set => throw null; } + public string SourceColumn { get => throw null; set => throw null; } + public int SourceOrdinal { get => throw null; set => throw null; } + public SqlBulkCopyColumnMapping(string sourceColumn, string destinationColumn) => throw null; + public SqlBulkCopyColumnMapping(string sourceColumn, int destinationOrdinal) => throw null; + public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, string destinationColumn) => throw null; + public SqlBulkCopyColumnMapping(int sourceColumnOrdinal, int destinationOrdinal) => throw null; + public SqlBulkCopyColumnMapping() => throw null; + } + + // Generated from `System.Data.SqlClient.SqlBulkCopyColumnMappingCollection` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlBulkCopyColumnMappingCollection : System.Collections.CollectionBase + { + public System.Data.SqlClient.SqlBulkCopyColumnMapping Add(string sourceColumn, string destinationColumn) => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMapping Add(string sourceColumn, int destinationColumnIndex) => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMapping Add(int sourceColumnIndex, string destinationColumn) => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMapping Add(int sourceColumnIndex, int destinationColumnIndex) => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMapping Add(System.Data.SqlClient.SqlBulkCopyColumnMapping bulkCopyColumnMapping) => throw null; + public void Clear() => throw null; + public bool Contains(System.Data.SqlClient.SqlBulkCopyColumnMapping value) => throw null; + public void CopyTo(System.Data.SqlClient.SqlBulkCopyColumnMapping[] array, int index) => throw null; + public int IndexOf(System.Data.SqlClient.SqlBulkCopyColumnMapping value) => throw null; + public void Insert(int index, System.Data.SqlClient.SqlBulkCopyColumnMapping value) => throw null; + public System.Data.SqlClient.SqlBulkCopyColumnMapping this[int index] { get => throw null; } + public void Remove(System.Data.SqlClient.SqlBulkCopyColumnMapping value) => throw null; + public void RemoveAt(int index) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlBulkCopyOptions` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + [System.Flags] + public enum SqlBulkCopyOptions + { + CheckConstraints, + Default, + FireTriggers, + KeepIdentity, + KeepNulls, + TableLock, + UseInternalTransaction, + } + + // Generated from `System.Data.SqlClient.SqlClientFactory` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlClientFactory : System.Data.Common.DbProviderFactory + { + public override System.Data.Common.DbCommand CreateCommand() => throw null; + public override System.Data.Common.DbCommandBuilder CreateCommandBuilder() => throw null; + public override System.Data.Common.DbConnection CreateConnection() => throw null; + public override System.Data.Common.DbConnectionStringBuilder CreateConnectionStringBuilder() => throw null; + public override System.Data.Common.DbDataAdapter CreateDataAdapter() => throw null; + public override System.Data.Common.DbParameter CreateParameter() => throw null; + public static System.Data.SqlClient.SqlClientFactory Instance; + } + + // Generated from `System.Data.SqlClient.SqlClientMetaDataCollectionNames` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public static class SqlClientMetaDataCollectionNames + { + public static string Columns; + public static string Databases; + public static string ForeignKeys; + public static string IndexColumns; + public static string Indexes; + public static string Parameters; + public static string ProcedureColumns; + public static string Procedures; + public static string Tables; + public static string UserDefinedTypes; + public static string Users; + public static string ViewColumns; + public static string Views; + } + + // Generated from `System.Data.SqlClient.SqlCommand` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlCommand : System.Data.Common.DbCommand, System.ICloneable + { + public System.IAsyncResult BeginExecuteNonQuery(System.AsyncCallback callback, object stateObject) => throw null; + public System.IAsyncResult BeginExecuteNonQuery() => throw null; + public System.IAsyncResult BeginExecuteReader(System.Data.CommandBehavior behavior) => throw null; + public System.IAsyncResult BeginExecuteReader(System.AsyncCallback callback, object stateObject, System.Data.CommandBehavior behavior) => throw null; + public System.IAsyncResult BeginExecuteReader(System.AsyncCallback callback, object stateObject) => throw null; + public System.IAsyncResult BeginExecuteReader() => throw null; + public System.IAsyncResult BeginExecuteXmlReader(System.AsyncCallback callback, object stateObject) => throw null; + public System.IAsyncResult BeginExecuteXmlReader() => throw null; + public override void Cancel() => throw null; + public System.Data.SqlClient.SqlCommand Clone() => throw null; + object System.ICloneable.Clone() => throw null; + public override string CommandText { get => throw null; set => throw null; } + public override int CommandTimeout { get => throw null; set => throw null; } + public override System.Data.CommandType CommandType { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlConnection Connection { get => throw null; set => throw null; } + protected override System.Data.Common.DbParameter CreateDbParameter() => throw null; + public System.Data.SqlClient.SqlParameter CreateParameter() => throw null; + protected override System.Data.Common.DbConnection DbConnection { get => throw null; set => throw null; } + protected override System.Data.Common.DbParameterCollection DbParameterCollection { get => throw null; } + protected override System.Data.Common.DbTransaction DbTransaction { get => throw null; set => throw null; } + public override bool DesignTimeVisible { get => throw null; set => throw null; } + protected override void Dispose(bool disposing) => throw null; + public int EndExecuteNonQuery(System.IAsyncResult asyncResult) => throw null; + public System.Data.SqlClient.SqlDataReader EndExecuteReader(System.IAsyncResult asyncResult) => throw null; + public System.Xml.XmlReader EndExecuteXmlReader(System.IAsyncResult asyncResult) => throw null; + protected override System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior) => throw null; + protected override System.Threading.Tasks.Task ExecuteDbDataReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) => throw null; + public override int ExecuteNonQuery() => throw null; + public override System.Threading.Tasks.Task ExecuteNonQueryAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Data.SqlClient.SqlDataReader ExecuteReader(System.Data.CommandBehavior behavior) => throw null; + public System.Data.SqlClient.SqlDataReader ExecuteReader() => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync(System.Data.CommandBehavior behavior) => throw null; + public System.Threading.Tasks.Task ExecuteReaderAsync() => throw null; + public override object ExecuteScalar() => throw null; + public override System.Threading.Tasks.Task ExecuteScalarAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Xml.XmlReader ExecuteXmlReader() => throw null; + public System.Threading.Tasks.Task ExecuteXmlReaderAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public System.Threading.Tasks.Task ExecuteXmlReaderAsync() => throw null; + public System.Data.Sql.SqlNotificationRequest Notification { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlParameterCollection Parameters { get => throw null; } + public override void Prepare() => throw null; + public void ResetCommandTimeout() => throw null; + public SqlCommand(string cmdText, System.Data.SqlClient.SqlConnection connection, System.Data.SqlClient.SqlTransaction transaction) => throw null; + public SqlCommand(string cmdText, System.Data.SqlClient.SqlConnection connection) => throw null; + public SqlCommand(string cmdText) => throw null; + public SqlCommand() => throw null; + public event System.Data.StatementCompletedEventHandler StatementCompleted; + public System.Data.SqlClient.SqlTransaction Transaction { get => throw null; set => throw null; } + public override System.Data.UpdateRowSource UpdatedRowSource { get => throw null; set => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlCommandBuilder` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlCommandBuilder : System.Data.Common.DbCommandBuilder + { + protected override void ApplyParameterInfo(System.Data.Common.DbParameter parameter, System.Data.DataRow datarow, System.Data.StatementType statementType, bool whereClause) => throw null; + public override System.Data.Common.CatalogLocation CatalogLocation { get => throw null; set => throw null; } + public override string CatalogSeparator { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlDataAdapter DataAdapter { get => throw null; set => throw null; } + public static void DeriveParameters(System.Data.SqlClient.SqlCommand command) => throw null; + public System.Data.SqlClient.SqlCommand GetDeleteCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.SqlClient.SqlCommand GetDeleteCommand() => throw null; + public System.Data.SqlClient.SqlCommand GetInsertCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.SqlClient.SqlCommand GetInsertCommand() => throw null; + protected override string GetParameterName(string parameterName) => throw null; + protected override string GetParameterName(int parameterOrdinal) => throw null; + protected override string GetParameterPlaceholder(int parameterOrdinal) => throw null; + protected override System.Data.DataTable GetSchemaTable(System.Data.Common.DbCommand srcCommand) => throw null; + public System.Data.SqlClient.SqlCommand GetUpdateCommand(bool useColumnsForParameterNames) => throw null; + public System.Data.SqlClient.SqlCommand GetUpdateCommand() => throw null; + protected override System.Data.Common.DbCommand InitializeCommand(System.Data.Common.DbCommand command) => throw null; + public override string QuoteIdentifier(string unquotedIdentifier) => throw null; + public override string QuotePrefix { get => throw null; set => throw null; } + public override string QuoteSuffix { get => throw null; set => throw null; } + public override string SchemaSeparator { get => throw null; set => throw null; } + protected override void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter) => throw null; + public SqlCommandBuilder(System.Data.SqlClient.SqlDataAdapter adapter) => throw null; + public SqlCommandBuilder() => throw null; + public override string UnquoteIdentifier(string quotedIdentifier) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlConnection` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlConnection : System.Data.Common.DbConnection, System.ICloneable + { + public string AccessToken { get => throw null; set => throw null; } + protected override System.Data.Common.DbTransaction BeginDbTransaction(System.Data.IsolationLevel isolationLevel) => throw null; + public System.Data.SqlClient.SqlTransaction BeginTransaction(string transactionName) => throw null; + public System.Data.SqlClient.SqlTransaction BeginTransaction(System.Data.IsolationLevel iso, string transactionName) => throw null; + public System.Data.SqlClient.SqlTransaction BeginTransaction(System.Data.IsolationLevel iso) => throw null; + public System.Data.SqlClient.SqlTransaction BeginTransaction() => throw null; + public override void ChangeDatabase(string database) => throw null; + public static void ChangePassword(string connectionString, string newPassword) => throw null; + public static void ChangePassword(string connectionString, System.Data.SqlClient.SqlCredential credential, System.Security.SecureString newPassword) => throw null; + public static void ClearAllPools() => throw null; + public static void ClearPool(System.Data.SqlClient.SqlConnection connection) => throw null; + public System.Guid ClientConnectionId { get => throw null; } + object System.ICloneable.Clone() => throw null; + public override void Close() => throw null; + public override string ConnectionString { get => throw null; set => throw null; } + public override int ConnectionTimeout { get => throw null; } + public System.Data.SqlClient.SqlCommand CreateCommand() => throw null; + protected override System.Data.Common.DbCommand CreateDbCommand() => throw null; + public System.Data.SqlClient.SqlCredential Credential { get => throw null; set => throw null; } + public override string DataSource { get => throw null; } + public override string Database { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public bool FireInfoMessageEventOnUserErrors { get => throw null; set => throw null; } + public override System.Data.DataTable GetSchema(string collectionName, string[] restrictionValues) => throw null; + public override System.Data.DataTable GetSchema(string collectionName) => throw null; + public override System.Data.DataTable GetSchema() => throw null; + public event System.Data.SqlClient.SqlInfoMessageEventHandler InfoMessage; + public override void Open() => throw null; + public override System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public int PacketSize { get => throw null; } + public void ResetStatistics() => throw null; + public System.Collections.IDictionary RetrieveStatistics() => throw null; + public override string ServerVersion { get => throw null; } + public SqlConnection(string connectionString, System.Data.SqlClient.SqlCredential credential) => throw null; + public SqlConnection(string connectionString) => throw null; + public SqlConnection() => throw null; + public override System.Data.ConnectionState State { get => throw null; } + public bool StatisticsEnabled { get => throw null; set => throw null; } + public string WorkstationId { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlConnectionStringBuilder` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder + { + public System.Data.SqlClient.ApplicationIntent ApplicationIntent { get => throw null; set => throw null; } + public string ApplicationName { get => throw null; set => throw null; } + public string AttachDBFilename { get => throw null; set => throw null; } + public override void Clear() => throw null; + public int ConnectRetryCount { get => throw null; set => throw null; } + public int ConnectRetryInterval { get => throw null; set => throw null; } + public int ConnectTimeout { get => throw null; set => throw null; } + public override bool ContainsKey(string keyword) => throw null; + public string CurrentLanguage { get => throw null; set => throw null; } + public string DataSource { get => throw null; set => throw null; } + public bool Encrypt { get => throw null; set => throw null; } + public bool Enlist { get => throw null; set => throw null; } + public string FailoverPartner { get => throw null; set => throw null; } + public string InitialCatalog { get => throw null; set => throw null; } + public bool IntegratedSecurity { get => throw null; set => throw null; } + public override object this[string keyword] { get => throw null; set => throw null; } + public override System.Collections.ICollection Keys { get => throw null; } + public int LoadBalanceTimeout { get => throw null; set => throw null; } + public int MaxPoolSize { get => throw null; set => throw null; } + public int MinPoolSize { get => throw null; set => throw null; } + public bool MultiSubnetFailover { get => throw null; set => throw null; } + public bool MultipleActiveResultSets { get => throw null; set => throw null; } + public int PacketSize { get => throw null; set => throw null; } + public string Password { get => throw null; set => throw null; } + public bool PersistSecurityInfo { get => throw null; set => throw null; } + public System.Data.SqlClient.PoolBlockingPeriod PoolBlockingPeriod { get => throw null; set => throw null; } + public bool Pooling { get => throw null; set => throw null; } + public override bool Remove(string keyword) => throw null; + public bool Replication { get => throw null; set => throw null; } + public override bool ShouldSerialize(string keyword) => throw null; + public SqlConnectionStringBuilder(string connectionString) => throw null; + public SqlConnectionStringBuilder() => throw null; + public string TransactionBinding { get => throw null; set => throw null; } + public bool TrustServerCertificate { get => throw null; set => throw null; } + public override bool TryGetValue(string keyword, out object value) => throw null; + public string TypeSystemVersion { get => throw null; set => throw null; } + public string UserID { get => throw null; set => throw null; } + public bool UserInstance { get => throw null; set => throw null; } + public override System.Collections.ICollection Values { get => throw null; } + public string WorkstationID { get => throw null; set => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlCredential` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlCredential + { + public System.Security.SecureString Password { get => throw null; } + public SqlCredential(string userId, System.Security.SecureString password) => throw null; + public string UserId { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlDataAdapter` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlDataAdapter : System.Data.Common.DbDataAdapter, System.ICloneable, System.Data.IDbDataAdapter, System.Data.IDataAdapter + { + object System.ICloneable.Clone() => throw null; + public System.Data.SqlClient.SqlCommand DeleteCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.DeleteCommand { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlCommand InsertCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.InsertCommand { get => throw null; set => throw null; } + protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) => throw null; + protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) => throw null; + public event System.Data.SqlClient.SqlRowUpdatedEventHandler RowUpdated; + public event System.Data.SqlClient.SqlRowUpdatingEventHandler RowUpdating; + public System.Data.SqlClient.SqlCommand SelectCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.SelectCommand { get => throw null; set => throw null; } + public SqlDataAdapter(string selectCommandText, string selectConnectionString) => throw null; + public SqlDataAdapter(string selectCommandText, System.Data.SqlClient.SqlConnection selectConnection) => throw null; + public SqlDataAdapter(System.Data.SqlClient.SqlCommand selectCommand) => throw null; + public SqlDataAdapter() => throw null; + public override int UpdateBatchSize { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlCommand UpdateCommand { get => throw null; set => throw null; } + System.Data.IDbCommand System.Data.IDbDataAdapter.UpdateCommand { get => throw null; set => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlDataReader` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlDataReader : System.Data.Common.DbDataReader, System.IDisposable, System.Data.Common.IDbColumnSchemaGenerator + { + protected System.Data.SqlClient.SqlConnection Connection { get => throw null; } + public override int Depth { get => throw null; } + public override int FieldCount { get => throw null; } + public override bool GetBoolean(int i) => throw null; + public override System.Byte GetByte(int i) => throw null; + public override System.Int64 GetBytes(int i, System.Int64 dataIndex, System.Byte[] buffer, int bufferIndex, int length) => throw null; + public override System.Char GetChar(int i) => throw null; + public override System.Int64 GetChars(int i, System.Int64 dataIndex, System.Char[] buffer, int bufferIndex, int length) => throw null; + public System.Collections.ObjectModel.ReadOnlyCollection GetColumnSchema() => throw null; + public override string GetDataTypeName(int i) => throw null; + public override System.DateTime GetDateTime(int i) => throw null; + public virtual System.DateTimeOffset GetDateTimeOffset(int i) => throw null; + public override System.Decimal GetDecimal(int i) => throw null; + public override double GetDouble(int i) => throw null; + public override System.Collections.IEnumerator GetEnumerator() => throw null; + public override System.Type GetFieldType(int i) => throw null; + public override T GetFieldValue(int i) => throw null; + public override System.Threading.Tasks.Task GetFieldValueAsync(int i, System.Threading.CancellationToken cancellationToken) => throw null; + public override float GetFloat(int i) => throw null; + public override System.Guid GetGuid(int i) => throw null; + public override System.Int16 GetInt16(int i) => throw null; + public override int GetInt32(int i) => throw null; + public override System.Int64 GetInt64(int i) => throw null; + public override string GetName(int i) => throw null; + public override int GetOrdinal(string name) => throw null; + public override System.Type GetProviderSpecificFieldType(int i) => throw null; + public override object GetProviderSpecificValue(int i) => throw null; + public override int GetProviderSpecificValues(object[] values) => throw null; + public override System.Data.DataTable GetSchemaTable() => throw null; + public virtual System.Data.SqlTypes.SqlBinary GetSqlBinary(int i) => throw null; + public virtual System.Data.SqlTypes.SqlBoolean GetSqlBoolean(int i) => throw null; + public virtual System.Data.SqlTypes.SqlByte GetSqlByte(int i) => throw null; + public virtual System.Data.SqlTypes.SqlBytes GetSqlBytes(int i) => throw null; + public virtual System.Data.SqlTypes.SqlChars GetSqlChars(int i) => throw null; + public virtual System.Data.SqlTypes.SqlDateTime GetSqlDateTime(int i) => throw null; + public virtual System.Data.SqlTypes.SqlDecimal GetSqlDecimal(int i) => throw null; + public virtual System.Data.SqlTypes.SqlDouble GetSqlDouble(int i) => throw null; + public virtual System.Data.SqlTypes.SqlGuid GetSqlGuid(int i) => throw null; + public virtual System.Data.SqlTypes.SqlInt16 GetSqlInt16(int i) => throw null; + public virtual System.Data.SqlTypes.SqlInt32 GetSqlInt32(int i) => throw null; + public virtual System.Data.SqlTypes.SqlInt64 GetSqlInt64(int i) => throw null; + public virtual System.Data.SqlTypes.SqlMoney GetSqlMoney(int i) => throw null; + public virtual System.Data.SqlTypes.SqlSingle GetSqlSingle(int i) => throw null; + public virtual System.Data.SqlTypes.SqlString GetSqlString(int i) => throw null; + public virtual object GetSqlValue(int i) => throw null; + public virtual int GetSqlValues(object[] values) => throw null; + public virtual System.Data.SqlTypes.SqlXml GetSqlXml(int i) => throw null; + public override System.IO.Stream GetStream(int i) => throw null; + public override string GetString(int i) => throw null; + public override System.IO.TextReader GetTextReader(int i) => throw null; + public virtual System.TimeSpan GetTimeSpan(int i) => throw null; + public override object GetValue(int i) => throw null; + public override int GetValues(object[] values) => throw null; + public virtual System.Xml.XmlReader GetXmlReader(int i) => throw null; + public override bool HasRows { get => throw null; } + public override bool IsClosed { get => throw null; } + protected internal bool IsCommandBehavior(System.Data.CommandBehavior condition) => throw null; + public override bool IsDBNull(int i) => throw null; + public override System.Threading.Tasks.Task IsDBNullAsync(int i, System.Threading.CancellationToken cancellationToken) => throw null; + public override object this[string name] { get => throw null; } + public override object this[int i] { get => throw null; } + public override bool NextResult() => throw null; + public override System.Threading.Tasks.Task NextResultAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override bool Read() => throw null; + public override System.Threading.Tasks.Task ReadAsync(System.Threading.CancellationToken cancellationToken) => throw null; + public override int RecordsAffected { get => throw null; } + public override int VisibleFieldCount { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlDependency` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlDependency + { + public void AddCommandDependency(System.Data.SqlClient.SqlCommand command) => throw null; + public bool HasChanges { get => throw null; } + public string Id { get => throw null; } + public event System.Data.SqlClient.OnChangeEventHandler OnChange; + public SqlDependency(System.Data.SqlClient.SqlCommand command, string options, int timeout) => throw null; + public SqlDependency(System.Data.SqlClient.SqlCommand command) => throw null; + public SqlDependency() => throw null; + public static bool Start(string connectionString, string queue) => throw null; + public static bool Start(string connectionString) => throw null; + public static bool Stop(string connectionString, string queue) => throw null; + public static bool Stop(string connectionString) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlError` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlError + { + public System.Byte Class { get => throw null; } + public int LineNumber { get => throw null; } + public string Message { get => throw null; } + public int Number { get => throw null; } + public string Procedure { get => throw null; } + public string Server { get => throw null; } + public string Source { get => throw null; } + public System.Byte State { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.SqlClient.SqlErrorCollection` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlErrorCollection : System.Collections.IEnumerable, System.Collections.ICollection + { + public void CopyTo(System.Data.SqlClient.SqlError[] array, int index) => throw null; + public void CopyTo(System.Array array, int index) => throw null; + public int Count { get => throw null; } + public System.Collections.IEnumerator GetEnumerator() => throw null; + bool System.Collections.ICollection.IsSynchronized { get => throw null; } + public System.Data.SqlClient.SqlError this[int index] { get => throw null; } + object System.Collections.ICollection.SyncRoot { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlException` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlException : System.Data.Common.DbException + { + public System.Byte Class { get => throw null; } + public System.Guid ClientConnectionId { get => throw null; } + public System.Data.SqlClient.SqlErrorCollection Errors { get => throw null; } + public override void GetObjectData(System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context) => throw null; + public int LineNumber { get => throw null; } + public int Number { get => throw null; } + public string Procedure { get => throw null; } + public string Server { get => throw null; } + public override string Source { get => throw null; } + public System.Byte State { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.SqlClient.SqlInfoMessageEventArgs` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlInfoMessageEventArgs : System.EventArgs + { + public System.Data.SqlClient.SqlErrorCollection Errors { get => throw null; } + public string Message { get => throw null; } + public string Source { get => throw null; } + public override string ToString() => throw null; + } + + // Generated from `System.Data.SqlClient.SqlInfoMessageEventHandler` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SqlInfoMessageEventHandler(object sender, System.Data.SqlClient.SqlInfoMessageEventArgs e); + + // Generated from `System.Data.SqlClient.SqlNotificationEventArgs` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlNotificationEventArgs : System.EventArgs + { + public System.Data.SqlClient.SqlNotificationInfo Info { get => throw null; } + public System.Data.SqlClient.SqlNotificationSource Source { get => throw null; } + public SqlNotificationEventArgs(System.Data.SqlClient.SqlNotificationType type, System.Data.SqlClient.SqlNotificationInfo info, System.Data.SqlClient.SqlNotificationSource source) => throw null; + public System.Data.SqlClient.SqlNotificationType Type { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlNotificationInfo` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SqlNotificationInfo + { + AlreadyChanged, + Alter, + Delete, + Drop, + Error, + Expired, + Insert, + Invalid, + Isolation, + Merge, + Options, + PreviousFire, + Query, + Resource, + Restart, + TemplateLimit, + Truncate, + Unknown, + Update, + } + + // Generated from `System.Data.SqlClient.SqlNotificationSource` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SqlNotificationSource + { + Client, + Data, + Database, + Environment, + Execution, + Object, + Owner, + Statement, + System, + Timeout, + Unknown, + } + + // Generated from `System.Data.SqlClient.SqlNotificationType` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public enum SqlNotificationType + { + Change, + Subscribe, + Unknown, + } + + // Generated from `System.Data.SqlClient.SqlParameter` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlParameter : System.Data.Common.DbParameter, System.ICloneable + { + object System.ICloneable.Clone() => throw null; + public System.Data.SqlTypes.SqlCompareOptions CompareInfo { get => throw null; set => throw null; } + public override System.Data.DbType DbType { get => throw null; set => throw null; } + public override System.Data.ParameterDirection Direction { get => throw null; set => throw null; } + public override bool IsNullable { get => throw null; set => throw null; } + public int LocaleId { get => throw null; set => throw null; } + public int Offset { get => throw null; set => throw null; } + public override string ParameterName { get => throw null; set => throw null; } + public System.Byte Precision { get => throw null; set => throw null; } + public override void ResetDbType() => throw null; + public void ResetSqlDbType() => throw null; + public System.Byte Scale { get => throw null; set => throw null; } + public override int Size { get => throw null; set => throw null; } + public override string SourceColumn { get => throw null; set => throw null; } + public override bool SourceColumnNullMapping { get => throw null; set => throw null; } + public override System.Data.DataRowVersion SourceVersion { get => throw null; set => throw null; } + public System.Data.SqlDbType SqlDbType { get => throw null; set => throw null; } + public SqlParameter(string parameterName, object value) => throw null; + public SqlParameter(string parameterName, System.Data.SqlDbType dbType, int size, string sourceColumn) => throw null; + public SqlParameter(string parameterName, System.Data.SqlDbType dbType, int size, System.Data.ParameterDirection direction, bool isNullable, System.Byte precision, System.Byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, object value) => throw null; + public SqlParameter(string parameterName, System.Data.SqlDbType dbType, int size, System.Data.ParameterDirection direction, System.Byte precision, System.Byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value, string xmlSchemaCollectionDatabase, string xmlSchemaCollectionOwningSchema, string xmlSchemaCollectionName) => throw null; + public SqlParameter(string parameterName, System.Data.SqlDbType dbType, int size) => throw null; + public SqlParameter(string parameterName, System.Data.SqlDbType dbType) => throw null; + public SqlParameter() => throw null; + public object SqlValue { get => throw null; set => throw null; } + public override string ToString() => throw null; + public string TypeName { get => throw null; set => throw null; } + public string UdtTypeName { get => throw null; set => throw null; } + public override object Value { get => throw null; set => throw null; } + public string XmlSchemaCollectionDatabase { get => throw null; set => throw null; } + public string XmlSchemaCollectionName { get => throw null; set => throw null; } + public string XmlSchemaCollectionOwningSchema { get => throw null; set => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlParameterCollection` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlParameterCollection : System.Data.Common.DbParameterCollection + { + public override int Add(object value) => throw null; + public System.Data.SqlClient.SqlParameter Add(string parameterName, System.Data.SqlDbType sqlDbType, int size, string sourceColumn) => throw null; + public System.Data.SqlClient.SqlParameter Add(string parameterName, System.Data.SqlDbType sqlDbType, int size) => throw null; + public System.Data.SqlClient.SqlParameter Add(string parameterName, System.Data.SqlDbType sqlDbType) => throw null; + public System.Data.SqlClient.SqlParameter Add(System.Data.SqlClient.SqlParameter value) => throw null; + public void AddRange(System.Data.SqlClient.SqlParameter[] values) => throw null; + public override void AddRange(System.Array values) => throw null; + public System.Data.SqlClient.SqlParameter AddWithValue(string parameterName, object value) => throw null; + public override void Clear() => throw null; + public override bool Contains(string value) => throw null; + public override bool Contains(object value) => throw null; + public bool Contains(System.Data.SqlClient.SqlParameter value) => throw null; + public void CopyTo(System.Data.SqlClient.SqlParameter[] array, int index) => throw null; + public override void CopyTo(System.Array array, int index) => throw null; + public override int Count { get => throw null; } + public override System.Collections.IEnumerator GetEnumerator() => throw null; + protected override System.Data.Common.DbParameter GetParameter(string parameterName) => throw null; + protected override System.Data.Common.DbParameter GetParameter(int index) => throw null; + public override int IndexOf(string parameterName) => throw null; + public override int IndexOf(object value) => throw null; + public int IndexOf(System.Data.SqlClient.SqlParameter value) => throw null; + public void Insert(int index, System.Data.SqlClient.SqlParameter value) => throw null; + public override void Insert(int index, object value) => throw null; + public override bool IsFixedSize { get => throw null; } + public override bool IsReadOnly { get => throw null; } + public System.Data.SqlClient.SqlParameter this[string parameterName] { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlParameter this[int index] { get => throw null; set => throw null; } + public void Remove(System.Data.SqlClient.SqlParameter value) => throw null; + public override void Remove(object value) => throw null; + public override void RemoveAt(string parameterName) => throw null; + public override void RemoveAt(int index) => throw null; + protected override void SetParameter(string parameterName, System.Data.Common.DbParameter value) => throw null; + protected override void SetParameter(int index, System.Data.Common.DbParameter value) => throw null; + public override object SyncRoot { get => throw null; } + } + + // Generated from `System.Data.SqlClient.SqlRowUpdatedEventArgs` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlRowUpdatedEventArgs : System.Data.Common.RowUpdatedEventArgs + { + public System.Data.SqlClient.SqlCommand Command { get => throw null; } + public SqlRowUpdatedEventArgs(System.Data.DataRow row, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base(default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlRowUpdatedEventHandler` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SqlRowUpdatedEventHandler(object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e); + + // Generated from `System.Data.SqlClient.SqlRowUpdatingEventArgs` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlRowUpdatingEventArgs : System.Data.Common.RowUpdatingEventArgs + { + protected override System.Data.IDbCommand BaseCommand { get => throw null; set => throw null; } + public System.Data.SqlClient.SqlCommand Command { get => throw null; set => throw null; } + public SqlRowUpdatingEventArgs(System.Data.DataRow row, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base(default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlRowUpdatingEventHandler` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SqlRowUpdatingEventHandler(object sender, System.Data.SqlClient.SqlRowUpdatingEventArgs e); + + // Generated from `System.Data.SqlClient.SqlRowsCopiedEventArgs` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlRowsCopiedEventArgs : System.EventArgs + { + public bool Abort { get => throw null; set => throw null; } + public System.Int64 RowsCopied { get => throw null; } + public SqlRowsCopiedEventArgs(System.Int64 rowsCopied) => throw null; + } + + // Generated from `System.Data.SqlClient.SqlRowsCopiedEventHandler` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public delegate void SqlRowsCopiedEventHandler(object sender, System.Data.SqlClient.SqlRowsCopiedEventArgs e); + + // Generated from `System.Data.SqlClient.SqlTransaction` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlTransaction : System.Data.Common.DbTransaction + { + public override void Commit() => throw null; + public System.Data.SqlClient.SqlConnection Connection { get => throw null; } + protected override System.Data.Common.DbConnection DbConnection { get => throw null; } + protected override void Dispose(bool disposing) => throw null; + public override System.Data.IsolationLevel IsolationLevel { get => throw null; } + public void Rollback(string transactionName) => throw null; + public override void Rollback() => throw null; + public void Save(string savePointName) => throw null; + } + + } + namespace SqlTypes + { + // Generated from `System.Data.SqlTypes.SqlFileStream` in `System.Data.SqlClient, Version=4.6.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a` + public class SqlFileStream : System.IO.Stream + { + public override bool CanRead { get => throw null; } + public override bool CanSeek { get => throw null; } + public override bool CanWrite { get => throw null; } + public override void Flush() => throw null; + public override System.Int64 Length { get => throw null; } + public string Name { get => throw null; } + public override System.Int64 Position { get => throw null; set => throw null; } + public override int Read(System.Byte[] buffer, int offset, int count) => throw null; + public override System.Int64 Seek(System.Int64 offset, System.IO.SeekOrigin origin) => throw null; + public override void SetLength(System.Int64 value) => throw null; + public SqlFileStream(string path, System.Byte[] transactionContext, System.IO.FileAccess access, System.IO.FileOptions options, System.Int64 allocationSize) => throw null; + public SqlFileStream(string path, System.Byte[] transactionContext, System.IO.FileAccess access) => throw null; + public System.Byte[] TransactionContext { get => throw null; } + public override void Write(System.Byte[] buffer, int offset, int count) => throw null; + } + + } + } +} diff --git a/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.csproj b/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.csproj new file mode 100644 index 000000000000..36eddf7809cb --- /dev/null +++ b/csharp/ql/test/resources/stubs/System.Data.SqlClient/4.8.2/System.Data.SqlClient.csproj @@ -0,0 +1,12 @@ + + + net5.0 + true + bin\ + false + + + + + + From b34448af8703d21fe3fa8cc4a5e3f26881a8e6f1 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 11 Jun 2021 16:14:32 +0100 Subject: [PATCH 1597/1662] {Generic,Parameterized,Raw}Type: implement getAPrimaryQlClass An aid to debugging --- java/ql/src/semmle/code/java/Generics.qll | 50 ++++++++++++++++--- .../dependency-counts/PrintAst.expected | 2 +- .../dependency/PrintAst.expected | 2 +- .../library-tests/generics/PrintAst.expected | 4 +- .../typeaccesses/PrintAst.expected | 2 +- 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/java/ql/src/semmle/code/java/Generics.qll b/java/ql/src/semmle/code/java/Generics.qll index 4366abbac887..a15c47b1f8f3 100755 --- a/java/ql/src/semmle/code/java/Generics.qll +++ b/java/ql/src/semmle/code/java/Generics.qll @@ -75,13 +75,25 @@ class GenericType extends RefType { * Gets the number of type parameters of this generic type. */ int getNumberOfTypeParameters() { result = strictcount(getATypeParameter()) } + + override string getAPrimaryQlClass() { result = "GenericType" } } /** A generic type that is a class. */ -class GenericClass extends GenericType, Class { } +class GenericClass extends GenericType, Class { + override string getAPrimaryQlClass() { + result = Class.super.getAPrimaryQlClass() or + result = GenericType.super.getAPrimaryQlClass() + } +} /** A generic type that is an interface. */ -class GenericInterface extends GenericType, Interface { } +class GenericInterface extends GenericType, Interface { + override string getAPrimaryQlClass() { + result = Interface.super.getAPrimaryQlClass() or + result = GenericType.super.getAPrimaryQlClass() + } +} /** * A common super-class for Java types that may have a type bound. @@ -115,6 +127,8 @@ abstract class BoundedType extends RefType, @boundedtype { or result = getUpperBoundType().(BoundedType).getAnUltimateUpperBoundType() } + + override string getAPrimaryQlClass() { result = "BoundedType" } } /** @@ -354,13 +368,25 @@ class ParameterizedType extends RefType { /** Holds if this type originates from source code. */ override predicate fromSource() { typeVars(_, _, _, _, this) and RefType.super.fromSource() } + + override string getAPrimaryQlClass() { result = "ParameterizedType" } } /** A parameterized type that is a class. */ -class ParameterizedClass extends Class, ParameterizedType { } +class ParameterizedClass extends Class, ParameterizedType { + override string getAPrimaryQlClass() { + result = Class.super.getAPrimaryQlClass() or + result = ParameterizedType.super.getAPrimaryQlClass() + } +} /** A parameterized type that is an interface. */ -class ParameterizedInterface extends Interface, ParameterizedType { } +class ParameterizedInterface extends Interface, ParameterizedType { + override string getAPrimaryQlClass() { + result = Interface.super.getAPrimaryQlClass() or + result = ParameterizedType.super.getAPrimaryQlClass() + } +} /** * The raw version of a generic type is the type that is formed by @@ -384,13 +410,25 @@ class RawType extends RefType { /** Holds if this type originates from source code. */ override predicate fromSource() { not any() } + + override string getAPrimaryQlClass() { result = "RawType" } } /** A raw type that is a class. */ -class RawClass extends Class, RawType { } +class RawClass extends Class, RawType { + override string getAPrimaryQlClass() { + result = Class.super.getAPrimaryQlClass() or + result = RawType.super.getAPrimaryQlClass() + } +} /** A raw type that is an interface. */ -class RawInterface extends Interface, RawType { } +class RawInterface extends Interface, RawType { + override string getAPrimaryQlClass() { + result = Interface.super.getAPrimaryQlClass() or + result = RawType.super.getAPrimaryQlClass() + } +} // -------- Generic callables -------- /** diff --git a/java/ql/test/library-tests/dependency-counts/PrintAst.expected b/java/ql/test/library-tests/dependency-counts/PrintAst.expected index aab0529433e8..82abdf755d46 100644 --- a/java/ql/test/library-tests/dependency-counts/PrintAst.expected +++ b/java/ql/test/library-tests/dependency-counts/PrintAst.expected @@ -3,7 +3,7 @@ Example.java: #-----| -1: (Imports) # 1| 1: [ImportType] import Set # 2| 2: [ImportType] import List -# 4| 1: [Interface] Example +# 4| 1: [GenericType,Interface,ParameterizedType] Example #-----| -2: (Generic Parameters) # 4| 0: [TypeVariable] A #-----| -1: (Base Types) diff --git a/java/ql/test/library-tests/dependency/PrintAst.expected b/java/ql/test/library-tests/dependency/PrintAst.expected index 828b2be31994..ad986a57757c 100644 --- a/java/ql/test/library-tests/dependency/PrintAst.expected +++ b/java/ql/test/library-tests/dependency/PrintAst.expected @@ -1,6 +1,6 @@ dependency/A.java: # 0| [CompilationUnit] A -# 3| 1: [Class] A +# 3| 1: [Class,GenericType,ParameterizedType] A #-----| -2: (Generic Parameters) # 3| 0: [TypeVariable] T # 6| 2: [Class] B diff --git a/java/ql/test/library-tests/generics/PrintAst.expected b/java/ql/test/library-tests/generics/PrintAst.expected index 57a62932e731..be32add041d3 100644 --- a/java/ql/test/library-tests/generics/PrintAst.expected +++ b/java/ql/test/library-tests/generics/PrintAst.expected @@ -3,7 +3,7 @@ generics/A.java: #-----| -1: (Imports) # 3| 1: [ImportType] import HashMap # 4| 2: [ImportType] import Map -# 6| 1: [Class] A +# 6| 1: [Class,GenericType,ParameterizedType] A #-----| -2: (Generic Parameters) # 6| 0: [TypeVariable] T # 7| 2: [Class] B @@ -23,7 +23,7 @@ generics/A.java: # 13| -3: [TypeAccess] HashMap # 13| 0: [TypeAccess] String # 13| 1: [TypeAccess] Object -# 16| 3: [Class] D +# 16| 3: [Class,GenericType,ParameterizedType] D #-----| -2: (Generic Parameters) # 16| 0: [TypeVariable] V # 16| 0: [TypeAccess] Number diff --git a/java/ql/test/library-tests/typeaccesses/PrintAst.expected b/java/ql/test/library-tests/typeaccesses/PrintAst.expected index 3134e9d44ba6..197240032053 100644 --- a/java/ql/test/library-tests/typeaccesses/PrintAst.expected +++ b/java/ql/test/library-tests/typeaccesses/PrintAst.expected @@ -84,7 +84,7 @@ typeaccesses/TA.java: # 13| 0: [ExprStmt] ; # 13| 0: [MethodAccess] method3(...) # 13| -1: [TypeAccess] TA -# 14| 10: [Class] Inner +# 14| 10: [Class,GenericType,ParameterizedType] Inner #-----| -2: (Generic Parameters) # 14| 0: [TypeVariable] T # 14| 0: [TypeAccess] ArrayList From 74feaf2893c2a423a5ea839d1de5a8190f2d4ef3 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Fri, 11 Jun 2021 16:15:33 +0100 Subject: [PATCH 1598/1662] Adapt to static methods and nested types returning unbound declaring types Previously these returned raw declaring types instead --- .../code/java/dataflow/internal/ContainerFlow.qll | 12 ++++++------ .../ql/src/semmle/code/java/frameworks/play/Play.qll | 4 ++-- .../test/library-tests/dataflow/collections/B.java | 8 ++++---- .../play/PlayBodyParserAnnotation.expected | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll index 04f72fa454e6..61f2637d37dd 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/ContainerFlow.qll @@ -7,11 +7,11 @@ private import semmle.code.java.dataflow.ExternalFlow private class EntryType extends RefType { EntryType() { - this.getSourceDeclaration().getASourceSupertype*().hasQualifiedName("java.util", "Map<>$Entry") + this.getSourceDeclaration().getASourceSupertype*().hasQualifiedName("java.util", "Map$Entry") } RefType getValueType() { - exists(GenericType t | t.hasQualifiedName("java.util", "Map<>$Entry") | + exists(GenericType t | t.hasQualifiedName("java.util", "Map$Entry") | indirectlyInstantiates(this, t, 1, result) ) } @@ -95,10 +95,10 @@ private class ContainerFlowSummaries extends SummaryModelCsv { override predicate row(string row) { row = [ - "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", - "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + "java.util;Map$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + "java.util;Map$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", "java.lang;Iterable;true;iterator;();;Element of Argument[-1];Element of ReturnValue;value", "java.lang;Iterable;true;spliterator;();;Element of Argument[-1];Element of ReturnValue;value", "java.util;Iterator;true;next;;;Element of Argument[-1];ReturnValue;value", diff --git a/java/ql/src/semmle/code/java/frameworks/play/Play.qll b/java/ql/src/semmle/code/java/frameworks/play/Play.qll index 96c45cb22449..efe2e128fee9 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/Play.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/Play.qll @@ -26,10 +26,10 @@ class PlayMvcHttpRequestHeader extends RefType { } /** - * A `play.mvc.BodyParser<>$Of` annotation. + * A `play.mvc.BodyParser$Of` annotation. */ class PlayBodyParserAnnotation extends Annotation { - PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser<>$Of") } + PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser$Of") } } /** diff --git a/java/ql/test/library-tests/dataflow/collections/B.java b/java/ql/test/library-tests/dataflow/collections/B.java index 3cafd3ecbb9d..b9c5b883a779 100644 --- a/java/ql/test/library-tests/dataflow/collections/B.java +++ b/java/ql/test/library-tests/dataflow/collections/B.java @@ -49,22 +49,22 @@ static void sink(Object obj) { } void foo() throws InterruptedException { { - // "java.util;Map<>$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapKeyEntry(source()); out = ((Map.Entry)in).getKey(); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).getValue(); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + // "java.util;Map$Entry;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", Object out = null; Object in = storeMapValueEntry(source()); out = ((Map.Entry)in).setValue(null); sink(out); // $ hasValueFlow } { - // "java.util;Map<>$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + // "java.util;Map$Entry;true;setValue;;;Argument[0];MapValue of Argument[-1];value", Map.Entry out = null; Object in = source(); out.setValue(in); sink(readMapValue(out)); // $ hasValueFlow } diff --git a/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected b/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected index b32653c57841..fabd1df0dfcd 100644 --- a/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected +++ b/java/ql/test/library-tests/frameworks/play/PlayBodyParserAnnotation.expected @@ -1 +1 @@ -| play.mvc.BodyParser<>$Of | +| play.mvc.BodyParser$Of | From 9c91d1a9654321737e0f4e5aee775399cf8fa179 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 23 Jun 2021 16:09:29 +0100 Subject: [PATCH 1599/1662] Add change note --- java/change-notes/2021-06-23-generic-type-names.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-06-23-generic-type-names.md diff --git a/java/change-notes/2021-06-23-generic-type-names.md b/java/change-notes/2021-06-23-generic-type-names.md new file mode 100644 index 000000000000..509eb871932e --- /dev/null +++ b/java/change-notes/2021-06-23-generic-type-names.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Static inner classes and static methods' enclosing and declaring types are now unbound rather than raw types. This means that, for example, Map.Entry's name is now `Map$Entry` not `Map<>$Entry` as before. This may impact custom queries that explicitly named these types. From 4c777eb04ae62f05febfb3ad91f769dbd86b68ad Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Wed, 23 Jun 2021 18:54:27 +0100 Subject: [PATCH 1600/1662] Add change note --- java/change-notes/2021-06-22-util-optional.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-06-22-util-optional.md diff --git a/java/change-notes/2021-06-22-util-optional.md b/java/change-notes/2021-06-22-util-optional.md new file mode 100644 index 000000000000..ebfc6f993c97 --- /dev/null +++ b/java/change-notes/2021-06-22-util-optional.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Models for java.util.Optional added. This may lead to more results whenever a data-flow path involves this type. From 7557b7a67d65248595fcc7c5b58c68ee67ba7fda Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 21 Jun 2021 15:49:20 +0200 Subject: [PATCH 1601/1662] Add scheduled coverage job to open PR with changes --- .github/workflows/csv-coverage-update.yml | 43 ++++++++ misc/scripts/library-coverage/create-pr.py | 112 +++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 .github/workflows/csv-coverage-update.yml create mode 100644 misc/scripts/library-coverage/create-pr.py diff --git a/.github/workflows/csv-coverage-update.yml b/.github/workflows/csv-coverage-update.yml new file mode 100644 index 000000000000..bc4af10b9392 --- /dev/null +++ b/.github/workflows/csv-coverage-update.yml @@ -0,0 +1,43 @@ +name: Update framework coverage reports + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +jobs: + update: + name: Update framework coverage report + runs-on: ubuntu-latest + + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github.event) }} + run: echo "$GITHUB_CONTEXT" + - name: Clone self (github/codeql) + uses: actions/checkout@v2 + with: + path: ql + fetch-depth: 0 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Download CodeQL CLI + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip" + - name: Unzip CodeQL CLI + run: unzip -d codeql-cli codeql-linux64.zip + + - name: Generate coverage files + run: | + PATH="$PATH:codeql-cli/codeql" python ql/misc/scripts/library-coverage/generate-report.py ci ql ql + + - name: Create pull request with changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + python ql/misc/scripts/library-coverage/create-pr.py ql "$GITHUB_REPOSITORY" diff --git a/misc/scripts/library-coverage/create-pr.py b/misc/scripts/library-coverage/create-pr.py new file mode 100644 index 000000000000..82d79124fbc1 --- /dev/null +++ b/misc/scripts/library-coverage/create-pr.py @@ -0,0 +1,112 @@ +import sys +import settings +import utils +import shutil +import json +import os + +""" +This script compares the generated CSV coverage files with the ones in the codebase. And if they are different, it +creates a PR with the changes. If a PR already exists, then it will be updated to reflect the latest changes. +""" + +# Name of the branch that's used to push the updated coverage files, also the head of the PR +branch_name = "workflow/coverage/update" +# Name of the remote where the new commit is pushed +remote = "origin" +# Name of the branch that provides the base for the new branch, and the base of the PR +main = "main" + +repo = sys.argv[2] +owner = repo.split('/')[0] + + +def overwrite_files(): + languages = ['java'] + for lang in languages: + repo_output_rst = settings.repo_output_rst.format(language=lang) + repo_output_csv = settings.repo_output_csv.format(language=lang) + + generated_output_rst = settings.generated_output_rst.format( + language=lang) + generated_output_csv = settings.generated_output_csv.format( + language=lang) + + exists = utils.check_file_exists(generated_output_rst) + if not exists: + print( + f"Generated RST file {generated_output_rst} is missing", file=sys.stderr) + sys.exit(1) + + exists = utils.check_file_exists(generated_output_csv) + if not exists: + print( + f"Generated RST file {generated_output_csv} is missing", file=sys.stderr) + sys.exit(1) + + shutil.move(generated_output_rst, repo_output_rst) + shutil.move(generated_output_csv, repo_output_csv) + + +def get_pr_number(repo, owner, from_branch, to_branch): + ids = utils.subprocess_check_output(["gh", "api", "-X", "GET", f"repos/{repo}/pulls", "-f", + f"name={to_branch}", "-f", f"head={owner}:{from_branch}", "--jq", "[.[].number]"]) + + ids = json.loads(ids) + + if len(ids) > 1: + print( + f"Found more than one PR that matches the branches. {ids}", file=sys.stderr) + sys.exit(1) + + if len(ids) == 1: + print(f"Matching PR found: {ids[0]}") + return ids[0] + + return 0 + + +def create_pr(repo, from_branch, to_branch): + print(f"Creating PR for {from_branch}") + utils.subprocess_check_output(["gh", "pr", "create", "-R", repo, "--base", to_branch, + "--head", from_branch, "--title", "Update CSV framework coverage reports", + "--body", "This PR changes the CSV framework coverage reports."]) + + +working_dir = "" +if len(sys.argv) > 1: + working_dir = sys.argv[1] +else: + print("Working directory is not specified") + exit(1) + +found_diff = False +overwrite_files() + +os.chdir(working_dir) + +already_open_pr = get_pr_number(repo, owner, branch_name, main) +try: + utils.subprocess_check_output(["git", "diff", "--exit-code"]) + print("No differences found") + found_diff = False +except: + print("Differences found") + found_diff = True + +if not found_diff: + if already_open_pr != 0: + # close the PR + utils.subprocess_run( + ["gh", "pr", "close", str(already_open_pr), "-R", repo]) +else: + utils.subprocess_run(["git", "config", "user.name", + "CodeQL GitHub Actions Bot"]) + utils.subprocess_run(["git", "config", "user.email", "<>"]) + utils.subprocess_run(["git", "add", "."]) + utils.subprocess_run( + ["git", "commit", "-m", "Add changed framework coverage reports"]) + utils.subprocess_run(["git", "branch", "-f", branch_name, main]) + utils.subprocess_run(["git", "push", "-f", remote, branch_name]) + if already_open_pr == 0: + create_pr(repo, branch_name, main) From ad6e47be3911159266b7780357eec3f4b73a3ba2 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Wed, 23 Jun 2021 09:01:46 +0200 Subject: [PATCH 1602/1662] Apply code review findings --- .github/workflows/csv-coverage-update.yml | 1 + misc/scripts/library-coverage/create-pr.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/csv-coverage-update.yml b/.github/workflows/csv-coverage-update.yml index bc4af10b9392..10834bdd36a9 100644 --- a/.github/workflows/csv-coverage-update.yml +++ b/.github/workflows/csv-coverage-update.yml @@ -8,6 +8,7 @@ on: jobs: update: name: Update framework coverage report + if: github.event.repository.fork == false runs-on: ubuntu-latest steps: diff --git a/misc/scripts/library-coverage/create-pr.py b/misc/scripts/library-coverage/create-pr.py index 82d79124fbc1..fd2cb61a58de 100644 --- a/misc/scripts/library-coverage/create-pr.py +++ b/misc/scripts/library-coverage/create-pr.py @@ -101,8 +101,9 @@ def create_pr(repo, from_branch, to_branch): ["gh", "pr", "close", str(already_open_pr), "-R", repo]) else: utils.subprocess_run(["git", "config", "user.name", - "CodeQL GitHub Actions Bot"]) - utils.subprocess_run(["git", "config", "user.email", "<>"]) + "github-actions[bot]"]) + utils.subprocess_run(["git", "config", "user.email", + "41898282+github-actions[bot]@users.noreply.github.com"]) utils.subprocess_run(["git", "add", "."]) utils.subprocess_run( ["git", "commit", "-m", "Add changed framework coverage reports"]) From 0909c9ff2202b5f316f87fdaf0f8debcb99c36c2 Mon Sep 17 00:00:00 2001 From: Edoardo Pirovano Date: Wed, 23 Jun 2021 17:40:56 +0100 Subject: [PATCH 1603/1662] Performance: Fix bad join order in dataflow library --- .../semmle/code/cpp/dataflow/internal/DataFlowImpl.qll | 9 ++++++--- .../semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll | 9 ++++++--- .../semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll | 9 ++++++--- .../semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll | 9 ++++++--- .../code/cpp/dataflow/internal/DataFlowImplLocal.qll | 9 ++++++--- .../code/cpp/ir/dataflow/internal/DataFlowImpl.qll | 9 ++++++--- .../code/cpp/ir/dataflow/internal/DataFlowImpl2.qll | 9 ++++++--- .../code/cpp/ir/dataflow/internal/DataFlowImpl3.qll | 9 ++++++--- .../code/cpp/ir/dataflow/internal/DataFlowImpl4.qll | 9 ++++++--- .../code/csharp/dataflow/internal/DataFlowImpl.qll | 9 ++++++--- .../code/csharp/dataflow/internal/DataFlowImpl2.qll | 9 ++++++--- .../code/csharp/dataflow/internal/DataFlowImpl3.qll | 9 ++++++--- .../code/csharp/dataflow/internal/DataFlowImpl4.qll | 9 ++++++--- .../code/csharp/dataflow/internal/DataFlowImpl5.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl2.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl3.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl4.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl5.qll | 9 ++++++--- .../semmle/code/java/dataflow/internal/DataFlowImpl6.qll | 9 ++++++--- .../semmle/python/dataflow/new/internal/DataFlowImpl.qll | 9 ++++++--- .../python/dataflow/new/internal/DataFlowImpl2.qll | 9 ++++++--- .../python/dataflow/new/internal/DataFlowImpl3.qll | 9 ++++++--- .../python/dataflow/new/internal/DataFlowImpl4.qll | 9 ++++++--- 24 files changed, 144 insertions(+), 72 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..09619471c35c 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..09619471c35c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..09619471c35c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..09619471c35c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..09619471c35c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 9b14db7ef882..09619471c35c 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 9b14db7ef882..09619471c35c 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 9b14db7ef882..09619471c35c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 9b14db7ef882..09619471c35c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 9b14db7ef882..09619471c35c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 9b14db7ef882..09619471c35c 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -1247,7 +1247,8 @@ private module Stage2 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -1928,7 +1929,8 @@ private module Stage3 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself @@ -2683,7 +2685,8 @@ private module Stage4 { parameterFlow(p, ap, ap0, c, config) and c = getNodeEnclosingCallable(ret) and revFlow(ret, true, apSome(_), ap0, config) and - fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and + fwdFlow(ret, any(CcCall ccc), apSome(ap), pragma[only_bind_into](ap0), + pragma[only_bind_into](config)) and kind = ret.getKind() and p.isParameterOf(_, pos) and // we don't expect a parameter to return stored in itself From 477dfa28ec03789bbec28c5f719879f1fdfbfbd6 Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Thu, 24 Jun 2021 10:44:21 +0200 Subject: [PATCH 1604/1662] Fix framework coverage commenting action This commit handles the case when the current run finds no coverage change and the previous run is identified, but it doesn't have the required artifacts. --- misc/scripts/library-coverage/comment-pr.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/misc/scripts/library-coverage/comment-pr.py b/misc/scripts/library-coverage/comment-pr.py index cfeb1317f8b0..82eff1085377 100644 --- a/misc/scripts/library-coverage/comment-pr.py +++ b/misc/scripts/library-coverage/comment-pr.py @@ -61,12 +61,15 @@ def comment_pr(repo, run_id): # Try storing diff for previous run: prev_run_id = 0 + prev_diff_exists = False try: prev_run_id = get_previous_run_id(repo, run_id, pr_number) prev_diff_folder = "prev_diff" utils.download_artifact(repo, comparison_artifact_name, prev_diff_folder, prev_run_id) + prev_diff_exists = True + if filecmp.cmp(f"{current_diff_folder}/{comparison_artifact_file_name}", f"{prev_diff_folder}/{comparison_artifact_file_name}", shallow=False): print( f"Previous run {prev_run_id} resulted in the same diff, so not commenting again.") @@ -74,7 +77,7 @@ def comment_pr(repo, run_id): else: print(f"Diff of previous run {prev_run_id} differs, commenting.") except Exception: - # this is not mecessarily a failure, it can also mean that there was no previous run yet. + # this is not necessarily a failure, it can also mean that there was no previous run yet. print("Couldn't generate diff for previous run:", sys.exc_info()[1]) comment = get_comment_text( @@ -82,9 +85,17 @@ def comment_pr(repo, run_id): if comment == None: if prev_run_id == 0: - print("Nothing to comment.") + print( + "Nothing to comment. There's no previous run, and there's no coverage change.") return + print("Previous run found, and current run removes coverage change.") + + if not prev_diff_exists: + print( + "Couldn't get the comparison artifact from previous run. Not commenting.") + return + comment = comment_first_line + \ "A recent commit removed the previously reported differences." post_comment(comment, repo, pr_number) From 3cf71c50b84b29efd0053e24c73aa3f70675d02a Mon Sep 17 00:00:00 2001 From: haby0 Date: Thu, 24 Jun 2021 19:24:38 +0800 Subject: [PATCH 1605/1662] Mobile stubs --- java/ql/test/experimental/query-tests/security/CWE-094/options | 2 +- .../test/{ => experimental}/stubs/jshell/jdk/jshell/JShell.java | 0 .../{ => experimental}/stubs/jshell/jdk/jshell/Snippet.java | 0 .../stubs/jshell/jdk/jshell/SnippetEvent.java | 0 .../stubs/jshell/jdk/jshell/SourceCodeAnalysis.java | 0 5 files changed, 1 insertion(+), 1 deletion(-) rename java/ql/test/{ => experimental}/stubs/jshell/jdk/jshell/JShell.java (100%) rename java/ql/test/{ => experimental}/stubs/jshell/jdk/jshell/Snippet.java (100%) rename java/ql/test/{ => experimental}/stubs/jshell/jdk/jshell/SnippetEvent.java (100%) rename java/ql/test/{ => experimental}/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java (100%) diff --git a/java/ql/test/experimental/query-tests/security/CWE-094/options b/java/ql/test/experimental/query-tests/security/CWE-094/options index 22891626ba4c..d54ac82b6064 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-094/options +++ b/java/ql/test/experimental/query-tests/security/CWE-094/options @@ -1 +1 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5:${testdir}/../../../../stubs/jshell \ No newline at end of file +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/java-ee-el:${testdir}/../../../../stubs/juel-2.2:${testdir}/../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jython-2.7.2:${testdir}/../../../../experimental/stubs/rhino-1.7.13:${testdir}/../../../../stubs/bsh-2.0b5:${testdir}/../../../../experimental/stubs/jshell \ No newline at end of file diff --git a/java/ql/test/stubs/jshell/jdk/jshell/JShell.java b/java/ql/test/experimental/stubs/jshell/jdk/jshell/JShell.java similarity index 100% rename from java/ql/test/stubs/jshell/jdk/jshell/JShell.java rename to java/ql/test/experimental/stubs/jshell/jdk/jshell/JShell.java diff --git a/java/ql/test/stubs/jshell/jdk/jshell/Snippet.java b/java/ql/test/experimental/stubs/jshell/jdk/jshell/Snippet.java similarity index 100% rename from java/ql/test/stubs/jshell/jdk/jshell/Snippet.java rename to java/ql/test/experimental/stubs/jshell/jdk/jshell/Snippet.java diff --git a/java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java b/java/ql/test/experimental/stubs/jshell/jdk/jshell/SnippetEvent.java similarity index 100% rename from java/ql/test/stubs/jshell/jdk/jshell/SnippetEvent.java rename to java/ql/test/experimental/stubs/jshell/jdk/jshell/SnippetEvent.java diff --git a/java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java b/java/ql/test/experimental/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java similarity index 100% rename from java/ql/test/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java rename to java/ql/test/experimental/stubs/jshell/jdk/jshell/SourceCodeAnalysis.java From 1c1d11a4a4f0fe524dc6aa4908fbb8fe54942258 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 24 Jun 2021 14:18:45 +0200 Subject: [PATCH 1606/1662] DataFlow: Address review comments. --- .../java/dataflow/internal/DataFlowImpl.qll | 114 +++++++++--------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and From cd0efbe7ce421c4f8be7b7b3b49f59e5d760a8be Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 24 Jun 2021 14:19:17 +0200 Subject: [PATCH 1607/1662] Dataflow: Sync. --- .../cpp/dataflow/internal/DataFlowImpl.qll | 114 +++++++++--------- .../cpp/dataflow/internal/DataFlowImpl2.qll | 114 +++++++++--------- .../cpp/dataflow/internal/DataFlowImpl3.qll | 114 +++++++++--------- .../cpp/dataflow/internal/DataFlowImpl4.qll | 114 +++++++++--------- .../dataflow/internal/DataFlowImplLocal.qll | 114 +++++++++--------- .../cpp/ir/dataflow/internal/DataFlowImpl.qll | 114 +++++++++--------- .../ir/dataflow/internal/DataFlowImpl2.qll | 114 +++++++++--------- .../ir/dataflow/internal/DataFlowImpl3.qll | 114 +++++++++--------- .../ir/dataflow/internal/DataFlowImpl4.qll | 114 +++++++++--------- .../csharp/dataflow/internal/DataFlowImpl.qll | 114 +++++++++--------- .../dataflow/internal/DataFlowImpl2.qll | 114 +++++++++--------- .../dataflow/internal/DataFlowImpl3.qll | 114 +++++++++--------- .../dataflow/internal/DataFlowImpl4.qll | 114 +++++++++--------- .../dataflow/internal/DataFlowImpl5.qll | 114 +++++++++--------- .../java/dataflow/internal/DataFlowImpl2.qll | 114 +++++++++--------- .../java/dataflow/internal/DataFlowImpl3.qll | 114 +++++++++--------- .../java/dataflow/internal/DataFlowImpl4.qll | 114 +++++++++--------- .../java/dataflow/internal/DataFlowImpl5.qll | 114 +++++++++--------- .../java/dataflow/internal/DataFlowImpl6.qll | 114 +++++++++--------- .../dataflow/new/internal/DataFlowImpl.qll | 114 +++++++++--------- .../dataflow/new/internal/DataFlowImpl2.qll | 114 +++++++++--------- .../dataflow/new/internal/DataFlowImpl3.qll | 114 +++++++++--------- .../dataflow/new/internal/DataFlowImpl4.qll | 114 +++++++++--------- 23 files changed, 1334 insertions(+), 1288 deletions(-) diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll +++ b/cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl2.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl3.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl4.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl5.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl2.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl3.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl4.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl5.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll +++ b/java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl6.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl2.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl3.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll index 9cc0e10a6c68..9adf7d386e1d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowImpl4.qll @@ -190,8 +190,8 @@ abstract private class ConfigurationRecursionPrevention extends Configuration { private newtype TNodeEx = TNodeNormal(Node n) or - TNodeImplicitRead(Node n, boolean b) { - any(Configuration c).allowImplicitRead(n, _) and b = [false, true] + TNodeImplicitRead(Node n, boolean hasRead) { + any(Configuration c).allowImplicitRead(n, _) and hasRead = [false, true] } private class NodeEx extends TNodeEx { @@ -203,12 +203,27 @@ private class NodeEx extends TNodeEx { Node asNode() { this = TNodeNormal(result) } - predicate isImplicitReadNode(Node n, boolean b) { this = TNodeImplicitRead(n, b) } + predicate isImplicitReadNode(Node n, boolean hasRead) { this = TNodeImplicitRead(n, hasRead) } Node projectToNode() { this = TNodeNormal(result) or this = TNodeImplicitRead(result, _) } pragma[nomagic] - DataFlowCallable getEnclosingCallable() { nodeEnclosingCallable(this.projectToNode(), result) } + private DataFlowCallable getEnclosingCallable0() { + nodeEnclosingCallable(this.projectToNode(), result) + } + + pragma[inline] + DataFlowCallable getEnclosingCallable() { + pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result) + } + + pragma[nomagic] + private DataFlowType getDataFlowType0() { nodeDataFlowType(this.asNode(), result) } + + pragma[inline] + DataFlowType getDataFlowType() { + pragma[only_bind_out](this).getDataFlowType0() = pragma[only_bind_into](result) + } predicate hasLocationInfo( string filepath, int startline, int startcolumn, int endline, int endcolumn @@ -239,19 +254,6 @@ private class RetNodeEx extends NodeEx { ReturnKindExt getKind() { result = this.asNode().(ReturnNodeExt).getKind() } } -pragma[inline] -private DataFlowCallable getEnclosingCallable(NodeEx n) { - pragma[only_bind_out](n).getEnclosingCallable() = pragma[only_bind_into](result) -} - -pragma[nomagic] -private DataFlowType getDataFlowType0(NodeEx n) { nodeDataFlowType(n.asNode(), result) } - -pragma[inline] -private DataFlowType getDataFlowType(NodeEx n) { - getDataFlowType0(pragma[only_bind_out](n)) = pragma[only_bind_into](result) -} - private predicate inBarrier(NodeEx node, Configuration config) { exists(Node n | node.asNode() = n and @@ -727,7 +729,7 @@ private module Stage1 { ) { exists(RetNodeEx ret | throughFlowNodeCand(ret, config) and - callable = getEnclosingCallable(ret) and + callable = ret.getEnclosingCallable() and kind = ret.getKind() ) } @@ -740,7 +742,7 @@ private module Stage1 { exists(ReturnKindExt kind | throughFlowNodeCand(p, config) and returnFlowCallableNodeCand(c, kind, config) and - getEnclosingCallable(p) = c and + p.getEnclosingCallable() = c and exists(ap) and // we don't expect a parameter to return stored in itself not kind.(ParamUpdateReturnKind).getPosition() = p.getPosition() @@ -984,7 +986,7 @@ private module Stage2 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1103,7 +1105,7 @@ private module Stage2 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1119,7 +1121,7 @@ private module Stage2 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -1384,13 +1386,13 @@ private module Stage2 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -1520,14 +1522,14 @@ private module LocalFlowBigStep { ( localFlowStepNodeCand1(node1, node2, config) and preservesValue = true and - t = getDataFlowType(node1) // irrelevant dummy value + t = node1.getDataFlowType() // irrelevant dummy value or additionalLocalFlowStepNodeCand2(node1, node2, config) and preservesValue = false and - t = getDataFlowType(node2) + t = node2.getDataFlowType() ) and node1 != node2 and - cc.relevantFor(getEnclosingCallable(node1)) and + cc.relevantFor(node1.getEnclosingCallable()) and not isUnreachableInCallCached(node1.asNode(), cc.(LocalCallContextSpecificCall).getCall()) and Stage2::revFlow(node2, pragma[only_bind_into](config)) or @@ -1543,7 +1545,7 @@ private module LocalFlowBigStep { additionalLocalFlowStepNodeCand2(mid, node2, config) and not mid instanceof FlowCheckNode and preservesValue = false and - t = getDataFlowType(node2) and + t = node2.getDataFlowType() and Stage2::revFlow(node2, pragma[only_bind_into](config)) ) ) @@ -1577,7 +1579,7 @@ private module Stage3 { private ApApprox getApprox(Ap ap) { result = ap.toBoolNonEmpty() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TFrontNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TFrontNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -1642,7 +1644,7 @@ private module Stage3 { bindingset[node, ap] private predicate filter(NodeEx node, Ap ap) { not clear(node, ap) and - if castingNodeEx(node) then compatibleTypes(getDataFlowType(node), ap.getType()) else any() + if castingNodeEx(node) then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() } bindingset[ap, contentType] @@ -1670,7 +1672,7 @@ private module Stage3 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -1796,7 +1798,7 @@ private module Stage3 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -1812,7 +1814,7 @@ private module Stage3 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2077,13 +2079,13 @@ private module Stage3 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2333,7 +2335,7 @@ private module Stage4 { private ApApprox getApprox(Ap ap) { result = ap.getFront() } private ApNil getApNil(NodeEx node) { - PrevStage::revFlow(node, _) and result = TNil(getDataFlowType(node)) + PrevStage::revFlow(node, _) and result = TNil(node.getDataFlowType()) } bindingset[tc, tail] @@ -2379,7 +2381,7 @@ private module Stage4 { localFlowEntry(node, config) and result = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(node)) + node.getEnclosingCallable()) } private predicate localStep( @@ -2432,7 +2434,7 @@ private module Stage4 { ) { flowOutOfCall(call, ret, out, allowsFieldFlow, pragma[only_bind_into](config)) and PrevStage::callMayFlowThroughRev(call, pragma[only_bind_into](config)) and - PrevStage::parameterMayFlowThrough(_, getEnclosingCallable(ret), _, + PrevStage::parameterMayFlowThrough(_, ret.getEnclosingCallable(), _, pragma[only_bind_into](config)) } @@ -2558,7 +2560,7 @@ private module Stage4 { exists(ArgNodeEx arg, boolean allowsFieldFlow | fwdFlow(arg, outercc, argAp, ap, config) and flowIntoCall(call, arg, p, allowsFieldFlow, config) and - innercc = getCallContextCall(call, getEnclosingCallable(p), outercc) + innercc = getCallContextCall(call, p.getEnclosingCallable(), outercc) | ap instanceof ApNil or allowsFieldFlow = true ) @@ -2574,7 +2576,7 @@ private module Stage4 { | fwdFlow(ret, innercc, argAp, ap, config) and flowOutOfCall(call, ret, out, allowsFieldFlow, config) and - inner = getEnclosingCallable(ret) and + inner = ret.getEnclosingCallable() and checkCallContextReturn(innercc, inner, call) and ccOut = getCallContextReturn(inner, call) | @@ -2839,13 +2841,13 @@ private module Stage4 { ParamNodeEx p, Ap ap, Ap ap0, DataFlowCallable c, Configuration config ) { revFlow(p, true, apSome(ap0), ap, config) and - c = getEnclosingCallable(p) + c = p.getEnclosingCallable() } predicate parameterMayFlowThrough(ParamNodeEx p, DataFlowCallable c, Ap ap, Configuration config) { exists(RetNodeEx ret, Ap ap0, ReturnKindExt kind, int pos | parameterFlow(p, ap, ap0, c, config) and - c = getEnclosingCallable(ret) and + c = ret.getEnclosingCallable() and revFlow(ret, true, apSome(_), ap0, config) and fwdFlow(ret, any(CcCall ccc), apSome(ap), ap0, config) and kind = ret.getKind() and @@ -2890,7 +2892,7 @@ private predicate nodeMayUseSummary(NodeEx n, AccessPathApprox apa, Configuratio Stage4::parameterMayFlowThrough(_, c, apa, _) and Stage4::revFlow(n, true, _, apa0, config) and Stage4::fwdFlow(n, any(CallContextCall ccc), TAccessPathApproxSome(apa), apa0, config) and - getEnclosingCallable(n) = c + n.getEnclosingCallable() = c ) } @@ -3050,7 +3052,7 @@ private newtype TPathNode = sourceNode(node, config) and cc instanceof CallContextAny and sc instanceof SummaryCtxNone and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or // ... or a step from an existing PathNode to another node. exists(PathNodeMid mid | @@ -3430,7 +3432,7 @@ private predicate pathStep( sc = mid.getSummaryCtx() and localCC = getLocalCallContext(pragma[only_bind_into](pragma[only_bind_out](cc)), - getEnclosingCallable(midnode)) and + midnode.getEnclosingCallable()) and ap0 = mid.getAp() | localFlowBigStep(midnode, node, true, _, conf, localCC) and @@ -3449,7 +3451,7 @@ private predicate pathStep( cc instanceof CallContextAny and sc instanceof SummaryCtxNone and mid.getAp() instanceof AccessPathNil and - ap = TAccessPathNil(getDataFlowType(node)) + ap = TAccessPathNil(node.getDataFlowType()) or exists(TypedContent tc | pathStoreStep(mid, node, ap.pop(tc), tc, cc)) and sc = mid.getSummaryCtx() @@ -3716,8 +3718,8 @@ private module FlowExploration { // flow out of a callable viableReturnPosOutEx(_, node1.(RetNodeEx).getReturnPosition(), node2) | - c1 = getEnclosingCallable(node1) and - c2 = getEnclosingCallable(node2) and + c1 = node1.getEnclosingCallable() and + c2 = node2.getEnclosingCallable() and c1 != c2 ) } @@ -3892,12 +3894,12 @@ private module FlowExploration { cc instanceof CallContextAny and sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and not fullBarrier(node, config) and exists(config.explorationLimit()) or partialPathNodeMk0(node, cc, sc1, sc2, ap, config) and - distSrc(getEnclosingCallable(node), config) <= config.explorationLimit() + distSrc(node.getEnclosingCallable(), config) <= config.explorationLimit() } or TPartialPathNodeRev( NodeEx node, TRevSummaryCtx1 sc1, TRevSummaryCtx2 sc2, RevPartialAccessPath ap, @@ -3914,7 +3916,7 @@ private module FlowExploration { revPartialPathStep(mid, node, sc1, sc2, ap, config) and not clearsContentCached(node.asNode(), ap.getHead()) and not fullBarrier(node, config) and - distSink(getEnclosingCallable(node), config) <= config.explorationLimit() + distSink(node.getEnclosingCallable(), config) <= config.explorationLimit() ) } @@ -3928,7 +3930,7 @@ private module FlowExploration { not fullBarrier(node, config) and not clearsContentCached(node.asNode(), ap.getHead().getContent()) and if node.asNode() instanceof CastingNode - then compatibleTypes(getDataFlowType(node), ap.getType()) + then compatibleTypes(node.getDataFlowType(), ap.getType()) else any() ) } @@ -3980,7 +3982,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSourceDistance() { - result = distSrc(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSrc(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } /** @@ -3988,7 +3990,7 @@ private module FlowExploration { * of interprocedural steps. */ int getSinkDistance() { - result = distSink(getEnclosingCallable(this.getNodeEx()), this.getConfiguration()) + result = distSink(this.getNodeEx().getEnclosingCallable(), this.getConfiguration()) } private string ppAp() { @@ -4105,7 +4107,7 @@ private module FlowExploration { sc1 = mid.getSummaryCtx1() and sc2 = mid.getSummaryCtx2() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() ) or @@ -4121,7 +4123,7 @@ private module FlowExploration { sc1 = TSummaryCtx1None() and sc2 = TSummaryCtx2None() and mid.getAp() instanceof PartialAccessPathNil and - ap = TPartialNil(getDataFlowType(node)) and + ap = TPartialNil(node.getDataFlowType()) and config = mid.getConfiguration() or partialPathStoreStep(mid, _, _, node, ap) and From 01fc3e6559232c0177d55cf9428ca917b803dcae Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 24 Jun 2021 14:29:34 +0200 Subject: [PATCH 1608/1662] C++/C#/Java/Python: Add change notes. --- cpp/change-notes/2021-06-24-dataflow-implicit-reads.md | 2 ++ csharp/change-notes/2021-06-24-dataflow-implicit-reads.md | 2 ++ java/change-notes/2021-06-24-dataflow-implicit-reads.md | 2 ++ python/change-notes/2021-06-24-dataflow-implicit-reads.md | 2 ++ 4 files changed, 8 insertions(+) create mode 100644 cpp/change-notes/2021-06-24-dataflow-implicit-reads.md create mode 100644 csharp/change-notes/2021-06-24-dataflow-implicit-reads.md create mode 100644 java/change-notes/2021-06-24-dataflow-implicit-reads.md create mode 100644 python/change-notes/2021-06-24-dataflow-implicit-reads.md diff --git a/cpp/change-notes/2021-06-24-dataflow-implicit-reads.md b/cpp/change-notes/2021-06-24-dataflow-implicit-reads.md new file mode 100644 index 000000000000..c96152ed05b3 --- /dev/null +++ b/cpp/change-notes/2021-06-24-dataflow-implicit-reads.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The DataFlow libraries have been augmented with support for `Configuration`-specific in-place read steps at, for example, sinks and custom taint steps. This means that it is now possible to specify sinks that accept flow with non-empty access paths. diff --git a/csharp/change-notes/2021-06-24-dataflow-implicit-reads.md b/csharp/change-notes/2021-06-24-dataflow-implicit-reads.md new file mode 100644 index 000000000000..c96152ed05b3 --- /dev/null +++ b/csharp/change-notes/2021-06-24-dataflow-implicit-reads.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The DataFlow libraries have been augmented with support for `Configuration`-specific in-place read steps at, for example, sinks and custom taint steps. This means that it is now possible to specify sinks that accept flow with non-empty access paths. diff --git a/java/change-notes/2021-06-24-dataflow-implicit-reads.md b/java/change-notes/2021-06-24-dataflow-implicit-reads.md new file mode 100644 index 000000000000..c96152ed05b3 --- /dev/null +++ b/java/change-notes/2021-06-24-dataflow-implicit-reads.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The DataFlow libraries have been augmented with support for `Configuration`-specific in-place read steps at, for example, sinks and custom taint steps. This means that it is now possible to specify sinks that accept flow with non-empty access paths. diff --git a/python/change-notes/2021-06-24-dataflow-implicit-reads.md b/python/change-notes/2021-06-24-dataflow-implicit-reads.md new file mode 100644 index 000000000000..c96152ed05b3 --- /dev/null +++ b/python/change-notes/2021-06-24-dataflow-implicit-reads.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* The DataFlow libraries have been augmented with support for `Configuration`-specific in-place read steps at, for example, sinks and custom taint steps. This means that it is now possible to specify sinks that accept flow with non-empty access paths. From 7a9f9e245fb5dcb2c74cab784a4fda84fa9a2525 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Thu, 24 Jun 2021 15:15:25 +0200 Subject: [PATCH 1609/1662] C#: Handle CSV data-flow summaries with `out`/`ref` parameters --- .../code/csharp/dataflow/FlowSummary.qll | 28 - .../csharp/dataflow/LibraryTypeDataFlow.qll | 2 +- .../dataflow/internal/DataFlowPrivate.qll | 26 +- .../dataflow/external-models/ExternalFlow.cs | 9 + .../external-models/ExternalFlow.expected | 20 +- .../dataflow/external-models/ExternalFlow.ql | 3 +- .../dataflow/library/FlowSummaries.expected | 660 +++++++++--------- .../library-tests/frameworks/JsonNET/Json.cs | 2 +- .../frameworks/JsonNET/Json.expected | 1 + 9 files changed, 383 insertions(+), 368 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/FlowSummary.qll b/csharp/ql/src/semmle/code/csharp/dataflow/FlowSummary.qll index 374c42ed7e99..a20c38760501 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/FlowSummary.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/FlowSummary.qll @@ -35,22 +35,6 @@ module SummaryComponent { /** Gets a summary component that represents the return value of a call. */ SummaryComponent return() { result = return(any(NormalReturnKind rk)) } - /** - * Gets a summary component that represents the return value through the `i`th - * `out` argument of a call. - */ - SummaryComponent outArgument(int i) { - result = return(any(OutReturnKind rk | rk.getPosition() = i)) - } - - /** - * Gets a summary component that represents the return value through the `i`th - * `ref` argument of a call. - */ - SummaryComponent refArgument(int i) { - result = return(any(RefReturnKind rk | rk.getPosition() = i)) - } - /** Gets a summary component that represents a jump to `c`. */ SummaryComponent jump(Callable c) { result = @@ -88,18 +72,6 @@ module SummaryComponentStack { /** Gets a singleton stack representing the return value of a call. */ SummaryComponentStack return() { result = singleton(SummaryComponent::return()) } - /** - * Gets a singleton stack representing the return value through the `i`th - * `out` argument of a call. - */ - SummaryComponentStack outArgument(int i) { result = singleton(SummaryComponent::outArgument(i)) } - - /** - * Gets a singleton stack representing the return value through the `i`th - * `ref` argument of a call. - */ - SummaryComponentStack refArgument(int i) { result = singleton(SummaryComponent::refArgument(i)) } - /** Gets a singleton stack representing a jump to `c`. */ SummaryComponentStack jump(Callable c) { result = singleton(SummaryComponent::jump(c)) } } diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll b/csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll index a7c6869a4ccc..21a6d0b8ef86 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll @@ -383,7 +383,7 @@ private module FrameworkDataFlowAdaptor { or exists(int i | result = TCallableFlowSinkArg(i) and - output = SummaryComponentStack::outArgument(i) + output = SummaryComponentStack::argument(i) ) or exists(int i, int j | result = TCallableFlowSinkDelegateArg(i, j) | diff --git a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll index 6373382a204d..ca4d0fa98e7f 100644 --- a/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll +++ b/csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll @@ -1258,12 +1258,33 @@ private module ReturnNodes { SummaryReturnNode() { FlowSummaryImpl::Private::summaryReturnNode(this, rk) and not rk instanceof JumpReturnKind + or + exists(Parameter p, int pos | + summaryPostUpdateNodeIsOutOrRef(this, p) and + pos = p.getPosition() + | + p.isOut() and rk.(OutReturnKind).getPosition() = pos + or + p.isRef() and rk.(RefReturnKind).getPosition() = pos + ) } override ReturnKind getKind() { result = rk } } } +/** + * Holds if summary node `n` is a post-update node for `out`/`ref` parameter `p`. + * In this case we adjust it to instead be a return node. + */ +private predicate summaryPostUpdateNodeIsOutOrRef(SummaryNode n, Parameter p) { + exists(ParameterNode pn | + FlowSummaryImpl::Private::summaryPostUpdateNode(n, pn) and + pn.getParameter() = p and + p.isOutOrRef() + ) +} + import ReturnNodes /** A data-flow node that represents the output of a call. */ @@ -1841,7 +1862,10 @@ private module PostUpdateNodes { } private class SummaryPostUpdateNode extends SummaryNode, PostUpdateNode { - SummaryPostUpdateNode() { FlowSummaryImpl::Private::summaryPostUpdateNode(this, _) } + SummaryPostUpdateNode() { + FlowSummaryImpl::Private::summaryPostUpdateNode(this, _) and + not summaryPostUpdateNodeIsOutOrRef(this, _) + } override Node getPreUpdateNode() { FlowSummaryImpl::Private::summaryPostUpdateNode(this, result) diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs index b446e26f9fc0..3b8a9ba7c7fe 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.cs @@ -85,6 +85,13 @@ void M13() Sink(objs2[0]); } + void M14() + { + var s = new string(""); + Parse(s, out var i); + Sink(i); + } + object StepArgRes(object x) { return null; } void StepArgArg(object @in, object @out) { } @@ -115,6 +122,8 @@ void StepQualArg(object @out) { } static S[] Map(S[] elements, Func f) => throw null; + static void Parse(string s, out int i) => throw null; + static void Sink(object o) { } } } \ No newline at end of file diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected index c64c8c8110f6..25abf57f9ab1 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.expected @@ -24,12 +24,12 @@ edges | ExternalFlow.cs:54:36:54:47 | object creation of type Object : Object | ExternalFlow.cs:54:13:54:16 | [post] this access [element] : Object | | ExternalFlow.cs:55:18:55:21 | this access [element] : Object | ExternalFlow.cs:55:18:55:41 | call to method StepElementGetter | | ExternalFlow.cs:60:35:60:35 | o : Object | ExternalFlow.cs:60:47:60:47 | access to parameter o | -| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:114:46:114:46 | s : Object | +| ExternalFlow.cs:60:64:60:75 | object creation of type Object : Object | ExternalFlow.cs:121:46:121:46 | s : Object | | ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | ExternalFlow.cs:66:18:66:18 | access to local variable o | | ExternalFlow.cs:65:45:65:56 | object creation of type Object : Object | ExternalFlow.cs:65:21:65:60 | call to method Apply : Object | | ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | | ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | ExternalFlow.cs:71:30:71:45 | { ..., ... } [element] : Object | -| ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | ExternalFlow.cs:116:34:116:41 | elements [element] : Object | +| ExternalFlow.cs:72:17:72:20 | access to local variable objs [element] : Object | ExternalFlow.cs:123:34:123:41 | elements [element] : Object | | ExternalFlow.cs:72:23:72:23 | o : Object | ExternalFlow.cs:72:35:72:35 | access to parameter o | | ExternalFlow.cs:77:24:77:58 | call to method Map [element] : Object | ExternalFlow.cs:78:18:78:21 | access to local variable objs [element] : Object | | ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | ExternalFlow.cs:77:24:77:58 | call to method Map [element] : Object | @@ -40,8 +40,11 @@ edges | ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | | ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | ExternalFlow.cs:84:25:84:41 | call to method Map [element] : Object | | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | ExternalFlow.cs:85:18:85:25 | access to array element | -| ExternalFlow.cs:114:46:114:46 | s : Object | ExternalFlow.cs:60:35:60:35 | o : Object | -| ExternalFlow.cs:116:34:116:41 | elements [element] : Object | ExternalFlow.cs:72:23:72:23 | o : Object | +| ExternalFlow.cs:90:21:90:34 | object creation of type String : String | ExternalFlow.cs:91:19:91:19 | access to local variable s : String | +| ExternalFlow.cs:91:19:91:19 | access to local variable s : String | ExternalFlow.cs:91:30:91:30 | SSA def(i) : Int32 | +| ExternalFlow.cs:91:30:91:30 | SSA def(i) : Int32 | ExternalFlow.cs:92:18:92:18 | (...) ... | +| ExternalFlow.cs:121:46:121:46 | s : Object | ExternalFlow.cs:60:35:60:35 | o : Object | +| ExternalFlow.cs:123:34:123:41 | elements [element] : Object | ExternalFlow.cs:72:23:72:23 | o : Object | nodes | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | semmle.label | object creation of type Object : Object | | ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | semmle.label | call to method StepArgRes | @@ -97,8 +100,12 @@ nodes | ExternalFlow.cs:84:29:84:32 | access to local variable objs [element] : Object | semmle.label | access to local variable objs [element] : Object | | ExternalFlow.cs:85:18:85:22 | access to local variable objs2 [element] : Object | semmle.label | access to local variable objs2 [element] : Object | | ExternalFlow.cs:85:18:85:25 | access to array element | semmle.label | access to array element | -| ExternalFlow.cs:114:46:114:46 | s : Object | semmle.label | s : Object | -| ExternalFlow.cs:116:34:116:41 | elements [element] : Object | semmle.label | elements [element] : Object | +| ExternalFlow.cs:90:21:90:34 | object creation of type String : String | semmle.label | object creation of type String : String | +| ExternalFlow.cs:91:19:91:19 | access to local variable s : String | semmle.label | access to local variable s : String | +| ExternalFlow.cs:91:30:91:30 | SSA def(i) : Int32 | semmle.label | SSA def(i) : Int32 | +| ExternalFlow.cs:92:18:92:18 | (...) ... | semmle.label | (...) ... | +| ExternalFlow.cs:121:46:121:46 | s : Object | semmle.label | s : Object | +| ExternalFlow.cs:123:34:123:41 | elements [element] : Object | semmle.label | elements [element] : Object | invalidModelRow #select | ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | ExternalFlow.cs:10:18:10:33 | call to method StepArgRes | $@ | ExternalFlow.cs:9:27:9:38 | object creation of type Object : Object | object creation of type Object : Object | @@ -115,3 +122,4 @@ invalidModelRow | ExternalFlow.cs:72:35:72:35 | access to parameter o | ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | ExternalFlow.cs:72:35:72:35 | access to parameter o | $@ | ExternalFlow.cs:71:32:71:43 | object creation of type Object : Object | object creation of type Object : Object | | ExternalFlow.cs:78:18:78:24 | (...) ... | ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | ExternalFlow.cs:78:18:78:24 | (...) ... | $@ | ExternalFlow.cs:77:46:77:57 | object creation of type Object : Object | object creation of type Object : Object | | ExternalFlow.cs:85:18:85:25 | access to array element | ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | ExternalFlow.cs:85:18:85:25 | access to array element | $@ | ExternalFlow.cs:83:32:83:43 | object creation of type Object : Object | object creation of type Object : Object | +| ExternalFlow.cs:92:18:92:18 | (...) ... | ExternalFlow.cs:90:21:90:34 | object creation of type String : String | ExternalFlow.cs:92:18:92:18 | (...) ... | $@ | ExternalFlow.cs:90:21:90:34 | object creation of type String : String | object creation of type String : String | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql index 07de4a28b8c3..ce402e14a172 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/ExternalFlow.ql @@ -24,7 +24,8 @@ class SummaryModelTest extends SummaryModelCsv { "My.Qltest;D;false;Apply;(System.Func,S);;Argument[1];Parameter[0] of Argument[0];value", "My.Qltest;D;false;Apply;(System.Func,S);;ReturnValue of Argument[0];ReturnValue;value", "My.Qltest;D;false;Map;(S[],System.Func);;Element of Argument[0];Parameter[0] of Argument[1];value", - "My.Qltest;D;false;Map;(S[],System.Func);;ReturnValue of Argument[1];Element of ReturnValue;value" + "My.Qltest;D;false;Map;(S[],System.Func);;ReturnValue of Argument[1];Element of ReturnValue;value", + "My.Qltest;D;false;Parse;(System.String,System.Int32);;Argument[0];Argument[1];taint" ] } } diff --git a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected index 72d303b64eed..e14d836eca90 100644 --- a/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected +++ b/csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected @@ -2,8 +2,8 @@ | System.Array.Add(object) | argument 0 -> element of argument -1 | true | | System.Array.AsReadOnly(T[]) | element of argument 0 -> element of return (normal) | true | | System.Array.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Array.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Array.CopyTo(Array, long) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Array.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Array.CopyTo(Array, long) | element of argument -1 -> element of argument 0 | true | | System.Array.Find(T[], Predicate) | element of argument 0 -> parameter 0 of argument 1 | true | | System.Array.Find(T[], Predicate) | element of argument 0 -> return (normal) | true | | System.Array.FindAll(T[], Predicate) | element of argument 0 -> parameter 0 of argument 1 | true | @@ -19,12 +19,12 @@ | System.Array.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Array.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Boolean.Parse(string) | argument 0 -> return (normal) | false | +| System.Boolean.TryParse(string, out bool) | argument 0 -> argument 1 | false | | System.Boolean.TryParse(string, out bool) | argument 0 -> return (normal) | false | -| System.Boolean.TryParse(string, out bool) | argument 0 -> return (out parameter 1) | false | | System.Collections.ArrayList+FixedSizeArrayList.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+FixedSizeArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+FixedSizeArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList+FixedSizeArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+FixedSizeArrayList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+FixedSizeArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+FixedSizeArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+FixedSizeArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | @@ -34,7 +34,7 @@ | System.Collections.ArrayList+FixedSizeArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ArrayList+FixedSizeArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+FixedSizeList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList+FixedSizeList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+FixedSizeList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+FixedSizeList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+FixedSizeList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+FixedSizeList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -42,7 +42,7 @@ | System.Collections.ArrayList+IListWrapper.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+IListWrapper.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+IListWrapper.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList+IListWrapper.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+IListWrapper.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+IListWrapper.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+IListWrapper.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+IListWrapper.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | @@ -54,7 +54,7 @@ | System.Collections.ArrayList+Range.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+Range.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+Range.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList+Range.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+Range.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+Range.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+Range.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+Range.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | @@ -66,7 +66,7 @@ | System.Collections.ArrayList+ReadOnlyArrayList.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+ReadOnlyArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+ReadOnlyArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList+ReadOnlyArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+ReadOnlyArrayList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+ReadOnlyArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+ReadOnlyArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+ReadOnlyArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | @@ -76,7 +76,7 @@ | System.Collections.ArrayList+ReadOnlyArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ArrayList+ReadOnlyArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+ReadOnlyList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList+ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+ReadOnlyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+ReadOnlyList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+ReadOnlyList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -84,7 +84,7 @@ | System.Collections.ArrayList+SyncArrayList.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+SyncArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList+SyncArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList+SyncArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+SyncArrayList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+SyncArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+SyncArrayList.GetEnumerator(int, int) | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+SyncArrayList.GetRange(int, int) | element of argument 0 -> element of return (normal) | true | @@ -94,7 +94,7 @@ | System.Collections.ArrayList+SyncArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ArrayList+SyncArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+SyncIList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ArrayList+SyncIList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList+SyncIList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList+SyncIList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ArrayList+SyncIList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ArrayList+SyncIList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -102,7 +102,7 @@ | System.Collections.ArrayList.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.ArrayList.AddRange(ICollection) | element of argument 0 -> element of argument -1 | true | | System.Collections.ArrayList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.ArrayList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ArrayList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ArrayList.FixedSize(ArrayList) | element of argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.FixedSize(IList) | element of argument 0 -> element of return (normal) | true | | System.Collections.ArrayList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -116,22 +116,22 @@ | System.Collections.ArrayList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.ArrayList.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.BitArray.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.BitArray.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.BitArray.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.BitArray.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.CollectionBase.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.CollectionBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.CollectionBase.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.CollectionBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.CollectionBase.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.CollectionBase.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.CollectionBase.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.Concurrent.BlockingCollection<>+d__68.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.BlockingCollection<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Concurrent.BlockingCollection<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.BlockingCollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.BlockingCollection<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Concurrent.BlockingCollection<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.BlockingCollection<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.ConcurrentBag<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Concurrent.ConcurrentBag<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.ConcurrentBag<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.ConcurrentBag<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Concurrent.ConcurrentBag<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.ConcurrentBag<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | @@ -146,8 +146,8 @@ | System.Collections.Concurrent.ConcurrentDictionary<,>.ConcurrentDictionary(IEnumerable>, IEqualityComparer) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.ConcurrentDictionary(int, IEnumerable>, IEqualityComparer) | property Key of element of argument 1 -> property Key of element of return (normal) | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.ConcurrentDictionary(int, IEnumerable>, IEqualityComparer) | property Value of element of argument 1 -> property Value of element of return (normal) | true | -| System.Collections.Concurrent.ConcurrentDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.ConcurrentDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.ConcurrentDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Concurrent.ConcurrentDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | @@ -157,14 +157,14 @@ | System.Collections.Concurrent.ConcurrentDictionary<,>.set_Item(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Concurrent.ConcurrentDictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Concurrent.ConcurrentQueue<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.ConcurrentQueue<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.ConcurrentQueue<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Concurrent.ConcurrentQueue<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.ConcurrentQueue<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.ConcurrentStack<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Concurrent.ConcurrentStack<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.ConcurrentStack<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Concurrent.ConcurrentStack<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.ConcurrentStack<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.ConcurrentStack<>.GetEnumerator(Node) | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Concurrent.IProducerConsumerCollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Concurrent.IProducerConsumerCollection<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Concurrent.OrderablePartitioner<>+EnumerableDropIndices.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.Partitioner+d__7.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Concurrent.Partitioner+d__10.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -173,7 +173,7 @@ | System.Collections.Concurrent.Partitioner+DynamicPartitionerForIList<>+InternalPartitionEnumerable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.DictionaryBase.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.DictionaryBase.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.DictionaryBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.DictionaryBase.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.DictionaryBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.DictionaryBase.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.DictionaryBase.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -182,7 +182,7 @@ | System.Collections.DictionaryBase.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.EmptyReadOnlyDictionaryInternal.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.EmptyReadOnlyDictionaryInternal.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.EmptyReadOnlyDictionaryInternal.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.EmptyReadOnlyDictionaryInternal.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.EmptyReadOnlyDictionaryInternal.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.EmptyReadOnlyDictionaryInternal.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.EmptyReadOnlyDictionaryInternal.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -190,12 +190,12 @@ | System.Collections.EmptyReadOnlyDictionaryInternal.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.EmptyReadOnlyDictionaryInternal.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.Dictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.Dictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.Dictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Dictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.Dictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.Dictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Dictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | @@ -204,8 +204,8 @@ | System.Collections.Generic.Dictionary<,>.Add(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Generic.Dictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Dictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Dictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.Dictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.Dictionary<,>.Dictionary(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.Dictionary<,>.Dictionary(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | | System.Collections.Generic.Dictionary<,>.Dictionary(IDictionary, IEqualityComparer) | property Key of element of argument 0 -> property Key of element of return (normal) | true | @@ -224,10 +224,10 @@ | System.Collections.Generic.Dictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.Dictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.HashSet<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.HashSet<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.HashSet<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.HashSet<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.ICollection<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.ICollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.ICollection<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.IDictionary<,>.Add(TKey, TValue) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.IDictionary<,>.Add(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.IDictionary<,>.get_Item(TKey) | property Value of element of argument -1 -> return (normal) | true | @@ -244,8 +244,8 @@ | System.Collections.Generic.KeyValuePair<,>.KeyValuePair(TKey, TValue) | argument 0 -> property Key of return (normal) | true | | System.Collections.Generic.KeyValuePair<,>.KeyValuePair(TKey, TValue) | argument 1 -> property Value of return (normal) | true | | System.Collections.Generic.LinkedList<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.LinkedList<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.LinkedList<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.LinkedList<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.LinkedList<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.LinkedList<>.Find(T) | element of argument -1 -> return (normal) | true | | System.Collections.Generic.LinkedList<>.FindLast(T) | element of argument -1 -> return (normal) | true | | System.Collections.Generic.LinkedList<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -253,8 +253,8 @@ | System.Collections.Generic.List<>.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.List<>.AddRange(IEnumerable) | element of argument 0 -> element of argument -1 | true | | System.Collections.Generic.List<>.AsReadOnly() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Generic.List<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.List<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.List<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.List<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.List<>.Find(Predicate) | element of argument -1 -> parameter 0 of argument 0 | true | | System.Collections.Generic.List<>.Find(Predicate) | element of argument -1 -> return (normal) | true | | System.Collections.Generic.List<>.FindAll(Predicate) | element of argument -1 -> parameter 0 of argument 0 | true | @@ -271,17 +271,17 @@ | System.Collections.Generic.List<>.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.Generic.List<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.List<>.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.Generic.Queue<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Queue<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Queue<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.Queue<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.Queue<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Queue<>.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedDictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedDictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedDictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | @@ -290,8 +290,8 @@ | System.Collections.Generic.SortedDictionary<,>.Add(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Generic.SortedDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedDictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Generic.SortedDictionary<,>.SortedDictionary(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -306,15 +306,15 @@ | System.Collections.Generic.SortedDictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedDictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedList<,>+KeyList.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedList<,>+KeyList.CopyTo(TKey[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedList<,>+KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedList<,>+KeyList.Insert(int, TKey) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>+KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedList<,>+KeyList.set_Item(int, TKey) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>+ValueList.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedList<,>+ValueList.CopyTo(TValue[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedList<,>+ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedList<,>+ValueList.Insert(int, TValue) | argument 1 -> element of argument -1 | true | | System.Collections.Generic.SortedList<,>+ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -326,8 +326,8 @@ | System.Collections.Generic.SortedList<,>.Add(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedList<,>.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Generic.SortedList<,>.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Generic.SortedList<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedList<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedList<,>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedList<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedList<,>.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Generic.SortedList<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedList<,>.SortedList(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | @@ -344,21 +344,21 @@ | System.Collections.Generic.SortedList<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Generic.SortedSet<>+d__84.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedSet<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Collections.Generic.SortedSet<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.SortedSet<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.SortedSet<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.SortedSet<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.SortedSet<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.SortedSet<>.Reverse() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Generic.Stack<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Generic.Stack<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Generic.Stack<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Generic.Stack<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Generic.Stack<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Generic.Stack<>.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Generic.Stack<>.Pop() | element of argument -1 -> return (normal) | true | -| System.Collections.Hashtable+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Hashtable+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable+SyncHashtable.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Hashtable+SyncHashtable.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Hashtable+SyncHashtable.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Hashtable+SyncHashtable.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+SyncHashtable.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Hashtable+SyncHashtable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable+SyncHashtable.SyncHashtable(Hashtable) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Hashtable+SyncHashtable.SyncHashtable(Hashtable) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -367,12 +367,12 @@ | System.Collections.Hashtable+SyncHashtable.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.Hashtable+SyncHashtable.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Hashtable+SyncHashtable.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Hashtable+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Hashtable+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Hashtable.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Hashtable.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Hashtable.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Hashtable.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Hashtable.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Hashtable.Hashtable(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Hashtable.Hashtable(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -391,7 +391,7 @@ | System.Collections.Hashtable.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.Hashtable.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Hashtable.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.ICollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ICollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.IDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.IDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.IDictionary.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | @@ -404,11 +404,11 @@ | System.Collections.IList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.IList.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Collections.IList.set_Item(int, object) | argument 1 -> element of argument -1 | true | -| System.Collections.ListDictionaryInternal+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ListDictionaryInternal+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ListDictionaryInternal+NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ListDictionaryInternal.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.ListDictionaryInternal.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.ListDictionaryInternal.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ListDictionaryInternal.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ListDictionaryInternal.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ListDictionaryInternal.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.ListDictionaryInternal.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -417,8 +417,8 @@ | System.Collections.ListDictionaryInternal.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.ObjectModel.Collection<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Collections.ObjectModel.Collection<>.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.Collection<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.Collection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.Collection<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.ObjectModel.Collection<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ObjectModel.Collection<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.Collection<>.Insert(int, T) | argument 1 -> element of argument -1 | true | | System.Collections.ObjectModel.Collection<>.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -428,8 +428,8 @@ | System.Collections.ObjectModel.KeyedCollection<,>.get_Item(TKey) | element of argument -1 -> return (normal) | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyCollection<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyCollection<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyCollection<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.ObjectModel.ReadOnlyCollection<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.Insert(int, T) | argument 1 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -437,12 +437,12 @@ | System.Collections.ObjectModel.ReadOnlyCollection<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyCollection<>.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.Add(TKey) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.CopyTo(TKey[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.Add(TValue) | argument 0 -> element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.CopyTo(TValue[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | @@ -451,8 +451,8 @@ | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(TKey, TValue) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.ObjectModel.ReadOnlyDictionary<,>.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.ReadOnlyDictionary(IDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.ReadOnlyDictionary(IDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -465,17 +465,17 @@ | System.Collections.ObjectModel.ReadOnlyDictionary<,>.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.ObjectModel.ReadOnlyDictionary<,>.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Queue+SynchronizedQueue.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Queue+SynchronizedQueue.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Queue+SynchronizedQueue.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Queue+SynchronizedQueue.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Queue+SynchronizedQueue.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Queue.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Queue.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Queue.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Queue.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Queue.Peek() | element of argument -1 -> return (normal) | true | -| System.Collections.ReadOnlyCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.ReadOnlyCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.ReadOnlyCollectionBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.SortedList+KeyList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.SortedList+KeyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+KeyList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.SortedList+KeyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.SortedList+KeyList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.SortedList+KeyList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -483,7 +483,7 @@ | System.Collections.SortedList+SyncSortedList.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.SortedList+SyncSortedList.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.SortedList+SyncSortedList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.SortedList+SyncSortedList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+SyncSortedList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.SortedList+SyncSortedList.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.SortedList+SyncSortedList.GetValueList() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.SortedList+SyncSortedList.SyncSortedList(SortedList) | property Key of element of argument 0 -> property Key of element of return (normal) | true | @@ -492,7 +492,7 @@ | System.Collections.SortedList+SyncSortedList.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.SortedList+SyncSortedList.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.SortedList+ValueList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.SortedList+ValueList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList+ValueList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.SortedList+ValueList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.SortedList+ValueList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.SortedList+ValueList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -500,7 +500,7 @@ | System.Collections.SortedList.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.SortedList.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.SortedList.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.SortedList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.SortedList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.SortedList.GetByIndex(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.SortedList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.SortedList.GetValueList() | property Value of element of argument -1 -> element of return (normal) | true | @@ -515,7 +515,7 @@ | System.Collections.SortedList.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Specialized.HybridDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.HybridDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Specialized.HybridDictionary.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.HybridDictionary.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.HybridDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.HybridDictionary.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.HybridDictionary.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -525,29 +525,29 @@ | System.Collections.Specialized.IOrderedDictionary.get_Item(int) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.IOrderedDictionary.set_Item(int, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.IOrderedDictionary.set_Item(int, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Specialized.ListDictionary+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.ListDictionary+NodeKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.ListDictionary+NodeKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.ListDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.ListDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Specialized.ListDictionary.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.ListDictionary.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.ListDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Item(object) | property Value of element of argument -1 -> return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | | System.Collections.Specialized.ListDictionary.get_Values() | property Value of element of argument -1 -> element of return (normal) | true | | System.Collections.Specialized.ListDictionary.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.ListDictionary.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Collections.Specialized.NameObjectCollectionBase+KeysCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.NameObjectCollectionBase+KeysCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.NameObjectCollectionBase+KeysCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Collections.Specialized.NameObjectCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.NameObjectCollectionBase.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.NameObjectCollectionBase.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.NameValueCollection.Add(NameValueCollection) | argument 0 -> element of argument -1 | true | -| System.Collections.Specialized.NameValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Specialized.OrderedDictionary+OrderedDictionaryKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.NameValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Specialized.OrderedDictionary+OrderedDictionaryKeyValueCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.OrderedDictionary+OrderedDictionaryKeyValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.OrderedDictionary.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Specialized.OrderedDictionary.AsReadOnly() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Specialized.OrderedDictionary.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.OrderedDictionary.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.OrderedDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.OrderedDictionary(OrderedDictionary) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Collections.Specialized.OrderedDictionary.OrderedDictionary(OrderedDictionary) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -560,7 +560,7 @@ | System.Collections.Specialized.OrderedDictionary.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.Collections.Specialized.OrderedDictionary.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | | System.Collections.Specialized.ReadOnlyList.Add(object) | argument 0 -> element of argument -1 | true | -| System.Collections.Specialized.ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.ReadOnlyList.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.ReadOnlyList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.ReadOnlyList.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.Specialized.ReadOnlyList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -568,8 +568,8 @@ | System.Collections.Specialized.StringCollection.Add(object) | argument 0 -> element of argument -1 | true | | System.Collections.Specialized.StringCollection.Add(string) | argument 0 -> element of argument -1 | true | | System.Collections.Specialized.StringCollection.AddRange(String[]) | element of argument 0 -> element of argument -1 | true | -| System.Collections.Specialized.StringCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Collections.Specialized.StringCollection.CopyTo(String[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Specialized.StringCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Collections.Specialized.StringCollection.CopyTo(String[], int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Specialized.StringCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Specialized.StringCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.Collections.Specialized.StringCollection.Insert(int, string) | argument 1 -> element of argument -1 | true | @@ -578,22 +578,22 @@ | System.Collections.Specialized.StringCollection.set_Item(int, string) | argument 1 -> element of argument -1 | true | | System.Collections.Specialized.StringDictionary.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Stack+SyncStack.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Stack+SyncStack.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Stack+SyncStack.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Stack+SyncStack.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Stack+SyncStack.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Stack+SyncStack.Pop() | element of argument -1 -> return (normal) | true | | System.Collections.Stack.Clone() | element of argument 0 -> element of return (normal) | true | -| System.Collections.Stack.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Collections.Stack.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Collections.Stack.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Collections.Stack.Peek() | element of argument -1 -> return (normal) | true | | System.Collections.Stack.Pop() | element of argument -1 -> return (normal) | true | -| System.ComponentModel.AttributeCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.AttributeCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.AttributeCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.BindingList<>.Find(PropertyDescriptor, object) | element of argument -1 -> return (normal) | true | -| System.ComponentModel.Design.DesignerCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.Design.DesignerCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.Design.DesignerCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -602,13 +602,13 @@ | System.ComponentModel.Design.DesignerVerbCollection.Add(DesignerVerb) | argument 0 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.AddRange(DesignerVerbCollection) | element of argument 0 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.AddRange(DesignerVerb[]) | element of argument 0 -> element of argument -1 | true | -| System.ComponentModel.Design.DesignerVerbCollection.CopyTo(DesignerVerb[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.Design.DesignerVerbCollection.CopyTo(DesignerVerb[], int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.Design.DesignerVerbCollection.Insert(int, DesignerVerb) | argument 1 -> element of argument -1 | true | | System.ComponentModel.Design.DesignerVerbCollection.get_Item(int) | element of argument -1 -> return (normal) | true | | System.ComponentModel.Design.DesignerVerbCollection.set_Item(int, DesignerVerb) | argument 1 -> element of argument -1 | true | | System.ComponentModel.EventDescriptorCollection.Add(EventDescriptor) | argument 0 -> element of argument -1 | true | | System.ComponentModel.EventDescriptorCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.ComponentModel.EventDescriptorCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.EventDescriptorCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.EventDescriptorCollection.Find(string, bool) | element of argument -1 -> return (normal) | true | | System.ComponentModel.EventDescriptorCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.EventDescriptorCollection.Insert(int, EventDescriptor) | argument 1 -> element of argument -1 | true | @@ -618,7 +618,7 @@ | System.ComponentModel.EventDescriptorCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.IBindingList.Find(PropertyDescriptor, object) | element of argument -1 -> return (normal) | true | | System.ComponentModel.ListSortDescriptionCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.ComponentModel.ListSortDescriptionCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.ListSortDescriptionCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.ListSortDescriptionCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.ListSortDescriptionCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.ListSortDescriptionCollection.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -632,7 +632,7 @@ | System.ComponentModel.PropertyDescriptorCollection.Add(object) | property Value of argument 0 -> property Value of element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.Add(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.Add(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.ComponentModel.PropertyDescriptorCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.PropertyDescriptorCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.PropertyDescriptorCollection.Find(string, bool) | element of argument -1 -> return (normal) | true | | System.ComponentModel.PropertyDescriptorCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.ComponentModel.PropertyDescriptorCollection.Insert(int, PropertyDescriptor) | argument 1 -> element of argument -1 | true | @@ -659,9 +659,9 @@ | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 0 -> property Key of element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 1 -> element of argument -1 | true | | System.ComponentModel.PropertyDescriptorCollection.set_Item(object, object) | argument 1 -> property Value of element of argument -1 | true | -| System.ComponentModel.TypeConverter+StandardValuesCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.ComponentModel.TypeConverter+StandardValuesCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.ComponentModel.TypeConverter+StandardValuesCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.ConsolePal+UnixConsoleStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.ConsolePal+UnixConsoleStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.ConsolePal+UnixConsoleStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Convert.ChangeType(object, Type) | argument 0 -> return (normal) | false | | System.Convert.ChangeType(object, Type, IFormatProvider) | argument 0 -> return (normal) | false | @@ -1008,7 +1008,7 @@ | System.Diagnostics.Tracing.EventPayload.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | | System.Diagnostics.Tracing.EventPayload.Add(string, object) | argument 0 -> property Key of element of argument -1 | true | | System.Diagnostics.Tracing.EventPayload.Add(string, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Diagnostics.Tracing.EventPayload.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Diagnostics.Tracing.EventPayload.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Diagnostics.Tracing.EventPayload.EventPayload(List, List) | property Key of element of argument 0 -> property Key of element of return (normal) | true | | System.Diagnostics.Tracing.EventPayload.EventPayload(List, List) | property Key of element of argument 1 -> property Key of element of return (normal) | true | | System.Diagnostics.Tracing.EventPayload.EventPayload(List, List) | property Value of element of argument 0 -> property Value of element of return (normal) | true | @@ -1022,18 +1022,18 @@ | System.Diagnostics.Tracing.IncrementingCounterPayload+d__39.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Diagnostics.Tracing.IncrementingCounterPayload.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject+KeyCollection.Add(string) | argument 0 -> element of argument -1 | true | -| System.Dynamic.ExpandoObject+KeyCollection.CopyTo(String[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.ExpandoObject+KeyCollection.CopyTo(String[], int) | element of argument -1 -> element of argument 0 | true | | System.Dynamic.ExpandoObject+KeyCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject+MetaExpando+d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject+ValueCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.Dynamic.ExpandoObject+ValueCollection.CopyTo(Object[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.ExpandoObject+ValueCollection.CopyTo(Object[], int) | element of argument -1 -> element of argument 0 | true | | System.Dynamic.ExpandoObject+ValueCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | argument 0 -> element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | property Key of argument 0 -> property Key of element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(KeyValuePair) | property Value of argument 0 -> property Value of element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(string, object) | argument 0 -> property Key of element of argument -1 | true | | System.Dynamic.ExpandoObject.Add(string, object) | argument 1 -> property Value of element of argument -1 | true | -| System.Dynamic.ExpandoObject.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.ExpandoObject.CopyTo(KeyValuePair[], int) | element of argument -1 -> element of argument 0 | true | | System.Dynamic.ExpandoObject.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.ExpandoObject.get_Item(string) | property Value of element of argument -1 -> return (normal) | true | | System.Dynamic.ExpandoObject.get_Keys() | property Key of element of argument -1 -> element of return (normal) | true | @@ -1041,32 +1041,32 @@ | System.Dynamic.ExpandoObject.set_Item(string, object) | argument 0 -> property Key of element of argument -1 | true | | System.Dynamic.ExpandoObject.set_Item(string, object) | argument 1 -> property Value of element of argument -1 | true | | System.Dynamic.Utils.ListProvider<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Dynamic.Utils.ListProvider<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Dynamic.Utils.ListProvider<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Dynamic.Utils.ListProvider<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Dynamic.Utils.ListProvider<>.Insert(int, T) | argument 1 -> element of argument -1 | true | | System.Dynamic.Utils.ListProvider<>.get_Item(int) | element of argument -1 -> return (normal) | true | | System.Dynamic.Utils.ListProvider<>.set_Item(int, T) | argument 1 -> element of argument -1 | true | -| System.IO.BufferedStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.BufferedStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.BufferedStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.BufferedStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.BufferedStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.BufferedStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.BufferedStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.BufferedStream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.BufferedStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.BufferedStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.BufferedStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.BufferedStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.BufferedStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Compression.CheckSumAndSizeWriteStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.CheckSumAndSizeWriteStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.CheckSumAndSizeWriteStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.DeflateManagedStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateManagedStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateManagedStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateManagedStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | +| System.IO.Compression.DeflateManagedStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Compression.DeflateManagedStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Compression.DeflateManagedStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.DeflateStream+CopyToStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateStream+CopyToStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.DeflateStream+CopyToStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Compression.DeflateStream+CopyToStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Compression.DeflateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Compression.DeflateStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Compression.DeflateStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateStream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.Compression.DeflateStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel, bool) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionLevel, bool, int) | argument 0 -> return (normal) | false | @@ -1074,44 +1074,44 @@ | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionMode, bool) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionMode, bool, int, long) | argument 0 -> return (normal) | false | | System.IO.Compression.DeflateStream.DeflateStream(Stream, CompressionMode, long) | argument 0 -> return (normal) | false | -| System.IO.Compression.DeflateStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.DeflateStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.DeflateStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Compression.DeflateStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Compression.DeflateStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Compression.DeflateStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Compression.GZipStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.GZipStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Compression.GZipStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Compression.GZipStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.GZipStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.GZipStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Compression.GZipStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.GZipStream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.Compression.GZipStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.Compression.GZipStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Compression.GZipStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Compression.GZipStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Compression.GZipStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Compression.PositionPreservingWriteOnlyStreamWrapper.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Compression.SubReadStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.SubReadStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.SubReadStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.WrappedStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.WrappedStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.WrappedStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Compression.ZipArchiveEntry+DirectToArchiveWriterStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Compression.ZipArchiveEntry+DirectToArchiveWriterStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Compression.ZipArchiveEntry+DirectToArchiveWriterStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.FileStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.FileStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.FileStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.FileStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.FileStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.FileStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.FileStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.FileStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.FileStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.FileStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.FileStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.MemoryStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.MemoryStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.MemoryStream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.MemoryStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.MemoryStream.MemoryStream(Byte[]) | argument 0 -> return (normal) | false | | System.IO.MemoryStream.MemoryStream(Byte[], bool) | argument 0 -> return (normal) | false | | System.IO.MemoryStream.MemoryStream(Byte[], int, int) | argument 0 -> return (normal) | false | | System.IO.MemoryStream.MemoryStream(Byte[], int, int, bool) | argument 0 -> return (normal) | false | | System.IO.MemoryStream.MemoryStream(Byte[], int, int, bool, bool) | argument 0 -> return (normal) | false | -| System.IO.MemoryStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.MemoryStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.MemoryStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.MemoryStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.MemoryStream.ToArray() | argument -1 -> return (normal) | false | | System.IO.MemoryStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.MemoryStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | @@ -1140,42 +1140,42 @@ | System.IO.Path.GetPathRoot(string) | argument 0 -> return (normal) | false | | System.IO.Path.GetRelativePath(string, string) | argument 1 -> return (normal) | false | | System.IO.Path.GetRelativePath(string, string, StringComparison) | argument 1 -> return (normal) | false | -| System.IO.Pipes.PipeStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Pipes.PipeStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Pipes.PipeStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Pipes.PipeStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Pipes.PipeStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Pipes.PipeStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Pipes.PipeStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Pipes.PipeStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Pipes.PipeStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Stream+NullStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Stream+NullStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Stream+NullStream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream+NullStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream+NullStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream+NullStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+NullStream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.Stream+NullStream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.Stream+NullStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Stream+NullStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Stream+NullStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream+NullStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.Stream+SyncStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+SyncStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Stream+SyncStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Stream+SyncStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream+SyncStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Stream+SyncStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Stream.BeginEndReadAsync(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream.BeginEndReadAsync(Byte[], int, int) | argument -1 -> argument 0 | false | | System.IO.Stream.BeginEndWriteAsync(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.IO.Stream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.BeginReadInternal(Byte[], int, int, AsyncCallback, object, bool, bool) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | +| System.IO.Stream.BeginReadInternal(Byte[], int, int, AsyncCallback, object, bool, bool) | argument -1 -> argument 0 | false | | System.IO.Stream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | | System.IO.Stream.BeginWriteInternal(Byte[], int, int, AsyncCallback, object, bool, bool) | argument 0 -> argument -1 | false | -| System.IO.Stream.BlockingBeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream.BlockingBeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.IO.Stream.BlockingBeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.IO.Stream.CopyTo(Stream) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyTo(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyToAsync(Stream) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyToAsync(Stream, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyToAsync(Stream, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.CopyToAsyncInternal(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.ReadAsync(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.Stream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.Stream.CopyTo(Stream) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyTo(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyToAsync(Stream) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyToAsync(Stream, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyToAsync(Stream, int) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.Stream.CopyToAsyncInternal(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.Stream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Stream.ReadAsync(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.Stream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.Stream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.WriteAsync(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.Stream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | @@ -1207,13 +1207,13 @@ | System.IO.TextReader.ReadLineAsync() | argument -1 -> return (normal) | false | | System.IO.TextReader.ReadToEnd() | argument -1 -> return (normal) | false | | System.IO.TextReader.ReadToEndAsync() | argument -1 -> return (normal) | false | -| System.IO.UnmanagedMemoryStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.UnmanagedMemoryStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.UnmanagedMemoryStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.UnmanagedMemoryStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.UnmanagedMemoryStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.UnmanagedMemoryStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.IO.UnmanagedMemoryStreamWrapper.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | -| System.IO.UnmanagedMemoryStreamWrapper.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.IO.UnmanagedMemoryStreamWrapper.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.IO.UnmanagedMemoryStreamWrapper.CopyToAsync(Stream, int, CancellationToken) | argument -1 -> argument 0 | false | +| System.IO.UnmanagedMemoryStreamWrapper.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.IO.UnmanagedMemoryStreamWrapper.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.IO.UnmanagedMemoryStreamWrapper.ToArray() | argument -1 -> return (normal) | false | | System.IO.UnmanagedMemoryStreamWrapper.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.IO.UnmanagedMemoryStreamWrapper.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | @@ -1221,10 +1221,10 @@ | System.Int32.Parse(string, IFormatProvider) | argument 0 -> return (normal) | false | | System.Int32.Parse(string, NumberStyles) | argument 0 -> return (normal) | false | | System.Int32.Parse(string, NumberStyles, IFormatProvider) | argument 0 -> return (normal) | false | +| System.Int32.TryParse(string, NumberStyles, IFormatProvider, out int) | argument 0 -> argument 3 | false | | System.Int32.TryParse(string, NumberStyles, IFormatProvider, out int) | argument 0 -> return (normal) | false | -| System.Int32.TryParse(string, NumberStyles, IFormatProvider, out int) | argument 0 -> return (out parameter 3) | false | +| System.Int32.TryParse(string, out int) | argument 0 -> argument 1 | false | | System.Int32.TryParse(string, out int) | argument 0 -> return (normal) | false | -| System.Int32.TryParse(string, out int) | argument 0 -> return (out parameter 1) | false | | System.Lazy<>.Lazy(Func) | return (normal) of argument 0 -> property Value of return (normal) | true | | System.Lazy<>.Lazy(Func, LazyThreadSafetyMode) | return (normal) of argument 0 -> property Value of return (normal) | true | | System.Lazy<>.Lazy(Func, LazyThreadSafetyMode, bool) | return (normal) of argument 0 -> property Value of return (normal) | true | @@ -1465,7 +1465,7 @@ | System.Linq.Enumerable.Zip(IEnumerable, IEnumerable, Func) | return (normal) of argument 2 -> element of return (normal) | true | | System.Linq.EnumerableQuery<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Expressions.BlockExpressionList.Add(Expression) | argument 0 -> element of argument -1 | true | -| System.Linq.Expressions.BlockExpressionList.CopyTo(Expression[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Linq.Expressions.BlockExpressionList.CopyTo(Expression[], int) | element of argument -1 -> element of argument 0 | true | | System.Linq.Expressions.BlockExpressionList.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Expressions.BlockExpressionList.Insert(int, Expression) | argument 1 -> element of argument -1 | true | | System.Linq.Expressions.BlockExpressionList.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -1478,7 +1478,7 @@ | System.Linq.GroupedResultEnumerable<,,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.GroupedResultEnumerable<,,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Grouping<,>.Add(TElement) | argument 0 -> element of argument -1 | true | -| System.Linq.Grouping<,>.CopyTo(TElement[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Linq.Grouping<,>.CopyTo(TElement[], int) | element of argument -1 -> element of argument 0 | true | | System.Linq.Grouping<,>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Grouping<,>.Insert(int, TElement) | argument 1 -> element of argument -1 | true | | System.Linq.Grouping<,>.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -1502,7 +1502,7 @@ | System.Linq.Parallel.ParallelEnumerableWrapper.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.PartitionerQueryOperator<>+d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.QueryResults<>.Add(T) | argument 0 -> element of argument -1 | true | -| System.Linq.Parallel.QueryResults<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Linq.Parallel.QueryResults<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Linq.Parallel.QueryResults<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Linq.Parallel.QueryResults<>.Insert(int, T) | argument 1 -> element of argument -1 | true | | System.Linq.Parallel.QueryResults<>.get_Item(int) | element of argument -1 -> return (normal) | true | @@ -1932,36 +1932,36 @@ | System.Net.Cookie.get_Value() | argument -1 -> return (normal) | false | | System.Net.CookieCollection.Add(Cookie) | argument 0 -> element of argument -1 | true | | System.Net.CookieCollection.Add(CookieCollection) | argument 0 -> element of argument -1 | true | -| System.Net.CookieCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Net.CookieCollection.CopyTo(Cookie[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Net.CookieCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Net.CookieCollection.CopyTo(Cookie[], int) | element of argument -1 -> element of argument 0 | true | | System.Net.CookieCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Net.CredentialCache.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Net.HttpListenerPrefixCollection.Add(string) | argument 0 -> element of argument -1 | true | -| System.Net.HttpListenerPrefixCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Net.HttpListenerPrefixCollection.CopyTo(String[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Net.HttpListenerPrefixCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Net.HttpListenerPrefixCollection.CopyTo(String[], int) | element of argument -1 -> element of argument 0 | true | | System.Net.HttpListenerPrefixCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Net.HttpRequestStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Net.HttpRequestStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Net.HttpRequestStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Net.HttpRequestStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.Net.HttpRequestStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.Net.HttpRequestStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | -| System.Net.HttpResponseStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Net.HttpResponseStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Net.HttpResponseStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Net.HttpResponseStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | +| System.Net.HttpResponseStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | | System.Net.HttpResponseStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Net.NetworkInformation.IPAddressCollection.Add(IPAddress) | argument 0 -> element of argument -1 | true | -| System.Net.NetworkInformation.IPAddressCollection.CopyTo(IPAddress[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Net.NetworkInformation.IPAddressCollection.CopyTo(IPAddress[], int) | element of argument -1 -> element of argument 0 | true | | System.Net.NetworkInformation.IPAddressCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Net.Security.CipherSuitesPolicy+d__6.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Net.Security.NegotiateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Net.Security.NegotiateStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Net.Security.NegotiateStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Net.Security.NegotiateStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.Net.Security.NegotiateStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.Net.Security.NegotiateStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.Net.Security.NegotiateStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.Net.Security.NegotiateStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Net.Security.NegotiateStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.Net.Security.SslStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Net.Security.SslStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Net.Security.SslStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Net.Security.SslStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.Net.Security.SslStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.Net.Security.SslStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.Net.Security.SslStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.Net.Security.SslStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Net.Security.SslStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.Net.WebUtility.HtmlEncode(ReadOnlySpan, ref ValueStringBuilder) | argument 0 -> return (normal) | false | @@ -1985,8 +1985,8 @@ | System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>.GetAwaiter() | field m_configuredTaskAwaiter of argument -1 -> return (normal) | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Add(T) | argument 0 -> element of argument -1 | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Add(object) | argument 0 -> element of argument -1 | true | -| System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.CopyTo(T[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.CopyTo(T[], int) | element of argument -1 -> element of argument 0 | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Insert(int, T) | argument 1 -> element of argument -1 | true | | System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<>.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -2000,13 +2000,13 @@ | System.Runtime.Loader.AssemblyLoadContext+d__83.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Runtime.Loader.AssemblyLoadContext+d__53.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Runtime.Loader.LibraryNameVariation+d__5.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | -| System.Security.Cryptography.CryptoStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Security.Cryptography.CryptoStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Security.Cryptography.CryptoStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Security.Cryptography.CryptoStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.Security.Cryptography.CryptoStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.Security.Cryptography.CryptoStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.Security.Cryptography.CryptoStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.Security.Cryptography.CryptoStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Security.Cryptography.CryptoStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | -| System.Security.PermissionSet.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Security.PermissionSet.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | | System.Security.PermissionSet.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.String.Clone() | argument -1 -> return (normal) | true | | System.String.Concat(IEnumerable) | element of argument 0 -> return (normal) | false | @@ -2145,8 +2145,8 @@ | System.Text.Encoding.GetString(byte*, int) | element of argument 0 -> return (normal) | false | | System.Text.RegularExpressions.CaptureCollection.Add(Capture) | argument 0 -> element of argument -1 | true | | System.Text.RegularExpressions.CaptureCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.Text.RegularExpressions.CaptureCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Text.RegularExpressions.CaptureCollection.CopyTo(Capture[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Text.RegularExpressions.CaptureCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Text.RegularExpressions.CaptureCollection.CopyTo(Capture[], int) | element of argument -1 -> element of argument 0 | true | | System.Text.RegularExpressions.CaptureCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Text.RegularExpressions.CaptureCollection.Insert(int, Capture) | argument 1 -> element of argument -1 | true | | System.Text.RegularExpressions.CaptureCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -2157,8 +2157,8 @@ | System.Text.RegularExpressions.GroupCollection+d__51.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Text.RegularExpressions.GroupCollection.Add(Group) | argument 0 -> element of argument -1 | true | | System.Text.RegularExpressions.GroupCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.Text.RegularExpressions.GroupCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Text.RegularExpressions.GroupCollection.CopyTo(Group[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Text.RegularExpressions.GroupCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Text.RegularExpressions.GroupCollection.CopyTo(Group[], int) | element of argument -1 -> element of argument 0 | true | | System.Text.RegularExpressions.GroupCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Text.RegularExpressions.GroupCollection.Insert(int, Group) | argument 1 -> element of argument -1 | true | | System.Text.RegularExpressions.GroupCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -2168,8 +2168,8 @@ | System.Text.RegularExpressions.GroupCollection.set_Item(int, object) | argument 1 -> element of argument -1 | true | | System.Text.RegularExpressions.MatchCollection.Add(Match) | argument 0 -> element of argument -1 | true | | System.Text.RegularExpressions.MatchCollection.Add(object) | argument 0 -> element of argument -1 | true | -| System.Text.RegularExpressions.MatchCollection.CopyTo(Array, int) | element of argument -1 -> element of return (out parameter 0) | true | -| System.Text.RegularExpressions.MatchCollection.CopyTo(Match[], int) | element of argument -1 -> element of return (out parameter 0) | true | +| System.Text.RegularExpressions.MatchCollection.CopyTo(Array, int) | element of argument -1 -> element of argument 0 | true | +| System.Text.RegularExpressions.MatchCollection.CopyTo(Match[], int) | element of argument -1 -> element of argument 0 | true | | System.Text.RegularExpressions.MatchCollection.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | | System.Text.RegularExpressions.MatchCollection.Insert(int, Match) | argument 1 -> element of argument -1 | true | | System.Text.RegularExpressions.MatchCollection.Insert(int, object) | argument 1 -> element of argument -1 | true | @@ -2258,10 +2258,10 @@ | System.Text.StringBuilder.StringBuilder(string, int, int, int) | argument 0 -> element of return (normal) | true | | System.Text.StringBuilder.ToString() | element of argument -1 -> return (normal) | false | | System.Text.StringBuilder.ToString(int, int) | element of argument -1 -> return (normal) | false | -| System.Text.TranscodingStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> return (out parameter 0) | false | +| System.Text.TranscodingStream.BeginRead(Byte[], int, int, AsyncCallback, object) | argument -1 -> argument 0 | false | | System.Text.TranscodingStream.BeginWrite(Byte[], int, int, AsyncCallback, object) | argument 0 -> argument -1 | false | -| System.Text.TranscodingStream.Read(Byte[], int, int) | argument -1 -> return (out parameter 0) | false | -| System.Text.TranscodingStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> return (out parameter 0) | false | +| System.Text.TranscodingStream.Read(Byte[], int, int) | argument -1 -> argument 0 | false | +| System.Text.TranscodingStream.ReadAsync(Byte[], int, int, CancellationToken) | argument -1 -> argument 0 | false | | System.Text.TranscodingStream.Write(Byte[], int, int) | argument 0 -> argument -1 | false | | System.Text.TranscodingStream.WriteAsync(Byte[], int, int, CancellationToken) | argument 0 -> argument -1 | false | | System.Threading.Tasks.SingleProducerSingleConsumerQueue<>.GetEnumerator() | element of argument -1 -> property Current of return (normal) | true | @@ -2560,132 +2560,132 @@ | System.Tuple<,>.get_Item(int) | property Item2 of argument -1 -> return (normal) | true | | System.Tuple<>.Tuple(T1) | argument 0 -> property Item1 of return (normal) | true | | System.Tuple<>.get_Item(int) | property Item1 of argument -1 -> return (normal) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item7 of argument 0 -> return (out parameter 7) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item6 of argument 0 -> return (out parameter 6) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item5 of argument 0 -> return (out parameter 5) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item4 of argument 0 -> return (out parameter 4) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item3 of argument 0 -> return (out parameter 3) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2) | property Item1 of argument 0 -> return (out parameter 1) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2) | property Item2 of argument 0 -> return (out parameter 2) | true | -| System.TupleExtensions.Deconstruct(Tuple, out T1) | property Item1 of argument 0 -> return (out parameter 1) | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20, out T21) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19, out T20) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18, out T19) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17, out T18) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16, out T17) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15, out T16) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14, out T15) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13, out T14) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12, out T13) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11, out T12) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10, out T11) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9, out T10) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8, out T9) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple>, out T1, out T2, out T3, out T4, out T5, out T6, out T7, out T8) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6, out T7) | property Item7 of argument 0 -> argument 7 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5, out T6) | property Item6 of argument 0 -> argument 6 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4, out T5) | property Item5 of argument 0 -> argument 5 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3, out T4) | property Item4 of argument 0 -> argument 4 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2, out T3) | property Item3 of argument 0 -> argument 3 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2) | property Item1 of argument 0 -> argument 1 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1, out T2) | property Item2 of argument 0 -> argument 2 | true | +| System.TupleExtensions.Deconstruct(Tuple, out T1) | property Item1 of argument 0 -> argument 1 | true | | System.Uri.ToString() | argument -1 -> return (normal) | false | | System.Uri.Uri(string) | argument 0 -> return (normal) | false | | System.Uri.Uri(string, UriKind) | argument 0 -> return (normal) | false | diff --git a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs index bcbfc9a15d13..6ae3ae85b0d4 100644 --- a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs +++ b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.cs @@ -34,7 +34,7 @@ void F() Object taintedPopulatedObject = new Object(); JsonConvert.PopulateObject(t, taintedPopulatedObject); - Sink(taintedPopulatedObject.tainted); // False negative + Sink(taintedPopulatedObject.tainted); Object untaintedObject = JsonConvert.DeserializeObject(u); Sink(untaintedObject); diff --git a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected index 21bc0ed919d0..41aae7261e5f 100644 --- a/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected +++ b/csharp/ql/test/library-tests/frameworks/JsonNET/Json.expected @@ -5,6 +5,7 @@ | Json.cs:18:24:18:32 | "tainted" | Json.cs:28:18:28:49 | access to indexer | | Json.cs:18:24:18:32 | "tainted" | Json.cs:29:18:29:46 | access to array element | | Json.cs:18:24:18:32 | "tainted" | Json.cs:32:18:32:39 | (...) ... | +| Json.cs:18:24:18:32 | "tainted" | Json.cs:37:18:37:47 | (...) ... | | Json.cs:18:24:18:32 | "tainted" | Json.cs:44:18:44:24 | access to local variable jobject | | Json.cs:18:24:18:32 | "tainted" | Json.cs:45:18:45:29 | access to indexer | | Json.cs:18:24:18:32 | "tainted" | Json.cs:46:18:46:34 | access to indexer | From d0478eac95dbd1486a3009e79315016f3c4a8c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=C3=BCller?= Date: Fri, 25 Jun 2021 09:45:46 +0200 Subject: [PATCH 1610/1662] XML validation and spelling/ordering changes * XML validation and summary changes in qhelp file ; * Encode entities within snippet * Updated minor descriptions and examples * Implemented spelling review --- ...secureRmiJmxEnvironmentConfiguration.qhelp | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp index f20b55d1a1a9..55d5e3c63e27 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp @@ -2,34 +2,42 @@ "-//Semmle//qhelp//EN" "qhelp.dtd"> + -

    An improperly set environment variable during the creation of an RMI or JMX server can lead -to an unauthenticated remote code execution vulnerability. This is because the -RMI/JMX server environment allows attackers to supply arbitrary objects to the authentication -method, resulting in the attempted deserialization of an attacker-controlled object. +

    For special use cases some applications may implement a custom service which handles JMX-RMI connections.

    + +

    When creating such a custom service, a developer should pass a certain environment configuration to the JMX-RMI server initalisation, +as otherwise the JMX-RMI service is susceptible to an unsafe deserialization vulnerability.

    + +

    This is because the JMX-RMI service allows attackers to supply arbitrary objects to the service authentication +method, resulting in the attempted deserialization of an attacker-controlled object. +In the worst case scenario this could allow an attacker to achieve remote code execution within the context of the application server.

    + +

    By setting the appropriate environment, the deserialization can be controlled via a deserialization filter.

    +
    -

    During the creation/initialization of an RMI or JMX server an environment should be supplied that sets a deserialization filter. -Ideally this filter only allows the deserialization of java.lang.String. +

    During the creation of a custom JMX-RMI service an environment should be supplied that sets a deserialization filter. +Ideally this filter should be as restrictive as possible, for example to only allow the deserialization of java.lang.String.

    -The filter can be configured by setting the key jmx.remote.rmi.server.credentials.filter.pattern (given by the constant RMIConnectorServer.CREDENTIALS_FILTER_PATTERN). -The filter should (ideally) only allow java.lang.String and disallow all other classes for deserialization: ("java.lang.String;!*"). +

    The filter can be configured by setting the key jmx.remote.rmi.server.credentials.filter.pattern (given by the constant RMIConnectorServer.CREDENTIALS_FILTER_PATTERN). +The filter should (ideally) only allow java.lang.String and disallow all other classes for deserialization: ("java.lang.String;!*").

    -The key-value pair can be set as following: +

    The key-value pair can be set as following:

    String stringsOnlyFilter = "java.lang.String;!*"; // Deny everything but java.lang.String -Map env = new HashMap; +Map<String, Object> env = new HashMap<String, Object>; env.put(RMIConnectorServer.CREDENTIALS_FILTER_PATTERN, stringsOnlyFilter); -For applications using Java 9 or below: +

    For applications using Java 6u113 to 9:

    // This is deprecated in Java 10+ ! -Map env = new HashMap; +Map<String, Object> env = new HashMap<String, Object>; env.put ( "jmx.remote.rmi.server.credential.types", new String[]{ @@ -39,20 +47,20 @@ env.put ( ); -Please note that the authentication implementation is vulnerable by default. -For this reason an initialization with a null environment is also vulnerable. +

    Please note that the JMX-RMI service is vulnerable in the default configuration. +For this reason an initialization with a null environment is also vulnerable.

    -

    The following examples show how an RMI or JMX server can be initialized securely. +

    The following examples show how an JMX-RMI service can be initialized securely.

    -

    The first example shows how an RMI server can be initialized with a secure environment.

    +

    The first example shows how an JMX server is initialized securely with the JMXConnectorServerFactory.newJMXConnectorServer() call.

    - + -

    The second example shows how the environment for a JMX server can be initialized securely.

    +

    The second example shows how a JMX Server is initialized securely if the RMIConnectorServer class is used.

    - +
    @@ -63,4 +71,5 @@ For this reason an initialization with a null environment is also v
  • Java 10 API specification for RMIConnectorServer.CREDENTIALS_FILTER_PATTERN
  • The Java API specification for RMIConnectorServer.CREDENTIAL_TYPES. Please note that this field is deprecated since Java 10.
  • +
    From 492f6ebc7c248cfa514d56acf1613e05523c844c Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 16 Jun 2021 12:13:55 +0100 Subject: [PATCH 1611/1662] Model isNotEmpty from Apache Commons Collections --- .../semmle/code/java/dataflow/NullGuards.qll | 7 ++----- .../java/frameworks/apache/Collections.qll | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 java/ql/src/semmle/code/java/frameworks/apache/Collections.qll diff --git a/java/ql/src/semmle/code/java/dataflow/NullGuards.qll b/java/ql/src/semmle/code/java/dataflow/NullGuards.qll index 589b1f7c49f5..69c2ba6c22e8 100644 --- a/java/ql/src/semmle/code/java/dataflow/NullGuards.qll +++ b/java/ql/src/semmle/code/java/dataflow/NullGuards.qll @@ -5,6 +5,7 @@ import java import SSA private import semmle.code.java.controlflow.internal.GuardsLogic +private import semmle.code.java.frameworks.apache.Collections private import RangeUtils private import IntegerGuards @@ -144,11 +145,7 @@ predicate nullCheckMethod(Method m, boolean branch, boolean isnull) { branch = false and isnull = false or - ( - m.getDeclaringType().hasQualifiedName("org.apache.commons.collections4", "CollectionUtils") or - m.getDeclaringType().hasQualifiedName("org.apache.commons.collections", "CollectionUtils") - ) and - m.hasName("isNotEmpty") and + m instanceof MethodApacheCollectionsIsNotEmpty and branch = true and isnull = false or diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll new file mode 100644 index 000000000000..3d6d211f447d --- /dev/null +++ b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll @@ -0,0 +1,18 @@ +/** Definitions related to the Apache Commons Collections library. */ + +import java +private import semmle.code.java.dataflow.FlowSteps +private import semmle.code.java.dataflow.ExternalFlow + +/** + * The method `isNotEmpty` in either `org.apache.commons.collections.CollectionUtils` + * or `org.apache.commons.collections4.CollectionUtils`. + */ +class MethodApacheCollectionsIsNotEmpty extends Method { + MethodApacheCollectionsIsNotEmpty() { + this.getDeclaringType() + .hasQualifiedName(["org.apache.commons.collections", "org.apache.commons.collections4"], + "CollectionUtils") and + this.hasName("isNotEmpty") + } +} From 213f5d6a3705e7185be8cb5223c28a46c70732f5 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 16 Jun 2021 12:31:51 +0100 Subject: [PATCH 1612/1662] Model and use isEmpty from Apache Collections --- .../ql/src/semmle/code/java/dataflow/NullGuards.qll | 4 ++++ .../code/java/frameworks/apache/Collections.qll | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/java/ql/src/semmle/code/java/dataflow/NullGuards.qll b/java/ql/src/semmle/code/java/dataflow/NullGuards.qll index 69c2ba6c22e8..44f19ce72e4e 100644 --- a/java/ql/src/semmle/code/java/dataflow/NullGuards.qll +++ b/java/ql/src/semmle/code/java/dataflow/NullGuards.qll @@ -145,6 +145,10 @@ predicate nullCheckMethod(Method m, boolean branch, boolean isnull) { branch = false and isnull = false or + m instanceof MethodApacheCollectionsIsEmpty and + branch = false and + isnull = false + or m instanceof MethodApacheCollectionsIsNotEmpty and branch = true and isnull = false diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll index 3d6d211f447d..40024ce17959 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll @@ -4,6 +4,19 @@ import java private import semmle.code.java.dataflow.FlowSteps private import semmle.code.java.dataflow.ExternalFlow +/** + * The method `isNotEmpty` in either `org.apache.commons.collections.CollectionUtils` + * or `org.apache.commons.collections4.CollectionUtils`. + */ +class MethodApacheCollectionsIsEmpty extends Method { + MethodApacheCollectionsIsEmpty() { + this.getDeclaringType() + .hasQualifiedName(["org.apache.commons.collections", "org.apache.commons.collections4"], + "CollectionUtils") and + this.hasName("isEmpty") + } +} + /** * The method `isNotEmpty` in either `org.apache.commons.collections.CollectionUtils` * or `org.apache.commons.collections4.CollectionUtils`. From e78d56e7e90ae9bb9f23fc4ba4d9e024d7e8fe90 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 16 Jun 2021 14:19:18 +0100 Subject: [PATCH 1613/1662] Model MapUtils class and keyvalue package --- .../java/frameworks/apache/Collections.qll | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll index 40024ce17959..6dedf56f3803 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll @@ -29,3 +29,110 @@ class MethodApacheCollectionsIsNotEmpty extends Method { this.hasName("isNotEmpty") } } + +/** + * Value-propagating models for classes in the package `org.apache.commons.collections4`. + */ +private class ApacheCollectionsModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + ] + } +} + +/** + * Value-propagating models for classes in the package `org.apache.commons.collections4.keyvalue`. + */ +private class ApacheKeyValueModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;Argument[1];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;Argument[0];Argument[-1];value" + ] + } +} + +/** + * Value-propagating models for the class `org.apache.commons.collections4.MapUtils`. + */ +private class ApacheMapUtilsModel extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + "org.apache.commons.collections4;MapUtils;true;emptyIfNull;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getMap;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getObject;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;getString;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazyMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;orderedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;populateMap;(Map,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", + // Note that when lambdas are supported we should have more models for populateMap + "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[2];MapValue of Argument[0];value", + "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;toMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;Argument[0];ReturnValue;value" + ] + } +} From 224fd343f364614534b8c38befc5b182f79b575c Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Jun 2021 21:45:31 +0100 Subject: [PATCH 1614/1662] Fix models (addressing PR review comments) --- .../java/frameworks/apache/Collections.qll | 90 ++++++++++++------- 1 file changed, 59 insertions(+), 31 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll index 6dedf56f3803..5aaa7a2501d2 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll @@ -38,7 +38,9 @@ private class ApacheCollectionsModel extends SummaryModelCsv { row = [ "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", - "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value", + "org.apache.commons.collections;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" ] } } @@ -56,29 +58,38 @@ private class ApacheKeyValueModel extends SummaryModelCsv { "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value", - "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;value", - "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint", "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value", - "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;Argument[0];Argument[-1];value", - "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;Argument[-1];ReturnValue;value", - "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;value", - "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint", "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[1];MapValue of Argument[-1];value", - "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;Argument[0];Argument[-1];value", - "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;Argument[0];Argument[-1];value", - "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;Argument[-1];ReturnValue;value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value", + "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value", "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", - "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;Argument[0];Argument[-1];value", - "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;Argument[0];Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value", "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;Argument[1];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", - "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;Argument[0];Argument[-1];value", - "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;Argument[0];Argument[-1];value" + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", ] } } @@ -91,8 +102,10 @@ private class ApacheMapUtilsModel extends SummaryModelCsv { row = [ "org.apache.commons.collections4;MapUtils;true;emptyIfNull;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;getMap;;;Argument[2];ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value", @@ -101,17 +114,25 @@ private class ApacheMapUtilsModel extends SummaryModelCsv { "org.apache.commons.collections4;MapUtils;true;getString;;;Argument[2];ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;iterableMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;lazyMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;orderedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;populateMap;(Map,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", "org.apache.commons.collections4;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", // Note that when lambdas are supported we should have more models for populateMap - "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of Argument[0];value", "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of Argument[0];value", @@ -126,13 +147,20 @@ private class ApacheMapUtilsModel extends SummaryModelCsv { "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[1];MapKey of Argument[0];value", "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[2];MapValue of Argument[0];value", - "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;toMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;transformedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;Argument[0];ReturnValue;value", - "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;Argument[0];ReturnValue;value" + "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;toMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;toMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", ] } } From 4388f19ddffd5f057d8894940b00885a7950e3e6 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Jun 2021 21:28:21 +0100 Subject: [PATCH 1615/1662] Add automatically-generated tests --- .../frameworks/apache-collections/Test.java | 929 ++++++++++++++++++ .../apache-collections/test.expected | 0 .../frameworks/apache-collections/test.ql | 68 ++ 3 files changed, 997 insertions(+) create mode 100644 java/ql/test/library-tests/frameworks/apache-collections/Test.java create mode 100644 java/ql/test/library-tests/frameworks/apache-collections/test.expected create mode 100644 java/ql/test/library-tests/frameworks/apache-collections/test.ql diff --git a/java/ql/test/library-tests/frameworks/apache-collections/Test.java b/java/ql/test/library-tests/frameworks/apache-collections/Test.java new file mode 100644 index 000000000000..9d1104d990a6 --- /dev/null +++ b/java/ql/test/library-tests/frameworks/apache-collections/Test.java @@ -0,0 +1,929 @@ +package generatedtest; + +import java.util.Map; +import java.util.ResourceBundle; +import java.util.SortedMap; +import org.apache.commons.collections4.Factory; +import org.apache.commons.collections4.IterableMap; +import org.apache.commons.collections4.IterableSortedMap; +import org.apache.commons.collections4.KeyValue; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.OrderedMap; +import org.apache.commons.collections4.Transformer; +import org.apache.commons.collections4.keyvalue.AbstractKeyValue; +import org.apache.commons.collections4.keyvalue.AbstractMapEntry; +import org.apache.commons.collections4.keyvalue.AbstractMapEntryDecorator; +import org.apache.commons.collections4.keyvalue.DefaultKeyValue; +import org.apache.commons.collections4.keyvalue.DefaultMapEntry; +import org.apache.commons.collections4.keyvalue.TiedMapEntry; +import org.apache.commons.collections4.keyvalue.UnmodifiableMapEntry; +import org.apache.commons.collections4.map.MultiValueMap; + +//Test case generated by GenerateFlowTestCase.ql +public class Test { + + Object getMapKey(Object container) { return null; } + Object getMapValue(Object container) { return null; } + Object newWithArrayElement(Object element) { return null; } + Object newWithElement(Object element) { return null; } + Object newWithMapKey(Object element) { return null; } + Object newWithMapValue(Object element) { return null; } + Object source() { return null; } + void sink(Object o) { } + + public void test() { + + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[0];MapKey of Argument[-1];value" + AbstractKeyValue out = null; + Object in = (Object)source(); + out = new AbstractKeyValue(in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[1];MapValue of Argument[-1];value" + AbstractKeyValue out = null; + Object in = (Object)source(); + out = new AbstractKeyValue(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value" + DefaultKeyValue out = null; + Object in = (Object)source(); + out.setKey(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value" + AbstractKeyValue out = null; + Object in = (Object)source(); + out.setKey(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + out = in.setKey(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.setKey(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.setKey((Object)null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" + UnmodifiableMapEntry out = null; + Object in = (Object)source(); + out.setValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" + DefaultKeyValue out = null; + Object in = (Object)source(); + out.setValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" + AbstractMapEntry out = null; + Object in = (Object)source(); + out.setValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" + AbstractKeyValue out = null; + Object in = (Object)source(); + out.setValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + UnmodifiableMapEntry in = (UnmodifiableMapEntry)newWithMapValue(source()); + out = in.setValue(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + out = in.setValue(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractMapEntry in = (AbstractMapEntry)newWithMapValue(source()); + out = in.setValue(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractMapEntry in = (AbstractMapEntry)newWithMapValue(source()); + out = in.setValue((Object)null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.setValue(null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.setValue((Object)null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" + String out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapKey(source()); + out = in.toString(); + sink(out); // $hasTaintFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" + String out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.toString(); + sink(out); // $hasTaintFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value" + AbstractMapEntry out = null; + Object in = (Object)source(); + out = new AbstractMapEntry(in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value" + AbstractMapEntry out = null; + Object in = (Object)source(); + out = new AbstractMapEntry(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value" + AbstractMapEntryDecorator out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + out = new AbstractMapEntryDecorator(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value" + AbstractMapEntryDecorator out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + out = new AbstractMapEntryDecorator(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" + Map<>.Entry out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); + out = in.getMapEntry(); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" + Map<>.Entry out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); + out = in.getMapEntry(); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" + String out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); + out = in.toString(); + sink(out); // $hasTaintFlow + } + { + // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" + String out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); + out = in.toString(); + sink(out); // $hasTaintFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" + DefaultKeyValue out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + out = new DefaultKeyValue(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" + DefaultKeyValue out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + out = new DefaultKeyValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" + DefaultKeyValue out = null; + KeyValue in = (KeyValue)newWithMapKey(source()); + out = new DefaultKeyValue(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" + DefaultKeyValue out = null; + KeyValue in = (KeyValue)newWithMapValue(source()); + out = new DefaultKeyValue(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[0];MapKey of Argument[-1];value" + DefaultKeyValue out = null; + Object in = (Object)source(); + out = new DefaultKeyValue(in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[1];MapValue of Argument[-1];value" + DefaultKeyValue out = null; + Object in = (Object)source(); + out = new DefaultKeyValue(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" + Map<>.Entry out = null; + DefaultKeyValue in = (DefaultKeyValue)newWithMapKey(source()); + out = in.toMapEntry(); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" + Map<>.Entry out = null; + DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + out = in.toMapEntry(); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" + DefaultMapEntry out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + out = new DefaultMapEntry(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" + DefaultMapEntry out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + out = new DefaultMapEntry(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" + DefaultMapEntry out = null; + KeyValue in = (KeyValue)newWithMapKey(source()); + out = new DefaultMapEntry(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" + DefaultMapEntry out = null; + KeyValue in = (KeyValue)newWithMapValue(source()); + out = new DefaultMapEntry(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value" + DefaultMapEntry out = null; + Object in = (Object)source(); + out = new DefaultMapEntry(in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value" + DefaultMapEntry out = null; + Object in = (Object)source(); + out = new DefaultMapEntry(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;Argument[1];MapKey of Argument[-1];value" + TiedMapEntry out = null; + Object in = (Object)source(); + out = new TiedMapEntry(null, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value" + TiedMapEntry out = null; + Map in = (Map)newWithMapValue(source()); + out = new TiedMapEntry(in, null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" + UnmodifiableMapEntry out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + out = new UnmodifiableMapEntry(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" + UnmodifiableMapEntry out = null; + Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + out = new UnmodifiableMapEntry(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" + UnmodifiableMapEntry out = null; + KeyValue in = (KeyValue)newWithMapKey(source()); + out = new UnmodifiableMapEntry(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" + UnmodifiableMapEntry out = null; + KeyValue in = (KeyValue)newWithMapValue(source()); + out = new UnmodifiableMapEntry(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value" + UnmodifiableMapEntry out = null; + Object in = (Object)source(); + out = new UnmodifiableMapEntry(in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value" + UnmodifiableMapEntry out = null; + Object in = (Object)source(); + out = new UnmodifiableMapEntry(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" + Object out = null; + TiedMapEntry in = (TiedMapEntry)newWithMapKey(source()); + out = in.getKey(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" + Object out = null; + KeyValue in = (KeyValue)newWithMapKey(source()); + out = in.getKey(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" + Object out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); + out = in.getKey(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapKey(source()); + out = in.getKey(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + TiedMapEntry in = (TiedMapEntry)newWithMapValue(source()); + out = in.getValue(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + KeyValue in = (KeyValue)newWithMapValue(source()); + out = in.getValue(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); + out = in.getValue(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" + Object out = null; + AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + out = in.getValue(); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;emptyIfNull;;;Argument[0];ReturnValue;value" + Map out = null; + Map in = (Map)source(); + out = MapUtils.emptyIfNull(in); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.fixedSizeMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.fixedSizeMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.fixedSizeSortedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.fixedSizeSortedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getMap;;;Argument[2];ReturnValue;value" + Map out = null; + Map in = (Map)source(); + out = MapUtils.getMap(null, null, in); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getMap(in, null, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getMap(in, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getObject;;;Argument[2];ReturnValue;value" + Object out = null; + Object in = (Object)source(); + out = MapUtils.getObject(null, null, in); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" + Object out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getObject(in, null, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" + Object out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getObject(in, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getString;;;Argument[2];ReturnValue;value" + String out = null; + String in = (String)source(); + out = MapUtils.getString(null, null, in); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" + String out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getString(in, null, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" + String out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.getString(in, null); + sink(out); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.invertMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.invertMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.iterableMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.iterableMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableSortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.iterableSortedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableSortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.iterableSortedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.lazyMap(in, (Transformer)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.lazyMap(in, (Factory)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.lazyMap(in, (Transformer)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.lazyMap(in, (Factory)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.lazySortedMap(in, (Transformer)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.lazySortedMap(in, (Factory)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.lazySortedMap(in, (Transformer)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.lazySortedMap(in, (Factory)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.multiValueMap(in, (Factory)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.multiValueMap(in, (Class)null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.multiValueMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.multiValueMap(in, (Factory)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.multiValueMap(in, (Class)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + MultiValueMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.multiValueMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + OrderedMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.orderedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + OrderedMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.orderedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;populateMap;(Map,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value" + Map out = null; + Iterable in = (Iterable)newWithElement(source()); + MapUtils.populateMap(out, in, (Transformer)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value" + MultiMap out = null; + Iterable in = (Iterable)newWithElement(source()); + MapUtils.populateMap(out, in, (Transformer)null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.predicatedMap(in, null, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.predicatedMap(in, null, null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.predicatedSortedMap(in, null, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.predicatedSortedMap(in, null, null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(source()); + MapUtils.putAll(out, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(source()); + out = MapUtils.putAll(null, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(source()); + MapUtils.putAll(out, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(source()); + out = MapUtils.putAll(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + MapUtils.putAll(out, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + out = MapUtils.putAll(null, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + MapUtils.putAll(out, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + out = MapUtils.putAll(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithMapKey(source())); + MapUtils.putAll(out, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithMapKey(source())); + out = MapUtils.putAll(null, in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of Argument[0];value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithMapValue(source())); + MapUtils.putAll(out, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value" + Map out = null; + Object[] in = (Object[])newWithArrayElement(newWithMapValue(source())); + out = MapUtils.putAll(null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[1];MapKey of Argument[0];value" + Map out = null; + Object in = (Object)source(); + MapUtils.safeAddToMap(out, in, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[2];MapValue of Argument[0];value" + Map out = null; + Object in = (Object)source(); + MapUtils.safeAddToMap(out, null, in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.synchronizedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.synchronizedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.synchronizedSortedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.synchronizedSortedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + Map out = null; + ResourceBundle in = (ResourceBundle)newWithMapKey(source()); + out = MapUtils.toMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + Map out = null; + ResourceBundle in = (ResourceBundle)newWithMapValue(source()); + out = MapUtils.toMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.transformedMap(in, null, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + IterableMap out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.transformedMap(in, null, null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.transformedSortedMap(in, null, null); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.transformedSortedMap(in, null, null); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapKey(source()); + out = MapUtils.unmodifiableMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + Map out = null; + Map in = (Map)newWithMapValue(source()); + out = MapUtils.unmodifiableMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapKey(source()); + out = MapUtils.unmodifiableSortedMap(in); + sink(getMapKey(out)); // $hasValueFlow + } + { + // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" + SortedMap out = null; + SortedMap in = (SortedMap)newWithMapValue(source()); + out = MapUtils.unmodifiableSortedMap(in); + sink(getMapValue(out)); // $hasValueFlow + } + + } + +} \ No newline at end of file diff --git a/java/ql/test/library-tests/frameworks/apache-collections/test.expected b/java/ql/test/library-tests/frameworks/apache-collections/test.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/ql/test/library-tests/frameworks/apache-collections/test.ql b/java/ql/test/library-tests/frameworks/apache-collections/test.ql new file mode 100644 index 000000000000..4ec971af08b8 --- /dev/null +++ b/java/ql/test/library-tests/frameworks/apache-collections/test.ql @@ -0,0 +1,68 @@ +import java +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.ExternalFlow +import semmle.code.java.dataflow.TaintTracking +import TestUtilities.InlineExpectationsTest + +class SummaryModelTest extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + //"package;type;overrides;name;signature;ext;inputspec;outputspec;kind", + "generatedtest;Test;false;getMapValue;;;MapValue of Argument[0];ReturnValue;value", + "generatedtest;Test;false;getMapKey;;;MapKey of Argument[0];ReturnValue;value", + "generatedtest;Test;false;newWithMapValue;;;Argument[0];MapValue of ReturnValue;value", + "generatedtest;Test;false;newWithElement;;;Argument[0];Element of ReturnValue;value", + "generatedtest;Test;false;newWithArrayElement;;;Argument[0];ArrayElement of ReturnValue;value", + "generatedtest;Test;false;newWithMapKey;;;Argument[0];MapKey of ReturnValue;value" + ] + } +} + +class ValueFlowConf extends DataFlow::Configuration { + ValueFlowConf() { this = "qltest:valueFlowConf" } + + override predicate isSource(DataFlow::Node n) { + n.asExpr().(MethodAccess).getMethod().hasName("source") + } + + override predicate isSink(DataFlow::Node n) { + n.asExpr().(Argument).getCall().getCallee().hasName("sink") + } +} + +class TaintFlowConf extends TaintTracking::Configuration { + TaintFlowConf() { this = "qltest:taintFlowConf" } + + override predicate isSource(DataFlow::Node n) { + n.asExpr().(MethodAccess).getMethod().hasName("source") + } + + override predicate isSink(DataFlow::Node n) { + n.asExpr().(Argument).getCall().getCallee().hasName("sink") + } +} + +class HasFlowTest extends InlineExpectationsTest { + HasFlowTest() { this = "HasFlowTest" } + + override string getARelevantTag() { result = ["hasValueFlow", "hasTaintFlow"] } + + override predicate hasActualResult(Location location, string element, string tag, string value) { + tag = "hasValueFlow" and + exists(DataFlow::Node src, DataFlow::Node sink, ValueFlowConf conf | conf.hasFlow(src, sink) | + sink.getLocation() = location and + element = sink.toString() and + value = "" + ) + or + tag = "hasTaintFlow" and + exists(DataFlow::Node src, DataFlow::Node sink, TaintFlowConf conf | + conf.hasFlow(src, sink) and not any(ValueFlowConf c).hasFlow(src, sink) + | + sink.getLocation() = location and + element = sink.toString() and + value = "" + ) + } +} From 7004c87ec0fb32108fef8d2306c7fefa203f5d27 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 24 Jun 2021 11:36:52 +0100 Subject: [PATCH 1616/1662] Manually edit tests so they pass --- .../frameworks/apache-collections/Test.java | 130 +++++++++++------- 1 file changed, 83 insertions(+), 47 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/apache-collections/Test.java b/java/ql/test/library-tests/frameworks/apache-collections/Test.java index 9d1104d990a6..7448c32caeae 100644 --- a/java/ql/test/library-tests/frameworks/apache-collections/Test.java +++ b/java/ql/test/library-tests/frameworks/apache-collections/Test.java @@ -32,20 +32,54 @@ public class Test { Object source() { return null; } void sink(Object o) { } + class MyAbstractKeyValue extends AbstractKeyValue { + MyAbstractKeyValue(K key, V value) { + super(key, value); + } + + K mySetKey(final K key) { + return super.setKey(key); + } + + V mySetValue(final V value) { + return super.setValue(value); + } + } + + class MyAbstractMapEntry extends AbstractMapEntry { + MyAbstractMapEntry(final K key, final V value) { + super(key, value); + } + @Override + public K getKey() { return null; } + @Override + public V getValue() { return null; } + } + + class MyAbstractMapEntryDecorator extends AbstractMapEntryDecorator { + MyAbstractMapEntryDecorator(final Map.Entry entry) { + super(entry); + } + + Map.Entry myGetMapEntry() { + return super.getMapEntry(); + } + } + public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[0];MapKey of Argument[-1];value" AbstractKeyValue out = null; Object in = (Object)source(); - out = new AbstractKeyValue(in, null); + out = new MyAbstractKeyValue(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[1];MapValue of Argument[-1];value" AbstractKeyValue out = null; Object in = (Object)source(); - out = new AbstractKeyValue(null, in); + out = new MyAbstractKeyValue(null, in); sink(getMapValue(out)); // $hasValueFlow } { @@ -57,9 +91,9 @@ public void test() { } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value" - AbstractKeyValue out = null; + MyAbstractKeyValue out = null; Object in = (Object)source(); - out.setKey(in); + out.mySetKey(in); sink(getMapKey(out)); // $hasValueFlow } { @@ -72,15 +106,15 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); - out = in.setKey(null); + MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + out = in.mySetKey(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); - out = in.setKey((Object)null); + MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + out = in.mySetKey((Object)null); sink(out); // $hasValueFlow } { @@ -106,9 +140,9 @@ public void test() { } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" - AbstractKeyValue out = null; + MyAbstractKeyValue out = null; Object in = (Object)source(); - out.setValue(in); + out.mySetValue(in); sink(getMapValue(out)); // $hasValueFlow } { @@ -128,42 +162,42 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (AbstractMapEntry)newWithMapValue(source()); + AbstractMapEntry in = (MyAbstractMapEntry)newWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (AbstractMapEntry)newWithMapValue(source()); + AbstractMapEntry in = (MyAbstractMapEntry)newWithMapValue(source()); out = in.setValue((Object)null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); - out = in.setValue(null); + MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + out = in.mySetValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); - out = in.setValue((Object)null); + MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + out = in.mySetValue((Object)null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapKey(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } @@ -171,69 +205,69 @@ public void test() { // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value" AbstractMapEntry out = null; Object in = (Object)source(); - out = new AbstractMapEntry(in, null); + out = new MyAbstractMapEntry(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value" AbstractMapEntry out = null; Object in = (Object)source(); - out = new AbstractMapEntry(null, in); + out = new MyAbstractMapEntry(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); - out = new AbstractMapEntryDecorator(in); + Map.Entry in = (Map.Entry)newWithMapKey(source()); + out = new MyAbstractMapEntryDecorator(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); - out = new AbstractMapEntryDecorator(in); + Map.Entry in = (Map.Entry)newWithMapValue(source()); + out = new MyAbstractMapEntryDecorator(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" - Map<>.Entry out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); - out = in.getMapEntry(); + Map.Entry out = null; + MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); + out = in.myGetMapEntry(); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" - Map<>.Entry out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); - out = in.getMapEntry(); + Map.Entry out = null; + MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); + out = in.myGetMapEntry(); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newWithMapKey(source()); out = new DefaultKeyValue(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newWithMapValue(source()); out = new DefaultKeyValue(in); sink(getMapValue(out)); // $hasValueFlow } @@ -267,14 +301,14 @@ public void test() { } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" - Map<>.Entry out = null; + Map.Entry out = null; DefaultKeyValue in = (DefaultKeyValue)newWithMapKey(source()); out = in.toMapEntry(); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" - Map<>.Entry out = null; + Map.Entry out = null; DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); out = in.toMapEntry(); sink(getMapValue(out)); // $hasValueFlow @@ -282,14 +316,14 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newWithMapKey(source()); out = new DefaultMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultMapEntry out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newWithMapValue(source()); out = new DefaultMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } @@ -338,14 +372,14 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newWithMapKey(source()); out = new UnmodifiableMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - Map<>.Entry in = (Map<>.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newWithMapValue(source()); out = new UnmodifiableMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } @@ -394,14 +428,14 @@ public void test() { { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapKey(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapKey(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } @@ -422,14 +456,14 @@ public void test() { { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (AbstractMapEntryDecorator)newWithMapValue(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (AbstractKeyValue)newWithMapValue(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } @@ -693,10 +727,12 @@ public void test() { sink(getMapValue(out)); // $hasValueFlow } { + // Note it is tricky to get this to compile - the compiler thinks it is ambiguous + // which overload it should choose unless you put the generic types in correctly // "org.apache.commons.collections4;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value" - MultiMap out = null; - Iterable in = (Iterable)newWithElement(source()); - MapUtils.populateMap(out, in, (Transformer)null); + MultiMap out = null; + Iterable in = (Iterable)newWithElement(source()); + MapUtils.populateMap(out, in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { From 5feee9cc1744bd45be2731dbb04fd5b98eded3ed Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Jun 2021 16:46:05 +0100 Subject: [PATCH 1617/1662] Add automatically-generated stubs --- .../apache/commons/collections4/Factory.java | 9 ++ .../org/apache/commons/collections4/Get.java | 20 ++++ .../commons/collections4/IterableGet.java | 11 +++ .../commons/collections4/IterableMap.java | 11 +++ .../collections4/IterableSortedMap.java | 10 ++ .../apache/commons/collections4/KeyValue.java | 10 ++ .../commons/collections4/MapIterator.java | 15 +++ .../apache/commons/collections4/MapUtils.java | 94 +++++++++++++++++++ .../apache/commons/collections4/MultiMap.java | 17 ++++ .../commons/collections4/OrderedIterator.java | 11 +++ .../commons/collections4/OrderedMap.java | 15 +++ .../collections4/OrderedMapIterator.java | 12 +++ .../commons/collections4/Predicate.java | 9 ++ .../org/apache/commons/collections4/Put.java | 12 +++ .../commons/collections4/Transformer.java | 9 ++ .../commons/collections4/Unmodifiable.java | 8 ++ .../keyvalue/AbstractKeyValue.java | 16 ++++ .../keyvalue/AbstractMapEntry.java | 15 +++ .../keyvalue/AbstractMapEntryDecorator.java | 19 ++++ .../keyvalue/DefaultKeyValue.java | 20 ++++ .../keyvalue/DefaultMapEntry.java | 15 +++ .../collections4/keyvalue/TiedMapEntry.java | 19 ++++ .../keyvalue/UnmodifiableMapEntry.java | 17 ++++ .../collections4/map/AbstractIterableMap.java | 12 +++ .../map/AbstractMapDecorator.java | 31 ++++++ .../collections4/map/MultiValueMap.java | 36 +++++++ 26 files changed, 473 insertions(+) create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Factory.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Get.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableGet.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableMap.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableSortedMap.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/KeyValue.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapIterator.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MultiMap.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedIterator.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMap.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMapIterator.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Predicate.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Put.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Transformer.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Unmodifiable.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntryDecorator.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/TiedMapEntry.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractIterableMap.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractMapDecorator.java create mode 100644 java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Factory.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Factory.java new file mode 100644 index 000000000000..0b0f3fd48641 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Factory.java @@ -0,0 +1,9 @@ +// Generated automatically from org.apache.commons.collections4.Factory for testing purposes + +package org.apache.commons.collections4; + + +public interface Factory +{ + T create(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Get.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Get.java new file mode 100644 index 000000000000..ad0b9919a079 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Get.java @@ -0,0 +1,20 @@ +// Generated automatically from org.apache.commons.collections4.Get for testing purposes + +package org.apache.commons.collections4; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +public interface Get +{ + Collection values(); + Set keySet(); + Set> entrySet(); + V get(Object p0); + V remove(Object p0); + boolean containsKey(Object p0); + boolean containsValue(Object p0); + boolean isEmpty(); + int size(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableGet.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableGet.java new file mode 100644 index 000000000000..291d62914d89 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableGet.java @@ -0,0 +1,11 @@ +// Generated automatically from org.apache.commons.collections4.IterableGet for testing purposes + +package org.apache.commons.collections4; + +import org.apache.commons.collections4.Get; +import org.apache.commons.collections4.MapIterator; + +public interface IterableGet extends Get +{ + MapIterator mapIterator(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableMap.java new file mode 100644 index 000000000000..8f716f103d2e --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableMap.java @@ -0,0 +1,11 @@ +// Generated automatically from org.apache.commons.collections4.IterableMap for testing purposes + +package org.apache.commons.collections4; + +import java.util.Map; +import org.apache.commons.collections4.IterableGet; +import org.apache.commons.collections4.Put; + +public interface IterableMap extends IterableGet, Map, Put +{ +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableSortedMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableSortedMap.java new file mode 100644 index 000000000000..b88eae5beee8 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/IterableSortedMap.java @@ -0,0 +1,10 @@ +// Generated automatically from org.apache.commons.collections4.IterableSortedMap for testing purposes + +package org.apache.commons.collections4; + +import java.util.SortedMap; +import org.apache.commons.collections4.OrderedMap; + +public interface IterableSortedMap extends OrderedMap, SortedMap +{ +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/KeyValue.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/KeyValue.java new file mode 100644 index 000000000000..49bd0442d332 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/KeyValue.java @@ -0,0 +1,10 @@ +// Generated automatically from org.apache.commons.collections4.KeyValue for testing purposes + +package org.apache.commons.collections4; + + +public interface KeyValue +{ + K getKey(); + V getValue(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapIterator.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapIterator.java new file mode 100644 index 000000000000..f31dfa5c6cf9 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapIterator.java @@ -0,0 +1,15 @@ +// Generated automatically from org.apache.commons.collections4.MapIterator for testing purposes + +package org.apache.commons.collections4; + +import java.util.Iterator; + +public interface MapIterator extends Iterator +{ + K getKey(); + K next(); + V getValue(); + V setValue(V p0); + boolean hasNext(); + void remove(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java new file mode 100644 index 000000000000..a50e416eb0b9 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java @@ -0,0 +1,94 @@ +// Generated automatically from org.apache.commons.collections4.MapUtils for testing purposes + +package org.apache.commons.collections4; + +import java.io.PrintStream; +import java.util.Map; +import java.util.Properties; +import java.util.ResourceBundle; +import java.util.SortedMap; +import org.apache.commons.collections4.Factory; +import org.apache.commons.collections4.IterableMap; +import org.apache.commons.collections4.IterableSortedMap; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.OrderedMap; +import org.apache.commons.collections4.Predicate; +import org.apache.commons.collections4.Transformer; +import org.apache.commons.collections4.map.MultiValueMap; + +public class MapUtils +{ + protected MapUtils() {} + public static MultiValueMap multiValueMap(Map p0, Class p1){ return null; } + public static MultiValueMap multiValueMap(Map p0, Factory p1){ return null; } + public static void populateMap(Map p0, Iterable p1, Transformer p2, Transformer p3){} + public static void populateMap(MultiMap p0, Iterable p1, Transformer p2, Transformer p3){} + public static IterableMap fixedSizeMap(Map p0){ return null; } + public static IterableMap iterableMap(Map p0){ return null; } + public static IterableMap lazyMap(Map p0, Factory p1){ return null; } + public static IterableMap lazyMap(Map p0, Transformer p1){ return null; } + public static IterableMap predicatedMap(Map p0, Predicate p1, Predicate p2){ return null; } + public static IterableMap transformedMap(Map p0, Transformer p1, Transformer p2){ return null; } + public static IterableSortedMap iterableSortedMap(SortedMap p0){ return null; } + public static Map emptyIfNull(Map p0){ return null; } + public static Map putAll(Map p0, Object[] p1){ return null; } + public static Map synchronizedMap(Map p0){ return null; } + public static Map unmodifiableMap(Map p0){ return null; } + public static Map invertMap(Map p0){ return null; } + public static MultiValueMap multiValueMap(Map> p0){ return null; } + public static OrderedMap orderedMap(Map p0){ return null; } + public static Properties toProperties(Map p0){ return null; } + public static SortedMap fixedSizeSortedMap(SortedMap p0){ return null; } + public static SortedMap lazySortedMap(SortedMap p0, Factory p1){ return null; } + public static SortedMap lazySortedMap(SortedMap p0, Transformer p1){ return null; } + public static SortedMap predicatedSortedMap(SortedMap p0, Predicate p1, Predicate p2){ return null; } + public static SortedMap synchronizedSortedMap(SortedMap p0){ return null; } + public static SortedMap transformedSortedMap(SortedMap p0, Transformer p1, Transformer p2){ return null; } + public static SortedMap unmodifiableSortedMap(SortedMap p0){ return null; } + public static V getObject(Map p0, K p1){ return null; } + public static V getObject(Map p0, K p1, V p2){ return null; } + public static void populateMap(Map p0, Iterable p1, Transformer p2){} + public static void populateMap(MultiMap p0, Iterable p1, Transformer p2){} + public static Boolean getBoolean(Map p0, K p1){ return null; } + public static Boolean getBoolean(Map p0, K p1, Boolean p2){ return null; } + public static Byte getByte(Map p0, K p1){ return null; } + public static Byte getByte(Map p0, K p1, Byte p2){ return null; } + public static Double getDouble(Map p0, K p1){ return null; } + public static Double getDouble(Map p0, K p1, Double p2){ return null; } + public static Float getFloat(Map p0, K p1){ return null; } + public static Float getFloat(Map p0, K p1, Float p2){ return null; } + public static Integer getInteger(Map p0, K p1){ return null; } + public static Integer getInteger(Map p0, K p1, Integer p2){ return null; } + public static Long getLong(Map p0, K p1){ return null; } + public static Long getLong(Map p0, K p1, Long p2){ return null; } + public static Map getMap(Map p0, K p1){ return null; } + public static Map getMap(Map p0, K p1, Map p2){ return null; } + public static Number getNumber(Map p0, K p1){ return null; } + public static Number getNumber(Map p0, K p1, Number p2){ return null; } + public static Short getShort(Map p0, K p1){ return null; } + public static Short getShort(Map p0, K p1, Short p2){ return null; } + public static String getString(Map p0, K p1){ return null; } + public static String getString(Map p0, K p1, String p2){ return null; } + public static boolean getBooleanValue(Map p0, K p1){ return false; } + public static boolean getBooleanValue(Map p0, K p1, boolean p2){ return false; } + public static byte getByteValue(Map p0, K p1){ return 0; } + public static byte getByteValue(Map p0, K p1, byte p2){ return 0; } + public static double getDoubleValue(Map p0, K p1){ return 0; } + public static double getDoubleValue(Map p0, K p1, double p2){ return 0; } + public static float getFloatValue(Map p0, K p1){ return 0; } + public static float getFloatValue(Map p0, K p1, float p2){ return 0; } + public static int getIntValue(Map p0, K p1){ return 0; } + public static int getIntValue(Map p0, K p1, int p2){ return 0; } + public static long getLongValue(Map p0, K p1){ return 0; } + public static long getLongValue(Map p0, K p1, long p2){ return 0; } + public static short getShortValue(Map p0, K p1){ return 0; } + public static short getShortValue(Map p0, K p1, short p2){ return 0; } + public static void safeAddToMap(Map p0, K p1, Object p2){} + public static Map toMap(ResourceBundle p0){ return null; } + public static SortedMap EMPTY_SORTED_MAP = null; + public static boolean isEmpty(Map p0){ return false; } + public static boolean isNotEmpty(Map p0){ return false; } + public static int size(Map p0){ return 0; } + public static void debugPrint(PrintStream p0, Object p1, Map p2){} + public static void verbosePrint(PrintStream p0, Object p1, Map p2){} +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MultiMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MultiMap.java new file mode 100644 index 000000000000..13218c868e64 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MultiMap.java @@ -0,0 +1,17 @@ +// Generated automatically from org.apache.commons.collections4.MultiMap for testing purposes + +package org.apache.commons.collections4; + +import java.util.Collection; +import org.apache.commons.collections4.IterableMap; + +public interface MultiMap extends IterableMap +{ + Collection values(); + Object get(Object p0); + Object put(K p0, Object p1); + Object remove(Object p0); + boolean containsValue(Object p0); + boolean removeMapping(K p0, V p1); + int size(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedIterator.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedIterator.java new file mode 100644 index 000000000000..2faaa7766316 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedIterator.java @@ -0,0 +1,11 @@ +// Generated automatically from org.apache.commons.collections4.OrderedIterator for testing purposes + +package org.apache.commons.collections4; + +import java.util.Iterator; + +public interface OrderedIterator extends Iterator +{ + E previous(); + boolean hasPrevious(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMap.java new file mode 100644 index 000000000000..9ff7863414c3 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMap.java @@ -0,0 +1,15 @@ +// Generated automatically from org.apache.commons.collections4.OrderedMap for testing purposes + +package org.apache.commons.collections4; + +import org.apache.commons.collections4.IterableMap; +import org.apache.commons.collections4.OrderedMapIterator; + +public interface OrderedMap extends IterableMap +{ + K firstKey(); + K lastKey(); + K nextKey(K p0); + K previousKey(K p0); + OrderedMapIterator mapIterator(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMapIterator.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMapIterator.java new file mode 100644 index 000000000000..bdfb882198d7 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/OrderedMapIterator.java @@ -0,0 +1,12 @@ +// Generated automatically from org.apache.commons.collections4.OrderedMapIterator for testing purposes + +package org.apache.commons.collections4; + +import org.apache.commons.collections4.MapIterator; +import org.apache.commons.collections4.OrderedIterator; + +public interface OrderedMapIterator extends MapIterator, OrderedIterator +{ + K previous(); + boolean hasPrevious(); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Predicate.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Predicate.java new file mode 100644 index 000000000000..df3f5e6ee59f --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Predicate.java @@ -0,0 +1,9 @@ +// Generated automatically from org.apache.commons.collections4.Predicate for testing purposes + +package org.apache.commons.collections4; + + +public interface Predicate +{ + boolean evaluate(T p0); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Put.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Put.java new file mode 100644 index 000000000000..611f9d8689c2 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Put.java @@ -0,0 +1,12 @@ +// Generated automatically from org.apache.commons.collections4.Put for testing purposes + +package org.apache.commons.collections4; + +import java.util.Map; + +public interface Put +{ + Object put(K p0, V p1); + void clear(); + void putAll(Map p0); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Transformer.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Transformer.java new file mode 100644 index 000000000000..95ab79517125 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Transformer.java @@ -0,0 +1,9 @@ +// Generated automatically from org.apache.commons.collections4.Transformer for testing purposes + +package org.apache.commons.collections4; + + +public interface Transformer +{ + O transform(I p0); +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Unmodifiable.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Unmodifiable.java new file mode 100644 index 000000000000..34a162fb253a --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/Unmodifiable.java @@ -0,0 +1,8 @@ +// Generated automatically from org.apache.commons.collections4.Unmodifiable for testing purposes + +package org.apache.commons.collections4; + + +public interface Unmodifiable +{ +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java new file mode 100644 index 000000000000..5c6e256f9a2f --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractKeyValue.java @@ -0,0 +1,16 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.AbstractKeyValue for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import org.apache.commons.collections4.KeyValue; + +abstract public class AbstractKeyValue implements KeyValue +{ + protected AbstractKeyValue() {} + protected AbstractKeyValue(K p0, V p1){} + protected K setKey(K p0){ return null; } + protected V setValue(V p0){ return null; } + public K getKey(){ return null; } + public String toString(){ return null; } + public V getValue(){ return null; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java new file mode 100644 index 000000000000..6b15e1b71b48 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java @@ -0,0 +1,15 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.AbstractMapEntry for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.util.Map; +import org.apache.commons.collections4.keyvalue.AbstractKeyValue; + +abstract public class AbstractMapEntry extends Map.Entry implements Map.Entry +{ + protected AbstractMapEntry() {} + protected AbstractMapEntry(K p0, V p1){} + public V setValue(V p0){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntryDecorator.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntryDecorator.java new file mode 100644 index 000000000000..b19c12a1ff1a --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntryDecorator.java @@ -0,0 +1,19 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.AbstractMapEntryDecorator for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.util.Map; +import org.apache.commons.collections4.KeyValue; + +abstract public class AbstractMapEntryDecorator implements KeyValue, Map.Entry +{ + protected AbstractMapEntryDecorator() {} + protected Map.Entry getMapEntry(){ return null; } + public AbstractMapEntryDecorator(Map.Entry p0){} + public K getKey(){ return null; } + public String toString(){ return null; } + public V getValue(){ return null; } + public V setValue(V p0){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java new file mode 100644 index 000000000000..dcce7c4b18a9 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultKeyValue.java @@ -0,0 +1,20 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.DefaultKeyValue for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.util.Map; +import org.apache.commons.collections4.KeyValue; +import org.apache.commons.collections4.keyvalue.AbstractKeyValue; + +public class DefaultKeyValue extends AbstractKeyValue +{ + public DefaultKeyValue(){} + public DefaultKeyValue(K p0, V p1){} + public DefaultKeyValue(KeyValue p0){} + public DefaultKeyValue(Map.Entry p0){} + public K setKey(K p0){ return null; } + public Map.Entry toMapEntry(){ return null; } + public V setValue(V p0){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java new file mode 100644 index 000000000000..e05f7698a9a8 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java @@ -0,0 +1,15 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.DefaultMapEntry for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.util.Map; +import org.apache.commons.collections4.KeyValue; +import org.apache.commons.collections4.keyvalue.AbstractMapEntry; + +public class DefaultMapEntry extends AbstractMapEntry +{ + protected DefaultMapEntry() {} + public DefaultMapEntry(K p0, V p1){} + public DefaultMapEntry(KeyValue p0){} + public DefaultMapEntry(Map.Entry p0){} +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/TiedMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/TiedMapEntry.java new file mode 100644 index 000000000000..f05c978821bb --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/TiedMapEntry.java @@ -0,0 +1,19 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.TiedMapEntry for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.io.Serializable; +import java.util.Map; +import org.apache.commons.collections4.KeyValue; + +public class TiedMapEntry implements KeyValue, Map.Entry, Serializable +{ + protected TiedMapEntry() {} + public K getKey(){ return null; } + public String toString(){ return null; } + public TiedMapEntry(Map p0, K p1){} + public V getValue(){ return null; } + public V setValue(V p0){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java new file mode 100644 index 000000000000..20bd8a0880d1 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java @@ -0,0 +1,17 @@ +// Generated automatically from org.apache.commons.collections4.keyvalue.UnmodifiableMapEntry for testing purposes + +package org.apache.commons.collections4.keyvalue; + +import java.util.Map; +import org.apache.commons.collections4.KeyValue; +import org.apache.commons.collections4.Unmodifiable; +import org.apache.commons.collections4.keyvalue.AbstractMapEntry; + +public class UnmodifiableMapEntry extends AbstractMapEntry implements Unmodifiable +{ + protected UnmodifiableMapEntry() {} + public UnmodifiableMapEntry(K p0, V p1){} + public UnmodifiableMapEntry(KeyValue p0){} + public UnmodifiableMapEntry(Map.Entry p0){} + public V setValue(V p0){ return null; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractIterableMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractIterableMap.java new file mode 100644 index 000000000000..f23ac6babe28 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractIterableMap.java @@ -0,0 +1,12 @@ +// Generated automatically from org.apache.commons.collections4.map.AbstractIterableMap for testing purposes + +package org.apache.commons.collections4.map; + +import org.apache.commons.collections4.IterableMap; +import org.apache.commons.collections4.MapIterator; + +abstract public class AbstractIterableMap implements IterableMap +{ + public AbstractIterableMap(){} + public MapIterator mapIterator(){ return null; } +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractMapDecorator.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractMapDecorator.java new file mode 100644 index 000000000000..11f4964456c4 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/AbstractMapDecorator.java @@ -0,0 +1,31 @@ +// Generated automatically from org.apache.commons.collections4.map.AbstractMapDecorator for testing purposes + +package org.apache.commons.collections4.map; + +import java.util.Collection; +import java.util.Map; +import java.util.Set; +import org.apache.commons.collections4.map.AbstractIterableMap; + +abstract public class AbstractMapDecorator extends AbstractIterableMap +{ + Map map = null; + protected AbstractMapDecorator(){} + protected AbstractMapDecorator(Map p0){} + protected Map decorated(){ return null; } + public Collection values(){ return null; } + public Set keySet(){ return null; } + public Set> entrySet(){ return null; } + public String toString(){ return null; } + public V get(Object p0){ return null; } + public V put(K p0, V p1){ return null; } + public V remove(Object p0){ return null; } + public boolean containsKey(Object p0){ return false; } + public boolean containsValue(Object p0){ return false; } + public boolean equals(Object p0){ return false; } + public boolean isEmpty(){ return false; } + public int hashCode(){ return 0; } + public int size(){ return 0; } + public void clear(){} + public void putAll(Map p0){} +} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java new file mode 100644 index 000000000000..8bceaafe1225 --- /dev/null +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java @@ -0,0 +1,36 @@ +// Generated automatically from org.apache.commons.collections4.map.MultiValueMap for testing purposes + +package org.apache.commons.collections4.map; + +import java.io.Serializable; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import org.apache.commons.collections4.Factory; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.map.AbstractMapDecorator; + +public class MultiValueMap extends MultiMap implements MultiMap, Serializable +{ + protected Collection createCollection(int p0){ return null; } + protected MultiValueMap(Map p0, Factory p1){} + public Collection values(){ return null; } + public Collection getCollection(Object p0){ return null; } + public Iterator> iterator(){ return null; } + public Iterator iterator(Object p0){ return null; } + public MultiValueMap(){} + public Object put(K p0, Object p1){ return null; } + public Set> entrySet(){ return null; } + public boolean containsValue(Object p0){ return false; } + public boolean containsValue(Object p0, Object p1){ return false; } + public boolean putAll(K p0, Collection p1){ return false; } + public boolean removeMapping(Object p0, Object p1){ return false; } + public int size(Object p0){ return 0; } + public int totalSize(){ return 0; } + public static MultiValueMap multiValueMap(Map p0, Class p1){ return null; } + public static MultiValueMap multiValueMap(Map p0, Factory p1){ return null; } + public static MultiValueMap multiValueMap(Map> p0){ return null; } + public void clear(){} + public void putAll(Map p0){} +} From acc43fcacab233de338b153b44bdad636bfe6fcc Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Jun 2021 21:03:36 +0100 Subject: [PATCH 1618/1662] Add options file --- java/ql/test/library-tests/frameworks/apache-collections/options | 1 + 1 file changed, 1 insertion(+) create mode 100644 java/ql/test/library-tests/frameworks/apache-collections/options diff --git a/java/ql/test/library-tests/frameworks/apache-collections/options b/java/ql/test/library-tests/frameworks/apache-collections/options new file mode 100644 index 000000000000..7b0b8433220e --- /dev/null +++ b/java/ql/test/library-tests/frameworks/apache-collections/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-commons-collections4-4.4 \ No newline at end of file From 2e670c4050c366439ac44b494f5bdbb2692c1103 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Tue, 22 Jun 2021 21:02:39 +0100 Subject: [PATCH 1619/1662] Manually update automatically generated stubs --- .../org/apache/commons/collections4/MapUtils.java | 1 + .../commons/collections4/keyvalue/AbstractMapEntry.java | 2 +- .../commons/collections4/keyvalue/DefaultMapEntry.java | 2 ++ .../collections4/keyvalue/UnmodifiableMapEntry.java | 2 ++ .../apache/commons/collections4/map/MultiValueMap.java | 8 ++++++-- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java index a50e416eb0b9..1ec008c0caa6 100644 --- a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/MapUtils.java @@ -3,6 +3,7 @@ package org.apache.commons.collections4; import java.io.PrintStream; +import java.util.Collection; import java.util.Map; import java.util.Properties; import java.util.ResourceBundle; diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java index 6b15e1b71b48..1f5daf144819 100644 --- a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/AbstractMapEntry.java @@ -5,7 +5,7 @@ import java.util.Map; import org.apache.commons.collections4.keyvalue.AbstractKeyValue; -abstract public class AbstractMapEntry extends Map.Entry implements Map.Entry +abstract public class AbstractMapEntry extends AbstractKeyValue implements Map.Entry { protected AbstractMapEntry() {} protected AbstractMapEntry(K p0, V p1){} diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java index e05f7698a9a8..5fd732d592f4 100644 --- a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/DefaultMapEntry.java @@ -12,4 +12,6 @@ protected DefaultMapEntry() {} public DefaultMapEntry(K p0, V p1){} public DefaultMapEntry(KeyValue p0){} public DefaultMapEntry(Map.Entry p0){} + public V getValue(){ return null; } + public K getKey(){ return null; } } diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java index 20bd8a0880d1..2db2edab16f4 100644 --- a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/keyvalue/UnmodifiableMapEntry.java @@ -14,4 +14,6 @@ public UnmodifiableMapEntry(K p0, V p1){} public UnmodifiableMapEntry(KeyValue p0){} public UnmodifiableMapEntry(Map.Entry p0){} public V setValue(V p0){ return null; } + public V getValue(){ return null; } + public K getKey(){ return null; } } diff --git a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java index 8bceaafe1225..b09b192b9426 100644 --- a/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java +++ b/java/ql/test/stubs/apache-commons-collections4-4.4/org/apache/commons/collections4/map/MultiValueMap.java @@ -11,10 +11,10 @@ import org.apache.commons.collections4.MultiMap; import org.apache.commons.collections4.map.AbstractMapDecorator; -public class MultiValueMap extends MultiMap implements MultiMap, Serializable +public class MultiValueMap extends AbstractMapDecorator implements MultiMap, Serializable { protected Collection createCollection(int p0){ return null; } - protected MultiValueMap(Map p0, Factory p1){} + protected MultiValueMap(Map p0, Factory p1){} public Collection values(){ return null; } public Collection getCollection(Object p0){ return null; } public Iterator> iterator(){ return null; } @@ -33,4 +33,8 @@ public MultiValueMap(){} public static MultiValueMap multiValueMap(Map> p0){ return null; } public void clear(){} public void putAll(Map p0){} + public int size(){ return 0; } + public Object remove(Object key){ return null; } + public Object get(Object key){ return null; } + public boolean isEmpty(){ return false; } } From eb469c081115172ff5d37f9c63f117ff04de9a28 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 24 Jun 2021 11:13:10 +0100 Subject: [PATCH 1620/1662] Duplicate models for old package name The package name was org.apache.commons.collection until release 4.0. --- .../java/frameworks/apache/Collections.qll | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll index 5aaa7a2501d2..ba71731aae7b 100644 --- a/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll +++ b/java/ql/src/semmle/code/java/frameworks/apache/Collections.qll @@ -90,6 +90,44 @@ private class ApacheKeyValueModel extends SummaryModelCsv { "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value", + "org.apache.commons.collections.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;TiedMapEntry;true;TiedMapEntry;;;Argument[1];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value", + "org.apache.commons.collections.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" ] } } @@ -161,6 +199,66 @@ private class ApacheMapUtilsModel extends SummaryModelCsv { "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;emptyIfNull;;;Argument[0];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;fixedSizeMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;fixedSizeMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;fixedSizeSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;fixedSizeSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getMap;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getObject;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;getString;;;Argument[2];ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;iterableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;iterableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;iterableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;iterableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;orderedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;orderedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;populateMap;(Map,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value", + // Note that when lambdas are supported we should have more models for populateMap + "org.apache.commons.collections;MapUtils;true;predicatedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;predicatedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;predicatedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;predicatedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;safeAddToMap;;;Argument[1];MapKey of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;safeAddToMap;;;Argument[2];MapValue of Argument[0];value", + "org.apache.commons.collections;MapUtils;true;synchronizedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;synchronizedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;synchronizedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;synchronizedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;toMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;toMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;transformedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;transformedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;transformedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;transformedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;unmodifiableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value", + "org.apache.commons.collections;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" ] } } From 1bb33bca33213302fe216187a14757be405e32f9 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 23 Jun 2021 10:26:54 +0100 Subject: [PATCH 1621/1662] Add Apache Commons Collections to coverage reports --- java/documentation/library-coverage/frameworks.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/documentation/library-coverage/frameworks.csv b/java/documentation/library-coverage/frameworks.csv index 751883eaf4b5..de139173fc01 100644 --- a/java/documentation/library-coverage/frameworks.csv +++ b/java/documentation/library-coverage/frameworks.csv @@ -2,9 +2,10 @@ Framework name,URL,Package prefixes Java Standard Library,,java.* Java extensions,,javax.* Google Guava,https://guava.dev/,com.google.common.* +Apache Commons Collections,https://commons.apache.org/proper/commons-collections/,org.apache.commons.collections org.apache.commons.collections4 Apache Commons IO,https://commons.apache.org/proper/commons-io/,org.apache.commons.io Apache Commons Lang,https://commons.apache.org/proper/commons-lang/,org.apache.commons.lang3 Apache Commons Text,https://commons.apache.org/proper/commons-text/,org.apache.commons.text Apache HttpComponents,https://hc.apache.org/,org.apache.hc.core5.* org.apache.http Android,,android.* -Spring,https://spring.io/,org.springframework.* \ No newline at end of file +Spring,https://spring.io/,org.springframework.* From 2fd4c9f1b9c3d17ade72e3a9a5dc97e438d72f08 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 24 Jun 2021 16:57:16 +0100 Subject: [PATCH 1622/1662] Manually improve tests --- .../frameworks/apache-collections/Test.java | 237 ++++++++++-------- .../frameworks/apache-collections/test.ql | 12 +- 2 files changed, 137 insertions(+), 112 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/apache-collections/Test.java b/java/ql/test/library-tests/frameworks/apache-collections/Test.java index 7448c32caeae..d7c070fe9a3a 100644 --- a/java/ql/test/library-tests/frameworks/apache-collections/Test.java +++ b/java/ql/test/library-tests/frameworks/apache-collections/Test.java @@ -3,6 +3,8 @@ import java.util.Map; import java.util.ResourceBundle; import java.util.SortedMap; +import java.util.TreeMap; +import java.util.Vector; import org.apache.commons.collections4.Factory; import org.apache.commons.collections4.IterableMap; import org.apache.commons.collections4.IterableSortedMap; @@ -23,12 +25,35 @@ //Test case generated by GenerateFlowTestCase.ql public class Test { - Object getMapKey(Object container) { return null; } - Object getMapValue(Object container) { return null; } - Object newWithArrayElement(Object element) { return null; } - Object newWithElement(Object element) { return null; } - Object newWithMapKey(Object element) { return null; } - Object newWithMapValue(Object element) { return null; } + static Object getMapKey(AbstractKeyValue container) { return container.getKey(); } + static Object getMapKeyFromEntry(Map.Entry container) { return container.getKey(); } + static Object getMapKey(AbstractMapEntryDecorator container) { return container.getKey(); } + static Object getMapKey(Map container) { return container.keySet().iterator().next(); } + static Object getMapValue(AbstractKeyValue container) { return container.getValue(); } + static Object getMapValueFromEntry(Map.Entry container) { return container.getValue(); } + static Object getMapValue(AbstractMapEntryDecorator container) { return container.getValue(); } + static Object getMapValue(Map container) { return container.get(null); } + + Object[] newWithArrayElement(Object element) { return new Object[] {element}; } + Object newWithElement(Object element) { Vector v = new Vector(); v.add((String)element); return v; } + + MyAbstractKeyValue newMAKVWithMapKey(Object element) { return new MyAbstractKeyValue(element,null); } + DefaultKeyValue newDKVWithMapKey(Object element) { return new DefaultKeyValue(element,null); } + MyAbstractMapEntry newMAMEWithMapKey(Object element) { return new MyAbstractMapEntry(element,null); } + MyAbstractMapEntryDecorator newMAMEDWithMapKey(Object element) { return new MyAbstractMapEntryDecorator(newMAMEWithMapKey(element)); } + ResourceBundle newRBWithMapKey(Object element) { return (ResourceBundle)null; } + Map newTreeMapWithMapKey(Object element) { Map m = new TreeMap(); m.put(element,null); return m; } + TiedMapEntry newTMEWithMapKey(Object element) { return new TiedMapEntry(newTreeMapWithMapKey(element),element); } + + MyAbstractKeyValue newMAKVWithMapValue(Object element) { return new MyAbstractKeyValue(null,element); } + DefaultKeyValue newDKVWithMapValue(Object element) { return new DefaultKeyValue(null,element); } + MyAbstractMapEntry newMAMEWithMapValue(Object element) { return new MyAbstractMapEntry(null,element); } + MyAbstractMapEntryDecorator newMAMEDWithMapValue(Object element) { return new MyAbstractMapEntryDecorator(newMAMEWithMapValue(element)); } + ResourceBundle newRBWithMapValue(Object element) { return (ResourceBundle)null; } + Map newTreeMapWithMapValue(Object element) { Map m = new TreeMap(); m.put(null,element); return m; } + TiedMapEntry newTMEWithMapValue(Object element) { return new TiedMapEntry(newTreeMapWithMapValue(element),null); } + UnmodifiableMapEntry newUMEWithMapValue(Object element) { return new UnmodifiableMapEntry(null,element); } + Object source() { return null; } void sink(Object o) { } @@ -99,21 +124,21 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); out = in.setKey(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.mySetKey(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.mySetKey((Object)null); sink(out); // $hasValueFlow } @@ -148,56 +173,56 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - UnmodifiableMapEntry in = (UnmodifiableMapEntry)newWithMapValue(source()); + UnmodifiableMapEntry in = (UnmodifiableMapEntry)newUMEWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (MyAbstractMapEntry)newWithMapValue(source()); + AbstractMapEntry in = (MyAbstractMapEntry)newMAMEWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (MyAbstractMapEntry)newWithMapValue(source()); + AbstractMapEntry in = (MyAbstractMapEntry)newMAMEWithMapValue(source()); out = in.setValue((Object)null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.mySetValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.mySetValue((Object)null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newWithMapKey(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } @@ -218,70 +243,70 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map.Entry in = (Map.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); out = new MyAbstractMapEntryDecorator(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map.Entry in = (Map.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); out = new MyAbstractMapEntryDecorator(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" Map.Entry out = null; - MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); + MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); out = in.myGetMapEntry(); - sink(getMapKey(out)); // $hasValueFlow + sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" Map.Entry out = null; - MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); + MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); out = in.myGetMapEntry(); - sink(getMapValue(out)); // $hasValueFlow + sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - Map.Entry in = (Map.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); out = new DefaultKeyValue(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - Map.Entry in = (Map.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); out = new DefaultKeyValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - KeyValue in = (KeyValue)newWithMapKey(source()); + KeyValue in = (KeyValue)newMAKVWithMapKey(source()); out = new DefaultKeyValue(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - KeyValue in = (KeyValue)newWithMapValue(source()); + KeyValue in = (KeyValue)newMAKVWithMapValue(source()); out = new DefaultKeyValue(in); sink(getMapValue(out)); // $hasValueFlow } @@ -302,42 +327,42 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" Map.Entry out = null; - DefaultKeyValue in = (DefaultKeyValue)newWithMapKey(source()); + DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapKey(source()); out = in.toMapEntry(); - sink(getMapKey(out)); // $hasValueFlow + sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" Map.Entry out = null; - DefaultKeyValue in = (DefaultKeyValue)newWithMapValue(source()); + DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); out = in.toMapEntry(); - sink(getMapValue(out)); // $hasValueFlow + sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - Map.Entry in = (Map.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); out = new DefaultMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultMapEntry out = null; - Map.Entry in = (Map.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); out = new DefaultMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - KeyValue in = (KeyValue)newWithMapKey(source()); + KeyValue in = (KeyValue)newMAKVWithMapKey(source()); out = new DefaultMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultMapEntry out = null; - KeyValue in = (KeyValue)newWithMapValue(source()); + KeyValue in = (KeyValue)newMAKVWithMapValue(source()); out = new DefaultMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } @@ -360,40 +385,40 @@ public void test() { TiedMapEntry out = null; Object in = (Object)source(); out = new TiedMapEntry(null, in); - sink(getMapKey(out)); // $hasValueFlow + sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value" TiedMapEntry out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = new TiedMapEntry(in, null); - sink(getMapValue(out)); // $hasValueFlow + sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - Map.Entry in = (Map.Entry)newWithMapKey(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); out = new UnmodifiableMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - Map.Entry in = (Map.Entry)newWithMapValue(source()); + Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); out = new UnmodifiableMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - KeyValue in = (KeyValue)newWithMapKey(source()); + KeyValue in = (KeyValue)newMAKVWithMapKey(source()); out = new UnmodifiableMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - KeyValue in = (KeyValue)newWithMapValue(source()); + KeyValue in = (KeyValue)newMAKVWithMapValue(source()); out = new UnmodifiableMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } @@ -414,56 +439,56 @@ public void test() { { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - TiedMapEntry in = (TiedMapEntry)newWithMapKey(source()); + TiedMapEntry in = (TiedMapEntry)newTMEWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - KeyValue in = (KeyValue)newWithMapKey(source()); + KeyValue in = (KeyValue)newMAKVWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapKey(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newWithMapKey(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - TiedMapEntry in = (TiedMapEntry)newWithMapValue(source()); + TiedMapEntry in = (TiedMapEntry)newTMEWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - KeyValue in = (KeyValue)newWithMapValue(source()); + KeyValue in = (KeyValue)newMAKVWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newWithMapValue(source()); + AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newWithMapValue(source()); + AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } @@ -477,28 +502,28 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.fixedSizeMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.fixedSizeMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.fixedSizeSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.fixedSizeSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } @@ -512,14 +537,14 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" Map out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getMap(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" Map out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getMap(in, null); sink(out); // $hasValueFlow } @@ -533,14 +558,14 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" Object out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getObject(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" Object out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getObject(in, null); sink(out); // $hasValueFlow } @@ -554,168 +579,168 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" String out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getString(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" String out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.getString(in, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.invertMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.invertMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.iterableMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.iterableMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableSortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.iterableSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableSortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.iterableSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.lazyMap(in, (Transformer)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.lazyMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.lazyMap(in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.lazyMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.lazySortedMap(in, (Transformer)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.lazySortedMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.lazySortedMap(in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.lazySortedMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in, (Class)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in, (Class)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" OrderedMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.orderedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" OrderedMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.orderedMap(in); sink(getMapValue(out)); // $hasValueFlow } @@ -738,28 +763,28 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.predicatedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.predicatedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.predicatedSortedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.predicatedSortedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } @@ -822,28 +847,28 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithMapKey(source())); + Object[] in = (Object[])newWithArrayElement(newMAKVWithMapKey(source())); MapUtils.putAll(out, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithMapKey(source())); + Object[] in = (Object[])newWithArrayElement(newMAKVWithMapKey(source())); out = MapUtils.putAll(null, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithMapValue(source())); + Object[] in = (Object[])newWithArrayElement(newMAKVWithMapValue(source())); MapUtils.putAll(out, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithMapValue(source())); + Object[] in = (Object[])newWithArrayElement(newMAKVWithMapValue(source())); out = MapUtils.putAll(null, in); sink(getMapValue(out)); // $hasValueFlow } @@ -864,98 +889,98 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.synchronizedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.synchronizedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.synchronizedSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.synchronizedSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - ResourceBundle in = (ResourceBundle)newWithMapKey(source()); + ResourceBundle in = (ResourceBundle)newRBWithMapKey(source()); out = MapUtils.toMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - ResourceBundle in = (ResourceBundle)newWithMapValue(source()); + ResourceBundle in = (ResourceBundle)newRBWithMapValue(source()); out = MapUtils.toMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.transformedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.transformedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.transformedSortedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.transformedSortedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapKey(source()); + Map in = (Map)newTreeMapWithMapKey(source()); out = MapUtils.unmodifiableMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newWithMapValue(source()); + Map in = (Map)newTreeMapWithMapValue(source()); out = MapUtils.unmodifiableMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapKey(source()); + SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); out = MapUtils.unmodifiableSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newWithMapValue(source()); + SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); out = MapUtils.unmodifiableSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } diff --git a/java/ql/test/library-tests/frameworks/apache-collections/test.ql b/java/ql/test/library-tests/frameworks/apache-collections/test.ql index 4ec971af08b8..611fcd302ee8 100644 --- a/java/ql/test/library-tests/frameworks/apache-collections/test.ql +++ b/java/ql/test/library-tests/frameworks/apache-collections/test.ql @@ -9,12 +9,8 @@ class SummaryModelTest extends SummaryModelCsv { row = [ //"package;type;overrides;name;signature;ext;inputspec;outputspec;kind", - "generatedtest;Test;false;getMapValue;;;MapValue of Argument[0];ReturnValue;value", - "generatedtest;Test;false;getMapKey;;;MapKey of Argument[0];ReturnValue;value", - "generatedtest;Test;false;newWithMapValue;;;Argument[0];MapValue of ReturnValue;value", - "generatedtest;Test;false;newWithElement;;;Argument[0];Element of ReturnValue;value", - "generatedtest;Test;false;newWithArrayElement;;;Argument[0];ArrayElement of ReturnValue;value", - "generatedtest;Test;false;newWithMapKey;;;Argument[0];MapKey of ReturnValue;value" + "generatedtest;Test;false;newRBWithMapValue;;;Argument[0];MapValue of ReturnValue;value", + "generatedtest;Test;false;newRBWithMapKey;;;Argument[0];MapKey of ReturnValue;value" ] } } @@ -29,6 +25,8 @@ class ValueFlowConf extends DataFlow::Configuration { override predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") } + + override int fieldFlowBranchLimit() { result = 1000 } } class TaintFlowConf extends TaintTracking::Configuration { @@ -41,6 +39,8 @@ class TaintFlowConf extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") } + + override int fieldFlowBranchLimit() { result = 1000 } } class HasFlowTest extends InlineExpectationsTest { From e2803800dc9e6b4f937383abceec8a6cd5d0d5a5 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Fri, 25 Jun 2021 11:22:26 +0100 Subject: [PATCH 1623/1662] Add change note --- .../2021-06-25-apache-collections-maputils-keyvalue.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 java/change-notes/2021-06-25-apache-collections-maputils-keyvalue.md diff --git a/java/change-notes/2021-06-25-apache-collections-maputils-keyvalue.md b/java/change-notes/2021-06-25-apache-collections-maputils-keyvalue.md new file mode 100644 index 000000000000..d3949b3b3df6 --- /dev/null +++ b/java/change-notes/2021-06-25-apache-collections-maputils-keyvalue.md @@ -0,0 +1,2 @@ +lgtm,codescanning +* Added models for the package `keyvalue` and the classes `KeyValue` and `MapUtils` from Apache Commons Collections. This may lead to more results from any query using data-flow analysis where a relevant path uses one of these container types. From 044ecc51e532bf28149bcef6f9feff5c4e9c9446 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Fri, 25 Jun 2021 13:51:18 +0100 Subject: [PATCH 1624/1662] Manually improve tests #2 --- .../frameworks/apache-collections/Test.java | 258 +++++++++--------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/java/ql/test/library-tests/frameworks/apache-collections/Test.java b/java/ql/test/library-tests/frameworks/apache-collections/Test.java index d7c070fe9a3a..f043b30399ed 100644 --- a/java/ql/test/library-tests/frameworks/apache-collections/Test.java +++ b/java/ql/test/library-tests/frameworks/apache-collections/Test.java @@ -35,14 +35,14 @@ public class Test { static Object getMapValue(Map container) { return container.get(null); } Object[] newWithArrayElement(Object element) { return new Object[] {element}; } - Object newWithElement(Object element) { Vector v = new Vector(); v.add((String)element); return v; } + Iterable newWithElement(String element) { Vector v = new Vector(); v.add(element); return v; } MyAbstractKeyValue newMAKVWithMapKey(Object element) { return new MyAbstractKeyValue(element,null); } DefaultKeyValue newDKVWithMapKey(Object element) { return new DefaultKeyValue(element,null); } MyAbstractMapEntry newMAMEWithMapKey(Object element) { return new MyAbstractMapEntry(element,null); } MyAbstractMapEntryDecorator newMAMEDWithMapKey(Object element) { return new MyAbstractMapEntryDecorator(newMAMEWithMapKey(element)); } ResourceBundle newRBWithMapKey(Object element) { return (ResourceBundle)null; } - Map newTreeMapWithMapKey(Object element) { Map m = new TreeMap(); m.put(element,null); return m; } + SortedMap newTreeMapWithMapKey(Object element) { SortedMap m = new TreeMap(); m.put(element,null); return m; } TiedMapEntry newTMEWithMapKey(Object element) { return new TiedMapEntry(newTreeMapWithMapKey(element),element); } MyAbstractKeyValue newMAKVWithMapValue(Object element) { return new MyAbstractKeyValue(null,element); } @@ -50,7 +50,7 @@ public class Test { MyAbstractMapEntry newMAMEWithMapValue(Object element) { return new MyAbstractMapEntry(null,element); } MyAbstractMapEntryDecorator newMAMEDWithMapValue(Object element) { return new MyAbstractMapEntryDecorator(newMAMEWithMapValue(element)); } ResourceBundle newRBWithMapValue(Object element) { return (ResourceBundle)null; } - Map newTreeMapWithMapValue(Object element) { Map m = new TreeMap(); m.put(null,element); return m; } + SortedMap newTreeMapWithMapValue(Object element) { SortedMap m = new TreeMap(); m.put(null,element); return m; } TiedMapEntry newTMEWithMapValue(Object element) { return new TiedMapEntry(newTreeMapWithMapValue(element),null); } UnmodifiableMapEntry newUMEWithMapValue(Object element) { return new UnmodifiableMapEntry(null,element); } @@ -96,399 +96,399 @@ public void test() { { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[0];MapKey of Argument[-1];value" AbstractKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out = new MyAbstractKeyValue(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;AbstractKeyValue;;;Argument[1];MapValue of Argument[-1];value" AbstractKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out = new MyAbstractKeyValue(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out.setKey(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;Argument[0];MapKey of Argument[-1];value" MyAbstractKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out.mySetKey(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); + DefaultKeyValue in = newDKVWithMapValue(source()); out = in.setKey(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); + MyAbstractKeyValue in = newMAKVWithMapValue(source()); out = in.mySetKey(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setKey;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); + MyAbstractKeyValue in = newMAKVWithMapValue(source()); out = in.mySetKey((Object)null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out.setValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out.setValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" AbstractMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out.setValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;Argument[0];MapValue of Argument[-1];value" MyAbstractKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out.mySetValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - UnmodifiableMapEntry in = (UnmodifiableMapEntry)newUMEWithMapValue(source()); + UnmodifiableMapEntry in = newUMEWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); + DefaultKeyValue in = newDKVWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (MyAbstractMapEntry)newMAMEWithMapValue(source()); + AbstractMapEntry in = newMAMEWithMapValue(source()); out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntry in = (MyAbstractMapEntry)newMAMEWithMapValue(source()); - out = in.setValue((Object)null); + AbstractMapEntry in = newMAMEWithMapValue(source()); + out = in.setValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); + MyAbstractKeyValue in = newMAKVWithMapValue(source()); out = in.mySetValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;setValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - MyAbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); - out = in.mySetValue((Object)null); + MyAbstractKeyValue in = newMAKVWithMapValue(source()); + out = in.mySetValue(null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapKey(source()); + AbstractKeyValue in = newMAKVWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractKeyValue;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); + AbstractKeyValue in = newMAKVWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[0];MapKey of Argument[-1];value" AbstractMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new MyAbstractMapEntry(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntry;true;AbstractMapEntry;;;Argument[1];MapValue of Argument[-1];value" AbstractMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new MyAbstractMapEntry(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapKey of Argument[0];MapKey of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); + Map.Entry in = newMAMEWithMapKey(source()); out = new MyAbstractMapEntryDecorator(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;AbstractMapEntryDecorator;;;MapValue of Argument[0];MapValue of Argument[-1];value" AbstractMapEntryDecorator out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); + Map.Entry in = newMAMEWithMapValue(source()); out = new MyAbstractMapEntryDecorator(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" Map.Entry out = null; - MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); + MyAbstractMapEntryDecorator in = newMAMEDWithMapKey(source()); out = in.myGetMapEntry(); sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;getMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" Map.Entry out = null; - MyAbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); + MyAbstractMapEntryDecorator in = newMAMEDWithMapValue(source()); out = in.myGetMapEntry(); sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapKey of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); + AbstractMapEntryDecorator in = newMAMEDWithMapKey(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;AbstractMapEntryDecorator;true;toString;;;MapValue of Argument[-1];ReturnValue;taint" String out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); + AbstractMapEntryDecorator in = newMAMEDWithMapValue(source()); out = in.toString(); sink(out); // $hasTaintFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); + Map.Entry in = newMAMEWithMapKey(source()); out = new DefaultKeyValue(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); + Map.Entry in = newMAMEWithMapValue(source()); out = new DefaultKeyValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - KeyValue in = (KeyValue)newMAKVWithMapKey(source()); + KeyValue in = newMAKVWithMapKey(source()); out = new DefaultKeyValue(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultKeyValue out = null; - KeyValue in = (KeyValue)newMAKVWithMapValue(source()); + KeyValue in = newMAKVWithMapValue(source()); out = new DefaultKeyValue(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[0];MapKey of Argument[-1];value" DefaultKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out = new DefaultKeyValue(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;DefaultKeyValue;(Object,Object);;Argument[1];MapValue of Argument[-1];value" DefaultKeyValue out = null; - Object in = (Object)source(); + Object in = source(); out = new DefaultKeyValue(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapKey of Argument[-1];MapKey of ReturnValue;value" Map.Entry out = null; - DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapKey(source()); + DefaultKeyValue in = newDKVWithMapKey(source()); out = in.toMapEntry(); sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultKeyValue;true;toMapEntry;;;MapValue of Argument[-1];MapValue of ReturnValue;value" Map.Entry out = null; - DefaultKeyValue in = (DefaultKeyValue)newDKVWithMapValue(source()); + DefaultKeyValue in = newDKVWithMapValue(source()); out = in.toMapEntry(); sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); + Map.Entry in = newMAMEWithMapKey(source()); out = new DefaultMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultMapEntry out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); + Map.Entry in = newMAMEWithMapValue(source()); out = new DefaultMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - KeyValue in = (KeyValue)newMAKVWithMapKey(source()); + KeyValue in = newMAKVWithMapKey(source()); out = new DefaultMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" DefaultMapEntry out = null; - KeyValue in = (KeyValue)newMAKVWithMapValue(source()); + KeyValue in = newMAKVWithMapValue(source()); out = new DefaultMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value" DefaultMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new DefaultMapEntry(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;DefaultMapEntry;true;DefaultMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value" DefaultMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new DefaultMapEntry(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;Argument[1];MapKey of Argument[-1];value" TiedMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new TiedMapEntry(null, in); sink(getMapKeyFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;TiedMapEntry;true;TiedMapEntry;;;MapValue of Argument[0];MapValue of Argument[-1];value" TiedMapEntry out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = new TiedMapEntry(in, null); sink(getMapValueFromEntry(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapKey of Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapKey(source()); + Map.Entry in = newMAMEWithMapKey(source()); out = new UnmodifiableMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Entry);;MapValue of Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - Map.Entry in = (Map.Entry)newMAKVWithMapValue(source()); + Map.Entry in = newMAMEWithMapValue(source()); out = new UnmodifiableMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapKey of Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - KeyValue in = (KeyValue)newMAKVWithMapKey(source()); + KeyValue in = newMAKVWithMapKey(source()); out = new UnmodifiableMapEntry(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(KeyValue);;MapValue of Argument[0];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - KeyValue in = (KeyValue)newMAKVWithMapValue(source()); + KeyValue in = newMAKVWithMapValue(source()); out = new UnmodifiableMapEntry(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[0];MapKey of Argument[-1];value" UnmodifiableMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new UnmodifiableMapEntry(in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4.keyvalue;UnmodifiableMapEntry;true;UnmodifiableMapEntry;(Object,Object);;Argument[1];MapValue of Argument[-1];value" UnmodifiableMapEntry out = null; - Object in = (Object)source(); + Object in = source(); out = new UnmodifiableMapEntry(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - TiedMapEntry in = (TiedMapEntry)newTMEWithMapKey(source()); + TiedMapEntry in = newTMEWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - KeyValue in = (KeyValue)newMAKVWithMapKey(source()); + KeyValue in = newMAKVWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapKey(source()); + AbstractMapEntryDecorator in = newMAMEDWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getKey;;;MapKey of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapKey(source()); + AbstractKeyValue in = newMAKVWithMapKey(source()); out = in.getKey(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - TiedMapEntry in = (TiedMapEntry)newTMEWithMapValue(source()); + TiedMapEntry in = newTMEWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - KeyValue in = (KeyValue)newMAKVWithMapValue(source()); + KeyValue in = newMAKVWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractMapEntryDecorator in = (MyAbstractMapEntryDecorator)newMAMEDWithMapValue(source()); + AbstractMapEntryDecorator in = newMAMEDWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;KeyValue;true;getValue;;;MapValue of Argument[-1];ReturnValue;value" Object out = null; - AbstractKeyValue in = (MyAbstractKeyValue)newMAKVWithMapValue(source()); + AbstractKeyValue in = newMAKVWithMapValue(source()); out = in.getValue(); sink(out); // $hasValueFlow } @@ -502,28 +502,28 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.fixedSizeMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.fixedSizeMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.fixedSizeSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;fixedSizeSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.fixedSizeSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } @@ -537,35 +537,35 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getMap(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getMap;;;MapValue of Argument[0];ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getMap(in, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getObject;;;Argument[2];ReturnValue;value" Object out = null; - Object in = (Object)source(); + Object in = source(); out = MapUtils.getObject(null, null, in); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" Object out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getObject(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getObject;;;MapValue of Argument[0];ReturnValue;value" Object out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getObject(in, null); sink(out); // $hasValueFlow } @@ -579,175 +579,175 @@ public void test() { { // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" String out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getString(in, null, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;getString;;;MapValue of Argument[0];ReturnValue;value" String out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.getString(in, null); sink(out); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapKey of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.invertMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;invertMap;;;MapValue of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.invertMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.iterableMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.iterableMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableSortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.iterableSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;iterableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableSortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.iterableSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.lazyMap(in, (Transformer)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.lazyMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.lazyMap(in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazyMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.lazyMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.lazySortedMap(in, (Transformer)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.lazySortedMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.lazySortedMap(in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;lazySortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.lazySortedMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in, (Factory)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in, (Class)null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.multiValueMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in, (Factory)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in, (Class)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;multiValueMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" MultiValueMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.multiValueMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" OrderedMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.orderedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;orderedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" OrderedMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.orderedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;populateMap;(Map,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value" Map out = null; - Iterable in = (Iterable)newWithElement(source()); + Iterable in = newWithElement((String)source()); MapUtils.populateMap(out, in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } @@ -756,231 +756,231 @@ public void test() { // which overload it should choose unless you put the generic types in correctly // "org.apache.commons.collections4;MapUtils;true;populateMap;(MultiMap,Iterable,Transformer);;Element of Argument[1];MapValue of Argument[0];value" MultiMap out = null; - Iterable in = (Iterable)newWithElement(source()); + Iterable in = newWithElement((String)source()); MapUtils.populateMap(out, in, (Transformer)null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.predicatedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.predicatedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.predicatedSortedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;predicatedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.predicatedSortedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(source()); + Object[] in = newWithArrayElement(source()); MapUtils.putAll(out, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapKey of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(source()); + Object[] in = newWithArrayElement(source()); out = MapUtils.putAll(null, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(source()); + Object[] in = newWithArrayElement(source()); MapUtils.putAll(out, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of Argument[1];MapValue of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(source()); + Object[] in = newWithArrayElement(source()); out = MapUtils.putAll(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + Object[] in = newWithArrayElement(newWithArrayElement(source())); MapUtils.putAll(out, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapKey of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + Object[] in = newWithArrayElement(newWithArrayElement(source())); out = MapUtils.putAll(null, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + Object[] in = newWithArrayElement(newWithArrayElement(source())); MapUtils.putAll(out, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;ArrayElement of ArrayElement of Argument[1];MapValue of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newWithArrayElement(source())); + Object[] in = newWithArrayElement(newWithArrayElement(source())); out = MapUtils.putAll(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newMAKVWithMapKey(source())); + Object[] in = newWithArrayElement(newMAKVWithMapKey(source())); MapUtils.putAll(out, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapKey of ArrayElement of Argument[1];MapKey of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newMAKVWithMapKey(source())); + Object[] in = newWithArrayElement(newMAKVWithMapKey(source())); out = MapUtils.putAll(null, in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of Argument[0];value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newMAKVWithMapValue(source())); + Object[] in = newWithArrayElement(newMAKVWithMapValue(source())); MapUtils.putAll(out, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;putAll;;;MapValue of ArrayElement of Argument[1];MapValue of ReturnValue;value" Map out = null; - Object[] in = (Object[])newWithArrayElement(newMAKVWithMapValue(source())); + Object[] in = newWithArrayElement(newMAKVWithMapValue(source())); out = MapUtils.putAll(null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[1];MapKey of Argument[0];value" Map out = null; - Object in = (Object)source(); + Object in = source(); MapUtils.safeAddToMap(out, in, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;safeAddToMap;;;Argument[2];MapValue of Argument[0];value" Map out = null; - Object in = (Object)source(); + Object in = source(); MapUtils.safeAddToMap(out, null, in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.synchronizedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.synchronizedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.synchronizedSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;synchronizedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.synchronizedSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - ResourceBundle in = (ResourceBundle)newRBWithMapKey(source()); + ResourceBundle in = newRBWithMapKey(source()); out = MapUtils.toMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;toMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - ResourceBundle in = (ResourceBundle)newRBWithMapValue(source()); + ResourceBundle in = newRBWithMapValue(source()); out = MapUtils.toMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.transformedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" IterableMap out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.transformedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.transformedSortedMap(in, null, null); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;transformedSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.transformedSortedMap(in, null, null); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapKey(source()); + Map in = newTreeMapWithMapKey(source()); out = MapUtils.unmodifiableMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" Map out = null; - Map in = (Map)newTreeMapWithMapValue(source()); + Map in = newTreeMapWithMapValue(source()); out = MapUtils.unmodifiableMap(in); sink(getMapValue(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapKey of Argument[0];MapKey of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapKey(source()); + SortedMap in = newTreeMapWithMapKey(source()); out = MapUtils.unmodifiableSortedMap(in); sink(getMapKey(out)); // $hasValueFlow } { // "org.apache.commons.collections4;MapUtils;true;unmodifiableSortedMap;;;MapValue of Argument[0];MapValue of ReturnValue;value" SortedMap out = null; - SortedMap in = (SortedMap)newTreeMapWithMapValue(source()); + SortedMap in = newTreeMapWithMapValue(source()); out = MapUtils.unmodifiableSortedMap(in); sink(getMapValue(out)); // $hasValueFlow } From 5aeeb3a801f15e40a1b79d7f63bc62c44a10c103 Mon Sep 17 00:00:00 2001 From: Timo Mueller Date: Fri, 25 Jun 2021 15:37:47 +0200 Subject: [PATCH 1625/1662] Fixed and validated qhelp --- ...rverFactoryEnvironmentInitialisation.java} | 0 ...nectorServerEnvironmentInitalisation.java} | 0 ...secureRmiJmxEnvironmentConfiguration.qhelp | 23 ++++--------------- .../CWE/CWE-665/example_filter_java_10.java | 4 ++++ .../CWE/CWE-665/example_filter_java_9.java | 9 ++++++++ 5 files changed, 17 insertions(+), 19 deletions(-) rename java/ql/src/experimental/Security/CWE/CWE-665/{CorrectJmxEnvironmentInitialisation.java => CorrectJMXConnectorServerFactoryEnvironmentInitialisation.java} (100%) rename java/ql/src/experimental/Security/CWE/CWE-665/{CorrectRmiEnvironmentInitialisation.java => CorrectRMIConnectorServerEnvironmentInitalisation.java} (100%) create mode 100644 java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_10.java create mode 100644 java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_9.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/CorrectJmxEnvironmentInitialisation.java b/java/ql/src/experimental/Security/CWE/CWE-665/CorrectJMXConnectorServerFactoryEnvironmentInitialisation.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-665/CorrectJmxEnvironmentInitialisation.java rename to java/ql/src/experimental/Security/CWE/CWE-665/CorrectJMXConnectorServerFactoryEnvironmentInitialisation.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/CorrectRmiEnvironmentInitialisation.java b/java/ql/src/experimental/Security/CWE/CWE-665/CorrectRMIConnectorServerEnvironmentInitalisation.java similarity index 100% rename from java/ql/src/experimental/Security/CWE/CWE-665/CorrectRmiEnvironmentInitialisation.java rename to java/ql/src/experimental/Security/CWE/CWE-665/CorrectRMIConnectorServerEnvironmentInitalisation.java diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp index 55d5e3c63e27..c74d5a9d4b4d 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.qhelp @@ -26,26 +26,11 @@ The filter should (ideally) only allow java.lang.String and disallow all other c

    The key-value pair can be set as following:

    - -String stringsOnlyFilter = "java.lang.String;!*"; // Deny everything but java.lang.String - -Map<String, Object> env = new HashMap<String, Object>; -env.put(RMIConnectorServer.CREDENTIALS_FILTER_PATTERN, stringsOnlyFilter); - +

    For applications using Java 6u113 to 9:

    - -// This is deprecated in Java 10+ ! -Map<String, Object> env = new HashMap<String, Object>; -env.put ( - "jmx.remote.rmi.server.credential.types", - new String[]{ - String[].class.getName(), - String.class.getName() - } - ); - +

    Please note that the JMX-RMI service is vulnerable in the default configuration. For this reason an initialization with a null environment is also vulnerable.

    @@ -56,11 +41,11 @@ For this reason an initialization with a null environment is also v

    The first example shows how an JMX server is initialized securely with the JMXConnectorServerFactory.newJMXConnectorServer() call.

    - +

    The second example shows how a JMX Server is initialized securely if the RMIConnectorServer class is used.

    - + diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_10.java b/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_10.java new file mode 100644 index 000000000000..0ffc7f282223 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_10.java @@ -0,0 +1,4 @@ +String stringsOnlyFilter = "java.lang.String;!*"; // Deny everything but java.lang.String + +Map env = new HashMap; +env.put(RMIConnectorServer.CREDENTIALS_FILTER_PATTERN, stringsOnlyFilter); \ No newline at end of file diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_9.java b/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_9.java new file mode 100644 index 000000000000..4001f63bb815 --- /dev/null +++ b/java/ql/src/experimental/Security/CWE/CWE-665/example_filter_java_9.java @@ -0,0 +1,9 @@ +// This is deprecated in Java 10+ ! +Map; env = new HashMap; +env.put ( + "jmx.remote.rmi.server.credential.types", + new String[]{ + String[].class.getName(), + String.class.getName() + } + ); \ No newline at end of file From bad32716e85c373a3a8f000851d21ce7ce838edc Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Fri, 25 Jun 2021 14:51:09 +0100 Subject: [PATCH 1626/1662] Import Apache Collections models in ExternalFlow --- java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll | 1 + 1 file changed, 1 insertion(+) diff --git a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll index abaaab001718..f43dcf774f2f 100644 --- a/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/src/semmle/code/java/dataflow/ExternalFlow.qll @@ -78,6 +78,7 @@ private import FlowSummary private module Frameworks { private import internal.ContainerFlow private import semmle.code.java.frameworks.ApacheHttp + private import semmle.code.java.frameworks.apache.Collections private import semmle.code.java.frameworks.apache.Lang private import semmle.code.java.frameworks.guava.Guava private import semmle.code.java.frameworks.jackson.JacksonSerializability From 328b69f46cb2486a1e74101030cbffb039e5f4b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=C3=BCller?= Date: Fri, 25 Jun 2021 16:10:20 +0200 Subject: [PATCH 1627/1662] Update java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql --- .../CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql index eab6f1f77179..894304955a91 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql @@ -52,9 +52,10 @@ class SafeFlow extends DataFlow::Configuration { private predicate putsCredentialtypesKey(Expr qualifier) { exists(MapPutCall put | put.getKey().(CompileTimeConstantExpr).getStringValue() = - "jmx.remote.rmi.server.credential.types" or - put.getKey().(CompileTimeConstantExpr).getStringValue() = - "jmx.remote.rmi.server.credentials.filter.pattern" or + ["jmx.remote.rmi.server.credential.types", + "jmx.remote.rmi.server.credentials.filter.pattern"] + + or put.getKey() .(FieldAccess) .getField() From 72ef4983dbf475c0d395be40edc4080e36b3fb78 Mon Sep 17 00:00:00 2001 From: Timo Mueller Date: Fri, 25 Jun 2021 16:11:37 +0200 Subject: [PATCH 1628/1662] Fixed wrong match for symbolic constant --- .../CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql index eab6f1f77179..cf8e65c3bfb1 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql @@ -59,7 +59,7 @@ class SafeFlow extends DataFlow::Configuration { .(FieldAccess) .getField() .hasQualifiedName("javax.management.remote.rmi", "RMIConnectorServer", - ["CREDENTIAL_TYPES", "CREDENTIALS_FILTER_PATTERN", "SERIAL_FILTER_PATTERN"]) + ["CREDENTIAL_TYPES", "CREDENTIALS_FILTER_PATTERN"]) | put.getQualifier() = qualifier and put.getMethod().(MapMethod).getReceiverKeyType() instanceof TypeString and From 8daa398af62eb5e3e87c5d476886f798f033e30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=C3=BCller?= Date: Fri, 25 Jun 2021 16:12:37 +0200 Subject: [PATCH 1629/1662] Update InsecureRmiJmxEnvironmentConfiguration.ql --- .../CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql index 894304955a91..e361af39cf44 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql @@ -60,7 +60,7 @@ class SafeFlow extends DataFlow::Configuration { .(FieldAccess) .getField() .hasQualifiedName("javax.management.remote.rmi", "RMIConnectorServer", - ["CREDENTIAL_TYPES", "CREDENTIALS_FILTER_PATTERN", "SERIAL_FILTER_PATTERN"]) + ["CREDENTIAL_TYPES", "CREDENTIALS_FILTER_PATTERN"]) | put.getQualifier() = qualifier and put.getMethod().(MapMethod).getReceiverKeyType() instanceof TypeString and From 87554a78d4f0fa49ef4a7c7acaddb5237e9f2c66 Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 23 Dec 2020 15:29:13 +0100 Subject: [PATCH 1630/1662] Java: Add insecure trust manager query. --- .../CWE/CWE-295/InsecureTrustManager.java | 50 +++++ .../CWE/CWE-295/InsecureTrustManager.qhelp | 43 +++++ .../CWE/CWE-295/InsecureTrustManager.ql | 180 ++++++++++++++++++ .../CWE-295/InsecureTrustManager.expected | 10 + .../CWE-295/InsecureTrustManager.qlref | 1 + .../CWE-295/InsecureTrustManagerTest.java | 95 +++++++++ 6 files changed, 379 insertions(+) create mode 100644 java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java create mode 100644 java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp create mode 100644 java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql create mode 100644 java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected create mode 100644 java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref create mode 100644 java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java new file mode 100644 index 000000000000..1024af55ea33 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java @@ -0,0 +1,50 @@ +public static void main(String[] args) throws Exception { + { + class InsecureTrustManager implements X509TrustManager { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + // BAD: Does not verify the certificate chain, allowing any certificate. + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + + } + } + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); + } + { + SSLContext context = SSLContext.getInstance("TLS"); + File certificateFile = new File("path/to/self-signed-certificate"); + // Create a `KeyStore` with default type + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + // This causes `keyStore` to be empty + keyStore.load(null, null); + X509Certificate generatedCertificate; + try (InputStream cert = new FileInputStream(certificateFile)) { + generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509") + .generateCertificate(cert); + } + // Add the self-signed certificate to the key store + keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); + // Get default `TrustManagerFactory` + TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + // Use it with our modified key store that trusts our self-signed certificate + tmf.init(keyStore); + TrustManager[] trustManagers = tmf.getTrustManagers(); + context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have + // added the self-signed certificate we want to trust to the key + // store. Note, the `trustManagers` will **only** trust this one + // certificate. + URL url = new URL("https://self-signed.badssl.com/"); + HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); + conn.setSSLSocketFactory(context.getSocketFactory()); + } +} diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp new file mode 100644 index 000000000000..31ca3ae34551 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp @@ -0,0 +1,43 @@ + + + +

    +If the checkServerTrusted method of a TrustManager never throws a CertificateException it trusts every certificate. +This allows an attacker to perform a Man-in-the-middle attack against the application therefore breaking any security Transport Layer Security (TLS) gives. + +An attack would look like this: +1. The program connects to https://example.com. +2. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com. +3. Java calls the checkServerTrusted method to check whether it should trust the certificate. +4. The checkServerTrusted method of your TrustManager does not throw a CertificateException. +5. Java proceeds with the connection since your TrustManager implicitly trusted it by not throwing an exception. +6. The attacker can now read the data your program sends to https://example.com and/or alter its replies while the program thinks the connection is secure. +

    +
    + + +

    +Do not use a custom TrustManager that trusts any certificate. +If you have to use a self-signed certificate, don't trust every certificate, but instead only trust this specific certificate. +See below for an example of how to do this. +

    + +
    + + +

    +In the first (bad) example, the TrustManager never throws a CertificateException thereby trusting any certificate. +This allows an attacker to perform a man-in-the-middle attack. +In the second (good) example, no custom TrustManager is used. Instead, the self-signed certificate that should be trusted +is explicitly trusted by loading it into a KeyStore. +

    + +
    + + +
  • Android Security Guide for TLS/HTTPS.
  • +
  • OWASP: CWE-295.
  • +
    +
    diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql new file mode 100644 index 000000000000..6685eec66d56 --- /dev/null +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -0,0 +1,180 @@ +/** + * @name Everything trusting `TrustManager` + * @description Trusting all certificates allows an attacker to perform a machine-in-the-middle attack. + * @kind path-problem + * @problem.severity error + * @precision high + * @id java/insecure-trustmanager + * @tags security + * external/cwe/cwe-295 + */ + +import java +import semmle.code.java.controlflow.Guards +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources +import semmle.code.java.dataflow.TaintTracking2 +import semmle.code.java.security.Encryption +import DataFlow::PathGraph + +/** + * Models an insecure `X509TrustManager`. + * An `X509TrustManager` is considered insecure if it never throws a `CertificatException` thereby accepting any certificate as valid. + */ +class InsecureX509TrustManager extends RefType { + InsecureX509TrustManager() { + getASupertype*() instanceof X509TrustManager and + exists(Method m | + m.getDeclaringType() = this and + m.hasName("checkServerTrusted") and + not mayThrowCertificateException(m) + ) + } +} + +/** The `java.security.cert.CertificateException` class. */ +private class CertificatException extends RefType { + CertificatException() { hasQualifiedName("java.security.cert", "CertificateException") } +} + +/** + *Holds if: + * - `m` may `throw` an `CertificatException` + * - `m` calls another method that may throw + * - `m` calls a method that declares to throw an `CertificatExceptio`, but for which no source is available + */ +private predicate mayThrowCertificateException(Method m) { + exists(Stmt stmt | m.getBody().getAChild*() = stmt | + stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificatException + ) + or + exists(Method otherMethod | m.polyCalls(otherMethod) | + mayThrowCertificateException(otherMethod) + or + not otherMethod.fromSource() and + otherMethod.getAnException().getType().getASupertype*() instanceof CertificatException + ) +} + +/** + * A configuration to model the flow of a `InsecureX509TrustManager` to an `SSLContext.init` call. + */ +class InsecureTrustManagerConfiguration extends TaintTracking::Configuration { + InsecureTrustManagerConfiguration() { this = "InsecureTrustManagerConfiguration" } + + override predicate isSource(DataFlow::Node source) { + source.asExpr().(ClassInstanceExpr).getConstructedType() instanceof InsecureX509TrustManager + } + + override predicate isSink(DataFlow::Node sink) { + exists(MethodAccess ma, Method m | + m.hasName("init") and + m.getDeclaringType() instanceof SSLContext and + ma.getMethod() = m + | + ma.getArgument(1) = sink.asExpr() + ) + } + + override predicate isSanitizer(DataFlow::Node barrier) { + // ignore nodes that are in functions that intentionally trust all certificates + barrier + .getEnclosingCallable() + .getName() + /* + * Regex: (_)* : + * some methods have underscores. + * Regex: (no|ignore|disable)(strictssl|ssl|verify|verification) + * noStrictSSL ignoreSsl + * Regex: (set)?(accept|trust|ignore|allow)(all|every|any|selfsigned) + * acceptAll trustAll ignoreAll setTrustAnyHttps + * Regex: (use|do|enable)insecure + * useInsecureSSL + * Regex: (set|do|use)?no.*(check|validation|verify|verification) + * setNoCertificateCheck + * Regex: disable + * disableChecks + */ + + .regexpMatch("^(?i)(_)*((no|ignore|disable)(strictssl|ssl|verify|verification)" + + "|(set)?(accept|trust|ignore|allow)(all|every|any|selfsigned)" + + "|(use|do|enable)insecure|(set|do|use)?no.*(check|validation|verify|verification)|disable).*$") + } +} + +bindingset[result] +private string getAFlagName() { + result + .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") +} + +/** + * A flag has to either be of type `String`, `boolean` or `Boolean`. + */ +private class FlagType extends Type { + FlagType() { + this instanceof TypeString + or + this instanceof BooleanType + } +} + +private predicate isEqualsIgnoreCaseMethodAccess(MethodAccess ma) { + ma.getMethod().hasName("equalsIgnoreCase") and + ma.getMethod().getDeclaringType() instanceof TypeString +} + +/** Holds if `source` should is considered a flag. */ +private predicate isFlag(DataFlow::Node source) { + exists(VarAccess v | v.getVariable().getName() = getAFlagName() | + source.asExpr() = v and v.getType() instanceof FlagType + ) + or + exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | source.asExpr() = s) + or + exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | + source.asExpr() = ma and + ma.getType() instanceof FlagType and + not isEqualsIgnoreCaseMethodAccess(ma) + ) +} + +/** Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps. */ +private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + DataFlow::localFlowStep(node1, node2) + or + exists(MethodAccess ma | ma.getMethod() = any(EnvReadMethod m) | + ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() + ) + or + exists(MethodAccess ma | + ma.getMethod().hasName("parseBoolean") and + ma.getMethod().getDeclaringType().hasQualifiedName("java.lang", "Boolean") + | + ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() + ) +} + +/** Gets a guard that depends on a flag. */ +private Guard getAGuard() { + exists(DataFlow::Node source, DataFlow::Node sink | + isFlag(source) and + flagFlowStep*(source, sink) and + sink.asExpr() = result + ) +} + +/** Holds if `node` is guarded by a flag that suggests an intentionally insecure feature. */ +private predicate isNodeGuardedByFlag(DataFlow::Node node) { + exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | g = getAGuard()) +} + +from + DataFlow::PathNode source, DataFlow::PathNode sink, InsecureTrustManagerConfiguration cfg, + RefType trustManager +where + cfg.hasFlowPath(source, sink) and + not isNodeGuardedByFlag(sink.getNode()) and + trustManager = source.getNode().asExpr().(ClassInstanceExpr).getConstructedType() +select sink, source, sink, "$@ that is defined $@ and trusts any certificate, is used here.", + source, "This trustmanager", trustManager, "here" diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected new file mode 100644 index 000000000000..de68af38077e --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected @@ -0,0 +1,10 @@ +edges +| InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:41:23:41:34 | trustManager | +| InsecureTrustManagerTest.java:48:56:48:81 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:49:24:49:35 | trustManager | +nodes +| InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:41:23:41:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:48:56:48:81 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:49:24:49:35 | trustManager | semmle.label | trustManager | +#select +| InsecureTrustManagerTest.java:41:23:41:34 | trustManager | InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:41:23:41:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:20:23:20:42 | InsecureTrustManager | here | diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref new file mode 100644 index 000000000000..9bb2ecf04e83 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref @@ -0,0 +1 @@ +Security/CWE/CWE-295/InsecureTrustManager.ql diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java new file mode 100644 index 000000000000..3858aa2f63bc --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java @@ -0,0 +1,95 @@ +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.net.URL; +import java.security.KeyStore; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; + +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; + +public class InsecureTrustManagerTest { + + private static final boolean TRUST_ALL = true; + + private static class InsecureTrustManager implements X509TrustManager { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + // BAD: Does not verify the certificate chain, allowing any certificate. + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + + } + } + + public static void main(String[] args) throws Exception { + { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. + } + + { + if (TRUST_ALL) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the + // certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + { + disableTrustManager(); + } + { + SSLContext context = SSLContext.getInstance("TLS"); + File certificateFile = new File("path/to/self-signed-certificate"); + // Create a `KeyStore` with default type + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + // This causes `keyStore` to be empty + keyStore.load(null, null); + X509Certificate generatedCertificate; + try (InputStream cert = new FileInputStream(certificateFile)) { + generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509") + .generateCertificate(cert); + } + // Add the self-signed certificate to the key store + keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); + // Get default `TrustManagerFactory` + TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + // Use it with our modified key store that trusts our self-signed certificate + tmf.init(keyStore); + TrustManager[] trustManagers = tmf.getTrustManagers(); + context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have + // added the self-signed certificate we want to trust to the key + // store. Note, the `trustManagers` will **only** trust this one + // certificate. + URL url = new URL("https://self-signed.badssl.com/"); + HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); + conn.setSSLSocketFactory(context.getSocketFactory()); + } + } + + private static void disableTrustManager() { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the + // certificate + // chain, allowing any certificate. BUT it is the method name suggests that this + // is intentional. + } +} \ No newline at end of file From 1b96d0ac543aa1589b034fc1fee1ab0cab6b58bd Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 23 Dec 2020 16:39:19 +0100 Subject: [PATCH 1631/1662] Java: Remove overlapping code --- .../Security/CWE/CWE-273/UnsafeCertTrust.java | 40 ----------- .../CWE/CWE-273/UnsafeCertTrust.qhelp | 12 ++-- .../Security/CWE/CWE-273/UnsafeCertTrust.ql | 47 +------------ .../security/CWE-273/UnsafeCertTrustTest.java | 66 ------------------- 4 files changed, 5 insertions(+), 160 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.java b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.java index b3536fa7d1de..e94491eb22f0 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.java +++ b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.java @@ -1,45 +1,5 @@ public static void main(String[] args) { - { - X509TrustManager trustAllCertManager = new X509TrustManager() { - @Override - public void checkClientTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - } - - @Override - public void checkServerTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - // BAD: trust any server cert - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; //BAD: doesn't check cert issuer - } - }; - } - - { - X509TrustManager trustCertManager = new X509TrustManager() { - @Override - public void checkClientTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - } - - @Override - public void checkServerTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - pkixTrustManager.checkServerTrusted(chain, authType); //GOOD: validate the server cert - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; //GOOD: Validate the cert issuer - } - }; - } - { SSLContext sslContext = SSLContext.getInstance("TLS"); SSLEngine sslEngine = sslContext.createSSLEngine(); diff --git a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.qhelp b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.qhelp index 9a6bdb82cbac..ae8d76b1bb1f 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.qhelp +++ b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.qhelp @@ -4,10 +4,9 @@ -

    Java offers two mechanisms for SSL authentication - trust manager and hostname verifier (checked by the java/insecure-hostname-verifier query). Trust manager validates the peer's certificate chain while hostname verification establishes that the hostname in the URL matches the hostname in the server's identification.

    -

    And when SSLSocket or SSLEngine is created without a valid parameter of setEndpointIdentificationAlgorithm, hostname verification is disabled by default.

    +

    When SSLSocket or SSLEngine is created without a valid parameter of setEndpointIdentificationAlgorithm, hostname verification is disabled by default.

    Unsafe implementation of the interface X509TrustManager and SSLSocket/SSLEngine ignores all SSL certificate validation errors when establishing an HTTPS connection, thereby making the app vulnerable to man-in-the-middle attacks.

    -

    This query checks whether trust manager is set to trust all certificates or setEndpointIdentificationAlgorithm is missing. The query also covers a special implementation com.rabbitmq.client.ConnectionFactory.

    +

    This query checks whether setEndpointIdentificationAlgorithm is missing. The query also covers a special implementation com.rabbitmq.client.ConnectionFactory.

    @@ -15,8 +14,8 @@ -

    The following two examples show two ways of configuring X509 trust cert manager. In the 'BAD' case, -no validation is performed thus any certificate is trusted. In the 'GOOD' case, the proper validation is performed.

    +

    The following two examples show two ways of configuring SSLSocket/SSLEngine. In the 'BAD' case, +setEndpointIdentificationAlgorithm is not called, thus no hostname verification takes place. In the 'GOOD' case, setEndpointIdentificationAlgorithm is called.

    @@ -25,9 +24,6 @@ no validation is performed thus any certificate is trusted. In the 'GOOD' case, CWE-273
  • -How to fix apps containing an unsafe implementation of TrustManager -
  • -
  • Testing Endpoint Identify Verification (MSTG-NETWORK-3)
  • diff --git a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.ql b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.ql index 9efdcbf4c6e0..a18b35ae38f4 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-273/UnsafeCertTrust.ql @@ -1,7 +1,6 @@ /** * @name Unsafe certificate trust - * @description Unsafe implementation of the interface X509TrustManager and - * SSLSocket/SSLEngine ignores all SSL certificate validation + * @description SSLSocket/SSLEngine ignores all SSL certificate validation * errors when establishing an HTTPS connection, thereby making * the app vulnerable to man-in-the-middle attacks. * @kind problem @@ -15,49 +14,6 @@ import java import semmle.code.java.security.Encryption -/** - * X509TrustManager class that blindly trusts all certificates in server SSL authentication - */ -class X509TrustAllManager extends RefType { - X509TrustAllManager() { - this.getASupertype*() instanceof X509TrustManager and - exists(Method m1 | - m1.getDeclaringType() = this and - m1.hasName("checkServerTrusted") and - m1.getBody().getNumStmt() = 0 - ) and - exists(Method m2, ReturnStmt rt2 | - m2.getDeclaringType() = this and - m2.hasName("getAcceptedIssuers") and - rt2.getEnclosingCallable() = m2 and - rt2.getResult() instanceof NullLiteral - ) - } -} - -/** - * The init method of SSLContext with the trust all manager, which is sslContext.init(..., serverTMs, ...) - */ -class X509TrustAllManagerInit extends MethodAccess { - X509TrustAllManagerInit() { - this.getMethod().hasName("init") and - this.getMethod().getDeclaringType() instanceof SSLContext and //init method of SSLContext - ( - exists(ArrayInit ai | - this.getArgument(1).(ArrayCreationExpr).getInit() = ai and - ai.getInit(0).(VarAccess).getVariable().getInitializer().getType().(Class).getASupertype*() - instanceof X509TrustAllManager //Scenario of context.init(null, new TrustManager[] { TRUST_ALL_CERTIFICATES }, null); - ) - or - exists(Variable v, ArrayInit ai | - this.getArgument(1).(VarAccess).getVariable() = v and - ai.getParent() = v.getAnAssignedValue() and - ai.getInit(0).getType().(Class).getASupertype*() instanceof X509TrustAllManager //Scenario of context.init(null, serverTMs, null); - ) - ) - } -} - class SSLEngine extends RefType { SSLEngine() { this.hasQualifiedName("javax.net.ssl", "SSLEngine") } } @@ -208,7 +164,6 @@ class RabbitMQEnableHostnameVerificationNotSet extends MethodAccess { from MethodAccess aa where - aa instanceof X509TrustAllManagerInit or aa instanceof SSLEndpointIdentificationNotSet or aa instanceof RabbitMQEnableHostnameVerificationNotSet select aa, "Unsafe configuration of trusted certificates" diff --git a/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrustTest.java b/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrustTest.java index 1e8ecbbc20d1..cb8b472eb8fd 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrustTest.java +++ b/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrustTest.java @@ -18,72 +18,6 @@ public class UnsafeCertTrustTest { - /** - * Test the implementation of trusting all server certs as a variable - */ - public SSLSocketFactory testTrustAllCertManager() { - try { - final SSLContext context = SSLContext.getInstance("TLS"); - context.init(null, new TrustManager[] { TRUST_ALL_CERTIFICATES }, null); - final SSLSocketFactory socketFactory = context.getSocketFactory(); - return socketFactory; - } catch (final Exception x) { - throw new RuntimeException(x); - } - } - - /** - * Test the implementation of trusting all server certs as an anonymous class - */ - public SSLSocketFactory testTrustAllCertManagerOfVariable() { - try { - SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] serverTMs = new TrustManager[] { new X509TrustAllManager() }; - context.init(null, serverTMs, null); - - final SSLSocketFactory socketFactory = context.getSocketFactory(); - return socketFactory; - } catch (final Exception x) { - throw new RuntimeException(x); - } - } - - private static final X509TrustManager TRUST_ALL_CERTIFICATES = new X509TrustManager() { - @Override - public void checkClientTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - } - - @Override - public void checkServerTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - // Noncompliant - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; // Noncompliant - } - }; - - private class X509TrustAllManager implements X509TrustManager { - @Override - public void checkClientTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - } - - @Override - public void checkServerTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { - // Noncompliant - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; // Noncompliant - } - }; - /** * Test the endpoint identification of SSL engine is set to null */ From 592fd1e8ca9b7d1b37a35e3f2bfd51264f0b97be Mon Sep 17 00:00:00 2001 From: intrigus Date: Sat, 16 Jan 2021 14:07:20 +0100 Subject: [PATCH 1632/1662] Java: Accept test changes --- .../query-tests/security/CWE-273/UnsafeCertTrust.expected | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrust.expected b/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrust.expected index 5d2da21289e5..f26706a56d2c 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrust.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-273/UnsafeCertTrust.expected @@ -1,5 +1,3 @@ -| UnsafeCertTrustTest.java:27:4:27:74 | init(...) | Unsafe configuration of trusted certificates | -| UnsafeCertTrustTest.java:42:4:42:38 | init(...) | Unsafe configuration of trusted certificates | -| UnsafeCertTrustTest.java:92:25:92:52 | createSSLEngine(...) | Unsafe configuration of trusted certificates | -| UnsafeCertTrustTest.java:103:25:103:52 | createSSLEngine(...) | Unsafe configuration of trusted certificates | -| UnsafeCertTrustTest.java:112:34:112:83 | createSocket(...) | Unsafe configuration of trusted certificates | +| UnsafeCertTrustTest.java:26:25:26:52 | createSSLEngine(...) | Unsafe configuration of trusted certificates | +| UnsafeCertTrustTest.java:37:25:37:52 | createSSLEngine(...) | Unsafe configuration of trusted certificates | +| UnsafeCertTrustTest.java:46:34:46:83 | createSocket(...) | Unsafe configuration of trusted certificates | From f52e438f3edf67c74336fff8a84b3d2341b631c9 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Wed, 27 Jan 2021 21:48:32 +0100 Subject: [PATCH 1633/1662] Java: Apply suggestions from code review Co-authored-by: Chris Smowton --- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java | 4 ++-- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java index 1024af55ea33..fd844183fc0a 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java @@ -25,7 +25,7 @@ public void checkClientTrusted(X509Certificate[] chain, String authType) throws File certificateFile = new File("path/to/self-signed-certificate"); // Create a `KeyStore` with default type KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - // This causes `keyStore` to be empty + // `keyStore` is initially empty keyStore.load(null, null); X509Certificate generatedCertificate; try (InputStream cert = new FileInputStream(certificateFile)) { @@ -36,7 +36,7 @@ public void checkClientTrusted(X509Certificate[] chain, String authType) throws keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); // Get default `TrustManagerFactory` TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - // Use it with our modified key store that trusts our self-signed certificate + // Use it with our key store that trusts our self-signed certificate tmf.init(keyStore); TrustManager[] trustManagers = tmf.getTrustManagers(); context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index 6685eec66d56..07b846a212ee 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -1,5 +1,5 @@ /** - * @name Everything trusting `TrustManager` + * @name `TrustManager` that accepts all certificates * @description Trusting all certificates allows an attacker to perform a machine-in-the-middle attack. * @kind path-problem * @problem.severity error From 030c2869022d5686d01fd27730fdbd9c80115e5b Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Wed, 27 Jan 2021 21:49:34 +0100 Subject: [PATCH 1634/1662] Java: Use machine-in-the-middle consistently --- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp index 31ca3ae34551..2aec2e16b7a3 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp @@ -5,7 +5,7 @@

    If the checkServerTrusted method of a TrustManager never throws a CertificateException it trusts every certificate. -This allows an attacker to perform a Man-in-the-middle attack against the application therefore breaking any security Transport Layer Security (TLS) gives. +This allows an attacker to perform a machine-in-the-middle attack against the application therefore breaking any security Transport Layer Security (TLS) gives. An attack would look like this: 1. The program connects to https://example.com. @@ -29,7 +29,7 @@ See below for an example of how to do this.

    In the first (bad) example, the TrustManager never throws a CertificateException thereby trusting any certificate. -This allows an attacker to perform a man-in-the-middle attack. +This allows an attacker to perform a machine-in-the-middle attack. In the second (good) example, no custom TrustManager is used. Instead, the self-signed certificate that should be trusted is explicitly trusted by loading it into a KeyStore.

    From d37d922e8f6a03e8f7947eb971821af985803be8 Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 27 Jan 2021 22:07:45 +0100 Subject: [PATCH 1635/1662] Java: Fix Typos --- .../Security/CWE/CWE-295/InsecureTrustManager.ql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index 07b846a212ee..799d2a76b325 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -19,7 +19,7 @@ import DataFlow::PathGraph /** * Models an insecure `X509TrustManager`. - * An `X509TrustManager` is considered insecure if it never throws a `CertificatException` thereby accepting any certificate as valid. + * An `X509TrustManager` is considered insecure if it never throws a `CertificateException` thereby accepting any certificate as valid. */ class InsecureX509TrustManager extends RefType { InsecureX509TrustManager() { @@ -33,26 +33,26 @@ class InsecureX509TrustManager extends RefType { } /** The `java.security.cert.CertificateException` class. */ -private class CertificatException extends RefType { - CertificatException() { hasQualifiedName("java.security.cert", "CertificateException") } +private class CertificateException extends RefType { + CertificateException() { hasQualifiedName("java.security.cert", "CertificateException") } } /** - *Holds if: - * - `m` may `throw` an `CertificatException` + * Holds if: + * - `m` may `throw` a `CertificateException` * - `m` calls another method that may throw - * - `m` calls a method that declares to throw an `CertificatExceptio`, but for which no source is available + * - `m` calls a method declared to throw a `CertificateException`, but for which no source is available */ private predicate mayThrowCertificateException(Method m) { exists(Stmt stmt | m.getBody().getAChild*() = stmt | - stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificatException + stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificateException ) or exists(Method otherMethod | m.polyCalls(otherMethod) | mayThrowCertificateException(otherMethod) or not otherMethod.fromSource() and - otherMethod.getAnException().getType().getASupertype*() instanceof CertificatException + otherMethod.getAnException().getType().getASupertype*() instanceof CertificateException ) } From 8a7f6b72e96d3d26ecd36e932ffc4aec35d4e2ee Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 27 Jan 2021 22:10:48 +0100 Subject: [PATCH 1636/1662] Java: Apply suggestions for QHelp --- .../CWE/CWE-295/InsecureTrustManager.qhelp | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp index 2aec2e16b7a3..5f7b4ec39ac1 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp @@ -6,14 +6,20 @@

    If the checkServerTrusted method of a TrustManager never throws a CertificateException it trusts every certificate. This allows an attacker to perform a machine-in-the-middle attack against the application therefore breaking any security Transport Layer Security (TLS) gives. +

    + +

    +An attack might look like this: +

    -An attack would look like this: -1. The program connects to https://example.com. -2. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com. -3. Java calls the checkServerTrusted method to check whether it should trust the certificate. -4. The checkServerTrusted method of your TrustManager does not throw a CertificateException. -5. Java proceeds with the connection since your TrustManager implicitly trusted it by not throwing an exception. -6. The attacker can now read the data your program sends to https://example.com and/or alter its replies while the program thinks the connection is secure. +
      +
    1. The vulnerable program connects to https://example.com. +
    2. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com. +
    3. The vulnerable program calls the checkServerTrusted method to check whether it should trust the certificate. +
    4. The checkServerTrusted method of your TrustManager does not throw a CertificateException. +
    5. The vulnerable program accepts the certificate and proceeds with the connection since your TrustManager implicitly trusted it by not throwing an exception. +
    6. The attacker can now read the data your program sends to https://example.com and/or alter its replies while the program thinks the connection is secure. +

    From e4775e0faee885a75f4c3143d305c58abf13767d Mon Sep 17 00:00:00 2001 From: intrigus Date: Sat, 10 Apr 2021 14:48:04 +0200 Subject: [PATCH 1637/1662] Java: Remove "intention-guessing" sanitizer & simplify. This removes the sanitizer part that classified some results as FP if the results were in methods with certain names, like `disableVerification()`. I now think that it's a bad idea to filter based on the method name. The custom flow steps in `flagFlowStep` are now listed explicitly. Simplified check whether a method throws an exception. --- .../CWE/CWE-295/InsecureTrustManager.ql | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index 799d2a76b325..f122b0f5cf31 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -44,9 +44,8 @@ private class CertificateException extends RefType { * - `m` calls a method declared to throw a `CertificateException`, but for which no source is available */ private predicate mayThrowCertificateException(Method m) { - exists(Stmt stmt | m.getBody().getAChild*() = stmt | - stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificateException - ) + m.getBody().getAChild*().(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof + CertificateException or exists(Method otherMethod | m.polyCalls(otherMethod) | mayThrowCertificateException(otherMethod) @@ -75,31 +74,6 @@ class InsecureTrustManagerConfiguration extends TaintTracking::Configuration { ma.getArgument(1) = sink.asExpr() ) } - - override predicate isSanitizer(DataFlow::Node barrier) { - // ignore nodes that are in functions that intentionally trust all certificates - barrier - .getEnclosingCallable() - .getName() - /* - * Regex: (_)* : - * some methods have underscores. - * Regex: (no|ignore|disable)(strictssl|ssl|verify|verification) - * noStrictSSL ignoreSsl - * Regex: (set)?(accept|trust|ignore|allow)(all|every|any|selfsigned) - * acceptAll trustAll ignoreAll setTrustAnyHttps - * Regex: (use|do|enable)insecure - * useInsecureSSL - * Regex: (set|do|use)?no.*(check|validation|verify|verification) - * setNoCertificateCheck - * Regex: disable - * disableChecks - */ - - .regexpMatch("^(?i)(_)*((no|ignore|disable)(strictssl|ssl|verify|verification)" + - "|(set)?(accept|trust|ignore|allow)(all|every|any|selfsigned)" + - "|(use|do|enable)insecure|(set|do|use)?no.*(check|validation|verify|verification)|disable).*$") - } } bindingset[result] @@ -139,7 +113,12 @@ private predicate isFlag(DataFlow::Node source) { ) } -/** Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps. */ +/** + * Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps: + * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. + * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. + * The return value of such a method is then tainted. + */ private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { DataFlow::localFlowStep(node1, node2) or From 6d09db6fd6966eef586bd7bce789aa16ba0a8510 Mon Sep 17 00:00:00 2001 From: intrigus Date: Sat, 10 Apr 2021 14:53:02 +0200 Subject: [PATCH 1638/1662] Java: Explicitly list custom flow steps. --- .../src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql index 1828b924752c..5fce4a588ea7 100644 --- a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql +++ b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql @@ -123,7 +123,12 @@ private predicate isFlag(DataFlow::Node source) { ) } -/** Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps. */ +/** + * Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps: + * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. + * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. + * The return value of such a method is then tainted. + */ private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { DataFlow::localFlowStep(node1, node2) or From 7023793af485483721cb3ff52a9d7da96972b682 Mon Sep 17 00:00:00 2001 From: intrigus Date: Mon, 12 Apr 2021 15:16:02 +0200 Subject: [PATCH 1639/1662] Java: Fix compilation errors in test. --- .../security/CWE-295/InsecureTrustManagerTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java index 3858aa2f63bc..a43498099b85 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java @@ -2,7 +2,9 @@ import java.io.FileInputStream; import java.io.InputStream; import java.net.URL; +import java.security.KeyManagementException; import java.security.KeyStore; +import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; @@ -84,7 +86,7 @@ public static void main(String[] args) throws Exception { } } - private static void disableTrustManager() { + private static void disableTrustManager() throws NoSuchAlgorithmException, KeyManagementException { SSLContext context = SSLContext.getInstance("TLS"); TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the From 484533c659a317c46b9b380c3f66cc4f6058607d Mon Sep 17 00:00:00 2001 From: intrigus Date: Mon, 12 Apr 2021 15:19:18 +0200 Subject: [PATCH 1640/1662] Java: Flag "intentionally" unsafe methods in tests. Previously intentionally unsafe methods such as `disableCertificate` would be ignored by this query. But now they will also be flagged as it is hard to guess intentions... Adjust the tests to account for this change. --- .../CWE-295/InsecureTrustManager.expected | 18 +++++++++++------- .../CWE-295/InsecureTrustManagerTest.java | 6 +++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected index de68af38077e..b7d3703c32f0 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected @@ -1,10 +1,14 @@ edges -| InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:41:23:41:34 | trustManager | -| InsecureTrustManagerTest.java:48:56:48:81 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:49:24:49:35 | trustManager | +| InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:43:23:43:34 | trustManager | +| InsecureTrustManagerTest.java:50:56:50:81 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:51:24:51:35 | trustManager | +| InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:92:22:92:33 | trustManager | nodes -| InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | -| InsecureTrustManagerTest.java:41:23:41:34 | trustManager | semmle.label | trustManager | -| InsecureTrustManagerTest.java:48:56:48:81 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | -| InsecureTrustManagerTest.java:49:24:49:35 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:43:23:43:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:50:56:50:81 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:51:24:51:35 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:92:22:92:33 | trustManager | semmle.label | trustManager | #select -| InsecureTrustManagerTest.java:41:23:41:34 | trustManager | InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:41:23:41:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:40:55:40:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:20:23:20:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:43:23:43:34 | trustManager | InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:43:23:43:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:22:23:22:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:92:22:92:33 | trustManager | InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:92:22:92:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:22:23:22:42 | InsecureTrustManager | here | diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java index a43498099b85..db655ac85415 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java @@ -89,9 +89,9 @@ public static void main(String[] args) throws Exception { private static void disableTrustManager() throws NoSuchAlgorithmException, KeyManagementException { SSLContext context = SSLContext.getInstance("TLS"); TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; - context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the // certificate - // chain, allowing any certificate. BUT it is the method name suggests that this - // is intentional. + // chain, allowing any certificate. The method name suggests that this may be + // intentional, but we flag it anyway. } } \ No newline at end of file From 6413af4fbe40a1418895742015401207478baa76 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 13 Apr 2021 20:26:35 +0200 Subject: [PATCH 1641/1662] Java: Expand tests. --- .../CWE-295/InsecureTrustManagerTest.java | 399 ++++++++++++++++-- 1 file changed, 361 insertions(+), 38 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java index db655ac85415..5b314d464d48 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java @@ -1,9 +1,13 @@ import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.security.KeyManagementException; import java.security.KeyStore; +import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; @@ -18,6 +22,15 @@ public class InsecureTrustManagerTest { private static final boolean TRUST_ALL = true; + private static final boolean SOME_NAME_THAT_IS_NOT_A_FLAG_NAME = true; + + private static boolean isDisableTrust() { + return true; + } + + private static boolean is42TheAnswerForEverything() { + return true; + } private static class InsecureTrustManager implements X509TrustManager { @Override @@ -37,55 +50,365 @@ public void checkClientTrusted(X509Certificate[] chain, String authType) throws } public static void main(String[] args) throws Exception { - { + directInsecureTrustManagerCall(); + + namedVariableFlagDirectInsecureTrustManagerCall(); + noNamedVariableFlagDirectInsecureTrustManagerCall(); + namedVariableFlagIndirectInsecureTrustManagerCall(); + noNamedVariableFlagIndirectInsecureTrustManagerCall(); + + stringLiteralFlagDirectInsecureTrustManagerCall(); + noStringLiteralFlagDirectInsecureTrustManagerCall(); + stringLiteralFlagIndirectInsecureTrustManagerCall(); + noStringLiteralFlagIndirectInsecureTrustManagerCall(); + + methodAccessFlagDirectInsecureTrustManagerCall(); + noMethodAccessFlagDirectInsecureTrustManagerCall(); + methodAccessFlagIndirectInsecureTrustManagerCall(); + noMethodAccessFlagIndirectInsecureTrustManagerCall(); + + isEqualsIgnoreCaseDirectInsecureTrustManagerCall(); + noIsEqualsIgnoreCaseDirectInsecureTrustManagerCall(); + isEqualsIgnoreCaseIndirectInsecureTrustManagerCall(); + noIsEqualsIgnoreCaseIndirectInsecureTrustManagerCall(); + + namedVariableFlagNOTGuardingDirectInsecureTrustManagerCall(); + noNamedVariableFlagNOTGuardingDirectInsecureTrustManagerCall(); + + stringLiteralFlagNOTGuardingDirectInsecureTrustManagerCall(); + noStringLiteralFlagNOTGuardingDirectInsecureTrustManagerCall(); + + methodAccessFlagNOTGuardingDirectInsecureTrustManagerCall(); + noMethodAccessFlagNOTGuardingDirectInsecureTrustManagerCall(); + + isEqualsIgnoreCaseNOTGuardingDirectInsecureTrustManagerCall(); + noIsEqualsIgnoreCaseNOTGuardingDirectInsecureTrustManagerCall(); + + directSecureTrustManagerCall(); + + } + + private static void directSecureTrustManagerCall() throws NoSuchAlgorithmException, KeyStoreException, IOException, + CertificateException, FileNotFoundException, KeyManagementException, MalformedURLException { + SSLContext context = SSLContext.getInstance("TLS"); + File certificateFile = new File("path/to/self-signed-certificate"); + // Create a `KeyStore` with default type + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + // This causes `keyStore` to be empty + keyStore.load(null, null); + X509Certificate generatedCertificate; + try (InputStream cert = new FileInputStream(certificateFile)) { + generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509").generateCertificate(cert); + } + // Add the self-signed certificate to the key store + keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); + // Get default `TrustManagerFactory` + TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + // Use it with our modified key store that trusts our self-signed certificate + tmf.init(keyStore); + TrustManager[] trustManagers = tmf.getTrustManagers(); + context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have + // added the self-signed certificate we want to trust to the key + // store. Note, the `trustManagers` will **only** trust this one + // certificate. + URL url = new URL("https://self-signed.badssl.com/"); + HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); + conn.setSSLSocketFactory(context.getSocketFactory()); + } + + private static void directInsecureTrustManagerCall() throws NoSuchAlgorithmException, KeyManagementException { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. + } + + private static void namedVariableFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (TRUST_ALL) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void namedVariableFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (TRUST_ALL) { + disableTrustManager(); // GOOD [But the disableTrustManager method itself is still detected]: Calls a + // method that install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void noNamedVariableFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (SOME_NAME_THAT_IS_NOT_A_FLAG_NAME) { SSLContext context = SSLContext.getInstance("TLS"); TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate - // chain, allowing any certificate. + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void noNamedVariableFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (SOME_NAME_THAT_IS_NOT_A_FLAG_NAME) { + disableTrustManager(); // BAD [This is detected in the disableTrustManager method]: Calls a method that + // install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void stringLiteralFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("TRUST_ALL"))) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void stringLiteralFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("TRUST_ALL"))) { + disableTrustManager(); // GOOD [But the disableTrustManager method itself is still detected]: Calls a + // method that install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void noStringLiteralFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("SOME_NAME_THAT_IS_NOT_A_FLAG_NAME"))) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void noStringLiteralFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("SOME_NAME_THAT_IS_NOT_A_FLAG_NAME"))) { + disableTrustManager(); // BAD [This is detected in the disableTrustManager method]: Calls a method that + // install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void methodAccessFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (isDisableTrust()) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void methodAccessFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (isDisableTrust()) { + disableTrustManager(); // GOOD [But the disableTrustManager method itself is still detected]: Calls a + // method that install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. BUT it is guarded + // by a feature flag. + } + } + + private static void noMethodAccessFlagDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (is42TheAnswerForEverything()) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void noMethodAccessFlagIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (is42TheAnswerForEverything()) { + disableTrustManager(); // BAD [This is detected in the disableTrustManager method]: Calls a method that + // install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. } + } - { - if (TRUST_ALL) { - SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; - context.init(null, trustManager, null); // GOOD: Uses a `TrustManager` that does not verify the - // certificate - // chain, allowing any certificate. BUT it is guarded - // by a feature flag. - } + private static void isEqualsIgnoreCaseDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (schemaFromHttpRequest.equalsIgnoreCase("https")) { + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. } - { - disableTrustManager(); + } + + private static void isEqualsIgnoreCaseIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (schemaFromHttpRequest.equalsIgnoreCase("https")) { + disableTrustManager(); // BAD [This is detected in the disableTrustManager method]: Calls a method that + // install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. } - { + } + + private static void noIsEqualsIgnoreCaseDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (!schemaFromHttpRequest.equalsIgnoreCase("https")) { SSLContext context = SSLContext.getInstance("TLS"); - File certificateFile = new File("path/to/self-signed-certificate"); - // Create a `KeyStore` with default type - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - // This causes `keyStore` to be empty - keyStore.load(null, null); - X509Certificate generatedCertificate; - try (InputStream cert = new FileInputStream(certificateFile)) { - generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509") - .generateCertificate(cert); - } - // Add the self-signed certificate to the key store - keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); - // Get default `TrustManagerFactory` - TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - // Use it with our modified key store that trusts our self-signed certificate - tmf.init(keyStore); - TrustManager[] trustManagers = tmf.getTrustManagers(); - context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have - // added the self-signed certificate we want to trust to the key - // store. Note, the `trustManagers` will **only** trust this one - // certificate. - URL url = new URL("https://self-signed.badssl.com/"); - HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); - conn.setSSLSocketFactory(context.getSocketFactory()); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. } } + private static void noIsEqualsIgnoreCaseIndirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (!schemaFromHttpRequest.equalsIgnoreCase("https")) { + disableTrustManager(); // BAD [This is detected in the disableTrustManager method]: Calls a method that + // install a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag. + } + } + + private static void namedVariableFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (TRUST_ALL) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if. + + } + + private static void noNamedVariableFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (SOME_NAME_THAT_IS_NOT_A_FLAG_NAME) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if and it is NOT a valid flag. + + } + + private static void stringLiteralFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("TRUST_ALL"))) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if. + + } + + private static void noStringLiteralFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (Boolean.parseBoolean(System.getProperty("SOME_NAME_THAT_IS_NOT_A_FLAG_NAME"))) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if and it is NOT a valid flag. + + } + + private static void methodAccessFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (isDisableTrust()) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if. + + } + + private static void noMethodAccessFlagNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + if (is42TheAnswerForEverything()) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if and it is NOT a valid flag. + + } + + private static void isEqualsIgnoreCaseNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (schemaFromHttpRequest.equalsIgnoreCase("https")) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if and it is NOT a valid flag. + + } + + private static void noIsEqualsIgnoreCaseNOTGuardingDirectInsecureTrustManagerCall() + throws NoSuchAlgorithmException, KeyManagementException { + String schemaFromHttpRequest = "HTTPS"; + if (!schemaFromHttpRequest.equalsIgnoreCase("https")) { + System.out.println("Disabling trust!"); + } + + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); // BAD: Uses a `TrustManager` that does not verify the certificate + // chain, allowing any certificate. It is NOT guarded + // by a feature flag, because it is outside the if and it is NOT a valid flag. + + } + private static void disableTrustManager() throws NoSuchAlgorithmException, KeyManagementException { SSLContext context = SSLContext.getInstance("TLS"); TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; From 281e0859d1a48eefab4f950ba063201773037b92 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 13 Apr 2021 20:27:11 +0200 Subject: [PATCH 1642/1662] Java: Accept test changes. --- .../CWE-295/InsecureTrustManager.expected | 80 ++++++++++++++++--- 1 file changed, 69 insertions(+), 11 deletions(-) diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected index b7d3703c32f0..cba1d7ede75c 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected @@ -1,14 +1,72 @@ edges -| InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:43:23:43:34 | trustManager | -| InsecureTrustManagerTest.java:50:56:50:81 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:51:24:51:35 | trustManager | -| InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:92:22:92:33 | trustManager | +| InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:122:22:122:33 | trustManager | +| InsecureTrustManagerTest.java:130:55:130:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:131:23:131:34 | trustManager | +| InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:152:23:152:34 | trustManager | +| InsecureTrustManagerTest.java:172:55:172:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:173:23:173:34 | trustManager | +| InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:194:23:194:34 | trustManager | +| InsecureTrustManagerTest.java:214:55:214:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:215:23:215:34 | trustManager | +| InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:236:23:236:34 | trustManager | +| InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:258:23:258:34 | trustManager | +| InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:281:23:281:34 | trustManager | +| InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:306:22:306:33 | trustManager | +| InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:320:22:320:33 | trustManager | +| InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:334:22:334:33 | trustManager | +| InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:348:22:348:33 | trustManager | +| InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:362:22:362:33 | trustManager | +| InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:376:22:376:33 | trustManager | +| InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:391:22:391:33 | trustManager | +| InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:406:22:406:33 | trustManager | +| InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:415:22:415:33 | trustManager | nodes -| InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | -| InsecureTrustManagerTest.java:43:23:43:34 | trustManager | semmle.label | trustManager | -| InsecureTrustManagerTest.java:50:56:50:81 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | -| InsecureTrustManagerTest.java:51:24:51:35 | trustManager | semmle.label | trustManager | -| InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | -| InsecureTrustManagerTest.java:92:22:92:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:122:22:122:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:130:55:130:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:131:23:131:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:152:23:152:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:172:55:172:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:173:23:173:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:194:23:194:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:214:55:214:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:215:23:215:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:236:23:236:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:258:23:258:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:281:23:281:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:306:22:306:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:320:22:320:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:334:22:334:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:348:22:348:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:362:22:362:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:376:22:376:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:391:22:391:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:406:22:406:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:415:22:415:33 | trustManager | semmle.label | trustManager | #select -| InsecureTrustManagerTest.java:43:23:43:34 | trustManager | InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:43:23:43:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:42:55:42:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:22:23:22:42 | InsecureTrustManager | here | -| InsecureTrustManagerTest.java:92:22:92:33 | trustManager | InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:92:22:92:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:91:54:91:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:22:23:22:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:122:22:122:33 | trustManager | InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:122:22:122:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:152:23:152:34 | trustManager | InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:152:23:152:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:194:23:194:34 | trustManager | InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:194:23:194:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:236:23:236:34 | trustManager | InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:236:23:236:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:258:23:258:34 | trustManager | InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:258:23:258:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:281:23:281:34 | trustManager | InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:281:23:281:34 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:306:22:306:33 | trustManager | InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:306:22:306:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:320:22:320:33 | trustManager | InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:320:22:320:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:334:22:334:33 | trustManager | InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:334:22:334:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:348:22:348:33 | trustManager | InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:348:22:348:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:362:22:362:33 | trustManager | InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:362:22:362:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:376:22:376:33 | trustManager | InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:376:22:376:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:391:22:391:33 | trustManager | InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:391:22:391:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:406:22:406:33 | trustManager | InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:406:22:406:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | +| InsecureTrustManagerTest.java:415:22:415:33 | trustManager | InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:415:22:415:33 | trustManager | $@ that is defined $@ and trusts any certificate, is used here. | InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | This trustmanager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | here | From 0c1ce741352dc0c31806c4ffe6034488e101813f Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 15 Apr 2021 19:34:14 +0200 Subject: [PATCH 1643/1662] Java: Switch from tabs to spaces. --- .../CWE/CWE-295/InsecureTrustManager.java | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java index fd844183fc0a..bca408f9f013 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java @@ -1,50 +1,50 @@ public static void main(String[] args) throws Exception { - { - class InsecureTrustManager implements X509TrustManager { - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; - } + { + class InsecureTrustManager implements X509TrustManager { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } - @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - // BAD: Does not verify the certificate chain, allowing any certificate. - } + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + // BAD: Does not verify the certificate chain, allowing any certificate. + } - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - } - SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; - context.init(null, trustManager, null); - } - { - SSLContext context = SSLContext.getInstance("TLS"); - File certificateFile = new File("path/to/self-signed-certificate"); - // Create a `KeyStore` with default type - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - // `keyStore` is initially empty - keyStore.load(null, null); - X509Certificate generatedCertificate; - try (InputStream cert = new FileInputStream(certificateFile)) { - generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509") - .generateCertificate(cert); - } - // Add the self-signed certificate to the key store - keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); - // Get default `TrustManagerFactory` - TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - // Use it with our key store that trusts our self-signed certificate - tmf.init(keyStore); - TrustManager[] trustManagers = tmf.getTrustManagers(); - context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have - // added the self-signed certificate we want to trust to the key - // store. Note, the `trustManagers` will **only** trust this one - // certificate. - URL url = new URL("https://self-signed.badssl.com/"); - HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); - conn.setSSLSocketFactory(context.getSocketFactory()); - } + } + } + SSLContext context = SSLContext.getInstance("TLS"); + TrustManager[] trustManager = new TrustManager[] { new InsecureTrustManager() }; + context.init(null, trustManager, null); + } + { + SSLContext context = SSLContext.getInstance("TLS"); + File certificateFile = new File("path/to/self-signed-certificate"); + // Create a `KeyStore` with default type + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + // `keyStore` is initially empty + keyStore.load(null, null); + X509Certificate generatedCertificate; + try (InputStream cert = new FileInputStream(certificateFile)) { + generatedCertificate = (X509Certificate) CertificateFactory.getInstance("X509") + .generateCertificate(cert); + } + // Add the self-signed certificate to the key store + keyStore.setCertificateEntry(certificateFile.getName(), generatedCertificate); + // Get default `TrustManagerFactory` + TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + // Use it with our key store that trusts our self-signed certificate + tmf.init(keyStore); + TrustManager[] trustManagers = tmf.getTrustManagers(); + context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have + // added the self-signed certificate we want to trust to the key + // store. Note, the `trustManagers` will **only** trust this one + // certificate. + URL url = new URL("https://self-signed.badssl.com/"); + HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); + conn.setSSLSocketFactory(context.getSocketFactory()); + } } From 45cec3df1c10aaa7b5f1f2b88fcc7d7a3ef95aad Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 15 Apr 2021 19:36:11 +0200 Subject: [PATCH 1644/1662] Java: Use `this` consistently in QL classes. --- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index f122b0f5cf31..eb035bc3e654 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -23,7 +23,7 @@ import DataFlow::PathGraph */ class InsecureX509TrustManager extends RefType { InsecureX509TrustManager() { - getASupertype*() instanceof X509TrustManager and + this.getASupertype*() instanceof X509TrustManager and exists(Method m | m.getDeclaringType() = this and m.hasName("checkServerTrusted") and @@ -34,7 +34,7 @@ class InsecureX509TrustManager extends RefType { /** The `java.security.cert.CertificateException` class. */ private class CertificateException extends RefType { - CertificateException() { hasQualifiedName("java.security.cert", "CertificateException") } + CertificateException() { this.hasQualifiedName("java.security.cert", "CertificateException") } } /** From 4a00670b68a02f2db59ed729503243a8ef71e83c Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 15 Apr 2021 19:40:22 +0200 Subject: [PATCH 1645/1662] Java: Reduce long comment. --- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index eb035bc3e654..24f2f217dea6 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -19,7 +19,8 @@ import DataFlow::PathGraph /** * Models an insecure `X509TrustManager`. - * An `X509TrustManager` is considered insecure if it never throws a `CertificateException` thereby accepting any certificate as valid. + * An `X509TrustManager` is considered insecure if it never throws a `CertificateException` + * thereby accepting any certificate as valid. */ class InsecureX509TrustManager extends RefType { InsecureX509TrustManager() { From 6f217d37da6581db4869a8f7355e49ac0629cf40 Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 15 Apr 2021 21:20:46 +0200 Subject: [PATCH 1646/1662] Java: Apply suggestions from review. --- .../Security/CWE/CWE-295/InsecureTrustManager.ql | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index 24f2f217dea6..c6120421fd1c 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -80,7 +80,8 @@ class InsecureTrustManagerConfiguration extends TaintTracking::Configuration { bindingset[result] private string getAFlagName() { result - .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") + .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") and + result != "equalsIgnoreCase" } /** @@ -94,11 +95,6 @@ private class FlagType extends Type { } } -private predicate isEqualsIgnoreCaseMethodAccess(MethodAccess ma) { - ma.getMethod().hasName("equalsIgnoreCase") and - ma.getMethod().getDeclaringType() instanceof TypeString -} - /** Holds if `source` should is considered a flag. */ private predicate isFlag(DataFlow::Node source) { exists(VarAccess v | v.getVariable().getName() = getAFlagName() | @@ -109,13 +105,13 @@ private predicate isFlag(DataFlow::Node source) { or exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | source.asExpr() = ma and - ma.getType() instanceof FlagType and - not isEqualsIgnoreCaseMethodAccess(ma) + ma.getType() instanceof FlagType ) } /** - * Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps: + * Holds if there is local flow from `node1` to `node2` either due to standard data-flow steps or the + * following custom flow steps: * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. * The return value of such a method is then tainted. From 51fdcf86c89fef72c46b43167671088193720291 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Wed, 28 Apr 2021 21:14:51 +0200 Subject: [PATCH 1647/1662] Apply suggestions from code review Co-authored-by: Anders Schack-Mulligen --- .../Security/CWE/CWE-295/InsecureTrustManager.ql | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index c6120421fd1c..afe5a2f1d54a 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -18,7 +18,7 @@ import semmle.code.java.security.Encryption import DataFlow::PathGraph /** - * Models an insecure `X509TrustManager`. + * An insecure `X509TrustManager`. * An `X509TrustManager` is considered insecure if it never throws a `CertificateException` * thereby accepting any certificate as valid. */ @@ -40,13 +40,16 @@ private class CertificateException extends RefType { /** * Holds if: - * - `m` may `throw` a `CertificateException` - * - `m` calls another method that may throw + * - `m` may `throw` a `CertificateException`, or + * - `m` calls another method that may throw, or * - `m` calls a method declared to throw a `CertificateException`, but for which no source is available */ private predicate mayThrowCertificateException(Method m) { - m.getBody().getAChild*().(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof - CertificateException + exists(ThrowStmt throwStmt | + throwStmt.getThrownExceptionType().getASupertype*() instanceof CertificateException + | + throwStmt.getEnclosingCallable() = m + ) or exists(Method otherMethod | m.polyCalls(otherMethod) | mayThrowCertificateException(otherMethod) @@ -57,7 +60,7 @@ private predicate mayThrowCertificateException(Method m) { } /** - * A configuration to model the flow of a `InsecureX509TrustManager` to an `SSLContext.init` call. + * A configuration to model the flow of an `InsecureX509TrustManager` to an `SSLContext.init` call. */ class InsecureTrustManagerConfiguration extends TaintTracking::Configuration { InsecureTrustManagerConfiguration() { this = "InsecureTrustManagerConfiguration" } From dc0b06a735d247cfe917cd8ee4f991edd686828b Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 28 Apr 2021 22:03:23 +0200 Subject: [PATCH 1648/1662] Java: Factor out `SecurityFlag` library. --- .../CWE/CWE-295/InsecureTrustManager.ql | 76 ++++------------- .../CWE/CWE-297/UnsafeHostnameVerification.ql | 79 ++++------------- .../code/java/security/SecurityFlag.qll | 84 +++++++++++++++++++ 3 files changed, 118 insertions(+), 121 deletions(-) create mode 100644 java/ql/src/semmle/code/java/security/SecurityFlag.qll diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index afe5a2f1d54a..866641d3cf1e 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -13,8 +13,8 @@ import java import semmle.code.java.controlflow.Guards import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources -import semmle.code.java.dataflow.TaintTracking2 import semmle.code.java.security.Encryption +import semmle.code.java.security.SecurityFlag import DataFlow::PathGraph /** @@ -80,72 +80,30 @@ class InsecureTrustManagerConfiguration extends TaintTracking::Configuration { } } -bindingset[result] -private string getAFlagName() { - result - .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") and - result != "equalsIgnoreCase" -} - /** - * A flag has to either be of type `String`, `boolean` or `Boolean`. + * Flags suggesting a deliberately insecure `TrustManager` usage. */ -private class FlagType extends Type { - FlagType() { - this instanceof TypeString - or - this instanceof BooleanType - } -} - -/** Holds if `source` should is considered a flag. */ -private predicate isFlag(DataFlow::Node source) { - exists(VarAccess v | v.getVariable().getName() = getAFlagName() | - source.asExpr() = v and v.getType() instanceof FlagType - ) - or - exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | source.asExpr() = s) - or - exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | - source.asExpr() = ma and - ma.getType() instanceof FlagType - ) -} +private class InsecureTrustManagerFlag extends FlagKind { + InsecureTrustManagerFlag() { this = "InsecureTrustManagerFlag" } -/** - * Holds if there is local flow from `node1` to `node2` either due to standard data-flow steps or the - * following custom flow steps: - * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. - * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. - * The return value of such a method is then tainted. - */ -private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - DataFlow::localFlowStep(node1, node2) - or - exists(MethodAccess ma | ma.getMethod() = any(EnvReadMethod m) | - ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() - ) - or - exists(MethodAccess ma | - ma.getMethod().hasName("parseBoolean") and - ma.getMethod().getDeclaringType().hasQualifiedName("java.lang", "Boolean") - | - ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() - ) + bindingset[result] + override string getAFlagName() { + result + .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") and + result != "equalsIgnoreCase" + } } -/** Gets a guard that depends on a flag. */ -private Guard getAGuard() { - exists(DataFlow::Node source, DataFlow::Node sink | - isFlag(source) and - flagFlowStep*(source, sink) and - sink.asExpr() = result - ) +/** Gets a guard that represents a (likely) flag controlling an insecure `TrustManager` use. */ +private Guard getAnInsecureTrustManagerFlagGuard() { + result = any(InsecureTrustManagerFlag flag).getAFlag().asExpr() } -/** Holds if `node` is guarded by a flag that suggests an intentionally insecure feature. */ +/** Holds if `node` is guarded by a flag that suggests an intentionally insecure use. */ private predicate isNodeGuardedByFlag(DataFlow::Node node) { - exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | g = getAGuard()) + exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | + g = getASecurityFeatureFlagGuard() or g = getAnInsecureTrustManagerFlagGuard() + ) } from diff --git a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql index 5fce4a588ea7..6d68c6642d21 100644 --- a/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql +++ b/java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql @@ -15,6 +15,7 @@ import semmle.code.java.controlflow.Guards import semmle.code.java.dataflow.DataFlow import semmle.code.java.dataflow.FlowSources import semmle.code.java.security.Encryption +import semmle.code.java.security.SecurityFlag import DataFlow::PathGraph private import semmle.code.java.dataflow.ExternalFlow @@ -86,76 +87,30 @@ private class HostnameVerifierSink extends DataFlow::Node { HostnameVerifierSink() { sinkNode(this, "set-hostname-verifier") } } -bindingset[result] -private string getAFlagName() { - result - .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") -} - /** - * A flag has to either be of type `String`, `boolean` or `Boolean`. + * Flags suggesting a deliberately unsafe `HostnameVerifier` usage. */ -private class FlagType extends Type { - FlagType() { - this instanceof TypeString - or - this instanceof BooleanType +private class UnsafeHostnameVerificationFlag extends FlagKind { + UnsafeHostnameVerificationFlag() { this = "UnsafeHostnameVerificationFlag" } + + bindingset[result] + override string getAFlagName() { + result + .regexpMatch("(?i).*(secure|disable|selfCert|selfSign|validat|verif|trust|ignore|nocertificatecheck).*") and + result != "equalsIgnoreCase" } } -private predicate isEqualsIgnoreCaseMethodAccess(MethodAccess ma) { - ma.getMethod().hasName("equalsIgnoreCase") and - ma.getMethod().getDeclaringType() instanceof TypeString -} - -/** Holds if `source` should is considered a flag. */ -private predicate isFlag(DataFlow::Node source) { - exists(VarAccess v | v.getVariable().getName() = getAFlagName() | - source.asExpr() = v and v.getType() instanceof FlagType - ) - or - exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | source.asExpr() = s) - or - exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | - source.asExpr() = ma and - ma.getType() instanceof FlagType and - not isEqualsIgnoreCaseMethodAccess(ma) - ) -} - -/** - * Holds if there is flow from `node1` to `node2` either due to local flow or due to custom flow steps: - * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. - * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. - * The return value of such a method is then tainted. - */ -private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { - DataFlow::localFlowStep(node1, node2) - or - exists(MethodAccess ma | ma.getMethod() = any(EnvReadMethod m) | - ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() - ) - or - exists(MethodAccess ma | - ma.getMethod().hasName("parseBoolean") and - ma.getMethod().getDeclaringType().hasQualifiedName("java.lang", "Boolean") - | - ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() - ) +/** Gets a guard that represents a (likely) flag controlling an unsafe `HostnameVerifier` use. */ +private Guard getAnUnsafeHostnameVerifierFlagGuard() { + result = any(UnsafeHostnameVerificationFlag flag).getAFlag().asExpr() } -/** Gets a guard that depends on a flag. */ -private Guard getAGuard() { - exists(DataFlow::Node source, DataFlow::Node sink | - isFlag(source) and - flagFlowStep*(source, sink) and - sink.asExpr() = result - ) -} - -/** Holds if `node` is guarded by a flag that suggests an intentionally insecure feature. */ +/** Holds if `node` is guarded by a flag that suggests an intentionally insecure use. */ private predicate isNodeGuardedByFlag(DataFlow::Node node) { - exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | g = getAGuard()) + exists(Guard g | g.controls(node.asExpr().getBasicBlock(), _) | + g = getASecurityFeatureFlagGuard() or g = getAnUnsafeHostnameVerifierFlagGuard() + ) } from diff --git a/java/ql/src/semmle/code/java/security/SecurityFlag.qll b/java/ql/src/semmle/code/java/security/SecurityFlag.qll new file mode 100644 index 000000000000..cd6fe6ddd177 --- /dev/null +++ b/java/ql/src/semmle/code/java/security/SecurityFlag.qll @@ -0,0 +1,84 @@ +/** + * Provides utility predicates to spot variable names, parameter names, and string literals that suggest deliberately insecure settings. + */ + +import java +import semmle.code.java.controlflow.Guards +import semmle.code.java.dataflow.DataFlow +import semmle.code.java.dataflow.FlowSources + +/** + * A kind of flag that may indicate security expectations regarding the code it guards. + */ +abstract class FlagKind extends string { + bindingset[this] + FlagKind() { any() } + + /** + * Returns a flag name of this type. + */ + bindingset[result] + abstract string getAFlagName(); + + /** Gets a node representing a (likely) security flag. */ + DataFlow::Node getAFlag() { + exists(VarAccess v | v.getVariable().getName() = getAFlagName() | + result.asExpr() = v and v.getType() instanceof FlagType + ) + or + exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | result.asExpr() = s) + or + exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | + result.asExpr() = ma and + ma.getType() instanceof FlagType + ) + or + flagFlowStep*(getAFlag(), result) + } +} + +/** + * Flags suggesting an optional feature, perhaps deliberately insecure. + */ +class SecurityFeatureFlag extends FlagKind { + SecurityFeatureFlag() { this = "SecurityFeatureFlag" } + + bindingset[result] + override string getAFlagName() { result.regexpMatch("(?i).*(secure|(en|dis)able).*") } +} + +/** + * A flag has to either be of type `String`, `boolean` or `Boolean`. + */ +private class FlagType extends Type { + FlagType() { + this instanceof TypeString + or + this instanceof BooleanType + } +} + +/** + * Holds if there is local flow from `node1` to `node2` either due to standard data-flow steps or the + * following custom flow steps: + * 1. `Boolean.parseBoolean(taintedValue)` taints the return value of `parseBoolean`. + * 2. A call to an `EnvReadMethod` such as `System.getProperty` where a tainted value is used as an argument. + * The return value of such a method is then tainted. + */ +private predicate flagFlowStep(DataFlow::Node node1, DataFlow::Node node2) { + DataFlow::localFlowStep(node1, node2) + or + exists(MethodAccess ma | ma.getMethod() = any(EnvReadMethod m) | + ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() + ) + or + exists(MethodAccess ma | + ma.getMethod().hasName("parseBoolean") and + ma.getMethod().getDeclaringType().hasQualifiedName("java.lang", "Boolean") + | + ma = node2.asExpr() and ma.getAnArgument() = node1.asExpr() + ) +} + +/** Gets a guard that represents a (likely) security feature-flag check. */ +Guard getASecurityFeatureFlagGuard() { result = any(SecurityFeatureFlag flag).getAFlag().asExpr() } From 6bfdf8d148276e0e8df351fd9e41be5bbdebae6d Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 28 Apr 2021 22:11:43 +0200 Subject: [PATCH 1649/1662] Java: Fix qhelp errors. --- .../Security/CWE/CWE-295/InsecureTrustManager.qhelp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp index 5f7b4ec39ac1..d76927c050e0 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp @@ -13,14 +13,13 @@ An attack might look like this:

      -
    1. The vulnerable program connects to https://example.com. -
    2. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com. -
    3. The vulnerable program calls the checkServerTrusted method to check whether it should trust the certificate. -
    4. The checkServerTrusted method of your TrustManager does not throw a CertificateException. -
    5. The vulnerable program accepts the certificate and proceeds with the connection since your TrustManager implicitly trusted it by not throwing an exception. -
    6. The attacker can now read the data your program sends to https://example.com and/or alter its replies while the program thinks the connection is secure. +
    7. The vulnerable program connects to https://example.com.
    8. +
    9. The attacker intercepts this connection and presents a valid, self-signed certificate for https://example.com.
    10. +
    11. The vulnerable program calls the checkServerTrusted method to check whether it should trust the certificate.
    12. +
    13. The checkServerTrusted method of your TrustManager does not throw a CertificateException.
    14. +
    15. The vulnerable program accepts the certificate and proceeds with the connection since your TrustManager implicitly trusted it by not throwing an exception.
    16. +
    17. The attacker can now read the data your program sends to https://example.com and/or alter its replies while the program thinks the connection is secure.
    -

    From f0d4b1d2b0bc5f72b1a6393c1fba03747046dbc7 Mon Sep 17 00:00:00 2001 From: intrigus Date: Tue, 4 May 2021 15:54:44 +0200 Subject: [PATCH 1650/1662] Java: Add change-note. --- java/change-notes/2021-05-04-insecure-trust-manager.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 java/change-notes/2021-05-04-insecure-trust-manager.md diff --git a/java/change-notes/2021-05-04-insecure-trust-manager.md b/java/change-notes/2021-05-04-insecure-trust-manager.md new file mode 100644 index 000000000000..7e78a63637d9 --- /dev/null +++ b/java/change-notes/2021-05-04-insecure-trust-manager.md @@ -0,0 +1,4 @@ +lgtm,codescanning +* A new query "`TrustManager` that accepts all certificates" + (`java/insecure-trustmanager`) has been added. This query finds insecure + `TrustManager`s that may allow machine-in-the-middle attacks. From f527df73d56517a06c1a2d620f179313bff99068 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Wed, 5 May 2021 23:39:49 +0200 Subject: [PATCH 1651/1662] Apply suggestions from code review. Co-authored-by: Felicity Chapman --- .../src/Security/CWE/CWE-295/InsecureTrustManager.qhelp | 9 ++++----- java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp index d76927c050e0..99746477a343 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp @@ -33,16 +33,15 @@ See below for an example of how to do this.

    -In the first (bad) example, the TrustManager never throws a CertificateException thereby trusting any certificate. +In the first (bad) example, the TrustManager never throws a CertificateException and therefore implicitly trusts any certificate. This allows an attacker to perform a machine-in-the-middle attack. -In the second (good) example, no custom TrustManager is used. Instead, the self-signed certificate that should be trusted -is explicitly trusted by loading it into a KeyStore. +In the second (good) example, the self-signed certificate that should be trusted +is loaded into a KeyStore. This explicitly defines the certificate as trusted and there is no need to create a custom TrustManager.

    -
  • Android Security Guide for TLS/HTTPS.
  • -
  • OWASP: CWE-295.
  • +
  • Android Develoers:Security with HTTPS and SSL.
  • diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql index 866641d3cf1e..598113ed5cda 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql @@ -20,7 +20,7 @@ import DataFlow::PathGraph /** * An insecure `X509TrustManager`. * An `X509TrustManager` is considered insecure if it never throws a `CertificateException` - * thereby accepting any certificate as valid. + * and therefore implicitly trusts any certificate as valid. */ class InsecureX509TrustManager extends RefType { InsecureX509TrustManager() { From fe923facc8d2f511c13137d88252673e242be0e3 Mon Sep 17 00:00:00 2001 From: intrigus Date: Wed, 5 May 2021 23:41:55 +0200 Subject: [PATCH 1652/1662] Java: Move comments to separate lines. Move comments to separate lines to improve the rendering in the finished query help. --- .../src/Security/CWE/CWE-295/InsecureTrustManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java index bca408f9f013..4e9c3ce6bbc9 100644 --- a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java +++ b/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java @@ -39,10 +39,12 @@ public void checkClientTrusted(X509Certificate[] chain, String authType) throws // Use it with our key store that trusts our self-signed certificate tmf.init(keyStore); TrustManager[] trustManagers = tmf.getTrustManagers(); - context.init(null, trustManagers, null); // GOOD, we are not using a custom `TrustManager` but instead have - // added the self-signed certificate we want to trust to the key - // store. Note, the `trustManagers` will **only** trust this one - // certificate. + context.init(null, trustManagers, null); + // GOOD, we are not using a custom `TrustManager` but instead have + // added the self-signed certificate we want to trust to the key + // store. Note, the `trustManagers` will **only** trust this one + // certificate. + URL url = new URL("https://self-signed.badssl.com/"); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setSSLSocketFactory(context.getSocketFactory()); From 36575bb26fcd02ff19deb82d57d91dbc2e8d4253 Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 17 Jun 2021 19:10:50 +0200 Subject: [PATCH 1653/1662] Move back to experimental......... --- .../Security/CWE/CWE-295/InsecureTrustManager.java | 0 .../Security/CWE/CWE-295/InsecureTrustManager.qhelp | 0 .../Security/CWE/CWE-295/InsecureTrustManager.ql | 0 .../query-tests/security/CWE-295/InsecureTrustManager.expected | 0 .../query-tests/security/CWE-295/InsecureTrustManager.qlref | 0 .../query-tests/security/CWE-295/InsecureTrustManagerTest.java | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename java/ql/src/{ => experimental}/Security/CWE/CWE-295/InsecureTrustManager.java (100%) rename java/ql/src/{ => experimental}/Security/CWE/CWE-295/InsecureTrustManager.qhelp (100%) rename java/ql/src/{ => experimental}/Security/CWE/CWE-295/InsecureTrustManager.ql (100%) rename java/ql/test/{ => experimental}/query-tests/security/CWE-295/InsecureTrustManager.expected (100%) rename java/ql/test/{ => experimental}/query-tests/security/CWE-295/InsecureTrustManager.qlref (100%) rename java/ql/test/{ => experimental}/query-tests/security/CWE-295/InsecureTrustManagerTest.java (100%) diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java b/java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.java similarity index 100% rename from java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.java rename to java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.java diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp b/java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.qhelp similarity index 100% rename from java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.qhelp rename to java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.qhelp diff --git a/java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql b/java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.ql similarity index 100% rename from java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql rename to java/ql/src/experimental/Security/CWE/CWE-295/InsecureTrustManager.ql diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.expected rename to java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.expected diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref similarity index 100% rename from java/ql/test/query-tests/security/CWE-295/InsecureTrustManager.qlref rename to java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManagerTest.java similarity index 100% rename from java/ql/test/query-tests/security/CWE-295/InsecureTrustManagerTest.java rename to java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManagerTest.java From 5106aec319ce3b8f3980bd4be0513c0686cbdc0b Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 17 Jun 2021 19:16:00 +0200 Subject: [PATCH 1654/1662] Fix test location. --- .../query-tests/security/CWE-295/InsecureTrustManager.qlref | 1 - .../{ => InsecureTrustManager}/InsecureTrustManager.expected | 0 .../CWE-295/InsecureTrustManager/InsecureTrustManager.qlref | 1 + .../{ => InsecureTrustManager}/InsecureTrustManagerTest.java | 0 4 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref rename java/ql/test/experimental/query-tests/security/CWE-295/{ => InsecureTrustManager}/InsecureTrustManager.expected (100%) create mode 100644 java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.qlref rename java/ql/test/experimental/query-tests/security/CWE-295/{ => InsecureTrustManager}/InsecureTrustManagerTest.java (100%) diff --git a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref deleted file mode 100644 index 9bb2ecf04e83..000000000000 --- a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.qlref +++ /dev/null @@ -1 +0,0 @@ -Security/CWE/CWE-295/InsecureTrustManager.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.expected b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager.expected rename to java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected diff --git a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.qlref b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.qlref new file mode 100644 index 000000000000..9950f6276595 --- /dev/null +++ b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.qlref @@ -0,0 +1 @@ +experimental/Security/CWE/CWE-295/InsecureTrustManager.ql diff --git a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManagerTest.java b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java similarity index 100% rename from java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManagerTest.java rename to java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java From be57aeccf29729ce5f9ad50e68f63aa5f69f0a0f Mon Sep 17 00:00:00 2001 From: intrigus Date: Thu, 17 Jun 2021 19:16:16 +0200 Subject: [PATCH 1655/1662] Remove change-note. --- java/change-notes/2021-05-04-insecure-trust-manager.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 java/change-notes/2021-05-04-insecure-trust-manager.md diff --git a/java/change-notes/2021-05-04-insecure-trust-manager.md b/java/change-notes/2021-05-04-insecure-trust-manager.md deleted file mode 100644 index 7e78a63637d9..000000000000 --- a/java/change-notes/2021-05-04-insecure-trust-manager.md +++ /dev/null @@ -1,4 +0,0 @@ -lgtm,codescanning -* A new query "`TrustManager` that accepts all certificates" - (`java/insecure-trustmanager`) has been added. This query finds insecure - `TrustManager`s that may allow machine-in-the-middle attacks. From a79356e31632c5d9a098add7e1f78143bbe8513f Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 25 Jun 2021 12:16:54 +0200 Subject: [PATCH 1656/1662] Apply suggestions from code review --- .../code/java/security/SecurityFlag.qll | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/java/ql/src/semmle/code/java/security/SecurityFlag.qll b/java/ql/src/semmle/code/java/security/SecurityFlag.qll index cd6fe6ddd177..e4f47d95ec45 100644 --- a/java/ql/src/semmle/code/java/security/SecurityFlag.qll +++ b/java/ql/src/semmle/code/java/security/SecurityFlag.qll @@ -15,32 +15,34 @@ abstract class FlagKind extends string { FlagKind() { any() } /** - * Returns a flag name of this type. + * Gets a flag name of this type. */ bindingset[result] abstract string getAFlagName(); /** Gets a node representing a (likely) security flag. */ DataFlow::Node getAFlag() { - exists(VarAccess v | v.getVariable().getName() = getAFlagName() | - result.asExpr() = v and v.getType() instanceof FlagType + exists(DataFlow::Node flag | + exists(VarAccess v | v.getVariable().getName() = getAFlagName() | + flag.asExpr() = v and v.getType() instanceof FlagType + ) + or + exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | flag.asExpr() = s) + or + exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | + flag.asExpr() = ma and + ma.getType() instanceof FlagType + ) + | + flagFlowStep*(flag, result) ) - or - exists(StringLiteral s | s.getRepresentedString() = getAFlagName() | result.asExpr() = s) - or - exists(MethodAccess ma | ma.getMethod().getName() = getAFlagName() | - result.asExpr() = ma and - ma.getType() instanceof FlagType - ) - or - flagFlowStep*(getAFlag(), result) } } /** * Flags suggesting an optional feature, perhaps deliberately insecure. */ -class SecurityFeatureFlag extends FlagKind { +private class SecurityFeatureFlag extends FlagKind { SecurityFeatureFlag() { this = "SecurityFeatureFlag" } bindingset[result] From 5aa711a95626b06efa723c83700dd5c5d6a4f0fb Mon Sep 17 00:00:00 2001 From: intrigus Date: Fri, 25 Jun 2021 17:04:36 +0200 Subject: [PATCH 1657/1662] Accept test changes. --- .../InsecureTrustManager.expected | 72 ++++++++++++++----- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected index cba1d7ede75c..08c8962cd983 100644 --- a/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected +++ b/java/ql/test/experimental/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManager.expected @@ -1,57 +1,93 @@ edges -| InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:122:22:122:33 | trustManager | -| InsecureTrustManagerTest.java:130:55:130:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:131:23:131:34 | trustManager | -| InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:152:23:152:34 | trustManager | -| InsecureTrustManagerTest.java:172:55:172:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:173:23:173:34 | trustManager | -| InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:194:23:194:34 | trustManager | -| InsecureTrustManagerTest.java:214:55:214:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:215:23:215:34 | trustManager | -| InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:236:23:236:34 | trustManager | -| InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:258:23:258:34 | trustManager | -| InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:281:23:281:34 | trustManager | -| InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:306:22:306:33 | trustManager | -| InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:320:22:320:33 | trustManager | -| InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:334:22:334:33 | trustManager | -| InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:348:22:348:33 | trustManager | -| InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:362:22:362:33 | trustManager | -| InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:376:22:376:33 | trustManager | -| InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:391:22:391:33 | trustManager | -| InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:406:22:406:33 | trustManager | -| InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:415:22:415:33 | trustManager | +| InsecureTrustManagerTest.java:121:33:121:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:122:22:122:33 | trustManager | +| InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:121:33:121:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:130:34:130:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:131:23:131:34 | trustManager | +| InsecureTrustManagerTest.java:130:55:130:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:130:34:130:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:151:34:151:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:152:23:152:34 | trustManager | +| InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:151:34:151:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:172:34:172:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:173:23:173:34 | trustManager | +| InsecureTrustManagerTest.java:172:55:172:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:172:34:172:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:193:34:193:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:194:23:194:34 | trustManager | +| InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:193:34:193:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:214:34:214:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:215:23:215:34 | trustManager | +| InsecureTrustManagerTest.java:214:55:214:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:214:34:214:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:235:34:235:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:236:23:236:34 | trustManager | +| InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:235:34:235:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:257:34:257:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:258:23:258:34 | trustManager | +| InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:257:34:257:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:280:34:280:82 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:281:23:281:34 | trustManager | +| InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:280:34:280:82 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:305:33:305:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:306:22:306:33 | trustManager | +| InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:305:33:305:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:319:33:319:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:320:22:320:33 | trustManager | +| InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:319:33:319:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:333:33:333:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:334:22:334:33 | trustManager | +| InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:333:33:333:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:347:33:347:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:348:22:348:33 | trustManager | +| InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:347:33:347:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:361:33:361:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:362:22:362:33 | trustManager | +| InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:361:33:361:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:375:33:375:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:376:22:376:33 | trustManager | +| InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:375:33:375:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:390:33:390:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:391:22:391:33 | trustManager | +| InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:390:33:390:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:405:33:405:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:406:22:406:33 | trustManager | +| InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:405:33:405:81 | {...} [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:414:33:414:81 | {...} [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:415:22:415:33 | trustManager | +| InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:414:33:414:81 | {...} [[]] : InsecureTrustManager | nodes +| InsecureTrustManagerTest.java:121:33:121:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:121:54:121:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:122:22:122:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:130:34:130:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:130:55:130:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:131:23:131:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:151:34:151:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:151:55:151:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:152:23:152:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:172:34:172:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:172:55:172:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:173:23:173:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:193:34:193:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:193:55:193:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:194:23:194:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:214:34:214:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:214:55:214:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:215:23:215:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:235:34:235:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:235:55:235:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:236:23:236:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:257:34:257:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:257:55:257:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:258:23:258:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:280:34:280:82 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:280:55:280:80 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:281:23:281:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:305:33:305:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:305:54:305:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:306:22:306:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:319:33:319:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:319:54:319:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:320:22:320:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:333:33:333:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:333:54:333:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:334:22:334:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:347:33:347:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:347:54:347:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:348:22:348:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:361:33:361:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:361:54:361:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:362:22:362:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:375:33:375:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:375:54:375:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:376:22:376:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:390:33:390:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:390:54:390:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:391:22:391:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:405:33:405:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:405:54:405:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:406:22:406:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:414:33:414:81 | {...} [[]] : InsecureTrustManager | semmle.label | {...} [[]] : InsecureTrustManager | | InsecureTrustManagerTest.java:414:54:414:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | | InsecureTrustManagerTest.java:415:22:415:33 | trustManager | semmle.label | trustManager | #select From e5fa5325b5e25ea8f6bf25ee34e2a30819430750 Mon Sep 17 00:00:00 2001 From: Timo Mueller Date: Fri, 25 Jun 2021 22:31:29 +0200 Subject: [PATCH 1658/1662] Auto formatting .ql file --- .../CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql index e361af39cf44..9733ccf7b559 100644 --- a/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql +++ b/java/ql/src/experimental/Security/CWE/CWE-665/InsecureRmiJmxEnvironmentConfiguration.ql @@ -52,10 +52,11 @@ class SafeFlow extends DataFlow::Configuration { private predicate putsCredentialtypesKey(Expr qualifier) { exists(MapPutCall put | put.getKey().(CompileTimeConstantExpr).getStringValue() = - ["jmx.remote.rmi.server.credential.types", - "jmx.remote.rmi.server.credentials.filter.pattern"] - - or + [ + "jmx.remote.rmi.server.credential.types", + "jmx.remote.rmi.server.credentials.filter.pattern" + ] + or put.getKey() .(FieldAccess) .getField() From eac1c5d10982f5c72a57e742dacb4327af0153a6 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 29 Jun 2021 10:58:28 +0200 Subject: [PATCH 1659/1662] Python: Fix concepts-tests for SQLAlchemy --- .../frameworks/sqlalchemy/ConceptsTest.ql | 1 + .../frameworks/sqlalchemy/SqlExecution.py | 25 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.ql b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.ql index b557a0bccb69..b097eb15648b 100644 --- a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.ql +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.ql @@ -1,2 +1,3 @@ import python import experimental.meta.ConceptsTest +import experimental.semmle.python.frameworks.SqlAlchemy diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py index 9018c2559784..1d2e861a8e9f 100644 --- a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py @@ -34,23 +34,24 @@ class User(Base): session.commit() # Injection without requiring the text() taint-step -session.query(User).filter_by(name="some sql") # $getSql="some sql" -session.scalar("some sql") # $getSql="some sql" -engine.scalar("some sql") # $getSql="some sql" -session.execute("some sql") # $getSql="some sql" +session.query(User).filter_by(name="some sql") # $ MISSING: getSql="some sql" +session.scalar("some sql") # $ getSql="some sql" +engine.scalar("some sql") # $ getSql="some sql" +session.execute("some sql") # $ getSql="some sql" with engine.connect() as connection: - connection.execute("some sql") # $getSql="some sql" + connection.execute("some sql") # $ getSql="some sql" with engine.begin() as connection: - connection.execute("some sql") # $getSql="some sql" + connection.execute("some sql") # $ getSql="some sql" # Injection requiring the text() taint-step -session.query(User).filter(text("some sql")) # $getSql="some sql" -session.query(User).group_by( User.id ).having(text("some sql")) # $getSql="some sql" -session.query(User).group_by(text("name='some sql'")).first() # $getSql="some sql" -session.query(User).order_by(text("name='some sql'")).first() # $getSql="some sql" +t = text("some sql") +session.query(User).filter(t) # $ getSql=t +session.query(User).group_by(User.id).having(t) # $ getSql=Attribute MISSING: getSql=t +session.query(User).group_by(t).first() # $ getSql=t +session.query(User).order_by(t).first() # $ getSql=t -query = select(User).where(User.name == text("some sql")) # $getSql="some sql" +query = select(User).where(User.name == t) # $ MISSING: getSql=t with engine.connect() as conn: - conn.execute(query) + conn.execute(query) # $ getSql=query From cb112395f84c16bf8e4c1399b4190da744b7ff83 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 29 Jun 2021 10:59:26 +0200 Subject: [PATCH 1660/1662] Python: Fixup after merging main --- .../library-tests/frameworks/sqlalchemy/ConceptsTest.expected | 0 .../library-tests/frameworks/sqlalchemy/SqlExecution.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.expected diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.expected b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/ConceptsTest.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py index 1d2e861a8e9f..7731e80e5340 100644 --- a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/SqlExecution.py @@ -48,7 +48,7 @@ class User(Base): # Injection requiring the text() taint-step t = text("some sql") session.query(User).filter(t) # $ getSql=t -session.query(User).group_by(User.id).having(t) # $ getSql=Attribute MISSING: getSql=t +session.query(User).group_by(User.id).having(t) # $ getSql=User.id MISSING: getSql=t session.query(User).group_by(t).first() # $ getSql=t session.query(User).order_by(t).first() # $ getSql=t From ef48734206153930163d3da7a27f6cec9f3cd80d Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 29 Jun 2021 11:03:40 +0200 Subject: [PATCH 1661/1662] Python: Add taint-tests for SQLAlchemy --- .../frameworks/sqlalchemy/InlineTaintTest.expected | 3 +++ .../frameworks/sqlalchemy/InlineTaintTest.ql | 2 ++ .../frameworks/sqlalchemy/taint_test.py | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.expected create mode 100644 python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.ql create mode 100644 python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.expected b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.expected new file mode 100644 index 000000000000..79d760d87f42 --- /dev/null +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.expected @@ -0,0 +1,3 @@ +argumentToEnsureNotTaintedNotMarkedAsSpurious +untaintedArgumentToEnsureTaintedNotMarkedAsMissing +failures diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.ql b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.ql new file mode 100644 index 000000000000..2ddb342c62fd --- /dev/null +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/InlineTaintTest.ql @@ -0,0 +1,2 @@ +import experimental.meta.InlineTaintTest +import experimental.semmle.python.frameworks.SqlAlchemy diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py new file mode 100644 index 000000000000..cdb3da98044c --- /dev/null +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py @@ -0,0 +1,12 @@ +import sqlalchemy + +def test_taint(): + ts = TAINTED_STRING + + ensure_tainted( + ts, # $ tainted + sqlalchemy.text(ts), # $ MISSING: tainted + sqlalchemy.sql.text(ts),# $ MISSING: tainted + sqlalchemy.sql.expression.text(ts),# $ MISSING: tainted + sqlalchemy.sql.expression.TextClause(ts),# $ MISSING: tainted + ) From a5a7f3e38ac38ef221697e0f541caaffeda0b144 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 29 Jun 2021 11:06:25 +0200 Subject: [PATCH 1662/1662] Python: Add taint-step for `sqlalchemy.text` --- .../semmle/python/frameworks/SqlAlchemy.qll | 34 +++++++++++++++++++ .../frameworks/sqlalchemy/taint_test.py | 8 ++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/python/ql/src/experimental/semmle/python/frameworks/SqlAlchemy.qll b/python/ql/src/experimental/semmle/python/frameworks/SqlAlchemy.qll index 9baaad4fd6b7..ea419299897a 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/SqlAlchemy.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/SqlAlchemy.qll @@ -83,4 +83,38 @@ private module SqlAlchemy { override DataFlow::Node getSql() { result = this.getArg(0) } } + + /** + * Additional taint-steps for `sqlalchemy.text()` + * + * See https://docs.sqlalchemy.org/en/14/core/sqlelement.html#sqlalchemy.sql.expression.text + * See https://docs.sqlalchemy.org/en/14/core/sqlelement.html#sqlalchemy.sql.expression.TextClause + */ + class SqlAlchemyTextAdditionalTaintSteps extends TaintTracking::AdditionalTaintStep { + override predicate step(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) { + exists(DataFlow::CallCfgNode call | + ( + call = API::moduleImport("sqlalchemy").getMember("text").getACall() + or + call = API::moduleImport("sqlalchemy").getMember("sql").getMember("text").getACall() + or + call = + API::moduleImport("sqlalchemy") + .getMember("sql") + .getMember("expression") + .getMember("text") + .getACall() + or + call = + API::moduleImport("sqlalchemy") + .getMember("sql") + .getMember("expression") + .getMember("TextClause") + .getACall() + ) and + nodeFrom in [call.getArg(0), call.getArgByName("text")] and + nodeTo = call + ) + } + } } diff --git a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py index cdb3da98044c..91f8987132f5 100644 --- a/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py +++ b/python/ql/test/experimental/library-tests/frameworks/sqlalchemy/taint_test.py @@ -5,8 +5,8 @@ def test_taint(): ensure_tainted( ts, # $ tainted - sqlalchemy.text(ts), # $ MISSING: tainted - sqlalchemy.sql.text(ts),# $ MISSING: tainted - sqlalchemy.sql.expression.text(ts),# $ MISSING: tainted - sqlalchemy.sql.expression.TextClause(ts),# $ MISSING: tainted + sqlalchemy.text(ts), # $ tainted + sqlalchemy.sql.text(ts),# $ tainted + sqlalchemy.sql.expression.text(ts),# $ tainted + sqlalchemy.sql.expression.TextClause(ts),# $ tainted )